@botpress/webchat 2.3.7 → 2.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +7 -7
- package/dist/adapters/target.d.ts +1 -0
- package/dist/adapters/webchat.d.ts +1 -1
- package/dist/index.js +2887 -2877
- package/dist/index.umd.cjs +48 -48
- package/dist/stores/webchatStore.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Pe,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],D):(Pe=typeof globalThis<"u"?globalThis:Pe||self,D(Pe.Webchat={},Pe.React,Pe.ReactDOM))})(this,function(Pe,D,Di){"use strict";var ope=Object.defineProperty;var spe=(Pe,D,Di)=>D in Pe?ope(Pe,D,{enumerable:!0,configurable:!0,writable:!0,value:Di}):Pe[D]=Di;var Ee=(Pe,D,Di)=>spe(Pe,typeof D!="symbol"?D+"":D,Di);function by(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const w=by(D),xy=by(Di),
|
|
1
|
+
(function(Pe,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],D):(Pe=typeof globalThis<"u"?globalThis:Pe||self,D(Pe.Webchat={},Pe.React,Pe.ReactDOM))})(this,function(Pe,D,Di){"use strict";var ope=Object.defineProperty;var spe=(Pe,D,Di)=>D in Pe?ope(Pe,D,{enumerable:!0,configurable:!0,writable:!0,value:Di}):Pe[D]=Di;var Ee=(Pe,D,Di)=>spe(Pe,typeof D!="symbol"?D+"":D,Di);function by(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const w=by(D),xy=by(Di),QI=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let $l;const eR=new Uint8Array(16);function tR(){if(!$l&&($l=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!$l))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $l(eR)}const Gt=[];for(let e=0;e<256;++e)Gt.push((e+256).toString(16).slice(1));function nR(e,t=0){return Gt[e[t+0]]+Gt[e[t+1]]+Gt[e[t+2]]+Gt[e[t+3]]+"-"+Gt[e[t+4]]+Gt[e[t+5]]+"-"+Gt[e[t+6]]+Gt[e[t+7]]+"-"+Gt[e[t+8]]+Gt[e[t+9]]+"-"+Gt[e[t+10]]+Gt[e[t+11]]+Gt[e[t+12]]+Gt[e[t+13]]+Gt[e[t+14]]+Gt[e[t+15]]}const wy={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ko(e,t,n){if(wy.randomUUID&&!t&&!e)return wy.randomUUID();e=e||{};const r=e.random||(e.rng||tR)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,nR(r)}const $o=e=>({block:e,type:"bubble"}),Sy=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(o=>{switch(o.action){case"postback":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};case"url":return{type:"button",variant:"link",text:o.label,buttonValue:o.value,reusable:!0};case"say":return{type:"button",variant:"action",text:o.label,buttonValue:o.value,reusable:!0};default:throw new Error(`Unknown action type ${o.action}`)}}),a=[];return r&&a.push({type:"image",url:r}),t&&a.push({type:"text",text:`## ${t}`}),n&&a.push({type:"text",text:n}),i.length>0&&a.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...a]}},Ey=e=>({payload:{type:"audio",url:e.audioUrl}}),rR=e=>({payload:$o(Sy(e))}),iR=e=>({payload:{type:"carousel",blocks:e.items.map(t=>Sy(t))}}),aR=e=>{const t=e.options.map(a=>({title:a.label,value:a.value})),n=e.text,r=ko(),i=$o({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:i}:{disableInput:e.disableFreeText,payload:{type:"column",horizontalAlignment:"left",blocks:[i,{type:"row",blocks:t.map(({title:a,value:o})=>({type:"button",variant:"action",text:a,buttonValue:o,groupId:r}))}]}}},oR=e=>{const t=e.options.map(i=>({label:i.label,value:i.value})),n=e.text,r=[{type:"dropdown",label:n??"Select an option",options:t}];return n&&r.unshift({type:"text",text:n}),{disableInput:!0,payload:$o({type:"column",blocks:r})}},_y=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),ky=e=>({payload:{type:"image",url:e.imageUrl}}),$y=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),Oy=e=>({payload:$o({type:"text",text:e.markdown})}),Ty=e=>({payload:$o({type:"text",text:e.text,value:e.value})}),Cy=e=>({payload:{type:"video",url:e.videoUrl}}),sR=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return Ey({...n.payload,type:n.type}).payload;case"file":return _y({...n.payload,type:n.type}).payload;case"image":return ky({...n.payload,type:n.type}).payload;case"location":return $y({...n.payload,type:n.type}).payload;case"markdown":return Oy({...n.payload,type:n.type}).payload;case"text":return Ty({...n.payload,type:n.type}).payload;case"video":return Cy({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),Oo=e=>{switch(e.type){case"audio":return Ey(e);case"card":return rR(e);case"carousel":return iR(e);case"choice":return aR(e);case"dropdown":return oR(e);case"file":return _y(e);case"image":return ky(e);case"location":return $y(e);case"markdown":return Oy(e);case"text":return Ty(e);case"video":return Cy(e);case"bloc":return sR(e);default:throw new Error("Unsuported message type")}},lR=Object.freeze(Object.defineProperty({__proto__:null,target:QI,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:Oo},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function cR(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var qf={exports:{}},To={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Iy;function
|
|
9
|
+
*/var Iy;function uR(){if(Iy)return To;Iy=1;var e=D,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(s,l,c){var u,f={},d=null,p=null;c!==void 0&&(d=""+c),l.key!==void 0&&(d=""+l.key),l.ref!==void 0&&(p=l.ref);for(u in l)r.call(l,u)&&!a.hasOwnProperty(u)&&(f[u]=l[u]);if(s&&s.defaultProps)for(u in l=s.defaultProps,l)f[u]===void 0&&(f[u]=l[u]);return{$$typeof:t,type:s,key:d,ref:p,props:f,_owner:i.current}}return To.Fragment=n,To.jsx=o,To.jsxs=o,To}var Co={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Ry;function
|
|
17
|
+
*/var Ry;function fR(){return Ry||(Ry=1,process.env.NODE_ENV!=="production"&&function(){var e=D,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator";function y(T){if(T===null||typeof T!="object")return null;var te=h&&T[h]||T[m];return typeof te=="function"?te:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(T){{for(var te=arguments.length,ge=new Array(te>1?te-1:0),Le=1;Le<te;Le++)ge[Le-1]=arguments[Le];b("error",T,ge)}}function b(T,te,ge){{var Le=v.ReactDebugCurrentFrame,pt=Le.getStackAddendum();pt!==""&&(te+="%s",ge=ge.concat([pt]));var bt=ge.map(function(rt){return String(rt)});bt.unshift("Warning: "+te),Function.prototype.apply.call(console[T],console,bt)}}var k=!1,S=!1,_=!1,$=!1,j=!1,z;z=Symbol.for("react.module.reference");function O(T){return!!(typeof T=="string"||typeof T=="function"||T===r||T===a||j||T===i||T===c||T===u||$||T===p||k||S||_||typeof T=="object"&&T!==null&&(T.$$typeof===d||T.$$typeof===f||T.$$typeof===o||T.$$typeof===s||T.$$typeof===l||T.$$typeof===z||T.getModuleId!==void 0))}function N(T,te,ge){var Le=T.displayName;if(Le)return Le;var pt=te.displayName||te.name||"";return pt!==""?ge+"("+pt+")":ge}function W(T){return T.displayName||"Context"}function L(T){if(T==null)return null;if(typeof T.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case s:var te=T;return W(te)+".Consumer";case o:var ge=T;return W(ge._context)+".Provider";case l:return N(T,T.render,"ForwardRef");case f:var Le=T.displayName||null;return Le!==null?Le:L(T.type)||"Memo";case d:{var pt=T,bt=pt._payload,rt=pt._init;try{return L(rt(bt))}catch{return null}}}return null}var U=Object.assign,M=0,I,H,B,A,x,q,K;function E(){}E.__reactDisabledLog=!0;function Q(){{if(M===0){I=console.log,H=console.info,B=console.warn,A=console.error,x=console.group,q=console.groupCollapsed,K=console.groupEnd;var T={configurable:!0,enumerable:!0,value:E,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}M++}}function oe(){{if(M--,M===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:U({},T,{value:I}),info:U({},T,{value:H}),warn:U({},T,{value:B}),error:U({},T,{value:A}),group:U({},T,{value:x}),groupCollapsed:U({},T,{value:q}),groupEnd:U({},T,{value:K})})}M<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ne=v.ReactCurrentDispatcher,le;function pe(T,te,ge){{if(le===void 0)try{throw Error()}catch(pt){var Le=pt.stack.trim().match(/\n( *(at )?)/);le=Le&&Le[1]||""}return`
|
|
18
18
|
`+le+T}}var he=!1,ce;{var X=typeof WeakMap=="function"?WeakMap:Map;ce=new X}function Z(T,te){if(!T||he)return"";{var ge=ce.get(T);if(ge!==void 0)return ge}var Le;he=!0;var pt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var bt;bt=ne.current,ne.current=null,Q();try{if(te){var rt=function(){throw Error()};if(Object.defineProperty(rt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(rt,[])}catch(Sn){Le=Sn}Reflect.construct(T,[],rt)}else{try{rt.call()}catch(Sn){Le=Sn}T.call(rt.prototype)}}else{try{throw Error()}catch(Sn){Le=Sn}T()}}catch(Sn){if(Sn&&Le&&typeof Sn.stack=="string"){for(var Je=Sn.stack.split(`
|
|
19
19
|
`),dn=Le.stack.split(`
|
|
20
20
|
`),It=Je.length-1,Mt=dn.length-1;It>=1&&Mt>=0&&Je[It]!==dn[Mt];)Mt--;for(;It>=1&&Mt>=0;It--,Mt--)if(Je[It]!==dn[Mt]){if(It!==1||Mt!==1)do if(It--,Mt--,Mt<0||Je[It]!==dn[Mt]){var Hn=`
|
|
@@ -27,45 +27,45 @@ Check the top-level render call using <`+ge+">.")}return te}}function qt(T,te){{
|
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,py,da,ipe,da),qn[da+py]=!0}}return T===r?Ht(Mt):Qt(Mt),Mt}}function Ni(T,te,ge){return Wn(T,te,ge,!0)}function tpe(T,te,ge){return Wn(T,te,ge,!1)}var npe=tpe,rpe=Ni;Co.Fragment=r,Co.jsx=npe,Co.jsxs=rpe}()),Co}process.env.NODE_ENV==="production"?Wf.exports=cR():Wf.exports=uR();var C=Wf.exports;function fR(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),l=n.length;n=[...n,o];function c(f){const{scope:d,children:p,...h}=f,m=(d==null?void 0:d[e][l])||s,y=w.useMemo(()=>h,Object.values(h));return C.jsx(m.Provider,{value:y,children:p})}function u(f,d){const p=(d==null?void 0:d[e][l])||s,h=w.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return c.displayName=a+"Provider",[c,u]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,dR(i,...t)]}function dR(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(a)[`__scope${c}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function ni(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var pa=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function pR(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ay(...e){return t=>e.forEach(n=>pR(n,t))}function ri(...e){return w.useCallback(Ay(...e),e)}var Hf=w.forwardRef((e,t)=>{const{children:n,...r}=e,i=w.Children.toArray(n),a=i.find(mR);if(a){const o=a.props.children,s=i.map(l=>l===a?w.Children.count(o)>1?w.Children.only(null):w.isValidElement(o)?o.props.children:null:l);return C.jsx(Vf,{...r,ref:t,children:w.isValidElement(o)?w.cloneElement(o,void 0,s):null})}return C.jsx(Vf,{...r,ref:t,children:n})});Hf.displayName="Slot";var Vf=w.forwardRef((e,t)=>{const{children:n,...r}=e;if(w.isValidElement(n)){const i=gR(n);return w.cloneElement(n,{...vR(r,n.props),ref:t?Ay(t,i):i})}return w.Children.count(n)>1?w.Children.only(null):null});Vf.displayName="SlotClone";var hR=({children:e})=>C.jsx(C.Fragment,{children:e});function mR(e){return w.isValidElement(e)&&e.type===hR}function vR(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function gR(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pn=yR.reduce((e,t)=>{const n=w.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?Hf:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function bR(e,t){e&&xy.flushSync(()=>e.dispatchEvent(t))}var Zf="Avatar",[xR,upe]=fR(Zf),[wR,Py]=xR(Zf),Kf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=w.useState("idle");return C.jsx(wR,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:C.jsx(pn.span,{...r,ref:t})})});Kf.displayName=Zf;var jy="AvatarImage",Gf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=Py(jy,n),s=SR(r),l=ni(c=>{i(c),o.onImageLoadingStatusChange(c)});return pa(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?C.jsx(pn.img,{...a,ref:t,src:r}):null});Gf.displayName=jy;var Ny="AvatarFallback",Yf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=Py(Ny,n),[o,s]=w.useState(r===void 0);return w.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),o&&a.imageLoadingStatus!=="loaded"?C.jsx(pn.span,{...i,ref:t}):null});Yf.displayName=Ny;function SR(e){const[t,n]=w.useState("idle");return pa(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,a=o=>()=>{r&&n(o)};return n("loading"),i.onload=a("loaded"),i.onerror=a("error"),i.src=e,()=>{r=!1}},[e]),t}function Jf(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(l=>l+l).join(""));const i=parseInt(r,16),a=i>>16&255,o=i>>8&255,s=i&255;return{r:a,g:o,b:s}}function ER(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const _R=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function Dy(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,a=>(1e3-parseInt(a)).toString());return{...t,[i]:r}},{})}const kR=2.4,$R=.2126729,OR=.7151522,TR=.072175,CR=.56,IR=.57,RR=.62,AR=.65,Ol=.022,My=1.414,PR=1.14,jR=1.14,NR=.035991,DR=.035991,MR=27.7847239587675,LR=27.7847239587675,Ly=.027,Fy=.027,By=.001,FR=5e-4;function zy(e){const{r:t,g:n,b:r}=e,i=a=>(a/255)**kR;return $R*i(t)+OR*i(n)+TR*i(r)}function Uy(e,t){if(!e||!t)return 0;let n=zy(Jf(e)),r=zy(Jf(t)),i=0,a=0;return n=n>Ol?n:n+(Ol-n)**My,r=r>Ol?r:r+(Ol-r)**My,Math.abs(r-n)<FR?0:(r>n?(i=(r**CR-n**IR)*PR,a=i<By?0:i<NR?i-i*MR*Ly:i-Ly):(i=(r**AR-n**RR)*jR,a=i>-By?0:i>-DR?i-i*LR*Fy:i+Fy),Math.abs(a*100))}let qy=class{constructor(){Ee(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(a=>{a(n)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:n})})}};const BR=new qy;function Wy(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Hy(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}var Vy={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ut,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",s="minute",l="hour",c="day",u="week",f="month",d="quarter",p="year",h="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(U){var M=["th","st","nd","rd"],I=U%100;return"["+U+(M[(I-20)%10]||M[I]||M[0])+"]"}},b=function(U,M,I){var H=String(U);return!H||H.length>=M?U:""+Array(M+1-H.length).join(I)+U},k={s:b,z:function(U){var M=-U.utcOffset(),I=Math.abs(M),H=Math.floor(I/60),B=I%60;return(M<=0?"+":"-")+b(H,2,"0")+":"+b(B,2,"0")},m:function U(M,I){if(M.date()<I.date())return-U(I,M);var H=12*(I.year()-M.year())+(I.month()-M.month()),B=M.clone().add(H,f),A=I-B<0,x=M.clone().add(H+(A?-1:1),f);return+(-(H+(I-B)/(A?B-x:x-B))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:f,y:p,w:u,d:c,D:h,h:l,m:s,s:o,ms:a,Q:d}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},S="en",_={};_[S]=g;var $="$isDayjsObject",j=function(U){return U instanceof W||!(!U||!U[$])},z=function U(M,I,H){var B;if(!M)return S;if(typeof M=="string"){var A=M.toLowerCase();_[A]&&(B=A),I&&(_[A]=I,B=A);var x=M.split("-");if(!B&&x.length>1)return U(x[0])}else{var q=M.name;_[q]=M,B=q}return!H&&B&&(S=B),B||!H&&S},O=function(U,M){if(j(U))return U.clone();var I=typeof M=="object"?M:{};return I.date=U,I.args=arguments,new W(I)},N=k;N.l=z,N.i=j,N.w=function(U,M){return O(U,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var W=function(){function U(I){this.$L=z(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[$]=!0}var M=U.prototype;return M.parse=function(I){this.$d=function(H){var B=H.date,A=H.utc;if(B===null)return new Date(NaN);if(N.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var x=B.match(y);if(x){var q=x[2]-1||0,K=(x[7]||"0").substring(0,3);return A?new Date(Date.UTC(x[1],q,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)):new Date(x[1],q,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)}}return new Date(B)}(I),this.init()},M.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},M.$utils=function(){return N},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(I,H){var B=O(I);return this.startOf(H)<=B&&B<=this.endOf(H)},M.isAfter=function(I,H){return O(I)<this.startOf(H)},M.isBefore=function(I,H){return this.endOf(H)<O(I)},M.$g=function(I,H,B){return N.u(I)?this[H]:this.set(B,I)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(I,H){var B=this,A=!!N.u(H)||H,x=N.p(I),q=function(he,ce){var X=N.w(B.$u?Date.UTC(B.$y,ce,he):new Date(B.$y,ce,he),B);return A?X:X.endOf(c)},K=function(he,ce){return N.w(B.toDate()[he].apply(B.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(ce)),B)},E=this.$W,Q=this.$M,oe=this.$D,ne="set"+(this.$u?"UTC":"");switch(x){case p:return A?q(1,0):q(31,11);case f:return A?q(1,Q):q(0,Q+1);case u:var le=this.$locale().weekStart||0,pe=(E<le?E+7:E)-le;return q(A?oe-pe:oe+(6-pe),Q);case c:case h:return K(ne+"Hours",0);case l:return K(ne+"Minutes",1);case s:return K(ne+"Seconds",2);case o:return K(ne+"Milliseconds",3);default:return this.clone()}},M.endOf=function(I){return this.startOf(I,!1)},M.$set=function(I,H){var B,A=N.p(I),x="set"+(this.$u?"UTC":""),q=(B={},B[c]=x+"Date",B[h]=x+"Date",B[f]=x+"Month",B[p]=x+"FullYear",B[l]=x+"Hours",B[s]=x+"Minutes",B[o]=x+"Seconds",B[a]=x+"Milliseconds",B)[A],K=A===c?this.$D+(H-this.$W):H;if(A===f||A===p){var E=this.clone().set(h,1);E.$d[q](K),E.init(),this.$d=E.set(h,Math.min(this.$D,E.daysInMonth())).$d}else q&&this.$d[q](K);return this.init(),this},M.set=function(I,H){return this.clone().$set(I,H)},M.get=function(I){return this[N.p(I)]()},M.add=function(I,H){var B,A=this;I=Number(I);var x=N.p(H),q=function(Q){var oe=O(A);return N.w(oe.date(oe.date()+Math.round(Q*I)),A)};if(x===f)return this.set(f,this.$M+I);if(x===p)return this.set(p,this.$y+I);if(x===c)return q(1);if(x===u)return q(7);var K=(B={},B[s]=r,B[l]=i,B[o]=n,B)[x]||1,E=this.$d.getTime()+I*K;return N.w(E,this)},M.subtract=function(I,H){return this.add(-1*I,H)},M.format=function(I){var H=this,B=this.$locale();if(!this.isValid())return B.invalidDate||m;var A=I||"YYYY-MM-DDTHH:mm:ssZ",x=N.z(this),q=this.$H,K=this.$m,E=this.$M,Q=B.weekdays,oe=B.months,ne=B.meridiem,le=function(ce,X,Z,de){return ce&&(ce[X]||ce(H,A))||Z[X].slice(0,de)},pe=function(ce){return N.s(q%12||12,ce,"0")},he=ne||function(ce,X,Z){var de=ce<12?"AM":"PM";return Z?de.toLowerCase():de};return A.replace(v,function(ce,X){return X||function(Z){switch(Z){case"YY":return String(H.$y).slice(-2);case"YYYY":return N.s(H.$y,4,"0");case"M":return E+1;case"MM":return N.s(E+1,2,"0");case"MMM":return le(B.monthsShort,E,oe,3);case"MMMM":return le(oe,E);case"D":return H.$D;case"DD":return N.s(H.$D,2,"0");case"d":return String(H.$W);case"dd":return le(B.weekdaysMin,H.$W,Q,2);case"ddd":return le(B.weekdaysShort,H.$W,Q,3);case"dddd":return Q[H.$W];case"H":return String(q);case"HH":return N.s(q,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return he(q,K,!0);case"A":return he(q,K,!1);case"m":return String(K);case"mm":return N.s(K,2,"0");case"s":return String(H.$s);case"ss":return N.s(H.$s,2,"0");case"SSS":return N.s(H.$ms,3,"0");case"Z":return x}return null}(ce)||x.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(I,H,B){var A,x=this,q=N.p(H),K=O(I),E=(K.utcOffset()-this.utcOffset())*r,Q=this-K,oe=function(){return N.m(x,K)};switch(q){case p:A=oe()/12;break;case f:A=oe();break;case d:A=oe()/3;break;case u:A=(Q-E)/6048e5;break;case c:A=(Q-E)/864e5;break;case l:A=Q/i;break;case s:A=Q/r;break;case o:A=Q/n;break;default:A=Q}return B?A:N.a(A)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return _[this.$L]},M.locale=function(I,H){if(!I)return this.$L;var B=this.clone(),A=z(I,H,!0);return A&&(B.$L=A),B},M.clone=function(){return N.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},U}(),L=W.prototype;return O.prototype=L,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",c],["$M",f],["$y",p],["$D",h]].forEach(function(U){L[U[1]]=function(M){return this.$g(M,U[0],U[1])}}),O.extend=function(U,M){return U.$i||(U(M,W,O),U.$i=!0),O},O.locale=z,O.isDayjs=j,O.unix=function(U){return O(1e3*U)},O.en=_[S],O.Ls=_,O.p={},O})})(Vy);var zR=Vy.exports;const Tl=Ze(zR);var Zy={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ut,function(){return function(n,r,i){r.prototype.isToday=function(){var a="YYYY-MM-DD",o=i();return this.format(a)===o.format(a)}}})})(Zy);var UR=Zy.exports;const qR=Ze(UR);var Ky={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ut,function(){return function(n,r,i){r.prototype.isYesterday=function(){var a="YYYY-MM-DD",o=i().subtract(1,"day");return this.format(a)===o.format(a)}}})})(Ky);var WR=Ky.exports;const HR=Ze(WR);Tl.extend(qR),Tl.extend(HR);function VR(e,t="day"){var r,i,a;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(Gy(e[0].timestamp));for(let o=0;o<e.length;o++)if(e[o]&&n.push(e[o]),o+1<e.length){const s=(i=e[o])==null?void 0:i.timestamp,l=(a=e[o+1])==null?void 0:a.timestamp;!Tl(s).isSame(l,t)&&l&&n.push(Gy(l))}return n}function Gy(e){return{id:ko(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:ZR(e)}}}function ZR(e,t=!1){const n=Tl(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function KR(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function GR(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function YR(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function JR(e,t){return e.map(n=>Math.round(n*t))}const Io=e=>t=>YR(t,e),Ro=e=>t=>JR(t,e),XR={50:Io(.95),100:Io(.9),200:Io(.75),300:Io(.6),400:Io(.3),500:e=>e,600:Ro(.9),700:Ro(.6),800:Ro(.45),900:Ro(.3),950:Ro(.2)};function Yy(e,t=XR){const n={},r=KR(e);for(const[i,a]of Object.entries(t))n[i]=GR(a(r));return n}var ot;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(ot||(ot={}));var Xf;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Xf||(Xf={}));const ye=ot.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ii=e=>{switch(typeof e){case"undefined":return ye.undefined;case"string":return ye.string;case"number":return isNaN(e)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(e)?ye.array:e===null?ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ye.promise:typeof Map<"u"&&e instanceof Map?ye.map:typeof Set<"u"&&e instanceof Set?ye.set:typeof Date<"u"&&e instanceof Date?ye.date:ye.object;default:return ye.unknown}},se=ot.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),QR=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let Vn=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(o))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,ot.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Vn.create=e=>new Vn(e);const Ao=(e,t)=>{let n;switch(e.code){case se.invalid_type:e.received===ye.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ot.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:n=`Unrecognized key(s) in object: ${ot.joinValues(e.keys,", ")}`;break;case se.invalid_union:n="Invalid input";break;case se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ot.joinValues(e.options)}`;break;case se.invalid_enum_value:n=`Invalid enum value. Expected ${ot.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:n="Invalid function arguments";break;case se.invalid_return_type:n="Invalid function return type";break;case se.invalid_date:n="Invalid date";break;case se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ot.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case se.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case se.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case se.custom:n="Invalid input";break;case se.invalid_intersection_types:n="Intersection results could not be merged";break;case se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:n="Number must be finite";break;default:n=t.defaultError,ot.assertNever(e)}return{message:n}};let Jy=Ao;function eA(e){Jy=e}function Cl(){return Jy}const Il=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(o,{data:t,defaultError:s}).message;return{...i,path:a,message:i.message||s}},tA=[];function xe(e,t){const n=Il({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Cl(),Ao].filter(r=>!!r)});e.common.issues.push(n)}let hn=class ZI{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Fe;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return ZI.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Fe;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}};const Fe=Object.freeze({status:"aborted"}),Xy=e=>({status:"dirty",value:e}),ln=e=>({status:"valid",value:e}),Qf=e=>e.status==="aborted",ed=e=>e.status==="dirty",Po=e=>e.status==="valid",Rl=e=>typeof Promise<"u"&&e instanceof Promise;var Te;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Te||(Te={}));let dr=class{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const Qy=(e,t)=>{if(Po(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Vn(e.common.issues);return this._error=n,this._error}}};function ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>o.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}let We=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ii(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ii(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new hn,ctx:{common:t.parent.common,data:t.data,parsedType:ii(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Rl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ii(t)},a=this._parseSync({data:t,path:i.path,parent:i});return Qy(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ii(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Rl(i)?i:Promise.resolve(i));return Qy(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:se.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Zn({schema:this,typeName:je.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Fr.create(this,this._def)}nullable(){return Fi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Li.create(this,this._def)}promise(){return ga.create(this,this._def)}or(t){return Bo.create([this,t],this._def)}and(t){return zo.create(this,t,this._def)}transform(t){return new Zn({...ze(this._def),schema:this,typeName:je.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Vo({...ze(this._def),innerType:this,defaultValue:n,typeName:je.ZodDefault})}brand(){return new ib({typeName:je.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ml({...ze(this._def),innerType:this,catchValue:n,typeName:je.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return rd.create(this,t)}readonly(){return Fl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const nA=/^c[^\s-]{8,}$/i,rA=/^[a-z][a-z0-9]*$/,iA=/^[0-9A-HJKMNP-TV-Z]{26}$/,aA=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,oA=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let td;const lA=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,cA=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,uA=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function fA(e,t){return!!((t==="v4"||!t)&&lA.test(e)||(t==="v6"||!t)&&cA.test(e))}let ha=class kl extends We{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ye.string){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ye.string,received:a.parsedType}),Fe}const r=new hn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?xe(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&xe(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")oA.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"email",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")td||(td=new RegExp(sA,"u")),td.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"emoji",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")aA.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"uuid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")nA.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"cuid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")rA.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"cuid2",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")iA.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"ulid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),xe(i,{validation:"url",code:se.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"regex",code:se.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?uA(a).test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="ip"?fA(t.data,a.version)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"ip",code:se.invalid_string,message:a.message}),r.dirty()):ot.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:se.invalid_string,...Te.errToObj(r)})}_addCheck(t){return new kl({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Te.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Te.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Te.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Te.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Te.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Te.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Te.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Te.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Te.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Te.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Te.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Te.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Te.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Te.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Te.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Te.errToObj(n)})}nonempty(t){return this.min(1,Te.errToObj(t))}trim(){return new kl({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new kl({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new kl({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};ha.create=e=>{var t;return new ha({checks:[],typeName:je.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};function dA(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}let jo=class hy extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ye.number){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ye.number,received:a.parsedType}),Fe}let r;const i=new hn;for(const a of this._def.checks)a.kind==="int"?ot.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:se.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?dA(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_finite,message:a.message}),i.dirty()):ot.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,i){return new hy({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(i)}]})}_addCheck(t){return new hy({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Te.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Te.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Te.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Te.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ot.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};jo.create=e=>new jo({checks:[],typeName:je.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});let No=class my extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ye.bigint){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ye.bigint,received:a.parsedType}),Fe}let r;const i=new hn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):ot.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,i){return new my({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(i)}]})}_addCheck(t){return new my({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};No.create=e=>{var t;return new No({checks:[],typeName:je.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};let Do=class extends We{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ye.boolean){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ye.boolean,received:r.parsedType}),Fe}return ln(t.data)}};Do.create=e=>new Do({typeName:je.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});let Mo=class KI extends We{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ye.date){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ye.date,received:a.parsedType}),Fe}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_date}),Fe}const r=new hn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):ot.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new KI({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Te.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Te.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};Mo.create=e=>new Mo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:je.ZodDate,...ze(e)});let Al=class extends We{_parse(t){if(this._getType(t)!==ye.symbol){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ye.symbol,received:r.parsedType}),Fe}return ln(t.data)}};Al.create=e=>new Al({typeName:je.ZodSymbol,...ze(e)});let Lo=class extends We{_parse(t){if(this._getType(t)!==ye.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ye.undefined,received:r.parsedType}),Fe}return ln(t.data)}};Lo.create=e=>new Lo({typeName:je.ZodUndefined,...ze(e)});let Fo=class extends We{_parse(t){if(this._getType(t)!==ye.null){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ye.null,received:r.parsedType}),Fe}return ln(t.data)}};Fo.create=e=>new Fo({typeName:je.ZodNull,...ze(e)});let ma=class extends We{constructor(){super(...arguments),this._any=!0}_parse(t){return ln(t.data)}};ma.create=e=>new ma({typeName:je.ZodAny,...ze(e)});let Mi=class extends We{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ln(t.data)}};Mi.create=e=>new Mi({typeName:je.ZodUnknown,...ze(e)});let Lr=class extends We{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:se.invalid_type,expected:ye.never,received:n.parsedType}),Fe}};Lr.create=e=>new Lr({typeName:je.ZodNever,...ze(e)});let Pl=class extends We{_parse(t){if(this._getType(t)!==ye.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ye.void,received:r.parsedType}),Fe}return ln(t.data)}};Pl.create=e=>new Pl({typeName:je.ZodVoid,...ze(e)});let Li=class Uf extends We{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ye.array)return xe(n,{code:se.invalid_type,expected:ye.array,received:n.parsedType}),Fe;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(xe(n,{code:o?se.too_big:se.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(xe(n,{code:se.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(xe(n,{code:se.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new dr(n,o,n.path,s)))).then(o=>hn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new dr(n,o,n.path,s)));return hn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new Uf({...this._def,minLength:{value:t,message:Te.toString(n)}})}max(t,n){return new Uf({...this._def,maxLength:{value:t,message:Te.toString(n)}})}length(t,n){return new Uf({...this._def,exactLength:{value:t,message:Te.toString(n)}})}nonempty(t){return this.min(1,t)}};Li.create=(e,t)=>new Li({type:e,minLength:null,maxLength:null,exactLength:null,typeName:je.ZodArray,...ze(t)});function va(e){if(e instanceof An){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Fr.create(va(r))}return new An({...e._def,shape:()=>t})}else return e instanceof Li?new Li({...e._def,type:va(e.element)}):e instanceof Fr?Fr.create(va(e.unwrap())):e instanceof Fi?Fi.create(va(e.unwrap())):e instanceof ai?ai.create(e.items.map(t=>va(t))):e}let An=class fr extends We{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ot.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ye.object){const c=this._getOrReturnCtx(t);return xe(c,{code:se.invalid_type,expected:ye.object,received:c.parsedType}),Fe}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Lr&&this._def.unknownKeys==="strip"))for(const c in i.data)o.includes(c)||s.push(c);const l=[];for(const c of o){const u=a[c],f=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new dr(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Lr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")s.length>0&&(xe(i,{code:se.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const f=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new dr(i,f,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key;c.push({key:f,value:await u.value,alwaysSet:u.alwaysSet})}return c}).then(c=>hn.mergeObjectSync(r,c)):hn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Te.errToObj,new fr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const l=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Te.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new fr({...this._def,unknownKeys:"strip"})}passthrough(){return new fr({...this._def,unknownKeys:"passthrough"})}extend(t){return new fr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new fr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:je.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new fr({...this._def,catchall:t})}pick(t){const n={};return ot.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new fr({...this._def,shape:()=>n})}omit(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new fr({...this._def,shape:()=>n})}deepPartial(){return va(this)}partial(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new fr({...this._def,shape:()=>n})}required(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Fr;)a=a._def.innerType;n[r]=a}}),new fr({...this._def,shape:()=>n})}keyof(){return rb(ot.objectKeys(this.shape))}};An.create=(e,t)=>new An({shape:()=>e,unknownKeys:"strip",catchall:Lr.create(),typeName:je.ZodObject,...ze(t)}),An.strictCreate=(e,t)=>new An({shape:()=>e,unknownKeys:"strict",catchall:Lr.create(),typeName:je.ZodObject,...ze(t)}),An.lazycreate=(e,t)=>new An({shape:e,unknownKeys:"strip",catchall:Lr.create(),typeName:je.ZodObject,...ze(t)});let Bo=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Vn(s.ctx.common.issues));return xe(n,{code:se.invalid_union,unionErrors:o}),Fe}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(l=>new Vn(l));return xe(n,{code:se.invalid_union,unionErrors:s}),Fe}}get options(){return this._def.options}};Bo.create=(e,t)=>new Bo({options:e,typeName:je.ZodUnion,...ze(t)});const jl=e=>e instanceof Uo?jl(e.schema):e instanceof Zn?jl(e.innerType()):e instanceof qo?[e.value]:e instanceof Wo?e.options:e instanceof Ho?Object.keys(e.enum):e instanceof Vo?jl(e._def.innerType):e instanceof Lo?[void 0]:e instanceof Fo?[null]:null;let eb=class GI extends We{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.object)return xe(n,{code:se.invalid_type,expected:ye.object,received:n.parsedType}),Fe;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(xe(n,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Fe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=jl(a.shape[t]);if(!o)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new GI({typeName:je.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ze(r)})}};function nd(e,t){const n=ii(e),r=ii(t);if(e===t)return{valid:!0,data:e};if(n===ye.object&&r===ye.object){const i=ot.objectKeys(t),a=ot.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const l=nd(e[s],t[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(n===ye.array&&r===ye.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],l=nd(o,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===ye.date&&r===ye.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}let zo=class extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Qf(a)||Qf(o))return Fe;const s=nd(a.value,o.value);return s.valid?((ed(a)||ed(o))&&n.dirty(),{status:n.value,value:s.data}):(xe(r,{code:se.invalid_intersection_types}),Fe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};zo.create=(e,t,n)=>new zo({left:e,right:t,typeName:je.ZodIntersection,...ze(n)});let ai=class YI extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.array)return xe(r,{code:se.invalid_type,expected:ye.array,received:r.parsedType}),Fe;if(r.data.length<this._def.items.length)return xe(r,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Fe;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new dr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>hn.mergeArray(n,o)):hn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new YI({...this._def,rest:t})}};ai.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ai({items:e,typeName:je.ZodTuple,rest:null,...ze(t)})};let tb=class vy extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.object)return xe(r,{code:se.invalid_type,expected:ye.object,received:r.parsedType}),Fe;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new dr(r,s,r.path,s)),value:o._parse(new dr(r,r.data[s],r.path,s))});return r.common.async?hn.mergeObjectAsync(n,i):hn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof We?new vy({keyType:t,valueType:n,typeName:je.ZodRecord,...ze(r)}):new vy({keyType:ha.create(),valueType:t,typeName:je.ZodRecord,...ze(n)})}},Nl=class extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.map)return xe(r,{code:se.invalid_type,expected:ye.map,received:r.parsedType}),Fe;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new dr(r,s,r.path,[c,"key"])),value:a._parse(new dr(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Fe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Fe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}};Nl.create=(e,t,n)=>new Nl({valueType:t,keyType:e,typeName:je.ZodMap,...ze(n)});let Dl=class gy extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.set)return xe(r,{code:se.invalid_type,expected:ye.set,received:r.parsedType}),Fe;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(xe(r,{code:se.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(xe(r,{code:se.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Fe;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>a._parse(new dr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(t,n){return new gy({...this._def,minSize:{value:t,message:Te.toString(n)}})}max(t,n){return new gy({...this._def,maxSize:{value:t,message:Te.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};Dl.create=(e,t)=>new Dl({valueType:e,minSize:null,maxSize:null,typeName:je.ZodSet,...ze(t)});let nb=class qf extends We{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.function)return xe(n,{code:se.invalid_type,expected:ye.function,received:n.parsedType}),Fe;function r(s,l){return Il({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cl(),Ao].filter(c=>!!c),issueData:{code:se.invalid_arguments,argumentsError:l}})}function i(s,l){return Il({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cl(),Ao].filter(c=>!!c),issueData:{code:se.invalid_return_type,returnTypeError:l}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ga){const s=this;return ln(async function(...l){const c=new Vn([]),u=await s._def.args.parseAsync(l,a).catch(p=>{throw c.addIssue(r(l,p)),c}),f=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw c.addIssue(i(f,p)),c})})}else{const s=this;return ln(function(...l){const c=s._def.args.safeParse(l,a);if(!c.success)throw new Vn([r(l,c.error)]);const u=Reflect.apply(o,this,c.data),f=s._def.returns.safeParse(u,a);if(!f.success)throw new Vn([i(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new qf({...this._def,args:ai.create(t).rest(Mi.create())})}returns(t){return new qf({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new qf({args:t||ai.create([]).rest(Mi.create()),returns:n||Mi.create(),typeName:je.ZodFunction,...ze(r)})}},Uo=class extends We{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Uo.create=(e,t)=>new Uo({getter:e,typeName:je.ZodLazy,...ze(t)});let qo=class extends We{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:se.invalid_literal,expected:this._def.value}),Fe}return{status:"valid",value:t.data}}get value(){return this._def.value}};qo.create=(e,t)=>new qo({value:e,typeName:je.ZodLiteral,...ze(t)});function rb(e,t){return new Wo({values:e,typeName:je.ZodEnum,...ze(t)})}let Wo=class yy extends We{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:ot.joinValues(r),received:n.parsedType,code:se.invalid_type}),Fe}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{received:n.data,code:se.invalid_enum_value,options:r}),Fe}return ln(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return yy.create(t)}exclude(t){return yy.create(this.options.filter(n=>!t.includes(n)))}};Wo.create=rb;let Ho=class extends We{_parse(t){const n=ot.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ye.string&&r.parsedType!==ye.number){const i=ot.objectValues(n);return xe(r,{expected:ot.joinValues(i),received:r.parsedType,code:se.invalid_type}),Fe}if(n.indexOf(t.data)===-1){const i=ot.objectValues(n);return xe(r,{received:r.data,code:se.invalid_enum_value,options:i}),Fe}return ln(t.data)}get enum(){return this._def.values}};Ho.create=(e,t)=>new Ho({values:e,typeName:je.ZodNativeEnum,...ze(t)});let ga=class extends We{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.promise&&n.common.async===!1)return xe(n,{code:se.invalid_type,expected:ye.promise,received:n.parsedType}),Fe;const r=n.parsedType===ye.promise?n.data:Promise.resolve(n.data);return ln(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ga.create=(e,t)=>new ga({type:e,typeName:je.ZodPromise,...ze(t)});let Zn=class extends We{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===je.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{xe(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(o).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}if(i.type==="refinement"){const o=s=>{const l=i.refinement(s,a);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Fe:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Fe:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Po(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Po(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);ot.assertNever(i)}};Zn.create=(e,t,n)=>new Zn({schema:e,typeName:je.ZodEffects,effect:t,...ze(n)}),Zn.createWithPreprocess=(e,t,n)=>new Zn({schema:t,effect:{type:"preprocess",transform:e},typeName:je.ZodEffects,...ze(n)});let Fr=class extends We{_parse(t){return this._getType(t)===ye.undefined?ln(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Fr.create=(e,t)=>new Fr({innerType:e,typeName:je.ZodOptional,...ze(t)});let Fi=class extends We{_parse(t){return this._getType(t)===ye.null?ln(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Fi.create=(e,t)=>new Fi({innerType:e,typeName:je.ZodNullable,...ze(t)});let Vo=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ye.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Vo.create=(e,t)=>new Vo({innerType:e,typeName:je.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});let Ml=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Rl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Vn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Vn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Ml.create=(e,t)=>new Ml({innerType:e,typeName:je.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});let Ll=class extends We{_parse(t){if(this._getType(t)!==ye.nan){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ye.nan,received:r.parsedType}),Fe}return{status:"valid",value:t.data}}};Ll.create=e=>new Ll({typeName:je.ZodNaN,...ze(e)});const pA=Symbol("zod_brand");let ib=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},rd=class JI extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Fe:a.status==="dirty"?(n.dirty(),Xy(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Fe:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new JI({in:t,out:n,typeName:je.ZodPipeline})}},Fl=class extends We{_parse(t){const n=this._def.innerType._parse(t);return Po(n)&&(n.value=Object.freeze(n.value)),n}};Fl.create=(e,t)=>new Fl({innerType:e,typeName:je.ZodReadonly,...ze(t)});const ab=(e,t={},n)=>e?ma.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:l})}}):ma.create(),hA={object:An.lazycreate};var je;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(je||(je={}));const mA=(e,t={message:`Input not instance of ${e.name}`})=>ab(n=>n instanceof e,t),ob=ha.create,sb=jo.create,vA=Ll.create,gA=No.create,lb=Do.create,yA=Mo.create,bA=Al.create,xA=Lo.create,wA=Fo.create,SA=ma.create,EA=Mi.create,_A=Lr.create,kA=Pl.create,$A=Li.create,OA=An.create,TA=An.strictCreate,CA=Bo.create,IA=eb.create,RA=zo.create,AA=ai.create,PA=tb.create,jA=Nl.create,NA=Dl.create,DA=nb.create,MA=Uo.create,LA=qo.create,FA=Wo.create,BA=Ho.create,zA=ga.create,cb=Zn.create,UA=Fr.create,qA=Fi.create,WA=Zn.createWithPreprocess,HA=rd.create;var Se=Object.freeze({__proto__:null,defaultErrorMap:Ao,setErrorMap:eA,getErrorMap:Cl,makeIssue:Il,EMPTY_PATH:tA,addIssueToContext:xe,ParseStatus:hn,INVALID:Fe,DIRTY:Xy,OK:ln,isAborted:Qf,isDirty:ed,isValid:Po,isAsync:Rl,get util(){return ot},get objectUtil(){return Xf},ZodParsedType:ye,getParsedType:ii,ZodType:We,ZodString:ha,ZodNumber:jo,ZodBigInt:No,ZodBoolean:Do,ZodDate:Mo,ZodSymbol:Al,ZodUndefined:Lo,ZodNull:Fo,ZodAny:ma,ZodUnknown:Mi,ZodNever:Lr,ZodVoid:Pl,ZodArray:Li,ZodObject:An,ZodUnion:Bo,ZodDiscriminatedUnion:eb,ZodIntersection:zo,ZodTuple:ai,ZodRecord:tb,ZodMap:Nl,ZodSet:Dl,ZodFunction:nb,ZodLazy:Uo,ZodLiteral:qo,ZodEnum:Wo,ZodNativeEnum:Ho,ZodPromise:ga,ZodEffects:Zn,ZodTransformer:Zn,ZodOptional:Fr,ZodNullable:Fi,ZodDefault:Vo,ZodCatch:Ml,ZodNaN:Ll,BRAND:pA,ZodBranded:ib,ZodPipeline:rd,ZodReadonly:Fl,custom:ab,Schema:We,ZodSchema:We,late:hA,get ZodFirstPartyTypeKind(){return je},coerce:{string:e=>ha.create({...e,coerce:!0}),number:e=>jo.create({...e,coerce:!0}),boolean:e=>Do.create({...e,coerce:!0}),bigint:e=>No.create({...e,coerce:!0}),date:e=>Mo.create({...e,coerce:!0})},any:SA,array:$A,bigint:gA,boolean:lb,date:yA,discriminatedUnion:IA,effect:cb,enum:FA,function:DA,instanceof:mA,intersection:RA,lazy:MA,literal:LA,map:jA,nan:vA,nativeEnum:BA,never:_A,null:wA,nullable:qA,number:sb,object:OA,oboolean:()=>lb().optional(),onumber:()=>sb().optional(),optional:UA,ostring:()=>ob().optional(),pipeline:HA,preprocess:WA,promise:zA,record:PA,set:NA,strictObject:TA,string:ob,symbol:bA,transformer:cb,tuple:AA,undefined:xA,union:CA,unknown:EA,void:kA,NEVER:Fe,ZodIssueCode:se,quotelessJson:QR,ZodError:Vn});const ya=Se.object({title:Se.string().optional(),link:Se.string().optional()}),id=Se.object({color:Se.string().optional(),variant:Se.enum(["soft","solid"]).optional(),themeMode:Se.enum(["light","dark"]).optional(),fontFamily:Se.enum(["rubik","inter","ibm","fira"]).optional(),radius:Se.number().min(.5).max(4).optional()}),ub=Se.object({composerPlaceholder:Se.string().optional(),botName:Se.string().optional(),botAvatar:Se.string().optional(),botDescription:Se.string().optional(),website:ya.optional(),email:ya.optional(),phone:ya.optional(),privacyPolicy:ya.optional(),termsOfService:ya.optional(),showPoweredBy:Se.boolean().optional()}).merge(id),fb=Se.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),db=Se.object({}).passthrough().transform(e=>e),fe=Se.object({className:Se.string().optional(),style:db.optional()}),Bl=Se.object({container:fe.optional(),image:fe.optional(),fallback:fe.optional()}),pb=Se.object({button:fe.optional(),text:Se.record(fb,fe.optional()),image:Se.object({image:fe.optional(),placeholder:fe.optional()}).optional(),audio:fe.optional(),video:fe.optional(),file:Se.object({container:fe.optional(),title:fe.optional(),icon:fe.optional()}).optional(),location:Se.object({container:fe.optional(),title:fe.optional(),icon:fe.optional()}).optional(),column:fe.optional(),row:fe.optional(),bubble:fe.optional(),carousel:Se.object({container:fe.optional(),slidesContainer:fe.optional(),backButton:fe.optional(),nextButton:fe.optional()}).optional(),dropdown:Se.object({button:Se.object({container:fe.optional(),icon:fe.optional(),text:fe.optional()}).optional(),content:Se.object({container:fe.optional(),item:fe.optional()}).optional()}).optional()}),hb=Se.object({container:fe.optional(),modal:Se.object({overlay:fe.optional(),container:fe.optional(),dialog:Se.object({container:fe.optional(),title:Se.object({container:fe.optional(),text:fe.optional(),closeIcon:fe.optional()}).optional(),content:fe.optional(),newConversation:Se.object({text:fe.optional(),button:fe.optional()}).optional()}).optional()}).optional(),notification:Se.object({container:fe.optional(),title:fe.optional(),description:fe.optional(),icon:fe.optional(),closeIcon:fe.optional()}).optional(),header:Se.object({container:fe.optional(),content:Se.object({container:fe.optional(),title:fe.optional(),description:fe.optional(),avatar:Bl.optional(),actions:Se.object({container:fe.optional(),icons:fe.optional()}).optional()}),expandedContent:Se.object({container:fe.optional(),group:fe.optional(),descriptionItems:Se.object({container:fe.optional(),icon:fe.optional(),text:fe.optional(),link:fe.optional(),poweredBy:fe.optional()}).optional()}).optional(),description:Se.object({container:fe.optional(),title:fe.optional(),subtitle:fe.optional()}).optional(),newConversationIcon:fe.optional()}).optional(),composer:Se.object({container:fe.optional(),input:fe.optional(),uploadButton:Se.object({container:fe.optional(),icon:fe.optional()}).optional(),button:Se.object({container:fe.optional(),icon:fe.optional()}).optional()}).optional(),fab:Se.object({icon:fe.optional(),container:fe.optional()}).optional(),messageList:Se.object({scrollbar:Se.object({container:fe.optional(),viewport:fe.optional(),thumb:fe.optional(),corner:fe.optional(),background:fe.optional()}).optional(),container:fe.optional(),marquee:Se.object({content:fe.optional(),title:fe.optional(),description:fe.optional(),avatar:Bl.optional(),container:fe.optional()}).optional(),scrollDownButton:Se.object({container:fe.optional(),button:fe.optional(),icon:fe.optional()}).optional()}).optional(),message:Se.object({container:fe.optional(),avatar:Bl.optional(),blocks:pb.optional()}).optional(),loadingIndicator:Se.object({container:fe.optional(),loader:fe.optional()}).optional()}),mb=Se.enum(["opened","closed","initial"]),vb=Se.object({name:Se.string().optional(),pictureUrl:Se.string().optional(),data:Se.record(Se.unknown()).optional()}),gb=Se.object({configuration:ub.optional().catch(void 0),theme:hb.optional().catch(void 0),style:Se.string().optional().catch(void 0),user:vb.optional().catch(void 0)}),VA=gb.extend({clientId:Se.string(),botId:Se.string(),selector:Se.string().optional().catch(void 0),webchatScriptUrl:Se.string().optional().catch(void 0),fabScriptUrl:Se.string().optional().catch(void 0),pushpinUrl:Se.string().optional().catch(void 0),defaultState:mb.optional().catch(void 0)});function yb(e){const{fontFamily:t,radius:n,themeMode:r,variant:i,color:a}=id.parse(e);let o={},s={};if(a){const u=Yy(a),f=r==="dark"?Dy(u):u,d=Yy(ER(_R(Jf(a)))),p=r==="dark"?Dy(d):d,h=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:h}).reduce((y,[v,g])=>({...y,[`--bpPrimary-${v}`]:g}),{});const m=Object.entries({...p,1:h}).reduce((y,[v,g])=>({...y,[`--bpGray-${v}`]:g}),{});o={...s,...m}}n&&(o={...o,"--bpRadius-scale":n.toString()});const l=s?Uy(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",c=i==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":l,"--header-description":l,"--header-description-icon":l,"--header-description-link":l,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":l,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":l}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?Uy(s["--bpPrimary-500"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)"};return o={...o,...c},Wy(":root",o)+(t?Wy(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const ad=D.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...a},o)=>{const s=Hy(e??"",15);return C.jsxs(Kf,{ref:o,"data-color":s,...n,...a,children:[C.jsx(Gf,{src:t,...r}),C.jsx(Yf,{...i,children:typeof a.children=="string"?a.children[0]:a.children})]})});function vpe(){}function gpe(){}function ZA(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const KA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YA={};function bb(e,t){return(YA.jsx?GA:KA).test(e)}const JA=/[ \t\n\f\r]/g;function XA(e){return typeof e=="object"?e.type==="text"?xb(e.value):!1:xb(e)}function xb(e){return e.replace(JA,"")===""}class Zo{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Zo.prototype.property={},Zo.prototype.normal={},Zo.prototype.space=null;function wb(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Zo(n,r,t)}function od(e){return e.toLowerCase()}class Pn{constructor(t,n){this.property=t,this.attribute=n}}Pn.prototype.space=null,Pn.prototype.boolean=!1,Pn.prototype.booleanish=!1,Pn.prototype.overloadedBoolean=!1,Pn.prototype.number=!1,Pn.prototype.commaSeparated=!1,Pn.prototype.spaceSeparated=!1,Pn.prototype.commaOrSpaceSeparated=!1,Pn.prototype.mustUseProperty=!1,Pn.prototype.defined=!1;let QA=0;const Ue=Bi(),Rt=Bi(),Sb=Bi(),ie=Bi(),xt=Bi(),ba=Bi(),En=Bi();function Bi(){return 2**++QA}const sd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:Rt,commaOrSpaceSeparated:En,commaSeparated:ba,number:ie,overloadedBoolean:Sb,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),ld=Object.keys(sd);class cd extends Pn{constructor(t,n,r,i){let a=-1;if(super(t,n),Eb(this,"space",i),typeof r=="number")for(;++a<ld.length;){const o=ld[a];Eb(this,ld[a],(r&sd[o])===sd[o])}}}cd.prototype.defined=!0;function Eb(e,t,n){n&&(e[t]=n)}const eP={}.hasOwnProperty;function xa(e){const t={},n={};let r;for(r in e.properties)if(eP.call(e.properties,r)){const i=e.properties[r],a=new cd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[od(r)]=r,n[od(a.attribute)]=r}return new Zo(t,n,e.space)}const _b=xa({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),kb=xa({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function $b(e,t){return t in e?e[t]:t}function Ob(e,t){return $b(e,t.toLowerCase())}const Tb=xa({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ob,properties:{xmlns:null,xmlnsXLink:null}}),Cb=xa({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Rt,ariaAutoComplete:null,ariaBusy:Rt,ariaChecked:Rt,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:Rt,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:Rt,ariaFlowTo:xt,ariaGrabbed:Rt,ariaHasPopup:null,ariaHidden:Rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:ie,ariaLive:null,ariaModal:Rt,ariaMultiLine:Rt,ariaMultiSelectable:Rt,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:Rt,ariaReadOnly:Rt,ariaRelevant:null,ariaRequired:Rt,ariaRoleDescription:xt,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:Rt,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null}}),tP=xa({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ob,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ba,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:xt,autoFocus:Ue,autoPlay:Ue,blocking:xt,capture:null,charSet:null,checked:Ue,cite:null,className:xt,cols:ie,colSpan:null,content:null,contentEditable:Rt,controls:Ue,controlsList:xt,coords:ie|ba,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:Sb,draggable:Rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:xt,height:ie,hidden:Ue,high:ie,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:xt,itemRef:xt,itemScope:Ue,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ue,optimum:ie,pattern:null,ping:xt,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:xt,required:Ue,reversed:Ue,rows:ie,rowSpan:ie,sandbox:xt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:Rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Rt,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:Rt,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:ie,security:null,unselectable:null}}),nP=xa({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:$b,properties:{about:En,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:xt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ba,g2:ba,glyphName:ba,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:En,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:En,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:En,rev:En,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:En,requiredFeatures:En,requiredFonts:En,requiredFormats:En,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:En,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:En,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:En,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),rP=/^data[-\w.:]+$/i,Ib=/-[a-z]/g,iP=/[A-Z]/g;function aP(e,t){const n=od(t);let r=t,i=Pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&rP.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ib,sP);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ib.test(a)){let o=a.replace(iP,oP);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=cd}return new i(r,t)}function oP(e){return"-"+e.toLowerCase()}function sP(e){return e.charAt(1).toUpperCase()}const lP={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},cP=wb([kb,_b,Tb,Cb,tP],"html"),ud=wb([kb,_b,Tb,Cb,nP],"svg");function uP(e){return e.join(" ").trim()}var Rb={},Ab=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,fP=/\n/g,dP=/^\s*/,pP=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,hP=/^:\s*/,mP=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,vP=/^[;\s]*/,gP=/^\s+|\s+$/g,yP=`
|
|
31
|
-
`,Pb="/",jb="*",zi="",bP="comment",xP="declaration",wP=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(h){var m=h.match(fP);m&&(n+=m.length);var y=h.lastIndexOf(yP);r=~y?h.length-y:r+h.length}function a(){var h={line:n,column:r};return function(m){return m.position=new o(h),c(),m}}function o(h){this.start=h,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(h){var m=h.exec(e);if(m){var y=m[0];return i(y),e=e.slice(y.length),m}}function c(){l(dP)}function u(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=a();if(!(Pb!=e.charAt(0)||jb!=e.charAt(1))){for(var m=2;zi!=e.charAt(m)&&(jb!=e.charAt(m)||Pb!=e.charAt(m+1));)++m;if(m+=2,zi===e.charAt(m-1))return s("End of comment missing");var y=e.slice(2,m-2);return r+=2,i(y),e=e.slice(m),r+=2,h({type:bP,comment:y})}}function d(){var h=a(),m=l(pP);if(m){if(f(),!l(hP))return s("property missing ':'");var y=l(mP),v=h({type:xP,property:Nb(m[0].replace(Ab,zi)),value:y?Nb(y[0].replace(Ab,zi)):zi});return l(vP),v}}function p(){var h=[];u(h);for(var m;m=d();)m!==!1&&(h.push(m),u(h));return h}return c(),p()};function Nb(e){return e?e.replace(gP,zi):zi}var SP=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rb,"__esModule",{value:!0});var Db=Rb.default=_P,EP=SP(wP);function _P(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,EP.default)(e),i=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(n=n||{},n[o]=s)}}),n}const kP=Db.default||Db,Mb=Lb("end"),fd=Lb("start");function Lb(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function $P(e){const t=fd(e),n=Mb(e);if(t&&n)return{start:t,end:n}}function Ko(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fb(e.position):"start"in e||"end"in e?Fb(e):"line"in e||"column"in e?dd(e):""}function dd(e){return Bb(e&&e.line)+":"+Bb(e&&e.column)}function Fb(e){return dd(e&&e.start)+"-"+dd(e&&e.end)}function Bb(e){return e&&typeof e=="number"?e:1}class en extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Ko(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}en.prototype.file="",en.prototype.name="",en.prototype.reason="",en.prototype.message="",en.prototype.stack="",en.prototype.column=void 0,en.prototype.line=void 0,en.prototype.ancestors=void 0,en.prototype.cause=void 0,en.prototype.fatal=void 0,en.prototype.place=void 0,en.prototype.ruleId=void 0,en.prototype.source=void 0;const pd={}.hasOwnProperty,OP=new Map,TP=/[A-Z]/g,CP=/-([a-z])/g,IP=new Set(["table","tbody","thead","tfoot","tr"]),RP=new Set(["td","th"]),zb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function AP(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=BP(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=FP(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?ud:cP,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Ub(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Ub(e,t,n){if(t.type==="element")return PP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return jP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return DP(e,t,n);if(t.type==="mdxjsEsm")return NP(e,t);if(t.type==="root")return MP(e,t,n);if(t.type==="text")return LP(e,t)}function PP(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=ud,e.schema=i),e.ancestors.push(t);const a=Wb(e,t.tagName,!1),o=zP(e,t);let s=md(e,t);return IP.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!XA(l):!0})),qb(e,o,a,t),hd(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function jP(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Go(e,t.position)}function NP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Go(e,t.position)}function DP(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=ud,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Wb(e,t.name,!0),o=UP(e,t),s=md(e,t);return qb(e,o,a,t),hd(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function MP(e,t,n){const r={};return hd(r,md(e,t)),e.create(t,e.Fragment,r,n)}function LP(e,t){return t.value}function qb(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function FP(e,t,n){return r;function r(i,a,o,s){const c=Array.isArray(o.children)?n:t;return s?c(a,o,s):c(a,o)}}function BP(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),l=fd(r);return t(i,a,o,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function zP(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&pd.call(t.properties,i)){const a=qP(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&RP.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function UP(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Go(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else Go(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function md(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:OP;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const s=Ub(e,a,o);s!==void 0&&n.push(s)}return n}function qP(e,t,n){const r=aP(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?ZA(n):uP(n)),r.property==="style"){let i=typeof n=="object"?n:WP(e,String(n));return e.stylePropertyNameCase==="css"&&(i=HP(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?lP[r.property]||r.property:r.attribute,n]}}function WP(e,t){const n={};try{kP(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,o=new en("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=zb+"#cannot-parse-style-attribute",o}}return n;function r(i,a){let o=i;o.slice(0,2)!=="--"&&(o.slice(0,4)==="-ms-"&&(o="ms-"+o.slice(4)),o=o.replace(CP,ZP)),n[o]=a}}function Wb(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=bb(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=o}else r=bb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return pd.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Go(e)}function Go(e,t){const n=new en("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=zb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function HP(e){const t={};let n;for(n in e)pd.call(e,n)&&(t[VP(n)]=e[n]);return t}function VP(e){let t=e.replace(TP,KP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ZP(e,t){return t.toUpperCase()}function KP(e){return"-"+e.toLowerCase()}const vd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},GP={};function gd(e,t){const n=GP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Hb(e,r,i)}function Hb(e,t,n){if(YP(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Vb(e.children,t,n)}return Array.isArray(e)?Vb(e,t,n):""}function Vb(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Hb(e[i],t,n);return r.join("")}function YP(e){return!!(e&&typeof e=="object")}const Zb=document.createElement("i");function yd(e){const t="&"+e+";";Zb.innerHTML=t;const n=Zb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function jn(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Nn(e,t){return e.length>0?(jn(e,e.length,0,t),e):t}const Kb={}.hasOwnProperty;function Gb(e){const t={};let n=-1;for(;++n<e.length;)JP(t,e[n]);return t}function JP(e,t){let n;for(n in t){const i=(Kb.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Kb.call(i,o)||(i[o]=[]);const s=a[o];XP(i[o],Array.isArray(s)?s:s?[s]:[])}}}function XP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);jn(e,0,0,r)}function Yb(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Kn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const cn=oi(/[A-Za-z]/),tn=oi(/[\dA-Za-z]/),QP=oi(/[#-'*+\--9=?A-Z^-~]/);function zl(e){return e!==null&&(e<32||e===127)}const bd=oi(/\d/),ej=oi(/[\dA-Fa-f]/),tj=oi(/[!-/:-@[-`{-~]/);function Ie(e){return e!==null&&e<-2}function gt(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const Ul=oi(new RegExp("\\p{P}|\\p{S}","u")),Ui=oi(/\s/);function oi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function wa(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&tn(e.charCodeAt(n+1))&&tn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Qe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(l){return Ke(l)?(e.enter(n),s(l)):t(l)}function s(l){return Ke(l)&&a++<i?(e.consume(l),s):(e.exit(n),t(l))}}const nj={tokenize:rj};function rj(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Qe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Ie(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const ij={tokenize:aj},Jb={tokenize:oj};function aj(e){const t=this,n=[];let r=0,i,a,o;return s;function s(b){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,l,c)(b)}return c(b)}function l(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&g();const k=t.events.length;let S=k,_;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){_=t.events[S][1].end;break}v(r);let $=k;for(;$<t.events.length;)t.events[$][1].end=Object.assign({},_),$++;return jn(t.events,S+1,0,t.events.slice(k)),t.events.length=$,c(b)}return s(b)}function c(b){if(r===n.length){if(!i)return d(b);if(i.currentConstruct&&i.currentConstruct.concrete)return h(b);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Jb,u,f)(b)}function u(b){return i&&g(),v(r),d(b)}function f(b){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,h(b)}function d(b){return t.containerState={},e.attempt(Jb,p,h)(b)}function p(b){return r++,n.push([t.currentConstruct,t.containerState]),d(b)}function h(b){if(b===null){i&&g(),v(0),e.consume(b);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),m(b)}function m(b){if(b===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(b);return}return Ie(b)?(e.consume(b),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(b),m)}function y(b,k){const S=t.sliceStream(b);if(k&&S.push(null),b.previous=a,a&&(a.next=b),a=b,i.defineSkip(b.start),i.write(S),t.parser.lazy[b.start.line]){let _=i.events.length;for(;_--;)if(i.events[_][1].start.offset<o&&(!i.events[_][1].end||i.events[_][1].end.offset>o))return;const $=t.events.length;let j=$,z,O;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(z){O=t.events[j][1].end;break}z=!0}for(v(r),_=$;_<t.events.length;)t.events[_][1].end=Object.assign({},O),_++;jn(t.events,j+1,0,t.events.slice($)),t.events.length=_}}function v(b){let k=n.length;for(;k-- >b;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=b}function g(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function oj(e,t,n){return Qe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ql(e){if(e===null||gt(e)||Ui(e))return 1;if(Ul(e))return 2}function Wl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const xd={name:"attention",tokenize:lj,resolveAll:sj};function sj(e,t){let n=-1,r,i,a,o,s,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);Xb(f,-l),Xb(d,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},s.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Nn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Nn(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),c=Nn(c,Wl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Nn(c,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Nn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,jn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function lj(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ql(r);let a;return o;function o(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;const c=e.exit("attentionSequence"),u=ql(l),f=!u||u===2&&i||n.includes(l),d=!i||i===2&&u||n.includes(r);return c._open=!!(a===42?f:f&&(i||!d)),c._close=!!(a===42?d:d&&(u||!f)),t(l)}}function Xb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const cj={name:"autolink",tokenize:uj};function uj(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return cn(p)?(e.consume(p),o):p===64?n(p):c(p)}function o(p){return p===43||p===45||p===46||tn(p)?(r=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||tn(p))&&r++<32?(e.consume(p),s):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||zl(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):QP(p)?(e.consume(p),c):n(p)}function u(p){return tn(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):d(p)}function d(p){if((p===45||tn(p))&&r++<63){const h=p===45?d:f;return e.consume(p),h}return n(p)}}const Yo={tokenize:fj,partial:!0};function fj(e,t,n){return r;function r(a){return Ke(a)?Qe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Ie(a)?t(a):n(a)}}const Qb={name:"blockQuote",tokenize:dj,continuation:{tokenize:pj},exit:hj};function dj(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return Ke(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function pj(e,t,n){const r=this;return i;function i(o){return Ke(o)?Qe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Qb,t,n)(o)}}function hj(e){e.exit("blockQuote")}const ex={name:"characterEscape",tokenize:mj};function mj(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return tj(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const tx={name:"characterReference",tokenize:vj};function vj(e,t,n){const r=this;let i=0,a,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,o=tn,u(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=ej,u):(e.enter("characterReferenceValue"),a=7,o=bd,u(f))}function u(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return o===tn&&!yd(r.sliceSerialize(d))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),u):n(f)}}const nx={tokenize:yj,partial:!0},rx={name:"codeFenced",tokenize:gj,concrete:!0};function gj(e,t,n){const r=this,i={tokenize:S,partial:!0};let a=0,o=0,s;return l;function l(_){return c(_)}function c(_){const $=r.events[r.events.length-1];return a=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,s=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(_)}function u(_){return _===s?(o++,e.consume(_),u):o<3?n(_):(e.exit("codeFencedFenceSequence"),Ke(_)?Qe(e,f,"whitespace")(_):f(_))}function f(_){return _===null||Ie(_)?(e.exit("codeFencedFence"),r.interrupt?t(_):e.check(nx,m,k)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(_))}function d(_){return _===null||Ie(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(_)):Ke(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qe(e,p,"whitespace")(_)):_===96&&_===s?n(_):(e.consume(_),d)}function p(_){return _===null||Ie(_)?f(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(_))}function h(_){return _===null||Ie(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(_)):_===96&&_===s?n(_):(e.consume(_),h)}function m(_){return e.attempt(i,k,y)(_)}function y(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),v}function v(_){return a>0&&Ke(_)?Qe(e,g,"linePrefix",a+1)(_):g(_)}function g(_){return _===null||Ie(_)?e.check(nx,m,k)(_):(e.enter("codeFlowValue"),b(_))}function b(_){return _===null||Ie(_)?(e.exit("codeFlowValue"),g(_)):(e.consume(_),b)}function k(_){return e.exit("codeFenced"),t(_)}function S(_,$,j){let z=0;return O;function O(M){return _.enter("lineEnding"),_.consume(M),_.exit("lineEnding"),N}function N(M){return _.enter("codeFencedFence"),Ke(M)?Qe(_,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):W(M)}function W(M){return M===s?(_.enter("codeFencedFenceSequence"),L(M)):j(M)}function L(M){return M===s?(z++,_.consume(M),L):z>=o?(_.exit("codeFencedFenceSequence"),Ke(M)?Qe(_,U,"whitespace")(M):U(M)):j(M)}function U(M){return M===null||Ie(M)?(_.exit("codeFencedFence"),$(M)):j(M)}}}function yj(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const wd={name:"codeIndented",tokenize:xj},bj={tokenize:wj,partial:!0};function xj(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Qe(e,a,"linePrefix",5)(c)}function a(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):Ie(c)?e.attempt(bj,o,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||Ie(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function wj(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Qe(e,a,"linePrefix",5)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):Ie(o)?i(o):n(o)}}const Sj={name:"codeText",tokenize:kj,resolve:Ej,previous:_j};function Ej(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function _j(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function kj(e,t,n){let r=0,i,a;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(a=e.enter("codeTextSequence"),i=0,u(f)):Ie(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||Ie(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}class $j{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Jo(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Jo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Jo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Jo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Jo(this.left,n.reverse())}}}function Jo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ix(e){const t={};let n=-1,r,i,a,o,s,l,c;const u=new $j(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Oj(u,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(o=u.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank");)o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},u.get(i)[1].start),s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return jn(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Oj(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[],o=n._tokenizer||r.parser[n.contentType](n.start),s=o.events,l=[],c={};let u,f,d=-1,p=n,h=0,m=0;const y=[m];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(m=d+1,y.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),d=y.length;d--;){const v=s.slice(y[d],y[d+1]),g=a.pop();l.push([g,g+v.length-1]),e.splice(g,2,v)}for(l.reverse(),d=-1;++d<l.length;)c[h+l[d][0]]=h+l[d][1],h+=l[d][1]-l[d][0]-1;return c}const Tj={tokenize:Rj,resolve:Ij},Cj={tokenize:Aj,partial:!0};function Ij(e){return ix(e),e}function Rj(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):Ie(s)?e.check(Cj,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Aj(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Qe(e,a,"linePrefix")}function a(o){if(o===null||Ie(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function ax(e,t,n,r,i,a,o,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return f;function f(v){return v===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(v),e.exit(a),d):v===null||v===32||v===41||zl(v)?n(v):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(v))}function d(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(s),d(v)):v===null||v===60||Ie(v)?n(v):(e.consume(v),v===92?h:p)}function h(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function m(v){return!u&&(v===null||v===41||gt(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(v)):u<c&&v===40?(e.consume(v),u++,m):v===41?(e.consume(v),u--,m):v===null||v===32||v===40||zl(v)?n(v):(e.consume(v),v===92?y:m)}function y(v){return v===40||v===41||v===92?(e.consume(v),m):m(v)}}function ox(e,t,n,r,i,a){const o=this;let s=0,l;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),u}function u(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Ie(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||Ie(p)||s++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!Ke(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function sx(e,t,n,r,i,a){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,l):n(d)}function l(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(a),c(d))}function c(d){return d===o?(e.exit(a),l(o)):d===null?n(d):Ie(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Qe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===o||d===null||Ie(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?f:u)}function f(d){return d===o||d===92?(e.consume(d),u):u(d)}}function Xo(e,t){let n;return r;function r(i){return Ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ke(i)?Qe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const Pj={name:"definition",tokenize:Nj},jj={tokenize:Dj,partial:!0};function Nj(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),o(p)}function o(p){return ox.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=Kn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return gt(p)?Xo(e,c)(p):c(p)}function c(p){return ax(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(jj,f,f)(p)}function f(p){return Ke(p)?Qe(e,d,"whitespace")(p):d(p)}function d(p){return p===null||Ie(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Dj(e,t,n){return r;function r(s){return gt(s)?Xo(e,i)(s):n(s)}function i(s){return sx(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ke(s)?Qe(e,o,"whitespace")(s):o(s)}function o(s){return s===null||Ie(s)?t(s):n(s)}}const Mj={name:"hardBreakEscape",tokenize:Lj};function Lj(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Ie(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Fj={name:"headingAtx",tokenize:zj,resolve:Bj};function Bj(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},jn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function zj(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),a(u)}function a(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||gt(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Ie(u)?(e.exit("atxHeading"),t(u)):Ke(u)?Qe(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||gt(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const Uj=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],lx=["pre","script","style","textarea"],qj={name:"htmlFlow",tokenize:Zj,resolveTo:Vj,concrete:!0},Wj={tokenize:Gj,partial:!0},Hj={tokenize:Kj,partial:!0};function Vj(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Zj(e,t,n){const r=this;let i,a,o,s,l;return c;function c(E){return u(E)}function u(E){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(E),f}function f(E){return E===33?(e.consume(E),d):E===47?(e.consume(E),a=!0,m):E===63?(e.consume(E),i=3,r.interrupt?t:x):cn(E)?(e.consume(E),o=String.fromCharCode(E),y):n(E)}function d(E){return E===45?(e.consume(E),i=2,p):E===91?(e.consume(E),i=5,s=0,h):cn(E)?(e.consume(E),i=4,r.interrupt?t:x):n(E)}function p(E){return E===45?(e.consume(E),r.interrupt?t:x):n(E)}function h(E){const Q="CDATA[";return E===Q.charCodeAt(s++)?(e.consume(E),s===Q.length?r.interrupt?t:W:h):n(E)}function m(E){return cn(E)?(e.consume(E),o=String.fromCharCode(E),y):n(E)}function y(E){if(E===null||E===47||E===62||gt(E)){const Q=E===47,oe=o.toLowerCase();return!Q&&!a&&lx.includes(oe)?(i=1,r.interrupt?t(E):W(E)):Uj.includes(o.toLowerCase())?(i=6,Q?(e.consume(E),v):r.interrupt?t(E):W(E)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(E):a?g(E):b(E))}return E===45||tn(E)?(e.consume(E),o+=String.fromCharCode(E),y):n(E)}function v(E){return E===62?(e.consume(E),r.interrupt?t:W):n(E)}function g(E){return Ke(E)?(e.consume(E),g):O(E)}function b(E){return E===47?(e.consume(E),O):E===58||E===95||cn(E)?(e.consume(E),k):Ke(E)?(e.consume(E),b):O(E)}function k(E){return E===45||E===46||E===58||E===95||tn(E)?(e.consume(E),k):S(E)}function S(E){return E===61?(e.consume(E),_):Ke(E)?(e.consume(E),S):b(E)}function _(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),l=E,$):Ke(E)?(e.consume(E),_):j(E)}function $(E){return E===l?(e.consume(E),l=null,z):E===null||Ie(E)?n(E):(e.consume(E),$)}function j(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||gt(E)?S(E):(e.consume(E),j)}function z(E){return E===47||E===62||Ke(E)?b(E):n(E)}function O(E){return E===62?(e.consume(E),N):n(E)}function N(E){return E===null||Ie(E)?W(E):Ke(E)?(e.consume(E),N):n(E)}function W(E){return E===45&&i===2?(e.consume(E),I):E===60&&i===1?(e.consume(E),H):E===62&&i===4?(e.consume(E),q):E===63&&i===3?(e.consume(E),x):E===93&&i===5?(e.consume(E),A):Ie(E)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Wj,K,L)(E)):E===null||Ie(E)?(e.exit("htmlFlowData"),L(E)):(e.consume(E),W)}function L(E){return e.check(Hj,U,K)(E)}function U(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),M}function M(E){return E===null||Ie(E)?L(E):(e.enter("htmlFlowData"),W(E))}function I(E){return E===45?(e.consume(E),x):W(E)}function H(E){return E===47?(e.consume(E),o="",B):W(E)}function B(E){if(E===62){const Q=o.toLowerCase();return lx.includes(Q)?(e.consume(E),q):W(E)}return cn(E)&&o.length<8?(e.consume(E),o+=String.fromCharCode(E),B):W(E)}function A(E){return E===93?(e.consume(E),x):W(E)}function x(E){return E===62?(e.consume(E),q):E===45&&i===2?(e.consume(E),x):W(E)}function q(E){return E===null||Ie(E)?(e.exit("htmlFlowData"),K(E)):(e.consume(E),q)}function K(E){return e.exit("htmlFlow"),t(E)}}function Kj(e,t,n){const r=this;return i;function i(o){return Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Gj(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Yo,t,n)}}const Yj={name:"htmlText",tokenize:Jj};function Jj(e,t,n){const r=this;let i,a,o;return s;function s(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),l}function l(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),S):x===63?(e.consume(x),b):cn(x)?(e.consume(x),j):n(x)}function c(x){return x===45?(e.consume(x),u):x===91?(e.consume(x),a=0,h):cn(x)?(e.consume(x),g):n(x)}function u(x){return x===45?(e.consume(x),p):n(x)}function f(x){return x===null?n(x):x===45?(e.consume(x),d):Ie(x)?(o=f,H(x)):(e.consume(x),f)}function d(x){return x===45?(e.consume(x),p):f(x)}function p(x){return x===62?I(x):x===45?d(x):f(x)}function h(x){const q="CDATA[";return x===q.charCodeAt(a++)?(e.consume(x),a===q.length?m:h):n(x)}function m(x){return x===null?n(x):x===93?(e.consume(x),y):Ie(x)?(o=m,H(x)):(e.consume(x),m)}function y(x){return x===93?(e.consume(x),v):m(x)}function v(x){return x===62?I(x):x===93?(e.consume(x),v):m(x)}function g(x){return x===null||x===62?I(x):Ie(x)?(o=g,H(x)):(e.consume(x),g)}function b(x){return x===null?n(x):x===63?(e.consume(x),k):Ie(x)?(o=b,H(x)):(e.consume(x),b)}function k(x){return x===62?I(x):b(x)}function S(x){return cn(x)?(e.consume(x),_):n(x)}function _(x){return x===45||tn(x)?(e.consume(x),_):$(x)}function $(x){return Ie(x)?(o=$,H(x)):Ke(x)?(e.consume(x),$):I(x)}function j(x){return x===45||tn(x)?(e.consume(x),j):x===47||x===62||gt(x)?z(x):n(x)}function z(x){return x===47?(e.consume(x),I):x===58||x===95||cn(x)?(e.consume(x),O):Ie(x)?(o=z,H(x)):Ke(x)?(e.consume(x),z):I(x)}function O(x){return x===45||x===46||x===58||x===95||tn(x)?(e.consume(x),O):N(x)}function N(x){return x===61?(e.consume(x),W):Ie(x)?(o=N,H(x)):Ke(x)?(e.consume(x),N):z(x)}function W(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,L):Ie(x)?(o=W,H(x)):Ke(x)?(e.consume(x),W):(e.consume(x),U)}function L(x){return x===i?(e.consume(x),i=void 0,M):x===null?n(x):Ie(x)?(o=L,H(x)):(e.consume(x),L)}function U(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||gt(x)?z(x):(e.consume(x),U)}function M(x){return x===47||x===62||gt(x)?z(x):n(x)}function I(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function H(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),B}function B(x){return Ke(x)?Qe(e,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):A(x)}function A(x){return e.enter("htmlTextData"),o(x)}}const Sd={name:"labelEnd",tokenize:rN,resolveTo:nN,resolveAll:tN},Xj={tokenize:iN},Qj={tokenize:aN},eN={tokenize:oN};function tN(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function nN(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[o][1].end)},u={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[["enter",l,t],["enter",c,t]],s=Nn(s,e.slice(a+1,a+r+3)),s=Nn(s,[["enter",u,t]]),s=Nn(s,Wl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Nn(s,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),s=Nn(s,e.slice(o+1)),s=Nn(s,[["exit",l,t]]),jn(e,a,e.length,s),e}function rN(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(d){return a?a._inactive?f(d):(o=r.parser.defined.includes(Kn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),l):n(d)}function l(d){return d===40?e.attempt(Xj,u,o?u:f)(d):d===91?e.attempt(Qj,u,o?c:f)(d):o?u(d):f(d)}function c(d){return e.attempt(eN,u,f)(d)}function u(d){return t(d)}function f(d){return a._balanced=!0,n(d)}}function iN(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return gt(f)?Xo(e,a)(f):a(f)}function a(f){return f===41?u(f):ax(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return gt(f)?Xo(e,l)(f):u(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?sx(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return gt(f)?Xo(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function aN(e,t,n){const r=this;return i;function i(s){return ox.call(r,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(Kn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function oN(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const sN={name:"labelStartImage",tokenize:lN,resolveAll:Sd.resolveAll};function lN(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const cN={name:"labelStartLink",tokenize:uN,resolveAll:Sd.resolveAll};function uN(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Ed={name:"lineEnding",tokenize:fN};function fN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qe(e,t,"linePrefix")}}const Hl={name:"thematicBreak",tokenize:dN};function dN(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||Ie(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),Ke(c)?Qe(e,s,"whitespace")(c):s(c))}}const mn={name:"list",tokenize:mN,continuation:{tokenize:vN},exit:yN},pN={tokenize:bN,partial:!0},hN={tokenize:gN,partial:!0};function mN(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const h=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:bd(p)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Hl,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return bd(p)&&++o<10?(e.consume(p),l):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Yo,r.interrupt?n:u,e.attempt(pN,d,f))}function u(p){return r.containerState.initialBlankLine=!0,a++,d(p)}function f(p){return Ke(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function vN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Yo,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qe(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!Ke(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(hN,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qe(e,e.attempt(mn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function gN(e,t,n){const r=this;return Qe(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function yN(e){e.exit(this.containerState.type)}function bN(e,t,n){const r=this;return Qe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!Ke(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const cx={name:"setextUnderline",tokenize:wN,resolveTo:xN};function xN(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=o,e.push(["exit",o,t]),e}function wN(e,t,n){const r=this;let i;return a;function a(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),Ke(c)?Qe(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ie(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const SN={tokenize:EN};function EN(e){const t=this,n=e.attempt(Yo,r,e.attempt(this.parser.constructs.flowInitial,i,Qe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Tj,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const _N={resolveAll:fx()},kN=ux("string"),$N=ux("text");function ux(e){return{tokenize:t,resolveAll:fx(e==="text"?ON:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(u){return c(u)?a(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),a(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const f=i[u];let d=-1;if(f)for(;++d<f.length;){const p=f[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function fx(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function ON(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,s=0,l;for(;a--;){const c=i[a];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(c===-2)l=!0,s++;else if(c!==-1){a++;break}}if(s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+a,_bufferIndex:a?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function TN(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const l={consume:g,enter:b,exit:k,attempt:$(S),check:$(_),interrupt:$(_,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:d,now:h,defineSkip:m,write:f};let u=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function f(N){return o=Nn(o,N),y(),o[o.length-1]!==null?[]:(j(t,0),c.events=Wl(a,c.events,c),c.events)}function d(N,W){return IN(p(N),W)}function p(N){return CN(o,N)}function h(){const{line:N,column:W,offset:L,_index:U,_bufferIndex:M}=r;return{line:N,column:W,offset:L,_index:U,_bufferIndex:M}}function m(N){i[N.line]=N.column,O()}function y(){let N;for(;r._index<o.length;){const W=o[r._index];if(typeof W=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<W.length;)v(W.charCodeAt(r._bufferIndex));else v(W)}}function v(N){u=u(N)}function g(N){Ie(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,O()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=N}function b(N,W){const L=W||{};return L.type=N,L.start=h(),c.events.push(["enter",L,c]),s.push(L),L}function k(N){const W=s.pop();return W.end=h(),c.events.push(["exit",W,c]),W}function S(N,W){j(N,W.from)}function _(N,W){W.restore()}function $(N,W){return L;function L(U,M,I){let H,B,A,x;return Array.isArray(U)?K(U):"tokenize"in U?K([U]):q(U);function q(ne){return le;function le(pe){const he=pe!==null&&ne[pe],ce=pe!==null&&ne.null,X=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return K(X)(pe)}}function K(ne){return H=ne,B=0,ne.length===0?I:E(ne[B])}function E(ne){return le;function le(pe){return x=z(),A=ne,ne.partial||(c.currentConstruct=ne),ne.name&&c.parser.constructs.disable.null.includes(ne.name)?oe():ne.tokenize.call(W?Object.assign(Object.create(c),W):c,l,Q,oe)(pe)}}function Q(ne){return N(A,x),M}function oe(ne){return x.restore(),++B<H.length?E(H[B]):I}}}function j(N,W){N.resolveAll&&!a.includes(N)&&a.push(N),N.resolve&&jn(c.events,W,c.events.length-W,N.resolve(c.events.slice(W),c)),N.resolveTo&&(c.events=N.resolveTo(c.events,c))}function z(){const N=h(),W=c.previous,L=c.currentConstruct,U=c.events.length,M=Array.from(s);return{restore:I,from:U};function I(){r=N,c.previous=W,c.currentConstruct=L,c.events.length=U,s=M,O()}}function O(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function CN(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function IN(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
30
|
+
<%s key={someKey} {...props} />`,py,da,ipe,da),qn[da+py]=!0}}return T===r?Ht(Mt):Qt(Mt),Mt}}function Ni(T,te,ge){return Wn(T,te,ge,!0)}function tpe(T,te,ge){return Wn(T,te,ge,!1)}var npe=tpe,rpe=Ni;Co.Fragment=r,Co.jsx=npe,Co.jsxs=rpe}()),Co}process.env.NODE_ENV==="production"?qf.exports=uR():qf.exports=fR();var C=qf.exports;function dR(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),l=n.length;n=[...n,o];function c(f){const{scope:d,children:p,...h}=f,m=(d==null?void 0:d[e][l])||s,y=w.useMemo(()=>h,Object.values(h));return C.jsx(m.Provider,{value:y,children:p})}function u(f,d){const p=(d==null?void 0:d[e][l])||s,h=w.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return c.displayName=a+"Provider",[c,u]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,pR(i,...t)]}function pR(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(a)[`__scope${c}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function ni(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var pa=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function hR(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ay(...e){return t=>e.forEach(n=>hR(n,t))}function ri(...e){return w.useCallback(Ay(...e),e)}var Wf=w.forwardRef((e,t)=>{const{children:n,...r}=e,i=w.Children.toArray(n),a=i.find(vR);if(a){const o=a.props.children,s=i.map(l=>l===a?w.Children.count(o)>1?w.Children.only(null):w.isValidElement(o)?o.props.children:null:l);return C.jsx(Hf,{...r,ref:t,children:w.isValidElement(o)?w.cloneElement(o,void 0,s):null})}return C.jsx(Hf,{...r,ref:t,children:n})});Wf.displayName="Slot";var Hf=w.forwardRef((e,t)=>{const{children:n,...r}=e;if(w.isValidElement(n)){const i=yR(n);return w.cloneElement(n,{...gR(r,n.props),ref:t?Ay(t,i):i})}return w.Children.count(n)>1?w.Children.only(null):null});Hf.displayName="SlotClone";var mR=({children:e})=>C.jsx(C.Fragment,{children:e});function vR(e){return w.isValidElement(e)&&e.type===mR}function gR(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function yR(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var bR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pn=bR.reduce((e,t)=>{const n=w.forwardRef((r,i)=>{const{asChild:a,...o}=r,s=a?Wf:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...o,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function xR(e,t){e&&xy.flushSync(()=>e.dispatchEvent(t))}var Vf="Avatar",[wR,upe]=dR(Vf),[SR,Py]=wR(Vf),Zf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,a]=w.useState("idle");return C.jsx(SR,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:a,children:C.jsx(pn.span,{...r,ref:t})})});Zf.displayName=Vf;var jy="AvatarImage",Kf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...a}=e,o=Py(jy,n),s=ER(r),l=ni(c=>{i(c),o.onImageLoadingStatusChange(c)});return pa(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?C.jsx(pn.img,{...a,ref:t,src:r}):null});Kf.displayName=jy;var Ny="AvatarFallback",Gf=w.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,a=Py(Ny,n),[o,s]=w.useState(r===void 0);return w.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),o&&a.imageLoadingStatus!=="loaded"?C.jsx(pn.span,{...i,ref:t}):null});Gf.displayName=Ny;function ER(e){const[t,n]=w.useState("idle");return pa(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,a=o=>()=>{r&&n(o)};return n("loading"),i.onload=a("loaded"),i.onerror=a("error"),i.src=e,()=>{r=!1}},[e]),t}function Yf(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(l=>l+l).join(""));const i=parseInt(r,16),a=i>>16&255,o=i>>8&255,s=i&255;return{r:a,g:o,b:s}}function _R(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const kR=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function Dy(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,a=>(1e3-parseInt(a)).toString());return{...t,[i]:r}},{})}const $R=2.4,OR=.2126729,TR=.7151522,CR=.072175,IR=.56,RR=.57,AR=.62,PR=.65,Ol=.022,My=1.414,jR=1.14,NR=1.14,DR=.035991,MR=.035991,LR=27.7847239587675,FR=27.7847239587675,Ly=.027,Fy=.027,By=.001,BR=5e-4;function zy(e){const{r:t,g:n,b:r}=e,i=a=>(a/255)**$R;return OR*i(t)+TR*i(n)+CR*i(r)}function Uy(e,t){if(!e||!t)return 0;let n=zy(Yf(e)),r=zy(Yf(t)),i=0,a=0;return n=n>Ol?n:n+(Ol-n)**My,r=r>Ol?r:r+(Ol-r)**My,Math.abs(r-n)<BR?0:(r>n?(i=(r**IR-n**RR)*jR,a=i<By?0:i<DR?i-i*LR*Ly:i-Ly):(i=(r**PR-n**AR)*NR,a=i>-By?0:i>-MR?i-i*FR*Fy:i+Fy),Math.abs(a*100))}let qy=class{constructor(){Ee(this,"eventMap");this.eventMap={}}on(t,n){var r;return this.eventMap[t]||(this.eventMap[t]=new Set),(r=this.eventMap[t])==null||r.add(n),()=>{var i;(i=this.eventMap[t])==null||i.delete(n)}}emit(t,n){var r,i;(r=this.eventMap[t])==null||r.forEach(a=>{a(n)}),(i=this.eventMap["*"])==null||i.forEach(a=>{a({type:t,payload:n})})}};const zR=new qy;function Wy(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Hy(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}var Vy={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ut,function(){var n=1e3,r=6e4,i=36e5,a="millisecond",o="second",s="minute",l="hour",c="day",u="week",f="month",d="quarter",p="year",h="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(U){var M=["th","st","nd","rd"],I=U%100;return"["+U+(M[(I-20)%10]||M[I]||M[0])+"]"}},b=function(U,M,I){var H=String(U);return!H||H.length>=M?U:""+Array(M+1-H.length).join(I)+U},k={s:b,z:function(U){var M=-U.utcOffset(),I=Math.abs(M),H=Math.floor(I/60),B=I%60;return(M<=0?"+":"-")+b(H,2,"0")+":"+b(B,2,"0")},m:function U(M,I){if(M.date()<I.date())return-U(I,M);var H=12*(I.year()-M.year())+(I.month()-M.month()),B=M.clone().add(H,f),A=I-B<0,x=M.clone().add(H+(A?-1:1),f);return+(-(H+(I-B)/(A?B-x:x-B))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:f,y:p,w:u,d:c,D:h,h:l,m:s,s:o,ms:a,Q:d}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},S="en",_={};_[S]=g;var $="$isDayjsObject",j=function(U){return U instanceof W||!(!U||!U[$])},z=function U(M,I,H){var B;if(!M)return S;if(typeof M=="string"){var A=M.toLowerCase();_[A]&&(B=A),I&&(_[A]=I,B=A);var x=M.split("-");if(!B&&x.length>1)return U(x[0])}else{var q=M.name;_[q]=M,B=q}return!H&&B&&(S=B),B||!H&&S},O=function(U,M){if(j(U))return U.clone();var I=typeof M=="object"?M:{};return I.date=U,I.args=arguments,new W(I)},N=k;N.l=z,N.i=j,N.w=function(U,M){return O(U,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var W=function(){function U(I){this.$L=z(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[$]=!0}var M=U.prototype;return M.parse=function(I){this.$d=function(H){var B=H.date,A=H.utc;if(B===null)return new Date(NaN);if(N.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var x=B.match(y);if(x){var q=x[2]-1||0,K=(x[7]||"0").substring(0,3);return A?new Date(Date.UTC(x[1],q,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)):new Date(x[1],q,x[3]||1,x[4]||0,x[5]||0,x[6]||0,K)}}return new Date(B)}(I),this.init()},M.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},M.$utils=function(){return N},M.isValid=function(){return this.$d.toString()!==m},M.isSame=function(I,H){var B=O(I);return this.startOf(H)<=B&&B<=this.endOf(H)},M.isAfter=function(I,H){return O(I)<this.startOf(H)},M.isBefore=function(I,H){return this.endOf(H)<O(I)},M.$g=function(I,H,B){return N.u(I)?this[H]:this.set(B,I)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(I,H){var B=this,A=!!N.u(H)||H,x=N.p(I),q=function(he,ce){var X=N.w(B.$u?Date.UTC(B.$y,ce,he):new Date(B.$y,ce,he),B);return A?X:X.endOf(c)},K=function(he,ce){return N.w(B.toDate()[he].apply(B.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(ce)),B)},E=this.$W,Q=this.$M,oe=this.$D,ne="set"+(this.$u?"UTC":"");switch(x){case p:return A?q(1,0):q(31,11);case f:return A?q(1,Q):q(0,Q+1);case u:var le=this.$locale().weekStart||0,pe=(E<le?E+7:E)-le;return q(A?oe-pe:oe+(6-pe),Q);case c:case h:return K(ne+"Hours",0);case l:return K(ne+"Minutes",1);case s:return K(ne+"Seconds",2);case o:return K(ne+"Milliseconds",3);default:return this.clone()}},M.endOf=function(I){return this.startOf(I,!1)},M.$set=function(I,H){var B,A=N.p(I),x="set"+(this.$u?"UTC":""),q=(B={},B[c]=x+"Date",B[h]=x+"Date",B[f]=x+"Month",B[p]=x+"FullYear",B[l]=x+"Hours",B[s]=x+"Minutes",B[o]=x+"Seconds",B[a]=x+"Milliseconds",B)[A],K=A===c?this.$D+(H-this.$W):H;if(A===f||A===p){var E=this.clone().set(h,1);E.$d[q](K),E.init(),this.$d=E.set(h,Math.min(this.$D,E.daysInMonth())).$d}else q&&this.$d[q](K);return this.init(),this},M.set=function(I,H){return this.clone().$set(I,H)},M.get=function(I){return this[N.p(I)]()},M.add=function(I,H){var B,A=this;I=Number(I);var x=N.p(H),q=function(Q){var oe=O(A);return N.w(oe.date(oe.date()+Math.round(Q*I)),A)};if(x===f)return this.set(f,this.$M+I);if(x===p)return this.set(p,this.$y+I);if(x===c)return q(1);if(x===u)return q(7);var K=(B={},B[s]=r,B[l]=i,B[o]=n,B)[x]||1,E=this.$d.getTime()+I*K;return N.w(E,this)},M.subtract=function(I,H){return this.add(-1*I,H)},M.format=function(I){var H=this,B=this.$locale();if(!this.isValid())return B.invalidDate||m;var A=I||"YYYY-MM-DDTHH:mm:ssZ",x=N.z(this),q=this.$H,K=this.$m,E=this.$M,Q=B.weekdays,oe=B.months,ne=B.meridiem,le=function(ce,X,Z,de){return ce&&(ce[X]||ce(H,A))||Z[X].slice(0,de)},pe=function(ce){return N.s(q%12||12,ce,"0")},he=ne||function(ce,X,Z){var de=ce<12?"AM":"PM";return Z?de.toLowerCase():de};return A.replace(v,function(ce,X){return X||function(Z){switch(Z){case"YY":return String(H.$y).slice(-2);case"YYYY":return N.s(H.$y,4,"0");case"M":return E+1;case"MM":return N.s(E+1,2,"0");case"MMM":return le(B.monthsShort,E,oe,3);case"MMMM":return le(oe,E);case"D":return H.$D;case"DD":return N.s(H.$D,2,"0");case"d":return String(H.$W);case"dd":return le(B.weekdaysMin,H.$W,Q,2);case"ddd":return le(B.weekdaysShort,H.$W,Q,3);case"dddd":return Q[H.$W];case"H":return String(q);case"HH":return N.s(q,2,"0");case"h":return pe(1);case"hh":return pe(2);case"a":return he(q,K,!0);case"A":return he(q,K,!1);case"m":return String(K);case"mm":return N.s(K,2,"0");case"s":return String(H.$s);case"ss":return N.s(H.$s,2,"0");case"SSS":return N.s(H.$ms,3,"0");case"Z":return x}return null}(ce)||x.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(I,H,B){var A,x=this,q=N.p(H),K=O(I),E=(K.utcOffset()-this.utcOffset())*r,Q=this-K,oe=function(){return N.m(x,K)};switch(q){case p:A=oe()/12;break;case f:A=oe();break;case d:A=oe()/3;break;case u:A=(Q-E)/6048e5;break;case c:A=(Q-E)/864e5;break;case l:A=Q/i;break;case s:A=Q/r;break;case o:A=Q/n;break;default:A=Q}return B?A:N.a(A)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return _[this.$L]},M.locale=function(I,H){if(!I)return this.$L;var B=this.clone(),A=z(I,H,!0);return A&&(B.$L=A),B},M.clone=function(){return N.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},U}(),L=W.prototype;return O.prototype=L,[["$ms",a],["$s",o],["$m",s],["$H",l],["$W",c],["$M",f],["$y",p],["$D",h]].forEach(function(U){L[U[1]]=function(M){return this.$g(M,U[0],U[1])}}),O.extend=function(U,M){return U.$i||(U(M,W,O),U.$i=!0),O},O.locale=z,O.isDayjs=j,O.unix=function(U){return O(1e3*U)},O.en=_[S],O.Ls=_,O.p={},O})})(Vy);var UR=Vy.exports;const Tl=Ze(UR);var Zy={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ut,function(){return function(n,r,i){r.prototype.isToday=function(){var a="YYYY-MM-DD",o=i();return this.format(a)===o.format(a)}}})})(Zy);var qR=Zy.exports;const WR=Ze(qR);var Ky={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(ut,function(){return function(n,r,i){r.prototype.isYesterday=function(){var a="YYYY-MM-DD",o=i().subtract(1,"day");return this.format(a)===o.format(a)}}})})(Ky);var HR=Ky.exports;const VR=Ze(HR);Tl.extend(WR),Tl.extend(VR);function ZR(e,t="day"){var r,i,a;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(Gy(e[0].timestamp));for(let o=0;o<e.length;o++)if(e[o]&&n.push(e[o]),o+1<e.length){const s=(i=e[o])==null?void 0:i.timestamp,l=(a=e[o+1])==null?void 0:a.timestamp;!Tl(s).isSame(l,t)&&l&&n.push(Gy(l))}return n}function Gy(e){return{id:ko(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:KR(e)}}}function KR(e,t=!1){const n=Tl(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function GR(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function YR(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function JR(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function XR(e,t){return e.map(n=>Math.round(n*t))}const Io=e=>t=>JR(t,e),Ro=e=>t=>XR(t,e),QR={50:Io(.95),100:Io(.9),200:Io(.75),300:Io(.6),400:Io(.3),500:e=>e,600:Ro(.9),700:Ro(.6),800:Ro(.45),900:Ro(.3),950:Ro(.2)};function Yy(e,t=QR){const n={},r=GR(e);for(const[i,a]of Object.entries(t))n[i]=YR(a(r));return n}var ot;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(ot||(ot={}));var Jf;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Jf||(Jf={}));const ye=ot.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ii=e=>{switch(typeof e){case"undefined":return ye.undefined;case"string":return ye.string;case"number":return isNaN(e)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(e)?ye.array:e===null?ye.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?ye.promise:typeof Map<"u"&&e instanceof Map?ye.map:typeof Set<"u"&&e instanceof Set?ye.set:typeof Date<"u"&&e instanceof Date?ye.date:ye.object;default:return ye.unknown}},se=ot.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),eA=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");let Vn=class extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(o))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,ot.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}};Vn.create=e=>new Vn(e);const Ao=(e,t)=>{let n;switch(e.code){case se.invalid_type:e.received===ye.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case se.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ot.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:n=`Unrecognized key(s) in object: ${ot.joinValues(e.keys,", ")}`;break;case se.invalid_union:n="Invalid input";break;case se.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ot.joinValues(e.options)}`;break;case se.invalid_enum_value:n=`Invalid enum value. Expected ${ot.joinValues(e.options)}, received '${e.received}'`;break;case se.invalid_arguments:n="Invalid function arguments";break;case se.invalid_return_type:n="Invalid function return type";break;case se.invalid_date:n="Invalid date";break;case se.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ot.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case se.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case se.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case se.custom:n="Invalid input";break;case se.invalid_intersection_types:n="Intersection results could not be merged";break;case se.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case se.not_finite:n="Number must be finite";break;default:n=t.defaultError,ot.assertNever(e)}return{message:n}};let Jy=Ao;function tA(e){Jy=e}function Cl(){return Jy}const Il=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(o,{data:t,defaultError:s}).message;return{...i,path:a,message:i.message||s}},nA=[];function xe(e,t){const n=Il({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Cl(),Ao].filter(r=>!!r)});e.common.issues.push(n)}let hn=class KI{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Fe;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return KI.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Fe;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}};const Fe=Object.freeze({status:"aborted"}),Xy=e=>({status:"dirty",value:e}),ln=e=>({status:"valid",value:e}),Xf=e=>e.status==="aborted",Qf=e=>e.status==="dirty",Po=e=>e.status==="valid",Rl=e=>typeof Promise<"u"&&e instanceof Promise;var Te;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Te||(Te={}));let dr=class{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}};const Qy=(e,t)=>{if(Po(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Vn(e.common.issues);return this._error=n,this._error}}};function ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>o.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:r??s.defaultError}:{message:n??s.defaultError},description:i}}let We=class{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return ii(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:ii(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new hn,ctx:{common:t.parent.common,data:t.data,parsedType:ii(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Rl(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ii(t)},a=this._parseSync({data:t,path:i.path,parent:i});return Qy(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:ii(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Rl(i)?i:Promise.resolve(i));return Qy(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:se.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Zn({schema:this,typeName:je.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Fr.create(this,this._def)}nullable(){return Fi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Li.create(this,this._def)}promise(){return ga.create(this,this._def)}or(t){return Bo.create([this,t],this._def)}and(t){return zo.create(this,t,this._def)}transform(t){return new Zn({...ze(this._def),schema:this,typeName:je.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Vo({...ze(this._def),innerType:this,defaultValue:n,typeName:je.ZodDefault})}brand(){return new ib({typeName:je.ZodBranded,type:this,...ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Ml({...ze(this._def),innerType:this,catchValue:n,typeName:je.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return nd.create(this,t)}readonly(){return Fl.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}};const rA=/^c[^\s-]{8,}$/i,iA=/^[a-z][a-z0-9]*$/,aA=/^[0-9A-HJKMNP-TV-Z]{26}$/,oA=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,sA=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ed;const cA=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,uA=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,fA=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function dA(e,t){return!!((t==="v4"||!t)&&cA.test(e)||(t==="v6"||!t)&&uA.test(e))}let ha=class kl extends We{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==ye.string){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ye.string,received:a.parsedType}),Fe}const r=new hn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?xe(i,{code:se.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&xe(i,{code:se.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")sA.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"email",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")ed||(ed=new RegExp(lA,"u")),ed.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"emoji",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")oA.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"uuid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")rA.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"cuid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")iA.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"cuid2",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")aA.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"ulid",code:se.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),xe(i,{validation:"url",code:se.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"regex",code:se.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?fA(a).test(t.data)||(i=this._getOrReturnCtx(t,i),xe(i,{code:se.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="ip"?dA(t.data,a.version)||(i=this._getOrReturnCtx(t,i),xe(i,{validation:"ip",code:se.invalid_string,message:a.message}),r.dirty()):ot.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:se.invalid_string,...Te.errToObj(r)})}_addCheck(t){return new kl({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Te.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Te.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Te.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Te.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Te.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Te.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Te.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Te.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...Te.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Te.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Te.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Te.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Te.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Te.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Te.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Te.errToObj(n)})}nonempty(t){return this.min(1,Te.errToObj(t))}trim(){return new kl({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new kl({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new kl({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};ha.create=e=>{var t;return new ha({checks:[],typeName:je.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};function pA(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}let jo=class hy extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==ye.number){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ye.number,received:a.parsedType}),Fe}let r;const i=new hn;for(const a of this._def.checks)a.kind==="int"?ot.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:se.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?pA(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_finite,message:a.message}),i.dirty()):ot.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,i){return new hy({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(i)}]})}_addCheck(t){return new hy({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Te.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Te.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Te.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Te.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ot.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}};jo.create=e=>new jo({checks:[],typeName:je.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});let No=class my extends We{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==ye.bigint){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ye.bigint,received:a.parsedType}),Fe}let r;const i=new hn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),xe(r,{code:se.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):ot.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Te.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Te.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Te.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Te.toString(n))}setLimit(t,n,r,i){return new my({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Te.toString(i)}]})}_addCheck(t){return new my({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Te.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Te.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Te.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}};No.create=e=>{var t;return new No({checks:[],typeName:je.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ze(e)})};let Do=class extends We{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==ye.boolean){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ye.boolean,received:r.parsedType}),Fe}return ln(t.data)}};Do.create=e=>new Do({typeName:je.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ze(e)});let Mo=class GI extends We{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==ye.date){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_type,expected:ye.date,received:a.parsedType}),Fe}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return xe(a,{code:se.invalid_date}),Fe}const r=new hn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),xe(i,{code:se.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):ot.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new GI({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Te.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Te.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}};Mo.create=e=>new Mo({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:je.ZodDate,...ze(e)});let Al=class extends We{_parse(t){if(this._getType(t)!==ye.symbol){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ye.symbol,received:r.parsedType}),Fe}return ln(t.data)}};Al.create=e=>new Al({typeName:je.ZodSymbol,...ze(e)});let Lo=class extends We{_parse(t){if(this._getType(t)!==ye.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ye.undefined,received:r.parsedType}),Fe}return ln(t.data)}};Lo.create=e=>new Lo({typeName:je.ZodUndefined,...ze(e)});let Fo=class extends We{_parse(t){if(this._getType(t)!==ye.null){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ye.null,received:r.parsedType}),Fe}return ln(t.data)}};Fo.create=e=>new Fo({typeName:je.ZodNull,...ze(e)});let ma=class extends We{constructor(){super(...arguments),this._any=!0}_parse(t){return ln(t.data)}};ma.create=e=>new ma({typeName:je.ZodAny,...ze(e)});let Mi=class extends We{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ln(t.data)}};Mi.create=e=>new Mi({typeName:je.ZodUnknown,...ze(e)});let Lr=class extends We{_parse(t){const n=this._getOrReturnCtx(t);return xe(n,{code:se.invalid_type,expected:ye.never,received:n.parsedType}),Fe}};Lr.create=e=>new Lr({typeName:je.ZodNever,...ze(e)});let Pl=class extends We{_parse(t){if(this._getType(t)!==ye.undefined){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ye.void,received:r.parsedType}),Fe}return ln(t.data)}};Pl.create=e=>new Pl({typeName:je.ZodVoid,...ze(e)});let Li=class zf extends We{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==ye.array)return xe(n,{code:se.invalid_type,expected:ye.array,received:n.parsedType}),Fe;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(xe(n,{code:o?se.too_big:se.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(xe(n,{code:se.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(xe(n,{code:se.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new dr(n,o,n.path,s)))).then(o=>hn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new dr(n,o,n.path,s)));return hn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new zf({...this._def,minLength:{value:t,message:Te.toString(n)}})}max(t,n){return new zf({...this._def,maxLength:{value:t,message:Te.toString(n)}})}length(t,n){return new zf({...this._def,exactLength:{value:t,message:Te.toString(n)}})}nonempty(t){return this.min(1,t)}};Li.create=(e,t)=>new Li({type:e,minLength:null,maxLength:null,exactLength:null,typeName:je.ZodArray,...ze(t)});function va(e){if(e instanceof An){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Fr.create(va(r))}return new An({...e._def,shape:()=>t})}else return e instanceof Li?new Li({...e._def,type:va(e.element)}):e instanceof Fr?Fr.create(va(e.unwrap())):e instanceof Fi?Fi.create(va(e.unwrap())):e instanceof ai?ai.create(e.items.map(t=>va(t))):e}let An=class fr extends We{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ot.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==ye.object){const c=this._getOrReturnCtx(t);return xe(c,{code:se.invalid_type,expected:ye.object,received:c.parsedType}),Fe}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Lr&&this._def.unknownKeys==="strip"))for(const c in i.data)o.includes(c)||s.push(c);const l=[];for(const c of o){const u=a[c],f=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new dr(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Lr){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")s.length>0&&(xe(i,{code:se.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const f=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new dr(i,f,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key;c.push({key:f,value:await u.value,alwaysSet:u.alwaysSet})}return c}).then(c=>hn.mergeObjectSync(r,c)):hn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return Te.errToObj,new fr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const l=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=Te.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new fr({...this._def,unknownKeys:"strip"})}passthrough(){return new fr({...this._def,unknownKeys:"passthrough"})}extend(t){return new fr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new fr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:je.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new fr({...this._def,catchall:t})}pick(t){const n={};return ot.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new fr({...this._def,shape:()=>n})}omit(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new fr({...this._def,shape:()=>n})}deepPartial(){return va(this)}partial(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new fr({...this._def,shape:()=>n})}required(t){const n={};return ot.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Fr;)a=a._def.innerType;n[r]=a}}),new fr({...this._def,shape:()=>n})}keyof(){return rb(ot.objectKeys(this.shape))}};An.create=(e,t)=>new An({shape:()=>e,unknownKeys:"strip",catchall:Lr.create(),typeName:je.ZodObject,...ze(t)}),An.strictCreate=(e,t)=>new An({shape:()=>e,unknownKeys:"strict",catchall:Lr.create(),typeName:je.ZodObject,...ze(t)}),An.lazycreate=(e,t)=>new An({shape:e,unknownKeys:"strip",catchall:Lr.create(),typeName:je.ZodObject,...ze(t)});let Bo=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new Vn(s.ctx.common.issues));return xe(n,{code:se.invalid_union,unionErrors:o}),Fe}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(l=>new Vn(l));return xe(n,{code:se.invalid_union,unionErrors:s}),Fe}}get options(){return this._def.options}};Bo.create=(e,t)=>new Bo({options:e,typeName:je.ZodUnion,...ze(t)});const jl=e=>e instanceof Uo?jl(e.schema):e instanceof Zn?jl(e.innerType()):e instanceof qo?[e.value]:e instanceof Wo?e.options:e instanceof Ho?Object.keys(e.enum):e instanceof Vo?jl(e._def.innerType):e instanceof Lo?[void 0]:e instanceof Fo?[null]:null;let eb=class YI extends We{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.object)return xe(n,{code:se.invalid_type,expected:ye.object,received:n.parsedType}),Fe;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(xe(n,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Fe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=jl(a.shape[t]);if(!o)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new YI({typeName:je.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...ze(r)})}};function td(e,t){const n=ii(e),r=ii(t);if(e===t)return{valid:!0,data:e};if(n===ye.object&&r===ye.object){const i=ot.objectKeys(t),a=ot.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const l=td(e[s],t[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(n===ye.array&&r===ye.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],l=td(o,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===ye.date&&r===ye.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}let zo=class extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Xf(a)||Xf(o))return Fe;const s=td(a.value,o.value);return s.valid?((Qf(a)||Qf(o))&&n.dirty(),{status:n.value,value:s.data}):(xe(r,{code:se.invalid_intersection_types}),Fe)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}};zo.create=(e,t,n)=>new zo({left:e,right:t,typeName:je.ZodIntersection,...ze(n)});let ai=class JI extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.array)return xe(r,{code:se.invalid_type,expected:ye.array,received:r.parsedType}),Fe;if(r.data.length<this._def.items.length)return xe(r,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Fe;!this._def.rest&&r.data.length>this._def.items.length&&(xe(r,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new dr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>hn.mergeArray(n,o)):hn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new JI({...this._def,rest:t})}};ai.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ai({items:e,typeName:je.ZodTuple,rest:null,...ze(t)})};let tb=class vy extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.object)return xe(r,{code:se.invalid_type,expected:ye.object,received:r.parsedType}),Fe;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new dr(r,s,r.path,s)),value:o._parse(new dr(r,r.data[s],r.path,s))});return r.common.async?hn.mergeObjectAsync(n,i):hn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof We?new vy({keyType:t,valueType:n,typeName:je.ZodRecord,...ze(r)}):new vy({keyType:ha.create(),valueType:t,typeName:je.ZodRecord,...ze(n)})}},Nl=class extends We{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.map)return xe(r,{code:se.invalid_type,expected:ye.map,received:r.parsedType}),Fe;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new dr(r,s,r.path,[c,"key"])),value:a._parse(new dr(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return Fe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return Fe;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}};Nl.create=(e,t,n)=>new Nl({valueType:t,keyType:e,typeName:je.ZodMap,...ze(n)});let Dl=class gy extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==ye.set)return xe(r,{code:se.invalid_type,expected:ye.set,received:r.parsedType}),Fe;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(xe(r,{code:se.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(xe(r,{code:se.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return Fe;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>a._parse(new dr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(t,n){return new gy({...this._def,minSize:{value:t,message:Te.toString(n)}})}max(t,n){return new gy({...this._def,maxSize:{value:t,message:Te.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}};Dl.create=(e,t)=>new Dl({valueType:e,minSize:null,maxSize:null,typeName:je.ZodSet,...ze(t)});let nb=class Uf extends We{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.function)return xe(n,{code:se.invalid_type,expected:ye.function,received:n.parsedType}),Fe;function r(s,l){return Il({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cl(),Ao].filter(c=>!!c),issueData:{code:se.invalid_arguments,argumentsError:l}})}function i(s,l){return Il({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Cl(),Ao].filter(c=>!!c),issueData:{code:se.invalid_return_type,returnTypeError:l}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof ga){const s=this;return ln(async function(...l){const c=new Vn([]),u=await s._def.args.parseAsync(l,a).catch(p=>{throw c.addIssue(r(l,p)),c}),f=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw c.addIssue(i(f,p)),c})})}else{const s=this;return ln(function(...l){const c=s._def.args.safeParse(l,a);if(!c.success)throw new Vn([r(l,c.error)]);const u=Reflect.apply(o,this,c.data),f=s._def.returns.safeParse(u,a);if(!f.success)throw new Vn([i(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Uf({...this._def,args:ai.create(t).rest(Mi.create())})}returns(t){return new Uf({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Uf({args:t||ai.create([]).rest(Mi.create()),returns:n||Mi.create(),typeName:je.ZodFunction,...ze(r)})}},Uo=class extends We{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}};Uo.create=(e,t)=>new Uo({getter:e,typeName:je.ZodLazy,...ze(t)});let qo=class extends We{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return xe(n,{received:n.data,code:se.invalid_literal,expected:this._def.value}),Fe}return{status:"valid",value:t.data}}get value(){return this._def.value}};qo.create=(e,t)=>new qo({value:e,typeName:je.ZodLiteral,...ze(t)});function rb(e,t){return new Wo({values:e,typeName:je.ZodEnum,...ze(t)})}let Wo=class yy extends We{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{expected:ot.joinValues(r),received:n.parsedType,code:se.invalid_type}),Fe}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return xe(n,{received:n.data,code:se.invalid_enum_value,options:r}),Fe}return ln(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return yy.create(t)}exclude(t){return yy.create(this.options.filter(n=>!t.includes(n)))}};Wo.create=rb;let Ho=class extends We{_parse(t){const n=ot.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==ye.string&&r.parsedType!==ye.number){const i=ot.objectValues(n);return xe(r,{expected:ot.joinValues(i),received:r.parsedType,code:se.invalid_type}),Fe}if(n.indexOf(t.data)===-1){const i=ot.objectValues(n);return xe(r,{received:r.data,code:se.invalid_enum_value,options:i}),Fe}return ln(t.data)}get enum(){return this._def.values}};Ho.create=(e,t)=>new Ho({values:e,typeName:je.ZodNativeEnum,...ze(t)});let ga=class extends We{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==ye.promise&&n.common.async===!1)return xe(n,{code:se.invalid_type,expected:ye.promise,received:n.parsedType}),Fe;const r=n.parsedType===ye.promise?n.data:Promise.resolve(n.data);return ln(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}};ga.create=(e,t)=>new ga({type:e,typeName:je.ZodPromise,...ze(t)});let Zn=class extends We{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===je.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{xe(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(o).then(s=>this._def.schema._parseAsync({data:s,path:r.path,parent:r})):this._def.schema._parseSync({data:o,path:r.path,parent:r})}if(i.type==="refinement"){const o=s=>{const l=i.refinement(s,a);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Fe:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Fe:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Po(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Po(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);ot.assertNever(i)}};Zn.create=(e,t,n)=>new Zn({schema:e,typeName:je.ZodEffects,effect:t,...ze(n)}),Zn.createWithPreprocess=(e,t,n)=>new Zn({schema:t,effect:{type:"preprocess",transform:e},typeName:je.ZodEffects,...ze(n)});let Fr=class extends We{_parse(t){return this._getType(t)===ye.undefined?ln(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Fr.create=(e,t)=>new Fr({innerType:e,typeName:je.ZodOptional,...ze(t)});let Fi=class extends We{_parse(t){return this._getType(t)===ye.null?ln(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}};Fi.create=(e,t)=>new Fi({innerType:e,typeName:je.ZodNullable,...ze(t)});let Vo=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===ye.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}};Vo.create=(e,t)=>new Vo({innerType:e,typeName:je.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ze(t)});let Ml=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Rl(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Vn(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Vn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}};Ml.create=(e,t)=>new Ml({innerType:e,typeName:je.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ze(t)});let Ll=class extends We{_parse(t){if(this._getType(t)!==ye.nan){const r=this._getOrReturnCtx(t);return xe(r,{code:se.invalid_type,expected:ye.nan,received:r.parsedType}),Fe}return{status:"valid",value:t.data}}};Ll.create=e=>new Ll({typeName:je.ZodNaN,...ze(e)});const hA=Symbol("zod_brand");let ib=class extends We{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}},nd=class XI extends We{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Fe:a.status==="dirty"?(n.dirty(),Xy(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Fe:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new XI({in:t,out:n,typeName:je.ZodPipeline})}},Fl=class extends We{_parse(t){const n=this._def.innerType._parse(t);return Po(n)&&(n.value=Object.freeze(n.value)),n}};Fl.create=(e,t)=>new Fl({innerType:e,typeName:je.ZodReadonly,...ze(t)});const ab=(e,t={},n)=>e?ma.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:l})}}):ma.create(),mA={object:An.lazycreate};var je;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(je||(je={}));const vA=(e,t={message:`Input not instance of ${e.name}`})=>ab(n=>n instanceof e,t),ob=ha.create,sb=jo.create,gA=Ll.create,yA=No.create,lb=Do.create,bA=Mo.create,xA=Al.create,wA=Lo.create,SA=Fo.create,EA=ma.create,_A=Mi.create,kA=Lr.create,$A=Pl.create,OA=Li.create,TA=An.create,CA=An.strictCreate,IA=Bo.create,RA=eb.create,AA=zo.create,PA=ai.create,jA=tb.create,NA=Nl.create,DA=Dl.create,MA=nb.create,LA=Uo.create,FA=qo.create,BA=Wo.create,zA=Ho.create,UA=ga.create,cb=Zn.create,qA=Fr.create,WA=Fi.create,HA=Zn.createWithPreprocess,VA=nd.create;var Se=Object.freeze({__proto__:null,defaultErrorMap:Ao,setErrorMap:tA,getErrorMap:Cl,makeIssue:Il,EMPTY_PATH:nA,addIssueToContext:xe,ParseStatus:hn,INVALID:Fe,DIRTY:Xy,OK:ln,isAborted:Xf,isDirty:Qf,isValid:Po,isAsync:Rl,get util(){return ot},get objectUtil(){return Jf},ZodParsedType:ye,getParsedType:ii,ZodType:We,ZodString:ha,ZodNumber:jo,ZodBigInt:No,ZodBoolean:Do,ZodDate:Mo,ZodSymbol:Al,ZodUndefined:Lo,ZodNull:Fo,ZodAny:ma,ZodUnknown:Mi,ZodNever:Lr,ZodVoid:Pl,ZodArray:Li,ZodObject:An,ZodUnion:Bo,ZodDiscriminatedUnion:eb,ZodIntersection:zo,ZodTuple:ai,ZodRecord:tb,ZodMap:Nl,ZodSet:Dl,ZodFunction:nb,ZodLazy:Uo,ZodLiteral:qo,ZodEnum:Wo,ZodNativeEnum:Ho,ZodPromise:ga,ZodEffects:Zn,ZodTransformer:Zn,ZodOptional:Fr,ZodNullable:Fi,ZodDefault:Vo,ZodCatch:Ml,ZodNaN:Ll,BRAND:hA,ZodBranded:ib,ZodPipeline:nd,ZodReadonly:Fl,custom:ab,Schema:We,ZodSchema:We,late:mA,get ZodFirstPartyTypeKind(){return je},coerce:{string:e=>ha.create({...e,coerce:!0}),number:e=>jo.create({...e,coerce:!0}),boolean:e=>Do.create({...e,coerce:!0}),bigint:e=>No.create({...e,coerce:!0}),date:e=>Mo.create({...e,coerce:!0})},any:EA,array:OA,bigint:yA,boolean:lb,date:bA,discriminatedUnion:RA,effect:cb,enum:BA,function:MA,instanceof:vA,intersection:AA,lazy:LA,literal:FA,map:NA,nan:gA,nativeEnum:zA,never:kA,null:SA,nullable:WA,number:sb,object:TA,oboolean:()=>lb().optional(),onumber:()=>sb().optional(),optional:qA,ostring:()=>ob().optional(),pipeline:VA,preprocess:HA,promise:UA,record:jA,set:DA,strictObject:CA,string:ob,symbol:xA,transformer:cb,tuple:PA,undefined:wA,union:IA,unknown:_A,void:$A,NEVER:Fe,ZodIssueCode:se,quotelessJson:eA,ZodError:Vn});const ya=Se.object({title:Se.string().optional(),link:Se.string().optional()}),rd=Se.object({color:Se.string().optional(),variant:Se.enum(["soft","solid"]).optional(),themeMode:Se.enum(["light","dark"]).optional(),fontFamily:Se.enum(["rubik","inter","ibm","fira"]).optional(),radius:Se.number().min(.5).max(4).optional()}),ub=Se.object({composerPlaceholder:Se.string().optional(),botName:Se.string().optional(),botAvatar:Se.string().optional(),botDescription:Se.string().optional(),website:ya.optional(),email:ya.optional(),phone:ya.optional(),privacyPolicy:ya.optional(),termsOfService:ya.optional(),showPoweredBy:Se.boolean().optional()}).merge(rd),fb=Se.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),db=Se.object({}).passthrough().transform(e=>e),fe=Se.object({className:Se.string().optional(),style:db.optional()}),Bl=Se.object({container:fe.optional(),image:fe.optional(),fallback:fe.optional()}),pb=Se.object({button:fe.optional(),text:Se.record(fb,fe.optional()),image:Se.object({image:fe.optional(),placeholder:fe.optional()}).optional(),audio:fe.optional(),video:fe.optional(),file:Se.object({container:fe.optional(),title:fe.optional(),icon:fe.optional()}).optional(),location:Se.object({container:fe.optional(),title:fe.optional(),icon:fe.optional()}).optional(),column:fe.optional(),row:fe.optional(),bubble:fe.optional(),carousel:Se.object({container:fe.optional(),slidesContainer:fe.optional(),backButton:fe.optional(),nextButton:fe.optional()}).optional(),dropdown:Se.object({button:Se.object({container:fe.optional(),icon:fe.optional(),text:fe.optional()}).optional(),content:Se.object({container:fe.optional(),item:fe.optional()}).optional()}).optional()}),hb=Se.object({container:fe.optional(),modal:Se.object({overlay:fe.optional(),container:fe.optional(),dialog:Se.object({container:fe.optional(),title:Se.object({container:fe.optional(),text:fe.optional(),closeIcon:fe.optional()}).optional(),content:fe.optional(),newConversation:Se.object({text:fe.optional(),button:fe.optional()}).optional()}).optional()}).optional(),notification:Se.object({container:fe.optional(),title:fe.optional(),description:fe.optional(),icon:fe.optional(),closeIcon:fe.optional()}).optional(),header:Se.object({container:fe.optional(),content:Se.object({container:fe.optional(),title:fe.optional(),description:fe.optional(),avatar:Bl.optional(),actions:Se.object({container:fe.optional(),icons:fe.optional()}).optional()}),expandedContent:Se.object({container:fe.optional(),group:fe.optional(),descriptionItems:Se.object({container:fe.optional(),icon:fe.optional(),text:fe.optional(),link:fe.optional(),poweredBy:fe.optional()}).optional()}).optional(),description:Se.object({container:fe.optional(),title:fe.optional(),subtitle:fe.optional()}).optional(),newConversationIcon:fe.optional()}).optional(),composer:Se.object({container:fe.optional(),input:fe.optional(),uploadButton:Se.object({container:fe.optional(),icon:fe.optional()}).optional(),button:Se.object({container:fe.optional(),icon:fe.optional()}).optional()}).optional(),fab:Se.object({icon:fe.optional(),container:fe.optional()}).optional(),messageList:Se.object({scrollbar:Se.object({container:fe.optional(),viewport:fe.optional(),thumb:fe.optional(),corner:fe.optional(),background:fe.optional()}).optional(),container:fe.optional(),marquee:Se.object({content:fe.optional(),title:fe.optional(),description:fe.optional(),avatar:Bl.optional(),container:fe.optional()}).optional(),scrollDownButton:Se.object({container:fe.optional(),button:fe.optional(),icon:fe.optional()}).optional()}).optional(),message:Se.object({container:fe.optional(),avatar:Bl.optional(),blocks:pb.optional()}).optional(),loadingIndicator:Se.object({container:fe.optional(),loader:fe.optional()}).optional()}),mb=Se.enum(["opened","closed","initial"]),vb=Se.object({name:Se.string().optional(),pictureUrl:Se.string().optional(),data:Se.record(Se.unknown()).optional()}),gb=Se.object({configuration:ub.optional().catch(void 0),theme:hb.optional().catch(void 0),style:Se.string().optional().catch(void 0),user:vb.optional().catch(void 0)}),ZA=gb.extend({clientId:Se.string(),botId:Se.string(),selector:Se.string().optional().catch(void 0),webchatScriptUrl:Se.string().optional().catch(void 0),fabScriptUrl:Se.string().optional().catch(void 0),pushpinUrl:Se.string().optional().catch(void 0),defaultState:mb.optional().catch(void 0)});function yb(e){const{fontFamily:t,radius:n,themeMode:r,variant:i,color:a}=rd.parse(e);let o={},s={};if(a){const u=Yy(a),f=r==="dark"?Dy(u):u,d=Yy(_R(kR(Yf(a)))),p=r==="dark"?Dy(d):d,h=r==="dark"?"#101010":"#fdfdfd";s=Object.entries({...f,1:h}).reduce((y,[v,g])=>({...y,[`--bpPrimary-${v}`]:g}),{});const m=Object.entries({...p,1:h}).reduce((y,[v,g])=>({...y,[`--bpGray-${v}`]:g}),{});o={...s,...m}}n&&(o={...o,"--bpRadius-scale":n.toString()});const l=s?Uy(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",c=i==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":l,"--header-description":l,"--header-description-icon":l,"--header-description-link":l,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":l,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":l}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?Uy(s["--bpPrimary-500"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)","--fab-bg":"var(--bpPrimary-100)","--fab-bg-hover":"var(--bpPrimary-200)","--fab-icon":"var(--bpPrimary-700)"};return o={...o,...c},Wy(":root",o)+(t?Wy(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const id=D.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...a},o)=>{const s=Hy(e??"",15);return C.jsxs(Zf,{ref:o,"data-color":s,...n,...a,children:[C.jsx(Kf,{src:t,...r}),C.jsx(Gf,{...i,children:typeof a.children=="string"?a.children[0]:a.children})]})});function vpe(){}function gpe(){}function KA(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const GA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,JA={};function bb(e,t){return(JA.jsx?YA:GA).test(e)}const XA=/[ \t\n\f\r]/g;function QA(e){return typeof e=="object"?e.type==="text"?xb(e.value):!1:xb(e)}function xb(e){return e.replace(XA,"")===""}class Zo{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Zo.prototype.property={},Zo.prototype.normal={},Zo.prototype.space=null;function wb(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new Zo(n,r,t)}function ad(e){return e.toLowerCase()}class Pn{constructor(t,n){this.property=t,this.attribute=n}}Pn.prototype.space=null,Pn.prototype.boolean=!1,Pn.prototype.booleanish=!1,Pn.prototype.overloadedBoolean=!1,Pn.prototype.number=!1,Pn.prototype.commaSeparated=!1,Pn.prototype.spaceSeparated=!1,Pn.prototype.commaOrSpaceSeparated=!1,Pn.prototype.mustUseProperty=!1,Pn.prototype.defined=!1;let eP=0;const Ue=Bi(),Rt=Bi(),Sb=Bi(),ie=Bi(),xt=Bi(),ba=Bi(),En=Bi();function Bi(){return 2**++eP}const od=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:Rt,commaOrSpaceSeparated:En,commaSeparated:ba,number:ie,overloadedBoolean:Sb,spaceSeparated:xt},Symbol.toStringTag,{value:"Module"})),sd=Object.keys(od);class ld extends Pn{constructor(t,n,r,i){let a=-1;if(super(t,n),Eb(this,"space",i),typeof r=="number")for(;++a<sd.length;){const o=sd[a];Eb(this,sd[a],(r&od[o])===od[o])}}}ld.prototype.defined=!0;function Eb(e,t,n){n&&(e[t]=n)}const tP={}.hasOwnProperty;function xa(e){const t={},n={};let r;for(r in e.properties)if(tP.call(e.properties,r)){const i=e.properties[r],a=new ld(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ad(r)]=r,n[ad(a.attribute)]=r}return new Zo(t,n,e.space)}const _b=xa({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),kb=xa({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function $b(e,t){return t in e?e[t]:t}function Ob(e,t){return $b(e,t.toLowerCase())}const Tb=xa({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Ob,properties:{xmlns:null,xmlnsXLink:null}}),Cb=xa({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Rt,ariaAutoComplete:null,ariaBusy:Rt,ariaChecked:Rt,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:xt,ariaCurrent:null,ariaDescribedBy:xt,ariaDetails:null,ariaDisabled:Rt,ariaDropEffect:xt,ariaErrorMessage:null,ariaExpanded:Rt,ariaFlowTo:xt,ariaGrabbed:Rt,ariaHasPopup:null,ariaHidden:Rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:xt,ariaLevel:ie,ariaLive:null,ariaModal:Rt,ariaMultiLine:Rt,ariaMultiSelectable:Rt,ariaOrientation:null,ariaOwns:xt,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:Rt,ariaReadOnly:Rt,ariaRelevant:null,ariaRequired:Rt,ariaRoleDescription:xt,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:Rt,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null}}),nP=xa({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Ob,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ba,acceptCharset:xt,accessKey:xt,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:xt,autoFocus:Ue,autoPlay:Ue,blocking:xt,capture:null,charSet:null,checked:Ue,cite:null,className:xt,cols:ie,colSpan:null,content:null,contentEditable:Rt,controls:Ue,controlsList:xt,coords:ie|ba,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:Sb,draggable:Rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:xt,height:ie,hidden:Ue,high:ie,href:null,hrefLang:null,htmlFor:xt,httpEquiv:xt,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:xt,itemRef:xt,itemScope:Ue,itemType:xt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ue,optimum:ie,pattern:null,ping:xt,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:xt,required:Ue,reversed:Ue,rows:ie,rowSpan:ie,sandbox:xt,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:Rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Rt,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:xt,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:Rt,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:ie,security:null,unselectable:null}}),rP=xa({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:$b,properties:{about:En,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:xt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ba,g2:ba,glyphName:ba,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:En,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:xt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:En,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:En,rev:En,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:En,requiredFeatures:En,requiredFonts:En,requiredFormats:En,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:En,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:En,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:En,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),iP=/^data[-\w.:]+$/i,Ib=/-[a-z]/g,aP=/[A-Z]/g;function oP(e,t){const n=ad(t);let r=t,i=Pn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&iP.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Ib,lP);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Ib.test(a)){let o=a.replace(aP,sP);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}i=ld}return new i(r,t)}function sP(e){return"-"+e.toLowerCase()}function lP(e){return e.charAt(1).toUpperCase()}const cP={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},uP=wb([kb,_b,Tb,Cb,nP],"html"),cd=wb([kb,_b,Tb,Cb,rP],"svg");function fP(e){return e.join(" ").trim()}var Rb={},Ab=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,dP=/\n/g,pP=/^\s*/,hP=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,mP=/^:\s*/,vP=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,gP=/^[;\s]*/,yP=/^\s+|\s+$/g,bP=`
|
|
31
|
+
`,Pb="/",jb="*",zi="",xP="comment",wP="declaration",SP=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(h){var m=h.match(dP);m&&(n+=m.length);var y=h.lastIndexOf(bP);r=~y?h.length-y:r+h.length}function a(){var h={line:n,column:r};return function(m){return m.position=new o(h),c(),m}}function o(h){this.start=h,this.end={line:n,column:r},this.source=t.source}o.prototype.content=e;function s(h){var m=new Error(t.source+":"+n+":"+r+": "+h);if(m.reason=h,m.filename=t.source,m.line=n,m.column=r,m.source=e,!t.silent)throw m}function l(h){var m=h.exec(e);if(m){var y=m[0];return i(y),e=e.slice(y.length),m}}function c(){l(pP)}function u(h){var m;for(h=h||[];m=f();)m!==!1&&h.push(m);return h}function f(){var h=a();if(!(Pb!=e.charAt(0)||jb!=e.charAt(1))){for(var m=2;zi!=e.charAt(m)&&(jb!=e.charAt(m)||Pb!=e.charAt(m+1));)++m;if(m+=2,zi===e.charAt(m-1))return s("End of comment missing");var y=e.slice(2,m-2);return r+=2,i(y),e=e.slice(m),r+=2,h({type:xP,comment:y})}}function d(){var h=a(),m=l(hP);if(m){if(f(),!l(mP))return s("property missing ':'");var y=l(vP),v=h({type:wP,property:Nb(m[0].replace(Ab,zi)),value:y?Nb(y[0].replace(Ab,zi)):zi});return l(gP),v}}function p(){var h=[];u(h);for(var m;m=d();)m!==!1&&(h.push(m),u(h));return h}return c(),p()};function Nb(e){return e?e.replace(yP,zi):zi}var EP=ut&&ut.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rb,"__esModule",{value:!0});var Db=Rb.default=kP,_P=EP(SP);function kP(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,_P.default)(e),i=typeof t=="function";return r.forEach(function(a){if(a.type==="declaration"){var o=a.property,s=a.value;i?t(o,s,a):s&&(n=n||{},n[o]=s)}}),n}const $P=Db.default||Db,Mb=Lb("end"),ud=Lb("start");function Lb(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function OP(e){const t=ud(e),n=Mb(e);if(t&&n)return{start:t,end:n}}function Ko(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Fb(e.position):"start"in e||"end"in e?Fb(e):"line"in e||"column"in e?fd(e):""}function fd(e){return Bb(e&&e.line)+":"+Bb(e&&e.column)}function Fb(e){return fd(e&&e.start)+"-"+fd(e&&e.end)}function Bb(e){return e&&typeof e=="number"?e:1}class en extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",a={},o=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?i=t:!a.cause&&t&&(o=!0,i=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?a.ruleId=r:(a.source=r.slice(0,l),a.ruleId=r.slice(l+1))}if(!a.place&&a.ancestors&&a.ancestors){const l=a.ancestors[a.ancestors.length-1];l&&(a.place=l.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Ko(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=o&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}en.prototype.file="",en.prototype.name="",en.prototype.reason="",en.prototype.message="",en.prototype.stack="",en.prototype.column=void 0,en.prototype.line=void 0,en.prototype.ancestors=void 0,en.prototype.cause=void 0,en.prototype.fatal=void 0,en.prototype.place=void 0,en.prototype.ruleId=void 0,en.prototype.source=void 0;const dd={}.hasOwnProperty,TP=new Map,CP=/[A-Z]/g,IP=/-([a-z])/g,RP=new Set(["table","tbody","thead","tfoot","tr"]),AP=new Set(["td","th"]),zb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function PP(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=zP(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=BP(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?cd:uP,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Ub(i,e,void 0);return a&&typeof a!="string"?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Ub(e,t,n){if(t.type==="element")return jP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return NP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return MP(e,t,n);if(t.type==="mdxjsEsm")return DP(e,t);if(t.type==="root")return LP(e,t,n);if(t.type==="text")return FP(e,t)}function jP(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=cd,e.schema=i),e.ancestors.push(t);const a=Wb(e,t.tagName,!1),o=UP(e,t);let s=hd(e,t);return RP.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!QA(l):!0})),qb(e,o,a,t),pd(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function NP(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Go(e,t.position)}function DP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Go(e,t.position)}function MP(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=cd,e.schema=i),e.ancestors.push(t);const a=t.name===null?e.Fragment:Wb(e,t.name,!0),o=qP(e,t),s=hd(e,t);return qb(e,o,a,t),pd(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function LP(e,t,n){const r={};return pd(r,hd(e,t)),e.create(t,e.Fragment,r,n)}function FP(e,t){return t.value}function qb(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function pd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function BP(e,t,n){return r;function r(i,a,o,s){const c=Array.isArray(o.children)?n:t;return s?c(a,o,s):c(a,o)}}function zP(e,t){return n;function n(r,i,a,o){const s=Array.isArray(a.children),l=ud(r);return t(i,a,o,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function UP(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&dd.call(t.properties,i)){const a=WP(e,i,t.properties[i]);if(a){const[o,s]=a;e.tableCellAlignToStyle&&o==="align"&&typeof s=="string"&&AP.has(t.tagName)?r=s:n[o]=s}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function qP(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const o=a.expression;o.type;const s=o.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Go(e,t.position);else{const i=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else Go(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function hd(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:TP;for(;++r<t.children.length;){const a=t.children[r];let o;if(e.passKeys){const l=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(l){const c=i.get(l)||0;o=l+"-"+c,i.set(l,c+1)}}const s=Ub(e,a,o);s!==void 0&&n.push(s)}return n}function WP(e,t,n){const r=oP(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?KA(n):fP(n)),r.property==="style"){let i=typeof n=="object"?n:HP(e,String(n));return e.stylePropertyNameCase==="css"&&(i=VP(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?cP[r.property]||r.property:r.attribute,n]}}function HP(e,t){const n={};try{$P(t,r)}catch(i){if(!e.ignoreInvalidStyle){const a=i,o=new en("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=zb+"#cannot-parse-style-attribute",o}}return n;function r(i,a){let o=i;o.slice(0,2)!=="--"&&(o.slice(0,4)==="-ms-"&&(o="ms-"+o.slice(4)),o=o.replace(IP,KP)),n[o]=a}}function Wb(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let a=-1,o;for(;++a<i.length;){const s=bb(i[a])?{type:"Identifier",name:i[a]}:{type:"Literal",value:i[a]};o=o?{type:"MemberExpression",object:o,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}r=o}else r=bb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return dd.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Go(e)}function Go(e,t){const n=new en("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=zb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function VP(e){const t={};let n;for(n in e)dd.call(e,n)&&(t[ZP(n)]=e[n]);return t}function ZP(e){let t=e.replace(CP,GP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function KP(e,t){return t.toUpperCase()}function GP(e){return"-"+e.toLowerCase()}const md={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},YP={};function vd(e,t){const n=YP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Hb(e,r,i)}function Hb(e,t,n){if(JP(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Vb(e.children,t,n)}return Array.isArray(e)?Vb(e,t,n):""}function Vb(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=Hb(e[i],t,n);return r.join("")}function JP(e){return!!(e&&typeof e=="object")}const Zb=document.createElement("i");function gd(e){const t="&"+e+";";Zb.innerHTML=t;const n=Zb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function jn(e,t,n,r){const i=e.length;let a=0,o;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function Nn(e,t){return e.length>0?(jn(e,e.length,0,t),e):t}const Kb={}.hasOwnProperty;function Gb(e){const t={};let n=-1;for(;++n<e.length;)XP(t,e[n]);return t}function XP(e,t){let n;for(n in t){const i=(Kb.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let o;if(a)for(o in a){Kb.call(i,o)||(i[o]=[]);const s=a[o];QP(i[o],Array.isArray(s)?s:s?[s]:[])}}}function QP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);jn(e,0,0,r)}function Yb(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Kn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const cn=oi(/[A-Za-z]/),tn=oi(/[\dA-Za-z]/),ej=oi(/[#-'*+\--9=?A-Z^-~]/);function zl(e){return e!==null&&(e<32||e===127)}const yd=oi(/\d/),tj=oi(/[\dA-Fa-f]/),nj=oi(/[!-/:-@[-`{-~]/);function Ie(e){return e!==null&&e<-2}function gt(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const Ul=oi(new RegExp("\\p{P}|\\p{S}","u")),Ui=oi(/\s/);function oi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function wa(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const a=e.charCodeAt(n);let o="";if(a===37&&tn(e.charCodeAt(n+1))&&tn(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(o=String.fromCharCode(a,s),i=1):o="�"}else o=String.fromCharCode(a);o&&(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,o=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Qe(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let a=0;return o;function o(l){return Ke(l)?(e.enter(n),s(l)):t(l)}function s(l){return Ke(l)&&a++<i?(e.consume(l),s):(e.exit(n),t(l))}}const rj={tokenize:ij};function ij(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Qe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),a(s)}function a(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,o(s)}function o(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Ie(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),o)}}const aj={tokenize:oj},Jb={tokenize:sj};function oj(e){const t=this,n=[];let r=0,i,a,o;return s;function s(b){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,l,c)(b)}return c(b)}function l(b){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&g();const k=t.events.length;let S=k,_;for(;S--;)if(t.events[S][0]==="exit"&&t.events[S][1].type==="chunkFlow"){_=t.events[S][1].end;break}v(r);let $=k;for(;$<t.events.length;)t.events[$][1].end=Object.assign({},_),$++;return jn(t.events,S+1,0,t.events.slice(k)),t.events.length=$,c(b)}return s(b)}function c(b){if(r===n.length){if(!i)return d(b);if(i.currentConstruct&&i.currentConstruct.concrete)return h(b);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Jb,u,f)(b)}function u(b){return i&&g(),v(r),d(b)}function f(b){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,h(b)}function d(b){return t.containerState={},e.attempt(Jb,p,h)(b)}function p(b){return r++,n.push([t.currentConstruct,t.containerState]),d(b)}function h(b){if(b===null){i&&g(),v(0),e.consume(b);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:a,_tokenizer:i}),m(b)}function m(b){if(b===null){y(e.exit("chunkFlow"),!0),v(0),e.consume(b);return}return Ie(b)?(e.consume(b),y(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(b),m)}function y(b,k){const S=t.sliceStream(b);if(k&&S.push(null),b.previous=a,a&&(a.next=b),a=b,i.defineSkip(b.start),i.write(S),t.parser.lazy[b.start.line]){let _=i.events.length;for(;_--;)if(i.events[_][1].start.offset<o&&(!i.events[_][1].end||i.events[_][1].end.offset>o))return;const $=t.events.length;let j=$,z,O;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(z){O=t.events[j][1].end;break}z=!0}for(v(r),_=$;_<t.events.length;)t.events[_][1].end=Object.assign({},O),_++;jn(t.events,j+1,0,t.events.slice($)),t.events.length=_}}function v(b){let k=n.length;for(;k-- >b;){const S=n[k];t.containerState=S[1],S[0].exit.call(t,e)}n.length=b}function g(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function sj(e,t,n){return Qe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ql(e){if(e===null||gt(e)||Ui(e))return 1;if(Ul(e))return 2}function Wl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const bd={name:"attention",tokenize:cj,resolveAll:lj};function lj(e,t){let n=-1,r,i,a,o,s,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),d=Object.assign({},e[n][1].start);Xb(f,-l),Xb(d,l),o={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:d},a={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},o.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},o.start),e[n][1].start=Object.assign({},s.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Nn(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Nn(c,[["enter",i,t],["enter",o,t],["exit",o,t],["enter",a,t]]),c=Nn(c,Wl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Nn(c,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Nn(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,jn(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function cj(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ql(r);let a;return o;function o(l){return a=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===a)return e.consume(l),s;const c=e.exit("attentionSequence"),u=ql(l),f=!u||u===2&&i||n.includes(l),d=!i||i===2&&u||n.includes(r);return c._open=!!(a===42?f:f&&(i||!d)),c._close=!!(a===42?d:d&&(u||!f)),t(l)}}function Xb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const uj={name:"autolink",tokenize:fj};function fj(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return cn(p)?(e.consume(p),o):p===64?n(p):c(p)}function o(p){return p===43||p===45||p===46||tn(p)?(r=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||tn(p))&&r++<32?(e.consume(p),s):(r=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||zl(p)?n(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):ej(p)?(e.consume(p),c):n(p)}function u(p){return tn(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):d(p)}function d(p){if((p===45||tn(p))&&r++<63){const h=p===45?d:f;return e.consume(p),h}return n(p)}}const Yo={tokenize:dj,partial:!0};function dj(e,t,n){return r;function r(a){return Ke(a)?Qe(e,i,"linePrefix")(a):i(a)}function i(a){return a===null||Ie(a)?t(a):n(a)}}const Qb={name:"blockQuote",tokenize:pj,continuation:{tokenize:hj},exit:mj};function pj(e,t,n){const r=this;return i;function i(o){if(o===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),a}return n(o)}function a(o){return Ke(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function hj(e,t,n){const r=this;return i;function i(o){return Ke(o)?Qe(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):a(o)}function a(o){return e.attempt(Qb,t,n)(o)}}function mj(e){e.exit("blockQuote")}const ex={name:"characterEscape",tokenize:vj};function vj(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),i}function i(a){return nj(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const tx={name:"characterReference",tokenize:gj};function gj(e,t,n){const r=this;let i=0,a,o;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,o=tn,u(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,o=tj,u):(e.enter("characterReferenceValue"),a=7,o=yd,u(f))}function u(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return o===tn&&!gd(r.sliceSerialize(d))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(f)&&i++<a?(e.consume(f),u):n(f)}}const nx={tokenize:bj,partial:!0},rx={name:"codeFenced",tokenize:yj,concrete:!0};function yj(e,t,n){const r=this,i={tokenize:S,partial:!0};let a=0,o=0,s;return l;function l(_){return c(_)}function c(_){const $=r.events[r.events.length-1];return a=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,s=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(_)}function u(_){return _===s?(o++,e.consume(_),u):o<3?n(_):(e.exit("codeFencedFenceSequence"),Ke(_)?Qe(e,f,"whitespace")(_):f(_))}function f(_){return _===null||Ie(_)?(e.exit("codeFencedFence"),r.interrupt?t(_):e.check(nx,m,k)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(_))}function d(_){return _===null||Ie(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(_)):Ke(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Qe(e,p,"whitespace")(_)):_===96&&_===s?n(_):(e.consume(_),d)}function p(_){return _===null||Ie(_)?f(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(_))}function h(_){return _===null||Ie(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(_)):_===96&&_===s?n(_):(e.consume(_),h)}function m(_){return e.attempt(i,k,y)(_)}function y(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),v}function v(_){return a>0&&Ke(_)?Qe(e,g,"linePrefix",a+1)(_):g(_)}function g(_){return _===null||Ie(_)?e.check(nx,m,k)(_):(e.enter("codeFlowValue"),b(_))}function b(_){return _===null||Ie(_)?(e.exit("codeFlowValue"),g(_)):(e.consume(_),b)}function k(_){return e.exit("codeFenced"),t(_)}function S(_,$,j){let z=0;return O;function O(M){return _.enter("lineEnding"),_.consume(M),_.exit("lineEnding"),N}function N(M){return _.enter("codeFencedFence"),Ke(M)?Qe(_,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):W(M)}function W(M){return M===s?(_.enter("codeFencedFenceSequence"),L(M)):j(M)}function L(M){return M===s?(z++,_.consume(M),L):z>=o?(_.exit("codeFencedFenceSequence"),Ke(M)?Qe(_,U,"whitespace")(M):U(M)):j(M)}function U(M){return M===null||Ie(M)?(_.exit("codeFencedFence"),$(M)):j(M)}}}function bj(e,t,n){const r=this;return i;function i(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}const xd={name:"codeIndented",tokenize:wj},xj={tokenize:Sj,partial:!0};function wj(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Qe(e,a,"linePrefix",5)(c)}function a(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?o(c):n(c)}function o(c){return c===null?l(c):Ie(c)?e.attempt(xj,o,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||Ie(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function Sj(e,t,n){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):Qe(e,a,"linePrefix",5)(o)}function a(o){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):Ie(o)?i(o):n(o)}}const Ej={name:"codeText",tokenize:$j,resolve:_j,previous:kj};function _j(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function kj(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function $j(e,t,n){let r=0,i,a;return o;function o(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(a=e.enter("codeTextSequence"),i=0,u(f)):Ie(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||Ie(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}class Oj{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Jo(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Jo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Jo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Jo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Jo(this.left,n.reverse())}}}function Jo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function ix(e){const t={};let n=-1,r,i,a,o,s,l,c;const u=new Oj(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,a=0,a<l.length&&l[a][1].type==="lineEndingBlank"&&(a+=2),a<l.length&&l[a][1].type==="content"))for(;++a<l.length&&l[a][1].type!=="content";)l[a][1].type==="chunkText"&&(l[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Tj(u,n)),n=t[n],c=!0);else if(r[1]._container){for(a=n,i=void 0;a--&&(o=u.get(a),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank");)o[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=a);i&&(r[1].end=Object.assign({},u.get(i)[1].start),s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return jn(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function Tj(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const a=[],o=n._tokenizer||r.parser[n.contentType](n.start),s=o.events,l=[],c={};let u,f,d=-1,p=n,h=0,m=0;const y=[m];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),f&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(m=d+1,y.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):y.pop(),d=y.length;d--;){const v=s.slice(y[d],y[d+1]),g=a.pop();l.push([g,g+v.length-1]),e.splice(g,2,v)}for(l.reverse(),d=-1;++d<l.length;)c[h+l[d][0]]=h+l[d][1],h+=l[d][1]-l[d][0]-1;return c}const Cj={tokenize:Aj,resolve:Rj},Ij={tokenize:Pj,partial:!0};function Rj(e){return ix(e),e}function Aj(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?a(s):Ie(s)?e.check(Ij,o,a)(s):(e.consume(s),i)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function o(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Pj(e,t,n){const r=this;return i;function i(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Qe(e,a,"linePrefix")}function a(o){if(o===null||Ie(o))return n(o);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}function ax(e,t,n,r,i,a,o,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return f;function f(v){return v===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(v),e.exit(a),d):v===null||v===32||v===41||zl(v)?n(v):(e.enter(r),e.enter(o),e.enter(s),e.enter("chunkString",{contentType:"string"}),m(v))}function d(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(s),d(v)):v===null||v===60||Ie(v)?n(v):(e.consume(v),v===92?h:p)}function h(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function m(v){return!u&&(v===null||v===41||gt(v))?(e.exit("chunkString"),e.exit(s),e.exit(o),e.exit(r),t(v)):u<c&&v===40?(e.consume(v),u++,m):v===41?(e.consume(v),u--,m):v===null||v===32||v===40||zl(v)?n(v):(e.consume(v),v===92?y:m)}function y(v){return v===40||v===41||v===92?(e.consume(v),m):m(v)}}function ox(e,t,n,r,i,a){const o=this;let s=0,l;return c;function c(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(a),u}function u(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in o.parser.constructs?n(p):p===93?(e.exit(a),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):Ie(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||Ie(p)||s++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!Ke(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function sx(e,t,n,r,i,a){let o;return s;function s(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,l):n(d)}function l(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(a),c(d))}function c(d){return d===o?(e.exit(a),l(o)):d===null?n(d):Ie(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Qe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===o||d===null||Ie(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?f:u)}function f(d){return d===o||d===92?(e.consume(d),u):u(d)}}function Xo(e,t){let n;return r;function r(i){return Ie(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ke(i)?Qe(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const jj={name:"definition",tokenize:Dj},Nj={tokenize:Mj,partial:!0};function Dj(e,t,n){const r=this;let i;return a;function a(p){return e.enter("definition"),o(p)}function o(p){return ox.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=Kn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return gt(p)?Xo(e,c)(p):c(p)}function c(p){return ax(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(Nj,f,f)(p)}function f(p){return Ke(p)?Qe(e,d,"whitespace")(p):d(p)}function d(p){return p===null||Ie(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function Mj(e,t,n){return r;function r(s){return gt(s)?Xo(e,i)(s):n(s)}function i(s){return sx(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return Ke(s)?Qe(e,o,"whitespace")(s):o(s)}function o(s){return s===null||Ie(s)?t(s):n(s)}}const Lj={name:"hardBreakEscape",tokenize:Fj};function Fj(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),i}function i(a){return Ie(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Bj={name:"headingAtx",tokenize:Uj,resolve:zj};function zj(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},jn(e,r,n-r+1,[["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t]])),e}function Uj(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),a(u)}function a(u){return e.enter("atxHeadingSequence"),o(u)}function o(u){return u===35&&r++<6?(e.consume(u),o):u===null||gt(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||Ie(u)?(e.exit("atxHeading"),t(u)):Ke(u)?Qe(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||gt(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const qj=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],lx=["pre","script","style","textarea"],Wj={name:"htmlFlow",tokenize:Kj,resolveTo:Zj,concrete:!0},Hj={tokenize:Yj,partial:!0},Vj={tokenize:Gj,partial:!0};function Zj(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Kj(e,t,n){const r=this;let i,a,o,s,l;return c;function c(E){return u(E)}function u(E){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(E),f}function f(E){return E===33?(e.consume(E),d):E===47?(e.consume(E),a=!0,m):E===63?(e.consume(E),i=3,r.interrupt?t:x):cn(E)?(e.consume(E),o=String.fromCharCode(E),y):n(E)}function d(E){return E===45?(e.consume(E),i=2,p):E===91?(e.consume(E),i=5,s=0,h):cn(E)?(e.consume(E),i=4,r.interrupt?t:x):n(E)}function p(E){return E===45?(e.consume(E),r.interrupt?t:x):n(E)}function h(E){const Q="CDATA[";return E===Q.charCodeAt(s++)?(e.consume(E),s===Q.length?r.interrupt?t:W:h):n(E)}function m(E){return cn(E)?(e.consume(E),o=String.fromCharCode(E),y):n(E)}function y(E){if(E===null||E===47||E===62||gt(E)){const Q=E===47,oe=o.toLowerCase();return!Q&&!a&&lx.includes(oe)?(i=1,r.interrupt?t(E):W(E)):qj.includes(o.toLowerCase())?(i=6,Q?(e.consume(E),v):r.interrupt?t(E):W(E)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(E):a?g(E):b(E))}return E===45||tn(E)?(e.consume(E),o+=String.fromCharCode(E),y):n(E)}function v(E){return E===62?(e.consume(E),r.interrupt?t:W):n(E)}function g(E){return Ke(E)?(e.consume(E),g):O(E)}function b(E){return E===47?(e.consume(E),O):E===58||E===95||cn(E)?(e.consume(E),k):Ke(E)?(e.consume(E),b):O(E)}function k(E){return E===45||E===46||E===58||E===95||tn(E)?(e.consume(E),k):S(E)}function S(E){return E===61?(e.consume(E),_):Ke(E)?(e.consume(E),S):b(E)}function _(E){return E===null||E===60||E===61||E===62||E===96?n(E):E===34||E===39?(e.consume(E),l=E,$):Ke(E)?(e.consume(E),_):j(E)}function $(E){return E===l?(e.consume(E),l=null,z):E===null||Ie(E)?n(E):(e.consume(E),$)}function j(E){return E===null||E===34||E===39||E===47||E===60||E===61||E===62||E===96||gt(E)?S(E):(e.consume(E),j)}function z(E){return E===47||E===62||Ke(E)?b(E):n(E)}function O(E){return E===62?(e.consume(E),N):n(E)}function N(E){return E===null||Ie(E)?W(E):Ke(E)?(e.consume(E),N):n(E)}function W(E){return E===45&&i===2?(e.consume(E),I):E===60&&i===1?(e.consume(E),H):E===62&&i===4?(e.consume(E),q):E===63&&i===3?(e.consume(E),x):E===93&&i===5?(e.consume(E),A):Ie(E)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Hj,K,L)(E)):E===null||Ie(E)?(e.exit("htmlFlowData"),L(E)):(e.consume(E),W)}function L(E){return e.check(Vj,U,K)(E)}function U(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),M}function M(E){return E===null||Ie(E)?L(E):(e.enter("htmlFlowData"),W(E))}function I(E){return E===45?(e.consume(E),x):W(E)}function H(E){return E===47?(e.consume(E),o="",B):W(E)}function B(E){if(E===62){const Q=o.toLowerCase();return lx.includes(Q)?(e.consume(E),q):W(E)}return cn(E)&&o.length<8?(e.consume(E),o+=String.fromCharCode(E),B):W(E)}function A(E){return E===93?(e.consume(E),x):W(E)}function x(E){return E===62?(e.consume(E),q):E===45&&i===2?(e.consume(E),x):W(E)}function q(E){return E===null||Ie(E)?(e.exit("htmlFlowData"),K(E)):(e.consume(E),q)}function K(E){return e.exit("htmlFlow"),t(E)}}function Gj(e,t,n){const r=this;return i;function i(o){return Ie(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),a):n(o)}function a(o){return r.parser.lazy[r.now().line]?n(o):t(o)}}function Yj(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Yo,t,n)}}const Jj={name:"htmlText",tokenize:Xj};function Xj(e,t,n){const r=this;let i,a,o;return s;function s(x){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(x),l}function l(x){return x===33?(e.consume(x),c):x===47?(e.consume(x),S):x===63?(e.consume(x),b):cn(x)?(e.consume(x),j):n(x)}function c(x){return x===45?(e.consume(x),u):x===91?(e.consume(x),a=0,h):cn(x)?(e.consume(x),g):n(x)}function u(x){return x===45?(e.consume(x),p):n(x)}function f(x){return x===null?n(x):x===45?(e.consume(x),d):Ie(x)?(o=f,H(x)):(e.consume(x),f)}function d(x){return x===45?(e.consume(x),p):f(x)}function p(x){return x===62?I(x):x===45?d(x):f(x)}function h(x){const q="CDATA[";return x===q.charCodeAt(a++)?(e.consume(x),a===q.length?m:h):n(x)}function m(x){return x===null?n(x):x===93?(e.consume(x),y):Ie(x)?(o=m,H(x)):(e.consume(x),m)}function y(x){return x===93?(e.consume(x),v):m(x)}function v(x){return x===62?I(x):x===93?(e.consume(x),v):m(x)}function g(x){return x===null||x===62?I(x):Ie(x)?(o=g,H(x)):(e.consume(x),g)}function b(x){return x===null?n(x):x===63?(e.consume(x),k):Ie(x)?(o=b,H(x)):(e.consume(x),b)}function k(x){return x===62?I(x):b(x)}function S(x){return cn(x)?(e.consume(x),_):n(x)}function _(x){return x===45||tn(x)?(e.consume(x),_):$(x)}function $(x){return Ie(x)?(o=$,H(x)):Ke(x)?(e.consume(x),$):I(x)}function j(x){return x===45||tn(x)?(e.consume(x),j):x===47||x===62||gt(x)?z(x):n(x)}function z(x){return x===47?(e.consume(x),I):x===58||x===95||cn(x)?(e.consume(x),O):Ie(x)?(o=z,H(x)):Ke(x)?(e.consume(x),z):I(x)}function O(x){return x===45||x===46||x===58||x===95||tn(x)?(e.consume(x),O):N(x)}function N(x){return x===61?(e.consume(x),W):Ie(x)?(o=N,H(x)):Ke(x)?(e.consume(x),N):z(x)}function W(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(e.consume(x),i=x,L):Ie(x)?(o=W,H(x)):Ke(x)?(e.consume(x),W):(e.consume(x),U)}function L(x){return x===i?(e.consume(x),i=void 0,M):x===null?n(x):Ie(x)?(o=L,H(x)):(e.consume(x),L)}function U(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||gt(x)?z(x):(e.consume(x),U)}function M(x){return x===47||x===62||gt(x)?z(x):n(x)}function I(x){return x===62?(e.consume(x),e.exit("htmlTextData"),e.exit("htmlText"),t):n(x)}function H(x){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),B}function B(x){return Ke(x)?Qe(e,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):A(x)}function A(x){return e.enter("htmlTextData"),o(x)}}const wd={name:"labelEnd",tokenize:iN,resolveTo:rN,resolveAll:nN},Qj={tokenize:aN},eN={tokenize:oN},tN={tokenize:sN};function nN(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function rN(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(a=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=n);const l={type:e[a][1].type==="labelLink"?"link":"image",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[a][1].start),end:Object.assign({},e[o][1].end)},u={type:"labelText",start:Object.assign({},e[a+r+2][1].end),end:Object.assign({},e[o-2][1].start)};return s=[["enter",l,t],["enter",c,t]],s=Nn(s,e.slice(a+1,a+r+3)),s=Nn(s,[["enter",u,t]]),s=Nn(s,Wl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=Nn(s,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),s=Nn(s,e.slice(o+1)),s=Nn(s,[["exit",l,t]]),jn(e,a,e.length,s),e}function iN(e,t,n){const r=this;let i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(d){return a?a._inactive?f(d):(o=r.parser.defined.includes(Kn(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),l):n(d)}function l(d){return d===40?e.attempt(Qj,u,o?u:f)(d):d===91?e.attempt(eN,u,o?c:f)(d):o?u(d):f(d)}function c(d){return e.attempt(tN,u,f)(d)}function u(d){return t(d)}function f(d){return a._balanced=!0,n(d)}}function aN(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return gt(f)?Xo(e,a)(f):a(f)}function a(f){return f===41?u(f):ax(e,o,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function o(f){return gt(f)?Xo(e,l)(f):u(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?sx(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return gt(f)?Xo(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function oN(e,t,n){const r=this;return i;function i(s){return ox.call(r,e,a,o,"reference","referenceMarker","referenceString")(s)}function a(s){return r.parser.defined.includes(Kn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function o(s){return n(s)}}function sN(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),i}function i(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const lN={name:"labelStartImage",tokenize:cN,resolveAll:wd.resolveAll};function cN(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),o):n(s)}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const uN={name:"labelStartLink",tokenize:fN,resolveAll:wd.resolveAll};function fN(e,t,n){const r=this;return i;function i(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),a}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const Sd={name:"lineEnding",tokenize:dN};function dN(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Qe(e,t,"linePrefix")}}const Hl={name:"thematicBreak",tokenize:pN};function pN(e,t,n){let r=0,i;return a;function a(c){return e.enter("thematicBreak"),o(c)}function o(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||Ie(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),Ke(c)?Qe(e,s,"whitespace")(c):s(c))}}const mn={name:"list",tokenize:vN,continuation:{tokenize:gN},exit:bN},hN={tokenize:xN,partial:!0},mN={tokenize:yN,partial:!0};function vN(e,t,n){const r=this,i=r.events[r.events.length-1];let a=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(p){const h=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:yd(p)){if(r.containerState.type||(r.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Hl,n,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return yd(p)&&++o<10?(e.consume(p),l):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Yo,r.interrupt?n:u,e.attempt(hN,d,f))}function u(p){return r.containerState.initialBlankLine=!0,a++,d(p)}function f(p){return Ke(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):n(p)}function d(p){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function gN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Yo,i,a);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qe(e,t,"listItemIndent",r.containerState.size+1)(s)}function a(s){return r.containerState.furtherBlankLines||!Ke(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(mN,t,o)(s))}function o(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qe(e,e.attempt(mn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function yN(e,t,n){const r=this;return Qe(e,i,"listItemIndent",r.containerState.size+1);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(a):n(a)}}function bN(e){e.exit(this.containerState.type)}function xN(e,t,n){const r=this;return Qe(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(a){const o=r.events[r.events.length-1];return!Ke(a)&&o&&o[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const cx={name:"setextUnderline",tokenize:SN,resolveTo:wN};function wN(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const o={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",a?(e.splice(i,0,["enter",o,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[a][1].end)):e[r][1]=o,e.push(["exit",o,t]),e}function SN(e,t,n){const r=this;let i;return a;function a(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,o(c)):n(c)}function o(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),Ke(c)?Qe(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Ie(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const EN={tokenize:_N};function _N(e){const t=this,n=e.attempt(Yo,r,e.attempt(this.parser.constructs.flowInitial,i,Qe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Cj,i)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const kN={resolveAll:fx()},$N=ux("string"),ON=ux("text");function ux(e){return{tokenize:t,resolveAll:fx(e==="text"?TN:void 0)};function t(n){const r=this,i=this.parser.constructs[e],a=n.attempt(i,o,s);return o;function o(u){return c(u)?a(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),a(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const f=i[u];let d=-1;if(f)for(;++d<f.length;){const p=f[d];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function fx(e){return t;function t(n,r){let i=-1,a;for(;++i<=n.length;)a===void 0?n[i]&&n[i][1].type==="data"&&(a=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==a+2&&(n[a][1].end=n[i-1][1].end,n.splice(a+2,i-a-2),i=a+2),a=void 0);return e?e(n,r):n}}function TN(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let a=i.length,o=-1,s=0,l;for(;a--;){const c=i[a];if(typeof c=="string"){for(o=c.length;c.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(c===-2)l=!0,s++;else if(c!==-1){a++;break}}if(s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+a,_bufferIndex:a?o:r.start._bufferIndex+o},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function CN(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},a=[];let o=[],s=[];const l={consume:g,enter:b,exit:k,attempt:$(S),check:$(_),interrupt:$(_,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:p,sliceSerialize:d,now:h,defineSkip:m,write:f};let u=t.tokenize.call(c,l);return t.resolveAll&&a.push(t),c;function f(N){return o=Nn(o,N),y(),o[o.length-1]!==null?[]:(j(t,0),c.events=Wl(a,c.events,c),c.events)}function d(N,W){return RN(p(N),W)}function p(N){return IN(o,N)}function h(){const{line:N,column:W,offset:L,_index:U,_bufferIndex:M}=r;return{line:N,column:W,offset:L,_index:U,_bufferIndex:M}}function m(N){i[N.line]=N.column,O()}function y(){let N;for(;r._index<o.length;){const W=o[r._index];if(typeof W=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<W.length;)v(W.charCodeAt(r._bufferIndex));else v(W)}}function v(N){u=u(N)}function g(N){Ie(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,O()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=N}function b(N,W){const L=W||{};return L.type=N,L.start=h(),c.events.push(["enter",L,c]),s.push(L),L}function k(N){const W=s.pop();return W.end=h(),c.events.push(["exit",W,c]),W}function S(N,W){j(N,W.from)}function _(N,W){W.restore()}function $(N,W){return L;function L(U,M,I){let H,B,A,x;return Array.isArray(U)?K(U):"tokenize"in U?K([U]):q(U);function q(ne){return le;function le(pe){const he=pe!==null&&ne[pe],ce=pe!==null&&ne.null,X=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return K(X)(pe)}}function K(ne){return H=ne,B=0,ne.length===0?I:E(ne[B])}function E(ne){return le;function le(pe){return x=z(),A=ne,ne.partial||(c.currentConstruct=ne),ne.name&&c.parser.constructs.disable.null.includes(ne.name)?oe():ne.tokenize.call(W?Object.assign(Object.create(c),W):c,l,Q,oe)(pe)}}function Q(ne){return N(A,x),M}function oe(ne){return x.restore(),++B<H.length?E(H[B]):I}}}function j(N,W){N.resolveAll&&!a.includes(N)&&a.push(N),N.resolve&&jn(c.events,W,c.events.length-W,N.resolve(c.events.slice(W),c)),N.resolveTo&&(c.events=N.resolveTo(c.events,c))}function z(){const N=h(),W=c.previous,L=c.currentConstruct,U=c.events.length,M=Array.from(s);return{restore:I,from:U};function I(){r=N,c.previous=W,c.currentConstruct=L,c.events.length=U,s=M,O()}}function O(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function IN(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex;let o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){const s=o[0];typeof s=="string"?o[0]=s.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function RN(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const a=e[n];let o;if(typeof a=="string")o=a;else switch(a){case-5:{o="\r";break}case-4:{o=`
|
|
32
32
|
`;break}case-3:{o=`\r
|
|
33
|
-
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}const RN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Pj},disable:{null:[]},document:{42:mn,43:mn,45:mn,48:mn,49:mn,50:mn,51:mn,52:mn,53:mn,54:mn,55:mn,56:mn,57:mn,62:Qb},flow:{35:Fj,42:Hl,45:[cx,Hl],60:qj,61:cx,95:Hl,96:rx,126:rx},flowInitial:{[-2]:wd,[-1]:wd,32:wd},insideSpan:{null:[xd,_N]},string:{38:tx,92:ex},text:{[-5]:Ed,[-4]:Ed,[-3]:Ed,33:sN,38:tx,42:xd,60:[cj,Yj],91:cN,92:[Mj,ex],93:Sd,95:xd,96:Sj}},Symbol.toStringTag,{value:"Module"}));function AN(e){const n=Gb([RN,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(nj),document:i(ij),flow:i(SN),string:i(kN),text:i($N)};return r;function i(a){return o;function o(s){return TN(r,a,s)}}}function PN(e){for(;!ix(e););return e}const dx=/[\0\t\n\r]/g;function jN(){let e=1,t="",n=!0,r;return i;function i(a,o,s){const l=[];let c,u,f,d,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(dx.lastIndex=f,c=dx.exec(a),d=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(d),!c){t=a.slice(f);break}if(p===10&&f===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<d&&(l.push(a.slice(f,d)),e+=d-f),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const NN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function DN(e){return e.replace(NN,MN)}function MN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Yb(n.slice(a?2:1),a?16:10)}return yd(n)||e}const px={}.hasOwnProperty;function LN(e,t,n){return typeof t!="string"&&(n=t,t=void 0),FN(n)(PN(AN(n).document().write(jN()(e,t,!0))))}function FN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ee),autolinkProtocol:z,autolinkEmail:z,atxHeading:a(Ce),blockQuote:a(ce),characterEscape:z,characterReference:z,codeFenced:a(X),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(X,o),codeText:a(Z,o),codeTextData:z,data:z,codeFlowValue:z,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(Y,o),htmlFlowData:z,htmlText:a(Y,o),htmlTextData:z,image:a(ae),label:o,link:a(ee),listItem:a(we),listItemValue:d,listOrdered:a(ke,f),listUnordered:a(ke),paragraph:a(Re),reference:E,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ce),strong:a(Ve),thematicBreak:a(Be)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:he,autolinkProtocol:pe,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:ne,characterReference:le,codeFenced:l(y),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:O,codeIndented:l(v),codeText:l(M),codeTextData:O,data:O,definition:l(),definitionDestinationString:k,definitionLabelString:g,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(W),hardBreakTrailing:l(W),htmlFlow:l(L),htmlFlowData:O,htmlText:l(U),htmlTextData:O,image:l(H),label:A,labelText:B,lineEnding:N,link:l(I),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Q,resourceDestinationString:x,resourceTitleString:q,resource:K,setextHeading:l(j),setextHeadingLineSequence:$,setextHeadingText:_,strong:l(),thematicBreak:l()}};hx(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(F){let P={type:"root",children:[]};const J={stack:[P],tokenStack:[],config:t,enter:s,exit:c,buffer:o,resume:u,data:n},ue=[];let _e=-1;for(;++_e<F.length;)if(F[_e][1].type==="listOrdered"||F[_e][1].type==="listUnordered")if(F[_e][0]==="enter")ue.push(_e);else{const Oe=ue.pop();_e=i(F,Oe,_e)}for(_e=-1;++_e<F.length;){const Oe=t[F[_e][0]];px.call(Oe,F[_e][1].type)&&Oe[F[_e][1].type].call(Object.assign({sliceSerialize:F[_e][2].sliceSerialize},J),F[_e][1])}if(J.tokenStack.length>0){const Oe=J.tokenStack[J.tokenStack.length-1];(Oe[1]||mx).call(J,void 0,Oe[0])}for(P.position={start:si(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:si(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)P=t.transforms[_e](P)||P;return P}function i(F,P,J){let ue=P-1,_e=-1,Oe=!1,Xe,ct,Ut,Tt;for(;++ue<=J;){const Ge=F[ue];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?_e++:_e--,Tt=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(Xe&&!Tt&&!_e&&!Ut&&(Ut=ue),Tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tt=void 0}if(!_e&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||_e===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(Xe){let Ct=ue;for(ct=void 0;Ct--;){const nt=F[Ct];if(nt[1].type==="lineEnding"||nt[1].type==="lineEndingBlank"){if(nt[0]==="exit")continue;ct&&(F[ct][1].type="lineEndingBlank",Oe=!0),nt[1].type="lineEnding",ct=Ct}else if(!(nt[1].type==="linePrefix"||nt[1].type==="blockQuotePrefix"||nt[1].type==="blockQuotePrefixWhitespace"||nt[1].type==="blockQuoteMarker"||nt[1].type==="listItemIndent"))break}Ut&&(!ct||Ut<ct)&&(Xe._spread=!0),Xe.end=Object.assign({},ct?F[ct][1].start:Ge[1].end),F.splice(ct||ue,0,["exit",Xe,Ge[2]]),ue++,J++}if(Ge[1].type==="listItemPrefix"){const Ct={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};Xe=Ct,F.splice(ue,0,["enter",Ct,Ge[2]]),ue++,J++,Ut=void 0,Tt=!0}}}return F[P][1]._spread=Oe,J}function a(F,P){return J;function J(ue){s.call(this,F(ue),ue),P&&P.call(this,ue)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(F,P,J){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([P,J]),F.position={start:si(P.start),end:void 0}}function l(F){return P;function P(J){F&&F.call(this,J),c.call(this,J)}}function c(F,P){const J=this.stack.pop(),ue=this.tokenStack.pop();if(ue)ue[0].type!==F.type&&(P?P.call(this,F,ue[0]):(ue[1]||mx).call(this,F,ue[0]));else throw new Error("Cannot close `"+F.type+"` ("+Ko({start:F.start,end:F.end})+"): it’s not open");J.position.end=si(F.end)}function u(){return gd(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(F){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function p(){const F=this.resume(),P=this.stack[this.stack.length-1];P.lang=F}function h(){const F=this.resume(),P=this.stack[this.stack.length-1];P.meta=F}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const F=this.resume(),P=this.stack[this.stack.length-1];P.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const F=this.resume(),P=this.stack[this.stack.length-1];P.value=F.replace(/(\r?\n|\r)$/g,"")}function g(F){const P=this.resume(),J=this.stack[this.stack.length-1];J.label=P,J.identifier=Kn(this.sliceSerialize(F)).toLowerCase()}function b(){const F=this.resume(),P=this.stack[this.stack.length-1];P.title=F}function k(){const F=this.resume(),P=this.stack[this.stack.length-1];P.url=F}function S(F){const P=this.stack[this.stack.length-1];if(!P.depth){const J=this.sliceSerialize(F).length;P.depth=J}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function $(F){const P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function z(F){const J=this.stack[this.stack.length-1].children;let ue=J[J.length-1];(!ue||ue.type!=="text")&&(ue=Ae(),ue.position={start:si(F.start),end:void 0},J.push(ue)),this.stack.push(ue)}function O(F){const P=this.stack.pop();P.value+=this.sliceSerialize(F),P.position.end=si(F.end)}function N(F){const P=this.stack[this.stack.length-1];if(this.data.atHardBreak){const J=P.children[P.children.length-1];J.position.end=si(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(P.type)&&(z.call(this,F),O.call(this,F))}function W(){this.data.atHardBreak=!0}function L(){const F=this.resume(),P=this.stack[this.stack.length-1];P.value=F}function U(){const F=this.resume(),P=this.stack[this.stack.length-1];P.value=F}function M(){const F=this.resume(),P=this.stack[this.stack.length-1];P.value=F}function I(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=P,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function H(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=P,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function B(F){const P=this.sliceSerialize(F),J=this.stack[this.stack.length-2];J.label=DN(P),J.identifier=Kn(P).toLowerCase()}function A(){const F=this.stack[this.stack.length-1],P=this.resume(),J=this.stack[this.stack.length-1];if(this.data.inReference=!0,J.type==="link"){const ue=F.children;J.children=ue}else J.alt=P}function x(){const F=this.resume(),P=this.stack[this.stack.length-1];P.url=F}function q(){const F=this.resume(),P=this.stack[this.stack.length-1];P.title=F}function K(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function Q(F){const P=this.resume(),J=this.stack[this.stack.length-1];J.label=P,J.identifier=Kn(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function oe(F){this.data.characterReferenceType=F.type}function ne(F){const P=this.sliceSerialize(F),J=this.data.characterReferenceType;let ue;J?(ue=Yb(P,J==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ue=yd(P);const _e=this.stack[this.stack.length-1];_e.value+=ue}function le(F){const P=this.stack.pop();P.position.end=si(F.end)}function pe(F){O.call(this,F);const P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(F)}function he(F){O.call(this,F);const P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(F)}function ce(){return{type:"blockquote",children:[]}}function X(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function Ce(){return{type:"heading",depth:0,children:[]}}function R(){return{type:"break"}}function Y(){return{type:"html",value:""}}function ae(){return{type:"image",title:null,url:"",alt:null}}function ee(){return{type:"link",title:null,url:"",children:[]}}function ke(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function we(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function Re(){return{type:"paragraph",children:[]}}function Ve(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function Be(){return{type:"thematicBreak"}}}function si(e){return{line:e.line,column:e.column,offset:e.offset}}function hx(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?hx(e,r):BN(e,r)}}function BN(e,t){let n;for(n in t)if(px.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function mx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ko({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ko({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ko({start:t.start,end:t.end})+") is still open")}function zN(e){const t=this;t.parser=n;function n(r){return LN(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function UN(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function qN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
34
|
-
`}]}function
|
|
35
|
-
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function
|
|
33
|
+
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}const AN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:jj},disable:{null:[]},document:{42:mn,43:mn,45:mn,48:mn,49:mn,50:mn,51:mn,52:mn,53:mn,54:mn,55:mn,56:mn,57:mn,62:Qb},flow:{35:Bj,42:Hl,45:[cx,Hl],60:Wj,61:cx,95:Hl,96:rx,126:rx},flowInitial:{[-2]:xd,[-1]:xd,32:xd},insideSpan:{null:[bd,kN]},string:{38:tx,92:ex},text:{[-5]:Sd,[-4]:Sd,[-3]:Sd,33:lN,38:tx,42:bd,60:[uj,Jj],91:uN,92:[Lj,ex],93:wd,95:bd,96:Ej}},Symbol.toStringTag,{value:"Module"}));function PN(e){const n=Gb([AN,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(rj),document:i(aj),flow:i(EN),string:i($N),text:i(ON)};return r;function i(a){return o;function o(s){return CN(r,a,s)}}}function jN(e){for(;!ix(e););return e}const dx=/[\0\t\n\r]/g;function NN(){let e=1,t="",n=!0,r;return i;function i(a,o,s){const l=[];let c,u,f,d,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(o||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(dx.lastIndex=f,c=dx.exec(a),d=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(d),!c){t=a.slice(f);break}if(p===10&&f===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<d&&(l.push(a.slice(f,d)),e+=d-f),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const DN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function MN(e){return e.replace(DN,LN)}function LN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),a=i===120||i===88;return Yb(n.slice(a?2:1),a?16:10)}return gd(n)||e}const px={}.hasOwnProperty;function FN(e,t,n){return typeof t!="string"&&(n=t,t=void 0),BN(n)(jN(PN(n).document().write(NN()(e,t,!0))))}function BN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ee),autolinkProtocol:z,autolinkEmail:z,atxHeading:a(Ce),blockQuote:a(ce),characterEscape:z,characterReference:z,codeFenced:a(X),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(X,o),codeText:a(Z,o),codeTextData:z,data:z,codeFlowValue:z,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(ve),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(Y,o),htmlFlowData:z,htmlText:a(Y,o),htmlTextData:z,image:a(ae),label:o,link:a(ee),listItem:a(we),listItemValue:d,listOrdered:a(ke,f),listUnordered:a(ke),paragraph:a(Re),reference:E,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(Ce),strong:a(Ve),thematicBreak:a(Be)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:he,autolinkProtocol:pe,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:ne,characterReference:le,codeFenced:l(y),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:O,codeIndented:l(v),codeText:l(M),codeTextData:O,data:O,definition:l(),definitionDestinationString:k,definitionLabelString:g,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(W),hardBreakTrailing:l(W),htmlFlow:l(L),htmlFlowData:O,htmlText:l(U),htmlTextData:O,image:l(H),label:A,labelText:B,lineEnding:N,link:l(I),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Q,resourceDestinationString:x,resourceTitleString:q,resource:K,setextHeading:l(j),setextHeadingLineSequence:$,setextHeadingText:_,strong:l(),thematicBreak:l()}};hx(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(F){let P={type:"root",children:[]};const J={stack:[P],tokenStack:[],config:t,enter:s,exit:c,buffer:o,resume:u,data:n},ue=[];let _e=-1;for(;++_e<F.length;)if(F[_e][1].type==="listOrdered"||F[_e][1].type==="listUnordered")if(F[_e][0]==="enter")ue.push(_e);else{const Oe=ue.pop();_e=i(F,Oe,_e)}for(_e=-1;++_e<F.length;){const Oe=t[F[_e][0]];px.call(Oe,F[_e][1].type)&&Oe[F[_e][1].type].call(Object.assign({sliceSerialize:F[_e][2].sliceSerialize},J),F[_e][1])}if(J.tokenStack.length>0){const Oe=J.tokenStack[J.tokenStack.length-1];(Oe[1]||mx).call(J,void 0,Oe[0])}for(P.position={start:si(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:si(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<t.transforms.length;)P=t.transforms[_e](P)||P;return P}function i(F,P,J){let ue=P-1,_e=-1,Oe=!1,Xe,ct,Ut,Tt;for(;++ue<=J;){const Ge=F[ue];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?_e++:_e--,Tt=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(Xe&&!Tt&&!_e&&!Ut&&(Ut=ue),Tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tt=void 0}if(!_e&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||_e===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(Xe){let Ct=ue;for(ct=void 0;Ct--;){const nt=F[Ct];if(nt[1].type==="lineEnding"||nt[1].type==="lineEndingBlank"){if(nt[0]==="exit")continue;ct&&(F[ct][1].type="lineEndingBlank",Oe=!0),nt[1].type="lineEnding",ct=Ct}else if(!(nt[1].type==="linePrefix"||nt[1].type==="blockQuotePrefix"||nt[1].type==="blockQuotePrefixWhitespace"||nt[1].type==="blockQuoteMarker"||nt[1].type==="listItemIndent"))break}Ut&&(!ct||Ut<ct)&&(Xe._spread=!0),Xe.end=Object.assign({},ct?F[ct][1].start:Ge[1].end),F.splice(ct||ue,0,["exit",Xe,Ge[2]]),ue++,J++}if(Ge[1].type==="listItemPrefix"){const Ct={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};Xe=Ct,F.splice(ue,0,["enter",Ct,Ge[2]]),ue++,J++,Ut=void 0,Tt=!0}}}return F[P][1]._spread=Oe,J}function a(F,P){return J;function J(ue){s.call(this,F(ue),ue),P&&P.call(this,ue)}}function o(){this.stack.push({type:"fragment",children:[]})}function s(F,P,J){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([P,J]),F.position={start:si(P.start),end:void 0}}function l(F){return P;function P(J){F&&F.call(this,J),c.call(this,J)}}function c(F,P){const J=this.stack.pop(),ue=this.tokenStack.pop();if(ue)ue[0].type!==F.type&&(P?P.call(this,F,ue[0]):(ue[1]||mx).call(this,F,ue[0]));else throw new Error("Cannot close `"+F.type+"` ("+Ko({start:F.start,end:F.end})+"): it’s not open");J.position.end=si(F.end)}function u(){return vd(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(F){if(this.data.expectingFirstListItemValue){const P=this.stack[this.stack.length-2];P.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function p(){const F=this.resume(),P=this.stack[this.stack.length-1];P.lang=F}function h(){const F=this.resume(),P=this.stack[this.stack.length-1];P.meta=F}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const F=this.resume(),P=this.stack[this.stack.length-1];P.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const F=this.resume(),P=this.stack[this.stack.length-1];P.value=F.replace(/(\r?\n|\r)$/g,"")}function g(F){const P=this.resume(),J=this.stack[this.stack.length-1];J.label=P,J.identifier=Kn(this.sliceSerialize(F)).toLowerCase()}function b(){const F=this.resume(),P=this.stack[this.stack.length-1];P.title=F}function k(){const F=this.resume(),P=this.stack[this.stack.length-1];P.url=F}function S(F){const P=this.stack[this.stack.length-1];if(!P.depth){const J=this.sliceSerialize(F).length;P.depth=J}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function $(F){const P=this.stack[this.stack.length-1];P.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function z(F){const J=this.stack[this.stack.length-1].children;let ue=J[J.length-1];(!ue||ue.type!=="text")&&(ue=Ae(),ue.position={start:si(F.start),end:void 0},J.push(ue)),this.stack.push(ue)}function O(F){const P=this.stack.pop();P.value+=this.sliceSerialize(F),P.position.end=si(F.end)}function N(F){const P=this.stack[this.stack.length-1];if(this.data.atHardBreak){const J=P.children[P.children.length-1];J.position.end=si(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(P.type)&&(z.call(this,F),O.call(this,F))}function W(){this.data.atHardBreak=!0}function L(){const F=this.resume(),P=this.stack[this.stack.length-1];P.value=F}function U(){const F=this.resume(),P=this.stack[this.stack.length-1];P.value=F}function M(){const F=this.resume(),P=this.stack[this.stack.length-1];P.value=F}function I(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=P,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function H(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const P=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=P,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function B(F){const P=this.sliceSerialize(F),J=this.stack[this.stack.length-2];J.label=MN(P),J.identifier=Kn(P).toLowerCase()}function A(){const F=this.stack[this.stack.length-1],P=this.resume(),J=this.stack[this.stack.length-1];if(this.data.inReference=!0,J.type==="link"){const ue=F.children;J.children=ue}else J.alt=P}function x(){const F=this.resume(),P=this.stack[this.stack.length-1];P.url=F}function q(){const F=this.resume(),P=this.stack[this.stack.length-1];P.title=F}function K(){this.data.inReference=void 0}function E(){this.data.referenceType="collapsed"}function Q(F){const P=this.resume(),J=this.stack[this.stack.length-1];J.label=P,J.identifier=Kn(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function oe(F){this.data.characterReferenceType=F.type}function ne(F){const P=this.sliceSerialize(F),J=this.data.characterReferenceType;let ue;J?(ue=Yb(P,J==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ue=gd(P);const _e=this.stack[this.stack.length-1];_e.value+=ue}function le(F){const P=this.stack.pop();P.position.end=si(F.end)}function pe(F){O.call(this,F);const P=this.stack[this.stack.length-1];P.url=this.sliceSerialize(F)}function he(F){O.call(this,F);const P=this.stack[this.stack.length-1];P.url="mailto:"+this.sliceSerialize(F)}function ce(){return{type:"blockquote",children:[]}}function X(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function de(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function Ce(){return{type:"heading",depth:0,children:[]}}function R(){return{type:"break"}}function Y(){return{type:"html",value:""}}function ae(){return{type:"image",title:null,url:"",alt:null}}function ee(){return{type:"link",title:null,url:"",children:[]}}function ke(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function we(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function Re(){return{type:"paragraph",children:[]}}function Ve(){return{type:"strong",children:[]}}function Ae(){return{type:"text",value:""}}function Be(){return{type:"thematicBreak"}}}function si(e){return{line:e.line,column:e.column,offset:e.offset}}function hx(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?hx(e,r):zN(e,r)}}function zN(e,t){let n;for(n in t)if(px.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function mx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ko({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ko({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ko({start:t.start,end:t.end})+") is still open")}function UN(e){const t=this;t.parser=n;function n(r){return FN(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function qN(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function WN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
34
|
+
`}]}function HN(e,t){const n=t.value?t.value+`
|
|
35
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function VN(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZN(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KN(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=wa(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function GN(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YN(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function vx(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),a=i[0];a&&a.type==="text"?a.value="["+a.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function JN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vx(e,t);const i={src:wa(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function XN(e,t){const n={src:wa(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function QN(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function eD(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vx(e,t);const i={href:wa(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const a={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function tD(e,t){const n={href:wa(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function nD(e,t,n){const r=e.all(t),i=n?rD(n):gx(t),a={},o=[];if(typeof t.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(i||s!==0||u.type!=="element"||u.tagName!=="p")&&o.push({type:"text",value:`
|
|
36
36
|
`}),u.type==="element"&&u.tagName==="p"&&!i?o.push(...u.children):o.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&o.push({type:"text",value:`
|
|
37
|
-
`});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)}function
|
|
37
|
+
`});const c={type:"element",tagName:"li",properties:a,children:o};return e.patch(t,c),e.applyData(t,c)}function rD(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=gx(n[r])}return t}function gx(e){const t=e.spread;return t??e.children.length>1}function iD(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function aD(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oD(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function sD(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lD(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],o),i.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=ud(t.children[1]),l=Mb(t.children[t.children.length-1]);s&&l&&(o.position={start:s,end:l}),i.push(o)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function cD(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,s=o?o.length:t.children.length;let l=-1;const c=[];for(;++l<s;){const f=t.children[l],d={},p=o?o[l]:void 0;p&&(d.align=p);let h={type:"element",tagName:a,properties:d,children:[]};f&&(h.children=e.all(f),e.patch(f,h),h=e.applyData(f,h)),c.push(h)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function uD(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const yx=9,bx=32;function fD(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const a=[];for(;r;)a.push(xx(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(xx(t.slice(i),i>0,!1)),a.join("")}function xx(e,t,n){let r=0,i=e.length;if(t){let a=e.codePointAt(r);for(;a===yx||a===bx;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(i-1);for(;a===yx||a===bx;)i--,a=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function dD(e,t){const n={type:"text",value:fD(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function pD(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const hD={blockquote:qN,break:WN,code:HN,delete:VN,emphasis:ZN,footnoteReference:KN,heading:GN,html:YN,imageReference:JN,image:XN,inlineCode:QN,linkReference:eD,link:tD,listItem:nD,list:iD,paragraph:aD,root:oD,strong:sD,table:lD,tableCell:uD,tableRow:cD,text:dD,thematicBreak:pD,toml:Vl,yaml:Vl,definition:Vl,footnoteDefinition:Vl};function Vl(){}const wx=-1,Zl=0,Kl=1,Gl=2,Ed=3,_d=4,kd=5,$d=6,Sx=7,Ex=8,_x=typeof self=="object"?self:globalThis,mD=(e,t)=>{const n=(i,a)=>(e.set(a,i),i),r=i=>{if(e.has(i))return e.get(i);const[a,o]=t[i];switch(a){case Zl:case wx:return n(o,i);case Kl:{const s=n([],i);for(const l of o)s.push(r(l));return s}case Gl:{const s=n({},i);for(const[l,c]of o)s[r(l)]=r(c);return s}case Ed:return n(new Date(o),i);case _d:{const{source:s,flags:l}=o;return n(new RegExp(s,l),i)}case kd:{const s=n(new Map,i);for(const[l,c]of o)s.set(r(l),r(c));return s}case $d:{const s=n(new Set,i);for(const l of o)s.add(r(l));return s}case Sx:{const{name:s,message:l}=o;return n(new _x[s](l),i)}case Ex:return n(BigInt(o),i);case"BigInt":return n(Object(BigInt(o)),i)}return n(new _x[a](o),i)};return r},kx=e=>mD(new Map,e)(0),Sa="",{toString:vD}={},{keys:gD}=Object,Qo=e=>{const t=typeof e;if(t!=="object"||!e)return[Zl,t];const n=vD.call(e).slice(8,-1);switch(n){case"Array":return[Kl,Sa];case"Object":return[Gl,Sa];case"Date":return[Ed,Sa];case"RegExp":return[_d,Sa];case"Map":return[kd,Sa];case"Set":return[$d,Sa]}return n.includes("Array")?[Kl,n]:n.includes("Error")?[Sx,n]:[Gl,n]},Yl=([e,t])=>e===Zl&&(t==="function"||t==="symbol"),yD=(e,t,n,r)=>{const i=(o,s)=>{const l=r.push(o)-1;return n.set(s,l),l},a=o=>{if(n.has(o))return n.get(o);let[s,l]=Qo(o);switch(s){case Zl:{let u=o;switch(l){case"bigint":s=Ex,u=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([wx],o)}return i([s,u],o)}case Kl:{if(l)return i([l,[...o]],o);const u=[],f=i([s,u],o);for(const d of o)u.push(a(d));return f}case Gl:{if(l)switch(l){case"BigInt":return i([l,o.toString()],o);case"Boolean":case"Number":case"String":return i([l,o.valueOf()],o)}if(t&&"toJSON"in o)return a(o.toJSON());const u=[],f=i([s,u],o);for(const d of gD(o))(e||!Yl(Qo(o[d])))&&u.push([a(d),a(o[d])]);return f}case Ed:return i([s,o.toISOString()],o);case _d:{const{source:u,flags:f}=o;return i([s,{source:u,flags:f}],o)}case kd:{const u=[],f=i([s,u],o);for(const[d,p]of o)(e||!(Yl(Qo(d))||Yl(Qo(p))))&&u.push([a(d),a(p)]);return f}case $d:{const u=[],f=i([s,u],o);for(const d of o)(e||!Yl(Qo(d)))&&u.push(a(d));return f}}const{message:c}=o;return i([s,{name:l,message:c}],o)};return a},$x=(e,{json:t,lossy:n}={})=>{const r=[];return yD(!(t||n),!!t,new Map,r)(e),r},Jl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?kx($x(e,t)):structuredClone(e):(e,t)=>kx($x(e,t));function bD(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function xD(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function wD(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||bD,r=e.options.footnoteBackLabel||xD,i=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const u=e.all(c),f=String(c.identifier).toUpperCase(),d=wa(f.toLowerCase());let p=0;const h=[],m=e.footnoteCounts.get(f);for(;m!==void 0&&++p<=m;){h.length>0&&h.push({type:"text",value:" "});let g=typeof n=="string"?n:n(l,p);typeof g=="string"&&(g={type:"text",value:g}),h.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const y=u[u.length-1];if(y&&y.type==="element"&&y.tagName==="p"){const g=y.children[y.children.length-1];g&&g.type==="text"?g.value+=" ":y.children.push({type:"text",value:" "}),y.children.push(...h)}else u.push(...h);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(u,!0)};e.patch(c,v),s.push(v)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...Jl(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
38
38
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
39
|
-
`}]}}const Xl=function(e){if(e==null)return
|
|
39
|
+
`}]}}const Xl=function(e){if(e==null)return kD;if(typeof e=="function")return Ql(e);if(typeof e=="object")return Array.isArray(e)?SD(e):ED(e);if(typeof e=="string")return _D(e);throw new Error("Expected function, string, or object as test")};function SD(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Xl(e[n]);return Ql(r);function r(...i){let a=-1;for(;++a<t.length;)if(t[a].apply(this,i))return!0;return!1}}function ED(e){const t=e;return Ql(n);function n(r){const i=r;let a;for(a in e)if(i[a]!==t[a])return!1;return!0}}function _D(e){return Ql(t);function t(n){return n&&n.type===e}}function Ql(e){return t;function t(n,r,i){return!!($D(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function kD(){return!0}function $D(e){return e!==null&&typeof e=="object"&&"type"in e}function Ope(e){return e}const Ox=[],OD=!0,Od=!1,TD="skip";function Tx(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const a=Xl(i),o=r?-1:1;s(e,void 0,[])();function s(l,c,u){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return d;function d(){let p=Ox,h,m,y;if((!t||a(l,c,u[u.length-1]||void 0))&&(p=CD(n(l,u)),p[0]===Od))return p;if("children"in l&&l.children){const v=l;if(v.children&&p[0]!==TD)for(m=(r?v.children.length:-1)+o,y=u.concat(v);m>-1&&m<v.children.length;){const g=v.children[m];if(h=s(g,m,y)(),h[0]===Od)return h;m=typeof h[1]=="number"?h[1]:m+o}}return p}}}function CD(e){return Array.isArray(e)?e:typeof e=="number"?[OD,e]:e==null?Ox:[e]}function Td(e,t,n,r){let i,a,o;typeof t=="function"&&typeof n!="function"?(a=void 0,o=t,i=n):(a=t,o=n,i=r),Tx(e,a,s,i);function s(l,c){const u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return o(l,f,u)}}const Cd={}.hasOwnProperty,ID={};function RD(e,t){const n=t||ID,r=new Map,i=new Map,a=new Map,o={...hD,...n.handlers},s={all:c,applyData:PD,definitionById:r,footnoteById:i,footnoteCounts:a,footnoteOrder:[],handlers:o,one:l,options:n,patch:AD,wrap:ND};return Td(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?r:i,d=String(u.identifier).toUpperCase();f.has(d)||f.set(d,u)}}),s;function l(u,f){const d=u.type,p=s.handlers[d];if(Cd.call(s.handlers,d)&&p)return p(s,u,f);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in u){const{children:m,...y}=u,v=Jl(y);return v.children=s.all(u),v}return Jl(u)}return(s.options.unknownHandler||jD)(s,u,f)}function c(u){const f=[];if("children"in u){const d=u.children;let p=-1;for(;++p<d.length;){const h=s.one(d[p],u);if(h){if(p&&d[p-1].type==="break"&&(!Array.isArray(h)&&h.type==="text"&&(h.value=Cx(h.value)),!Array.isArray(h)&&h.type==="element")){const m=h.children[0];m&&m.type==="text"&&(m.value=Cx(m.value))}Array.isArray(h)?f.push(...h):f.push(h)}}}return f}}function AD(e,t){e.position&&(t.position=OP(e))}function PD(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const o="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:o}}n.type==="element"&&a&&Object.assign(n.properties,Jl(a)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function jD(e,t){const n=t.data||{},r="value"in t&&!(Cd.call(n,"hProperties")||Cd.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ND(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
40
40
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
41
41
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
42
|
-
`}),n}function Cx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ix(e,t){const n=
|
|
43
|
-
`},i),a}function ND(e,t){return e&&"run"in e?async function(n,r){const i=Ix(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ix(n,{file:r,...e||t})}}function Rx(e){if(e)throw e}var ec=Object.prototype.hasOwnProperty,Ax=Object.prototype.toString,Px=Object.defineProperty,jx=Object.getOwnPropertyDescriptor,Nx=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Ax.call(t)==="[object Array]"},Dx=function(t){if(!t||Ax.call(t)!=="[object Object]")return!1;var n=ec.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ec.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ec.call(t,i)},Mx=function(t,n){Px&&n.name==="__proto__"?Px(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Lx=function(t,n){if(n==="__proto__")if(ec.call(t,n)){if(jx)return jx(t,n).value}else return;return t[n]},DD=function e(){var t,n,r,i,a,o,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=Lx(s,n),i=Lx(t,n),s!==i&&(u&&i&&(Dx(i)||(a=Nx(i)))?(a?(a=!1,o=r&&Nx(r)?r:[]):o=r&&Dx(r)?r:{},Mx(s,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&Mx(s,{name:n,newValue:i}));return s};const Rd=Ze(DD);function Ad(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function MD(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(l,...c){const u=e[++a];let f=-1;if(l){o(l);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,u?LD(u,s)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function LD(e,t){let n;return r;function r(...o){const s=e.length>o.length;let l;s&&o.push(i);try{l=e.apply(this,o)}catch(c){const u=c;if(s&&n)throw u;return i(u)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const pr={basename:FD,dirname:BD,extname:zD,join:UD,sep:"/"};function FD(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');es(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function BD(e){if(es(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function zD(e){es(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function UD(...e){let t=-1,n;for(;++t<e.length;)es(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":qD(n)}function qD(e){es(e);const t=e.codePointAt(0)===47;let n=WD(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function WD(e,t){let n="",r=0,i=-1,a=0,o=-1,s,l;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function es(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const HD={cwd:VD};function VD(){return"/"}function Pd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ZD(e){if(typeof e=="string")e=new URL(e);else if(!Pd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return KD(e)}function KD(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const jd=["history","path","basename","stem","extname","dirname"];class Fx{constructor(t){let n;t?Pd(t)?n={path:t}:typeof t=="string"||GD(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":HD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<jd.length;){const a=jd[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)jd.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?pr.basename(this.path):void 0}set basename(t){Dd(t,"basename"),Nd(t,"basename"),this.path=pr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?pr.dirname(this.path):void 0}set dirname(t){Bx(this.basename,"dirname"),this.path=pr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?pr.extname(this.path):void 0}set extname(t){if(Nd(t,"extname"),Bx(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=pr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Pd(t)&&(t=ZD(t)),Dd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?pr.basename(this.path,this.extname):void 0}set stem(t){Dd(t,"stem"),Nd(t,"stem"),this.path=pr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new en(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Nd(e,t){if(e&&e.includes(pr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+pr.sep+"`")}function Dd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Bx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function GD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const YD=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},JD={}.hasOwnProperty;class Md extends YD{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=MD()}copy(){const t=new Md;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Rd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Bd("data",this.frozen),this.namespace[t]=n,this):JD.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Bd("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=tc(t),r=this.parser||this.Parser;return Ld("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ld("process",this.parser||this.Parser),Fd("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const s=tc(t),l=r.parse(s);r.run(l,s,function(u,f,d){if(u||!f||!d)return c(u);const p=f,h=r.stringify(p,d);eM(h)?d.value=h:d.result=h,c(u,d)});function c(u,f){u||!f?o(u):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Ld("processSync",this.parser||this.Parser),Fd("processSync",this.compiler||this.Compiler),this.process(t,i),Ux("processSync","process",n),r;function i(a,o){n=!0,Rx(a),r=o}}run(t,n,r){zx(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,s){const l=tc(n);i.run(t,l,c);function c(u,f,d){const p=f||t;u?s(u):o?o(p):r(void 0,p,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Ux("runSync","run",r),i;function a(o,s){Rx(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=tc(n),i=this.compiler||this.Compiler;return Fd("stringify",i),zx(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Bd("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...f]=c;l(u,f)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(i.settings=Rd(!0,i.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const f=c[u];a(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===c){d=f;break}if(d===-1)r.push([c,...u]);else if(u.length>0){let[p,...h]=u;const m=r[d][1];Ad(m)&&Ad(p)&&(p=Rd(!0,m,p)),r[d]=[c,p,...h]}}}}const XD=new Md().freeze();function Ld(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Fd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Bd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zx(e){if(!Ad(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ux(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function tc(e){return QD(e)?e:new Fx(e)}function QD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eM(e){return typeof e=="string"||tM(e)}function tM(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const nM="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",qx=[],Wx={allowDangerousHtml:!0},rM=/^(https?|ircs?|mailto|xmpp)$/i,iM=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function aM(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||qx,l=e.remarkPlugins||qx,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Wx}:Wx,u=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||oM,p=XD().use(zN).use(l).use(ND,c).use(s),h=new Fx;typeof r=="string"&&(h.value=r);for(const g of iM)Object.hasOwn(e,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+nM+g.id,void 0);const m=p.parse(h);let y=p.runSync(m,h);return i&&(y={type:"element",tagName:"div",properties:{className:i},children:y.type==="root"?y.children:[y]}),Cd(y,v),AP(y,{Fragment:C.Fragment,components:a,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function v(g,b,k){if(g.type==="raw"&&k&&typeof b=="number")return u?k.children.splice(b,1):k.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let S;for(S in vd)if(Object.hasOwn(vd,S)&&Object.hasOwn(g.properties,S)){const _=g.properties[S],$=vd[S];($===null||$.includes(g.tagName))&&(g.properties[S]=d(String(_||""),S,g))}}if(g.type==="element"){let S=t?!t.includes(g.tagName):o?o.includes(g.tagName):!1;if(!S&&n&&typeof b=="number"&&(S=!n(g,b,k)),S&&k&&typeof b=="number")return f&&g.children?k.children.splice(b,1,...g.children):k.children.splice(b,1),b}}}function oM(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||rM.test(e.slice(0,t))?e:""}function sM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Hx(e,t,n){const i=Xl((n||{}).ignore||[]),a=lM(t);let o=-1;for(;++o<a.length;)Tx(e,"text",s);function s(c,u){let f=-1,d;for(;++f<u.length;){const p=u[f],h=d?d.children:void 0;if(i(p,h?h.indexOf(p):void 0,d))return;d=p}if(d)return l(c,u)}function l(c,u){const f=u[u.length-1],d=a[o][0],p=a[o][1];let h=0;const y=f.children.indexOf(c);let v=!1,g=[];d.lastIndex=0;let b=d.exec(c.value);for(;b;){const k=b.index,S={index:b.index,input:b.input,stack:[...u,c]};let _=p(...b,S);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?d.lastIndex=k+1:(h!==k&&g.push({type:"text",value:c.value.slice(h,k)}),Array.isArray(_)?g.push(..._):_&&g.push(_),h=k+b[0].length,v=!0),!d.global)break;b=d.exec(c.value)}return v?(h<c.value.length&&g.push({type:"text",value:c.value.slice(h)}),f.children.splice(y,1,...g)):g=[c],y+g.length}}function lM(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([cM(i[0]),uM(i[1])])}return t}function cM(e){return typeof e=="string"?new RegExp(sM(e),"g"):e}function uM(e){return typeof e=="function"?e:function(){return e}}function fM(e){Hx(e,[/\r?\n|\r/g,dM])}function dM(){return{type:"break"}}function pM(){return function(e){fM(e)}}function Vx(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const zd="phrasing",Ud=["autolink","link","image","label"];function hM(){return{transforms:[wM],enter:{literalAutolink:vM,literalAutolinkEmail:qd,literalAutolinkHttp:qd,literalAutolinkWww:qd},exit:{literalAutolink:xM,literalAutolinkEmail:bM,literalAutolinkHttp:gM,literalAutolinkWww:yM}}}function mM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zd,notInConstruct:Ud},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zd,notInConstruct:Ud},{character:":",before:"[ps]",after:"\\/",inConstruct:zd,notInConstruct:Ud}]}}function vM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function qd(e){this.config.enter.autolinkProtocol.call(this,e)}function gM(e){this.config.exit.autolinkProtocol.call(this,e)}function yM(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function bM(e){this.config.exit.autolinkEmail.call(this,e)}function xM(e){this.exit(e)}function wM(e){Hx(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,SM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),EM]],{ignore:["link","linkReference"]})}function SM(e,t,n,r,i){let a="";if(!Zx(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!_M(n)))return!1;const o=kM(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function EM(e,t,n,r){return!Zx(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function _M(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function kM(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Vx(e,"(");let a=Vx(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Zx(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ui(n)||Ul(n))&&(!t||n!==47)}Kx.peek=DM;function $M(){return{enter:{gfmFootnoteDefinition:TM,gfmFootnoteDefinitionLabelString:CM,gfmFootnoteCall:AM,gfmFootnoteCallString:PM},exit:{gfmFootnoteDefinition:RM,gfmFootnoteDefinitionLabelString:IM,gfmFootnoteCall:NM,gfmFootnoteCallString:jM}}}function OM(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:MM,footnoteReference:Kx}}}function TM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function CM(){this.buffer()}function IM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Kn(this.sliceSerialize(e)).toLowerCase()}function RM(e){this.exit(e)}function AM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function PM(){this.buffer()}function jM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Kn(this.sliceSerialize(e)).toLowerCase()}function NM(e){this.exit(e)}function Kx(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function DM(){return"["}function MM(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),LM)),o(),a}function LM(e,t,n){return t===0?e:(n?"":" ")+e}const FM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Gx.peek=WM;function BM(){return{canContainEols:["delete"],enter:{strikethrough:UM},exit:{strikethrough:qM}}}function zM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:FM}],handlers:{delete:Gx}}}function UM(e){this.enter({type:"delete",children:[]},e)}function qM(e){this.exit(e)}function Gx(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function WM(){return"~"}function HM(e){return e.length}function VM(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||HM,a=[],o=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],y=[];let v=-1;for(e[u].length>c&&(c=e[u].length);++v<e[u].length;){const g=ZM(e[u][v]);if(n.alignDelimiters!==!1){const b=i(g);y[v]=b,(l[v]===void 0||b>l[v])&&(l[v]=b)}m.push(g)}o[u]=m,s[u]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)a[f]=Yx(r[f]);else{const m=Yx(r);for(;++f<c;)a[f]=m}f=-1;const d=[],p=[];for(;++f<c;){const m=a[f];let y="",v="";m===99?(y=":",v=":"):m===108?y=":":m===114&&(v=":");let g=n.alignDelimiters===!1?1:Math.max(1,l[f]-y.length-v.length);const b=y+"-".repeat(g)+v;n.alignDelimiters!==!1&&(g=y.length+g+v.length,g>l[f]&&(l[f]=g),p[f]=g),d[f]=b}o.splice(1,0,d),s.splice(1,0,p),u=-1;const h=[];for(;++u<o.length;){const m=o[u],y=s[u];f=-1;const v=[];for(;++f<c;){const g=m[f]||"";let b="",k="";if(n.alignDelimiters!==!1){const S=l[f]-(y[f]||0),_=a[f];_===114?b=" ".repeat(S):_===99?S%2?(b=" ".repeat(S/2+.5),k=" ".repeat(S/2-.5)):(b=" ".repeat(S/2),k=b):k=" ".repeat(S)}n.delimiterStart!==!1&&!f&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||f)&&v.push(" "),n.alignDelimiters!==!1&&v.push(b),v.push(g),n.alignDelimiters!==!1&&v.push(k),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&v.push("|")}h.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return h.join(`
|
|
44
|
-
`)}function
|
|
45
|
-
`&&
|
|
46
|
-
`}function
|
|
42
|
+
`}),n}function Cx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ix(e,t){const n=RD(e,t),r=n.one(e,void 0),i=wD(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&a.children.push({type:"text",value:`
|
|
43
|
+
`},i),a}function DD(e,t){return e&&"run"in e?async function(n,r){const i=Ix(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ix(n,{file:r,...e||t})}}function Rx(e){if(e)throw e}var ec=Object.prototype.hasOwnProperty,Ax=Object.prototype.toString,Px=Object.defineProperty,jx=Object.getOwnPropertyDescriptor,Nx=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Ax.call(t)==="[object Array]"},Dx=function(t){if(!t||Ax.call(t)!=="[object Object]")return!1;var n=ec.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ec.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ec.call(t,i)},Mx=function(t,n){Px&&n.name==="__proto__"?Px(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Lx=function(t,n){if(n==="__proto__")if(ec.call(t,n)){if(jx)return jx(t,n).value}else return;return t[n]},MD=function e(){var t,n,r,i,a,o,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=Lx(s,n),i=Lx(t,n),s!==i&&(u&&i&&(Dx(i)||(a=Nx(i)))?(a?(a=!1,o=r&&Nx(r)?r:[]):o=r&&Dx(r)?r:{},Mx(s,{name:n,newValue:e(u,o,i)})):typeof i<"u"&&Mx(s,{name:n,newValue:i}));return s};const Id=Ze(MD);function Rd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function LD(){const e=[],t={run:n,use:r};return t;function n(...i){let a=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);s(null,...i);function s(l,...c){const u=e[++a];let f=-1;if(l){o(l);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,u?FD(u,s)(...c):o(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function FD(e,t){let n;return r;function r(...o){const s=e.length>o.length;let l;s&&o.push(i);try{l=e.apply(this,o)}catch(c){const u=c;if(s&&n)throw u;return i(u)}s||(l&&l.then&&typeof l.then=="function"?l.then(a,i):l instanceof Error?i(l):a(l))}function i(o,...s){n||(n=!0,t(o,...s))}function a(o){i(null,o)}}const pr={basename:BD,dirname:zD,extname:UD,join:qD,sep:"/"};function BD(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');es(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function zD(e){if(es(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function UD(e){es(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){const s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function qD(...e){let t=-1,n;for(;++t<e.length;)es(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":WD(n)}function WD(e){es(e);const t=e.codePointAt(0)===47;let n=HD(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function HD(e,t){let n="",r=0,i=-1,a=0,o=-1,s,l;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else{if(s===47)break;s=47}if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=o,a=0;continue}}else if(n.length>0){n="",r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function es(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const VD={cwd:ZD};function ZD(){return"/"}function Ad(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function KD(e){if(typeof e=="string")e=new URL(e);else if(!Ad(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return GD(e)}function GD(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Pd=["history","path","basename","stem","extname","dirname"];class Fx{constructor(t){let n;t?Ad(t)?n={path:t}:typeof t=="string"||YD(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":VD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pd.length;){const a=Pd[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let i;for(i in n)Pd.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?pr.basename(this.path):void 0}set basename(t){Nd(t,"basename"),jd(t,"basename"),this.path=pr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?pr.dirname(this.path):void 0}set dirname(t){Bx(this.basename,"dirname"),this.path=pr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?pr.extname(this.path):void 0}set extname(t){if(jd(t,"extname"),Bx(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=pr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Ad(t)&&(t=KD(t)),Nd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?pr.basename(this.path,this.extname):void 0}set stem(t){Nd(t,"stem"),jd(t,"stem"),this.path=pr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new en(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function jd(e,t){if(e&&e.includes(pr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+pr.sep+"`")}function Nd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Bx(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function YD(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const JD=function(e){const r=this.constructor.prototype,i=r[e],a=function(){return i.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},XD={}.hasOwnProperty;class Dd extends JD{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=LD()}copy(){const t=new Dd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Id(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Fd("data",this.frozen),this.namespace[t]=n,this):XD.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Fd("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=tc(t),r=this.parser||this.Parser;return Md("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Md("process",this.parser||this.Parser),Ld("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(a,o){const s=tc(t),l=r.parse(s);r.run(l,s,function(u,f,d){if(u||!f||!d)return c(u);const p=f,h=r.stringify(p,d);tM(h)?d.value=h:d.result=h,c(u,d)});function c(u,f){u||!f?o(u):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Md("processSync",this.parser||this.Parser),Ld("processSync",this.compiler||this.Compiler),this.process(t,i),Ux("processSync","process",n),r;function i(a,o){n=!0,Rx(a),r=o}}run(t,n,r){zx(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(o,s){const l=tc(n);i.run(t,l,c);function c(u,f,d){const p=f||t;u?s(u):o?o(p):r(void 0,p,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,a),Ux("runSync","run",r),i;function a(o,s){Rx(o),i=s,r=!0}}stringify(t,n){this.freeze();const r=tc(n),i=this.compiler||this.Compiler;return Ld("stringify",i),zx(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Fd("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...f]=c;l(u,f)}else o(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function o(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(i.settings=Id(!0,i.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const f=c[u];a(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===c){d=f;break}if(d===-1)r.push([c,...u]);else if(u.length>0){let[p,...h]=u;const m=r[d][1];Rd(m)&&Rd(p)&&(p=Id(!0,m,p)),r[d]=[c,p,...h]}}}}const QD=new Dd().freeze();function Md(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ld(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Fd(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function zx(e){if(!Rd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Ux(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function tc(e){return eM(e)?e:new Fx(e)}function eM(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function tM(e){return typeof e=="string"||nM(e)}function nM(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const rM="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",qx=[],Wx={allowDangerousHtml:!0},iM=/^(https?|ircs?|mailto|xmpp)$/i,aM=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function oM(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,a=e.components,o=e.disallowedElements,s=e.rehypePlugins||qx,l=e.remarkPlugins||qx,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Wx}:Wx,u=e.skipHtml,f=e.unwrapDisallowed,d=e.urlTransform||sM,p=QD().use(UN).use(l).use(DD,c).use(s),h=new Fx;typeof r=="string"&&(h.value=r);for(const g of aM)Object.hasOwn(e,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+rM+g.id,void 0);const m=p.parse(h);let y=p.runSync(m,h);return i&&(y={type:"element",tagName:"div",properties:{className:i},children:y.type==="root"?y.children:[y]}),Td(y,v),PP(y,{Fragment:C.Fragment,components:a,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function v(g,b,k){if(g.type==="raw"&&k&&typeof b=="number")return u?k.children.splice(b,1):k.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let S;for(S in md)if(Object.hasOwn(md,S)&&Object.hasOwn(g.properties,S)){const _=g.properties[S],$=md[S];($===null||$.includes(g.tagName))&&(g.properties[S]=d(String(_||""),S,g))}}if(g.type==="element"){let S=t?!t.includes(g.tagName):o?o.includes(g.tagName):!1;if(!S&&n&&typeof b=="number"&&(S=!n(g,b,k)),S&&k&&typeof b=="number")return f&&g.children?k.children.splice(b,1,...g.children):k.children.splice(b,1),b}}}function sM(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||iM.test(e.slice(0,t))?e:""}function lM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Hx(e,t,n){const i=Xl((n||{}).ignore||[]),a=cM(t);let o=-1;for(;++o<a.length;)Tx(e,"text",s);function s(c,u){let f=-1,d;for(;++f<u.length;){const p=u[f],h=d?d.children:void 0;if(i(p,h?h.indexOf(p):void 0,d))return;d=p}if(d)return l(c,u)}function l(c,u){const f=u[u.length-1],d=a[o][0],p=a[o][1];let h=0;const y=f.children.indexOf(c);let v=!1,g=[];d.lastIndex=0;let b=d.exec(c.value);for(;b;){const k=b.index,S={index:b.index,input:b.input,stack:[...u,c]};let _=p(...b,S);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?d.lastIndex=k+1:(h!==k&&g.push({type:"text",value:c.value.slice(h,k)}),Array.isArray(_)?g.push(..._):_&&g.push(_),h=k+b[0].length,v=!0),!d.global)break;b=d.exec(c.value)}return v?(h<c.value.length&&g.push({type:"text",value:c.value.slice(h)}),f.children.splice(y,1,...g)):g=[c],y+g.length}}function cM(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([uM(i[0]),fM(i[1])])}return t}function uM(e){return typeof e=="string"?new RegExp(lM(e),"g"):e}function fM(e){return typeof e=="function"?e:function(){return e}}function dM(e){Hx(e,[/\r?\n|\r/g,pM])}function pM(){return{type:"break"}}function hM(){return function(e){dM(e)}}function Vx(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Bd="phrasing",zd=["autolink","link","image","label"];function mM(){return{transforms:[SM],enter:{literalAutolink:gM,literalAutolinkEmail:Ud,literalAutolinkHttp:Ud,literalAutolinkWww:Ud},exit:{literalAutolink:wM,literalAutolinkEmail:xM,literalAutolinkHttp:yM,literalAutolinkWww:bM}}}function vM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Bd,notInConstruct:zd},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Bd,notInConstruct:zd},{character:":",before:"[ps]",after:"\\/",inConstruct:Bd,notInConstruct:zd}]}}function gM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ud(e){this.config.enter.autolinkProtocol.call(this,e)}function yM(e){this.config.exit.autolinkProtocol.call(this,e)}function bM(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function xM(e){this.config.exit.autolinkEmail.call(this,e)}function wM(e){this.exit(e)}function SM(e){Hx(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,EM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),_M]],{ignore:["link","linkReference"]})}function EM(e,t,n,r,i){let a="";if(!Zx(i)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!kM(n)))return!1;const o=$M(n+r);if(!o[0])return!1;const s={type:"link",title:null,url:a+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[s,{type:"text",value:o[1]}]:s}function _M(e,t,n,r){return!Zx(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function kM(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function $M(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Vx(e,"(");let a=Vx(e,")");for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Zx(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ui(n)||Ul(n))&&(!t||n!==47)}Kx.peek=MM;function OM(){return{enter:{gfmFootnoteDefinition:CM,gfmFootnoteDefinitionLabelString:IM,gfmFootnoteCall:PM,gfmFootnoteCallString:jM},exit:{gfmFootnoteDefinition:AM,gfmFootnoteDefinitionLabelString:RM,gfmFootnoteCall:DM,gfmFootnoteCallString:NM}}}function TM(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:LM,footnoteReference:Kx}}}function CM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function IM(){this.buffer()}function RM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Kn(this.sliceSerialize(e)).toLowerCase()}function AM(e){this.exit(e)}function PM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function jM(){this.buffer()}function NM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Kn(this.sliceSerialize(e)).toLowerCase()}function DM(e){this.exit(e)}function Kx(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteReference"),s=n.enter("reference");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),o(),a+=i.move("]"),a}function MM(){return"["}function LM(e,t,n,r){const i=n.createTracker(r);let a=i.move("[^");const o=n.enter("footnoteDefinition"),s=n.enter("label");return a+=i.move(n.safe(n.associationId(e),{...i.current(),before:a,after:"]"})),s(),a+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),a+=i.move(n.indentLines(n.containerFlow(e,i.current()),FM)),o(),a}function FM(e,t,n){return t===0?e:(n?"":" ")+e}const BM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Gx.peek=HM;function zM(){return{canContainEols:["delete"],enter:{strikethrough:qM},exit:{strikethrough:WM}}}function UM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:BM}],handlers:{delete:Gx}}}function qM(e){this.enter({type:"delete",children:[]},e)}function WM(e){this.exit(e)}function Gx(e,t,n,r){const i=n.createTracker(r),a=n.enter("strikethrough");let o=i.move("~~");return o+=n.containerPhrasing(e,{...i.current(),before:o,after:"~"}),o+=i.move("~~"),a(),o}function HM(){return"~"}function VM(e){return e.length}function ZM(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||VM,a=[],o=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const m=[],y=[];let v=-1;for(e[u].length>c&&(c=e[u].length);++v<e[u].length;){const g=KM(e[u][v]);if(n.alignDelimiters!==!1){const b=i(g);y[v]=b,(l[v]===void 0||b>l[v])&&(l[v]=b)}m.push(g)}o[u]=m,s[u]=y}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)a[f]=Yx(r[f]);else{const m=Yx(r);for(;++f<c;)a[f]=m}f=-1;const d=[],p=[];for(;++f<c;){const m=a[f];let y="",v="";m===99?(y=":",v=":"):m===108?y=":":m===114&&(v=":");let g=n.alignDelimiters===!1?1:Math.max(1,l[f]-y.length-v.length);const b=y+"-".repeat(g)+v;n.alignDelimiters!==!1&&(g=y.length+g+v.length,g>l[f]&&(l[f]=g),p[f]=g),d[f]=b}o.splice(1,0,d),s.splice(1,0,p),u=-1;const h=[];for(;++u<o.length;){const m=o[u],y=s[u];f=-1;const v=[];for(;++f<c;){const g=m[f]||"";let b="",k="";if(n.alignDelimiters!==!1){const S=l[f]-(y[f]||0),_=a[f];_===114?b=" ".repeat(S):_===99?S%2?(b=" ".repeat(S/2+.5),k=" ".repeat(S/2-.5)):(b=" ".repeat(S/2),k=b):k=" ".repeat(S)}n.delimiterStart!==!1&&!f&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||f)&&v.push(" "),n.alignDelimiters!==!1&&v.push(b),v.push(g),n.alignDelimiters!==!1&&v.push(k),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&v.push("|")}h.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return h.join(`
|
|
44
|
+
`)}function KM(e){return e==null?"":String(e)}function Yx(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function GM(e,t,n,r){const i=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const o=n.indentLines(n.containerFlow(e,a.current()),YM);return i(),o}function YM(e,t,n){return">"+(n?"":" ")+e}function JM(e,t){return Jx(e,t.inConstruct,!0)&&!Jx(e,t.notInConstruct,!1)}function Jx(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Xx(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
45
|
+
`&&JM(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
46
|
+
`}function XM(e,t){const n=String(e);let r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function QM(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function e2(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function t2(e,t,n,r){const i=e2(n),a=e.value||"",o=i==="`"?"GraveAccent":"Tilde";if(QM(e,n)){const f=n.enter("codeIndented"),d=n.indentLines(a,n2);return f(),d}const s=n.createTracker(r),l=i.repeat(Math.max(XM(a,i)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const f=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${o}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
47
47
|
`,encode:["`"],...s.current()})),f()}return u+=s.move(`
|
|
48
48
|
`),a&&(u+=s.move(a+`
|
|
49
|
-
`)),u+=s.move(l),c(),u}function
|
|
50
|
-
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),o(),c}function
|
|
49
|
+
`)),u+=s.move(l),c(),u}function n2(e,t,n){return(n?"":" ")+e}function qd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function r2(e,t,n,r){const i=qd(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
50
|
+
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),o(),c}function i2(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Qx.peek=a2;function Qx(e,t,n,r){const i=i2(n),a=n.enter("emphasis"),o=n.createTracker(r);let s=o.move(i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i),a(),s}function a2(e,t,n){return n.options.emphasis||"*"}function o2(e,t){let n=!1;return Td(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Od}),!!((!e.depth||e.depth<3)&&vd(e)&&(t.options.setext||n))}function s2(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(o2(e,n)){const u=n.enter("headingSetext"),f=n.enter("phrasing"),d=n.containerPhrasing(e,{...a.current(),before:`
|
|
51
51
|
`,after:`
|
|
52
52
|
`});return f(),u(),d+`
|
|
53
53
|
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
54
54
|
`))+1))}const o="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");a.move(o+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
55
|
-
`,...a.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),s(),c}ew.peek=
|
|
55
|
+
`,...a.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?o+" "+c:o,n.options.closeAtx&&(c+=" "+o),l(),s(),c}ew.peek=l2;function ew(e){return e.value||""}function l2(){return"<"}tw.peek=c2;function tw(e,t,n,r){const i=qd(n),a=i==='"'?"Quote":"Apostrophe",o=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),o(),c}function c2(){return"!"}nw.peek=u2;function nw(e,t,n,r){const i=e.referenceType,a=n.enter("imageReference");let o=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=u,a(),i==="full"||!c||c!==f?l+=s.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function u2(){return"!"}rw.peek=f2;function rw(e,t,n){let r=e.value||"",i="`",a=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const o=n.unsafe[a],s=n.compilePattern(o);let l;if(o.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function f2(){return"`"}function iw(e,t){const n=vd(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}aw.peek=d2;function aw(e,t,n,r){const i=qd(n),a=i==='"'?"Quote":"Apostrophe",o=n.createTracker(r);let s,l;if(iw(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let f=o.move("<");return f+=o.move(n.containerPhrasing(e,{before:f,after:">",...o.current()})),f+=o.move(">"),s(),n.stack=u,f}s=n.enter("link"),l=n.enter("label");let c=o.move("[");return c+=o.move(n.containerPhrasing(e,{before:c,after:"](",...o.current()})),c+=o.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=o.move("<"),c+=o.move(n.safe(e.url,{before:c,after:">",...o.current()})),c+=o.move(">")):(l=n.enter("destinationRaw"),c+=o.move(n.safe(e.url,{before:c,after:e.title?" ":")",...o.current()}))),l(),e.title&&(l=n.enter(`title${a}`),c+=o.move(" "+i),c+=o.move(n.safe(e.title,{before:c,after:i,...o.current()})),c+=o.move(i),l()),c+=o.move(")"),s(),c}function d2(e,t,n){return iw(e,n)?"<":"["}ow.peek=p2;function ow(e,t,n,r){const i=e.referenceType,a=n.enter("linkReference");let o=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),o();const u=n.stack;n.stack=[],o=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return o(),n.stack=u,a(),i==="full"||!c||c!==f?l+=s.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function p2(){return"["}function Wd(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function h2(e){const t=Wd(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function m2(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function sw(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function v2(e,t,n,r){const i=n.enter("list"),a=n.bulletCurrent;let o=e.ordered?m2(n):Wd(n);const s=e.ordered?o==="."?")":".":h2(n);let l=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),sw(n)===o&&u){let f=-1;for(;++f<e.children.length;){const d=e.children[f];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(o=s),n.bulletCurrent=o;const c=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),c}function g2(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function y2(e,t,n,r){const i=g2(n);let a=n.bulletCurrent||Wd(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=n.createTracker(r);s.move(a+" ".repeat(o-a.length)),s.shift(o);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),u);return l(),c;function u(f,d,p){return d?(p?"":" ".repeat(o))+f:(p?a:a+" ".repeat(o-a.length))+f}}function b2(e,t,n,r){const i=n.enter("paragraph"),a=n.enter("phrasing"),o=n.containerPhrasing(e,r);return a(),i(),o}const x2=Xl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function w2(e,t,n,r){return(e.children.some(function(o){return x2(o)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function S2(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}lw.peek=E2;function lw(e,t,n,r){const i=S2(n),a=n.enter("strong"),o=n.createTracker(r);let s=o.move(i+i);return s+=o.move(n.containerPhrasing(e,{before:s,after:i,...o.current()})),s+=o.move(i+i),a(),s}function E2(e,t,n){return n.options.strong||"*"}function _2(e,t,n,r){return n.safe(e.value,r)}function k2(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function $2(e,t,n){const r=(sw(n)+(n.options.ruleSpaces?" ":"")).repeat(k2(n));return n.options.ruleSpaces?r.slice(0,-1):r}const cw={blockquote:GM,break:Xx,code:t2,definition:r2,emphasis:Qx,hardBreak:Xx,heading:s2,html:ew,image:tw,imageReference:nw,inlineCode:rw,link:aw,linkReference:ow,list:v2,listItem:y2,paragraph:b2,root:w2,strong:lw,text:_2,thematicBreak:$2};function O2(){return{enter:{table:T2,tableData:uw,tableHeader:uw,tableRow:I2},exit:{codeText:R2,table:C2,tableData:Hd,tableHeader:Hd,tableRow:Hd}}}function T2(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function C2(e){this.exit(e),this.data.inTable=void 0}function I2(e){this.enter({type:"tableRow",children:[]},e)}function Hd(e){this.exit(e)}function uw(e){this.enter({type:"tableCell",children:[]},e)}function R2(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,A2));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function A2(e,t){return t==="|"?t:e}function P2(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
56
56
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:o,tableCell:l,tableRow:s}};function o(p,h,m,y){return c(u(p,m,y),p.align)}function s(p,h,m,y){const v=f(p,m,y),g=c([v]);return g.slice(0,g.indexOf(`
|
|
57
|
-
`))}function l(p,h,m,y){const v=m.enter("tableCell"),g=m.enter("phrasing"),b=m.containerPhrasing(p,{...y,before:a,after:a});return g(),v(),b}function c(p,h){return VM(p,{align:h,alignDelimiters:r,padding:n,stringLength:i})}function u(p,h,m){const y=p.children;let v=-1;const g=[],b=h.enter("table");for(;++v<y.length;)g[v]=f(y[v],h,m);return b(),g}function f(p,h,m){const y=p.children;let v=-1;const g=[],b=h.enter("tableRow");for(;++v<y.length;)g[v]=l(y[v],p,h,m);return b(),g}function d(p,h,m){let y=cw.inlineCode(p,h,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function P2(){return{exit:{taskListCheckValueChecked:fw,taskListCheckValueUnchecked:fw,paragraph:N2}}}function j2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:D2}}}function fw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function N2(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function D2(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let l=cw.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function M2(){return[hM(),$M(),BM(),$2(),P2()]}function L2(e){return{extensions:[mM(),OM(),zM(),A2(e),j2()]}}const F2={tokenize:H2,partial:!0},dw={tokenize:V2,partial:!0},pw={tokenize:Z2,partial:!0},hw={tokenize:K2,partial:!0},B2={tokenize:G2,partial:!0},mw={name:"wwwAutolink",tokenize:q2,previous:gw},vw={name:"protocolAutolink",tokenize:W2,previous:yw},Br={name:"emailAutolink",tokenize:U2,previous:bw},hr={};function z2(){return{text:hr}}let qi=48;for(;qi<123;)hr[qi]=Br,qi++,qi===58?qi=65:qi===91&&(qi=97);hr[43]=Br,hr[45]=Br,hr[46]=Br,hr[95]=Br,hr[72]=[Br,vw],hr[104]=[Br,vw],hr[87]=[Br,mw],hr[119]=[Br,mw];function U2(e,t,n){const r=this;let i,a;return o;function o(f){return!Zd(f)||!bw.call(r,r.previous)||Kd(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Zd(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(B2,u,c)(f):f===45||f===95||tn(f)?(a=!0,e.consume(f),l):u(f)}function c(f){return e.consume(f),i=!0,l}function u(f){return a&&i&&cn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function q2(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!gw.call(r,r.previous)||Kd(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(F2,e.attempt(dw,e.attempt(pw,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function W2(e,t,n){const r=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&yw.call(r,r.previous)&&!Kd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(cn(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),a?c:(a=!0,l)):n(f)}function c(f){return f===null||zl(f)||gt(f)||Ui(f)||Ul(f)?n(f):e.attempt(dw,e.attempt(pw,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function H2(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function V2(e,t,n){let r,i,a;return o;function o(c){return c===46||c===95?e.check(hw,l,s)(c):c===null||gt(c)||Ui(c)||c!==45&&Ul(c)?l(c):(a=!0,e.consume(c),o)}function s(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function l(c){return i||r||!a?n(c):t(c)}}function Z2(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(hw,t,a)(o):o===null||gt(o)||Ui(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function K2(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||gt(s)||Ui(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||gt(s)||Ui(s)?t(s):r(s)}function a(s){return cn(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):cn(s)?(e.consume(s),o):n(s)}}function G2(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return tn(a)?n(a):t(a)}}function gw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gt(e)}function yw(e){return!cn(e)}function bw(e){return!(e===47||Zd(e))}function Zd(e){return e===43||e===45||e===46||e===95||tn(e)}function Kd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Y2={tokenize:iL,partial:!0};function J2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tL,continuation:{tokenize:nL},exit:rL}},text:{91:{name:"gfmFootnoteCall",tokenize:eL},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:X2,resolveTo:Q2}}}}function X2(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return n(l);const c=Kn(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Q2(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function eL(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!o||f===null||f===91||gt(f))return n(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Kn(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return gt(f)||(o=!0),a++,e.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function tL(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(o>999||h===93&&!s||h===null||h===91||gt(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return a=Kn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return gt(h)||(s=!0),o++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,u):u(h)}function d(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(a)||i.push(a),Qe(e,p,"gfmFootnoteDefinitionWhitespace")):n(h)}function p(h){return t(h)}}function nL(e,t,n){return e.check(Yo,t,e.attempt(Y2,t,n))}function rL(e){e.exit("gfmFootnoteDefinition")}function iL(e,t,n){const r=this;return Qe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function aL(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},f={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},d=[["enter",u,s],["enter",o[c][1],s],["exit",o[c][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&jn(d,d.length,0,Wl(p,o.slice(c+1,l),s)),jn(d,d.length,0,[["exit",f,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",u,s]]),jn(o,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function a(o,s,l){const c=this.previous,u=this.events;let f=0;return d;function d(h){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(h):(o.enter("strikethroughSequenceTemporary"),p(h))}function p(h){const m=ql(c);if(h===126)return f>1?l(h):(o.consume(h),f++,p);if(f<2&&!n)return l(h);const y=o.exit("strikethroughSequenceTemporary"),v=ql(h);return y._open=!v||v===2&&!!m,y._close=!m||m===2&&!!v,s(h)}}}class oL{constructor(){this.map=[]}add(t,n,r){sL(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function sL(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function lL(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function cL(){return{flow:{null:{name:"table",tokenize:uL,resolveAll:fL}}}}function uL(e,t,n){const r=this;let i=0,a=0,o;return s;function s(O){let N=r.events.length-1;for(;N>-1;){const U=r.events[N][1].type;if(U==="lineEnding"||U==="linePrefix")N--;else break}const W=N>-1?r.events[N][1].type:null,L=W==="tableHead"||W==="tableRow"?_:l;return L===_&&r.parser.lazy[r.now().line]?n(O):L(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),c(O)}function c(O){return O===124||(o=!0,a+=1),u(O)}function u(O){return O===null?n(O):Ie(O)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),p):n(O):Ke(O)?Qe(e,u,"whitespace")(O):(a+=1,o&&(o=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),f(O)))}function f(O){return O===null||O===124||gt(O)?(e.exit("data"),u(O)):(e.consume(O),O===92?d:f)}function d(O){return O===92||O===124?(e.consume(O),f):f(O)}function p(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),o=!1,Ke(O)?Qe(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):h(O))}function h(O){return O===45||O===58?y(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),m):S(O)}function m(O){return Ke(O)?Qe(e,y,"whitespace")(O):y(O)}function y(O){return O===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):O===45?(a+=1,v(O)):O===null||Ie(O)?k(O):S(O)}function v(O){return O===45?(e.enter("tableDelimiterFiller"),g(O)):S(O)}function g(O){return O===45?(e.consume(O),g):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(O))}function b(O){return Ke(O)?Qe(e,k,"whitespace")(O):k(O)}function k(O){return O===124?h(O):O===null||Ie(O)?!o||i!==a?S(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):S(O)}function S(O){return n(O)}function _(O){return e.enter("tableRow"),$(O)}function $(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),$):O===null||Ie(O)?(e.exit("tableRow"),t(O)):Ke(O)?Qe(e,$,"whitespace")(O):(e.enter("data"),j(O))}function j(O){return O===null||O===124||gt(O)?(e.exit("data"),$(O)):(e.consume(O),O===92?z:j)}function z(O){return O===92||O===124?(e.consume(O),j):j(O)}}function fL(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,c,u,f;const d=new oL;for(;++n<e.length;){const p=e[n],h=p[1];p[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(xw(d,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(n,0,[["enter",c,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(n,0,[["enter",u,t]])),i=h.type==="tableDelimiterRow"?2:u?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=nc(d,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],f=nc(d,t,a,i,void 0,f)),a=o,o=[a[1],n,0,0])):h.type==="tableHead"?(s=!0,l=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=n,a[1]!==0?(o[0]=o[1],f=nc(d,t,a,i,n,f)):o[1]!==0&&(f=nc(d,t,o,i,n,f)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&xw(d,t,l,c,u),d.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=lL(t.events,n))}return e}function nc(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},Ea(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=Ea(t.events,n[1]);if(a={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Ea(t.events,n[2]),u=Ea(t.events,n[3]),f={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const d=t.events[n[2]],p=t.events[n[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},Ea(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function xw(e,t,n,r,i){const a=[],o=Ea(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function Ea(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const dL={name:"tasklistCheck",tokenize:hL};function pL(){return{text:{91:dL}}}function hL(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return gt(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return Ie(l)?t(l):Ke(l)?e.check({tokenize:mL},t,n)(l):n(l)}}function mL(e,t,n){return Qe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function vL(e){return Gb([z2(),J2(),aL(e),cL(),pL()])}const gL={};function yL(e){const t=this,n=e||gL,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(vL(n)),a.push(M2()),o.push(L2(n))}const yt={container:{className:"bpReset bpContainer"},modal:{container:{className:"bpReset bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalDialogContainer"},title:{container:{className:"bpReset bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpReset bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpReset bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpReset bpComposerUploadButtonContainer"}},voiceButton:{icon:{className:"bpComposerVoiceButtonIcon"},container:{className:"bpReset bpComposerVoiceButtonContainer"}}},messageList:{scrollDownButton:{container:{className:"bpReset bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpReset bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},bL=({text:e})=>{const{message:{blocks:{text:t}}}=yt,n={h1:({node:r,...i})=>C.jsx("h1",{...i,...t==null?void 0:t.heading1}),h2:({node:r,...i})=>C.jsx("h2",{...i,...t==null?void 0:t.heading2}),h3:({node:r,...i})=>C.jsx("h3",{...i,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...i})=>C.jsx("em",{...i,...t==null?void 0:t.italic}),strong:({node:r,...i})=>C.jsx("strong",{...i,...t==null?void 0:t.bold}),p:({node:r,...i})=>C.jsx("p",{...i,...t==null?void 0:t.text}),hr:({node:r,...i})=>C.jsx("hr",{...i,...t==null?void 0:t.horizontalRule}),a:({node:r,...i})=>C.jsx("a",{...i,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...i})=>C.jsx("ol",{...i,...t==null?void 0:t.orderedList}),ul:({node:r,...i})=>C.jsx("ul",{...i,...t==null?void 0:t.unorderedList}),li:({node:r,...i})=>C.jsx("li",{...i,...t==null?void 0:t.listItem}),br:({node:r,...i})=>C.jsx("br",{...i,...t==null?void 0:t.lineBreak}),pre:({node:r,...i})=>C.jsx("pre",{...i,...t==null?void 0:t.pre})};return C.jsx(aM,{components:n,remarkPlugins:[yL,pM],children:e})};function ww(e,t){return function(){return e.apply(t,arguments)}}const{toString:Sw}=Object.prototype,{getPrototypeOf:Gd}=Object,Yd=(e=>t=>{const n=Sw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zr=e=>(e=e.toLowerCase(),t=>Yd(t)===e),rc=e=>t=>typeof t===e,{isArray:_a}=Array,ts=rc("undefined");function xL(e){return e!==null&&!ts(e)&&e.constructor!==null&&!ts(e.constructor)&&Wi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ew=zr("ArrayBuffer");function wL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ew(e.buffer),t}const SL=rc("string"),Wi=rc("function"),_w=rc("number"),Jd=e=>e!==null&&typeof e=="object",EL=e=>e===!0||e===!1,ic=e=>{if(Yd(e)!=="object")return!1;const t=Gd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},_L=zr("Date"),kL=zr("File"),$L=zr("Blob"),OL=zr("FileList"),TL=e=>Jd(e)&&Wi(e.pipe),CL=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Sw.call(e)===t||Wi(e.toString)&&e.toString()===t)},IL=zr("URLSearchParams"),RL=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ns(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),_a(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function kw(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const $w=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ow=e=>!ts(e)&&e!==$w;function Xd(){const{caseless:e}=Ow(this)&&this||{},t={},n=(r,i)=>{const a=e&&kw(t,i)||i;ic(t[a])&&ic(r)?t[a]=Xd(t[a],r):ic(r)?t[a]=Xd({},r):_a(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&ns(arguments[r],n);return t}const AL=(e,t,n,{allOwnKeys:r}={})=>(ns(t,(i,a)=>{n&&Wi(i)?e[a]=ww(i,n):e[a]=i},{allOwnKeys:r}),e),PL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),jL=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},NL=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Gd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},DL=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ML=e=>{if(!e)return null;if(_a(e))return e;let t=e.length;if(!_w(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},LL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Gd(Uint8Array)),FL=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},BL=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},zL=zr("HTMLFormElement"),UL=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Tw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),qL=zr("RegExp"),Cw=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ns(n,(i,a)=>{t(i,a,e)!==!1&&(r[a]=i)}),Object.defineProperties(e,r)},G={isArray:_a,isArrayBuffer:Ew,isBuffer:xL,isFormData:CL,isArrayBufferView:wL,isString:SL,isNumber:_w,isBoolean:EL,isObject:Jd,isPlainObject:ic,isUndefined:ts,isDate:_L,isFile:kL,isBlob:$L,isRegExp:qL,isFunction:Wi,isStream:TL,isURLSearchParams:IL,isTypedArray:LL,isFileList:OL,forEach:ns,merge:Xd,extend:AL,trim:RL,stripBOM:PL,inherits:jL,toFlatObject:NL,kindOf:Yd,kindOfTest:zr,endsWith:DL,toArray:ML,forEachEntry:FL,matchAll:BL,isHTMLForm:zL,hasOwnProperty:Tw,hasOwnProp:Tw,reduceDescriptors:Cw,freezeMethods:e=>{Cw(e,(t,n)=>{if(Wi(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Wi(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return _a(e)?r(e):r(String(e).split(t)),n},toCamelCase:UL,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:kw,global:$w,isContextDefined:Ow,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(Jd(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=_a(r)?[]:{};return ns(r,(o,s)=>{const l=n(o,i+1);!ts(l)&&(a[s]=l)}),t[i]=void 0,a}}return r};return n(e,0)}};function it(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}G.inherits(it,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Iw=it.prototype,Rw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Rw[e]={value:e}}),Object.defineProperties(it,Rw),Object.defineProperty(Iw,"isAxiosError",{value:!0}),it.from=(e,t,n,r,i,a)=>{const o=Object.create(Iw);return G.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),it.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var WL=typeof self=="object"?self.FormData:window.FormData;const HL=Ze(WL);function Qd(e){return G.isPlainObject(e)||G.isArray(e)}function Aw(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function Pw(e,t,n){return e?e.concat(t).map(function(i,a){return i=Aw(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function VL(e){return G.isArray(e)&&!e.some(Qd)}const ZL=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function KL(e){return e&&G.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function ac(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new(HL||FormData),n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!G.isUndefined(y[m])});const r=n.metaTokens,i=n.visitor||u,a=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&KL(t);if(!G.isFunction(i))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(G.isDate(h))return h.toISOString();if(!l&&G.isBlob(h))throw new it("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(h)||G.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,y){let v=h;if(h&&!y&&typeof h=="object"){if(G.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(G.isArray(h)&&VL(h)||G.isFileList(h)||G.endsWith(m,"[]")&&(v=G.toArray(h)))return m=Aw(m),v.forEach(function(b,k){!(G.isUndefined(b)||b===null)&&t.append(o===!0?Pw([m],k,a):o===null?m:m+"[]",c(b))}),!1}return Qd(h)?!0:(t.append(Pw(y,m,a),c(h)),!1)}const f=[],d=Object.assign(ZL,{defaultVisitor:u,convertValue:c,isVisitable:Qd});function p(h,m){if(!G.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(h),G.forEach(h,function(v,g){(!(G.isUndefined(v)||v===null)&&i.call(t,v,G.isString(g)?g.trim():g,m,d))===!0&&p(v,m?m.concat(g):[g])}),f.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return p(e),t}function jw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ep(e,t){this._pairs=[],e&&ac(e,this,t)}const Nw=ep.prototype;Nw.append=function(t,n){this._pairs.push([t,n])},Nw.toString=function(t){const n=t?function(r){return t.call(this,r,jw)}:jw;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function GL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Dw(e,t,n){if(!t)return e;const r=n&&n.encode||GL,i=n&&n.serialize;let a;if(i?a=i(t,n):a=G.isURLSearchParams(t)?t.toString():new ep(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Mw{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Lw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},YL=typeof URLSearchParams<"u"?URLSearchParams:ep,JL=FormData,XL=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),QL=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mr={isBrowser:!0,classes:{URLSearchParams:YL,FormData:JL,Blob},isStandardBrowserEnv:XL,isStandardBrowserWebWorkerEnv:QL,protocols:["http","https","file","blob","url","data"]};function eF(e,t){return ac(e,new mr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return mr.isNode&&G.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function tF(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nF(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Fw(e){function t(n,r,i,a){let o=n[a++];const s=Number.isFinite(+o),l=a>=n.length;return o=!o&&G.isArray(i)?i.length:o,l?(G.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!G.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&G.isArray(i[o])&&(i[o]=nF(i[o])),!s)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(r,i)=>{t(tF(r),i,n,0)}),n}return null}const rF={"Content-Type":void 0};function iF(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ka={transitional:Lw,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=G.isObject(t);if(a&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return i&&i?JSON.stringify(Fw(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return eF(t,this.formSerializer).toString();if((s=G.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ac(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),iF(t)):t}],transformResponse:[function(t){const n=this.transitional||ka.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&G.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?it.from(s,it.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mr.classes.FormData,Blob:mr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};G.forEach(["delete","get","head"],function(t){ka.headers[t]={}}),G.forEach(["post","put","patch"],function(t){ka.headers[t]=G.merge(rF)});const aF=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),oF=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
58
|
-
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&
|
|
59
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Bw]=this[Bw]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=rs(o);r[s]||(uF(i,o),r[s]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}}Dn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),G.freezeMethods(Dn.prototype),G.freezeMethods(Dn);function tp(e,t){const n=this||ka,r=t||n,i=Dn.from(r.headers);let a=r.data;return G.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Uw(e){return!!(e&&e.__CANCEL__)}function is(e,t,n){it.call(this,e??"canceled",it.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(is,it,{__CANCEL__:!0});const fF=null;function dF(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new it("Request failed with status code "+n.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const pF=mr.isStandardBrowserEnv?function(){return{write:function(n,r,i,a,o,s){const l=[];l.push(n+"="+encodeURIComponent(r)),G.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),G.isString(a)&&l.push("path="+a),G.isString(o)&&l.push("domain="+o),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function hF(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function mF(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function qw(e,t){return e&&!hF(t)?mF(e,t):t}const vF=mr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const s=G.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function gF(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function yF(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[a];o||(o=c),n[i]=l,r[i]=c;let f=a,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const p=u&&c-u;return p?Math.round(d*1e3/p):void 0}}function Ww(e,t){let n=0;const r=yF(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-n,l=r(s),c=a<=o;n=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&c?(o-a)/l:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}const sc={http:fF,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const a=Dn.from(e.headers).normalize(),o=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}G.isFormData(i)&&(mr.isStandardBrowserEnv||mr.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(p+":"+h))}const u=qw(e.baseURL,e.url);c.open(e.method.toUpperCase(),Dw(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function f(){if(!c)return;const p=Dn.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:p,config:e,request:c};dF(function(v){n(v),l()},function(v){r(v),l()},m),c=null}if("onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(f)},c.onabort=function(){c&&(r(new it("Request aborted",it.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new it("Network Error",it.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||Lw;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),r(new it(h,m.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,e,c)),c=null},mr.isStandardBrowserEnv){const p=(e.withCredentials||vF(u))&&e.xsrfCookieName&&pF.read(e.xsrfCookieName);p&&a.set(e.xsrfHeaderName,p)}i===void 0&&a.setContentType(null),"setRequestHeader"in c&&G.forEach(a.toJSON(),function(h,m){c.setRequestHeader(m,h)}),G.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&o!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",Ww(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Ww(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=p=>{c&&(r(!p||p.type?new is(null,e,c):p),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const d=gF(u);if(d&&mr.protocols.indexOf(d)===-1){r(new it("Unsupported protocol "+d+":",it.ERR_BAD_REQUEST,e));return}c.send(i||null)})}};G.forEach(sc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const bF={getAdapter:e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=G.isString(n)?sc[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new it(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(G.hasOwnProp(sc,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!G.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:sc};function np(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new is(null,e)}function Hw(e){return np(e),e.headers=Dn.from(e.headers),e.data=tp.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),bF.getAdapter(e.adapter||ka.adapter)(e).then(function(r){return np(e),r.data=tp.call(e,e.transformResponse,r),r.headers=Dn.from(r.headers),r},function(r){return Uw(r)||(np(e),r&&r.response&&(r.response.data=tp.call(e,e.transformResponse,r.response),r.response.headers=Dn.from(r.response.headers))),Promise.reject(r)})}const Vw=e=>e instanceof Dn?e.toJSON():e;function $a(e,t){t=t||{};const n={};function r(c,u,f){return G.isPlainObject(c)&&G.isPlainObject(u)?G.merge.call({caseless:f},c,u):G.isPlainObject(u)?G.merge({},u):G.isArray(u)?u.slice():u}function i(c,u,f){if(G.isUndefined(u)){if(!G.isUndefined(c))return r(void 0,c,f)}else return r(c,u,f)}function a(c,u){if(!G.isUndefined(u))return r(void 0,u)}function o(c,u){if(G.isUndefined(u)){if(!G.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(c,u)=>i(Vw(c),Vw(u),!0)};return G.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const f=l[u]||i,d=f(e[u],t[u],u);G.isUndefined(d)&&f!==s||(n[u]=d)}),n}const Zw="1.2.5",rp={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{rp[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Kw={};rp.transitional=function(t,n,r){function i(a,o){return"[Axios v"+Zw+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new it(i(o," has been removed"+(n?" in "+n:"")),it.ERR_DEPRECATED);return n&&!Kw[o]&&(Kw[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};function xF(e,t,n){if(typeof e!="object")throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new it("option "+a+" must be "+l,it.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new it("Unknown option "+a,it.ERR_BAD_OPTION)}}const ip={assertOptions:xF,validators:rp},li=ip.validators;class Hi{constructor(t){this.defaults=t,this.interceptors={request:new Mw,response:new Mw}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$a(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&ip.assertOptions(r,{silentJSONParsing:li.transitional(li.boolean),forcedJSONParsing:li.transitional(li.boolean),clarifyTimeoutError:li.transitional(li.boolean)},!1),i!==void 0&&ip.assertOptions(i,{encode:li.function,serialize:li.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=a&&G.merge(a.common,a[n.method]),o&&G.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),n.headers=Dn.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,f=0,d;if(!l){const h=[Hw.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),d=h.length,u=Promise.resolve(n);f<d;)u=u.then(h[f++],h[f++]);return u}d=s.length;let p=n;for(f=0;f<d;){const h=s[f++],m=s[f++];try{p=h(p)}catch(y){m.call(this,y);break}}try{u=Hw.call(this,p)}catch(h){return Promise.reject(h)}for(f=0,d=c.length;f<d;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=$a(this.defaults,t);const n=qw(t.baseURL,t.url);return Dw(n,t.params,t.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(n,r){return this.request($a(r||{},{method:t,url:n,data:(r||{}).data}))}}),G.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request($a(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Hi.prototype[t]=n(),Hi.prototype[t+"Form"]=n(!0)});class ap{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new is(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ap(function(i){t=i}),cancel:t}}}function wF(e){return function(n){return e.apply(null,n)}}function SF(e){return G.isObject(e)&&e.isAxiosError===!0}const op={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(op).forEach(([e,t])=>{op[t]=e});function Gw(e){const t=new Hi(e),n=ww(Hi.prototype.request,t);return G.extend(n,Hi.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Gw($a(e,i))},n}const At=Gw(ka);At.Axios=Hi,At.CanceledError=is,At.CancelToken=ap,At.isCancel=Uw,At.VERSION=Zw,At.toFormData=ac,At.AxiosError=it,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=wF,At.isAxiosError=SF,At.mergeConfig=$a,At.AxiosHeaders=Dn,At.formToJSON=e=>Fw(G.isHTMLForm(e)?new FormData(e):e),At.HttpStatusCode=op,At.default=At;const Yw={},EF=Object.freeze(Object.defineProperty({__proto__:null,default:Yw},Symbol.toStringTag,{value:"Module"}));var _F=Error,kF=EvalError,$F=RangeError,OF=ReferenceError,Jw=SyntaxError,ci=TypeError,TF=URIError,lc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,n);if(o.value!==i||o.enumerable!==!0)return!1}return!0},Xw=typeof Symbol<"u"&&Symbol,CF=lc,sp=function(){return typeof Xw!="function"||typeof Symbol!="function"||typeof Xw("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:CF()},lp={__proto__:null,foo:{}},IF=Object,RF=function(){return{__proto__:lp}.foo===lp.foo&&!(lp instanceof IF)},AF="Function.prototype.bind called on incompatible ",PF=Object.prototype.toString,jF=Math.max,NF="[object Function]",Qw=function(t,n){for(var r=[],i=0;i<t.length;i+=1)r[i]=t[i];for(var a=0;a<n.length;a+=1)r[a+t.length]=n[a];return r},DF=function(t,n){for(var r=[],i=n,a=0;i<t.length;i+=1,a+=1)r[a]=t[i];return r},MF=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},LF=function(t){var n=this;if(typeof n!="function"||PF.apply(n)!==NF)throw new TypeError(AF+n);for(var r=DF(arguments,1),i,a=function(){if(this instanceof i){var u=n.apply(this,Qw(r,arguments));return Object(u)===u?u:this}return n.apply(t,Qw(r,arguments))},o=jF(0,n.length-r.length),s=[],l=0;l<o;l++)s[l]="$"+l;if(i=Function("binder","return function ("+MF(s,",")+"){ return binder.apply(this,arguments); }")(a),n.prototype){var c=function(){};c.prototype=n.prototype,i.prototype=new c,c.prototype=null}return i},FF=LF,cp=Function.prototype.bind||FF,BF=Function.prototype.call,zF=Object.prototype.hasOwnProperty,UF=cp,e0=UF.call(BF,zF),Ye,qF=_F,WF=kF,HF=$F,VF=OF,Oa=Jw,Ta=ci,ZF=TF,t0=Function,up=function(e){try{return t0('"use strict"; return ('+e+").constructor;")()}catch{}},Vi=Object.getOwnPropertyDescriptor;if(Vi)try{Vi({},"")}catch{Vi=null}var fp=function(){throw new Ta},KF=Vi?function(){try{return arguments.callee,fp}catch{try{return Vi(arguments,"callee").get}catch{return fp}}}():fp,Ca=sp(),GF=RF(),Vt=Object.getPrototypeOf||(GF?function(e){return e.__proto__}:null),Ia={},YF=typeof Uint8Array>"u"||!Vt?Ye:Vt(Uint8Array),Zi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ye:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ye:ArrayBuffer,"%ArrayIteratorPrototype%":Ca&&Vt?Vt([][Symbol.iterator]()):Ye,"%AsyncFromSyncIteratorPrototype%":Ye,"%AsyncFunction%":Ia,"%AsyncGenerator%":Ia,"%AsyncGeneratorFunction%":Ia,"%AsyncIteratorPrototype%":Ia,"%Atomics%":typeof Atomics>"u"?Ye:Atomics,"%BigInt%":typeof BigInt>"u"?Ye:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ye:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ye:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ye:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":qF,"%eval%":eval,"%EvalError%":WF,"%Float32Array%":typeof Float32Array>"u"?Ye:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ye:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ye:FinalizationRegistry,"%Function%":t0,"%GeneratorFunction%":Ia,"%Int8Array%":typeof Int8Array>"u"?Ye:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ye:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ye:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ca&&Vt?Vt(Vt([][Symbol.iterator]())):Ye,"%JSON%":typeof JSON=="object"?JSON:Ye,"%Map%":typeof Map>"u"?Ye:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ca||!Vt?Ye:Vt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ye:Promise,"%Proxy%":typeof Proxy>"u"?Ye:Proxy,"%RangeError%":HF,"%ReferenceError%":VF,"%Reflect%":typeof Reflect>"u"?Ye:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ye:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ca||!Vt?Ye:Vt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ye:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ca&&Vt?Vt(""[Symbol.iterator]()):Ye,"%Symbol%":Ca?Symbol:Ye,"%SyntaxError%":Oa,"%ThrowTypeError%":KF,"%TypedArray%":YF,"%TypeError%":Ta,"%Uint8Array%":typeof Uint8Array>"u"?Ye:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ye:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ye:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ye:Uint32Array,"%URIError%":ZF,"%WeakMap%":typeof WeakMap>"u"?Ye:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ye:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ye:WeakSet};if(Vt)try{null.error}catch(e){var JF=Vt(Vt(e));Zi["%Error.prototype%"]=JF}var XF=function e(t){var n;if(t==="%AsyncFunction%")n=up("async function () {}");else if(t==="%GeneratorFunction%")n=up("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=up("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Vt&&(n=Vt(i.prototype))}return Zi[t]=n,n},n0={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},as=cp,cc=e0,QF=as.call(Function.call,Array.prototype.concat),e5=as.call(Function.apply,Array.prototype.splice),r0=as.call(Function.call,String.prototype.replace),uc=as.call(Function.call,String.prototype.slice),t5=as.call(Function.call,RegExp.prototype.exec),n5=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,r5=/\\(\\)?/g,i5=function(t){var n=uc(t,0,1),r=uc(t,-1);if(n==="%"&&r!=="%")throw new Oa("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Oa("invalid intrinsic syntax, expected opening `%`");var i=[];return r0(t,n5,function(a,o,s,l){i[i.length]=s?r0(l,r5,"$1"):o||a}),i},a5=function(t,n){var r=t,i;if(cc(n0,r)&&(i=n0[r],r="%"+i[0]+"%"),cc(Zi,r)){var a=Zi[r];if(a===Ia&&(a=XF(r)),typeof a>"u"&&!n)throw new Ta("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:a}}throw new Oa("intrinsic "+t+" does not exist!")},vr=function(t,n){if(typeof t!="string"||t.length===0)throw new Ta("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Ta('"allowMissing" argument must be a boolean');if(t5(/^%?[^%]*%?$/,t)===null)throw new Oa("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=i5(t),i=r.length>0?r[0]:"",a=a5("%"+i+"%",n),o=a.name,s=a.value,l=!1,c=a.alias;c&&(i=c[0],e5(r,QF([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var d=r[u],p=uc(d,0,1),h=uc(d,-1);if((p==='"'||p==="'"||p==="`"||h==='"'||h==="'"||h==="`")&&p!==h)throw new Oa("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(l=!0),i+="."+d,o="%"+i+"%",cc(Zi,o))s=Zi[o];else if(s!=null){if(!(d in s)){if(!n)throw new Ta("base intrinsic for "+t+" exists, but the property is not available.");return}if(Vi&&u+1>=r.length){var m=Vi(s,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[d]}else f=cc(s,d),s=s[d];f&&!l&&(Zi[o]=s)}}return s},i0={exports:{}},o5=vr,fc=o5("%Object.defineProperty%",!0)||!1;if(fc)try{fc({},"a",{value:1})}catch{fc=!1}var dp=fc,s5=vr,dc=s5("%Object.getOwnPropertyDescriptor%",!0);if(dc)try{dc([],"length")}catch{dc=null}var pp=dc,a0=dp,l5=Jw,Ra=ci,o0=pp,hp=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Ra("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Ra("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ra("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ra("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ra("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ra("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!o0&&o0(t,n);if(a0)a0(t,n,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:r,writable:a===null&&l?l.writable:!a});else if(s||!i&&!a&&!o)t[n]=r;else throw new l5("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},mp=dp,s0=function(){return!!mp};s0.hasArrayLengthDefineBug=function(){if(!mp)return null;try{return mp([],"length",{value:1}).length!==1}catch{return!0}};var vp=s0,c5=vr,l0=hp,u5=vp(),c0=pp,u0=ci,f5=c5("%Math.floor%"),d5=function(t,n){if(typeof t!="function")throw new u0("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||f5(n)!==n)throw new u0("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&c0){var o=c0(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!r)&&(u5?l0(t,"length",n,!0,!0):l0(t,"length",n)),t};(function(e){var t=cp,n=vr,r=d5,i=ci,a=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(o,a),l=dp,c=n("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var p=s(t,o,arguments);return r(p,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return s(t,a,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(i0);var Aa=i0.exports,f0=vr,d0=Aa,p5=d0(f0("String.prototype.indexOf")),Mn=function(t,n){var r=f0(t,!!n);return typeof r=="function"&&p5(t,".prototype.")>-1?d0(r):r};const h5=lR(EF);var gp=typeof Map=="function"&&Map.prototype,yp=Object.getOwnPropertyDescriptor&&gp?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,pc=gp&&yp&&typeof yp.get=="function"?yp.get:null,p0=gp&&Map.prototype.forEach,bp=typeof Set=="function"&&Set.prototype,xp=Object.getOwnPropertyDescriptor&&bp?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,hc=bp&&xp&&typeof xp.get=="function"?xp.get:null,h0=bp&&Set.prototype.forEach,m5=typeof WeakMap=="function"&&WeakMap.prototype,os=m5?WeakMap.prototype.has:null,v5=typeof WeakSet=="function"&&WeakSet.prototype,ss=v5?WeakSet.prototype.has:null,g5=typeof WeakRef=="function"&&WeakRef.prototype,m0=g5?WeakRef.prototype.deref:null,y5=Boolean.prototype.valueOf,b5=Object.prototype.toString,x5=Function.prototype.toString,w5=String.prototype.match,wp=String.prototype.slice,ui=String.prototype.replace,S5=String.prototype.toUpperCase,v0=String.prototype.toLowerCase,g0=RegExp.prototype.test,y0=Array.prototype.concat,gr=Array.prototype.join,E5=Array.prototype.slice,b0=Math.floor,Sp=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ep=Object.getOwnPropertySymbols,_p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Pa=typeof Symbol=="function"&&typeof Symbol.iterator=="object",nn=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Pa||!0)?Symbol.toStringTag:null,x0=Object.prototype.propertyIsEnumerable,w0=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function S0(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||g0.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-b0(-e):b0(e);if(r!==e){var i=String(r),a=wp.call(t,i.length+1);return ui.call(i,n,"$&_")+"."+ui.call(ui.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ui.call(t,n,"$&_")}var kp=h5,E0=kp.custom,_0=O0(E0)?E0:null,_5=function e(t,n,r,i){var a=n||{};if(fi(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(fi(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=fi(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(fi(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(fi(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return C0(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?S0(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?S0(t,c):c}var u=typeof a.depth>"u"?5:a.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return $p(t)?"[Array]":"[Object]";var f=U5(a,r);if(typeof i>"u")i=[];else if(T0(i,t)>=0)return"[Circular]";function d(L,U,M){if(U&&(i=E5.call(i),i.push(U)),M){var I={depth:a.depth};return fi(a,"quoteStyle")&&(I.quoteStyle=a.quoteStyle),e(L,I,r+1,i)}return e(L,a,r+1,i)}if(typeof t=="function"&&!$0(t)){var p=P5(t),h=mc(t,d);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(h.length>0?" { "+gr.call(h,", ")+" }":"")}if(O0(t)){var m=Pa?ui.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):_p.call(t);return typeof t=="object"&&!Pa?ls(m):m}if(F5(t)){for(var y="<"+v0.call(String(t.nodeName)),v=t.attributes||[],g=0;g<v.length;g++)y+=" "+v[g].name+"="+k0(k5(v[g].value),"double",a);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+v0.call(String(t.nodeName))+">",y}if($p(t)){if(t.length===0)return"[]";var b=mc(t,d);return f&&!z5(b)?"["+Tp(b,f)+"]":"[ "+gr.call(b,", ")+" ]"}if(O5(t)){var k=mc(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!x0.call(t,"cause")?"{ ["+String(t)+"] "+gr.call(y0.call("[cause]: "+d(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+gr.call(k,", ")+" }"}if(typeof t=="object"&&o){if(_0&&typeof t[_0]=="function"&&kp)return kp(t,{depth:u-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(j5(t)){var S=[];return p0&&p0.call(t,function(L,U){S.push(d(U,t,!0)+" => "+d(L,t))}),I0("Map",pc.call(t),S,f)}if(M5(t)){var _=[];return h0&&h0.call(t,function(L){_.push(d(L,t))}),I0("Set",hc.call(t),_,f)}if(N5(t))return Op("WeakMap");if(L5(t))return Op("WeakSet");if(D5(t))return Op("WeakRef");if(C5(t))return ls(d(Number(t)));if(R5(t))return ls(d(Sp.call(t)));if(I5(t))return ls(y5.call(t));if(T5(t))return ls(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof ut<"u"&&t===ut)return"{ [object globalThis] }";if(!$5(t)&&!$0(t)){var $=mc(t,d),j=w0?w0(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",O=!j&&nn&&Object(t)===t&&nn in t?wp.call(di(t),8,-1):z?"Object":"",N=j||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=N+(O||z?"["+gr.call(y0.call([],O||[],z||[]),": ")+"] ":"");return $.length===0?W+"{}":f?W+"{"+Tp($,f)+"}":W+"{ "+gr.call($,", ")+" }"}return String(t)};function k0(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function k5(e){return ui.call(String(e),/"/g,""")}function $p(e){return di(e)==="[object Array]"&&(!nn||!(typeof e=="object"&&nn in e))}function $5(e){return di(e)==="[object Date]"&&(!nn||!(typeof e=="object"&&nn in e))}function $0(e){return di(e)==="[object RegExp]"&&(!nn||!(typeof e=="object"&&nn in e))}function O5(e){return di(e)==="[object Error]"&&(!nn||!(typeof e=="object"&&nn in e))}function T5(e){return di(e)==="[object String]"&&(!nn||!(typeof e=="object"&&nn in e))}function C5(e){return di(e)==="[object Number]"&&(!nn||!(typeof e=="object"&&nn in e))}function I5(e){return di(e)==="[object Boolean]"&&(!nn||!(typeof e=="object"&&nn in e))}function O0(e){if(Pa)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!_p)return!1;try{return _p.call(e),!0}catch{}return!1}function R5(e){if(!e||typeof e!="object"||!Sp)return!1;try{return Sp.call(e),!0}catch{}return!1}var A5=Object.prototype.hasOwnProperty||function(e){return e in this};function fi(e,t){return A5.call(e,t)}function di(e){return b5.call(e)}function P5(e){if(e.name)return e.name;var t=w5.call(x5.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function T0(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function j5(e){if(!pc||!e||typeof e!="object")return!1;try{pc.call(e);try{hc.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function N5(e){if(!os||!e||typeof e!="object")return!1;try{os.call(e,os);try{ss.call(e,ss)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function D5(e){if(!m0||!e||typeof e!="object")return!1;try{return m0.call(e),!0}catch{}return!1}function M5(e){if(!hc||!e||typeof e!="object")return!1;try{hc.call(e);try{pc.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function L5(e){if(!ss||!e||typeof e!="object")return!1;try{ss.call(e,ss);try{os.call(e,os)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function F5(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function C0(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return C0(wp.call(e,0,t.maxStringLength),t)+r}var i=ui.call(ui.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,B5);return k0(i,"single",t)}function B5(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+S5.call(t.toString(16))}function ls(e){return"Object("+e+")"}function Op(e){return e+" { ? }"}function I0(e,t,n,r){var i=r?Tp(n,r):gr.call(n,", ");return e+" ("+t+") {"+i+"}"}function z5(e){for(var t=0;t<e.length;t++)if(T0(e[t],`
|
|
57
|
+
`))}function l(p,h,m,y){const v=m.enter("tableCell"),g=m.enter("phrasing"),b=m.containerPhrasing(p,{...y,before:a,after:a});return g(),v(),b}function c(p,h){return ZM(p,{align:h,alignDelimiters:r,padding:n,stringLength:i})}function u(p,h,m){const y=p.children;let v=-1;const g=[],b=h.enter("table");for(;++v<y.length;)g[v]=f(y[v],h,m);return b(),g}function f(p,h,m){const y=p.children;let v=-1;const g=[],b=h.enter("tableRow");for(;++v<y.length;)g[v]=l(y[v],p,h,m);return b(),g}function d(p,h,m){let y=cw.inlineCode(p,h,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function j2(){return{exit:{taskListCheckValueChecked:fw,taskListCheckValueUnchecked:fw,paragraph:D2}}}function N2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:M2}}}function fw(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function D2(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let a=-1,o;for(;++a<i.length;){const s=i[a];if(s.type==="paragraph"){o=s;break}}o===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function M2(e,t,n,r){const i=e.children[0],a=typeof e.checked=="boolean"&&i&&i.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);a&&s.move(o);let l=cw.listItem(e,t,n,{...r,...s.current()});return a&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+o}}function L2(){return[mM(),OM(),zM(),O2(),j2()]}function F2(e){return{extensions:[vM(),TM(),UM(),P2(e),N2()]}}const B2={tokenize:V2,partial:!0},dw={tokenize:Z2,partial:!0},pw={tokenize:K2,partial:!0},hw={tokenize:G2,partial:!0},z2={tokenize:Y2,partial:!0},mw={name:"wwwAutolink",tokenize:W2,previous:gw},vw={name:"protocolAutolink",tokenize:H2,previous:yw},Br={name:"emailAutolink",tokenize:q2,previous:bw},hr={};function U2(){return{text:hr}}let qi=48;for(;qi<123;)hr[qi]=Br,qi++,qi===58?qi=65:qi===91&&(qi=97);hr[43]=Br,hr[45]=Br,hr[46]=Br,hr[95]=Br,hr[72]=[Br,vw],hr[104]=[Br,vw],hr[87]=[Br,mw],hr[119]=[Br,mw];function q2(e,t,n){const r=this;let i,a;return o;function o(f){return!Vd(f)||!bw.call(r,r.previous)||Zd(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Vd(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(z2,u,c)(f):f===45||f===95||tn(f)?(a=!0,e.consume(f),l):u(f)}function c(f){return e.consume(f),i=!0,l}function u(f){return a&&i&&cn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function W2(e,t,n){const r=this;return i;function i(o){return o!==87&&o!==119||!gw.call(r,r.previous)||Zd(r.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(B2,e.attempt(dw,e.attempt(pw,a),n),n)(o))}function a(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function H2(e,t,n){const r=this;let i="",a=!1;return o;function o(f){return(f===72||f===104)&&yw.call(r,r.previous)&&!Zd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(cn(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),a?c:(a=!0,l)):n(f)}function c(f){return f===null||zl(f)||gt(f)||Ui(f)||Ul(f)?n(f):e.attempt(dw,e.attempt(pw,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function V2(e,t,n){let r=0;return i;function i(o){return(o===87||o===119)&&r<3?(r++,e.consume(o),i):o===46&&r===3?(e.consume(o),a):n(o)}function a(o){return o===null?n(o):t(o)}}function Z2(e,t,n){let r,i,a;return o;function o(c){return c===46||c===95?e.check(hw,l,s)(c):c===null||gt(c)||Ui(c)||c!==45&&Ul(c)?l(c):(a=!0,e.consume(c),o)}function s(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),o}function l(c){return i||r||!a?n(c):t(c)}}function K2(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(hw,t,a)(o):o===null||gt(o)||Ui(o)?t(o):(e.consume(o),i)}function a(o){return o===41&&r++,e.consume(o),i}}function G2(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),a):s===93?(e.consume(s),i):s===60||s===null||gt(s)||Ui(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||gt(s)||Ui(s)?t(s):r(s)}function a(s){return cn(s)?o(s):n(s)}function o(s){return s===59?(e.consume(s),r):cn(s)?(e.consume(s),o):n(s)}}function Y2(e,t,n){return r;function r(a){return e.consume(a),i}function i(a){return tn(a)?n(a):t(a)}}function gw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||gt(e)}function yw(e){return!cn(e)}function bw(e){return!(e===47||Vd(e))}function Vd(e){return e===43||e===45||e===46||e===95||tn(e)}function Zd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const J2={tokenize:aL,partial:!0};function X2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:nL,continuation:{tokenize:rL},exit:iL}},text:{91:{name:"gfmFootnoteCall",tokenize:tL},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Q2,resolveTo:eL}}}}function Q2(e,t,n){const r=this;let i=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){o=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!o||!o._balanced)return n(l);const c=Kn(r.sliceSerialize({start:o.end,end:r.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function eL(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function tL(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,o;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!o||f===null||f===91||gt(f))return n(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Kn(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return gt(f)||(o=!0),a++,e.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function nL(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,o=0,s;return l;function l(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(h)}function u(h){if(o>999||h===93&&!s||h===null||h===91||gt(h))return n(h);if(h===93){e.exit("chunkString");const m=e.exit("gfmFootnoteDefinitionLabelString");return a=Kn(r.sliceSerialize(m)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return gt(h)||(s=!0),o++,e.consume(h),h===92?f:u}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,u):u(h)}function d(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),i.includes(a)||i.push(a),Qe(e,p,"gfmFootnoteDefinitionWhitespace")):n(h)}function p(h){return t(h)}}function rL(e,t,n){return e.check(Yo,t,e.attempt(J2,t,n))}function iL(e){e.exit("gfmFootnoteDefinition")}function aL(e,t,n){const r=this;return Qe(e,i,"gfmFootnoteDefinitionIndent",5);function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(a):n(a)}}function oL(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(o,s){let l=-1;for(;++l<o.length;)if(o[l][0]==="enter"&&o[l][1].type==="strikethroughSequenceTemporary"&&o[l][1]._close){let c=l;for(;c--;)if(o[c][0]==="exit"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._open&&o[l][1].end.offset-o[l][1].start.offset===o[c][1].end.offset-o[c][1].start.offset){o[l][1].type="strikethroughSequence",o[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},o[c][1].start),end:Object.assign({},o[l][1].end)},f={type:"strikethroughText",start:Object.assign({},o[c][1].end),end:Object.assign({},o[l][1].start)},d=[["enter",u,s],["enter",o[c][1],s],["exit",o[c][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&jn(d,d.length,0,Wl(p,o.slice(c+1,l),s)),jn(d,d.length,0,[["exit",f,s],["enter",o[l][1],s],["exit",o[l][1],s],["exit",u,s]]),jn(o,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<o.length;)o[l][1].type==="strikethroughSequenceTemporary"&&(o[l][1].type="data");return o}function a(o,s,l){const c=this.previous,u=this.events;let f=0;return d;function d(h){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(h):(o.enter("strikethroughSequenceTemporary"),p(h))}function p(h){const m=ql(c);if(h===126)return f>1?l(h):(o.consume(h),f++,p);if(f<2&&!n)return l(h);const y=o.exit("strikethroughSequenceTemporary"),v=ql(h);return y._open=!v||v===2&&!!m,y._close=!m||m===2&&!!v,s(h)}}}class sL{constructor(){this.map=[]}add(t,n,r){lL(this,t,n,r)}consume(t){if(this.map.sort(function(a,o){return a[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function lL(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function cL(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function uL(){return{flow:{null:{name:"table",tokenize:fL,resolveAll:dL}}}}function fL(e,t,n){const r=this;let i=0,a=0,o;return s;function s(O){let N=r.events.length-1;for(;N>-1;){const U=r.events[N][1].type;if(U==="lineEnding"||U==="linePrefix")N--;else break}const W=N>-1?r.events[N][1].type:null,L=W==="tableHead"||W==="tableRow"?_:l;return L===_&&r.parser.lazy[r.now().line]?n(O):L(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),c(O)}function c(O){return O===124||(o=!0,a+=1),u(O)}function u(O){return O===null?n(O):Ie(O)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),p):n(O):Ke(O)?Qe(e,u,"whitespace")(O):(a+=1,o&&(o=!1,i+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),o=!0,u):(e.enter("data"),f(O)))}function f(O){return O===null||O===124||gt(O)?(e.exit("data"),u(O)):(e.consume(O),O===92?d:f)}function d(O){return O===92||O===124?(e.consume(O),f):f(O)}function p(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),o=!1,Ke(O)?Qe(e,h,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):h(O))}function h(O){return O===45||O===58?y(O):O===124?(o=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),m):S(O)}function m(O){return Ke(O)?Qe(e,y,"whitespace")(O):y(O)}function y(O){return O===58?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),v):O===45?(a+=1,v(O)):O===null||Ie(O)?k(O):S(O)}function v(O){return O===45?(e.enter("tableDelimiterFiller"),g(O)):S(O)}function g(O){return O===45?(e.consume(O),g):O===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(O))}function b(O){return Ke(O)?Qe(e,k,"whitespace")(O):k(O)}function k(O){return O===124?h(O):O===null||Ie(O)?!o||i!==a?S(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):S(O)}function S(O){return n(O)}function _(O){return e.enter("tableRow"),$(O)}function $(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),$):O===null||Ie(O)?(e.exit("tableRow"),t(O)):Ke(O)?Qe(e,$,"whitespace")(O):(e.enter("data"),j(O))}function j(O){return O===null||O===124||gt(O)?(e.exit("data"),$(O)):(e.consume(O),O===92?z:j)}function z(O){return O===92||O===124?(e.consume(O),j):j(O)}}function dL(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,l=0,c,u,f;const d=new sL;for(;++n<e.length;){const p=e[n],h=p[1];p[0]==="enter"?h.type==="tableHead"?(s=!1,l!==0&&(xw(d,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(n,0,[["enter",c,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(r=!0,f=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},d.add(n,0,[["enter",u,t]])),i=h.type==="tableDelimiterRow"?2:u?3:1):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],f=nc(d,t,a,i,void 0,f),a=[0,0,0,0]),o[2]=n)):h.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],f=nc(d,t,a,i,void 0,f)),a=o,o=[a[1],n,0,0])):h.type==="tableHead"?(s=!0,l=n):h.type==="tableRow"||h.type==="tableDelimiterRow"?(l=n,a[1]!==0?(o[0]=o[1],f=nc(d,t,a,i,n,f)):o[1]!==0&&(f=nc(d,t,o,i,n,f)),i=0):i&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(o[3]=n)}for(l!==0&&xw(d,t,l,c,u),d.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=cL(t.events,n))}return e}function nc(e,t,n,r,i,a){const o=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},Ea(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const l=Ea(t.events,n[1]);if(a={type:o,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=Ea(t.events,n[2]),u=Ea(t.events,n[3]),f={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const d=t.events[n[2]],p=t.events[n[3]];if(d[1].end=Object.assign({},p[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const h=n[2]+1,m=n[3]-n[2]-1;e.add(h,m,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(a.end=Object.assign({},Ea(t.events,i)),e.add(i,0,[["exit",a,t]]),a=void 0),a}function xw(e,t,n,r,i){const a=[],o=Ea(t.events,n);i&&(i.end=Object.assign({},o),a.push(["exit",i,t])),r.end=Object.assign({},o),a.push(["exit",r,t]),e.add(n+1,0,a)}function Ea(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const pL={name:"tasklistCheck",tokenize:mL};function hL(){return{text:{91:pL}}}function mL(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),a)}function a(l){return gt(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),o):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),o):n(l)}function o(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return Ie(l)?t(l):Ke(l)?e.check({tokenize:vL},t,n)(l):n(l)}}function vL(e,t,n){return Qe(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function gL(e){return Gb([U2(),X2(),oL(e),uL(),hL()])}const yL={};function bL(e){const t=this,n=e||yL,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),o=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(gL(n)),a.push(L2()),o.push(F2(n))}const yt={container:{className:"bpReset bpContainer"},modal:{container:{className:"bpReset bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalDialogContainer"},title:{container:{className:"bpReset bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpReset bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpReset bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpReset bpComposerUploadButtonContainer"}},voiceButton:{icon:{className:"bpComposerVoiceButtonIcon"},container:{className:"bpReset bpComposerVoiceButtonContainer"}}},messageList:{scrollDownButton:{container:{className:"bpReset bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpReset bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},listItem:{className:"bpMessageBlocksTextListItem"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},pre:{className:"bpMessageBlocksTextPre"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{className:"bpMessageBlocksBubble"},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}},xL=({text:e})=>{const{message:{blocks:{text:t}}}=yt,n={h1:({node:r,...i})=>C.jsx("h1",{...i,...t==null?void 0:t.heading1}),h2:({node:r,...i})=>C.jsx("h2",{...i,...t==null?void 0:t.heading2}),h3:({node:r,...i})=>C.jsx("h3",{...i,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:r,...i})=>C.jsx("em",{...i,...t==null?void 0:t.italic}),strong:({node:r,...i})=>C.jsx("strong",{...i,...t==null?void 0:t.bold}),p:({node:r,...i})=>C.jsx("p",{...i,...t==null?void 0:t.text}),hr:({node:r,...i})=>C.jsx("hr",{...i,...t==null?void 0:t.horizontalRule}),a:({node:r,...i})=>C.jsx("a",{...i,...t==null?void 0:t.link,target:"_blank"}),ol:({node:r,...i})=>C.jsx("ol",{...i,...t==null?void 0:t.orderedList}),ul:({node:r,...i})=>C.jsx("ul",{...i,...t==null?void 0:t.unorderedList}),li:({node:r,...i})=>C.jsx("li",{...i,...t==null?void 0:t.listItem}),br:({node:r,...i})=>C.jsx("br",{...i,...t==null?void 0:t.lineBreak}),pre:({node:r,...i})=>C.jsx("pre",{...i,...t==null?void 0:t.pre})};return C.jsx(oM,{components:n,remarkPlugins:[bL,hM],children:e})};function ww(e,t){return function(){return e.apply(t,arguments)}}const{toString:Sw}=Object.prototype,{getPrototypeOf:Kd}=Object,Gd=(e=>t=>{const n=Sw.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),zr=e=>(e=e.toLowerCase(),t=>Gd(t)===e),rc=e=>t=>typeof t===e,{isArray:_a}=Array,ts=rc("undefined");function wL(e){return e!==null&&!ts(e)&&e.constructor!==null&&!ts(e.constructor)&&Wi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ew=zr("ArrayBuffer");function SL(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ew(e.buffer),t}const EL=rc("string"),Wi=rc("function"),_w=rc("number"),Yd=e=>e!==null&&typeof e=="object",_L=e=>e===!0||e===!1,ic=e=>{if(Gd(e)!=="object")return!1;const t=Kd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},kL=zr("Date"),$L=zr("File"),OL=zr("Blob"),TL=zr("FileList"),CL=e=>Yd(e)&&Wi(e.pipe),IL=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||Sw.call(e)===t||Wi(e.toString)&&e.toString()===t)},RL=zr("URLSearchParams"),AL=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ns(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),_a(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;let s;for(r=0;r<o;r++)s=a[r],t.call(null,e[s],s,e)}}function kw(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const $w=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ow=e=>!ts(e)&&e!==$w;function Jd(){const{caseless:e}=Ow(this)&&this||{},t={},n=(r,i)=>{const a=e&&kw(t,i)||i;ic(t[a])&&ic(r)?t[a]=Jd(t[a],r):ic(r)?t[a]=Jd({},r):_a(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&ns(arguments[r],n);return t}const PL=(e,t,n,{allOwnKeys:r}={})=>(ns(t,(i,a)=>{n&&Wi(i)?e[a]=ww(i,n):e[a]=i},{allOwnKeys:r}),e),jL=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),NL=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},DL=(e,t,n,r)=>{let i,a,o;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Kd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ML=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},LL=e=>{if(!e)return null;if(_a(e))return e;let t=e.length;if(!_w(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},FL=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Kd(Uint8Array)),BL=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},zL=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},UL=zr("HTMLFormElement"),qL=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Tw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),WL=zr("RegExp"),Cw=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ns(n,(i,a)=>{t(i,a,e)!==!1&&(r[a]=i)}),Object.defineProperties(e,r)},G={isArray:_a,isArrayBuffer:Ew,isBuffer:wL,isFormData:IL,isArrayBufferView:SL,isString:EL,isNumber:_w,isBoolean:_L,isObject:Yd,isPlainObject:ic,isUndefined:ts,isDate:kL,isFile:$L,isBlob:OL,isRegExp:WL,isFunction:Wi,isStream:CL,isURLSearchParams:RL,isTypedArray:FL,isFileList:TL,forEach:ns,merge:Jd,extend:PL,trim:AL,stripBOM:jL,inherits:NL,toFlatObject:DL,kindOf:Gd,kindOfTest:zr,endsWith:ML,toArray:LL,forEachEntry:BL,matchAll:zL,isHTMLForm:UL,hasOwnProperty:Tw,hasOwnProp:Tw,reduceDescriptors:Cw,freezeMethods:e=>{Cw(e,(t,n)=>{if(Wi(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Wi(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet:(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return _a(e)?r(e):r(String(e).split(t)),n},toCamelCase:qL,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:kw,global:$w,isContextDefined:Ow,toJSONObject:e=>{const t=new Array(10),n=(r,i)=>{if(Yd(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=_a(r)?[]:{};return ns(r,(o,s)=>{const l=n(o,i+1);!ts(l)&&(a[s]=l)}),t[i]=void 0,a}}return r};return n(e,0)}};function it(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}G.inherits(it,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Iw=it.prototype,Rw={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Rw[e]={value:e}}),Object.defineProperties(it,Rw),Object.defineProperty(Iw,"isAxiosError",{value:!0}),it.from=(e,t,n,r,i,a)=>{const o=Object.create(Iw);return G.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),it.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};var HL=typeof self=="object"?self.FormData:window.FormData;const VL=Ze(HL);function Xd(e){return G.isPlainObject(e)||G.isArray(e)}function Aw(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function Pw(e,t,n){return e?e.concat(t).map(function(i,a){return i=Aw(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function ZL(e){return G.isArray(e)&&!e.some(Xd)}const KL=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function GL(e){return e&&G.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function ac(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new(VL||FormData),n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!G.isUndefined(y[m])});const r=n.metaTokens,i=n.visitor||u,a=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&GL(t);if(!G.isFunction(i))throw new TypeError("visitor must be a function");function c(h){if(h===null)return"";if(G.isDate(h))return h.toISOString();if(!l&&G.isBlob(h))throw new it("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(h)||G.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,y){let v=h;if(h&&!y&&typeof h=="object"){if(G.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(G.isArray(h)&&ZL(h)||G.isFileList(h)||G.endsWith(m,"[]")&&(v=G.toArray(h)))return m=Aw(m),v.forEach(function(b,k){!(G.isUndefined(b)||b===null)&&t.append(o===!0?Pw([m],k,a):o===null?m:m+"[]",c(b))}),!1}return Xd(h)?!0:(t.append(Pw(y,m,a),c(h)),!1)}const f=[],d=Object.assign(KL,{defaultVisitor:u,convertValue:c,isVisitable:Xd});function p(h,m){if(!G.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));f.push(h),G.forEach(h,function(v,g){(!(G.isUndefined(v)||v===null)&&i.call(t,v,G.isString(g)?g.trim():g,m,d))===!0&&p(v,m?m.concat(g):[g])}),f.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return p(e),t}function jw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Qd(e,t){this._pairs=[],e&&ac(e,this,t)}const Nw=Qd.prototype;Nw.append=function(t,n){this._pairs.push([t,n])},Nw.toString=function(t){const n=t?function(r){return t.call(this,r,jw)}:jw;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function YL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Dw(e,t,n){if(!t)return e;const r=n&&n.encode||YL,i=n&&n.serialize;let a;if(i?a=i(t,n):a=G.isURLSearchParams(t)?t.toString():new Qd(t,n).toString(r),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Mw{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Lw={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},JL=typeof URLSearchParams<"u"?URLSearchParams:Qd,XL=FormData,QL=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),eF=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mr={isBrowser:!0,classes:{URLSearchParams:JL,FormData:XL,Blob},isStandardBrowserEnv:QL,isStandardBrowserWebWorkerEnv:eF,protocols:["http","https","file","blob","url","data"]};function tF(e,t){return ac(e,new mr.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return mr.isNode&&G.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function nF(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function rF(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Fw(e){function t(n,r,i,a){let o=n[a++];const s=Number.isFinite(+o),l=a>=n.length;return o=!o&&G.isArray(i)?i.length:o,l?(G.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s):((!i[o]||!G.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],a)&&G.isArray(i[o])&&(i[o]=rF(i[o])),!s)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(r,i)=>{t(nF(r),i,n,0)}),n}return null}const iF={"Content-Type":void 0};function aF(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ka={transitional:Lw,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=G.isObject(t);if(a&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return i&&i?JSON.stringify(Fw(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return tF(t,this.formSerializer).toString();if((s=G.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ac(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),aF(t)):t}],transformResponse:[function(t){const n=this.transitional||ka.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&G.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?it.from(s,it.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mr.classes.FormData,Blob:mr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};G.forEach(["delete","get","head"],function(t){ka.headers[t]={}}),G.forEach(["post","put","patch"],function(t){ka.headers[t]=G.merge(iF)});const oF=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),sF=e=>{const t={};let n,r,i;return e&&e.split(`
|
|
58
|
+
`).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&oF[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Bw=Symbol("internals");function rs(e){return e&&String(e).trim().toLowerCase()}function oc(e){return e===!1||e==null?e:G.isArray(e)?e.map(oc):String(e)}function lF(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}function cF(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function zw(e,t,n,r){if(G.isFunction(r))return r.call(this,t,n);if(G.isString(t)){if(G.isString(r))return t.indexOf(r)!==-1;if(G.isRegExp(r))return r.test(t)}}function uF(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function fF(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,o){return this[r].call(this,t,i,a,o)},configurable:!0})})}class Dn{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(s,l,c){const u=rs(l);if(!u)throw new Error("header name must be a non-empty string");const f=G.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=oc(s))}const o=(s,l)=>G.forEach(s,(c,u)=>a(c,u,l));return G.isPlainObject(t)||t instanceof this.constructor?o(t,n):G.isString(t)&&(t=t.trim())&&!cF(t)?o(sF(t),n):t!=null&&a(n,t,r),this}get(t,n){if(t=rs(t),t){const r=G.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return lF(i);if(G.isFunction(n))return n.call(this,i,r);if(G.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=rs(t),t){const r=G.findKey(this,t);return!!(r&&(!n||zw(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(o){if(o=rs(o),o){const s=G.findKey(r,o);s&&(!n||zw(r,r[s],s,n))&&(delete r[s],i=!0)}}return G.isArray(t)?t.forEach(a):a(t),i}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const n=this,r={};return G.forEach(this,(i,a)=>{const o=G.findKey(r,a);if(o){n[o]=oc(i),delete n[a];return}const s=t?uF(a):String(a).trim();s!==a&&delete n[a],n[s]=oc(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return G.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&G.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
59
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Bw]=this[Bw]={accessors:{}}).accessors,i=this.prototype;function a(o){const s=rs(o);r[s]||(fF(i,o),r[s]=!0)}return G.isArray(t)?t.forEach(a):a(t),this}}Dn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),G.freezeMethods(Dn.prototype),G.freezeMethods(Dn);function ep(e,t){const n=this||ka,r=t||n,i=Dn.from(r.headers);let a=r.data;return G.forEach(e,function(s){a=s.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Uw(e){return!!(e&&e.__CANCEL__)}function is(e,t,n){it.call(this,e??"canceled",it.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(is,it,{__CANCEL__:!0});const dF=null;function pF(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new it("Request failed with status code "+n.status,[it.ERR_BAD_REQUEST,it.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const hF=mr.isStandardBrowserEnv?function(){return{write:function(n,r,i,a,o,s){const l=[];l.push(n+"="+encodeURIComponent(r)),G.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),G.isString(a)&&l.push("path="+a),G.isString(o)&&l.push("domain="+o),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function mF(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function vF(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function qw(e,t){return e&&!mF(t)?vF(e,t):t}const gF=mr.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let o=a;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const s=G.isString(o)?i(o):o;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function yF(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bF(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[a];o||(o=c),n[i]=l,r[i]=c;let f=a,d=0;for(;f!==i;)d+=n[f++],f=f%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const p=u&&c-u;return p?Math.round(d*1e3/p):void 0}}function Ww(e,t){let n=0;const r=bF(50,250);return i=>{const a=i.loaded,o=i.lengthComputable?i.total:void 0,s=a-n,l=r(s),c=a<=o;n=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&c?(o-a)/l:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}const sc={http:dF,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){let i=e.data;const a=Dn.from(e.headers).normalize(),o=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}G.isFormData(i)&&(mr.isStandardBrowserEnv||mr.isStandardBrowserWebWorkerEnv)&&a.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(p+":"+h))}const u=qw(e.baseURL,e.url);c.open(e.method.toUpperCase(),Dw(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function f(){if(!c)return;const p=Dn.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:p,config:e,request:c};pF(function(v){n(v),l()},function(v){r(v),l()},m),c=null}if("onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(f)},c.onabort=function(){c&&(r(new it("Request aborted",it.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new it("Network Error",it.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||Lw;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),r(new it(h,m.clarifyTimeoutError?it.ETIMEDOUT:it.ECONNABORTED,e,c)),c=null},mr.isStandardBrowserEnv){const p=(e.withCredentials||gF(u))&&e.xsrfCookieName&&hF.read(e.xsrfCookieName);p&&a.set(e.xsrfHeaderName,p)}i===void 0&&a.setContentType(null),"setRequestHeader"in c&&G.forEach(a.toJSON(),function(h,m){c.setRequestHeader(m,h)}),G.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&o!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",Ww(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Ww(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=p=>{c&&(r(!p||p.type?new is(null,e,c):p),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const d=yF(u);if(d&&mr.protocols.indexOf(d)===-1){r(new it("Unsupported protocol "+d+":",it.ERR_BAD_REQUEST,e));return}c.send(i||null)})}};G.forEach(sc,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const xF={getAdapter:e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;i<t&&(n=e[i],!(r=G.isString(n)?sc[n.toLowerCase()]:n));i++);if(!r)throw r===!1?new it(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(G.hasOwnProp(sc,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!G.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:sc};function tp(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new is(null,e)}function Hw(e){return tp(e),e.headers=Dn.from(e.headers),e.data=ep.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xF.getAdapter(e.adapter||ka.adapter)(e).then(function(r){return tp(e),r.data=ep.call(e,e.transformResponse,r),r.headers=Dn.from(r.headers),r},function(r){return Uw(r)||(tp(e),r&&r.response&&(r.response.data=ep.call(e,e.transformResponse,r.response),r.response.headers=Dn.from(r.response.headers))),Promise.reject(r)})}const Vw=e=>e instanceof Dn?e.toJSON():e;function $a(e,t){t=t||{};const n={};function r(c,u,f){return G.isPlainObject(c)&&G.isPlainObject(u)?G.merge.call({caseless:f},c,u):G.isPlainObject(u)?G.merge({},u):G.isArray(u)?u.slice():u}function i(c,u,f){if(G.isUndefined(u)){if(!G.isUndefined(c))return r(void 0,c,f)}else return r(c,u,f)}function a(c,u){if(!G.isUndefined(u))return r(void 0,u)}function o(c,u){if(G.isUndefined(u)){if(!G.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(c,u)=>i(Vw(c),Vw(u),!0)};return G.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const f=l[u]||i,d=f(e[u],t[u],u);G.isUndefined(d)&&f!==s||(n[u]=d)}),n}const Zw="1.2.5",np={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{np[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Kw={};np.transitional=function(t,n,r){function i(a,o){return"[Axios v"+Zw+"] Transitional option '"+a+"'"+o+(r?". "+r:"")}return(a,o,s)=>{if(t===!1)throw new it(i(o," has been removed"+(n?" in "+n:"")),it.ERR_DEPRECATED);return n&&!Kw[o]&&(Kw[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,o,s):!0}};function wF(e,t,n){if(typeof e!="object")throw new it("options must be an object",it.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],o=t[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new it("option "+a+" must be "+l,it.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new it("Unknown option "+a,it.ERR_BAD_OPTION)}}const rp={assertOptions:wF,validators:np},li=rp.validators;class Hi{constructor(t){this.defaults=t,this.interceptors={request:new Mw,response:new Mw}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$a(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&rp.assertOptions(r,{silentJSONParsing:li.transitional(li.boolean),forcedJSONParsing:li.transitional(li.boolean),clarifyTimeoutError:li.transitional(li.boolean)},!1),i!==void 0&&rp.assertOptions(i,{encode:li.function,serialize:li.function},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=a&&G.merge(a.common,a[n.method]),o&&G.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),n.headers=Dn.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,f=0,d;if(!l){const h=[Hw.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,c),d=h.length,u=Promise.resolve(n);f<d;)u=u.then(h[f++],h[f++]);return u}d=s.length;let p=n;for(f=0;f<d;){const h=s[f++],m=s[f++];try{p=h(p)}catch(y){m.call(this,y);break}}try{u=Hw.call(this,p)}catch(h){return Promise.reject(h)}for(f=0,d=c.length;f<d;)u=u.then(c[f++],c[f++]);return u}getUri(t){t=$a(this.defaults,t);const n=qw(t.baseURL,t.url);return Dw(n,t.params,t.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(t){Hi.prototype[t]=function(n,r){return this.request($a(r||{},{method:t,url:n,data:(r||{}).data}))}}),G.forEach(["post","put","patch"],function(t){function n(r){return function(a,o,s){return this.request($a(s||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Hi.prototype[t]=n(),Hi.prototype[t+"Form"]=n(!0)});class ip{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const o=new Promise(s=>{r.subscribe(s),a=s}).then(i);return o.cancel=function(){r.unsubscribe(a)},o},t(function(a,o,s){r.reason||(r.reason=new is(a,o,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new ip(function(i){t=i}),cancel:t}}}function SF(e){return function(n){return e.apply(null,n)}}function EF(e){return G.isObject(e)&&e.isAxiosError===!0}const ap={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ap).forEach(([e,t])=>{ap[t]=e});function Gw(e){const t=new Hi(e),n=ww(Hi.prototype.request,t);return G.extend(n,Hi.prototype,t,{allOwnKeys:!0}),G.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Gw($a(e,i))},n}const At=Gw(ka);At.Axios=Hi,At.CanceledError=is,At.CancelToken=ip,At.isCancel=Uw,At.VERSION=Zw,At.toFormData=ac,At.AxiosError=it,At.Cancel=At.CanceledError,At.all=function(t){return Promise.all(t)},At.spread=SF,At.isAxiosError=EF,At.mergeConfig=$a,At.AxiosHeaders=Dn,At.formToJSON=e=>Fw(G.isHTMLForm(e)?new FormData(e):e),At.HttpStatusCode=ap,At.default=At;const Yw={},_F=Object.freeze(Object.defineProperty({__proto__:null,default:Yw},Symbol.toStringTag,{value:"Module"}));var kF=Error,$F=EvalError,OF=RangeError,TF=ReferenceError,Jw=SyntaxError,ci=TypeError,CF=URIError,lc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[n]=i;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,n);if(o.value!==i||o.enumerable!==!0)return!1}return!0},Xw=typeof Symbol<"u"&&Symbol,IF=lc,op=function(){return typeof Xw!="function"||typeof Symbol!="function"||typeof Xw("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:IF()},sp={__proto__:null,foo:{}},RF=Object,AF=function(){return{__proto__:sp}.foo===sp.foo&&!(sp instanceof RF)},PF="Function.prototype.bind called on incompatible ",jF=Object.prototype.toString,NF=Math.max,DF="[object Function]",Qw=function(t,n){for(var r=[],i=0;i<t.length;i+=1)r[i]=t[i];for(var a=0;a<n.length;a+=1)r[a+t.length]=n[a];return r},MF=function(t,n){for(var r=[],i=n,a=0;i<t.length;i+=1,a+=1)r[a]=t[i];return r},LF=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},FF=function(t){var n=this;if(typeof n!="function"||jF.apply(n)!==DF)throw new TypeError(PF+n);for(var r=MF(arguments,1),i,a=function(){if(this instanceof i){var u=n.apply(this,Qw(r,arguments));return Object(u)===u?u:this}return n.apply(t,Qw(r,arguments))},o=NF(0,n.length-r.length),s=[],l=0;l<o;l++)s[l]="$"+l;if(i=Function("binder","return function ("+LF(s,",")+"){ return binder.apply(this,arguments); }")(a),n.prototype){var c=function(){};c.prototype=n.prototype,i.prototype=new c,c.prototype=null}return i},BF=FF,lp=Function.prototype.bind||BF,zF=Function.prototype.call,UF=Object.prototype.hasOwnProperty,qF=lp,e0=qF.call(zF,UF),Ye,WF=kF,HF=$F,VF=OF,ZF=TF,Oa=Jw,Ta=ci,KF=CF,t0=Function,cp=function(e){try{return t0('"use strict"; return ('+e+").constructor;")()}catch{}},Vi=Object.getOwnPropertyDescriptor;if(Vi)try{Vi({},"")}catch{Vi=null}var up=function(){throw new Ta},GF=Vi?function(){try{return arguments.callee,up}catch{try{return Vi(arguments,"callee").get}catch{return up}}}():up,Ca=op(),YF=AF(),Vt=Object.getPrototypeOf||(YF?function(e){return e.__proto__}:null),Ia={},JF=typeof Uint8Array>"u"||!Vt?Ye:Vt(Uint8Array),Zi={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ye:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ye:ArrayBuffer,"%ArrayIteratorPrototype%":Ca&&Vt?Vt([][Symbol.iterator]()):Ye,"%AsyncFromSyncIteratorPrototype%":Ye,"%AsyncFunction%":Ia,"%AsyncGenerator%":Ia,"%AsyncGeneratorFunction%":Ia,"%AsyncIteratorPrototype%":Ia,"%Atomics%":typeof Atomics>"u"?Ye:Atomics,"%BigInt%":typeof BigInt>"u"?Ye:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ye:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ye:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ye:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":WF,"%eval%":eval,"%EvalError%":HF,"%Float32Array%":typeof Float32Array>"u"?Ye:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ye:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ye:FinalizationRegistry,"%Function%":t0,"%GeneratorFunction%":Ia,"%Int8Array%":typeof Int8Array>"u"?Ye:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ye:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ye:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ca&&Vt?Vt(Vt([][Symbol.iterator]())):Ye,"%JSON%":typeof JSON=="object"?JSON:Ye,"%Map%":typeof Map>"u"?Ye:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ca||!Vt?Ye:Vt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ye:Promise,"%Proxy%":typeof Proxy>"u"?Ye:Proxy,"%RangeError%":VF,"%ReferenceError%":ZF,"%Reflect%":typeof Reflect>"u"?Ye:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ye:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ca||!Vt?Ye:Vt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ye:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ca&&Vt?Vt(""[Symbol.iterator]()):Ye,"%Symbol%":Ca?Symbol:Ye,"%SyntaxError%":Oa,"%ThrowTypeError%":GF,"%TypedArray%":JF,"%TypeError%":Ta,"%Uint8Array%":typeof Uint8Array>"u"?Ye:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ye:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ye:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ye:Uint32Array,"%URIError%":KF,"%WeakMap%":typeof WeakMap>"u"?Ye:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ye:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ye:WeakSet};if(Vt)try{null.error}catch(e){var XF=Vt(Vt(e));Zi["%Error.prototype%"]=XF}var QF=function e(t){var n;if(t==="%AsyncFunction%")n=cp("async function () {}");else if(t==="%GeneratorFunction%")n=cp("function* () {}");else if(t==="%AsyncGeneratorFunction%")n=cp("async function* () {}");else if(t==="%AsyncGenerator%"){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Vt&&(n=Vt(i.prototype))}return Zi[t]=n,n},n0={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},as=lp,cc=e0,e5=as.call(Function.call,Array.prototype.concat),t5=as.call(Function.apply,Array.prototype.splice),r0=as.call(Function.call,String.prototype.replace),uc=as.call(Function.call,String.prototype.slice),n5=as.call(Function.call,RegExp.prototype.exec),r5=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,i5=/\\(\\)?/g,a5=function(t){var n=uc(t,0,1),r=uc(t,-1);if(n==="%"&&r!=="%")throw new Oa("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new Oa("invalid intrinsic syntax, expected opening `%`");var i=[];return r0(t,r5,function(a,o,s,l){i[i.length]=s?r0(l,i5,"$1"):o||a}),i},o5=function(t,n){var r=t,i;if(cc(n0,r)&&(i=n0[r],r="%"+i[0]+"%"),cc(Zi,r)){var a=Zi[r];if(a===Ia&&(a=QF(r)),typeof a>"u"&&!n)throw new Ta("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:a}}throw new Oa("intrinsic "+t+" does not exist!")},vr=function(t,n){if(typeof t!="string"||t.length===0)throw new Ta("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Ta('"allowMissing" argument must be a boolean');if(n5(/^%?[^%]*%?$/,t)===null)throw new Oa("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=a5(t),i=r.length>0?r[0]:"",a=o5("%"+i+"%",n),o=a.name,s=a.value,l=!1,c=a.alias;c&&(i=c[0],t5(r,e5([0,1],c)));for(var u=1,f=!0;u<r.length;u+=1){var d=r[u],p=uc(d,0,1),h=uc(d,-1);if((p==='"'||p==="'"||p==="`"||h==='"'||h==="'"||h==="`")&&p!==h)throw new Oa("property names with quotes must have matching quotes");if((d==="constructor"||!f)&&(l=!0),i+="."+d,o="%"+i+"%",cc(Zi,o))s=Zi[o];else if(s!=null){if(!(d in s)){if(!n)throw new Ta("base intrinsic for "+t+" exists, but the property is not available.");return}if(Vi&&u+1>=r.length){var m=Vi(s,d);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[d]}else f=cc(s,d),s=s[d];f&&!l&&(Zi[o]=s)}}return s},i0={exports:{}},fp,a0;function dp(){if(a0)return fp;a0=1;var e=vr,t=e("%Object.defineProperty%",!0)||!1;if(t)try{t({},"a",{value:1})}catch{t=!1}return fp=t,fp}var s5=vr,fc=s5("%Object.getOwnPropertyDescriptor%",!0);if(fc)try{fc([],"length")}catch{fc=null}var pp=fc,o0=dp(),l5=Jw,Ra=ci,s0=pp,hp=function(t,n,r){if(!t||typeof t!="object"&&typeof t!="function")throw new Ra("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Ra("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ra("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ra("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ra("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ra("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!s0&&s0(t,n);if(o0)o0(t,n,{configurable:o===null&&l?l.configurable:!o,enumerable:i===null&&l?l.enumerable:!i,value:r,writable:a===null&&l?l.writable:!a});else if(s||!i&&!a&&!o)t[n]=r;else throw new l5("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},mp=dp(),l0=function(){return!!mp};l0.hasArrayLengthDefineBug=function(){if(!mp)return null;try{return mp([],"length",{value:1}).length!==1}catch{return!0}};var vp=l0,c5=vr,c0=hp,u5=vp(),u0=pp,f0=ci,f5=c5("%Math.floor%"),d5=function(t,n){if(typeof t!="function")throw new f0("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||f5(n)!==n)throw new f0("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,a=!0;if("length"in t&&u0){var o=u0(t,"length");o&&!o.configurable&&(i=!1),o&&!o.writable&&(a=!1)}return(i||a||!r)&&(u5?c0(t,"length",n,!0,!0):c0(t,"length",n)),t};(function(e){var t=lp,n=vr,r=d5,i=ci,a=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),s=n("%Reflect.apply%",!0)||t.call(o,a),l=dp(),c=n("%Math.max%");e.exports=function(d){if(typeof d!="function")throw new i("a function is required");var p=s(t,o,arguments);return r(p,1+c(0,d.length-(arguments.length-1)),!0)};var u=function(){return s(t,a,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u})(i0);var Aa=i0.exports,d0=vr,p0=Aa,p5=p0(d0("String.prototype.indexOf")),Mn=function(t,n){var r=d0(t,!!n);return typeof r=="function"&&p5(t,".prototype.")>-1?p0(r):r};const h5=cR(_F);var gp=typeof Map=="function"&&Map.prototype,yp=Object.getOwnPropertyDescriptor&&gp?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,dc=gp&&yp&&typeof yp.get=="function"?yp.get:null,h0=gp&&Map.prototype.forEach,bp=typeof Set=="function"&&Set.prototype,xp=Object.getOwnPropertyDescriptor&&bp?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,pc=bp&&xp&&typeof xp.get=="function"?xp.get:null,m0=bp&&Set.prototype.forEach,m5=typeof WeakMap=="function"&&WeakMap.prototype,os=m5?WeakMap.prototype.has:null,v5=typeof WeakSet=="function"&&WeakSet.prototype,ss=v5?WeakSet.prototype.has:null,g5=typeof WeakRef=="function"&&WeakRef.prototype,v0=g5?WeakRef.prototype.deref:null,y5=Boolean.prototype.valueOf,b5=Object.prototype.toString,x5=Function.prototype.toString,w5=String.prototype.match,wp=String.prototype.slice,ui=String.prototype.replace,S5=String.prototype.toUpperCase,g0=String.prototype.toLowerCase,y0=RegExp.prototype.test,b0=Array.prototype.concat,gr=Array.prototype.join,E5=Array.prototype.slice,x0=Math.floor,Sp=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Ep=Object.getOwnPropertySymbols,_p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Pa=typeof Symbol=="function"&&typeof Symbol.iterator=="object",nn=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Pa||!0)?Symbol.toStringTag:null,w0=Object.prototype.propertyIsEnumerable,S0=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function E0(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||y0.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var r=e<0?-x0(-e):x0(e);if(r!==e){var i=String(r),a=wp.call(t,i.length+1);return ui.call(i,n,"$&_")+"."+ui.call(ui.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ui.call(t,n,"$&_")}var kp=h5,_0=kp.custom,k0=T0(_0)?_0:null,_5=function e(t,n,r,i){var a=n||{};if(fi(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(fi(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=fi(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(fi(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(fi(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return I0(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var l=String(t);return s?E0(t,l):l}if(typeof t=="bigint"){var c=String(t)+"n";return s?E0(t,c):c}var u=typeof a.depth>"u"?5:a.depth;if(typeof r>"u"&&(r=0),r>=u&&u>0&&typeof t=="object")return $p(t)?"[Array]":"[Object]";var f=U5(a,r);if(typeof i>"u")i=[];else if(C0(i,t)>=0)return"[Circular]";function d(L,U,M){if(U&&(i=E5.call(i),i.push(U)),M){var I={depth:a.depth};return fi(a,"quoteStyle")&&(I.quoteStyle=a.quoteStyle),e(L,I,r+1,i)}return e(L,a,r+1,i)}if(typeof t=="function"&&!O0(t)){var p=P5(t),h=hc(t,d);return"[Function"+(p?": "+p:" (anonymous)")+"]"+(h.length>0?" { "+gr.call(h,", ")+" }":"")}if(T0(t)){var m=Pa?ui.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):_p.call(t);return typeof t=="object"&&!Pa?ls(m):m}if(F5(t)){for(var y="<"+g0.call(String(t.nodeName)),v=t.attributes||[],g=0;g<v.length;g++)y+=" "+v[g].name+"="+$0(k5(v[g].value),"double",a);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+g0.call(String(t.nodeName))+">",y}if($p(t)){if(t.length===0)return"[]";var b=hc(t,d);return f&&!z5(b)?"["+Tp(b,f)+"]":"[ "+gr.call(b,", ")+" ]"}if(O5(t)){var k=hc(t,d);return!("cause"in Error.prototype)&&"cause"in t&&!w0.call(t,"cause")?"{ ["+String(t)+"] "+gr.call(b0.call("[cause]: "+d(t.cause),k),", ")+" }":k.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+gr.call(k,", ")+" }"}if(typeof t=="object"&&o){if(k0&&typeof t[k0]=="function"&&kp)return kp(t,{depth:u-r});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(j5(t)){var S=[];return h0&&h0.call(t,function(L,U){S.push(d(U,t,!0)+" => "+d(L,t))}),R0("Map",dc.call(t),S,f)}if(M5(t)){var _=[];return m0&&m0.call(t,function(L){_.push(d(L,t))}),R0("Set",pc.call(t),_,f)}if(N5(t))return Op("WeakMap");if(L5(t))return Op("WeakSet");if(D5(t))return Op("WeakRef");if(C5(t))return ls(d(Number(t)));if(R5(t))return ls(d(Sp.call(t)));if(I5(t))return ls(y5.call(t));if(T5(t))return ls(d(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof ut<"u"&&t===ut)return"{ [object globalThis] }";if(!$5(t)&&!O0(t)){var $=hc(t,d),j=S0?S0(t)===Object.prototype:t instanceof Object||t.constructor===Object,z=t instanceof Object?"":"null prototype",O=!j&&nn&&Object(t)===t&&nn in t?wp.call(di(t),8,-1):z?"Object":"",N=j||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=N+(O||z?"["+gr.call(b0.call([],O||[],z||[]),": ")+"] ":"");return $.length===0?W+"{}":f?W+"{"+Tp($,f)+"}":W+"{ "+gr.call($,", ")+" }"}return String(t)};function $0(e,t,n){var r=(n.quoteStyle||t)==="double"?'"':"'";return r+e+r}function k5(e){return ui.call(String(e),/"/g,""")}function $p(e){return di(e)==="[object Array]"&&(!nn||!(typeof e=="object"&&nn in e))}function $5(e){return di(e)==="[object Date]"&&(!nn||!(typeof e=="object"&&nn in e))}function O0(e){return di(e)==="[object RegExp]"&&(!nn||!(typeof e=="object"&&nn in e))}function O5(e){return di(e)==="[object Error]"&&(!nn||!(typeof e=="object"&&nn in e))}function T5(e){return di(e)==="[object String]"&&(!nn||!(typeof e=="object"&&nn in e))}function C5(e){return di(e)==="[object Number]"&&(!nn||!(typeof e=="object"&&nn in e))}function I5(e){return di(e)==="[object Boolean]"&&(!nn||!(typeof e=="object"&&nn in e))}function T0(e){if(Pa)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!_p)return!1;try{return _p.call(e),!0}catch{}return!1}function R5(e){if(!e||typeof e!="object"||!Sp)return!1;try{return Sp.call(e),!0}catch{}return!1}var A5=Object.prototype.hasOwnProperty||function(e){return e in this};function fi(e,t){return A5.call(e,t)}function di(e){return b5.call(e)}function P5(e){if(e.name)return e.name;var t=w5.call(x5.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function C0(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function j5(e){if(!dc||!e||typeof e!="object")return!1;try{dc.call(e);try{pc.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function N5(e){if(!os||!e||typeof e!="object")return!1;try{os.call(e,os);try{ss.call(e,ss)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function D5(e){if(!v0||!e||typeof e!="object")return!1;try{return v0.call(e),!0}catch{}return!1}function M5(e){if(!pc||!e||typeof e!="object")return!1;try{pc.call(e);try{dc.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function L5(e){if(!ss||!e||typeof e!="object")return!1;try{ss.call(e,ss);try{os.call(e,os)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function F5(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function I0(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return I0(wp.call(e,0,t.maxStringLength),t)+r}var i=ui.call(ui.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,B5);return $0(i,"single",t)}function B5(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+S5.call(t.toString(16))}function ls(e){return"Object("+e+")"}function Op(e){return e+" { ? }"}function R0(e,t,n,r){var i=r?Tp(n,r):gr.call(n,", ");return e+" ("+t+") {"+i+"}"}function z5(e){for(var t=0;t<e.length;t++)if(C0(e[t],`
|
|
60
60
|
`)>=0)return!1;return!0}function U5(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=gr.call(Array(e.indent+1)," ");else return null;return{base:n,prev:gr.call(Array(t+1),n)}}function Tp(e,t){if(e.length===0)return"";var n=`
|
|
61
61
|
`+t.prev+t.base;return n+gr.call(e,","+n)+`
|
|
62
|
-
`+t.prev}function mc(e,t){var n=$p(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=fi(e,i)?t(e[i],e):""}var a=typeof Ep=="function"?Ep(e):[],o;if(Pa){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var l in e)fi(e,l)&&(n&&String(Number(l))===l&&l<e.length||Pa&&o["$"+l]instanceof Symbol||(g0.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Ep=="function")for(var c=0;c<a.length;c++)x0.call(e,a[c])&&r.push("["+t(a[c])+"]: "+t(e[a[c]],e));return r}var R0=vr,ja=Mn,q5=_5,W5=ci,vc=R0("%WeakMap%",!0),gc=R0("%Map%",!0),H5=ja("WeakMap.prototype.get",!0),V5=ja("WeakMap.prototype.set",!0),Z5=ja("WeakMap.prototype.has",!0),K5=ja("Map.prototype.get",!0),G5=ja("Map.prototype.set",!0),Y5=ja("Map.prototype.has",!0),Cp=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},J5=function(e,t){var n=Cp(e,t);return n&&n.value},X5=function(e,t,n){var r=Cp(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Q5=function(e,t){return!!Cp(e,t)},Ip=function(){var t,n,r,i={assert:function(a){if(!i.has(a))throw new W5("Side channel does not contain "+q5(a))},get:function(a){if(vc&&a&&(typeof a=="object"||typeof a=="function")){if(t)return H5(t,a)}else if(gc){if(n)return K5(n,a)}else if(r)return J5(r,a)},has:function(a){if(vc&&a&&(typeof a=="object"||typeof a=="function")){if(t)return Z5(t,a)}else if(gc){if(n)return Y5(n,a)}else if(r)return Q5(r,a);return!1},set:function(a,o){vc&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new vc),V5(t,a,o)):gc?(n||(n=new gc),G5(n,a,o)):(r||(r={key:{},next:null}),X5(r,a,o))}};return i},e3=String.prototype.replace,t3=/%20/g,Rp={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ap={default:Rp.RFC3986,formatters:{RFC1738:function(e){return e3.call(e,t3,"+")},RFC3986:function(e){return String(e)}},RFC1738:Rp.RFC1738,RFC3986:Rp.RFC3986},n3=Ap,Pp=Object.prototype.hasOwnProperty,Ki=Array.isArray,yr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),r3=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Ki(r)){for(var i=[],a=0;a<r.length;++a)typeof r[a]<"u"&&i.push(r[a]);n.obj[n.prop]=i}}},A0=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(r[i]=t[i]);return r},i3=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Ki(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Pp.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var i=t;return Ki(t)&&!Ki(n)&&(i=A0(t,r)),Ki(t)&&Ki(n)?(n.forEach(function(a,o){if(Pp.call(t,o)){var s=t[o];s&&typeof s=="object"&&a&&typeof a=="object"?t[o]=e(s,a,r):t.push(a)}else t[o]=a}),t):Object.keys(n).reduce(function(a,o){var s=n[o];return Pp.call(a,o)?a[o]=e(a[o],s,r):a[o]=s,a},i)},a3=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},o3=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},jp=1024,s3=function(t,n,r,i,a){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),r==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var s="",l=0;l<o.length;l+=jp){for(var c=o.length>=jp?o.slice(l,l+jp):o,u=[],f=0;f<c.length;++f){var d=c.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||a===n3.RFC1738&&(d===40||d===41)){u[u.length]=c.charAt(f);continue}if(d<128){u[u.length]=yr[d];continue}if(d<2048){u[u.length]=yr[192|d>>6]+yr[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=yr[224|d>>12]+yr[128|d>>6&63]+yr[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=yr[240|d>>18]+yr[128|d>>12&63]+yr[128|d>>6&63]+yr[128|d&63]}s+=u.join("")}return s},l3=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var a=n[i],o=a.obj[a.prop],s=Object.keys(o),l=0;l<s.length;++l){var c=s[l],u=o[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:o,prop:c}),r.push(u))}return r3(n),t},c3=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},u3=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},f3=function(t,n){return[].concat(t,n)},d3=function(t,n){if(Ki(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},P0={arrayToObject:A0,assign:a3,combine:f3,compact:l3,decode:o3,encode:s3,isBuffer:u3,isRegExp:c3,maybeMap:d3,merge:i3},j0=Ip,yc=P0,cs=Ap,p3=Object.prototype.hasOwnProperty,N0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},br=Array.isArray,h3=Array.prototype.push,D0=function(e,t){h3.apply(e,br(t)?t:[t])},m3=Date.prototype.toISOString,M0=cs.default,Lt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:yc.encode,encodeValuesOnly:!1,format:M0,formatter:cs.formatters[M0],indices:!1,serializeDate:function(t){return m3.call(t)},skipNulls:!1,strictNullHandling:!1},v3=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Np={},g3=function e(t,n,r,i,a,o,s,l,c,u,f,d,p,h,m,y,v,g){for(var b=t,k=g,S=0,_=!1;(k=k.get(Np))!==void 0&&!_;){var $=k.get(t);if(S+=1,typeof $<"u"){if($===S)throw new RangeError("Cyclic object value");_=!0}typeof k.get(Np)>"u"&&(S=0)}if(typeof u=="function"?b=u(n,b):b instanceof Date?b=p(b):r==="comma"&&br(b)&&(b=yc.maybeMap(b,function(x){return x instanceof Date?p(x):x})),b===null){if(o)return c&&!y?c(n,Lt.encoder,v,"key",h):n;b=""}if(v3(b)||yc.isBuffer(b)){if(c){var j=y?n:c(n,Lt.encoder,v,"key",h);return[m(j)+"="+m(c(b,Lt.encoder,v,"value",h))]}return[m(n)+"="+m(String(b))]}var z=[];if(typeof b>"u")return z;var O;if(r==="comma"&&br(b))y&&c&&(b=yc.maybeMap(b,c)),O=[{value:b.length>0?b.join(",")||null:void 0}];else if(br(u))O=u;else{var N=Object.keys(b);O=f?N.sort(f):N}var W=l?n.replace(/\./g,"%2E"):n,L=i&&br(b)&&b.length===1?W+"[]":W;if(a&&br(b)&&b.length===0)return L+"[]";for(var U=0;U<O.length;++U){var M=O[U],I=typeof M=="object"&&typeof M.value<"u"?M.value:b[M];if(!(s&&I===null)){var H=d&&l?M.replace(/\./g,"%2E"):M,B=br(b)?typeof r=="function"?r(L,H):L:L+(d?"."+H:"["+H+"]");g.set(t,S);var A=j0();A.set(Np,g),D0(z,e(I,B,r,i,a,o,s,l,r==="comma"&&y&&br(b)?null:c,u,f,d,p,h,m,y,v,A))}}return z},y3=function(t){if(!t)return Lt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Lt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=cs.default;if(typeof t.format<"u"){if(!p3.call(cs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=cs.formatters[r],a=Lt.filter;(typeof t.filter=="function"||br(t.filter))&&(a=t.filter);var o;if(t.arrayFormat in N0?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=Lt.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Lt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Lt.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Lt.allowEmptyArrays,arrayFormat:o,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Lt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Lt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Lt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Lt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Lt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Lt.encodeValuesOnly,filter:a,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Lt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Lt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Lt.strictNullHandling}},b3=function(e,t){var n=e,r=y3(t),i,a;typeof r.filter=="function"?(a=r.filter,n=a("",n)):br(r.filter)&&(a=r.filter,i=a);var o=[];if(typeof n!="object"||n===null)return"";var s=N0[r.arrayFormat],l=s==="comma"&&r.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var c=j0(),u=0;u<i.length;++u){var f=i[u];r.skipNulls&&n[f]===null||D0(o,g3(n[f],f,s,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var d=o.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},Na=P0,Dp=Object.prototype.hasOwnProperty,x3=Array.isArray,$t={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Na.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},w3=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},L0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},S3="utf8=%26%2310003%3B",E3="utf8=%E2%9C%93",_3=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=n.parameterLimit===1/0?void 0:n.parameterLimit,o=i.split(n.delimiter,a),s=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<o.length;++l)o[l].indexOf("utf8=")===0&&(o[l]===E3?c="utf-8":o[l]===S3&&(c="iso-8859-1"),s=l,l=o.length);for(l=0;l<o.length;++l)if(l!==s){var u=o[l],f=u.indexOf("]="),d=f===-1?u.indexOf("="):f+1,p,h;d===-1?(p=n.decoder(u,$t.decoder,c,"key"),h=n.strictNullHandling?null:""):(p=n.decoder(u.slice(0,d),$t.decoder,c,"key"),h=Na.maybeMap(L0(u.slice(d+1),n),function(y){return n.decoder(y,$t.decoder,c,"value")})),h&&n.interpretNumericEntities&&c==="iso-8859-1"&&(h=w3(h)),u.indexOf("[]=")>-1&&(h=x3(h)?[h]:h);var m=Dp.call(r,p);m&&n.duplicates==="combine"?r[p]=Na.combine(r[p],h):(!m||n.duplicates==="last")&&(r[p]=h)}return r},k3=function(e,t,n,r){for(var i=r?t:L0(t,n),a=e.length-1;a>=0;--a){var o,s=e[a];if(s==="[]"&&n.parseArrays)o=n.allowEmptyArrays&&(i===""||n.strictNullHandling&&i===null)?[]:[].concat(i);else{o=n.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?o={0:i}:!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(o=[],o[u]=i):c!=="__proto__"&&(o[c]=i)}i=o}return i},$3=function(t,n,r,i){if(t){var a=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=r.depth>0&&o.exec(a),c=l?a.slice(0,l.index):a,u=[];if(c){if(!r.plainObjects&&Dp.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=s.exec(a))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Dp.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}if(l){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");u.push("["+a.slice(l.index)+"]")}return k3(u,n,r,i)}},O3=function(t){if(!t)return $t;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?$t.charset:t.charset,r=typeof t.duplicates>"u"?$t.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:$t.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:$t.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:$t.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:$t.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:$t.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:$t.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:$t.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:$t.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:$t.decoder,delimiter:typeof t.delimiter=="string"||Na.isRegExp(t.delimiter)?t.delimiter:$t.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:$t.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:$t.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:$t.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:$t.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:$t.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:$t.strictNullHandling}},T3=function(e,t){var n=O3(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?_3(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(r),o=0;o<a.length;++o){var s=a[o],l=$3(s,r[s],n,typeof e=="string");i=Na.merge(i,l,n)}return n.allowSparse===!0?i:Na.compact(i)},C3=b3,I3=T3,R3=Ap,A3={formats:R3,parse:I3,stringify:C3};const P3=Ze(A3);var Mp={exports:{}};/** @license
|
|
62
|
+
`+t.prev}function hc(e,t){var n=$p(e),r=[];if(n){r.length=e.length;for(var i=0;i<e.length;i++)r[i]=fi(e,i)?t(e[i],e):""}var a=typeof Ep=="function"?Ep(e):[],o;if(Pa){o={};for(var s=0;s<a.length;s++)o["$"+a[s]]=a[s]}for(var l in e)fi(e,l)&&(n&&String(Number(l))===l&&l<e.length||Pa&&o["$"+l]instanceof Symbol||(y0.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if(typeof Ep=="function")for(var c=0;c<a.length;c++)w0.call(e,a[c])&&r.push("["+t(a[c])+"]: "+t(e[a[c]],e));return r}var A0=vr,ja=Mn,q5=_5,W5=ci,mc=A0("%WeakMap%",!0),vc=A0("%Map%",!0),H5=ja("WeakMap.prototype.get",!0),V5=ja("WeakMap.prototype.set",!0),Z5=ja("WeakMap.prototype.has",!0),K5=ja("Map.prototype.get",!0),G5=ja("Map.prototype.set",!0),Y5=ja("Map.prototype.has",!0),Cp=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},J5=function(e,t){var n=Cp(e,t);return n&&n.value},X5=function(e,t,n){var r=Cp(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},Q5=function(e,t){return!!Cp(e,t)},Ip=function(){var t,n,r,i={assert:function(a){if(!i.has(a))throw new W5("Side channel does not contain "+q5(a))},get:function(a){if(mc&&a&&(typeof a=="object"||typeof a=="function")){if(t)return H5(t,a)}else if(vc){if(n)return K5(n,a)}else if(r)return J5(r,a)},has:function(a){if(mc&&a&&(typeof a=="object"||typeof a=="function")){if(t)return Z5(t,a)}else if(vc){if(n)return Y5(n,a)}else if(r)return Q5(r,a);return!1},set:function(a,o){mc&&a&&(typeof a=="object"||typeof a=="function")?(t||(t=new mc),V5(t,a,o)):vc?(n||(n=new vc),G5(n,a,o)):(r||(r={key:{},next:null}),X5(r,a,o))}};return i},e3=String.prototype.replace,t3=/%20/g,Rp={RFC1738:"RFC1738",RFC3986:"RFC3986"},Ap={default:Rp.RFC3986,formatters:{RFC1738:function(e){return e3.call(e,t3,"+")},RFC3986:function(e){return String(e)}},RFC1738:Rp.RFC1738,RFC3986:Rp.RFC3986},n3=Ap,Pp=Object.prototype.hasOwnProperty,Ki=Array.isArray,yr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),r3=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Ki(r)){for(var i=[],a=0;a<r.length;++a)typeof r[a]<"u"&&i.push(r[a]);n.obj[n.prop]=i}}},P0=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},i=0;i<t.length;++i)typeof t[i]<"u"&&(r[i]=t[i]);return r},i3=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Ki(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Pp.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var i=t;return Ki(t)&&!Ki(n)&&(i=P0(t,r)),Ki(t)&&Ki(n)?(n.forEach(function(a,o){if(Pp.call(t,o)){var s=t[o];s&&typeof s=="object"&&a&&typeof a=="object"?t[o]=e(s,a,r):t.push(a)}else t[o]=a}),t):Object.keys(n).reduce(function(a,o){var s=n[o];return Pp.call(a,o)?a[o]=e(a[o],s,r):a[o]=s,a},i)},a3=function(t,n){return Object.keys(n).reduce(function(r,i){return r[i]=n[i],r},t)},o3=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},jp=1024,s3=function(t,n,r,i,a){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),r==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(p){return"%26%23"+parseInt(p.slice(2),16)+"%3B"});for(var s="",l=0;l<o.length;l+=jp){for(var c=o.length>=jp?o.slice(l,l+jp):o,u=[],f=0;f<c.length;++f){var d=c.charCodeAt(f);if(d===45||d===46||d===95||d===126||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122||a===n3.RFC1738&&(d===40||d===41)){u[u.length]=c.charAt(f);continue}if(d<128){u[u.length]=yr[d];continue}if(d<2048){u[u.length]=yr[192|d>>6]+yr[128|d&63];continue}if(d<55296||d>=57344){u[u.length]=yr[224|d>>12]+yr[128|d>>6&63]+yr[128|d&63];continue}f+=1,d=65536+((d&1023)<<10|c.charCodeAt(f)&1023),u[u.length]=yr[240|d>>18]+yr[128|d>>12&63]+yr[128|d>>6&63]+yr[128|d&63]}s+=u.join("")}return s},l3=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],i=0;i<n.length;++i)for(var a=n[i],o=a.obj[a.prop],s=Object.keys(o),l=0;l<s.length;++l){var c=s[l],u=o[c];typeof u=="object"&&u!==null&&r.indexOf(u)===-1&&(n.push({obj:o,prop:c}),r.push(u))}return r3(n),t},c3=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},u3=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},f3=function(t,n){return[].concat(t,n)},d3=function(t,n){if(Ki(t)){for(var r=[],i=0;i<t.length;i+=1)r.push(n(t[i]));return r}return n(t)},j0={arrayToObject:P0,assign:a3,combine:f3,compact:l3,decode:o3,encode:s3,isBuffer:u3,isRegExp:c3,maybeMap:d3,merge:i3},N0=Ip,gc=j0,cs=Ap,p3=Object.prototype.hasOwnProperty,D0={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},br=Array.isArray,h3=Array.prototype.push,M0=function(e,t){h3.apply(e,br(t)?t:[t])},m3=Date.prototype.toISOString,L0=cs.default,Lt={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:gc.encode,encodeValuesOnly:!1,format:L0,formatter:cs.formatters[L0],indices:!1,serializeDate:function(t){return m3.call(t)},skipNulls:!1,strictNullHandling:!1},v3=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Np={},g3=function e(t,n,r,i,a,o,s,l,c,u,f,d,p,h,m,y,v,g){for(var b=t,k=g,S=0,_=!1;(k=k.get(Np))!==void 0&&!_;){var $=k.get(t);if(S+=1,typeof $<"u"){if($===S)throw new RangeError("Cyclic object value");_=!0}typeof k.get(Np)>"u"&&(S=0)}if(typeof u=="function"?b=u(n,b):b instanceof Date?b=p(b):r==="comma"&&br(b)&&(b=gc.maybeMap(b,function(x){return x instanceof Date?p(x):x})),b===null){if(o)return c&&!y?c(n,Lt.encoder,v,"key",h):n;b=""}if(v3(b)||gc.isBuffer(b)){if(c){var j=y?n:c(n,Lt.encoder,v,"key",h);return[m(j)+"="+m(c(b,Lt.encoder,v,"value",h))]}return[m(n)+"="+m(String(b))]}var z=[];if(typeof b>"u")return z;var O;if(r==="comma"&&br(b))y&&c&&(b=gc.maybeMap(b,c)),O=[{value:b.length>0?b.join(",")||null:void 0}];else if(br(u))O=u;else{var N=Object.keys(b);O=f?N.sort(f):N}var W=l?n.replace(/\./g,"%2E"):n,L=i&&br(b)&&b.length===1?W+"[]":W;if(a&&br(b)&&b.length===0)return L+"[]";for(var U=0;U<O.length;++U){var M=O[U],I=typeof M=="object"&&typeof M.value<"u"?M.value:b[M];if(!(s&&I===null)){var H=d&&l?M.replace(/\./g,"%2E"):M,B=br(b)?typeof r=="function"?r(L,H):L:L+(d?"."+H:"["+H+"]");g.set(t,S);var A=N0();A.set(Np,g),M0(z,e(I,B,r,i,a,o,s,l,r==="comma"&&y&&br(b)?null:c,u,f,d,p,h,m,y,v,A))}}return z},y3=function(t){if(!t)return Lt;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var n=t.charset||Lt.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=cs.default;if(typeof t.format<"u"){if(!p3.call(cs.formatters,t.format))throw new TypeError("Unknown format option provided.");r=t.format}var i=cs.formatters[r],a=Lt.filter;(typeof t.filter=="function"||br(t.filter))&&(a=t.filter);var o;if(t.arrayFormat in D0?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=Lt.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Lt.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Lt.addQueryPrefix,allowDots:s,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Lt.allowEmptyArrays,arrayFormat:o,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Lt.charsetSentinel,commaRoundTrip:t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Lt.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Lt.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Lt.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Lt.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Lt.encodeValuesOnly,filter:a,format:r,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Lt.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Lt.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Lt.strictNullHandling}},b3=function(e,t){var n=e,r=y3(t),i,a;typeof r.filter=="function"?(a=r.filter,n=a("",n)):br(r.filter)&&(a=r.filter,i=a);var o=[];if(typeof n!="object"||n===null)return"";var s=D0[r.arrayFormat],l=s==="comma"&&r.commaRoundTrip;i||(i=Object.keys(n)),r.sort&&i.sort(r.sort);for(var c=N0(),u=0;u<i.length;++u){var f=i[u];r.skipNulls&&n[f]===null||M0(o,g3(n[f],f,s,l,r.allowEmptyArrays,r.strictNullHandling,r.skipNulls,r.encodeDotInKeys,r.encode?r.encoder:null,r.filter,r.sort,r.allowDots,r.serializeDate,r.format,r.formatter,r.encodeValuesOnly,r.charset,c))}var d=o.join(r.delimiter),p=r.addQueryPrefix===!0?"?":"";return r.charsetSentinel&&(r.charset==="iso-8859-1"?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),d.length>0?p+d:""},Na=j0,Dp=Object.prototype.hasOwnProperty,x3=Array.isArray,$t={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Na.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},w3=function(e){return e.replace(/&#(\d+);/g,function(t,n){return String.fromCharCode(parseInt(n,10))})},F0=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},S3="utf8=%26%2310003%3B",E3="utf8=%E2%9C%93",_3=function(t,n){var r={__proto__:null},i=n.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=n.parameterLimit===1/0?void 0:n.parameterLimit,o=i.split(n.delimiter,a),s=-1,l,c=n.charset;if(n.charsetSentinel)for(l=0;l<o.length;++l)o[l].indexOf("utf8=")===0&&(o[l]===E3?c="utf-8":o[l]===S3&&(c="iso-8859-1"),s=l,l=o.length);for(l=0;l<o.length;++l)if(l!==s){var u=o[l],f=u.indexOf("]="),d=f===-1?u.indexOf("="):f+1,p,h;d===-1?(p=n.decoder(u,$t.decoder,c,"key"),h=n.strictNullHandling?null:""):(p=n.decoder(u.slice(0,d),$t.decoder,c,"key"),h=Na.maybeMap(F0(u.slice(d+1),n),function(y){return n.decoder(y,$t.decoder,c,"value")})),h&&n.interpretNumericEntities&&c==="iso-8859-1"&&(h=w3(h)),u.indexOf("[]=")>-1&&(h=x3(h)?[h]:h);var m=Dp.call(r,p);m&&n.duplicates==="combine"?r[p]=Na.combine(r[p],h):(!m||n.duplicates==="last")&&(r[p]=h)}return r},k3=function(e,t,n,r){for(var i=r?t:F0(t,n),a=e.length-1;a>=0;--a){var o,s=e[a];if(s==="[]"&&n.parseArrays)o=n.allowEmptyArrays&&(i===""||n.strictNullHandling&&i===null)?[]:[].concat(i);else{o=n.plainObjects?Object.create(null):{};var l=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,c=n.decodeDotInKeys?l.replace(/%2E/g,"."):l,u=parseInt(c,10);!n.parseArrays&&c===""?o={0:i}:!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(o=[],o[u]=i):c!=="__proto__"&&(o[c]=i)}i=o}return i},$3=function(t,n,r,i){if(t){var a=r.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=r.depth>0&&o.exec(a),c=l?a.slice(0,l.index):a,u=[];if(c){if(!r.plainObjects&&Dp.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var f=0;r.depth>0&&(l=s.exec(a))!==null&&f<r.depth;){if(f+=1,!r.plainObjects&&Dp.call(Object.prototype,l[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(l[1])}if(l){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");u.push("["+a.slice(l.index)+"]")}return k3(u,n,r,i)}},O3=function(t){if(!t)return $t;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=typeof t.charset>"u"?$t.charset:t.charset,r=typeof t.duplicates>"u"?$t.duplicates:t.duplicates;if(r!=="combine"&&r!=="first"&&r!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:$t.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:$t.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:$t.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:$t.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:$t.arrayLimit,charset:n,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:$t.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:$t.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:$t.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:$t.decoder,delimiter:typeof t.delimiter=="string"||Na.isRegExp(t.delimiter)?t.delimiter:$t.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:$t.depth,duplicates:r,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:$t.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:$t.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:$t.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:$t.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:$t.strictNullHandling}},T3=function(e,t){var n=O3(t);if(e===""||e===null||typeof e>"u")return n.plainObjects?Object.create(null):{};for(var r=typeof e=="string"?_3(e,n):e,i=n.plainObjects?Object.create(null):{},a=Object.keys(r),o=0;o<a.length;++o){var s=a[o],l=$3(s,r[s],n,typeof e=="string");i=Na.merge(i,l,n)}return n.allowSparse===!0?i:Na.compact(i)},C3=b3,I3=T3,R3=Ap,A3={formats:R3,parse:I3,stringify:C3};const P3=Ze(A3);var Mp={exports:{}};/** @license
|
|
63
63
|
* eventsource.js
|
|
64
64
|
* Available under MIT License (MIT)
|
|
65
65
|
* https://github.com/Yaffle/EventSource/
|
|
66
66
|
*/(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,a=n.XMLHttpRequest,o=n.XDomainRequest,s=n.ActiveXObject,l=n.EventSource,c=n.document,u=n.Promise,f=n.fetch,d=n.Response,p=n.TextDecoder,h=n.TextEncoder,m=n.AbortController;if(typeof window<"u"&&typeof c<"u"&&!("readyState"in c)&&c.body==null&&(c.readyState="loading",window.addEventListener("load",function(R){c.readyState="complete"},!1)),a==null&&s!=null&&(a=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(R){function Y(){}return Y.prototype=R,new Y}),Date.now||(Date.now=function(){return new Date().getTime()}),m==null){var y=f;f=function(R,Y){var ae=Y.signal;return y(R,{headers:Y.headers,credentials:Y.credentials,cache:Y.cache}).then(function(ee){var ke=ee.body.getReader();return ae._reader=ke,ae._aborted&&ae._reader.cancel(),{status:ee.status,statusText:ee.statusText,headers:ee.headers,body:{getReader:function(){return ke}}}})},m=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function v(){this.bitsNeeded=0,this.codePoint=0}v.prototype.decode=function(R){function Y(Be,F,P){if(P===1)return Be>=128>>F&&Be<<F<=2047;if(P===2)return Be>=2048>>F&&Be<<F<=55295||Be>=57344>>F&&Be<<F<=65535;if(P===3)return Be>=65536>>F&&Be<<F<=1114111;throw new Error}function ae(Be,F){if(Be===6*1)return F>>6>15?3:F>31?2:1;if(Be===6*2)return F>15?3:2;if(Be===6*3)return 3;throw new Error}for(var ee=65533,ke="",we=this.bitsNeeded,Re=this.codePoint,Ve=0;Ve<R.length;Ve+=1){var Ae=R[Ve];we!==0&&(Ae<128||Ae>191||!Y(Re<<6|Ae&63,we-6,ae(we,Re)))&&(we=0,Re=ee,ke+=String.fromCharCode(Re)),we===0?(Ae>=0&&Ae<=127?(we=0,Re=Ae):Ae>=192&&Ae<=223?(we=6*1,Re=Ae&31):Ae>=224&&Ae<=239?(we=6*2,Re=Ae&15):Ae>=240&&Ae<=247?(we=6*3,Re=Ae&7):(we=0,Re=ee),we!==0&&!Y(Re,we,ae(we,Re))&&(we=0,Re=ee)):(we-=6,Re=Re<<6|Ae&63),we===0&&(Re<=65535?ke+=String.fromCharCode(Re):(ke+=String.fromCharCode(55296+(Re-65535-1>>10)),ke+=String.fromCharCode(56320+(Re-65535-1&1023))))}return this.bitsNeeded=we,this.codePoint=Re,ke};var g=function(){try{return new p().decode(new h().encode("test"),{stream:!0})==="test"}catch(R){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+R)}return!1};(p==null||h==null||!g())&&(p=v);var b=function(){};function k(R){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=b,this.onload=b,this.onerror=b,this.onreadystatechange=b,this._contentType="",this._xhr=R,this._sendTimeout=0,this._abort=b}k.prototype.open=function(R,Y){this._abort(!0);var ae=this,ee=this._xhr,ke=1,we=0;this._abort=function(P){ae._sendTimeout!==0&&(i(ae._sendTimeout),ae._sendTimeout=0),(ke===1||ke===2||ke===3)&&(ke=4,ee.onload=b,ee.onerror=b,ee.onabort=b,ee.onprogress=b,ee.onreadystatechange=b,ee.abort(),we!==0&&(i(we),we=0),P||(ae.readyState=4,ae.onabort(null),ae.onreadystatechange())),ke=0};var Re=function(){if(ke===1){var P=0,J="",ue=void 0;if("contentType"in ee)P=200,J="OK",ue=ee.contentType;else try{P=ee.status,J=ee.statusText,ue=ee.getResponseHeader("Content-Type")}catch{P=0,J="",ue=void 0}P!==0&&(ke=2,ae.readyState=2,ae.status=P,ae.statusText=J,ae._contentType=ue,ae.onreadystatechange())}},Ve=function(){if(Re(),ke===2||ke===3){ke=3;var P="";try{P=ee.responseText}catch{}ae.readyState=3,ae.responseText=P,ae.onprogress()}},Ae=function(P,J){if((J==null||J.preventDefault==null)&&(J={preventDefault:b}),Ve(),ke===1||ke===2||ke===3){if(ke=4,we!==0&&(i(we),we=0),ae.readyState=4,P==="load")ae.onload(J);else if(P==="error")ae.onerror(J);else if(P==="abort")ae.onabort(J);else throw new TypeError;ae.onreadystatechange()}},Be=function(P){ee!=null&&(ee.readyState===4?(!("onload"in ee)||!("onerror"in ee)||!("onabort"in ee))&&Ae(ee.responseText===""?"error":"load",P):ee.readyState===3?"onprogress"in ee||Ve():ee.readyState===2&&Re())},F=function(){we=r(function(){F()},500),ee.readyState===3&&Ve()};"onload"in ee&&(ee.onload=function(P){Ae("load",P)}),"onerror"in ee&&(ee.onerror=function(P){Ae("error",P)}),"onabort"in ee&&(ee.onabort=function(P){Ae("abort",P)}),"onprogress"in ee&&(ee.onprogress=Ve),"onreadystatechange"in ee&&(ee.onreadystatechange=function(P){Be(P)}),("contentType"in ee||!("ontimeout"in a.prototype))&&(Y+=(Y.indexOf("?")===-1?"?":"&")+"padding=true"),ee.open(R,Y,!0),"readyState"in ee&&(we=r(function(){F()},0))},k.prototype.abort=function(){this._abort(!1)},k.prototype.getResponseHeader=function(R){return this._contentType},k.prototype.setRequestHeader=function(R,Y){var ae=this._xhr;"setRequestHeader"in ae&&ae.setRequestHeader(R,Y)},k.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},k.prototype.send=function(){if((!("ontimeout"in a.prototype)||!("sendAsBinary"in a.prototype)&&!("mozAnon"in a.prototype))&&c!=null&&c.readyState!=null&&c.readyState!=="complete"){var R=this;R._sendTimeout=r(function(){R._sendTimeout=0,R.send()},4);return}var Y=this._xhr;"withCredentials"in Y&&(Y.withCredentials=this.withCredentials);try{Y.send(void 0)}catch(ae){throw ae}};function S(R){return R.replace(/[A-Z]/g,function(Y){return String.fromCharCode(Y.charCodeAt(0)+32)})}function _(R){for(var Y=Object.create(null),ae=R.split(`\r
|
|
67
67
|
`),ee=0;ee<ae.length;ee+=1){var ke=ae[ee],we=ke.split(": "),Re=we.shift(),Ve=we.join(": ");Y[S(Re)]=Ve}this._map=Y}_.prototype.get=function(R){return this._map[S(R)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function $(){}$.prototype.open=function(R,Y,ae,ee,ke,we,Re){R.open("GET",ke);var Ve=0;R.onprogress=function(){var Be=R.responseText,F=Be.slice(Ve);Ve+=F.length,ae(F)},R.onerror=function(Be){Be.preventDefault(),ee(new Error("NetworkError"))},R.onload=function(){ee(null)},R.onabort=function(){ee(null)},R.onreadystatechange=function(){if(R.readyState===a.HEADERS_RECEIVED){var Be=R.status,F=R.statusText,P=R.getResponseHeader("Content-Type"),J=R.getAllResponseHeaders();Y(Be,F,P,new _(J))}},R.withCredentials=we;for(var Ae in Re)Object.prototype.hasOwnProperty.call(Re,Ae)&&R.setRequestHeader(Ae,Re[Ae]);return R.send(),R};function j(R){this._headers=R}j.prototype.get=function(R){return this._headers.get(R)};function z(){}z.prototype.open=function(R,Y,ae,ee,ke,we,Re){var Ve=null,Ae=new m,Be=Ae.signal,F=new p;return f(ke,{headers:Re,credentials:we?"include":"same-origin",signal:Be,cache:"no-store"}).then(function(P){return Ve=P.body.getReader(),Y(P.status,P.statusText,P.headers.get("Content-Type"),new j(P.headers)),new u(function(J,ue){var _e=function(){Ve.read().then(function(Oe){if(Oe.done)J(void 0);else{var Xe=F.decode(Oe.value,{stream:!0});ae(Xe),_e()}}).catch(function(Oe){ue(Oe)})};_e()})}).catch(function(P){if(P.name!=="AbortError")return P}).then(function(P){ee(P)}),{abort:function(){Ve!=null&&Ve.cancel(),Ae.abort()}}};function O(){this._listeners=Object.create(null)}function N(R){r(function(){throw R},0)}O.prototype.dispatchEvent=function(R){R.target=this;var Y=this._listeners[R.type];if(Y!=null)for(var ae=Y.length,ee=0;ee<ae;ee+=1){var ke=Y[ee];try{typeof ke.handleEvent=="function"?ke.handleEvent(R):ke.call(this,R)}catch(we){N(we)}}},O.prototype.addEventListener=function(R,Y){R=String(R);var ae=this._listeners,ee=ae[R];ee==null&&(ee=[],ae[R]=ee);for(var ke=!1,we=0;we<ee.length;we+=1)ee[we]===Y&&(ke=!0);ke||ee.push(Y)},O.prototype.removeEventListener=function(R,Y){R=String(R);var ae=this._listeners,ee=ae[R];if(ee!=null){for(var ke=[],we=0;we<ee.length;we+=1)ee[we]!==Y&&ke.push(ee[we]);ke.length===0?delete ae[R]:ae[R]=ke}};function W(R){this.type=R,this.target=void 0}function L(R,Y){W.call(this,R),this.data=Y.data,this.lastEventId=Y.lastEventId}L.prototype=Object.create(W.prototype);function U(R,Y){W.call(this,R),this.status=Y.status,this.statusText=Y.statusText,this.headers=Y.headers}U.prototype=Object.create(W.prototype);function M(R,Y){W.call(this,R),this.error=Y.error}M.prototype=Object.create(W.prototype);var I=-1,H=0,B=1,A=2,x=-1,q=0,K=1,E=2,Q=3,oe=/^text\/event\-stream(;.*)?$/i,ne=1e3,le=18e6,pe=function(R,Y){var ae=R==null?Y:parseInt(R,10);return ae!==ae&&(ae=Y),he(ae)},he=function(R){return Math.min(Math.max(R,ne),le)},ce=function(R,Y,ae){try{typeof Y=="function"&&Y.call(R,ae)}catch(ee){N(ee)}};function X(R,Y){O.call(this),Y=Y||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ve(this,R,Y)}function Z(){return a!=null&&"withCredentials"in a.prototype||o==null?new a:new o}var de=f!=null&&d!=null&&"body"in d.prototype;function ve(R,Y,ae){Y=String(Y);var ee=!!ae.withCredentials,ke=ae.lastEventIdQueryParameterName||"lastEventId",we=he(1e3),Re=pe(ae.heartbeatTimeout,45e3),Ve="",Ae=we,Be=!1,F=0,P=ae.headers||{},J=ae.Transport,ue=de&&J==null?void 0:new k(J!=null?new J:Z()),_e=J!=null&&typeof J!="string"?new J:ue==null?new z:new $,Oe=void 0,Xe=0,ct=I,Ut="",Tt="",Ge="",Ct="",nt=q,wn=0,Rn=0,cr=function(mt,St,qt,Wt){if(ct===H)if(mt===200&&qt!=null&&oe.test(qt)){ct=B,Be=Date.now(),Ae=we,R.readyState=B;var Qt=new U("open",{status:mt,statusText:St,headers:Wt});R.dispatchEvent(Qt),ce(R,R.onopen,Qt)}else{var Ht="";mt!==200?(St&&(St=St.replace(/\s+/g," ")),Ht="EventSource's response has a status "+mt+" "+St+" that is not 200. Aborting the connection."):Ht="EventSource's response has a Content-Type specifying an unsupported type: "+(qt==null?"-":qt.replace(/\s+/g," "))+". Aborting the connection.",ur();var Qt=new U("error",{status:mt,statusText:St,headers:Wt});R.dispatchEvent(Qt),ce(R,R.onerror,Qt),console.error(Ht)}},ei=function(mt){if(ct===B){for(var St=-1,qt=0;qt<mt.length;qt+=1){var Wt=mt.charCodeAt(qt);(Wt===10||Wt===13)&&(St=qt)}var Qt=(St!==-1?Ct:"")+mt.slice(0,St+1);Ct=(St===-1?Ct:"")+mt.slice(St+1),mt!==""&&(Be=Date.now(),F+=mt.length);for(var Ht=0;Ht<Qt.length;Ht+=1){var Wt=Qt.charCodeAt(Ht);if(nt===x&&Wt===10)nt=q;else if(nt===x&&(nt=q),Wt===13||Wt===10){if(nt!==q){nt===K&&(Rn=Ht+1);var qn=Qt.slice(wn,Rn-1),Wn=Qt.slice(Rn+(Rn<Ht&&Qt.charCodeAt(Rn)===32?1:0),Ht);qn==="data"?(Ut+=`
|
|
68
|
-
`,Ut+=Wn):qn==="id"?Tt=Wn:qn==="event"?Ge=Wn:qn==="retry"?(we=pe(Wn,we),Ae=we):qn==="heartbeatTimeout"&&(Re=pe(Wn,Re),Xe!==0&&(i(Xe),Xe=r(function(){ti()},Re)))}if(nt===q){if(Ut!==""){Ve=Tt,Ge===""&&(Ge="message");var Ni=new L(Ge,{data:Ut.slice(1),lastEventId:Tt});if(R.dispatchEvent(Ni),Ge==="open"?ce(R,R.onopen,Ni):Ge==="message"?ce(R,R.onmessage,Ni):Ge==="error"&&ce(R,R.onerror,Ni),ct===A)return}Ut="",Ge=""}nt=Wt===13?x:q}else nt===q&&(wn=Ht,nt=K),nt===K?Wt===58&&(Rn=Ht+1,nt=E):nt===E&&(nt=Q)}}},Mr=function(mt){if(ct===B||ct===H){ct=I,Xe!==0&&(i(Xe),Xe=0),Xe=r(function(){ti()},Ae),Ae=he(Math.min(we*16,Ae*2)),R.readyState=H;var St=new M("error",{error:mt});R.dispatchEvent(St),ce(R,R.onerror,St),mt!=null&&console.error(mt)}},ur=function(){ct=A,Oe!=null&&(Oe.abort(),Oe=void 0),Xe!==0&&(i(Xe),Xe=0),R.readyState=A},ti=function(){if(Xe=0,ct!==I){if(!Be&&Oe!=null)Mr(new Error("No activity within "+Re+" milliseconds. "+(ct===H?"No response received.":F+" chars received.")+" Reconnecting.")),Oe!=null&&(Oe.abort(),Oe=void 0);else{var mt=Math.max((Be||Date.now())+Re-Date.now(),1);Be=!1,Xe=r(function(){ti()},mt)}return}Be=!1,F=0,Xe=r(function(){ti()},Re),ct=H,Ut="",Ge="",Tt=Ve,Ct="",wn=0,Rn=0,nt=q;var St=Y;if(Y.slice(0,5)!=="data:"&&Y.slice(0,5)!=="blob:"&&Ve!==""){var qt=Y.indexOf("?");St=qt===-1?Y:Y.slice(0,qt+1)+Y.slice(qt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Wn,Ni){return Ni===ke?"":Wn}),St+=(Y.indexOf("?")===-1?"?":"&")+ke+"="+encodeURIComponent(Ve)}var Wt=R.withCredentials,Qt={};Qt.Accept="text/event-stream";var Ht=R.headers;if(Ht!=null)for(var qn in Ht)Object.prototype.hasOwnProperty.call(Ht,qn)&&(Qt[qn]=Ht[qn]);try{Oe=_e.open(ue,cr,ei,Mr,St,Wt,Qt)}catch(Wn){throw ur(),Wn}};R.url=Y,R.readyState=H,R.withCredentials=ee,R.headers=P,R._close=ur,ti()}X.prototype=Object.create(O.prototype),X.prototype.CONNECTING=H,X.prototype.OPEN=B,X.prototype.CLOSED=A,X.prototype.close=function(){this._close()},X.CONNECTING=H,X.OPEN=B,X.CLOSED=A,X.prototype.withCredentials=void 0;var Ce=l;a!=null&&(l==null||!("withCredentials"in l.prototype))&&(Ce=X),function(R){{var Y=R(t);Y!==void 0&&(e.exports=Y)}}(function(R){R.EventSourcePolyfill=X,R.NativeEventSource=l,R.EventSource=Ce})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:ut:globalThis)})(Mp,Mp.exports);var j3=Mp.exports;const N3=Ze(j3);var et;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(et||(et={}));var Lp;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Lp||(Lp={}));const be=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),pi=e=>{switch(typeof e){case"undefined":return be.undefined;case"string":return be.string;case"number":return isNaN(e)?be.nan:be.number;case"boolean":return be.boolean;case"function":return be.function;case"bigint":return be.bigint;case"symbol":return be.symbol;case"object":return Array.isArray(e)?be.array:e===null?be.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?be.promise:typeof Map<"u"&&e instanceof Map?be.map:typeof Set<"u"&&e instanceof Set?be.set:typeof Date<"u"&&e instanceof Date?be.date:be.object;default:return be.unknown}},re=et.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),D3=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class _n extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(o))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return i(this),r}static assert(t){if(!(t instanceof _n))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}_n.create=e=>new _n(e);const Da=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===be.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case re.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let F0=Da;function M3(e){F0=e}function bc(){return F0}const xc=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},L3=[];function me(e,t){const n=bc(),r=xc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Da?void 0:Da].filter(i=>!!i)});e.common.issues.push(r)}class rn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return De;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return rn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return De;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const De=Object.freeze({status:"aborted"}),Ma=e=>({status:"dirty",value:e}),un=e=>({status:"valid",value:e}),Fp=e=>e.status==="aborted",Bp=e=>e.status==="dirty",us=e=>e.status==="valid",fs=e=>typeof Promise<"u"&&e instanceof Promise;function wc(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function B0(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var $e;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})($e||($e={}));var ds,ps;class xr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const z0=(e,t)=>{if(us(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new _n(e.common.issues);return this._error=n,this._error}}};function qe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var l,c;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:i}}class He{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return pi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:pi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new rn,ctx:{common:t.parent.common,data:t.data,parsedType:pi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(fs(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:pi(t)},a=this._parseSync({data:t,path:i.path,parent:i});return z0(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:pi(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(fs(i)?i:Promise.resolve(i));return z0(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:re.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Jn({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Sr.create(this,this._def)}nullable(){return gi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yn.create(this,this._def)}promise(){return za.create(this,this._def)}or(t){return gs.create([this,t],this._def)}and(t){return ys.create(this,t,this._def)}transform(t){return new Jn({...qe(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Es({...qe(this._def),innerType:this,defaultValue:n,typeName:Ne.ZodDefault})}brand(){return new qp({typeName:Ne.ZodBranded,type:this,...qe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new _s({...qe(this._def),innerType:this,catchValue:n,typeName:Ne.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return ks.create(this,t)}readonly(){return $s.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const F3=/^c[^\s-]{8,}$/i,B3=/^[0-9a-z]+$/,z3=/^[0-9A-HJKMNP-TV-Z]{26}$/,U3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,q3=/^[a-z0-9_-]{21}$/i,W3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,H3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,V3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let zp;const Z3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,K3=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,G3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,U0="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Y3=new RegExp(`^${U0}$`);function q0(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function J3(e){return new RegExp(`^${q0(e)}$`)}function W0(e){let t=`${U0}T${q0(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function X3(e,t){return!!((t==="v4"||!t)&&Z3.test(e)||(t==="v6"||!t)&&K3.test(e))}class Gn extends He{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==be.string){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_type,expected:be.string,received:a.parsedType}),De}const r=new rn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?me(i,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&me(i,{code:re.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")H3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"email",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")zp||(zp=new RegExp(V3,"u")),zp.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"emoji",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")U3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"uuid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")q3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"nanoid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")F3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")B3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid2",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")z3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ulid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),me(i,{validation:"url",code:re.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"regex",code:re.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?W0(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?Y3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?J3(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?W3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"duration",code:re.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?X3(t.data,a.version)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ip",code:re.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?G3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"base64",code:re.invalid_string,message:a.message}),r.dirty()):et.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:re.invalid_string,...$e.errToObj(r)})}_addCheck(t){return new Gn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...$e.errToObj(t)})}url(t){return this._addCheck({kind:"url",...$e.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...$e.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...$e.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...$e.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...$e.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...$e.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...$e.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...$e.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...$e.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...$e.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...$e.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...$e.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...$e.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...$e.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...$e.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...$e.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...$e.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...$e.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...$e.errToObj(n)})}nonempty(t){return this.min(1,$e.errToObj(t))}trim(){return new Gn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Gn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Gn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Gn.create=e=>{var t;return new Gn({checks:[],typeName:Ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...qe(e)})};function Q3(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class hi extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==be.number){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_type,expected:be.number,received:a.parsedType}),De}let r;const i=new rn;for(const a of this._def.checks)a.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:re.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?Q3(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_finite,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,$e.toString(n))}gt(t,n){return this.setLimit("min",t,!1,$e.toString(n))}lte(t,n){return this.setLimit("max",t,!0,$e.toString(n))}lt(t,n){return this.setLimit("max",t,!1,$e.toString(n))}setLimit(t,n,r,i){return new hi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:$e.toString(i)}]})}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:$e.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$e.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:$e.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$e.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$e.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&et.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}hi.create=e=>new hi({checks:[],typeName:Ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...qe(e)});class mi extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==be.bigint){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_type,expected:be.bigint,received:a.parsedType}),De}let r;const i=new rn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,$e.toString(n))}gt(t,n){return this.setLimit("min",t,!1,$e.toString(n))}lte(t,n){return this.setLimit("max",t,!0,$e.toString(n))}lt(t,n){return this.setLimit("max",t,!1,$e.toString(n))}setLimit(t,n,r,i){return new mi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:$e.toString(i)}]})}_addCheck(t){return new mi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}mi.create=e=>{var t;return new mi({checks:[],typeName:Ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...qe(e)})};class hs extends He{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==be.boolean){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.boolean,received:r.parsedType}),De}return un(t.data)}}hs.create=e=>new hs({typeName:Ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...qe(e)});class Gi extends He{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==be.date){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_type,expected:be.date,received:a.parsedType}),De}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_date}),De}const r=new rn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):et.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Gi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:$e.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:$e.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Gi.create=e=>new Gi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ne.ZodDate,...qe(e)});class Sc extends He{_parse(t){if(this._getType(t)!==be.symbol){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.symbol,received:r.parsedType}),De}return un(t.data)}}Sc.create=e=>new Sc({typeName:Ne.ZodSymbol,...qe(e)});class ms extends He{_parse(t){if(this._getType(t)!==be.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.undefined,received:r.parsedType}),De}return un(t.data)}}ms.create=e=>new ms({typeName:Ne.ZodUndefined,...qe(e)});class vs extends He{_parse(t){if(this._getType(t)!==be.null){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.null,received:r.parsedType}),De}return un(t.data)}}vs.create=e=>new vs({typeName:Ne.ZodNull,...qe(e)});class La extends He{constructor(){super(...arguments),this._any=!0}_parse(t){return un(t.data)}}La.create=e=>new La({typeName:Ne.ZodAny,...qe(e)});class Yi extends He{constructor(){super(...arguments),this._unknown=!0}_parse(t){return un(t.data)}}Yi.create=e=>new Yi({typeName:Ne.ZodUnknown,...qe(e)});class Ur extends He{_parse(t){const n=this._getOrReturnCtx(t);return me(n,{code:re.invalid_type,expected:be.never,received:n.parsedType}),De}}Ur.create=e=>new Ur({typeName:Ne.ZodNever,...qe(e)});class Ec extends He{_parse(t){if(this._getType(t)!==be.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.void,received:r.parsedType}),De}return un(t.data)}}Ec.create=e=>new Ec({typeName:Ne.ZodVoid,...qe(e)});class Yn extends He{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==be.array)return me(n,{code:re.invalid_type,expected:be.array,received:n.parsedType}),De;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(me(n,{code:o?re.too_big:re.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(me(n,{code:re.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(me(n,{code:re.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new xr(n,o,n.path,s)))).then(o=>rn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new xr(n,o,n.path,s)));return rn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new Yn({...this._def,minLength:{value:t,message:$e.toString(n)}})}max(t,n){return new Yn({...this._def,maxLength:{value:t,message:$e.toString(n)}})}length(t,n){return new Yn({...this._def,exactLength:{value:t,message:$e.toString(n)}})}nonempty(t){return this.min(1,t)}}Yn.create=(e,t)=>new Yn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...qe(t)});function Fa(e){if(e instanceof Et){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Sr.create(Fa(r))}return new Et({...e._def,shape:()=>t})}else return e instanceof Yn?new Yn({...e._def,type:Fa(e.element)}):e instanceof Sr?Sr.create(Fa(e.unwrap())):e instanceof gi?gi.create(Fa(e.unwrap())):e instanceof wr?wr.create(e.items.map(t=>Fa(t))):e}class Et extends He{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=et.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==be.object){const c=this._getOrReturnCtx(t);return me(c,{code:re.invalid_type,expected:be.object,received:c.parsedType}),De}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ur&&this._def.unknownKeys==="strip"))for(const c in i.data)o.includes(c)||s.push(c);const l=[];for(const c of o){const u=a[c],f=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new xr(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Ur){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")s.length>0&&(me(i,{code:re.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const f=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new xr(i,f,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key,d=await u.value;c.push({key:f,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>rn.mergeObjectSync(r,c)):rn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return $e.errToObj,new Et({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const l=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=$e.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new Et({...this._def,unknownKeys:"strip"})}passthrough(){return new Et({...this._def,unknownKeys:"passthrough"})}extend(t){return new Et({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Et({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Et({...this._def,catchall:t})}pick(t){const n={};return et.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Et({...this._def,shape:()=>n})}omit(t){const n={};return et.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Et({...this._def,shape:()=>n})}deepPartial(){return Fa(this)}partial(t){const n={};return et.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Et({...this._def,shape:()=>n})}required(t){const n={};return et.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Sr;)a=a._def.innerType;n[r]=a}}),new Et({...this._def,shape:()=>n})}keyof(){return H0(et.objectKeys(this.shape))}}Et.create=(e,t)=>new Et({shape:()=>e,unknownKeys:"strip",catchall:Ur.create(),typeName:Ne.ZodObject,...qe(t)}),Et.strictCreate=(e,t)=>new Et({shape:()=>e,unknownKeys:"strict",catchall:Ur.create(),typeName:Ne.ZodObject,...qe(t)}),Et.lazycreate=(e,t)=>new Et({shape:e,unknownKeys:"strip",catchall:Ur.create(),typeName:Ne.ZodObject,...qe(t)});class gs extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new _n(s.ctx.common.issues));return me(n,{code:re.invalid_union,unionErrors:o}),De}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(l=>new _n(l));return me(n,{code:re.invalid_union,unionErrors:s}),De}}get options(){return this._def.options}}gs.create=(e,t)=>new gs({options:e,typeName:Ne.ZodUnion,...qe(t)});const qr=e=>e instanceof xs?qr(e.schema):e instanceof Jn?qr(e.innerType()):e instanceof ws?[e.value]:e instanceof vi?e.options:e instanceof Ss?et.objectValues(e.enum):e instanceof Es?qr(e._def.innerType):e instanceof ms?[void 0]:e instanceof vs?[null]:e instanceof Sr?[void 0,...qr(e.unwrap())]:e instanceof gi?[null,...qr(e.unwrap())]:e instanceof qp||e instanceof $s?qr(e.unwrap()):e instanceof _s?qr(e._def.innerType):[];class _c extends He{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.object)return me(n,{code:re.invalid_type,expected:be.object,received:n.parsedType}),De;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(me(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),De)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=qr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new _c({typeName:Ne.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...qe(r)})}}function Up(e,t){const n=pi(e),r=pi(t);if(e===t)return{valid:!0,data:e};if(n===be.object&&r===be.object){const i=et.objectKeys(t),a=et.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const l=Up(e[s],t[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(n===be.array&&r===be.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],l=Up(o,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===be.date&&r===be.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ys extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Fp(a)||Fp(o))return De;const s=Up(a.value,o.value);return s.valid?((Bp(a)||Bp(o))&&n.dirty(),{status:n.value,value:s.data}):(me(r,{code:re.invalid_intersection_types}),De)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ys.create=(e,t,n)=>new ys({left:e,right:t,typeName:Ne.ZodIntersection,...qe(n)});class wr extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.array)return me(r,{code:re.invalid_type,expected:be.array,received:r.parsedType}),De;if(r.data.length<this._def.items.length)return me(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),De;!this._def.rest&&r.data.length>this._def.items.length&&(me(r,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new xr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>rn.mergeArray(n,o)):rn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new wr({...this._def,rest:t})}}wr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new wr({items:e,typeName:Ne.ZodTuple,rest:null,...qe(t)})};class bs extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.object)return me(r,{code:re.invalid_type,expected:be.object,received:r.parsedType}),De;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new xr(r,s,r.path,s)),value:o._parse(new xr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?rn.mergeObjectAsync(n,i):rn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof He?new bs({keyType:t,valueType:n,typeName:Ne.ZodRecord,...qe(r)}):new bs({keyType:Gn.create(),valueType:t,typeName:Ne.ZodRecord,...qe(n)})}}class kc extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.map)return me(r,{code:re.invalid_type,expected:be.map,received:r.parsedType}),De;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new xr(r,s,r.path,[c,"key"])),value:a._parse(new xr(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return De;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return De;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}kc.create=(e,t,n)=>new kc({valueType:t,keyType:e,typeName:Ne.ZodMap,...qe(n)});class Ji extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.set)return me(r,{code:re.invalid_type,expected:be.set,received:r.parsedType}),De;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(me(r,{code:re.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(me(r,{code:re.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return De;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>a._parse(new xr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(t,n){return new Ji({...this._def,minSize:{value:t,message:$e.toString(n)}})}max(t,n){return new Ji({...this._def,maxSize:{value:t,message:$e.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ji.create=(e,t)=>new Ji({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...qe(t)});class Ba extends He{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.function)return me(n,{code:re.invalid_type,expected:be.function,received:n.parsedType}),De;function r(s,l){return xc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,bc(),Da].filter(c=>!!c),issueData:{code:re.invalid_arguments,argumentsError:l}})}function i(s,l){return xc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,bc(),Da].filter(c=>!!c),issueData:{code:re.invalid_return_type,returnTypeError:l}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof za){const s=this;return un(async function(...l){const c=new _n([]),u=await s._def.args.parseAsync(l,a).catch(p=>{throw c.addIssue(r(l,p)),c}),f=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw c.addIssue(i(f,p)),c})})}else{const s=this;return un(function(...l){const c=s._def.args.safeParse(l,a);if(!c.success)throw new _n([r(l,c.error)]);const u=Reflect.apply(o,this,c.data),f=s._def.returns.safeParse(u,a);if(!f.success)throw new _n([i(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ba({...this._def,args:wr.create(t).rest(Yi.create())})}returns(t){return new Ba({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ba({args:t||wr.create([]).rest(Yi.create()),returns:n||Yi.create(),typeName:Ne.ZodFunction,...qe(r)})}}class xs extends He{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}xs.create=(e,t)=>new xs({getter:e,typeName:Ne.ZodLazy,...qe(t)});class ws extends He{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return me(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),De}return{status:"valid",value:t.data}}get value(){return this._def.value}}ws.create=(e,t)=>new ws({value:e,typeName:Ne.ZodLiteral,...qe(t)});function H0(e,t){return new vi({values:e,typeName:Ne.ZodEnum,...qe(t)})}class vi extends He{constructor(){super(...arguments),ds.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{expected:et.joinValues(r),received:n.parsedType,code:re.invalid_type}),De}if(wc(this,ds)||B0(this,ds,new Set(this._def.values)),!wc(this,ds).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{received:n.data,code:re.invalid_enum_value,options:r}),De}return un(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return vi.create(t,{...this._def,...n})}exclude(t,n=this._def){return vi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ds=new WeakMap,vi.create=H0;class Ss extends He{constructor(){super(...arguments),ps.set(this,void 0)}_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==be.string&&r.parsedType!==be.number){const i=et.objectValues(n);return me(r,{expected:et.joinValues(i),received:r.parsedType,code:re.invalid_type}),De}if(wc(this,ps)||B0(this,ps,new Set(et.getValidEnumValues(this._def.values))),!wc(this,ps).has(t.data)){const i=et.objectValues(n);return me(r,{received:r.data,code:re.invalid_enum_value,options:i}),De}return un(t.data)}get enum(){return this._def.values}}ps=new WeakMap,Ss.create=(e,t)=>new Ss({values:e,typeName:Ne.ZodNativeEnum,...qe(t)});class za extends He{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.promise&&n.common.async===!1)return me(n,{code:re.invalid_type,expected:be.promise,received:n.parsedType}),De;const r=n.parsedType===be.promise?n.data:Promise.resolve(n.data);return un(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}za.create=(e,t)=>new za({type:e,typeName:Ne.ZodPromise,...qe(t)});class Jn extends He{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{me(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return De;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?De:l.status==="dirty"||n.value==="dirty"?Ma(l.value):l});{if(n.value==="aborted")return De;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?De:s.status==="dirty"||n.value==="dirty"?Ma(s.value):s}}if(i.type==="refinement"){const o=s=>{const l=i.refinement(s,a);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?De:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?De:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!us(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>us(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);et.assertNever(i)}}Jn.create=(e,t,n)=>new Jn({schema:e,typeName:Ne.ZodEffects,effect:t,...qe(n)}),Jn.createWithPreprocess=(e,t,n)=>new Jn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...qe(n)});class Sr extends He{_parse(t){return this._getType(t)===be.undefined?un(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Sr.create=(e,t)=>new Sr({innerType:e,typeName:Ne.ZodOptional,...qe(t)});class gi extends He{_parse(t){return this._getType(t)===be.null?un(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gi.create=(e,t)=>new gi({innerType:e,typeName:Ne.ZodNullable,...qe(t)});class Es extends He{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===be.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qe(t)});class _s extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return fs(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new _n(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new _n(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}_s.create=(e,t)=>new _s({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qe(t)});class $c extends He{_parse(t){if(this._getType(t)!==be.nan){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.nan,received:r.parsedType}),De}return{status:"valid",value:t.data}}}$c.create=e=>new $c({typeName:Ne.ZodNaN,...qe(e)});const eB=Symbol("zod_brand");class qp extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ks extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?De:a.status==="dirty"?(n.dirty(),Ma(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?De:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new ks({in:t,out:n,typeName:Ne.ZodPipeline})}}class $s extends He{_parse(t){const n=this._def.innerType._parse(t),r=i=>(us(i)&&(i.value=Object.freeze(i.value)),i);return fs(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}$s.create=(e,t)=>new $s({innerType:e,typeName:Ne.ZodReadonly,...qe(t)});function V0(e,t={},n){return e?La.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:l})}}):La.create()}const tB={object:Et.lazycreate};var Ne;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ne||(Ne={}));const nB=(e,t={message:`Input not instance of ${e.name}`})=>V0(n=>n instanceof e,t),Z0=Gn.create,K0=hi.create,rB=$c.create,iB=mi.create,G0=hs.create,aB=Gi.create,oB=Sc.create,sB=ms.create,lB=vs.create,cB=La.create,uB=Yi.create,fB=Ur.create,dB=Ec.create,pB=Yn.create,hB=Et.create,mB=Et.strictCreate,vB=gs.create,gB=_c.create,yB=ys.create,bB=wr.create,xB=bs.create,wB=kc.create,SB=Ji.create,EB=Ba.create,_B=xs.create,kB=ws.create,$B=vi.create,OB=Ss.create,TB=za.create,Y0=Jn.create,CB=Sr.create,IB=gi.create,RB=Jn.createWithPreprocess,AB=ks.create;var V=Object.freeze({__proto__:null,defaultErrorMap:Da,setErrorMap:M3,getErrorMap:bc,makeIssue:xc,EMPTY_PATH:L3,addIssueToContext:me,ParseStatus:rn,INVALID:De,DIRTY:Ma,OK:un,isAborted:Fp,isDirty:Bp,isValid:us,isAsync:fs,get util(){return et},get objectUtil(){return Lp},ZodParsedType:be,getParsedType:pi,ZodType:He,datetimeRegex:W0,ZodString:Gn,ZodNumber:hi,ZodBigInt:mi,ZodBoolean:hs,ZodDate:Gi,ZodSymbol:Sc,ZodUndefined:ms,ZodNull:vs,ZodAny:La,ZodUnknown:Yi,ZodNever:Ur,ZodVoid:Ec,ZodArray:Yn,ZodObject:Et,ZodUnion:gs,ZodDiscriminatedUnion:_c,ZodIntersection:ys,ZodTuple:wr,ZodRecord:bs,ZodMap:kc,ZodSet:Ji,ZodFunction:Ba,ZodLazy:xs,ZodLiteral:ws,ZodEnum:vi,ZodNativeEnum:Ss,ZodPromise:za,ZodEffects:Jn,ZodTransformer:Jn,ZodOptional:Sr,ZodNullable:gi,ZodDefault:Es,ZodCatch:_s,ZodNaN:$c,BRAND:eB,ZodBranded:qp,ZodPipeline:ks,ZodReadonly:$s,custom:V0,Schema:He,ZodSchema:He,late:tB,get ZodFirstPartyTypeKind(){return Ne},coerce:{string:e=>Gn.create({...e,coerce:!0}),number:e=>hi.create({...e,coerce:!0}),boolean:e=>hs.create({...e,coerce:!0}),bigint:e=>mi.create({...e,coerce:!0}),date:e=>Gi.create({...e,coerce:!0})},any:cB,array:pB,bigint:iB,boolean:G0,date:aB,discriminatedUnion:gB,effect:Y0,enum:$B,function:EB,instanceof:nB,intersection:yB,lazy:_B,literal:kB,map:wB,nan:rB,nativeEnum:OB,never:fB,null:lB,nullable:IB,number:K0,object:hB,oboolean:()=>G0().optional(),onumber:()=>K0().optional(),optional:CB,ostring:()=>Z0().optional(),pipeline:AB,preprocess:RB,promise:TB,record:xB,set:SB,strictObject:mB,string:Z0,symbol:oB,transformer:Y0,tuple:bB,undefined:sB,union:vB,unknown:uB,void:dB,NEVER:De,ZodIssueCode:re,quotelessJson:D3,ZodError:_n}),PB=Object.defineProperty,jB=(e,t,n)=>t in e?PB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NB=(e,t,n)=>(jB(e,t+"",n),n),DB={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Wp=typeof window<"u"&&typeof window.document<"u"?window.crypto:Yw;Wp.getRandomValues||(Wp=DB);var wt=class extends Error{constructor(t,n,r,i,a,o){super(i);Ee(this,"isApiError",!0);this.code=t,this.description=n,this.type=r,this.message=i,this.error=a,this.id=o,this.id||(this.id=wt.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){const t=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,i=Array.from(Wp.getRandomValues(new Uint8Array(r))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${n}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},MB=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Hp=e=>e instanceof wt||MB(e)&&e.isApiError===!0,Os=class extends wt{constructor(e,t,n){super(500,"An unknown error occurred","Unknown",e,t,n)}},LB=class extends wt{constructor(e,t,n){super(500,"An internal error occurred","Internal",e,t,n)}},FB=class extends wt{constructor(e,t,n){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n)}},BB=class extends wt{constructor(e,t,n){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n)}},zB=class extends wt{constructor(e,t,n){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n)}},UB=class extends wt{constructor(e,t,n){super(400,"The request payload is invalid.","InvalidPayload",e,t,n)}},qB=class extends wt{constructor(e,t,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n)}},WB=class extends wt{constructor(e,t,n){super(405,"The requested method does not exist.","MethodNotFound",e,t,n)}},HB=class extends wt{constructor(e,t,n){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,n)}},VB=class extends wt{constructor(e,t,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n)}},ZB=class extends wt{constructor(e,t,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,n)}},KB=class extends wt{constructor(e,t,n){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",e,t,n)}},GB=class extends wt{constructor(e,t,n){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",e,t,n)}},YB=class extends wt{constructor(e,t,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,n)}},JB=class extends wt{constructor(e,t,n){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,n)}},XB=class extends wt{constructor(e,t,n){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",e,t,n)}},QB=class extends wt{constructor(e,t,n){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,n)}},e4=class extends wt{constructor(e,t,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,n)}},t4=class extends wt{constructor(e,t,n){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n)}},n4=class extends wt{constructor(e,t,n){super(429,"The request has been rate limited.","RateLimited",e,t,n)}},r4=class extends wt{constructor(e,t,n){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n)}},i4=class extends wt{constructor(e,t,n){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,n)}},a4=class extends wt{constructor(e,t,n){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,n)}},o4=class extends wt{constructor(e,t,n){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,n)}},s4={Unknown:Os,Internal:LB,Unauthorized:FB,Forbidden:BB,PayloadTooLarge:zB,InvalidPayload:UB,UnsupportedMediaType:qB,MethodNotFound:WB,ResourceNotFound:HB,InvalidJsonSchema:VB,InvalidDataFormat:ZB,InvalidIdentifier:KB,RelationConflict:GB,ReferenceConstraint:YB,ResourceLockedConflict:JB,ReferenceNotFound:XB,InvalidQuery:QB,Runtime:e4,AlreadyExists:t4,RateLimited:n4,PaymentRequired:r4,QuotaExceeded:i4,LimitExceeded:a4,BreakingChanges:o4},J0=e=>Hp(e)?e:e instanceof Error?new Os(e.message,e):typeof e=="string"?new Os(e):l4(e);function l4(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=s4[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Os(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Os("An invalid error occurred: "+JSON.stringify(e))}var c4=e=>e[1]!==void 0,Pt=e=>{const{method:t,path:n,query:r,headers:i,body:a}=e,o=Object.entries(i).filter(c4),s=Object.fromEntries(o),l=P3.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),c=l?[n,l].join("?"):n;return{method:t,url:c,headers:s,data:a}},u4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),f4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),d4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),p4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),h4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),m4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),v4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),g4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),y4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),b4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),x4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),w4=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,metadata:e.metadata}}),S4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),E4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),_4=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),k4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),$4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),O4=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),T4=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,bindConversation:e.bindConversation,bindUser:e.bindUser}}),C4=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags}}),I4=class{constructor(e,t={}){Ee(this,"getConversation",async e=>{const{path:t,headers:n,query:r,body:i}=u4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"createConversation",async e=>{const{path:t,headers:n,query:r,body:i}=f4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"deleteConversation",async e=>{const{path:t,headers:n,query:r,body:i}=d4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"listConversations",async e=>{const{path:t,headers:n,query:r,body:i}=p4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"listenConversation",async e=>{const{path:t,headers:n,query:r,body:i}=h4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"listConversationMessages",async e=>{const{path:t,headers:n,query:r,body:i}=m4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"addParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=v4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"removeParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=g4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"getParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=y4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"listParticipants",async e=>{const{path:t,headers:n,query:r,body:i}=b4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"getMessage",async e=>{const{path:t,headers:n,query:r,body:i}=x4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"createMessage",async e=>{const{path:t,headers:n,query:r,body:i}=w4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"deleteMessage",async e=>{const{path:t,headers:n,query:r,body:i}=S4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"getUser",async e=>{const{path:t,headers:n,query:r,body:i}=E4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"createUser",async e=>{const{path:t,headers:n,query:r,body:i}=_4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"updateUser",async e=>{const{path:t,headers:n,query:r,body:i}=k4(e),o=(this.props.toAxiosRequest??Pt)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"deleteUser",async e=>{const{path:t,headers:n,query:r,body:i}=$4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"getEvent",async e=>{const{path:t,headers:n,query:r,body:i}=O4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"createEvent",async e=>{const{path:t,headers:n,query:r,body:i}=T4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"createFile",async e=>{const{path:t,headers:n,query:r,body:i}=C4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});this.axiosInstance=e,this.props=t}};function jt(e){var t;return At.isAxiosError(e)&&((t=e.response)!=null&&t.data)?J0(e.response.data):J0(e)}var X0=class{constructor(){Ee(this,"listeners",{})}emit(e,t){const n=this.listeners[e];if(n)for(const r of[...n])r(t)}onceOrMore(e,t){const n=r=>{t(r)==="stop-listening"&&this.off(e,n)};this.on(e,n)}once(e,t){const n=r=>{this.off(e,n),t(r)};this.on(e,n)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){const n=this.listeners[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)}cleanup(){this.listeners={}}},R4=(e,t)=>{const n=new N3.EventSourcePolyfill(e,{headers:t.headers,heartbeatTimeout:t.timeout}),r=new X0;return n.onopen=i=>r.emit("open",i),n.onmessage=i=>r.emit("message",i),n.onerror=i=>r.emit("error",i),{emitter:r,source:n}},A4=async(e,t={})=>{const{emitter:n,source:r}=R4(e,t);return await new Promise((i,a)=>{n.on("open",()=>{i()}),n.on("error",o=>{a(o)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},P4=V.object({type:V.literal("message_created"),data:V.object({id:V.string().describe("Id of the [Message](#schema_message)"),createdAt:V.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:V.union([V.object({audioUrl:V.string().min(1),type:V.literal("audio")}),V.object({title:V.string().min(1),subtitle:V.string().min(1).optional(),imageUrl:V.string().min(1).optional(),actions:V.array(V.object({action:V.enum(["postback","url","say"]),label:V.string().min(1),value:V.string().min(1)})),type:V.literal("card")}),V.object({items:V.array(V.object({title:V.string().min(1),subtitle:V.string().min(1).optional(),imageUrl:V.string().min(1).optional(),actions:V.array(V.object({action:V.enum(["postback","url","say"]),label:V.string().min(1),value:V.string().min(1)}))})),type:V.literal("carousel")}),V.object({text:V.string().min(1),options:V.array(V.object({label:V.string().min(1),value:V.string().min(1)})),type:V.literal("choice"),disableFreeText:V.boolean().optional()}),V.object({text:V.string().min(1),options:V.array(V.object({label:V.string().min(1),value:V.string().min(1)})),type:V.literal("dropdown")}),V.object({fileUrl:V.string().min(1),title:V.string().min(1).optional(),type:V.literal("file")}),V.object({imageUrl:V.string().min(1),type:V.literal("image")}),V.object({latitude:V.number(),longitude:V.number(),address:V.string().optional(),title:V.string().optional(),type:V.literal("location")}),V.object({text:V.string().min(1),type:V.literal("text")}),V.object({videoUrl:V.string().min(1),type:V.literal("video")}),V.object({items:V.array(V.union([V.object({type:V.literal("text"),payload:V.object({text:V.string().min(1)})}),V.object({type:V.literal("markdown"),payload:V.object({markdown:V.string().min(1)})}),V.object({type:V.literal("image"),payload:V.object({imageUrl:V.string().min(1)})}),V.object({type:V.literal("audio"),payload:V.object({audioUrl:V.string().min(1)})}),V.object({type:V.literal("video"),payload:V.object({videoUrl:V.string().min(1)})}),V.object({type:V.literal("file"),payload:V.object({fileUrl:V.string().min(1),title:V.string().min(1).optional()})}),V.object({type:V.literal("location"),payload:V.object({latitude:V.number(),longitude:V.number(),address:V.string().optional(),title:V.string().optional()})})])),type:V.literal("bloc")}),V.object({markdown:V.string().min(1),type:V.literal("markdown")})]).describe("Payload is the content type of the message."),userId:V.string().describe("ID of the [User](#schema_user)"),conversationId:V.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:V.record(V.union([V.any(),V.null()])).describe("Metadata of the message").optional()}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),j4=V.object({type:V.literal("webchat_visibility"),data:V.object({visibility:V.union([V.literal("show"),V.literal("hide"),V.literal("toggle")])})}),N4=V.object({type:V.literal("webchat_config"),data:V.object({config:V.record(V.union([V.any(),V.null()]))})}),D4=V.object({type:V.literal("custom"),data:V.object({event:V.record(V.union([V.any(),V.null()]))})}),M4=V.object({type:V.literal("typing_started"),data:V.object({timeout:V.number().optional()})}),L4=V.object({type:V.literal("typing_stopped"),data:V.record(V.never())}),F4={messageCreated:P4,webchatVisibility:j4,webchatConfig:N4,custom:D4,typingStarted:M4,typingStopped:L4},Q0="unknown error",e1=class extends X0{constructor(t){super();Ee(this,"_state",{status:"disconnected"});Ee(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const t=this._connect();this._state={status:"connecting",connectionPromise:t},await t});Ee(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let t;this._state.status==="connecting"?t=await this._state.connectionPromise:t=this._state.source,this._disconnectSync(t)});Ee(this,"_connect",async()=>{const t=await A4(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey},timeout:this._props.timeout});return t.on("message",this._handleMessage),t.on("error",this._handleError(t)),this._state={status:"connected",source:t},t});Ee(this,"_disconnectSync",t=>{t.close(),this._state={status:"disconnected"}});Ee(this,"_handleMessage",t=>{const n=this._parseSignal(t.data);this.emit(n.type,n.data)});Ee(this,"_handleError",t=>n=>{this._disconnectSync(t);const r=this._toError(n);this.emit("error",r)});Ee(this,"_parseSignal",t=>{for(const n of Object.values(F4)){const r=this._safeJsonParse(t),i=n.safeParse(r);if(i.success)return i.data}return{type:"unknown",data:t}});Ee(this,"_safeJsonParse",t=>{try{return JSON.parse(t)}catch{return t}});Ee(this,"_toError",t=>{if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t===null)return new Error(Q0);if(typeof t=="object"&&"message"in t)return this._toError(t.message);try{const n=JSON.stringify(t);return new Error(n)}catch{return new Error(Q0)}});this._props=t}get status(){return this._state.status}},t1=e1;NB(t1,"listen",async e=>{const t=new e1(e);return await t.connect(),t});var n1=100*1024*1024,B4=n1,z4=n1,U4=6e4,q4=class{constructor(e){Ee(this,"_auto");Ee(this,"createConversation",e=>this._auto.createConversation(e));Ee(this,"getConversation",e=>this._auto.getConversation(e));Ee(this,"deleteConversation",e=>this._auto.deleteConversation(e));Ee(this,"listConversations",e=>this._auto.listConversations(e));Ee(this,"listConversationMessages",e=>this._auto.listConversationMessages(e));Ee(this,"addParticipant",e=>this._auto.addParticipant(e));Ee(this,"removeParticipant",e=>this._auto.removeParticipant(e));Ee(this,"getParticipant",e=>this._auto.getParticipant(e));Ee(this,"listParticipants",e=>this._auto.listParticipants(e));Ee(this,"createMessage",e=>this._auto.createMessage(e));Ee(this,"getMessage",e=>this._auto.getMessage(e));Ee(this,"deleteMessage",e=>this._auto.deleteMessage(e));Ee(this,"createFile",e=>this._auto.createFile(e));Ee(this,"createUser",e=>this._auto.createUser(e));Ee(this,"getUser",e=>this._auto.getUser(e));Ee(this,"updateUser",e=>this._auto.updateUser(e));Ee(this,"deleteUser",e=>this._auto.deleteUser(e));Ee(this,"createEvent",e=>this._auto.createEvent(e));Ee(this,"getEvent",e=>this._auto.getEvent(e));Ee(this,"listenConversation",async({id:e,"x-user-key":t})=>await t1.listen({url:this.props.apiUrl,conversationId:e,userKey:t,timeout:this.props.sseTimeout}));this.props=e;const{apiUrl:t}=e,n={...e.headers},r=this.props.timeout??U4,i=At.create({baseURL:t,headers:n,withCredentials:!0,timeout:r,maxBodyLength:B4,maxContentLength:z4});this._auto=new I4(i)}};const Oc={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},vn=(e,t)=>e.status===t,Er=(e,t)=>Oc[e.status]<Oc[t],r1=(e,t)=>Oc[e.status]>=Oc[t];class _r extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const i1=["audio","file","image","video"],a1=e=>i1.includes(e),o1={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(o1);const s1={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(s1);var Ln=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Ua,Ts,Xi;class W4{constructor(...t){Ua.set(this,new Map),Ts.set(this,new Map),Xi.set(this,new Map);for(const n of t)this.define(n)}define(t,n=!1){for(let[r,i]of Object.entries(t)){r=r.toLowerCase(),i=i.map(s=>s.toLowerCase()),Ln(this,Xi,"f").has(r)||Ln(this,Xi,"f").set(r,new Set);const a=Ln(this,Xi,"f").get(r);let o=!0;for(let s of i){const l=s.startsWith("*");if(s=l?s.slice(1):s,a==null||a.add(s),o&&Ln(this,Ts,"f").set(r,s),o=!1,l)continue;const c=Ln(this,Ua,"f").get(s);if(c&&c!=r&&!n)throw new Error(`"${r} -> ${s}" conflicts with "${c} -> ${s}". Pass \`force=true\` to override this definition.`);Ln(this,Ua,"f").set(s,r)}}return this}getType(t){if(typeof t!="string")return null;const n=t.replace(/^.*[/\\]/,"").toLowerCase(),r=n.replace(/^.*\./,"").toLowerCase(),i=n.length<t.length;return!(r.length<n.length-1)&&i?null:Ln(this,Ua,"f").get(r)??null}getExtension(t){var n;return typeof t!="string"?null:(t=(n=t==null?void 0:t.split)==null?void 0:n.call(t,";")[0],(t&&Ln(this,Ts,"f").get(t.trim().toLowerCase()))??null)}getAllExtensions(t){return typeof t!="string"?null:Ln(this,Xi,"f").get(t.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const t of Ln(this,Xi,"f").values())Object.freeze(t);return this}_getTestState(){return{types:Ln(this,Ua,"f"),extensions:Ln(this,Ts,"f")}}}Ua=new WeakMap,Ts=new WeakMap,Xi=new WeakMap;const H4=new W4(s1,o1)._freeze(),V4=6e4;class Z4 extends qy{constructor(n){super();Ee(this,"_client");Ee(this,"_webhookId");Ee(this,"_apiUrl");Ee(this,"_state",{status:"disconnected"});Ee(this,"mode","pushpin");Ee(this,"_initialConnect",async({data:n,name:r,pictureUrl:i})=>{if(r1(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(vn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:a},key:o}=await this._client.createUser({name:r,pictureUrl:i,userData:n});return this._state={status:"user_created",userId:a,userKey:o},{userId:a,userToken:o}});Ee(this,"_reConnect",async(n,{data:r,name:i,pictureUrl:a})=>{if(r1(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return vn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:i,pictureUrl:a,userData:r})),n});Ee(this,"_mapMessage",n=>{const{metadata:r}=n,{payload:i,disableInput:a}=Oo(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:i,disableInput:a,metadata:r}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new q4({apiUrl:r,sseTimeout:V4})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!Er(this._state,"user_created"))return this._state.userId}async getUser(){if(Er(this._state,"user_created"))throw new _r(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(Er(this._state,"user_created"))throw new _r(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!Er(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,i={}){const a={data:r,...i};return n?await this.userExists(n)?this._reConnect(n,a):this._initialConnect(a):this._initialConnect(a)}async disconnect(){vn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():vn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(Er(this._state,"user_created"))throw new _r(this._state);if(vn(this._state,"conversation_creating"))throw new _r(this._state);let r;vn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:i,name:a}=n,o=H4.getType(n.name)??"application/octet-stream",l=await(h=>new Promise((m,y)=>{const v=new FileReader;v.onload=g=>{var b;return m((b=g.target)==null?void 0:b.result)},v.onerror=g=>{var b;return y((b=g.target)==null?void 0:b.error)},v.readAsArrayBuffer(h)}))(n),{file:{uploadUrl:c,url:u}}=await this._client.createFile({"x-user-key":r.userKey,size:i,key:a,contentType:o,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(c,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:l});const f=o.split("/").shift()??"",d=a1(f)?f:"file",p=d==="image"?{type:d,imageUrl:u}:d==="audio"?{type:d,audioUrl:u}:d==="video"?{type:d,videoUrl:u}:{type:d,fileUrl:u};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:p}),{fileUrl:u,name:a,type:d}}async sendMessage(n){if(Er(this._state,"user_created"))throw new _r(this._state);if(vn(this._state,"conversation_creating"))throw new _r(this._state);let r;vn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:n}),this.emit("messageSent",n)}async sendEvent(n){if(Er(this._state,"user_created"))throw new _r(this._state);if(vn(this._state,"conversation_creating"))throw new _r(this._state);let r;vn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(Er(this._state,"user_created"))throw new _r(this._state);vn(this._state,"conversation_created")&&this._state.conversationId===n||vn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(Er(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(Hp(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const i=a=>a.code===404||a.code===401;if(Hp(r)&&i(r))return!1;throw r}}async newConversation(){if(Er(this._state,"user_created"))throw new _r(this._state);vn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),i=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!vn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,i=[];let a;do{const o=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return i.map(this._mapMessage)}async _connectConversation(n,r){const i=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return i.on("unknown",a=>{typeof a=="string"&&a==="ping"||console.debug("unknown event",a)}),i.on("message_created",a=>{a.userId!==n.userId&&this.emit("message",this._mapMessage(a))}),i.on("error",a=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error(`Connection to conversation lost: ${a.message}`))}),i.on("webchat_visibility",a=>{this.emit("webchatVisibility",a.visibility)}),i.on("webchat_config",a=>{this.emit("webchatConfig",a.config)}),i.on("typing_started",a=>{this.emit("isTyping",{isTyping:!0,timeout:a.timeout??5e3})}),i.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),i.on("custom",a=>{this.emit("customEvent",a.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:i},this._state}}const l1=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new Z4({apiUrl:t,clientId:e}),K4=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[n]=D.useState(l1({clientId:e,apiUrl:t}));return n},G4=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const a=new Image;a.addEventListener("load",()=>{i&&clearTimeout(i),n({width:a.naturalWidth,height:a.naturalHeight})}),a.addEventListener("error",o=>{i&&clearTimeout(i),r(`${o.type}: ${o.message}`)}),a.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))});let Y4={data:""},J4=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Y4,X4=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Q4=/\/\*[^]*?\*\/| +/g,c1=/\n+/g,yi=(e,t)=>{let n="",r="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?n=a+" "+o+";":r+=a[1]=="f"?yi(o,a):a+"{"+yi(o,a[1]=="k"?"":t)+"}":typeof o=="object"?r+=yi(o,t?t.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=yi.p?yi.p(a,o):a+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Wr={},u1=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+u1(e[n]);return t}return e},ez=(e,t,n,r,i)=>{let a=u1(e),o=Wr[a]||(Wr[a]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(a));if(!Wr[o]){let l=a!==e?e:(c=>{let u,f,d=[{}];for(;u=X4.exec(c.replace(Q4,""));)u[4]?d.shift():u[3]?(f=u[3].replace(c1," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][u[1]]=u[2].replace(c1," ").trim();return d[0]})(e);Wr[o]=yi(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let s=n&&Wr.g?Wr.g:null;return n&&(Wr.g=Wr[o]),((l,c,u,f)=>{f?c.data=c.data.replace(f,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(Wr[o],t,r,s),o},tz=(e,t,n)=>e.reduce((r,i,a)=>{let o=t[a];if(o&&o.call){let s=o(n),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=l?"."+l:s&&typeof s=="object"?s.props?"":yi(s,""):s===!1?"":s}return r+i+(o??"")},"");function Tc(e){let t=this||{},n=e.call?e(t.p):e;return ez(n.unshift?n.raw?tz(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,J4(t.target),t.g,t.o,t.k)}let f1,Vp,Zp;Tc.bind({g:1});let Hr=Tc.bind({k:1});function nz(e,t,n,r){yi.p=t,f1=e,Vp=n,Zp=r}function bi(e,t){let n=this||{};return function(){let r=arguments;function i(a,o){let s=Object.assign({},a),l=s.className||i.className;n.p=Object.assign({theme:Vp&&Vp()},s),n.o=/ *go\d+/.test(l),s.className=Tc.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=s.as||e,delete s.as),Zp&&c[0]&&Zp(s),f1(c,s)}return i}}var rz=e=>typeof e=="function",Cc=(e,t)=>rz(e)?e(t):e,iz=(()=>{let e=0;return()=>(++e).toString()})(),d1=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),az=20,Ic=new Map,oz=1e3,p1=e=>{if(Ic.has(e))return;let t=setTimeout(()=>{Ic.delete(e),Qi({type:4,toastId:e})},oz);Ic.set(e,t)},sz=e=>{let t=Ic.get(e);t&&clearTimeout(t)},Kp=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,az)};case 1:return t.toast.id&&sz(t.toast.id),{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:n}=t;return e.toasts.find(a=>a.id===n.id)?Kp(e,{type:1,toast:n}):Kp(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?p1(r):e.toasts.forEach(a=>{p1(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===r||r===void 0?{...a,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Rc=[],Ac={toasts:[],pausedAt:void 0},Qi=e=>{Ac=Kp(Ac,e),Rc.forEach(t=>{t(Ac)})},lz={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},cz=(e={})=>{let[t,n]=D.useState(Ac);D.useEffect(()=>(Rc.push(n),()=>{let i=Rc.indexOf(n);i>-1&&Rc.splice(i,1)}),[t]);let r=t.toasts.map(i=>{var a,o;return{...e,...e[i.type],...i,duration:i.duration||((a=e[i.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||lz[i.type],style:{...e.style,...(o=e[i.type])==null?void 0:o.style,...i.style}}});return{...t,toasts:r}},uz=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||iz()}),Cs=e=>(t,n)=>{let r=uz(t,e,n);return Qi({type:2,toast:r}),r.id},Fn=(e,t)=>Cs("blank")(e,t);Fn.error=Cs("error"),Fn.success=Cs("success"),Fn.loading=Cs("loading"),Fn.custom=Cs("custom"),Fn.dismiss=e=>{Qi({type:3,toastId:e})},Fn.remove=e=>Qi({type:4,toastId:e}),Fn.promise=(e,t,n)=>{let r=Fn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Fn.success(Cc(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Fn.error(Cc(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var fz=(e,t)=>{Qi({type:1,toast:{id:e,height:t}})},dz=()=>{Qi({type:5,time:Date.now()})},pz=e=>{let{toasts:t,pausedAt:n}=cz(e);D.useEffect(()=>{if(n)return;let a=Date.now(),o=t.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(a-s.createdAt);if(l<0){s.visible&&Fn.dismiss(s.id);return}return setTimeout(()=>Fn.dismiss(s.id),l)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=D.useCallback(()=>{n&&Qi({type:6,time:Date.now()})},[n]),i=D.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=o||{},u=t.filter(p=>(p.position||c)===(a.position||c)&&p.height),f=u.findIndex(p=>p.id===a.id),d=u.filter((p,h)=>h<f&&p.visible).length;return u.filter(p=>p.visible).slice(...s?[d+1]:[0,d]).reduce((p,h)=>p+(h.height||0)+l,0)},[t]);return{toasts:t,handlers:{updateHeight:fz,startPause:dz,endPause:r,calculateOffset:i}}},hz=Hr`
|
|
68
|
+
`,Ut+=Wn):qn==="id"?Tt=Wn:qn==="event"?Ge=Wn:qn==="retry"?(we=pe(Wn,we),Ae=we):qn==="heartbeatTimeout"&&(Re=pe(Wn,Re),Xe!==0&&(i(Xe),Xe=r(function(){ti()},Re)))}if(nt===q){if(Ut!==""){Ve=Tt,Ge===""&&(Ge="message");var Ni=new L(Ge,{data:Ut.slice(1),lastEventId:Tt});if(R.dispatchEvent(Ni),Ge==="open"?ce(R,R.onopen,Ni):Ge==="message"?ce(R,R.onmessage,Ni):Ge==="error"&&ce(R,R.onerror,Ni),ct===A)return}Ut="",Ge=""}nt=Wt===13?x:q}else nt===q&&(wn=Ht,nt=K),nt===K?Wt===58&&(Rn=Ht+1,nt=E):nt===E&&(nt=Q)}}},Mr=function(mt){if(ct===B||ct===H){ct=I,Xe!==0&&(i(Xe),Xe=0),Xe=r(function(){ti()},Ae),Ae=he(Math.min(we*16,Ae*2)),R.readyState=H;var St=new M("error",{error:mt});R.dispatchEvent(St),ce(R,R.onerror,St),mt!=null&&console.error(mt)}},ur=function(){ct=A,Oe!=null&&(Oe.abort(),Oe=void 0),Xe!==0&&(i(Xe),Xe=0),R.readyState=A},ti=function(){if(Xe=0,ct!==I){if(!Be&&Oe!=null)Mr(new Error("No activity within "+Re+" milliseconds. "+(ct===H?"No response received.":F+" chars received.")+" Reconnecting.")),Oe!=null&&(Oe.abort(),Oe=void 0);else{var mt=Math.max((Be||Date.now())+Re-Date.now(),1);Be=!1,Xe=r(function(){ti()},mt)}return}Be=!1,F=0,Xe=r(function(){ti()},Re),ct=H,Ut="",Ge="",Tt=Ve,Ct="",wn=0,Rn=0,nt=q;var St=Y;if(Y.slice(0,5)!=="data:"&&Y.slice(0,5)!=="blob:"&&Ve!==""){var qt=Y.indexOf("?");St=qt===-1?Y:Y.slice(0,qt+1)+Y.slice(qt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Wn,Ni){return Ni===ke?"":Wn}),St+=(Y.indexOf("?")===-1?"?":"&")+ke+"="+encodeURIComponent(Ve)}var Wt=R.withCredentials,Qt={};Qt.Accept="text/event-stream";var Ht=R.headers;if(Ht!=null)for(var qn in Ht)Object.prototype.hasOwnProperty.call(Ht,qn)&&(Qt[qn]=Ht[qn]);try{Oe=_e.open(ue,cr,ei,Mr,St,Wt,Qt)}catch(Wn){throw ur(),Wn}};R.url=Y,R.readyState=H,R.withCredentials=ee,R.headers=P,R._close=ur,ti()}X.prototype=Object.create(O.prototype),X.prototype.CONNECTING=H,X.prototype.OPEN=B,X.prototype.CLOSED=A,X.prototype.close=function(){this._close()},X.CONNECTING=H,X.OPEN=B,X.CLOSED=A,X.prototype.withCredentials=void 0;var Ce=l;a!=null&&(l==null||!("withCredentials"in l.prototype))&&(Ce=X),function(R){{var Y=R(t);Y!==void 0&&(e.exports=Y)}}(function(R){R.EventSourcePolyfill=X,R.NativeEventSource=l,R.EventSource=Ce})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:ut:globalThis)})(Mp,Mp.exports);var j3=Mp.exports;const N3=Ze(j3);var et;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),o={};for(const s of a)o[s]=i[s];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(et||(et={}));var Lp;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(Lp||(Lp={}));const be=et.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),pi=e=>{switch(typeof e){case"undefined":return be.undefined;case"string":return be.string;case"number":return isNaN(e)?be.nan:be.number;case"boolean":return be.boolean;case"function":return be.function;case"bigint":return be.bigint;case"symbol":return be.symbol;case"object":return Array.isArray(e)?be.array:e===null?be.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?be.promise:typeof Map<"u"&&e instanceof Map?be.map:typeof Set<"u"&&e instanceof Set?be.set:typeof Date<"u"&&e instanceof Date?be.date:be.object;default:return be.unknown}},re=et.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),D3=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class _n extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let s=r,l=0;for(;l<o.path.length;){const c=o.path[l];l===o.path.length-1?(s[c]=s[c]||{_errors:[]},s[c]._errors.push(n(o))):s[c]=s[c]||{_errors:[]},s=s[c],l++}}};return i(this),r}static assert(t){if(!(t instanceof _n))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,et.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}_n.create=e=>new _n(e);const Da=(e,t)=>{let n;switch(e.code){case re.invalid_type:e.received===be.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case re.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,et.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:n=`Unrecognized key(s) in object: ${et.joinValues(e.keys,", ")}`;break;case re.invalid_union:n="Invalid input";break;case re.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${et.joinValues(e.options)}`;break;case re.invalid_enum_value:n=`Invalid enum value. Expected ${et.joinValues(e.options)}, received '${e.received}'`;break;case re.invalid_arguments:n="Invalid function arguments";break;case re.invalid_return_type:n="Invalid function return type";break;case re.invalid_date:n="Invalid date";break;case re.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:et.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case re.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case re.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case re.custom:n="Invalid input";break;case re.invalid_intersection_types:n="Intersection results could not be merged";break;case re.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case re.not_finite:n="Number must be finite";break;default:n=t.defaultError,et.assertNever(e)}return{message:n}};let B0=Da;function M3(e){B0=e}function yc(){return B0}const bc=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)s=c(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},L3=[];function me(e,t){const n=yc(),r=bc({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Da?void 0:Da].filter(i=>!!i)});e.common.issues.push(r)}class rn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return De;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return rn.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return De;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const De=Object.freeze({status:"aborted"}),Ma=e=>({status:"dirty",value:e}),un=e=>({status:"valid",value:e}),Fp=e=>e.status==="aborted",Bp=e=>e.status==="dirty",us=e=>e.status==="valid",fs=e=>typeof Promise<"u"&&e instanceof Promise;function xc(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function z0(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}typeof SuppressedError=="function"&&SuppressedError;var $e;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})($e||($e={}));var ds,ps;class xr{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const U0=(e,t)=>{if(us(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new _n(e.common.issues);return this._error=n,this._error}}};function qe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,s)=>{var l,c;const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??s.defaultError}:typeof s.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:s.defaultError}:o.code!=="invalid_type"?{message:s.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:s.defaultError}},description:i}}class He{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return pi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:pi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new rn,ctx:{common:t.parent.common,data:t.data,parsedType:pi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(fs(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:pi(t)},a=this._parseSync({data:t,path:i.path,parent:i});return U0(i,a)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:pi(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(fs(i)?i:Promise.resolve(i));return U0(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),s=()=>a.addIssue({code:re.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(s(),!1)):o?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Jn({schema:this,typeName:Ne.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Sr.create(this,this._def)}nullable(){return gi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yn.create(this,this._def)}promise(){return za.create(this,this._def)}or(t){return gs.create([this,t],this._def)}and(t){return ys.create(this,t,this._def)}transform(t){return new Jn({...qe(this._def),schema:this,typeName:Ne.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Es({...qe(this._def),innerType:this,defaultValue:n,typeName:Ne.ZodDefault})}brand(){return new qp({typeName:Ne.ZodBranded,type:this,...qe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new _s({...qe(this._def),innerType:this,catchValue:n,typeName:Ne.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return ks.create(this,t)}readonly(){return $s.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const F3=/^c[^\s-]{8,}$/i,B3=/^[0-9a-z]+$/,z3=/^[0-9A-HJKMNP-TV-Z]{26}$/,U3=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,q3=/^[a-z0-9_-]{21}$/i,W3=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,H3=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,V3="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let zp;const Z3=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,K3=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,G3=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,q0="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Y3=new RegExp(`^${q0}$`);function W0(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function J3(e){return new RegExp(`^${W0(e)}$`)}function H0(e){let t=`${q0}T${W0(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function X3(e,t){return!!((t==="v4"||!t)&&Z3.test(e)||(t==="v6"||!t)&&K3.test(e))}class Gn extends He{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==be.string){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_type,expected:be.string,received:a.parsedType}),De}const r=new rn;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,s=t.data.length<a.value;(o||s)&&(i=this._getOrReturnCtx(t,i),o?me(i,{code:re.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&me(i,{code:re.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")H3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"email",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")zp||(zp=new RegExp(V3,"u")),zp.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"emoji",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")U3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"uuid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")q3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"nanoid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")F3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")B3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"cuid2",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")z3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ulid",code:re.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),me(i,{validation:"url",code:re.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"regex",code:re.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?H0(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?Y3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?J3(a).test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{code:re.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?W3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"duration",code:re.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?X3(t.data,a.version)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"ip",code:re.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?G3.test(t.data)||(i=this._getOrReturnCtx(t,i),me(i,{validation:"base64",code:re.invalid_string,message:a.message}),r.dirty()):et.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:re.invalid_string,...$e.errToObj(r)})}_addCheck(t){return new Gn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...$e.errToObj(t)})}url(t){return this._addCheck({kind:"url",...$e.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...$e.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...$e.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...$e.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...$e.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...$e.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...$e.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...$e.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...$e.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...$e.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...$e.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...$e.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...$e.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...$e.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...$e.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...$e.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...$e.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...$e.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...$e.errToObj(n)})}nonempty(t){return this.min(1,$e.errToObj(t))}trim(){return new Gn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Gn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Gn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Gn.create=e=>{var t;return new Gn({checks:[],typeName:Ne.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...qe(e)})};function Q3(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return a%o/Math.pow(10,i)}class hi extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==be.number){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_type,expected:be.number,received:a.parsedType}),De}let r;const i=new rn;for(const a of this._def.checks)a.kind==="int"?et.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:re.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?Q3(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_finite,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,$e.toString(n))}gt(t,n){return this.setLimit("min",t,!1,$e.toString(n))}lte(t,n){return this.setLimit("max",t,!0,$e.toString(n))}lt(t,n){return this.setLimit("max",t,!1,$e.toString(n))}setLimit(t,n,r,i){return new hi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:$e.toString(i)}]})}_addCheck(t){return new hi({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:$e.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:$e.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:$e.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:$e.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:$e.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&et.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}hi.create=e=>new hi({checks:[],typeName:Ne.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...qe(e)});class mi extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==be.bigint){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_type,expected:be.bigint,received:a.parsedType}),De}let r;const i=new rn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),me(r,{code:re.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):et.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,$e.toString(n))}gt(t,n){return this.setLimit("min",t,!1,$e.toString(n))}lte(t,n){return this.setLimit("max",t,!0,$e.toString(n))}lt(t,n){return this.setLimit("max",t,!1,$e.toString(n))}setLimit(t,n,r,i){return new mi({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:$e.toString(i)}]})}_addCheck(t){return new mi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:$e.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:$e.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:$e.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}mi.create=e=>{var t;return new mi({checks:[],typeName:Ne.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...qe(e)})};class hs extends He{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==be.boolean){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.boolean,received:r.parsedType}),De}return un(t.data)}}hs.create=e=>new hs({typeName:Ne.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...qe(e)});class Gi extends He{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==be.date){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_type,expected:be.date,received:a.parsedType}),De}if(isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return me(a,{code:re.invalid_date}),De}const r=new rn;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),me(i,{code:re.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):et.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Gi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:$e.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:$e.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Gi.create=e=>new Gi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Ne.ZodDate,...qe(e)});class wc extends He{_parse(t){if(this._getType(t)!==be.symbol){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.symbol,received:r.parsedType}),De}return un(t.data)}}wc.create=e=>new wc({typeName:Ne.ZodSymbol,...qe(e)});class ms extends He{_parse(t){if(this._getType(t)!==be.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.undefined,received:r.parsedType}),De}return un(t.data)}}ms.create=e=>new ms({typeName:Ne.ZodUndefined,...qe(e)});class vs extends He{_parse(t){if(this._getType(t)!==be.null){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.null,received:r.parsedType}),De}return un(t.data)}}vs.create=e=>new vs({typeName:Ne.ZodNull,...qe(e)});class La extends He{constructor(){super(...arguments),this._any=!0}_parse(t){return un(t.data)}}La.create=e=>new La({typeName:Ne.ZodAny,...qe(e)});class Yi extends He{constructor(){super(...arguments),this._unknown=!0}_parse(t){return un(t.data)}}Yi.create=e=>new Yi({typeName:Ne.ZodUnknown,...qe(e)});class Ur extends He{_parse(t){const n=this._getOrReturnCtx(t);return me(n,{code:re.invalid_type,expected:be.never,received:n.parsedType}),De}}Ur.create=e=>new Ur({typeName:Ne.ZodNever,...qe(e)});class Sc extends He{_parse(t){if(this._getType(t)!==be.undefined){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.void,received:r.parsedType}),De}return un(t.data)}}Sc.create=e=>new Sc({typeName:Ne.ZodVoid,...qe(e)});class Yn extends He{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==be.array)return me(n,{code:re.invalid_type,expected:be.array,received:n.parsedType}),De;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,s=n.data.length<i.exactLength.value;(o||s)&&(me(n,{code:o?re.too_big:re.too_small,minimum:s?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(me(n,{code:re.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(me(n,{code:re.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,s)=>i.type._parseAsync(new xr(n,o,n.path,s)))).then(o=>rn.mergeArray(r,o));const a=[...n.data].map((o,s)=>i.type._parseSync(new xr(n,o,n.path,s)));return rn.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new Yn({...this._def,minLength:{value:t,message:$e.toString(n)}})}max(t,n){return new Yn({...this._def,maxLength:{value:t,message:$e.toString(n)}})}length(t,n){return new Yn({...this._def,exactLength:{value:t,message:$e.toString(n)}})}nonempty(t){return this.min(1,t)}}Yn.create=(e,t)=>new Yn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Ne.ZodArray,...qe(t)});function Fa(e){if(e instanceof Et){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Sr.create(Fa(r))}return new Et({...e._def,shape:()=>t})}else return e instanceof Yn?new Yn({...e._def,type:Fa(e.element)}):e instanceof Sr?Sr.create(Fa(e.unwrap())):e instanceof gi?gi.create(Fa(e.unwrap())):e instanceof wr?wr.create(e.items.map(t=>Fa(t))):e}class Et extends He{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=et.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==be.object){const c=this._getOrReturnCtx(t);return me(c,{code:re.invalid_type,expected:be.object,received:c.parsedType}),De}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),s=[];if(!(this._def.catchall instanceof Ur&&this._def.unknownKeys==="strip"))for(const c in i.data)o.includes(c)||s.push(c);const l=[];for(const c of o){const u=a[c],f=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new xr(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof Ur){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of s)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")s.length>0&&(me(i,{code:re.unrecognized_keys,keys:s}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of s){const f=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new xr(i,f,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key,d=await u.value;c.push({key:f,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>rn.mergeObjectSync(r,c)):rn.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return $e.errToObj,new Et({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,a,o,s;const l=(o=(a=(i=this._def).errorMap)===null||a===void 0?void 0:a.call(i,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=$e.errToObj(t).message)!==null&&s!==void 0?s:l}:{message:l}}}:{}})}strip(){return new Et({...this._def,unknownKeys:"strip"})}passthrough(){return new Et({...this._def,unknownKeys:"passthrough"})}extend(t){return new Et({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Et({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Ne.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Et({...this._def,catchall:t})}pick(t){const n={};return et.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Et({...this._def,shape:()=>n})}omit(t){const n={};return et.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Et({...this._def,shape:()=>n})}deepPartial(){return Fa(this)}partial(t){const n={};return et.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Et({...this._def,shape:()=>n})}required(t){const n={};return et.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof Sr;)a=a._def.innerType;n[r]=a}}),new Et({...this._def,shape:()=>n})}keyof(){return V0(et.objectKeys(this.shape))}}Et.create=(e,t)=>new Et({shape:()=>e,unknownKeys:"strip",catchall:Ur.create(),typeName:Ne.ZodObject,...qe(t)}),Et.strictCreate=(e,t)=>new Et({shape:()=>e,unknownKeys:"strict",catchall:Ur.create(),typeName:Ne.ZodObject,...qe(t)}),Et.lazycreate=(e,t)=>new Et({shape:e,unknownKeys:"strip",catchall:Ur.create(),typeName:Ne.ZodObject,...qe(t)});class gs extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(s=>new _n(s.ctx.common.issues));return me(n,{code:re.invalid_union,unionErrors:o}),De}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!a&&(a={result:u,ctx:c}),c.common.issues.length&&o.push(c.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(l=>new _n(l));return me(n,{code:re.invalid_union,unionErrors:s}),De}}get options(){return this._def.options}}gs.create=(e,t)=>new gs({options:e,typeName:Ne.ZodUnion,...qe(t)});const qr=e=>e instanceof xs?qr(e.schema):e instanceof Jn?qr(e.innerType()):e instanceof ws?[e.value]:e instanceof vi?e.options:e instanceof Ss?et.objectValues(e.enum):e instanceof Es?qr(e._def.innerType):e instanceof ms?[void 0]:e instanceof vs?[null]:e instanceof Sr?[void 0,...qr(e.unwrap())]:e instanceof gi?[null,...qr(e.unwrap())]:e instanceof qp||e instanceof $s?qr(e.unwrap()):e instanceof _s?qr(e._def.innerType):[];class Ec extends He{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.object)return me(n,{code:re.invalid_type,expected:be.object,received:n.parsedType}),De;const r=this.discriminator,i=n.data[r],a=this.optionsMap.get(i);return a?n.common.async?a._parseAsync({data:n.data,path:n.path,parent:n}):a._parseSync({data:n.data,path:n.path,parent:n}):(me(n,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),De)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const a of n){const o=qr(a.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of o){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,a)}}return new Ec({typeName:Ne.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...qe(r)})}}function Up(e,t){const n=pi(e),r=pi(t);if(e===t)return{valid:!0,data:e};if(n===be.object&&r===be.object){const i=et.objectKeys(t),a=et.objectKeys(e).filter(s=>i.indexOf(s)!==-1),o={...e,...t};for(const s of a){const l=Up(e[s],t[s]);if(!l.valid)return{valid:!1};o[s]=l.data}return{valid:!0,data:o}}else if(n===be.array&&r===be.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],s=t[a],l=Up(o,s);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===be.date&&r===be.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ys extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(Fp(a)||Fp(o))return De;const s=Up(a.value,o.value);return s.valid?((Bp(a)||Bp(o))&&n.dirty(),{status:n.value,value:s.data}):(me(r,{code:re.invalid_intersection_types}),De)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ys.create=(e,t,n)=>new ys({left:e,right:t,typeName:Ne.ZodIntersection,...qe(n)});class wr extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.array)return me(r,{code:re.invalid_type,expected:be.array,received:r.parsedType}),De;if(r.data.length<this._def.items.length)return me(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),De;!this._def.rest&&r.data.length>this._def.items.length&&(me(r,{code:re.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,s)=>{const l=this._def.items[s]||this._def.rest;return l?l._parse(new xr(r,o,r.path,s)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>rn.mergeArray(n,o)):rn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new wr({...this._def,rest:t})}}wr.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new wr({items:e,typeName:Ne.ZodTuple,rest:null,...qe(t)})};class bs extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.object)return me(r,{code:re.invalid_type,expected:be.object,received:r.parsedType}),De;const i=[],a=this._def.keyType,o=this._def.valueType;for(const s in r.data)i.push({key:a._parse(new xr(r,s,r.path,s)),value:o._parse(new xr(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?rn.mergeObjectAsync(n,i):rn.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof He?new bs({keyType:t,valueType:n,typeName:Ne.ZodRecord,...qe(r)}):new bs({keyType:Gn.create(),valueType:t,typeName:Ne.ZodRecord,...qe(n)})}}class _c extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.map)return me(r,{code:re.invalid_type,expected:be.map,received:r.parsedType}),De;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([s,l],c)=>({key:i._parse(new xr(r,s,r.path,[c,"key"])),value:a._parse(new xr(r,l,r.path,[c,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const l of o){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return De;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const l of o){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return De;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),s.set(c.value,u.value)}return{status:n.value,value:s}}}}_c.create=(e,t,n)=>new _c({valueType:t,keyType:e,typeName:Ne.ZodMap,...qe(n)});class Ji extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==be.set)return me(r,{code:re.invalid_type,expected:be.set,received:r.parsedType}),De;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(me(r,{code:re.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(me(r,{code:re.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(l){const c=new Set;for(const u of l){if(u.status==="aborted")return De;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const s=[...r.data.values()].map((l,c)=>a._parse(new xr(r,l,r.path,c)));return r.common.async?Promise.all(s).then(l=>o(l)):o(s)}min(t,n){return new Ji({...this._def,minSize:{value:t,message:$e.toString(n)}})}max(t,n){return new Ji({...this._def,maxSize:{value:t,message:$e.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ji.create=(e,t)=>new Ji({valueType:e,minSize:null,maxSize:null,typeName:Ne.ZodSet,...qe(t)});class Ba extends He{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.function)return me(n,{code:re.invalid_type,expected:be.function,received:n.parsedType}),De;function r(s,l){return bc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,yc(),Da].filter(c=>!!c),issueData:{code:re.invalid_arguments,argumentsError:l}})}function i(s,l){return bc({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,yc(),Da].filter(c=>!!c),issueData:{code:re.invalid_return_type,returnTypeError:l}})}const a={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof za){const s=this;return un(async function(...l){const c=new _n([]),u=await s._def.args.parseAsync(l,a).catch(p=>{throw c.addIssue(r(l,p)),c}),f=await Reflect.apply(o,this,u);return await s._def.returns._def.type.parseAsync(f,a).catch(p=>{throw c.addIssue(i(f,p)),c})})}else{const s=this;return un(function(...l){const c=s._def.args.safeParse(l,a);if(!c.success)throw new _n([r(l,c.error)]);const u=Reflect.apply(o,this,c.data),f=s._def.returns.safeParse(u,a);if(!f.success)throw new _n([i(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ba({...this._def,args:wr.create(t).rest(Yi.create())})}returns(t){return new Ba({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ba({args:t||wr.create([]).rest(Yi.create()),returns:n||Yi.create(),typeName:Ne.ZodFunction,...qe(r)})}}class xs extends He{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}xs.create=(e,t)=>new xs({getter:e,typeName:Ne.ZodLazy,...qe(t)});class ws extends He{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return me(n,{received:n.data,code:re.invalid_literal,expected:this._def.value}),De}return{status:"valid",value:t.data}}get value(){return this._def.value}}ws.create=(e,t)=>new ws({value:e,typeName:Ne.ZodLiteral,...qe(t)});function V0(e,t){return new vi({values:e,typeName:Ne.ZodEnum,...qe(t)})}class vi extends He{constructor(){super(...arguments),ds.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{expected:et.joinValues(r),received:n.parsedType,code:re.invalid_type}),De}if(xc(this,ds)||z0(this,ds,new Set(this._def.values)),!xc(this,ds).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return me(n,{received:n.data,code:re.invalid_enum_value,options:r}),De}return un(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return vi.create(t,{...this._def,...n})}exclude(t,n=this._def){return vi.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ds=new WeakMap,vi.create=V0;class Ss extends He{constructor(){super(...arguments),ps.set(this,void 0)}_parse(t){const n=et.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==be.string&&r.parsedType!==be.number){const i=et.objectValues(n);return me(r,{expected:et.joinValues(i),received:r.parsedType,code:re.invalid_type}),De}if(xc(this,ps)||z0(this,ps,new Set(et.getValidEnumValues(this._def.values))),!xc(this,ps).has(t.data)){const i=et.objectValues(n);return me(r,{received:r.data,code:re.invalid_enum_value,options:i}),De}return un(t.data)}get enum(){return this._def.values}}ps=new WeakMap,Ss.create=(e,t)=>new Ss({values:e,typeName:Ne.ZodNativeEnum,...qe(t)});class za extends He{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==be.promise&&n.common.async===!1)return me(n,{code:re.invalid_type,expected:be.promise,received:n.parsedType}),De;const r=n.parsedType===be.promise?n.data:Promise.resolve(n.data);return un(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}za.create=(e,t)=>new za({type:e,typeName:Ne.ZodPromise,...qe(t)});class Jn extends He{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ne.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{me(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async s=>{if(n.value==="aborted")return De;const l=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return l.status==="aborted"?De:l.status==="dirty"||n.value==="dirty"?Ma(l.value):l});{if(n.value==="aborted")return De;const s=this._def.schema._parseSync({data:o,path:r.path,parent:r});return s.status==="aborted"?De:s.status==="dirty"||n.value==="dirty"?Ma(s.value):s}}if(i.type==="refinement"){const o=s=>{const l=i.refinement(s,a);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?De:(s.status==="dirty"&&n.dirty(),o(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?De:(s.status==="dirty"&&n.dirty(),o(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!us(o))return o;const s=i.transform(o.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>us(o)?Promise.resolve(i.transform(o.value,a)).then(s=>({status:n.value,value:s})):o);et.assertNever(i)}}Jn.create=(e,t,n)=>new Jn({schema:e,typeName:Ne.ZodEffects,effect:t,...qe(n)}),Jn.createWithPreprocess=(e,t,n)=>new Jn({schema:t,effect:{type:"preprocess",transform:e},typeName:Ne.ZodEffects,...qe(n)});class Sr extends He{_parse(t){return this._getType(t)===be.undefined?un(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Sr.create=(e,t)=>new Sr({innerType:e,typeName:Ne.ZodOptional,...qe(t)});class gi extends He{_parse(t){return this._getType(t)===be.null?un(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}gi.create=(e,t)=>new gi({innerType:e,typeName:Ne.ZodNullable,...qe(t)});class Es extends He{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===be.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:Ne.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qe(t)});class _s extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return fs(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new _n(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new _n(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}_s.create=(e,t)=>new _s({innerType:e,typeName:Ne.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qe(t)});class kc extends He{_parse(t){if(this._getType(t)!==be.nan){const r=this._getOrReturnCtx(t);return me(r,{code:re.invalid_type,expected:be.nan,received:r.parsedType}),De}return{status:"valid",value:t.data}}}kc.create=e=>new kc({typeName:Ne.ZodNaN,...qe(e)});const eB=Symbol("zod_brand");class qp extends He{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ks extends He{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?De:a.status==="dirty"?(n.dirty(),Ma(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?De:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new ks({in:t,out:n,typeName:Ne.ZodPipeline})}}class $s extends He{_parse(t){const n=this._def.innerType._parse(t),r=i=>(us(i)&&(i.value=Object.freeze(i.value)),i);return fs(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}$s.create=(e,t)=>new $s({innerType:e,typeName:Ne.ZodReadonly,...qe(t)});function Z0(e,t={},n){return e?La.create().superRefine((r,i)=>{var a,o;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(o=(a=s.fatal)!==null&&a!==void 0?a:n)!==null&&o!==void 0?o:!0,c=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...c,fatal:l})}}):La.create()}const tB={object:Et.lazycreate};var Ne;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Ne||(Ne={}));const nB=(e,t={message:`Input not instance of ${e.name}`})=>Z0(n=>n instanceof e,t),K0=Gn.create,G0=hi.create,rB=kc.create,iB=mi.create,Y0=hs.create,aB=Gi.create,oB=wc.create,sB=ms.create,lB=vs.create,cB=La.create,uB=Yi.create,fB=Ur.create,dB=Sc.create,pB=Yn.create,hB=Et.create,mB=Et.strictCreate,vB=gs.create,gB=Ec.create,yB=ys.create,bB=wr.create,xB=bs.create,wB=_c.create,SB=Ji.create,EB=Ba.create,_B=xs.create,kB=ws.create,$B=vi.create,OB=Ss.create,TB=za.create,J0=Jn.create,CB=Sr.create,IB=gi.create,RB=Jn.createWithPreprocess,AB=ks.create;var V=Object.freeze({__proto__:null,defaultErrorMap:Da,setErrorMap:M3,getErrorMap:yc,makeIssue:bc,EMPTY_PATH:L3,addIssueToContext:me,ParseStatus:rn,INVALID:De,DIRTY:Ma,OK:un,isAborted:Fp,isDirty:Bp,isValid:us,isAsync:fs,get util(){return et},get objectUtil(){return Lp},ZodParsedType:be,getParsedType:pi,ZodType:He,datetimeRegex:H0,ZodString:Gn,ZodNumber:hi,ZodBigInt:mi,ZodBoolean:hs,ZodDate:Gi,ZodSymbol:wc,ZodUndefined:ms,ZodNull:vs,ZodAny:La,ZodUnknown:Yi,ZodNever:Ur,ZodVoid:Sc,ZodArray:Yn,ZodObject:Et,ZodUnion:gs,ZodDiscriminatedUnion:Ec,ZodIntersection:ys,ZodTuple:wr,ZodRecord:bs,ZodMap:_c,ZodSet:Ji,ZodFunction:Ba,ZodLazy:xs,ZodLiteral:ws,ZodEnum:vi,ZodNativeEnum:Ss,ZodPromise:za,ZodEffects:Jn,ZodTransformer:Jn,ZodOptional:Sr,ZodNullable:gi,ZodDefault:Es,ZodCatch:_s,ZodNaN:kc,BRAND:eB,ZodBranded:qp,ZodPipeline:ks,ZodReadonly:$s,custom:Z0,Schema:He,ZodSchema:He,late:tB,get ZodFirstPartyTypeKind(){return Ne},coerce:{string:e=>Gn.create({...e,coerce:!0}),number:e=>hi.create({...e,coerce:!0}),boolean:e=>hs.create({...e,coerce:!0}),bigint:e=>mi.create({...e,coerce:!0}),date:e=>Gi.create({...e,coerce:!0})},any:cB,array:pB,bigint:iB,boolean:Y0,date:aB,discriminatedUnion:gB,effect:J0,enum:$B,function:EB,instanceof:nB,intersection:yB,lazy:_B,literal:kB,map:wB,nan:rB,nativeEnum:OB,never:fB,null:lB,nullable:IB,number:G0,object:hB,oboolean:()=>Y0().optional(),onumber:()=>G0().optional(),optional:CB,ostring:()=>K0().optional(),pipeline:AB,preprocess:RB,promise:TB,record:xB,set:SB,strictObject:mB,string:K0,symbol:oB,transformer:J0,tuple:bB,undefined:sB,union:vB,unknown:uB,void:dB,NEVER:De,ZodIssueCode:re,quotelessJson:D3,ZodError:_n}),PB=Object.defineProperty,jB=(e,t,n)=>t in e?PB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,NB=(e,t,n)=>(jB(e,t+"",n),n),DB={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Wp=typeof window<"u"&&typeof window.document<"u"?window.crypto:Yw;Wp.getRandomValues||(Wp=DB);var wt=class extends Error{constructor(t,n,r,i,a,o){super(i);Ee(this,"isApiError",!0);this.code=t,this.description=n,this.type=r,this.message=i,this.error=a,this.id=o,this.id||(this.id=wt.generateId())}format(){return`[${this.type}] ${this.message} (Error ID: ${this.id})`}toJSON(){return{id:this.id,code:this.code,type:this.type,message:this.message}}static generateId(){const t=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],r=4,i=Array.from(Wp.getRandomValues(new Uint8Array(r))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${n}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},MB=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Hp=e=>e instanceof wt||MB(e)&&e.isApiError===!0,Os=class extends wt{constructor(e,t,n){super(500,"An unknown error occurred","Unknown",e,t,n)}},LB=class extends wt{constructor(e,t,n){super(500,"An internal error occurred","Internal",e,t,n)}},FB=class extends wt{constructor(e,t,n){super(401,"The request requires to be authenticated.","Unauthorized",e,t,n)}},BB=class extends wt{constructor(e,t,n){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,n)}},zB=class extends wt{constructor(e,t,n){super(413,"The request payload is too large.","PayloadTooLarge",e,t,n)}},UB=class extends wt{constructor(e,t,n){super(400,"The request payload is invalid.","InvalidPayload",e,t,n)}},qB=class extends wt{constructor(e,t,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,n)}},WB=class extends wt{constructor(e,t,n){super(405,"The requested method does not exist.","MethodNotFound",e,t,n)}},HB=class extends wt{constructor(e,t,n){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,n)}},VB=class extends wt{constructor(e,t,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,n)}},ZB=class extends wt{constructor(e,t,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,n)}},KB=class extends wt{constructor(e,t,n){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",e,t,n)}},GB=class extends wt{constructor(e,t,n){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",e,t,n)}},YB=class extends wt{constructor(e,t,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,n)}},JB=class extends wt{constructor(e,t,n){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,n)}},XB=class extends wt{constructor(e,t,n){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",e,t,n)}},QB=class extends wt{constructor(e,t,n){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,n)}},e4=class extends wt{constructor(e,t,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,n)}},t4=class extends wt{constructor(e,t,n){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,n)}},n4=class extends wt{constructor(e,t,n){super(429,"The request has been rate limited.","RateLimited",e,t,n)}},r4=class extends wt{constructor(e,t,n){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,n)}},i4=class extends wt{constructor(e,t,n){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,n)}},a4=class extends wt{constructor(e,t,n){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,n)}},o4=class extends wt{constructor(e,t,n){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,n)}},s4={Unknown:Os,Internal:LB,Unauthorized:FB,Forbidden:BB,PayloadTooLarge:zB,InvalidPayload:UB,UnsupportedMediaType:qB,MethodNotFound:WB,ResourceNotFound:HB,InvalidJsonSchema:VB,InvalidDataFormat:ZB,InvalidIdentifier:KB,RelationConflict:GB,ReferenceConstraint:YB,ResourceLockedConflict:JB,ReferenceNotFound:XB,InvalidQuery:QB,Runtime:e4,AlreadyExists:t4,RateLimited:n4,PaymentRequired:r4,QuotaExceeded:i4,LimitExceeded:a4,BreakingChanges:o4},X0=e=>Hp(e)?e:e instanceof Error?new Os(e.message,e):typeof e=="string"?new Os(e):l4(e);function l4(e){if(typeof e=="object"&&"code"in e&&"type"in e&&"id"in e&&"message"in e&&typeof e.type=="string"&&typeof e.message=="string"){const t=s4[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Os(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Os("An invalid error occurred: "+JSON.stringify(e))}var c4=e=>e[1]!==void 0,Pt=e=>{const{method:t,path:n,query:r,headers:i,body:a}=e,o=Object.entries(i).filter(c4),s=Object.fromEntries(o),l=P3.stringify(r,{encode:!0,arrayFormat:"repeat",allowDots:!0}),c=l?[n,l].join("?"):n;return{method:t,url:c,headers:s,data:a}},u4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),f4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),d4=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),p4=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),h4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),m4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),v4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),g4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),y4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id,userId:e.userId},body:{}}),b4=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),x4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),w4=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,metadata:e.metadata}}),S4=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),E4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),_4=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),k4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),$4=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),O4=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),T4=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId,bindConversation:e.bindConversation,bindUser:e.bindUser}}),C4=e=>({path:"/files",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{key:e.key,size:e.size,accessPolicies:e.accessPolicies,index:e.index,contentType:e.contentType,tags:e.tags}}),I4=class{constructor(e,t={}){Ee(this,"getConversation",async e=>{const{path:t,headers:n,query:r,body:i}=u4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"createConversation",async e=>{const{path:t,headers:n,query:r,body:i}=f4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"deleteConversation",async e=>{const{path:t,headers:n,query:r,body:i}=d4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"listConversations",async e=>{const{path:t,headers:n,query:r,body:i}=p4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"listenConversation",async e=>{const{path:t,headers:n,query:r,body:i}=h4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"listConversationMessages",async e=>{const{path:t,headers:n,query:r,body:i}=m4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"addParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=v4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"removeParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=g4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"getParticipant",async e=>{const{path:t,headers:n,query:r,body:i}=y4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"listParticipants",async e=>{const{path:t,headers:n,query:r,body:i}=b4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"getMessage",async e=>{const{path:t,headers:n,query:r,body:i}=x4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"createMessage",async e=>{const{path:t,headers:n,query:r,body:i}=w4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"deleteMessage",async e=>{const{path:t,headers:n,query:r,body:i}=S4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"getUser",async e=>{const{path:t,headers:n,query:r,body:i}=E4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"createUser",async e=>{const{path:t,headers:n,query:r,body:i}=_4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"updateUser",async e=>{const{path:t,headers:n,query:r,body:i}=k4(e),o=(this.props.toAxiosRequest??Pt)({method:"put",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"deleteUser",async e=>{const{path:t,headers:n,query:r,body:i}=$4(e),o=(this.props.toAxiosRequest??Pt)({method:"delete",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"getEvent",async e=>{const{path:t,headers:n,query:r,body:i}=O4(e),o=(this.props.toAxiosRequest??Pt)({method:"get",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"createEvent",async e=>{const{path:t,headers:n,query:r,body:i}=T4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});Ee(this,"createFile",async e=>{const{path:t,headers:n,query:r,body:i}=C4(e),o=(this.props.toAxiosRequest??Pt)({method:"post",path:t,headers:{...n},query:{...r},body:i});return this.axiosInstance.request(o).then(s=>s.data).catch(s=>{throw jt(s)})});this.axiosInstance=e,this.props=t}};function jt(e){var t;return At.isAxiosError(e)&&((t=e.response)!=null&&t.data)?X0(e.response.data):X0(e)}var Q0=class{constructor(){Ee(this,"listeners",{})}emit(e,t){const n=this.listeners[e];if(n)for(const r of[...n])r(t)}onceOrMore(e,t){const n=r=>{t(r)==="stop-listening"&&this.off(e,n)};this.on(e,n)}once(e,t){const n=r=>{this.off(e,n),t(r)};this.on(e,n)}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){const n=this.listeners[e];if(!n)return;const r=n.indexOf(t);r!==-1&&n.splice(r,1)}cleanup(){this.listeners={}}},R4=(e,t)=>{const n=new N3.EventSourcePolyfill(e,{headers:t.headers,heartbeatTimeout:t.timeout}),r=new Q0;return n.onopen=i=>r.emit("open",i),n.onmessage=i=>r.emit("message",i),n.onerror=i=>r.emit("error",i),{emitter:r,source:n}},A4=async(e,t={})=>{const{emitter:n,source:r}=R4(e,t);return await new Promise((i,a)=>{n.on("open",()=>{i()}),n.on("error",o=>{a(o)})}).finally(()=>n.cleanup()),{on:n.on.bind(n),close:()=>{n.cleanup(),r.close()}}},P4=V.object({type:V.literal("message_created"),data:V.object({id:V.string().describe("Id of the [Message](#schema_message)"),createdAt:V.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:V.union([V.object({audioUrl:V.string().min(1),type:V.literal("audio")}),V.object({title:V.string().min(1),subtitle:V.string().min(1).optional(),imageUrl:V.string().min(1).optional(),actions:V.array(V.object({action:V.enum(["postback","url","say"]),label:V.string().min(1),value:V.string().min(1)})),type:V.literal("card")}),V.object({items:V.array(V.object({title:V.string().min(1),subtitle:V.string().min(1).optional(),imageUrl:V.string().min(1).optional(),actions:V.array(V.object({action:V.enum(["postback","url","say"]),label:V.string().min(1),value:V.string().min(1)}))})),type:V.literal("carousel")}),V.object({text:V.string().min(1),options:V.array(V.object({label:V.string().min(1),value:V.string().min(1)})),type:V.literal("choice"),disableFreeText:V.boolean().optional()}),V.object({text:V.string().min(1),options:V.array(V.object({label:V.string().min(1),value:V.string().min(1)})),type:V.literal("dropdown")}),V.object({fileUrl:V.string().min(1),title:V.string().min(1).optional(),type:V.literal("file")}),V.object({imageUrl:V.string().min(1),type:V.literal("image")}),V.object({latitude:V.number(),longitude:V.number(),address:V.string().optional(),title:V.string().optional(),type:V.literal("location")}),V.object({text:V.string().min(1),type:V.literal("text"),value:V.string().optional()}),V.object({videoUrl:V.string().min(1),type:V.literal("video")}),V.object({items:V.array(V.union([V.object({type:V.literal("text"),payload:V.object({text:V.string().min(1)})}),V.object({type:V.literal("markdown"),payload:V.object({markdown:V.string().min(1)})}),V.object({type:V.literal("image"),payload:V.object({imageUrl:V.string().min(1)})}),V.object({type:V.literal("audio"),payload:V.object({audioUrl:V.string().min(1)})}),V.object({type:V.literal("video"),payload:V.object({videoUrl:V.string().min(1)})}),V.object({type:V.literal("file"),payload:V.object({fileUrl:V.string().min(1),title:V.string().min(1).optional()})}),V.object({type:V.literal("location"),payload:V.object({latitude:V.number(),longitude:V.number(),address:V.string().optional(),title:V.string().optional()})})])),type:V.literal("bloc")}),V.object({markdown:V.string().min(1),type:V.literal("markdown")})]).describe("Payload is the content type of the message."),userId:V.string().describe("ID of the [User](#schema_user)"),conversationId:V.string().describe("ID of the [Conversation](#schema_conversation)"),metadata:V.record(V.union([V.any(),V.null()])).describe("Metadata of the message").optional()}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),j4=V.object({type:V.literal("webchat_visibility"),data:V.object({visibility:V.union([V.literal("show"),V.literal("hide"),V.literal("toggle")])})}),N4=V.object({type:V.literal("webchat_config"),data:V.object({config:V.record(V.union([V.any(),V.null()]))})}),D4=V.object({type:V.literal("custom"),data:V.object({event:V.record(V.union([V.any(),V.null()]))})}),M4=V.object({type:V.literal("typing_started"),data:V.object({timeout:V.number().optional()})}),L4=V.object({type:V.literal("typing_stopped"),data:V.record(V.never())}),F4={messageCreated:P4,webchatVisibility:j4,webchatConfig:N4,custom:D4,typingStarted:M4,typingStopped:L4},e1="unknown error",t1=class extends Q0{constructor(t){super();Ee(this,"_state",{status:"disconnected"});Ee(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const t=this._connect();this._state={status:"connecting",connectionPromise:t},await t});Ee(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let t;this._state.status==="connecting"?t=await this._state.connectionPromise:t=this._state.source,this._disconnectSync(t)});Ee(this,"_connect",async()=>{const t=await A4(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey},timeout:this._props.timeout});return t.on("message",this._handleMessage),t.on("error",this._handleError(t)),this._state={status:"connected",source:t},t});Ee(this,"_disconnectSync",t=>{t.close(),this._state={status:"disconnected"}});Ee(this,"_handleMessage",t=>{const n=this._parseSignal(t.data);this.emit(n.type,n.data)});Ee(this,"_handleError",t=>n=>{this._disconnectSync(t);const r=this._toError(n);this.emit("error",r)});Ee(this,"_parseSignal",t=>{for(const n of Object.values(F4)){const r=this._safeJsonParse(t),i=n.safeParse(r);if(i.success)return i.data}return{type:"unknown",data:t}});Ee(this,"_safeJsonParse",t=>{try{return JSON.parse(t)}catch{return t}});Ee(this,"_toError",t=>{if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t===null)return new Error(e1);if(typeof t=="object"&&"message"in t)return this._toError(t.message);try{const n=JSON.stringify(t);return new Error(n)}catch{return new Error(e1)}});this._props=t}get status(){return this._state.status}},n1=t1;NB(n1,"listen",async e=>{const t=new t1(e);return await t.connect(),t});var r1=100*1024*1024,B4=r1,z4=r1,U4=6e4,q4=class{constructor(e){Ee(this,"_auto");Ee(this,"createConversation",e=>this._auto.createConversation(e));Ee(this,"getConversation",e=>this._auto.getConversation(e));Ee(this,"deleteConversation",e=>this._auto.deleteConversation(e));Ee(this,"listConversations",e=>this._auto.listConversations(e));Ee(this,"listConversationMessages",e=>this._auto.listConversationMessages(e));Ee(this,"addParticipant",e=>this._auto.addParticipant(e));Ee(this,"removeParticipant",e=>this._auto.removeParticipant(e));Ee(this,"getParticipant",e=>this._auto.getParticipant(e));Ee(this,"listParticipants",e=>this._auto.listParticipants(e));Ee(this,"createMessage",e=>this._auto.createMessage(e));Ee(this,"getMessage",e=>this._auto.getMessage(e));Ee(this,"deleteMessage",e=>this._auto.deleteMessage(e));Ee(this,"createFile",e=>this._auto.createFile(e));Ee(this,"createUser",e=>this._auto.createUser(e));Ee(this,"getUser",e=>this._auto.getUser(e));Ee(this,"updateUser",e=>this._auto.updateUser(e));Ee(this,"deleteUser",e=>this._auto.deleteUser(e));Ee(this,"createEvent",e=>this._auto.createEvent(e));Ee(this,"getEvent",e=>this._auto.getEvent(e));Ee(this,"listenConversation",async({id:e,"x-user-key":t})=>await n1.listen({url:this.props.apiUrl,conversationId:e,userKey:t,timeout:this.props.sseTimeout}));this.props=e;const{apiUrl:t}=e,n={...e.headers},r=this.props.timeout??U4,i=At.create({baseURL:t,headers:n,withCredentials:!0,timeout:r,maxBodyLength:B4,maxContentLength:z4});this._auto=new I4(i)}};const $c={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},vn=(e,t)=>e.status===t,Er=(e,t)=>$c[e.status]<$c[t],i1=(e,t)=>$c[e.status]>=$c[t];class _r extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const a1=["audio","file","image","video"],o1=e=>a1.includes(e),s1={"application/prs.cww":["cww"],"application/prs.xsf+xml":["xsf"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["*xfdf"],"application/vnd.age":["age"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["*fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["*mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.pwg-xhtml-print+xml":["xhtm"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml","uo"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["*prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["*sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["*aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif","btf"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.cld":["cld"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.pytha.pyox":["pyo","pyox"],"model/vnd.sap.vds":["vds"],"model/vnd.usda":["usda"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.familysearch.gedcom":["ged"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};Object.freeze(s1);const l1={"application/andrew-inset":["ez"],"application/appinstaller":["appinstaller"],"application/applixware":["aw"],"application/appx":["appx"],"application/appxbundle":["appxbundle"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/automationml-aml+xml":["aml"],"application/automationml-amlx+zip":["amlx"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cpl+xml":["cpl"],"application/cu-seeme":["cu"],"application/cwl":["cwl"],"application/dash+xml":["mpd"],"application/dash-patch+xml":["mpp"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdf":["fdf"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["*js"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/media-policy-dataset+xml":["mpf"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["*mp4","*mpg4","mp4s","m4p"],"application/msix":["msix"],"application/msixbundle":["msixbundle"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-keys":["asc"],"application/pgp-signature":["sig","*asc"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/sql":["sql"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/watcherinfo+xml":["wif"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xfdf":["xfdf"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/aac":["adts","aac"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avci":["avci"],"image/avcs":["avcs"],"image/avif":["avif"],"image/bmp":["bmp","dib"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/dpx":["dpx"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm","jpgm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/jt":["jt"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/prc":["prc"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/u3d":["u3d"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/javascript":["js","mjs"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["md","markdown"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/wgsl":["wgsl"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","*jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};Object.freeze(l1);var Ln=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},Ua,Ts,Xi;class W4{constructor(...t){Ua.set(this,new Map),Ts.set(this,new Map),Xi.set(this,new Map);for(const n of t)this.define(n)}define(t,n=!1){for(let[r,i]of Object.entries(t)){r=r.toLowerCase(),i=i.map(s=>s.toLowerCase()),Ln(this,Xi,"f").has(r)||Ln(this,Xi,"f").set(r,new Set);const a=Ln(this,Xi,"f").get(r);let o=!0;for(let s of i){const l=s.startsWith("*");if(s=l?s.slice(1):s,a==null||a.add(s),o&&Ln(this,Ts,"f").set(r,s),o=!1,l)continue;const c=Ln(this,Ua,"f").get(s);if(c&&c!=r&&!n)throw new Error(`"${r} -> ${s}" conflicts with "${c} -> ${s}". Pass \`force=true\` to override this definition.`);Ln(this,Ua,"f").set(s,r)}}return this}getType(t){if(typeof t!="string")return null;const n=t.replace(/^.*[/\\]/,"").toLowerCase(),r=n.replace(/^.*\./,"").toLowerCase(),i=n.length<t.length;return!(r.length<n.length-1)&&i?null:Ln(this,Ua,"f").get(r)??null}getExtension(t){var n;return typeof t!="string"?null:(t=(n=t==null?void 0:t.split)==null?void 0:n.call(t,";")[0],(t&&Ln(this,Ts,"f").get(t.trim().toLowerCase()))??null)}getAllExtensions(t){return typeof t!="string"?null:Ln(this,Xi,"f").get(t.toLowerCase())??null}_freeze(){this.define=()=>{throw new Error("define() not allowed for built-in Mime objects. See https://github.com/broofa/mime/blob/main/README.md#custom-mime-instances")},Object.freeze(this);for(const t of Ln(this,Xi,"f").values())Object.freeze(t);return this}_getTestState(){return{types:Ln(this,Ua,"f"),extensions:Ln(this,Ts,"f")}}}Ua=new WeakMap,Ts=new WeakMap,Xi=new WeakMap;const H4=new W4(l1,s1)._freeze(),V4=6e4;class Z4 extends qy{constructor(n){super();Ee(this,"_client");Ee(this,"_webhookId");Ee(this,"_apiUrl");Ee(this,"_state",{status:"disconnected"});Ee(this,"mode","pushpin");Ee(this,"_initialConnect",async({data:n,name:r,pictureUrl:i})=>{if(i1(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(vn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:a},key:o}=await this._client.createUser({name:r,pictureUrl:i,userData:n});return this._state={status:"user_created",userId:a,userKey:o},{userId:a,userToken:o}});Ee(this,"_reConnect",async(n,{data:r,name:i,pictureUrl:a})=>{if(i1(this._state,"user_created")){if(this._state.userId!==n.userId)throw new Error("Client is already connected. Please disconnect first.");return n}return vn(this._state,"user_creating")||(this._state={status:"user_created",userId:n.userId,userKey:n.userToken},await this._client.updateUser({"x-user-key":n.userToken,name:i,pictureUrl:a,userData:r})),n});Ee(this,"_mapMessage",n=>{const{metadata:r}=n,{payload:i,disableInput:a}=Oo(n.payload);return{id:n.id,conversationId:n.conversationId,authorId:n.userId,sentOn:new Date(n.createdAt),payload:i,disableInput:a,metadata:r}});const r=`${n.apiUrl}/${n.clientId}`;this._webhookId=n.clientId,this._apiUrl=r,this._client=new q4({apiUrl:r,sseTimeout:V4})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!Er(this._state,"user_created"))return this._state.userId}async getUser(){if(Er(this._state,"user_created"))throw new _r(this._state);const{user:n}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:n.data}}async updateUser(n){if(Er(this._state,"user_created"))throw new _r(this._state);const{user:r}=await this._client.updateUser({"x-user-key":this._state.userKey,name:n.name,pictureUrl:n.pictureUrl,userData:n.data});return r}get conversationId(){if(!Er(this._state,"conversation_created"))return this._state.conversationId}async connect(n,r,i={}){const a={data:r,...i};return n?await this.userExists(n)?this._reConnect(n,a):this._initialConnect(a):this._initialConnect(a)}async disconnect(){vn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():vn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(n){if(Er(this._state,"user_created"))throw new _r(this._state);if(vn(this._state,"conversation_creating"))throw new _r(this._state);let r;vn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state));const{size:i,name:a}=n,o=H4.getType(n.name)??"application/octet-stream",l=await(h=>new Promise((m,y)=>{const v=new FileReader;v.onload=g=>{var b;return m((b=g.target)==null?void 0:b.result)},v.onerror=g=>{var b;return y((b=g.target)==null?void 0:b.error)},v.readAsArrayBuffer(h)}))(n),{file:{uploadUrl:c,url:u}}=await this._client.createFile({"x-user-key":r.userKey,size:i,key:a,contentType:o,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"}});await fetch(c,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:l});const f=o.split("/").shift()??"",d=o1(f)?f:"file",p=d==="image"?{type:d,imageUrl:u}:d==="audio"?{type:d,audioUrl:u}:d==="video"?{type:d,videoUrl:u}:{type:d,fileUrl:u};return await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:p}),{fileUrl:u,name:a,type:d}}async sendMessage(n){if(Er(this._state,"user_created"))throw new _r(this._state);if(vn(this._state,"conversation_creating"))throw new _r(this._state);let r;vn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":r.userKey,conversationId:r.conversationId,payload:n}),this.emit("messageSent",n)}async sendEvent(n){if(Er(this._state,"user_created"))throw new _r(this._state);if(vn(this._state,"conversation_creating"))throw new _r(this._state);let r;vn(this._state,"conversation_created")?r=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},r=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":r.userKey,conversationId:r.conversationId,payload:{type:"custom",data:n}})}async switchConversation(n){if(Er(this._state,"user_created"))throw new _r(this._state);vn(this._state,"conversation_created")&&this._state.conversationId===n||vn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,n))}async conversationExists(n){if(Er(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:n}),!0}catch(r){if(Hp(r)&&r.code===404)return!1;throw r}}async userExists({userToken:n}){try{return await this._client.getUser({"x-user-key":n}),!0}catch(r){const i=a=>a.code===404||a.code===401;if(Hp(r)&&i(r))return!1;throw r}}async newConversation(){if(Er(this._state,"user_created"))throw new _r(this._state);vn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(n){const{conversation:{id:r}}=await this._client.createConversation({"x-user-key":n.userKey}),i=await this._connectConversation(n,r);return await this._client.createEvent({"x-user-key":n.userKey,conversationId:r,payload:{type:"conversation_started",data:{}}}),i}async listMessages(){if(!vn(this._state,"conversation_created"))return[];const{conversationId:n,userKey:r}=this._state,i=[];let a;do{const o=await this._client.listConversationMessages({id:n,"x-user-key":r,nextToken:a});i.push(...o.messages),a=o.meta.nextToken}while(a);return i.map(this._mapMessage)}async _connectConversation(n,r){const i=await this._client.listenConversation({id:r,"x-user-key":n.userKey});return i.on("unknown",a=>{typeof a=="string"&&a==="ping"||console.debug("unknown event",a)}),i.on("message_created",a=>{a.userId!==n.userId&&this.emit("message",this._mapMessage(a))}),i.on("error",a=>{this._state={status:"user_created",userId:n.userId,userKey:n.userKey},this.emit("error",new Error(`Connection to conversation lost: ${a.message}`))}),i.on("webchat_visibility",a=>{this.emit("webchatVisibility",a.visibility)}),i.on("webchat_config",a=>{this.emit("webchatConfig",a.config)}),i.on("typing_started",a=>{this.emit("isTyping",{isTyping:!0,timeout:a.timeout??5e3})}),i.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),i.on("custom",a=>{this.emit("customEvent",a.event)}),this.emit("conversation",r),this._state={status:"conversation_created",userId:n.userId,userKey:n.userKey,conversationId:r,signalEmitter:i},this._state}}const c1=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>new Z4({apiUrl:t,clientId:e}),K4=({clientId:e,apiUrl:t="https://webchat.botpress.cloud"})=>{const[n]=D.useState(c1({clientId:e,apiUrl:t}));return n},G4=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const a=new Image;a.addEventListener("load",()=>{i&&clearTimeout(i),n({width:a.naturalWidth,height:a.naturalHeight})}),a.addEventListener("error",o=>{i&&clearTimeout(i),r(`${o.type}: ${o.message}`)}),a.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))});let Y4={data:""},J4=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Y4,X4=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Q4=/\/\*[^]*?\*\/| +/g,u1=/\n+/g,yi=(e,t)=>{let n="",r="",i="";for(let a in e){let o=e[a];a[0]=="@"?a[1]=="i"?n=a+" "+o+";":r+=a[1]=="f"?yi(o,a):a+"{"+yi(o,a[1]=="k"?"":t)+"}":typeof o=="object"?r+=yi(o,t?t.replace(/([^,])+/g,s=>a.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,l=>/&/.test(l)?l.replace(/&/g,s):s?s+" "+l:l)):a):o!=null&&(a=/^--/.test(a)?a:a.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=yi.p?yi.p(a,o):a+":"+o+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Wr={},f1=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+f1(e[n]);return t}return e},ez=(e,t,n,r,i)=>{let a=f1(e),o=Wr[a]||(Wr[a]=(l=>{let c=0,u=11;for(;c<l.length;)u=101*u+l.charCodeAt(c++)>>>0;return"go"+u})(a));if(!Wr[o]){let l=a!==e?e:(c=>{let u,f,d=[{}];for(;u=X4.exec(c.replace(Q4,""));)u[4]?d.shift():u[3]?(f=u[3].replace(u1," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][u[1]]=u[2].replace(u1," ").trim();return d[0]})(e);Wr[o]=yi(i?{["@keyframes "+o]:l}:l,n?"":"."+o)}let s=n&&Wr.g?Wr.g:null;return n&&(Wr.g=Wr[o]),((l,c,u,f)=>{f?c.data=c.data.replace(f,l):c.data.indexOf(l)===-1&&(c.data=u?l+c.data:c.data+l)})(Wr[o],t,r,s),o},tz=(e,t,n)=>e.reduce((r,i,a)=>{let o=t[a];if(o&&o.call){let s=o(n),l=s&&s.props&&s.props.className||/^go/.test(s)&&s;o=l?"."+l:s&&typeof s=="object"?s.props?"":yi(s,""):s===!1?"":s}return r+i+(o??"")},"");function Oc(e){let t=this||{},n=e.call?e(t.p):e;return ez(n.unshift?n.raw?tz(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,J4(t.target),t.g,t.o,t.k)}let d1,Vp,Zp;Oc.bind({g:1});let Hr=Oc.bind({k:1});function nz(e,t,n,r){yi.p=t,d1=e,Vp=n,Zp=r}function bi(e,t){let n=this||{};return function(){let r=arguments;function i(a,o){let s=Object.assign({},a),l=s.className||i.className;n.p=Object.assign({theme:Vp&&Vp()},s),n.o=/ *go\d+/.test(l),s.className=Oc.apply(n,r)+(l?" "+l:"");let c=e;return e[0]&&(c=s.as||e,delete s.as),Zp&&c[0]&&Zp(s),d1(c,s)}return i}}var rz=e=>typeof e=="function",Tc=(e,t)=>rz(e)?e(t):e,iz=(()=>{let e=0;return()=>(++e).toString()})(),p1=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),az=20,Cc=new Map,oz=1e3,h1=e=>{if(Cc.has(e))return;let t=setTimeout(()=>{Cc.delete(e),Qi({type:4,toastId:e})},oz);Cc.set(e,t)},sz=e=>{let t=Cc.get(e);t&&clearTimeout(t)},Kp=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,az)};case 1:return t.toast.id&&sz(t.toast.id),{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case 2:let{toast:n}=t;return e.toasts.find(a=>a.id===n.id)?Kp(e,{type:1,toast:n}):Kp(e,{type:0,toast:n});case 3:let{toastId:r}=t;return r?h1(r):e.toasts.forEach(a=>{h1(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===r||r===void 0?{...a,visible:!1}:a)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(a=>({...a,pauseDuration:a.pauseDuration+i}))}}},Ic=[],Rc={toasts:[],pausedAt:void 0},Qi=e=>{Rc=Kp(Rc,e),Ic.forEach(t=>{t(Rc)})},lz={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},cz=(e={})=>{let[t,n]=D.useState(Rc);D.useEffect(()=>(Ic.push(n),()=>{let i=Ic.indexOf(n);i>-1&&Ic.splice(i,1)}),[t]);let r=t.toasts.map(i=>{var a,o;return{...e,...e[i.type],...i,duration:i.duration||((a=e[i.type])==null?void 0:a.duration)||(e==null?void 0:e.duration)||lz[i.type],style:{...e.style,...(o=e[i.type])==null?void 0:o.style,...i.style}}});return{...t,toasts:r}},uz=(e,t="blank",n)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(n==null?void 0:n.id)||iz()}),Cs=e=>(t,n)=>{let r=uz(t,e,n);return Qi({type:2,toast:r}),r.id},Fn=(e,t)=>Cs("blank")(e,t);Fn.error=Cs("error"),Fn.success=Cs("success"),Fn.loading=Cs("loading"),Fn.custom=Cs("custom"),Fn.dismiss=e=>{Qi({type:3,toastId:e})},Fn.remove=e=>Qi({type:4,toastId:e}),Fn.promise=(e,t,n)=>{let r=Fn.loading(t.loading,{...n,...n==null?void 0:n.loading});return e.then(i=>(Fn.success(Tc(t.success,i),{id:r,...n,...n==null?void 0:n.success}),i)).catch(i=>{Fn.error(Tc(t.error,i),{id:r,...n,...n==null?void 0:n.error})}),e};var fz=(e,t)=>{Qi({type:1,toast:{id:e,height:t}})},dz=()=>{Qi({type:5,time:Date.now()})},pz=e=>{let{toasts:t,pausedAt:n}=cz(e);D.useEffect(()=>{if(n)return;let a=Date.now(),o=t.map(s=>{if(s.duration===1/0)return;let l=(s.duration||0)+s.pauseDuration-(a-s.createdAt);if(l<0){s.visible&&Fn.dismiss(s.id);return}return setTimeout(()=>Fn.dismiss(s.id),l)});return()=>{o.forEach(s=>s&&clearTimeout(s))}},[t,n]);let r=D.useCallback(()=>{n&&Qi({type:6,time:Date.now()})},[n]),i=D.useCallback((a,o)=>{let{reverseOrder:s=!1,gutter:l=8,defaultPosition:c}=o||{},u=t.filter(p=>(p.position||c)===(a.position||c)&&p.height),f=u.findIndex(p=>p.id===a.id),d=u.filter((p,h)=>h<f&&p.visible).length;return u.filter(p=>p.visible).slice(...s?[d+1]:[0,d]).reduce((p,h)=>p+(h.height||0)+l,0)},[t]);return{toasts:t,handlers:{updateHeight:fz,startPause:dz,endPause:r,calculateOffset:i}}},hz=Hr`
|
|
69
69
|
from {
|
|
70
70
|
transform: scale(0) rotate(45deg);
|
|
71
71
|
opacity: 0;
|
|
@@ -236,15 +236,15 @@ to {
|
|
|
236
236
|
color: inherit;
|
|
237
237
|
flex: 1 1 auto;
|
|
238
238
|
white-space: pre-line;
|
|
239
|
-
`,jz=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=
|
|
239
|
+
`,jz=(e,t)=>{let n=e.includes("top")?1:-1,[r,i]=p1()?[Iz,Rz]:[Tz(n),Cz(n)];return{animation:t?`${Hr(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Hr(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Nz=w.memo(({toast:e,position:t,style:n,children:r})=>{let i=e.height?jz(e.position||t||"top-center",e.visible):{opacity:0},a=w.createElement(Oz,{toast:e}),o=w.createElement(Pz,{...e.ariaProps},Tc(e.message,e));return w.createElement(Az,{className:e.className,style:{...i,...n,...e.style}},typeof r=="function"?r({icon:a,message:o}):w.createElement(w.Fragment,null,a,o))});nz(w.createElement);var Dz=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let a=w.useCallback(o=>{if(o){let s=()=>{let l=o.getBoundingClientRect().height;r(e,l)};s(),new MutationObserver(s).observe(o,{subtree:!0,childList:!0,characterData:!0})}},[e,r]);return w.createElement("div",{ref:a,className:t,style:n},i)},Mz=(e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:p1()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}},Lz=Oc`
|
|
240
240
|
z-index: 9999;
|
|
241
241
|
> * {
|
|
242
242
|
pointer-events: auto;
|
|
243
243
|
}
|
|
244
|
-
`,
|
|
244
|
+
`,Ac=16,Fz=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,containerStyle:a,containerClassName:o})=>{let{toasts:s,handlers:l}=pz(n);return w.createElement("div",{style:{position:"fixed",zIndex:9999,top:Ac,left:Ac,right:Ac,bottom:Ac,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},s.map(c=>{let u=c.position||t,f=l.calculateOffset(c,{reverseOrder:e,gutter:r,defaultPosition:t}),d=Mz(u,f);return w.createElement(Dz,{id:c.id,key:c.id,onHeightUpdate:l.updateHeight,className:c.visible?Lz:"",style:d},c.type==="custom"?Tc(c.message,c):i?i(c):w.createElement(Nz,{toast:c,position:u}))}))};function m1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=m1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Gp(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=m1(e))&&(r&&(r+=" "),r+=t);return r}function Pc(){return typeof window<"u"}function qa(e){return v1(e)?(e.nodeName||"").toLowerCase():"#document"}function kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kr(e){var t;return(t=(v1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function v1(e){return Pc()?e instanceof Node||e instanceof kn(e).Node:!1}function Xn(e){return Pc()?e instanceof Element||e instanceof kn(e).Element:!1}function $r(e){return Pc()?e instanceof HTMLElement||e instanceof kn(e).HTMLElement:!1}function g1(e){return!Pc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof kn(e).ShadowRoot}function Is(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Qn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Bz(e){return["table","td","th"].includes(qa(e))}function jc(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yp(e){const t=Jp(),n=Xn(e)?Qn(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function zz(e){let t=xi(e);for(;$r(t)&&!Wa(t);){if(Yp(t))return t;if(jc(t))return null;t=xi(t)}return null}function Jp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Wa(e){return["html","body","#document"].includes(qa(e))}function Qn(e){return kn(e).getComputedStyle(e)}function Nc(e){return Xn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xi(e){if(qa(e)==="html")return e;const t=e.assignedSlot||e.parentNode||g1(e)&&e.host||kr(e);return g1(t)?t.host:t}function y1(e){const t=xi(e);return Wa(t)?e.ownerDocument?e.ownerDocument.body:e.body:$r(t)&&Is(t)?t:y1(t)}function wi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=y1(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=kn(i);if(a){const s=Xp(o);return t.concat(o,o.visualViewport||[],Is(i)?i:[],s&&n?wi(s):[])}return t.concat(i,wi(i,[],n))}function Xp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Ha=Math.min,$n=Math.max,Dc=Math.round,Mc=Math.floor,Si=e=>({x:e,y:e});function b1(e,t,n){return $n(e,Ha(t,n))}function Lc(e,t){return typeof e=="function"?e(t):e}function Rs(e){return e.split("-")[0]}function Qp(e){return e.split("-")[1]}function x1(e){return e==="x"?"y":"x"}function Uz(e){return e==="y"?"height":"width"}function As(e){return["top","bottom"].includes(Rs(e))?"y":"x"}function qz(e){return x1(As(e))}function Wz(e){return{top:0,right:0,bottom:0,left:0,...e}}function Hz(e){return typeof e!="number"?Wz(e):{top:e,right:e,bottom:e,left:e}}function Fc(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}/*!
|
|
245
245
|
* tabbable 6.2.0
|
|
246
246
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
247
|
-
*/var Vz=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],eh=Vz.join(","),x1=typeof Element>"u",Ps=x1?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,zc=!x1&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Uc=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",o=a||n&&t&&e(t.parentNode);return o},Zz=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Kz=function(t,n,r){if(Uc(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(eh));return n&&Ps.call(t,eh)&&i.unshift(t),i=i.filter(r),i},Gz=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!Uc(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),l=s.length?s:o.children,c=e(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:o,candidates:c})}else{var u=Ps.call(o,eh);u&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var f=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!Uc(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(f&&d){var p=e(f===!0?o.children:f.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else a.unshift.apply(a,o.children)}}return i},w1=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},S1=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Zz(t))&&!w1(t)?0:t.tabIndex},Yz=function(t,n){var r=S1(t);return r<0&&n&&!w1(t)?0:r},Jz=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},E1=function(t){return t.tagName==="INPUT"},Xz=function(t){return E1(t)&&t.type==="hidden"},Qz=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},e6=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},t6=function(t){if(!t.name)return!0;var n=t.form||zc(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=e6(i,t.form);return!a||a===t},n6=function(t){return E1(t)&&t.type==="radio"},r6=function(t){return n6(t)&&!t6(t)},i6=function(t){var n,r=t&&zc(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var o,s,l;for(a=!!((o=i)!==null&&o!==void 0&&(s=o.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!a&&i;){var c,u,f;r=zc(i),i=(c=r)===null||c===void 0?void 0:c.host,a=!!((u=i)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return a},_1=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},a6=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Ps.call(t,"details>summary:first-of-type"),o=a?t.parentElement:t;if(Ps.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,c=zc(t);if(l&&!l.shadowRoot&&i(l)===!0)return _1(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(i6(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return _1(t);return!1},o6=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Ps.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},s6=function(t,n){return!(n.disabled||Uc(n)||Xz(n)||a6(n,t)||Qz(n)||o6(n))},k1=function(t,n){return!(r6(n)||S1(n)<0||!s6(t,n))},l6=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},c6=function e(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,l=Yz(s,o),c=o?e(i.candidates):s;l===0?o?n.push.apply(n,c):n.push(s):r.push({documentOrder:a,tabIndex:l,item:i,isScope:o,content:c})}),r.sort(Jz).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},th=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Gz([t],n.includeContainer,{filter:k1.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:l6}):r=Kz(t,n.includeContainer,k1.bind(null,n)),c6(r)};function $1(e,t,n){let{reference:r,floating:i}=e;const a=As(t),o=qz(t),s=Uz(o),l=Rs(t),c=a==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,d=r[s]/2-i[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Qp(t)){case"start":p[o]-=d*(n&&c?-1:1);break;case"end":p[o]+=d*(n&&c?-1:1);break}return p}const u6=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:f}=$1(c,r,l),d=r,p={},h=0;for(let m=0;m<s.length;m++){const{name:y,fn:v}=s[m],{x:g,y:b,data:k,reset:S}=await v({x:u,y:f,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:c,platform:o,elements:{reference:e,floating:t}});u=g??u,f=b??f,p={...p,[y]:{...p[y],...k}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:u,y:f}=$1(c,d,l)),m=-1)}return{x:u,y:f,placement:d,strategy:i,middlewareData:p}};async function O1(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Fc(t,e),h=Hz(p),y=s[d?f==="floating"?"reference":"floating":f],v=Bc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),k=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Bc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:b,strategy:l}):g);return{top:(v.top-S.top+h.top)/k.y,bottom:(S.bottom-v.bottom+h.bottom)/k.y,left:(v.left-S.left+h.left)/k.x,right:(S.right-v.right+h.right)/k.x}}async function f6(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Rs(n),s=Qp(n),l=As(n)==="y",c=["left","top"].includes(o)?-1:1,u=a&&l?-1:1,f=Fc(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*u,y:d*c}:{x:d*c,y:p*u}}const d6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await f6(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}},p6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x:v,y:g}=y;return{x:v,y:g}}},...l}=Fc(e,t),c={x:n,y:r},u=await O1(t,l),f=As(Rs(i)),d=b1(f);let p=c[d],h=c[f];if(a){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",g=p+u[y],b=p-u[v];p=y1(g,p,b)}if(o){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",g=h+u[y],b=h-u[v];h=y1(g,h,b)}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:a,[f]:o}}}}}},h6=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:l=()=>{},...c}=Fc(e,t),u=await O1(t,c),f=Rs(i),d=Qp(i),p=As(i)==="y",{width:h,height:m}=a.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,y=d==="end"?"top":"bottom");const g=m-u.top-u.bottom,b=h-u.left-u.right,k=Ha(m-u[y],g),S=Ha(h-u[v],b),_=!t.middlewareData.shift;let $=k,j=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=g),_&&!d){const O=$n(u.left,0),N=$n(u.right,0),W=$n(u.top,0),L=$n(u.bottom,0);p?j=h-2*(O!==0||N!==0?O+N:$n(u.left,u.right)):$=m-2*(W!==0||L!==0?W+L:$n(u.top,u.bottom))}await l({...t,availableWidth:j,availableHeight:$});const z=await o.getDimensions(s.floating);return h!==z.width||m!==z.height?{reset:{rects:!0}}:{}}}};function T1(e){const t=Qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=$r(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Mc(n)!==a||Mc(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function nh(e){return Xn(e)?e:e.contextElement}function Va(e){const t=nh(e);if(!$r(t))return Si(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=T1(t);let o=(a?Mc(n.width):n.width)/r,s=(a?Mc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const m6=Si(0);function C1(e){const t=kn(e);return!Jp()||!t.visualViewport?m6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function v6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function ea(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=nh(e);let o=Si(1);t&&(r?Xn(r)&&(o=Va(r)):o=Va(e));const s=v6(a,n,r)?C1(a):Si(0);let l=(i.left+s.x)/o.x,c=(i.top+s.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(a){const d=kn(a),p=r&&Xn(r)?kn(r):r;let h=d,m=Xp(h);for(;m&&r&&p!==h;){const y=Va(m),v=m.getBoundingClientRect(),g=Qn(m),b=v.left+(m.clientLeft+parseFloat(g.paddingLeft))*y.x,k=v.top+(m.clientTop+parseFloat(g.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=b,c+=k,h=kn(m),m=Xp(h)}}return Bc({width:u,height:f,x:l,y:c})}function g6(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=kr(r),s=t?Nc(t.floating):!1;if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Si(1);const u=Si(0),f=$r(r);if((f||!f&&!a)&&((qa(r)!=="body"||Is(o))&&(l=Dc(r)),$r(r))){const d=ea(r);c=Va(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function y6(e){return Array.from(e.getClientRects())}function rh(e,t){const n=Dc(e).scrollLeft;return t?t.left+n:ea(kr(e)).left+n}function b6(e){const t=kr(e),n=Dc(e),r=e.ownerDocument.body,i=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+rh(e);const s=-n.scrollTop;return Qn(r).direction==="rtl"&&(o+=$n(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function x6(e,t){const n=kn(e),r=kr(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;const c=Jp();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s,y:l}}function w6(e,t){const n=ea(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=$r(e)?Va(e):Si(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,c=r*a.y;return{width:o,height:s,x:l,y:c}}function I1(e,t,n){let r;if(t==="viewport")r=x6(e,n);else if(t==="document")r=b6(kr(e));else if(Xn(t))r=w6(t,n);else{const i=C1(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Bc(r)}function R1(e,t){const n=xi(e);return n===t||!Xn(n)||Wa(n)?!1:Qn(n).position==="fixed"||R1(n,t)}function S6(e,t){const n=t.get(e);if(n)return n;let r=wi(e,[],!1).filter(s=>Xn(s)&&qa(s)!=="body"),i=null;const a=Qn(e).position==="fixed";let o=a?xi(e):e;for(;Xn(o)&&!Wa(o);){const s=Qn(o),l=Yp(o);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Is(o)&&!l&&R1(e,o))?r=r.filter(u=>u!==o):i=s,o=xi(o)}return t.set(e,r),r}function E6(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Nc(t)?[]:S6(t,this._c):[].concat(n),r],s=o[0],l=o.reduce((c,u)=>{const f=I1(t,u,i);return c.top=$n(f.top,c.top),c.right=Ha(f.right,c.right),c.bottom=Ha(f.bottom,c.bottom),c.left=$n(f.left,c.left),c},I1(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function _6(e){const{width:t,height:n}=T1(e);return{width:t,height:n}}function k6(e,t,n){const r=$r(t),i=kr(t),a=n==="fixed",o=ea(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Si(0);if(r||!r&&!a)if((qa(t)!=="body"||Is(i))&&(s=Dc(t)),r){const p=ea(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&(l.x=rh(i));let c=0,u=0;if(i&&!r&&!a){const p=i.getBoundingClientRect();u=p.top+s.scrollTop,c=p.left+s.scrollLeft-rh(i,p)}const f=o.left+s.scrollLeft-l.x-c,d=o.top+s.scrollTop-l.y-u;return{x:f,y:d,width:o.width,height:o.height}}function ih(e){return Qn(e).position==="static"}function A1(e,t){if(!$r(e)||Qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return kr(e)===n&&(n=n.ownerDocument.body),n}function P1(e,t){const n=kn(e);if(Nc(e))return n;if(!$r(e)){let i=xi(e);for(;i&&!Wa(i);){if(Xn(i)&&!ih(i))return i;i=xi(i)}return n}let r=A1(e,t);for(;r&&Bz(r)&&ih(r);)r=A1(r,t);return r&&Wa(r)&&ih(r)&&!Yp(r)?n:r||zz(e)||n}const $6=async function(e){const t=this.getOffsetParent||P1,n=this.getDimensions,r=await n(e.floating);return{reference:k6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function O6(e){return Qn(e).direction==="rtl"}const T6={convertOffsetParentRelativeRectToViewportRelativeRect:g6,getDocumentElement:kr,getClippingRect:E6,getOffsetParent:P1,getElementRects:$6,getClientRects:y6,getDimensions:_6,getScale:Va,isElement:Xn,isRTL:O6};function C6(e,t){let n=null,r;const i=kr(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const{left:c,top:u,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p=Lc(u),h=Lc(i.clientWidth-(c+f)),m=Lc(i.clientHeight-(u+d)),y=Lc(c),g={rootMargin:-p+"px "+-h+"px "+-m+"px "+-y+"px",threshold:$n(0,Ha(1,l))||1};let b=!0;function k(S){const _=S[0].intersectionRatio;if(_!==l){if(!b)return o();_?o(!1,_):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(k,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(k,g)}n.observe(e)}return o(!0),a}function I6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=nh(e),u=i||a?[...c?wi(c):[],...wi(t)]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const f=c&&s?C6(c,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(v=>{let[g]=v;g&&g.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let h,m=l?ea(e):null;l&&y();function y(){const v=ea(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,h=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(g=>{i&&g.removeEventListener("scroll",n),a&&g.removeEventListener("resize",n)}),f==null||f(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const R6=d6,A6=p6,P6=h6,j6=(e,t,n)=>{const r=new Map,i={platform:T6,...n},a={...i.platform,_c:r};return u6(e,t,{...i,platform:a})};var qc=typeof document<"u"?D.useLayoutEffect:D.useEffect;function Wc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Wc(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Wc(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function j1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function N1(e,t){const n=j1(e);return Math.round(t*n)/n}function ah(e){const t=w.useRef(e);return qc(()=>{t.current=e}),t}function N6(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,f]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=w.useState(r);Wc(d,r)||p(r);const[h,m]=w.useState(null),[y,v]=w.useState(null),g=w.useCallback(B=>{B!==_.current&&(_.current=B,m(B))},[]),b=w.useCallback(B=>{B!==$.current&&($.current=B,v(B))},[]),k=a||h,S=o||y,_=w.useRef(null),$=w.useRef(null),j=w.useRef(u),z=l!=null,O=ah(l),N=ah(i),W=ah(c),L=w.useCallback(()=>{if(!_.current||!$.current)return;const B={placement:t,strategy:n,middleware:d};N.current&&(B.platform=N.current),j6(_.current,$.current,B).then(A=>{const x={...A,isPositioned:W.current!==!1};U.current&&!Wc(j.current,x)&&(j.current=x,xy.flushSync(()=>{f(x)}))})},[d,t,n,N,W]);qc(()=>{c===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(B=>({...B,isPositioned:!1})))},[c]);const U=w.useRef(!1);qc(()=>(U.current=!0,()=>{U.current=!1}),[]),qc(()=>{if(k&&(_.current=k),S&&($.current=S),k&&S){if(O.current)return O.current(k,S,L);L()}},[k,S,L,O,z]);const M=w.useMemo(()=>({reference:_,floating:$,setReference:g,setFloating:b}),[g,b]),I=w.useMemo(()=>({reference:k,floating:S}),[k,S]),H=w.useMemo(()=>{const B={position:n,left:0,top:0};if(!I.floating)return B;const A=N1(I.floating,u.x),x=N1(I.floating,u.y);return s?{...B,transform:"translate("+A+"px, "+x+"px)",...j1(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:x}},[n,s,I.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:L,refs:M,elements:I,floatingStyles:H}),[u,L,M,I,H])}const D6=(e,t)=>({...R6(e),options:[e,t]}),M6=(e,t)=>({...A6(e),options:[e,t]}),L6=(e,t)=>({...P6(e),options:[e,t]});var Bn=function(){return Bn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Bn.apply(this,arguments)};function D1(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function F6(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function B6(){var e=D.useRef(!1),t=D.useCallback(function(){return e.current},[]);return D.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function z6(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=D.useRef(0),i=B6(),a=D.useState(n),o=a[0],s=a[1],l=D.useCallback(function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var f=++r.current;return o.loading||s(function(d){return Bn(Bn({},d),{loading:!0})}),e.apply(void 0,c).then(function(d){return i()&&f===r.current&&s({value:d,loading:!1}),d},function(d){return i()&&f===r.current&&s({error:d,loading:!1}),d})},t);return[o,l]}function oh(e,t){t===void 0&&(t=[]);var n=z6(e,t,{loading:!0}),r=n[0],i=n[1];return D.useEffect(function(){i()},[i]),r}function U6(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function q6(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var W6=function(e){D.useEffect(e,[])},H6=function(e){var t=D.useRef(e);t.current=e,W6(function(){return function(){return t.current()}})},V6=function(e){var t=D.useRef(0),n=D.useState(e),r=n[0],i=n[1],a=D.useCallback(function(o){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(o)})},[]);return H6(function(){cancelAnimationFrame(t.current)}),[r,a]},Z6=function(e){process.env.NODE_ENV==="development"&&(typeof e!="object"||typeof e.current>"u")&&console.error("`useScroll` expects a single ref argument.");var t=V6({x:0,y:0}),n=t[0],r=t[1];return D.useEffect(function(){var i=function(){e.current&&r({x:e.current.scrollLeft,y:e.current.scrollTop})};return e.current&&U6(e.current,"scroll",i,{capture:!1,passive:!0}),function(){e.current&&q6(e.current,"scroll",i)}},[e]),n};const K6={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},M1=e=>{let t;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(h=>h(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(K6?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,l);return l},L1=e=>e?M1(e):M1;var sh={exports:{}},lh={},Hc={exports:{}},ch={};/**
|
|
247
|
+
*/var Vz=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],eh=Vz.join(","),w1=typeof Element>"u",Ps=w1?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Bc=!w1&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},zc=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=i===""||i==="true",o=a||n&&t&&e(t.parentNode);return o},Zz=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},Kz=function(t,n,r){if(zc(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(eh));return n&&Ps.call(t,eh)&&i.unshift(t),i=i.filter(r),i},Gz=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!zc(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),l=s.length?s:o.children,c=e(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:o,candidates:c})}else{var u=Ps.call(o,eh);u&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var f=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),d=!zc(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(f&&d){var p=e(f===!0?o.children:f.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scopeParent:o,candidates:p})}else a.unshift.apply(a,o.children)}}return i},S1=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},E1=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Zz(t))&&!S1(t)?0:t.tabIndex},Yz=function(t,n){var r=E1(t);return r<0&&n&&!S1(t)?0:r},Jz=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},_1=function(t){return t.tagName==="INPUT"},Xz=function(t){return _1(t)&&t.type==="hidden"},Qz=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},e6=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},t6=function(t){if(!t.name)return!0;var n=t.form||Bc(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var a=e6(i,t.form);return!a||a===t},n6=function(t){return _1(t)&&t.type==="radio"},r6=function(t){return n6(t)&&!t6(t)},i6=function(t){var n,r=t&&Bc(t),i=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var o,s,l;for(a=!!((o=i)!==null&&o!==void 0&&(s=o.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!a&&i;){var c,u,f;r=Bc(i),i=(c=r)===null||c===void 0?void 0:c.host,a=!!((u=i)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(i))}}return a},k1=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},a6=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Ps.call(t,"details>summary:first-of-type"),o=a?t.parentElement:t;if(Ps.call(o,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,c=Bc(t);if(l&&!l.shadowRoot&&i(l)===!0)return k1(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(i6(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return k1(t);return!1},o6=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Ps.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},s6=function(t,n){return!(n.disabled||zc(n)||Xz(n)||a6(n,t)||Qz(n)||o6(n))},$1=function(t,n){return!(r6(n)||E1(n)<0||!s6(t,n))},l6=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},c6=function e(t){var n=[],r=[];return t.forEach(function(i,a){var o=!!i.scopeParent,s=o?i.scopeParent:i,l=Yz(s,o),c=o?e(i.candidates):s;l===0?o?n.push.apply(n,c):n.push(s):r.push({documentOrder:a,tabIndex:l,item:i,isScope:o,content:c})}),r.sort(Jz).reduce(function(i,a){return a.isScope?i.push.apply(i,a.content):i.push(a.content),i},[]).concat(n)},th=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Gz([t],n.includeContainer,{filter:$1.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:l6}):r=Kz(t,n.includeContainer,$1.bind(null,n)),c6(r)};function O1(e,t,n){let{reference:r,floating:i}=e;const a=As(t),o=qz(t),s=Uz(o),l=Rs(t),c=a==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,d=r[s]/2-i[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Qp(t)){case"start":p[o]-=d*(n&&c?-1:1);break;case"end":p[o]+=d*(n&&c?-1:1);break}return p}const u6=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:f}=O1(c,r,l),d=r,p={},h=0;for(let m=0;m<s.length;m++){const{name:y,fn:v}=s[m],{x:g,y:b,data:k,reset:S}=await v({x:u,y:f,initialPlacement:r,placement:d,strategy:i,middlewareData:p,rects:c,platform:o,elements:{reference:e,floating:t}});u=g??u,f=b??f,p={...p,[y]:{...p[y],...k}},S&&h<=50&&(h++,typeof S=="object"&&(S.placement&&(d=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):S.rects),{x:u,y:f}=O1(c,d,l)),m=-1)}return{x:u,y:f,placement:d,strategy:i,middlewareData:p}};async function T1(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=Lc(t,e),h=Hz(p),y=s[d?f==="floating"?"reference":"floating":f],v=Fc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),g=f==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),k=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Fc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:b,strategy:l}):g);return{top:(v.top-S.top+h.top)/k.y,bottom:(S.bottom-v.bottom+h.bottom)/k.y,left:(v.left-S.left+h.left)/k.x,right:(S.right-v.right+h.right)/k.x}}async function f6(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Rs(n),s=Qp(n),l=As(n)==="y",c=["left","top"].includes(o)?-1:1,u=a&&l?-1:1,f=Lc(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*u,y:d*c}:{x:d*c,y:p*u}}const d6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await f6(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}},p6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x:v,y:g}=y;return{x:v,y:g}}},...l}=Lc(e,t),c={x:n,y:r},u=await T1(t,l),f=As(Rs(i)),d=x1(f);let p=c[d],h=c[f];if(a){const y=d==="y"?"top":"left",v=d==="y"?"bottom":"right",g=p+u[y],b=p-u[v];p=b1(g,p,b)}if(o){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",g=h+u[y],b=h-u[v];h=b1(g,h,b)}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:a,[f]:o}}}}}},h6=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:l=()=>{},...c}=Lc(e,t),u=await T1(t,c),f=Rs(i),d=Qp(i),p=As(i)==="y",{width:h,height:m}=a.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=d===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,y=d==="end"?"top":"bottom");const g=m-u.top-u.bottom,b=h-u.left-u.right,k=Ha(m-u[y],g),S=Ha(h-u[v],b),_=!t.middlewareData.shift;let $=k,j=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=g),_&&!d){const O=$n(u.left,0),N=$n(u.right,0),W=$n(u.top,0),L=$n(u.bottom,0);p?j=h-2*(O!==0||N!==0?O+N:$n(u.left,u.right)):$=m-2*(W!==0||L!==0?W+L:$n(u.top,u.bottom))}await l({...t,availableWidth:j,availableHeight:$});const z=await o.getDimensions(s.floating);return h!==z.width||m!==z.height?{reset:{rects:!0}}:{}}}};function C1(e){const t=Qn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=$r(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Dc(n)!==a||Dc(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function nh(e){return Xn(e)?e:e.contextElement}function Va(e){const t=nh(e);if(!$r(t))return Si(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=C1(t);let o=(a?Dc(n.width):n.width)/r,s=(a?Dc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const m6=Si(0);function I1(e){const t=kn(e);return!Jp()||!t.visualViewport?m6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function v6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==kn(e)?!1:t}function ea(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=nh(e);let o=Si(1);t&&(r?Xn(r)&&(o=Va(r)):o=Va(e));const s=v6(a,n,r)?I1(a):Si(0);let l=(i.left+s.x)/o.x,c=(i.top+s.y)/o.y,u=i.width/o.x,f=i.height/o.y;if(a){const d=kn(a),p=r&&Xn(r)?kn(r):r;let h=d,m=Xp(h);for(;m&&r&&p!==h;){const y=Va(m),v=m.getBoundingClientRect(),g=Qn(m),b=v.left+(m.clientLeft+parseFloat(g.paddingLeft))*y.x,k=v.top+(m.clientTop+parseFloat(g.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,f*=y.y,l+=b,c+=k,h=kn(m),m=Xp(h)}}return Fc({width:u,height:f,x:l,y:c})}function g6(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=kr(r),s=t?jc(t.floating):!1;if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Si(1);const u=Si(0),f=$r(r);if((f||!f&&!a)&&((qa(r)!=="body"||Is(o))&&(l=Nc(r)),$r(r))){const d=ea(r);c=Va(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function y6(e){return Array.from(e.getClientRects())}function rh(e,t){const n=Nc(e).scrollLeft;return t?t.left+n:ea(kr(e)).left+n}function b6(e){const t=kr(e),n=Nc(e),r=e.ownerDocument.body,i=$n(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=$n(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+rh(e);const s=-n.scrollTop;return Qn(r).direction==="rtl"&&(o+=$n(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function x6(e,t){const n=kn(e),r=kr(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;const c=Jp();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s,y:l}}function w6(e,t){const n=ea(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=$r(e)?Va(e):Si(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,c=r*a.y;return{width:o,height:s,x:l,y:c}}function R1(e,t,n){let r;if(t==="viewport")r=x6(e,n);else if(t==="document")r=b6(kr(e));else if(Xn(t))r=w6(t,n);else{const i=I1(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Fc(r)}function A1(e,t){const n=xi(e);return n===t||!Xn(n)||Wa(n)?!1:Qn(n).position==="fixed"||A1(n,t)}function S6(e,t){const n=t.get(e);if(n)return n;let r=wi(e,[],!1).filter(s=>Xn(s)&&qa(s)!=="body"),i=null;const a=Qn(e).position==="fixed";let o=a?xi(e):e;for(;Xn(o)&&!Wa(o);){const s=Qn(o),l=Yp(o);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Is(o)&&!l&&A1(e,o))?r=r.filter(u=>u!==o):i=s,o=xi(o)}return t.set(e,r),r}function E6(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?jc(t)?[]:S6(t,this._c):[].concat(n),r],s=o[0],l=o.reduce((c,u)=>{const f=R1(t,u,i);return c.top=$n(f.top,c.top),c.right=Ha(f.right,c.right),c.bottom=Ha(f.bottom,c.bottom),c.left=$n(f.left,c.left),c},R1(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function _6(e){const{width:t,height:n}=C1(e);return{width:t,height:n}}function k6(e,t,n){const r=$r(t),i=kr(t),a=n==="fixed",o=ea(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Si(0);if(r||!r&&!a)if((qa(t)!=="body"||Is(i))&&(s=Nc(t)),r){const p=ea(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else i&&(l.x=rh(i));let c=0,u=0;if(i&&!r&&!a){const p=i.getBoundingClientRect();u=p.top+s.scrollTop,c=p.left+s.scrollLeft-rh(i,p)}const f=o.left+s.scrollLeft-l.x-c,d=o.top+s.scrollTop-l.y-u;return{x:f,y:d,width:o.width,height:o.height}}function ih(e){return Qn(e).position==="static"}function P1(e,t){if(!$r(e)||Qn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return kr(e)===n&&(n=n.ownerDocument.body),n}function j1(e,t){const n=kn(e);if(jc(e))return n;if(!$r(e)){let i=xi(e);for(;i&&!Wa(i);){if(Xn(i)&&!ih(i))return i;i=xi(i)}return n}let r=P1(e,t);for(;r&&Bz(r)&&ih(r);)r=P1(r,t);return r&&Wa(r)&&ih(r)&&!Yp(r)?n:r||zz(e)||n}const $6=async function(e){const t=this.getOffsetParent||j1,n=this.getDimensions,r=await n(e.floating);return{reference:k6(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function O6(e){return Qn(e).direction==="rtl"}const T6={convertOffsetParentRelativeRectToViewportRelativeRect:g6,getDocumentElement:kr,getClippingRect:E6,getOffsetParent:j1,getElementRects:$6,getClientRects:y6,getDimensions:_6,getScale:Va,isElement:Xn,isRTL:O6};function C6(e,t){let n=null,r;const i=kr(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const{left:c,top:u,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p=Mc(u),h=Mc(i.clientWidth-(c+f)),m=Mc(i.clientHeight-(u+d)),y=Mc(c),g={rootMargin:-p+"px "+-h+"px "+-m+"px "+-y+"px",threshold:$n(0,Ha(1,l))||1};let b=!0;function k(S){const _=S[0].intersectionRatio;if(_!==l){if(!b)return o();_?o(!1,_):r=setTimeout(()=>{o(!1,1e-7)},1e3)}b=!1}try{n=new IntersectionObserver(k,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(k,g)}n.observe(e)}return o(!0),a}function I6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=nh(e),u=i||a?[...c?wi(c):[],...wi(t)]:[];u.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const f=c&&s?C6(c,n):null;let d=-1,p=null;o&&(p=new ResizeObserver(v=>{let[g]=v;g&&g.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let h,m=l?ea(e):null;l&&y();function y(){const v=ea(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,h=requestAnimationFrame(y)}return n(),()=>{var v;u.forEach(g=>{i&&g.removeEventListener("scroll",n),a&&g.removeEventListener("resize",n)}),f==null||f(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const R6=d6,A6=p6,P6=h6,j6=(e,t,n)=>{const r=new Map,i={platform:T6,...n},a={...i.platform,_c:r};return u6(e,t,{...i,platform:a})};var Uc=typeof document<"u"?D.useLayoutEffect:D.useEffect;function qc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!qc(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!qc(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function N1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function D1(e,t){const n=N1(e);return Math.round(t*n)/n}function ah(e){const t=w.useRef(e);return Uc(()=>{t.current=e}),t}function N6(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,f]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=w.useState(r);qc(d,r)||p(r);const[h,m]=w.useState(null),[y,v]=w.useState(null),g=w.useCallback(B=>{B!==_.current&&(_.current=B,m(B))},[]),b=w.useCallback(B=>{B!==$.current&&($.current=B,v(B))},[]),k=a||h,S=o||y,_=w.useRef(null),$=w.useRef(null),j=w.useRef(u),z=l!=null,O=ah(l),N=ah(i),W=ah(c),L=w.useCallback(()=>{if(!_.current||!$.current)return;const B={placement:t,strategy:n,middleware:d};N.current&&(B.platform=N.current),j6(_.current,$.current,B).then(A=>{const x={...A,isPositioned:W.current!==!1};U.current&&!qc(j.current,x)&&(j.current=x,xy.flushSync(()=>{f(x)}))})},[d,t,n,N,W]);Uc(()=>{c===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(B=>({...B,isPositioned:!1})))},[c]);const U=w.useRef(!1);Uc(()=>(U.current=!0,()=>{U.current=!1}),[]),Uc(()=>{if(k&&(_.current=k),S&&($.current=S),k&&S){if(O.current)return O.current(k,S,L);L()}},[k,S,L,O,z]);const M=w.useMemo(()=>({reference:_,floating:$,setReference:g,setFloating:b}),[g,b]),I=w.useMemo(()=>({reference:k,floating:S}),[k,S]),H=w.useMemo(()=>{const B={position:n,left:0,top:0};if(!I.floating)return B;const A=D1(I.floating,u.x),x=D1(I.floating,u.y);return s?{...B,transform:"translate("+A+"px, "+x+"px)",...N1(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:x}},[n,s,I.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:L,refs:M,elements:I,floatingStyles:H}),[u,L,M,I,H])}const D6=(e,t)=>({...R6(e),options:[e,t]}),M6=(e,t)=>({...A6(e),options:[e,t]}),L6=(e,t)=>({...P6(e),options:[e,t]});var Bn=function(){return Bn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Bn.apply(this,arguments)};function M1(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function F6(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function B6(){var e=D.useRef(!1),t=D.useCallback(function(){return e.current},[]);return D.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function z6(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=D.useRef(0),i=B6(),a=D.useState(n),o=a[0],s=a[1],l=D.useCallback(function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var f=++r.current;return o.loading||s(function(d){return Bn(Bn({},d),{loading:!0})}),e.apply(void 0,c).then(function(d){return i()&&f===r.current&&s({value:d,loading:!1}),d},function(d){return i()&&f===r.current&&s({error:d,loading:!1}),d})},t);return[o,l]}function oh(e,t){t===void 0&&(t=[]);var n=z6(e,t,{loading:!0}),r=n[0],i=n[1];return D.useEffect(function(){i()},[i]),r}function U6(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function q6(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var W6=function(e){D.useEffect(e,[])},H6=function(e){var t=D.useRef(e);t.current=e,W6(function(){return function(){return t.current()}})},V6=function(e){var t=D.useRef(0),n=D.useState(e),r=n[0],i=n[1],a=D.useCallback(function(o){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(o)})},[]);return H6(function(){cancelAnimationFrame(t.current)}),[r,a]},Z6=function(e){process.env.NODE_ENV==="development"&&(typeof e!="object"||typeof e.current>"u")&&console.error("`useScroll` expects a single ref argument.");var t=V6({x:0,y:0}),n=t[0],r=t[1];return D.useEffect(function(){var i=function(){e.current&&r({x:e.current.scrollLeft,y:e.current.scrollTop})};return e.current&&U6(e.current,"scroll",i,{capture:!1,passive:!0}),function(){e.current&&q6(e.current,"scroll",i)}},[e]),n};const K6={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},L1=e=>{let t;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(h=>h(t,p))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(K6?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,l);return l},F1=e=>e?L1(e):L1;var sh={exports:{}},lh={},Wc={exports:{}},ch={};/**
|
|
248
248
|
* @license React
|
|
249
249
|
* use-sync-external-store-shim.production.min.js
|
|
250
250
|
*
|
|
@@ -252,7 +252,7 @@ to {
|
|
|
252
252
|
*
|
|
253
253
|
* This source code is licensed under the MIT license found in the
|
|
254
254
|
* LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/var
|
|
255
|
+
*/var B1;function G6(){if(B1)return ch;B1=1;var e=D;function t(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function s(f,d){var p=d(),h=r({inst:{value:p,getSnapshot:d}}),m=h[0].inst,y=h[1];return a(function(){m.value=p,m.getSnapshot=d,l(m)&&y({inst:m})},[f,p,d]),i(function(){return l(m)&&y({inst:m}),f(function(){l(m)&&y({inst:m})})},[f]),o(p),p}function l(f){var d=f.getSnapshot;f=f.value;try{var p=d();return!n(f,p)}catch{return!0}}function c(f,d){return d()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return ch.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,ch}var uh={};/**
|
|
256
256
|
* @license React
|
|
257
257
|
* use-sync-external-store-shim.development.js
|
|
258
258
|
*
|
|
@@ -260,7 +260,7 @@ to {
|
|
|
260
260
|
*
|
|
261
261
|
* This source code is licensed under the MIT license found in the
|
|
262
262
|
* LICENSE file in the root directory of this source tree.
|
|
263
|
-
*/var
|
|
263
|
+
*/var z1;function Y6(){return z1||(z1=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=D,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(b){{for(var k=arguments.length,S=new Array(k>1?k-1:0),_=1;_<k;_++)S[_-1]=arguments[_];r("error",b,S)}}function r(b,k,S){{var _=t.ReactDebugCurrentFrame,$=_.getStackAddendum();$!==""&&(k+="%s",S=S.concat([$]));var j=S.map(function(z){return String(z)});j.unshift("Warning: "+k),Function.prototype.apply.call(console[b],console,j)}}function i(b,k){return b===k&&(b!==0||1/b===1/k)||b!==b&&k!==k}var a=typeof Object.is=="function"?Object.is:i,o=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,f=!1;function d(b,k,S){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var _=k();if(!f){var $=k();a(_,$)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var j=o({inst:{value:_,getSnapshot:k}}),z=j[0].inst,O=j[1];return l(function(){z.value=_,z.getSnapshot=k,p(z)&&O({inst:z})},[b,_,k]),s(function(){p(z)&&O({inst:z});var N=function(){p(z)&&O({inst:z})};return b(N)},[b]),c(_),_}function p(b){var k=b.getSnapshot,S=b.value;try{var _=k();return!a(S,_)}catch{return!0}}function h(b,k,S){return k()}var m=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!m,v=y?h:d,g=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v;uh.useSyncExternalStore=g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),uh}var U1;function q1(){return U1||(U1=1,process.env.NODE_ENV==="production"?Wc.exports=G6():Wc.exports=Y6()),Wc.exports}/**
|
|
264
264
|
* @license React
|
|
265
265
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
266
266
|
*
|
|
@@ -268,7 +268,7 @@ to {
|
|
|
268
268
|
*
|
|
269
269
|
* This source code is licensed under the MIT license found in the
|
|
270
270
|
* LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/var
|
|
271
|
+
*/var W1;function J6(){if(W1)return lh;W1=1;var e=D,t=q1();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,l=e.useDebugValue;return lh.useSyncExternalStoreWithSelector=function(c,u,f,d,p){var h=a(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=s(function(){function v(_){if(!g){if(g=!0,b=_,_=d(_),p!==void 0&&m.hasValue){var $=m.value;if(p($,_))return k=$}return k=_}if($=k,r(b,_))return $;var j=d(_);return p!==void 0&&p($,j)?$:(b=_,k=j)}var g=!1,b,k,S=f===void 0?null:f;return[function(){return v(u())},S===null?void 0:function(){return v(S())}]},[u,f,d,p]);var y=i(c,h[0],h[1]);return o(function(){m.hasValue=!0,m.value=y},[y]),l(y),y},lh}var fh={};/**
|
|
272
272
|
* @license React
|
|
273
273
|
* use-sync-external-store-shim/with-selector.development.js
|
|
274
274
|
*
|
|
@@ -276,12 +276,12 @@ to {
|
|
|
276
276
|
*
|
|
277
277
|
* This source code is licensed under the MIT license found in the
|
|
278
278
|
* LICENSE file in the root directory of this source tree.
|
|
279
|
-
*/var
|
|
279
|
+
*/var H1;function X6(){return H1||(H1=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=D,t=q1();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(u,f,d,p,h){var m=a(null),y;m.current===null?(y={hasValue:!1,value:null},m.current=y):y=m.current;var v=s(function(){var S=!1,_,$,j=function(W){if(!S){S=!0,_=W;var L=p(W);if(h!==void 0&&y.hasValue){var U=y.value;if(h(U,L))return $=U,U}return $=L,L}var M=_,I=$;if(r(M,W))return I;var H=p(W);return h!==void 0&&h(I,H)?I:(_=W,$=H,H)},z=d===void 0?null:d,O=function(){return j(f())},N=z===null?void 0:function(){return j(z())};return[O,N]},[f,d,p,h]),g=v[0],b=v[1],k=i(u,g,b);return o(function(){y.hasValue=!0,y.value=k},[k]),l(k),k}fh.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),fh}process.env.NODE_ENV==="production"?sh.exports=J6():sh.exports=X6();var Q6=sh.exports;const eU=Ze(Q6),V1={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:tU}=D,{useSyncExternalStoreWithSelector:nU}=eU;let Z1=!1;const rU=e=>e;function K1(e,t=rU,n){(V1?"production":void 0)!=="production"&&n&&!Z1&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Z1=!0);const r=nU(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return tU(r),r}const iU=e=>{(V1?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?F1(e):e,n=(r,i)=>K1(t,r,i);return Object.assign(n,t),n},aU=e=>iU,Hc={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},dh=new Map,Vc=e=>{const t=dh.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},oU=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=dh.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return dh.set(n.name,i),{type:"tracked",store:e,...i}},G1=(e,t={})=>(n,r,i)=>{const{enabled:a,anonymousActionType:o,store:s,...l}=t;let c;try{c=(a??(Hc?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return(Hc?"production":void 0)!=="production"&&a&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const{connection:u,...f}=oU(s,c,l);let d=!0;i.setState=(m,y,v)=>{const g=n(m,y);if(!d)return g;const b=v===void 0?{type:o||"anonymous"}:typeof v=="string"?{type:v}:v;return s===void 0?(u==null||u.send(b,r()),g):(u==null||u.send({...b,type:`${s}/${b.type}`},{...Vc(l.name),[s]:i.getState()}),g)};const p=(...m)=>{const y=d;d=!1,n(...m),d=y},h=e(i.setState,r,i);if(f.type==="untracked"?u==null||u.init(h):(f.stores[f.store]=i,u==null||u.init(Object.fromEntries(Object.entries(f.stores).map(([m,y])=>[m,m===f.store?h:y.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let m=!1;const y=i.dispatch;i.dispatch=(...v)=>{(Hc?"production":void 0)!=="production"&&v[0].type==="__setState"&&!m&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),m=!0),y(...v)}}return u.subscribe(m=>{var y;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return ph(m.payload,v=>{if(v.type==="__setState"){if(s===void 0){p(v.state);return}Object.keys(v.state).length!==1&&console.error(`
|
|
280
280
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
281
281
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
282
282
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
283
|
-
`);const g=v.state[s];if(g==null)return;JSON.stringify(i.getState())!==JSON.stringify(g)&&p(g);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(v)});case"DISPATCH":switch(m.payload.type){case"RESET":return p(h),s===void 0?u==null?void 0:u.init(i.getState()):u==null?void 0:u.init(Zc(l.name));case"COMMIT":if(s===void 0){u==null||u.init(i.getState());return}return u==null?void 0:u.init(Zc(l.name));case"ROLLBACK":return ph(m.state,v=>{if(s===void 0){p(v),u==null||u.init(i.getState());return}p(v[s]),u==null||u.init(Zc(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ph(m.state,v=>{if(s===void 0){p(v);return}JSON.stringify(i.getState())!==JSON.stringify(v[s])&&p(v[s])});case"IMPORT_STATE":{const{nextLiftedState:v}=m.payload,g=(y=v.computedStates.slice(-1)[0])==null?void 0:y.state;if(!g)return;p(s===void 0?g:g[s]),u==null||u.send(null,v);return}case"PAUSE_RECORDING":return d=!d}return}}),h},ph=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function sU(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var a;const o=l=>l===null?null:JSON.parse(l,void 0),s=(a=n.getItem(i))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(i,a)=>n.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>n.removeItem(i)}}const js=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return js(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return js(r)(n)}}}},lU=(e,t)=>(n,r,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...t},o=!1;const s=new Set,l=new Set;let c;try{c=a.getStorage()}catch{}if(!c)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...y)},r,i);const u=js(a.serialize),f=()=>{const y=a.partialize({...r()});let v;const g=u({state:y,version:a.version}).then(b=>c.setItem(a.name,b)).catch(b=>{v=b});if(v)throw v;return g},d=i.setState;i.setState=(y,v)=>{d(y,v),f()};const p=e((...y)=>{n(...y),f()},r,i);let h;const m=()=>{var y;if(!c)return;o=!1,s.forEach(g=>g(r()));const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,r()))||void 0;return js(c.getItem.bind(c))(a.name).then(g=>{if(g)return a.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==a.version){if(a.migrate)return a.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return h=a.merge(g,(b=r())!=null?b:p),n(h,!0),f()}).then(()=>{v==null||v(h,void 0),o=!0,l.forEach(g=>g(h))}).catch(g=>{v==null||v(void 0,g)})};return i.persist={setOptions:y=>{a={...a,...y},y.getStorage&&(c=y.getStorage())},clearStorage:()=>{c==null||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},m(),h||p},cU=(e,t)=>(n,r,i)=>{let a={storage:sU(()=>localStorage),partialize:m=>m,version:0,merge:(m,y)=>({...y,...m}),...t},o=!1;const s=new Set,l=new Set;let c=a.storage;if(!c)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...m)},r,i);const u=()=>{const m=a.partialize({...r()});return c.setItem(a.name,{state:m,version:a.version})},f=i.setState;i.setState=(m,y)=>{f(m,y),u()};const d=e((...m)=>{n(...m),u()},r,i);i.getInitialState=()=>d;let p;const h=()=>{var m,y;if(!c)return;o=!1,s.forEach(g=>{var b;return g((b=r())!=null?b:d)});const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,(m=r())!=null?m:d))||void 0;return js(c.getItem.bind(c))(a.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==a.version){if(a.migrate)return[!0,a.migrate(g.state,g.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,g.state];return[!1,void 0]}).then(g=>{var b;const[k,S]=g;if(p=a.merge(S,(b=r())!=null?b:d),n(p,!0),k)return u()}).then(()=>{v==null||v(p,void 0),p=r(),o=!0,l.forEach(g=>g(p))}).catch(g=>{v==null||v(void 0,g)})};return i.persist={setOptions:m=>{a={...a,...m},m.storage&&(c=m.storage)},clearStorage:()=>{c==null||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(l.add(m),()=>{l.delete(m)})},a.skipHydration||h(),p||d},uU=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Vc?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),lU(e,t)):cU(e,t),On=aU()(K1(uU((e,t)=>({messageHistory:{},addMessageToHistory:({userId:n,message:r})=>e(i=>({...i,messageHistory:{...i.messageHistory,[n]:[r,...(i.messageHistory[n]??[]).slice(0,100)]}})),clientMode:"",setClientMode:n=>{const{clearAll:r,clientMode:i}=t();i!==n&&r(),e(a=>({...a,clientMode:n}))},setUser:n=>e(r=>({...r,user:n})),setConversationId:n=>e(r=>({...r,conversationId:n})),clearAll:()=>{e(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),G1=D.createContext(null),fU=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:void 0,messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},n=e==null?void 0:e.client,r=e==null?void 0:e.conversationId,i=On.getState().setClientMode,a=On.getState().setConversationId;return n&&i(n.mode),D.useEffect(()=>{r&&a(r)},[r]),L1()(K1((o,s)=>{const l=f=>{const d=On.getState().conversationId;if(d)return o(p=>{const h=p.messages[d]??[];return{...p,messages:{...p.messages,[d]:[...h.filter(m=>m.id!==f.id),{id:ko(),...f}]}}})},c=f=>{const d=On.getState().conversationId;if(d)return o(p=>({...p,messages:{...p.messages,[d]:f}}))},u=On.getState().addMessageToHistory;return{...t,...e,eventEmitter:BR,client:n,sendFile:f=>s().client.sendFile(f),sendTextMessage:async f=>{const d=s().client;l({id:ko(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:f}}}),d&&await d.sendMessage({type:"text",text:f}),d!=null&&d.userId&&u({message:f,userId:d.userId})},sendMessage:async f=>{const d=s().client;l({id:ko(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:Oo(f).payload}),d&&await d.sendMessage(f),d!=null&&d.userId&&f.type==="text"&&u({message:f.text,userId:d.userId})},on:(f,d)=>{const p=s().client;return p?p.on(f,d):()=>{}},getClientId:()=>{var f;return(f=s().client)==null?void 0:f.clientId},setHeaderMessage:f=>o({headerMessage:f}),setDisableComposer:f=>o({disableComposer:f}),setState:f=>o(d=>({...d,...f})),setMessages:c,getMessages:()=>s().messages[On.getState().conversationId??""]??[],setIsTyping:(f,d)=>{o(p=>({...p,isTyping:f})),f&&(o(p=>({...p,lastTypingHeartbeat:new Date})),d&&setTimeout(()=>{const p=s().lastTypingHeartbeat;p&&new Date().getTime()-p.getTime()>d&&o(h=>({...h,isTyping:!1}))},d+100))},setLastTypingHeartbeat:f=>o(d=>({...d,lastTypingHeartbeat:f})),addMessage:l,setConnected:f=>o(d=>({...d,connected:f})),restartConversation:async()=>{const f=s().client,d=s().setMessages;f&&(await f.newConversation(),d([]))}}},{name:"webchatStore"}))};function Me(e){const t=D.useContext(G1);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return Z1(t,e)}const dU=({text:e,buttonValue:t,type:n,variant:r,groupId:i,reusable:a,...o})=>{const s=Me(g=>g.eventEmitter),l=Me(g=>g.sendTextMessage),c=Me(g=>g.isReadOnly),[u,f]=D.useState(!1),[d,p]=D.useState(!1),[h,m]=D.useState(!1),{message:{blocks:{button:y}}}=yt;D.useEffect(()=>{if(i)return s.on(`button-group-${i}-click`,()=>{p(!0),a||m(!0)})},[s,i,a]);function v(){i&&s.emit(`button-group-${i}-click`),f(!0),a||m(!0),r!=="link"&&l(t)}return C.jsx(pU,{...o,variant:r,onClick:v,disabled:h||c,"data-activated":u?"":void 0,"data-group-activated":d?"":void 0,"data-type":r,value:t,...y,children:e})},pU=e=>{if(e.variant==="link"){const{value:r,variant:i,...a}=e;return C.jsx("a",{...a,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return C.jsx("button",{type:"button",...n})},hU=D.forwardRef(({block:e,type:t,direction:n,timestamp:r,sender:i,metadata:a,...o},s)=>{const{message:{blocks:{bubble:l}}}=yt;return C.jsx("div",{...o,...l,ref:s,children:C.jsx(Xa,{direction:n,timestamp:r,sender:i,block:e,metadata:a})})}),Y1=D.createContext(null);function mU(){const e=D.useContext(Y1);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const J1=D.createContext(null);function X1(){const e=D.useContext(J1);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const Q1=D.createContext(null);function eS(){const e=D.useContext(Q1);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const vU=D.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const a=D.useId(),{setIsLoading:o}=mU(),[s,l]=D.useState(n),[c,u]=D.useState(!1),{message:{blocks:{image:f}}}=yt;return D.useLayoutEffect(()=>{o(d=>[...d,a])},[]),oh(async()=>{if(e&&s==="auto"){try{const{width:d,height:p}=await G4(e);l(gU(d,p))}catch(d){l("square"),console.error(d)}o(d=>d.filter(p=>p!==a))}},[e]),C.jsxs(C.Fragment,{children:[c?null:C.jsx("div",{"data-orientation":s,...f.placeholder}),C.jsx("img",{"data-orientation":s,"data-loaded":c,...r,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{u(!0)}})]})});function gU(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((a,o)=>Math.abs(n[o]-r)<Math.abs(n[a]-r)?o:a)}const yU=D.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{video:i}}}=yt;return C.jsx("div",{children:C.jsx("video",{...n,controls:!0,src:e,...i,ref:r})})}),bU=D.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{audio:i}}}=yt;return C.jsx("div",{children:C.jsx("audio",{...n,controls:!0,src:e,...i,ref:r})})});function xU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const wU=w.forwardRef(xU);function SU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const EU=w.forwardRef(SU);function _U({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const kU=w.forwardRef(_U);function $U({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const OU=w.forwardRef($U);function TU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const CU=w.forwardRef(TU),IU=D.forwardRef(({type:e,latitude:t,longitude:n,title:r,...i},a)=>{const o=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=yt;return C.jsxs("a",{...i,...s.container,href:o,type:"_blank",rel:"noopener",ref:a,children:[C.jsx("p",{...s.title,children:r}),C.jsx(CU,{...s.icon})]})}),RU=D.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,direction:i,sender:a,timestamp:o,metadata:s,...l},c)=>{const{message:{blocks:{column:u}}}=yt;return C.jsx("div",{"data-horizontal":n,"data-vertical":r,...l,...u,ref:c,children:e.map((f,d)=>C.jsx(Xa,{block:f,direction:i,sender:a,timestamp:o,metadata:s},d))})}),AU=D.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,direction:i,sender:a,timestamp:o,metadata:s,...l},c)=>{const{message:{blocks:{row:u}}}=yt;return C.jsx("div",{"data-horizontal":n,"data-vertical":r,...l,...u,ref:c,children:e.map((f,d)=>C.jsx(Xa,{block:f,direction:i,sender:a,timestamp:o,metadata:s},d))})});function PU(e){return Object.prototype.toString.call(e)==="[object Object]"}function tS(e){return PU(e)||Array.isArray(e)}function jU(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function hh(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:n.every(o=>{const s=e[o],l=t[o];return typeof s=="function"?`${s}`==`${l}`:!tS(s)||!tS(l)?s===l:hh(s,l)})}function nS(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function NU(e,t){if(e.length!==t.length)return!1;const n=nS(e),r=nS(t);return n.every((i,a)=>{const o=r[a];return hh(i,o)})}function mh(e){return typeof e=="number"}function rS(e){return typeof e=="string"}function vh(e){return typeof e=="boolean"}function iS(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ot(e){return Math.abs(e)}function gh(e){return Math.sign(e)}function Kc(e,t){return Ot(e-t)}function DU(e,t){if(e===0||t===0||Ot(e)<=Ot(t))return 0;const n=Kc(Ot(e),Ot(t));return Ot(n/e)}function Ns(e){return Yc(e).map(Number)}function Vr(e){return e[Gc(e)]}function Gc(e){return Math.max(0,e.length-1)}function Yc(e){return Object.keys(e)}function aS(e,t){return[e,t].reduce((n,r)=>(Yc(r).forEach(i=>{const a=n[i],o=r[i],s=iS(a)&&iS(o);n[i]=s?aS(a,o):o}),n),{})}function oS(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function MU(e,t){const n={start:r,center:i,end:a};function r(){return 0}function i(c){return a(c)/2}function a(c){return t-c}function o(){return t*Number(e)}function s(c){return mh(e)?o():n[e](c)}return{measure:s}}function LU(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),a=l();function o(u){const{width:f,height:d}=u;return n==="x"?f:d}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:a,measureSize:o}}function Ei(e,t){const n=Ot(e-t);function r(c){return c<e}function i(c){return c>t}function a(c){return r(c)||i(c)}function o(c){return a(c)?r(c)?e:t:c}function s(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function sS(e,t,n){const{constrain:r}=Ei(0,e),i=e+1;let a=o(t);function o(d){return n?Ot((i+d)%i):r(d)}function s(){return a}function l(d){return a=o(d),f}function c(d){return u().set(s()+d)}function u(){return sS(e,s(),n)}const f={get:s,set:l,add:c,clone:u};return f}function FU(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function Ds(){let e=[];function t(i,a,o,s={passive:!0}){return i.addEventListener(a,o,s),e.push(()=>i.removeEventListener(a,o,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function BU(e,t,n,r,i,a,o,s,l,c,u,f,d,p,h,m,y,v,g){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},_=Ds(),$=Ds(),j=Ei(50,225).constrain(h.measure(20)),z={mouse:300,touch:400},O={mouse:500,touch:600},N=m?43:25;let W=!1,L=0,U=0,M=!1,I=!1,H=!1,B=!1;function A(X,Z){if(!Z)return;function de(Ce){(vh(Z)||Z(X,Ce))&&oe(Ce)}const ve=n;_.add(ve,"dragstart",Ce=>Ce.preventDefault(),S).add(ve,"touchmove",()=>{},S).add(ve,"touchend",()=>{}).add(ve,"touchstart",de).add(ve,"mousedown",de).add(ve,"touchcancel",le).add(ve,"contextmenu",le).add(ve,"click",pe,!0)}function x(){_.clear(),$.clear()}function q(){const X=B?r:n;$.add(X,"touchmove",ne,S).add(X,"touchend",le).add(X,"mousemove",ne,S).add(X,"mouseup",le)}function K(X){const Z=X.nodeName||"";return k.includes(Z)}function E(){return(m?O:z)[B?"mouse":"touch"]}function Q(X,Z){const de=d.add(gh(X)*-1),ve=f.byDistance(X,!m).distance;return m||Ot(X)<j?ve:v&&Z?ve*.5:f.byIndex(de.get(),0).distance}function oe(X){const Z=oS(X,i);B=Z,!(Z&&X.button!==0)&&(K(X.target)||(H=m&&Z&&!X.buttons&&W,W=Kc(a.get(),s.get())>=2,M=!0,o.pointerDown(X),u.useFriction(0).useDuration(0),a.set(s),q(),L=o.readPoint(X),U=o.readPoint(X,b),p.emit("pointerDown")))}function ne(X){const Z=o.readPoint(X),de=o.readPoint(X,b),ve=Kc(Z,L),Ce=Kc(de,U);if(!I&&!B&&(!X.cancelable||(I=ve>Ce,!I)))return le(X);const R=o.pointerMove(X);ve>y&&(H=!0),u.useFriction(.3).useDuration(1),l.start(),a.add(t.apply(R)),X.preventDefault()}function le(X){const de=f.byDistance(0,!1).index!==d.get(),ve=o.pointerUp(X)*E(),Ce=Q(t.apply(ve),de),R=DU(ve,Ce),Y=N-10*R,ae=g+R/50;I=!1,M=!1,$.clear(),u.useDuration(Y).useFriction(ae),c.distance(Ce,!m),B=!1,p.emit("pointerUp")}function pe(X){H&&(X.stopPropagation(),X.preventDefault())}function he(){return M}return{init:A,pointerDown:he,destroy:x}}function zU(e,t){let r,i;function a(f){return f.timeStamp}function o(f,d){const h=`client${(d||e.scroll)==="x"?"X":"Y"}`;return(oS(f,t)?f:f.touches[0])[h]}function s(f){return r=f,i=f,o(f)}function l(f){const d=o(f)-o(i),p=a(f)-a(r)>170;return i=f,p&&(r=f),d}function c(f){if(!r||!i)return 0;const d=o(i)-o(r),p=a(f)-a(r),h=a(f)-a(i)>170,m=d/p;return p&&!h&&Ot(m)>.1?m:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:o}}function UU(e){function t(r){return e*(r/100)}return{measure:t}}function qU(e,t,n,r,i){let a,o,s=[],l=!1;function c(p){return i.measureSize(p.getBoundingClientRect())}function u(p,h){if(!h)return;o=c(e),s=r.map(c);function m(v){for(const g of v){const b=g.target===e,k=r.indexOf(g.target),S=b?o:s[k],_=c(b?e:r[k]);if(S!==_){n.requestAnimationFrame(()=>{p.reInit(),t.emit("resize")});break}}}a=new ResizeObserver(v=>{l||(vh(h)||h(p,v))&&m(v)}),[e].concat(r).forEach(v=>a.observe(v))}function f(){a&&a.disconnect(),l=!0}return{init:u,destroy:f}}function WU(e,t,n,r){let i=!0,a=0,o=0,s=n,l=r,c=e.get(),u=0;function f(){const S=t.get()-e.get(),_=!s;let $=0;return _?(a=0,e.set(t),$=S):(a+=S/s,a*=l,c+=a,e.add(a),$=c-u),o=gh($),u=c,i=Ot(S)<.001,k}function d(){return i}function p(){return s}function h(){return o}function m(){return a}function y(){return g(n)}function v(){return b(r)}function g(S){return s=S,k}function b(S){return l=S,k}const k={direction:h,duration:p,velocity:m,seek:f,settled:d,useBaseFriction:v,useBaseDuration:y,useFriction:b,useDuration:g};return k}function HU(e,t,n,r,i){const a=i.measure(10),o=i.measure(50),s=Ei(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(p){if(!c())return;const h=e.reachedMin(t.get())?"min":"max",m=Ot(e[h]-t.get()),y=n.get()-t.get(),v=s.constrain(m/o);n.subtract(y*v),!p&&Ot(y)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(p){l=!p}return{constrain:u,toggleActive:f}}function VU(e,t,n,r){const i=Ei(-t+e,n[0]),a=l(),o=c();function s(){const f=a[0],d=Vr(a),p=a.lastIndexOf(f),h=a.indexOf(d)+1;return Ei(p,h)}function l(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function c(){if(t<=e)return[i.max];if(r==="keepSnaps")return a;const{min:f,max:d}=s();return a.slice(f,d)}return{snapsContained:o}}function ZU(e,t,n){const r=t[0],i=n?r-e:Vr(t);return{limit:Ei(i,r)}}function KU(e,t,n,r){const a=t.min+.1,o=t.max+.1,{reachedMin:s,reachedMax:l}=Ei(a,o);function c(d){return d===1?l(n.get()):d===-1?s(n.get()):!1}function u(d){if(!c(d))return;const p=e*(d*-1);r.forEach(h=>h.add(p))}return{loop:u}}function GU(e){const{max:t,length:n}=e;function r(a){return(a-t)/-n}return{get:r}}function YU(e,t,n,r,i,a,o){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=a,u=p().map(t.measure),f=h(),d=m();function p(){return c(r).map(v=>Vr(v)[l]-v[0][s]).map(Ot)}function h(){return r.map(v=>n[s]-v[s]).map(v=>-Ot(v))}function m(){const g=Vr(f)-Vr(i);return c(f).map(b=>b[0]).map((b,k,S)=>{const _=!k,$=k===Gc(S);return o&&_?0:o&&$?g:b+u[k]})}return{snaps:f,snapsAligned:d}}function JU(e,t,n,r,i){const{reachedAny:a,removeOffset:o,constrain:s}=r;function l(h){return h.concat().sort((m,y)=>Ot(m)-Ot(y))[0]}function c(h){const m=e?o(h):s(h),y=t.map(g=>g-m).map(g=>u(g,0)).map((g,b)=>({diff:g,index:b})).sort((g,b)=>Ot(g.diff)-Ot(b.diff)),{index:v}=y[0];return{index:v,distance:m}}function u(h,m){const y=[h,h+n,h-n];if(!e)return y[0];if(!m)return l(y);const v=y.filter(g=>gh(g)===m);return l(v)}function f(h,m){const y=t[h]-i.get(),v=u(y,m);return{index:h,distance:v}}function d(h,m){const y=i.get()+h,{index:v,distance:g}=c(y),b=!e&&a(y);if(!m||b)return{index:v,distance:h};const k=t[v]-g,S=h+u(k,0);return{index:v,distance:S}}return{byDistance:d,byIndex:f,shortcut:u}}function XU(e,t,n,r,i,a,o){function s(f){const d=f.distance,p=f.index!==t.get();a.add(d),d&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(n.set(t.get()),t.set(f.index),o.emit("select"))}function l(f,d){const p=r.byDistance(f,d);s(p)}function c(f,d){const p=t.clone().set(f),h=r.byIndex(p.get(),d);s(h)}return{distance:l,index:c}}function Jc(e){let t=e;function n(){return t}function r(l){t=o(l)}function i(l){t+=o(l)}function a(l){t-=o(l)}function o(l){return mh(l)?l:l.get()}return{get:n,set:r,add:i,subtract:a}}function lS(e,t,n){const r=e.scroll==="x"?o:s,i=n.style;let a=!1;function o(d){return`translate3d(${d}px,0px,0px)`}function s(d){return`translate3d(0px,${d}px,0px)`}function l(d){a||(i.transform=r(t.apply(d)))}function c(d){a=!d}function u(){a||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:l,toggleActive:c}}function QU(e,t,n,r,i,a,o,s,l){const c=Ns(i),u=Ns(i).reverse(),f=m().concat(y());function d(S,_){return S.reduce(($,j)=>$-i[j],_)}function p(S,_){return S.reduce(($,j)=>d($,_)>0?$.concat([j]):$,[])}function h(S,_){const $=_==="start",j=$?-r:r,z=o.findSlideBounds([j]);return S.map(O=>{const N=$?0:-r,W=$?r:0,U=z.filter(M=>M.index===O)[0][$?"end":"start"];return{index:O,slideLocation:Jc(-1),translate:lS(e,t,l[O]),target:()=>s.get()>U?N:W}})}function m(){const S=a[0]-1,_=p(u,S);return h(_,"end")}function y(){const S=n-a[0]-1,_=p(c,S);return h(_,"start")}function v(){return f.every(({index:S})=>{const _=c.filter($=>$!==S);return d(_,n)<=.1})}function g(){f.forEach(S=>{const{target:_,translate:$,slideLocation:j}=S,z=_();z!==j.get()&&($.to(z),j.set(z))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:v,clear:b,loop:g,loopPoints:f}}function e7(e,t){let n,r=!1;function i(s,l){if(!l)return;function c(u){for(const f of u)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(vh(l)||l(s,u))&&c(u)}),n.observe(e,{childList:!0})}function a(){n&&n.disconnect(),r=!0}return{init:i,destroy:a}}function t7(e,t,n,r,i,a,o){const{removeOffset:s,constrain:l}=i,c=.5,u=a?[0,t,-t]:[0],f=p(u,o);function d(y){const v=y||0;return n.map(g=>Ei(c,g-c).constrain(g*v))}function p(y,v){const g=y||u,b=d(v);return g.reduce((k,S)=>{const _=r.map(($,j)=>({start:$-n[j]+b[j]+S,end:$+e-b[j]+S,index:j}));return k.concat(_)},[])}function h(y,v){const g=a?s(y):l(y);return(v||f).reduce((k,S)=>{const{index:_,start:$,end:j}=S,z=k.includes(_),O=$<g&&j>g;return!z&&O?k.concat([_]):k},[])}return{check:h,findSlideBounds:p}}function n7(e,t,n,r,i,a){const{measureSize:o,startEdge:s,endEdge:l}=e,c=n[0]&&i,u=h(),f=m(),d=n.map(o),p=y();function h(){if(!c)return 0;const g=n[0];return Ot(t[s]-g[s])}function m(){if(!c)return 0;const g=a.getComputedStyle(Vr(r));return parseFloat(g.getPropertyValue(`margin-${l}`))}function y(){return n.map((g,b,k)=>{const S=!b,_=b===Gc(k);return S?d[b]+u:_?d[b]+f:k[b+1][s]-g[s]}).map(Ot)}return{slideSizes:d,slideSizesWithGaps:p}}function r7(e,t,n){const r=mh(n);function i(l,c){return Ns(l).filter(u=>u%c===0).map(u=>l.slice(u,u+c))}function a(l){return Ns(l).reduce((c,u)=>{const d=t.slice(Vr(c),u+1).reduce((p,h)=>p+h,0);return!u||d>e?c.concat(u):c},[]).map((c,u,f)=>l.slice(c,f[u+1]))}function o(l){return r?i(l,n):a(l)}return{groupSlides:o}}function i7(e,t,n,r,i,a,o,s){const{align:l,axis:c,direction:u,startIndex:f,inViewThreshold:d,loop:p,duration:h,dragFree:m,dragThreshold:y,slidesToScroll:v,skipSnaps:g,containScroll:b}=a,k=t.getBoundingClientRect(),S=n.map(ae=>ae.getBoundingClientRect()),_=FU(u),$=LU(c,u),j=$.measureSize(k),z=UU(j),O=MU(l,j),N=!p&&!!b,W=p||!!b,{slideSizes:L,slideSizesWithGaps:U}=n7($,k,S,n,W,i),M=r7(j,U,v),{snaps:I,snapsAligned:H}=YU($,O,k,S,U,M,N),B=-Vr(I)+Vr(U),{snapsContained:A}=VU(j,B,H,b),x=N?A:H,{limit:q}=ZU(B,x,p),K=sS(Gc(x),f,p),E=K.clone(),Q=Ns(n),oe=({dragHandler:ae,scrollBody:ee,scrollBounds:ke,eventHandler:we,animation:Re,options:{loop:Ve}})=>{const Ae=ae.pointerDown();Ve||ke.constrain(Ae);const Be=ee.seek().settled();Be&&!Ae&&(Re.stop(),we.emit("settle")),Be||we.emit("scroll")},ne=({scrollBody:ae,translate:ee,location:ke,offsetLocation:we,scrollLooper:Re,slideLooper:Ve,options:{loop:Ae}},Be)=>{const F=ae.velocity();we.set(ke.get()-F+F*Be),Ae&&(Re.loop(ae.direction()),Ve.loop()),ee.to(we.get())},le={start:()=>s.start(Y),stop:()=>s.stop(Y),update:()=>oe(Y),render:ae=>ne(Y,ae)},pe=.68,he=x[K.get()],ce=Jc(he),X=Jc(he),Z=Jc(he),de=WU(ce,Z,h,pe),ve=JU(p,x,B,q,Z),Ce=XU(le,K,E,ve,de,Z,o),R=t7(j,B,L,I,q,p,d),Y={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:k,slideRects:S,animation:le,axis:$,direction:_,dragHandler:BU($,_,e,r,i,Z,zU($,i),ce,le,Ce,de,ve,K,o,z,m,y,g,pe),eventStore:Ds(),percentOfView:z,index:K,indexPrevious:E,limit:q,location:ce,offsetLocation:X,options:a,resizeHandler:qU(t,o,i,n,$),scrollBody:de,scrollBounds:HU(q,ce,Z,de,z),scrollLooper:KU(B,q,X,[ce,X,Z]),scrollProgress:GU(q),scrollSnaps:x,scrollTarget:ve,scrollTo:Ce,slideLooper:QU($,_,j,B,U,x,R,X,n),slidesHandler:e7(t,o),slidesInView:R,slideIndexes:Q,slidesToScroll:M,target:Z,translate:lS($,_,t)};return Y}function a7(e){const t=16.666666666666668;let n=[],r=null,i=0,a=0;function o(f){r||(r=f);const d=f-r;for(r=f,i+=d;i>=t;)n.forEach(({animation:h})=>h.update()),i-=t;const p=Ot(i/t);n.forEach(({animation:h})=>h.render(p)),a&&e.requestAnimationFrame(o)}function s(f){n.includes(f)||n.push(f),!a&&(a=e.requestAnimationFrame(o))}function l(f){n=n.filter(d=>d!==f),!n.length&&(e.cancelAnimationFrame(a),r=null,i=0,a=0)}function c(){r=null,i=0}return{start:s,stop:l,reset:c,window:e}}function o7(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function i(l){return r(l).forEach(c=>c(t,l)),s}function a(l,c){return e[l]=r(l).concat([c]),s}function o(l,c){return e[l]=r(l).filter(u=>u!==c),s}const s={init:n,emit:i,off:o,on:a};return s}const s7={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function l7(e){function t(a,o){return aS(a,o||{})}function n(a){const o=a.breakpoints||{},s=Yc(o).filter(l=>e.matchMedia(l).matches).map(l=>o[l]).reduce((l,c)=>t(l,c),{});return t(a,s)}function r(a){return a.map(o=>Yc(o.breakpoints||{})).reduce((o,s)=>o.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function c7(e){let t=[];function n(a,o){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function Za(e,t,n){const r=e.ownerDocument,i=r.defaultView,a=l7(i),o=c7(a),s=Ds(),l=Ds(),c=o7(),{animationRealms:u}=Za,{mergeOptions:f,optionsAtMedia:d,optionsMediaQueries:p}=a,{on:h,off:m,emit:y}=c,v=L;let g=!1,b,k=f(s7,Za.globalOptions),S=f(k),_=[],$,j,z;function O(){const{container:de,slides:ve}=S;j=(rS(de)?e.querySelector(de):de)||e.children[0];const R=rS(ve)?j.querySelectorAll(ve):ve;z=[].slice.call(R||j.children)}function N(de,ve){const Ce=i7(e,j,z,r,i,de,c,ve);if(de.loop&&!Ce.slideLooper.canLoop()){const R=Object.assign({},de,{loop:!1});return N(R,ve)}return Ce}function W(de,ve){if(g)return;const Ce=u.find(Y=>Y.window===i),R=Ce||a7(i);Ce||u.push(R),k=f(k,de),S=d(k),_=ve||_,O(),b=N(S,R),p([k,..._.map(({options:Y})=>Y)]).forEach(Y=>s.add(Y,"change",L)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(Z),b.resizeHandler.init(Z,S.watchResize),b.slidesHandler.init(Z,S.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&R.reset()}),b.options.loop&&b.slideLooper.loop(),j.offsetParent&&z.length&&b.dragHandler.init(Z,S.watchDrag),$=o.init(_,Z))}function L(de,ve){const Ce=oe();U(),W(f({startIndex:Ce},de),ve),c.emit("reInit")}function U(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),o.destroy(),s.clear(),l.clear()}function M(){g||(g=!0,s.clear(),U(),c.emit("destroy"))}function I(de){const ve=b[de?"target":"location"].get(),Ce=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[Ce](ve))}function H(de){const ve=I(de);return b.slideIndexes.filter(Ce=>!ve.includes(Ce))}function B(de,ve,Ce){!S.active||g||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(de,Ce||0))}function A(de){const ve=b.index.add(1).get();B(ve,de===!0,-1)}function x(de){const ve=b.index.add(-1).get();B(ve,de===!0,1)}function q(){return b.index.add(1).get()!==oe()}function K(){return b.index.add(-1).get()!==oe()}function E(){return b.scrollSnaps.map(b.scrollProgress.get)}function Q(){return b.scrollProgress.get(b.location.get())}function oe(){return b.index.get()}function ne(){return b.indexPrevious.get()}function le(){return $}function pe(){return b}function he(){return e}function ce(){return j}function X(){return z}const Z={canScrollNext:q,canScrollPrev:K,containerNode:ce,internalEngine:pe,destroy:M,off:m,on:h,emit:y,plugins:le,previousScrollSnap:ne,reInit:v,rootNode:he,scrollNext:A,scrollPrev:x,scrollProgress:Q,scrollSnapList:E,scrollTo:B,selectedScrollSnap:oe,slideNodes:X,slidesInView:I,slidesNotInView:H};return W(t,n),setTimeout(()=>c.emit("init"),0),Z}Za.animationRealms=[],Za.globalOptions=void 0;function yh(e={},t=[]){const n=D.useRef(e),r=D.useRef(t),[i,a]=D.useState(),[o,s]=D.useState(),l=D.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return D.useEffect(()=>{if(jU()&&o){Za.globalOptions=yh.globalOptions;const c=Za(o,n.current,r.current);return a(c),()=>c.destroy()}else a(void 0)},[o,a]),D.useEffect(()=>{hh(n.current,e)||(n.current=e,l())},[e,l]),D.useEffect(()=>{NU(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}yh.globalOptions=void 0;function u7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5Zm-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5H5.25Z",clipRule:"evenodd"}))}const f7=w.forwardRef(u7);function d7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const p7=w.forwardRef(d7);function h7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const m7=w.forwardRef(h7);function v7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),w.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const g7=w.forwardRef(v7);function y7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),w.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const b7=w.forwardRef(y7);function x7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const w7=w.forwardRef(x7);function S7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const E7=w.forwardRef(S7);function _7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const k7=w.forwardRef(_7),$7=D.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,metadata:i},a)=>{const[o,s]=yh({skipSnaps:!0,loop:!0}),[l,c]=D.useState(!0),[u,f]=D.useState(!0),d=D.useCallback(()=>s==null?void 0:s.scrollPrev(),[s]),p=D.useCallback(()=>s==null?void 0:s.scrollNext(),[s]),{message:{blocks:{carousel:h}}}=yt,m=D.useCallback(y=>{c(!y.canScrollPrev()),f(!y.canScrollNext())},[]);return D.useEffect(()=>{s&&(m(s),s.on("reInit",m),s.on("select",m))},[s,m]),C.jsxs("div",{...h==null?void 0:h.container,"data-container":"carousel",ref:o,children:[C.jsx("div",{ref:a,...h==null?void 0:h.slidesContainer,children:e.map((y,v)=>C.jsx(Xa,{block:y,direction:t,sender:n,timestamp:r,metadata:i},v))}),e.length>1&&C.jsxs(C.Fragment,{children:[C.jsx(p7,{...h==null?void 0:h.backButton,"data-disabled":l?"":void 0,onClick:d}),C.jsx(m7,{...h==null?void 0:h.nextButton,"data-disabled":u?"":void 0,onClick:p})]})]})}),cS=Math.floor;function uS(e){return fS(e)?(e.nodeName||"").toLowerCase():"#document"}function Ms(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function O7(e){var t;return(t=(fS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fS(e){return e instanceof Node||e instanceof Ms(e).Node}function zn(e){return e instanceof Element||e instanceof Ms(e).Element}function Ka(e){return e instanceof HTMLElement||e instanceof Ms(e).HTMLElement}function bh(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ms(e).ShadowRoot}function T7(e){return["html","body","#document"].includes(uS(e))}function C7(e){return Ms(e).getComputedStyle(e)}function I7(e){if(uS(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bh(e)&&e.host||O7(e);return bh(t)?t.host:t}function _i(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function gn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&bh(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function dS(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function R7(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function pS(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(dS())||t.test(R7()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function hS(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function mS(){return/apple/i.test(navigator.vendor)}function A7(){return dS().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function vS(e,t){return["mouse","pen"].includes(e)}function P7(e){return"nativeEvent"in e}function j7(e){return e.matches("html,body")}function er(e){return(e==null?void 0:e.ownerDocument)||document}function xh(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function gS(e){return"composedPath"in e?e.composedPath()[0]:e.target}const N7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function yS(e){return Ka(e)&&e.matches(N7)}function Yt(e){e.preventDefault(),e.stopPropagation()}const wh="ArrowUp",Xc="ArrowDown",Ga="ArrowLeft",Ls="ArrowRight";function Qc(e,t,n){return Math.floor(e/t)!==n}function Fs(e,t){return t<0||t>=e.current.length}function Sh(e,t){return an(e,{disabledIndices:t})}function bS(e,t){return an(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function an(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:a=1}=t===void 0?{}:t;const o=e.current;let s=n;do{var l,c;s=s+(r?-a:a)}while(s>=0&&s<=o.length-1&&(i?i.includes(s):o[s]==null||(l=o[s])!=null&&l.hasAttribute("disabled")||((c=o[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function D7(e,t){let{event:n,orientation:r,loop:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===wh){if(u&&Yt(n),c===-1)f=l;else if(f=an(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:o}),i&&(c-a<s||f<0)){const d=c%a,p=l%a,h=l-(p-d);p===d?f=l:f=p>d?h:h-a}Fs(e,f)&&(f=c)}if(n.key===Xc&&(u&&Yt(n),c===-1?f=s:(f=an(e,{startingIndex:c,amount:a,disabledIndices:o}),i&&c+a>l&&(f=an(e,{startingIndex:c%a-a,amount:a,disabledIndices:o}))),Fs(e,f)&&(f=c)),r==="both"){const d=cS(c/a);n.key===Ls&&(u&&Yt(n),c%a!==a-1?(f=an(e,{startingIndex:c,disabledIndices:o}),i&&Qc(f,a,d)&&(f=an(e,{startingIndex:c-c%a-1,disabledIndices:o}))):i&&(f=an(e,{startingIndex:c-c%a-1,disabledIndices:o})),Qc(f,a,d)&&(f=c)),n.key===Ga&&(u&&Yt(n),c%a!==0?(f=an(e,{startingIndex:c,disabledIndices:o,decrement:!0}),i&&Qc(f,a,d)&&(f=an(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:o}))):i&&(f=an(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:o})),Qc(f,a,d)&&(f=c));const p=cS(l/a)===d;Fs(e,f)&&(i&&p?f=n.key===Ga?l:an(e,{startingIndex:c-c%a-1,disabledIndices:o}):f=c)}return f}let xS=0;function Zr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(xS);const a=()=>e==null?void 0:e.focus({preventScroll:n});i?a():xS=requestAnimationFrame(a)}var Ft=typeof document<"u"?D.useLayoutEffect:D.useEffect;function eu(){return eu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},eu.apply(this,arguments)}let Eh=!1,M7=0;const wS=()=>"floating-ui-"+M7++;function L7(){const[e,t]=w.useState(()=>Eh?wS():void 0);return Ft(()=>{e==null&&t(wS())},[]),w.useEffect(()=>{Eh||(Eh=!0)},[]),e}const _h=w.useId||L7;function F7(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const B7=w.createContext(null),z7=w.createContext(null),SS=()=>{var e;return((e=w.useContext(B7))==null?void 0:e.id)||null},tu=()=>w.useContext(z7);function Bs(e){return"data-floating-ui-"+e}function ki(e){const t=D.useRef(e);return Ft(()=>{t.current=e}),t}function U7(e,t){var n;let r=[],i=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function Ya(e,t){let n=e.filter(i=>{var a;return i.parentId===t&&((a=i.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=e.filter(i=>{var a;return(a=r)==null?void 0:a.some(o=>{var s;return i.parentId===o.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function q7(e,t){let n,r=-1;function i(a,o){o>r&&(n=a,r=o),Ya(e,a).forEach(l=>{i(l.id,o+1)})}return i(t,0),e.find(a=>a.id===n)}let Ja=new WeakMap,nu=new WeakSet,ru={},kh=0;const W7=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,ES=e=>e&&(e.host||ES(e.parentNode)),H7=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ES(n);return e.contains(r)?r:null}).filter(n=>n!=null);function V7(e,t,n,r){const i="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=H7(t,e),s=new Set,l=new Set(o),c=[];ru[i]||(ru[i]=new WeakMap);const u=ru[i];o.forEach(f),d(t),s.clear();function f(p){!p||s.has(p)||(s.add(p),p.parentNode&&f(p.parentNode))}function d(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,h=>{if(s.has(h))d(h);else{const m=a?h.getAttribute(a):null,y=m!==null&&m!=="false",v=(Ja.get(h)||0)+1,g=(u.get(h)||0)+1;Ja.set(h,v),u.set(h,g),c.push(h),v===1&&y&&nu.add(h),g===1&&h.setAttribute(i,""),!y&&a&&h.setAttribute(a,"true")}})}return kh++,()=>{c.forEach(p=>{const h=(Ja.get(p)||0)-1,m=(u.get(p)||0)-1;Ja.set(p,h),u.set(p,m),h||(!nu.has(p)&&a&&p.removeAttribute(a),nu.delete(p)),m||p.removeAttribute(i)}),kh--,kh||(Ja=new WeakMap,Ja=new WeakMap,nu=new WeakSet,ru={})}}function _S(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=er(e[0]).body;return V7(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const $h=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function kS(e,t){const n=th(e,$h());t==="prev"&&n.reverse();const r=n.indexOf(_i(er(e)));return n.slice(r+1)[0]}function $S(){return kS(document.body,"next")}function OS(){return kS(document.body,"prev")}function zs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!gn(n,r)}function Z7(e){th(e,$h()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function K7(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Oh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let G7;function TS(e){e.key==="Tab"&&(e.target,clearTimeout(G7))}const iu=w.forwardRef(function(t,n){const[r,i]=w.useState();Ft(()=>(mS()&&i("button"),document.addEventListener("keydown",TS),()=>{document.removeEventListener("keydown",TS)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Bs("focus-guard")]:"",style:Oh};return w.createElement("span",eu({},t,a))}),CS=w.createContext(null);function Y7(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=w.useState(null),a=_h(),o=IS(),s=w.useMemo(()=>({id:t,root:n,portalContext:o,uniqueId:a}),[t,n,o,a]),l=w.useRef();return Ft(()=>()=>{r==null||r.remove()},[r,s]),Ft(()=>{if(l.current===s)return;l.current=s;const{id:c,root:u,portalContext:f,uniqueId:d}=s,p=c?document.getElementById(c):null,h=Bs("portal");if(p){const m=document.createElement("div");m.id=d,m.setAttribute(h,""),p.appendChild(m),i(m)}else{let m=u||(f==null?void 0:f.portalNode);m&&!zn(m)&&(m=m.current),m=m||document.body;let y=null;c&&(y=document.createElement("div"),y.id=c,m.appendChild(y));const v=document.createElement("div");v.id=d,v.setAttribute(h,""),m=y||m,m.appendChild(v),i(v)}},[s]),r}function J7(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const a=Y7({id:n,root:r}),[o,s]=w.useState(null),l=w.useRef(null),c=w.useRef(null),u=w.useRef(null),f=w.useRef(null),d=!!o&&!o.modal&&o.open&&i&&!!(r||a);return w.useEffect(()=>{if(!a||!i||o!=null&&o.modal)return;function p(h){a&&zs(h)&&(h.type==="focusin"?K7:Z7)(a)}return a.addEventListener("focusin",p,!0),a.addEventListener("focusout",p,!0),()=>{a.removeEventListener("focusin",p,!0),a.removeEventListener("focusout",p,!0)}},[a,i,o==null?void 0:o.modal]),w.createElement(CS.Provider,{value:w.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a])},d&&a&&w.createElement(iu,{"data-type":"outside",ref:l,onFocus:p=>{if(zs(p,a)){var h;(h=u.current)==null||h.focus()}else{const m=OS()||(o==null?void 0:o.refs.domReference.current);m==null||m.focus()}}}),d&&a&&w.createElement("span",{"aria-owns":a.id,style:Oh}),a&&Di.createPortal(t,a),d&&a&&w.createElement(iu,{"data-type":"outside",ref:c,onFocus:p=>{if(zs(p,a)){var h;(h=f.current)==null||h.focus()}else{const m=$S()||(o==null?void 0:o.refs.domReference.current);m==null||m.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,p.nativeEvent))}}}))}const IS=()=>w.useContext(CS),X7=w.forwardRef(function(t,n){return w.createElement("button",eu({},t,{type:"button",ref:n,tabIndex:-1,style:Oh}))});function Q7(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:u=!0}=e,{open:f,refs:d,nodeId:p,onOpenChange:h,events:m,dataRef:y,elements:{domReference:v,floating:g}}=t,b=W7()?a:!0,k=ki(i),S=ki(o),_=ki(s),$=tu(),j=IS(),z=typeof o=="number"&&o<0,O=w.useRef(null),N=w.useRef(null),W=w.useRef(!1),L=w.useRef(null),U=w.useRef(!1),M=j!=null,I=v&&v.getAttribute("role")==="combobox"&&yS(v)&&z,H=w.useCallback(function(q){return q===void 0&&(q=g),q?th(q,$h()):[]},[g]),B=w.useCallback(q=>{const K=H(q);return k.current.map(E=>v&&E==="reference"?v:g&&E==="floating"?g:K).filter(Boolean).flat()},[v,g,k,H]);w.useEffect(()=>{if(r||!l)return;function q(E){if(E.key==="Tab"){gn(g,_i(er(g)))&&H().length===0&&!I&&Yt(E);const Q=B(),oe=gS(E);k.current[0]==="reference"&&oe===v&&(Yt(E),E.shiftKey?Zr(Q[Q.length-1]):Zr(Q[1])),k.current[1]==="floating"&&oe===g&&E.shiftKey&&(Yt(E),Zr(Q[0]))}}const K=er(g);return K.addEventListener("keydown",q),()=>{K.removeEventListener("keydown",q)}},[r,v,g,l,k,d,I,H,B]),w.useEffect(()=>{if(r||!u)return;function q(){U.current=!0,setTimeout(()=>{U.current=!1})}function K(E){const Q=E.relatedTarget;queueMicrotask(()=>{const oe=!(gn(v,Q)||gn(g,Q)||gn(Q,g)||gn(j==null?void 0:j.portalNode,Q)||Q!=null&&Q.hasAttribute(Bs("focus-guard"))||$&&(Ya($.nodesRef.current,p).find(ne=>{var le,pe;return gn((le=ne.context)==null?void 0:le.elements.floating,Q)||gn((pe=ne.context)==null?void 0:pe.elements.domReference,Q)})||U7($.nodesRef.current,p).find(ne=>{var le,pe;return((le=ne.context)==null?void 0:le.elements.floating)===Q||((pe=ne.context)==null?void 0:pe.elements.domReference)===Q})));Q&&oe&&!U.current&&Q!==L.current&&(W.current=!0,h(!1,E))})}if(g&&Ka(v))return v.addEventListener("focusout",K),v.addEventListener("pointerdown",q),!l&&g.addEventListener("focusout",K),()=>{v.removeEventListener("focusout",K),v.removeEventListener("pointerdown",q),!l&&g.removeEventListener("focusout",K)}},[r,v,g,l,p,$,j,h,u]),w.useEffect(()=>{var q;if(r)return;const K=Array.from((j==null||(q=j.portalNode)==null?void 0:q.querySelectorAll("["+Bs("portal")+"]"))||[]);if(g){const E=[g,...K,O.current,N.current,k.current.includes("reference")||I?v:null].filter(oe=>oe!=null),Q=l?_S(E,b,!b):_S(E);return()=>{Q()}}},[r,v,g,l,k,j,I,b]),Ft(()=>{if(r||!g)return;const q=er(g),K=_i(q);queueMicrotask(()=>{const E=B(g),Q=S.current,oe=(typeof Q=="number"?E[Q]:Q.current)||g,ne=gn(g,K);!z&&!ne&&f&&Zr(oe,{preventScroll:oe===g})})},[r,f,g,z,B,S]),Ft(()=>{if(r||!g)return;let q=!1;const K=er(g),E=_i(K),Q=y.current;L.current=E;function oe(ne){if(ne.type==="escapeKey"&&d.domReference.current&&(L.current=d.domReference.current),["referencePress","escapeKey"].includes(ne.type))return;const le=ne.data.returnFocus;typeof le=="object"?(W.current=!1,q=le.preventScroll):W.current=!le}return m.on("dismiss",oe),()=>{m.off("dismiss",oe);const ne=_i(K);(gn(g,ne)||$&&Ya($.nodesRef.current,p).some(pe=>{var he;return gn((he=pe.context)==null?void 0:he.elements.floating,ne)})||Q.openEvent&&["click","mousedown"].includes(Q.openEvent.type))&&d.domReference.current&&(L.current=d.domReference.current),_.current&&Ka(L.current)&&!W.current&&Zr(L.current,{cancelPrevious:!1,preventScroll:q})}},[r,g,_,y,d,m,$,p]),Ft(()=>{if(!(r||!j))return j.setFocusManagerState({modal:l,closeOnFocusOut:u,open:f,onOpenChange:h,refs:d}),()=>{j.setFocusManagerState(null)}},[r,j,l,f,h,d,u]),Ft(()=>{if(!r&&g&&typeof MutationObserver=="function"&&!z){const q=()=>{const E=g.getAttribute("tabindex");k.current.includes("floating")||_i(er(g))!==d.domReference.current&&H().length===0?E!=="0"&&g.setAttribute("tabindex","0"):E!=="-1"&&g.setAttribute("tabindex","-1")};q();const K=new MutationObserver(q);return K.observe(g,{childList:!0,subtree:!0,attributes:!0}),()=>{K.disconnect()}}},[r,g,d,k,H,z]);function A(q){return r||!c||!l?null:w.createElement(X7,{ref:q==="start"?O:N,onClick:K=>h(!1,K.nativeEvent)},typeof c=="string"?c:"Dismiss")}const x=!r&&b&&!I&&(M||l);return w.createElement(w.Fragment,null,x&&w.createElement(iu,{"data-type":"inside",ref:j==null?void 0:j.beforeInsideRef,onFocus:q=>{if(l){const E=B();Zr(i[0]==="reference"?E[0]:E[E.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(W.current=!1,zs(q,j.portalNode)){const E=$S()||v;E==null||E.focus()}else{var K;(K=j.beforeOutsideRef.current)==null||K.focus()}}}),!I&&A("start"),n,A("end"),x&&w.createElement(iu,{"data-type":"inside",ref:j==null?void 0:j.afterInsideRef,onFocus:q=>{if(l)Zr(B()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(u&&(W.current=!0),zs(q,j.portalNode)){const E=OS()||v;E==null||E.focus()}else{var K;(K=j.afterOutsideRef.current)==null||K.focus()}}}))}function RS(e){return Ka(e.target)&&e.target.tagName==="BUTTON"}function AS(e){return yS(e)}function e9(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=w.useRef(),d=w.useRef(!1);return w.useMemo(()=>o?{reference:{onPointerDown(p){f.current=p.pointerType},onMouseDown(p){p.button===0&&(vS(f.current)&&c||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent):(p.preventDefault(),r(!0,p.nativeEvent))))},onClick(p){if(s==="mousedown"&&f.current){f.current=void 0;return}vS(f.current)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,p.nativeEvent):r(!0,p.nativeEvent))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!u||RS(p))&&(p.key===" "&&!AS(a)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent))},onKeyUp(p){p.defaultPrevented||!u||RS(p)||AS(a)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&l),p.nativeEvent))}}}:{},[o,i,s,c,u,a,l,n,r])}const t9=w.useInsertionEffect||(e=>e());function $i(e){const t=w.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return t9(()=>{t.current=e}),w.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const n9={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},r9={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},i9=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function a9(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:a,elements:{reference:o,domReference:s,floating:l},dataRef:c}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:y=!1,bubbles:v}=t,g=tu(),b=SS()!=null,k=$i(typeof d=="function"?d:()=>!1),S=typeof d=="function"?k:d,_=w.useRef(!1),{escapeKeyBubbles:$,outsidePressBubbles:j}=i9(v),z=$i(N=>{if(!n||!u||!f||N.key!=="Escape")return;const W=g?Ya(g.nodesRef.current,a):[];if(!$&&(N.stopPropagation(),W.length>0)){let L=!0;if(W.forEach(U=>{var M;if((M=U.context)!=null&&M.open&&!U.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,P7(N)?N.nativeEvent:N)}),O=$i(N=>{const W=_.current;if(_.current=!1,W||typeof S=="function"&&!S(N))return;const L=gS(N),U="["+Bs("inert")+"]",M=er(l).querySelectorAll(U);let I=zn(L)?L:null;for(;I&&!T7(I);){const A=I7(I);if(A===er(l).body||!zn(A))break;I=A}if(M.length&&zn(L)&&!j7(L)&&!gn(L,l)&&Array.from(M).every(A=>!gn(I,A)))return;if(Ka(L)&&l){const A=L.clientWidth>0&&L.scrollWidth>L.clientWidth,x=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let q=x&&N.offsetX>L.clientWidth;if(x&&C7(L).direction==="rtl"&&(q=N.offsetX<=L.offsetWidth-L.clientWidth),q||A&&N.offsetY>L.clientHeight)return}const H=g&&Ya(g.nodesRef.current,a).some(A=>{var x;return xh(N,(x=A.context)==null?void 0:x.elements.floating)});if(xh(N,l)||xh(N,s)||H)return;const B=g?Ya(g.nodesRef.current,a):[];if(B.length>0){let A=!0;if(B.forEach(x=>{var q;if((q=x.context)!=null&&q.open&&!x.context.dataRef.current.__outsidePressBubbles){A=!1;return}}),!A)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:pS(N)||hS(N)}}),r(!1,N)});return w.useEffect(()=>{if(!n||!u)return;c.current.__escapeKeyBubbles=$,c.current.__outsidePressBubbles=j;function N(U){r(!1,U)}const W=er(l);f&&W.addEventListener("keydown",z),S&&W.addEventListener(p,O);let L=[];return y&&(zn(s)&&(L=wi(s)),zn(l)&&(L=L.concat(wi(l))),!zn(o)&&o&&o.contextElement&&(L=L.concat(wi(o.contextElement)))),L=L.filter(U=>{var M;return U!==((M=W.defaultView)==null?void 0:M.visualViewport)}),L.forEach(U=>{U.addEventListener("scroll",N,{passive:!0})}),()=>{f&&W.removeEventListener("keydown",z),S&&W.removeEventListener(p,O),L.forEach(U=>{U.removeEventListener("scroll",N)})}},[c,l,s,o,f,S,p,n,r,y,u,$,j,z,O]),w.useEffect(()=>{_.current=!1},[S,p]),w.useMemo(()=>u?{reference:{onKeyDown:z,[n9[m]]:N=>{h&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,N.nativeEvent))}},floating:{onKeyDown:z,[r9[p]]:()=>{_.current=!0}}}:{},[u,i,h,p,m,r,z])}let Th;process.env.NODE_ENV!=="production"&&(Th=new Set);function o9(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var a;const $="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((a=e.elements)!=null&&a.reference&&!zn(e.elements.reference)){var o;if(!((o=Th)!=null&&o.has($))){var s;(s=Th)==null||s.add($),console.error($)}}}const[l,c]=w.useState(null),u=((t=e.elements)==null?void 0:t.reference)||l,f=N6(e),d=tu(),p=$i(($,j)=>{$&&(m.current.openEvent=j),r==null||r($,j)}),h=w.useRef(null),m=w.useRef({}),y=w.useState(()=>F7())[0],v=_h(),g=w.useCallback($=>{const j=zn($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),contextElement:$}:$;f.refs.setReference(j)},[f.refs]),b=w.useCallback($=>{(zn($)||$===null)&&(h.current=$,c($)),(zn(f.refs.reference.current)||f.refs.reference.current===null||$!==null&&!zn($))&&f.refs.setReference($)},[f.refs]),k=w.useMemo(()=>({...f.refs,setReference:b,setPositionReference:g,domReference:h}),[f.refs,b,g]),S=w.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),_=w.useMemo(()=>({...f,refs:k,elements:S,dataRef:m,nodeId:i,floatingId:v,events:y,open:n,onOpenChange:p}),[f,i,v,y,n,p,k,S]);return Ft(()=>{const $=d==null?void 0:d.nodesRef.current.find(j=>j.id===i);$&&($.context=_)}),w.useMemo(()=>({...f,context:_,refs:k,elements:S}),[f,k,S,_])}function Ch(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(o=>{let[s,l]=o;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var c;(c=r.get(s))==null||c.push(l),i[s]=function(){for(var u,f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];return(u=r.get(s))==null?void 0:u.map(h=>h(...d)).find(h=>h!==void 0)}}}else i[s]=l}),i),{})}}function s9(e){e===void 0&&(e=[]);const t=e,n=w.useCallback(a=>Ch(a,e,"reference"),t),r=w.useCallback(a=>Ch(a,e,"floating"),t),i=w.useCallback(a=>Ch(a,e,"item"),e.map(a=>a==null?void 0:a.item));return w.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let PS=!1;function au(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function jS(e,t){return au(t,e===wh||e===Xc,e===Ga||e===Ls)}function Ih(e,t,n){return au(t,e===Xc,n?e===Ga:e===Ls)||e==="Enter"||e==" "||e===""}function l9(e,t,n){return au(t,n?e===Ga:e===Ls,e===Xc)}function NS(e,t,n){return au(t,n?e===Ls:e===Ga,e===wh)}function c9(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:a,floating:o}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:d=!1,loop:p=!1,nested:h=!1,rtl:m=!1,virtual:y=!1,focusItemOnOpen:v="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:_=1,scrollItemIntoView:$=!0,virtualItemRef:j}=t;process.env.NODE_ENV!=="production"&&(d&&(p||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),y||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&_>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const z=SS(),O=tu(),N=$i(c),W=w.useRef(v),L=w.useRef(f??-1),U=w.useRef(null),M=w.useRef(!0),I=w.useRef(N),H=w.useRef(!!o),B=w.useRef(!1),A=w.useRef(!1),x=ki(k),q=ki(n),K=ki($),[E,Q]=w.useState(),[oe,ne]=w.useState(),le=$i(function(ce,X,Z){Z===void 0&&(Z=!1);const de=ce.current[X.current];de&&(y?(Q(de.id),O==null||O.events.emit("virtualfocus",de),j&&(j.current=de)):Zr(de,{preventScroll:!0,sync:A7()&&mS()?PS||B.current:!1}),requestAnimationFrame(()=>{const ve=K.current;ve&&de&&(Z||!M.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});Ft(()=>{document.createElement("div").focus({get preventScroll(){return PS=!0,!1}})},[]),Ft(()=>{u&&(n&&o?W.current&&f!=null&&(A.current=!0,N(f)):H.current&&(L.current=-1,I.current(null)))},[u,n,o,f,N]),Ft(()=>{if(u&&n&&o)if(l==null){if(B.current=!1,f!=null)return;if(H.current&&(L.current=-1,le(s,L)),!H.current&&W.current&&(U.current!=null||W.current===!0&&U.current==null)){let ce=0;const X=()=>{s.current[0]==null?(ce<2&&(ce?requestAnimationFrame:queueMicrotask)(X),ce++):(L.current=U.current==null||Ih(U.current,S,m)||h?Sh(s,x.current):bS(s,x.current),U.current=null,N(L.current))};X()}}else Fs(s,l)||(L.current=l,le(s,L,A.current),A.current=!1)},[u,n,o,l,f,h,s,S,m,N,le,x]),Ft(()=>{var ce,X;if(!u||o||!O||y||!H.current)return;const Z=O.nodesRef.current,de=(ce=Z.find(R=>R.id===z))==null||(X=ce.context)==null?void 0:X.elements.floating,ve=_i(er(o)),Ce=Z.some(R=>R.context&&gn(R.context.elements.floating,ve));de&&!Ce&&M.current&&de.focus({preventScroll:!0})},[u,o,O,z,y]),Ft(()=>{if(!u||!O||!y||z)return;function ce(X){ne(X.id),j&&(j.current=X)}return O.events.on("virtualfocus",ce),()=>{O.events.off("virtualfocus",ce)}},[u,O,y,z,j]),Ft(()=>{I.current=N,H.current=!!o}),Ft(()=>{n||(U.current=null)},[n]);const pe=l!=null,he=w.useMemo(()=>{function ce(Z){if(!n)return;const de=s.current.indexOf(Z);de!==-1&&N(de)}return{onFocus(Z){let{currentTarget:de}=Z;ce(de)},onClick:Z=>{let{currentTarget:de}=Z;return de.focus({preventScroll:!0})},...g&&{onMouseMove(Z){let{currentTarget:de}=Z;ce(de)},onPointerLeave(Z){let{pointerType:de}=Z;!M.current||de==="touch"||(L.current=-1,le(s,L),N(null),y||Zr(i.floating.current,{preventScroll:!0}))}}}},[n,i,le,g,s,N,y]);return w.useMemo(()=>{if(!u)return{};const ce=x.current;function X(R){if(M.current=!1,B.current=!0,!q.current&&R.currentTarget===i.floating.current)return;if(h&&NS(R.key,S,m)){Yt(R),r(!1,R.nativeEvent),Ka(a)&&!y&&a.focus();return}const Y=L.current,ae=Sh(s,ce),ee=bS(s,ce);if(R.key==="Home"&&(Yt(R),L.current=ae,N(L.current)),R.key==="End"&&(Yt(R),L.current=ee,N(L.current)),!(_>1&&(L.current=D7(s,{event:R,orientation:S,loop:p,cols:_,disabledIndices:ce,minIndex:ae,maxIndex:ee,prevIndex:L.current,stopEvent:!0}),N(L.current),S==="both"))&&jS(R.key,S)){if(Yt(R),n&&!y&&_i(R.currentTarget.ownerDocument)===R.currentTarget){L.current=Ih(R.key,S,m)?ae:ee,N(L.current);return}Ih(R.key,S,m)?p?L.current=Y>=ee?d&&Y!==s.current.length?-1:ae:an(s,{startingIndex:Y,disabledIndices:ce}):L.current=Math.min(ee,an(s,{startingIndex:Y,disabledIndices:ce})):p?L.current=Y<=ae?d&&Y!==-1?s.current.length:ee:an(s,{startingIndex:Y,decrement:!0,disabledIndices:ce}):L.current=Math.max(ae,an(s,{startingIndex:Y,decrement:!0,disabledIndices:ce})),Fs(s,L.current)?N(null):N(L.current)}}function Z(R){v==="auto"&&pS(R.nativeEvent)&&(W.current=!0)}function de(R){W.current=v,v==="auto"&&hS(R.nativeEvent)&&(W.current=!0)}const ve=y&&n&&pe&&{"aria-activedescendant":oe||E},Ce=s.current.find(R=>(R==null?void 0:R.id)===E);return{reference:{...ve,onKeyDown(R){M.current=!1;const Y=R.key.indexOf("Arrow")===0,ae=l9(R.key,S,m),ee=NS(R.key,S,m),ke=jS(R.key,S),we=(h?ae:ke)||R.key==="Enter"||R.key.trim()==="";if(y&&n){const Be=O==null?void 0:O.nodesRef.current.find(P=>P.parentId==null),F=O&&Be?q7(O.nodesRef.current,Be.id):null;if(Y&&F&&j){const P=new KeyboardEvent("keydown",{key:R.key,bubbles:!0});if(ae||ee){var Re,Ve;const J=((Re=F.context)==null?void 0:Re.elements.domReference)===R.currentTarget,ue=ee&&!J?(Ve=F.context)==null?void 0:Ve.elements.domReference:ae?Ce:null;ue&&(Yt(R),ue.dispatchEvent(P),ne(void 0))}if(ke&&F.context&&F.context.open&&F.parentId&&R.currentTarget!==F.context.elements.domReference){var Ae;Yt(R),(Ae=F.context.elements.domReference)==null||Ae.dispatchEvent(P);return}}return X(R)}if(!(!n&&!b&&Y)){if(we&&(U.current=h&&ke?null:R.key),h){ae&&(Yt(R),n?(L.current=Sh(s,ce),N(L.current)):r(!0,R.nativeEvent));return}ke&&(f!=null&&(L.current=f),Yt(R),!n&&b?r(!0,R.nativeEvent):X(R),n&&N(L.current))}},onFocus(){n&&N(null)},onPointerDown:de,onMouseDown:Z,onClick:Z},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:X,onPointerMove(){M.current=!0}},item:he}},[a,i,E,oe,x,q,s,u,S,m,y,n,pe,h,f,b,d,_,p,v,N,r,he,O,j])}function u9(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:a="dialog"}=t,o=_h();return w.useMemo(()=>{const s={id:r,role:a};return i?a==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?r:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:o}},floating:{...s,...a==="menu"&&{"aria-labelledby":o}}}:{}},[i,a,n,r,o])}function f9(e,t){var n;const{open:r,dataRef:i}=e,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:d=[],selectedIndex:p=null}=t,h=w.useRef(),m=w.useRef(""),y=w.useRef((n=p??o)!=null?n:-1),v=w.useRef(null),g=$i(s),b=$i(l),k=ki(u),S=ki(d);return Ft(()=>{r&&(clearTimeout(h.current),v.current=null,m.current="")},[r]),Ft(()=>{if(r&&m.current===""){var _;y.current=(_=p??o)!=null?_:-1}},[r,p,o]),w.useMemo(()=>{if(!c)return{};function _(z){z?i.current.typing||(i.current.typing=z,b(z)):i.current.typing&&(i.current.typing=z,b(z))}function $(z,O,N){const W=k.current?k.current(O,N):O.find(L=>(L==null?void 0:L.toLocaleLowerCase().indexOf(N.toLocaleLowerCase()))===0);return W?z.indexOf(W):-1}function j(z){const O=a.current;if(m.current.length>0&&m.current[0]!==" "&&($(O,O,m.current)===-1?_(!1):z.key===" "&&Yt(z)),O==null||S.current.includes(z.key)||z.key.length!==1||z.ctrlKey||z.metaKey||z.altKey)return;r&&z.key!==" "&&(Yt(z),_(!0)),O.every(U=>{var M,I;return U?((M=U[0])==null?void 0:M.toLocaleLowerCase())!==((I=U[1])==null?void 0:I.toLocaleLowerCase()):!0})&&m.current===z.key&&(m.current="",y.current=v.current),m.current+=z.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",y.current=v.current,_(!1)},f);const W=y.current,L=$(O,[...O.slice((W||0)+1),...O.slice(0,(W||0)+1)],m.current);L!==-1?(g(L),v.current=L):z.key!==" "&&(m.current="",_(!1))}return{reference:{onKeyDown:j},floating:{onKeyDown:j,onKeyUp(z){z.key===" "&&_(!1)}}}},[c,r,i,a,f,S,k,g,b])}const d9=({options:e,label:t,reusable:n})=>{var M,I,H,B,A;const r=Me(x=>x.sendTextMessage),i=Me(x=>x.messageContainerRef),a=Me(x=>x.isReadOnly),[o,s]=w.useState(!1),[l,c]=w.useState(null),[u,f]=w.useState(null),{message:{blocks:{dropdown:d}}}=yt,p=e.reduce((x,q)=>(x[q.label]=q.value,x),{}),h=p?Object.keys(p):[],m=x=>{s(u!==null&&!n?!1:x)},{refs:y,floatingStyles:v,context:g}=o9({placement:"bottom-start",open:o,onOpenChange:m,whileElementsMounted:I6,middleware:[D6(5),M6({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),L6({apply({rects:x,elements:q,availableHeight:K}){Object.assign(q.floating.style,{maxHeight:`${K}px`,minWidth:`${x.reference.width}px`})},padding:10})]}),b=w.useRef([]),k=w.useRef(h),S=w.useRef(!1),_=e9(g,{event:"mousedown"}),$=a9(g),j=u9(g,{role:"listbox"}),z=c9(g,{listRef:b,activeIndex:l,selectedIndex:u,onNavigate:c,loop:!0}),O=f9(g,{listRef:k,activeIndex:l,selectedIndex:u,onMatch:o?c:f,onTypingChange(x){S.current=x}}),{getReferenceProps:N,getFloatingProps:W,getItemProps:L}=s9([$,j,z,O,_]),U=x=>{f(x),h[x]!==void 0&&r(p[h[x]]??""),s(!1)};return u!==null&&h[u],C.jsxs(C.Fragment,{children:[C.jsxs("div",{tabIndex:0,ref:y.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!n?"":void 0,...(M=d.button)==null?void 0:M.container,...N(),children:[C.jsx("span",{...(I=d.button)==null?void 0:I.text,children:"Select..."}),C.jsx(kU,{...(H=d.button)==null?void 0:H.icon})]}),o&&C.jsx(J7,{children:C.jsx(Q7,{context:g,modal:!1,children:C.jsx("div",{ref:y.setFloating,className:(A=(B=d.content)==null?void 0:B.container)==null?void 0:A.className,style:{...v},...W(),children:h.map((x,q)=>{var K;return C.jsx("div",{ref:E=>{b.current[q]=E},role:"option",tabIndex:q===l?0:-1,"aria-selected":q===u&&q===l,"data-active":q===l?"":void 0,...(K=d.content)==null?void 0:K.item,...L({onClick(){a||U(q)},onKeyDown(E){a||(E.key==="Enter"&&(E.preventDefault(),U(q)),E.key===" "&&!S.current&&(E.preventDefault(),U(q)))}}),children:x},x)})})})})]})},p9=D.forwardRef(({type:e,title:t,url:n,...r},i)=>{const{message:{blocks:{file:a}}}=yt;return C.jsxs("a",{...r,...a.container,href:n,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[C.jsx("p",{...a.title,children:t||n}),C.jsx(OU,{...a.icon})]})}),DS={audio:bU,bubble:hU,button:dU,carousel:$7,column:RU,dropdown:d9,file:p9,image:vU,location:IU,row:AU,text:bL,video:yU},Xa=({block:e,...t})=>{const r=Me(a=>a.renderers)[e.type]??DS[e.type],i={...t,...e};return C.jsx(r,{...i})};function h9({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",clipRule:"evenodd"}))}const m9=w.forwardRef(h9);function v9({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),w.createElement("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const g9=w.forwardRef(v9);function y9({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"}))}const b9=w.forwardRef(y9);function Rh(){return Rh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rh.apply(null,arguments)}function x9(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var w9=D.useLayoutEffect,S9=function(t){var n=w.useRef(t);return w9(function(){n.current=t}),n},MS=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},E9=function(t,n){var r=D.useRef();return D.useCallback(function(i){t.current=i,r.current&&MS(r.current,null),r.current=n,n&&MS(n,i)},[n])},LS={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},_9=function(t){Object.keys(LS).forEach(function(n){t.style.setProperty(n,LS[n],"important")})},FS=_9,fn=null,BS=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function k9(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),fn||(fn=document.createElement("textarea"),fn.setAttribute("tabindex","-1"),fn.setAttribute("aria-hidden","true"),FS(fn)),fn.parentNode===null&&document.body.appendChild(fn);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(d){var p=d;fn.style[p]=o[p]}),FS(fn),fn.value=t;var l=BS(fn,e);fn.value=t,l=BS(fn,e),fn.value="x";var c=fn.scrollHeight-i,u=c*n;s==="border-box"&&(u=u+i+a),l=Math.max(u,l);var f=c*r;return s==="border-box"&&(f=f+i+a),l=Math.min(f,l),[l,c]}var zS=function(){},$9=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},O9=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],T9=!!document.documentElement.currentStyle,C9=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=$9(O9,n),i=r.boxSizing;if(i==="")return null;T9&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:o}},I9=C9;function US(e,t,n){var r=S9(n);w.useLayoutEffect(function(){var i=function(o){return r.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var R9=function(t){US(window,"resize",t)},A9=function(t){US(document.fonts,"loadingdone",t)},P9=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],j9=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,a=t.minRows,o=t.onChange,s=o===void 0?zS:o,l=t.onHeightChange,c=l===void 0?zS:l,u=x9(t,P9),f=u.value!==void 0,d=w.useRef(null),p=E9(d,n),h=w.useRef(0),m=w.useRef(),y=function(){var b=d.current,k=r&&m.current?m.current:I9(b);if(k){m.current=k;var S=k9(k,b.value||b.placeholder||"x",a,i),_=S[0],$=S[1];h.current!==_&&(h.current=_,b.style.setProperty("height",_+"px","important"),c(_,{rowHeight:$}))}},v=function(b){f||y(),s(b)};return w.useLayoutEffect(y),R9(y),A9(y),w.createElement("textarea",Rh({},u,{onChange:v,ref:p}))},N9=w.forwardRef(j9);const qS=D.memo(D.forwardRef(({children:e,className:t,inputRef:n,...r},i)=>{const{composer:a}=yt,o=Me(I=>I.disableComposer),s=Me(I=>I.setIsTyping),l=Me(I=>I.isReadOnly),c=Me(I=>I.sendFile),u=Me(I=>I.addMessage),f=Me(I=>I.sendTextMessage),d=Me(I=>I.allowFileUpload),p=Me(I=>I.connected),{composerPlaceholder:h,showPoweredBy:m}=eS(),[y,v]=D.useState(""),[g,b]=D.useState(-1),[k,S]=D.useState(!1),_=D.useRef(null),$=D.useRef(null),j=On(I=>I.user),z=On(I=>I.messageHistory);if(l)return null;const O=()=>{var I;_.current&&((I=_.current)==null||I.click())},N=o||l||!p,W=async I=>{var B;const H=(B=I.target.files)==null?void 0:B[0];if(H)try{const{fileUrl:A,type:x}=await c(H)??"";u({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:x,url:A}})}catch(A){console.error("Error sending file:",A)}},L=window.SpeechRecognition||window.webkitSpeechRecognition,U=()=>{$.current||($.current=new L);const I=$.current;I&&(I.continuous=!0,I.onresult=H=>{var A,x,q;const B=((q=(x=(A=H.results)==null?void 0:A[0])==null?void 0:x[0])==null?void 0:q.transcript)??"";v(B??""),I.stop(),S(!1)},k?(I.stop(),S(!1)):(I.start(),S(!0)))},M=()=>{y&&(f(y),setTimeout(()=>s(!0,9e3),500),v(""),b(-1))};return C.jsxs(C.Fragment,{children:[C.jsxs("div",{"data-disabled":N,...r,className:Gp(a.container.className,t),ref:i,children:[d&&C.jsxs(C.Fragment,{children:[C.jsx("button",{type:"button",disabled:N,...a.uploadButton.container,onClick:O,children:C.jsx(b9,{...a.uploadButton.icon})}),C.jsx("input",{type:"file",ref:_,style:{display:"none"},onChange:W})]}),C.jsx(N9,{...a==null?void 0:a.input,ref:n,placeholder:h??"Type your message...",disabled:N,value:y,"data-has-value":!!y,onChange:I=>v(I.target.value),maxRows:5,onKeyDown:I=>{if(!N){if(I.key==="Enter"&&I.shiftKey?(I.preventDefault(),v(`${y}
|
|
284
|
-
`)):I.key==="Enter"&&(I.preventDefault(),M()),I.key==="ArrowUp"){I.preventDefault();const H=z[(j==null?void 0:j.userId)??""]??[];g<H.length-1&&v(H[g+1]??""),b(()=>Math.min(g+1,H.length-1))}if(I.key==="ArrowDown"){I.preventDefault();const H=z[(j==null?void 0:j.userId)??""]??[];v(g===0?"":H[g-1]??""),b(()=>Math.max(g-1,-1))}}}}),y&&C.jsx("button",{type:"button","aria-label":"Send message",...a.button.container,disabled:!y||N,onClick:M,children:C.jsx(m9,{...a.button.icon})}),!y&&L&&C.jsx("button",{type:"button","aria-label":"Activate voice input",...a.voiceButton.container,disabled:!!y,onClick:U,"data-listens":!!k,children:C.jsx(g9,{...a.voiceButton.icon})})]}),C.jsx("a",{...a.poweredBy,"data-hidden":m===!1,hidden:m===!1,href:"https://botpress.com/?from=webchat",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),WS=({children:e})=>{const[t,n]=D.useState(!1),[r,i]=D.useState(""),[a,o]=D.useState(null),s=({title:c,content:u})=>{i(c),o(u),n(!0)},l=()=>{n(!1)};return C.jsxs(J1.Provider,{value:{hideModal:l,showModal:s,title:r,content:a,open:t},children:[C.jsx(Ti,{open:t,onOpenChange:n,children:C.jsx(Ti.Content,{title:r,children:a})}),e]})};var HS={},Ah={},ou=ut&&ut.__assign||function(){return ou=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ou.apply(this,arguments)};Object.defineProperty(Ah,"__esModule",{value:!0});var D9={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function M9(e){var t=ou(ou({},D9),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Ah.getSanitizedOptions=M9;var Ph={},jh={},su={},Nh={},Dh={};Object.defineProperty(Dh,"__esModule",{value:!0});function L9(e){var t=Math.random()*e;return Math.round(t)}Dh.fullJitter=L9;var Mh={};Object.defineProperty(Mh,"__esModule",{value:!0});function F9(e){return e}Mh.noJitter=F9,Object.defineProperty(Nh,"__esModule",{value:!0});var B9=Dh,z9=Mh;function U9(e){switch(e.jitter){case"full":return B9.fullJitter;case"none":default:return z9.noJitter}}Nh.JitterFactory=U9,Object.defineProperty(su,"__esModule",{value:!0});var q9=Nh,W9=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(n){return setTimeout(n,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=q9.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,n=this.options.timeMultiple,r=this.numOfDelayedAttempts,i=t*Math.pow(n,r);return Math.min(i,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();su.Delay=W9;var H9=ut&&ut.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),V9=ut&&ut.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},Z9=ut&&ut.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(jh,"__esModule",{value:!0});var K9=su,G9=function(e){H9(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return V9(this,void 0,void 0,function(){return Z9(this,function(n){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(K9.Delay);jh.SkipFirstDelay=G9;var Lh={},Y9=ut&&ut.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Lh,"__esModule",{value:!0});var J9=su,X9=function(e){Y9(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(J9.Delay);Lh.AlwaysDelay=X9,Object.defineProperty(Ph,"__esModule",{value:!0});var Q9=jh,eq=Lh;function tq(e,t){var n=nq(e);return n.setAttemptNumber(t),n}Ph.DelayFactory=tq;function nq(e){return e.delayFirstAttempt?new eq.AlwaysDelay(e):new Q9.SkipFirstDelay(e)}var Fh=ut&&ut.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},Bh=ut&&ut.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(HS,"__esModule",{value:!0});var rq=Ah,iq=Ph;function aq(e,t){return t===void 0&&(t={}),Fh(this,void 0,void 0,function(){var n,r;return Bh(this,function(i){switch(i.label){case 0:return n=rq.getSanitizedOptions(t),r=new sq(e,n),[4,r.execute()];case 1:return[2,i.sent()]}})})}var oq=HS.backOff=aq,sq=function(){function e(t,n){this.request=t,this.options=n,this.attemptNumber=0}return e.prototype.execute=function(){return Fh(this,void 0,void 0,function(){var t,n;return Bh(this,function(r){switch(r.label){case 0:if(this.attemptLimitReached)return[3,7];r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return r.sent(),[4,this.request()];case 3:return[2,r.sent()];case 4:return t=r.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(n=r.sent(),!n||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Fh(this,void 0,void 0,function(){var t;return Bh(this,function(n){switch(n.label){case 0:return t=iq.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return n.sent(),[2]}})})},e}(),VS=Object.prototype.toString,ZS=function(t){var n=VS.call(t),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&VS.call(t.callee)==="[object Function]"),r},zh,KS;function lq(){if(KS)return zh;KS=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=ZS,i=Object.prototype.propertyIsEnumerable,a=!i.call({toString:null},"toString"),o=i.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(d){var p=d.constructor;return p&&p.prototype===d},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!c["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{l(window[d])}catch{return!0}}catch{return!0}return!1}(),f=function(d){if(typeof window>"u"||!u)return l(d);try{return l(d)}catch{return!1}};e=function(p){var h=p!==null&&typeof p=="object",m=n.call(p)==="[object Function]",y=r(p),v=h&&n.call(p)==="[object String]",g=[];if(!h&&!m&&!y)throw new TypeError("Object.keys called on a non-object");var b=o&&m;if(v&&p.length>0&&!t.call(p,0))for(var k=0;k<p.length;++k)g.push(String(k));if(y&&p.length>0)for(var S=0;S<p.length;++S)g.push(String(S));else for(var _ in p)!(b&&_==="prototype")&&t.call(p,_)&&g.push(String(_));if(a)for(var $=f(p),j=0;j<s.length;++j)!($&&s[j]==="constructor")&&t.call(p,s[j])&&g.push(s[j]);return g}}return zh=e,zh}var cq=Array.prototype.slice,uq=ZS,GS=Object.keys,lu=GS?function(t){return GS(t)}:lq(),YS=Object.keys;lu.shim=function(){if(Object.keys){var t=function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2);t||(Object.keys=function(r){return uq(r)?YS(cq.call(r)):YS(r)})}else Object.keys=lu;return Object.keys||lu};var Uh=lu,fq=Uh,dq=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",pq=Object.prototype.toString,hq=Array.prototype.concat,JS=hp,mq=function(e){return typeof e=="function"&&pq.call(e)==="[object Function]"},XS=vp(),vq=function(e,t,n,r){if(t in e){if(r===!0){if(e[t]===n)return}else if(!mq(r)||!r())return}XS?JS(e,t,n,!0):JS(e,t,n)},QS=function(e,t){var n=arguments.length>2?arguments[2]:{},r=fq(t);dq&&(r=hq.call(r,Object.getOwnPropertySymbols(t)));for(var i=0;i<r.length;i+=1)vq(e,r[i],t[r[i]],n[r[i]])};QS.supportsDescriptors=!!XS;var ta=QS,gq=Uh,eE=lc(),tE=Mn,nE=Object,yq=tE("Array.prototype.push"),rE=tE("Object.prototype.propertyIsEnumerable"),bq=eE?Object.getOwnPropertySymbols:null,iE=function(t,n){if(t==null)throw new TypeError("target must be an object");var r=nE(t);if(arguments.length===1)return r;for(var i=1;i<arguments.length;++i){var a=nE(arguments[i]),o=gq(a),s=eE&&(Object.getOwnPropertySymbols||bq);if(s)for(var l=s(a),c=0;c<l.length;++c){var u=l[c];rE(a,u)&&yq(o,u)}for(var f=0;f<o.length;++f){var d=o[f];if(rE(a,d)){var p=a[d];r[d]=p}}}return r},qh=iE,xq=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),n={},r=0;r<t.length;++r)n[t[r]]=t[r];var i=Object.assign({},n),a="";for(var o in i)a+=o;return e!==a},wq=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1},aE=function(){return!Object.assign||xq()||wq()?qh:Object.assign},Sq=ta,Eq=aE,_q=function(){var t=Eq();return Sq(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t},kq=ta,$q=Aa,Oq=iE,oE=aE,Tq=_q,Cq=$q.apply(oE()),sE=function(t,n){return Cq(Object,arguments)};kq(sE,{getPolyfill:oE,implementation:Oq,shim:Tq});var Iq=sE,Us=function(){return typeof(function(){}).name=="string"},qs=Object.getOwnPropertyDescriptor;if(qs)try{qs([],"length")}catch{qs=null}Us.functionsHaveConfigurableNames=function(){if(!Us()||!qs)return!1;var t=qs(function(){},"name");return!!t&&!!t.configurable};var Rq=Function.prototype.bind;Us.boundFunctionsHaveNames=function(){return Us()&&typeof Rq=="function"&&(function(){}).bind().name!==""};var Aq=Us,lE=hp,Pq=vp(),jq=Aq.functionsHaveConfigurableNames(),Nq=ci,Dq=function(t,n){if(typeof t!="function")throw new Nq("`fn` is not a function");var r=arguments.length>2&&!!arguments[2];return(!r||jq)&&(Pq?lE(t,"name",n,!0,!0):lE(t,"name",n)),t},Mq=Dq,Lq=ci,Fq=Object,cE=Mq(function(){if(this==null||this!==Fq(this))throw new Lq("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),Bq=cE,zq=ta.supportsDescriptors,Uq=Object.getOwnPropertyDescriptor,uE=function(){if(zq&&/a/mig.flags==="gim"){var t=Uq(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var n="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){n+="d"}}),Object.defineProperty(r,"sticky",{get:function(){n+="y"}}),n==="dy")return t.get}}return Bq},qq=ta.supportsDescriptors,Wq=uE,Hq=Object.getOwnPropertyDescriptor,Vq=Object.defineProperty,Zq=TypeError,fE=Object.getPrototypeOf,Kq=/a/,Gq=function(){if(!qq||!fE)throw new Zq("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=Wq(),n=fE(Kq),r=Hq(n,"flags");return(!r||r.get!==t)&&Vq(n,"flags",{configurable:!0,enumerable:!1,get:t}),t},Yq=ta,Jq=Aa,Xq=cE,dE=uE,Qq=Gq,pE=Jq(dE());Yq(pE,{getPolyfill:dE,implementation:Xq,shim:Qq});var eW=pE,cu={exports:{}},tW=lc,na=function(){return tW()&&!!Symbol.toStringTag},nW=na(),rW=Mn,Wh=rW("Object.prototype.toString"),uu=function(t){return nW&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Wh(t)==="[object Arguments]"},hE=function(t){return uu(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Wh(t)!=="[object Array]"&&Wh(t.callee)==="[object Function]"},iW=function(){return uu(arguments)}();uu.isLegacyArguments=hE;var mE=iW?uu:hE,aW=e0,Ws=Ip(),Kr=ci,Hh={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Kr("`O` is not an object");if(typeof t!="string")throw new Kr("`slot` must be a string");if(Ws.assert(e),!Hh.has(e,t))throw new Kr("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Kr("`O` is not an object");if(typeof t!="string")throw new Kr("`slot` must be a string");var n=Ws.get(e);return n&&n["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Kr("`O` is not an object");if(typeof t!="string")throw new Kr("`slot` must be a string");var n=Ws.get(e);return!!n&&aW(n,"$"+t)},set:function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Kr("`O` is not an object");if(typeof t!="string")throw new Kr("`slot` must be a string");var r=Ws.get(e);r||(r={},Ws.set(e,r)),r["$"+t]=n}};Object.freeze&&Object.freeze(Hh);var oW=Hh,Hs=oW,sW=SyntaxError,vE=typeof StopIteration=="object"?StopIteration:null,lW=function(t){if(!vE)throw new sW("this environment lacks StopIteration");Hs.set(t,"[[Done]]",!1);var n={next:function(){var i=Hs.get(this,"[[Iterator]]"),a=Hs.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(o){if(Hs.set(i,"[[Done]]",!0),o!==vE)throw o;return{done:!0,value:void 0}}}};return Hs.set(n,"[[Iterator]]",t),n},cW={}.toString,gE=Array.isArray||function(e){return cW.call(e)=="[object Array]"},uW=String.prototype.valueOf,fW=function(t){try{return uW.call(t),!0}catch{return!1}},dW=Object.prototype.toString,pW="[object String]",hW=na(),yE=function(t){return typeof t=="string"?!0:typeof t!="object"?!1:hW?fW(t):dW.call(t)===pW},Vh=typeof Map=="function"&&Map.prototype?Map:null,mW=typeof Set=="function"&&Set.prototype?Set:null,fu;Vh||(fu=function(t){return!1});var bE=Vh?Map.prototype.has:null,xE=mW?Set.prototype.has:null;!fu&&!bE&&(fu=function(t){return!1});var wE=fu||function(t){if(!t||typeof t!="object")return!1;try{if(bE.call(t),xE)try{xE.call(t)}catch{return!0}return t instanceof Vh}catch{}return!1},vW=typeof Map=="function"&&Map.prototype?Map:null,Zh=typeof Set=="function"&&Set.prototype?Set:null,du;Zh||(du=function(t){return!1});var SE=vW?Map.prototype.has:null,EE=Zh?Set.prototype.has:null;!du&&!EE&&(du=function(t){return!1});var _E=du||function(t){if(!t||typeof t!="object")return!1;try{if(EE.call(t),SE)try{SE.call(t)}catch{return!0}return t instanceof Zh}catch{}return!1},kE=mE,$E=lW;if(sp()||lc()){var Kh=Symbol.iterator;cu.exports=function(t){if(t!=null&&typeof t[Kh]<"u")return t[Kh]();if(kE(t))return Array.prototype[Kh].call(t)}}else{var gW=gE,yW=yE,OE=vr,bW=OE("%Map%",!0),xW=OE("%Set%",!0),tr=Mn,TE=tr("Array.prototype.push"),CE=tr("String.prototype.charCodeAt"),wW=tr("String.prototype.slice"),SW=function(t,n){var r=t.length;if(n+1>=r)return n+1;var i=CE(t,n);if(i<55296||i>56319)return n+1;var a=CE(t,n+1);return a<56320||a>57343?n+1:n+2},Gh=function(t){var n=0;return{next:function(){var i=n>=t.length,a;return i||(a=t[n],n+=1),{done:i,value:a}}}},IE=function(t,n){if(gW(t)||kE(t))return Gh(t);if(yW(t)){var r=0;return{next:function(){var a=SW(t,r),o=wW(t,r,a);return r=a,{done:a>t.length,value:o}}}}if(n&&typeof t["_es6-shim iterator_"]<"u")return t["_es6-shim iterator_"]()};if(!bW&&!xW)cu.exports=function(t){if(t!=null)return IE(t,!0)};else{var EW=wE,_W=_E,RE=tr("Map.prototype.forEach",!0),AE=tr("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var PE=tr("Map.prototype.iterator",!0),jE=tr("Set.prototype.iterator",!0);var NE=tr("Map.prototype.@@iterator",!0)||tr("Map.prototype._es6-shim iterator_",!0),DE=tr("Set.prototype.@@iterator",!0)||tr("Set.prototype._es6-shim iterator_",!0),kW=function(t){if(EW(t)){if(PE)return $E(PE(t));if(NE)return NE(t);if(RE){var n=[];return RE(t,function(i,a){TE(n,[a,i])}),Gh(n)}}if(_W(t)){if(jE)return $E(jE(t));if(DE)return DE(t);if(AE){var r=[];return AE(t,function(i){TE(r,i)}),Gh(r)}}};cu.exports=function(t){return kW(t)||IE(t)}}}var $W=cu.exports,ME=function(e){return e!==e},LE=function(t,n){return t===0&&n===0?1/t===1/n:!!(t===n||ME(t)&&ME(n))},OW=LE,FE=function(){return typeof Object.is=="function"?Object.is:OW},TW=FE,CW=ta,IW=function(){var t=TW();return CW(Object,{is:t},{is:function(){return Object.is!==t}}),t},RW=ta,AW=Aa,PW=LE,BE=FE,jW=IW,zE=AW(BE(),Object);RW(zE,{getPolyfill:BE,implementation:PW,shim:jW});var NW=zE,DW=Aa,UE=Mn,MW=vr,Yh=MW("%ArrayBuffer%",!0),pu=UE("ArrayBuffer.prototype.byteLength",!0),LW=UE("Object.prototype.toString"),qE=!!Yh&&!pu&&new Yh(0).slice,WE=!!qE&&DW(qE),HE=pu||WE?function(t){if(!t||typeof t!="object")return!1;try{return pu?pu(t):WE(t,0),!0}catch{return!1}}:Yh?function(t){return LW(t)==="[object ArrayBuffer]"}:function(t){return!1},FW=Date.prototype.getDay,BW=function(t){try{return FW.call(t),!0}catch{return!1}},zW=Object.prototype.toString,UW="[object Date]",qW=na(),WW=function(t){return typeof t!="object"||t===null?!1:qW?BW(t):zW.call(t)===UW},Jh=Mn,VE=na(),ZE,KE,Xh,Qh;if(VE){ZE=Jh("Object.prototype.hasOwnProperty"),KE=Jh("RegExp.prototype.exec"),Xh={};var em=function(){throw Xh};Qh={toString:em,valueOf:em},typeof Symbol.toPrimitive=="symbol"&&(Qh[Symbol.toPrimitive]=em)}var HW=Jh("Object.prototype.toString"),VW=Object.getOwnPropertyDescriptor,ZW="[object RegExp]",KW=VE?function(t){if(!t||typeof t!="object")return!1;var n=VW(t,"lastIndex"),r=n&&ZE(n,"value");if(!r)return!1;try{KE(t,Qh)}catch(i){return i===Xh}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:HW(t)===ZW},GW=Mn,GE=GW("SharedArrayBuffer.prototype.byteLength",!0),YW=GE?function(t){if(!t||typeof t!="object")return!1;try{return GE(t),!0}catch{return!1}}:function(t){return!1},JW=Number.prototype.toString,XW=function(t){try{return JW.call(t),!0}catch{return!1}},QW=Object.prototype.toString,eH="[object Number]",tH=na(),nH=function(t){return typeof t=="number"?!0:typeof t!="object"?!1:tH?XW(t):QW.call(t)===eH},YE=Mn,rH=YE("Boolean.prototype.toString"),iH=YE("Object.prototype.toString"),aH=function(t){try{return rH(t),!0}catch{return!1}},oH="[object Boolean]",sH=na(),lH=function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:sH&&Symbol.toStringTag in t?aH(t):iH(t)===oH},tm={exports:{}},cH=Object.prototype.toString,uH=sp();if(uH){var fH=Symbol.prototype.toString,dH=/^Symbol\(.*\)$/,pH=function(t){return typeof t.valueOf()!="symbol"?!1:dH.test(fH.call(t))};tm.exports=function(t){if(typeof t=="symbol")return!0;if(cH.call(t)!=="[object Symbol]")return!1;try{return pH(t)}catch{return!1}}}else tm.exports=function(t){return!1};var hH=tm.exports,nm={exports:{}},JE=typeof BigInt<"u"&&BigInt,mH=function(){return typeof JE=="function"&&typeof BigInt=="function"&&typeof JE(42)=="bigint"&&typeof BigInt(42)=="bigint"},vH=mH();if(vH){var gH=BigInt.prototype.valueOf,yH=function(t){try{return gH.call(t),!0}catch{}return!1};nm.exports=function(t){return t===null||typeof t>"u"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:yH(t)}}else nm.exports=function(t){return!1};var bH=nm.exports,xH=yE,wH=nH,SH=lH,EH=hH,_H=bH,kH=function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(xH(t))return"String";if(wH(t))return"Number";if(SH(t))return"Boolean";if(EH(t))return"Symbol";if(_H(t))return"BigInt"},hu=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,XE=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,mu;hu||(mu=function(t){return!1});var rm=hu?hu.prototype.has:null,im=XE?XE.prototype.has:null;!mu&&!rm&&(mu=function(t){return!1});var $H=mu||function(t){if(!t||typeof t!="object")return!1;try{if(rm.call(t,rm),im)try{im.call(t,im)}catch{return!0}return t instanceof hu}catch{}return!1},am={exports:{}},OH=vr,QE=Mn,TH=OH("%WeakSet%",!0),om=QE("WeakSet.prototype.has",!0);if(om){var sm=QE("WeakMap.prototype.has",!0);am.exports=function(t){if(!t||typeof t!="object")return!1;try{if(om(t,om),sm)try{sm(t,sm)}catch{return!0}return t instanceof TH}catch{}return!1}}else am.exports=function(t){return!1};var CH=am.exports,IH=wE,RH=_E,AH=$H,PH=CH,jH=function(t){if(t&&typeof t=="object"){if(IH(t))return"Map";if(RH(t))return"Set";if(AH(t))return"WeakMap";if(PH(t))return"WeakSet"}return!1},e_=Function.prototype.toString,Qa=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,lm,vu;if(typeof Qa=="function"&&typeof Object.defineProperty=="function")try{lm=Object.defineProperty({},"length",{get:function(){throw vu}}),vu={},Qa(function(){throw 42},null,lm)}catch(e){e!==vu&&(Qa=null)}else Qa=null;var NH=/^\s*class\b/,cm=function(t){try{var n=e_.call(t);return NH.test(n)}catch{return!1}},um=function(t){try{return cm(t)?!1:(e_.call(t),!0)}catch{return!1}},gu=Object.prototype.toString,DH="[object Object]",MH="[object Function]",LH="[object GeneratorFunction]",FH="[object HTMLAllCollection]",BH="[object HTML document.all class]",zH="[object HTMLCollection]",UH=typeof Symbol=="function"&&!!Symbol.toStringTag,qH=!(0 in[,]),fm=function(){return!1};if(typeof document=="object"){var WH=document.all;gu.call(WH)===gu.call(document.all)&&(fm=function(t){if((qH||!t)&&(typeof t>"u"||typeof t=="object"))try{var n=gu.call(t);return(n===FH||n===BH||n===zH||n===DH)&&t("")==null}catch{}return!1})}var HH=Qa?function(t){if(fm(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Qa(t,null,lm)}catch(n){if(n!==vu)return!1}return!cm(t)&&um(t)}:function(t){if(fm(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(UH)return um(t);if(cm(t))return!1;var n=gu.call(t);return n!==MH&&n!==LH&&!/^\[object HTML/.test(n)?!1:um(t)},VH=HH,ZH=Object.prototype.toString,t_=Object.prototype.hasOwnProperty,KH=function(t,n,r){for(var i=0,a=t.length;i<a;i++)t_.call(t,i)&&(r==null?n(t[i],i,t):n.call(r,t[i],i,t))},GH=function(t,n,r){for(var i=0,a=t.length;i<a;i++)r==null?n(t.charAt(i),i,t):n.call(r,t.charAt(i),i,t)},YH=function(t,n,r){for(var i in t)t_.call(t,i)&&(r==null?n(t[i],i,t):n.call(r,t[i],i,t))},JH=function(t,n,r){if(!VH(n))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=r),ZH.call(t)==="[object Array]"?KH(t,n,i):typeof t=="string"?GH(t,n,i):YH(t,n,i)},XH=JH,QH=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],dm=QH,eV=typeof globalThis>"u"?ut:globalThis,tV=function(){for(var t=[],n=0;n<dm.length;n++)typeof eV[dm[n]]=="function"&&(t[t.length]=dm[n]);return t},yu=XH,nV=tV,n_=Aa,pm=Mn,bu=pp,rV=pm("Object.prototype.toString"),r_=na(),i_=typeof globalThis>"u"?ut:globalThis,hm=nV(),mm=pm("String.prototype.slice"),vm=Object.getPrototypeOf,iV=pm("Array.prototype.indexOf",!0)||function(t,n){for(var r=0;r<t.length;r+=1)if(t[r]===n)return r;return-1},xu={__proto__:null};r_&&bu&&vm?yu(hm,function(e){var t=new i_[e];if(Symbol.toStringTag in t){var n=vm(t),r=bu(n,Symbol.toStringTag);if(!r){var i=vm(n);r=bu(i,Symbol.toStringTag)}xu["$"+e]=n_(r.get)}}):yu(hm,function(e){var t=new i_[e],n=t.slice||t.set;n&&(xu["$"+e]=n_(n))});var aV=function(t){var n=!1;return yu(xu,function(r,i){if(!n)try{"$"+r(t)===i&&(n=mm(i,1))}catch{}}),n},oV=function(t){var n=!1;return yu(xu,function(r,i){if(!n)try{r(t),n=mm(i,1)}catch{}}),n},sV=function(t){if(!t||typeof t!="object")return!1;if(!r_){var n=mm(rV(t),8,-1);return iV(hm,n)>-1?n:n!=="Object"?!1:oV(t)}return bu?aV(t):null},lV=Mn,a_=lV("ArrayBuffer.prototype.byteLength",!0),cV=HE,uV=function(t){return cV(t)?a_?a_(t):t.byteLength:NaN},o_=Iq,Or=Mn,s_=eW,fV=vr,eo=$W,dV=Ip,l_=NW,c_=mE,u_=gE,f_=HE,d_=WW,p_=KW,h_=YW,m_=Uh,v_=kH,g_=jH,y_=sV,b_=uV,x_=Or("SharedArrayBuffer.prototype.byteLength",!0),w_=Or("Date.prototype.getTime"),gm=Object.getPrototypeOf,S_=Or("Object.prototype.toString"),wu=fV("%Set%",!0),ym=Or("Map.prototype.has",!0),Su=Or("Map.prototype.get",!0),E_=Or("Map.prototype.size",!0),Eu=Or("Set.prototype.add",!0),__=Or("Set.prototype.delete",!0),_u=Or("Set.prototype.has",!0),ku=Or("Set.prototype.size",!0);function k_(e,t,n,r){for(var i=eo(e),a;(a=i.next())&&!a.done;)if(nr(t,a.value,n,r))return __(e,a.value),!0;return!1}function $_(e){if(typeof e>"u")return null;if(typeof e!="object")return typeof e=="symbol"?!1:typeof e=="string"||typeof e=="number"?+e==+e:!0}function pV(e,t,n,r,i,a){var o=$_(n);if(o!=null)return o;var s=Su(t,o),l=o_({},i,{strict:!1});return typeof s>"u"&&!ym(t,o)||!nr(r,s,l,a)?!1:!ym(e,o)&&nr(r,s,l,a)}function hV(e,t,n){var r=$_(n);return r??(_u(t,r)&&!_u(e,r))}function O_(e,t,n,r,i,a){for(var o=eo(e),s,l;(s=o.next())&&!s.done;)if(l=s.value,nr(n,l,i,a)&&nr(r,Su(t,l),i,a))return __(e,l),!0;return!1}function nr(e,t,n,r){var i=n||{};if(i.strict?l_(e,t):e===t)return!0;var a=v_(e),o=v_(t);if(a!==o)return!1;if(!e||!t||typeof e!="object"&&typeof t!="object")return i.strict?l_(e,t):e==t;var s=r.has(e),l=r.has(t),c;if(s&&l){if(r.get(e)===r.get(t))return!0}else c={};return s||r.set(e,c),l||r.set(t,c),gV(e,t,i,r)}function T_(e){return!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function mV(e,t,n,r){if(ku(e)!==ku(t))return!1;for(var i=eo(e),a=eo(t),o,s,l;(o=i.next())&&!o.done;)if(o.value&&typeof o.value=="object")l||(l=new wu),Eu(l,o.value);else if(!_u(t,o.value)){if(n.strict||!hV(e,t,o.value))return!1;l||(l=new wu),Eu(l,o.value)}if(l){for(;(s=a.next())&&!s.done;)if(s.value&&typeof s.value=="object"){if(!k_(l,s.value,n.strict,r))return!1}else if(!n.strict&&!_u(e,s.value)&&!k_(l,s.value,n.strict,r))return!1;return ku(l)===0}return!0}function vV(e,t,n,r){if(E_(e)!==E_(t))return!1;for(var i=eo(e),a=eo(t),o,s,l,c,u,f;(o=i.next())&&!o.done;)if(c=o.value[0],u=o.value[1],c&&typeof c=="object")l||(l=new wu),Eu(l,c);else if(f=Su(t,c),typeof f>"u"&&!ym(t,c)||!nr(u,f,n,r)){if(n.strict||!pV(e,t,c,u,n,r))return!1;l||(l=new wu),Eu(l,c)}if(l){for(;(s=a.next())&&!s.done;)if(c=s.value[0],f=s.value[1],c&&typeof c=="object"){if(!O_(l,e,c,f,n,r))return!1}else if(!n.strict&&(!e.has(c)||!nr(Su(e,c),f,n,r))&&!O_(l,e,c,f,o_({},n,{strict:!1}),r))return!1;return ku(l)===0}return!0}function gV(e,t,n,r){var i,a;if(typeof e!=typeof t||e==null||t==null||S_(e)!==S_(t)||c_(e)!==c_(t))return!1;var o=u_(e),s=u_(t);if(o!==s)return!1;var l=e instanceof Error,c=t instanceof Error;if(l!==c||(l||c)&&(e.name!==t.name||e.message!==t.message))return!1;var u=p_(e),f=p_(t);if(u!==f||(u||f)&&(e.source!==t.source||s_(e)!==s_(t)))return!1;var d=d_(e),p=d_(t);if(d!==p||(d||p)&&w_(e)!==w_(t)||n.strict&&gm&&gm(e)!==gm(t))return!1;var h=y_(e),m=y_(t);if(h!==m)return!1;if(h||m){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}var y=T_(e),v=T_(t);if(y!==v)return!1;if(y||v){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}var g=f_(e),b=f_(t);if(g!==b)return!1;if(g||b)return b_(e)!==b_(t)?!1:typeof Uint8Array=="function"&&nr(new Uint8Array(e),new Uint8Array(t),n,r);var k=h_(e),S=h_(t);if(k!==S)return!1;if(k||S)return x_(e)!==x_(t)?!1:typeof Uint8Array=="function"&&nr(new Uint8Array(e),new Uint8Array(t),n,r);if(typeof e!=typeof t)return!1;var _=m_(e),$=m_(t);if(_.length!==$.length)return!1;for(_.sort(),$.sort(),i=_.length-1;i>=0;i--)if(_[i]!=$[i])return!1;for(i=_.length-1;i>=0;i--)if(a=_[i],!nr(e[a],t[a],n,r))return!1;var j=g_(e),z=g_(t);return j!==z?!1:j==="Set"||z==="Set"?mV(e,t,n,r):j==="Map"?vV(e,t,n,r):!0}var yV=function(t,n,r){return nr(t,n,r,dV())};const bV=Ze(yV),xV=({children:e,...t})=>{const n=D.useRef(),r=D.useRef(null),i=fU({...t,messageContainerRef:r});return n.current||(n.current=i),C.jsx(Q1.Provider,{value:{...t.configuration},children:C.jsx(G1.Provider,{value:n.current,children:C.jsx(wV,{children:e})})})},wV=({children:e})=>{const t=Me(b=>b.client),n=Me(b=>b.addMessage),r=Me(b=>b.setMessages),i=Me(b=>b.configuration),a=Me(b=>b.setConnected),o=Me(b=>b.userData),s=Me(b=>b.userName),l=Me(b=>b.userPictureUrl),c=Me(b=>b.setIsTyping),u=Me(b=>b.getMessages),f=Me(b=>b.setHeaderMessage),d=Me(b=>b.setDisableComposer),p=On(b=>b.setConversationId),h=On(b=>b.user),m=On(b=>b.conversationId),y=On(b=>b.setUser),[v,g]=D.useState(0);return D.useEffect(()=>{if(t)return t.on("messageSent",b=>{const k=u(),S=k[k.length-1];(k.length===0||!bV(S==null?void 0:S.block,Oo(b).payload))&&n({direction:"outgoing",sender:{name:"You"},timestamp:new Date,block:Oo(b).payload,disableInput:!1})})},[m]),D.useEffect(()=>{if(t)return t.on("message",b=>{try{const{payload:k,disableInput:S,conversationId:_,sentOn:$,...j}=b;if(m!==_)return;c(!1,0),n({...j,direction:"incoming",sender:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date($),block:k,disableInput:S})}catch{console.error("Invalid message payload")}})},[m]),D.useEffect(()=>{if(t)return t.on("conversation",b=>{p(b)})},[]),oh(async()=>{if(t)return t.on("error",b=>{console.error("Connection Error",b),g(k=>k+1)})}),oh(async()=>{if(!t||m&&t.conversationId===m)return;let b;try{f("Connecting..."),d(!0),b=await oq(()=>t.connect(h,o,{name:s,pictureUrl:l}),{maxDelay:1e4,numOfAttempts:1/0}),f(void 0),d(!1),a(!0)}catch(S){console.warn(S),f("Connection failed. Please try again later."),a(!1);return}y(b),m&&await t.conversationExists(m)?await t.switchConversation(m):await t.newConversation();const k=[];for(const S of await t.listMessages())try{const{payload:_,authorId:$,sentOn:j,disableInput:z,...O}=S,N=$===t.userId?"outgoing":"incoming";k.push({...O,direction:N,sender:N==="outgoing"?{name:"You"}:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date(j),block:_,disableInput:z})}catch{console.error("Invalid message payload")}return r(k.reverse()),()=>{t.disconnect()}},[v,m]),C.jsx(C.Fragment,{children:e})};function Gr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function SV(e,t){const n=w.createContext(t),r=a=>{const{children:o,...s}=a,l=w.useMemo(()=>s,Object.values(s));return C.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function i(a){const o=w.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function C_(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),l=n.length;n=[...n,o];const c=f=>{var v;const{scope:d,children:p,...h}=f,m=((v=d==null?void 0:d[e])==null?void 0:v[l])||s,y=w.useMemo(()=>h,Object.values(h));return C.jsx(m.Provider,{value:y,children:p})};c.displayName=a+"Provider";function u(f,d){var m;const p=((m=d==null?void 0:d[e])==null?void 0:m[l])||s,h=w.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[c,u]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,EV(i,...t)]}function EV(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(a)[`__scope${c}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var _V=w.useId||(()=>{}),kV=0;function $u(e){const[t,n]=w.useState(_V());return pa(()=>{e||n(r=>r??String(kV++))},[e]),e||(t?`radix-${t}`:"")}function I_({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=$V({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=ni(n),l=w.useCallback(c=>{if(a){const f=typeof c=="function"?c(e):c;f!==e&&s(f)}else i(c)},[a,e,i,s]);return[o,l]}function $V({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,i=w.useRef(r),a=ni(t);return w.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function OV(e,t=globalThis==null?void 0:globalThis.document){const n=ni(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var TV="DismissableLayer",bm="dismissableLayer.update",CV="dismissableLayer.pointerDownOutside",IV="dismissableLayer.focusOutside",R_,A_=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),P_=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,c=w.useContext(A_),[u,f]=w.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=w.useState({}),h=ri(t,$=>f($)),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(y),g=u?m.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,k=g>=v,S=PV($=>{const j=$.target,z=[...c.branches].some(O=>O.contains(j));!k||z||(i==null||i($),o==null||o($),$.defaultPrevented||s==null||s())},d),_=jV($=>{const j=$.target;[...c.branches].some(O=>O.contains(j))||(a==null||a($),o==null||o($),$.defaultPrevented||s==null||s())},d);return OV($=>{g===c.layers.size-1&&(r==null||r($),!$.defaultPrevented&&s&&($.preventDefault(),s()))},d),w.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(R_=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),j_(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=R_)}},[u,d,n,c]),w.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),j_())},[u,c]),w.useEffect(()=>{const $=()=>p({});return document.addEventListener(bm,$),()=>document.removeEventListener(bm,$)},[]),C.jsx(pn.div,{...l,ref:h,style:{pointerEvents:b?k?"auto":"none":void 0,...e.style},onFocusCapture:Gr(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Gr(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Gr(e.onPointerDownCapture,S.onPointerDownCapture)})});P_.displayName=TV;var RV="DismissableLayerBranch",AV=w.forwardRef((e,t)=>{const n=w.useContext(A_),r=w.useRef(null),i=ri(t,r);return w.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),C.jsx(pn.div,{...e,ref:i})});AV.displayName=RV;function PV(e,t=globalThis==null?void 0:globalThis.document){const n=ni(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){N_(CV,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function jV(e,t=globalThis==null?void 0:globalThis.document){const n=ni(e),r=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!r.current&&N_(IV,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function j_(){const e=new CustomEvent(bm);document.dispatchEvent(e)}function N_(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?bR(i,a):i.dispatchEvent(a)}var xm="focusScope.autoFocusOnMount",wm="focusScope.autoFocusOnUnmount",D_={bubbles:!1,cancelable:!0},NV="FocusScope",M_=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=w.useState(null),c=ni(i),u=ni(a),f=w.useRef(null),d=ri(t,m=>l(m)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let m=function(b){if(p.paused||!s)return;const k=b.target;s.contains(k)?f.current=k:Oi(f.current,{select:!0})},y=function(b){if(p.paused||!s)return;const k=b.relatedTarget;k!==null&&(s.contains(k)||Oi(f.current,{select:!0}))},v=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&Oi(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const g=new MutationObserver(v);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),g.disconnect()}}},[r,s,p.paused]),w.useEffect(()=>{if(s){B_.add(p);const m=document.activeElement;if(!s.contains(m)){const v=new CustomEvent(xm,D_);s.addEventListener(xm,c),s.dispatchEvent(v),v.defaultPrevented||(DV(zV(L_(s)),{select:!0}),document.activeElement===m&&Oi(s))}return()=>{s.removeEventListener(xm,c),setTimeout(()=>{const v=new CustomEvent(wm,D_);s.addEventListener(wm,u),s.dispatchEvent(v),v.defaultPrevented||Oi(m??document.body,{select:!0}),s.removeEventListener(wm,u),B_.remove(p)},0)}}},[s,c,u,p]);const h=w.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(y&&v){const g=m.currentTarget,[b,k]=MV(g);b&&k?!m.shiftKey&&v===k?(m.preventDefault(),n&&Oi(b,{select:!0})):m.shiftKey&&v===b&&(m.preventDefault(),n&&Oi(k,{select:!0})):v===g&&m.preventDefault()}},[n,r,p.paused]);return C.jsx(pn.div,{tabIndex:-1,...o,ref:d,onKeyDown:h})});M_.displayName=NV;function DV(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Oi(r,{select:t}),document.activeElement!==n)return}function MV(e){const t=L_(e),n=F_(t,e),r=F_(t.reverse(),e);return[n,r]}function L_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function F_(e,t){for(const n of e)if(!LV(n,{upTo:t}))return n}function LV(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function FV(e){return e instanceof HTMLInputElement&&"select"in e}function Oi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&FV(e)&&t&&e.select()}}var B_=BV();function BV(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=z_(e,t),e.unshift(t)},remove(t){var n;e=z_(e,t),(n=e[0])==null||n.resume()}}}function z_(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function zV(e){return e.filter(t=>t.tagName!=="A")}function UV(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var Ou=e=>{const{present:t,children:n}=e,r=qV(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),a=ri(r.ref,WV(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:a}):null};Ou.displayName="Presence";function qV(e){const[t,n]=w.useState(),r=w.useRef({}),i=w.useRef(e),a=w.useRef("none"),o=e?"mounted":"unmounted",[s,l]=UV(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=Tu(r.current);a.current=s==="mounted"?c:"none"},[s]),pa(()=>{const c=r.current,u=i.current;if(u!==e){const d=a.current,p=Tu(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&d!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),pa(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=p=>{const m=Tu(r.current).includes(p.animationName);if(p.target===t&&m&&(l("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},d=p=>{p.target===t&&(a.current=Tu(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Tu(e){return(e==null?void 0:e.animationName)||"none"}function WV(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sm=0;function HV(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??U_()),document.body.insertAdjacentElement("beforeend",e[1]??U_()),Sm++,()=>{Sm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Sm--}},[])}function U_(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Cu="right-scroll-bar-position",Iu="width-before-scroll-bar",VV="with-scroll-bars-hidden",ZV="--removed-body-scroll-bar-size";function Em(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function KV(e,t){var n=D.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var GV=typeof window<"u"?w.useLayoutEffect:w.useEffect,q_=new WeakMap;function YV(e,t){var n=KV(null,function(r){return e.forEach(function(i){return Em(i,r)})});return GV(function(){var r=q_.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||Em(s,null)}),a.forEach(function(s){i.has(s)||Em(s,o)})}q_.set(n,e)},[e]),n}function JV(e){return e}function XV(e,t){t===void 0&&(t=JV);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var l=function(){var u=o;o=[],u.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return i}function QV(e){e===void 0&&(e={});var t=XV(null);return t.options=Bn({async:!0,ssr:!1},e),t}var W_=function(e){var t=e.sideCar,n=D1(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,Bn({},n))};W_.isSideCarExport=!0;function e8(e,t){return e.useMedium(t),W_}var H_=QV(),_m=function(){},Ru=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:_m,onWheelCapture:_m,onTouchMoveCapture:_m}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,d=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,g=e.gapMode,b=D1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=d,S=YV([n,t]),_=Bn(Bn({},b),i);return w.createElement(w.Fragment,null,u&&w.createElement(k,{sideCar:H_,removeScrollBar:c,shards:f,noIsolation:p,inert:h,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:g}),o?w.cloneElement(w.Children.only(s),Bn(Bn({},_),{ref:S})):w.createElement(v,Bn({},_,{className:l,ref:S}),s))});Ru.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ru.classNames={fullWidth:Iu,zeroRight:Cu};var t8=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function n8(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=t8();return t&&e.setAttribute("nonce",t),e}function r8(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function i8(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var a8=function(){var e=0,t=null;return{add:function(n){e==0&&(t=n8())&&(r8(t,n),i8(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},o8=function(){var e=a8();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},V_=function(){var e=o8(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},s8={left:0,top:0,right:0,gap:0},km=function(e){return parseInt(e||"",10)||0},l8=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[km(n),km(r),km(i)]},c8=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return s8;var t=l8(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},u8=V_(),to="data-scroll-locked",f8=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
283
|
+
`);const g=v.state[s];if(g==null)return;JSON.stringify(i.getState())!==JSON.stringify(g)&&p(g);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(v)});case"DISPATCH":switch(m.payload.type){case"RESET":return p(h),s===void 0?u==null?void 0:u.init(i.getState()):u==null?void 0:u.init(Vc(l.name));case"COMMIT":if(s===void 0){u==null||u.init(i.getState());return}return u==null?void 0:u.init(Vc(l.name));case"ROLLBACK":return ph(m.state,v=>{if(s===void 0){p(v),u==null||u.init(i.getState());return}p(v[s]),u==null||u.init(Vc(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ph(m.state,v=>{if(s===void 0){p(v);return}JSON.stringify(i.getState())!==JSON.stringify(v[s])&&p(v[s])});case"IMPORT_STATE":{const{nextLiftedState:v}=m.payload,g=(y=v.computedStates.slice(-1)[0])==null?void 0:y.state;if(!g)return;p(s===void 0?g:g[s]),u==null||u.send(null,v);return}case"PAUSE_RECORDING":return d=!d}return}}),h},ph=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function sU(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var a;const o=l=>l===null?null:JSON.parse(l,void 0),s=(a=n.getItem(i))!=null?a:null;return s instanceof Promise?s.then(o):o(s)},setItem:(i,a)=>n.setItem(i,JSON.stringify(a,void 0)),removeItem:i=>n.removeItem(i)}}const js=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return js(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return js(r)(n)}}}},lU=(e,t)=>(n,r,i)=>{let a={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:y=>y,version:0,merge:(y,v)=>({...v,...y}),...t},o=!1;const s=new Set,l=new Set;let c;try{c=a.getStorage()}catch{}if(!c)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...y)},r,i);const u=js(a.serialize),f=()=>{const y=a.partialize({...r()});let v;const g=u({state:y,version:a.version}).then(b=>c.setItem(a.name,b)).catch(b=>{v=b});if(v)throw v;return g},d=i.setState;i.setState=(y,v)=>{d(y,v),f()};const p=e((...y)=>{n(...y),f()},r,i);let h;const m=()=>{var y;if(!c)return;o=!1,s.forEach(g=>g(r()));const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,r()))||void 0;return js(c.getItem.bind(c))(a.name).then(g=>{if(g)return a.deserialize(g)}).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==a.version){if(a.migrate)return a.migrate(g.state,g.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return g.state}).then(g=>{var b;return h=a.merge(g,(b=r())!=null?b:p),n(h,!0),f()}).then(()=>{v==null||v(h,void 0),o=!0,l.forEach(g=>g(h))}).catch(g=>{v==null||v(void 0,g)})};return i.persist={setOptions:y=>{a={...a,...y},y.getStorage&&(c=y.getStorage())},clearStorage:()=>{c==null||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>m(),hasHydrated:()=>o,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(l.add(y),()=>{l.delete(y)})},m(),h||p},cU=(e,t)=>(n,r,i)=>{let a={storage:sU(()=>localStorage),partialize:m=>m,version:0,merge:(m,y)=>({...y,...m}),...t},o=!1;const s=new Set,l=new Set;let c=a.storage;if(!c)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...m)},r,i);const u=()=>{const m=a.partialize({...r()});return c.setItem(a.name,{state:m,version:a.version})},f=i.setState;i.setState=(m,y)=>{f(m,y),u()};const d=e((...m)=>{n(...m),u()},r,i);i.getInitialState=()=>d;let p;const h=()=>{var m,y;if(!c)return;o=!1,s.forEach(g=>{var b;return g((b=r())!=null?b:d)});const v=((y=a.onRehydrateStorage)==null?void 0:y.call(a,(m=r())!=null?m:d))||void 0;return js(c.getItem.bind(c))(a.name).then(g=>{if(g)if(typeof g.version=="number"&&g.version!==a.version){if(a.migrate)return[!0,a.migrate(g.state,g.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,g.state];return[!1,void 0]}).then(g=>{var b;const[k,S]=g;if(p=a.merge(S,(b=r())!=null?b:d),n(p,!0),k)return u()}).then(()=>{v==null||v(p,void 0),p=r(),o=!0,l.forEach(g=>g(p))}).catch(g=>{v==null||v(void 0,g)})};return i.persist={setOptions:m=>{a={...a,...m},m.storage&&(c=m.storage)},clearStorage:()=>{c==null||c.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(l.add(m),()=>{l.delete(m)})},a.skipHydration||h(),p||d},uU=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Hc?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),lU(e,t)):cU(e,t),On=aU()(G1(uU((e,t)=>({messageHistory:{},addMessageToHistory:({userId:n,message:r})=>e(i=>({...i,messageHistory:{...i.messageHistory,[n]:[r,...(i.messageHistory[n]??[]).slice(0,100)]}})),clientMode:"",setClientMode:n=>{const{clearAll:r,clientMode:i}=t();i!==n&&r(),e(a=>({...a,clientMode:n}))},setUser:n=>e(r=>({...r,user:n})),setConversationId:n=>e(r=>({...r,conversationId:n})),clearAll:()=>{e(n=>({...n,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),Y1=D.createContext(null),fU=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:void 0,messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},n=e==null?void 0:e.client,r=e==null?void 0:e.conversationId,i=On.getState().setClientMode,a=On.getState().setConversationId;return n&&i(n.mode),D.useEffect(()=>{r&&a(r)},[r]),F1()(G1((o,s)=>{const l=f=>{const d=On.getState().conversationId;if(d)return o(p=>{const h=p.messages[d]??[];return{...p,messages:{...p.messages,[d]:[...h.filter(m=>m.id!==f.id),{id:ko(),...f}]}}})},c=f=>{const d=On.getState().conversationId;if(d)return o(p=>({...p,messages:{...p.messages,[d]:f}}))},u=On.getState().addMessageToHistory;return{...t,...e,eventEmitter:zR,client:n,sendFile:f=>s().client.sendFile(f),sendTextMessage:async(f,d)=>{const p=s().client;l({id:ko(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:f,value:d}}}),p&&await p.sendMessage({type:"text",text:f,value:d}),p!=null&&p.userId&&u({message:f,userId:p.userId})},sendMessage:async f=>{const d=s().client;l({id:ko(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:Oo(f).payload}),d&&await d.sendMessage(f),d!=null&&d.userId&&f.type==="text"&&u({message:f.text,userId:d.userId})},on:(f,d)=>{const p=s().client;return p?p.on(f,d):()=>{}},getClientId:()=>{var f;return(f=s().client)==null?void 0:f.clientId},setHeaderMessage:f=>o({headerMessage:f}),setDisableComposer:f=>o({disableComposer:f}),setState:f=>o(d=>({...d,...f})),setMessages:c,getMessages:()=>s().messages[On.getState().conversationId??""]??[],setIsTyping:(f,d)=>{o(p=>({...p,isTyping:f})),f&&(o(p=>({...p,lastTypingHeartbeat:new Date})),d&&setTimeout(()=>{const p=s().lastTypingHeartbeat;p&&new Date().getTime()-p.getTime()>d&&o(h=>({...h,isTyping:!1}))},d+100))},setLastTypingHeartbeat:f=>o(d=>({...d,lastTypingHeartbeat:f})),addMessage:l,setConnected:f=>o(d=>({...d,connected:f})),restartConversation:async()=>{const f=s().client,d=s().setMessages;f&&(await f.newConversation(),d([]))}}},{name:"webchatStore"}))};function Me(e){const t=D.useContext(Y1);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return K1(t,e)}const dU=({text:e,buttonValue:t,type:n,variant:r,groupId:i,reusable:a,...o})=>{const s=Me(g=>g.eventEmitter),l=Me(g=>g.sendTextMessage),c=Me(g=>g.isReadOnly),[u,f]=D.useState(!1),[d,p]=D.useState(!1),[h,m]=D.useState(!1),{message:{blocks:{button:y}}}=yt;D.useEffect(()=>{if(i)return s.on(`button-group-${i}-click`,()=>{p(!0),a||m(!0)})},[s,i,a]);function v(){i&&s.emit(`button-group-${i}-click`),f(!0),a||m(!0),r!=="link"&&l(e,t)}return C.jsx(pU,{...o,variant:r,onClick:v,disabled:h||c,"data-activated":u?"":void 0,"data-group-activated":d?"":void 0,"data-type":r,value:t,...y,children:e})},pU=e=>{if(e.variant==="link"){const{value:r,variant:i,...a}=e;return C.jsx("a",{...a,href:r,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...n}=e;return C.jsx("button",{type:"button",...n})},hU=D.forwardRef(({block:e,type:t,direction:n,timestamp:r,sender:i,metadata:a,...o},s)=>{const{message:{blocks:{bubble:l}}}=yt;return C.jsx("div",{...o,...l,ref:s,children:C.jsx(Xa,{direction:n,timestamp:r,sender:i,block:e,metadata:a})})}),J1=D.createContext(null);function mU(){const e=D.useContext(J1);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const X1=D.createContext(null);function Q1(){const e=D.useContext(X1);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const eS=D.createContext(null);function tS(){const e=D.useContext(eS);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const vU=D.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const a=D.useId(),{setIsLoading:o}=mU(),[s,l]=D.useState(n),[c,u]=D.useState(!1),{message:{blocks:{image:f}}}=yt;return D.useLayoutEffect(()=>{o(d=>[...d,a])},[]),oh(async()=>{if(e&&s==="auto"){try{const{width:d,height:p}=await G4(e);l(gU(d,p))}catch(d){l("square"),console.error(d)}o(d=>d.filter(p=>p!==a))}},[e]),C.jsxs(C.Fragment,{children:[c?null:C.jsx("div",{"data-orientation":s,...f.placeholder}),C.jsx("img",{"data-orientation":s,"data-loaded":c,...r,...f.image,src:e,alt:"",ref:i,loading:"lazy",onLoad:()=>{u(!0)}})]})});function gU(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((a,o)=>Math.abs(n[o]-r)<Math.abs(n[a]-r)?o:a)}const yU=D.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{video:i}}}=yt;return C.jsx("div",{children:C.jsx("video",{...n,controls:!0,src:e,...i,ref:r})})}),bU=D.forwardRef(({url:e,type:t,...n},r)=>{const{message:{blocks:{audio:i}}}=yt;return C.jsx("div",{children:C.jsx("audio",{...n,controls:!0,src:e,...i,ref:r})})});function xU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const wU=w.forwardRef(xU);function SU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M15.312 11.424a5.5 5.5 0 0 1-9.201 2.466l-.312-.311h2.433a.75.75 0 0 0 0-1.5H3.989a.75.75 0 0 0-.75.75v4.242a.75.75 0 0 0 1.5 0v-2.43l.31.31a7 7 0 0 0 11.712-3.138.75.75 0 0 0-1.449-.39Zm1.23-3.723a.75.75 0 0 0 .219-.53V2.929a.75.75 0 0 0-1.5 0V5.36l-.31-.31A7 7 0 0 0 3.239 8.188a.75.75 0 1 0 1.448.389A5.5 5.5 0 0 1 13.89 6.11l.311.31h-2.432a.75.75 0 0 0 0 1.5h4.243a.75.75 0 0 0 .53-.219Z",clipRule:"evenodd"}))}const EU=w.forwardRef(SU);function _U({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const kU=w.forwardRef(_U);function $U({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M4.5 2A1.5 1.5 0 0 0 3 3.5v13A1.5 1.5 0 0 0 4.5 18h11a1.5 1.5 0 0 0 1.5-1.5V7.621a1.5 1.5 0 0 0-.44-1.06l-4.12-4.122A1.5 1.5 0 0 0 11.378 2H4.5Zm4.75 6.75a.75.75 0 0 1 1.5 0v2.546l.943-1.048a.75.75 0 0 1 1.114 1.004l-2.25 2.5a.75.75 0 0 1-1.114 0l-2.25-2.5a.75.75 0 1 1 1.114-1.004l.943 1.048V8.75Z",clipRule:"evenodd"}))}const OU=w.forwardRef($U);function TU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"m9.69 18.933.003.001C9.89 19.02 10 19 10 19s.11.02.308-.066l.002-.001.006-.003.018-.008a5.741 5.741 0 0 0 .281-.14c.186-.096.446-.24.757-.433.62-.384 1.445-.966 2.274-1.765C15.302 14.988 17 12.493 17 9A7 7 0 1 0 3 9c0 3.492 1.698 5.988 3.355 7.584a13.731 13.731 0 0 0 2.273 1.765 11.842 11.842 0 0 0 .976.544l.062.029.018.008.006.003ZM10 11.25a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5Z",clipRule:"evenodd"}))}const CU=w.forwardRef(TU),IU=D.forwardRef(({type:e,latitude:t,longitude:n,title:r,...i},a)=>{const o=`https://www.google.com/maps/search/?api=1&query=${t},${n}`,{message:{blocks:{location:s}}}=yt;return C.jsxs("a",{...i,...s.container,href:o,type:"_blank",rel:"noopener",ref:a,children:[C.jsx("p",{...s.title,children:r}),C.jsx(CU,{...s.icon})]})}),RU=D.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,direction:i,sender:a,timestamp:o,metadata:s,...l},c)=>{const{message:{blocks:{column:u}}}=yt;return C.jsx("div",{"data-horizontal":n,"data-vertical":r,...l,...u,ref:c,children:e.map((f,d)=>C.jsx(Xa,{block:f,direction:i,sender:a,timestamp:o,metadata:s},d))})}),AU=D.forwardRef(({blocks:e,type:t,horizontalAlignment:n,verticalAlignment:r,direction:i,sender:a,timestamp:o,metadata:s,...l},c)=>{const{message:{blocks:{row:u}}}=yt;return C.jsx("div",{"data-horizontal":n,"data-vertical":r,...l,...u,ref:c,children:e.map((f,d)=>C.jsx(Xa,{block:f,direction:i,sender:a,timestamp:o,metadata:s},d))})});function PU(e){return Object.prototype.toString.call(e)==="[object Object]"}function nS(e){return PU(e)||Array.isArray(e)}function jU(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function hh(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==a?!1:n.every(o=>{const s=e[o],l=t[o];return typeof s=="function"?`${s}`==`${l}`:!nS(s)||!nS(l)?s===l:hh(s,l)})}function rS(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function NU(e,t){if(e.length!==t.length)return!1;const n=rS(e),r=rS(t);return n.every((i,a)=>{const o=r[a];return hh(i,o)})}function mh(e){return typeof e=="number"}function iS(e){return typeof e=="string"}function vh(e){return typeof e=="boolean"}function aS(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ot(e){return Math.abs(e)}function gh(e){return Math.sign(e)}function Zc(e,t){return Ot(e-t)}function DU(e,t){if(e===0||t===0||Ot(e)<=Ot(t))return 0;const n=Zc(Ot(e),Ot(t));return Ot(n/e)}function Ns(e){return Gc(e).map(Number)}function Vr(e){return e[Kc(e)]}function Kc(e){return Math.max(0,e.length-1)}function Gc(e){return Object.keys(e)}function oS(e,t){return[e,t].reduce((n,r)=>(Gc(r).forEach(i=>{const a=n[i],o=r[i],s=aS(a)&&aS(o);n[i]=s?oS(a,o):o}),n),{})}function sS(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function MU(e,t){const n={start:r,center:i,end:a};function r(){return 0}function i(c){return a(c)/2}function a(c){return t-c}function o(){return t*Number(e)}function s(c){return mh(e)?o():n[e](c)}return{measure:s}}function LU(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),a=l();function o(u){const{width:f,height:d}=u;return n==="x"?f:d}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:a,measureSize:o}}function Ei(e,t){const n=Ot(e-t);function r(c){return c<e}function i(c){return c>t}function a(c){return r(c)||i(c)}function o(c){return a(c)?r(c)?e:t:c}function s(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:o,reachedAny:a,reachedMax:i,reachedMin:r,removeOffset:s}}function lS(e,t,n){const{constrain:r}=Ei(0,e),i=e+1;let a=o(t);function o(d){return n?Ot((i+d)%i):r(d)}function s(){return a}function l(d){return a=o(d),f}function c(d){return u().set(s()+d)}function u(){return lS(e,s(),n)}const f={get:s,set:l,add:c,clone:u};return f}function FU(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function Ds(){let e=[];function t(i,a,o,s={passive:!0}){return i.addEventListener(a,o,s),e.push(()=>i.removeEventListener(a,o,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function BU(e,t,n,r,i,a,o,s,l,c,u,f,d,p,h,m,y,v,g){const{cross:b}=e,k=["INPUT","SELECT","TEXTAREA"],S={passive:!1},_=Ds(),$=Ds(),j=Ei(50,225).constrain(h.measure(20)),z={mouse:300,touch:400},O={mouse:500,touch:600},N=m?43:25;let W=!1,L=0,U=0,M=!1,I=!1,H=!1,B=!1;function A(X,Z){if(!Z)return;function de(Ce){(vh(Z)||Z(X,Ce))&&oe(Ce)}const ve=n;_.add(ve,"dragstart",Ce=>Ce.preventDefault(),S).add(ve,"touchmove",()=>{},S).add(ve,"touchend",()=>{}).add(ve,"touchstart",de).add(ve,"mousedown",de).add(ve,"touchcancel",le).add(ve,"contextmenu",le).add(ve,"click",pe,!0)}function x(){_.clear(),$.clear()}function q(){const X=B?r:n;$.add(X,"touchmove",ne,S).add(X,"touchend",le).add(X,"mousemove",ne,S).add(X,"mouseup",le)}function K(X){const Z=X.nodeName||"";return k.includes(Z)}function E(){return(m?O:z)[B?"mouse":"touch"]}function Q(X,Z){const de=d.add(gh(X)*-1),ve=f.byDistance(X,!m).distance;return m||Ot(X)<j?ve:v&&Z?ve*.5:f.byIndex(de.get(),0).distance}function oe(X){const Z=sS(X,i);B=Z,!(Z&&X.button!==0)&&(K(X.target)||(H=m&&Z&&!X.buttons&&W,W=Zc(a.get(),s.get())>=2,M=!0,o.pointerDown(X),u.useFriction(0).useDuration(0),a.set(s),q(),L=o.readPoint(X),U=o.readPoint(X,b),p.emit("pointerDown")))}function ne(X){const Z=o.readPoint(X),de=o.readPoint(X,b),ve=Zc(Z,L),Ce=Zc(de,U);if(!I&&!B&&(!X.cancelable||(I=ve>Ce,!I)))return le(X);const R=o.pointerMove(X);ve>y&&(H=!0),u.useFriction(.3).useDuration(1),l.start(),a.add(t.apply(R)),X.preventDefault()}function le(X){const de=f.byDistance(0,!1).index!==d.get(),ve=o.pointerUp(X)*E(),Ce=Q(t.apply(ve),de),R=DU(ve,Ce),Y=N-10*R,ae=g+R/50;I=!1,M=!1,$.clear(),u.useDuration(Y).useFriction(ae),c.distance(Ce,!m),B=!1,p.emit("pointerUp")}function pe(X){H&&(X.stopPropagation(),X.preventDefault())}function he(){return M}return{init:A,pointerDown:he,destroy:x}}function zU(e,t){let r,i;function a(f){return f.timeStamp}function o(f,d){const h=`client${(d||e.scroll)==="x"?"X":"Y"}`;return(sS(f,t)?f:f.touches[0])[h]}function s(f){return r=f,i=f,o(f)}function l(f){const d=o(f)-o(i),p=a(f)-a(r)>170;return i=f,p&&(r=f),d}function c(f){if(!r||!i)return 0;const d=o(i)-o(r),p=a(f)-a(r),h=a(f)-a(i)>170,m=d/p;return p&&!h&&Ot(m)>.1?m:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:o}}function UU(e){function t(r){return e*(r/100)}return{measure:t}}function qU(e,t,n,r,i){let a,o,s=[],l=!1;function c(p){return i.measureSize(p.getBoundingClientRect())}function u(p,h){if(!h)return;o=c(e),s=r.map(c);function m(v){for(const g of v){const b=g.target===e,k=r.indexOf(g.target),S=b?o:s[k],_=c(b?e:r[k]);if(S!==_){n.requestAnimationFrame(()=>{p.reInit(),t.emit("resize")});break}}}a=new ResizeObserver(v=>{l||(vh(h)||h(p,v))&&m(v)}),[e].concat(r).forEach(v=>a.observe(v))}function f(){a&&a.disconnect(),l=!0}return{init:u,destroy:f}}function WU(e,t,n,r){let i=!0,a=0,o=0,s=n,l=r,c=e.get(),u=0;function f(){const S=t.get()-e.get(),_=!s;let $=0;return _?(a=0,e.set(t),$=S):(a+=S/s,a*=l,c+=a,e.add(a),$=c-u),o=gh($),u=c,i=Ot(S)<.001,k}function d(){return i}function p(){return s}function h(){return o}function m(){return a}function y(){return g(n)}function v(){return b(r)}function g(S){return s=S,k}function b(S){return l=S,k}const k={direction:h,duration:p,velocity:m,seek:f,settled:d,useBaseFriction:v,useBaseDuration:y,useFriction:b,useDuration:g};return k}function HU(e,t,n,r,i){const a=i.measure(10),o=i.measure(50),s=Ei(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(p){if(!c())return;const h=e.reachedMin(t.get())?"min":"max",m=Ot(e[h]-t.get()),y=n.get()-t.get(),v=s.constrain(m/o);n.subtract(y*v),!p&&Ot(y)<a&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(p){l=!p}return{constrain:u,toggleActive:f}}function VU(e,t,n,r){const i=Ei(-t+e,n[0]),a=l(),o=c();function s(){const f=a[0],d=Vr(a),p=a.lastIndexOf(f),h=a.indexOf(d)+1;return Ei(p,h)}function l(){return n.map(i.constrain).map(f=>parseFloat(f.toFixed(3)))}function c(){if(t<=e)return[i.max];if(r==="keepSnaps")return a;const{min:f,max:d}=s();return a.slice(f,d)}return{snapsContained:o}}function ZU(e,t,n){const r=t[0],i=n?r-e:Vr(t);return{limit:Ei(i,r)}}function KU(e,t,n,r){const a=t.min+.1,o=t.max+.1,{reachedMin:s,reachedMax:l}=Ei(a,o);function c(d){return d===1?l(n.get()):d===-1?s(n.get()):!1}function u(d){if(!c(d))return;const p=e*(d*-1);r.forEach(h=>h.add(p))}return{loop:u}}function GU(e){const{max:t,length:n}=e;function r(a){return(a-t)/-n}return{get:r}}function YU(e,t,n,r,i,a,o){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=a,u=p().map(t.measure),f=h(),d=m();function p(){return c(r).map(v=>Vr(v)[l]-v[0][s]).map(Ot)}function h(){return r.map(v=>n[s]-v[s]).map(v=>-Ot(v))}function m(){const g=Vr(f)-Vr(i);return c(f).map(b=>b[0]).map((b,k,S)=>{const _=!k,$=k===Kc(S);return o&&_?0:o&&$?g:b+u[k]})}return{snaps:f,snapsAligned:d}}function JU(e,t,n,r,i){const{reachedAny:a,removeOffset:o,constrain:s}=r;function l(h){return h.concat().sort((m,y)=>Ot(m)-Ot(y))[0]}function c(h){const m=e?o(h):s(h),y=t.map(g=>g-m).map(g=>u(g,0)).map((g,b)=>({diff:g,index:b})).sort((g,b)=>Ot(g.diff)-Ot(b.diff)),{index:v}=y[0];return{index:v,distance:m}}function u(h,m){const y=[h,h+n,h-n];if(!e)return y[0];if(!m)return l(y);const v=y.filter(g=>gh(g)===m);return l(v)}function f(h,m){const y=t[h]-i.get(),v=u(y,m);return{index:h,distance:v}}function d(h,m){const y=i.get()+h,{index:v,distance:g}=c(y),b=!e&&a(y);if(!m||b)return{index:v,distance:h};const k=t[v]-g,S=h+u(k,0);return{index:v,distance:S}}return{byDistance:d,byIndex:f,shortcut:u}}function XU(e,t,n,r,i,a,o){function s(f){const d=f.distance,p=f.index!==t.get();a.add(d),d&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(n.set(t.get()),t.set(f.index),o.emit("select"))}function l(f,d){const p=r.byDistance(f,d);s(p)}function c(f,d){const p=t.clone().set(f),h=r.byIndex(p.get(),d);s(h)}return{distance:l,index:c}}function Yc(e){let t=e;function n(){return t}function r(l){t=o(l)}function i(l){t+=o(l)}function a(l){t-=o(l)}function o(l){return mh(l)?l:l.get()}return{get:n,set:r,add:i,subtract:a}}function cS(e,t,n){const r=e.scroll==="x"?o:s,i=n.style;let a=!1;function o(d){return`translate3d(${d}px,0px,0px)`}function s(d){return`translate3d(0px,${d}px,0px)`}function l(d){a||(i.transform=r(t.apply(d)))}function c(d){a=!d}function u(){a||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:l,toggleActive:c}}function QU(e,t,n,r,i,a,o,s,l){const c=Ns(i),u=Ns(i).reverse(),f=m().concat(y());function d(S,_){return S.reduce(($,j)=>$-i[j],_)}function p(S,_){return S.reduce(($,j)=>d($,_)>0?$.concat([j]):$,[])}function h(S,_){const $=_==="start",j=$?-r:r,z=o.findSlideBounds([j]);return S.map(O=>{const N=$?0:-r,W=$?r:0,U=z.filter(M=>M.index===O)[0][$?"end":"start"];return{index:O,slideLocation:Yc(-1),translate:cS(e,t,l[O]),target:()=>s.get()>U?N:W}})}function m(){const S=a[0]-1,_=p(u,S);return h(_,"end")}function y(){const S=n-a[0]-1,_=p(c,S);return h(_,"start")}function v(){return f.every(({index:S})=>{const _=c.filter($=>$!==S);return d(_,n)<=.1})}function g(){f.forEach(S=>{const{target:_,translate:$,slideLocation:j}=S,z=_();z!==j.get()&&($.to(z),j.set(z))})}function b(){f.forEach(S=>S.translate.clear())}return{canLoop:v,clear:b,loop:g,loopPoints:f}}function e7(e,t){let n,r=!1;function i(s,l){if(!l)return;function c(u){for(const f of u)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(vh(l)||l(s,u))&&c(u)}),n.observe(e,{childList:!0})}function a(){n&&n.disconnect(),r=!0}return{init:i,destroy:a}}function t7(e,t,n,r,i,a,o){const{removeOffset:s,constrain:l}=i,c=.5,u=a?[0,t,-t]:[0],f=p(u,o);function d(y){const v=y||0;return n.map(g=>Ei(c,g-c).constrain(g*v))}function p(y,v){const g=y||u,b=d(v);return g.reduce((k,S)=>{const _=r.map(($,j)=>({start:$-n[j]+b[j]+S,end:$+e-b[j]+S,index:j}));return k.concat(_)},[])}function h(y,v){const g=a?s(y):l(y);return(v||f).reduce((k,S)=>{const{index:_,start:$,end:j}=S,z=k.includes(_),O=$<g&&j>g;return!z&&O?k.concat([_]):k},[])}return{check:h,findSlideBounds:p}}function n7(e,t,n,r,i,a){const{measureSize:o,startEdge:s,endEdge:l}=e,c=n[0]&&i,u=h(),f=m(),d=n.map(o),p=y();function h(){if(!c)return 0;const g=n[0];return Ot(t[s]-g[s])}function m(){if(!c)return 0;const g=a.getComputedStyle(Vr(r));return parseFloat(g.getPropertyValue(`margin-${l}`))}function y(){return n.map((g,b,k)=>{const S=!b,_=b===Kc(k);return S?d[b]+u:_?d[b]+f:k[b+1][s]-g[s]}).map(Ot)}return{slideSizes:d,slideSizesWithGaps:p}}function r7(e,t,n){const r=mh(n);function i(l,c){return Ns(l).filter(u=>u%c===0).map(u=>l.slice(u,u+c))}function a(l){return Ns(l).reduce((c,u)=>{const d=t.slice(Vr(c),u+1).reduce((p,h)=>p+h,0);return!u||d>e?c.concat(u):c},[]).map((c,u,f)=>l.slice(c,f[u+1]))}function o(l){return r?i(l,n):a(l)}return{groupSlides:o}}function i7(e,t,n,r,i,a,o,s){const{align:l,axis:c,direction:u,startIndex:f,inViewThreshold:d,loop:p,duration:h,dragFree:m,dragThreshold:y,slidesToScroll:v,skipSnaps:g,containScroll:b}=a,k=t.getBoundingClientRect(),S=n.map(ae=>ae.getBoundingClientRect()),_=FU(u),$=LU(c,u),j=$.measureSize(k),z=UU(j),O=MU(l,j),N=!p&&!!b,W=p||!!b,{slideSizes:L,slideSizesWithGaps:U}=n7($,k,S,n,W,i),M=r7(j,U,v),{snaps:I,snapsAligned:H}=YU($,O,k,S,U,M,N),B=-Vr(I)+Vr(U),{snapsContained:A}=VU(j,B,H,b),x=N?A:H,{limit:q}=ZU(B,x,p),K=lS(Kc(x),f,p),E=K.clone(),Q=Ns(n),oe=({dragHandler:ae,scrollBody:ee,scrollBounds:ke,eventHandler:we,animation:Re,options:{loop:Ve}})=>{const Ae=ae.pointerDown();Ve||ke.constrain(Ae);const Be=ee.seek().settled();Be&&!Ae&&(Re.stop(),we.emit("settle")),Be||we.emit("scroll")},ne=({scrollBody:ae,translate:ee,location:ke,offsetLocation:we,scrollLooper:Re,slideLooper:Ve,options:{loop:Ae}},Be)=>{const F=ae.velocity();we.set(ke.get()-F+F*Be),Ae&&(Re.loop(ae.direction()),Ve.loop()),ee.to(we.get())},le={start:()=>s.start(Y),stop:()=>s.stop(Y),update:()=>oe(Y),render:ae=>ne(Y,ae)},pe=.68,he=x[K.get()],ce=Yc(he),X=Yc(he),Z=Yc(he),de=WU(ce,Z,h,pe),ve=JU(p,x,B,q,Z),Ce=XU(le,K,E,ve,de,Z,o),R=t7(j,B,L,I,q,p,d),Y={ownerDocument:r,ownerWindow:i,eventHandler:o,containerRect:k,slideRects:S,animation:le,axis:$,direction:_,dragHandler:BU($,_,e,r,i,Z,zU($,i),ce,le,Ce,de,ve,K,o,z,m,y,g,pe),eventStore:Ds(),percentOfView:z,index:K,indexPrevious:E,limit:q,location:ce,offsetLocation:X,options:a,resizeHandler:qU(t,o,i,n,$),scrollBody:de,scrollBounds:HU(q,ce,Z,de,z),scrollLooper:KU(B,q,X,[ce,X,Z]),scrollProgress:GU(q),scrollSnaps:x,scrollTarget:ve,scrollTo:Ce,slideLooper:QU($,_,j,B,U,x,R,X,n),slidesHandler:e7(t,o),slidesInView:R,slideIndexes:Q,slidesToScroll:M,target:Z,translate:cS($,_,t)};return Y}function a7(e){const t=16.666666666666668;let n=[],r=null,i=0,a=0;function o(f){r||(r=f);const d=f-r;for(r=f,i+=d;i>=t;)n.forEach(({animation:h})=>h.update()),i-=t;const p=Ot(i/t);n.forEach(({animation:h})=>h.render(p)),a&&e.requestAnimationFrame(o)}function s(f){n.includes(f)||n.push(f),!a&&(a=e.requestAnimationFrame(o))}function l(f){n=n.filter(d=>d!==f),!n.length&&(e.cancelAnimationFrame(a),r=null,i=0,a=0)}function c(){r=null,i=0}return{start:s,stop:l,reset:c,window:e}}function o7(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function i(l){return r(l).forEach(c=>c(t,l)),s}function a(l,c){return e[l]=r(l).concat([c]),s}function o(l,c){return e[l]=r(l).filter(u=>u!==c),s}const s={init:n,emit:i,off:o,on:a};return s}const s7={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,breakpoints:{},dragFree:!1,dragThreshold:10,inViewThreshold:0,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function l7(e){function t(a,o){return oS(a,o||{})}function n(a){const o=a.breakpoints||{},s=Gc(o).filter(l=>e.matchMedia(l).matches).map(l=>o[l]).reduce((l,c)=>t(l,c),{});return t(a,s)}function r(a){return a.map(o=>Gc(o.breakpoints||{})).reduce((o,s)=>o.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function c7(e){let t=[];function n(a,o){return t=a.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(o,e)),a.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(a=>a.destroy())}return{init:n,destroy:r}}function Za(e,t,n){const r=e.ownerDocument,i=r.defaultView,a=l7(i),o=c7(a),s=Ds(),l=Ds(),c=o7(),{animationRealms:u}=Za,{mergeOptions:f,optionsAtMedia:d,optionsMediaQueries:p}=a,{on:h,off:m,emit:y}=c,v=L;let g=!1,b,k=f(s7,Za.globalOptions),S=f(k),_=[],$,j,z;function O(){const{container:de,slides:ve}=S;j=(iS(de)?e.querySelector(de):de)||e.children[0];const R=iS(ve)?j.querySelectorAll(ve):ve;z=[].slice.call(R||j.children)}function N(de,ve){const Ce=i7(e,j,z,r,i,de,c,ve);if(de.loop&&!Ce.slideLooper.canLoop()){const R=Object.assign({},de,{loop:!1});return N(R,ve)}return Ce}function W(de,ve){if(g)return;const Ce=u.find(Y=>Y.window===i),R=Ce||a7(i);Ce||u.push(R),k=f(k,de),S=d(k),_=ve||_,O(),b=N(S,R),p([k,..._.map(({options:Y})=>Y)]).forEach(Y=>s.add(Y,"change",L)),S.active&&(b.translate.to(b.location.get()),b.eventHandler.init(Z),b.resizeHandler.init(Z,S.watchResize),b.slidesHandler.init(Z,S.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&R.reset()}),b.options.loop&&b.slideLooper.loop(),j.offsetParent&&z.length&&b.dragHandler.init(Z,S.watchDrag),$=o.init(_,Z))}function L(de,ve){const Ce=oe();U(),W(f({startIndex:Ce},de),ve),c.emit("reInit")}function U(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),o.destroy(),s.clear(),l.clear()}function M(){g||(g=!0,s.clear(),U(),c.emit("destroy"))}function I(de){const ve=b[de?"target":"location"].get(),Ce=S.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[Ce](ve))}function H(de){const ve=I(de);return b.slideIndexes.filter(Ce=>!ve.includes(Ce))}function B(de,ve,Ce){!S.active||g||(b.scrollBody.useBaseFriction().useDuration(ve?0:S.duration),b.scrollTo.index(de,Ce||0))}function A(de){const ve=b.index.add(1).get();B(ve,de===!0,-1)}function x(de){const ve=b.index.add(-1).get();B(ve,de===!0,1)}function q(){return b.index.add(1).get()!==oe()}function K(){return b.index.add(-1).get()!==oe()}function E(){return b.scrollSnaps.map(b.scrollProgress.get)}function Q(){return b.scrollProgress.get(b.location.get())}function oe(){return b.index.get()}function ne(){return b.indexPrevious.get()}function le(){return $}function pe(){return b}function he(){return e}function ce(){return j}function X(){return z}const Z={canScrollNext:q,canScrollPrev:K,containerNode:ce,internalEngine:pe,destroy:M,off:m,on:h,emit:y,plugins:le,previousScrollSnap:ne,reInit:v,rootNode:he,scrollNext:A,scrollPrev:x,scrollProgress:Q,scrollSnapList:E,scrollTo:B,selectedScrollSnap:oe,slideNodes:X,slidesInView:I,slidesNotInView:H};return W(t,n),setTimeout(()=>c.emit("init"),0),Z}Za.animationRealms=[],Za.globalOptions=void 0;function yh(e={},t=[]){const n=D.useRef(e),r=D.useRef(t),[i,a]=D.useState(),[o,s]=D.useState(),l=D.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return D.useEffect(()=>{if(jU()&&o){Za.globalOptions=yh.globalOptions;const c=Za(o,n.current,r.current);return a(c),()=>c.destroy()}else a(void 0)},[o,a]),D.useEffect(()=>{hh(n.current,e)||(n.current=e,l())},[e,l]),D.useEffect(()=>{NU(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}yh.globalOptions=void 0;function u7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M15.75 2.25H21a.75.75 0 0 1 .75.75v5.25a.75.75 0 0 1-1.5 0V4.81L8.03 17.03a.75.75 0 0 1-1.06-1.06L19.19 3.75h-3.44a.75.75 0 0 1 0-1.5Zm-10.5 4.5a1.5 1.5 0 0 0-1.5 1.5v10.5a1.5 1.5 0 0 0 1.5 1.5h10.5a1.5 1.5 0 0 0 1.5-1.5V10.5a.75.75 0 0 1 1.5 0v8.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V8.25a3 3 0 0 1 3-3h8.25a.75.75 0 0 1 0 1.5H5.25Z",clipRule:"evenodd"}))}const f7=w.forwardRef(u7);function d7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M7.72 12.53a.75.75 0 0 1 0-1.06l7.5-7.5a.75.75 0 1 1 1.06 1.06L9.31 12l6.97 6.97a.75.75 0 1 1-1.06 1.06l-7.5-7.5Z",clipRule:"evenodd"}))}const p7=w.forwardRef(d7);function h7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const m7=w.forwardRef(h7);function v7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z",clipRule:"evenodd"}),w.createElement("path",{d:"M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z"}))}const g7=w.forwardRef(v7);function y7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z"}),w.createElement("path",{d:"M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z"}))}const b7=w.forwardRef(y7);function x7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"}))}const w7=w.forwardRef(x7);function S7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M12 1.5a5.25 5.25 0 0 0-5.25 5.25v3a3 3 0 0 0-3 3v6.75a3 3 0 0 0 3 3h10.5a3 3 0 0 0 3-3v-6.75a3 3 0 0 0-3-3v-3c0-2.9-2.35-5.25-5.25-5.25Zm3.75 8.25v-3a3.75 3.75 0 1 0-7.5 0v3h7.5Z",clipRule:"evenodd"}))}const E7=w.forwardRef(S7);function _7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z",clipRule:"evenodd"}))}const k7=w.forwardRef(_7),$7=D.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,metadata:i},a)=>{const[o,s]=yh({skipSnaps:!0,loop:!0}),[l,c]=D.useState(!0),[u,f]=D.useState(!0),d=D.useCallback(()=>s==null?void 0:s.scrollPrev(),[s]),p=D.useCallback(()=>s==null?void 0:s.scrollNext(),[s]),{message:{blocks:{carousel:h}}}=yt,m=D.useCallback(y=>{c(!y.canScrollPrev()),f(!y.canScrollNext())},[]);return D.useEffect(()=>{s&&(m(s),s.on("reInit",m),s.on("select",m))},[s,m]),C.jsxs("div",{...h==null?void 0:h.container,"data-container":"carousel",ref:o,children:[C.jsx("div",{ref:a,...h==null?void 0:h.slidesContainer,children:e.map((y,v)=>C.jsx(Xa,{block:y,direction:t,sender:n,timestamp:r,metadata:i},v))}),e.length>1&&C.jsxs(C.Fragment,{children:[C.jsx(p7,{...h==null?void 0:h.backButton,"data-disabled":l?"":void 0,onClick:d}),C.jsx(m7,{...h==null?void 0:h.nextButton,"data-disabled":u?"":void 0,onClick:p})]})]})}),uS=Math.floor;function fS(e){return dS(e)?(e.nodeName||"").toLowerCase():"#document"}function Ms(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function O7(e){var t;return(t=(dS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dS(e){return e instanceof Node||e instanceof Ms(e).Node}function zn(e){return e instanceof Element||e instanceof Ms(e).Element}function Ka(e){return e instanceof HTMLElement||e instanceof Ms(e).HTMLElement}function bh(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ms(e).ShadowRoot}function T7(e){return["html","body","#document"].includes(fS(e))}function C7(e){return Ms(e).getComputedStyle(e)}function I7(e){if(fS(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bh(e)&&e.host||O7(e);return bh(t)?t.host:t}function _i(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function gn(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&bh(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function pS(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function R7(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function hS(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(pS())||t.test(R7()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function mS(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function vS(){return/apple/i.test(navigator.vendor)}function A7(){return pS().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function gS(e,t){return["mouse","pen"].includes(e)}function P7(e){return"nativeEvent"in e}function j7(e){return e.matches("html,body")}function er(e){return(e==null?void 0:e.ownerDocument)||document}function xh(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function yS(e){return"composedPath"in e?e.composedPath()[0]:e.target}const N7="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function bS(e){return Ka(e)&&e.matches(N7)}function Yt(e){e.preventDefault(),e.stopPropagation()}const wh="ArrowUp",Jc="ArrowDown",Ga="ArrowLeft",Ls="ArrowRight";function Xc(e,t,n){return Math.floor(e/t)!==n}function Fs(e,t){return t<0||t>=e.current.length}function Sh(e,t){return an(e,{disabledIndices:t})}function xS(e,t){return an(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function an(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:a=1}=t===void 0?{}:t;const o=e.current;let s=n;do{var l,c;s=s+(r?-a:a)}while(s>=0&&s<=o.length-1&&(i?i.includes(s):o[s]==null||(l=o[s])!=null&&l.hasAttribute("disabled")||((c=o[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function D7(e,t){let{event:n,orientation:r,loop:i,cols:a,disabledIndices:o,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===wh){if(u&&Yt(n),c===-1)f=l;else if(f=an(e,{startingIndex:f,amount:a,decrement:!0,disabledIndices:o}),i&&(c-a<s||f<0)){const d=c%a,p=l%a,h=l-(p-d);p===d?f=l:f=p>d?h:h-a}Fs(e,f)&&(f=c)}if(n.key===Jc&&(u&&Yt(n),c===-1?f=s:(f=an(e,{startingIndex:c,amount:a,disabledIndices:o}),i&&c+a>l&&(f=an(e,{startingIndex:c%a-a,amount:a,disabledIndices:o}))),Fs(e,f)&&(f=c)),r==="both"){const d=uS(c/a);n.key===Ls&&(u&&Yt(n),c%a!==a-1?(f=an(e,{startingIndex:c,disabledIndices:o}),i&&Xc(f,a,d)&&(f=an(e,{startingIndex:c-c%a-1,disabledIndices:o}))):i&&(f=an(e,{startingIndex:c-c%a-1,disabledIndices:o})),Xc(f,a,d)&&(f=c)),n.key===Ga&&(u&&Yt(n),c%a!==0?(f=an(e,{startingIndex:c,disabledIndices:o,decrement:!0}),i&&Xc(f,a,d)&&(f=an(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:o}))):i&&(f=an(e,{startingIndex:c+(a-c%a),decrement:!0,disabledIndices:o})),Xc(f,a,d)&&(f=c));const p=uS(l/a)===d;Fs(e,f)&&(i&&p?f=n.key===Ga?l:an(e,{startingIndex:c-c%a-1,disabledIndices:o}):f=c)}return f}let wS=0;function Zr(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(wS);const a=()=>e==null?void 0:e.focus({preventScroll:n});i?a():wS=requestAnimationFrame(a)}var Ft=typeof document<"u"?D.useLayoutEffect:D.useEffect;function Qc(){return Qc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qc.apply(this,arguments)}let Eh=!1,M7=0;const SS=()=>"floating-ui-"+M7++;function L7(){const[e,t]=w.useState(()=>Eh?SS():void 0);return Ft(()=>{e==null&&t(SS())},[]),w.useEffect(()=>{Eh||(Eh=!0)},[]),e}const _h=w.useId||L7;function F7(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const B7=w.createContext(null),z7=w.createContext(null),ES=()=>{var e;return((e=w.useContext(B7))==null?void 0:e.id)||null},eu=()=>w.useContext(z7);function Bs(e){return"data-floating-ui-"+e}function ki(e){const t=D.useRef(e);return Ft(()=>{t.current=e}),t}function U7(e,t){var n;let r=[],i=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;i;){const a=e.find(o=>o.id===i);i=a==null?void 0:a.parentId,a&&(r=r.concat(a))}return r}function Ya(e,t){let n=e.filter(i=>{var a;return i.parentId===t&&((a=i.context)==null?void 0:a.open)}),r=n;for(;r.length;)r=e.filter(i=>{var a;return(a=r)==null?void 0:a.some(o=>{var s;return i.parentId===o.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function q7(e,t){let n,r=-1;function i(a,o){o>r&&(n=a,r=o),Ya(e,a).forEach(l=>{i(l.id,o+1)})}return i(t,0),e.find(a=>a.id===n)}let Ja=new WeakMap,tu=new WeakSet,nu={},kh=0;const W7=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,_S=e=>e&&(e.host||_S(e.parentNode)),H7=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=_S(n);return e.contains(r)?r:null}).filter(n=>n!=null);function V7(e,t,n,r){const i="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,o=H7(t,e),s=new Set,l=new Set(o),c=[];nu[i]||(nu[i]=new WeakMap);const u=nu[i];o.forEach(f),d(t),s.clear();function f(p){!p||s.has(p)||(s.add(p),p.parentNode&&f(p.parentNode))}function d(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,h=>{if(s.has(h))d(h);else{const m=a?h.getAttribute(a):null,y=m!==null&&m!=="false",v=(Ja.get(h)||0)+1,g=(u.get(h)||0)+1;Ja.set(h,v),u.set(h,g),c.push(h),v===1&&y&&tu.add(h),g===1&&h.setAttribute(i,""),!y&&a&&h.setAttribute(a,"true")}})}return kh++,()=>{c.forEach(p=>{const h=(Ja.get(p)||0)-1,m=(u.get(p)||0)-1;Ja.set(p,h),u.set(p,m),h||(!tu.has(p)&&a&&p.removeAttribute(a),tu.delete(p)),m||p.removeAttribute(i)}),kh--,kh||(Ja=new WeakMap,Ja=new WeakMap,tu=new WeakSet,nu={})}}function kS(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=er(e[0]).body;return V7(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const $h=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function $S(e,t){const n=th(e,$h());t==="prev"&&n.reverse();const r=n.indexOf(_i(er(e)));return n.slice(r+1)[0]}function OS(){return $S(document.body,"next")}function TS(){return $S(document.body,"prev")}function zs(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!gn(n,r)}function Z7(e){th(e,$h()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function K7(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const Oh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let G7;function CS(e){e.key==="Tab"&&(e.target,clearTimeout(G7))}const ru=w.forwardRef(function(t,n){const[r,i]=w.useState();Ft(()=>(vS()&&i("button"),document.addEventListener("keydown",CS),()=>{document.removeEventListener("keydown",CS)}),[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Bs("focus-guard")]:"",style:Oh};return w.createElement("span",Qc({},t,a))}),IS=w.createContext(null);function Y7(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=w.useState(null),a=_h(),o=RS(),s=w.useMemo(()=>({id:t,root:n,portalContext:o,uniqueId:a}),[t,n,o,a]),l=w.useRef();return Ft(()=>()=>{r==null||r.remove()},[r,s]),Ft(()=>{if(l.current===s)return;l.current=s;const{id:c,root:u,portalContext:f,uniqueId:d}=s,p=c?document.getElementById(c):null,h=Bs("portal");if(p){const m=document.createElement("div");m.id=d,m.setAttribute(h,""),p.appendChild(m),i(m)}else{let m=u||(f==null?void 0:f.portalNode);m&&!zn(m)&&(m=m.current),m=m||document.body;let y=null;c&&(y=document.createElement("div"),y.id=c,m.appendChild(y));const v=document.createElement("div");v.id=d,v.setAttribute(h,""),m=y||m,m.appendChild(v),i(v)}},[s]),r}function J7(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const a=Y7({id:n,root:r}),[o,s]=w.useState(null),l=w.useRef(null),c=w.useRef(null),u=w.useRef(null),f=w.useRef(null),d=!!o&&!o.modal&&o.open&&i&&!!(r||a);return w.useEffect(()=>{if(!a||!i||o!=null&&o.modal)return;function p(h){a&&zs(h)&&(h.type==="focusin"?K7:Z7)(a)}return a.addEventListener("focusin",p,!0),a.addEventListener("focusout",p,!0),()=>{a.removeEventListener("focusin",p,!0),a.removeEventListener("focusout",p,!0)}},[a,i,o==null?void 0:o.modal]),w.createElement(IS.Provider,{value:w.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:s}),[i,a])},d&&a&&w.createElement(ru,{"data-type":"outside",ref:l,onFocus:p=>{if(zs(p,a)){var h;(h=u.current)==null||h.focus()}else{const m=TS()||(o==null?void 0:o.refs.domReference.current);m==null||m.focus()}}}),d&&a&&w.createElement("span",{"aria-owns":a.id,style:Oh}),a&&Di.createPortal(t,a),d&&a&&w.createElement(ru,{"data-type":"outside",ref:c,onFocus:p=>{if(zs(p,a)){var h;(h=f.current)==null||h.focus()}else{const m=OS()||(o==null?void 0:o.refs.domReference.current);m==null||m.focus(),o!=null&&o.closeOnFocusOut&&(o==null||o.onOpenChange(!1,p.nativeEvent))}}}))}const RS=()=>w.useContext(IS),X7=w.forwardRef(function(t,n){return w.createElement("button",Qc({},t,{type:"button",ref:n,tabIndex:-1,style:Oh}))});function Q7(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:a=!0,initialFocus:o=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:u=!0}=e,{open:f,refs:d,nodeId:p,onOpenChange:h,events:m,dataRef:y,elements:{domReference:v,floating:g}}=t,b=W7()?a:!0,k=ki(i),S=ki(o),_=ki(s),$=eu(),j=RS(),z=typeof o=="number"&&o<0,O=w.useRef(null),N=w.useRef(null),W=w.useRef(!1),L=w.useRef(null),U=w.useRef(!1),M=j!=null,I=v&&v.getAttribute("role")==="combobox"&&bS(v)&&z,H=w.useCallback(function(q){return q===void 0&&(q=g),q?th(q,$h()):[]},[g]),B=w.useCallback(q=>{const K=H(q);return k.current.map(E=>v&&E==="reference"?v:g&&E==="floating"?g:K).filter(Boolean).flat()},[v,g,k,H]);w.useEffect(()=>{if(r||!l)return;function q(E){if(E.key==="Tab"){gn(g,_i(er(g)))&&H().length===0&&!I&&Yt(E);const Q=B(),oe=yS(E);k.current[0]==="reference"&&oe===v&&(Yt(E),E.shiftKey?Zr(Q[Q.length-1]):Zr(Q[1])),k.current[1]==="floating"&&oe===g&&E.shiftKey&&(Yt(E),Zr(Q[0]))}}const K=er(g);return K.addEventListener("keydown",q),()=>{K.removeEventListener("keydown",q)}},[r,v,g,l,k,d,I,H,B]),w.useEffect(()=>{if(r||!u)return;function q(){U.current=!0,setTimeout(()=>{U.current=!1})}function K(E){const Q=E.relatedTarget;queueMicrotask(()=>{const oe=!(gn(v,Q)||gn(g,Q)||gn(Q,g)||gn(j==null?void 0:j.portalNode,Q)||Q!=null&&Q.hasAttribute(Bs("focus-guard"))||$&&(Ya($.nodesRef.current,p).find(ne=>{var le,pe;return gn((le=ne.context)==null?void 0:le.elements.floating,Q)||gn((pe=ne.context)==null?void 0:pe.elements.domReference,Q)})||U7($.nodesRef.current,p).find(ne=>{var le,pe;return((le=ne.context)==null?void 0:le.elements.floating)===Q||((pe=ne.context)==null?void 0:pe.elements.domReference)===Q})));Q&&oe&&!U.current&&Q!==L.current&&(W.current=!0,h(!1,E))})}if(g&&Ka(v))return v.addEventListener("focusout",K),v.addEventListener("pointerdown",q),!l&&g.addEventListener("focusout",K),()=>{v.removeEventListener("focusout",K),v.removeEventListener("pointerdown",q),!l&&g.removeEventListener("focusout",K)}},[r,v,g,l,p,$,j,h,u]),w.useEffect(()=>{var q;if(r)return;const K=Array.from((j==null||(q=j.portalNode)==null?void 0:q.querySelectorAll("["+Bs("portal")+"]"))||[]);if(g){const E=[g,...K,O.current,N.current,k.current.includes("reference")||I?v:null].filter(oe=>oe!=null),Q=l?kS(E,b,!b):kS(E);return()=>{Q()}}},[r,v,g,l,k,j,I,b]),Ft(()=>{if(r||!g)return;const q=er(g),K=_i(q);queueMicrotask(()=>{const E=B(g),Q=S.current,oe=(typeof Q=="number"?E[Q]:Q.current)||g,ne=gn(g,K);!z&&!ne&&f&&Zr(oe,{preventScroll:oe===g})})},[r,f,g,z,B,S]),Ft(()=>{if(r||!g)return;let q=!1;const K=er(g),E=_i(K),Q=y.current;L.current=E;function oe(ne){if(ne.type==="escapeKey"&&d.domReference.current&&(L.current=d.domReference.current),["referencePress","escapeKey"].includes(ne.type))return;const le=ne.data.returnFocus;typeof le=="object"?(W.current=!1,q=le.preventScroll):W.current=!le}return m.on("dismiss",oe),()=>{m.off("dismiss",oe);const ne=_i(K);(gn(g,ne)||$&&Ya($.nodesRef.current,p).some(pe=>{var he;return gn((he=pe.context)==null?void 0:he.elements.floating,ne)})||Q.openEvent&&["click","mousedown"].includes(Q.openEvent.type))&&d.domReference.current&&(L.current=d.domReference.current),_.current&&Ka(L.current)&&!W.current&&Zr(L.current,{cancelPrevious:!1,preventScroll:q})}},[r,g,_,y,d,m,$,p]),Ft(()=>{if(!(r||!j))return j.setFocusManagerState({modal:l,closeOnFocusOut:u,open:f,onOpenChange:h,refs:d}),()=>{j.setFocusManagerState(null)}},[r,j,l,f,h,d,u]),Ft(()=>{if(!r&&g&&typeof MutationObserver=="function"&&!z){const q=()=>{const E=g.getAttribute("tabindex");k.current.includes("floating")||_i(er(g))!==d.domReference.current&&H().length===0?E!=="0"&&g.setAttribute("tabindex","0"):E!=="-1"&&g.setAttribute("tabindex","-1")};q();const K=new MutationObserver(q);return K.observe(g,{childList:!0,subtree:!0,attributes:!0}),()=>{K.disconnect()}}},[r,g,d,k,H,z]);function A(q){return r||!c||!l?null:w.createElement(X7,{ref:q==="start"?O:N,onClick:K=>h(!1,K.nativeEvent)},typeof c=="string"?c:"Dismiss")}const x=!r&&b&&!I&&(M||l);return w.createElement(w.Fragment,null,x&&w.createElement(ru,{"data-type":"inside",ref:j==null?void 0:j.beforeInsideRef,onFocus:q=>{if(l){const E=B();Zr(i[0]==="reference"?E[0]:E[E.length-1])}else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(W.current=!1,zs(q,j.portalNode)){const E=OS()||v;E==null||E.focus()}else{var K;(K=j.beforeOutsideRef.current)==null||K.focus()}}}),!I&&A("start"),n,A("end"),x&&w.createElement(ru,{"data-type":"inside",ref:j==null?void 0:j.afterInsideRef,onFocus:q=>{if(l)Zr(B()[0]);else if(j!=null&&j.preserveTabOrder&&j.portalNode)if(u&&(W.current=!0),zs(q,j.portalNode)){const E=TS()||v;E==null||E.focus()}else{var K;(K=j.afterOutsideRef.current)==null||K.focus()}}}))}function AS(e){return Ka(e.target)&&e.target.tagName==="BUTTON"}function PS(e){return bS(e)}function e9(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=w.useRef(),d=w.useRef(!1);return w.useMemo(()=>o?{reference:{onPointerDown(p){f.current=p.pointerType},onMouseDown(p){p.button===0&&(gS(f.current)&&c||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,p.nativeEvent):(p.preventDefault(),r(!0,p.nativeEvent))))},onClick(p){if(s==="mousedown"&&f.current){f.current=void 0;return}gS(f.current)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,p.nativeEvent):r(!0,p.nativeEvent))},onKeyDown(p){f.current=void 0,!(p.defaultPrevented||!u||AS(p))&&(p.key===" "&&!PS(a)&&(p.preventDefault(),d.current=!0),p.key==="Enter"&&r(!(n&&l),p.nativeEvent))},onKeyUp(p){p.defaultPrevented||!u||AS(p)||PS(a)||p.key===" "&&d.current&&(d.current=!1,r(!(n&&l),p.nativeEvent))}}}:{},[o,i,s,c,u,a,l,n,r])}const t9=w.useInsertionEffect||(e=>e());function $i(e){const t=w.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return t9(()=>{t.current=e}),w.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const n9={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},r9={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},i9=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function a9(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:a,elements:{reference:o,domReference:s,floating:l},dataRef:c}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:d=!0,outsidePressEvent:p="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:y=!1,bubbles:v}=t,g=eu(),b=ES()!=null,k=$i(typeof d=="function"?d:()=>!1),S=typeof d=="function"?k:d,_=w.useRef(!1),{escapeKeyBubbles:$,outsidePressBubbles:j}=i9(v),z=$i(N=>{if(!n||!u||!f||N.key!=="Escape")return;const W=g?Ya(g.nodesRef.current,a):[];if(!$&&(N.stopPropagation(),W.length>0)){let L=!0;if(W.forEach(U=>{var M;if((M=U.context)!=null&&M.open&&!U.context.dataRef.current.__escapeKeyBubbles){L=!1;return}}),!L)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,P7(N)?N.nativeEvent:N)}),O=$i(N=>{const W=_.current;if(_.current=!1,W||typeof S=="function"&&!S(N))return;const L=yS(N),U="["+Bs("inert")+"]",M=er(l).querySelectorAll(U);let I=zn(L)?L:null;for(;I&&!T7(I);){const A=I7(I);if(A===er(l).body||!zn(A))break;I=A}if(M.length&&zn(L)&&!j7(L)&&!gn(L,l)&&Array.from(M).every(A=>!gn(I,A)))return;if(Ka(L)&&l){const A=L.clientWidth>0&&L.scrollWidth>L.clientWidth,x=L.clientHeight>0&&L.scrollHeight>L.clientHeight;let q=x&&N.offsetX>L.clientWidth;if(x&&C7(L).direction==="rtl"&&(q=N.offsetX<=L.offsetWidth-L.clientWidth),q||A&&N.offsetY>L.clientHeight)return}const H=g&&Ya(g.nodesRef.current,a).some(A=>{var x;return xh(N,(x=A.context)==null?void 0:x.elements.floating)});if(xh(N,l)||xh(N,s)||H)return;const B=g?Ya(g.nodesRef.current,a):[];if(B.length>0){let A=!0;if(B.forEach(x=>{var q;if((q=x.context)!=null&&q.open&&!x.context.dataRef.current.__outsidePressBubbles){A=!1;return}}),!A)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:hS(N)||mS(N)}}),r(!1,N)});return w.useEffect(()=>{if(!n||!u)return;c.current.__escapeKeyBubbles=$,c.current.__outsidePressBubbles=j;function N(U){r(!1,U)}const W=er(l);f&&W.addEventListener("keydown",z),S&&W.addEventListener(p,O);let L=[];return y&&(zn(s)&&(L=wi(s)),zn(l)&&(L=L.concat(wi(l))),!zn(o)&&o&&o.contextElement&&(L=L.concat(wi(o.contextElement)))),L=L.filter(U=>{var M;return U!==((M=W.defaultView)==null?void 0:M.visualViewport)}),L.forEach(U=>{U.addEventListener("scroll",N,{passive:!0})}),()=>{f&&W.removeEventListener("keydown",z),S&&W.removeEventListener(p,O),L.forEach(U=>{U.removeEventListener("scroll",N)})}},[c,l,s,o,f,S,p,n,r,y,u,$,j,z,O]),w.useEffect(()=>{_.current=!1},[S,p]),w.useMemo(()=>u?{reference:{onKeyDown:z,[n9[m]]:N=>{h&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,N.nativeEvent))}},floating:{onKeyDown:z,[r9[p]]:()=>{_.current=!0}}}:{},[u,i,h,p,m,r,z])}let Th;process.env.NODE_ENV!=="production"&&(Th=new Set);function o9(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var a;const $="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((a=e.elements)!=null&&a.reference&&!zn(e.elements.reference)){var o;if(!((o=Th)!=null&&o.has($))){var s;(s=Th)==null||s.add($),console.error($)}}}const[l,c]=w.useState(null),u=((t=e.elements)==null?void 0:t.reference)||l,f=N6(e),d=eu(),p=$i(($,j)=>{$&&(m.current.openEvent=j),r==null||r($,j)}),h=w.useRef(null),m=w.useRef({}),y=w.useState(()=>F7())[0],v=_h(),g=w.useCallback($=>{const j=zn($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),contextElement:$}:$;f.refs.setReference(j)},[f.refs]),b=w.useCallback($=>{(zn($)||$===null)&&(h.current=$,c($)),(zn(f.refs.reference.current)||f.refs.reference.current===null||$!==null&&!zn($))&&f.refs.setReference($)},[f.refs]),k=w.useMemo(()=>({...f.refs,setReference:b,setPositionReference:g,domReference:h}),[f.refs,b,g]),S=w.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),_=w.useMemo(()=>({...f,refs:k,elements:S,dataRef:m,nodeId:i,floatingId:v,events:y,open:n,onOpenChange:p}),[f,i,v,y,n,p,k,S]);return Ft(()=>{const $=d==null?void 0:d.nodesRef.current.find(j=>j.id===i);$&&($.context=_)}),w.useMemo(()=>({...f,context:_,refs:k,elements:S}),[f,k,S,_])}function Ch(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,a)=>(a&&Object.entries(a).forEach(o=>{let[s,l]=o;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var c;(c=r.get(s))==null||c.push(l),i[s]=function(){for(var u,f=arguments.length,d=new Array(f),p=0;p<f;p++)d[p]=arguments[p];return(u=r.get(s))==null?void 0:u.map(h=>h(...d)).find(h=>h!==void 0)}}}else i[s]=l}),i),{})}}function s9(e){e===void 0&&(e=[]);const t=e,n=w.useCallback(a=>Ch(a,e,"reference"),t),r=w.useCallback(a=>Ch(a,e,"floating"),t),i=w.useCallback(a=>Ch(a,e,"item"),e.map(a=>a==null?void 0:a.item));return w.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let jS=!1;function iu(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function NS(e,t){return iu(t,e===wh||e===Jc,e===Ga||e===Ls)}function Ih(e,t,n){return iu(t,e===Jc,n?e===Ga:e===Ls)||e==="Enter"||e==" "||e===""}function l9(e,t,n){return iu(t,n?e===Ga:e===Ls,e===Jc)}function DS(e,t,n){return iu(t,n?e===Ls:e===Ga,e===wh)}function c9(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:a,floating:o}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:d=!1,loop:p=!1,nested:h=!1,rtl:m=!1,virtual:y=!1,focusItemOnOpen:v="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:b=!0,disabledIndices:k=void 0,orientation:S="vertical",cols:_=1,scrollItemIntoView:$=!0,virtualItemRef:j}=t;process.env.NODE_ENV!=="production"&&(d&&(p||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),y||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),S==="vertical"&&_>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const z=ES(),O=eu(),N=$i(c),W=w.useRef(v),L=w.useRef(f??-1),U=w.useRef(null),M=w.useRef(!0),I=w.useRef(N),H=w.useRef(!!o),B=w.useRef(!1),A=w.useRef(!1),x=ki(k),q=ki(n),K=ki($),[E,Q]=w.useState(),[oe,ne]=w.useState(),le=$i(function(ce,X,Z){Z===void 0&&(Z=!1);const de=ce.current[X.current];de&&(y?(Q(de.id),O==null||O.events.emit("virtualfocus",de),j&&(j.current=de)):Zr(de,{preventScroll:!0,sync:A7()&&vS()?jS||B.current:!1}),requestAnimationFrame(()=>{const ve=K.current;ve&&de&&(Z||!M.current)&&(de.scrollIntoView==null||de.scrollIntoView(typeof ve=="boolean"?{block:"nearest",inline:"nearest"}:ve))}))});Ft(()=>{document.createElement("div").focus({get preventScroll(){return jS=!0,!1}})},[]),Ft(()=>{u&&(n&&o?W.current&&f!=null&&(A.current=!0,N(f)):H.current&&(L.current=-1,I.current(null)))},[u,n,o,f,N]),Ft(()=>{if(u&&n&&o)if(l==null){if(B.current=!1,f!=null)return;if(H.current&&(L.current=-1,le(s,L)),!H.current&&W.current&&(U.current!=null||W.current===!0&&U.current==null)){let ce=0;const X=()=>{s.current[0]==null?(ce<2&&(ce?requestAnimationFrame:queueMicrotask)(X),ce++):(L.current=U.current==null||Ih(U.current,S,m)||h?Sh(s,x.current):xS(s,x.current),U.current=null,N(L.current))};X()}}else Fs(s,l)||(L.current=l,le(s,L,A.current),A.current=!1)},[u,n,o,l,f,h,s,S,m,N,le,x]),Ft(()=>{var ce,X;if(!u||o||!O||y||!H.current)return;const Z=O.nodesRef.current,de=(ce=Z.find(R=>R.id===z))==null||(X=ce.context)==null?void 0:X.elements.floating,ve=_i(er(o)),Ce=Z.some(R=>R.context&&gn(R.context.elements.floating,ve));de&&!Ce&&M.current&&de.focus({preventScroll:!0})},[u,o,O,z,y]),Ft(()=>{if(!u||!O||!y||z)return;function ce(X){ne(X.id),j&&(j.current=X)}return O.events.on("virtualfocus",ce),()=>{O.events.off("virtualfocus",ce)}},[u,O,y,z,j]),Ft(()=>{I.current=N,H.current=!!o}),Ft(()=>{n||(U.current=null)},[n]);const pe=l!=null,he=w.useMemo(()=>{function ce(Z){if(!n)return;const de=s.current.indexOf(Z);de!==-1&&N(de)}return{onFocus(Z){let{currentTarget:de}=Z;ce(de)},onClick:Z=>{let{currentTarget:de}=Z;return de.focus({preventScroll:!0})},...g&&{onMouseMove(Z){let{currentTarget:de}=Z;ce(de)},onPointerLeave(Z){let{pointerType:de}=Z;!M.current||de==="touch"||(L.current=-1,le(s,L),N(null),y||Zr(i.floating.current,{preventScroll:!0}))}}}},[n,i,le,g,s,N,y]);return w.useMemo(()=>{if(!u)return{};const ce=x.current;function X(R){if(M.current=!1,B.current=!0,!q.current&&R.currentTarget===i.floating.current)return;if(h&&DS(R.key,S,m)){Yt(R),r(!1,R.nativeEvent),Ka(a)&&!y&&a.focus();return}const Y=L.current,ae=Sh(s,ce),ee=xS(s,ce);if(R.key==="Home"&&(Yt(R),L.current=ae,N(L.current)),R.key==="End"&&(Yt(R),L.current=ee,N(L.current)),!(_>1&&(L.current=D7(s,{event:R,orientation:S,loop:p,cols:_,disabledIndices:ce,minIndex:ae,maxIndex:ee,prevIndex:L.current,stopEvent:!0}),N(L.current),S==="both"))&&NS(R.key,S)){if(Yt(R),n&&!y&&_i(R.currentTarget.ownerDocument)===R.currentTarget){L.current=Ih(R.key,S,m)?ae:ee,N(L.current);return}Ih(R.key,S,m)?p?L.current=Y>=ee?d&&Y!==s.current.length?-1:ae:an(s,{startingIndex:Y,disabledIndices:ce}):L.current=Math.min(ee,an(s,{startingIndex:Y,disabledIndices:ce})):p?L.current=Y<=ae?d&&Y!==-1?s.current.length:ee:an(s,{startingIndex:Y,decrement:!0,disabledIndices:ce}):L.current=Math.max(ae,an(s,{startingIndex:Y,decrement:!0,disabledIndices:ce})),Fs(s,L.current)?N(null):N(L.current)}}function Z(R){v==="auto"&&hS(R.nativeEvent)&&(W.current=!0)}function de(R){W.current=v,v==="auto"&&mS(R.nativeEvent)&&(W.current=!0)}const ve=y&&n&&pe&&{"aria-activedescendant":oe||E},Ce=s.current.find(R=>(R==null?void 0:R.id)===E);return{reference:{...ve,onKeyDown(R){M.current=!1;const Y=R.key.indexOf("Arrow")===0,ae=l9(R.key,S,m),ee=DS(R.key,S,m),ke=NS(R.key,S),we=(h?ae:ke)||R.key==="Enter"||R.key.trim()==="";if(y&&n){const Be=O==null?void 0:O.nodesRef.current.find(P=>P.parentId==null),F=O&&Be?q7(O.nodesRef.current,Be.id):null;if(Y&&F&&j){const P=new KeyboardEvent("keydown",{key:R.key,bubbles:!0});if(ae||ee){var Re,Ve;const J=((Re=F.context)==null?void 0:Re.elements.domReference)===R.currentTarget,ue=ee&&!J?(Ve=F.context)==null?void 0:Ve.elements.domReference:ae?Ce:null;ue&&(Yt(R),ue.dispatchEvent(P),ne(void 0))}if(ke&&F.context&&F.context.open&&F.parentId&&R.currentTarget!==F.context.elements.domReference){var Ae;Yt(R),(Ae=F.context.elements.domReference)==null||Ae.dispatchEvent(P);return}}return X(R)}if(!(!n&&!b&&Y)){if(we&&(U.current=h&&ke?null:R.key),h){ae&&(Yt(R),n?(L.current=Sh(s,ce),N(L.current)):r(!0,R.nativeEvent));return}ke&&(f!=null&&(L.current=f),Yt(R),!n&&b?r(!0,R.nativeEvent):X(R),n&&N(L.current))}},onFocus(){n&&N(null)},onPointerDown:de,onMouseDown:Z,onClick:Z},floating:{"aria-orientation":S==="both"?void 0:S,...ve,onKeyDown:X,onPointerMove(){M.current=!0}},item:he}},[a,i,E,oe,x,q,s,u,S,m,y,n,pe,h,f,b,d,_,p,v,N,r,he,O,j])}function u9(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:a="dialog"}=t,o=_h();return w.useMemo(()=>{const s={id:r,role:a};return i?a==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":a==="alertdialog"?"dialog":a,"aria-controls":n?r:void 0,...a==="listbox"&&{role:"combobox"},...a==="menu"&&{id:o}},floating:{...s,...a==="menu"&&{"aria-labelledby":o}}}:{}},[i,a,n,r,o])}function f9(e,t){var n;const{open:r,dataRef:i}=e,{listRef:a,activeIndex:o,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:d=[],selectedIndex:p=null}=t,h=w.useRef(),m=w.useRef(""),y=w.useRef((n=p??o)!=null?n:-1),v=w.useRef(null),g=$i(s),b=$i(l),k=ki(u),S=ki(d);return Ft(()=>{r&&(clearTimeout(h.current),v.current=null,m.current="")},[r]),Ft(()=>{if(r&&m.current===""){var _;y.current=(_=p??o)!=null?_:-1}},[r,p,o]),w.useMemo(()=>{if(!c)return{};function _(z){z?i.current.typing||(i.current.typing=z,b(z)):i.current.typing&&(i.current.typing=z,b(z))}function $(z,O,N){const W=k.current?k.current(O,N):O.find(L=>(L==null?void 0:L.toLocaleLowerCase().indexOf(N.toLocaleLowerCase()))===0);return W?z.indexOf(W):-1}function j(z){const O=a.current;if(m.current.length>0&&m.current[0]!==" "&&($(O,O,m.current)===-1?_(!1):z.key===" "&&Yt(z)),O==null||S.current.includes(z.key)||z.key.length!==1||z.ctrlKey||z.metaKey||z.altKey)return;r&&z.key!==" "&&(Yt(z),_(!0)),O.every(U=>{var M,I;return U?((M=U[0])==null?void 0:M.toLocaleLowerCase())!==((I=U[1])==null?void 0:I.toLocaleLowerCase()):!0})&&m.current===z.key&&(m.current="",y.current=v.current),m.current+=z.key,clearTimeout(h.current),h.current=setTimeout(()=>{m.current="",y.current=v.current,_(!1)},f);const W=y.current,L=$(O,[...O.slice((W||0)+1),...O.slice(0,(W||0)+1)],m.current);L!==-1?(g(L),v.current=L):z.key!==" "&&(m.current="",_(!1))}return{reference:{onKeyDown:j},floating:{onKeyDown:j,onKeyUp(z){z.key===" "&&_(!1)}}}},[c,r,i,a,f,S,k,g,b])}const d9=({options:e,label:t,reusable:n})=>{var M,I,H,B,A;const r=Me(x=>x.sendTextMessage),i=Me(x=>x.messageContainerRef),a=Me(x=>x.isReadOnly),[o,s]=w.useState(!1),[l,c]=w.useState(null),[u,f]=w.useState(null),{message:{blocks:{dropdown:d}}}=yt,p=e.reduce((x,q)=>(x[q.label]=q.value,x),{}),h=p?Object.keys(p):[],m=x=>{s(u!==null&&!n?!1:x)},{refs:y,floatingStyles:v,context:g}=o9({placement:"bottom-start",open:o,onOpenChange:m,whileElementsMounted:I6,middleware:[D6(5),M6({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),L6({apply({rects:x,elements:q,availableHeight:K}){Object.assign(q.floating.style,{maxHeight:`${K}px`,minWidth:`${x.reference.width}px`})},padding:10})]}),b=w.useRef([]),k=w.useRef(h),S=w.useRef(!1),_=e9(g,{event:"mousedown"}),$=a9(g),j=u9(g,{role:"listbox"}),z=c9(g,{listRef:b,activeIndex:l,selectedIndex:u,onNavigate:c,loop:!0}),O=f9(g,{listRef:k,activeIndex:l,selectedIndex:u,onMatch:o?c:f,onTypingChange(x){S.current=x}}),{getReferenceProps:N,getFloatingProps:W,getItemProps:L}=s9([$,j,z,O,_]),U=x=>{f(x),h[x]!==void 0&&r(h[x],p[h[x]]),s(!1)};return u!==null&&h[u],C.jsxs(C.Fragment,{children:[C.jsxs("div",{tabIndex:0,ref:y.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!n?"":void 0,...(M=d.button)==null?void 0:M.container,...N(),children:[C.jsx("span",{...(I=d.button)==null?void 0:I.text,children:"Select..."}),C.jsx(kU,{...(H=d.button)==null?void 0:H.icon})]}),o&&C.jsx(J7,{children:C.jsx(Q7,{context:g,modal:!1,children:C.jsx("div",{ref:y.setFloating,className:(A=(B=d.content)==null?void 0:B.container)==null?void 0:A.className,style:{...v},...W(),children:h.map((x,q)=>{var K;return C.jsx("div",{ref:E=>{b.current[q]=E},role:"option",tabIndex:q===l?0:-1,"aria-selected":q===u&&q===l,"data-active":q===l?"":void 0,...(K=d.content)==null?void 0:K.item,...L({onClick(){a||U(q)},onKeyDown(E){a||(E.key==="Enter"&&(E.preventDefault(),U(q)),E.key===" "&&!S.current&&(E.preventDefault(),U(q)))}}),children:x},x)})})})})]})},p9=D.forwardRef(({type:e,title:t,url:n,...r},i)=>{const{message:{blocks:{file:a}}}=yt;return C.jsxs("a",{...r,...a.container,href:n,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[C.jsx("p",{...a.title,children:t||n}),C.jsx(OU,{...a.icon})]})}),MS={audio:bU,bubble:hU,button:dU,carousel:$7,column:RU,dropdown:d9,file:p9,image:vU,location:IU,row:AU,text:xL,video:yU},Xa=({block:e,...t})=>{const r=Me(a=>a.renderers)[e.type]??MS[e.type],i={...t,...e};return C.jsx(r,{...i})};function h9({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M8 14a.75.75 0 0 1-.75-.75V4.56L4.03 7.78a.75.75 0 0 1-1.06-1.06l4.5-4.5a.75.75 0 0 1 1.06 0l4.5 4.5a.75.75 0 0 1-1.06 1.06L8.75 4.56v8.69A.75.75 0 0 1 8 14Z",clipRule:"evenodd"}))}const m9=w.forwardRef(h9);function v9({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M8 1a2 2 0 0 0-2 2v4a2 2 0 1 0 4 0V3a2 2 0 0 0-2-2Z"}),w.createElement("path",{d:"M4.5 7A.75.75 0 0 0 3 7a5.001 5.001 0 0 0 4.25 4.944V13.5h-1.5a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-1.5v-1.556A5.001 5.001 0 0 0 13 7a.75.75 0 0 0-1.5 0 3.5 3.5 0 1 1-7 0Z"}))}const g9=w.forwardRef(v9);function y9({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z"}))}const b9=w.forwardRef(y9);function Rh(){return Rh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rh.apply(null,arguments)}function x9(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var w9=D.useLayoutEffect,S9=function(t){var n=w.useRef(t);return w9(function(){n.current=t}),n},LS=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},E9=function(t,n){var r=D.useRef();return D.useCallback(function(i){t.current=i,r.current&&LS(r.current,null),r.current=n,n&&LS(n,i)},[n])},FS={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},_9=function(t){Object.keys(FS).forEach(function(n){t.style.setProperty(n,FS[n],"important")})},BS=_9,fn=null,zS=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function k9(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),fn||(fn=document.createElement("textarea"),fn.setAttribute("tabindex","-1"),fn.setAttribute("aria-hidden","true"),BS(fn)),fn.parentNode===null&&document.body.appendChild(fn);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(d){var p=d;fn.style[p]=o[p]}),BS(fn),fn.value=t;var l=zS(fn,e);fn.value=t,l=zS(fn,e),fn.value="x";var c=fn.scrollHeight-i,u=c*n;s==="border-box"&&(u=u+i+a),l=Math.max(u,l);var f=c*r;return s==="border-box"&&(f=f+i+a),l=Math.min(f,l),[l,c]}var US=function(){},$9=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},O9=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],T9=!!document.documentElement.currentStyle,C9=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=$9(O9,n),i=r.boxSizing;if(i==="")return null;T9&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var a=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),o=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:a,borderSize:o}},I9=C9;function qS(e,t,n){var r=S9(n);w.useLayoutEffect(function(){var i=function(o){return r.current(o)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var R9=function(t){qS(window,"resize",t)},A9=function(t){qS(document.fonts,"loadingdone",t)},P9=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],j9=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,a=t.minRows,o=t.onChange,s=o===void 0?US:o,l=t.onHeightChange,c=l===void 0?US:l,u=x9(t,P9),f=u.value!==void 0,d=w.useRef(null),p=E9(d,n),h=w.useRef(0),m=w.useRef(),y=function(){var b=d.current,k=r&&m.current?m.current:I9(b);if(k){m.current=k;var S=k9(k,b.value||b.placeholder||"x",a,i),_=S[0],$=S[1];h.current!==_&&(h.current=_,b.style.setProperty("height",_+"px","important"),c(_,{rowHeight:$}))}},v=function(b){f||y(),s(b)};return w.useLayoutEffect(y),R9(y),A9(y),w.createElement("textarea",Rh({},u,{onChange:v,ref:p}))},N9=w.forwardRef(j9);const WS=D.memo(D.forwardRef(({children:e,className:t,inputRef:n,...r},i)=>{const{composer:a}=yt,o=Me(I=>I.disableComposer),s=Me(I=>I.setIsTyping),l=Me(I=>I.isReadOnly),c=Me(I=>I.sendFile),u=Me(I=>I.addMessage),f=Me(I=>I.sendTextMessage),d=Me(I=>I.allowFileUpload),p=Me(I=>I.connected),{composerPlaceholder:h,showPoweredBy:m}=tS(),[y,v]=D.useState(""),[g,b]=D.useState(-1),[k,S]=D.useState(!1),_=D.useRef(null),$=D.useRef(null),j=On(I=>I.user),z=On(I=>I.messageHistory);if(l)return null;const O=()=>{var I;_.current&&((I=_.current)==null||I.click())},N=o||l||!p,W=async I=>{var B;const H=(B=I.target.files)==null?void 0:B[0];if(H)try{const{fileUrl:A,type:x}=await c(H)??"";u({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:x,url:A}})}catch(A){console.error("Error sending file:",A)}},L=window.SpeechRecognition||window.webkitSpeechRecognition,U=()=>{$.current||($.current=new L);const I=$.current;I&&(I.continuous=!0,I.onresult=H=>{var A,x,q;const B=((q=(x=(A=H.results)==null?void 0:A[0])==null?void 0:x[0])==null?void 0:q.transcript)??"";v(B??""),I.stop(),S(!1)},k?(I.stop(),S(!1)):(I.start(),S(!0)))},M=()=>{y&&(f(y),setTimeout(()=>s(!0,9e3),500),v(""),b(-1))};return C.jsxs(C.Fragment,{children:[C.jsxs("div",{"data-disabled":N,...r,className:Gp(a.container.className,t),ref:i,children:[d&&C.jsxs(C.Fragment,{children:[C.jsx("button",{type:"button",disabled:N,...a.uploadButton.container,onClick:O,children:C.jsx(b9,{...a.uploadButton.icon})}),C.jsx("input",{type:"file",ref:_,style:{display:"none"},onChange:W})]}),C.jsx(N9,{...a==null?void 0:a.input,ref:n,placeholder:h??"Type your message...",disabled:N,value:y,"data-has-value":!!y,onChange:I=>v(I.target.value),maxRows:5,onKeyDown:I=>{if(!N){if(I.key==="Enter"&&I.shiftKey?(I.preventDefault(),v(`${y}
|
|
284
|
+
`)):I.key==="Enter"&&(I.preventDefault(),M()),I.key==="ArrowUp"){I.preventDefault();const H=z[(j==null?void 0:j.userId)??""]??[];g<H.length-1&&v(H[g+1]??""),b(()=>Math.min(g+1,H.length-1))}if(I.key==="ArrowDown"){I.preventDefault();const H=z[(j==null?void 0:j.userId)??""]??[];v(g===0?"":H[g-1]??""),b(()=>Math.max(g-1,-1))}}}}),y&&C.jsx("button",{type:"button","aria-label":"Send message",...a.button.container,disabled:!y||N,onClick:M,children:C.jsx(m9,{...a.button.icon})}),!y&&L&&C.jsx("button",{type:"button","aria-label":"Activate voice input",...a.voiceButton.container,disabled:!!y,onClick:U,"data-listens":!!k,children:C.jsx(g9,{...a.voiceButton.icon})})]}),C.jsx("a",{...a.poweredBy,"data-hidden":m===!1,hidden:m===!1,href:"https://botpress.com/?from=webchat",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),HS=({children:e})=>{const[t,n]=D.useState(!1),[r,i]=D.useState(""),[a,o]=D.useState(null),s=({title:c,content:u})=>{i(c),o(u),n(!0)},l=()=>{n(!1)};return C.jsxs(X1.Provider,{value:{hideModal:l,showModal:s,title:r,content:a,open:t},children:[C.jsx(Ti,{open:t,onOpenChange:n,children:C.jsx(Ti.Content,{title:r,children:a})}),e]})};var VS={},Ah={},au=ut&&ut.__assign||function(){return au=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},au.apply(this,arguments)};Object.defineProperty(Ah,"__esModule",{value:!0});var D9={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function M9(e){var t=au(au({},D9),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Ah.getSanitizedOptions=M9;var Ph={},jh={},ou={},Nh={},Dh={};Object.defineProperty(Dh,"__esModule",{value:!0});function L9(e){var t=Math.random()*e;return Math.round(t)}Dh.fullJitter=L9;var Mh={};Object.defineProperty(Mh,"__esModule",{value:!0});function F9(e){return e}Mh.noJitter=F9,Object.defineProperty(Nh,"__esModule",{value:!0});var B9=Dh,z9=Mh;function U9(e){switch(e.jitter){case"full":return B9.fullJitter;case"none":default:return z9.noJitter}}Nh.JitterFactory=U9,Object.defineProperty(ou,"__esModule",{value:!0});var q9=Nh,W9=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(n){return setTimeout(n,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=q9.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,n=this.options.timeMultiple,r=this.numOfDelayedAttempts,i=t*Math.pow(n,r);return Math.min(i,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();ou.Delay=W9;var H9=ut&&ut.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),V9=ut&&ut.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},Z9=ut&&ut.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(jh,"__esModule",{value:!0});var K9=ou,G9=function(e){H9(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return V9(this,void 0,void 0,function(){return Z9(this,function(n){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(K9.Delay);jh.SkipFirstDelay=G9;var Lh={},Y9=ut&&ut.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Lh,"__esModule",{value:!0});var J9=ou,X9=function(e){Y9(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(J9.Delay);Lh.AlwaysDelay=X9,Object.defineProperty(Ph,"__esModule",{value:!0});var Q9=jh,eq=Lh;function tq(e,t){var n=nq(e);return n.setAttemptNumber(t),n}Ph.DelayFactory=tq;function nq(e){return e.delayFirstAttempt?new eq.AlwaysDelay(e):new Q9.SkipFirstDelay(e)}var Fh=ut&&ut.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function s(u){try{c(r.next(u))}catch(f){o(f)}}function l(u){try{c(r.throw(u))}catch(f){o(f)}}function c(u){u.done?a(u.value):i(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})},Bh=ut&&ut.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=c[0]&2?i.return:c[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,c[1])).done)return a;switch(i=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){n.label=c[1];break}if(c[0]===6&&n.label<a[1]){n.label=a[1],a=c;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(c);break}a[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],i=0}finally{r=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(VS,"__esModule",{value:!0});var rq=Ah,iq=Ph;function aq(e,t){return t===void 0&&(t={}),Fh(this,void 0,void 0,function(){var n,r;return Bh(this,function(i){switch(i.label){case 0:return n=rq.getSanitizedOptions(t),r=new sq(e,n),[4,r.execute()];case 1:return[2,i.sent()]}})})}var oq=VS.backOff=aq,sq=function(){function e(t,n){this.request=t,this.options=n,this.attemptNumber=0}return e.prototype.execute=function(){return Fh(this,void 0,void 0,function(){var t,n;return Bh(this,function(r){switch(r.label){case 0:if(this.attemptLimitReached)return[3,7];r.label=1;case 1:return r.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return r.sent(),[4,this.request()];case 3:return[2,r.sent()];case 4:return t=r.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(n=r.sent(),!n||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Fh(this,void 0,void 0,function(){var t;return Bh(this,function(n){switch(n.label){case 0:return t=iq.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return n.sent(),[2]}})})},e}(),ZS=Object.prototype.toString,KS=function(t){var n=ZS.call(t),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&ZS.call(t.callee)==="[object Function]"),r},zh,GS;function lq(){if(GS)return zh;GS=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=KS,i=Object.prototype.propertyIsEnumerable,a=!i.call({toString:null},"toString"),o=i.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(d){var p=d.constructor;return p&&p.prototype===d},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!c["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{l(window[d])}catch{return!0}}catch{return!0}return!1}(),f=function(d){if(typeof window>"u"||!u)return l(d);try{return l(d)}catch{return!1}};e=function(p){var h=p!==null&&typeof p=="object",m=n.call(p)==="[object Function]",y=r(p),v=h&&n.call(p)==="[object String]",g=[];if(!h&&!m&&!y)throw new TypeError("Object.keys called on a non-object");var b=o&&m;if(v&&p.length>0&&!t.call(p,0))for(var k=0;k<p.length;++k)g.push(String(k));if(y&&p.length>0)for(var S=0;S<p.length;++S)g.push(String(S));else for(var _ in p)!(b&&_==="prototype")&&t.call(p,_)&&g.push(String(_));if(a)for(var $=f(p),j=0;j<s.length;++j)!($&&s[j]==="constructor")&&t.call(p,s[j])&&g.push(s[j]);return g}}return zh=e,zh}var cq=Array.prototype.slice,uq=KS,YS=Object.keys,su=YS?function(t){return YS(t)}:lq(),JS=Object.keys;su.shim=function(){if(Object.keys){var t=function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2);t||(Object.keys=function(r){return uq(r)?JS(cq.call(r)):JS(r)})}else Object.keys=su;return Object.keys||su};var Uh=su,fq=Uh,dq=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",pq=Object.prototype.toString,hq=Array.prototype.concat,XS=hp,mq=function(e){return typeof e=="function"&&pq.call(e)==="[object Function]"},QS=vp(),vq=function(e,t,n,r){if(t in e){if(r===!0){if(e[t]===n)return}else if(!mq(r)||!r())return}QS?XS(e,t,n,!0):XS(e,t,n)},eE=function(e,t){var n=arguments.length>2?arguments[2]:{},r=fq(t);dq&&(r=hq.call(r,Object.getOwnPropertySymbols(t)));for(var i=0;i<r.length;i+=1)vq(e,r[i],t[r[i]],n[r[i]])};eE.supportsDescriptors=!!QS;var ta=eE,gq=Uh,tE=lc(),nE=Mn,rE=Object,yq=nE("Array.prototype.push"),iE=nE("Object.prototype.propertyIsEnumerable"),bq=tE?Object.getOwnPropertySymbols:null,aE=function(t,n){if(t==null)throw new TypeError("target must be an object");var r=rE(t);if(arguments.length===1)return r;for(var i=1;i<arguments.length;++i){var a=rE(arguments[i]),o=gq(a),s=tE&&(Object.getOwnPropertySymbols||bq);if(s)for(var l=s(a),c=0;c<l.length;++c){var u=l[c];iE(a,u)&&yq(o,u)}for(var f=0;f<o.length;++f){var d=o[f];if(iE(a,d)){var p=a[d];r[d]=p}}}return r},qh=aE,xq=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),n={},r=0;r<t.length;++r)n[t[r]]=t[r];var i=Object.assign({},n),a="";for(var o in i)a+=o;return e!==a},wq=function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch{return e[1]==="y"}return!1},oE=function(){return!Object.assign||xq()||wq()?qh:Object.assign},Sq=ta,Eq=oE,_q=function(){var t=Eq();return Sq(Object,{assign:t},{assign:function(){return Object.assign!==t}}),t},kq=ta,$q=Aa,Oq=aE,sE=oE,Tq=_q,Cq=$q.apply(sE()),lE=function(t,n){return Cq(Object,arguments)};kq(lE,{getPolyfill:sE,implementation:Oq,shim:Tq});var Iq=lE,Us=function(){return typeof(function(){}).name=="string"},qs=Object.getOwnPropertyDescriptor;if(qs)try{qs([],"length")}catch{qs=null}Us.functionsHaveConfigurableNames=function(){if(!Us()||!qs)return!1;var t=qs(function(){},"name");return!!t&&!!t.configurable};var Rq=Function.prototype.bind;Us.boundFunctionsHaveNames=function(){return Us()&&typeof Rq=="function"&&(function(){}).bind().name!==""};var Aq=Us,cE=hp,Pq=vp(),jq=Aq.functionsHaveConfigurableNames(),Nq=ci,Dq=function(t,n){if(typeof t!="function")throw new Nq("`fn` is not a function");var r=arguments.length>2&&!!arguments[2];return(!r||jq)&&(Pq?cE(t,"name",n,!0,!0):cE(t,"name",n)),t},Mq=Dq,Lq=ci,Fq=Object,uE=Mq(function(){if(this==null||this!==Fq(this))throw new Lq("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),Bq=uE,zq=ta.supportsDescriptors,Uq=Object.getOwnPropertyDescriptor,fE=function(){if(zq&&/a/mig.flags==="gim"){var t=Uq(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var n="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){n+="d"}}),Object.defineProperty(r,"sticky",{get:function(){n+="y"}}),n==="dy")return t.get}}return Bq},qq=ta.supportsDescriptors,Wq=fE,Hq=Object.getOwnPropertyDescriptor,Vq=Object.defineProperty,Zq=TypeError,dE=Object.getPrototypeOf,Kq=/a/,Gq=function(){if(!qq||!dE)throw new Zq("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=Wq(),n=dE(Kq),r=Hq(n,"flags");return(!r||r.get!==t)&&Vq(n,"flags",{configurable:!0,enumerable:!1,get:t}),t},Yq=ta,Jq=Aa,Xq=uE,pE=fE,Qq=Gq,hE=Jq(pE());Yq(hE,{getPolyfill:pE,implementation:Xq,shim:Qq});var eW=hE,lu={exports:{}},tW=lc,na=function(){return tW()&&!!Symbol.toStringTag},nW=na(),rW=Mn,Wh=rW("Object.prototype.toString"),cu=function(t){return nW&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:Wh(t)==="[object Arguments]"},mE=function(t){return cu(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&Wh(t)!=="[object Array]"&&Wh(t.callee)==="[object Function]"},iW=function(){return cu(arguments)}();cu.isLegacyArguments=mE;var vE=iW?cu:mE,aW=e0,Ws=Ip(),Kr=ci,Hh={assert:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Kr("`O` is not an object");if(typeof t!="string")throw new Kr("`slot` must be a string");if(Ws.assert(e),!Hh.has(e,t))throw new Kr("`"+t+"` is not present on `O`")},get:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Kr("`O` is not an object");if(typeof t!="string")throw new Kr("`slot` must be a string");var n=Ws.get(e);return n&&n["$"+t]},has:function(e,t){if(!e||typeof e!="object"&&typeof e!="function")throw new Kr("`O` is not an object");if(typeof t!="string")throw new Kr("`slot` must be a string");var n=Ws.get(e);return!!n&&aW(n,"$"+t)},set:function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Kr("`O` is not an object");if(typeof t!="string")throw new Kr("`slot` must be a string");var r=Ws.get(e);r||(r={},Ws.set(e,r)),r["$"+t]=n}};Object.freeze&&Object.freeze(Hh);var oW=Hh,Hs=oW,sW=SyntaxError,gE=typeof StopIteration=="object"?StopIteration:null,lW=function(t){if(!gE)throw new sW("this environment lacks StopIteration");Hs.set(t,"[[Done]]",!1);var n={next:function(){var i=Hs.get(this,"[[Iterator]]"),a=Hs.get(i,"[[Done]]");try{return{done:a,value:a?void 0:i.next()}}catch(o){if(Hs.set(i,"[[Done]]",!0),o!==gE)throw o;return{done:!0,value:void 0}}}};return Hs.set(n,"[[Iterator]]",t),n},cW={}.toString,yE=Array.isArray||function(e){return cW.call(e)=="[object Array]"},uW=String.prototype.valueOf,fW=function(t){try{return uW.call(t),!0}catch{return!1}},dW=Object.prototype.toString,pW="[object String]",hW=na(),bE=function(t){return typeof t=="string"?!0:typeof t!="object"?!1:hW?fW(t):dW.call(t)===pW},Vh=typeof Map=="function"&&Map.prototype?Map:null,mW=typeof Set=="function"&&Set.prototype?Set:null,uu;Vh||(uu=function(t){return!1});var xE=Vh?Map.prototype.has:null,wE=mW?Set.prototype.has:null;!uu&&!xE&&(uu=function(t){return!1});var SE=uu||function(t){if(!t||typeof t!="object")return!1;try{if(xE.call(t),wE)try{wE.call(t)}catch{return!0}return t instanceof Vh}catch{}return!1},vW=typeof Map=="function"&&Map.prototype?Map:null,Zh=typeof Set=="function"&&Set.prototype?Set:null,fu;Zh||(fu=function(t){return!1});var EE=vW?Map.prototype.has:null,_E=Zh?Set.prototype.has:null;!fu&&!_E&&(fu=function(t){return!1});var kE=fu||function(t){if(!t||typeof t!="object")return!1;try{if(_E.call(t),EE)try{EE.call(t)}catch{return!0}return t instanceof Zh}catch{}return!1},$E=vE,OE=lW;if(op()||lc()){var Kh=Symbol.iterator;lu.exports=function(t){if(t!=null&&typeof t[Kh]<"u")return t[Kh]();if($E(t))return Array.prototype[Kh].call(t)}}else{var gW=yE,yW=bE,TE=vr,bW=TE("%Map%",!0),xW=TE("%Set%",!0),tr=Mn,CE=tr("Array.prototype.push"),IE=tr("String.prototype.charCodeAt"),wW=tr("String.prototype.slice"),SW=function(t,n){var r=t.length;if(n+1>=r)return n+1;var i=IE(t,n);if(i<55296||i>56319)return n+1;var a=IE(t,n+1);return a<56320||a>57343?n+1:n+2},Gh=function(t){var n=0;return{next:function(){var i=n>=t.length,a;return i||(a=t[n],n+=1),{done:i,value:a}}}},RE=function(t,n){if(gW(t)||$E(t))return Gh(t);if(yW(t)){var r=0;return{next:function(){var a=SW(t,r),o=wW(t,r,a);return r=a,{done:a>t.length,value:o}}}}if(n&&typeof t["_es6-shim iterator_"]<"u")return t["_es6-shim iterator_"]()};if(!bW&&!xW)lu.exports=function(t){if(t!=null)return RE(t,!0)};else{var EW=SE,_W=kE,AE=tr("Map.prototype.forEach",!0),PE=tr("Set.prototype.forEach",!0);if(typeof process>"u"||!process.versions||!process.versions.node)var jE=tr("Map.prototype.iterator",!0),NE=tr("Set.prototype.iterator",!0);var DE=tr("Map.prototype.@@iterator",!0)||tr("Map.prototype._es6-shim iterator_",!0),ME=tr("Set.prototype.@@iterator",!0)||tr("Set.prototype._es6-shim iterator_",!0),kW=function(t){if(EW(t)){if(jE)return OE(jE(t));if(DE)return DE(t);if(AE){var n=[];return AE(t,function(i,a){CE(n,[a,i])}),Gh(n)}}if(_W(t)){if(NE)return OE(NE(t));if(ME)return ME(t);if(PE){var r=[];return PE(t,function(i){CE(r,i)}),Gh(r)}}};lu.exports=function(t){return kW(t)||RE(t)}}}var $W=lu.exports,LE=function(e){return e!==e},FE=function(t,n){return t===0&&n===0?1/t===1/n:!!(t===n||LE(t)&&LE(n))},OW=FE,BE=function(){return typeof Object.is=="function"?Object.is:OW},TW=BE,CW=ta,IW=function(){var t=TW();return CW(Object,{is:t},{is:function(){return Object.is!==t}}),t},RW=ta,AW=Aa,PW=FE,zE=BE,jW=IW,UE=AW(zE(),Object);RW(UE,{getPolyfill:zE,implementation:PW,shim:jW});var NW=UE,DW=Aa,qE=Mn,MW=vr,Yh=MW("%ArrayBuffer%",!0),du=qE("ArrayBuffer.prototype.byteLength",!0),LW=qE("Object.prototype.toString"),WE=!!Yh&&!du&&new Yh(0).slice,HE=!!WE&&DW(WE),VE=du||HE?function(t){if(!t||typeof t!="object")return!1;try{return du?du(t):HE(t,0),!0}catch{return!1}}:Yh?function(t){return LW(t)==="[object ArrayBuffer]"}:function(t){return!1},FW=Date.prototype.getDay,BW=function(t){try{return FW.call(t),!0}catch{return!1}},zW=Object.prototype.toString,UW="[object Date]",qW=na(),WW=function(t){return typeof t!="object"||t===null?!1:qW?BW(t):zW.call(t)===UW},Jh=Mn,ZE=na(),KE,GE,Xh,Qh;if(ZE){KE=Jh("Object.prototype.hasOwnProperty"),GE=Jh("RegExp.prototype.exec"),Xh={};var em=function(){throw Xh};Qh={toString:em,valueOf:em},typeof Symbol.toPrimitive=="symbol"&&(Qh[Symbol.toPrimitive]=em)}var HW=Jh("Object.prototype.toString"),VW=Object.getOwnPropertyDescriptor,ZW="[object RegExp]",KW=ZE?function(t){if(!t||typeof t!="object")return!1;var n=VW(t,"lastIndex"),r=n&&KE(n,"value");if(!r)return!1;try{GE(t,Qh)}catch(i){return i===Xh}}:function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:HW(t)===ZW},GW=Mn,YE=GW("SharedArrayBuffer.prototype.byteLength",!0),YW=YE?function(t){if(!t||typeof t!="object")return!1;try{return YE(t),!0}catch{return!1}}:function(t){return!1},JW=Number.prototype.toString,XW=function(t){try{return JW.call(t),!0}catch{return!1}},QW=Object.prototype.toString,eH="[object Number]",tH=na(),nH=function(t){return typeof t=="number"?!0:typeof t!="object"?!1:tH?XW(t):QW.call(t)===eH},JE=Mn,rH=JE("Boolean.prototype.toString"),iH=JE("Object.prototype.toString"),aH=function(t){try{return rH(t),!0}catch{return!1}},oH="[object Boolean]",sH=na(),lH=function(t){return typeof t=="boolean"?!0:t===null||typeof t!="object"?!1:sH&&Symbol.toStringTag in t?aH(t):iH(t)===oH},tm={exports:{}},cH=Object.prototype.toString,uH=op();if(uH){var fH=Symbol.prototype.toString,dH=/^Symbol\(.*\)$/,pH=function(t){return typeof t.valueOf()!="symbol"?!1:dH.test(fH.call(t))};tm.exports=function(t){if(typeof t=="symbol")return!0;if(cH.call(t)!=="[object Symbol]")return!1;try{return pH(t)}catch{return!1}}}else tm.exports=function(t){return!1};var hH=tm.exports,nm={exports:{}},XE=typeof BigInt<"u"&&BigInt,mH=function(){return typeof XE=="function"&&typeof BigInt=="function"&&typeof XE(42)=="bigint"&&typeof BigInt(42)=="bigint"},vH=mH();if(vH){var gH=BigInt.prototype.valueOf,yH=function(t){try{return gH.call(t),!0}catch{}return!1};nm.exports=function(t){return t===null||typeof t>"u"||typeof t=="boolean"||typeof t=="string"||typeof t=="number"||typeof t=="symbol"||typeof t=="function"?!1:typeof t=="bigint"?!0:yH(t)}}else nm.exports=function(t){return!1};var bH=nm.exports,xH=bE,wH=nH,SH=lH,EH=hH,_H=bH,kH=function(t){if(t==null||typeof t!="object"&&typeof t!="function")return null;if(xH(t))return"String";if(wH(t))return"Number";if(SH(t))return"Boolean";if(EH(t))return"Symbol";if(_H(t))return"BigInt"},pu=typeof WeakMap=="function"&&WeakMap.prototype?WeakMap:null,QE=typeof WeakSet=="function"&&WeakSet.prototype?WeakSet:null,hu;pu||(hu=function(t){return!1});var rm=pu?pu.prototype.has:null,im=QE?QE.prototype.has:null;!hu&&!rm&&(hu=function(t){return!1});var $H=hu||function(t){if(!t||typeof t!="object")return!1;try{if(rm.call(t,rm),im)try{im.call(t,im)}catch{return!0}return t instanceof pu}catch{}return!1},am={exports:{}},OH=vr,e_=Mn,TH=OH("%WeakSet%",!0),om=e_("WeakSet.prototype.has",!0);if(om){var sm=e_("WeakMap.prototype.has",!0);am.exports=function(t){if(!t||typeof t!="object")return!1;try{if(om(t,om),sm)try{sm(t,sm)}catch{return!0}return t instanceof TH}catch{}return!1}}else am.exports=function(t){return!1};var CH=am.exports,IH=SE,RH=kE,AH=$H,PH=CH,jH=function(t){if(t&&typeof t=="object"){if(IH(t))return"Map";if(RH(t))return"Set";if(AH(t))return"WeakMap";if(PH(t))return"WeakSet"}return!1},t_=Function.prototype.toString,Qa=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,lm,mu;if(typeof Qa=="function"&&typeof Object.defineProperty=="function")try{lm=Object.defineProperty({},"length",{get:function(){throw mu}}),mu={},Qa(function(){throw 42},null,lm)}catch(e){e!==mu&&(Qa=null)}else Qa=null;var NH=/^\s*class\b/,cm=function(t){try{var n=t_.call(t);return NH.test(n)}catch{return!1}},um=function(t){try{return cm(t)?!1:(t_.call(t),!0)}catch{return!1}},vu=Object.prototype.toString,DH="[object Object]",MH="[object Function]",LH="[object GeneratorFunction]",FH="[object HTMLAllCollection]",BH="[object HTML document.all class]",zH="[object HTMLCollection]",UH=typeof Symbol=="function"&&!!Symbol.toStringTag,qH=!(0 in[,]),fm=function(){return!1};if(typeof document=="object"){var WH=document.all;vu.call(WH)===vu.call(document.all)&&(fm=function(t){if((qH||!t)&&(typeof t>"u"||typeof t=="object"))try{var n=vu.call(t);return(n===FH||n===BH||n===zH||n===DH)&&t("")==null}catch{}return!1})}var HH=Qa?function(t){if(fm(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{Qa(t,null,lm)}catch(n){if(n!==mu)return!1}return!cm(t)&&um(t)}:function(t){if(fm(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(UH)return um(t);if(cm(t))return!1;var n=vu.call(t);return n!==MH&&n!==LH&&!/^\[object HTML/.test(n)?!1:um(t)},VH=HH,ZH=Object.prototype.toString,n_=Object.prototype.hasOwnProperty,KH=function(t,n,r){for(var i=0,a=t.length;i<a;i++)n_.call(t,i)&&(r==null?n(t[i],i,t):n.call(r,t[i],i,t))},GH=function(t,n,r){for(var i=0,a=t.length;i<a;i++)r==null?n(t.charAt(i),i,t):n.call(r,t.charAt(i),i,t)},YH=function(t,n,r){for(var i in t)n_.call(t,i)&&(r==null?n(t[i],i,t):n.call(r,t[i],i,t))},JH=function(t,n,r){if(!VH(n))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=r),ZH.call(t)==="[object Array]"?KH(t,n,i):typeof t=="string"?GH(t,n,i):YH(t,n,i)},XH=JH,QH=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],dm=QH,eV=typeof globalThis>"u"?ut:globalThis,tV=function(){for(var t=[],n=0;n<dm.length;n++)typeof eV[dm[n]]=="function"&&(t[t.length]=dm[n]);return t},gu=XH,nV=tV,r_=Aa,pm=Mn,yu=pp,rV=pm("Object.prototype.toString"),i_=na(),a_=typeof globalThis>"u"?ut:globalThis,hm=nV(),mm=pm("String.prototype.slice"),vm=Object.getPrototypeOf,iV=pm("Array.prototype.indexOf",!0)||function(t,n){for(var r=0;r<t.length;r+=1)if(t[r]===n)return r;return-1},bu={__proto__:null};i_&&yu&&vm?gu(hm,function(e){var t=new a_[e];if(Symbol.toStringTag in t){var n=vm(t),r=yu(n,Symbol.toStringTag);if(!r){var i=vm(n);r=yu(i,Symbol.toStringTag)}bu["$"+e]=r_(r.get)}}):gu(hm,function(e){var t=new a_[e],n=t.slice||t.set;n&&(bu["$"+e]=r_(n))});var aV=function(t){var n=!1;return gu(bu,function(r,i){if(!n)try{"$"+r(t)===i&&(n=mm(i,1))}catch{}}),n},oV=function(t){var n=!1;return gu(bu,function(r,i){if(!n)try{r(t),n=mm(i,1)}catch{}}),n},sV=function(t){if(!t||typeof t!="object")return!1;if(!i_){var n=mm(rV(t),8,-1);return iV(hm,n)>-1?n:n!=="Object"?!1:oV(t)}return yu?aV(t):null},lV=Mn,o_=lV("ArrayBuffer.prototype.byteLength",!0),cV=VE,uV=function(t){return cV(t)?o_?o_(t):t.byteLength:NaN},s_=Iq,Or=Mn,l_=eW,fV=vr,eo=$W,dV=Ip,c_=NW,u_=vE,f_=yE,d_=VE,p_=WW,h_=KW,m_=YW,v_=Uh,g_=kH,y_=jH,b_=sV,x_=uV,w_=Or("SharedArrayBuffer.prototype.byteLength",!0),S_=Or("Date.prototype.getTime"),gm=Object.getPrototypeOf,E_=Or("Object.prototype.toString"),xu=fV("%Set%",!0),ym=Or("Map.prototype.has",!0),wu=Or("Map.prototype.get",!0),__=Or("Map.prototype.size",!0),Su=Or("Set.prototype.add",!0),k_=Or("Set.prototype.delete",!0),Eu=Or("Set.prototype.has",!0),_u=Or("Set.prototype.size",!0);function $_(e,t,n,r){for(var i=eo(e),a;(a=i.next())&&!a.done;)if(nr(t,a.value,n,r))return k_(e,a.value),!0;return!1}function O_(e){if(typeof e>"u")return null;if(typeof e!="object")return typeof e=="symbol"?!1:typeof e=="string"||typeof e=="number"?+e==+e:!0}function pV(e,t,n,r,i,a){var o=O_(n);if(o!=null)return o;var s=wu(t,o),l=s_({},i,{strict:!1});return typeof s>"u"&&!ym(t,o)||!nr(r,s,l,a)?!1:!ym(e,o)&&nr(r,s,l,a)}function hV(e,t,n){var r=O_(n);return r??(Eu(t,r)&&!Eu(e,r))}function T_(e,t,n,r,i,a){for(var o=eo(e),s,l;(s=o.next())&&!s.done;)if(l=s.value,nr(n,l,i,a)&&nr(r,wu(t,l),i,a))return k_(e,l),!0;return!1}function nr(e,t,n,r){var i=n||{};if(i.strict?c_(e,t):e===t)return!0;var a=g_(e),o=g_(t);if(a!==o)return!1;if(!e||!t||typeof e!="object"&&typeof t!="object")return i.strict?c_(e,t):e==t;var s=r.has(e),l=r.has(t),c;if(s&&l){if(r.get(e)===r.get(t))return!0}else c={};return s||r.set(e,c),l||r.set(t,c),gV(e,t,i,r)}function C_(e){return!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}function mV(e,t,n,r){if(_u(e)!==_u(t))return!1;for(var i=eo(e),a=eo(t),o,s,l;(o=i.next())&&!o.done;)if(o.value&&typeof o.value=="object")l||(l=new xu),Su(l,o.value);else if(!Eu(t,o.value)){if(n.strict||!hV(e,t,o.value))return!1;l||(l=new xu),Su(l,o.value)}if(l){for(;(s=a.next())&&!s.done;)if(s.value&&typeof s.value=="object"){if(!$_(l,s.value,n.strict,r))return!1}else if(!n.strict&&!Eu(e,s.value)&&!$_(l,s.value,n.strict,r))return!1;return _u(l)===0}return!0}function vV(e,t,n,r){if(__(e)!==__(t))return!1;for(var i=eo(e),a=eo(t),o,s,l,c,u,f;(o=i.next())&&!o.done;)if(c=o.value[0],u=o.value[1],c&&typeof c=="object")l||(l=new xu),Su(l,c);else if(f=wu(t,c),typeof f>"u"&&!ym(t,c)||!nr(u,f,n,r)){if(n.strict||!pV(e,t,c,u,n,r))return!1;l||(l=new xu),Su(l,c)}if(l){for(;(s=a.next())&&!s.done;)if(c=s.value[0],f=s.value[1],c&&typeof c=="object"){if(!T_(l,e,c,f,n,r))return!1}else if(!n.strict&&(!e.has(c)||!nr(wu(e,c),f,n,r))&&!T_(l,e,c,f,s_({},n,{strict:!1}),r))return!1;return _u(l)===0}return!0}function gV(e,t,n,r){var i,a;if(typeof e!=typeof t||e==null||t==null||E_(e)!==E_(t)||u_(e)!==u_(t))return!1;var o=f_(e),s=f_(t);if(o!==s)return!1;var l=e instanceof Error,c=t instanceof Error;if(l!==c||(l||c)&&(e.name!==t.name||e.message!==t.message))return!1;var u=h_(e),f=h_(t);if(u!==f||(u||f)&&(e.source!==t.source||l_(e)!==l_(t)))return!1;var d=p_(e),p=p_(t);if(d!==p||(d||p)&&S_(e)!==S_(t)||n.strict&&gm&&gm(e)!==gm(t))return!1;var h=b_(e),m=b_(t);if(h!==m)return!1;if(h||m){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}var y=C_(e),v=C_(t);if(y!==v)return!1;if(y||v){if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}var g=d_(e),b=d_(t);if(g!==b)return!1;if(g||b)return x_(e)!==x_(t)?!1:typeof Uint8Array=="function"&&nr(new Uint8Array(e),new Uint8Array(t),n,r);var k=m_(e),S=m_(t);if(k!==S)return!1;if(k||S)return w_(e)!==w_(t)?!1:typeof Uint8Array=="function"&&nr(new Uint8Array(e),new Uint8Array(t),n,r);if(typeof e!=typeof t)return!1;var _=v_(e),$=v_(t);if(_.length!==$.length)return!1;for(_.sort(),$.sort(),i=_.length-1;i>=0;i--)if(_[i]!=$[i])return!1;for(i=_.length-1;i>=0;i--)if(a=_[i],!nr(e[a],t[a],n,r))return!1;var j=y_(e),z=y_(t);return j!==z?!1:j==="Set"||z==="Set"?mV(e,t,n,r):j==="Map"?vV(e,t,n,r):!0}var yV=function(t,n,r){return nr(t,n,r,dV())};const bV=Ze(yV),xV=({children:e,...t})=>{const n=D.useRef(),r=D.useRef(null),i=fU({...t,messageContainerRef:r});return n.current||(n.current=i),C.jsx(eS.Provider,{value:{...t.configuration},children:C.jsx(Y1.Provider,{value:n.current,children:C.jsx(wV,{children:e})})})},wV=({children:e})=>{const t=Me(b=>b.client),n=Me(b=>b.addMessage),r=Me(b=>b.setMessages),i=Me(b=>b.configuration),a=Me(b=>b.setConnected),o=Me(b=>b.userData),s=Me(b=>b.userName),l=Me(b=>b.userPictureUrl),c=Me(b=>b.setIsTyping),u=Me(b=>b.getMessages),f=Me(b=>b.setHeaderMessage),d=Me(b=>b.setDisableComposer),p=On(b=>b.setConversationId),h=On(b=>b.user),m=On(b=>b.conversationId),y=On(b=>b.setUser),[v,g]=D.useState(0);return D.useEffect(()=>{if(t)return t.on("messageSent",b=>{const k=u(),S=k[k.length-1];(k.length===0||!bV(S==null?void 0:S.block,Oo(b).payload))&&n({direction:"outgoing",sender:{name:"You"},timestamp:new Date,block:Oo(b).payload,disableInput:!1})})},[m]),D.useEffect(()=>{if(t)return t.on("message",b=>{try{const{payload:k,disableInput:S,conversationId:_,sentOn:$,...j}=b;if(m!==_)return;c(!1,0),n({...j,direction:"incoming",sender:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date($),block:k,disableInput:S})}catch{console.error("Invalid message payload")}})},[m]),D.useEffect(()=>{if(t)return t.on("conversation",b=>{p(b)})},[]),oh(async()=>{if(t)return t.on("error",b=>{console.error("Connection Error",b),g(k=>k+1)})}),oh(async()=>{if(!t||m&&t.conversationId===m)return;let b;try{f("Connecting..."),d(!0),b=await oq(()=>t.connect(h,o,{name:s,pictureUrl:l}),{maxDelay:1e4,numOfAttempts:1/0}),f(void 0),d(!1),a(!0)}catch(S){console.warn(S),f("Connection failed. Please try again later."),a(!1);return}y(b),m&&await t.conversationExists(m)?await t.switchConversation(m):await t.newConversation();const k=[];for(const S of await t.listMessages())try{const{payload:_,authorId:$,sentOn:j,disableInput:z,...O}=S,N=$===t.userId?"outgoing":"incoming";k.push({...O,direction:N,sender:N==="outgoing"?{name:"You"}:{name:i.botName??"Bot",avatar:i.botAvatar},timestamp:new Date(j),block:_,disableInput:z})}catch{console.error("Invalid message payload")}return r(k.reverse()),()=>{t.disconnect()}},[v,m]),C.jsx(C.Fragment,{children:e})};function Gr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function SV(e,t){const n=w.createContext(t),r=a=>{const{children:o,...s}=a,l=w.useMemo(()=>s,Object.values(s));return C.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function i(a){const o=w.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function I_(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),l=n.length;n=[...n,o];const c=f=>{var v;const{scope:d,children:p,...h}=f,m=((v=d==null?void 0:d[e])==null?void 0:v[l])||s,y=w.useMemo(()=>h,Object.values(h));return C.jsx(m.Provider,{value:y,children:p})};c.displayName=a+"Provider";function u(f,d){var m;const p=((m=d==null?void 0:d[e])==null?void 0:m[l])||s,h=w.useContext(p);if(h)return h;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[c,u]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,EV(i,...t)]}function EV(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(a)[`__scope${c}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var _V=w.useId||(()=>{}),kV=0;function ku(e){const[t,n]=w.useState(_V());return pa(()=>{e||n(r=>r??String(kV++))},[e]),e||(t?`radix-${t}`:"")}function R_({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=$V({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=ni(n),l=w.useCallback(c=>{if(a){const f=typeof c=="function"?c(e):c;f!==e&&s(f)}else i(c)},[a,e,i,s]);return[o,l]}function $V({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,i=w.useRef(r),a=ni(t);return w.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function OV(e,t=globalThis==null?void 0:globalThis.document){const n=ni(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var TV="DismissableLayer",bm="dismissableLayer.update",CV="dismissableLayer.pointerDownOutside",IV="dismissableLayer.focusOutside",A_,P_=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),j_=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,c=w.useContext(P_),[u,f]=w.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=w.useState({}),h=ri(t,$=>f($)),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(y),g=u?m.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,k=g>=v,S=PV($=>{const j=$.target,z=[...c.branches].some(O=>O.contains(j));!k||z||(i==null||i($),o==null||o($),$.defaultPrevented||s==null||s())},d),_=jV($=>{const j=$.target;[...c.branches].some(O=>O.contains(j))||(a==null||a($),o==null||o($),$.defaultPrevented||s==null||s())},d);return OV($=>{g===c.layers.size-1&&(r==null||r($),!$.defaultPrevented&&s&&($.preventDefault(),s()))},d),w.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(A_=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),N_(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=A_)}},[u,d,n,c]),w.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),N_())},[u,c]),w.useEffect(()=>{const $=()=>p({});return document.addEventListener(bm,$),()=>document.removeEventListener(bm,$)},[]),C.jsx(pn.div,{...l,ref:h,style:{pointerEvents:b?k?"auto":"none":void 0,...e.style},onFocusCapture:Gr(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Gr(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Gr(e.onPointerDownCapture,S.onPointerDownCapture)})});j_.displayName=TV;var RV="DismissableLayerBranch",AV=w.forwardRef((e,t)=>{const n=w.useContext(P_),r=w.useRef(null),i=ri(t,r);return w.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),C.jsx(pn.div,{...e,ref:i})});AV.displayName=RV;function PV(e,t=globalThis==null?void 0:globalThis.document){const n=ni(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){D_(CV,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function jV(e,t=globalThis==null?void 0:globalThis.document){const n=ni(e),r=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!r.current&&D_(IV,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function N_(){const e=new CustomEvent(bm);document.dispatchEvent(e)}function D_(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?xR(i,a):i.dispatchEvent(a)}var xm="focusScope.autoFocusOnMount",wm="focusScope.autoFocusOnUnmount",M_={bubbles:!1,cancelable:!0},NV="FocusScope",L_=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=w.useState(null),c=ni(i),u=ni(a),f=w.useRef(null),d=ri(t,m=>l(m)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let m=function(b){if(p.paused||!s)return;const k=b.target;s.contains(k)?f.current=k:Oi(f.current,{select:!0})},y=function(b){if(p.paused||!s)return;const k=b.relatedTarget;k!==null&&(s.contains(k)||Oi(f.current,{select:!0}))},v=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&Oi(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const g=new MutationObserver(v);return s&&g.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),g.disconnect()}}},[r,s,p.paused]),w.useEffect(()=>{if(s){z_.add(p);const m=document.activeElement;if(!s.contains(m)){const v=new CustomEvent(xm,M_);s.addEventListener(xm,c),s.dispatchEvent(v),v.defaultPrevented||(DV(zV(F_(s)),{select:!0}),document.activeElement===m&&Oi(s))}return()=>{s.removeEventListener(xm,c),setTimeout(()=>{const v=new CustomEvent(wm,M_);s.addEventListener(wm,u),s.dispatchEvent(v),v.defaultPrevented||Oi(m??document.body,{select:!0}),s.removeEventListener(wm,u),z_.remove(p)},0)}}},[s,c,u,p]);const h=w.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(y&&v){const g=m.currentTarget,[b,k]=MV(g);b&&k?!m.shiftKey&&v===k?(m.preventDefault(),n&&Oi(b,{select:!0})):m.shiftKey&&v===b&&(m.preventDefault(),n&&Oi(k,{select:!0})):v===g&&m.preventDefault()}},[n,r,p.paused]);return C.jsx(pn.div,{tabIndex:-1,...o,ref:d,onKeyDown:h})});L_.displayName=NV;function DV(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Oi(r,{select:t}),document.activeElement!==n)return}function MV(e){const t=F_(e),n=B_(t,e),r=B_(t.reverse(),e);return[n,r]}function F_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function B_(e,t){for(const n of e)if(!LV(n,{upTo:t}))return n}function LV(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function FV(e){return e instanceof HTMLInputElement&&"select"in e}function Oi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&FV(e)&&t&&e.select()}}var z_=BV();function BV(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=U_(e,t),e.unshift(t)},remove(t){var n;e=U_(e,t),(n=e[0])==null||n.resume()}}}function U_(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function zV(e){return e.filter(t=>t.tagName!=="A")}function UV(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var $u=e=>{const{present:t,children:n}=e,r=qV(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),a=ri(r.ref,WV(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:a}):null};$u.displayName="Presence";function qV(e){const[t,n]=w.useState(),r=w.useRef({}),i=w.useRef(e),a=w.useRef("none"),o=e?"mounted":"unmounted",[s,l]=UV(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=Ou(r.current);a.current=s==="mounted"?c:"none"},[s]),pa(()=>{const c=r.current,u=i.current;if(u!==e){const d=a.current,p=Ou(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&d!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),pa(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=p=>{const m=Ou(r.current).includes(p.animationName);if(p.target===t&&m&&(l("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},d=p=>{p.target===t&&(a.current=Ou(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Ou(e){return(e==null?void 0:e.animationName)||"none"}function WV(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Sm=0;function HV(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??q_()),document.body.insertAdjacentElement("beforeend",e[1]??q_()),Sm++,()=>{Sm===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Sm--}},[])}function q_(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Tu="right-scroll-bar-position",Cu="width-before-scroll-bar",VV="with-scroll-bars-hidden",ZV="--removed-body-scroll-bar-size";function Em(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function KV(e,t){var n=D.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var GV=typeof window<"u"?w.useLayoutEffect:w.useEffect,W_=new WeakMap;function YV(e,t){var n=KV(null,function(r){return e.forEach(function(i){return Em(i,r)})});return GV(function(){var r=W_.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(s){a.has(s)||Em(s,null)}),a.forEach(function(s){i.has(s)||Em(s,o)})}W_.set(n,e)},[e]),n}function JV(e){return e}function XV(e,t){t===void 0&&(t=JV);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(s){return s!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var s=n;n=[],s.forEach(a),o=n}var l=function(){var u=o;o=[],u.forEach(a)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){o.push(u),c()},filter:function(u){return o=o.filter(u),n}}}};return i}function QV(e){e===void 0&&(e={});var t=XV(null);return t.options=Bn({async:!0,ssr:!1},e),t}var H_=function(e){var t=e.sideCar,n=M1(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,Bn({},n))};H_.isSideCarExport=!0;function e8(e,t){return e.useMedium(t),H_}var V_=QV(),_m=function(){},Iu=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:_m,onWheelCapture:_m,onTouchMoveCapture:_m}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,d=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,g=e.gapMode,b=M1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=d,S=YV([n,t]),_=Bn(Bn({},b),i);return w.createElement(w.Fragment,null,u&&w.createElement(k,{sideCar:V_,removeScrollBar:c,shards:f,noIsolation:p,inert:h,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:g}),o?w.cloneElement(w.Children.only(s),Bn(Bn({},_),{ref:S})):w.createElement(v,Bn({},_,{className:l,ref:S}),s))});Iu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Iu.classNames={fullWidth:Cu,zeroRight:Tu};var t8=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function n8(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=t8();return t&&e.setAttribute("nonce",t),e}function r8(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function i8(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var a8=function(){var e=0,t=null;return{add:function(n){e==0&&(t=n8())&&(r8(t,n),i8(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},o8=function(){var e=a8();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Z_=function(){var e=o8(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},s8={left:0,top:0,right:0,gap:0},km=function(e){return parseInt(e||"",10)||0},l8=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[km(n),km(r),km(i)]},c8=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return s8;var t=l8(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},u8=Z_(),to="data-scroll-locked",f8=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
285
285
|
.`.concat(VV,` {
|
|
286
286
|
overflow: hidden `).concat(r,`;
|
|
287
287
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
@@ -299,57 +299,57 @@ to {
|
|
|
299
299
|
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
.`).concat(
|
|
302
|
+
.`).concat(Tu,` {
|
|
303
303
|
right: `).concat(s,"px ").concat(r,`;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
.`).concat(
|
|
306
|
+
.`).concat(Cu,` {
|
|
307
307
|
margin-right: `).concat(s,"px ").concat(r,`;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
.`).concat(
|
|
310
|
+
.`).concat(Tu," .").concat(Tu,` {
|
|
311
311
|
right: 0 `).concat(r,`;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
-
.`).concat(
|
|
314
|
+
.`).concat(Cu," .").concat(Cu,` {
|
|
315
315
|
margin-right: 0 `).concat(r,`;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
body[`).concat(to,`] {
|
|
319
319
|
`).concat(ZV,": ").concat(s,`px;
|
|
320
320
|
}
|
|
321
|
-
`)},
|
|
321
|
+
`)},K_=function(){var e=parseInt(document.body.getAttribute(to)||"0",10);return isFinite(e)?e:0},d8=function(){w.useEffect(function(){return document.body.setAttribute(to,(K_()+1).toString()),function(){var e=K_()-1;e<=0?document.body.removeAttribute(to):document.body.setAttribute(to,e.toString())}},[])},p8=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;d8();var a=w.useMemo(function(){return c8(i)},[i]);return w.createElement(u8,{styles:f8(a,!t,i,n?"":"!important")})},$m=!1;if(typeof window<"u")try{var Ru=Object.defineProperty({},"passive",{get:function(){return $m=!0,!0}});window.addEventListener("test",Ru,Ru),window.removeEventListener("test",Ru,Ru)}catch{$m=!1}var no=$m?{passive:!1}:!1,h8=function(e){return e.tagName==="TEXTAREA"},G_=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!h8(e)&&n[t]==="visible")},m8=function(e){return G_(e,"overflowY")},v8=function(e){return G_(e,"overflowX")},Y_=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=J_(e,r);if(i){var a=X_(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},g8=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},y8=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},J_=function(e,t){return e==="v"?m8(t):v8(t)},X_=function(e,t){return e==="v"?g8(t):y8(t)},b8=function(e,t){return e==="h"&&t==="rtl"?-1:1},x8=function(e,t,n,r,i){var a=b8(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,l=t.contains(s),c=!1,u=o>0,f=0,d=0;do{var p=X_(e,s),h=p[0],m=p[1],y=p[2],v=m-y-a*h;(h||v)&&J_(e,s)&&(f+=v,d+=h),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(Math.abs(f)<1||!i)||!u&&(Math.abs(d)<1||!i))&&(c=!0),c},Au=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Q_=function(e){return[e.deltaX,e.deltaY]},ek=function(e){return e&&"current"in e?e.current:e},w8=function(e,t){return e[0]===t[0]&&e[1]===t[1]},S8=function(e){return`
|
|
322
322
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
323
323
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
324
|
-
`)},E8=0,ro=[];function _8(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(E8++)[0],a=w.useState(
|
|
324
|
+
`)},E8=0,ro=[];function _8(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(E8++)[0],a=w.useState(Z_)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=F6([e.lockRef.current],(e.shards||[]).map(ek),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var v=Au(m),g=n.current,b="deltaX"in m?m.deltaX:g[0]-v[0],k="deltaY"in m?m.deltaY:g[1]-v[1],S,_=m.target,$=Math.abs(b)>Math.abs(k)?"h":"v";if("touches"in m&&$==="h"&&_.type==="range")return!1;var j=Y_($,_);if(!j)return!0;if(j?S=$:(S=$==="v"?"h":"v",j=Y_($,_)),!j)return!1;if(!r.current&&"changedTouches"in m&&(b||k)&&(r.current=S),!S)return!0;var z=r.current||S;return x8(z,y,m,z==="h"?b:k,!0)},[]),l=w.useCallback(function(m){var y=m;if(!(!ro.length||ro[ro.length-1]!==a)){var v="deltaY"in y?Q_(y):Au(y),g=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&w8(S.delta,v)})[0];if(g&&g.should){y.cancelable&&y.preventDefault();return}if(!g){var b=(o.current.shards||[]).map(ek).filter(Boolean).filter(function(S){return S.contains(y.target)}),k=b.length>0?s(y,b[0]):!o.current.noIsolation;k&&y.cancelable&&y.preventDefault()}}},[]),c=w.useCallback(function(m,y,v,g){var b={name:m,delta:y,target:v,should:g,shadowParent:k8(v)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(k){return k!==b})},1)},[]),u=w.useCallback(function(m){n.current=Au(m),r.current=void 0},[]),f=w.useCallback(function(m){c(m.type,Q_(m),m.target,s(m,e.lockRef.current))},[]),d=w.useCallback(function(m){c(m.type,Au(m),m.target,s(m,e.lockRef.current))},[]);w.useEffect(function(){return ro.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,no),document.addEventListener("touchmove",l,no),document.addEventListener("touchstart",u,no),function(){ro=ro.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,no),document.removeEventListener("touchmove",l,no),document.removeEventListener("touchstart",u,no)}},[]);var p=e.removeScrollBar,h=e.inert;return w.createElement(w.Fragment,null,h?w.createElement(a,{styles:S8(i)}):null,p?w.createElement(p8,{gapMode:e.gapMode}):null)}function k8(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $8=e8(V_,_8);var tk=w.forwardRef(function(e,t){return w.createElement(Iu,Bn({},e,{ref:t,sideCar:$8}))});tk.classNames=Iu.classNames;var O8=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},io=new WeakMap,Pu=new WeakMap,ju={},Om=0,nk=function(e){return e&&(e.host||nk(e.parentNode))},T8=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=nk(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},C8=function(e,t,n,r){var i=T8(t,Array.isArray(e)?e:[e]);ju[n]||(ju[n]=new WeakMap);var a=ju[n],o=[],s=new Set,l=new Set(i),c=function(f){!f||s.has(f)||(s.add(f),c(f.parentNode))};i.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(s.has(d))u(d);else try{var p=d.getAttribute(r),h=p!==null&&p!=="false",m=(io.get(d)||0)+1,y=(a.get(d)||0)+1;io.set(d,m),a.set(d,y),o.push(d),m===1&&h&&Pu.set(d,!0),y===1&&d.setAttribute(n,"true"),h||d.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",d,v)}})};return u(t),s.clear(),Om++,function(){o.forEach(function(f){var d=io.get(f)-1,p=a.get(f)-1;io.set(f,d),a.set(f,p),d||(Pu.has(f)||f.removeAttribute(r),Pu.delete(f)),p||f.removeAttribute(n)}),Om--,Om||(io=new WeakMap,io=new WeakMap,Pu=new WeakMap,ju={})}},I8=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=O8(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),C8(r,i,n,"aria-hidden")):function(){return null}},Tm="Dialog",[rk,Wpe]=I_(Tm),[R8,Tr]=rk(Tm),ik=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=w.useRef(null),l=w.useRef(null),[c=!1,u]=R_({prop:r,defaultProp:i,onChange:a});return C.jsx(R8,{scope:t,triggerRef:s,contentRef:l,contentId:ku(),titleId:ku(),descriptionId:ku(),open:c,onOpenChange:u,onOpenToggle:w.useCallback(()=>u(f=>!f),[u]),modal:o,children:n})};ik.displayName=Tm;var ak="DialogTrigger",ok=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Tr(ak,n),a=ri(t,i.triggerRef);return C.jsx(pn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Im(i.open),...r,ref:a,onClick:Gr(e.onClick,i.onOpenToggle)})});ok.displayName=ak;var A8="DialogPortal",[Hpe,sk]=rk(A8,{forceMount:void 0}),Nu="DialogOverlay",lk=w.forwardRef((e,t)=>{const n=sk(Nu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Tr(Nu,e.__scopeDialog);return a.modal?C.jsx($u,{present:r||a.open,children:C.jsx(P8,{...i,ref:t})}):null});lk.displayName=Nu;var P8=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Tr(Nu,n);return C.jsx(tk,{as:Wf,allowPinchZoom:!0,shards:[i.contentRef],children:C.jsx(pn.div,{"data-state":Im(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ra="DialogContent",ck=w.forwardRef((e,t)=>{const n=sk(ra,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Tr(ra,e.__scopeDialog);return C.jsx($u,{present:r||a.open,children:a.modal?C.jsx(j8,{...i,ref:t}):C.jsx(N8,{...i,ref:t})})});ck.displayName=ra;var j8=w.forwardRef((e,t)=>{const n=Tr(ra,e.__scopeDialog),r=w.useRef(null),i=ri(t,n.contentRef,r);return w.useEffect(()=>{const a=r.current;if(a)return I8(a)},[]),C.jsx(uk,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Gr(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Gr(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Gr(e.onFocusOutside,a=>a.preventDefault())})}),N8=w.forwardRef((e,t)=>{const n=Tr(ra,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return C.jsx(uk,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),uk=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Tr(ra,n),l=w.useRef(null),c=ri(t,l);return HV(),C.jsxs(C.Fragment,{children:[C.jsx(L_,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:C.jsx(j_,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Im(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),C.jsxs(C.Fragment,{children:[C.jsx(M8,{titleId:s.titleId}),C.jsx(F8,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Cm="DialogTitle",fk=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Tr(Cm,n);return C.jsx(pn.h2,{id:i.titleId,...r,ref:t})});fk.displayName=Cm;var dk="DialogDescription",D8=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Tr(dk,n);return C.jsx(pn.p,{id:i.descriptionId,...r,ref:t})});D8.displayName=dk;var pk="DialogClose",hk=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Tr(pk,n);return C.jsx(pn.button,{type:"button",...r,ref:t,onClick:Gr(e.onClick,()=>i.onOpenChange(!1))})});hk.displayName=pk;function Im(e){return e?"open":"closed"}var mk="DialogTitleWarning",[Vpe,vk]=SV(mk,{contentName:ra,titleName:Cm,docsSlug:"dialog"}),M8=({titleId:e})=>{const t=vk(mk),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
325
325
|
|
|
326
326
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
327
327
|
|
|
328
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},L8="DialogDescriptionWarning",F8=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mk(L8).contentName}}.`;return w.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},B8=rk,z8=ak,U8=sk,q8=lk,W8=uk,vk=pk;function H8({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const gk=w.forwardRef(H8);function Ti({open:e,onOpenChange:t,children:n}){return C.jsx(B8,{open:e,onOpenChange:t,children:n})}function V8({title:e,children:t}){var r,i,a,o,s,l,c,u;const{modal:n}=yt;return C.jsxs(C.Fragment,{children:[C.jsx(U8,{...n==null?void 0:n.overlay}),C.jsx("div",{...n==null?void 0:n.container,children:C.jsxs(q8,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[C.jsxs("div",{...(a=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:a.container,children:[C.jsx(W8,{...(s=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:s.text,children:e}),C.jsx(vk,{children:C.jsx(gk,{role:"button",tabIndex:0,...(c=(l=n==null?void 0:n.dialog)==null?void 0:l.title)==null?void 0:c.closeIcon})})]}),C.jsx("div",{...(u=n==null?void 0:n.dialog)==null?void 0:u.content,children:t})]})})]})}Ti.Button=z8,Ti.Close=vk,Ti.Content=V8;const yk=D.forwardRef(({children:e,className:t,...n},r)=>{const{container:{className:i}}=yt;return C.jsxs("div",{...n,className:Gp(i,t),ref:r,children:[C.jsx(Fz,{}),C.jsxs(WS,{children:[C.jsx(Z8,{}),e]})]})}),Z8=()=>{const{modal:e}=yt,t=Me(r=>r.connected),{showModal:n}=X1();return D.useEffect(()=>{var r,i,a,o;t||n({title:"Connection Error",content:C.jsxs(C.Fragment,{children:[C.jsx("p",{...(i=(r=e==null?void 0:e.dialog)==null?void 0:r.newConversation)==null?void 0:i.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),C.jsx(Ti.Close,{asChild:!0,children:C.jsx("button",{type:"button",...(o=(a=e==null?void 0:e.dialog)==null?void 0:a.newConversation)==null?void 0:o.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),C.jsx(C.Fragment,{})},K8=D.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:i}=yt,{container:a,icon:o}=i??{};return C.jsx("div",{...n,...a,ref:r,onClick:t,children:C.jsx("div",{...o})})});var Rm="Collapsible",[G8,Zpe]=C_(Rm),[Y8,Am]=G8(Rm),bk=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[l=!1,c]=I_({prop:r,defaultProp:i,onChange:o});return C.jsx(Y8,{scope:n,disabled:a,contentId:$u(),open:l,onOpenToggle:w.useCallback(()=>c(u=>!u),[c]),children:C.jsx(pn.div,{"data-state":jm(l),"data-disabled":a?"":void 0,...s,ref:t})})});bk.displayName=Rm;var xk="CollapsibleTrigger",wk=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Am(xk,n);return C.jsx(pn.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":jm(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Gr(e.onClick,i.onOpenToggle)})});wk.displayName=xk;var Pm="CollapsibleContent",Sk=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Am(Pm,e.__scopeCollapsible);return C.jsx(Ou,{present:n||i.open,children:({present:a})=>C.jsx(J8,{...r,ref:t,present:a})})});Sk.displayName=Pm;var J8=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Am(Pm,n),[s,l]=w.useState(r),c=w.useRef(null),u=ri(t,c),f=w.useRef(0),d=f.current,p=w.useRef(0),h=p.current,m=o.open||s,y=w.useRef(m),v=w.useRef();return w.useEffect(()=>{const g=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(g)},[]),pa(()=>{const g=c.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();f.current=b.height,p.current=b.width,y.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),l(r)}},[o.open,r]),C.jsx(pn.div,{"data-state":jm(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...a,ref:u,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&i})});function jm(e){return e?"open":"closed"}var X8=bk,Q8=Sk;const Ek=({...e})=>{var o,s;const{header:t,modal:n}=yt,r=Me(l=>l.restartConversation),{showModal:i}=X1(),a=l=>{var c,u,f,d;l.stopPropagation(),i({title:"Restart Conversation",content:C.jsxs(C.Fragment,{children:[C.jsx("p",{...(u=(c=n==null?void 0:n.dialog)==null?void 0:c.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),C.jsx(Ti.Close,{asChild:!0,children:C.jsx("button",{type:"button",...(d=(f=n==null?void 0:n.dialog)==null?void 0:f.newConversation)==null?void 0:d.button,onClick:r,children:"Restart"})})]})})};return C.jsx(EU,{...e,...(s=(o=t==null?void 0:t.content)==null?void 0:o.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:a,onKeyDown:l=>{l.key==="Enter"&&a(l)}})},eZ=({...e})=>{const{header:t}=yt,n=Me(i=>i.closeWindow),r=i=>{i.stopPropagation(),n==null||n()};return C.jsx(gk,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},Vs=({icon:e,title:t,link:n,...r})=>{var o,s,l,c,u,f,d,p,h,m,y,v;const{header:i}=yt,a=e??f7;return t?n?C.jsxs("a",{...r,...(s=(o=i.expandedContent)==null?void 0:o.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[C.jsx(a,{...(c=(l=i.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:c.icon}),C.jsx("p",{...(f=(u=i.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):C.jsxs("div",{...r,...(p=(d=i.expandedContent)==null?void 0:d.descriptionItems)==null?void 0:p.container,children:[C.jsx(a,{...(m=(h=i.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:m.icon}),C.jsx("p",{...(v=(y=i.expandedContent)==null?void 0:y.descriptionItems)==null?void 0:v.text,children:t})]}):null},_k=({defaultOpen:e,disabled:t,onOpenChange:n,...r})=>{var d,p,h,m,y,v,g,b,k,S,_,$,j,z,O,N,W,L,U,M,I,H;const{header:i}=yt,a=Me(B=>B.configuration),o=Me(B=>B.closeWindow),s=Me(B=>B.getClientId)(),l=Me(B=>!B.disableRestartConversation),[c,u]=D.useState(!!e),f=!!((d=a.email)!=null&&d.title)||!!((p=a.phone)!=null&&p.title)||!!((h=a.website)!=null&&h.title)||!!((m=a.termsOfService)!=null&&m.link)||!!((y=a.privacyPolicy)!=null&&y.link);return C.jsxs(X8,{open:f?c:!1,onOpenChange:u,"data-disabled":f?void 0:"",...i.container,...r,children:[C.jsxs(wk,{...i.content.container,children:[C.jsx(ad,{...r,userId:s,src:a.botAvatar,...i.content.avatar,children:a.botName||"Bot"}),C.jsx("h2",{...i.content.title,children:a.botName||"Bot"}),a.botDescription&&C.jsx("p",{...i.content.description,children:a.botDescription}),C.jsxs("div",{...i.content.actions.container,children:[l&&C.jsx(Ek,{}),o&&C.jsx(eZ,{})]})]}),C.jsxs(Q8,{...i.expandedContent.container,children:[C.jsxs("div",{"data-links":"",...i.expandedContent.group,children:[C.jsx(Vs,{"data-email":"",icon:b7,title:(v=a.email)==null?void 0:v.title,link:(b=(g=a.email)==null?void 0:g.link)!=null&&b.startsWith("mailto:")?(k=a.email)==null?void 0:k.link:`mailto:${(S=a.email)==null?void 0:S.link}`}),C.jsx(Vs,{"data-phone":"",icon:k7,title:(_=a.phone)==null?void 0:_.title,link:(j=($=a.phone)==null?void 0:$.link)!=null&&j.startsWith("tel:")?(z=a.phone)==null?void 0:z.link:`tel:${(O=a.phone)==null?void 0:O.link}`}),C.jsx(Vs,{"data-website":"",link:(N=a.website)==null?void 0:N.link,icon:w7,title:(W=a.website)==null?void 0:W.title})]}),C.jsxs("div",{"data-legal":"",...(L=i.expandedContent)==null?void 0:L.group,children:[C.jsx(Vs,{"data-terms":"",link:(U=a.termsOfService)==null?void 0:U.link,icon:g7,title:(M=a.termsOfService)==null?void 0:M.title}),C.jsx(Vs,{"data-privacy":"",link:(I=a.privacyPolicy)==null?void 0:I.link,icon:E7,title:(H=a.privacyPolicy)==null?void 0:H.title})]})]})]})},kk=D.memo(({...e})=>{const{typingIndicator:t}=yt;return C.jsx("div",{...e,...t==null?void 0:t.container,children:C.jsx("div",{...t==null?void 0:t.loader})})}),Nm=D.memo(D.forwardRef(({direction:e,block:t,scroll:n,disableInput:r,children:i,sender:a,id:o,metadata:s,...l},c)=>{var v,g,b,k;const[u,f]=D.useState([]),{message:d}=yt,{botAvatar:p,botName:h}=Me(S=>S.configuration),m=Me(S=>S.getClientId)(),y=Hy(m??"",15);return C.jsx(Y1.Provider,{value:{isLoading:u,setIsLoading:f},children:C.jsxs("div",{...l,...d==null?void 0:d.container,"data-loaded":u.length===0,"data-disable-input":!!r,"data-direction":e,ref:c,children:[C.jsxs(Kf,{"data-color":y,...(v=d==null?void 0:d.avatar)==null?void 0:v.container,children:[C.jsx(Gf,{...(g=d==null?void 0:d.avatar)==null?void 0:g.image,src:(a==null?void 0:a.avatar)??p}),C.jsx(Yf,{...(b=d==null?void 0:d.avatar)==null?void 0:b.fallback,children:(a==null?void 0:a.name[0])??((k=h??"Bot")==null?void 0:k[0])})]}),t&&C.jsx(Xa,{block:t,direction:e,sender:a,timestamp:l.timestamp,messageId:o,metadata:s}),i]})})}));function tZ(){const e=Me(r=>r.getClientId)(),t=Me(r=>r.configuration),{messageList:{marquee:n}}=yt;return C.jsxs("li",{...n.container,children:[C.jsx(ad,{userId:e,src:t.botAvatar,...n.avatar,children:(t.botName||"Bot").slice(0,1)}),C.jsxs("div",{...n.content,children:[C.jsx("h1",{...n.title,children:t.botName||"Bot"}),C.jsx("p",{...n.description,children:t.botDescription})]})]})}function nZ(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var i=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),r.head.appendChild(i)}}catch{}}function rZ(){nZ("react-scroll-to-bottom:version","4.2.0")}var Zs=function(e){return e&&e.Math===Math&&e},Bt=Zs(typeof globalThis=="object"&&globalThis)||Zs(typeof window=="object"&&window)||Zs(typeof self=="object"&&self)||Zs(typeof ut=="object"&&ut)||Zs(typeof ut=="object"&&ut)||function(){return this}()||Function("return this")(),zt=function(e){try{return!!e()}catch{return!0}},iZ=zt,Mu=!iZ(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),aZ=Mu,$k=Function.prototype,Ok=$k.apply,Tk=$k.call,Dm=typeof Reflect=="object"&&Reflect.apply||(aZ?Tk.bind(Ok):function(){return Tk.apply(Ok,arguments)}),Ck=Mu,Ik=Function.prototype,Mm=Ik.call,oZ=Ck&&Ik.bind.bind(Mm,Mm),Nt=Ck?oZ:function(e){return function(){return Mm.apply(e,arguments)}},Rk=Nt,sZ=Rk({}.toString),lZ=Rk("".slice),ia=function(e){return lZ(sZ(e),8,-1)},cZ=ia,uZ=Nt,Lm=function(e){if(cZ(e)==="Function")return uZ(e)},Fm=typeof document=="object"&&document.all,on=typeof Fm>"u"&&Fm!==void 0?function(e){return typeof e=="function"||e===Fm}:function(e){return typeof e=="function"},Ks={},fZ=zt,yn=!fZ(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),dZ=Mu,Lu=Function.prototype.call,Cr=dZ?Lu.bind(Lu):function(){return Lu.apply(Lu,arguments)},Bm={},Ak={}.propertyIsEnumerable,Pk=Object.getOwnPropertyDescriptor,pZ=Pk&&!Ak.call({1:2},1);Bm.f=pZ?function(t){var n=Pk(this,t);return!!n&&n.enumerable}:Ak;var Gs=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},hZ=Nt,mZ=zt,vZ=ia,zm=Object,gZ=hZ("".split),jk=mZ(function(){return!zm("z").propertyIsEnumerable(0)})?function(e){return vZ(e)==="String"?gZ(e,""):zm(e)}:zm,Um=function(e){return e==null},yZ=Um,bZ=TypeError,Fu=function(e){if(yZ(e))throw new bZ("Can't call method on "+e);return e},xZ=jk,wZ=Fu,Ir=function(e){return xZ(wZ(e))},SZ=on,rr=function(e){return typeof e=="object"?e!==null:SZ(e)},Jt={},qm=Jt,Wm=Bt,EZ=on,Nk=function(e){return EZ(e)?e:void 0},Rr=function(e,t){return arguments.length<2?Nk(qm[e])||Nk(Wm[e]):qm[e]&&qm[e][t]||Wm[e]&&Wm[e][t]},_Z=Nt,Yr=_Z({}.isPrototypeOf),kZ=Bt,Dk=kZ.navigator,Mk=Dk&&Dk.userAgent,Hm=Mk?String(Mk):"",Lk=Bt,Vm=Hm,Fk=Lk.process,Bk=Lk.Deno,zk=Fk&&Fk.versions||Bk&&Bk.version,Uk=zk&&zk.v8,ir,Bu;Uk&&(ir=Uk.split("."),Bu=ir[0]>0&&ir[0]<4?1:+(ir[0]+ir[1])),!Bu&&Vm&&(ir=Vm.match(/Edge\/(\d+)/),(!ir||ir[1]>=74)&&(ir=Vm.match(/Chrome\/(\d+)/),ir&&(Bu=+ir[1])));var Zm=Bu,qk=Zm,$Z=zt,OZ=Bt,TZ=OZ.String,ao=!!Object.getOwnPropertySymbols&&!$Z(function(){var e=Symbol("symbol detection");return!TZ(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&qk&&qk<41}),CZ=ao,Wk=CZ&&!Symbol.sham&&typeof Symbol.iterator=="symbol",IZ=Rr,RZ=on,AZ=Yr,PZ=Wk,jZ=Object,Ys=PZ?function(e){return typeof e=="symbol"}:function(e){var t=IZ("Symbol");return RZ(t)&&AZ(t.prototype,jZ(e))},NZ=String,zu=function(e){try{return NZ(e)}catch{return"Object"}},DZ=on,MZ=zu,LZ=TypeError,Uu=function(e){if(DZ(e))return e;throw new LZ(MZ(e)+" is not a function")},FZ=Uu,BZ=Um,Km=function(e,t){var n=e[t];return BZ(n)?void 0:FZ(n)},Gm=Cr,Ym=on,Jm=rr,zZ=TypeError,UZ=function(e,t){var n,r;if(t==="string"&&Ym(n=e.toString)&&!Jm(r=Gm(n,e))||Ym(n=e.valueOf)&&!Jm(r=Gm(n,e))||t!=="string"&&Ym(n=e.toString)&&!Jm(r=Gm(n,e)))return r;throw new zZ("Can't convert object to primitive value")},Hk={exports:{}},Vk=Bt,qZ=Object.defineProperty,WZ=function(e,t){try{qZ(Vk,e,{value:t,configurable:!0,writable:!0})}catch{Vk[e]=t}return t},HZ=Bt,VZ=WZ,Zk="__core-js_shared__",Kk=Hk.exports=HZ[Zk]||VZ(Zk,{});(Kk.versions||(Kk.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Xm=Hk.exports,Gk=Xm,oo=function(e,t){return Gk[e]||(Gk[e]=t||{})},ZZ=Fu,KZ=Object,Jr=function(e){return KZ(ZZ(e))},GZ=Nt,YZ=Jr,JZ=GZ({}.hasOwnProperty),Tn=Object.hasOwn||function(t,n){return JZ(YZ(t),n)},XZ=Nt,QZ=0,eK=Math.random(),tK=XZ(1 .toString),Qm=function(e){return"Symbol("+(e===void 0?"":e)+")_"+tK(++QZ+eK,36)},nK=Bt,rK=oo,Yk=Tn,iK=Qm,aK=ao,oK=Wk,so=nK.Symbol,ev=rK("wks"),sK=oK?so.for||so:so&&so.withoutSetter||iK,Zt=function(e){return Yk(ev,e)||(ev[e]=aK&&Yk(so,e)?so[e]:sK("Symbol."+e)),ev[e]},lK=Cr,Jk=rr,Xk=Ys,cK=Km,uK=UZ,fK=Zt,dK=TypeError,pK=fK("toPrimitive"),hK=function(e,t){if(!Jk(e)||Xk(e))return e;var n=cK(e,pK),r;if(n){if(t===void 0&&(t="default"),r=lK(n,e,t),!Jk(r)||Xk(r))return r;throw new dK("Can't convert object to primitive value")}return t===void 0&&(t="number"),uK(e,t)},mK=hK,vK=Ys,tv=function(e){var t=mK(e,"string");return vK(t)?t:t+""},gK=Bt,Qk=rr,nv=gK.document,yK=Qk(nv)&&Qk(nv.createElement),e$=function(e){return yK?nv.createElement(e):{}},bK=yn,xK=zt,wK=e$,t$=!bK&&!xK(function(){return Object.defineProperty(wK("div"),"a",{get:function(){return 7}}).a!==7}),SK=yn,EK=Cr,_K=Bm,kK=Gs,$K=Ir,OK=tv,TK=Tn,CK=t$,n$=Object.getOwnPropertyDescriptor;Ks.f=SK?n$:function(t,n){if(t=$K(t),n=OK(n),CK)try{return n$(t,n)}catch{}if(TK(t,n))return kK(!EK(_K.f,t,n),t[n])};var IK=zt,RK=on,AK=/#|\.prototype\./,Js=function(e,t){var n=jK[PK(e)];return n===DK?!0:n===NK?!1:RK(t)?IK(t):!!t},PK=Js.normalize=function(e){return String(e).replace(AK,".").toLowerCase()},jK=Js.data={},NK=Js.NATIVE="N",DK=Js.POLYFILL="P",MK=Js,r$=Lm,LK=Uu,FK=Mu,BK=r$(r$.bind),rv=function(e,t){return LK(e),t===void 0?e:FK?BK(e,t):function(){return e.apply(t,arguments)}},ar={},zK=yn,UK=zt,i$=zK&&UK(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),qK=rr,WK=String,HK=TypeError,Ci=function(e){if(qK(e))return e;throw new HK(WK(e)+" is not an object")},VK=yn,ZK=t$,KK=i$,qu=Ci,a$=tv,GK=TypeError,iv=Object.defineProperty,YK=Object.getOwnPropertyDescriptor,av="enumerable",ov="configurable",sv="writable";ar.f=VK?KK?function(t,n,r){if(qu(t),n=a$(n),qu(r),typeof t=="function"&&n==="prototype"&&"value"in r&&sv in r&&!r[sv]){var i=YK(t,n);i&&i[sv]&&(t[n]=r.value,r={configurable:ov in r?r[ov]:i[ov],enumerable:av in r?r[av]:i[av],writable:!1})}return iv(t,n,r)}:iv:function(t,n,r){if(qu(t),n=a$(n),qu(r),ZK)try{return iv(t,n,r)}catch{}if("get"in r||"set"in r)throw new GK("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var JK=yn,XK=ar,QK=Gs,Wu=JK?function(e,t,n){return XK.f(e,t,QK(1,n))}:function(e,t,n){return e[t]=n,e},Xs=Bt,eG=Dm,tG=Lm,nG=on,rG=Ks.f,iG=MK,lo=Jt,aG=rv,co=Wu,o$=Tn,oG=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return eG(e,this,arguments)};return t.prototype=e.prototype,t},vt=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?Xs:i?Xs[n]:Xs[n]&&Xs[n].prototype,s=r?lo:lo[n]||co(lo,n,{})[n],l=s.prototype,c,u,f,d,p,h,m,y,v;for(d in t)c=iG(r?d:n+(i?".":"#")+d,e.forced),u=!c&&o&&o$(o,d),h=s[d],u&&(e.dontCallGetSet?(v=rG(o,d),m=v&&v.value):m=o[d]),p=u&&m?m:t[d],!(!c&&!a&&typeof h==typeof p)&&(e.bind&&u?y=aG(p,Xs):e.wrap&&u?y=oG(p):a&&nG(p)?y=tG(p):y=p,(e.sham||p&&p.sham||h&&h.sham)&&co(y,"sham",!0),co(s,d,y),a&&(f=n+"Prototype",o$(lo,f)||co(lo,f,{}),co(lo[f],d,p),e.real&&l&&(c||!l[d])&&co(l,d,p)))},sG=ia,uo=Array.isArray||function(t){return sG(t)==="Array"},lG=vt,cG=uo;lG({target:"Array",stat:!0},{isArray:cG});var uG=Jt,fG=uG.Array.isArray,dG=fG,s$=dG,pG=s$,hG=pG,mG=hG,vG=mG,gG=vG;const l$=Ze(gG);function yG(e){if(l$(e))return e}var bG=Math.ceil,xG=Math.floor,wG=Math.trunc||function(t){var n=+t;return(n>0?xG:bG)(n)},SG=wG,Hu=function(e){var t=+e;return t!==t||t===0?0:SG(t)},EG=Hu,_G=Math.min,kG=function(e){var t=EG(e);return t>0?_G(t,9007199254740991):0},$G=kG,aa=function(e){return $G(e.length)},OG=TypeError,TG=9007199254740991,lv=function(e){if(e>TG)throw OG("Maximum allowed index exceeded");return e},CG=yn,IG=ar,RG=Gs,Qs=function(e,t,n){CG?IG.f(e,t,RG(0,n)):e[t]=n},AG=Zt,PG=AG("toStringTag"),c$={};c$[PG]="z";var cv=String(c$)==="[object z]",jG=cv,NG=on,Vu=ia,DG=Zt,MG=DG("toStringTag"),LG=Object,FG=Vu(function(){return arguments}())==="Arguments",BG=function(e,t){try{return e[t]}catch{}},el=jG?Vu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=BG(t=LG(e),MG))=="string"?n:FG?Vu(t):(r=Vu(t))==="Object"&&NG(t.callee)?"Arguments":r},zG=Nt,UG=on,uv=Xm,qG=zG(Function.toString);UG(uv.inspectSource)||(uv.inspectSource=function(e){return qG(e)});var WG=uv.inspectSource,HG=Nt,VG=zt,u$=on,ZG=el,KG=Rr,GG=WG,f$=function(){},d$=KG("Reflect","construct"),fv=/^\s*(?:class|function)\b/,YG=HG(fv.exec),JG=!fv.test(f$),tl=function(t){if(!u$(t))return!1;try{return d$(f$,[],t),!0}catch{return!1}},p$=function(t){if(!u$(t))return!1;switch(ZG(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return JG||!!YG(fv,GG(t))}catch{return!0}};p$.sham=!0;var dv=!d$||VG(function(){var e;return tl(tl.call)||!tl(Object)||!tl(function(){e=!0})||e})?p$:tl,h$=uo,XG=dv,QG=rr,eY=Zt,tY=eY("species"),m$=Array,nY=function(e){var t;return h$(e)&&(t=e.constructor,XG(t)&&(t===m$||h$(t.prototype))?t=void 0:QG(t)&&(t=t[tY],t===null&&(t=void 0))),t===void 0?m$:t},rY=nY,pv=function(e,t){return new(rY(e))(t===0?0:t)},iY=zt,aY=Zt,oY=Zm,sY=aY("species"),Zu=function(e){return oY>=51||!iY(function(){var t=[],n=t.constructor={};return n[sY]=function(){return{foo:1}},t[e](Boolean).foo!==1})},lY=vt,cY=zt,uY=uo,fY=rr,dY=Jr,pY=aa,v$=lv,g$=Qs,hY=pv,mY=Zu,vY=Zt,gY=Zm,y$=vY("isConcatSpreadable"),yY=gY>=51||!cY(function(){var e=[];return e[y$]=!1,e.concat()[0]!==e}),bY=function(e){if(!fY(e))return!1;var t=e[y$];return t!==void 0?!!t:uY(e)},xY=!yY||!mY("concat");lY({target:"Array",proto:!0,arity:1,forced:xY},{concat:function(t){var n=dY(this),r=hY(n,0),i=0,a,o,s,l,c;for(a=-1,s=arguments.length;a<s;a++)if(c=a===-1?n:arguments[a],bY(c))for(l=pY(c),v$(i+l),o=0;o<l;o++,i++)o in c&&g$(r,i,c[o]);else v$(i+1),g$(r,i++,c);return r.length=i,r}});var wY=el,SY=String,nl=function(e){if(wY(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return SY(e)},Ku={},EY=Hu,_Y=Math.max,kY=Math.min,hv=function(e,t){var n=EY(e);return n<0?_Y(n+t,0):kY(n,t)},$Y=Ir,OY=hv,TY=aa,b$=function(e){return function(t,n,r){var i=$Y(t),a=TY(i);if(a===0)return!e&&-1;var o=OY(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},x$={includes:b$(!0),indexOf:b$(!1)},Gu={},CY=Nt,mv=Tn,IY=Ir,RY=x$.indexOf,AY=Gu,w$=CY([].push),S$=function(e,t){var n=IY(e),r=0,i=[],a;for(a in n)!mv(AY,a)&&mv(n,a)&&w$(i,a);for(;t.length>r;)mv(n,a=t[r++])&&(~RY(i,a)||w$(i,a));return i},vv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],PY=S$,jY=vv,gv=Object.keys||function(t){return PY(t,jY)},NY=yn,DY=i$,MY=ar,LY=Ci,FY=Ir,BY=gv;Ku.f=NY&&!DY?Object.defineProperties:function(t,n){LY(t);for(var r=FY(n),i=BY(n),a=i.length,o=0,s;a>o;)MY.f(t,s=i[o++],r[s]);return t};var zY=Rr,UY=zY("document","documentElement"),qY=oo,WY=Qm,E$=qY("keys"),Yu=function(e){return E$[e]||(E$[e]=WY(e))},HY=Ci,VY=Ku,_$=vv,ZY=Gu,KY=UY,GY=e$,YY=Yu,k$=">",$$="<",yv="prototype",bv="script",O$=YY("IE_PROTO"),xv=function(){},T$=function(e){return $$+bv+k$+e+$$+"/"+bv+k$},C$=function(e){e.write(T$("")),e.close();var t=e.parentWindow.Object;return e=null,t},JY=function(){var e=GY("iframe"),t="java"+bv+":",n;return e.style.display="none",KY.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(T$("document.F=Object")),n.close(),n.F},Ju,Xu=function(){try{Ju=new ActiveXObject("htmlfile")}catch{}Xu=typeof document<"u"?document.domain&&Ju?C$(Ju):JY():C$(Ju);for(var e=_$.length;e--;)delete Xu[yv][_$[e]];return Xu()};ZY[O$]=!0;var wv=Object.create||function(t,n){var r;return t!==null?(xv[yv]=HY(t),r=new xv,xv[yv]=null,r[O$]=t):r=Xu(),n===void 0?r:VY.f(r,n)},Qu={},XY=S$,QY=vv,eJ=QY.concat("length","prototype");Qu.f=Object.getOwnPropertyNames||function(t){return XY(t,eJ)};var I$={},tJ=Nt,ef=tJ([].slice),nJ=ia,rJ=Ir,R$=Qu.f,iJ=ef,A$=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],aJ=function(e){try{return R$(e)}catch{return iJ(A$)}};I$.f=function(t){return A$&&nJ(t)==="Window"?aJ(t):R$(rJ(t))};var tf={};tf.f=Object.getOwnPropertySymbols;var oJ=Wu,nf=function(e,t,n,r){return r&&r.enumerable?e[t]=n:oJ(e,t,n),e},sJ=ar,lJ=function(e,t,n){return sJ.f(e,t,n)},rl={},cJ=Zt;rl.f=cJ;var P$=Jt,uJ=Tn,fJ=rl,dJ=ar.f,_t=function(e){var t=P$.Symbol||(P$.Symbol={});uJ(t,e)||dJ(t,e,{value:fJ.f(e)})},pJ=Cr,hJ=Rr,mJ=Zt,vJ=nf,j$=function(){var e=hJ("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=mJ("toPrimitive");t&&!t[r]&&vJ(t,r,function(i){return pJ(n,this)},{arity:1})},gJ=cv,yJ=el,bJ=gJ?{}.toString:function(){return"[object "+yJ(this)+"]"},xJ=cv,wJ=ar.f,SJ=Wu,EJ=Tn,_J=bJ,kJ=Zt,N$=kJ("toStringTag"),fo=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(EJ(i,N$)||wJ(i,N$,{configurable:!0,value:t}),r&&!xJ&&SJ(i,"toString",_J))},$J=Bt,OJ=on,D$=$J.WeakMap,TJ=OJ(D$)&&/native code/.test(String(D$)),CJ=TJ,M$=Bt,IJ=rr,RJ=Wu,Sv=Tn,Ev=Xm,AJ=Yu,PJ=Gu,L$="Object already initialized",_v=M$.TypeError,jJ=M$.WeakMap,rf,il,af,NJ=function(e){return af(e)?il(e):rf(e,{})},DJ=function(e){return function(t){var n;if(!IJ(t)||(n=il(t)).type!==e)throw new _v("Incompatible receiver, "+e+" required");return n}};if(CJ||Ev.state){var Ar=Ev.state||(Ev.state=new jJ);Ar.get=Ar.get,Ar.has=Ar.has,Ar.set=Ar.set,rf=function(e,t){if(Ar.has(e))throw new _v(L$);return t.facade=e,Ar.set(e,t),t},il=function(e){return Ar.get(e)||{}},af=function(e){return Ar.has(e)}}else{var po=AJ("state");PJ[po]=!0,rf=function(e,t){if(Sv(e,po))throw new _v(L$);return t.facade=e,RJ(e,po,t),t},il=function(e){return Sv(e,po)?e[po]:{}},af=function(e){return Sv(e,po)}}var kv={set:rf,get:il,has:af,enforce:NJ,getterFor:DJ},MJ=rv,LJ=Nt,FJ=jk,BJ=Jr,zJ=aa,UJ=pv,F$=LJ([].push),Ii=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(l,c,u,f){for(var d=BJ(l),p=FJ(d),h=zJ(p),m=MJ(c,u),y=0,v=f||UJ,g=t?v(l,h):n||o?v(l,0):void 0,b,k;h>y;y++)if((s||y in p)&&(b=p[y],k=m(b,y,d),e))if(t)g[y]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return y;case 2:F$(g,b)}else switch(e){case 4:return!1;case 7:F$(g,b)}return a?-1:r||i?i:g}},$v={forEach:Ii(0),map:Ii(1),filter:Ii(2),some:Ii(3),every:Ii(4),find:Ii(5),findIndex:Ii(6),filterReject:Ii(7)},of=vt,al=Bt,Ov=Cr,qJ=Nt,ho=yn,mo=ao,WJ=zt,Kt=Tn,HJ=Yr,Tv=Ci,sf=Ir,Cv=tv,VJ=nl,Iv=Gs,vo=wv,B$=gv,ZJ=Qu,z$=I$,KJ=tf,U$=Ks,q$=ar,GJ=Ku,W$=Bm,H$=nf,YJ=lJ,Rv=oo,JJ=Yu,V$=Gu,Z$=Qm,XJ=Zt,QJ=rl,eX=_t,tX=j$,nX=fo,K$=kv,lf=$v.forEach,bn=JJ("hidden"),cf="Symbol",ol="prototype",rX=K$.set,G$=K$.getterFor(cf),or=Object[ol],oa=al.Symbol,sl=oa&&oa[ol],iX=al.RangeError,aX=al.TypeError,Av=al.QObject,Y$=U$.f,sa=q$.f,J$=z$.f,oX=W$.f,X$=qJ([].push),Xr=Rv("symbols"),ll=Rv("op-symbols"),sX=Rv("wks"),Pv=!Av||!Av[ol]||!Av[ol].findChild,Q$=function(e,t,n){var r=Y$(or,t);r&&delete or[t],sa(e,t,n),r&&e!==or&&sa(or,t,r)},jv=ho&&WJ(function(){return vo(sa({},"a",{get:function(){return sa(this,"a",{value:7}).a}})).a!==7})?Q$:sa,Nv=function(e,t){var n=Xr[e]=vo(sl);return rX(n,{type:cf,tag:e,description:t}),ho||(n.description=t),n},uf=function(t,n,r){t===or&&uf(ll,n,r),Tv(t);var i=Cv(n);return Tv(r),Kt(Xr,i)?(r.enumerable?(Kt(t,bn)&&t[bn][i]&&(t[bn][i]=!1),r=vo(r,{enumerable:Iv(0,!1)})):(Kt(t,bn)||sa(t,bn,Iv(1,vo(null))),t[bn][i]=!0),jv(t,i,r)):sa(t,i,r)},Dv=function(t,n){Tv(t);var r=sf(n),i=B$(r).concat(rO(r));return lf(i,function(a){(!ho||Ov(eO,r,a))&&uf(t,a,r[a])}),t},lX=function(t,n){return n===void 0?vo(t):Dv(vo(t),n)},eO=function(t){var n=Cv(t),r=Ov(oX,this,n);return this===or&&Kt(Xr,n)&&!Kt(ll,n)?!1:r||!Kt(this,n)||!Kt(Xr,n)||Kt(this,bn)&&this[bn][n]?r:!0},tO=function(t,n){var r=sf(t),i=Cv(n);if(!(r===or&&Kt(Xr,i)&&!Kt(ll,i))){var a=Y$(r,i);return a&&Kt(Xr,i)&&!(Kt(r,bn)&&r[bn][i])&&(a.enumerable=!0),a}},nO=function(t){var n=J$(sf(t)),r=[];return lf(n,function(i){!Kt(Xr,i)&&!Kt(V$,i)&&X$(r,i)}),r},rO=function(e){var t=e===or,n=J$(t?ll:sf(e)),r=[];return lf(n,function(i){Kt(Xr,i)&&(!t||Kt(or,i))&&X$(r,Xr[i])}),r};mo||(oa=function(){if(HJ(sl,this))throw new aX("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:VJ(arguments[0]),n=Z$(t),r=function(i){var a=this===void 0?al:this;a===or&&Ov(r,ll,i),Kt(a,bn)&&Kt(a[bn],n)&&(a[bn][n]=!1);var o=Iv(1,i);try{jv(a,n,o)}catch(s){if(!(s instanceof iX))throw s;Q$(a,n,o)}};return ho&&Pv&&jv(or,n,{configurable:!0,set:r}),Nv(n,t)},sl=oa[ol],H$(sl,"toString",function(){return G$(this).tag}),H$(oa,"withoutSetter",function(e){return Nv(Z$(e),e)}),W$.f=eO,q$.f=uf,GJ.f=Dv,U$.f=tO,ZJ.f=z$.f=nO,KJ.f=rO,QJ.f=function(e){return Nv(XJ(e),e)},ho&&YJ(sl,"description",{configurable:!0,get:function(){return G$(this).description}})),of({global:!0,constructor:!0,wrap:!0,forced:!mo,sham:!mo},{Symbol:oa}),lf(B$(sX),function(e){eX(e)}),of({target:cf,stat:!0,forced:!mo},{useSetter:function(){Pv=!0},useSimple:function(){Pv=!1}}),of({target:"Object",stat:!0,forced:!mo,sham:!ho},{create:lX,defineProperty:uf,defineProperties:Dv,getOwnPropertyDescriptor:tO}),of({target:"Object",stat:!0,forced:!mo},{getOwnPropertyNames:nO}),tX(),nX(oa,cf),V$[bn]=!0;var cX=ao,iO=cX&&!!Symbol.for&&!!Symbol.keyFor,uX=vt,fX=Rr,dX=Tn,pX=nl,aO=oo,hX=iO,Mv=aO("string-to-symbol-registry"),mX=aO("symbol-to-string-registry");uX({target:"Symbol",stat:!0,forced:!hX},{for:function(e){var t=pX(e);if(dX(Mv,t))return Mv[t];var n=fX("Symbol")(t);return Mv[t]=n,mX[n]=t,n}});var vX=vt,gX=Tn,yX=Ys,bX=zu,xX=oo,wX=iO,oO=xX("symbol-to-string-registry");vX({target:"Symbol",stat:!0,forced:!wX},{keyFor:function(t){if(!yX(t))throw new TypeError(bX(t)+" is not a symbol");if(gX(oO,t))return oO[t]}});var SX=Nt,sO=uo,EX=on,lO=ia,_X=nl,cO=SX([].push),kX=function(e){if(EX(e))return e;if(sO(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?cO(n,i):(typeof i=="number"||lO(i)==="Number"||lO(i)==="String")&&cO(n,_X(i))}var a=n.length,o=!0;return function(s,l){if(o)return o=!1,l;if(sO(this))return l;for(var c=0;c<a;c++)if(n[c]===s)return l}}},$X=vt,uO=Rr,fO=Dm,OX=Cr,cl=Nt,dO=zt,pO=on,hO=Ys,mO=ef,TX=kX,CX=ao,IX=String,Ri=uO("JSON","stringify"),ff=cl(/./.exec),vO=cl("".charAt),RX=cl("".charCodeAt),AX=cl("".replace),PX=cl(1 .toString),jX=/[\uD800-\uDFFF]/g,gO=/^[\uD800-\uDBFF]$/,yO=/^[\uDC00-\uDFFF]$/,bO=!CX||dO(function(){var e=uO("Symbol")("stringify detection");return Ri([e])!=="[null]"||Ri({a:e})!=="{}"||Ri(Object(e))!=="{}"}),xO=dO(function(){return Ri("\uDF06\uD834")!=='"\\udf06\\ud834"'||Ri("\uDEAD")!=='"\\udead"'}),NX=function(e,t){var n=mO(arguments),r=TX(t);if(!(!pO(r)&&(e===void 0||hO(e))))return n[1]=function(i,a){if(pO(r)&&(a=OX(r,this,IX(i),a)),!hO(a))return a},fO(Ri,null,n)},DX=function(e,t,n){var r=vO(n,t-1),i=vO(n,t+1);return ff(gO,e)&&!ff(yO,i)||ff(yO,e)&&!ff(gO,r)?"\\u"+PX(RX(e,0),16):e};Ri&&$X({target:"JSON",stat:!0,arity:3,forced:bO||xO},{stringify:function(t,n,r){var i=mO(arguments),a=fO(bO?NX:Ri,null,i);return xO&&typeof a=="string"?AX(a,jX,DX):a}});var MX=vt,LX=ao,FX=zt,wO=tf,BX=Jr,zX=!LX||FX(function(){wO.f(1)});MX({target:"Object",stat:!0,forced:zX},{getOwnPropertySymbols:function(t){var n=wO.f;return n?n(BX(t)):[]}});var UX=_t;UX("asyncIterator");var qX=_t;qX("hasInstance");var WX=_t;WX("isConcatSpreadable");var HX=_t;HX("iterator");var VX=_t;VX("match");var ZX=_t;ZX("matchAll");var KX=_t;KX("replace");var GX=_t;GX("search");var YX=_t;YX("species");var JX=_t;JX("split");var XX=_t,QX=j$;XX("toPrimitive"),QX();var eQ=Rr,tQ=_t,nQ=fo;tQ("toStringTag"),nQ(eQ("Symbol"),"Symbol");var rQ=_t;rQ("unscopables");var iQ=Bt,aQ=fo;aQ(iQ.JSON,"JSON",!0);var oQ=Jt,sQ=oQ.Symbol,go={},Lv=yn,lQ=Tn,SO=Function.prototype,cQ=Lv&&Object.getOwnPropertyDescriptor,Fv=lQ(SO,"name"),uQ=Fv&&(function(){}).name==="something",fQ=Fv&&(!Lv||Lv&&cQ(SO,"name").configurable),dQ={EXISTS:Fv,PROPER:uQ,CONFIGURABLE:fQ},pQ=zt,hQ=!pQ(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),mQ=Tn,vQ=on,gQ=Jr,yQ=Yu,bQ=hQ,EO=yQ("IE_PROTO"),Bv=Object,xQ=Bv.prototype,_O=bQ?Bv.getPrototypeOf:function(e){var t=gQ(e);if(mQ(t,EO))return t[EO];var n=t.constructor;return vQ(n)&&t instanceof n?n.prototype:t instanceof Bv?xQ:null},wQ=zt,SQ=on,EQ=rr,_Q=wv,kO=_O,kQ=nf,$Q=Zt,zv=$Q("iterator"),$O=!1,Qr,Uv,qv;[].keys&&(qv=[].keys(),"next"in qv?(Uv=kO(kO(qv)),Uv!==Object.prototype&&(Qr=Uv)):$O=!0);var OQ=!EQ(Qr)||wQ(function(){var e={};return Qr[zv].call(e)!==e});OQ?Qr={}:Qr=_Q(Qr),SQ(Qr[zv])||kQ(Qr,zv,function(){return this});var OO={IteratorPrototype:Qr,BUGGY_SAFARI_ITERATORS:$O},TQ=OO.IteratorPrototype,CQ=wv,IQ=Gs,RQ=fo,AQ=go,PQ=function(){return this},jQ=function(e,t,n,r){var i=t+" Iterator";return e.prototype=CQ(TQ,{next:IQ(+!r,n)}),RQ(e,i,!1,!0),AQ[i]=PQ,e},NQ=Nt,DQ=Uu,MQ=function(e,t,n){try{return NQ(DQ(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},LQ=rr,FQ=function(e){return LQ(e)||e===null},BQ=FQ,zQ=String,UQ=TypeError,qQ=function(e){if(BQ(e))return e;throw new UQ("Can't set "+zQ(e)+" as a prototype")},WQ=MQ,HQ=rr,VQ=Fu,ZQ=qQ;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=WQ(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,a){return VQ(i),ZQ(a),HQ(i)&&(e?n(i,a):i.__proto__=a),i}}();var KQ=vt,GQ=Cr,TO=dQ,YQ=jQ,JQ=_O,XQ=fo,CO=nf,QQ=Zt,IO=go,RO=OO,eee=TO.PROPER;TO.CONFIGURABLE,RO.IteratorPrototype;var df=RO.BUGGY_SAFARI_ITERATORS,Wv=QQ("iterator"),AO="keys",pf="values",PO="entries",tee=function(){return this},jO=function(e,t,n,r,i,a,o){YQ(n,t,r);var s=function(v){if(v===i&&d)return d;if(!df&&v&&v in u)return u[v];switch(v){case AO:return function(){return new n(this,v)};case pf:return function(){return new n(this,v)};case PO:return function(){return new n(this,v)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,u=e.prototype,f=u[Wv]||u["@@iterator"]||i&&u[i],d=!df&&f||s(i),p=t==="Array"&&u.entries||f,h,m,y;if(p&&(h=JQ(p.call(new e)),h!==Object.prototype&&h.next&&(XQ(h,l,!0,!0),IO[l]=tee)),eee&&i===pf&&f&&f.name!==pf&&(c=!0,d=function(){return GQ(f,this)}),i)if(m={values:s(pf),keys:a?d:s(AO),entries:s(PO)},o)for(y in m)(df||c||!(y in u))&&CO(u,y,m[y]);else KQ({target:t,proto:!0,forced:df||c},m);return o&&u[Wv]!==d&&CO(u,Wv,d,{name:i}),IO[t]=d,m},NO=function(e,t){return{value:e,done:t}},nee=Ir,DO=go,MO=kv;ar.f;var ree=jO,hf=NO,LO="Array Iterator",iee=MO.set,aee=MO.getterFor(LO);ree(Array,"Array",function(e,t){iee(this,{type:LO,target:nee(e),index:0,kind:t})},function(){var e=aee(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,hf(void 0,!0);switch(e.kind){case"keys":return hf(n,!1);case"values":return hf(t[n],!1)}return hf([n,t[n]],!1)},"values"),DO.Arguments=DO.Array;var oee={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},see=oee,lee=Bt,cee=fo,FO=go;for(var Hv in see)cee(lee[Hv],Hv),FO[Hv]=FO.Array;var uee=sQ,fee=uee,dee=Zt,pee=ar.f,BO=dee("metadata"),zO=Function.prototype;zO[BO]===void 0&&pee(zO,BO,{value:null});var hee=_t;hee("asyncDispose");var mee=_t;mee("dispose");var vee=_t;vee("metadata");var gee=fee,yee=gee,bee=Rr,xee=Nt,Vv=bee("Symbol"),wee=Vv.keyFor,See=xee(Vv.prototype.valueOf),UO=Vv.isRegisteredSymbol||function(t){try{return wee(See(t))!==void 0}catch{return!1}},Eee=vt,_ee=UO;Eee({target:"Symbol",stat:!0},{isRegisteredSymbol:_ee});for(var kee=oo,qO=Rr,$ee=Nt,Oee=Ys,Tee=Zt,mf=qO("Symbol"),WO=mf.isWellKnownSymbol,HO=qO("Object","getOwnPropertyNames"),Cee=$ee(mf.prototype.valueOf),VO=kee("wks"),Zv=0,ZO=HO(mf),Iee=ZO.length;Zv<Iee;Zv++)try{var KO=ZO[Zv];Oee(mf[KO])&&Tee(KO)}catch{}var GO=function(t){if(WO&&WO(t))return!0;try{for(var n=Cee(t),r=0,i=HO(VO),a=i.length;r<a;r++)if(VO[i[r]]==n)return!0}catch{}return!1},Ree=vt,Aee=GO;Ree({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Aee});var Pee=_t;Pee("customMatcher");var jee=_t;jee("observable");var Nee=vt,Dee=UO;Nee({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Dee});var Mee=vt,Lee=GO;Mee({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Lee});var Fee=_t;Fee("matcher");var Bee=_t;Bee("metadataKey");var zee=_t;zee("patternMatch");var Uee=_t;Uee("replaceAll");var qee=yee,Wee=qee,Hee=Wee;const yo=Ze(Hee);var Kv=Nt,Vee=Hu,Zee=nl,Kee=Fu,Gee=Kv("".charAt),YO=Kv("".charCodeAt),Yee=Kv("".slice),JO=function(e){return function(t,n){var r=Zee(Kee(t)),i=Vee(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=YO(r,i),o<55296||o>56319||i+1===a||(s=YO(r,i+1))<56320||s>57343?e?Gee(r,i):o:e?Yee(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Jee={codeAt:JO(!1),charAt:JO(!0)},Xee=Jee.charAt,Qee=nl,XO=kv,ete=jO,QO=NO,eT="String Iterator",tte=XO.set,nte=XO.getterFor(eT);ete(String,"String",function(e){tte(this,{type:eT,string:Qee(e),index:0})},function(){var t=nte(this),n=t.string,r=t.index,i;return r>=n.length?QO(void 0,!0):(i=Xee(n,r),t.index+=i.length,QO(i,!1))});var rte=el,tT=Km,ite=Um,ate=go,ote=Zt,ste=ote("iterator"),Gv=function(e){if(!ite(e))return tT(e,ste)||tT(e,"@@iterator")||ate[rte(e)]},lte=Gv,cte=lte,ute=cte,fte=ute,dte=fte,pte=dte,hte=pte,mte=hte,vte=mte;const nT=Ze(vte);var gte=yn,yte=uo,bte=TypeError,xte=Object.getOwnPropertyDescriptor,wte=gte&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),rT=wte?function(e,t){if(yte(e)&&!xte(e,"length").writable)throw new bte("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Ste=vt,Ete=Jr,_te=aa,kte=rT,$te=lv,Ote=zt,Tte=Ote(function(){return[].push.call({length:4294967296},1)!==4294967297}),Cte=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Ite=Tte||!Cte();Ste({target:"Array",proto:!0,arity:1,forced:Ite},{push:function(t){var n=Ete(this),r=_te(n),i=arguments.length;$te(r+i);for(var a=0;a<i;a++)n[r]=arguments[a],r++;return kte(n,r),r}});var Rte=Bt,Ate=Jt,la=function(e,t){var n=Ate[e+"Prototype"],r=n&&n[t];if(r)return r;var i=Rte[e],a=i&&i.prototype;return a&&a[t]},Pte=la,jte=Pte("Array","push"),Nte=Yr,Dte=jte,Yv=Array.prototype,Mte=function(e){var t=e.push;return e===Yv||Nte(Yv,e)&&t===Yv.push?Dte:t},Lte=Mte,Fte=Lte,Bte=Fte,zte=Bte,Ute=zte,qte=Ute,Wte=qte;const Hte=Ze(Wte);function Vte(e,t){var n=e==null?null:typeof yo<"u"&&nT(e)||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(Hte(s).call(s,r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}var Zte=vt,iT=uo,Kte=dv,Gte=rr,aT=hv,Yte=aa,Jte=Ir,Xte=Qs,Qte=Zt,ene=Zu,tne=ef,nne=ene("slice"),rne=Qte("species"),Jv=Array,ine=Math.max;Zte({target:"Array",proto:!0,forced:!nne},{slice:function(t,n){var r=Jte(this),i=Yte(r),a=aT(t,i),o=aT(n===void 0?i:n,i),s,l,c;if(iT(r)&&(s=r.constructor,Kte(s)&&(s===Jv||iT(s.prototype))?s=void 0:Gte(s)&&(s=s[rne],s===null&&(s=void 0)),s===Jv||s===void 0))return tne(r,a,o);for(l=new(s===void 0?Jv:s)(ine(o-a,0)),c=0;a<o;a++,c++)a in r&&Xte(l,c,r[a]);return l.length=c,l}});var ane=la,one=ane("Array","slice"),sne=Yr,lne=one,Xv=Array.prototype,cne=function(e){var t=e.slice;return e===Xv||sne(Xv,e)&&t===Xv.slice?lne:t},une=cne,fne=une,dne=fne,pne=dne,hne=pne,mne=hne,vne=mne;const gne=Ze(vne);var yne=Cr,oT=Ci,bne=Km,xne=function(e,t,n){var r,i;oT(e);try{if(r=bne(e,"return"),!r){if(t==="throw")throw n;return n}r=yne(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return oT(r),n},wne=Ci,Sne=xne,Ene=function(e,t,n,r){try{return r?t(wne(n)[0],n[1]):t(n)}catch(i){Sne(e,"throw",i)}},_ne=Zt,kne=go,$ne=_ne("iterator"),One=Array.prototype,Tne=function(e){return e!==void 0&&(kne.Array===e||One[$ne]===e)},Cne=Cr,Ine=Uu,Rne=Ci,Ane=zu,Pne=Gv,jne=TypeError,Nne=function(e,t){var n=arguments.length<2?Pne(e):t;if(Ine(n))return Rne(Cne(n,e));throw new jne(Ane(e)+" is not iterable")},Dne=rv,Mne=Cr,Lne=Jr,Fne=Ene,Bne=Tne,zne=dv,Une=aa,sT=Qs,qne=Nne,Wne=Gv,lT=Array,Hne=function(t){var n=Lne(t),r=zne(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=Dne(a,i>2?arguments[2]:void 0));var s=Wne(n),l=0,c,u,f,d,p,h;if(s&&!(this===lT&&Bne(s)))for(u=r?new this:[],d=qne(n,s),p=d.next;!(f=Mne(p,d)).done;l++)h=o?Fne(d,a,[f.value,l],!0):f.value,sT(u,l,h);else for(c=Une(n),u=r?new this(c):lT(c);c>l;l++)h=o?a(n[l],l):n[l],sT(u,l,h);return u.length=l,u},Vne=Zt,cT=Vne("iterator"),uT=!1;try{var Zne=0,fT={next:function(){return{done:!!Zne++}},return:function(){uT=!0}};fT[cT]=function(){return this},Array.from(fT,function(){throw 2})}catch{}var Kne=function(e,t){try{if(!t&&!uT)return!1}catch{return!1}var n=!1;try{var r={};r[cT]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},Gne=vt,Yne=Hne,Jne=Kne,Xne=!Jne(function(e){Array.from(e)});Gne({target:"Array",stat:!0,forced:Xne},{from:Yne});var Qne=Jt,ere=Qne.Array.from,tre=ere,nre=tre,rre=nre,ire=rre,are=ire,ore=are,sre=ore;const dT=Ze(sre);function Qv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pT(e,t){if(e){var n;if(typeof e=="string")return Qv(e,t);var r=gne(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?dT(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qv(e,t):void 0}}function lre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
329
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pr(e,t){return yG(e)||Vte(e,t)||
|
|
328
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},L8="DialogDescriptionWarning",F8=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${vk(L8).contentName}}.`;return w.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},B8=ik,z8=ok,U8=lk,q8=ck,W8=fk,gk=hk;function H8({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const yk=w.forwardRef(H8);function Ti({open:e,onOpenChange:t,children:n}){return C.jsx(B8,{open:e,onOpenChange:t,children:n})}function V8({title:e,children:t}){var r,i,a,o,s,l,c,u;const{modal:n}=yt;return C.jsxs(C.Fragment,{children:[C.jsx(U8,{...n==null?void 0:n.overlay}),C.jsx("div",{...n==null?void 0:n.container,children:C.jsxs(q8,{...(r=n==null?void 0:n.dialog)==null?void 0:r.container,children:[C.jsxs("div",{...(a=(i=n==null?void 0:n.dialog)==null?void 0:i.title)==null?void 0:a.container,children:[C.jsx(W8,{...(s=(o=n==null?void 0:n.dialog)==null?void 0:o.title)==null?void 0:s.text,children:e}),C.jsx(gk,{children:C.jsx(yk,{role:"button",tabIndex:0,...(c=(l=n==null?void 0:n.dialog)==null?void 0:l.title)==null?void 0:c.closeIcon})})]}),C.jsx("div",{...(u=n==null?void 0:n.dialog)==null?void 0:u.content,children:t})]})})]})}Ti.Button=z8,Ti.Close=gk,Ti.Content=V8;const bk=D.forwardRef(({children:e,className:t,...n},r)=>{const{container:{className:i}}=yt;return C.jsxs("div",{...n,className:Gp(i,t),ref:r,children:[C.jsx(Fz,{}),C.jsxs(HS,{children:[C.jsx(Z8,{}),e]})]})}),Z8=()=>{const{modal:e}=yt,t=Me(r=>r.connected),{showModal:n}=Q1();return D.useEffect(()=>{var r,i,a,o;t||n({title:"Connection Error",content:C.jsxs(C.Fragment,{children:[C.jsx("p",{...(i=(r=e==null?void 0:e.dialog)==null?void 0:r.newConversation)==null?void 0:i.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),C.jsx(Ti.Close,{asChild:!0,children:C.jsx("button",{type:"button",...(o=(a=e==null?void 0:e.dialog)==null?void 0:a.newConversation)==null?void 0:o.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),C.jsx(C.Fragment,{})},K8=D.forwardRef(({children:e,onClick:t,...n},r)=>{const{fab:i}=yt,{container:a,icon:o}=i??{};return C.jsx("div",{...n,...a,ref:r,onClick:t,children:C.jsx("div",{...o})})});var Rm="Collapsible",[G8,Zpe]=I_(Rm),[Y8,Am]=G8(Rm),xk=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[l=!1,c]=R_({prop:r,defaultProp:i,onChange:o});return C.jsx(Y8,{scope:n,disabled:a,contentId:ku(),open:l,onOpenToggle:w.useCallback(()=>c(u=>!u),[c]),children:C.jsx(pn.div,{"data-state":jm(l),"data-disabled":a?"":void 0,...s,ref:t})})});xk.displayName=Rm;var wk="CollapsibleTrigger",Sk=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Am(wk,n);return C.jsx(pn.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":jm(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Gr(e.onClick,i.onOpenToggle)})});Sk.displayName=wk;var Pm="CollapsibleContent",Ek=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Am(Pm,e.__scopeCollapsible);return C.jsx($u,{present:n||i.open,children:({present:a})=>C.jsx(J8,{...r,ref:t,present:a})})});Ek.displayName=Pm;var J8=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=Am(Pm,n),[s,l]=w.useState(r),c=w.useRef(null),u=ri(t,c),f=w.useRef(0),d=f.current,p=w.useRef(0),h=p.current,m=o.open||s,y=w.useRef(m),v=w.useRef();return w.useEffect(()=>{const g=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(g)},[]),pa(()=>{const g=c.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();f.current=b.height,p.current=b.width,y.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),l(r)}},[o.open,r]),C.jsx(pn.div,{"data-state":jm(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!m,...a,ref:u,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&i})});function jm(e){return e?"open":"closed"}var X8=xk,Q8=Ek;const _k=({...e})=>{var o,s;const{header:t,modal:n}=yt,r=Me(l=>l.restartConversation),{showModal:i}=Q1(),a=l=>{var c,u,f,d;l.stopPropagation(),i({title:"Restart Conversation",content:C.jsxs(C.Fragment,{children:[C.jsx("p",{...(u=(c=n==null?void 0:n.dialog)==null?void 0:c.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),C.jsx(Ti.Close,{asChild:!0,children:C.jsx("button",{type:"button",...(d=(f=n==null?void 0:n.dialog)==null?void 0:f.newConversation)==null?void 0:d.button,onClick:r,children:"Restart"})})]})})};return C.jsx(EU,{...e,...(s=(o=t==null?void 0:t.content)==null?void 0:o.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:a,onKeyDown:l=>{l.key==="Enter"&&a(l)}})},eZ=({...e})=>{const{header:t}=yt,n=Me(i=>i.closeWindow),r=i=>{i.stopPropagation(),n==null||n()};return C.jsx(yk,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},Vs=({icon:e,title:t,link:n,...r})=>{var o,s,l,c,u,f,d,p,h,m,y,v;const{header:i}=yt,a=e??f7;return t?n?C.jsxs("a",{...r,...(s=(o=i.expandedContent)==null?void 0:o.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[C.jsx(a,{...(c=(l=i.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:c.icon}),C.jsx("p",{...(f=(u=i.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):C.jsxs("div",{...r,...(p=(d=i.expandedContent)==null?void 0:d.descriptionItems)==null?void 0:p.container,children:[C.jsx(a,{...(m=(h=i.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:m.icon}),C.jsx("p",{...(v=(y=i.expandedContent)==null?void 0:y.descriptionItems)==null?void 0:v.text,children:t})]}):null},kk=({defaultOpen:e,disabled:t,onOpenChange:n,...r})=>{var d,p,h,m,y,v,g,b,k,S,_,$,j,z,O,N,W,L,U,M,I,H;const{header:i}=yt,a=Me(B=>B.configuration),o=Me(B=>B.closeWindow),s=Me(B=>B.getClientId)(),l=Me(B=>!B.disableRestartConversation),[c,u]=D.useState(!!e),f=!!((d=a.email)!=null&&d.title)||!!((p=a.phone)!=null&&p.title)||!!((h=a.website)!=null&&h.title)||!!((m=a.termsOfService)!=null&&m.link)||!!((y=a.privacyPolicy)!=null&&y.link);return C.jsxs(X8,{open:f?c:!1,onOpenChange:u,"data-disabled":f?void 0:"",...i.container,...r,children:[C.jsxs(Sk,{...i.content.container,children:[C.jsx(id,{...r,userId:s,src:a.botAvatar,...i.content.avatar,children:a.botName||"Bot"}),C.jsx("h2",{...i.content.title,children:a.botName||"Bot"}),a.botDescription&&C.jsx("p",{...i.content.description,children:a.botDescription}),C.jsxs("div",{...i.content.actions.container,children:[l&&C.jsx(_k,{}),o&&C.jsx(eZ,{})]})]}),C.jsxs(Q8,{...i.expandedContent.container,children:[C.jsxs("div",{"data-links":"",...i.expandedContent.group,children:[C.jsx(Vs,{"data-email":"",icon:b7,title:(v=a.email)==null?void 0:v.title,link:(b=(g=a.email)==null?void 0:g.link)!=null&&b.startsWith("mailto:")?(k=a.email)==null?void 0:k.link:`mailto:${(S=a.email)==null?void 0:S.link}`}),C.jsx(Vs,{"data-phone":"",icon:k7,title:(_=a.phone)==null?void 0:_.title,link:(j=($=a.phone)==null?void 0:$.link)!=null&&j.startsWith("tel:")?(z=a.phone)==null?void 0:z.link:`tel:${(O=a.phone)==null?void 0:O.link}`}),C.jsx(Vs,{"data-website":"",link:(N=a.website)==null?void 0:N.link,icon:w7,title:(W=a.website)==null?void 0:W.title})]}),C.jsxs("div",{"data-legal":"",...(L=i.expandedContent)==null?void 0:L.group,children:[C.jsx(Vs,{"data-terms":"",link:(U=a.termsOfService)==null?void 0:U.link,icon:g7,title:(M=a.termsOfService)==null?void 0:M.title}),C.jsx(Vs,{"data-privacy":"",link:(I=a.privacyPolicy)==null?void 0:I.link,icon:E7,title:(H=a.privacyPolicy)==null?void 0:H.title})]})]})]})},$k=D.memo(({...e})=>{const{typingIndicator:t}=yt;return C.jsx("div",{...e,...t==null?void 0:t.container,children:C.jsx("div",{...t==null?void 0:t.loader})})}),Nm=D.memo(D.forwardRef(({direction:e,block:t,scroll:n,disableInput:r,children:i,sender:a,id:o,metadata:s,...l},c)=>{var v,g,b,k;const[u,f]=D.useState([]),{message:d}=yt,{botAvatar:p,botName:h}=Me(S=>S.configuration),m=Me(S=>S.getClientId)(),y=Hy(m??"",15);return C.jsx(J1.Provider,{value:{isLoading:u,setIsLoading:f},children:C.jsxs("div",{...l,...d==null?void 0:d.container,"data-loaded":u.length===0,"data-disable-input":!!r,"data-direction":e,ref:c,children:[C.jsxs(Zf,{"data-color":y,...(v=d==null?void 0:d.avatar)==null?void 0:v.container,children:[C.jsx(Kf,{...(g=d==null?void 0:d.avatar)==null?void 0:g.image,src:(a==null?void 0:a.avatar)??p}),C.jsx(Gf,{...(b=d==null?void 0:d.avatar)==null?void 0:b.fallback,children:(a==null?void 0:a.name[0])??((k=h??"Bot")==null?void 0:k[0])})]}),t&&C.jsx(Xa,{block:t,direction:e,sender:a,timestamp:l.timestamp,messageId:o,metadata:s}),i]})})}));function tZ(){const e=Me(r=>r.getClientId)(),t=Me(r=>r.configuration),{messageList:{marquee:n}}=yt;return C.jsxs("li",{...n.container,children:[C.jsx(id,{userId:e,src:t.botAvatar,...n.avatar,children:(t.botName||"Bot").slice(0,1)}),C.jsxs("div",{...n.content,children:[C.jsx("h1",{...n.title,children:t.botName||"Bot"}),C.jsx("p",{...n.description,children:t.botDescription})]})]})}function nZ(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var i=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");i.setAttribute("name",e),i.setAttribute("content",t),r.head.appendChild(i)}}catch{}}function rZ(){nZ("react-scroll-to-bottom:version","4.2.0")}var Zs=function(e){return e&&e.Math===Math&&e},Bt=Zs(typeof globalThis=="object"&&globalThis)||Zs(typeof window=="object"&&window)||Zs(typeof self=="object"&&self)||Zs(typeof ut=="object"&&ut)||Zs(typeof ut=="object"&&ut)||function(){return this}()||Function("return this")(),zt=function(e){try{return!!e()}catch{return!0}},iZ=zt,Du=!iZ(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),aZ=Du,Ok=Function.prototype,Tk=Ok.apply,Ck=Ok.call,Dm=typeof Reflect=="object"&&Reflect.apply||(aZ?Ck.bind(Tk):function(){return Ck.apply(Tk,arguments)}),Ik=Du,Rk=Function.prototype,Mm=Rk.call,oZ=Ik&&Rk.bind.bind(Mm,Mm),Nt=Ik?oZ:function(e){return function(){return Mm.apply(e,arguments)}},Ak=Nt,sZ=Ak({}.toString),lZ=Ak("".slice),ia=function(e){return lZ(sZ(e),8,-1)},cZ=ia,uZ=Nt,Lm=function(e){if(cZ(e)==="Function")return uZ(e)},Fm=typeof document=="object"&&document.all,on=typeof Fm>"u"&&Fm!==void 0?function(e){return typeof e=="function"||e===Fm}:function(e){return typeof e=="function"},Ks={},fZ=zt,yn=!fZ(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),dZ=Du,Mu=Function.prototype.call,Cr=dZ?Mu.bind(Mu):function(){return Mu.apply(Mu,arguments)},Bm={},Pk={}.propertyIsEnumerable,jk=Object.getOwnPropertyDescriptor,pZ=jk&&!Pk.call({1:2},1);Bm.f=pZ?function(t){var n=jk(this,t);return!!n&&n.enumerable}:Pk;var Gs=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},hZ=Nt,mZ=zt,vZ=ia,zm=Object,gZ=hZ("".split),Nk=mZ(function(){return!zm("z").propertyIsEnumerable(0)})?function(e){return vZ(e)==="String"?gZ(e,""):zm(e)}:zm,Um=function(e){return e==null},yZ=Um,bZ=TypeError,Lu=function(e){if(yZ(e))throw new bZ("Can't call method on "+e);return e},xZ=Nk,wZ=Lu,Ir=function(e){return xZ(wZ(e))},SZ=on,rr=function(e){return typeof e=="object"?e!==null:SZ(e)},Jt={},qm=Jt,Wm=Bt,EZ=on,Dk=function(e){return EZ(e)?e:void 0},Rr=function(e,t){return arguments.length<2?Dk(qm[e])||Dk(Wm[e]):qm[e]&&qm[e][t]||Wm[e]&&Wm[e][t]},_Z=Nt,Yr=_Z({}.isPrototypeOf),kZ=Bt,Mk=kZ.navigator,Lk=Mk&&Mk.userAgent,Hm=Lk?String(Lk):"",Fk=Bt,Vm=Hm,Bk=Fk.process,zk=Fk.Deno,Uk=Bk&&Bk.versions||zk&&zk.version,qk=Uk&&Uk.v8,ir,Fu;qk&&(ir=qk.split("."),Fu=ir[0]>0&&ir[0]<4?1:+(ir[0]+ir[1])),!Fu&&Vm&&(ir=Vm.match(/Edge\/(\d+)/),(!ir||ir[1]>=74)&&(ir=Vm.match(/Chrome\/(\d+)/),ir&&(Fu=+ir[1])));var Zm=Fu,Wk=Zm,$Z=zt,OZ=Bt,TZ=OZ.String,ao=!!Object.getOwnPropertySymbols&&!$Z(function(){var e=Symbol("symbol detection");return!TZ(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Wk&&Wk<41}),CZ=ao,Hk=CZ&&!Symbol.sham&&typeof Symbol.iterator=="symbol",IZ=Rr,RZ=on,AZ=Yr,PZ=Hk,jZ=Object,Ys=PZ?function(e){return typeof e=="symbol"}:function(e){var t=IZ("Symbol");return RZ(t)&&AZ(t.prototype,jZ(e))},NZ=String,Bu=function(e){try{return NZ(e)}catch{return"Object"}},DZ=on,MZ=Bu,LZ=TypeError,zu=function(e){if(DZ(e))return e;throw new LZ(MZ(e)+" is not a function")},FZ=zu,BZ=Um,Km=function(e,t){var n=e[t];return BZ(n)?void 0:FZ(n)},Gm=Cr,Ym=on,Jm=rr,zZ=TypeError,UZ=function(e,t){var n,r;if(t==="string"&&Ym(n=e.toString)&&!Jm(r=Gm(n,e))||Ym(n=e.valueOf)&&!Jm(r=Gm(n,e))||t!=="string"&&Ym(n=e.toString)&&!Jm(r=Gm(n,e)))return r;throw new zZ("Can't convert object to primitive value")},Vk={exports:{}},Zk=Bt,qZ=Object.defineProperty,WZ=function(e,t){try{qZ(Zk,e,{value:t,configurable:!0,writable:!0})}catch{Zk[e]=t}return t},HZ=Bt,VZ=WZ,Kk="__core-js_shared__",Gk=Vk.exports=HZ[Kk]||VZ(Kk,{});(Gk.versions||(Gk.versions=[])).push({version:"3.38.1",mode:"pure",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var Xm=Vk.exports,Yk=Xm,oo=function(e,t){return Yk[e]||(Yk[e]=t||{})},ZZ=Lu,KZ=Object,Jr=function(e){return KZ(ZZ(e))},GZ=Nt,YZ=Jr,JZ=GZ({}.hasOwnProperty),Tn=Object.hasOwn||function(t,n){return JZ(YZ(t),n)},XZ=Nt,QZ=0,eK=Math.random(),tK=XZ(1 .toString),Qm=function(e){return"Symbol("+(e===void 0?"":e)+")_"+tK(++QZ+eK,36)},nK=Bt,rK=oo,Jk=Tn,iK=Qm,aK=ao,oK=Hk,so=nK.Symbol,ev=rK("wks"),sK=oK?so.for||so:so&&so.withoutSetter||iK,Zt=function(e){return Jk(ev,e)||(ev[e]=aK&&Jk(so,e)?so[e]:sK("Symbol."+e)),ev[e]},lK=Cr,Xk=rr,Qk=Ys,cK=Km,uK=UZ,fK=Zt,dK=TypeError,pK=fK("toPrimitive"),hK=function(e,t){if(!Xk(e)||Qk(e))return e;var n=cK(e,pK),r;if(n){if(t===void 0&&(t="default"),r=lK(n,e,t),!Xk(r)||Qk(r))return r;throw new dK("Can't convert object to primitive value")}return t===void 0&&(t="number"),uK(e,t)},mK=hK,vK=Ys,tv=function(e){var t=mK(e,"string");return vK(t)?t:t+""},gK=Bt,e$=rr,nv=gK.document,yK=e$(nv)&&e$(nv.createElement),t$=function(e){return yK?nv.createElement(e):{}},bK=yn,xK=zt,wK=t$,n$=!bK&&!xK(function(){return Object.defineProperty(wK("div"),"a",{get:function(){return 7}}).a!==7}),SK=yn,EK=Cr,_K=Bm,kK=Gs,$K=Ir,OK=tv,TK=Tn,CK=n$,r$=Object.getOwnPropertyDescriptor;Ks.f=SK?r$:function(t,n){if(t=$K(t),n=OK(n),CK)try{return r$(t,n)}catch{}if(TK(t,n))return kK(!EK(_K.f,t,n),t[n])};var IK=zt,RK=on,AK=/#|\.prototype\./,Js=function(e,t){var n=jK[PK(e)];return n===DK?!0:n===NK?!1:RK(t)?IK(t):!!t},PK=Js.normalize=function(e){return String(e).replace(AK,".").toLowerCase()},jK=Js.data={},NK=Js.NATIVE="N",DK=Js.POLYFILL="P",MK=Js,i$=Lm,LK=zu,FK=Du,BK=i$(i$.bind),rv=function(e,t){return LK(e),t===void 0?e:FK?BK(e,t):function(){return e.apply(t,arguments)}},ar={},zK=yn,UK=zt,a$=zK&&UK(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),qK=rr,WK=String,HK=TypeError,Ci=function(e){if(qK(e))return e;throw new HK(WK(e)+" is not an object")},VK=yn,ZK=n$,KK=a$,Uu=Ci,o$=tv,GK=TypeError,iv=Object.defineProperty,YK=Object.getOwnPropertyDescriptor,av="enumerable",ov="configurable",sv="writable";ar.f=VK?KK?function(t,n,r){if(Uu(t),n=o$(n),Uu(r),typeof t=="function"&&n==="prototype"&&"value"in r&&sv in r&&!r[sv]){var i=YK(t,n);i&&i[sv]&&(t[n]=r.value,r={configurable:ov in r?r[ov]:i[ov],enumerable:av in r?r[av]:i[av],writable:!1})}return iv(t,n,r)}:iv:function(t,n,r){if(Uu(t),n=o$(n),Uu(r),ZK)try{return iv(t,n,r)}catch{}if("get"in r||"set"in r)throw new GK("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var JK=yn,XK=ar,QK=Gs,qu=JK?function(e,t,n){return XK.f(e,t,QK(1,n))}:function(e,t,n){return e[t]=n,e},Xs=Bt,eG=Dm,tG=Lm,nG=on,rG=Ks.f,iG=MK,lo=Jt,aG=rv,co=qu,s$=Tn,oG=function(e){var t=function(n,r,i){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,i)}return eG(e,this,arguments)};return t.prototype=e.prototype,t},vt=function(e,t){var n=e.target,r=e.global,i=e.stat,a=e.proto,o=r?Xs:i?Xs[n]:Xs[n]&&Xs[n].prototype,s=r?lo:lo[n]||co(lo,n,{})[n],l=s.prototype,c,u,f,d,p,h,m,y,v;for(d in t)c=iG(r?d:n+(i?".":"#")+d,e.forced),u=!c&&o&&s$(o,d),h=s[d],u&&(e.dontCallGetSet?(v=rG(o,d),m=v&&v.value):m=o[d]),p=u&&m?m:t[d],!(!c&&!a&&typeof h==typeof p)&&(e.bind&&u?y=aG(p,Xs):e.wrap&&u?y=oG(p):a&&nG(p)?y=tG(p):y=p,(e.sham||p&&p.sham||h&&h.sham)&&co(y,"sham",!0),co(s,d,y),a&&(f=n+"Prototype",s$(lo,f)||co(lo,f,{}),co(lo[f],d,p),e.real&&l&&(c||!l[d])&&co(l,d,p)))},sG=ia,uo=Array.isArray||function(t){return sG(t)==="Array"},lG=vt,cG=uo;lG({target:"Array",stat:!0},{isArray:cG});var uG=Jt,fG=uG.Array.isArray,dG=fG,l$=dG,pG=l$,hG=pG,mG=hG,vG=mG,gG=vG;const c$=Ze(gG);function yG(e){if(c$(e))return e}var bG=Math.ceil,xG=Math.floor,wG=Math.trunc||function(t){var n=+t;return(n>0?xG:bG)(n)},SG=wG,Wu=function(e){var t=+e;return t!==t||t===0?0:SG(t)},EG=Wu,_G=Math.min,kG=function(e){var t=EG(e);return t>0?_G(t,9007199254740991):0},$G=kG,aa=function(e){return $G(e.length)},OG=TypeError,TG=9007199254740991,lv=function(e){if(e>TG)throw OG("Maximum allowed index exceeded");return e},CG=yn,IG=ar,RG=Gs,Qs=function(e,t,n){CG?IG.f(e,t,RG(0,n)):e[t]=n},AG=Zt,PG=AG("toStringTag"),u$={};u$[PG]="z";var cv=String(u$)==="[object z]",jG=cv,NG=on,Hu=ia,DG=Zt,MG=DG("toStringTag"),LG=Object,FG=Hu(function(){return arguments}())==="Arguments",BG=function(e,t){try{return e[t]}catch{}},el=jG?Hu:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=BG(t=LG(e),MG))=="string"?n:FG?Hu(t):(r=Hu(t))==="Object"&&NG(t.callee)?"Arguments":r},zG=Nt,UG=on,uv=Xm,qG=zG(Function.toString);UG(uv.inspectSource)||(uv.inspectSource=function(e){return qG(e)});var WG=uv.inspectSource,HG=Nt,VG=zt,f$=on,ZG=el,KG=Rr,GG=WG,d$=function(){},p$=KG("Reflect","construct"),fv=/^\s*(?:class|function)\b/,YG=HG(fv.exec),JG=!fv.test(d$),tl=function(t){if(!f$(t))return!1;try{return p$(d$,[],t),!0}catch{return!1}},h$=function(t){if(!f$(t))return!1;switch(ZG(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return JG||!!YG(fv,GG(t))}catch{return!0}};h$.sham=!0;var dv=!p$||VG(function(){var e;return tl(tl.call)||!tl(Object)||!tl(function(){e=!0})||e})?h$:tl,m$=uo,XG=dv,QG=rr,eY=Zt,tY=eY("species"),v$=Array,nY=function(e){var t;return m$(e)&&(t=e.constructor,XG(t)&&(t===v$||m$(t.prototype))?t=void 0:QG(t)&&(t=t[tY],t===null&&(t=void 0))),t===void 0?v$:t},rY=nY,pv=function(e,t){return new(rY(e))(t===0?0:t)},iY=zt,aY=Zt,oY=Zm,sY=aY("species"),Vu=function(e){return oY>=51||!iY(function(){var t=[],n=t.constructor={};return n[sY]=function(){return{foo:1}},t[e](Boolean).foo!==1})},lY=vt,cY=zt,uY=uo,fY=rr,dY=Jr,pY=aa,g$=lv,y$=Qs,hY=pv,mY=Vu,vY=Zt,gY=Zm,b$=vY("isConcatSpreadable"),yY=gY>=51||!cY(function(){var e=[];return e[b$]=!1,e.concat()[0]!==e}),bY=function(e){if(!fY(e))return!1;var t=e[b$];return t!==void 0?!!t:uY(e)},xY=!yY||!mY("concat");lY({target:"Array",proto:!0,arity:1,forced:xY},{concat:function(t){var n=dY(this),r=hY(n,0),i=0,a,o,s,l,c;for(a=-1,s=arguments.length;a<s;a++)if(c=a===-1?n:arguments[a],bY(c))for(l=pY(c),g$(i+l),o=0;o<l;o++,i++)o in c&&y$(r,i,c[o]);else g$(i+1),y$(r,i++,c);return r.length=i,r}});var wY=el,SY=String,nl=function(e){if(wY(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return SY(e)},Zu={},EY=Wu,_Y=Math.max,kY=Math.min,hv=function(e,t){var n=EY(e);return n<0?_Y(n+t,0):kY(n,t)},$Y=Ir,OY=hv,TY=aa,x$=function(e){return function(t,n,r){var i=$Y(t),a=TY(i);if(a===0)return!e&&-1;var o=OY(r,a),s;if(e&&n!==n){for(;a>o;)if(s=i[o++],s!==s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},w$={includes:x$(!0),indexOf:x$(!1)},Ku={},CY=Nt,mv=Tn,IY=Ir,RY=w$.indexOf,AY=Ku,S$=CY([].push),E$=function(e,t){var n=IY(e),r=0,i=[],a;for(a in n)!mv(AY,a)&&mv(n,a)&&S$(i,a);for(;t.length>r;)mv(n,a=t[r++])&&(~RY(i,a)||S$(i,a));return i},vv=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],PY=E$,jY=vv,gv=Object.keys||function(t){return PY(t,jY)},NY=yn,DY=a$,MY=ar,LY=Ci,FY=Ir,BY=gv;Zu.f=NY&&!DY?Object.defineProperties:function(t,n){LY(t);for(var r=FY(n),i=BY(n),a=i.length,o=0,s;a>o;)MY.f(t,s=i[o++],r[s]);return t};var zY=Rr,UY=zY("document","documentElement"),qY=oo,WY=Qm,_$=qY("keys"),Gu=function(e){return _$[e]||(_$[e]=WY(e))},HY=Ci,VY=Zu,k$=vv,ZY=Ku,KY=UY,GY=t$,YY=Gu,$$=">",O$="<",yv="prototype",bv="script",T$=YY("IE_PROTO"),xv=function(){},C$=function(e){return O$+bv+$$+e+O$+"/"+bv+$$},I$=function(e){e.write(C$("")),e.close();var t=e.parentWindow.Object;return e=null,t},JY=function(){var e=GY("iframe"),t="java"+bv+":",n;return e.style.display="none",KY.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(C$("document.F=Object")),n.close(),n.F},Yu,Ju=function(){try{Yu=new ActiveXObject("htmlfile")}catch{}Ju=typeof document<"u"?document.domain&&Yu?I$(Yu):JY():I$(Yu);for(var e=k$.length;e--;)delete Ju[yv][k$[e]];return Ju()};ZY[T$]=!0;var wv=Object.create||function(t,n){var r;return t!==null?(xv[yv]=HY(t),r=new xv,xv[yv]=null,r[T$]=t):r=Ju(),n===void 0?r:VY.f(r,n)},Xu={},XY=E$,QY=vv,eJ=QY.concat("length","prototype");Xu.f=Object.getOwnPropertyNames||function(t){return XY(t,eJ)};var R$={},tJ=Nt,Qu=tJ([].slice),nJ=ia,rJ=Ir,A$=Xu.f,iJ=Qu,P$=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],aJ=function(e){try{return A$(e)}catch{return iJ(P$)}};R$.f=function(t){return P$&&nJ(t)==="Window"?aJ(t):A$(rJ(t))};var ef={};ef.f=Object.getOwnPropertySymbols;var oJ=qu,tf=function(e,t,n,r){return r&&r.enumerable?e[t]=n:oJ(e,t,n),e},sJ=ar,lJ=function(e,t,n){return sJ.f(e,t,n)},rl={},cJ=Zt;rl.f=cJ;var j$=Jt,uJ=Tn,fJ=rl,dJ=ar.f,_t=function(e){var t=j$.Symbol||(j$.Symbol={});uJ(t,e)||dJ(t,e,{value:fJ.f(e)})},pJ=Cr,hJ=Rr,mJ=Zt,vJ=tf,N$=function(){var e=hJ("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=mJ("toPrimitive");t&&!t[r]&&vJ(t,r,function(i){return pJ(n,this)},{arity:1})},gJ=cv,yJ=el,bJ=gJ?{}.toString:function(){return"[object "+yJ(this)+"]"},xJ=cv,wJ=ar.f,SJ=qu,EJ=Tn,_J=bJ,kJ=Zt,D$=kJ("toStringTag"),fo=function(e,t,n,r){var i=n?e:e&&e.prototype;i&&(EJ(i,D$)||wJ(i,D$,{configurable:!0,value:t}),r&&!xJ&&SJ(i,"toString",_J))},$J=Bt,OJ=on,M$=$J.WeakMap,TJ=OJ(M$)&&/native code/.test(String(M$)),CJ=TJ,L$=Bt,IJ=rr,RJ=qu,Sv=Tn,Ev=Xm,AJ=Gu,PJ=Ku,F$="Object already initialized",_v=L$.TypeError,jJ=L$.WeakMap,nf,il,rf,NJ=function(e){return rf(e)?il(e):nf(e,{})},DJ=function(e){return function(t){var n;if(!IJ(t)||(n=il(t)).type!==e)throw new _v("Incompatible receiver, "+e+" required");return n}};if(CJ||Ev.state){var Ar=Ev.state||(Ev.state=new jJ);Ar.get=Ar.get,Ar.has=Ar.has,Ar.set=Ar.set,nf=function(e,t){if(Ar.has(e))throw new _v(F$);return t.facade=e,Ar.set(e,t),t},il=function(e){return Ar.get(e)||{}},rf=function(e){return Ar.has(e)}}else{var po=AJ("state");PJ[po]=!0,nf=function(e,t){if(Sv(e,po))throw new _v(F$);return t.facade=e,RJ(e,po,t),t},il=function(e){return Sv(e,po)?e[po]:{}},rf=function(e){return Sv(e,po)}}var kv={set:nf,get:il,has:rf,enforce:NJ,getterFor:DJ},MJ=rv,LJ=Nt,FJ=Nk,BJ=Jr,zJ=aa,UJ=pv,B$=LJ([].push),Ii=function(e){var t=e===1,n=e===2,r=e===3,i=e===4,a=e===6,o=e===7,s=e===5||a;return function(l,c,u,f){for(var d=BJ(l),p=FJ(d),h=zJ(p),m=MJ(c,u),y=0,v=f||UJ,g=t?v(l,h):n||o?v(l,0):void 0,b,k;h>y;y++)if((s||y in p)&&(b=p[y],k=m(b,y,d),e))if(t)g[y]=k;else if(k)switch(e){case 3:return!0;case 5:return b;case 6:return y;case 2:B$(g,b)}else switch(e){case 4:return!1;case 7:B$(g,b)}return a?-1:r||i?i:g}},$v={forEach:Ii(0),map:Ii(1),filter:Ii(2),some:Ii(3),every:Ii(4),find:Ii(5),findIndex:Ii(6),filterReject:Ii(7)},af=vt,al=Bt,Ov=Cr,qJ=Nt,ho=yn,mo=ao,WJ=zt,Kt=Tn,HJ=Yr,Tv=Ci,of=Ir,Cv=tv,VJ=nl,Iv=Gs,vo=wv,z$=gv,ZJ=Xu,U$=R$,KJ=ef,q$=Ks,W$=ar,GJ=Zu,H$=Bm,V$=tf,YJ=lJ,Rv=oo,JJ=Gu,Z$=Ku,K$=Qm,XJ=Zt,QJ=rl,eX=_t,tX=N$,nX=fo,G$=kv,sf=$v.forEach,bn=JJ("hidden"),lf="Symbol",ol="prototype",rX=G$.set,Y$=G$.getterFor(lf),or=Object[ol],oa=al.Symbol,sl=oa&&oa[ol],iX=al.RangeError,aX=al.TypeError,Av=al.QObject,J$=q$.f,sa=W$.f,X$=U$.f,oX=H$.f,Q$=qJ([].push),Xr=Rv("symbols"),ll=Rv("op-symbols"),sX=Rv("wks"),Pv=!Av||!Av[ol]||!Av[ol].findChild,eO=function(e,t,n){var r=J$(or,t);r&&delete or[t],sa(e,t,n),r&&e!==or&&sa(or,t,r)},jv=ho&&WJ(function(){return vo(sa({},"a",{get:function(){return sa(this,"a",{value:7}).a}})).a!==7})?eO:sa,Nv=function(e,t){var n=Xr[e]=vo(sl);return rX(n,{type:lf,tag:e,description:t}),ho||(n.description=t),n},cf=function(t,n,r){t===or&&cf(ll,n,r),Tv(t);var i=Cv(n);return Tv(r),Kt(Xr,i)?(r.enumerable?(Kt(t,bn)&&t[bn][i]&&(t[bn][i]=!1),r=vo(r,{enumerable:Iv(0,!1)})):(Kt(t,bn)||sa(t,bn,Iv(1,vo(null))),t[bn][i]=!0),jv(t,i,r)):sa(t,i,r)},Dv=function(t,n){Tv(t);var r=of(n),i=z$(r).concat(iO(r));return sf(i,function(a){(!ho||Ov(tO,r,a))&&cf(t,a,r[a])}),t},lX=function(t,n){return n===void 0?vo(t):Dv(vo(t),n)},tO=function(t){var n=Cv(t),r=Ov(oX,this,n);return this===or&&Kt(Xr,n)&&!Kt(ll,n)?!1:r||!Kt(this,n)||!Kt(Xr,n)||Kt(this,bn)&&this[bn][n]?r:!0},nO=function(t,n){var r=of(t),i=Cv(n);if(!(r===or&&Kt(Xr,i)&&!Kt(ll,i))){var a=J$(r,i);return a&&Kt(Xr,i)&&!(Kt(r,bn)&&r[bn][i])&&(a.enumerable=!0),a}},rO=function(t){var n=X$(of(t)),r=[];return sf(n,function(i){!Kt(Xr,i)&&!Kt(Z$,i)&&Q$(r,i)}),r},iO=function(e){var t=e===or,n=X$(t?ll:of(e)),r=[];return sf(n,function(i){Kt(Xr,i)&&(!t||Kt(or,i))&&Q$(r,Xr[i])}),r};mo||(oa=function(){if(HJ(sl,this))throw new aX("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:VJ(arguments[0]),n=K$(t),r=function(i){var a=this===void 0?al:this;a===or&&Ov(r,ll,i),Kt(a,bn)&&Kt(a[bn],n)&&(a[bn][n]=!1);var o=Iv(1,i);try{jv(a,n,o)}catch(s){if(!(s instanceof iX))throw s;eO(a,n,o)}};return ho&&Pv&&jv(or,n,{configurable:!0,set:r}),Nv(n,t)},sl=oa[ol],V$(sl,"toString",function(){return Y$(this).tag}),V$(oa,"withoutSetter",function(e){return Nv(K$(e),e)}),H$.f=tO,W$.f=cf,GJ.f=Dv,q$.f=nO,ZJ.f=U$.f=rO,KJ.f=iO,QJ.f=function(e){return Nv(XJ(e),e)},ho&&YJ(sl,"description",{configurable:!0,get:function(){return Y$(this).description}})),af({global:!0,constructor:!0,wrap:!0,forced:!mo,sham:!mo},{Symbol:oa}),sf(z$(sX),function(e){eX(e)}),af({target:lf,stat:!0,forced:!mo},{useSetter:function(){Pv=!0},useSimple:function(){Pv=!1}}),af({target:"Object",stat:!0,forced:!mo,sham:!ho},{create:lX,defineProperty:cf,defineProperties:Dv,getOwnPropertyDescriptor:nO}),af({target:"Object",stat:!0,forced:!mo},{getOwnPropertyNames:rO}),tX(),nX(oa,lf),Z$[bn]=!0;var cX=ao,aO=cX&&!!Symbol.for&&!!Symbol.keyFor,uX=vt,fX=Rr,dX=Tn,pX=nl,oO=oo,hX=aO,Mv=oO("string-to-symbol-registry"),mX=oO("symbol-to-string-registry");uX({target:"Symbol",stat:!0,forced:!hX},{for:function(e){var t=pX(e);if(dX(Mv,t))return Mv[t];var n=fX("Symbol")(t);return Mv[t]=n,mX[n]=t,n}});var vX=vt,gX=Tn,yX=Ys,bX=Bu,xX=oo,wX=aO,sO=xX("symbol-to-string-registry");vX({target:"Symbol",stat:!0,forced:!wX},{keyFor:function(t){if(!yX(t))throw new TypeError(bX(t)+" is not a symbol");if(gX(sO,t))return sO[t]}});var SX=Nt,lO=uo,EX=on,cO=ia,_X=nl,uO=SX([].push),kX=function(e){if(EX(e))return e;if(lO(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];typeof i=="string"?uO(n,i):(typeof i=="number"||cO(i)==="Number"||cO(i)==="String")&&uO(n,_X(i))}var a=n.length,o=!0;return function(s,l){if(o)return o=!1,l;if(lO(this))return l;for(var c=0;c<a;c++)if(n[c]===s)return l}}},$X=vt,fO=Rr,dO=Dm,OX=Cr,cl=Nt,pO=zt,hO=on,mO=Ys,vO=Qu,TX=kX,CX=ao,IX=String,Ri=fO("JSON","stringify"),uf=cl(/./.exec),gO=cl("".charAt),RX=cl("".charCodeAt),AX=cl("".replace),PX=cl(1 .toString),jX=/[\uD800-\uDFFF]/g,yO=/^[\uD800-\uDBFF]$/,bO=/^[\uDC00-\uDFFF]$/,xO=!CX||pO(function(){var e=fO("Symbol")("stringify detection");return Ri([e])!=="[null]"||Ri({a:e})!=="{}"||Ri(Object(e))!=="{}"}),wO=pO(function(){return Ri("\uDF06\uD834")!=='"\\udf06\\ud834"'||Ri("\uDEAD")!=='"\\udead"'}),NX=function(e,t){var n=vO(arguments),r=TX(t);if(!(!hO(r)&&(e===void 0||mO(e))))return n[1]=function(i,a){if(hO(r)&&(a=OX(r,this,IX(i),a)),!mO(a))return a},dO(Ri,null,n)},DX=function(e,t,n){var r=gO(n,t-1),i=gO(n,t+1);return uf(yO,e)&&!uf(bO,i)||uf(bO,e)&&!uf(yO,r)?"\\u"+PX(RX(e,0),16):e};Ri&&$X({target:"JSON",stat:!0,arity:3,forced:xO||wO},{stringify:function(t,n,r){var i=vO(arguments),a=dO(xO?NX:Ri,null,i);return wO&&typeof a=="string"?AX(a,jX,DX):a}});var MX=vt,LX=ao,FX=zt,SO=ef,BX=Jr,zX=!LX||FX(function(){SO.f(1)});MX({target:"Object",stat:!0,forced:zX},{getOwnPropertySymbols:function(t){var n=SO.f;return n?n(BX(t)):[]}});var UX=_t;UX("asyncIterator");var qX=_t;qX("hasInstance");var WX=_t;WX("isConcatSpreadable");var HX=_t;HX("iterator");var VX=_t;VX("match");var ZX=_t;ZX("matchAll");var KX=_t;KX("replace");var GX=_t;GX("search");var YX=_t;YX("species");var JX=_t;JX("split");var XX=_t,QX=N$;XX("toPrimitive"),QX();var eQ=Rr,tQ=_t,nQ=fo;tQ("toStringTag"),nQ(eQ("Symbol"),"Symbol");var rQ=_t;rQ("unscopables");var iQ=Bt,aQ=fo;aQ(iQ.JSON,"JSON",!0);var oQ=Jt,sQ=oQ.Symbol,go={},Lv=yn,lQ=Tn,EO=Function.prototype,cQ=Lv&&Object.getOwnPropertyDescriptor,Fv=lQ(EO,"name"),uQ=Fv&&(function(){}).name==="something",fQ=Fv&&(!Lv||Lv&&cQ(EO,"name").configurable),dQ={EXISTS:Fv,PROPER:uQ,CONFIGURABLE:fQ},pQ=zt,hQ=!pQ(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),mQ=Tn,vQ=on,gQ=Jr,yQ=Gu,bQ=hQ,_O=yQ("IE_PROTO"),Bv=Object,xQ=Bv.prototype,kO=bQ?Bv.getPrototypeOf:function(e){var t=gQ(e);if(mQ(t,_O))return t[_O];var n=t.constructor;return vQ(n)&&t instanceof n?n.prototype:t instanceof Bv?xQ:null},wQ=zt,SQ=on,EQ=rr,_Q=wv,$O=kO,kQ=tf,$Q=Zt,zv=$Q("iterator"),OO=!1,Qr,Uv,qv;[].keys&&(qv=[].keys(),"next"in qv?(Uv=$O($O(qv)),Uv!==Object.prototype&&(Qr=Uv)):OO=!0);var OQ=!EQ(Qr)||wQ(function(){var e={};return Qr[zv].call(e)!==e});OQ?Qr={}:Qr=_Q(Qr),SQ(Qr[zv])||kQ(Qr,zv,function(){return this});var TO={IteratorPrototype:Qr,BUGGY_SAFARI_ITERATORS:OO},TQ=TO.IteratorPrototype,CQ=wv,IQ=Gs,RQ=fo,AQ=go,PQ=function(){return this},jQ=function(e,t,n,r){var i=t+" Iterator";return e.prototype=CQ(TQ,{next:IQ(+!r,n)}),RQ(e,i,!1,!0),AQ[i]=PQ,e},NQ=Nt,DQ=zu,MQ=function(e,t,n){try{return NQ(DQ(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},LQ=rr,FQ=function(e){return LQ(e)||e===null},BQ=FQ,zQ=String,UQ=TypeError,qQ=function(e){if(BQ(e))return e;throw new UQ("Can't set "+zQ(e)+" as a prototype")},WQ=MQ,HQ=rr,VQ=Lu,ZQ=qQ;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=WQ(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(i,a){return VQ(i),ZQ(a),HQ(i)&&(e?n(i,a):i.__proto__=a),i}}();var KQ=vt,GQ=Cr,CO=dQ,YQ=jQ,JQ=kO,XQ=fo,IO=tf,QQ=Zt,RO=go,AO=TO,eee=CO.PROPER;CO.CONFIGURABLE,AO.IteratorPrototype;var ff=AO.BUGGY_SAFARI_ITERATORS,Wv=QQ("iterator"),PO="keys",df="values",jO="entries",tee=function(){return this},NO=function(e,t,n,r,i,a,o){YQ(n,t,r);var s=function(v){if(v===i&&d)return d;if(!ff&&v&&v in u)return u[v];switch(v){case PO:return function(){return new n(this,v)};case df:return function(){return new n(this,v)};case jO:return function(){return new n(this,v)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,u=e.prototype,f=u[Wv]||u["@@iterator"]||i&&u[i],d=!ff&&f||s(i),p=t==="Array"&&u.entries||f,h,m,y;if(p&&(h=JQ(p.call(new e)),h!==Object.prototype&&h.next&&(XQ(h,l,!0,!0),RO[l]=tee)),eee&&i===df&&f&&f.name!==df&&(c=!0,d=function(){return GQ(f,this)}),i)if(m={values:s(df),keys:a?d:s(PO),entries:s(jO)},o)for(y in m)(ff||c||!(y in u))&&IO(u,y,m[y]);else KQ({target:t,proto:!0,forced:ff||c},m);return o&&u[Wv]!==d&&IO(u,Wv,d,{name:i}),RO[t]=d,m},DO=function(e,t){return{value:e,done:t}},nee=Ir,MO=go,LO=kv;ar.f;var ree=NO,pf=DO,FO="Array Iterator",iee=LO.set,aee=LO.getterFor(FO);ree(Array,"Array",function(e,t){iee(this,{type:FO,target:nee(e),index:0,kind:t})},function(){var e=aee(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,pf(void 0,!0);switch(e.kind){case"keys":return pf(n,!1);case"values":return pf(t[n],!1)}return pf([n,t[n]],!1)},"values"),MO.Arguments=MO.Array;var oee={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},see=oee,lee=Bt,cee=fo,BO=go;for(var Hv in see)cee(lee[Hv],Hv),BO[Hv]=BO.Array;var uee=sQ,fee=uee,dee=Zt,pee=ar.f,zO=dee("metadata"),UO=Function.prototype;UO[zO]===void 0&&pee(UO,zO,{value:null});var hee=_t;hee("asyncDispose");var mee=_t;mee("dispose");var vee=_t;vee("metadata");var gee=fee,yee=gee,bee=Rr,xee=Nt,Vv=bee("Symbol"),wee=Vv.keyFor,See=xee(Vv.prototype.valueOf),qO=Vv.isRegisteredSymbol||function(t){try{return wee(See(t))!==void 0}catch{return!1}},Eee=vt,_ee=qO;Eee({target:"Symbol",stat:!0},{isRegisteredSymbol:_ee});for(var kee=oo,WO=Rr,$ee=Nt,Oee=Ys,Tee=Zt,hf=WO("Symbol"),HO=hf.isWellKnownSymbol,VO=WO("Object","getOwnPropertyNames"),Cee=$ee(hf.prototype.valueOf),ZO=kee("wks"),Zv=0,KO=VO(hf),Iee=KO.length;Zv<Iee;Zv++)try{var GO=KO[Zv];Oee(hf[GO])&&Tee(GO)}catch{}var YO=function(t){if(HO&&HO(t))return!0;try{for(var n=Cee(t),r=0,i=VO(ZO),a=i.length;r<a;r++)if(ZO[i[r]]==n)return!0}catch{}return!1},Ree=vt,Aee=YO;Ree({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Aee});var Pee=_t;Pee("customMatcher");var jee=_t;jee("observable");var Nee=vt,Dee=qO;Nee({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Dee});var Mee=vt,Lee=YO;Mee({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Lee});var Fee=_t;Fee("matcher");var Bee=_t;Bee("metadataKey");var zee=_t;zee("patternMatch");var Uee=_t;Uee("replaceAll");var qee=yee,Wee=qee,Hee=Wee;const yo=Ze(Hee);var Kv=Nt,Vee=Wu,Zee=nl,Kee=Lu,Gee=Kv("".charAt),JO=Kv("".charCodeAt),Yee=Kv("".slice),XO=function(e){return function(t,n){var r=Zee(Kee(t)),i=Vee(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=JO(r,i),o<55296||o>56319||i+1===a||(s=JO(r,i+1))<56320||s>57343?e?Gee(r,i):o:e?Yee(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Jee={codeAt:XO(!1),charAt:XO(!0)},Xee=Jee.charAt,Qee=nl,QO=kv,ete=NO,eT=DO,tT="String Iterator",tte=QO.set,nte=QO.getterFor(tT);ete(String,"String",function(e){tte(this,{type:tT,string:Qee(e),index:0})},function(){var t=nte(this),n=t.string,r=t.index,i;return r>=n.length?eT(void 0,!0):(i=Xee(n,r),t.index+=i.length,eT(i,!1))});var rte=el,nT=Km,ite=Um,ate=go,ote=Zt,ste=ote("iterator"),Gv=function(e){if(!ite(e))return nT(e,ste)||nT(e,"@@iterator")||ate[rte(e)]},lte=Gv,cte=lte,ute=cte,fte=ute,dte=fte,pte=dte,hte=pte,mte=hte,vte=mte;const rT=Ze(vte);var gte=yn,yte=uo,bte=TypeError,xte=Object.getOwnPropertyDescriptor,wte=gte&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),iT=wte?function(e,t){if(yte(e)&&!xte(e,"length").writable)throw new bte("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Ste=vt,Ete=Jr,_te=aa,kte=iT,$te=lv,Ote=zt,Tte=Ote(function(){return[].push.call({length:4294967296},1)!==4294967297}),Cte=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Ite=Tte||!Cte();Ste({target:"Array",proto:!0,arity:1,forced:Ite},{push:function(t){var n=Ete(this),r=_te(n),i=arguments.length;$te(r+i);for(var a=0;a<i;a++)n[r]=arguments[a],r++;return kte(n,r),r}});var Rte=Bt,Ate=Jt,la=function(e,t){var n=Ate[e+"Prototype"],r=n&&n[t];if(r)return r;var i=Rte[e],a=i&&i.prototype;return a&&a[t]},Pte=la,jte=Pte("Array","push"),Nte=Yr,Dte=jte,Yv=Array.prototype,Mte=function(e){var t=e.push;return e===Yv||Nte(Yv,e)&&t===Yv.push?Dte:t},Lte=Mte,Fte=Lte,Bte=Fte,zte=Bte,Ute=zte,qte=Ute,Wte=qte;const Hte=Ze(Wte);function Vte(e,t){var n=e==null?null:typeof yo<"u"&&rT(e)||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(Hte(s).call(s,r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}var Zte=vt,aT=uo,Kte=dv,Gte=rr,oT=hv,Yte=aa,Jte=Ir,Xte=Qs,Qte=Zt,ene=Vu,tne=Qu,nne=ene("slice"),rne=Qte("species"),Jv=Array,ine=Math.max;Zte({target:"Array",proto:!0,forced:!nne},{slice:function(t,n){var r=Jte(this),i=Yte(r),a=oT(t,i),o=oT(n===void 0?i:n,i),s,l,c;if(aT(r)&&(s=r.constructor,Kte(s)&&(s===Jv||aT(s.prototype))?s=void 0:Gte(s)&&(s=s[rne],s===null&&(s=void 0)),s===Jv||s===void 0))return tne(r,a,o);for(l=new(s===void 0?Jv:s)(ine(o-a,0)),c=0;a<o;a++,c++)a in r&&Xte(l,c,r[a]);return l.length=c,l}});var ane=la,one=ane("Array","slice"),sne=Yr,lne=one,Xv=Array.prototype,cne=function(e){var t=e.slice;return e===Xv||sne(Xv,e)&&t===Xv.slice?lne:t},une=cne,fne=une,dne=fne,pne=dne,hne=pne,mne=hne,vne=mne;const gne=Ze(vne);var yne=Cr,sT=Ci,bne=Km,xne=function(e,t,n){var r,i;sT(e);try{if(r=bne(e,"return"),!r){if(t==="throw")throw n;return n}r=yne(r,e)}catch(a){i=!0,r=a}if(t==="throw")throw n;if(i)throw r;return sT(r),n},wne=Ci,Sne=xne,Ene=function(e,t,n,r){try{return r?t(wne(n)[0],n[1]):t(n)}catch(i){Sne(e,"throw",i)}},_ne=Zt,kne=go,$ne=_ne("iterator"),One=Array.prototype,Tne=function(e){return e!==void 0&&(kne.Array===e||One[$ne]===e)},Cne=Cr,Ine=zu,Rne=Ci,Ane=Bu,Pne=Gv,jne=TypeError,Nne=function(e,t){var n=arguments.length<2?Pne(e):t;if(Ine(n))return Rne(Cne(n,e));throw new jne(Ane(e)+" is not iterable")},Dne=rv,Mne=Cr,Lne=Jr,Fne=Ene,Bne=Tne,zne=dv,Une=aa,lT=Qs,qne=Nne,Wne=Gv,cT=Array,Hne=function(t){var n=Lne(t),r=zne(this),i=arguments.length,a=i>1?arguments[1]:void 0,o=a!==void 0;o&&(a=Dne(a,i>2?arguments[2]:void 0));var s=Wne(n),l=0,c,u,f,d,p,h;if(s&&!(this===cT&&Bne(s)))for(u=r?new this:[],d=qne(n,s),p=d.next;!(f=Mne(p,d)).done;l++)h=o?Fne(d,a,[f.value,l],!0):f.value,lT(u,l,h);else for(c=Une(n),u=r?new this(c):cT(c);c>l;l++)h=o?a(n[l],l):n[l],lT(u,l,h);return u.length=l,u},Vne=Zt,uT=Vne("iterator"),fT=!1;try{var Zne=0,dT={next:function(){return{done:!!Zne++}},return:function(){fT=!0}};dT[uT]=function(){return this},Array.from(dT,function(){throw 2})}catch{}var Kne=function(e,t){try{if(!t&&!fT)return!1}catch{return!1}var n=!1;try{var r={};r[uT]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},Gne=vt,Yne=Hne,Jne=Kne,Xne=!Jne(function(e){Array.from(e)});Gne({target:"Array",stat:!0,forced:Xne},{from:Yne});var Qne=Jt,ere=Qne.Array.from,tre=ere,nre=tre,rre=nre,ire=rre,are=ire,ore=are,sre=ore;const pT=Ze(sre);function Qv(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function hT(e,t){if(e){var n;if(typeof e=="string")return Qv(e,t);var r=gne(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?pT(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Qv(e,t):void 0}}function lre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
329
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pr(e,t){return yG(e)||Vte(e,t)||hT(e,t)||lre()}var mT={exports:{}};/*!
|
|
330
330
|
Copyright (c) 2018 Jed Watson.
|
|
331
331
|
Licensed under the MIT License (MIT), see
|
|
332
332
|
http://jedwatson.github.io/classnames
|
|
333
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var o=typeof a;if(o==="string"||o==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(o==="object")if(a.toString===Object.prototype.toString)for(var l in a)t.call(a,l)&&a[l]&&r.push(l);else r.push(a.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(
|
|
333
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var a=arguments[i];if(a){var o=typeof a;if(o==="string"||o==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(o==="object")if(a.toString===Object.prototype.toString)for(var l in a)t.call(a,l)&&a[l]&&r.push(l);else r.push(a.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(mT);var cre=mT.exports;const eg=Ze(cre);var tg={exports:{}},mf={exports:{}},ft={};/** @license React v16.13.1
|
|
334
334
|
* react-is.production.min.js
|
|
335
335
|
*
|
|
336
336
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
337
337
|
*
|
|
338
338
|
* This source code is licensed under the MIT license found in the
|
|
339
339
|
* LICENSE file in the root directory of this source tree.
|
|
340
|
-
*/var
|
|
340
|
+
*/var vT;function ure(){if(vT)return ft;vT=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(S){if(typeof S=="object"&&S!==null){var _=S.$$typeof;switch(_){case t:switch(S=S.type,S){case l:case c:case r:case a:case i:case f:return S;default:switch(S=S&&S.$$typeof,S){case s:case u:case h:case p:case o:return S;default:return _}}case n:return _}}}function k(S){return b(S)===c}return ft.AsyncMode=l,ft.ConcurrentMode=c,ft.ContextConsumer=s,ft.ContextProvider=o,ft.Element=t,ft.ForwardRef=u,ft.Fragment=r,ft.Lazy=h,ft.Memo=p,ft.Portal=n,ft.Profiler=a,ft.StrictMode=i,ft.Suspense=f,ft.isAsyncMode=function(S){return k(S)||b(S)===l},ft.isConcurrentMode=k,ft.isContextConsumer=function(S){return b(S)===s},ft.isContextProvider=function(S){return b(S)===o},ft.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===t},ft.isForwardRef=function(S){return b(S)===u},ft.isFragment=function(S){return b(S)===r},ft.isLazy=function(S){return b(S)===h},ft.isMemo=function(S){return b(S)===p},ft.isPortal=function(S){return b(S)===n},ft.isProfiler=function(S){return b(S)===a},ft.isStrictMode=function(S){return b(S)===i},ft.isSuspense=function(S){return b(S)===f},ft.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===c||S===a||S===i||S===f||S===d||typeof S=="object"&&S!==null&&(S.$$typeof===h||S.$$typeof===p||S.$$typeof===o||S.$$typeof===s||S.$$typeof===u||S.$$typeof===y||S.$$typeof===v||S.$$typeof===g||S.$$typeof===m)},ft.typeOf=b,ft}var dt={};/** @license React v16.13.1
|
|
341
341
|
* react-is.development.js
|
|
342
342
|
*
|
|
343
343
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
344
344
|
*
|
|
345
345
|
* This source code is licensed under the MIT license found in the
|
|
346
346
|
* LICENSE file in the root directory of this source tree.
|
|
347
|
-
*/var
|
|
347
|
+
*/var gT;function fre(){return gT||(gT=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,o=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,y=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function b(Z){return typeof Z=="string"||typeof Z=="function"||Z===r||Z===c||Z===a||Z===i||Z===f||Z===d||typeof Z=="object"&&Z!==null&&(Z.$$typeof===h||Z.$$typeof===p||Z.$$typeof===o||Z.$$typeof===s||Z.$$typeof===u||Z.$$typeof===y||Z.$$typeof===v||Z.$$typeof===g||Z.$$typeof===m)}function k(Z){if(typeof Z=="object"&&Z!==null){var de=Z.$$typeof;switch(de){case t:var ve=Z.type;switch(ve){case l:case c:case r:case a:case i:case f:return ve;default:var Ce=ve&&ve.$$typeof;switch(Ce){case s:case u:case h:case p:case o:return Ce;default:return de}}case n:return de}}}var S=l,_=c,$=s,j=o,z=t,O=u,N=r,W=h,L=p,U=n,M=a,I=i,H=f,B=!1;function A(Z){return B||(B=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),x(Z)||k(Z)===l}function x(Z){return k(Z)===c}function q(Z){return k(Z)===s}function K(Z){return k(Z)===o}function E(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===t}function Q(Z){return k(Z)===u}function oe(Z){return k(Z)===r}function ne(Z){return k(Z)===h}function le(Z){return k(Z)===p}function pe(Z){return k(Z)===n}function he(Z){return k(Z)===a}function ce(Z){return k(Z)===i}function X(Z){return k(Z)===f}dt.AsyncMode=S,dt.ConcurrentMode=_,dt.ContextConsumer=$,dt.ContextProvider=j,dt.Element=z,dt.ForwardRef=O,dt.Fragment=N,dt.Lazy=W,dt.Memo=L,dt.Portal=U,dt.Profiler=M,dt.StrictMode=I,dt.Suspense=H,dt.isAsyncMode=A,dt.isConcurrentMode=x,dt.isContextConsumer=q,dt.isContextProvider=K,dt.isElement=E,dt.isForwardRef=Q,dt.isFragment=oe,dt.isLazy=ne,dt.isMemo=le,dt.isPortal=pe,dt.isProfiler=he,dt.isStrictMode=ce,dt.isSuspense=X,dt.isValidElementType=b,dt.typeOf=k}()),dt}var yT;function bT(){return yT||(yT=1,process.env.NODE_ENV==="production"?mf.exports=ure():mf.exports=fre()),mf.exports}/*
|
|
348
348
|
object-assign
|
|
349
349
|
(c) Sindre Sorhus
|
|
350
350
|
@license MIT
|
|
351
|
-
*/var ng,
|
|
352
|
-
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var X=ce(ne,he,E,Q,oe+"."+he,n);if(X)return X}return null}return y(x)}function L(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(L);if(A===null||s(A))return!0;var x=f(A);if(x){var q=x.call(A),K;if(x!==A.entries){for(;!(K=q.next()).done;)if(!L(K.value))return!1}else for(;!(K=q.next()).done;){var E=K.value;if(E&&!L(E[1]))return!1}}else return!1;return!0;default:return!1}}function U(A,x){return A==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function M(A){var x=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":U(x,A)?"symbol":x}function I(A){if(typeof A>"u"||A===null)return""+A;var x=M(A);if(x==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return x}function H(A){var x=I(A);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function B(A){return!A.constructor||!A.constructor.name?d:A.constructor.name}return p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},og}var sg,
|
|
353
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tt(e){return iie(e)||aie(e)||pT(e)||oie()}var yf=function(e){return e&&e.Math==Math&&e},Cn=yf(typeof globalThis=="object"&&globalThis)||yf(typeof window=="object"&&window)||yf(typeof self=="object"&&self)||yf(typeof ut=="object"&&ut)||function(){return this}()||Function("return this")(),hg={},sr=function(e){try{return!!e()}catch{return!0}},sie=sr,ca=!sie(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),RT={},AT={}.propertyIsEnumerable,PT=Object.getOwnPropertyDescriptor,lie=PT&&!AT.call({1:2},1);RT.f=lie?function(t){var n=PT(this,t);return!!n&&n.enumerable}:AT;var jT=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},cie={}.toString,mg=function(e){return cie.call(e).slice(8,-1)},uie=sr,fie=mg,die="".split,pie=uie(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return fie(e)=="String"?die.call(e,""):Object(e)}:Object,bf=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},hie=pie,mie=bf,vg=function(e){return hie(mie(e))},Un=function(e){return typeof e=="function"},vie=Un,fl=function(e){return typeof e=="object"?e!==null:vie(e)},gg=Cn,gie=Un,yie=function(e){return gie(e)?e:void 0},xf=function(e,t){return arguments.length<2?yie(gg[e]):gg[e]&&gg[e][t]},bie=xf,xie=bie("navigator","userAgent")||"",NT=Cn,yg=xie,DT=NT.process,MT=NT.Deno,LT=DT&&DT.versions||MT&&MT.version,FT=LT&<.v8,jr,wf;FT?(jr=FT.split("."),wf=jr[0]<4?1:jr[0]+jr[1]):yg&&(jr=yg.match(/Edge\/(\d+)/),(!jr||jr[1]>=74)&&(jr=yg.match(/Chrome\/(\d+)/),jr&&(wf=jr[1])));var wie=wf&&+wf,BT=wie,Sie=sr,zT=!!Object.getOwnPropertySymbols&&!Sie(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&BT&&BT<41}),Eie=zT,UT=Eie&&!Symbol.sham&&typeof Symbol.iterator=="symbol",_ie=Un,kie=xf,$ie=UT,qT=$ie?function(e){return typeof e=="symbol"}:function(e){var t=kie("Symbol");return _ie(t)&&Object(e)instanceof t},Oie=function(e){try{return String(e)}catch{return"Object"}},Tie=Un,Cie=Oie,Iie=function(e){if(Tie(e))return e;throw TypeError(Cie(e)+" is not a function")},Rie=Iie,WT=function(e,t){var n=e[t];return n==null?void 0:Rie(n)},bg=Un,xg=fl,Aie=function(e,t){var n,r;if(t==="string"&&bg(n=e.toString)&&!xg(r=n.call(e))||bg(n=e.valueOf)&&!xg(r=n.call(e))||t!=="string"&&bg(n=e.toString)&&!xg(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},HT={exports:{}},VT=Cn,wg=function(e,t){try{Object.defineProperty(VT,e,{value:t,configurable:!0,writable:!0})}catch{VT[e]=t}return t},Pie=Cn,jie=wg,ZT="__core-js_shared__",Nie=Pie[ZT]||jie(ZT,{}),Sg=Nie,KT=Sg;(HT.exports=function(e,t){return KT[e]||(KT[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Eg=HT.exports,Die=bf,GT=function(e){return Object(Die(e))},Mie=GT,Lie={}.hasOwnProperty,ua=Object.hasOwn||function(t,n){return Lie.call(Mie(t),n)},Fie=0,Bie=Math.random(),YT=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++Fie+Bie).toString(36)},zie=Cn,Uie=Eg,JT=ua,qie=YT,XT=zT,Wie=UT,dl=Uie("wks"),pl=zie.Symbol,Hie=Wie?pl:pl&&pl.withoutSetter||qie,hl=function(e){return(!JT(dl,e)||!(XT||typeof dl[e]=="string"))&&(XT&&JT(pl,e)?dl[e]=pl[e]:dl[e]=Hie("Symbol."+e)),dl[e]},QT=fl,eC=qT,Vie=WT,Zie=Aie,Kie=hl,Gie=Kie("toPrimitive"),Yie=function(e,t){if(!QT(e)||eC(e))return e;var n=Vie(e,Gie),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!QT(r)||eC(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),Zie(e,t)},Jie=Yie,Xie=qT,tC=function(e){var t=Jie(e,"string");return Xie(t)?t:String(t)},Qie=Cn,nC=fl,_g=Qie.document,eae=nC(_g)&&nC(_g.createElement),rC=function(e){return eae?_g.createElement(e):{}},tae=ca,nae=sr,rae=rC,iC=!tae&&!nae(function(){return Object.defineProperty(rae("div"),"a",{get:function(){return 7}}).a!=7}),iae=ca,aae=RT,oae=jT,sae=vg,lae=tC,cae=ua,uae=iC,aC=Object.getOwnPropertyDescriptor;hg.f=iae?aC:function(t,n){if(t=sae(t),n=lae(n),uae)try{return aC(t,n)}catch{}if(cae(t,n))return oae(!aae.f.call(t,n),t[n])};var ml={},fae=fl,Ai=function(e){if(fae(e))return e;throw TypeError(String(e)+" is not an object")},dae=ca,pae=iC,oC=Ai,hae=tC,sC=Object.defineProperty;ml.f=dae?sC:function(t,n,r){if(oC(t),n=hae(n),oC(r),pae)try{return sC(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var mae=ca,vae=ml,gae=jT,Sf=mae?function(e,t,n){return vae.f(e,t,gae(1,n))}:function(e,t,n){return e[t]=n,e},lC={exports:{}},yae=Un,kg=Sg,bae=Function.toString;yae(kg.inspectSource)||(kg.inspectSource=function(e){return bae.call(e)});var cC=kg.inspectSource,xae=Cn,wae=Un,Sae=cC,uC=xae.WeakMap,Eae=wae(uC)&&/native code/.test(Sae(uC)),_ae=Eg,kae=YT,fC=_ae("keys"),dC=function(e){return fC[e]||(fC[e]=kae(e))},$g={},$ae=Eae,Oae=Cn,Tae=fl,Cae=Sf,Og=ua,Tg=Sg,Iae=dC,Rae=$g,pC="Object already initialized",Aae=Oae.WeakMap,Ef,vl,_f,Pae=function(e){return _f(e)?vl(e):Ef(e,{})},jae=function(e){return function(t){var n;if(!Tae(t)||(n=vl(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if($ae||Tg.state){var fa=Tg.state||(Tg.state=new Aae),Nae=fa.get,hC=fa.has,Dae=fa.set;Ef=function(e,t){if(hC.call(fa,e))throw new TypeError(pC);return t.facade=e,Dae.call(fa,e,t),t},vl=function(e){return Nae.call(fa,e)||{}},_f=function(e){return hC.call(fa,e)}}else{var bo=Iae("state");Rae[bo]=!0,Ef=function(e,t){if(Og(e,bo))throw new TypeError(pC);return t.facade=e,Cae(e,bo,t),t},vl=function(e){return Og(e,bo)?e[bo]:{}},_f=function(e){return Og(e,bo)}}var mC={set:Ef,get:vl,has:_f,enforce:Pae,getterFor:jae},Cg=ca,Mae=ua,vC=Function.prototype,Lae=Cg&&Object.getOwnPropertyDescriptor,Ig=Mae(vC,"name"),Fae=Ig&&(function(){}).name==="something",Bae=Ig&&(!Cg||Cg&&Lae(vC,"name").configurable),Rg={EXISTS:Ig,PROPER:Fae,CONFIGURABLE:Bae},zae=Cn,gC=Un,Uae=ua,yC=Sf,qae=wg,Wae=cC,bC=mC,Hae=Rg.CONFIGURABLE,Vae=bC.get,Zae=bC.enforce,Kae=String(String).split("String");(lC.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,a=r?!!r.enumerable:!1,o=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,l;if(gC(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Uae(n,"name")||Hae&&n.name!==s)&&yC(n,"name",s),l=Zae(n),l.source||(l.source=Kae.join(typeof s=="string"?s:""))),e===zae){a?e[t]=n:qae(t,n);return}else i?!o&&e[t]&&(a=!0):delete e[t];a?e[t]=n:yC(e,t,n)})(Function.prototype,"toString",function(){return gC(this)&&Vae(this).source||Wae(this)});var gl=lC.exports,xC={},Gae=Math.ceil,Yae=Math.floor,kf=function(e){var t=+e;return t!==t||t===0?0:(t>0?Yae:Gae)(t)},Jae=kf,Xae=Math.max,Qae=Math.min,eoe=function(e,t){var n=Jae(e);return n<0?Xae(n+t,0):Qae(n,t)},toe=kf,noe=Math.min,wC=function(e){return e>0?noe(toe(e),9007199254740991):0},roe=wC,ioe=function(e){return roe(e.length)},aoe=vg,ooe=eoe,soe=ioe,SC=function(e){return function(t,n,r){var i=aoe(t),a=soe(i),o=ooe(r,a),s;if(e&&n!=n){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},loe={includes:SC(!0),indexOf:SC(!1)},Ag=ua,coe=vg,uoe=loe.indexOf,foe=$g,EC=function(e,t){var n=coe(e),r=0,i=[],a;for(a in n)!Ag(foe,a)&&Ag(n,a)&&i.push(a);for(;t.length>r;)Ag(n,a=t[r++])&&(~uoe(i,a)||i.push(a));return i},Pg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],doe=EC,poe=Pg,hoe=poe.concat("length","prototype");xC.f=Object.getOwnPropertyNames||function(t){return doe(t,hoe)};var _C={};_C.f=Object.getOwnPropertySymbols;var moe=xf,voe=xC,goe=_C,yoe=Ai,boe=moe("Reflect","ownKeys")||function(t){var n=voe.f(yoe(t)),r=goe.f;return r?n.concat(r(t)):n},xoe=ua,woe=boe,Soe=hg,Eoe=ml,_oe=function(e,t){for(var n=woe(t),r=Eoe.f,i=Soe.f,a=0;a<n.length;a++){var o=n[a];xoe(e,o)||r(e,o,i(t,o))}},koe=sr,$oe=Un,Ooe=/#|\.prototype\./,yl=function(e,t){var n=Coe[Toe(e)];return n==Roe?!0:n==Ioe?!1:$oe(t)?koe(t):!!t},Toe=yl.normalize=function(e){return String(e).replace(Ooe,".").toLowerCase()},Coe=yl.data={},Ioe=yl.NATIVE="N",Roe=yl.POLYFILL="P",Aoe=yl,jg=Cn,Poe=hg.f,joe=Sf,Noe=gl,Doe=wg,Moe=_oe,Loe=Aoe,Foe=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,s,l,c,u;if(r?o=jg:i?o=jg[n]||Doe(n,{}):o=(jg[n]||{}).prototype,o)for(s in t){if(c=t[s],e.noTargetGet?(u=Poe(o,s),l=u&&u.value):l=o[s],a=Loe(r?s:n+(i?".":"#")+s,e.forced),!a&&l!==void 0){if(typeof c==typeof l)continue;Moe(c,l)}(e.sham||l&&l.sham)&&joe(c,"sham",!0),Noe(o,s,c,e)}},Boe=hl,zoe=Boe("toStringTag"),kC={};kC[zoe]="z";var Ng=String(kC)==="[object z]",Uoe=Ng,qoe=Un,$f=mg,Woe=hl,Hoe=Woe("toStringTag"),Voe=$f(function(){return arguments}())=="Arguments",Zoe=function(e,t){try{return e[t]}catch{}},$C=Uoe?$f:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=Zoe(t=Object(e),Hoe))=="string"?n:Voe?$f(t):(r=$f(t))=="Object"&&qoe(t.callee)?"Arguments":r},Koe=$C,Of=function(e){if(Koe(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Goe=Ai,OC=function(){var e=Goe(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Dg={},TC=sr,Yoe=Cn,CC=Yoe.RegExp;Dg.UNSUPPORTED_Y=TC(function(){var e=CC("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Dg.BROKEN_CARET=TC(function(){var e=CC("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var Joe=EC,Xoe=Pg,Qoe=Object.keys||function(t){return Joe(t,Xoe)},ese=ca,tse=ml,nse=Ai,rse=Qoe,ise=ese?Object.defineProperties:function(t,n){nse(t);for(var r=rse(n),i=r.length,a=0,o;i>a;)tse.f(t,o=r[a++],n[o]);return t},ase=xf,ose=ase("document","documentElement"),sse=Ai,lse=ise,IC=Pg,cse=$g,use=ose,fse=rC,dse=dC,RC=">",AC="<",Mg="prototype",Lg="script",PC=dse("IE_PROTO"),Fg=function(){},jC=function(e){return AC+Lg+RC+e+AC+"/"+Lg+RC},NC=function(e){e.write(jC("")),e.close();var t=e.parentWindow.Object;return e=null,t},pse=function(){var e=fse("iframe"),t="java"+Lg+":",n;return e.style.display="none",use.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(jC("document.F=Object")),n.close(),n.F},Tf,Cf=function(){try{Tf=new ActiveXObject("htmlfile")}catch{}Cf=typeof document<"u"?document.domain&&Tf?NC(Tf):pse():NC(Tf);for(var e=IC.length;e--;)delete Cf[Mg][IC[e]];return Cf()};cse[PC]=!0;var hse=Object.create||function(t,n){var r;return t!==null?(Fg[Mg]=sse(t),r=new Fg,Fg[Mg]=null,r[PC]=t):r=Cf(),n===void 0?r:lse(r,n)},mse=sr,vse=Cn,gse=vse.RegExp,yse=mse(function(){var e=gse(".","s");return!(e.dotAll&&e.exec(`
|
|
354
|
-
`)&&e.flags==="s")}),bse=sr,xse=Cn,wse=xse.RegExp,Sse=bse(function(){var e=wse("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Ese
|
|
355
|
-
`)&&(y="(?: "+y+")",g=" "+g,v++),s=new RegExp("^(?:"+y+")",m)),Ug&&(s=new RegExp("^"+y+"$(?!\\s)",m)),zg&&(l=n.lastIndex),c=If.call(h?s:n,g),h?c?(c.input=c.input.slice(v),c[0]=c[0].slice(v),c.index=n.lastIndex,n.lastIndex+=c[0].length):n.lastIndex=0:zg&&c&&(n.lastIndex=n.global?c.index+c[0].length:l),Ug&&c&&c.length>1&&Ise.call(c[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(c[u]=void 0)}),c&&p)for(c.groups=f=$se(null),u=0;u<p.length;u++)d=p[u],f[d[0]]=c[d[1]];return c});var qg=Bg,Ase=Foe,LC=qg;Ase({target:"RegExp",proto:!0,forced:/./.exec!==LC},{exec:LC});var FC=gl,Pse=qg,BC=sr,zC=hl,jse=Sf,Nse=zC("species"),Wg=RegExp.prototype,Dse=function(e,t,n,r){var i=zC(e),a=!BC(function(){var c={};return c[i]=function(){return 7},""[e](c)!=7}),o=a&&!BC(function(){var c=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[Nse]=function(){return u},u.flags="",u[i]=/./[i]),u.exec=function(){return c=!0,null},u[i](""),!c});if(!a||!o||n){var s=/./[i],l=t(i,""[e],function(c,u,f,d,p){var h=u.exec;return h===Pse||h===Wg.exec?a&&!p?{done:!0,value:s.call(u,f,d)}:{done:!0,value:c.call(f,u,d)}:{done:!1}});FC(String.prototype,e,l[0]),FC(Wg,i,l[1])}r&&jse(Wg[i],"sham",!0)},Mse=kf,Lse=Of,Fse=bf,UC=function(e){return function(t,n){var r=Lse(Fse(t)),i=Mse(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}},Bse={codeAt:UC(!1),charAt:UC(!0)},zse=Bse.charAt,Use=function(e,t,n){return t+(n?zse(e,t).length:1)},qse=GT,Wse=Math.floor,Hse="".replace,Vse=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Zse=/\$([$&'`]|\d{1,2})/g,Kse=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,l=Zse;return i!==void 0&&(i=qse(i),l=Vse),Hse.call(a,l,function(c,u){var f;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(o);case"<":f=i[u.slice(1,-1)];break;default:var d=+u;if(d===0)return c;if(d>s){var p=Wse(d/10);return p===0?c:p<=s?r[p-1]===void 0?u.charAt(1):r[p-1]+u.charAt(1):c}f=r[d-1]}return f===void 0?"":f})},Gse=Ai,Yse=Un,Jse=mg,Xse=qg,Qse=function(e,t){var n=e.exec;if(Yse(n)){var r=n.call(e,t);return r!==null&&Gse(r),r}if(Jse(e)==="RegExp")return Xse.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},ele=Dse,tle=sr,nle=Ai,rle=Un,ile=kf,ale=wC,xo=Of,ole=bf,sle=Use,lle=WT,cle=Kse,ule=Qse,fle=hl,Hg=fle("replace"),dle=Math.max,ple=Math.min,hle=function(e){return e===void 0?e:String(e)},mle=function(){return"a".replace(/./,"$0")==="$0"}(),qC=function(){return/./[Hg]?/./[Hg]("a","$0")==="":!1}(),vle=!tle(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});ele("replace",function(e,t,n){var r=qC?"$":"$0";return[function(a,o){var s=ole(this),l=a==null?void 0:lle(a,Hg);return l?l.call(a,s,o):t.call(xo(s),a,o)},function(i,a){var o=nle(this),s=xo(i);if(typeof a=="string"&&a.indexOf(r)===-1&&a.indexOf("$<")===-1){var l=n(t,o,s,a);if(l.done)return l.value}var c=rle(a);c||(a=xo(a));var u=o.global;if(u){var f=o.unicode;o.lastIndex=0}for(var d=[];;){var p=ule(o,s);if(p===null||(d.push(p),!u))break;var h=xo(p[0]);h===""&&(o.lastIndex=sle(s,ale(o.lastIndex),f))}for(var m="",y=0,v=0;v<d.length;v++){p=d[v];for(var g=xo(p[0]),b=dle(ple(ile(p.index),s.length),0),k=[],S=1;S<p.length;S++)k.push(hle(p[S]));var _=p.groups;if(c){var $=[g].concat(k,b,s);_!==void 0&&$.push(_);var j=xo(a.apply(void 0,$))}else j=cle(g,s,b,k,_,a);b>=y&&(m+=s.slice(y,b)+j,y=b+g.length)}return m+s.slice(y)}]},!vle||!mle||qC);var bl=Bt,gle=Hm,yle=ia,Rf=function(e){return gle.slice(0,e.length)===e},ble=function(){return Rf("Bun/")?"BUN":Rf("Cloudflare-Workers")?"CLOUDFLARE":Rf("Deno/")?"DENO":Rf("Node.js/")?"NODE":bl.Bun&&typeof Bun.version=="string"?"BUN":bl.Deno&&typeof Deno.version=="object"?"DENO":yle(bl.process)==="process"?"NODE":bl.window&&bl.document?"BROWSER":"REST"}(),xle=TypeError,wle=function(e,t){if(e<t)throw new xle("Not enough arguments");return e},WC=Bt,Sle=Dm,Ele=on,_le=ble,kle=Hm,$le=ef,Ole=wle,Tle=WC.Function,Cle=/MSIE .\./.test(kle)||_le==="BUN"&&function(){var e=WC.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),HC=function(e,t){var n=t?2:1;return Cle?function(r,i){var a=Ole(arguments.length,1)>n,o=Ele(r)?r:Tle(r),s=a?$le(arguments,n):[],l=a?function(){Sle(o,this,s)}:o;return t?e(l,i):e(l)}:e},Ile=vt,VC=Bt,Rle=HC,ZC=Rle(VC.setInterval,!0);Ile({global:!0,bind:!0,forced:VC.setInterval!==ZC},{setInterval:ZC});var Ale=vt,KC=Bt,Ple=HC,GC=Ple(KC.setTimeout,!0);Ale({global:!0,bind:!0,forced:KC.setTimeout!==GC},{setTimeout:GC});var jle=Jt,Nle=jle.setInterval,Dle=Nle;const Mle=Ze(Dle);var Lle=zt,YC=function(e,t){var n=[][e];return!!n&&Lle(function(){n.call(null,t||function(){return 1},1)})},Fle=vt,Ble=Lm,zle=x$.indexOf,Ule=YC,Vg=Ble([].indexOf),JC=!!Vg&&1/Vg([1],1,-0)<0,qle=JC||!Ule("indexOf");Fle({target:"Array",proto:!0,forced:qle},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return JC?Vg(this,t,n)||0:zle(this,t,n)}});var Wle=la,Hle=Wle("Array","indexOf"),Vle=Yr,Zle=Hle,Zg=Array.prototype,Kle=function(e){var t=e.indexOf;return e===Zg||Vle(Zg,e)&&t===Zg.indexOf?Zle:t},Gle=Kle,Yle=Gle,Jle=Yle;const Xle=Ze(Jle);var XC=zu,Qle=TypeError,ece=function(e,t){if(!delete e[t])throw new Qle("Cannot delete property "+XC(t)+" of "+XC(e))},tce=vt,nce=Jr,rce=hv,ice=Hu,ace=aa,oce=rT,sce=lv,lce=pv,cce=Qs,Kg=ece,uce=Zu,fce=uce("splice"),dce=Math.max,pce=Math.min;tce({target:"Array",proto:!0,forced:!fce},{splice:function(t,n){var r=nce(this),i=ace(r),a=rce(t,i),o=arguments.length,s,l,c,u,f,d;for(o===0?s=l=0:o===1?(s=0,l=i-a):(s=o-2,l=pce(dce(ice(n),0),i-a)),sce(i+s-l),c=lce(r,l),u=0;u<l;u++)f=a+u,f in r&&cce(c,u,r[f]);if(c.length=l,s<l){for(u=a;u<i-l;u++)f=u+l,d=u+s,f in r?r[d]=r[f]:Kg(r,d);for(u=i;u>i-l+s;u--)Kg(r,u-1)}else if(s>l)for(u=i-l;u>a;u--)f=u+l-1,d=u+s-1,f in r?r[d]=r[f]:Kg(r,d);for(u=0;u<s;u++)r[u+a]=arguments[u+2];return oce(r,i-l+s),c}});var hce=la,mce=hce("Array","splice"),vce=Yr,gce=mce,Gg=Array.prototype,yce=function(e){var t=e.splice;return e===Gg||vce(Gg,e)&&t===Gg.splice?gce:t},bce=yce,xce=bce,wce=xce;const Sce=Ze(wce);var Ece=la,_ce=Ece("Array","concat"),kce=Yr,$ce=_ce,Yg=Array.prototype,Oce=function(e){var t=e.concat;return e===Yg||kce(Yg,e)&&t===Yg.concat?$ce:t},Tce=Oce,Cce=Tce,Ice=Cce;const kt=Ze(Ice);var Rce=vt,Ace=Nt,QC=Date,Pce=Ace(QC.prototype.getTime);Rce({target:"Date",stat:!0},{now:function(){return Pce(new QC)}});var jce=Jt,Nce=jce.Date.now,Dce=Nce,Mce=Dce,Lce=Mce;const Pi=Ze(Lce);var Fce=$v.forEach,Bce=YC,zce=Bce("forEach"),Uce=zce?[].forEach:function(t){return Fce(this,t,arguments.length>1?arguments[1]:void 0)},qce=vt,eI=Uce;qce({target:"Array",proto:!0,forced:[].forEach!==eI},{forEach:eI});var Wce=la,Hce=Wce("Array","forEach"),Vce=Hce,Zce=Vce,Kce=el,Gce=Tn,Yce=Yr,Jce=Zce,Jg=Array.prototype,Xce={DOMTokenList:!0,NodeList:!0},Qce=function(e){var t=e.forEach;return e===Jg||Yce(Jg,e)&&t===Jg.forEach||Gce(Xce,Kce(e))?Jce:t},eue=Qce;const Af=Ze(eue);var tue=vt,nue=Jr,tI=gv,rue=zt,iue=rue(function(){tI(1)});tue({target:"Object",stat:!0,forced:iue},{keys:function(t){return tI(nue(t))}});var aue=Jt,oue=aue.Object.keys,sue=oue,lue=sue,cue=lue;const uue=Ze(cue);var fue=Jt,due=fue.Object.getOwnPropertySymbols,pue=due,hue=pue,mue=hue;const nI=Ze(mue);var vue=vt,gue=$v.filter,yue=Zu,bue=yue("filter");vue({target:"Array",proto:!0,forced:!bue},{filter:function(t){return gue(this,t,arguments.length>1?arguments[1]:void 0)}});var xue=la,wue=xue("Array","filter"),Sue=Yr,Eue=wue,Xg=Array.prototype,_ue=function(e){var t=e.filter;return e===Xg||Sue(Xg,e)&&t===Xg.filter?Eue:t},kue=_ue,$ue=kue,Oue=$ue;const Tue=Ze(Oue);var rI={exports:{}},Cue=vt,Iue=zt,Rue=Ir,iI=Ks.f,aI=yn,Aue=!aI||Iue(function(){iI(1)});Cue({target:"Object",stat:!0,forced:Aue,sham:!aI},{getOwnPropertyDescriptor:function(t,n){return iI(Rue(t),n)}});var Pue=Jt,oI=Pue.Object,jue=rI.exports=function(t,n){return oI.getOwnPropertyDescriptor(t,n)};oI.getOwnPropertyDescriptor.sham&&(jue.sham=!0);var Nue=rI.exports,Due=Nue,Mue=Due,Lue=Mue;const sI=Ze(Lue);var Fue=Rr,Bue=Nt,zue=Qu,Uue=tf,que=Ci,Wue=Bue([].concat),Hue=Fue("Reflect","ownKeys")||function(t){var n=zue.f(que(t)),r=Uue.f;return r?Wue(n,r(t)):n},Vue=vt,Zue=yn,Kue=Hue,Gue=Ir,Yue=Ks,Jue=Qs;Vue({target:"Object",stat:!0,sham:!Zue},{getOwnPropertyDescriptors:function(t){for(var n=Gue(t),r=Yue.f,i=Kue(n),a={},o=0,s,l;i.length>o;)l=r(n,s=i[o++]),l!==void 0&&Jue(a,s,l);return a}});var Xue=Jt,Que=Xue.Object.getOwnPropertyDescriptors,efe=Que,tfe=efe,nfe=tfe;const lI=Ze(nfe);var cI={exports:{}},rfe=vt,ife=yn,uI=Ku.f;rfe({target:"Object",stat:!0,forced:Object.defineProperties!==uI,sham:!ife},{defineProperties:uI});var afe=Jt,fI=afe.Object,ofe=cI.exports=function(t,n){return fI.defineProperties(t,n)};fI.defineProperties.sham&&(ofe.sham=!0);var sfe=cI.exports,lfe=sfe,cfe=lfe,ufe=cfe;const ffe=Ze(ufe);var dfe=IT;const pfe=Ze(dfe);var hfe=!1;function mfe(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function vfe(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var gfe=function(){function e(n){var r=this;this._insertTag=function(i){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,a),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!hfe:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(vfe(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=mfe(i);try{a.insertRule(r,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),sn="-ms-",Pf="-moz-",st="-webkit-",dI="comm",Qg="rule",ey="decl",yfe="@import",pI="@keyframes",bfe="@layer",xfe=Math.abs,jf=String.fromCharCode,wfe=Object.assign;function Sfe(e,t){return Xt(e,0)^45?(((t<<2^Xt(e,0))<<2^Xt(e,1))<<2^Xt(e,2))<<2^Xt(e,3):0}function hI(e){return e.trim()}function Efe(e,t){return(e=t.exec(e))?e[0]:e}function lt(e,t,n){return e.replace(t,n)}function ty(e,t){return e.indexOf(t)}function Xt(e,t){return e.charCodeAt(t)|0}function xl(e,t,n){return e.slice(t,n)}function Nr(e){return e.length}function ny(e){return e.length}function Nf(e,t){return t.push(e),e}function _fe(e,t){return e.map(t).join("")}var Df=1,wo=1,mI=0,xn=0,Dt=0,So="";function Mf(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Df,column:wo,length:o,return:""}}function wl(e,t){return wfe(Mf("",null,null,"",null,null,0),e,{length:-e.length},t)}function kfe(){return Dt}function $fe(){return Dt=xn>0?Xt(So,--xn):0,wo--,Dt===10&&(wo=1,Df--),Dt}function In(){return Dt=xn<mI?Xt(So,xn++):0,wo++,Dt===10&&(wo=1,Df++),Dt}function Dr(){return Xt(So,xn)}function Lf(){return xn}function Sl(e,t){return xl(So,e,t)}function El(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function vI(e){return Df=wo=1,mI=Nr(So=e),xn=0,[]}function gI(e){return So="",e}function Ff(e){return hI(Sl(xn-1,ry(e===91?e+2:e===40?e+1:e)))}function Ofe(e){for(;(Dt=Dr())&&Dt<33;)In();return El(e)>2||El(Dt)>3?"":" "}function Tfe(e,t){for(;--t&&In()&&!(Dt<48||Dt>102||Dt>57&&Dt<65||Dt>70&&Dt<97););return Sl(e,Lf()+(t<6&&Dr()==32&&In()==32))}function ry(e){for(;In();)switch(Dt){case e:return xn;case 34:case 39:e!==34&&e!==39&&ry(Dt);break;case 40:e===41&&ry(e);break;case 92:In();break}return xn}function Cfe(e,t){for(;In()&&e+Dt!==57;)if(e+Dt===84&&Dr()===47)break;return"/*"+Sl(t,xn-1)+"*"+jf(e===47?e:In())}function Ife(e){for(;!El(Dr());)In();return Sl(e,xn)}function Rfe(e){return gI(Bf("",null,null,null,[""],e=vI(e),0,[0],e))}function Bf(e,t,n,r,i,a,o,s,l){for(var c=0,u=0,f=o,d=0,p=0,h=0,m=1,y=1,v=1,g=0,b="",k=i,S=a,_=r,$=b;y;)switch(h=g,g=In()){case 40:if(h!=108&&Xt($,f-1)==58){ty($+=lt(Ff(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:$+=Ff(g);break;case 9:case 10:case 13:case 32:$+=Ofe(h);break;case 92:$+=Tfe(Lf()-1,7);continue;case 47:switch(Dr()){case 42:case 47:Nf(Afe(Cfe(In(),Lf()),t,n),l);break;default:$+="/"}break;case 123*m:s[c++]=Nr($)*v;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+u:v==-1&&($=lt($,/\f/g,"")),p>0&&Nr($)-f&&Nf(p>32?bI($+";",r,n,f-1):bI(lt($," ","")+";",r,n,f-2),l);break;case 59:$+=";";default:if(Nf(_=yI($,t,n,c,u,i,s,b,k=[],S=[],f),a),g===123)if(u===0)Bf($,t,_,_,k,a,f,s,S);else switch(d===99&&Xt($,3)===110?100:d){case 100:case 108:case 109:case 115:Bf(e,_,_,r&&Nf(yI(e,_,_,0,0,i,s,b,i,k=[],f),S),i,S,f,s,r?k:S);break;default:Bf($,_,_,_,[""],S,0,s,S)}}c=u=p=0,m=v=1,b=$="",f=o;break;case 58:f=1+Nr($),p=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&$fe()==125)continue}switch($+=jf(g),g*m){case 38:v=u>0?1:($+="\f",-1);break;case 44:s[c++]=(Nr($)-1)*v,v=1;break;case 64:Dr()===45&&($+=Ff(In())),d=Dr(),u=f=Nr(b=$+=Ife(Lf())),g++;break;case 45:h===45&&Nr($)==2&&(m=0)}}return a}function yI(e,t,n,r,i,a,o,s,l,c,u){for(var f=i-1,d=i===0?a:[""],p=ny(d),h=0,m=0,y=0;h<r;++h)for(var v=0,g=xl(e,f+1,f=xfe(m=o[h])),b=e;v<p;++v)(b=hI(m>0?d[v]+" "+g:lt(g,/&\f/g,d[v])))&&(l[y++]=b);return Mf(e,t,n,i===0?Qg:s,l,c,u)}function Afe(e,t,n){return Mf(e,t,n,dI,jf(kfe()),xl(e,2,-2),0)}function bI(e,t,n,r){return Mf(e,t,n,ey,xl(e,0,r),xl(e,r+1,-1),r)}function Eo(e,t){for(var n="",r=ny(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Pfe(e,t,n,r){switch(e.type){case bfe:if(e.children.length)break;case yfe:case ey:return e.return=e.return||e.value;case dI:return"";case pI:return e.return=e.value+"{"+Eo(e.children,r)+"}";case Qg:e.value=e.props.join(",")}return Nr(n=Eo(e.children,r))?e.return=e.value+"{"+n+"}":""}function jfe(e){var t=ny(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function Nfe(e){return function(t){t.root||(t=t.return)&&e(t)}}function Dfe(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Mfe=function(t,n,r){for(var i=0,a=0;i=a,a=Dr(),i===38&&a===12&&(n[r]=1),!El(a);)In();return Sl(t,xn)},Lfe=function(t,n){var r=-1,i=44;do switch(El(i)){case 0:i===38&&Dr()===12&&(n[r]=1),t[r]+=Mfe(xn-1,n,r);break;case 2:t[r]+=Ff(i);break;case 4:if(i===44){t[++r]=Dr()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=jf(i)}while(i=In());return t},Ffe=function(t,n){return gI(Lfe(vI(t),n))},xI=new WeakMap,Bfe=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!xI.get(r))&&!i){xI.set(t,!0);for(var a=[],o=Ffe(n,a),s=r.props,l=0,c=0;l<o.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=a[l]?o[l].replace(/&\f/g,s[u]):s[u]+" "+o[l]}}},zfe=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function wI(e,t){switch(Sfe(e,t)){case 5103:return st+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return st+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return st+e+Pf+e+sn+e+e;case 6828:case 4268:return st+e+sn+e+e;case 6165:return st+e+sn+"flex-"+e+e;case 5187:return st+e+lt(e,/(\w+).+(:[^]+)/,st+"box-$1$2"+sn+"flex-$1$2")+e;case 5443:return st+e+sn+"flex-item-"+lt(e,/flex-|-self/,"")+e;case 4675:return st+e+sn+"flex-line-pack"+lt(e,/align-content|flex-|-self/,"")+e;case 5548:return st+e+sn+lt(e,"shrink","negative")+e;case 5292:return st+e+sn+lt(e,"basis","preferred-size")+e;case 6060:return st+"box-"+lt(e,"-grow","")+st+e+sn+lt(e,"grow","positive")+e;case 4554:return st+lt(e,/([^-])(transform)/g,"$1"+st+"$2")+e;case 6187:return lt(lt(lt(e,/(zoom-|grab)/,st+"$1"),/(image-set)/,st+"$1"),e,"")+e;case 5495:case 3959:return lt(e,/(image-set\([^]*)/,st+"$1$`$1");case 4968:return lt(lt(e,/(.+:)(flex-)?(.*)/,st+"box-pack:$3"+sn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+st+e+e;case 4095:case 3583:case 4068:case 2532:return lt(e,/(.+)-inline(.+)/,st+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Nr(e)-1-t>6)switch(Xt(e,t+1)){case 109:if(Xt(e,t+4)!==45)break;case 102:return lt(e,/(.+:)(.+)-([^]+)/,"$1"+st+"$2-$3$1"+Pf+(Xt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ty(e,"stretch")?wI(lt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Xt(e,t+1)!==115)break;case 6444:switch(Xt(e,Nr(e)-3-(~ty(e,"!important")&&10))){case 107:return lt(e,":",":"+st)+e;case 101:return lt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+st+(Xt(e,14)===45?"inline-":"")+"box$3$1"+st+"$2$3$1"+sn+"$2box$3")+e}break;case 5936:switch(Xt(e,t+11)){case 114:return st+e+sn+lt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return st+e+sn+lt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return st+e+sn+lt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return st+e+sn+e+e}return e}var Ufe=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case ey:t.return=wI(t.value,t.length);break;case pI:return Eo([wl(t,{value:lt(t.value,"@","@"+st)})],i);case Qg:if(t.length)return _fe(t.props,function(a){switch(Efe(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Eo([wl(t,{props:[lt(a,/:(read-\w+)/,":"+Pf+"$1")]})],i);case"::placeholder":return Eo([wl(t,{props:[lt(a,/:(plac\w+)/,":"+st+"input-$1")]}),wl(t,{props:[lt(a,/:(plac\w+)/,":"+Pf+"$1")]}),wl(t,{props:[lt(a,/:(plac\w+)/,sn+"input-$1")]})],i)}return""})}},qfe=[Ufe],Wfe=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var y=m.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=t.stylisPlugins||qfe,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var y=m.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)a[y[v]]=!0;s.push(m)});var l,c=[Bfe,zfe];{var u,f=[Pfe,Nfe(function(m){u.insert(m)})],d=jfe(c.concat(i,f)),p=function(y){return Eo(Rfe(y),d)};l=function(y,v,g,b){u=g,p(y?y+"{"+v.styles+"}":v.styles),b&&(h.inserted[v.name]=!0)}}var h={key:n,sheet:new gfe({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:l};return h.sheet.hydrate(s),h};function Hfe(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Vfe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Zfe=!1,Kfe=/[A-Z]|^ms/g,Gfe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,SI=function(t){return t.charCodeAt(1)===45},EI=function(t){return t!=null&&typeof t!="boolean"},iy=Dfe(function(e){return SI(e)?e:e.replace(Kfe,"-$&").toLowerCase()}),_I=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Gfe,function(r,i,a){return ji={name:i,styles:a,next:ji},i})}return Vfe[t]!==1&&!SI(t)&&typeof n=="number"&&n!==0?n+"px":n},Yfe="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function zf(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return ji={name:i.name,styles:i.styles,next:ji},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)ji={name:o.name,styles:o.styles,next:ji},o=o.next;var s=a.styles+";";return s}return Jfe(e,t,n)}}var l=n;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function Jfe(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=zf(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?r+=a+"{"+t[s]+"}":EI(s)&&(r+=iy(a)+":"+_I(a,s)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&Zfe)throw new Error(Yfe);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var l=0;l<o.length;l++)EI(o[l])&&(r+=iy(a)+":"+_I(a,o[l])+";");else{var c=zf(e,t,o);switch(a){case"animation":case"animationName":{r+=iy(a)+":"+c+";";break}default:r+=a+"{"+c+"}"}}}}return r}var kI=/label:\s*([^\s;{]+)\s*(;|$)/g,ji;function ay(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";ji=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=zf(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=zf(n,t,e[s]),r){var l=a;i+=l[s]}kI.lastIndex=0;for(var c="",u;(u=kI.exec(i))!==null;)c+="-"+u[1];var f=Hfe(i)+c;return{name:f,styles:i,next:ji}}function $I(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var Xfe=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},Qfe=function(t,n,r){Xfe(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function OI(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function TI(e,t,n){var r=[],i=$I(e,r,n);return r.length<2?n:i+t(r)}var ede=function(t){var n=Wfe(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=ay(c,n.registered,void 0);return Qfe(n,f),n.key+"-"+f.name},i=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=ay(c,n.registered),d="animation-"+f.name;return OI(n,{name:f.name,styles:"@keyframes "+d+"{"+f.styles+"}"}),d},a=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=ay(c,n.registered);OI(n,f)},o=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return TI(n.registered,r,tde(c))};return{css:r,cx:o,injectGlobal:a,keyframes:i,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:$I.bind(null,n.registered),merge:TI.bind(null,n.registered,r)}},tde=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))a=e(i);else{a="";for(var o in i)i[o]&&o&&(a&&(a+=" "),a+=o)}break}default:a=i}a&&(n&&(n+=" "),n+=a)}}return n},nde=gl,oy=Date.prototype,CI="Invalid Date",II="toString",rde=oy[II],ide=oy.getTime;String(new Date(NaN))!=CI&&nde(oy,II,function(){var t=ide.call(this);return t===t?rde.call(this):CI});var ade=Ng,ode=$C,sde=ade?{}.toString:function(){return"[object "+ode(this)+"]"},lde=Ng,cde=gl,ude=sde;lde||cde(Object.prototype,"toString",ude,{unsafe:!0});var fde=Rg.PROPER,dde=gl,pde=Ai,RI=Of,hde=sr,mde=OC,sy="toString",AI=RegExp.prototype,PI=AI[sy],vde=hde(function(){return PI.call({source:"a",flags:"b"})!="/a/b"}),gde=fde&&PI.name!=sy;(vde||gde)&&dde(RegExp.prototype,sy,function(){var t=pde(this),n=RI(t.source),r=t.flags,i=RI(r===void 0&&t instanceof RegExp&&!("flags"in AI)?mde.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var jI=typeof window<"u"?window:self,yde=jI.crypto||jI.msCrypto,bde=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(yde);const xde=Ze(bde);function wde(){return xde().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var Sde=s$;const NI=Ze(Sde);function ht(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function DI(e,t){for(var n,r,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];return kt(n=[kt(r="%c".concat(e,"%c ")).call(r,t)]).call(n,tt(ht("green","white")),a)}function Ede(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];if(a.length){var s=a,l=Pr(s,1),c=l[0];typeof c=="function"&&(a=c());var u=NI(a[0])?a:[a],f=u.length===1;Af(u).call(u,function(d,p){if(f){var h,m;(h=console).log.apply(h,tt(DI.apply(void 0,kt(m=[e]).call(m,tt(d)))))}else if(p){var y;(y=console).log.apply(y,tt(NI(d)?d:[d]))}else{var v,g;(v=console).groupCollapsed.apply(v,tt(DI.apply(void 0,kt(g=[e]).call(g,tt(d)))))}}),f||console.groupEnd()}}:function(){return 0}}var _de=ca,kde=Rg.EXISTS,$de=ml.f,MI=Function.prototype,Ode=MI.toString,Tde=/^\s*function ([^ (]*)/,Cde="name";_de&&!kde&&$de(MI,Cde,{configurable:!0,get:function(){try{return Ode.call(this).match(Tde)[1]}catch{return""}}});var Ide=Jt,Rde=Ide.setTimeout,Ade=Rde;const Pde=Ze(Ade);function jde(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=Pi();s-n>t?(e.apply(void 0,a),n=s):(clearTimeout(r),r=Pde(function(){e.apply(void 0,a),n=Pi()},Math.max(0,t-s+n)))}}var LI=function(t){var n=t.debounce,r=t.name,i=t.onEvent,a=t.target,o=D.useRef();o.current=i;var s=D.useMemo(function(){return jde(function(c){var u=o.current;u&&u(c)},n)},[n,o]),l=D.useCallback(function(c){c.timeStampLow=Pi(),s(c)},[s]);return D.useLayoutEffect(function(){return a.addEventListener(r,l,{passive:!0}),l({target:a,type:r}),function(){return a.removeEventListener(r,l)}},[r,l,a]),!1};LI.defaultProps={debounce:200};var Nde=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},Dde=vt,Mde=Nde;Dde({target:"Math",stat:!0},{sign:Mde});var Lde=Jt,Fde=Lde.Math.sign,Bde=Fde,zde=Bde,Ude=zde;const qde=Ze(Ude);function Wde(e,t){var n=qde(t-e),r=Math.sqrt(Math.abs(t-e)),i=e+r*n;return n>0?Math.min(t,i):Math.max(t,i)}function Hde(e,t,n,r){for(var i=e,a=0;a<r;a++)i=n(i,t);return i}var FI=function(t){var n=t.name,r=t.onEnd,i=t.target,a=t.value,o=D.useRef(),s=D.useCallback(function(c,u,f,d){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Pi();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(o.current),o.current=requestAnimationFrame(function(){if(i){var h=f==="100%"?i.scrollHeight-i.offsetHeight:f,m=Hde(u,h,Wde,(Pi()-p)/5);Math.abs(h-m)<1.5&&(m=h),i[c]=m,h===m?r&&r(!0):s(c,u,f,d+1,p)}}))},[o,r,i]),l=D.useCallback(function(){cancelAnimationFrame(o.current),r&&r(!1)},[r]);return D.useLayoutEffect(function(){return s(n,i[n],a,1),i?(i.addEventListener("pointerdown",l,{passive:!0}),i.addEventListener("wheel",l,{passive:!0}),function(){i.removeEventListener("pointerdown",l),i.removeEventListener("wheel",l),cancelAnimationFrame(o.current)}):function(){return cancelAnimationFrame(o.current)}},[s,o,l,n,i,a]),!1};FI.propTypes={name:at.string.isRequired,onEnd:at.func,target:at.any.isRequired,value:at.oneOfType([at.number,at.oneOf(["100%"])]).isRequired};function ly(e){var t=D.useState(e),n=Pr(t,2),r=n[0],i=n[1],a=D.useRef(),o=D.useCallback(function(s){typeof s=="function"?o(function(l){return s=s(l),a.current=s,s}):(a.current=s,o(s))},[a]);return a.current=r,[r,i,a]}function BI(e,t){var n=uue(e);if(nI){var r=nI(e);t&&(r=Tue(r).call(r,function(i){return sI(e,i).enumerable})),n.push.apply(n,r)}return n}function zI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Af(r=BI(Object(n),!0)).call(r,function(a){rie(e,a,n[a])})}else if(lI)ffe(e,lI(n));else{var i;Af(i=BI(Object(n))).call(i,function(a){pfe(e,a,sI(n,a))})}}return e}var Vde=function(){return 1/0},UI=17,Zde="bottom",lr="top",qI=1,Kde=34,WI={};function Gde(e,t){return e(),Mle(e,t)}function HI(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,a=n.scrollTop,o=i-a-r<qI,s=a<qI,l=t===lr?s:o,c=t!==lr?s:o;return{atBottom:o,atEnd:l,atStart:c,atTop:s}}function _l(e,t){return e===(t===lr?0:"100%")}var cy=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,a=t.debug,o=t.initialScrollBehavior,s=t.mode,l=t.nonce,c=t.scroller,u=D.useMemo(function(){return Ede("<ScrollToBottom>",{force:a})},[a]);s=s===lr?lr:Zde;var f=D.useRef(0),d=D.useRef(o),p=ly(s===lr?0:"100%"),h=Pr(p,3),m=h[0],y=h[1],v=h[2],g=ly(null),b=Pr(g,3),k=b[0],S=b[1],_=b[2],$=D.useRef(0),j=D.useRef(0),z=D.useRef(0),O=D.useState(!0),N=Pr(O,2),W=N[0],L=N[1],U=D.useState(!0),M=Pr(U,2),I=M[0],H=M[1],B=D.useState(!0),A=Pr(B,2),x=A[0],q=A[1],K=D.useState(!1),E=Pr(K,2),Q=E[0],oe=E[1],ne=ly(!0),le=Pr(ne,3),pe=le[0],he=le[1],ce=le[2],X=D.useRef([]),Z=D.useCallback(function(P){var J=_.current;return X.current.push(P),J&&P({scrollTop:J.scrollTop}),function(){var ue=X.current,_e=Xle(ue).call(ue,P);~_e&&Sce(ue).call(ue,_e,1)}},[X,_]),de=D.useCallback(function(){var P=v.current;u(function(){var J;return kt(J=["%cSpineTo%c: %conEnd%c is fired."]).call(J,tt(ht("magenta")),tt(ht("orange")),[{animateTo:P}])}),f.current=Pi(),_l(P,s)||he(!1),y(null)},[v,u,f,s,y,he]),ve=D.useCallback(function(P){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ue=J.behavior,_e=_.current;if(typeof P!="number"&&P!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var Oe;return[kt(Oe=["%cscrollTo%c: Will scroll to %c".concat(typeof P=="number"?P+"px":P.replace(/%/g,"%%"),"%c")]).call(Oe,tt(ht("lime","")),tt(ht("purple"))),{behavior:ue,nextAnimateTo:P,target:_e}]}),ue==="auto"?(de(),_e&&(_e.scrollTop=P==="100%"?_e.scrollHeight-_e.offsetHeight:P)):(ue!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),y(P)),_l(P,s)&&(u(function(){var Oe;return[kt(Oe=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Oe,tt(ht("lime","")),tt(ht("purple"))),[{mode:s,nextAnimateTo:P}]]}),he(!0))},[u,de,s,y,he,_]),Ce=D.useCallback(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=P.behavior;u(function(){var ue;return kt(ue=["%cscrollToBottom%c: Called"]).call(ue,tt(ht("yellow","")))}),J!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve("100%",{behavior:J||"smooth"})},[u,ve]),R=D.useCallback(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=P.behavior;u(function(){var ue;return kt(ue=["%cscrollToTop%c: Called"]).call(ue,tt(ht("yellow","")))}),J!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve(0,{behavior:J||"smooth"})},[u,ve]),Y=D.useCallback(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=P.behavior;u(function(){var _e;return kt(_e=["%cscrollToEnd%c: Called"]).call(_e,tt(ht("yellow","")))}),J!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var ue={behavior:J||"smooth"};s===lr?R(ue):Ce(ue)},[u,s,Ce,R]),ae=D.useCallback(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=P.behavior;u(function(){var _e;return kt(_e=["%cscrollToStart%c: Called"]).call(_e,tt(ht("yellow","")))}),J!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var ue={behavior:J||"smooth"};s===lr?Ce(ue):R(ue)},[u,s,Ce,R]),ee=D.useCallback(function(){var P=_.current;if(P){if(d.current==="auto"){u(function(){var Ct;return kt(Ct=["%ctarget changed%c: Initial scroll"]).call(Ct,tt(ht("blue")))}),P.scrollTop=s===lr?0:P.scrollHeight-P.offsetHeight,d.current=!1;return}var J=$.current,ue=P.offsetHeight,_e=P.scrollHeight,Oe=P.scrollTop,Xe=s===lr?0:Math.max(0,_e-ue-Oe),ct=Math.max(0,J-Oe),Ut=c({maxValue:Xe,minValue:ct,offsetHeight:ue,scrollHeight:_e,scrollTop:Oe}),Tt=Math.max(0,Math.min(Xe,Ut)),Ge;s===lr||Tt!==Xe?Ge=Oe+Tt:Ge="100%",u(function(){var Ct,nt,wn;return[kt(Ct=[kt(nt=kt(wn="%cscrollToSticky%c: Will animate from %c".concat(J,"px%c to %c")).call(wn,typeof Ge=="number"?Ge+"px":Ge.replace(/%/g,"%%"),"%c (%c")).call(nt,(Ge==="100%"?Xe:Ge)+J,"px%c)")]).call(Ct,tt(ht("orange")),tt(ht("purple")),tt(ht("purple")),tt(ht("purple"))),{animateFrom:J,maxValue:Xe,minValue:ct,nextAnimateTo:Ge,nextValue:Tt,offsetHeight:ue,rawNextValue:Ut,scrollHeight:_e,scrollTop:Oe}]}),ve(Ge,{behavior:"smooth"})}},[$,u,s,c,ve,_]),ke=D.useCallback(function(P){var J,ue=P.timeStampLow,_e=v.current,Oe=_.current,Xe=_e!==null;if(!(ue<=f.current||!Oe)){var ct=HI({mode:s,target:Oe}),Ut=ct.atBottom,Tt=ct.atEnd,Ge=ct.atStart,Ct=ct.atTop;L(Ut),H(Tt),oe(Ge),q(Ct);var nt=Oe.offsetHeight,wn=Oe.scrollHeight,Rn=j.current,cr=z.current,ei=nt!==Rn,Mr=wn!==cr;if(ei&&(j.current=nt),Mr&&(z.current=wn),!ei&&!Mr){var ur=Xe&&_l(_e,s)||Tt;ce.current!==ur&&(u(function(){var mt,St,qt,Wt;return[kt(mt=["%conScroll%c: %csetSticky%c(%c".concat(ur,"%c)")]).call(mt,tt(ht("red")),tt(ht("red")),tt(ht("purple"))),kt(St=[kt(qt=kt(Wt="(animating = %c".concat(Xe,"%c && isEnd = %c")).call(Wt,_l(_e,s),"%c) || atEnd = %c")).call(qt,Tt,"%c")]).call(St,tt(ht("purple")),tt(ht("purple")),tt(ht("purple")),[{animating:Xe,animateTo:_e,atEnd:Tt,mode:s,offsetHeight:Oe.offsetHeight,scrollHeight:Oe.scrollHeight,sticky:ce.current,nextSticky:ur}])]}),he(ur))}else ce.current&&(u(function(){var mt;return[kt(mt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(mt,tt(ht("red")),tt(ht("orange")),[{offsetHeightChanged:ei,scrollHeightChanged:Mr}]),{nextOffsetHeight:nt,prevOffsetHeight:Rn,nextScrollHeight:wn,prevScrollHeight:cr}]}),ee());var ti=Oe.scrollTop;Af(J=X.current).call(J,function(mt){return mt({scrollTop:ti})})}},[v,u,f,s,j,z,X,ee,L,H,oe,q,he,ce,_]);D.useEffect(function(){if(k){var P=!1,J=Gde(function(){var ue=_.current,_e=v.current!==null;ce.current?HI({mode:s,target:ue}).atEnd?P=!1:P?Pi()-P>Kde&&(_e||($.current=ue.scrollTop,u(function(){var Oe;return kt(Oe=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Oe,tt(ht("navy")),tt(ht("orange")))}),ee()),P=!1):P=Pi():ue.scrollHeight<=ue.offsetHeight&&!ce.current&&(u(function(){var Oe;return[kt(Oe=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Oe,tt(ht("navy")),tt(ht("purple"))),[{offsetHeight:ue.offsetHeight,scrollHeight:ue.scrollHeight,sticky:ce.current}]]}),he(!0))},Math.max(UI,n)||UI);return function(){return clearInterval(J)}}},[v,n,u,s,ee,he,ce,k,_]);var we=D.useMemo(function(){var P=WI[l]||(WI[l]=ede({key:"react-scroll-to-bottom--css-"+wde(),nonce:l}));return function(J){return P.css(J)+""}},[l]),Re=D.useMemo(function(){return{observeScrollPosition:Z,setTarget:S,styleToClassName:we}},[Z,S,we]),Ve=D.useMemo(function(){return{atBottom:W,atEnd:I,atStart:Q,atTop:x,mode:s}},[W,I,Q,x,s]),Ae=D.useMemo(function(){var P=m!==null;return{animating:P,animatingToEnd:P&&_l(m,s),sticky:pe}},[m,s,pe]),Be=D.useMemo(function(){return zI(zI({},Ve),Ae)},[Ve,Ae]),F=D.useMemo(function(){return{scrollTo:ve,scrollToBottom:Ce,scrollToEnd:Y,scrollToStart:ae,scrollToTop:R}},[ve,Ce,Y,ae,R]);return D.useEffect(function(){if(k){var P=function(){z.current=k.scrollHeight};return k.addEventListener("focus",P,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",P)}}},[k]),u(function(){var P;return[kt(P=["%cRender%c: Render"]).call(P,tt(ht("cyan",""))),{animateTo:m,animating:m!==null,sticky:pe,target:k}]}),D.createElement(gf.Provider,{value:Re},D.createElement(lg.Provider,{value:F},D.createElement(fg.Provider,{value:Be},D.createElement(cg.Provider,{value:Ve},D.createElement(ug.Provider,{value:Ae},r,k&&D.createElement(LI,{debounce:i,name:"scroll",onEvent:ke,target:k}),k&&m!==null&&D.createElement(FI,{name:"scrollTop",onEnd:de,target:k,value:m}))))))};cy.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:Vde},cy.propTypes={checkInterval:at.number,children:at.any,debounce:at.number,debug:at.bool,initialScrollBehavior:at.oneOf(["auto","smooth"]),mode:at.oneOf(["bottom","top"]),nonce:at.string,scroller:at.func};var Yde={height:"100%",overflowY:"auto",width:"100%"},uy=function(t){var n=t.children,r=t.className,i=D.useContext(gf),a=i.setTarget,o=dg()(Yde);return D.createElement("div",{className:eg(o,(r||"")+""),ref:a},n)};uy.defaultProps={children:void 0,className:void 0},uy.propTypes={children:at.any,className:at.string};var Jde={position:"relative"},fy=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,a=t.scrollViewClassName,o=dg()(Jde);return D.createElement("div",{className:eg(o,(r||"")+"")},D.createElement(uy,{className:(a||"")+""},n),D.createElement(pg,{className:(i||"")+""}))};fy.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},fy.propTypes={children:at.any,className:at.string,followButtonClassName:at.string,scrollViewClassName:at.string};var dy=function(t){var n=t.checkInterval,r=t.children,i=t.className,a=t.debounce,o=t.debug,s=t.followButtonClassName,l=t.initialScrollBehavior,c=t.mode,u=t.nonce,f=t.scroller,d=t.scrollViewClassName;return D.createElement(cy,{checkInterval:n,debounce:a,debug:o,initialScrollBehavior:l,mode:c,nonce:u,scroller:f},D.createElement(fy,{className:i,followButtonClassName:s,scrollViewClassName:d},r))};dy.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},dy.propTypes={checkInterval:at.number,children:at.any,className:at.string,debounce:at.number,debug:at.bool,followButtonClassName:at.string,initialScrollBehavior:at.oneOf(["auto","smooth"]),mode:at.oneOf(["bottom","top"]),nonce:at.string,scroller:at.func,scrollViewClassName:at.string};function Xde(){var e=_T(),t=e.scrollToBottom;return t}rZ();const VI=D.memo(({scrollDownButton:e,className:t,...n})=>{const{messageList:r}=yt,i=On(g=>g.conversationId),a=Me(g=>g.messages)[i??""]??[],o=Me(g=>g.setState),s=Me(g=>g.client),l=Me(g=>g.messageContainerRef),c=Me(g=>g.isTyping),u=Me(g=>g.setIsTyping),f=Me(g=>g.headerMessage),d=D.useMemo(()=>VR(a),[a]),[p,h]=D.useState(!0),{y:m}=Z6(l),y=D.useCallback(()=>{if(!l.current)return;const{scrollHeight:g}=l.current;p&&l.current.scrollTo({top:g})},[]);D.useEffect(()=>s==null?void 0:s.on("isTyping",({isTyping:g,timeout:b})=>{u(g,b)}),[]),D.useEffect(()=>{const g=a[a.length-1];o({disableComposer:!!(g!=null&&g.disableInput)})},[a.length]),D.useEffect(()=>{if(!l.current)return;const{offsetHeight:g,scrollHeight:b,scrollTop:k}=l.current;h(b<=k+g+100)},[m]);const v=e!=null&&e.icon?e==null?void 0:e.icon:wU;return C.jsxs(dy,{...n,className:Gp(r.container.className,t),followButtonClassName:"bpHidden",scrollViewClassName:r.viewPort.className,children:[f&&C.jsx("span",{...r.headerMessage,children:f}),C.jsx(tZ,{}),d.map(g=>C.jsx(Nm,{scroll:y,...g},g.id)),c&&C.jsx(Nm,{scroll:y,direction:"incoming",children:C.jsx(kk,{})}),C.jsx("li",{"data-is-at-bottom":p,...r.scrollDownButton.container,children:C.jsxs(Qde,{children:[(e==null?void 0:e.text)??"Back"," ",C.jsx(v,{...r.scrollDownButton.icon})]})})]})}),Qde=e=>{const[t]=$T(),n=Xde(),{messageList:{scrollDownButton:r}}=yt;return!t&&C.jsx("button",{type:"button",...r.button,onClick:()=>n(),...e})},epe=()=>{const{color:e,fontFamily:t,radius:n,themeMode:r,variant:i}=eS(),a=D.useMemo(()=>yb({color:e,fontFamily:t,radius:n,themeMode:r,variant:i}),[e,t,n,r,i]);return C.jsxs(C.Fragment,{children:[C.jsxs(yk,{children:[C.jsx(_k,{}),C.jsx(VI,{}),C.jsx(qS,{})]}),C.jsx("style",{children:a})]})};Pe.Avatar=ad,Pe.Block=Xa,Pe.Composer=qS,Pe.Container=yk,Pe.Fab=K8,Pe.Header=_k,Pe.Message=Nm,Pe.MessageList=VI,Pe.Modal=Ti,Pe.ModalProvider=WS,Pe.RestartConversation=Ek,Pe.TypingIndicator=kk,Pe.Webchat=epe,Pe.WebchatProvider=xV,Pe.WebchatThemeSchema=id,Pe.__adapters=sR,Pe.avatarThemeSchema=Bl,Pe.blockThemeSchema=pb,Pe.configPropsSchema=gb,Pe.configurationSchema=ub,Pe.cssStyleSchema=db,Pe.descriptionItemSchema=ya,Pe.fileTypes=i1,Pe.generateThemeStylesheet=yb,Pe.getClient=l1,Pe.initPropsSchema=VA,Pe.isFileType=a1,Pe.markdownTypeSchema=fb,Pe.renderers=DS,Pe.statePropsSchema=mb,Pe.styleOptionSchema=fe,Pe.themeSchema=hb,Pe.useClient=K4,Pe.useWebchatStore=Me,Pe.userPropsSchema=vb,Pe.webchatClasses=yt,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})});
|
|
351
|
+
*/var ng,xT;function dre(){if(xT)return ng;xT=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(o).map(function(u){return o[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ng=i()?Object.assign:function(a,o){for(var s,l=r(a),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);if(e){c=e(s);for(var d=0;d<c.length;d++)n.call(s,c[d])&&(l[c[d]]=s[c[d]])}}return l},ng}var rg,wT;function ig(){if(wT)return rg;wT=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return rg=e,rg}var ag,ST;function pre(){if(ST)return ag;ST=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ig(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(a){var o="Warning: "+a;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function i(a,o,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in a)if(r(a,u)){var f;try{if(typeof a[u]!="function"){var d=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[u]+"`.");throw d.name="Invariant Violation",d}f=a[u](o,u,l,s,null,t)}catch(h){f=h}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var p=c?c():"";e("Failed "+s+" type: "+f.message+(p??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ag=i,ag}var og,ET;function hre(){if(ET)return og;ET=1;var e=bT(),t=dre(),n=ig(),r=pre(),i=Function.call.bind(Object.prototype.hasOwnProperty),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function o(){return null}return og=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(A){var x=A&&(c&&A[c]||A[u]);if(typeof x=="function")return x}var d="<<anonymous>>",p={array:v("array"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:g(),arrayOf:b,element:k(),elementType:S(),instanceOf:_,node:O(),objectOf:j,oneOf:$,oneOfType:z,shape:N,exact:W};function h(A,x){return A===x?A!==0||1/A===1/x:A!==A&&x!==x}function m(A){this.message=A,this.stack=""}m.prototype=Error.prototype;function y(A){if(process.env.NODE_ENV!=="production")var x={},q=0;function K(Q,oe,ne,le,pe,he,ce){if(le=le||d,he=he||ne,ce!==n){if(l){var X=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw X.name="Invariant Violation",X}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Z=le+":"+ne;!x[Z]&&q<3&&(a("You are manually calling a React.PropTypes validation function for the `"+he+"` prop on `"+le+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),x[Z]=!0,q++)}}return oe[ne]==null?Q?oe[ne]===null?new m("The "+pe+" `"+he+"` is marked as required "+("in `"+le+"`, but its value is `null`.")):new m("The "+pe+" `"+he+"` is marked as required in "+("`"+le+"`, but its value is `undefined`.")):null:A(oe,ne,le,pe,he)}var E=K.bind(null,!1);return E.isRequired=K.bind(null,!0),E}function v(A){function x(q,K,E,Q,oe,ne){var le=q[K],pe=M(le);if(pe!==A){var he=I(le);return new m("Invalid "+Q+" `"+oe+"` of type "+("`"+he+"` supplied to `"+E+"`, expected ")+("`"+A+"`."))}return null}return y(x)}function g(){return y(o)}function b(A){function x(q,K,E,Q,oe){if(typeof A!="function")return new m("Property `"+oe+"` of component `"+E+"` has invalid PropType notation inside arrayOf.");var ne=q[K];if(!Array.isArray(ne)){var le=M(ne);return new m("Invalid "+Q+" `"+oe+"` of type "+("`"+le+"` supplied to `"+E+"`, expected an array."))}for(var pe=0;pe<ne.length;pe++){var he=A(ne,pe,E,Q,oe+"["+pe+"]",n);if(he instanceof Error)return he}return null}return y(x)}function k(){function A(x,q,K,E,Q){var oe=x[q];if(!s(oe)){var ne=M(oe);return new m("Invalid "+E+" `"+Q+"` of type "+("`"+ne+"` supplied to `"+K+"`, expected a single ReactElement."))}return null}return y(A)}function S(){function A(x,q,K,E,Q){var oe=x[q];if(!e.isValidElementType(oe)){var ne=M(oe);return new m("Invalid "+E+" `"+Q+"` of type "+("`"+ne+"` supplied to `"+K+"`, expected a single ReactElement type."))}return null}return y(A)}function _(A){function x(q,K,E,Q,oe){if(!(q[K]instanceof A)){var ne=A.name||d,le=B(q[K]);return new m("Invalid "+Q+" `"+oe+"` of type "+("`"+le+"` supplied to `"+E+"`, expected ")+("instance of `"+ne+"`."))}return null}return y(x)}function $(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),o;function x(q,K,E,Q,oe){for(var ne=q[K],le=0;le<A.length;le++)if(h(ne,A[le]))return null;var pe=JSON.stringify(A,function(ce,X){var Z=I(X);return Z==="symbol"?String(X):X});return new m("Invalid "+Q+" `"+oe+"` of value `"+String(ne)+"` "+("supplied to `"+E+"`, expected one of "+pe+"."))}return y(x)}function j(A){function x(q,K,E,Q,oe){if(typeof A!="function")return new m("Property `"+oe+"` of component `"+E+"` has invalid PropType notation inside objectOf.");var ne=q[K],le=M(ne);if(le!=="object")return new m("Invalid "+Q+" `"+oe+"` of type "+("`"+le+"` supplied to `"+E+"`, expected an object."));for(var pe in ne)if(i(ne,pe)){var he=A(ne,pe,E,Q,oe+"."+pe,n);if(he instanceof Error)return he}return null}return y(x)}function z(A){if(!Array.isArray(A))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var x=0;x<A.length;x++){var q=A[x];if(typeof q!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+H(q)+" at index "+x+"."),o}function K(E,Q,oe,ne,le){for(var pe=0;pe<A.length;pe++){var he=A[pe];if(he(E,Q,oe,ne,le,n)==null)return null}return new m("Invalid "+ne+" `"+le+"` supplied to "+("`"+oe+"`."))}return y(K)}function O(){function A(x,q,K,E,Q){return L(x[q])?null:new m("Invalid "+E+" `"+Q+"` supplied to "+("`"+K+"`, expected a ReactNode."))}return y(A)}function N(A){function x(q,K,E,Q,oe){var ne=q[K],le=M(ne);if(le!=="object")return new m("Invalid "+Q+" `"+oe+"` of type `"+le+"` "+("supplied to `"+E+"`, expected `object`."));for(var pe in A){var he=A[pe];if(he){var ce=he(ne,pe,E,Q,oe+"."+pe,n);if(ce)return ce}}return null}return y(x)}function W(A){function x(q,K,E,Q,oe){var ne=q[K],le=M(ne);if(le!=="object")return new m("Invalid "+Q+" `"+oe+"` of type `"+le+"` "+("supplied to `"+E+"`, expected `object`."));var pe=t({},q[K],A);for(var he in pe){var ce=A[he];if(!ce)return new m("Invalid "+Q+" `"+oe+"` key `"+he+"` supplied to `"+E+"`.\nBad object: "+JSON.stringify(q[K],null," ")+`
|
|
352
|
+
Valid keys: `+JSON.stringify(Object.keys(A),null," "));var X=ce(ne,he,E,Q,oe+"."+he,n);if(X)return X}return null}return y(x)}function L(A){switch(typeof A){case"number":case"string":case"undefined":return!0;case"boolean":return!A;case"object":if(Array.isArray(A))return A.every(L);if(A===null||s(A))return!0;var x=f(A);if(x){var q=x.call(A),K;if(x!==A.entries){for(;!(K=q.next()).done;)if(!L(K.value))return!1}else for(;!(K=q.next()).done;){var E=K.value;if(E&&!L(E[1]))return!1}}else return!1;return!0;default:return!1}}function U(A,x){return A==="symbol"?!0:x?x["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&x instanceof Symbol:!1}function M(A){var x=typeof A;return Array.isArray(A)?"array":A instanceof RegExp?"object":U(x,A)?"symbol":x}function I(A){if(typeof A>"u"||A===null)return""+A;var x=M(A);if(x==="object"){if(A instanceof Date)return"date";if(A instanceof RegExp)return"regexp"}return x}function H(A){var x=I(A);switch(x){case"array":case"object":return"an "+x;case"boolean":case"date":case"regexp":return"a "+x;default:return x}}function B(A){return!A.constructor||!A.constructor.name?d:A.constructor.name}return p.checkPropTypes=r,p.resetWarningCache=r.resetWarningCache,p.PropTypes=p,p},og}var sg,_T;function mre(){if(_T)return sg;_T=1;var e=ig();function t(){}function n(){}return n.resetWarningCache=t,sg=function(){function r(o,s,l,c,u,f){if(f!==e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}r.isRequired=r;function i(){return r}var a={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},sg}if(process.env.NODE_ENV!=="production"){var vre=bT(),gre=!0;tg.exports=hre()(vre.isElement,gre)}else tg.exports=mre()();var yre=tg.exports;const at=Ze(yre);var lg=D.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});lg.displayName="ScrollToBottomFunctionContext";function kT(){return D.useContext(lg)}function bre(){var e=kT(),t=e.scrollToEnd;return t}var cg=D.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});cg.displayName="ScrollToBottomState1Context";var ug=D.createContext({animating:!1,animatingToEnd:!1,sticky:!0});ug.displayName="ScrollToBottomState2Context";var fg=D.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});fg.displayName="ScrollToBottomStateContext";var $T=[fg,cg,ug];function xre(e){return D.useContext($T[e]||$T[0])}function OT(){var e=xre(2),t=e.sticky;return[t]}var vf=D.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});vf.displayName="ScrollToBottomInternalContext";function wre(){return D.useContext(vf)}function dg(){var e=wre(),t=e.styleToClassName;return t}var Sre={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},pg=function(t){var n=t.children,r=t.className,i=OT(),a=Pr(i,1),o=a[0],s=dg()(Sre),l=bre();return!o&&D.createElement("button",{className:eg(s,(r||"")+""),onClick:l,type:"button"},n)};pg.defaultProps={children:void 0,className:""},pg.propTypes={children:at.any,className:at.string};var TT={exports:{}},Ere=vt,_re=yn,CT=ar.f;Ere({target:"Object",stat:!0,forced:Object.defineProperty!==CT,sham:!_re},{defineProperty:CT});var kre=Jt,IT=kre.Object,$re=TT.exports=function(t,n,r){return IT.defineProperty(t,n,r)};IT.defineProperty.sham&&($re.sham=!0);var Ore=TT.exports,Tre=Ore,RT=Tre,Cre=RT,Ire=Cre,Rre=Ire,Are=Rre,Pre=Are;const jre=Ze(Pre);var Nre=rl,Dre=Nre.f("iterator"),Mre=Dre,Lre=Mre,Fre=Lre,Bre=Fre,zre=Bre,Ure=zre,qre=Ure;const Wre=Ze(qre);function ul(e){"@babel/helpers - typeof";return ul=typeof yo=="function"&&typeof Wre=="symbol"?function(t){return typeof t}:function(t){return t&&typeof yo=="function"&&t.constructor===yo&&t!==yo.prototype?"symbol":typeof t},ul(e)}var Hre=rl,Vre=Hre.f("toPrimitive"),Zre=Vre,Kre=Zre,Gre=Kre,Yre=Gre,Jre=Yre,Xre=Jre,Qre=Xre;const eie=Ze(Qre);function tie(e,t){if(ul(e)!="object"||!e)return e;var n=e[eie];if(n!==void 0){var r=n.call(e,t||"default");if(ul(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nie(e){var t=tie(e,"string");return ul(t)=="symbol"?t:t+""}function rie(e,t,n){return(t=nie(t))in e?jre(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iie(e){if(c$(e))return Qv(e)}function aie(e){if(typeof yo<"u"&&rT(e)!=null||e["@@iterator"]!=null)return pT(e)}function oie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
353
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tt(e){return iie(e)||aie(e)||hT(e)||oie()}var gf=function(e){return e&&e.Math==Math&&e},Cn=gf(typeof globalThis=="object"&&globalThis)||gf(typeof window=="object"&&window)||gf(typeof self=="object"&&self)||gf(typeof ut=="object"&&ut)||function(){return this}()||Function("return this")(),hg={},sr=function(e){try{return!!e()}catch{return!0}},sie=sr,ca=!sie(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),AT={},PT={}.propertyIsEnumerable,jT=Object.getOwnPropertyDescriptor,lie=jT&&!PT.call({1:2},1);AT.f=lie?function(t){var n=jT(this,t);return!!n&&n.enumerable}:PT;var NT=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},cie={}.toString,mg=function(e){return cie.call(e).slice(8,-1)},uie=sr,fie=mg,die="".split,pie=uie(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return fie(e)=="String"?die.call(e,""):Object(e)}:Object,yf=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},hie=pie,mie=yf,vg=function(e){return hie(mie(e))},Un=function(e){return typeof e=="function"},vie=Un,fl=function(e){return typeof e=="object"?e!==null:vie(e)},gg=Cn,gie=Un,yie=function(e){return gie(e)?e:void 0},bf=function(e,t){return arguments.length<2?yie(gg[e]):gg[e]&&gg[e][t]},bie=bf,xie=bie("navigator","userAgent")||"",DT=Cn,yg=xie,MT=DT.process,LT=DT.Deno,FT=MT&&MT.versions||LT&<.version,BT=FT&&FT.v8,jr,xf;BT?(jr=BT.split("."),xf=jr[0]<4?1:jr[0]+jr[1]):yg&&(jr=yg.match(/Edge\/(\d+)/),(!jr||jr[1]>=74)&&(jr=yg.match(/Chrome\/(\d+)/),jr&&(xf=jr[1])));var wie=xf&&+xf,zT=wie,Sie=sr,UT=!!Object.getOwnPropertySymbols&&!Sie(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&zT&&zT<41}),Eie=UT,qT=Eie&&!Symbol.sham&&typeof Symbol.iterator=="symbol",_ie=Un,kie=bf,$ie=qT,WT=$ie?function(e){return typeof e=="symbol"}:function(e){var t=kie("Symbol");return _ie(t)&&Object(e)instanceof t},Oie=function(e){try{return String(e)}catch{return"Object"}},Tie=Un,Cie=Oie,Iie=function(e){if(Tie(e))return e;throw TypeError(Cie(e)+" is not a function")},Rie=Iie,HT=function(e,t){var n=e[t];return n==null?void 0:Rie(n)},bg=Un,xg=fl,Aie=function(e,t){var n,r;if(t==="string"&&bg(n=e.toString)&&!xg(r=n.call(e))||bg(n=e.valueOf)&&!xg(r=n.call(e))||t!=="string"&&bg(n=e.toString)&&!xg(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},VT={exports:{}},ZT=Cn,wg=function(e,t){try{Object.defineProperty(ZT,e,{value:t,configurable:!0,writable:!0})}catch{ZT[e]=t}return t},Pie=Cn,jie=wg,KT="__core-js_shared__",Nie=Pie[KT]||jie(KT,{}),Sg=Nie,GT=Sg;(VT.exports=function(e,t){return GT[e]||(GT[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Eg=VT.exports,Die=yf,YT=function(e){return Object(Die(e))},Mie=YT,Lie={}.hasOwnProperty,ua=Object.hasOwn||function(t,n){return Lie.call(Mie(t),n)},Fie=0,Bie=Math.random(),JT=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++Fie+Bie).toString(36)},zie=Cn,Uie=Eg,XT=ua,qie=JT,QT=UT,Wie=qT,dl=Uie("wks"),pl=zie.Symbol,Hie=Wie?pl:pl&&pl.withoutSetter||qie,hl=function(e){return(!XT(dl,e)||!(QT||typeof dl[e]=="string"))&&(QT&&XT(pl,e)?dl[e]=pl[e]:dl[e]=Hie("Symbol."+e)),dl[e]},eC=fl,tC=WT,Vie=HT,Zie=Aie,Kie=hl,Gie=Kie("toPrimitive"),Yie=function(e,t){if(!eC(e)||tC(e))return e;var n=Vie(e,Gie),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!eC(r)||tC(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),Zie(e,t)},Jie=Yie,Xie=WT,nC=function(e){var t=Jie(e,"string");return Xie(t)?t:String(t)},Qie=Cn,rC=fl,_g=Qie.document,eae=rC(_g)&&rC(_g.createElement),iC=function(e){return eae?_g.createElement(e):{}},tae=ca,nae=sr,rae=iC,aC=!tae&&!nae(function(){return Object.defineProperty(rae("div"),"a",{get:function(){return 7}}).a!=7}),iae=ca,aae=AT,oae=NT,sae=vg,lae=nC,cae=ua,uae=aC,oC=Object.getOwnPropertyDescriptor;hg.f=iae?oC:function(t,n){if(t=sae(t),n=lae(n),uae)try{return oC(t,n)}catch{}if(cae(t,n))return oae(!aae.f.call(t,n),t[n])};var ml={},fae=fl,Ai=function(e){if(fae(e))return e;throw TypeError(String(e)+" is not an object")},dae=ca,pae=aC,sC=Ai,hae=nC,lC=Object.defineProperty;ml.f=dae?lC:function(t,n,r){if(sC(t),n=hae(n),sC(r),pae)try{return lC(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var mae=ca,vae=ml,gae=NT,wf=mae?function(e,t,n){return vae.f(e,t,gae(1,n))}:function(e,t,n){return e[t]=n,e},cC={exports:{}},yae=Un,kg=Sg,bae=Function.toString;yae(kg.inspectSource)||(kg.inspectSource=function(e){return bae.call(e)});var uC=kg.inspectSource,xae=Cn,wae=Un,Sae=uC,fC=xae.WeakMap,Eae=wae(fC)&&/native code/.test(Sae(fC)),_ae=Eg,kae=JT,dC=_ae("keys"),pC=function(e){return dC[e]||(dC[e]=kae(e))},$g={},$ae=Eae,Oae=Cn,Tae=fl,Cae=wf,Og=ua,Tg=Sg,Iae=pC,Rae=$g,hC="Object already initialized",Aae=Oae.WeakMap,Sf,vl,Ef,Pae=function(e){return Ef(e)?vl(e):Sf(e,{})},jae=function(e){return function(t){var n;if(!Tae(t)||(n=vl(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if($ae||Tg.state){var fa=Tg.state||(Tg.state=new Aae),Nae=fa.get,mC=fa.has,Dae=fa.set;Sf=function(e,t){if(mC.call(fa,e))throw new TypeError(hC);return t.facade=e,Dae.call(fa,e,t),t},vl=function(e){return Nae.call(fa,e)||{}},Ef=function(e){return mC.call(fa,e)}}else{var bo=Iae("state");Rae[bo]=!0,Sf=function(e,t){if(Og(e,bo))throw new TypeError(hC);return t.facade=e,Cae(e,bo,t),t},vl=function(e){return Og(e,bo)?e[bo]:{}},Ef=function(e){return Og(e,bo)}}var vC={set:Sf,get:vl,has:Ef,enforce:Pae,getterFor:jae},Cg=ca,Mae=ua,gC=Function.prototype,Lae=Cg&&Object.getOwnPropertyDescriptor,Ig=Mae(gC,"name"),Fae=Ig&&(function(){}).name==="something",Bae=Ig&&(!Cg||Cg&&Lae(gC,"name").configurable),Rg={EXISTS:Ig,PROPER:Fae,CONFIGURABLE:Bae},zae=Cn,yC=Un,Uae=ua,bC=wf,qae=wg,Wae=uC,xC=vC,Hae=Rg.CONFIGURABLE,Vae=xC.get,Zae=xC.enforce,Kae=String(String).split("String");(cC.exports=function(e,t,n,r){var i=r?!!r.unsafe:!1,a=r?!!r.enumerable:!1,o=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,l;if(yC(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Uae(n,"name")||Hae&&n.name!==s)&&bC(n,"name",s),l=Zae(n),l.source||(l.source=Kae.join(typeof s=="string"?s:""))),e===zae){a?e[t]=n:qae(t,n);return}else i?!o&&e[t]&&(a=!0):delete e[t];a?e[t]=n:bC(e,t,n)})(Function.prototype,"toString",function(){return yC(this)&&Vae(this).source||Wae(this)});var gl=cC.exports,wC={},Gae=Math.ceil,Yae=Math.floor,_f=function(e){var t=+e;return t!==t||t===0?0:(t>0?Yae:Gae)(t)},Jae=_f,Xae=Math.max,Qae=Math.min,eoe=function(e,t){var n=Jae(e);return n<0?Xae(n+t,0):Qae(n,t)},toe=_f,noe=Math.min,SC=function(e){return e>0?noe(toe(e),9007199254740991):0},roe=SC,ioe=function(e){return roe(e.length)},aoe=vg,ooe=eoe,soe=ioe,EC=function(e){return function(t,n,r){var i=aoe(t),a=soe(i),o=ooe(r,a),s;if(e&&n!=n){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((e||o in i)&&i[o]===n)return e||o||0;return!e&&-1}},loe={includes:EC(!0),indexOf:EC(!1)},Ag=ua,coe=vg,uoe=loe.indexOf,foe=$g,_C=function(e,t){var n=coe(e),r=0,i=[],a;for(a in n)!Ag(foe,a)&&Ag(n,a)&&i.push(a);for(;t.length>r;)Ag(n,a=t[r++])&&(~uoe(i,a)||i.push(a));return i},Pg=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],doe=_C,poe=Pg,hoe=poe.concat("length","prototype");wC.f=Object.getOwnPropertyNames||function(t){return doe(t,hoe)};var kC={};kC.f=Object.getOwnPropertySymbols;var moe=bf,voe=wC,goe=kC,yoe=Ai,boe=moe("Reflect","ownKeys")||function(t){var n=voe.f(yoe(t)),r=goe.f;return r?n.concat(r(t)):n},xoe=ua,woe=boe,Soe=hg,Eoe=ml,_oe=function(e,t){for(var n=woe(t),r=Eoe.f,i=Soe.f,a=0;a<n.length;a++){var o=n[a];xoe(e,o)||r(e,o,i(t,o))}},koe=sr,$oe=Un,Ooe=/#|\.prototype\./,yl=function(e,t){var n=Coe[Toe(e)];return n==Roe?!0:n==Ioe?!1:$oe(t)?koe(t):!!t},Toe=yl.normalize=function(e){return String(e).replace(Ooe,".").toLowerCase()},Coe=yl.data={},Ioe=yl.NATIVE="N",Roe=yl.POLYFILL="P",Aoe=yl,jg=Cn,Poe=hg.f,joe=wf,Noe=gl,Doe=wg,Moe=_oe,Loe=Aoe,Foe=function(e,t){var n=e.target,r=e.global,i=e.stat,a,o,s,l,c,u;if(r?o=jg:i?o=jg[n]||Doe(n,{}):o=(jg[n]||{}).prototype,o)for(s in t){if(c=t[s],e.noTargetGet?(u=Poe(o,s),l=u&&u.value):l=o[s],a=Loe(r?s:n+(i?".":"#")+s,e.forced),!a&&l!==void 0){if(typeof c==typeof l)continue;Moe(c,l)}(e.sham||l&&l.sham)&&joe(c,"sham",!0),Noe(o,s,c,e)}},Boe=hl,zoe=Boe("toStringTag"),$C={};$C[zoe]="z";var Ng=String($C)==="[object z]",Uoe=Ng,qoe=Un,kf=mg,Woe=hl,Hoe=Woe("toStringTag"),Voe=kf(function(){return arguments}())=="Arguments",Zoe=function(e,t){try{return e[t]}catch{}},OC=Uoe?kf:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=Zoe(t=Object(e),Hoe))=="string"?n:Voe?kf(t):(r=kf(t))=="Object"&&qoe(t.callee)?"Arguments":r},Koe=OC,$f=function(e){if(Koe(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Goe=Ai,TC=function(){var e=Goe(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},Dg={},CC=sr,Yoe=Cn,IC=Yoe.RegExp;Dg.UNSUPPORTED_Y=CC(function(){var e=IC("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Dg.BROKEN_CARET=CC(function(){var e=IC("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var Joe=_C,Xoe=Pg,Qoe=Object.keys||function(t){return Joe(t,Xoe)},ese=ca,tse=ml,nse=Ai,rse=Qoe,ise=ese?Object.defineProperties:function(t,n){nse(t);for(var r=rse(n),i=r.length,a=0,o;i>a;)tse.f(t,o=r[a++],n[o]);return t},ase=bf,ose=ase("document","documentElement"),sse=Ai,lse=ise,RC=Pg,cse=$g,use=ose,fse=iC,dse=pC,AC=">",PC="<",Mg="prototype",Lg="script",jC=dse("IE_PROTO"),Fg=function(){},NC=function(e){return PC+Lg+AC+e+PC+"/"+Lg+AC},DC=function(e){e.write(NC("")),e.close();var t=e.parentWindow.Object;return e=null,t},pse=function(){var e=fse("iframe"),t="java"+Lg+":",n;return e.style.display="none",use.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(NC("document.F=Object")),n.close(),n.F},Of,Tf=function(){try{Of=new ActiveXObject("htmlfile")}catch{}Tf=typeof document<"u"?document.domain&&Of?DC(Of):pse():DC(Of);for(var e=RC.length;e--;)delete Tf[Mg][RC[e]];return Tf()};cse[jC]=!0;var hse=Object.create||function(t,n){var r;return t!==null?(Fg[Mg]=sse(t),r=new Fg,Fg[Mg]=null,r[jC]=t):r=Tf(),n===void 0?r:lse(r,n)},mse=sr,vse=Cn,gse=vse.RegExp,yse=mse(function(){var e=gse(".","s");return!(e.dotAll&&e.exec(`
|
|
354
|
+
`)&&e.flags==="s")}),bse=sr,xse=Cn,wse=xse.RegExp,Sse=bse(function(){var e=wse("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Ese=$f,_se=TC,MC=Dg,kse=Eg,$se=hse,Ose=vC.get,Tse=yse,Cse=Sse,Cf=RegExp.prototype.exec,Ise=kse("native-string-replace",String.prototype.replace),Bg=Cf,zg=function(){var e=/a/,t=/b*/g;return Cf.call(e,"a"),Cf.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),LC=MC.UNSUPPORTED_Y||MC.BROKEN_CARET,Ug=/()??/.exec("")[1]!==void 0,Rse=zg||Ug||LC||Tse||Cse;Rse&&(Bg=function(t){var n=this,r=Ose(n),i=Ese(t),a=r.raw,o,s,l,c,u,f,d;if(a)return a.lastIndex=n.lastIndex,o=Bg.call(a,i),n.lastIndex=a.lastIndex,o;var p=r.groups,h=LC&&n.sticky,m=_se.call(n),y=n.source,v=0,g=i;if(h&&(m=m.replace("y",""),m.indexOf("g")===-1&&(m+="g"),g=i.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&i.charAt(n.lastIndex-1)!==`
|
|
355
|
+
`)&&(y="(?: "+y+")",g=" "+g,v++),s=new RegExp("^(?:"+y+")",m)),Ug&&(s=new RegExp("^"+y+"$(?!\\s)",m)),zg&&(l=n.lastIndex),c=Cf.call(h?s:n,g),h?c?(c.input=c.input.slice(v),c[0]=c[0].slice(v),c.index=n.lastIndex,n.lastIndex+=c[0].length):n.lastIndex=0:zg&&c&&(n.lastIndex=n.global?c.index+c[0].length:l),Ug&&c&&c.length>1&&Ise.call(c[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(c[u]=void 0)}),c&&p)for(c.groups=f=$se(null),u=0;u<p.length;u++)d=p[u],f[d[0]]=c[d[1]];return c});var qg=Bg,Ase=Foe,FC=qg;Ase({target:"RegExp",proto:!0,forced:/./.exec!==FC},{exec:FC});var BC=gl,Pse=qg,zC=sr,UC=hl,jse=wf,Nse=UC("species"),Wg=RegExp.prototype,Dse=function(e,t,n,r){var i=UC(e),a=!zC(function(){var c={};return c[i]=function(){return 7},""[e](c)!=7}),o=a&&!zC(function(){var c=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[Nse]=function(){return u},u.flags="",u[i]=/./[i]),u.exec=function(){return c=!0,null},u[i](""),!c});if(!a||!o||n){var s=/./[i],l=t(i,""[e],function(c,u,f,d,p){var h=u.exec;return h===Pse||h===Wg.exec?a&&!p?{done:!0,value:s.call(u,f,d)}:{done:!0,value:c.call(f,u,d)}:{done:!1}});BC(String.prototype,e,l[0]),BC(Wg,i,l[1])}r&&jse(Wg[i],"sham",!0)},Mse=_f,Lse=$f,Fse=yf,qC=function(e){return function(t,n){var r=Lse(Fse(t)),i=Mse(n),a=r.length,o,s;return i<0||i>=a?e?"":void 0:(o=r.charCodeAt(i),o<55296||o>56319||i+1===a||(s=r.charCodeAt(i+1))<56320||s>57343?e?r.charAt(i):o:e?r.slice(i,i+2):(o-55296<<10)+(s-56320)+65536)}},Bse={codeAt:qC(!1),charAt:qC(!0)},zse=Bse.charAt,Use=function(e,t,n){return t+(n?zse(e,t).length:1)},qse=YT,Wse=Math.floor,Hse="".replace,Vse=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Zse=/\$([$&'`]|\d{1,2})/g,Kse=function(e,t,n,r,i,a){var o=n+e.length,s=r.length,l=Zse;return i!==void 0&&(i=qse(i),l=Vse),Hse.call(a,l,function(c,u){var f;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(o);case"<":f=i[u.slice(1,-1)];break;default:var d=+u;if(d===0)return c;if(d>s){var p=Wse(d/10);return p===0?c:p<=s?r[p-1]===void 0?u.charAt(1):r[p-1]+u.charAt(1):c}f=r[d-1]}return f===void 0?"":f})},Gse=Ai,Yse=Un,Jse=mg,Xse=qg,Qse=function(e,t){var n=e.exec;if(Yse(n)){var r=n.call(e,t);return r!==null&&Gse(r),r}if(Jse(e)==="RegExp")return Xse.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},ele=Dse,tle=sr,nle=Ai,rle=Un,ile=_f,ale=SC,xo=$f,ole=yf,sle=Use,lle=HT,cle=Kse,ule=Qse,fle=hl,Hg=fle("replace"),dle=Math.max,ple=Math.min,hle=function(e){return e===void 0?e:String(e)},mle=function(){return"a".replace(/./,"$0")==="$0"}(),WC=function(){return/./[Hg]?/./[Hg]("a","$0")==="":!1}(),vle=!tle(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});ele("replace",function(e,t,n){var r=WC?"$":"$0";return[function(a,o){var s=ole(this),l=a==null?void 0:lle(a,Hg);return l?l.call(a,s,o):t.call(xo(s),a,o)},function(i,a){var o=nle(this),s=xo(i);if(typeof a=="string"&&a.indexOf(r)===-1&&a.indexOf("$<")===-1){var l=n(t,o,s,a);if(l.done)return l.value}var c=rle(a);c||(a=xo(a));var u=o.global;if(u){var f=o.unicode;o.lastIndex=0}for(var d=[];;){var p=ule(o,s);if(p===null||(d.push(p),!u))break;var h=xo(p[0]);h===""&&(o.lastIndex=sle(s,ale(o.lastIndex),f))}for(var m="",y=0,v=0;v<d.length;v++){p=d[v];for(var g=xo(p[0]),b=dle(ple(ile(p.index),s.length),0),k=[],S=1;S<p.length;S++)k.push(hle(p[S]));var _=p.groups;if(c){var $=[g].concat(k,b,s);_!==void 0&&$.push(_);var j=xo(a.apply(void 0,$))}else j=cle(g,s,b,k,_,a);b>=y&&(m+=s.slice(y,b)+j,y=b+g.length)}return m+s.slice(y)}]},!vle||!mle||WC);var bl=Bt,gle=Hm,yle=ia,If=function(e){return gle.slice(0,e.length)===e},ble=function(){return If("Bun/")?"BUN":If("Cloudflare-Workers")?"CLOUDFLARE":If("Deno/")?"DENO":If("Node.js/")?"NODE":bl.Bun&&typeof Bun.version=="string"?"BUN":bl.Deno&&typeof Deno.version=="object"?"DENO":yle(bl.process)==="process"?"NODE":bl.window&&bl.document?"BROWSER":"REST"}(),xle=TypeError,wle=function(e,t){if(e<t)throw new xle("Not enough arguments");return e},HC=Bt,Sle=Dm,Ele=on,_le=ble,kle=Hm,$le=Qu,Ole=wle,Tle=HC.Function,Cle=/MSIE .\./.test(kle)||_le==="BUN"&&function(){var e=HC.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),VC=function(e,t){var n=t?2:1;return Cle?function(r,i){var a=Ole(arguments.length,1)>n,o=Ele(r)?r:Tle(r),s=a?$le(arguments,n):[],l=a?function(){Sle(o,this,s)}:o;return t?e(l,i):e(l)}:e},Ile=vt,ZC=Bt,Rle=VC,KC=Rle(ZC.setInterval,!0);Ile({global:!0,bind:!0,forced:ZC.setInterval!==KC},{setInterval:KC});var Ale=vt,GC=Bt,Ple=VC,YC=Ple(GC.setTimeout,!0);Ale({global:!0,bind:!0,forced:GC.setTimeout!==YC},{setTimeout:YC});var jle=Jt,Nle=jle.setInterval,Dle=Nle;const Mle=Ze(Dle);var Lle=zt,JC=function(e,t){var n=[][e];return!!n&&Lle(function(){n.call(null,t||function(){return 1},1)})},Fle=vt,Ble=Lm,zle=w$.indexOf,Ule=JC,Vg=Ble([].indexOf),XC=!!Vg&&1/Vg([1],1,-0)<0,qle=XC||!Ule("indexOf");Fle({target:"Array",proto:!0,forced:qle},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return XC?Vg(this,t,n)||0:zle(this,t,n)}});var Wle=la,Hle=Wle("Array","indexOf"),Vle=Yr,Zle=Hle,Zg=Array.prototype,Kle=function(e){var t=e.indexOf;return e===Zg||Vle(Zg,e)&&t===Zg.indexOf?Zle:t},Gle=Kle,Yle=Gle,Jle=Yle;const Xle=Ze(Jle);var QC=Bu,Qle=TypeError,ece=function(e,t){if(!delete e[t])throw new Qle("Cannot delete property "+QC(t)+" of "+QC(e))},tce=vt,nce=Jr,rce=hv,ice=Wu,ace=aa,oce=iT,sce=lv,lce=pv,cce=Qs,Kg=ece,uce=Vu,fce=uce("splice"),dce=Math.max,pce=Math.min;tce({target:"Array",proto:!0,forced:!fce},{splice:function(t,n){var r=nce(this),i=ace(r),a=rce(t,i),o=arguments.length,s,l,c,u,f,d;for(o===0?s=l=0:o===1?(s=0,l=i-a):(s=o-2,l=pce(dce(ice(n),0),i-a)),sce(i+s-l),c=lce(r,l),u=0;u<l;u++)f=a+u,f in r&&cce(c,u,r[f]);if(c.length=l,s<l){for(u=a;u<i-l;u++)f=u+l,d=u+s,f in r?r[d]=r[f]:Kg(r,d);for(u=i;u>i-l+s;u--)Kg(r,u-1)}else if(s>l)for(u=i-l;u>a;u--)f=u+l-1,d=u+s-1,f in r?r[d]=r[f]:Kg(r,d);for(u=0;u<s;u++)r[u+a]=arguments[u+2];return oce(r,i-l+s),c}});var hce=la,mce=hce("Array","splice"),vce=Yr,gce=mce,Gg=Array.prototype,yce=function(e){var t=e.splice;return e===Gg||vce(Gg,e)&&t===Gg.splice?gce:t},bce=yce,xce=bce,wce=xce;const Sce=Ze(wce);var Ece=la,_ce=Ece("Array","concat"),kce=Yr,$ce=_ce,Yg=Array.prototype,Oce=function(e){var t=e.concat;return e===Yg||kce(Yg,e)&&t===Yg.concat?$ce:t},Tce=Oce,Cce=Tce,Ice=Cce;const kt=Ze(Ice);var Rce=vt,Ace=Nt,eI=Date,Pce=Ace(eI.prototype.getTime);Rce({target:"Date",stat:!0},{now:function(){return Pce(new eI)}});var jce=Jt,Nce=jce.Date.now,Dce=Nce,Mce=Dce,Lce=Mce;const Pi=Ze(Lce);var Fce=$v.forEach,Bce=JC,zce=Bce("forEach"),Uce=zce?[].forEach:function(t){return Fce(this,t,arguments.length>1?arguments[1]:void 0)},qce=vt,tI=Uce;qce({target:"Array",proto:!0,forced:[].forEach!==tI},{forEach:tI});var Wce=la,Hce=Wce("Array","forEach"),Vce=Hce,Zce=Vce,Kce=el,Gce=Tn,Yce=Yr,Jce=Zce,Jg=Array.prototype,Xce={DOMTokenList:!0,NodeList:!0},Qce=function(e){var t=e.forEach;return e===Jg||Yce(Jg,e)&&t===Jg.forEach||Gce(Xce,Kce(e))?Jce:t},eue=Qce;const Rf=Ze(eue);var tue=vt,nue=Jr,nI=gv,rue=zt,iue=rue(function(){nI(1)});tue({target:"Object",stat:!0,forced:iue},{keys:function(t){return nI(nue(t))}});var aue=Jt,oue=aue.Object.keys,sue=oue,lue=sue,cue=lue;const uue=Ze(cue);var fue=Jt,due=fue.Object.getOwnPropertySymbols,pue=due,hue=pue,mue=hue;const rI=Ze(mue);var vue=vt,gue=$v.filter,yue=Vu,bue=yue("filter");vue({target:"Array",proto:!0,forced:!bue},{filter:function(t){return gue(this,t,arguments.length>1?arguments[1]:void 0)}});var xue=la,wue=xue("Array","filter"),Sue=Yr,Eue=wue,Xg=Array.prototype,_ue=function(e){var t=e.filter;return e===Xg||Sue(Xg,e)&&t===Xg.filter?Eue:t},kue=_ue,$ue=kue,Oue=$ue;const Tue=Ze(Oue);var iI={exports:{}},Cue=vt,Iue=zt,Rue=Ir,aI=Ks.f,oI=yn,Aue=!oI||Iue(function(){aI(1)});Cue({target:"Object",stat:!0,forced:Aue,sham:!oI},{getOwnPropertyDescriptor:function(t,n){return aI(Rue(t),n)}});var Pue=Jt,sI=Pue.Object,jue=iI.exports=function(t,n){return sI.getOwnPropertyDescriptor(t,n)};sI.getOwnPropertyDescriptor.sham&&(jue.sham=!0);var Nue=iI.exports,Due=Nue,Mue=Due,Lue=Mue;const lI=Ze(Lue);var Fue=Rr,Bue=Nt,zue=Xu,Uue=ef,que=Ci,Wue=Bue([].concat),Hue=Fue("Reflect","ownKeys")||function(t){var n=zue.f(que(t)),r=Uue.f;return r?Wue(n,r(t)):n},Vue=vt,Zue=yn,Kue=Hue,Gue=Ir,Yue=Ks,Jue=Qs;Vue({target:"Object",stat:!0,sham:!Zue},{getOwnPropertyDescriptors:function(t){for(var n=Gue(t),r=Yue.f,i=Kue(n),a={},o=0,s,l;i.length>o;)l=r(n,s=i[o++]),l!==void 0&&Jue(a,s,l);return a}});var Xue=Jt,Que=Xue.Object.getOwnPropertyDescriptors,efe=Que,tfe=efe,nfe=tfe;const cI=Ze(nfe);var uI={exports:{}},rfe=vt,ife=yn,fI=Zu.f;rfe({target:"Object",stat:!0,forced:Object.defineProperties!==fI,sham:!ife},{defineProperties:fI});var afe=Jt,dI=afe.Object,ofe=uI.exports=function(t,n){return dI.defineProperties(t,n)};dI.defineProperties.sham&&(ofe.sham=!0);var sfe=uI.exports,lfe=sfe,cfe=lfe,ufe=cfe;const ffe=Ze(ufe);var dfe=RT;const pfe=Ze(dfe);var hfe=!1;function mfe(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function vfe(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var gfe=function(){function e(n){var r=this;this._insertTag=function(i){var a;r.tags.length===0?r.insertionPoint?a=r.insertionPoint.nextSibling:r.prepend?a=r.container.firstChild:a=r.before:a=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,a),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!hfe:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(vfe(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=mfe(i);try{a.insertRule(r,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e}(),sn="-ms-",Af="-moz-",st="-webkit-",pI="comm",Qg="rule",ey="decl",yfe="@import",hI="@keyframes",bfe="@layer",xfe=Math.abs,Pf=String.fromCharCode,wfe=Object.assign;function Sfe(e,t){return Xt(e,0)^45?(((t<<2^Xt(e,0))<<2^Xt(e,1))<<2^Xt(e,2))<<2^Xt(e,3):0}function mI(e){return e.trim()}function Efe(e,t){return(e=t.exec(e))?e[0]:e}function lt(e,t,n){return e.replace(t,n)}function ty(e,t){return e.indexOf(t)}function Xt(e,t){return e.charCodeAt(t)|0}function xl(e,t,n){return e.slice(t,n)}function Nr(e){return e.length}function ny(e){return e.length}function jf(e,t){return t.push(e),e}function _fe(e,t){return e.map(t).join("")}var Nf=1,wo=1,vI=0,xn=0,Dt=0,So="";function Df(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:Nf,column:wo,length:o,return:""}}function wl(e,t){return wfe(Df("",null,null,"",null,null,0),e,{length:-e.length},t)}function kfe(){return Dt}function $fe(){return Dt=xn>0?Xt(So,--xn):0,wo--,Dt===10&&(wo=1,Nf--),Dt}function In(){return Dt=xn<vI?Xt(So,xn++):0,wo++,Dt===10&&(wo=1,Nf++),Dt}function Dr(){return Xt(So,xn)}function Mf(){return xn}function Sl(e,t){return xl(So,e,t)}function El(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function gI(e){return Nf=wo=1,vI=Nr(So=e),xn=0,[]}function yI(e){return So="",e}function Lf(e){return mI(Sl(xn-1,ry(e===91?e+2:e===40?e+1:e)))}function Ofe(e){for(;(Dt=Dr())&&Dt<33;)In();return El(e)>2||El(Dt)>3?"":" "}function Tfe(e,t){for(;--t&&In()&&!(Dt<48||Dt>102||Dt>57&&Dt<65||Dt>70&&Dt<97););return Sl(e,Mf()+(t<6&&Dr()==32&&In()==32))}function ry(e){for(;In();)switch(Dt){case e:return xn;case 34:case 39:e!==34&&e!==39&&ry(Dt);break;case 40:e===41&&ry(e);break;case 92:In();break}return xn}function Cfe(e,t){for(;In()&&e+Dt!==57;)if(e+Dt===84&&Dr()===47)break;return"/*"+Sl(t,xn-1)+"*"+Pf(e===47?e:In())}function Ife(e){for(;!El(Dr());)In();return Sl(e,xn)}function Rfe(e){return yI(Ff("",null,null,null,[""],e=gI(e),0,[0],e))}function Ff(e,t,n,r,i,a,o,s,l){for(var c=0,u=0,f=o,d=0,p=0,h=0,m=1,y=1,v=1,g=0,b="",k=i,S=a,_=r,$=b;y;)switch(h=g,g=In()){case 40:if(h!=108&&Xt($,f-1)==58){ty($+=lt(Lf(g),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:$+=Lf(g);break;case 9:case 10:case 13:case 32:$+=Ofe(h);break;case 92:$+=Tfe(Mf()-1,7);continue;case 47:switch(Dr()){case 42:case 47:jf(Afe(Cfe(In(),Mf()),t,n),l);break;default:$+="/"}break;case 123*m:s[c++]=Nr($)*v;case 125*m:case 59:case 0:switch(g){case 0:case 125:y=0;case 59+u:v==-1&&($=lt($,/\f/g,"")),p>0&&Nr($)-f&&jf(p>32?xI($+";",r,n,f-1):xI(lt($," ","")+";",r,n,f-2),l);break;case 59:$+=";";default:if(jf(_=bI($,t,n,c,u,i,s,b,k=[],S=[],f),a),g===123)if(u===0)Ff($,t,_,_,k,a,f,s,S);else switch(d===99&&Xt($,3)===110?100:d){case 100:case 108:case 109:case 115:Ff(e,_,_,r&&jf(bI(e,_,_,0,0,i,s,b,i,k=[],f),S),i,S,f,s,r?k:S);break;default:Ff($,_,_,_,[""],S,0,s,S)}}c=u=p=0,m=v=1,b=$="",f=o;break;case 58:f=1+Nr($),p=h;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&$fe()==125)continue}switch($+=Pf(g),g*m){case 38:v=u>0?1:($+="\f",-1);break;case 44:s[c++]=(Nr($)-1)*v,v=1;break;case 64:Dr()===45&&($+=Lf(In())),d=Dr(),u=f=Nr(b=$+=Ife(Mf())),g++;break;case 45:h===45&&Nr($)==2&&(m=0)}}return a}function bI(e,t,n,r,i,a,o,s,l,c,u){for(var f=i-1,d=i===0?a:[""],p=ny(d),h=0,m=0,y=0;h<r;++h)for(var v=0,g=xl(e,f+1,f=xfe(m=o[h])),b=e;v<p;++v)(b=mI(m>0?d[v]+" "+g:lt(g,/&\f/g,d[v])))&&(l[y++]=b);return Df(e,t,n,i===0?Qg:s,l,c,u)}function Afe(e,t,n){return Df(e,t,n,pI,Pf(kfe()),xl(e,2,-2),0)}function xI(e,t,n,r){return Df(e,t,n,ey,xl(e,0,r),xl(e,r+1,-1),r)}function Eo(e,t){for(var n="",r=ny(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function Pfe(e,t,n,r){switch(e.type){case bfe:if(e.children.length)break;case yfe:case ey:return e.return=e.return||e.value;case pI:return"";case hI:return e.return=e.value+"{"+Eo(e.children,r)+"}";case Qg:e.value=e.props.join(",")}return Nr(n=Eo(e.children,r))?e.return=e.value+"{"+n+"}":""}function jfe(e){var t=ny(e);return function(n,r,i,a){for(var o="",s=0;s<t;s++)o+=e[s](n,r,i,a)||"";return o}}function Nfe(e){return function(t){t.root||(t=t.return)&&e(t)}}function Dfe(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Mfe=function(t,n,r){for(var i=0,a=0;i=a,a=Dr(),i===38&&a===12&&(n[r]=1),!El(a);)In();return Sl(t,xn)},Lfe=function(t,n){var r=-1,i=44;do switch(El(i)){case 0:i===38&&Dr()===12&&(n[r]=1),t[r]+=Mfe(xn-1,n,r);break;case 2:t[r]+=Lf(i);break;case 4:if(i===44){t[++r]=Dr()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Pf(i)}while(i=In());return t},Ffe=function(t,n){return yI(Lfe(gI(t),n))},wI=new WeakMap,Bfe=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!wI.get(r))&&!i){wI.set(t,!0);for(var a=[],o=Ffe(n,a),s=r.props,l=0,c=0;l<o.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=a[l]?o[l].replace(/&\f/g,s[u]):s[u]+" "+o[l]}}},zfe=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function SI(e,t){switch(Sfe(e,t)){case 5103:return st+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return st+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return st+e+Af+e+sn+e+e;case 6828:case 4268:return st+e+sn+e+e;case 6165:return st+e+sn+"flex-"+e+e;case 5187:return st+e+lt(e,/(\w+).+(:[^]+)/,st+"box-$1$2"+sn+"flex-$1$2")+e;case 5443:return st+e+sn+"flex-item-"+lt(e,/flex-|-self/,"")+e;case 4675:return st+e+sn+"flex-line-pack"+lt(e,/align-content|flex-|-self/,"")+e;case 5548:return st+e+sn+lt(e,"shrink","negative")+e;case 5292:return st+e+sn+lt(e,"basis","preferred-size")+e;case 6060:return st+"box-"+lt(e,"-grow","")+st+e+sn+lt(e,"grow","positive")+e;case 4554:return st+lt(e,/([^-])(transform)/g,"$1"+st+"$2")+e;case 6187:return lt(lt(lt(e,/(zoom-|grab)/,st+"$1"),/(image-set)/,st+"$1"),e,"")+e;case 5495:case 3959:return lt(e,/(image-set\([^]*)/,st+"$1$`$1");case 4968:return lt(lt(e,/(.+:)(flex-)?(.*)/,st+"box-pack:$3"+sn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+st+e+e;case 4095:case 3583:case 4068:case 2532:return lt(e,/(.+)-inline(.+)/,st+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Nr(e)-1-t>6)switch(Xt(e,t+1)){case 109:if(Xt(e,t+4)!==45)break;case 102:return lt(e,/(.+:)(.+)-([^]+)/,"$1"+st+"$2-$3$1"+Af+(Xt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ty(e,"stretch")?SI(lt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Xt(e,t+1)!==115)break;case 6444:switch(Xt(e,Nr(e)-3-(~ty(e,"!important")&&10))){case 107:return lt(e,":",":"+st)+e;case 101:return lt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+st+(Xt(e,14)===45?"inline-":"")+"box$3$1"+st+"$2$3$1"+sn+"$2box$3")+e}break;case 5936:switch(Xt(e,t+11)){case 114:return st+e+sn+lt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return st+e+sn+lt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return st+e+sn+lt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return st+e+sn+e+e}return e}var Ufe=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case ey:t.return=SI(t.value,t.length);break;case hI:return Eo([wl(t,{value:lt(t.value,"@","@"+st)})],i);case Qg:if(t.length)return _fe(t.props,function(a){switch(Efe(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Eo([wl(t,{props:[lt(a,/:(read-\w+)/,":"+Af+"$1")]})],i);case"::placeholder":return Eo([wl(t,{props:[lt(a,/:(plac\w+)/,":"+st+"input-$1")]}),wl(t,{props:[lt(a,/:(plac\w+)/,":"+Af+"$1")]}),wl(t,{props:[lt(a,/:(plac\w+)/,sn+"input-$1")]})],i)}return""})}},qfe=[Ufe],Wfe=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var y=m.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=t.stylisPlugins||qfe,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var y=m.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)a[y[v]]=!0;s.push(m)});var l,c=[Bfe,zfe];{var u,f=[Pfe,Nfe(function(m){u.insert(m)})],d=jfe(c.concat(i,f)),p=function(y){return Eo(Rfe(y),d)};l=function(y,v,g,b){u=g,p(y?y+"{"+v.styles+"}":v.styles),b&&(h.inserted[v.name]=!0)}}var h={key:n,sheet:new gfe({key:n,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:l};return h.sheet.hydrate(s),h};function Hfe(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Vfe={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Zfe=!1,Kfe=/[A-Z]|^ms/g,Gfe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,EI=function(t){return t.charCodeAt(1)===45},_I=function(t){return t!=null&&typeof t!="boolean"},iy=Dfe(function(e){return EI(e)?e:e.replace(Kfe,"-$&").toLowerCase()}),kI=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Gfe,function(r,i,a){return ji={name:i,styles:a,next:ji},i})}return Vfe[t]!==1&&!EI(t)&&typeof n=="number"&&n!==0?n+"px":n},Yfe="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Bf(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var i=n;if(i.anim===1)return ji={name:i.name,styles:i.styles,next:ji},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)ji={name:o.name,styles:o.styles,next:ji},o=o.next;var s=a.styles+";";return s}return Jfe(e,t,n)}}var l=n;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function Jfe(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=Bf(e,t,n[i])+";";else for(var a in n){var o=n[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?r+=a+"{"+t[s]+"}":_I(s)&&(r+=iy(a)+":"+kI(a,s)+";")}else{if(a==="NO_COMPONENT_SELECTOR"&&Zfe)throw new Error(Yfe);if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var l=0;l<o.length;l++)_I(o[l])&&(r+=iy(a)+":"+kI(a,o[l])+";");else{var c=Bf(e,t,o);switch(a){case"animation":case"animationName":{r+=iy(a)+":"+c+";";break}default:r+=a+"{"+c+"}"}}}}return r}var $I=/label:\s*([^\s;{]+)\s*(;|$)/g,ji;function ay(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i="";ji=void 0;var a=e[0];if(a==null||a.raw===void 0)r=!1,i+=Bf(n,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=Bf(n,t,e[s]),r){var l=a;i+=l[s]}$I.lastIndex=0;for(var c="",u;(u=$I.exec(i))!==null;)c+="-"+u[1];var f=Hfe(i)+c;return{name:f,styles:i,next:ji}}function OI(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var Xfe=function(t,n,r){var i=t.key+"-"+n.name;t.registered[i]===void 0&&(t.registered[i]=n.styles)},Qfe=function(t,n,r){Xfe(t,n);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var a=n;do t.insert(n===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function TI(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function CI(e,t,n){var r=[],i=OI(e,r,n);return r.length<2?n:i+t(r)}var ede=function(t){var n=Wfe(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=ay(c,n.registered,void 0);return Qfe(n,f),n.key+"-"+f.name},i=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=ay(c,n.registered),d="animation-"+f.name;return TI(n,{name:f.name,styles:"@keyframes "+d+"{"+f.styles+"}"}),d},a=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=ay(c,n.registered);TI(n,f)},o=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return CI(n.registered,r,tde(c))};return{css:r,cx:o,injectGlobal:a,keyframes:i,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:OI.bind(null,n.registered),merge:CI.bind(null,n.registered,r)}},tde=function e(t){for(var n="",r=0;r<t.length;r++){var i=t[r];if(i!=null){var a=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))a=e(i);else{a="";for(var o in i)i[o]&&o&&(a&&(a+=" "),a+=o)}break}default:a=i}a&&(n&&(n+=" "),n+=a)}}return n},nde=gl,oy=Date.prototype,II="Invalid Date",RI="toString",rde=oy[RI],ide=oy.getTime;String(new Date(NaN))!=II&&nde(oy,RI,function(){var t=ide.call(this);return t===t?rde.call(this):II});var ade=Ng,ode=OC,sde=ade?{}.toString:function(){return"[object "+ode(this)+"]"},lde=Ng,cde=gl,ude=sde;lde||cde(Object.prototype,"toString",ude,{unsafe:!0});var fde=Rg.PROPER,dde=gl,pde=Ai,AI=$f,hde=sr,mde=TC,sy="toString",PI=RegExp.prototype,jI=PI[sy],vde=hde(function(){return jI.call({source:"a",flags:"b"})!="/a/b"}),gde=fde&&jI.name!=sy;(vde||gde)&&dde(RegExp.prototype,sy,function(){var t=pde(this),n=AI(t.source),r=t.flags,i=AI(r===void 0&&t instanceof RegExp&&!("flags"in PI)?mde.call(t):r);return"/"+n+"/"+i},{unsafe:!0});var NI=typeof window<"u"?window:self,yde=NI.crypto||NI.msCrypto,bde=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(yde);const xde=Ze(bde);function wde(){return xde().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var Sde=l$;const DI=Ze(Sde);function ht(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function MI(e,t){for(var n,r,i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];return kt(n=[kt(r="%c".concat(e,"%c ")).call(r,t)]).call(n,tt(ht("green","white")),a)}function Ede(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];if(a.length){var s=a,l=Pr(s,1),c=l[0];typeof c=="function"&&(a=c());var u=DI(a[0])?a:[a],f=u.length===1;Rf(u).call(u,function(d,p){if(f){var h,m;(h=console).log.apply(h,tt(MI.apply(void 0,kt(m=[e]).call(m,tt(d)))))}else if(p){var y;(y=console).log.apply(y,tt(DI(d)?d:[d]))}else{var v,g;(v=console).groupCollapsed.apply(v,tt(MI.apply(void 0,kt(g=[e]).call(g,tt(d)))))}}),f||console.groupEnd()}}:function(){return 0}}var _de=ca,kde=Rg.EXISTS,$de=ml.f,LI=Function.prototype,Ode=LI.toString,Tde=/^\s*function ([^ (]*)/,Cde="name";_de&&!kde&&$de(LI,Cde,{configurable:!0,get:function(){try{return Ode.call(this).match(Tde)[1]}catch{return""}}});var Ide=Jt,Rde=Ide.setTimeout,Ade=Rde;const Pde=Ze(Ade);function jde(e,t){if(!t)return e;var n=0,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=Pi();s-n>t?(e.apply(void 0,a),n=s):(clearTimeout(r),r=Pde(function(){e.apply(void 0,a),n=Pi()},Math.max(0,t-s+n)))}}var FI=function(t){var n=t.debounce,r=t.name,i=t.onEvent,a=t.target,o=D.useRef();o.current=i;var s=D.useMemo(function(){return jde(function(c){var u=o.current;u&&u(c)},n)},[n,o]),l=D.useCallback(function(c){c.timeStampLow=Pi(),s(c)},[s]);return D.useLayoutEffect(function(){return a.addEventListener(r,l,{passive:!0}),l({target:a,type:r}),function(){return a.removeEventListener(r,l)}},[r,l,a]),!1};FI.defaultProps={debounce:200};var Nde=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},Dde=vt,Mde=Nde;Dde({target:"Math",stat:!0},{sign:Mde});var Lde=Jt,Fde=Lde.Math.sign,Bde=Fde,zde=Bde,Ude=zde;const qde=Ze(Ude);function Wde(e,t){var n=qde(t-e),r=Math.sqrt(Math.abs(t-e)),i=e+r*n;return n>0?Math.min(t,i):Math.max(t,i)}function Hde(e,t,n,r){for(var i=e,a=0;a<r;a++)i=n(i,t);return i}var BI=function(t){var n=t.name,r=t.onEnd,i=t.target,a=t.value,o=D.useRef(),s=D.useCallback(function(c,u,f,d){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Pi();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(o.current),o.current=requestAnimationFrame(function(){if(i){var h=f==="100%"?i.scrollHeight-i.offsetHeight:f,m=Hde(u,h,Wde,(Pi()-p)/5);Math.abs(h-m)<1.5&&(m=h),i[c]=m,h===m?r&&r(!0):s(c,u,f,d+1,p)}}))},[o,r,i]),l=D.useCallback(function(){cancelAnimationFrame(o.current),r&&r(!1)},[r]);return D.useLayoutEffect(function(){return s(n,i[n],a,1),i?(i.addEventListener("pointerdown",l,{passive:!0}),i.addEventListener("wheel",l,{passive:!0}),function(){i.removeEventListener("pointerdown",l),i.removeEventListener("wheel",l),cancelAnimationFrame(o.current)}):function(){return cancelAnimationFrame(o.current)}},[s,o,l,n,i,a]),!1};BI.propTypes={name:at.string.isRequired,onEnd:at.func,target:at.any.isRequired,value:at.oneOfType([at.number,at.oneOf(["100%"])]).isRequired};function ly(e){var t=D.useState(e),n=Pr(t,2),r=n[0],i=n[1],a=D.useRef(),o=D.useCallback(function(s){typeof s=="function"?o(function(l){return s=s(l),a.current=s,s}):(a.current=s,o(s))},[a]);return a.current=r,[r,i,a]}function zI(e,t){var n=uue(e);if(rI){var r=rI(e);t&&(r=Tue(r).call(r,function(i){return lI(e,i).enumerable})),n.push.apply(n,r)}return n}function UI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;Rf(r=zI(Object(n),!0)).call(r,function(a){rie(e,a,n[a])})}else if(cI)ffe(e,cI(n));else{var i;Rf(i=zI(Object(n))).call(i,function(a){pfe(e,a,lI(n,a))})}}return e}var Vde=function(){return 1/0},qI=17,Zde="bottom",lr="top",WI=1,Kde=34,HI={};function Gde(e,t){return e(),Mle(e,t)}function VI(e){var t=e.mode,n=e.target,r=n.offsetHeight,i=n.scrollHeight,a=n.scrollTop,o=i-a-r<WI,s=a<WI,l=t===lr?s:o,c=t!==lr?s:o;return{atBottom:o,atEnd:l,atStart:c,atTop:s}}function _l(e,t){return e===(t===lr?0:"100%")}var cy=function(t){var n=t.checkInterval,r=t.children,i=t.debounce,a=t.debug,o=t.initialScrollBehavior,s=t.mode,l=t.nonce,c=t.scroller,u=D.useMemo(function(){return Ede("<ScrollToBottom>",{force:a})},[a]);s=s===lr?lr:Zde;var f=D.useRef(0),d=D.useRef(o),p=ly(s===lr?0:"100%"),h=Pr(p,3),m=h[0],y=h[1],v=h[2],g=ly(null),b=Pr(g,3),k=b[0],S=b[1],_=b[2],$=D.useRef(0),j=D.useRef(0),z=D.useRef(0),O=D.useState(!0),N=Pr(O,2),W=N[0],L=N[1],U=D.useState(!0),M=Pr(U,2),I=M[0],H=M[1],B=D.useState(!0),A=Pr(B,2),x=A[0],q=A[1],K=D.useState(!1),E=Pr(K,2),Q=E[0],oe=E[1],ne=ly(!0),le=Pr(ne,3),pe=le[0],he=le[1],ce=le[2],X=D.useRef([]),Z=D.useCallback(function(P){var J=_.current;return X.current.push(P),J&&P({scrollTop:J.scrollTop}),function(){var ue=X.current,_e=Xle(ue).call(ue,P);~_e&&Sce(ue).call(ue,_e,1)}},[X,_]),de=D.useCallback(function(){var P=v.current;u(function(){var J;return kt(J=["%cSpineTo%c: %conEnd%c is fired."]).call(J,tt(ht("magenta")),tt(ht("orange")),[{animateTo:P}])}),f.current=Pi(),_l(P,s)||he(!1),y(null)},[v,u,f,s,y,he]),ve=D.useCallback(function(P){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ue=J.behavior,_e=_.current;if(typeof P!="number"&&P!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var Oe;return[kt(Oe=["%cscrollTo%c: Will scroll to %c".concat(typeof P=="number"?P+"px":P.replace(/%/g,"%%"),"%c")]).call(Oe,tt(ht("lime","")),tt(ht("purple"))),{behavior:ue,nextAnimateTo:P,target:_e}]}),ue==="auto"?(de(),_e&&(_e.scrollTop=P==="100%"?_e.scrollHeight-_e.offsetHeight:P)):(ue!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),y(P)),_l(P,s)&&(u(function(){var Oe;return[kt(Oe=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Oe,tt(ht("lime","")),tt(ht("purple"))),[{mode:s,nextAnimateTo:P}]]}),he(!0))},[u,de,s,y,he,_]),Ce=D.useCallback(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=P.behavior;u(function(){var ue;return kt(ue=["%cscrollToBottom%c: Called"]).call(ue,tt(ht("yellow","")))}),J!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve("100%",{behavior:J||"smooth"})},[u,ve]),R=D.useCallback(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=P.behavior;u(function(){var ue;return kt(ue=["%cscrollToTop%c: Called"]).call(ue,tt(ht("yellow","")))}),J!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ve(0,{behavior:J||"smooth"})},[u,ve]),Y=D.useCallback(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=P.behavior;u(function(){var _e;return kt(_e=["%cscrollToEnd%c: Called"]).call(_e,tt(ht("yellow","")))}),J!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var ue={behavior:J||"smooth"};s===lr?R(ue):Ce(ue)},[u,s,Ce,R]),ae=D.useCallback(function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=P.behavior;u(function(){var _e;return kt(_e=["%cscrollToStart%c: Called"]).call(_e,tt(ht("yellow","")))}),J!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var ue={behavior:J||"smooth"};s===lr?Ce(ue):R(ue)},[u,s,Ce,R]),ee=D.useCallback(function(){var P=_.current;if(P){if(d.current==="auto"){u(function(){var Ct;return kt(Ct=["%ctarget changed%c: Initial scroll"]).call(Ct,tt(ht("blue")))}),P.scrollTop=s===lr?0:P.scrollHeight-P.offsetHeight,d.current=!1;return}var J=$.current,ue=P.offsetHeight,_e=P.scrollHeight,Oe=P.scrollTop,Xe=s===lr?0:Math.max(0,_e-ue-Oe),ct=Math.max(0,J-Oe),Ut=c({maxValue:Xe,minValue:ct,offsetHeight:ue,scrollHeight:_e,scrollTop:Oe}),Tt=Math.max(0,Math.min(Xe,Ut)),Ge;s===lr||Tt!==Xe?Ge=Oe+Tt:Ge="100%",u(function(){var Ct,nt,wn;return[kt(Ct=[kt(nt=kt(wn="%cscrollToSticky%c: Will animate from %c".concat(J,"px%c to %c")).call(wn,typeof Ge=="number"?Ge+"px":Ge.replace(/%/g,"%%"),"%c (%c")).call(nt,(Ge==="100%"?Xe:Ge)+J,"px%c)")]).call(Ct,tt(ht("orange")),tt(ht("purple")),tt(ht("purple")),tt(ht("purple"))),{animateFrom:J,maxValue:Xe,minValue:ct,nextAnimateTo:Ge,nextValue:Tt,offsetHeight:ue,rawNextValue:Ut,scrollHeight:_e,scrollTop:Oe}]}),ve(Ge,{behavior:"smooth"})}},[$,u,s,c,ve,_]),ke=D.useCallback(function(P){var J,ue=P.timeStampLow,_e=v.current,Oe=_.current,Xe=_e!==null;if(!(ue<=f.current||!Oe)){var ct=VI({mode:s,target:Oe}),Ut=ct.atBottom,Tt=ct.atEnd,Ge=ct.atStart,Ct=ct.atTop;L(Ut),H(Tt),oe(Ge),q(Ct);var nt=Oe.offsetHeight,wn=Oe.scrollHeight,Rn=j.current,cr=z.current,ei=nt!==Rn,Mr=wn!==cr;if(ei&&(j.current=nt),Mr&&(z.current=wn),!ei&&!Mr){var ur=Xe&&_l(_e,s)||Tt;ce.current!==ur&&(u(function(){var mt,St,qt,Wt;return[kt(mt=["%conScroll%c: %csetSticky%c(%c".concat(ur,"%c)")]).call(mt,tt(ht("red")),tt(ht("red")),tt(ht("purple"))),kt(St=[kt(qt=kt(Wt="(animating = %c".concat(Xe,"%c && isEnd = %c")).call(Wt,_l(_e,s),"%c) || atEnd = %c")).call(qt,Tt,"%c")]).call(St,tt(ht("purple")),tt(ht("purple")),tt(ht("purple")),[{animating:Xe,animateTo:_e,atEnd:Tt,mode:s,offsetHeight:Oe.offsetHeight,scrollHeight:Oe.scrollHeight,sticky:ce.current,nextSticky:ur}])]}),he(ur))}else ce.current&&(u(function(){var mt;return[kt(mt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(mt,tt(ht("red")),tt(ht("orange")),[{offsetHeightChanged:ei,scrollHeightChanged:Mr}]),{nextOffsetHeight:nt,prevOffsetHeight:Rn,nextScrollHeight:wn,prevScrollHeight:cr}]}),ee());var ti=Oe.scrollTop;Rf(J=X.current).call(J,function(mt){return mt({scrollTop:ti})})}},[v,u,f,s,j,z,X,ee,L,H,oe,q,he,ce,_]);D.useEffect(function(){if(k){var P=!1,J=Gde(function(){var ue=_.current,_e=v.current!==null;ce.current?VI({mode:s,target:ue}).atEnd?P=!1:P?Pi()-P>Kde&&(_e||($.current=ue.scrollTop,u(function(){var Oe;return kt(Oe=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Oe,tt(ht("navy")),tt(ht("orange")))}),ee()),P=!1):P=Pi():ue.scrollHeight<=ue.offsetHeight&&!ce.current&&(u(function(){var Oe;return[kt(Oe=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Oe,tt(ht("navy")),tt(ht("purple"))),[{offsetHeight:ue.offsetHeight,scrollHeight:ue.scrollHeight,sticky:ce.current}]]}),he(!0))},Math.max(qI,n)||qI);return function(){return clearInterval(J)}}},[v,n,u,s,ee,he,ce,k,_]);var we=D.useMemo(function(){var P=HI[l]||(HI[l]=ede({key:"react-scroll-to-bottom--css-"+wde(),nonce:l}));return function(J){return P.css(J)+""}},[l]),Re=D.useMemo(function(){return{observeScrollPosition:Z,setTarget:S,styleToClassName:we}},[Z,S,we]),Ve=D.useMemo(function(){return{atBottom:W,atEnd:I,atStart:Q,atTop:x,mode:s}},[W,I,Q,x,s]),Ae=D.useMemo(function(){var P=m!==null;return{animating:P,animatingToEnd:P&&_l(m,s),sticky:pe}},[m,s,pe]),Be=D.useMemo(function(){return UI(UI({},Ve),Ae)},[Ve,Ae]),F=D.useMemo(function(){return{scrollTo:ve,scrollToBottom:Ce,scrollToEnd:Y,scrollToStart:ae,scrollToTop:R}},[ve,Ce,Y,ae,R]);return D.useEffect(function(){if(k){var P=function(){z.current=k.scrollHeight};return k.addEventListener("focus",P,{capture:!0,passive:!0}),function(){return k.removeEventListener("focus",P)}}},[k]),u(function(){var P;return[kt(P=["%cRender%c: Render"]).call(P,tt(ht("cyan",""))),{animateTo:m,animating:m!==null,sticky:pe,target:k}]}),D.createElement(vf.Provider,{value:Re},D.createElement(lg.Provider,{value:F},D.createElement(fg.Provider,{value:Be},D.createElement(cg.Provider,{value:Ve},D.createElement(ug.Provider,{value:Ae},r,k&&D.createElement(FI,{debounce:i,name:"scroll",onEvent:ke,target:k}),k&&m!==null&&D.createElement(BI,{name:"scrollTop",onEnd:de,target:k,value:m}))))))};cy.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:Vde},cy.propTypes={checkInterval:at.number,children:at.any,debounce:at.number,debug:at.bool,initialScrollBehavior:at.oneOf(["auto","smooth"]),mode:at.oneOf(["bottom","top"]),nonce:at.string,scroller:at.func};var Yde={height:"100%",overflowY:"auto",width:"100%"},uy=function(t){var n=t.children,r=t.className,i=D.useContext(vf),a=i.setTarget,o=dg()(Yde);return D.createElement("div",{className:eg(o,(r||"")+""),ref:a},n)};uy.defaultProps={children:void 0,className:void 0},uy.propTypes={children:at.any,className:at.string};var Jde={position:"relative"},fy=function(t){var n=t.children,r=t.className,i=t.followButtonClassName,a=t.scrollViewClassName,o=dg()(Jde);return D.createElement("div",{className:eg(o,(r||"")+"")},D.createElement(uy,{className:(a||"")+""},n),D.createElement(pg,{className:(i||"")+""}))};fy.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},fy.propTypes={children:at.any,className:at.string,followButtonClassName:at.string,scrollViewClassName:at.string};var dy=function(t){var n=t.checkInterval,r=t.children,i=t.className,a=t.debounce,o=t.debug,s=t.followButtonClassName,l=t.initialScrollBehavior,c=t.mode,u=t.nonce,f=t.scroller,d=t.scrollViewClassName;return D.createElement(cy,{checkInterval:n,debounce:a,debug:o,initialScrollBehavior:l,mode:c,nonce:u,scroller:f},D.createElement(fy,{className:i,followButtonClassName:s,scrollViewClassName:d},r))};dy.defaultProps={checkInterval:void 0,children:void 0,className:void 0,debounce:void 0,debug:void 0,followButtonClassName:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:void 0,scrollViewClassName:void 0},dy.propTypes={checkInterval:at.number,children:at.any,className:at.string,debounce:at.number,debug:at.bool,followButtonClassName:at.string,initialScrollBehavior:at.oneOf(["auto","smooth"]),mode:at.oneOf(["bottom","top"]),nonce:at.string,scroller:at.func,scrollViewClassName:at.string};function Xde(){var e=kT(),t=e.scrollToBottom;return t}rZ();const ZI=D.memo(({scrollDownButton:e,className:t,...n})=>{const{messageList:r}=yt,i=On(g=>g.conversationId),a=Me(g=>g.messages)[i??""]??[],o=Me(g=>g.setState),s=Me(g=>g.client),l=Me(g=>g.messageContainerRef),c=Me(g=>g.isTyping),u=Me(g=>g.setIsTyping),f=Me(g=>g.headerMessage),d=D.useMemo(()=>ZR(a),[a]),[p,h]=D.useState(!0),{y:m}=Z6(l),y=D.useCallback(()=>{if(!l.current)return;const{scrollHeight:g}=l.current;p&&l.current.scrollTo({top:g})},[]);D.useEffect(()=>s==null?void 0:s.on("isTyping",({isTyping:g,timeout:b})=>{u(g,b)}),[]),D.useEffect(()=>{const g=a[a.length-1];o({disableComposer:!!(g!=null&&g.disableInput)})},[a.length]),D.useEffect(()=>{if(!l.current)return;const{offsetHeight:g,scrollHeight:b,scrollTop:k}=l.current;h(b<=k+g+100)},[m]);const v=e!=null&&e.icon?e==null?void 0:e.icon:wU;return C.jsxs(dy,{...n,className:Gp(r.container.className,t),followButtonClassName:"bpHidden",scrollViewClassName:r.viewPort.className,children:[f&&C.jsx("span",{...r.headerMessage,children:f}),C.jsx(tZ,{}),d.map(g=>C.jsx(Nm,{scroll:y,...g},g.id)),c&&C.jsx(Nm,{scroll:y,direction:"incoming",children:C.jsx($k,{})}),C.jsx("li",{"data-is-at-bottom":p,...r.scrollDownButton.container,children:C.jsxs(Qde,{children:[(e==null?void 0:e.text)??"Back"," ",C.jsx(v,{...r.scrollDownButton.icon})]})})]})}),Qde=e=>{const[t]=OT(),n=Xde(),{messageList:{scrollDownButton:r}}=yt;return!t&&C.jsx("button",{type:"button",...r.button,onClick:()=>n(),...e})},epe=()=>{const{color:e,fontFamily:t,radius:n,themeMode:r,variant:i}=tS(),a=D.useMemo(()=>yb({color:e,fontFamily:t,radius:n,themeMode:r,variant:i}),[e,t,n,r,i]);return C.jsxs(C.Fragment,{children:[C.jsxs(bk,{children:[C.jsx(kk,{}),C.jsx(ZI,{}),C.jsx(WS,{})]}),C.jsx("style",{children:a})]})};Pe.Avatar=id,Pe.Block=Xa,Pe.Composer=WS,Pe.Container=bk,Pe.Fab=K8,Pe.Header=kk,Pe.Message=Nm,Pe.MessageList=ZI,Pe.Modal=Ti,Pe.ModalProvider=HS,Pe.RestartConversation=_k,Pe.TypingIndicator=$k,Pe.Webchat=epe,Pe.WebchatProvider=xV,Pe.WebchatThemeSchema=rd,Pe.__adapters=lR,Pe.avatarThemeSchema=Bl,Pe.blockThemeSchema=pb,Pe.configPropsSchema=gb,Pe.configurationSchema=ub,Pe.cssStyleSchema=db,Pe.descriptionItemSchema=ya,Pe.fileTypes=a1,Pe.generateThemeStylesheet=yb,Pe.getClient=c1,Pe.initPropsSchema=ZA,Pe.isFileType=o1,Pe.markdownTypeSchema=fb,Pe.renderers=MS,Pe.statePropsSchema=mb,Pe.styleOptionSchema=fe,Pe.themeSchema=hb,Pe.useClient=K4,Pe.useWebchatStore=Me,Pe.userPropsSchema=vb,Pe.webchatClasses=yt,Object.defineProperty(Pe,Symbol.toStringTag,{value:"Module"})});
|