@chatwillow/widget 0.0.9 → 0.1.0

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.
Files changed (28) hide show
  1. package/README.md +2 -2
  2. package/dist/chatwillow-widget.es.js +25364 -2940
  3. package/dist/chatwillow-widget.umd.js +201 -6
  4. package/dist/chatwillow.bundle.js +213 -18
  5. package/dist/components/atom/MarkdownRenderer.d.ts +5 -0
  6. package/dist/components/ui/badge.d.ts +1 -1
  7. package/dist/components/ui/button.d.ts +1 -1
  8. package/dist/components/ui/input-group.d.ts +1 -1
  9. package/dist/components/ui/item.d.ts +1 -1
  10. package/dist/components/ui/tabs.d.ts +1 -1
  11. package/dist/lib/encryptionService.d.ts +17 -0
  12. package/dist/lib/urlParsingService.d.ts +11 -0
  13. package/dist/modules/ChatWidget/ChatWidget.d.ts +2 -1
  14. package/dist/modules/ChatWidget/components/ChatInputArea.d.ts +9 -0
  15. package/dist/modules/ChatWidget/components/ChatMessageList.d.ts +9 -0
  16. package/dist/modules/ChatWidget/components/ChatWidgetUI.d.ts +1 -1
  17. package/dist/modules/ChatWidget/components/ChatWindowHeader.d.ts +7 -0
  18. package/dist/modules/ChatWidget/components/FilePreviewDialog.d.ts +6 -0
  19. package/dist/modules/ChatWidget/constants/configurableData.d.ts +2 -0
  20. package/dist/modules/ChatWidget/hooks/useChatSocket.hooks.d.ts +10 -0
  21. package/dist/modules/ChatWidget/hooks/useChatWidget.hooks.d.ts +8 -1
  22. package/dist/modules/ChatWidget/service/chatWidget.service.d.ts +20 -4
  23. package/dist/modules/ChatWidget/types/chatWidget.type.d.ts +5 -1
  24. package/dist/modules/ChatWidget/types/configurable.type.d.ts +23 -0
  25. package/dist/style.bundle.css +1 -0
  26. package/dist/style.css +1 -0
  27. package/package.json +10 -1
  28. package/dist/widget.css +0 -1
@@ -1,6 +1,201 @@
1
- (function(C,A){typeof exports=="object"&&typeof module<"u"?A(exports,require("react"),require("react-dom/client"),require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react","react-dom/client","react/jsx-runtime"],A):(C=typeof globalThis<"u"?globalThis:C||self,A(C.ChatWillow={},C.React,C.ReactDOM,C.jsxRuntime))})(this,(function(C,A,F,T){"use strict";var Ci=Object.defineProperty;var or=C=>{throw TypeError(C)};var Ai=(C,A,F)=>A in C?Ci(C,A,{enumerable:!0,configurable:!0,writable:!0,value:F}):C[A]=F;var X=(C,A,F)=>Ai(C,typeof A!="symbol"?A+"":A,F),Kt=(C,A,F)=>A.has(C)||or("Cannot "+F);var u=(C,A,F)=>(Kt(C,A,"read from private field"),F?F.call(C):A.get(C)),v=(C,A,F)=>A.has(C)?or("Cannot add the same private member more than once"):A instanceof WeakSet?A.add(C):A.set(C,F),b=(C,A,F,T)=>(Kt(C,A,"write to private field"),T?T.call(C,F):A.set(C,F),F),k=(C,A,F)=>(Kt(C,A,"access private method"),F);var St=(C,A,F,T)=>({set _(rt){b(C,A,rt,F)},get _(){return u(C,A,T)}});var ee,ve,Vs,Ce,de,ke,zs,Ue,he,Me,Ws,Ae,Js,Te,qe,J,xe,j,Ge,Pe,Z,le,Xs,Ze,te,H,De,se,we,Gs,oe,Y,Ye,Zs,ae,fe,K,ue,ce,Ot,Vt,Ys,re,er,D,pe,me,je,Le,ye,Ie,Be,tr;function rt(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,r.get?r:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const ie=rt(A),cr=rt(F);var $e=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},lr={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},dr=(Vs=class{constructor(){v(this,ee,lr);v(this,ve,!1)}setTimeoutProvider(t){process.env.NODE_ENV!=="production"&&u(this,ve)&&t!==u(this,ee)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:u(this,ee),provider:t}),b(this,ee,t),process.env.NODE_ENV!=="production"&&b(this,ve,!1)}setTimeout(t,e){return process.env.NODE_ENV!=="production"&&b(this,ve,!0),u(this,ee).setTimeout(t,e)}clearTimeout(t){u(this,ee).clearTimeout(t)}setInterval(t,e){return process.env.NODE_ENV!=="production"&&b(this,ve,!0),u(this,ee).setInterval(t,e)}clearInterval(t){u(this,ee).clearInterval(t)}},ee=new WeakMap,ve=new WeakMap,Vs),Rt=new dr;function hr(t){setTimeout(t,0)}var nt=typeof window>"u"||"Deno"in globalThis;function z(){}function fr(t,e){return typeof t=="function"?t(e):t}function pr(t){return typeof t=="number"&&t>=0&&t!==1/0}function mr(t,e){return Math.max(t+(e||0)-Date.now(),0)}function vt(t,e){return typeof t=="function"?t(e):t}function yr(t,e){return typeof t=="function"?t(e):t}function zt(t,e){const{type:s="all",exact:r,fetchStatus:n,predicate:i,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==Ct(o,e.options))return!1}else if(!Qe(e.queryKey,o))return!1}if(s!=="all"){const h=e.isActive();if(s==="active"&&!h||s==="inactive"&&h)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||n&&n!==e.state.fetchStatus||i&&!i(e))}function Wt(t,e){const{exact:s,status:r,predicate:n,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(s){if(Ee(e.options.mutationKey)!==Ee(i))return!1}else if(!Qe(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||n&&!n(e))}function Ct(t,e){return((e==null?void 0:e.queryKeyHashFn)||Ee)(t)}function Ee(t){return JSON.stringify(t,(e,s)=>Tt(s)?Object.keys(s).sort().reduce((r,n)=>(r[n]=s[n],r),{}):s)}function Qe(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(s=>Qe(t[s],e[s])):!1}var gr=Object.prototype.hasOwnProperty;function At(t,e,s=0){if(t===e)return t;if(s>500)return e;const r=Jt(t)&&Jt(e);if(!r&&!(Tt(t)&&Tt(e)))return e;const i=(r?t:Object.keys(t)).length,o=r?e:Object.keys(e),a=o.length,h=r?new Array(a):{};let d=0;for(let l=0;l<a;l++){const m=r?l:o[l],w=t[m],S=e[m];if(w===S){h[m]=w,(r?l<i:gr.call(t,m))&&d++;continue}if(w===null||S===null||typeof w!="object"||typeof S!="object"){h[m]=S;continue}const f=At(w,S,s+1);h[m]=f,f===w&&d++}return i===a&&d===i?t:h}function br(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function Jt(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Tt(t){if(!Xt(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!Xt(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Xt(t){return Object.prototype.toString.call(t)==="[object Object]"}function wr(t){return new Promise(e=>{Rt.setTimeout(e,t)})}function Er(t,e,s){if(typeof s.structuralSharing=="function")return s.structuralSharing(t,e);if(s.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return At(t,e)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${r}`),r}return At(t,e)}return e}function Sr(t,e,s=0){const r=[...t,e];return s&&r.length>s?r.slice(1):r}function Or(t,e,s=0){const r=[e,...t];return s&&r.length>s?r.slice(0,-1):r}var it=Symbol();function Gt(t,e){return process.env.NODE_ENV!=="production"&&t.queryFn===it&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${t.queryHash}'`),!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===it?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Rr(t,e){return typeof t=="function"?t(...e):!!t}function vr(t,e,s){let r=!1,n;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(n??(n=e()),r||(r=!0,n.aborted?s():n.addEventListener("abort",s,{once:!0})),n)}),t}var Cr=(zs=class extends $e{constructor(){super();v(this,Ce);v(this,de);v(this,ke);b(this,ke,e=>{if(!nt&&window.addEventListener){const s=()=>e();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){u(this,de)||this.setEventListener(u(this,ke))}onUnsubscribe(){var e;this.hasListeners()||((e=u(this,de))==null||e.call(this),b(this,de,void 0))}setEventListener(e){var s;b(this,ke,e),(s=u(this,de))==null||s.call(this),b(this,de,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){u(this,Ce)!==e&&(b(this,Ce,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(s=>{s(e)})}isFocused(){var e;return typeof u(this,Ce)=="boolean"?u(this,Ce):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ce=new WeakMap,de=new WeakMap,ke=new WeakMap,zs),Zt=new Cr;function Ar(){let t,e;const s=new Promise((n,i)=>{t=n,e=i});s.status="pending",s.catch(()=>{});function r(n){Object.assign(s,n),delete s.resolve,delete s.reject}return s.resolve=n=>{r({status:"fulfilled",value:n}),t(n)},s.reject=n=>{r({status:"rejected",reason:n}),e(n)},s}var Tr=hr;function xr(){let t=[],e=0,s=a=>{a()},r=a=>{a()},n=Tr;const i=a=>{e?t.push(a):n(()=>{s(a)})},o=()=>{const a=t;t=[],a.length&&n(()=>{r(()=>{a.forEach(h=>{s(h)})})})};return{batch:a=>{let h;e++;try{h=a()}finally{e--,e||o()}return h},batchCalls:a=>(...h)=>{i(()=>{a(...h)})},schedule:i,setNotifyFunction:a=>{s=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{n=a}}}var L=xr(),Pr=(Ws=class extends $e{constructor(){super();v(this,Ue,!0);v(this,he);v(this,Me);b(this,Me,e=>{if(!nt&&window.addEventListener){const s=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){u(this,he)||this.setEventListener(u(this,Me))}onUnsubscribe(){var e;this.hasListeners()||((e=u(this,he))==null||e.call(this),b(this,he,void 0))}setEventListener(e){var s;b(this,Me,e),(s=u(this,he))==null||s.call(this),b(this,he,e(this.setOnline.bind(this)))}setOnline(e){u(this,Ue)!==e&&(b(this,Ue,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return u(this,Ue)}},Ue=new WeakMap,he=new WeakMap,Me=new WeakMap,Ws),ot=new Pr;function Dr(t){return Math.min(1e3*2**t,3e4)}function Yt(t){return(t??"online")==="online"?ot.isOnline():!0}var xt=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function es(t){let e=!1,s=0,r;const n=Ar(),i=()=>n.status!=="pending",o=y=>{var p;if(!i()){const O=new xt(y);w(O),(p=t.onCancel)==null||p.call(t,O)}},a=()=>{e=!0},h=()=>{e=!1},d=()=>Zt.isFocused()&&(t.networkMode==="always"||ot.isOnline())&&t.canRun(),l=()=>Yt(t.networkMode)&&t.canRun(),m=y=>{i()||(r==null||r(),n.resolve(y))},w=y=>{i()||(r==null||r(),n.reject(y))},S=()=>new Promise(y=>{var p;r=O=>{(i()||d())&&y(O)},(p=t.onPause)==null||p.call(t)}).then(()=>{var y;r=void 0,i()||(y=t.onContinue)==null||y.call(t)}),f=()=>{if(i())return;let y;const p=s===0?t.initialPromise:void 0;try{y=p??t.fn()}catch(O){y=Promise.reject(O)}Promise.resolve(y).then(m).catch(O=>{var q;if(i())return;const x=t.retry??(nt?0:3),R=t.retryDelay??Dr,g=typeof R=="function"?R(s,O):R,P=x===!0||typeof x=="number"&&s<x||typeof x=="function"&&x(s,O);if(e||!P){w(O);return}s++,(q=t.onFail)==null||q.call(t,s,O),wr(g).then(()=>d()?void 0:S()).then(()=>{e?w(O):f()})})};return{promise:n,status:()=>n.status,cancel:o,continue:()=>(r==null||r(),n),cancelRetry:a,continueRetry:h,canStart:l,start:()=>(l()?f():S().then(f),n)}}var ts=(Js=class{constructor(){v(this,Ae)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pr(this.gcTime)&&b(this,Ae,Rt.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(nt?1/0:300*1e3))}clearGcTimeout(){u(this,Ae)&&(Rt.clearTimeout(u(this,Ae)),b(this,Ae,void 0))}},Ae=new WeakMap,Js),Fr=(Xs=class extends ts{constructor(e){super();v(this,Z);v(this,Te);v(this,qe);v(this,J);v(this,xe);v(this,j);v(this,Ge);v(this,Pe);b(this,Pe,!1),b(this,Ge,e.defaultOptions),this.setOptions(e.options),this.observers=[],b(this,xe,e.client),b(this,J,u(this,xe).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,b(this,Te,rs(this.options)),this.state=e.state??u(this,Te),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=u(this,j))==null?void 0:e.promise}setOptions(e){if(this.options={...u(this,Ge),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=rs(this.options);s.data!==void 0&&(this.setState(ss(s.data,s.dataUpdatedAt)),b(this,Te,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&u(this,J).remove(this)}setData(e,s){const r=Er(this.state.data,e,this.options);return k(this,Z,le).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(e,s){k(this,Z,le).call(this,{type:"setState",state:e,setStateOptions:s})}cancel(e){var r,n;const s=(r=u(this,j))==null?void 0:r.promise;return(n=u(this,j))==null||n.cancel(e),s?s.then(z).catch(z):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(u(this,Te))}isActive(){return this.observers.some(e=>yr(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===it||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>vt(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!mr(this.state.dataUpdatedAt,e)}onFocus(){var s;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(s=u(this,j))==null||s.continue()}onOnline(){var s;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(s=u(this,j))==null||s.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),u(this,J).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(s=>s!==e),this.observers.length||(u(this,j)&&(u(this,Pe)?u(this,j).cancel({revert:!0}):u(this,j).cancelRetry()),this.scheduleGc()),u(this,J).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||k(this,Z,le).call(this,{type:"invalidate"})}async fetch(e,s){var h,d,l,m,w,S,f,y,p,O,x,R;if(this.state.fetchStatus!=="idle"&&((h=u(this,j))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(u(this,j))return u(this,j).continueRetry(),u(this,j).promise}if(e&&this.setOptions(e),!this.options.queryFn){const g=this.observers.find(P=>P.options.queryFn);g&&this.setOptions(g.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,n=g=>{Object.defineProperty(g,"signal",{enumerable:!0,get:()=>(b(this,Pe,!0),r.signal)})},i=()=>{const g=Gt(this.options,s),q=(()=>{const U={client:u(this,xe),queryKey:this.queryKey,meta:this.meta};return n(U),U})();return b(this,Pe,!1),this.options.persister?this.options.persister(g,q,this):g(q)},a=(()=>{const g={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:u(this,xe),state:this.state,fetchFn:i};return n(g),g})();(d=this.options.behavior)==null||d.onFetch(a,this),b(this,qe,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((l=a.fetchOptions)==null?void 0:l.meta))&&k(this,Z,le).call(this,{type:"fetch",meta:(m=a.fetchOptions)==null?void 0:m.meta}),b(this,j,es({initialPromise:s==null?void 0:s.initialPromise,fn:a.fetchFn,onCancel:g=>{g instanceof xt&&g.revert&&this.setState({...u(this,qe),fetchStatus:"idle"}),r.abort()},onFail:(g,P)=>{k(this,Z,le).call(this,{type:"failed",failureCount:g,error:P})},onPause:()=>{k(this,Z,le).call(this,{type:"pause"})},onContinue:()=>{k(this,Z,le).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const g=await u(this,j).start();if(g===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(g),(S=(w=u(this,J).config).onSuccess)==null||S.call(w,g,this),(y=(f=u(this,J).config).onSettled)==null||y.call(f,g,this.state.error,this),g}catch(g){if(g instanceof xt){if(g.silent)return u(this,j).promise;if(g.revert){if(this.state.data===void 0)throw g;return this.state.data}}throw k(this,Z,le).call(this,{type:"error",error:g}),(O=(p=u(this,J).config).onError)==null||O.call(p,g,this),(R=(x=u(this,J).config).onSettled)==null||R.call(x,this.state.data,g,this),g}finally{this.scheduleGc()}}},Te=new WeakMap,qe=new WeakMap,J=new WeakMap,xe=new WeakMap,j=new WeakMap,Ge=new WeakMap,Pe=new WeakMap,Z=new WeakSet,le=function(e){const s=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Nr(r.data,this.options),fetchMeta:e.meta??null};case"success":const n={...r,...ss(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return b(this,qe,e.manual?n:void 0),n;case"error":const i=e.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=s(this.state),L.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),u(this,J).notify({query:this,type:"updated",action:e})})},Xs);function Nr(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Yt(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function ss(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function rs(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}function ns(t){return{onFetch:(e,s)=>{var l,m,w,S,f;const r=e.options,n=(w=(m=(l=e.fetchOptions)==null?void 0:l.meta)==null?void 0:m.fetchMore)==null?void 0:w.direction,i=((S=e.state.data)==null?void 0:S.pages)||[],o=((f=e.state.data)==null?void 0:f.pageParams)||[];let a={pages:[],pageParams:[]},h=0;const d=async()=>{let y=!1;const p=R=>{vr(R,()=>e.signal,()=>y=!0)},O=Gt(e.options,e.fetchOptions),x=async(R,g,P)=>{if(y)return Promise.reject();if(g==null&&R.pages.length)return Promise.resolve(R);const U=(()=>{const tt={client:e.client,queryKey:e.queryKey,pageParam:g,direction:P?"backward":"forward",meta:e.options.meta};return p(tt),tt})(),_=await O(U),{maxPages:M}=e.options,et=P?Or:Sr;return{pages:et(R.pages,_,M),pageParams:et(R.pageParams,g,M)}};if(n&&i.length){const R=n==="backward",g=R?_r:is,P={pages:i,pageParams:o},q=g(r,P);a=await x(P,q,R)}else{const R=t??i.length;do{const g=h===0?o[0]??r.initialPageParam:is(r,a);if(h>0&&g==null)break;a=await x(a,g),h++}while(h<R)}return a};e.options.persister?e.fetchFn=()=>{var y,p;return(p=(y=e.options).persister)==null?void 0:p.call(y,d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s)}:e.fetchFn=d}}}function is(t,{pages:e,pageParams:s}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,s[r],s):void 0}function _r(t,{pages:e,pageParams:s}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,s[0],s):void 0}var kr=(Gs=class extends ts{constructor(e){super();v(this,se);v(this,Ze);v(this,te);v(this,H);v(this,De);b(this,Ze,e.client),this.mutationId=e.mutationId,b(this,H,e.mutationCache),b(this,te,[]),this.state=e.state||os(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){u(this,te).includes(e)||(u(this,te).push(e),this.clearGcTimeout(),u(this,H).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){b(this,te,u(this,te).filter(s=>s!==e)),this.scheduleGc(),u(this,H).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){u(this,te).length||(this.state.status==="pending"?this.scheduleGc():u(this,H).remove(this))}continue(){var e;return((e=u(this,De))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,a,h,d,l,m,w,S,f,y,p,O,x,R,g,P,q,U;const s=()=>{k(this,se,we).call(this,{type:"continue"})},r={client:u(this,Ze),meta:this.options.meta,mutationKey:this.options.mutationKey};b(this,De,es({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(_,M)=>{k(this,se,we).call(this,{type:"failed",failureCount:_,error:M})},onPause:()=>{k(this,se,we).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>u(this,H).canRun(this)}));const n=this.state.status==="pending",i=!u(this,De).canStart();try{if(n)s();else{k(this,se,we).call(this,{type:"pending",variables:e,isPaused:i}),u(this,H).config.onMutate&&await u(this,H).config.onMutate(e,this,r);const M=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e,r));M!==this.state.context&&k(this,se,we).call(this,{type:"pending",context:M,variables:e,isPaused:i})}const _=await u(this,De).start();return await((d=(h=u(this,H).config).onSuccess)==null?void 0:d.call(h,_,e,this.state.context,this,r)),await((m=(l=this.options).onSuccess)==null?void 0:m.call(l,_,e,this.state.context,r)),await((S=(w=u(this,H).config).onSettled)==null?void 0:S.call(w,_,null,this.state.variables,this.state.context,this,r)),await((y=(f=this.options).onSettled)==null?void 0:y.call(f,_,null,e,this.state.context,r)),k(this,se,we).call(this,{type:"success",data:_}),_}catch(_){try{await((O=(p=u(this,H).config).onError)==null?void 0:O.call(p,_,e,this.state.context,this,r))}catch(M){Promise.reject(M)}try{await((R=(x=this.options).onError)==null?void 0:R.call(x,_,e,this.state.context,r))}catch(M){Promise.reject(M)}try{await((P=(g=u(this,H).config).onSettled)==null?void 0:P.call(g,void 0,_,this.state.variables,this.state.context,this,r))}catch(M){Promise.reject(M)}try{await((U=(q=this.options).onSettled)==null?void 0:U.call(q,void 0,_,e,this.state.context,r))}catch(M){Promise.reject(M)}throw k(this,se,we).call(this,{type:"error",error:_}),_}finally{u(this,H).runNext(this)}}},Ze=new WeakMap,te=new WeakMap,H=new WeakMap,De=new WeakMap,se=new WeakSet,we=function(e){const s=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=s(this.state),L.batch(()=>{u(this,te).forEach(r=>{r.onMutationUpdate(e)}),u(this,H).notify({mutation:this,type:"updated",action:e})})},Gs);function os(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ur=(Zs=class extends $e{constructor(e={}){super();v(this,oe);v(this,Y);v(this,Ye);this.config=e,b(this,oe,new Set),b(this,Y,new Map),b(this,Ye,0)}build(e,s,r){const n=new kr({client:e,mutationCache:this,mutationId:++St(this,Ye)._,options:e.defaultMutationOptions(s),state:r});return this.add(n),n}add(e){u(this,oe).add(e);const s=at(e);if(typeof s=="string"){const r=u(this,Y).get(s);r?r.push(e):u(this,Y).set(s,[e])}this.notify({type:"added",mutation:e})}remove(e){if(u(this,oe).delete(e)){const s=at(e);if(typeof s=="string"){const r=u(this,Y).get(s);if(r)if(r.length>1){const n=r.indexOf(e);n!==-1&&r.splice(n,1)}else r[0]===e&&u(this,Y).delete(s)}}this.notify({type:"removed",mutation:e})}canRun(e){const s=at(e);if(typeof s=="string"){const r=u(this,Y).get(s),n=r==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===e}else return!0}runNext(e){var r;const s=at(e);if(typeof s=="string"){const n=(r=u(this,Y).get(s))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}else return Promise.resolve()}clear(){L.batch(()=>{u(this,oe).forEach(e=>{this.notify({type:"removed",mutation:e})}),u(this,oe).clear(),u(this,Y).clear()})}getAll(){return Array.from(u(this,oe))}find(e){const s={exact:!0,...e};return this.getAll().find(r=>Wt(s,r))}findAll(e={}){return this.getAll().filter(s=>Wt(e,s))}notify(e){L.batch(()=>{this.listeners.forEach(s=>{s(e)})})}resumePausedMutations(){const e=this.getAll().filter(s=>s.state.isPaused);return L.batch(()=>Promise.all(e.map(s=>s.continue().catch(z))))}},oe=new WeakMap,Y=new WeakMap,Ye=new WeakMap,Zs);function at(t){var e;return(e=t.options.scope)==null?void 0:e.id}var Mr=(Ys=class extends $e{constructor(e,s){super();v(this,ce);v(this,ae);v(this,fe);v(this,K);v(this,ue);b(this,ae,e),this.setOptions(s),this.bindMethods(),k(this,ce,Ot).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var r;const s=this.options;this.options=u(this,ae).defaultMutationOptions(e),br(this.options,s)||u(this,ae).getMutationCache().notify({type:"observerOptionsUpdated",mutation:u(this,K),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&Ee(s.mutationKey)!==Ee(this.options.mutationKey)?this.reset():((r=u(this,K))==null?void 0:r.state.status)==="pending"&&u(this,K).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(e=u(this,K))==null||e.removeObserver(this)}onMutationUpdate(e){k(this,ce,Ot).call(this),k(this,ce,Vt).call(this,e)}getCurrentResult(){return u(this,fe)}reset(){var e;(e=u(this,K))==null||e.removeObserver(this),b(this,K,void 0),k(this,ce,Ot).call(this),k(this,ce,Vt).call(this)}mutate(e,s){var r;return b(this,ue,s),(r=u(this,K))==null||r.removeObserver(this),b(this,K,u(this,ae).getMutationCache().build(u(this,ae),this.options)),u(this,K).addObserver(this),u(this,K).execute(e)}},ae=new WeakMap,fe=new WeakMap,K=new WeakMap,ue=new WeakMap,ce=new WeakSet,Ot=function(){var s;const e=((s=u(this,K))==null?void 0:s.state)??os();b(this,fe,{...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset})},Vt=function(e){L.batch(()=>{var s,r,n,i,o,a,h,d;if(u(this,ue)&&this.hasListeners()){const l=u(this,fe).variables,m=u(this,fe).context,w={client:u(this,ae),meta:this.options.meta,mutationKey:this.options.mutationKey};if((e==null?void 0:e.type)==="success"){try{(r=(s=u(this,ue)).onSuccess)==null||r.call(s,e.data,l,m,w)}catch(S){Promise.reject(S)}try{(i=(n=u(this,ue)).onSettled)==null||i.call(n,e.data,null,l,m,w)}catch(S){Promise.reject(S)}}else if((e==null?void 0:e.type)==="error"){try{(a=(o=u(this,ue)).onError)==null||a.call(o,e.error,l,m,w)}catch(S){Promise.reject(S)}try{(d=(h=u(this,ue)).onSettled)==null||d.call(h,void 0,e.error,l,m,w)}catch(S){Promise.reject(S)}}}this.listeners.forEach(l=>{l(u(this,fe))})})},Ys),qr=(er=class extends $e{constructor(e={}){super();v(this,re);this.config=e,b(this,re,new Map)}build(e,s,r){const n=s.queryKey,i=s.queryHash??Ct(n,s);let o=this.get(i);return o||(o=new Fr({client:e,queryKey:n,queryHash:i,options:e.defaultQueryOptions(s),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(o)),o}add(e){u(this,re).has(e.queryHash)||(u(this,re).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const s=u(this,re).get(e.queryHash);s&&(e.destroy(),s===e&&u(this,re).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){L.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return u(this,re).get(e)}getAll(){return[...u(this,re).values()]}find(e){const s={exact:!0,...e};return this.getAll().find(r=>zt(s,r))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(r=>zt(e,r)):s}notify(e){L.batch(()=>{this.listeners.forEach(s=>{s(e)})})}onFocus(){L.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){L.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},re=new WeakMap,er),jr=(tr=class{constructor(t={}){v(this,D);v(this,pe);v(this,me);v(this,je);v(this,Le);v(this,ye);v(this,Ie);v(this,Be);b(this,D,t.queryCache||new qr),b(this,pe,t.mutationCache||new Ur),b(this,me,t.defaultOptions||{}),b(this,je,new Map),b(this,Le,new Map),b(this,ye,0)}mount(){St(this,ye)._++,u(this,ye)===1&&(b(this,Ie,Zt.subscribe(async t=>{t&&(await this.resumePausedMutations(),u(this,D).onFocus())})),b(this,Be,ot.subscribe(async t=>{t&&(await this.resumePausedMutations(),u(this,D).onOnline())})))}unmount(){var t,e;St(this,ye)._--,u(this,ye)===0&&((t=u(this,Ie))==null||t.call(this),b(this,Ie,void 0),(e=u(this,Be))==null||e.call(this),b(this,Be,void 0))}isFetching(t){return u(this,D).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return u(this,pe).findAll({...t,status:"pending"}).length}getQueryData(t){var s;const e=this.defaultQueryOptions({queryKey:t});return(s=u(this,D).get(e.queryHash))==null?void 0:s.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=u(this,D).build(this,e),r=s.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(vt(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return u(this,D).findAll(t).map(({queryKey:e,state:s})=>{const r=s.data;return[e,r]})}setQueryData(t,e,s){const r=this.defaultQueryOptions({queryKey:t}),n=u(this,D).get(r.queryHash),i=n==null?void 0:n.state.data,o=fr(e,i);if(o!==void 0)return u(this,D).build(this,r).setData(o,{...s,manual:!0})}setQueriesData(t,e,s){return L.batch(()=>u(this,D).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,s)]))}getQueryState(t){var s;const e=this.defaultQueryOptions({queryKey:t});return(s=u(this,D).get(e.queryHash))==null?void 0:s.state}removeQueries(t){const e=u(this,D);L.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=u(this,D);return L.batch(()=>(s.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const s={revert:!0,...e},r=L.batch(()=>u(this,D).findAll(t).map(n=>n.cancel(s)));return Promise.all(r).then(z).catch(z)}invalidateQueries(t,e={}){return L.batch(()=>(u(this,D).findAll(t).forEach(s=>{s.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},r=L.batch(()=>u(this,D).findAll(t).filter(n=>!n.isDisabled()&&!n.isStatic()).map(n=>{let i=n.fetch(void 0,s);return s.throwOnError||(i=i.catch(z)),n.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(z)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=u(this,D).build(this,e);return s.isStaleByTime(vt(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(z).catch(z)}fetchInfiniteQuery(t){return t.behavior=ns(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(z).catch(z)}ensureInfiniteQueryData(t){return t.behavior=ns(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return ot.isOnline()?u(this,pe).resumePausedMutations():Promise.resolve()}getQueryCache(){return u(this,D)}getMutationCache(){return u(this,pe)}getDefaultOptions(){return u(this,me)}setDefaultOptions(t){b(this,me,t)}setQueryDefaults(t,e){u(this,je).set(Ee(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...u(this,je).values()],s={};return e.forEach(r=>{Qe(t,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(t,e){u(this,Le).set(Ee(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...u(this,Le).values()],s={};return e.forEach(r=>{Qe(t,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...u(this,me).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Ct(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===it&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...u(this,me).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){u(this,D).clear(),u(this,pe).clear()}},D=new WeakMap,pe=new WeakMap,me=new WeakMap,je=new WeakMap,Le=new WeakMap,ye=new WeakMap,Ie=new WeakMap,Be=new WeakMap,tr),as=ie.createContext(void 0),Lr=t=>{const e=ie.useContext(as);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Ir=({client:t,children:e})=>(ie.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),T.jsx(as.Provider,{value:t,children:e}));function Br(t,e){const s=Lr(),[r]=ie.useState(()=>new Mr(s,t));ie.useEffect(()=>{r.setOptions(t)},[r,t]);const n=ie.useSyncExternalStore(ie.useCallback(o=>r.subscribe(L.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=ie.useCallback((o,a)=>{r.mutate(o,a).catch(z)},[r]);if(n.error&&Rr(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:i,mutateAsync:n.mutate}}function Hr({messages:t,onSendMessage:e,isSending:s,className:r,style:n}){const[i,o]=A.useState(""),a=h=>{h.preventDefault(),i.trim()&&!s&&(e(i),o(""))};return T.jsxs("div",{className:`fixed bottom-4 right-4 w-96 h-[500px] flex flex-col bg-white border border-gray-200 rounded-lg shadow-xl overflow-hidden font-sans ${r||""}`,style:n,children:[T.jsxs("div",{className:"bg-slate-800 text-white p-4 flex justify-between items-center",children:[T.jsx("h3",{className:"font-semibold text-lg",children:"ChatWillow"}),T.jsx("span",{className:"text-xs text-slate-300",children:"Online"})]}),T.jsxs("div",{className:"flex-1 p-4 overflow-y-auto bg-gray-50 flex flex-col gap-3",children:[t.length===0&&T.jsx("div",{className:"text-center text-gray-400 my-auto text-sm",children:"Start a conversation..."}),t.map(h=>T.jsx("div",{className:`flex ${h.role==="user"?"justify-end":"justify-start"}`,children:T.jsx("div",{className:`max-w-[80%] p-3 rounded-lg text-sm ${h.role==="user"?"bg-slate-800 text-white rounded-br-none":"bg-white text-gray-800 border border-gray-200 rounded-bl-none shadow-sm"}`,children:h.content})},h.id)),s&&T.jsx("div",{className:"flex justify-start",children:T.jsx("div",{className:"bg-white text-gray-800 border border-gray-200 p-3 rounded-lg rounded-bl-none shadow-sm",children:T.jsxs("span",{className:"flex gap-1",children:[T.jsx("span",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce"}),T.jsx("span",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce delay-75"}),T.jsx("span",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce delay-150"})]})})})]}),T.jsx("form",{onSubmit:a,className:"p-3 bg-white border-t border-gray-100",children:T.jsxs("div",{className:"flex gap-2",children:[T.jsx("input",{type:"text",value:i,onChange:h=>o(h.target.value),disabled:s,placeholder:"Type your message...",className:"flex-1 px-4 py-2 bg-gray-100 border-0 rounded-full focus:ring-2 focus:ring-slate-800 focus:outline-none transition-all text-sm disabled:opacity-50"}),T.jsx("button",{type:"submit",disabled:!i.trim()||s,className:"p-2 bg-slate-800 text-white rounded-full hover:bg-slate-700 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:T.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor",className:"w-5 h-5",children:T.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})})})]})})]})}function us(t,e){return function(){return t.apply(e,arguments)}}const{toString:$r}=Object.prototype,{getPrototypeOf:Pt}=Object,{iterator:ut,toStringTag:cs}=Symbol,ct=(t=>e=>{const s=$r.call(e);return t[s]||(t[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),G=t=>(t=t.toLowerCase(),e=>ct(e)===t),lt=t=>e=>typeof e===t,{isArray:Ne}=Array,_e=lt("undefined");function Ke(t){return t!==null&&!_e(t)&&t.constructor!==null&&!_e(t.constructor)&&$(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const ls=G("ArrayBuffer");function Qr(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&ls(t.buffer),e}const Kr=lt("string"),$=lt("function"),ds=lt("number"),Ve=t=>t!==null&&typeof t=="object",Vr=t=>t===!0||t===!1,dt=t=>{if(ct(t)!=="object")return!1;const e=Pt(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(cs in t)&&!(ut in t)},zr=t=>{if(!Ve(t)||Ke(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Wr=G("Date"),Jr=G("File"),Xr=G("Blob"),Gr=G("FileList"),Zr=t=>Ve(t)&&$(t.pipe),Yr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||$(t.append)&&((e=ct(t))==="formdata"||e==="object"&&$(t.toString)&&t.toString()==="[object FormData]"))},en=G("URLSearchParams"),[tn,sn,rn,nn]=["ReadableStream","Request","Response","Headers"].map(G),on=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ze(t,e,{allOwnKeys:s=!1}={}){if(t===null||typeof t>"u")return;let r,n;if(typeof t!="object"&&(t=[t]),Ne(t))for(r=0,n=t.length;r<n;r++)e.call(null,t[r],r,t);else{if(Ke(t))return;const i=s?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let a;for(r=0;r<o;r++)a=i[r],e.call(null,t[a],a,t)}}function hs(t,e){if(Ke(t))return null;e=e.toLowerCase();const s=Object.keys(t);let r=s.length,n;for(;r-- >0;)if(n=s[r],e===n.toLowerCase())return n;return null}const Se=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,fs=t=>!_e(t)&&t!==Se;function Dt(){const{caseless:t,skipUndefined:e}=fs(this)&&this||{},s={},r=(n,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const o=t&&hs(s,i)||i;dt(s[o])&&dt(n)?s[o]=Dt(s[o],n):dt(n)?s[o]=Dt({},n):Ne(n)?s[o]=n.slice():(!e||!_e(n))&&(s[o]=n)};for(let n=0,i=arguments.length;n<i;n++)arguments[n]&&ze(arguments[n],r);return s}const an=(t,e,s,{allOwnKeys:r}={})=>(ze(e,(n,i)=>{s&&$(n)?Object.defineProperty(t,i,{value:us(n,s),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{value:n,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),un=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),cn=(t,e,s,r)=>{t.prototype=Object.create(e.prototype,r),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),s&&Object.assign(t.prototype,s)},ln=(t,e,s,r)=>{let n,i,o;const a={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),i=n.length;i-- >0;)o=n[i],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=s!==!1&&Pt(t)}while(t&&(!s||s(t,e))&&t!==Object.prototype);return e},dn=(t,e,s)=>{t=String(t),(s===void 0||s>t.length)&&(s=t.length),s-=e.length;const r=t.indexOf(e,s);return r!==-1&&r===s},hn=t=>{if(!t)return null;if(Ne(t))return t;let e=t.length;if(!ds(e))return null;const s=new Array(e);for(;e-- >0;)s[e]=t[e];return s},fn=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Pt(Uint8Array)),pn=(t,e)=>{const r=(t&&t[ut]).call(t);let n;for(;(n=r.next())&&!n.done;){const i=n.value;e.call(t,i[0],i[1])}},mn=(t,e)=>{let s;const r=[];for(;(s=t.exec(e))!==null;)r.push(s);return r},yn=G("HTMLFormElement"),gn=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,r,n){return r.toUpperCase()+n}),ps=(({hasOwnProperty:t})=>(e,s)=>t.call(e,s))(Object.prototype),bn=G("RegExp"),ms=(t,e)=>{const s=Object.getOwnPropertyDescriptors(t),r={};ze(s,(n,i)=>{let o;(o=e(n,i,t))!==!1&&(r[i]=o||n)}),Object.defineProperties(t,r)},wn=t=>{ms(t,(e,s)=>{if($(t)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const r=t[s];if($(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},En=(t,e)=>{const s={},r=n=>{n.forEach(i=>{s[i]=!0})};return Ne(t)?r(t):r(String(t).split(e)),s},Sn=()=>{},On=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Rn(t){return!!(t&&$(t.append)&&t[cs]==="FormData"&&t[ut])}const vn=t=>{const e=new Array(10),s=(r,n)=>{if(Ve(r)){if(e.indexOf(r)>=0)return;if(Ke(r))return r;if(!("toJSON"in r)){e[n]=r;const i=Ne(r)?[]:{};return ze(r,(o,a)=>{const h=s(o,n+1);!_e(h)&&(i[a]=h)}),e[n]=void 0,i}}return r};return s(t,0)},Cn=G("AsyncFunction"),An=t=>t&&(Ve(t)||$(t))&&$(t.then)&&$(t.catch),ys=((t,e)=>t?setImmediate:e?((s,r)=>(Se.addEventListener("message",({source:n,data:i})=>{n===Se&&i===s&&r.length&&r.shift()()},!1),n=>{r.push(n),Se.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",$(Se.postMessage)),Tn=typeof queueMicrotask<"u"?queueMicrotask.bind(Se):typeof process<"u"&&process.nextTick||ys,c={isArray:Ne,isArrayBuffer:ls,isBuffer:Ke,isFormData:Yr,isArrayBufferView:Qr,isString:Kr,isNumber:ds,isBoolean:Vr,isObject:Ve,isPlainObject:dt,isEmptyObject:zr,isReadableStream:tn,isRequest:sn,isResponse:rn,isHeaders:nn,isUndefined:_e,isDate:Wr,isFile:Jr,isBlob:Xr,isRegExp:bn,isFunction:$,isStream:Zr,isURLSearchParams:en,isTypedArray:fn,isFileList:Gr,forEach:ze,merge:Dt,extend:an,trim:on,stripBOM:un,inherits:cn,toFlatObject:ln,kindOf:ct,kindOfTest:G,endsWith:dn,toArray:hn,forEachEntry:pn,matchAll:mn,isHTMLForm:yn,hasOwnProperty:ps,hasOwnProp:ps,reduceDescriptors:ms,freezeMethods:wn,toObjectSet:En,toCamelCase:gn,noop:Sn,toFiniteNumber:On,findKey:hs,global:Se,isContextDefined:fs,isSpecCompliantForm:Rn,toJSONObject:vn,isAsyncFn:Cn,isThenable:An,setImmediate:ys,asap:Tn,isIterable:t=>t!=null&&$(t[ut])};let E=class ar extends Error{static from(e,s,r,n,i,o){const a=new ar(e.message,s||e.code,r,n,i);return a.cause=e,a.name=e.name,o&&Object.assign(a,o),a}constructor(e,s,r,n,i){super(e),this.name="AxiosError",this.isAxiosError=!0,s&&(this.code=s),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status)}toJSON(){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:c.toJSONObject(this.config),code:this.code,status:this.status}}};E.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",E.ERR_BAD_OPTION="ERR_BAD_OPTION",E.ECONNABORTED="ECONNABORTED",E.ETIMEDOUT="ETIMEDOUT",E.ERR_NETWORK="ERR_NETWORK",E.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",E.ERR_DEPRECATED="ERR_DEPRECATED",E.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",E.ERR_BAD_REQUEST="ERR_BAD_REQUEST",E.ERR_CANCELED="ERR_CANCELED",E.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",E.ERR_INVALID_URL="ERR_INVALID_URL";const xn=null;function Ft(t){return c.isPlainObject(t)||c.isArray(t)}function gs(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function bs(t,e,s){return t?t.concat(e).map(function(n,i){return n=gs(n),!s&&i?"["+n+"]":n}).join(s?".":""):e}function Pn(t){return c.isArray(t)&&!t.some(Ft)}const Dn=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function ht(t,e,s){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,s=c.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,p){return!c.isUndefined(p[y])});const r=s.metaTokens,n=s.visitor||l,i=s.dots,o=s.indexes,h=(s.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(n))throw new TypeError("visitor must be a function");function d(f){if(f===null)return"";if(c.isDate(f))return f.toISOString();if(c.isBoolean(f))return f.toString();if(!h&&c.isBlob(f))throw new E("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(f)||c.isTypedArray(f)?h&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function l(f,y,p){let O=f;if(f&&!p&&typeof f=="object"){if(c.endsWith(y,"{}"))y=r?y:y.slice(0,-2),f=JSON.stringify(f);else if(c.isArray(f)&&Pn(f)||(c.isFileList(f)||c.endsWith(y,"[]"))&&(O=c.toArray(f)))return y=gs(y),O.forEach(function(R,g){!(c.isUndefined(R)||R===null)&&e.append(o===!0?bs([y],g,i):o===null?y:y+"[]",d(R))}),!1}return Ft(f)?!0:(e.append(bs(p,y,i),d(f)),!1)}const m=[],w=Object.assign(Dn,{defaultVisitor:l,convertValue:d,isVisitable:Ft});function S(f,y){if(!c.isUndefined(f)){if(m.indexOf(f)!==-1)throw Error("Circular reference detected in "+y.join("."));m.push(f),c.forEach(f,function(O,x){(!(c.isUndefined(O)||O===null)&&n.call(e,O,c.isString(x)?x.trim():x,y,w))===!0&&S(O,y?y.concat(x):[x])}),m.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return S(t),e}function ws(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function Nt(t,e){this._pairs=[],t&&ht(t,this,e)}const Es=Nt.prototype;Es.append=function(e,s){this._pairs.push([e,s])},Es.toString=function(e){const s=e?function(r){return e.call(this,r,ws)}:ws;return this._pairs.map(function(n){return s(n[0])+"="+s(n[1])},"").join("&")};function Fn(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ss(t,e,s){if(!e)return t;const r=s&&s.encode||Fn,n=c.isFunction(s)?{serialize:s}:s,i=n&&n.serialize;let o;if(i?o=i(e,n):o=c.isURLSearchParams(e)?e.toString():new Nt(e,n).toString(r),o){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Os{constructor(){this.handlers=[]}use(e,s,r){return this.handlers.push({fulfilled:e,rejected:s,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(r){r!==null&&e(r)})}}const _t={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Nn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Nt,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},kt=typeof window<"u"&&typeof document<"u",Ut=typeof navigator=="object"&&navigator||void 0,_n=kt&&(!Ut||["ReactNative","NativeScript","NS"].indexOf(Ut.product)<0),kn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Un=kt&&window.location.href||"http://localhost",B={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:kt,hasStandardBrowserEnv:_n,hasStandardBrowserWebWorkerEnv:kn,navigator:Ut,origin:Un},Symbol.toStringTag,{value:"Module"})),...Nn};function Mn(t,e){return ht(t,new B.classes.URLSearchParams,{visitor:function(s,r,n,i){return B.isNode&&c.isBuffer(s)?(this.append(r,s.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function qn(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function jn(t){const e={},s=Object.keys(t);let r;const n=s.length;let i;for(r=0;r<n;r++)i=s[r],e[i]=t[i];return e}function Rs(t){function e(s,r,n,i){let o=s[i++];if(o==="__proto__")return!0;const a=Number.isFinite(+o),h=i>=s.length;return o=!o&&c.isArray(n)?n.length:o,h?(c.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!a):((!n[o]||!c.isObject(n[o]))&&(n[o]=[]),e(s,r,n[o],i)&&c.isArray(n[o])&&(n[o]=jn(n[o])),!a)}if(c.isFormData(t)&&c.isFunction(t.entries)){const s={};return c.forEachEntry(t,(r,n)=>{e(qn(r),n,s,0)}),s}return null}function Ln(t,e,s){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(s||JSON.stringify)(t)}const We={transitional:_t,adapter:["xhr","http","fetch"],transformRequest:[function(e,s){const r=s.getContentType()||"",n=r.indexOf("application/json")>-1,i=c.isObject(e);if(i&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return n?JSON.stringify(Rs(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Mn(e,this.formSerializer).toString();if((a=c.isFileList(e))||r.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return ht(a?{"files[]":e}:e,h&&new h,this.formSerializer)}}return i||n?(s.setContentType("application/json",!1),Ln(e)):e}],transformResponse:[function(e){const s=this.transitional||We.transitional,r=s&&s.forcedJSONParsing,n=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(r&&!this.responseType||n)){const o=!(s&&s.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?E.from(a,E.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:B.classes.FormData,Blob:B.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{We.headers[t]={}});const In=c.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"]),Bn=t=>{const e={};let s,r,n;return t&&t.split(`
2
- `).forEach(function(o){n=o.indexOf(":"),s=o.substring(0,n).trim().toLowerCase(),r=o.substring(n+1).trim(),!(!s||e[s]&&In[s])&&(s==="set-cookie"?e[s]?e[s].push(r):e[s]=[r]:e[s]=e[s]?e[s]+", "+r:r)}),e},vs=Symbol("internals");function Je(t){return t&&String(t).trim().toLowerCase()}function ft(t){return t===!1||t==null?t:c.isArray(t)?t.map(ft):String(t)}function Hn(t){const e=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=s.exec(t);)e[r[1]]=r[2];return e}const $n=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Mt(t,e,s,r,n){if(c.isFunction(r))return r.call(this,e,s);if(n&&(e=s),!!c.isString(e)){if(c.isString(r))return e.indexOf(r)!==-1;if(c.isRegExp(r))return r.test(e)}}function Qn(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,s,r)=>s.toUpperCase()+r)}function Kn(t,e){const s=c.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+s,{value:function(n,i,o){return this[r].call(this,e,n,i,o)},configurable:!0})})}let Q=class{constructor(e){e&&this.set(e)}set(e,s,r){const n=this;function i(a,h,d){const l=Je(h);if(!l)throw new Error("header name must be a non-empty string");const m=c.findKey(n,l);(!m||n[m]===void 0||d===!0||d===void 0&&n[m]!==!1)&&(n[m||h]=ft(a))}const o=(a,h)=>c.forEach(a,(d,l)=>i(d,l,h));if(c.isPlainObject(e)||e instanceof this.constructor)o(e,s);else if(c.isString(e)&&(e=e.trim())&&!$n(e))o(Bn(e),s);else if(c.isObject(e)&&c.isIterable(e)){let a={},h,d;for(const l of e){if(!c.isArray(l))throw TypeError("Object iterator must return a key-value pair");a[d=l[0]]=(h=a[d])?c.isArray(h)?[...h,l[1]]:[h,l[1]]:l[1]}o(a,s)}else e!=null&&i(s,e,r);return this}get(e,s){if(e=Je(e),e){const r=c.findKey(this,e);if(r){const n=this[r];if(!s)return n;if(s===!0)return Hn(n);if(c.isFunction(s))return s.call(this,n,r);if(c.isRegExp(s))return s.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,s){if(e=Je(e),e){const r=c.findKey(this,e);return!!(r&&this[r]!==void 0&&(!s||Mt(this,this[r],r,s)))}return!1}delete(e,s){const r=this;let n=!1;function i(o){if(o=Je(o),o){const a=c.findKey(r,o);a&&(!s||Mt(r,r[a],a,s))&&(delete r[a],n=!0)}}return c.isArray(e)?e.forEach(i):i(e),n}clear(e){const s=Object.keys(this);let r=s.length,n=!1;for(;r--;){const i=s[r];(!e||Mt(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){const s=this,r={};return c.forEach(this,(n,i)=>{const o=c.findKey(r,i);if(o){s[o]=ft(n),delete s[i];return}const a=e?Qn(i):String(i).trim();a!==i&&delete s[i],s[a]=ft(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const s=Object.create(null);return c.forEach(this,(r,n)=>{r!=null&&r!==!1&&(s[n]=e&&c.isArray(r)?r.join(", "):r)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,s])=>e+": "+s).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...s){const r=new this(e);return s.forEach(n=>r.set(n)),r}static accessor(e){const r=(this[vs]=this[vs]={accessors:{}}).accessors,n=this.prototype;function i(o){const a=Je(o);r[a]||(Kn(n,o),r[a]=!0)}return c.isArray(e)?e.forEach(i):i(e),this}};Q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(Q.prototype,({value:t},e)=>{let s=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[s]=r}}}),c.freezeMethods(Q);function qt(t,e){const s=this||We,r=e||s,n=Q.from(r.headers);let i=r.data;return c.forEach(t,function(a){i=a.call(s,i,n.normalize(),e?e.status:void 0)}),n.normalize(),i}function Cs(t){return!!(t&&t.__CANCEL__)}let Xe=class extends E{constructor(e,s,r){super(e??"canceled",E.ERR_CANCELED,s,r),this.name="CanceledError",this.__CANCEL__=!0}};function As(t,e,s){const r=s.config.validateStatus;!s.status||!r||r(s.status)?t(s):e(new E("Request failed with status code "+s.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function Vn(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function zn(t,e){t=t||10;const s=new Array(t),r=new Array(t);let n=0,i=0,o;return e=e!==void 0?e:1e3,function(h){const d=Date.now(),l=r[i];o||(o=d),s[n]=h,r[n]=d;let m=i,w=0;for(;m!==n;)w+=s[m++],m=m%t;if(n=(n+1)%t,n===i&&(i=(i+1)%t),d-o<e)return;const S=l&&d-l;return S?Math.round(w*1e3/S):void 0}}function Wn(t,e){let s=0,r=1e3/e,n,i;const o=(d,l=Date.now())=>{s=l,n=null,i&&(clearTimeout(i),i=null),t(...d)};return[(...d)=>{const l=Date.now(),m=l-s;m>=r?o(d,l):(n=d,i||(i=setTimeout(()=>{i=null,o(n)},r-m)))},()=>n&&o(n)]}const pt=(t,e,s=3)=>{let r=0;const n=zn(50,250);return Wn(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,h=o-r,d=n(h),l=o<=a;r=o;const m={loaded:o,total:a,progress:a?o/a:void 0,bytes:h,rate:d||void 0,estimated:d&&a&&l?(a-o)/d:void 0,event:i,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(m)},s)},Ts=(t,e)=>{const s=t!=null;return[r=>e[0]({lengthComputable:s,total:t,loaded:r}),e[1]]},xs=t=>(...e)=>c.asap(()=>t(...e)),Jn=B.hasStandardBrowserEnv?((t,e)=>s=>(s=new URL(s,B.origin),t.protocol===s.protocol&&t.host===s.host&&(e||t.port===s.port)))(new URL(B.origin),B.navigator&&/(msie|trident)/i.test(B.navigator.userAgent)):()=>!0,Xn=B.hasStandardBrowserEnv?{write(t,e,s,r,n,i,o){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];c.isNumber(s)&&a.push(`expires=${new Date(s).toUTCString()}`),c.isString(r)&&a.push(`path=${r}`),c.isString(n)&&a.push(`domain=${n}`),i===!0&&a.push("secure"),c.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Gn(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Zn(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ps(t,e,s){let r=!Gn(e);return t&&(r||s==!1)?Zn(t,e):e}const Ds=t=>t instanceof Q?{...t}:t;function Oe(t,e){e=e||{};const s={};function r(d,l,m,w){return c.isPlainObject(d)&&c.isPlainObject(l)?c.merge.call({caseless:w},d,l):c.isPlainObject(l)?c.merge({},l):c.isArray(l)?l.slice():l}function n(d,l,m,w){if(c.isUndefined(l)){if(!c.isUndefined(d))return r(void 0,d,m,w)}else return r(d,l,m,w)}function i(d,l){if(!c.isUndefined(l))return r(void 0,l)}function o(d,l){if(c.isUndefined(l)){if(!c.isUndefined(d))return r(void 0,d)}else return r(void 0,l)}function a(d,l,m){if(m in e)return r(d,l);if(m in t)return r(void 0,d)}const h={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken: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:a,headers:(d,l,m)=>n(Ds(d),Ds(l),m,!0)};return c.forEach(Object.keys({...t,...e}),function(l){if(l==="__proto__"||l==="constructor"||l==="prototype")return;const m=c.hasOwnProp(h,l)?h[l]:n,w=m(t[l],e[l],l);c.isUndefined(w)&&m!==a||(s[l]=w)}),s}const Fs=t=>{const e=Oe({},t);let{data:s,withXSRFToken:r,xsrfHeaderName:n,xsrfCookieName:i,headers:o,auth:a}=e;if(e.headers=o=Q.from(o),e.url=Ss(Ps(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),c.isFormData(s)){if(B.hasStandardBrowserEnv||B.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(c.isFunction(s.getHeaders)){const h=s.getHeaders(),d=["content-type","content-length"];Object.entries(h).forEach(([l,m])=>{d.includes(l.toLowerCase())&&o.set(l,m)})}}if(B.hasStandardBrowserEnv&&(r&&c.isFunction(r)&&(r=r(e)),r||r!==!1&&Jn(e.url))){const h=n&&i&&Xn.read(i);h&&o.set(n,h)}return e},Yn=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(s,r){const n=Fs(t);let i=n.data;const o=Q.from(n.headers).normalize();let{responseType:a,onUploadProgress:h,onDownloadProgress:d}=n,l,m,w,S,f;function y(){S&&S(),f&&f(),n.cancelToken&&n.cancelToken.unsubscribe(l),n.signal&&n.signal.removeEventListener("abort",l)}let p=new XMLHttpRequest;p.open(n.method.toUpperCase(),n.url,!0),p.timeout=n.timeout;function O(){if(!p)return;const R=Q.from("getAllResponseHeaders"in p&&p.getAllResponseHeaders()),P={data:!a||a==="text"||a==="json"?p.responseText:p.response,status:p.status,statusText:p.statusText,headers:R,config:t,request:p};As(function(U){s(U),y()},function(U){r(U),y()},P),p=null}"onloadend"in p?p.onloadend=O:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(O)},p.onabort=function(){p&&(r(new E("Request aborted",E.ECONNABORTED,t,p)),p=null)},p.onerror=function(g){const P=g&&g.message?g.message:"Network Error",q=new E(P,E.ERR_NETWORK,t,p);q.event=g||null,r(q),p=null},p.ontimeout=function(){let g=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const P=n.transitional||_t;n.timeoutErrorMessage&&(g=n.timeoutErrorMessage),r(new E(g,P.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,t,p)),p=null},i===void 0&&o.setContentType(null),"setRequestHeader"in p&&c.forEach(o.toJSON(),function(g,P){p.setRequestHeader(P,g)}),c.isUndefined(n.withCredentials)||(p.withCredentials=!!n.withCredentials),a&&a!=="json"&&(p.responseType=n.responseType),d&&([w,f]=pt(d,!0),p.addEventListener("progress",w)),h&&p.upload&&([m,S]=pt(h),p.upload.addEventListener("progress",m),p.upload.addEventListener("loadend",S)),(n.cancelToken||n.signal)&&(l=R=>{p&&(r(!R||R.type?new Xe(null,t,p):R),p.abort(),p=null)},n.cancelToken&&n.cancelToken.subscribe(l),n.signal&&(n.signal.aborted?l():n.signal.addEventListener("abort",l)));const x=Vn(n.url);if(x&&B.protocols.indexOf(x)===-1){r(new E("Unsupported protocol "+x+":",E.ERR_BAD_REQUEST,t));return}p.send(i||null)})},ei=(t,e)=>{const{length:s}=t=t?t.filter(Boolean):[];if(e||s){let r=new AbortController,n;const i=function(d){if(!n){n=!0,a();const l=d instanceof Error?d:this.reason;r.abort(l instanceof E?l:new Xe(l instanceof Error?l.message:l))}};let o=e&&setTimeout(()=>{o=null,i(new E(`timeout of ${e}ms exceeded`,E.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),t=null)};t.forEach(d=>d.addEventListener("abort",i));const{signal:h}=r;return h.unsubscribe=()=>c.asap(a),h}},ti=function*(t,e){let s=t.byteLength;if(s<e){yield t;return}let r=0,n;for(;r<s;)n=r+e,yield t.slice(r,n),r=n},si=async function*(t,e){for await(const s of ri(t))yield*ti(s,e)},ri=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:s,value:r}=await e.read();if(s)break;yield r}}finally{await e.cancel()}},Ns=(t,e,s,r)=>{const n=si(t,e);let i=0,o,a=h=>{o||(o=!0,r&&r(h))};return new ReadableStream({async pull(h){try{const{done:d,value:l}=await n.next();if(d){a(),h.close();return}let m=l.byteLength;if(s){let w=i+=m;s(w)}h.enqueue(new Uint8Array(l))}catch(d){throw a(d),d}},cancel(h){return a(h),n.return()}},{highWaterMark:2})},_s=64*1024,{isFunction:mt}=c,ni=(({Request:t,Response:e})=>({Request:t,Response:e}))(c.global),{ReadableStream:ks,TextEncoder:Us}=c.global,Ms=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ii=t=>{t=c.merge.call({skipUndefined:!0},ni,t);const{fetch:e,Request:s,Response:r}=t,n=e?mt(e):typeof fetch=="function",i=mt(s),o=mt(r);if(!n)return!1;const a=n&&mt(ks),h=n&&(typeof Us=="function"?(f=>y=>f.encode(y))(new Us):async f=>new Uint8Array(await new s(f).arrayBuffer())),d=i&&a&&Ms(()=>{let f=!1;const y=new s(B.origin,{body:new ks,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!y}),l=o&&a&&Ms(()=>c.isReadableStream(new r("").body)),m={stream:l&&(f=>f.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!m[f]&&(m[f]=(y,p)=>{let O=y&&y[f];if(O)return O.call(y);throw new E(`Response type '${f}' is not supported`,E.ERR_NOT_SUPPORT,p)})});const w=async f=>{if(f==null)return 0;if(c.isBlob(f))return f.size;if(c.isSpecCompliantForm(f))return(await new s(B.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(c.isArrayBufferView(f)||c.isArrayBuffer(f))return f.byteLength;if(c.isURLSearchParams(f)&&(f=f+""),c.isString(f))return(await h(f)).byteLength},S=async(f,y)=>{const p=c.toFiniteNumber(f.getContentLength());return p??w(y)};return async f=>{let{url:y,method:p,data:O,signal:x,cancelToken:R,timeout:g,onDownloadProgress:P,onUploadProgress:q,responseType:U,headers:_,withCredentials:M="same-origin",fetchOptions:et}=Fs(f),tt=e||fetch;U=U?(U+"").toLowerCase():"text";let wt=ei([x,R&&R.toAbortSignal()],g),st=null;const Fe=wt&&wt.unsubscribe&&(()=>{wt.unsubscribe()});let sr;try{if(q&&d&&p!=="get"&&p!=="head"&&(sr=await S(_,O))!==0){let be=new s(y,{method:"POST",body:O,duplex:"half"}),He;if(c.isFormData(O)&&(He=be.headers.get("content-type"))&&_.setContentType(He),be.body){const[Qt,Et]=Ts(sr,pt(xs(q)));O=Ns(be.body,_s,Qt,Et)}}c.isString(M)||(M=M?"include":"omit");const V=i&&"credentials"in s.prototype,rr={...et,signal:wt,method:p.toUpperCase(),headers:_.normalize().toJSON(),body:O,duplex:"half",credentials:V?M:void 0};st=i&&new s(y,rr);let ge=await(i?tt(st,et):tt(y,rr));const nr=l&&(U==="stream"||U==="response");if(l&&(P||nr&&Fe)){const be={};["status","statusText","headers"].forEach(ir=>{be[ir]=ge[ir]});const He=c.toFiniteNumber(ge.headers.get("content-length")),[Qt,Et]=P&&Ts(He,pt(xs(P),!0))||[];ge=new r(Ns(ge.body,_s,Qt,()=>{Et&&Et(),Fe&&Fe()}),be)}U=U||"text";let vi=await m[c.findKey(m,U)||"text"](ge,f);return!nr&&Fe&&Fe(),await new Promise((be,He)=>{As(be,He,{data:vi,headers:Q.from(ge.headers),status:ge.status,statusText:ge.statusText,config:f,request:st})})}catch(V){throw Fe&&Fe(),V&&V.name==="TypeError"&&/Load failed|fetch/i.test(V.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,f,st,V&&V.response),{cause:V.cause||V}):E.from(V,V&&V.code,f,st,V&&V.response)}}},oi=new Map,qs=t=>{let e=t&&t.env||{};const{fetch:s,Request:r,Response:n}=e,i=[r,n,s];let o=i.length,a=o,h,d,l=oi;for(;a--;)h=i[a],d=l.get(h),d===void 0&&l.set(h,d=a?new Map:ii(e)),l=d;return d};qs();const jt={http:xn,xhr:Yn,fetch:{get:qs}};c.forEach(jt,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const js=t=>`- ${t}`,ai=t=>c.isFunction(t)||t===null||t===!1;function ui(t,e){t=c.isArray(t)?t:[t];const{length:s}=t;let r,n;const i={};for(let o=0;o<s;o++){r=t[o];let a;if(n=r,!ai(r)&&(n=jt[(a=String(r)).toLowerCase()],n===void 0))throw new E(`Unknown adapter '${a}'`);if(n&&(c.isFunction(n)||(n=n.get(e))))break;i[a||"#"+o]=n}if(!n){const o=Object.entries(i).map(([h,d])=>`adapter ${h} `+(d===!1?"is not supported by the environment":"is not available in the build"));let a=s?o.length>1?`since :
4
- `+o.map(js).join(`
5
- `):" "+js(o[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n}const Ls={getAdapter:ui,adapters:jt};function Lt(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Xe(null,t)}function Is(t){return Lt(t),t.headers=Q.from(t.headers),t.data=qt.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ls.getAdapter(t.adapter||We.adapter,t)(t).then(function(r){return Lt(t),r.data=qt.call(t,t.transformResponse,r),r.headers=Q.from(r.headers),r},function(r){return Cs(r)||(Lt(t),r&&r.response&&(r.response.data=qt.call(t,t.transformResponse,r.response),r.response.headers=Q.from(r.response.headers))),Promise.reject(r)})}const Bs="1.13.5",yt={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{yt[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Hs={};yt.transitional=function(e,s,r){function n(i,o){return"[Axios v"+Bs+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(e===!1)throw new E(n(o," has been removed"+(s?" in "+s:"")),E.ERR_DEPRECATED);return s&&!Hs[o]&&(Hs[o]=!0,console.warn(n(o," has been deprecated since v"+s+" and will be removed in the near future"))),e?e(i,o,a):!0}},yt.spelling=function(e){return(s,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function ci(t,e,s){if(typeof t!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let n=r.length;for(;n-- >0;){const i=r[n],o=e[i];if(o){const a=t[i],h=a===void 0||o(a,i,t);if(h!==!0)throw new E("option "+i+" must be "+h,E.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new E("Unknown option "+i,E.ERR_BAD_OPTION)}}const gt={assertOptions:ci,validators:yt},W=gt.validators;let Re=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Os,response:new Os}}async request(e,s){try{return await this._request(e,s)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const i=n.stack?n.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
6
- `+i):r.stack=i}catch{}}throw r}}_request(e,s){typeof e=="string"?(s=s||{},s.url=e):s=e||{},s=Oe(this.defaults,s);const{transitional:r,paramsSerializer:n,headers:i}=s;r!==void 0&&gt.assertOptions(r,{silentJSONParsing:W.transitional(W.boolean),forcedJSONParsing:W.transitional(W.boolean),clarifyTimeoutError:W.transitional(W.boolean),legacyInterceptorReqResOrdering:W.transitional(W.boolean)},!1),n!=null&&(c.isFunction(n)?s.paramsSerializer={serialize:n}:gt.assertOptions(n,{encode:W.function,serialize:W.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),gt.assertOptions(s,{baseUrl:W.spelling("baseURL"),withXsrfToken:W.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let o=i&&c.merge(i.common,i[s.method]);i&&c.forEach(["delete","get","head","post","put","patch","common"],f=>{delete i[f]}),s.headers=Q.concat(o,i);const a=[];let h=!0;this.interceptors.request.forEach(function(y){if(typeof y.runWhen=="function"&&y.runWhen(s)===!1)return;h=h&&y.synchronous;const p=s.transitional||_t;p&&p.legacyInterceptorReqResOrdering?a.unshift(y.fulfilled,y.rejected):a.push(y.fulfilled,y.rejected)});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let l,m=0,w;if(!h){const f=[Is.bind(this),void 0];for(f.unshift(...a),f.push(...d),w=f.length,l=Promise.resolve(s);m<w;)l=l.then(f[m++],f[m++]);return l}w=a.length;let S=s;for(;m<w;){const f=a[m++],y=a[m++];try{S=f(S)}catch(p){y.call(this,p);break}}try{l=Is.call(this,S)}catch(f){return Promise.reject(f)}for(m=0,w=d.length;m<w;)l=l.then(d[m++],d[m++]);return l}getUri(e){e=Oe(this.defaults,e);const s=Ps(e.baseURL,e.url,e.allowAbsoluteUrls);return Ss(s,e.params,e.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(e){Re.prototype[e]=function(s,r){return this.request(Oe(r||{},{method:e,url:s,data:(r||{}).data}))}}),c.forEach(["post","put","patch"],function(e){function s(r){return function(i,o,a){return this.request(Oe(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Re.prototype[e]=s(),Re.prototype[e+"Form"]=s(!0)});let li=class ur{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(i){s=i});const r=this;this.promise.then(n=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](n);r._listeners=null}),this.promise.then=n=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(n);return o.cancel=function(){r.unsubscribe(i)},o},e(function(i,o,a){r.reason||(r.reason=new Xe(i,o,a),s(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const s=this._listeners.indexOf(e);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const e=new AbortController,s=r=>{e.abort(r)};return this.subscribe(s),e.signal.unsubscribe=()=>this.unsubscribe(s),e.signal}static source(){let e;return{token:new ur(function(n){e=n}),cancel:e}}};function di(t){return function(s){return t.apply(null,s)}}function hi(t){return c.isObject(t)&&t.isAxiosError===!0}const It={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(It).forEach(([t,e])=>{It[e]=t});function $s(t){const e=new Re(t),s=us(Re.prototype.request,e);return c.extend(s,Re.prototype,e,{allOwnKeys:!0}),c.extend(s,e,null,{allOwnKeys:!0}),s.create=function(n){return $s(Oe(t,n))},s}const N=$s(We);N.Axios=Re,N.CanceledError=Xe,N.CancelToken=li,N.isCancel=Cs,N.VERSION=Bs,N.toFormData=ht,N.AxiosError=E,N.Cancel=N.CanceledError,N.all=function(e){return Promise.all(e)},N.spread=di,N.isAxiosError=hi,N.mergeConfig=Oe,N.AxiosHeaders=Q,N.formToJSON=t=>Rs(c.isHTMLForm(t)?new FormData(t):t),N.getAdapter=Ls.getAdapter,N.HttpStatusCode=It,N.default=N;const{Axios:_i,AxiosError:ki,CanceledError:Ui,isCancel:Mi,CancelToken:qi,VERSION:ji,all:Li,Cancel:Ii,isAxiosError:Bi,spread:Hi,toFormData:$i,AxiosHeaders:Qi,HttpStatusCode:Ki,formToJSON:Vi,getAdapter:zi,mergeConfig:Wi}=N,ne=class ne{};X(ne,"handleError",(e,s)=>{console.error("Global Error:",e),console.error("Error Info:",s),console.group("🔴 Error Details"),console.error("Error:",e),console.error("Stack:",e.stack),s&&console.error("Component Stack:",s.componentStack),console.groupEnd()}),X(ne,"handleApiError",e=>{const s=new Error;if(e.response){const{status:r,data:n}=e.response;switch(s.statusCode=r,s.message=ne.getErrorMessage(r,n),s.details=n,r){case 400:s.code="BAD_REQUEST";break;case 401:s.code="UNAUTHORIZED";break;case 403:s.code="FORBIDDEN";break;case 404:s.code="NOT_FOUND";break;case 409:s.code="CONFLICT";break;case 422:s.code="VALIDATION_ERROR";break;case 429:s.code="RATE_LIMIT_EXCEEDED";break;case 500:s.code="INTERNAL_SERVER_ERROR";break;default:s.code="UNKNOWN_ERROR"}}else e.request?(s.code="NETWORK_ERROR",s.message="Tidak dapat terhubung ke server. Periksa koneksi internet Anda."):(s.code="REQUEST_ERROR",s.message=e.message||"Terjadi kesalahan yang tidak diketahui.");return s}),X(ne,"getErrorMessage",(e,s)=>{if(s!=null&&s.message)return s.message;if(s!=null&&s.detail)return s.detail;if(s!=null&&s.error)return s.error;switch(e){case 400:return"Permintaan tidak valid. Periksa data yang Anda kirim.";case 401:return"Sesi Anda telah habis. Silakan login kembali.";case 403:return"Anda tidak memiliki izin untuk mengakses resource ini.";case 404:return"Data yang diminta tidak ditemukan.";case 409:return"Konflik data. Resource sudah ada atau sedang digunakan.";case 422:return"Data yang dikirim tidak valid. Periksa kembali form Anda.";case 429:return"Terlalu banyak permintaan. Mohon tunggu sebentar dan coba lagi.";case 500:return"Terjadi kesalahan di server. Silakan coba lagi nanti.";case 503:return"Layanan sedang tidak tersedia. Silakan coba lagi nanti.";default:return"Terjadi kesalahan yang tidak diketahui."}}),X(ne,"isNetworkError",e=>e.code==="NETWORK_ERROR"),X(ne,"isValidationError",e=>e.code==="VALIDATION_ERROR"||e.statusCode===422),X(ne,"isAuthError",e=>e.code==="UNAUTHORIZED"||e.statusCode===401),X(ne,"isRateLimitError",e=>e.code==="RATE_LIMIT_EXCEEDED"||e.statusCode===429);let bt=ne;class fi{constructor(e){X(this,"axios");X(this,"retries");X(this,"retryDelay");this.retries=e.retries??3,this.retryDelay=e.retryDelay??1e3,this.axios=N.create({baseURL:e.baseURL,timeout:e.timeout??1e4,headers:{"Content-Type":"application/json",...e.headers},withCredentials:!0}),this.setupInterceptors()}setupInterceptors(){this.axios.interceptors.request.use(e=>{var s;return e.metadata={startTime:Date.now()},console.log(`🚀 ${(s=e.method)==null?void 0:s.toUpperCase()} ${e.url}`,e.data?{data:e.data}:""),e},e=>Promise.reject(bt.handleApiError(e))),this.axios.interceptors.response.use(e=>{var r,n;const s=Date.now()-(((r=e.config.metadata)==null?void 0:r.startTime)||0);return console.log(`✅ ${(n=e.config.method)==null?void 0:n.toUpperCase()} ${e.config.url} (${s}ms)`,{status:e.status,data:e.data}),e},async e=>{const s=bt.handleApiError(e);return this.shouldRetry(e)&&e.config&&!e.config.__retryCount?this.retryRequest(e.config,e):Promise.reject(s)})}shouldRetry(e){return!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599}async retryRequest(e,s){var n;if(e.__retryCount=e.__retryCount||0,e.__retryCount>=this.retries)throw e;e.__retryCount+=1;let r=this.retryDelay*Math.pow(2,e.__retryCount-1);if(((n=s==null?void 0:s.response)==null?void 0:n.status)===429){const i=s.response.headers["retry-after"];if(i){const o=isNaN(i)?new Date(i).getTime()-Date.now():parseInt(i)*1e3;r=Math.max(o,1e3)}else r=6e4}return console.log(`⏳ Retrying request in ${r}ms (attempt ${e.__retryCount}/${this.retries})`),await new Promise(i=>setTimeout(i,r)),this.axios(e)}async get(e,s){return(await this.axios.get(e,s)).data}async getRaw(e,s){return await this.axios.get(e,s)}async post(e,s,r){return(await this.axios.post(e,s,r)).data}async put(e,s,r){return(await this.axios.put(e,s,r)).data}async patch(e,s,r){return(await this.axios.patch(e,s,r)).data}async delete(e,s){return(await this.axios.delete(e,s)).data}async uploadFile(e,s,r){const n=new FormData;n.append("file",s);const i={headers:{"Content-Type":"multipart/form-data"}};return r&&(i.onUploadProgress=r),(await this.axios.post(e,n,i)).data}setAuthHeader(e){this.axios.defaults.headers.common.Authorization=`Bearer ${e}`}removeAuthHeader(){delete this.axios.defaults.headers.common.Authorization}setCustomHeader(e,s){this.axios.defaults.headers.common[e]=s}removeCustomHeader(e){delete this.axios.defaults.headers.common[e]}setBaseURL(e){this.axios.defaults.baseURL=e}}class pi{constructor(){X(this,"apiClient");this.apiClient=new fi({baseURL:"http://localhost:9999"})}async sendMessage(e){return await this.apiClient.post("/chat-module/send-message",{message:e})}}const mi=new pi;function yi(){return Br({mutationFn:t=>mi.sendMessage(t)})}const I=[];for(let t=0;t<256;++t)I.push((t+256).toString(16).slice(1));function gi(t,e=0){return(I[t[e+0]]+I[t[e+1]]+I[t[e+2]]+I[t[e+3]]+"-"+I[t[e+4]]+I[t[e+5]]+"-"+I[t[e+6]]+I[t[e+7]]+"-"+I[t[e+8]]+I[t[e+9]]+"-"+I[t[e+10]]+I[t[e+11]]+I[t[e+12]]+I[t[e+13]]+I[t[e+14]]+I[t[e+15]]).toLowerCase()}let Bt;const bi=new Uint8Array(16);function wi(){if(!Bt){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Bt=crypto.getRandomValues.bind(crypto)}return Bt(bi)}const Ht={};function $t(t,e,s){let r;{const n=Date.now(),i=wi();Ei(Ht,n,i),r=Si(i,Ht.msecs,Ht.seq,e,s)}return gi(r)}function Ei(t,e,s){return t.msecs??(t.msecs=-1/0),t.seq??(t.seq=0),e>t.msecs?(t.seq=s[6]<<23|s[7]<<16|s[8]<<8|s[9],t.msecs=e):(t.seq=t.seq+1|0,t.seq===0&&t.msecs++),t}function Si(t,e,s,r,n=0){if(t.length<16)throw new Error("Random bytes length must be >= 16");if(!r)r=new Uint8Array(16),n=0;else if(n<0||n+16>r.length)throw new RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);return e??(e=Date.now()),s??(s=t[6]*127<<24|t[7]<<16|t[8]<<8|t[9]),r[n++]=e/1099511627776&255,r[n++]=e/4294967296&255,r[n++]=e/16777216&255,r[n++]=e/65536&255,r[n++]=e/256&255,r[n++]=e&255,r[n++]=112|s>>>28&15,r[n++]=s>>>20&255,r[n++]=128|s>>>14&63,r[n++]=s>>>6&255,r[n++]=s<<2&255|t[10]&3,r[n++]=t[11],r[n++]=t[12],r[n++]=t[13],r[n++]=t[14],r[n++]=t[15],r}function Oi({className:t,style:e}){const[s,r]=A.useState([{id:"1",role:"assistant",content:"Hi there! I'm ChatWillow. How can I help you today?",timestamp:new Date}]),{mutate:n,isPending:i}=yi(),o=a=>{const h={id:$t(),role:"user",content:a,timestamp:new Date};r(d=>[...d,h]),n(a,{onSuccess:d=>{const l=typeof d.data=="string"?d.data:d.message||"Error parsing response",m={id:$t(),role:"assistant",content:l,timestamp:new Date};r(w=>[...w,m])},onError:d=>{const l={id:$t(),role:"assistant",content:"Sorry, something went wrong. Please try again.",timestamp:new Date};r(m=>[...m,l]),console.error("Failed to send message:",d)}})};return T.jsx(Hr,{messages:s,onSendMessage:o,isSending:i,className:t,style:e})}const Ri=new jr({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});function Qs(t){return T.jsx(Ir,{client:Ri,children:T.jsx(Oi,{...t})})}const Ks=t=>{if(typeof window>"u")return;const e=t.containerId||"chatwillow-root";let s=document.getElementById(e);s||(s=document.createElement("div"),s.id=e,document.body.appendChild(s)),cr.createRoot(s).render(ie.createElement(Qs,t))};typeof window<"u"&&(window.ChatWillow={init:Ks}),C.ChatWillowWidget=Qs,C.init=Ks,Object.defineProperty(C,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(fe,z){typeof exports=="object"&&typeof module<"u"?z(exports,require("react"),require("react-dom/client"),require("react/jsx-runtime"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom/client","react/jsx-runtime","react-dom"],z):(fe=typeof globalThis<"u"?globalThis:fe||self,z(fe.ChatWillow={},fe.React,fe.ReactDOM$1,fe.jsxRuntime,fe.ReactDOM))})(this,(function(fe,z,Se,T,_r){"use strict";var h4=Object.defineProperty;var $d=fe=>{throw TypeError(fe)};var p4=(fe,z,Se)=>z in fe?h4(fe,z,{enumerable:!0,configurable:!0,writable:!0,value:Se}):fe[z]=Se;var Ct=(fe,z,Se)=>p4(fe,typeof z!="symbol"?z+"":z,Se),nl=(fe,z,Se)=>z.has(fe)||$d("Cannot "+Se);var B=(fe,z,Se)=>(nl(fe,z,"read from private field"),Se?Se.call(fe):z.get(fe)),ee=(fe,z,Se)=>z.has(fe)?$d("Cannot add the same private member more than once"):z instanceof WeakSet?z.add(fe):z.set(fe,Se),K=(fe,z,Se,T)=>(nl(fe,z,"write to private field"),T?T.call(fe,Se):z.set(fe,Se),Se),ce=(fe,z,Se)=>(nl(fe,z,"access private method"),Se);var Zo=(fe,z,Se,T)=>({set _(_r){K(fe,z,_r,Se)},get _(){return B(fe,z,T)}});var Mt,Mn,Pd,zn,pn,hr,Rd,pr,xn,xr,Id,Un,Nd,Hn,mr,Et,qn,He,ei,jn,Bt,on,Ld,ft,me,ti,tt,$n,gr,Yt,mn,ni,yr,br,Wn,Vn,gn,vr,ye,ai,rl,il,ol,sl,al,ll,cl,Wd,Md,ri,zt,Xe,Kn,Ut,Cn,zd,Zt,Dt,ii,Ud,Jt,yn,dt,en,tn,Jo,ul,Hd,Ht,qd,Ae,bn,vn,wr,Er,wn,Cr,kr,jd;function es(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 P=es(z),Qd=es(Se),Xd=es(_r);var Xn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Gd={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Yd=(Pd=class{constructor(){ee(this,Mt,Gd);ee(this,Mn,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&B(this,Mn)&&e!==B(this,Mt)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:B(this,Mt),provider:e}),K(this,Mt,e),process.env.NODE_ENV!=="production"&&K(this,Mn,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&K(this,Mn,!0),B(this,Mt).setTimeout(e,t)}clearTimeout(e){B(this,Mt).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&K(this,Mn,!0),B(this,Mt).setInterval(e,t)}clearInterval(e){B(this,Mt).clearInterval(e)}},Mt=new WeakMap,Mn=new WeakMap,Pd),kn=new Yd;function Zd(e){setTimeout(e,0)}var An=typeof window>"u"||"Deno"in globalThis;function Ze(){}function Jd(e,t){return typeof e=="function"?e(t):e}function ts(e){return typeof e=="number"&&e>=0&&e!==1/0}function fl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function sn(e,t){return typeof e=="function"?e(t):e}function yt(e,t){return typeof e=="function"?e(t):e}function dl(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==ns(s,t.options))return!1}else if(!Br(t.queryKey,s))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||o&&!o(t))}function hl(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Sn(t.options.mutationKey)!==Sn(o))return!1}else if(!Br(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ns(e,t){return((t==null?void 0:t.queryKeyHashFn)||Sn)(e)}function Sn(e){return JSON.stringify(e,(t,n)=>is(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Br(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Br(e[n],t[n])):!1}var eh=Object.prototype.hasOwnProperty;function rs(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=pl(e)&&pl(t);if(!r&&!(is(e)&&is(t)))return t;const o=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),a=s.length,c=r?new Array(a):{};let l=0;for(let f=0;f<a;f++){const u=r?f:s[f],d=e[u],h=t[u];if(d===h){c[u]=d,(r?f<o:eh.call(e,u))&&l++;continue}if(d===null||h===null||typeof d!="object"||typeof h!="object"){c[u]=h;continue}const p=rs(d,h,n+1);c[u]=p,p===d&&l++}return o===a&&l===o?e:c}function li(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function pl(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function is(e){if(!xl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!xl(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function xl(e){return Object.prototype.toString.call(e)==="[object Object]"}function th(e){return new Promise(t=>{kn.setTimeout(t,e)})}function os(e,t,n){if(typeof n.structuralSharing=="function")return n.structuralSharing(e,t);if(n.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return rs(e,t)}catch(r){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${r}`),r}return rs(e,t)}return t}function nh(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function rh(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ci=Symbol();function ml(e,t){return process.env.NODE_ENV!=="production"&&e.queryFn===ci&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ci?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ss(e,t){return typeof e=="function"?e(...t):!!e}function ih(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var oh=(Rd=class extends Xn{constructor(){super();ee(this,zn);ee(this,pn);ee(this,hr);K(this,hr,t=>{if(!An&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){B(this,pn)||this.setEventListener(B(this,hr))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,pn))==null||t.call(this),K(this,pn,void 0))}setEventListener(t){var n;K(this,hr,t),(n=B(this,pn))==null||n.call(this),K(this,pn,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){B(this,zn)!==t&&(K(this,zn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof B(this,zn)=="boolean"?B(this,zn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},zn=new WeakMap,pn=new WeakMap,hr=new WeakMap,Rd),as=new oh;function ls(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var sh=Zd;function ah(){let e=[],t=0,n=a=>{a()},r=a=>{a()},i=sh;const o=a=>{t?e.push(a):i(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&i(()=>{r(()=>{a.forEach(c=>{n(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||s()}return c},batchCalls:a=>(...c)=>{o(()=>{a(...c)})},schedule:o,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Ie=ah(),lh=(Id=class extends Xn{constructor(){super();ee(this,pr,!0);ee(this,xn);ee(this,xr);K(this,xr,t=>{if(!An&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){B(this,xn)||this.setEventListener(B(this,xr))}onUnsubscribe(){var t;this.hasListeners()||((t=B(this,xn))==null||t.call(this),K(this,xn,void 0))}setEventListener(t){var n;K(this,xr,t),(n=B(this,xn))==null||n.call(this),K(this,xn,t(this.setOnline.bind(this)))}setOnline(t){B(this,pr)!==t&&(K(this,pr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return B(this,pr)}},pr=new WeakMap,xn=new WeakMap,xr=new WeakMap,Id),ui=new lh;function ch(e){return Math.min(1e3*2**e,3e4)}function gl(e){return(e??"online")==="online"?ui.isOnline():!0}var cs=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function yl(e){let t=!1,n=0,r;const i=ls(),o=()=>i.status!=="pending",s=x=>{var m;if(!o()){const g=new cs(x);d(g),(m=e.onCancel)==null||m.call(e,g)}},a=()=>{t=!0},c=()=>{t=!1},l=()=>as.isFocused()&&(e.networkMode==="always"||ui.isOnline())&&e.canRun(),f=()=>gl(e.networkMode)&&e.canRun(),u=x=>{o()||(r==null||r(),i.resolve(x))},d=x=>{o()||(r==null||r(),i.reject(x))},h=()=>new Promise(x=>{var m;r=g=>{(o()||l())&&x(g)},(m=e.onPause)==null||m.call(e)}).then(()=>{var x;r=void 0,o()||(x=e.onContinue)==null||x.call(e)}),p=()=>{if(o())return;let x;const m=n===0?e.initialPromise:void 0;try{x=m??e.fn()}catch(g){x=Promise.reject(g)}Promise.resolve(x).then(u).catch(g=>{var C;if(o())return;const b=e.retry??(An?0:3),y=e.retryDelay??ch,v=typeof y=="function"?y(n,g):y,k=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,g);if(t||!k){d(g);return}n++,(C=e.onFail)==null||C.call(e,n,g),th(v).then(()=>l()?void 0:h()).then(()=>{t?d(g):p()})})};return{promise:i,status:()=>i.status,cancel:s,continue:()=>(r==null||r(),i),cancelRetry:a,continueRetry:c,canStart:f,start:()=>(f()?p():h().then(p),i)}}var bl=(Nd=class{constructor(){ee(this,Un)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ts(this.gcTime)&&K(this,Un,kn.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(An?1/0:300*1e3))}clearGcTimeout(){B(this,Un)&&(kn.clearTimeout(B(this,Un)),K(this,Un,void 0))}},Un=new WeakMap,Nd),uh=(Ld=class extends bl{constructor(t){super();ee(this,Bt);ee(this,Hn);ee(this,mr);ee(this,Et);ee(this,qn);ee(this,He);ee(this,ei);ee(this,jn);K(this,jn,!1),K(this,ei,t.defaultOptions),this.setOptions(t.options),this.observers=[],K(this,qn,t.client),K(this,Et,B(this,qn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,K(this,Hn,El(this.options)),this.state=t.state??B(this,Hn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=B(this,He))==null?void 0:t.promise}setOptions(t){if(this.options={...B(this,ei),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=El(this.options);n.data!==void 0&&(this.setState(wl(n.data,n.dataUpdatedAt)),K(this,Hn,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&B(this,Et).remove(this)}setData(t,n){const r=os(this.state.data,t,this.options);return ce(this,Bt,on).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ce(this,Bt,on).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=B(this,He))==null?void 0:r.promise;return(i=B(this,He))==null||i.cancel(t),n?n.then(Ze).catch(Ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(B(this,Hn))}isActive(){return this.observers.some(t=>yt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ci||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>sn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!fl(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=B(this,He))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=B(this,He))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),B(this,Et).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(B(this,He)&&(B(this,jn)?B(this,He).cancel({revert:!0}):B(this,He).cancelRetry()),this.scheduleGc()),B(this,Et).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ce(this,Bt,on).call(this,{type:"invalidate"})}async fetch(t,n){var c,l,f,u,d,h,p,x,m,g,b,y;if(this.state.fetchStatus!=="idle"&&((c=B(this,He))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(B(this,He))return B(this,He).continueRetry(),B(this,He).promise}if(t&&this.setOptions(t),!this.options.queryFn){const v=this.observers.find(k=>k.options.queryFn);v&&this.setOptions(v.options)}process.env.NODE_ENV!=="production"&&(Array.isArray(this.options.queryKey)||console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));const r=new AbortController,i=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(K(this,jn,!0),r.signal)})},o=()=>{const v=ml(this.options,n),C=(()=>{const _={client:B(this,qn),queryKey:this.queryKey,meta:this.meta};return i(_),_})();return K(this,jn,!1),this.options.persister?this.options.persister(v,C,this):v(C)},a=(()=>{const v={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:B(this,qn),state:this.state,fetchFn:o};return i(v),v})();(l=this.options.behavior)==null||l.onFetch(a,this),K(this,mr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=a.fetchOptions)==null?void 0:f.meta))&&ce(this,Bt,on).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta}),K(this,He,yl({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:v=>{v instanceof cs&&v.revert&&this.setState({...B(this,mr),fetchStatus:"idle"}),r.abort()},onFail:(v,k)=>{ce(this,Bt,on).call(this,{type:"failed",failureCount:v,error:k})},onPause:()=>{ce(this,Bt,on).call(this,{type:"pause"})},onContinue:()=>{ce(this,Bt,on).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const v=await B(this,He).start();if(v===void 0)throw process.env.NODE_ENV!=="production"&&console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),new Error(`${this.queryHash} data is undefined`);return this.setData(v),(h=(d=B(this,Et).config).onSuccess)==null||h.call(d,v,this),(x=(p=B(this,Et).config).onSettled)==null||x.call(p,v,this.state.error,this),v}catch(v){if(v instanceof cs){if(v.silent)return B(this,He).promise;if(v.revert){if(this.state.data===void 0)throw v;return this.state.data}}throw ce(this,Bt,on).call(this,{type:"error",error:v}),(g=(m=B(this,Et).config).onError)==null||g.call(m,v,this),(y=(b=B(this,Et).config).onSettled)==null||y.call(b,this.state.data,v,this),v}finally{this.scheduleGc()}}},Hn=new WeakMap,mr=new WeakMap,Et=new WeakMap,qn=new WeakMap,He=new WeakMap,ei=new WeakMap,jn=new WeakMap,Bt=new WeakSet,on=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...vl(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...wl(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return K(this,mr,t.manual?i:void 0),i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ie.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),B(this,Et).notify({query:this,type:"updated",action:t})})},Ld);function vl(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gl(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function wl(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function El(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var fh=(Md=class extends Xn{constructor(t,n){super();ee(this,ye);ee(this,ft);ee(this,me);ee(this,ti);ee(this,tt);ee(this,$n);ee(this,gr);ee(this,Yt);ee(this,mn);ee(this,ni);ee(this,yr);ee(this,br);ee(this,Wn);ee(this,Vn);ee(this,gn);ee(this,vr,new Set);this.options=n,K(this,ft,t),K(this,mn,null),K(this,Yt,ls()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(B(this,me).addObserver(this),Cl(B(this,me),this.options)?ce(this,ye,ai).call(this):this.updateResult(),ce(this,ye,sl).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return us(B(this,me),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return us(B(this,me),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ce(this,ye,al).call(this),ce(this,ye,ll).call(this),B(this,me).removeObserver(this)}setOptions(t){const n=this.options,r=B(this,me);if(this.options=B(this,ft).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yt(this.options.enabled,B(this,me))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ce(this,ye,cl).call(this),B(this,me).setOptions(this.options),n._defaulted&&!li(this.options,n)&&B(this,ft).getQueryCache().notify({type:"observerOptionsUpdated",query:B(this,me),observer:this});const i=this.hasListeners();i&&kl(B(this,me),r,this.options,n)&&ce(this,ye,ai).call(this),this.updateResult(),i&&(B(this,me)!==r||yt(this.options.enabled,B(this,me))!==yt(n.enabled,B(this,me))||sn(this.options.staleTime,B(this,me))!==sn(n.staleTime,B(this,me)))&&ce(this,ye,rl).call(this);const o=ce(this,ye,il).call(this);i&&(B(this,me)!==r||yt(this.options.enabled,B(this,me))!==yt(n.enabled,B(this,me))||o!==B(this,gn))&&ce(this,ye,ol).call(this,o)}getOptimisticResult(t){const n=B(this,ft).getQueryCache().build(B(this,ft),t),r=this.createResult(n,t);return hh(this,r)&&(K(this,tt,r),K(this,gr,this.options),K(this,$n,B(this,me).state)),r}getCurrentResult(){return B(this,tt)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&B(this,Yt).status==="pending"&&B(this,Yt).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){B(this,vr).add(t)}getCurrentQuery(){return B(this,me)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=B(this,ft).defaultQueryOptions(t),r=B(this,ft).getQueryCache().build(B(this,ft),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ce(this,ye,ai).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),B(this,tt)))}createResult(t,n){var O;const r=B(this,me),i=this.options,o=B(this,tt),s=B(this,$n),a=B(this,gr),l=t!==r?t.state:B(this,ti),{state:f}=t;let u={...f},d=!1,h;if(n._optimisticResults){const E=this.hasListeners(),D=!E&&Cl(t,n),F=E&&kl(t,r,n,i);(D||F)&&(u={...u,...vl(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(u.fetchStatus="idle")}let{error:p,errorUpdatedAt:x,status:m}=u;h=u.data;let g=!1;if(n.placeholderData!==void 0&&h===void 0&&m==="pending"){let E;o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData)?(E=o.data,g=!0):E=typeof n.placeholderData=="function"?n.placeholderData((O=B(this,br))==null?void 0:O.state.data,B(this,br)):n.placeholderData,E!==void 0&&(m="success",h=os(o==null?void 0:o.data,E,n),d=!0)}if(n.select&&h!==void 0&&!g)if(o&&h===(s==null?void 0:s.data)&&n.select===B(this,ni))h=B(this,yr);else try{K(this,ni,n.select),h=n.select(h),h=os(o==null?void 0:o.data,h,n),K(this,yr,h),K(this,mn,null)}catch(E){K(this,mn,E)}B(this,mn)&&(p=B(this,mn),h=B(this,yr),x=Date.now(),m="error");const b=u.fetchStatus==="fetching",y=m==="pending",v=m==="error",k=y&&b,C=h!==void 0,A={status:m,fetchStatus:u.fetchStatus,isPending:y,isSuccess:m==="success",isError:v,isInitialLoading:k,isLoading:k,data:h,dataUpdatedAt:u.dataUpdatedAt,error:p,errorUpdatedAt:x,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdateCount:u.errorUpdateCount,isFetched:u.dataUpdateCount>0||u.errorUpdateCount>0,isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:v&&!C,isPaused:u.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:v&&C,isStale:fs(t,n),refetch:this.refetch,promise:B(this,Yt),isEnabled:yt(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const E=A.data!==void 0,D=A.status==="error"&&!E,F=L=>{D?L.reject(A.error):E&&L.resolve(A.data)},R=()=>{const L=K(this,Yt,A.promise=ls());F(L)},U=B(this,Yt);switch(U.status){case"pending":t.queryHash===r.queryHash&&F(U);break;case"fulfilled":(D||A.data!==U.value)&&R();break;case"rejected":(!D||A.error!==U.reason)&&R();break}}return A}updateResult(){const t=B(this,tt),n=this.createResult(B(this,me),this.options);if(K(this,$n,B(this,me).state),K(this,gr,this.options),B(this,$n).data!==void 0&&K(this,br,B(this,me)),li(n,t))return;K(this,tt,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!B(this,vr).size)return!0;const s=new Set(o??B(this,vr));return this.options.throwOnError&&s.add("error"),Object.keys(B(this,tt)).some(a=>{const c=a;return B(this,tt)[c]!==t[c]&&s.has(c)})};ce(this,ye,Wd).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ce(this,ye,sl).call(this)}},ft=new WeakMap,me=new WeakMap,ti=new WeakMap,tt=new WeakMap,$n=new WeakMap,gr=new WeakMap,Yt=new WeakMap,mn=new WeakMap,ni=new WeakMap,yr=new WeakMap,br=new WeakMap,Wn=new WeakMap,Vn=new WeakMap,gn=new WeakMap,vr=new WeakMap,ye=new WeakSet,ai=function(t){ce(this,ye,cl).call(this);let n=B(this,me).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ze)),n},rl=function(){ce(this,ye,al).call(this);const t=sn(this.options.staleTime,B(this,me));if(An||B(this,tt).isStale||!ts(t))return;const r=fl(B(this,tt).dataUpdatedAt,t)+1;K(this,Wn,kn.setTimeout(()=>{B(this,tt).isStale||this.updateResult()},r))},il=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(B(this,me)):this.options.refetchInterval)??!1},ol=function(t){ce(this,ye,ll).call(this),K(this,gn,t),!(An||yt(this.options.enabled,B(this,me))===!1||!ts(B(this,gn))||B(this,gn)===0)&&K(this,Vn,kn.setInterval(()=>{(this.options.refetchIntervalInBackground||as.isFocused())&&ce(this,ye,ai).call(this)},B(this,gn)))},sl=function(){ce(this,ye,rl).call(this),ce(this,ye,ol).call(this,ce(this,ye,il).call(this))},al=function(){B(this,Wn)&&(kn.clearTimeout(B(this,Wn)),K(this,Wn,void 0))},ll=function(){B(this,Vn)&&(kn.clearInterval(B(this,Vn)),K(this,Vn,void 0))},cl=function(){const t=B(this,ft).getQueryCache().build(B(this,ft),this.options);if(t===B(this,me))return;const n=B(this,me);K(this,me,t),K(this,ti,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Wd=function(t){Ie.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(B(this,tt))}),B(this,ft).getQueryCache().notify({query:B(this,me),type:"observerResultsUpdated"})})},Md);function dh(e,t){return yt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Cl(e,t){return dh(e,t)||e.state.data!==void 0&&us(e,t,t.refetchOnMount)}function us(e,t,n){if(yt(t.enabled,e)!==!1&&sn(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&fs(e,t)}return!1}function kl(e,t,n,r){return(e!==t||yt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&fs(e,n)}function fs(e,t){return yt(t.enabled,e)!==!1&&e.isStaleByTime(sn(t.staleTime,e))}function hh(e,t){return!li(e.getCurrentResult(),t)}function Al(e){return{onFetch:(t,n)=>{var f,u,d,h,p;const r=t.options,i=(d=(u=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:u.fetchMore)==null?void 0:d.direction,o=((h=t.state.data)==null?void 0:h.pages)||[],s=((p=t.state.data)==null?void 0:p.pageParams)||[];let a={pages:[],pageParams:[]},c=0;const l=async()=>{let x=!1;const m=y=>{ih(y,()=>t.signal,()=>x=!0)},g=ml(t.options,t.fetchOptions),b=async(y,v,k)=>{if(x)return Promise.reject();if(v==null&&y.pages.length)return Promise.resolve(y);const _=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:v,direction:k?"backward":"forward",meta:t.options.meta};return m(D),D})(),A=await g(_),{maxPages:O}=t.options,E=k?rh:nh;return{pages:E(y.pages,A,O),pageParams:E(y.pageParams,v,O)}};if(i&&o.length){const y=i==="backward",v=y?ph:Sl,k={pages:o,pageParams:s},C=v(r,k);a=await b(k,C,y)}else{const y=e??o.length;do{const v=c===0?s[0]??r.initialPageParam:Sl(r,a);if(c>0&&v==null)break;a=await b(a,v),c++}while(c<y)}return a};t.options.persister?t.fetchFn=()=>{var x,m;return(m=(x=t.options).persister)==null?void 0:m.call(x,l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=l}}}function Sl(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ph(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var xh=(zd=class extends bl{constructor(t){super();ee(this,Ut);ee(this,ri);ee(this,zt);ee(this,Xe);ee(this,Kn);K(this,ri,t.client),this.mutationId=t.mutationId,K(this,Xe,t.mutationCache),K(this,zt,[]),this.state=t.state||_l(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){B(this,zt).includes(t)||(B(this,zt).push(t),this.clearGcTimeout(),B(this,Xe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){K(this,zt,B(this,zt).filter(n=>n!==t)),this.scheduleGc(),B(this,Xe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){B(this,zt).length||(this.state.status==="pending"?this.scheduleGc():B(this,Xe).remove(this))}continue(){var t;return((t=B(this,Kn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,c,l,f,u,d,h,p,x,m,g,b,y,v,k,C,_;const n=()=>{ce(this,Ut,Cn).call(this,{type:"continue"})},r={client:B(this,ri),meta:this.options.meta,mutationKey:this.options.mutationKey};K(this,Kn,yl({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(A,O)=>{ce(this,Ut,Cn).call(this,{type:"failed",failureCount:A,error:O})},onPause:()=>{ce(this,Ut,Cn).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>B(this,Xe).canRun(this)}));const i=this.state.status==="pending",o=!B(this,Kn).canStart();try{if(i)n();else{ce(this,Ut,Cn).call(this,{type:"pending",variables:t,isPaused:o}),B(this,Xe).config.onMutate&&await B(this,Xe).config.onMutate(t,this,r);const O=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t,r));O!==this.state.context&&ce(this,Ut,Cn).call(this,{type:"pending",context:O,variables:t,isPaused:o})}const A=await B(this,Kn).start();return await((l=(c=B(this,Xe).config).onSuccess)==null?void 0:l.call(c,A,t,this.state.context,this,r)),await((u=(f=this.options).onSuccess)==null?void 0:u.call(f,A,t,this.state.context,r)),await((h=(d=B(this,Xe).config).onSettled)==null?void 0:h.call(d,A,null,this.state.variables,this.state.context,this,r)),await((x=(p=this.options).onSettled)==null?void 0:x.call(p,A,null,t,this.state.context,r)),ce(this,Ut,Cn).call(this,{type:"success",data:A}),A}catch(A){try{await((g=(m=B(this,Xe).config).onError)==null?void 0:g.call(m,A,t,this.state.context,this,r))}catch(O){Promise.reject(O)}try{await((y=(b=this.options).onError)==null?void 0:y.call(b,A,t,this.state.context,r))}catch(O){Promise.reject(O)}try{await((k=(v=B(this,Xe).config).onSettled)==null?void 0:k.call(v,void 0,A,this.state.variables,this.state.context,this,r))}catch(O){Promise.reject(O)}try{await((_=(C=this.options).onSettled)==null?void 0:_.call(C,void 0,A,t,this.state.context,r))}catch(O){Promise.reject(O)}throw ce(this,Ut,Cn).call(this,{type:"error",error:A}),A}finally{B(this,Xe).runNext(this)}}},ri=new WeakMap,zt=new WeakMap,Xe=new WeakMap,Kn=new WeakMap,Ut=new WeakSet,Cn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ie.batch(()=>{B(this,zt).forEach(r=>{r.onMutationUpdate(t)}),B(this,Xe).notify({mutation:this,type:"updated",action:t})})},zd);function _l(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var mh=(Ud=class extends Xn{constructor(t={}){super();ee(this,Zt);ee(this,Dt);ee(this,ii);this.config=t,K(this,Zt,new Set),K(this,Dt,new Map),K(this,ii,0)}build(t,n,r){const i=new xh({client:t,mutationCache:this,mutationId:++Zo(this,ii)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){B(this,Zt).add(t);const n=fi(t);if(typeof n=="string"){const r=B(this,Dt).get(n);r?r.push(t):B(this,Dt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(B(this,Zt).delete(t)){const n=fi(t);if(typeof n=="string"){const r=B(this,Dt).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&B(this,Dt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=fi(t);if(typeof n=="string"){const r=B(this,Dt).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=fi(t);if(typeof n=="string"){const i=(r=B(this,Dt).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ie.batch(()=>{B(this,Zt).forEach(t=>{this.notify({type:"removed",mutation:t})}),B(this,Zt).clear(),B(this,Dt).clear()})}getAll(){return Array.from(B(this,Zt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>hl(n,r))}findAll(t={}){return this.getAll().filter(n=>hl(t,n))}notify(t){Ie.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ie.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ze))))}},Zt=new WeakMap,Dt=new WeakMap,ii=new WeakMap,Ud);function fi(e){var t;return(t=e.options.scope)==null?void 0:t.id}var gh=(Hd=class extends Xn{constructor(n,r){super();ee(this,tn);ee(this,Jt);ee(this,yn);ee(this,dt);ee(this,en);K(this,Jt,n),this.setOptions(r),this.bindMethods(),ce(this,tn,Jo).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=B(this,Jt).defaultMutationOptions(n),li(this.options,r)||B(this,Jt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:B(this,dt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Sn(r.mutationKey)!==Sn(this.options.mutationKey)?this.reset():((i=B(this,dt))==null?void 0:i.state.status)==="pending"&&B(this,dt).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=B(this,dt))==null||n.removeObserver(this)}onMutationUpdate(n){ce(this,tn,Jo).call(this),ce(this,tn,ul).call(this,n)}getCurrentResult(){return B(this,yn)}reset(){var n;(n=B(this,dt))==null||n.removeObserver(this),K(this,dt,void 0),ce(this,tn,Jo).call(this),ce(this,tn,ul).call(this)}mutate(n,r){var i;return K(this,en,r),(i=B(this,dt))==null||i.removeObserver(this),K(this,dt,B(this,Jt).getMutationCache().build(B(this,Jt),this.options)),B(this,dt).addObserver(this),B(this,dt).execute(n)}},Jt=new WeakMap,yn=new WeakMap,dt=new WeakMap,en=new WeakMap,tn=new WeakSet,Jo=function(){var r;const n=((r=B(this,dt))==null?void 0:r.state)??_l();K(this,yn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},ul=function(n){Ie.batch(()=>{var r,i,o,s,a,c,l,f;if(B(this,en)&&this.hasListeners()){const u=B(this,yn).variables,d=B(this,yn).context,h={client:B(this,Jt),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=B(this,en)).onSuccess)==null||i.call(r,n.data,u,d,h)}catch(p){Promise.reject(p)}try{(s=(o=B(this,en)).onSettled)==null||s.call(o,n.data,null,u,d,h)}catch(p){Promise.reject(p)}}else if((n==null?void 0:n.type)==="error"){try{(c=(a=B(this,en)).onError)==null||c.call(a,n.error,u,d,h)}catch(p){Promise.reject(p)}try{(f=(l=B(this,en)).onSettled)==null||f.call(l,void 0,n.error,u,d,h)}catch(p){Promise.reject(p)}}}this.listeners.forEach(u=>{u(B(this,yn))})})},Hd),yh=(qd=class extends Xn{constructor(t={}){super();ee(this,Ht);this.config=t,K(this,Ht,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??ns(i,n);let s=this.get(o);return s||(s=new uh({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){B(this,Ht).has(t.queryHash)||(B(this,Ht).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=B(this,Ht).get(t.queryHash);n&&(t.destroy(),n===t&&B(this,Ht).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ie.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return B(this,Ht).get(t)}getAll(){return[...B(this,Ht).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>dl(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>dl(t,r)):n}notify(t){Ie.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ie.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ie.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ht=new WeakMap,qd),bh=(jd=class{constructor(e={}){ee(this,Ae);ee(this,bn);ee(this,vn);ee(this,wr);ee(this,Er);ee(this,wn);ee(this,Cr);ee(this,kr);K(this,Ae,e.queryCache||new yh),K(this,bn,e.mutationCache||new mh),K(this,vn,e.defaultOptions||{}),K(this,wr,new Map),K(this,Er,new Map),K(this,wn,0)}mount(){Zo(this,wn)._++,B(this,wn)===1&&(K(this,Cr,as.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,Ae).onFocus())})),K(this,kr,ui.subscribe(async e=>{e&&(await this.resumePausedMutations(),B(this,Ae).onOnline())})))}unmount(){var e,t;Zo(this,wn)._--,B(this,wn)===0&&((e=B(this,Cr))==null||e.call(this),K(this,Cr,void 0),(t=B(this,kr))==null||t.call(this),K(this,kr,void 0))}isFetching(e){return B(this,Ae).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return B(this,bn).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=B(this,Ae).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=B(this,Ae).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(sn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return B(this,Ae).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=B(this,Ae).get(r.queryHash),o=i==null?void 0:i.state.data,s=Jd(t,o);if(s!==void 0)return B(this,Ae).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Ie.batch(()=>B(this,Ae).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=B(this,Ae).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=B(this,Ae);Ie.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=B(this,Ae);return Ie.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ie.batch(()=>B(this,Ae).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Ze).catch(Ze)}invalidateQueries(e,t={}){return Ie.batch(()=>(B(this,Ae).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ie.batch(()=>B(this,Ae).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Ze)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Ze)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=B(this,Ae).build(this,t);return n.isStaleByTime(sn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ze).catch(Ze)}fetchInfiniteQuery(e){return e.behavior=Al(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ze).catch(Ze)}ensureInfiniteQueryData(e){return e.behavior=Al(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ui.isOnline()?B(this,bn).resumePausedMutations():Promise.resolve()}getQueryCache(){return B(this,Ae)}getMutationCache(){return B(this,bn)}getDefaultOptions(){return B(this,vn)}setDefaultOptions(e){K(this,vn,e)}setQueryDefaults(e,t){B(this,wr).set(Sn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...B(this,wr).values()],n={};return t.forEach(r=>{Br(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){B(this,Er).set(Sn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...B(this,Er).values()],n={};return t.forEach(r=>{Br(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...B(this,vn).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ns(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===ci&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...B(this,vn).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){B(this,Ae).clear(),B(this,bn).clear()}},Ae=new WeakMap,bn=new WeakMap,vn=new WeakMap,wr=new WeakMap,Er=new WeakMap,wn=new WeakMap,Cr=new WeakMap,kr=new WeakMap,jd),Bl=P.createContext(void 0),Dl=e=>{const t=P.useContext(Bl);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},vh=({client:e,children:t})=>(P.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(Bl.Provider,{value:e,children:t})),Fl=P.createContext(!1),wh=()=>P.useContext(Fl);Fl.Provider;function Eh(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ch=P.createContext(Eh()),kh=()=>P.useContext(Ch),Ah=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?ss(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Sh=e=>{P.useEffect(()=>{e.clearReset()},[e])},_h=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ss(n,[e.error,r])),Bh=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Dh=(e,t)=>e.isLoading&&e.isFetching&&!t,Fh=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Tl=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Th(e,t,n){var d,h,p,x;if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const r=wh(),i=kh(),o=Dl(),s=o.defaultQueryOptions(e);(h=(d=o.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,s);const a=o.getQueryCache().get(s.queryHash);process.env.NODE_ENV!=="production"&&(s.queryFn||console.error(`[${s.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),s._optimisticResults=r?"isRestoring":"optimistic",Bh(s),Ah(s,i,a),Sh(i);const c=!o.getQueryCache().get(s.queryHash),[l]=P.useState(()=>new t(o,s)),f=l.getOptimisticResult(s),u=!r&&e.subscribed!==!1;if(P.useSyncExternalStore(P.useCallback(m=>{const g=u?l.subscribe(Ie.batchCalls(m)):Ze;return l.updateResult(),g},[l,u]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),P.useEffect(()=>{l.setOptions(s)},[s,l]),Fh(s,f))throw Tl(s,l,i);if(_h({result:f,errorResetBoundary:i,throwOnError:s.throwOnError,query:a,suspense:s.suspense}))throw f.error;if((x=(p=o.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||x.call(p,s,f),s.experimental_prefetchInRender&&!An&&Dh(f,r)){const m=c?Tl(s,l,i):a==null?void 0:a.promise;m==null||m.catch(Ze).finally(()=>{l.updateResult()})}return s.notifyOnChangeProps?f:l.trackResult(f)}function Oh(e,t){return Th(e,fh)}function Ph(e,t){const n=Dl(),[r]=P.useState(()=>new gh(n,e));P.useEffect(()=>{r.setOptions(e)},[r,e]);const i=P.useSyncExternalStore(P.useCallback(s=>r.subscribe(Ie.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=P.useCallback((s,a)=>{r.mutate(s,a).catch(Ze)},[r]);if(i.error&&ss(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}/**
2
+ * @license lucide-react v0.563.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const Ol=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
7
+ * @license lucide-react v0.563.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const Rh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
12
+ * @license lucide-react v0.563.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const Ih=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
17
+ * @license lucide-react v0.563.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const Pl=e=>{const t=Ih(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
22
+ * @license lucide-react v0.563.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */var Nh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
27
+ * @license lucide-react v0.563.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const Lh=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
32
+ * @license lucide-react v0.563.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const Mh=z.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},c)=>z.createElement("svg",{ref:c,...Nh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ol("lucide",i),...!o&&!Lh(a)&&{"aria-hidden":"true"},...a},[...s.map(([l,f])=>z.createElement(l,f)),...Array.isArray(o)?o:[o]]));/**
37
+ * @license lucide-react v0.563.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const ot=(e,t)=>{const n=z.forwardRef(({className:r,...i},o)=>z.createElement(Mh,{ref:o,iconNode:t,className:Ol(`lucide-${Rh(Pl(e))}`,`lucide-${e}`,r),...i}));return n.displayName=Pl(e),n};/**
42
+ * @license lucide-react v0.563.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const zh=ot("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
47
+ * @license lucide-react v0.563.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const Uh=ot("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
52
+ * @license lucide-react v0.563.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const Hh=ot("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
57
+ * @license lucide-react v0.563.0 - ISC
58
+ *
59
+ * This source code is licensed under the ISC license.
60
+ * See the LICENSE file in the root directory of this source tree.
61
+ */const qh=ot("file-spreadsheet",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]);/**
62
+ * @license lucide-react v0.563.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */const di=ot("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
67
+ * @license lucide-react v0.563.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const jh=ot("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);/**
72
+ * @license lucide-react v0.563.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */const $h=ot("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
77
+ * @license lucide-react v0.563.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const Wh=ot("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
82
+ * @license lucide-react v0.563.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const Vh=ot("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);/**
87
+ * @license lucide-react v0.563.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const Kh=ot("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
92
+ * @license lucide-react v0.563.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const Qh=ot("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);/**
97
+ * @license lucide-react v0.563.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const Xh=ot("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
102
+ * @license lucide-react v0.563.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const Gh=ot("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
107
+ * @license lucide-react v0.563.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const hi=ot("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Yh({config:e,onClose:t}){return T.jsxs("div",{className:"p-4 flex justify-between items-center",style:{backgroundColor:e.headerBackgroundColor},children:[T.jsxs("div",{className:"flex items-center gap-3",children:[T.jsx("div",{className:"w-10 h-10 rounded-full bg-white/10 flex items-center justify-center backdrop-blur-sm overflow-hidden",children:e.headerImage?T.jsx("img",{src:e.headerImage,alt:"Bot",className:"w-full h-full object-cover"}):T.jsx(zh,{className:"w-6 h-6 text-white"})}),T.jsxs("div",{className:"flex flex-col",children:[T.jsx("h3",{className:"font-semibold text-lg leading-tight",style:{color:e.headerTextColor},children:e.headerTitle}),T.jsx("span",{className:"text-xs",style:{color:e.subLabelColor},children:e.subLabelTitle})]})]}),T.jsx("button",{onClick:t,className:"p-1 hover:bg-black/10 rounded-full transition-colors",style:{color:e.closeButtonColor},children:T.jsx(hi,{})})]})}function D4(){}function F4(){}function Zh(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Jh=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ep=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tp={};function Rl(e,t){return(tp.jsx?ep:Jh).test(e)}const np=/[ \t\n\f\r]/g;function rp(e){return typeof e=="object"?e.type==="text"?Il(e.value):!1:Il(e)}function Il(e){return e.replace(np,"")===""}class Dr{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Dr.prototype.normal={},Dr.prototype.property={},Dr.prototype.space=void 0;function Nl(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Dr(n,r,t)}function ds(e){return e.toLowerCase()}class st{constructor(t,n){this.attribute=n,this.property=t}}st.prototype.attribute="",st.prototype.booleanish=!1,st.prototype.boolean=!1,st.prototype.commaOrSpaceSeparated=!1,st.prototype.commaSeparated=!1,st.prototype.defined=!1,st.prototype.mustUseProperty=!1,st.prototype.number=!1,st.prototype.overloadedBoolean=!1,st.prototype.property="",st.prototype.spaceSeparated=!1,st.prototype.space=void 0;let ip=0;const le=_n(),De=_n(),hs=_n(),W=_n(),we=_n(),Gn=_n(),pt=_n();function _n(){return 2**++ip}const ps=Object.freeze(Object.defineProperty({__proto__:null,boolean:le,booleanish:De,commaOrSpaceSeparated:pt,commaSeparated:Gn,number:W,overloadedBoolean:hs,spaceSeparated:we},Symbol.toStringTag,{value:"Module"})),xs=Object.keys(ps);class ms extends st{constructor(t,n,r,i){let o=-1;if(super(t,n),Ll(this,"space",i),typeof r=="number")for(;++o<xs.length;){const s=xs[o];Ll(this,xs[o],(r&ps[s])===ps[s])}}}ms.prototype.defined=!0;function Ll(e,t,n){n&&(e[t]=n)}function Yn(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new ms(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ds(r)]=r,n[ds(o.attribute)]=r}return new Dr(t,n,e.space)}const Ml=Yn({properties:{ariaActiveDescendant:null,ariaAtomic:De,ariaAutoComplete:null,ariaBusy:De,ariaChecked:De,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:we,ariaCurrent:null,ariaDescribedBy:we,ariaDetails:null,ariaDisabled:De,ariaDropEffect:we,ariaErrorMessage:null,ariaExpanded:De,ariaFlowTo:we,ariaGrabbed:De,ariaHasPopup:null,ariaHidden:De,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:we,ariaLevel:W,ariaLive:null,ariaModal:De,ariaMultiLine:De,ariaMultiSelectable:De,ariaOrientation:null,ariaOwns:we,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:De,ariaReadOnly:De,ariaRelevant:null,ariaRequired:De,ariaRoleDescription:we,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:De,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function zl(e,t){return t in e?e[t]:t}function Ul(e,t){return zl(e,t.toLowerCase())}const op=Yn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Gn,acceptCharset:we,accessKey:we,action:null,allow:null,allowFullScreen:le,allowPaymentRequest:le,allowUserMedia:le,alt:null,as:null,async:le,autoCapitalize:null,autoComplete:we,autoFocus:le,autoPlay:le,blocking:we,capture:null,charSet:null,checked:le,cite:null,className:we,cols:W,colSpan:null,content:null,contentEditable:De,controls:le,controlsList:we,coords:W|Gn,crossOrigin:null,data:null,dateTime:null,decoding:null,default:le,defer:le,dir:null,dirName:null,disabled:le,download:hs,draggable:De,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:le,formTarget:null,headers:we,height:W,hidden:hs,high:W,href:null,hrefLang:null,htmlFor:we,httpEquiv:we,id:null,imageSizes:null,imageSrcSet:null,inert:le,inputMode:null,integrity:null,is:null,isMap:le,itemId:null,itemProp:we,itemRef:we,itemScope:le,itemType:we,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:le,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:le,muted:le,name:null,nonce:null,noModule:le,noValidate:le,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:le,optimum:W,pattern:null,ping:we,placeholder:null,playsInline:le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:le,referrerPolicy:null,rel:we,required:le,reversed:le,rows:W,rowSpan:W,sandbox:we,scope:null,scoped:le,seamless:le,selected:le,shadowRootClonable:le,shadowRootDelegatesFocus:le,shadowRootMode:null,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:De,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:le,useMap:null,value:De,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:we,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:le,declare:le,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:le,noHref:le,noShade:le,noWrap:le,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:De,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:le,disableRemotePlayback:le,prefix:null,property:null,results:W,security:null,unselectable:null},space:"html",transform:Ul}),sp=Yn({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"},properties:{about:pt,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:we,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:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:le,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,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:Gn,g2:Gn,glyphName:Gn,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:pt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,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:W,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:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:we,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:pt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:pt,rev:pt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:pt,requiredFeatures:pt,requiredFonts:pt,requiredFormats:pt,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:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:pt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:pt,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:pt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:zl}),Hl=Yn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),ql=Yn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ul}),jl=Yn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ap={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"},lp=/[A-Z]/g,$l=/-[a-z]/g,cp=/^data[-\w.:]+$/i;function up(e,t){const n=ds(t);let r=t,i=st;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&cp.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace($l,dp);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!$l.test(o)){let s=o.replace(lp,fp);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=ms}return new i(r,t)}function fp(e){return"-"+e.toLowerCase()}function dp(e){return e.charAt(1).toUpperCase()}const hp=Nl([Ml,op,Hl,ql,jl],"html"),gs=Nl([Ml,sp,Hl,ql,jl],"svg");function pp(e){return e.join(" ").trim()}var ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xp(e){if(Object.prototype.hasOwnProperty.call(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 Zn={},vs,Wl;function mp(){if(Wl)return vs;Wl=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,a=/^\s+|\s+$/g,c=`
112
+ `,l="/",f="*",u="",d="comment",h="declaration";function p(m,g){if(typeof m!="string")throw new TypeError("First argument must be a string");if(!m)return[];g=g||{};var b=1,y=1;function v(U){var L=U.match(t);L&&(b+=L.length);var j=U.lastIndexOf(c);y=~j?U.length-j:y+U.length}function k(){var U={line:b,column:y};return function(L){return L.position=new C(U),O(),L}}function C(U){this.start=U,this.end={line:b,column:y},this.source=g.source}C.prototype.content=m;function _(U){var L=new Error(g.source+":"+b+":"+y+": "+U);if(L.reason=U,L.filename=g.source,L.line=b,L.column=y,L.source=m,!g.silent)throw L}function A(U){var L=U.exec(m);if(L){var j=L[0];return v(j),m=m.slice(j.length),L}}function O(){A(n)}function E(U){var L;for(U=U||[];L=D();)L!==!1&&U.push(L);return U}function D(){var U=k();if(!(l!=m.charAt(0)||f!=m.charAt(1))){for(var L=2;u!=m.charAt(L)&&(f!=m.charAt(L)||l!=m.charAt(L+1));)++L;if(L+=2,u===m.charAt(L-1))return _("End of comment missing");var j=m.slice(2,L-2);return y+=2,v(j),m=m.slice(L),y+=2,U({type:d,comment:j})}}function F(){var U=k(),L=A(r);if(L){if(D(),!A(i))return _("property missing ':'");var j=A(o),X=U({type:h,property:x(L[0].replace(e,u)),value:j?x(j[0].replace(e,u)):u});return A(s),X}}function R(){var U=[];E(U);for(var L;L=F();)L!==!1&&(U.push(L),E(U));return U}return O(),R()}function x(m){return m?m.replace(a,u):u}return vs=p,vs}var Vl;function gp(){if(Vl)return Zn;Vl=1;var e=Zn&&Zn.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.default=n;const t=e(mp());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const s=(0,t.default)(r),a=typeof i=="function";return s.forEach(c=>{if(c.type!=="declaration")return;const{property:l,value:f}=c;a?i(l,f,c):f&&(o=o||{},o[l]=f)}),o}return Zn}var Fr={},Kl;function yp(){if(Kl)return Fr;Kl=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(l){return!l||n.test(l)||e.test(l)},s=function(l,f){return f.toUpperCase()},a=function(l,f){return"".concat(f,"-")},c=function(l,f){return f===void 0&&(f={}),o(l)?l:(l=l.toLowerCase(),f.reactCompat?l=l.replace(i,a):l=l.replace(r,a),l.replace(t,s))};return Fr.camelCase=c,Fr}var Tr,Ql;function bp(){if(Ql)return Tr;Ql=1;var e=Tr&&Tr.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(gp()),n=yp();function r(i,o){var s={};return!i||typeof i!="string"||(0,t.default)(i,function(a,c){a&&c&&(s[(0,n.camelCase)(a,o)]=c)}),s}return r.default=r,Tr=r,Tr}var vp=bp();const wp=bs(vp),Xl=Gl("end"),ws=Gl("start");function Gl(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 Ep(e){const t=ws(e),n=Xl(e);if(t&&n)return{start:t,end:n}}function Or(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Yl(e.position):"start"in e||"end"in e?Yl(e):"line"in e||"column"in e?Es(e):""}function Es(e){return Zl(e&&e.line)+":"+Zl(e&&e.column)}function Yl(e){return Es(e&&e.start)+"-"+Es(e&&e.end)}function Zl(e){return e&&typeof e=="number"?e:1}class Ve extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},s=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(s=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=Or(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=s&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ve.prototype.file="",Ve.prototype.name="",Ve.prototype.reason="",Ve.prototype.message="",Ve.prototype.stack="",Ve.prototype.column=void 0,Ve.prototype.line=void 0,Ve.prototype.ancestors=void 0,Ve.prototype.cause=void 0,Ve.prototype.fatal=void 0,Ve.prototype.place=void 0,Ve.prototype.ruleId=void 0,Ve.prototype.source=void 0;const Cs={}.hasOwnProperty,Cp=new Map,kp=/[A-Z]/g,Ap=new Set(["table","tbody","thead","tfoot","tr"]),Sp=new Set(["td","th"]),Jl="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function _p(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=Ip(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=Rp(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"?gs:hp,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=ec(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function ec(e,t,n){if(t.type==="element")return Bp(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Dp(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Tp(e,t,n);if(t.type==="mdxjsEsm")return Fp(e,t);if(t.type==="root")return Op(e,t,n);if(t.type==="text")return Pp(e,t)}function Bp(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=gs,e.schema=i),e.ancestors.push(t);const o=nc(e,t.tagName,!1),s=Np(e,t);let a=As(e,t);return Ap.has(t.tagName)&&(a=a.filter(function(c){return typeof c=="string"?!rp(c):!0})),tc(e,s,o,t),ks(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function Dp(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)}Pr(e,t.position)}function Fp(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Pr(e,t.position)}function Tp(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=gs,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:nc(e,t.name,!0),s=Lp(e,t),a=As(e,t);return tc(e,s,o,t),ks(s,a),e.ancestors.pop(),e.schema=r,e.create(t,o,s,n)}function Op(e,t,n){const r={};return ks(r,As(e,t)),e.create(t,e.Fragment,r,n)}function Pp(e,t){return t.value}function tc(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ks(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Rp(e,t,n){return r;function r(i,o,s,a){const l=Array.isArray(s.children)?n:t;return a?l(o,s,a):l(o,s)}}function Ip(e,t){return n;function n(r,i,o,s){const a=Array.isArray(o.children),c=ws(r);return t(i,o,s,a,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function Np(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Cs.call(t.properties,i)){const o=Mp(e,i,t.properties[i]);if(o){const[s,a]=o;e.tableCellAlignToStyle&&s==="align"&&typeof a=="string"&&Sp.has(t.tagName)?r=a:n[s]=a}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Lp(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const s=o.expression;s.type;const a=s.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Pr(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,o=e.evaluater.evaluateExpression(a.expression)}else Pr(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function As(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Cp;for(;++r<t.children.length;){const o=t.children[r];let s;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const l=i.get(c)||0;s=c+"-"+l,i.set(c,l+1)}}const a=ec(e,o,s);a!==void 0&&n.push(a)}return n}function Mp(e,t,n){const r=up(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Zh(n):pp(n)),r.property==="style"){let i=typeof n=="object"?n:zp(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Up(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?ap[r.property]||r.property:r.attribute,n]}}function zp(e,t){try{return wp(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ve("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=Jl+"#cannot-parse-style-attribute",i}}function nc(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,s;for(;++o<i.length;){const a=Rl(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};s=s?{type:"MemberExpression",object:s,property:a,computed:!!(o&&a.type==="Literal"),optional:!1}:a}r=s}else r=Rl(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Cs.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Pr(e)}function Pr(e,t){const n=new Ve("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=Jl+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Up(e){const t={};let n;for(n in e)Cs.call(e,n)&&(t[Hp(n)]=e[n]);return t}function Hp(e){let t=e.replace(kp,qp);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function qp(e){return"-"+e.toLowerCase()}const Ss={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"]},jp={};function _s(e,t){const n=jp,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return rc(e,r,i)}function rc(e,t,n){if($p(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 ic(e.children,t,n)}return Array.isArray(e)?ic(e,t,n):""}function ic(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=rc(e[i],t,n);return r.join("")}function $p(e){return!!(e&&typeof e=="object")}const oc=document.createElement("i");function Bs(e){const t="&"+e+";";oc.innerHTML=t;const n=oc.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function xt(e,t,n,r){const i=e.length;let o=0,s;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);o<r.length;)s=r.slice(o,o+1e4),s.unshift(t,0),e.splice(...s),o+=1e4,t+=1e4}function bt(e,t){return e.length>0?(xt(e,e.length,0,t),e):t}const sc={}.hasOwnProperty;function ac(e){const t={};let n=-1;for(;++n<e.length;)Wp(t,e[n]);return t}function Wp(e,t){let n;for(n in t){const i=(sc.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let s;if(o)for(s in o){sc.call(i,s)||(i[s]=[]);const a=o[s];Vp(i[s],Array.isArray(a)?a:a?[a]:[])}}}function Vp(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);xt(e,0,0,r)}function lc(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 kt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Je=an(/[A-Za-z]/),Ke=an(/[\dA-Za-z]/),Kp=an(/[#-'*+\--9=?A-Z^-~]/);function pi(e){return e!==null&&(e<32||e===127)}const Ds=an(/\d/),Qp=an(/[\dA-Fa-f]/),Xp=an(/[!-/:-@[-`{-~]/);function te(e){return e!==null&&e<-2}function ve(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}const xi=an(new RegExp("\\p{P}|\\p{S}","u")),Bn=an(/\s/);function an(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Jn(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let s="";if(o===37&&Ke(e.charCodeAt(n+1))&&Ke(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(s=String.fromCharCode(o));else if(o>55295&&o<57344){const a=e.charCodeAt(n+1);o<56320&&a>56319&&a<57344?(s=String.fromCharCode(o,a),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ge(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return s;function s(c){return de(c)?(e.enter(n),a(c)):t(c)}function a(c){return de(c)&&o++<i?(e.consume(c),a):(e.exit(n),t(c))}}const Gp={tokenize:Yp};function Yp(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ge(e,t,"linePrefix")}function i(a){return e.enter("paragraph"),o(a)}function o(a){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return te(a)?(e.consume(a),e.exit("chunkText"),o):(e.consume(a),s)}}const Zp={tokenize:Jp},cc={tokenize:ex};function Jp(e){const t=this,n=[];let r=0,i,o,s;return a;function a(y){if(r<n.length){const v=n[r];return t.containerState=v[1],e.attempt(v[0].continuation,c,l)(y)}return l(y)}function c(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const v=t.events.length;let k=v,C;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){C=t.events[k][1].end;break}g(r);let _=v;for(;_<t.events.length;)t.events[_][1].end={...C},_++;return xt(t.events,k+1,0,t.events.slice(v)),t.events.length=_,l(y)}return a(y)}function l(y){if(r===n.length){if(!i)return d(y);if(i.currentConstruct&&i.currentConstruct.concrete)return p(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(cc,f,u)(y)}function f(y){return i&&b(),g(r),d(y)}function u(y){return t.parser.lazy[t.now().line]=r!==n.length,s=t.now().offset,p(y)}function d(y){return t.containerState={},e.attempt(cc,h,p)(y)}function h(y){return r++,n.push([t.currentConstruct,t.containerState]),d(y)}function p(y){if(y===null){i&&b(),g(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),x(y)}function x(y){if(y===null){m(e.exit("chunkFlow"),!0),g(0),e.consume(y);return}return te(y)?(e.consume(y),m(e.exit("chunkFlow")),r=0,t.interrupt=void 0,a):(e.consume(y),x)}function m(y,v){const k=t.sliceStream(y);if(v&&k.push(null),y.previous=o,o&&(o.next=y),o=y,i.defineSkip(y.start),i.write(k),t.parser.lazy[y.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<s&&(!i.events[C][1].end||i.events[C][1].end.offset>s))return;const _=t.events.length;let A=_,O,E;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){if(O){E=t.events[A][1].end;break}O=!0}for(g(r),C=_;C<t.events.length;)t.events[C][1].end={...E},C++;xt(t.events,A+1,0,t.events.slice(_)),t.events.length=C}}function g(y){let v=n.length;for(;v-- >y;){const k=n[v];t.containerState=k[1],k[0].exit.call(t,e)}n.length=y}function b(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function ex(e,t,n){return ge(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function er(e){if(e===null||ve(e)||Bn(e))return 1;if(xi(e))return 2}function mi(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Fs={name:"attention",resolveAll:tx,tokenize:nx};function tx(e,t){let n=-1,r,i,o,s,a,c,l,f;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;c=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 u={...e[r][1].end},d={...e[n][1].start};uc(u,-c),uc(d,c),s={type:c>1?"strongSequence":"emphasisSequence",start:u,end:{...e[r][1].end}},a={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:d},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...s.start},end:{...a.end}},e[r][1].end={...s.start},e[n][1].start={...a.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=bt(l,[["enter",e[r][1],t],["exit",e[r][1],t]])),l=bt(l,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),l=bt(l,mi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=bt(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,l=bt(l,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,xt(e,r-1,n-r+3,l),n=r+l.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function nx(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=er(r);let o;return s;function s(c){return o=c,e.enter("attentionSequence"),a(c)}function a(c){if(c===o)return e.consume(c),a;const l=e.exit("attentionSequence"),f=er(c),u=!f||f===2&&i||n.includes(c),d=!i||i===2&&f||n.includes(r);return l._open=!!(o===42?u:u&&(i||!d)),l._close=!!(o===42?d:d&&(f||!u)),t(c)}}function uc(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const rx={name:"autolink",tokenize:ix};function ix(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(h){return Je(h)?(e.consume(h),s):h===64?n(h):l(h)}function s(h){return h===43||h===45||h===46||Ke(h)?(r=1,a(h)):l(h)}function a(h){return h===58?(e.consume(h),r=0,c):(h===43||h===45||h===46||Ke(h))&&r++<32?(e.consume(h),a):(r=0,l(h))}function c(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||pi(h)?n(h):(e.consume(h),c)}function l(h){return h===64?(e.consume(h),f):Kp(h)?(e.consume(h),l):n(h)}function f(h){return Ke(h)?u(h):n(h)}function u(h){return h===46?(e.consume(h),r=0,f):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):d(h)}function d(h){if((h===45||Ke(h))&&r++<63){const p=h===45?d:u;return e.consume(h),p}return n(h)}}const Rr={partial:!0,tokenize:ox};function ox(e,t,n){return r;function r(o){return de(o)?ge(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||te(o)?t(o):n(o)}}const fc={continuation:{tokenize:ax},exit:lx,name:"blockQuote",tokenize:sx};function sx(e,t,n){const r=this;return i;function i(s){if(s===62){const a=r.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),o}return n(s)}function o(s){return de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function ax(e,t,n){const r=this;return i;function i(s){return de(s)?ge(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):o(s)}function o(s){return e.attempt(fc,t,n)(s)}}function lx(e){e.exit("blockQuote")}const dc={name:"characterEscape",tokenize:cx};function cx(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Xp(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const hc={name:"characterReference",tokenize:ux};function ux(e,t,n){const r=this;let i=0,o,s;return a;function a(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),c}function c(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,s=Ke,f(u))}function l(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,s=Qp,f):(e.enter("characterReferenceValue"),o=7,s=Ds,f(u))}function f(u){if(u===59&&i){const d=e.exit("characterReferenceValue");return s===Ke&&!Bs(r.sliceSerialize(d))?n(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(u)&&i++<o?(e.consume(u),f):n(u)}}const pc={partial:!0,tokenize:dx},xc={concrete:!0,name:"codeFenced",tokenize:fx};function fx(e,t,n){const r=this,i={partial:!0,tokenize:k};let o=0,s=0,a;return c;function c(C){return l(C)}function l(C){const _=r.events[r.events.length-1];return o=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,a=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(C)}function f(C){return C===a?(s++,e.consume(C),f):s<3?n(C):(e.exit("codeFencedFenceSequence"),de(C)?ge(e,u,"whitespace")(C):u(C))}function u(C){return C===null||te(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(pc,x,v)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(C))}function d(C){return C===null||te(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(C)):de(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ge(e,h,"whitespace")(C)):C===96&&C===a?n(C):(e.consume(C),d)}function h(C){return C===null||te(C)?u(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(C))}function p(C){return C===null||te(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(C)):C===96&&C===a?n(C):(e.consume(C),p)}function x(C){return e.attempt(i,v,m)(C)}function m(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),g}function g(C){return o>0&&de(C)?ge(e,b,"linePrefix",o+1)(C):b(C)}function b(C){return C===null||te(C)?e.check(pc,x,v)(C):(e.enter("codeFlowValue"),y(C))}function y(C){return C===null||te(C)?(e.exit("codeFlowValue"),b(C)):(e.consume(C),y)}function v(C){return e.exit("codeFenced"),t(C)}function k(C,_,A){let O=0;return E;function E(L){return C.enter("lineEnding"),C.consume(L),C.exit("lineEnding"),D}function D(L){return C.enter("codeFencedFence"),de(L)?ge(C,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):F(L)}function F(L){return L===a?(C.enter("codeFencedFenceSequence"),R(L)):A(L)}function R(L){return L===a?(O++,C.consume(L),R):O>=s?(C.exit("codeFencedFenceSequence"),de(L)?ge(C,U,"whitespace")(L):U(L)):A(L)}function U(L){return L===null||te(L)?(C.exit("codeFencedFence"),_(L)):A(L)}}}function dx(e,t,n){const r=this;return i;function i(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}const Ts={name:"codeIndented",tokenize:px},hx={partial:!0,tokenize:xx};function px(e,t,n){const r=this;return i;function i(l){return e.enter("codeIndented"),ge(e,o,"linePrefix",5)(l)}function o(l){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?s(l):n(l)}function s(l){return l===null?c(l):te(l)?e.attempt(hx,s,c)(l):(e.enter("codeFlowValue"),a(l))}function a(l){return l===null||te(l)?(e.exit("codeFlowValue"),s(l)):(e.consume(l),a)}function c(l){return e.exit("codeIndented"),t(l)}}function xx(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):ge(e,o,"linePrefix",5)(s)}function o(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):te(s)?i(s):n(s)}}const mx={name:"codeText",previous:yx,resolve:gx,tokenize:bx};function gx(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 yx(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function bx(e,t,n){let r=0,i,o;return s;function s(u){return e.enter("codeText"),e.enter("codeTextSequence"),a(u)}function a(u){return u===96?(e.consume(u),r++,a):(e.exit("codeTextSequence"),c(u))}function c(u){return u===null?n(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),c):u===96?(o=e.enter("codeTextSequence"),i=0,f(u)):te(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),c):(e.enter("codeTextData"),l(u))}function l(u){return u===null||u===32||u===96||te(u)?(e.exit("codeTextData"),c(u)):(e.consume(u),l)}function f(u){return u===96?(e.consume(u),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(o.type="codeTextData",l(u))}}class vx{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ir(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ir(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ir(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);Ir(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ir(this.left,n.reverse())}}}function Ir(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 mc(e){const t={};let n=-1,r,i,o,s,a,c,l;const f=new vx(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,wx(f,n)),n=t[n],l=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(s=f.get(o),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),s[1].type="lineEnding",i=o);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},a=f.slice(i,n),a.unshift(r),f.splice(i,n-i+1,a))}}return xt(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!l}function wx(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let s=n._tokenizer;s||(s=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));const a=s.events,c=[],l={};let f,u,d=-1,h=n,p=0,x=0;const m=[x];for(;h;){for(;e.get(++i)[1]!==h;);o.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),u&&s.defineSkip(h.start),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(f),h._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),u=h,h=h.next}for(h=n;++d<a.length;)a[d][0]==="exit"&&a[d-1][0]==="enter"&&a[d][1].type===a[d-1][1].type&&a[d][1].start.line!==a[d][1].end.line&&(x=d+1,m.push(x),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(s.events=[],h?(h._tokenizer=void 0,h.previous=void 0):m.pop(),d=m.length;d--;){const g=a.slice(m[d],m[d+1]),b=o.pop();c.push([b,b+g.length-1]),e.splice(b,2,g)}for(c.reverse(),d=-1;++d<c.length;)l[p+c[d][0]]=p+c[d][1],p+=c[d][1]-c[d][0]-1;return l}const Ex={resolve:kx,tokenize:Ax},Cx={partial:!0,tokenize:Sx};function kx(e){return mc(e),e}function Ax(e,t){let n;return r;function r(a){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):te(a)?e.check(Cx,s,o)(a):(e.consume(a),i)}function o(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Sx(e,t,n){const r=this;return i;function i(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ge(e,o,"linePrefix")}function o(s){if(s===null||te(s))return n(s);const a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function gc(e,t,n,r,i,o,s,a,c){const l=c||Number.POSITIVE_INFINITY;let f=0;return u;function u(g){return g===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(g),e.exit(o),d):g===null||g===32||g===41||pi(g)?n(g):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),x(g))}function d(g){return g===62?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),h(g))}function h(g){return g===62?(e.exit("chunkString"),e.exit(a),d(g)):g===null||g===60||te(g)?n(g):(e.consume(g),g===92?p:h)}function p(g){return g===60||g===62||g===92?(e.consume(g),h):h(g)}function x(g){return!f&&(g===null||g===41||ve(g))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(g)):f<l&&g===40?(e.consume(g),f++,x):g===41?(e.consume(g),f--,x):g===null||g===32||g===40||pi(g)?n(g):(e.consume(g),g===92?m:x)}function m(g){return g===40||g===41||g===92?(e.consume(g),x):x(g)}}function yc(e,t,n,r,i,o){const s=this;let a=0,c;return l;function l(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(o),f}function f(h){return a>999||h===null||h===91||h===93&&!c||h===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?n(h):h===93?(e.exit(o),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):te(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===null||h===91||h===93||te(h)||a++>999?(e.exit("chunkString"),f(h)):(e.consume(h),c||(c=!de(h)),h===92?d:u)}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}}function bc(e,t,n,r,i,o){let s;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),s=d===40?41:d,c):n(d)}function c(d){return d===s?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(o),l(d))}function l(d){return d===s?(e.exit(o),c(s)):d===null?n(d):te(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),ge(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===s||d===null||te(d)?(e.exit("chunkString"),l(d)):(e.consume(d),d===92?u:f)}function u(d){return d===s||d===92?(e.consume(d),f):f(d)}}function Nr(e,t){let n;return r;function r(i){return te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):de(i)?ge(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const _x={name:"definition",tokenize:Dx},Bx={partial:!0,tokenize:Fx};function Dx(e,t,n){const r=this;let i;return o;function o(h){return e.enter("definition"),s(h)}function s(h){return yc.call(r,e,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function a(h){return i=kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),c):n(h)}function c(h){return ve(h)?Nr(e,l)(h):l(h)}function l(h){return gc(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(Bx,u,u)(h)}function u(h){return de(h)?ge(e,d,"whitespace")(h):d(h)}function d(h){return h===null||te(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function Fx(e,t,n){return r;function r(a){return ve(a)?Nr(e,i)(a):n(a)}function i(a){return bc(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return de(a)?ge(e,s,"whitespace")(a):s(a)}function s(a){return a===null||te(a)?t(a):n(a)}}const Tx={name:"hardBreakEscape",tokenize:Ox};function Ox(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return te(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Px={name:"headingAtx",resolve:Rx,tokenize:Ix};function Rx(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},xt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Ix(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),s(f)}function s(f){return f===35&&r++<6?(e.consume(f),s):f===null||ve(f)?(e.exit("atxHeadingSequence"),a(f)):n(f)}function a(f){return f===35?(e.enter("atxHeadingSequence"),c(f)):f===null||te(f)?(e.exit("atxHeading"),t(f)):de(f)?ge(e,a,"whitespace")(f):(e.enter("atxHeadingText"),l(f))}function c(f){return f===35?(e.consume(f),c):(e.exit("atxHeadingSequence"),a(f))}function l(f){return f===null||f===35||ve(f)?(e.exit("atxHeadingText"),a(f)):(e.consume(f),l)}}const Nx=["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"],vc=["pre","script","style","textarea"],Lx={concrete:!0,name:"htmlFlow",resolveTo:Ux,tokenize:Hx},Mx={partial:!0,tokenize:jx},zx={partial:!0,tokenize:qx};function Ux(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 Hx(e,t,n){const r=this;let i,o,s,a,c;return l;function l(w){return f(w)}function f(w){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(w),u}function u(w){return w===33?(e.consume(w),d):w===47?(e.consume(w),o=!0,x):w===63?(e.consume(w),i=3,r.interrupt?t:S):Je(w)?(e.consume(w),s=String.fromCharCode(w),m):n(w)}function d(w){return w===45?(e.consume(w),i=2,h):w===91?(e.consume(w),i=5,a=0,p):Je(w)?(e.consume(w),i=4,r.interrupt?t:S):n(w)}function h(w){return w===45?(e.consume(w),r.interrupt?t:S):n(w)}function p(w){const I="CDATA[";return w===I.charCodeAt(a++)?(e.consume(w),a===I.length?r.interrupt?t:F:p):n(w)}function x(w){return Je(w)?(e.consume(w),s=String.fromCharCode(w),m):n(w)}function m(w){if(w===null||w===47||w===62||ve(w)){const I=w===47,Z=s.toLowerCase();return!I&&!o&&vc.includes(Z)?(i=1,r.interrupt?t(w):F(w)):Nx.includes(s.toLowerCase())?(i=6,I?(e.consume(w),g):r.interrupt?t(w):F(w)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(w):o?b(w):y(w))}return w===45||Ke(w)?(e.consume(w),s+=String.fromCharCode(w),m):n(w)}function g(w){return w===62?(e.consume(w),r.interrupt?t:F):n(w)}function b(w){return de(w)?(e.consume(w),b):E(w)}function y(w){return w===47?(e.consume(w),E):w===58||w===95||Je(w)?(e.consume(w),v):de(w)?(e.consume(w),y):E(w)}function v(w){return w===45||w===46||w===58||w===95||Ke(w)?(e.consume(w),v):k(w)}function k(w){return w===61?(e.consume(w),C):de(w)?(e.consume(w),k):y(w)}function C(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),c=w,_):de(w)?(e.consume(w),C):A(w)}function _(w){return w===c?(e.consume(w),c=null,O):w===null||te(w)?n(w):(e.consume(w),_)}function A(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||ve(w)?k(w):(e.consume(w),A)}function O(w){return w===47||w===62||de(w)?y(w):n(w)}function E(w){return w===62?(e.consume(w),D):n(w)}function D(w){return w===null||te(w)?F(w):de(w)?(e.consume(w),D):n(w)}function F(w){return w===45&&i===2?(e.consume(w),j):w===60&&i===1?(e.consume(w),X):w===62&&i===4?(e.consume(w),M):w===63&&i===3?(e.consume(w),S):w===93&&i===5?(e.consume(w),ne):te(w)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Mx,q,R)(w)):w===null||te(w)?(e.exit("htmlFlowData"),R(w)):(e.consume(w),F)}function R(w){return e.check(zx,U,q)(w)}function U(w){return e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),L}function L(w){return w===null||te(w)?R(w):(e.enter("htmlFlowData"),F(w))}function j(w){return w===45?(e.consume(w),S):F(w)}function X(w){return w===47?(e.consume(w),s="",$):F(w)}function $(w){if(w===62){const I=s.toLowerCase();return vc.includes(I)?(e.consume(w),M):F(w)}return Je(w)&&s.length<8?(e.consume(w),s+=String.fromCharCode(w),$):F(w)}function ne(w){return w===93?(e.consume(w),S):F(w)}function S(w){return w===62?(e.consume(w),M):w===45&&i===2?(e.consume(w),S):F(w)}function M(w){return w===null||te(w)?(e.exit("htmlFlowData"),q(w)):(e.consume(w),M)}function q(w){return e.exit("htmlFlow"),t(w)}}function qx(e,t,n){const r=this;return i;function i(s){return te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):n(s)}function o(s){return r.parser.lazy[r.now().line]?n(s):t(s)}}function jx(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Rr,t,n)}}const $x={name:"htmlText",tokenize:Wx};function Wx(e,t,n){const r=this;let i,o,s;return a;function a(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),c}function c(S){return S===33?(e.consume(S),l):S===47?(e.consume(S),k):S===63?(e.consume(S),y):Je(S)?(e.consume(S),A):n(S)}function l(S){return S===45?(e.consume(S),f):S===91?(e.consume(S),o=0,p):Je(S)?(e.consume(S),b):n(S)}function f(S){return S===45?(e.consume(S),h):n(S)}function u(S){return S===null?n(S):S===45?(e.consume(S),d):te(S)?(s=u,X(S)):(e.consume(S),u)}function d(S){return S===45?(e.consume(S),h):u(S)}function h(S){return S===62?j(S):S===45?d(S):u(S)}function p(S){const M="CDATA[";return S===M.charCodeAt(o++)?(e.consume(S),o===M.length?x:p):n(S)}function x(S){return S===null?n(S):S===93?(e.consume(S),m):te(S)?(s=x,X(S)):(e.consume(S),x)}function m(S){return S===93?(e.consume(S),g):x(S)}function g(S){return S===62?j(S):S===93?(e.consume(S),g):x(S)}function b(S){return S===null||S===62?j(S):te(S)?(s=b,X(S)):(e.consume(S),b)}function y(S){return S===null?n(S):S===63?(e.consume(S),v):te(S)?(s=y,X(S)):(e.consume(S),y)}function v(S){return S===62?j(S):y(S)}function k(S){return Je(S)?(e.consume(S),C):n(S)}function C(S){return S===45||Ke(S)?(e.consume(S),C):_(S)}function _(S){return te(S)?(s=_,X(S)):de(S)?(e.consume(S),_):j(S)}function A(S){return S===45||Ke(S)?(e.consume(S),A):S===47||S===62||ve(S)?O(S):n(S)}function O(S){return S===47?(e.consume(S),j):S===58||S===95||Je(S)?(e.consume(S),E):te(S)?(s=O,X(S)):de(S)?(e.consume(S),O):j(S)}function E(S){return S===45||S===46||S===58||S===95||Ke(S)?(e.consume(S),E):D(S)}function D(S){return S===61?(e.consume(S),F):te(S)?(s=D,X(S)):de(S)?(e.consume(S),D):O(S)}function F(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),i=S,R):te(S)?(s=F,X(S)):de(S)?(e.consume(S),F):(e.consume(S),U)}function R(S){return S===i?(e.consume(S),i=void 0,L):S===null?n(S):te(S)?(s=R,X(S)):(e.consume(S),R)}function U(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||ve(S)?O(S):(e.consume(S),U)}function L(S){return S===47||S===62||ve(S)?O(S):n(S)}function j(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function X(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),$}function $(S){return de(S)?ge(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):ne(S)}function ne(S){return e.enter("htmlTextData"),s(S)}}const Os={name:"labelEnd",resolveAll:Xx,resolveTo:Gx,tokenize:Yx},Vx={tokenize:Zx},Kx={tokenize:Jx},Qx={tokenize:em};function Xx(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&xt(e,0,e.length,n),e}function Gx(e,t){let n=e.length,r=0,i,o,s,a;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(s=n);const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},l={type:"label",start:{...e[o][1].start},end:{...e[s][1].end}},f={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[s-2][1].start}};return a=[["enter",c,t],["enter",l,t]],a=bt(a,e.slice(o+1,o+r+3)),a=bt(a,[["enter",f,t]]),a=bt(a,mi(t.parser.constructs.insideSpan.null,e.slice(o+r+4,s-3),t)),a=bt(a,[["exit",f,t],e[s-2],e[s-1],["exit",l,t]]),a=bt(a,e.slice(s+1)),a=bt(a,[["exit",c,t]]),xt(e,o,e.length,a),e}function Yx(e,t,n){const r=this;let i=r.events.length,o,s;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return a;function a(d){return o?o._inactive?u(d):(s=r.parser.defined.includes(kt(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),c):n(d)}function c(d){return d===40?e.attempt(Vx,f,s?f:u)(d):d===91?e.attempt(Kx,f,s?l:u)(d):s?f(d):u(d)}function l(d){return e.attempt(Qx,f,u)(d)}function f(d){return t(d)}function u(d){return o._balanced=!0,n(d)}}function Zx(e,t,n){return r;function r(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),i}function i(u){return ve(u)?Nr(e,o)(u):o(u)}function o(u){return u===41?f(u):gc(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function s(u){return ve(u)?Nr(e,c)(u):f(u)}function a(u){return n(u)}function c(u){return u===34||u===39||u===40?bc(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):f(u)}function l(u){return ve(u)?Nr(e,f)(u):f(u)}function f(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):n(u)}}function Jx(e,t,n){const r=this;return i;function i(a){return yc.call(r,e,o,s,"reference","referenceMarker","referenceString")(a)}function o(a){return r.parser.defined.includes(kt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(a):n(a)}function s(a){return n(a)}}function em(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const tm={name:"labelStartImage",resolveAll:Os.resolveAll,tokenize:nm};function nm(e,t,n){const r=this;return i;function i(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),o}function o(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):n(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const rm={name:"labelStartLink",resolveAll:Os.resolveAll,tokenize:im};function im(e,t,n){const r=this;return i;function i(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),o}function o(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const Ps={name:"lineEnding",tokenize:om};function om(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ge(e,t,"linePrefix")}}const gi={name:"thematicBreak",tokenize:sm};function sm(e,t,n){let r=0,i;return o;function o(l){return e.enter("thematicBreak"),s(l)}function s(l){return i=l,a(l)}function a(l){return l===i?(e.enter("thematicBreakSequence"),c(l)):r>=3&&(l===null||te(l))?(e.exit("thematicBreak"),t(l)):n(l)}function c(l){return l===i?(e.consume(l),r++,c):(e.exit("thematicBreakSequence"),de(l)?ge(e,a,"whitespace")(l):a(l))}}const at={continuation:{tokenize:um},exit:dm,name:"list",tokenize:cm},am={partial:!0,tokenize:hm},lm={partial:!0,tokenize:fm};function cm(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,s=0;return a;function a(h){const p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Ds(h)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(gi,n,l)(h):l(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(h)}return n(h)}function c(h){return Ds(h)&&++s<10?(e.consume(h),c):(!r.interrupt||s<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),l(h)):n(h)}function l(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Rr,r.interrupt?n:f,e.attempt(am,d,u))}function f(h){return r.containerState.initialBlankLine=!0,o++,d(h)}function u(h){return de(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),d):n(h)}function d(h){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function um(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Rr,i,o);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ge(e,t,"listItemIndent",r.containerState.size+1)(a)}function o(a){return r.containerState.furtherBlankLines||!de(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,s(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(lm,t,s)(a))}function s(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,ge(e,e.attempt(at,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function fm(e,t,n){const r=this;return ge(e,i,"listItemIndent",r.containerState.size+1);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===r.containerState.size?t(o):n(o)}}function dm(e){e.exit(this.containerState.type)}function hm(e,t,n){const r=this;return ge(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const s=r.events[r.events.length-1];return!de(o)&&s&&s[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const wc={name:"setextUnderline",resolveTo:pm,tokenize:xm};function pm(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const s={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",s,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=s,e.push(["exit",s,t]),e}function xm(e,t,n){const r=this;let i;return o;function o(l){let f=r.events.length,u;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){u=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||u)?(e.enter("setextHeadingLine"),i=l,s(l)):n(l)}function s(l){return e.enter("setextHeadingLineSequence"),a(l)}function a(l){return l===i?(e.consume(l),a):(e.exit("setextHeadingLineSequence"),de(l)?ge(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||te(l)?(e.exit("setextHeadingLine"),t(l)):n(l)}}const mm={tokenize:gm};function gm(e){const t=this,n=e.attempt(Rr,r,e.attempt(this.parser.constructs.flowInitial,i,ge(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ex,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ym={resolveAll:Cc()},bm=Ec("string"),vm=Ec("text");function Ec(e){return{resolveAll:Cc(e==="text"?wm:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,s,a);return s;function s(f){return l(f)?o(f):a(f)}function a(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),c}function c(f){return l(f)?(n.exit("data"),o(f)):(n.consume(f),c)}function l(f){if(f===null)return!0;const u=i[f];let d=-1;if(u)for(;++d<u.length;){const h=u[d];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function Cc(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function wm(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,s=-1,a=0,c;for(;o--;){const l=i[o];if(typeof l=="string"){for(s=l.length;l.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(l===-2)c=!0,a++;else if(l!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(a=0),a){const l={type:n===e.length||c||a<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?s:r.start._bufferIndex+s,_index:r.start._index+o,line:r.end.line,column:r.end.column-a,offset:r.end.offset-a},end:{...r.end}};r.end={...l.start},r.start.offset===r.end.offset?Object.assign(r,l):(e.splice(n,0,["enter",l,t],["exit",l,t]),n+=2)}n++}return e}const Em=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:_x},disable:{null:[]},document:{42:at,43:at,45:at,48:at,49:at,50:at,51:at,52:at,53:at,54:at,55:at,56:at,57:at,62:fc},flow:{35:Px,42:gi,45:[wc,gi],60:Lx,61:wc,95:gi,96:xc,126:xc},flowInitial:{[-2]:Ts,[-1]:Ts,32:Ts},insideSpan:{null:[Fs,ym]},string:{38:hc,92:dc},text:{[-5]:Ps,[-4]:Ps,[-3]:Ps,33:tm,38:hc,42:Fs,60:[rx,$x],91:rm,92:[Tx,dc],93:Os,95:Fs,96:mx}},Symbol.toStringTag,{value:"Module"}));function Cm(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let s=[],a=[];const c={attempt:_(k),check:_(C),consume:b,enter:y,exit:v,interrupt:_(C,{interrupt:!0})},l={code:null,containerState:{},defineSkip:x,events:[],now:p,parser:e,previous:null,sliceSerialize:d,sliceStream:h,write:u};let f=t.tokenize.call(l,c);return t.resolveAll&&o.push(t),l;function u(D){return s=bt(s,D),m(),s[s.length-1]!==null?[]:(A(t,0),l.events=mi(o,l.events,l),l.events)}function d(D,F){return Am(h(D),F)}function h(D){return km(s,D)}function p(){const{_bufferIndex:D,_index:F,line:R,column:U,offset:L}=r;return{_bufferIndex:D,_index:F,line:R,column:U,offset:L}}function x(D){i[D.line]=D.column,E()}function m(){let D;for(;r._index<s.length;){const F=s[r._index];if(typeof F=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<F.length;)g(F.charCodeAt(r._bufferIndex));else g(F)}}function g(D){f=f(D)}function b(D){te(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,E()):D!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===s[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=D}function y(D,F){const R=F||{};return R.type=D,R.start=p(),l.events.push(["enter",R,l]),a.push(R),R}function v(D){const F=a.pop();return F.end=p(),l.events.push(["exit",F,l]),F}function k(D,F){A(D,F.from)}function C(D,F){F.restore()}function _(D,F){return R;function R(U,L,j){let X,$,ne,S;return Array.isArray(U)?q(U):"tokenize"in U?q([U]):M(U);function M(J){return oe;function oe(Q){const Ce=Q!==null&&J[Q],ke=Q!==null&&J.null,$e=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(ke)?ke:ke?[ke]:[]];return q($e)(Q)}}function q(J){return X=J,$=0,J.length===0?j:w(J[$])}function w(J){return oe;function oe(Q){return S=O(),ne=J,J.partial||(l.currentConstruct=J),J.name&&l.parser.constructs.disable.null.includes(J.name)?Z():J.tokenize.call(F?Object.assign(Object.create(l),F):l,c,I,Z)(Q)}}function I(J){return D(ne,S),L}function Z(J){return S.restore(),++$<X.length?w(X[$]):j}}}function A(D,F){D.resolveAll&&!o.includes(D)&&o.push(D),D.resolve&&xt(l.events,F,l.events.length-F,D.resolve(l.events.slice(F),l)),D.resolveTo&&(l.events=D.resolveTo(l.events,l))}function O(){const D=p(),F=l.previous,R=l.currentConstruct,U=l.events.length,L=Array.from(a);return{from:U,restore:j};function j(){r=D,l.previous=F,l.currentConstruct=R,l.events.length=U,a=L,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function km(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let s;if(n===i)s=[e[n].slice(r,o)];else{if(s=e.slice(n,i),r>-1){const a=s[0];typeof a=="string"?s[0]=a.slice(r):s.shift()}o>0&&s.push(e[i].slice(0,o))}return s}function Am(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let s;if(typeof o=="string")s=o;else switch(o){case-5:{s="\r";break}case-4:{s=`
113
+ `;break}case-3:{s=`\r
114
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&i)continue;s=" ";break}default:s=String.fromCharCode(o)}i=o===-2,r.push(s)}return r.join("")}function Sm(e){const r={constructs:ac([Em,...(e||{}).extensions||[]]),content:i(Gp),defined:[],document:i(Zp),flow:i(mm),lazy:{},string:i(bm),text:i(vm)};return r;function i(o){return s;function s(a){return Cm(r,o,a)}}}function _m(e){for(;!mc(e););return e}const kc=/[\0\t\n\r]/g;function Bm(){let e=1,t="",n=!0,r;return i;function i(o,s,a){const c=[];let l,f,u,d,h;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(s||void 0).decode(o)),u=0,t="",n&&(o.charCodeAt(0)===65279&&u++,n=void 0);u<o.length;){if(kc.lastIndex=u,l=kc.exec(o),d=l&&l.index!==void 0?l.index:o.length,h=o.charCodeAt(d),!l){t=o.slice(u);break}if(h===10&&u===d&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),u<d&&(c.push(o.slice(u,d)),e+=d-u),h){case 0:{c.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,c.push(-2);e++<f;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}u=d+1}return a&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Dm=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Fm(e){return e.replace(Dm,Tm)}function Tm(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return lc(n.slice(o?2:1),o?16:10)}return Bs(n)||e}const Ac={}.hasOwnProperty;function Om(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Pm(n)(_m(Sm(n).document().write(Bm()(e,t,!0))))}function Pm(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ge),autolinkProtocol:O,autolinkEmail:O,atxHeading:o(nn),blockQuote:o(ke),characterEscape:O,characterReference:O,codeFenced:o($e),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o($e,s),codeText:o(Le,s),codeTextData:O,data:O,codeFlowValue:O,definition:o(nt),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(Me),hardBreakEscape:o(Ft),hardBreakTrailing:o(Ft),htmlFlow:o(mt,s),htmlFlowData:O,htmlText:o(mt,s),htmlTextData:O,image:o(jt),label:s,link:o(Ge),listItem:o(rt),listItemValue:d,listOrdered:o($t,u),listUnordered:o($t),paragraph:o(be),reference:w,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(nn),strong:o(We),thematicBreak:o(Ar)},exit:{atxHeading:c(),atxHeadingSequence:k,autolink:c(),autolinkEmail:Ce,autolinkProtocol:Q,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:Z,characterReferenceMarkerNumeric:Z,characterReferenceValue:J,characterReference:oe,codeFenced:c(m),codeFencedFence:x,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:E,codeIndented:c(g),codeText:c(L),codeTextData:E,data:E,definition:c(),definitionDestinationString:v,definitionLabelString:b,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(F),hardBreakTrailing:c(F),htmlFlow:c(R),htmlFlowData:E,htmlText:c(U),htmlTextData:E,image:c(X),label:ne,labelText:$,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:I,resourceDestinationString:S,resourceTitleString:M,resource:q,setextHeading:c(A),setextHeadingLineSequence:_,setextHeadingText:C,strong:c(),thematicBreak:c()}};Sc(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(H){let V={type:"root",children:[]};const ie={stack:[V],tokenStack:[],config:t,enter:a,exit:l,buffer:s,resume:f,data:n},ae=[];let he=-1;for(;++he<H.length;)if(H[he][1].type==="listOrdered"||H[he][1].type==="listUnordered")if(H[he][0]==="enter")ae.push(he);else{const Be=ae.pop();he=i(H,Be,he)}for(he=-1;++he<H.length;){const Be=t[H[he][0]];Ac.call(Be,H[he][1].type)&&Be[H[he][1].type].call(Object.assign({sliceSerialize:H[he][2].sliceSerialize},ie),H[he][1])}if(ie.tokenStack.length>0){const Be=ie.tokenStack[ie.tokenStack.length-1];(Be[1]||_c).call(ie,void 0,Be[0])}for(V.position={start:ln(H.length>0?H[0][1].start:{line:1,column:1,offset:0}),end:ln(H.length>0?H[H.length-2][1].end:{line:1,column:1,offset:0})},he=-1;++he<t.transforms.length;)V=t.transforms[he](V)||V;return V}function i(H,V,ie){let ae=V-1,he=-1,Be=!1,Te,gt,Wt,Tt;for(;++ae<=ie;){const qe=H[ae];switch(qe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{qe[0]==="enter"?he++:he--,Tt=void 0;break}case"lineEndingBlank":{qe[0]==="enter"&&(Te&&!Tt&&!he&&!Wt&&(Wt=ae),Tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tt=void 0}if(!he&&qe[0]==="enter"&&qe[1].type==="listItemPrefix"||he===-1&&qe[0]==="exit"&&(qe[1].type==="listUnordered"||qe[1].type==="listOrdered")){if(Te){let Vt=ae;for(gt=void 0;Vt--;){const Ye=H[Vt];if(Ye[1].type==="lineEnding"||Ye[1].type==="lineEndingBlank"){if(Ye[0]==="exit")continue;gt&&(H[gt][1].type="lineEndingBlank",Be=!0),Ye[1].type="lineEnding",gt=Vt}else if(!(Ye[1].type==="linePrefix"||Ye[1].type==="blockQuotePrefix"||Ye[1].type==="blockQuotePrefixWhitespace"||Ye[1].type==="blockQuoteMarker"||Ye[1].type==="listItemIndent"))break}Wt&&(!gt||Wt<gt)&&(Te._spread=!0),Te.end=Object.assign({},gt?H[gt][1].start:qe[1].end),H.splice(gt||ae,0,["exit",Te,qe[2]]),ae++,ie++}if(qe[1].type==="listItemPrefix"){const Vt={type:"listItem",_spread:!1,start:Object.assign({},qe[1].start),end:void 0};Te=Vt,H.splice(ae,0,["enter",Vt,qe[2]]),ae++,ie++,Wt=void 0,Tt=!0}}}return H[V][1]._spread=Be,ie}function o(H,V){return ie;function ie(ae){a.call(this,H(ae),ae),V&&V.call(this,ae)}}function s(){this.stack.push({type:"fragment",children:[]})}function a(H,V,ie){this.stack[this.stack.length-1].children.push(H),this.stack.push(H),this.tokenStack.push([V,ie||void 0]),H.position={start:ln(V.start),end:void 0}}function c(H){return V;function V(ie){H&&H.call(this,ie),l.call(this,ie)}}function l(H,V){const ie=this.stack.pop(),ae=this.tokenStack.pop();if(ae)ae[0].type!==H.type&&(V?V.call(this,H,ae[0]):(ae[1]||_c).call(this,H,ae[0]));else throw new Error("Cannot close `"+H.type+"` ("+Or({start:H.start,end:H.end})+"): it’s not open");ie.position.end=ln(H.end)}function f(){return _s(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(H){if(this.data.expectingFirstListItemValue){const V=this.stack[this.stack.length-2];V.start=Number.parseInt(this.sliceSerialize(H),10),this.data.expectingFirstListItemValue=void 0}}function h(){const H=this.resume(),V=this.stack[this.stack.length-1];V.lang=H}function p(){const H=this.resume(),V=this.stack[this.stack.length-1];V.meta=H}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const H=this.resume(),V=this.stack[this.stack.length-1];V.value=H.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const H=this.resume(),V=this.stack[this.stack.length-1];V.value=H.replace(/(\r?\n|\r)$/g,"")}function b(H){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.label=V,ie.identifier=kt(this.sliceSerialize(H)).toLowerCase()}function y(){const H=this.resume(),V=this.stack[this.stack.length-1];V.title=H}function v(){const H=this.resume(),V=this.stack[this.stack.length-1];V.url=H}function k(H){const V=this.stack[this.stack.length-1];if(!V.depth){const ie=this.sliceSerialize(H).length;V.depth=ie}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function _(H){const V=this.stack[this.stack.length-1];V.depth=this.sliceSerialize(H).codePointAt(0)===61?1:2}function A(){this.data.setextHeadingSlurpLineEnding=void 0}function O(H){const ie=this.stack[this.stack.length-1].children;let ae=ie[ie.length-1];(!ae||ae.type!=="text")&&(ae=En(),ae.position={start:ln(H.start),end:void 0},ie.push(ae)),this.stack.push(ae)}function E(H){const V=this.stack.pop();V.value+=this.sliceSerialize(H),V.position.end=ln(H.end)}function D(H){const V=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ie=V.children[V.children.length-1];ie.position.end=ln(H.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(V.type)&&(O.call(this,H),E.call(this,H))}function F(){this.data.atHardBreak=!0}function R(){const H=this.resume(),V=this.stack[this.stack.length-1];V.value=H}function U(){const H=this.resume(),V=this.stack[this.stack.length-1];V.value=H}function L(){const H=this.resume(),V=this.stack[this.stack.length-1];V.value=H}function j(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=V,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function X(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const V=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=V,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function $(H){const V=this.sliceSerialize(H),ie=this.stack[this.stack.length-2];ie.label=Fm(V),ie.identifier=kt(V).toLowerCase()}function ne(){const H=this.stack[this.stack.length-1],V=this.resume(),ie=this.stack[this.stack.length-1];if(this.data.inReference=!0,ie.type==="link"){const ae=H.children;ie.children=ae}else ie.alt=V}function S(){const H=this.resume(),V=this.stack[this.stack.length-1];V.url=H}function M(){const H=this.resume(),V=this.stack[this.stack.length-1];V.title=H}function q(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function I(H){const V=this.resume(),ie=this.stack[this.stack.length-1];ie.label=V,ie.identifier=kt(this.sliceSerialize(H)).toLowerCase(),this.data.referenceType="full"}function Z(H){this.data.characterReferenceType=H.type}function J(H){const V=this.sliceSerialize(H),ie=this.data.characterReferenceType;let ae;ie?(ae=lc(V,ie==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ae=Bs(V);const he=this.stack[this.stack.length-1];he.value+=ae}function oe(H){const V=this.stack.pop();V.position.end=ln(H.end)}function Q(H){E.call(this,H);const V=this.stack[this.stack.length-1];V.url=this.sliceSerialize(H)}function Ce(H){E.call(this,H);const V=this.stack[this.stack.length-1];V.url="mailto:"+this.sliceSerialize(H)}function ke(){return{type:"blockquote",children:[]}}function $e(){return{type:"code",lang:null,meta:null,value:""}}function Le(){return{type:"inlineCode",value:""}}function nt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Me(){return{type:"emphasis",children:[]}}function nn(){return{type:"heading",depth:0,children:[]}}function Ft(){return{type:"break"}}function mt(){return{type:"html",value:""}}function jt(){return{type:"image",title:null,url:"",alt:null}}function Ge(){return{type:"link",title:null,url:"",children:[]}}function $t(H){return{type:"list",ordered:H.type==="listOrdered",start:null,spread:H._spread,children:[]}}function rt(H){return{type:"listItem",spread:H._spread,checked:null,children:[]}}function be(){return{type:"paragraph",children:[]}}function We(){return{type:"strong",children:[]}}function En(){return{type:"text",value:""}}function Ar(){return{type:"thematicBreak"}}}function ln(e){return{line:e.line,column:e.column,offset:e.offset}}function Sc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Sc(e,r):Rm(e,r)}}function Rm(e,t){let n;for(n in t)if(Ac.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 _c(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Or({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Or({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Or({start:t.start,end:t.end})+") is still open")}function Im(e){const t=this;t.parser=n;function n(r){return Om(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Nm(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 Lm(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
115
+ `}]}function Mm(e,t){const n=t.value?t.value+`
116
+ `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function zm(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Um(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Hm(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Jn(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let s,a=e.footnoteCounts.get(r);a===void 0?(a=0,e.footnoteOrder.push(r),s=e.footnoteOrder.length):s=o+1,a+=1,e.footnoteCounts.set(r,a);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(a>1?"-"+a:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,c);const l={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function qm(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 jm(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Bc(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push({type:"text",value:r}),i}function $m(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Bc(e,t);const i={src:Jn(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Wm(e,t){const n={src:Jn(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 Vm(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 Km(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Bc(e,t);const i={href:Jn(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Qm(e,t){const n={href:Jn(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 Xm(e,t,n){const r=e.all(t),i=n?Gm(n):Dc(t),o={},s=[];if(typeof t.checked=="boolean"){const f=r[0];let u;f&&f.type==="element"&&f.tagName==="p"?u=f:(u={type:"element",tagName:"p",properties:{},children:[]},r.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let a=-1;for(;++a<r.length;){const f=r[a];(i||a!==0||f.type!=="element"||f.tagName!=="p")&&s.push({type:"text",value:`
117
+ `}),f.type==="element"&&f.tagName==="p"&&!i?s.push(...f.children):s.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&s.push({type:"text",value:`
118
+ `});const l={type:"element",tagName:"li",properties:o,children:s};return e.patch(t,l),e.applyData(t,l)}function Gm(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=Dc(n[r])}return t}function Dc(e){const t=e.spread;return t??e.children.length>1}function Ym(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 s=r[i];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Zm(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Jm(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function eg(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tg(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const s={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],s),i.push(s)}if(n.length>0){const s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},a=ws(t.children[1]),c=Xl(t.children[t.children.length-1]);a&&c&&(s.position={start:a,end:c}),i.push(s)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function ng(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,a=s?s.length:t.children.length;let c=-1;const l=[];for(;++c<a;){const u=t.children[c],d={},h=s?s[c]:void 0;h&&(d.align=h);let p={type:"element",tagName:o,properties:d,children:[]};u&&(p.children=e.all(u),e.patch(u,p),p=e.applyData(u,p)),l.push(p)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,f),e.applyData(t,f)}function rg(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Fc=9,Tc=32;function ig(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Oc(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Oc(t.slice(i),i>0,!1)),o.join("")}function Oc(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===Fc||o===Tc;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===Fc||o===Tc;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function og(e,t){const n={type:"text",value:ig(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function sg(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const ag={blockquote:Nm,break:Lm,code:Mm,delete:zm,emphasis:Um,footnoteReference:Hm,heading:qm,html:jm,imageReference:$m,image:Wm,inlineCode:Vm,linkReference:Km,link:Qm,listItem:Xm,list:Ym,paragraph:Zm,root:Jm,strong:eg,table:tg,tableCell:rg,tableRow:ng,text:og,thematicBreak:sg,toml:yi,yaml:yi,definition:yi,footnoteDefinition:yi};function yi(){}const Pc=-1,bi=0,Lr=1,vi=2,Rs=3,Is=4,Ns=5,Ls=6,Rc=7,Ic=8,Nc=typeof self=="object"?self:globalThis,lg=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,s]=t[i];switch(o){case bi:case Pc:return n(s,i);case Lr:{const a=n([],i);for(const c of s)a.push(r(c));return a}case vi:{const a=n({},i);for(const[c,l]of s)a[r(c)]=r(l);return a}case Rs:return n(new Date(s),i);case Is:{const{source:a,flags:c}=s;return n(new RegExp(a,c),i)}case Ns:{const a=n(new Map,i);for(const[c,l]of s)a.set(r(c),r(l));return a}case Ls:{const a=n(new Set,i);for(const c of s)a.add(r(c));return a}case Rc:{const{name:a,message:c}=s;return n(new Nc[a](c),i)}case Ic:return n(BigInt(s),i);case"BigInt":return n(Object(BigInt(s)),i);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{const{buffer:a}=new Uint8Array(s);return n(new DataView(a),s)}}return n(new Nc[o](s),i)};return r},Lc=e=>lg(new Map,e)(0),tr="",{toString:cg}={},{keys:ug}=Object,Mr=e=>{const t=typeof e;if(t!=="object"||!e)return[bi,t];const n=cg.call(e).slice(8,-1);switch(n){case"Array":return[Lr,tr];case"Object":return[vi,tr];case"Date":return[Rs,tr];case"RegExp":return[Is,tr];case"Map":return[Ns,tr];case"Set":return[Ls,tr];case"DataView":return[Lr,n]}return n.includes("Array")?[Lr,n]:n.includes("Error")?[Rc,n]:[vi,n]},wi=([e,t])=>e===bi&&(t==="function"||t==="symbol"),fg=(e,t,n,r)=>{const i=(s,a)=>{const c=r.push(s)-1;return n.set(a,c),c},o=s=>{if(n.has(s))return n.get(s);let[a,c]=Mr(s);switch(a){case bi:{let f=s;switch(c){case"bigint":a=Ic,f=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([Pc],s)}return i([a,f],s)}case Lr:{if(c){let d=s;return c==="DataView"?d=new Uint8Array(s.buffer):c==="ArrayBuffer"&&(d=new Uint8Array(s)),i([c,[...d]],s)}const f=[],u=i([a,f],s);for(const d of s)f.push(o(d));return u}case vi:{if(c)switch(c){case"BigInt":return i([c,s.toString()],s);case"Boolean":case"Number":case"String":return i([c,s.valueOf()],s)}if(t&&"toJSON"in s)return o(s.toJSON());const f=[],u=i([a,f],s);for(const d of ug(s))(e||!wi(Mr(s[d])))&&f.push([o(d),o(s[d])]);return u}case Rs:return i([a,s.toISOString()],s);case Is:{const{source:f,flags:u}=s;return i([a,{source:f,flags:u}],s)}case Ns:{const f=[],u=i([a,f],s);for(const[d,h]of s)(e||!(wi(Mr(d))||wi(Mr(h))))&&f.push([o(d),o(h)]);return u}case Ls:{const f=[],u=i([a,f],s);for(const d of s)(e||!wi(Mr(d)))&&f.push(o(d));return u}}const{message:l}=s;return i([a,{name:c,message:l}],s)};return o},Mc=(e,{json:t,lossy:n}={})=>{const r=[];return fg(!(t||n),!!t,new Map,r)(e),r},Ei=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Lc(Mc(e,t)):structuredClone(e):(e,t)=>Lc(Mc(e,t));function dg(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 hg(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function pg(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||dg,r=e.options.footnoteBackLabel||hg,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},a=[];let c=-1;for(;++c<e.footnoteOrder.length;){const l=e.footnoteById.get(e.footnoteOrder[c]);if(!l)continue;const f=e.all(l),u=String(l.identifier).toUpperCase(),d=Jn(u.toLowerCase());let h=0;const p=[],x=e.footnoteCounts.get(u);for(;x!==void 0&&++h<=x;){p.length>0&&p.push({type:"text",value:" "});let b=typeof n=="string"?n:n(c,h);typeof b=="string"&&(b={type:"text",value:b}),p.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,h),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const m=f[f.length-1];if(m&&m.type==="element"&&m.tagName==="p"){const b=m.children[m.children.length-1];b&&b.type==="text"?b.value+=" ":m.children.push({type:"text",value:" "}),m.children.push(...p)}else f.push(...p);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(f,!0)};e.patch(l,g),a.push(g)}if(a.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ei(s),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
119
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(a,!0)},{type:"text",value:`
120
+ `}]}}const Ci=(function(e){if(e==null)return yg;if(typeof e=="function")return ki(e);if(typeof e=="object")return Array.isArray(e)?xg(e):mg(e);if(typeof e=="string")return gg(e);throw new Error("Expected function, string, or object as test")});function xg(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ci(e[n]);return ki(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function mg(e){const t=e;return ki(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function gg(e){return ki(t);function t(n){return n&&n.type===e}}function ki(e){return t;function t(n,r,i){return!!(bg(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function yg(){return!0}function bg(e){return e!==null&&typeof e=="object"&&"type"in e}function U4(e){return e}const zc=[],vg=!0,Ms=!1,wg="skip";function Uc(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Ci(i),s=r?-1:1;a(e,void 0,[])();function a(c,l,f){const u=c&&typeof c=="object"?c:{};if(typeof u.type=="string"){const h=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(c.type+(h?"<"+h+">":""))+")"})}return d;function d(){let h=zc,p,x,m;if((!t||o(c,l,f[f.length-1]||void 0))&&(h=Eg(n(c,f)),h[0]===Ms))return h;if("children"in c&&c.children){const g=c;if(g.children&&h[0]!==wg)for(x=(r?g.children.length:-1)+s,m=f.concat(g);x>-1&&x<g.children.length;){const b=g.children[x];if(p=a(b,x,m)(),p[0]===Ms)return p;x=typeof p[1]=="number"?p[1]:x+s}}return h}}}function Eg(e){return Array.isArray(e)?e:typeof e=="number"?[vg,e]:e==null?zc:[e]}function zs(e,t,n,r){let i,o,s;typeof t=="function"&&typeof n!="function"?(o=void 0,s=t,i=n):(o=t,s=n,i=r),Uc(e,o,a,i);function a(c,l){const f=l[l.length-1],u=f?f.children.indexOf(c):void 0;return s(c,u,f)}}const Us={}.hasOwnProperty,Cg={};function kg(e,t){const n=t||Cg,r=new Map,i=new Map,o=new Map,s={...ag,...n.handlers},a={all:l,applyData:Sg,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:s,one:c,options:n,patch:Ag,wrap:Bg};return zs(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const u=f.type==="definition"?r:i,d=String(f.identifier).toUpperCase();u.has(d)||u.set(d,f)}}),a;function c(f,u){const d=f.type,h=a.handlers[d];if(Us.call(a.handlers,d)&&h)return h(a,f,u);if(a.options.passThrough&&a.options.passThrough.includes(d)){if("children"in f){const{children:x,...m}=f,g=Ei(m);return g.children=a.all(f),g}return Ei(f)}return(a.options.unknownHandler||_g)(a,f,u)}function l(f){const u=[];if("children"in f){const d=f.children;let h=-1;for(;++h<d.length;){const p=a.one(d[h],f);if(p){if(h&&d[h-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=Hc(p.value)),!Array.isArray(p)&&p.type==="element")){const x=p.children[0];x&&x.type==="text"&&(x.value=Hc(x.value))}Array.isArray(p)?u.push(...p):u.push(p)}}}return u}}function Ag(e,t){e.position&&(t.position=Ep(e))}function Sg(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const s="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:s}}n.type==="element"&&o&&Object.assign(n.properties,Ei(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function _g(e,t){const n=t.data||{},r="value"in t&&!(Us.call(n,"hProperties")||Us.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 Bg(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
121
+ `});++r<e.length;)r&&n.push({type:"text",value:`
122
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
123
+ `}),n}function Hc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function qc(e,t){const n=kg(e,t),r=n.one(e,void 0),i=pg(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
124
+ `},i),o}function Dg(e,t){return e&&"run"in e?async function(n,r){const i=qc(n,{file:r,...t});await e.run(i,r)}:function(n,r){return qc(n,{file:r,...e||t})}}function jc(e){if(e)throw e}var Hs,$c;function Fg(){if($c)return Hs;$c=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(l){return typeof Array.isArray=="function"?Array.isArray(l):t.call(l)==="[object Array]"},o=function(l){if(!l||t.call(l)!=="[object Object]")return!1;var f=e.call(l,"constructor"),u=l.constructor&&l.constructor.prototype&&e.call(l.constructor.prototype,"isPrototypeOf");if(l.constructor&&!f&&!u)return!1;var d;for(d in l);return typeof d>"u"||e.call(l,d)},s=function(l,f){n&&f.name==="__proto__"?n(l,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):l[f.name]=f.newValue},a=function(l,f){if(f==="__proto__")if(e.call(l,f)){if(r)return r(l,f).value}else return;return l[f]};return Hs=function c(){var l,f,u,d,h,p,x=arguments[0],m=1,g=arguments.length,b=!1;for(typeof x=="boolean"&&(b=x,x=arguments[1]||{},m=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});m<g;++m)if(l=arguments[m],l!=null)for(f in l)u=a(x,f),d=a(l,f),x!==d&&(b&&d&&(o(d)||(h=i(d)))?(h?(h=!1,p=u&&i(u)?u:[]):p=u&&o(u)?u:{},s(x,{name:f,newValue:c(b,p,d)})):typeof d<"u"&&s(x,{name:f,newValue:d}));return x},Hs}var Tg=Fg();const qs=bs(Tg);function js(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 Og(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const s=i.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...i);function a(c,...l){const f=e[++o];let u=-1;if(c){s(c);return}for(;++u<i.length;)(l[u]===null||l[u]===void 0)&&(l[u]=i[u]);i=l,f?Pg(f,a)(...l):s(null,...l)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Pg(e,t){let n;return r;function r(...s){const a=e.length>s.length;let c;a&&s.push(i);try{c=e.apply(this,s)}catch(l){const f=l;if(a&&n)throw f;return i(f)}a||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(s,...a){n||(n=!0,t(s,...a))}function o(s){i(null,s)}}const Ot={basename:Rg,dirname:Ig,extname:Ng,join:Lg,sep:"/"};function Rg(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');zr(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),a>-1&&(e.codePointAt(i)===t.codePointAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Ig(e){if(zr(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 Ng(e){zr(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const a=e.codePointAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Lg(...e){let t=-1,n;for(;++t<e.length;)zr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Mg(n)}function Mg(e){zr(e);const t=e.codePointAt(0)===47;let n=zg(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function zg(e,t){let n="",r=0,i=-1,o=0,s=-1,a,c;for(;++s<=e.length;){if(s<e.length)a=e.codePointAt(s);else{if(a===47)break;a=47}if(a===47){if(!(i===s-1||o===1))if(i!==s-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else a===46&&o>-1?o++:o=-1}return n}function zr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Ug={cwd:Hg};function Hg(){return"/"}function $s(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function qg(e){if(typeof e=="string")e=new URL(e);else if(!$s(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 jg(e)}function jg(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 Ws=["history","path","basename","stem","extname","dirname"];class Wc{constructor(t){let n;t?$s(t)?n={path:t}:typeof t=="string"||$g(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Ug.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ws.length;){const o=Ws[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Ws.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ot.basename(this.path):void 0}set basename(t){Ks(t,"basename"),Vs(t,"basename"),this.path=Ot.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ot.dirname(this.path):void 0}set dirname(t){Vc(this.basename,"dirname"),this.path=Ot.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ot.extname(this.path):void 0}set extname(t){if(Vs(t,"extname"),Vc(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=Ot.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$s(t)&&(t=qg(t)),Ks(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ot.basename(this.path,this.extname):void 0}set stem(t){Ks(t,"stem"),Vs(t,"stem"),this.path=Ot.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 Ve(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 Vs(e,t){if(e&&e.includes(Ot.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ot.sep+"`")}function Ks(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Vc(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function $g(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Wg=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),Vg={}.hasOwnProperty;class Qs extends Wg{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=Og()}copy(){const t=new Qs;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(qs(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ys("data",this.frozen),this.namespace[t]=n,this):Vg.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ys("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=Ai(t),r=this.parser||this.Parser;return Xs("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Xs("process",this.parser||this.Parser),Gs("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,s){const a=Ai(t),c=r.parse(a);r.run(c,a,function(f,u,d){if(f||!u||!d)return l(f);const h=u,p=r.stringify(h,d);Xg(p)?d.value=p:d.result=p,l(f,d)});function l(f,u){f||!u?s(f):o?o(u):n(void 0,u)}}}processSync(t){let n=!1,r;return this.freeze(),Xs("processSync",this.parser||this.Parser),Gs("processSync",this.compiler||this.Compiler),this.process(t,i),Qc("processSync","process",n),r;function i(o,s){n=!0,jc(o),r=s}}run(t,n,r){Kc(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(s,a){const c=Ai(n);i.run(t,c,l);function l(f,u,d){const h=u||t;f?a(f):s?s(h):r(void 0,h,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Qc("runSync","run",r),i;function o(s,a){jc(s),i=a,r=!0}}stringify(t,n){this.freeze();const r=Ai(n),i=this.compiler||this.Compiler;return Gs("stringify",i),Kc(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ys("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?a(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(l){if(typeof l=="function")c(l,[]);else if(typeof l=="object")if(Array.isArray(l)){const[f,...u]=l;c(f,u)}else s(l);else throw new TypeError("Expected usable value, not `"+l+"`")}function s(l){if(!("plugins"in l)&&!("settings"in l))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");a(l.plugins),l.settings&&(i.settings=qs(!0,i.settings,l.settings))}function a(l){let f=-1;if(l!=null)if(Array.isArray(l))for(;++f<l.length;){const u=l[f];o(u)}else throw new TypeError("Expected a list of plugins, not `"+l+"`")}function c(l,f){let u=-1,d=-1;for(;++u<r.length;)if(r[u][0]===l){d=u;break}if(d===-1)r.push([l,...f]);else if(f.length>0){let[h,...p]=f;const x=r[d][1];js(x)&&js(h)&&(h=qs(!0,x,h)),r[d]=[l,h,...p]}}}}const Kg=new Qs().freeze();function Xs(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Gs(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ys(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 Kc(e){if(!js(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Qc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ai(e){return Qg(e)?e:new Wc(e)}function Qg(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Xg(e){return typeof e=="string"||Gg(e)}function Gg(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Yg="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Xc=[],Gc={allowDangerousHtml:!0},Zg=/^(https?|ircs?|mailto|xmpp)$/i,Jg=[{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:"className",id:"remove-classname"},{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 e1(e){const t=t1(e),n=n1(e);return r1(t.runSync(t.parse(n),n),e)}function t1(e){const t=e.rehypePlugins||Xc,n=e.remarkPlugins||Xc,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Gc}:Gc;return Kg().use(Im).use(n).use(Dg,r).use(t)}function n1(e){const t=e.children||"",n=new Wc;return typeof t=="string"&&(n.value=t),n}function r1(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,s=t.skipHtml,a=t.unwrapDisallowed,c=t.urlTransform||i1;for(const f of Jg)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+Yg+f.id,void 0);return zs(e,l),_p(e,{Fragment:T.Fragment,components:i,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0});function l(f,u,d){if(f.type==="raw"&&d&&typeof u=="number")return s?d.children.splice(u,1):d.children[u]={type:"text",value:f.value},u;if(f.type==="element"){let h;for(h in Ss)if(Object.hasOwn(Ss,h)&&Object.hasOwn(f.properties,h)){const p=f.properties[h],x=Ss[h];(x===null||x.includes(f.tagName))&&(f.properties[h]=c(String(p||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):o?o.includes(f.tagName):!1;if(!h&&r&&typeof u=="number"&&(h=!r(f,u,d)),h&&d&&typeof u=="number")return a&&f.children?d.children.splice(u,1,...f.children):d.children.splice(u,1),u}}}function i1(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Zg.test(e.slice(0,t))?e:""}function Yc(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}function o1(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function s1(e,t,n){const i=Ci((n||{}).ignore||[]),o=a1(t);let s=-1;for(;++s<o.length;)Uc(e,"text",a);function a(l,f){let u=-1,d;for(;++u<f.length;){const h=f[u],p=d?d.children:void 0;if(i(h,p?p.indexOf(h):void 0,d))return;d=h}if(d)return c(l,f)}function c(l,f){const u=f[f.length-1],d=o[s][0],h=o[s][1];let p=0;const m=u.children.indexOf(l);let g=!1,b=[];d.lastIndex=0;let y=d.exec(l.value);for(;y;){const v=y.index,k={index:y.index,input:y.input,stack:[...f,l]};let C=h(...y,k);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?d.lastIndex=v+1:(p!==v&&b.push({type:"text",value:l.value.slice(p,v)}),Array.isArray(C)?b.push(...C):C&&b.push(C),p=v+y[0].length,g=!0),!d.global)break;y=d.exec(l.value)}return g?(p<l.value.length&&b.push({type:"text",value:l.value.slice(p)}),u.children.splice(m,1,...b)):b=[l],m+b.length}}function a1(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([l1(i[0]),c1(i[1])])}return t}function l1(e){return typeof e=="string"?new RegExp(o1(e),"g"):e}function c1(e){return typeof e=="function"?e:function(){return e}}const Zs="phrasing",Js=["autolink","link","image","label"];function u1(){return{transforms:[g1],enter:{literalAutolink:d1,literalAutolinkEmail:ea,literalAutolinkHttp:ea,literalAutolinkWww:ea},exit:{literalAutolink:m1,literalAutolinkEmail:x1,literalAutolinkHttp:h1,literalAutolinkWww:p1}}}function f1(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Zs,notInConstruct:Js},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Zs,notInConstruct:Js},{character:":",before:"[ps]",after:"\\/",inConstruct:Zs,notInConstruct:Js}]}}function d1(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ea(e){this.config.enter.autolinkProtocol.call(this,e)}function h1(e){this.config.exit.autolinkProtocol.call(this,e)}function p1(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 x1(e){this.config.exit.autolinkEmail.call(this,e)}function m1(e){this.exit(e)}function g1(e){s1(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,y1],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),b1]],{ignore:["link","linkReference"]})}function y1(e,t,n,r,i){let o="";if(!Zc(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!v1(n)))return!1;const s=w1(n+r);if(!s[0])return!1;const a={type:"link",title:null,url:o+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function b1(e,t,n,r){return!Zc(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function v1(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 w1(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=Yc(e,"(");let o=Yc(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Zc(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Bn(n)||xi(n))&&(!t||n!==47)}Jc.peek=F1;function E1(){this.buffer()}function C1(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function k1(){this.buffer()}function A1(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function S1(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=kt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function _1(e){this.exit(e)}function B1(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=kt(this.sliceSerialize(e)).toLowerCase(),n.label=t}function D1(e){this.exit(e)}function F1(){return"["}function Jc(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const s=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),a(),s(),o+=i.move("]"),o}function T1(){return{enter:{gfmFootnoteCallString:E1,gfmFootnoteCall:C1,gfmFootnoteDefinitionLabelString:k1,gfmFootnoteDefinition:A1},exit:{gfmFootnoteCallString:S1,gfmFootnoteCall:_1,gfmFootnoteDefinitionLabelString:B1,gfmFootnoteDefinition:D1}}}function O1(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Jc},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,s){const a=o.createTracker(s);let c=a.move("[^");const l=o.enter("footnoteDefinition"),f=o.enter("label");return c+=a.move(o.safe(o.associationId(r),{before:c,after:"]"})),f(),c+=a.move("]:"),r.children&&r.children.length>0&&(a.shift(4),c+=a.move((t?`
125
+ `:" ")+o.indentLines(o.containerFlow(r,a.current()),t?eu:P1))),l(),c}}function P1(e,t,n){return t===0?e:eu(e,t,n)}function eu(e,t,n){return(n?"":" ")+e}const R1=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];tu.peek=z1;function I1(){return{canContainEols:["delete"],enter:{strikethrough:L1},exit:{strikethrough:M1}}}function N1(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:R1}],handlers:{delete:tu}}}function L1(e){this.enter({type:"delete",children:[]},e)}function M1(e){this.exit(e)}function tu(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let s=i.move("~~");return s+=n.containerPhrasing(e,{...i.current(),before:s,after:"~"}),s+=i.move("~~"),o(),s}function z1(){return"~"}function U1(e){return e.length}function H1(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||U1,o=[],s=[],a=[],c=[];let l=0,f=-1;for(;++f<e.length;){const x=[],m=[];let g=-1;for(e[f].length>l&&(l=e[f].length);++g<e[f].length;){const b=q1(e[f][g]);if(n.alignDelimiters!==!1){const y=i(b);m[g]=y,(c[g]===void 0||y>c[g])&&(c[g]=y)}x.push(b)}s[f]=x,a[f]=m}let u=-1;if(typeof r=="object"&&"length"in r)for(;++u<l;)o[u]=nu(r[u]);else{const x=nu(r);for(;++u<l;)o[u]=x}u=-1;const d=[],h=[];for(;++u<l;){const x=o[u];let m="",g="";x===99?(m=":",g=":"):x===108?m=":":x===114&&(g=":");let b=n.alignDelimiters===!1?1:Math.max(1,c[u]-m.length-g.length);const y=m+"-".repeat(b)+g;n.alignDelimiters!==!1&&(b=m.length+b+g.length,b>c[u]&&(c[u]=b),h[u]=b),d[u]=y}s.splice(1,0,d),a.splice(1,0,h),f=-1;const p=[];for(;++f<s.length;){const x=s[f],m=a[f];u=-1;const g=[];for(;++u<l;){const b=x[u]||"";let y="",v="";if(n.alignDelimiters!==!1){const k=c[u]-(m[u]||0),C=o[u];C===114?y=" ".repeat(k):C===99?k%2?(y=" ".repeat(k/2+.5),v=" ".repeat(k/2-.5)):(y=" ".repeat(k/2),v=y):v=" ".repeat(k)}n.delimiterStart!==!1&&!u&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||u)&&g.push(" "),n.alignDelimiters!==!1&&g.push(y),g.push(b),n.alignDelimiters!==!1&&g.push(v),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||u!==l-1)&&g.push("|")}p.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return p.join(`
126
+ `)}function q1(e){return e==null?"":String(e)}function nu(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 j1(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const s=n.indentLines(n.containerFlow(e,o.current()),$1);return i(),s}function $1(e,t,n){return">"+(n?"":" ")+e}function W1(e,t){return ru(e,t.inConstruct,!0)&&!ru(e,t.notInConstruct,!1)}function ru(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 iu(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
127
+ `&&W1(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
128
+ `}function V1(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>s&&(s=o):o=1,i=r+t.length,r=n.indexOf(t,i);return s}function K1(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 Q1(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 X1(e,t,n,r){const i=Q1(n),o=e.value||"",s=i==="`"?"GraveAccent":"Tilde";if(K1(e,n)){const u=n.enter("codeIndented"),d=n.indentLines(o,G1);return u(),d}const a=n.createTracker(r),c=i.repeat(Math.max(V1(o,i)+1,3)),l=n.enter("codeFenced");let f=a.move(c);if(e.lang){const u=n.enter(`codeFencedLang${s}`);f+=a.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...a.current()})),u()}if(e.lang&&e.meta){const u=n.enter(`codeFencedMeta${s}`);f+=a.move(" "),f+=a.move(n.safe(e.meta,{before:f,after:`
129
+ `,encode:["`"],...a.current()})),u()}return f+=a.move(`
130
+ `),o&&(f+=a.move(o+`
131
+ `)),f+=a.move(c),l(),f}function G1(e,t,n){return(n?"":" ")+e}function ta(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 Y1(e,t,n,r){const i=ta(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("definition");let a=n.enter("label");const c=n.createTracker(r);let l=c.move("[");return l+=c.move(n.safe(n.associationId(e),{before:l,after:"]",...c.current()})),l+=c.move("]: "),a(),!e.url||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(a=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":`
132
+ `,...c.current()}))),a(),e.title&&(a=n.enter(`title${o}`),l+=c.move(" "+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),a()),s(),l}function Z1(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ur(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Si(e,t,n){const r=er(e),i=er(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ou.peek=J1;function ou(e,t,n,r){const i=Z1(n),o=n.enter("emphasis"),s=n.createTracker(r),a=s.move(i);let c=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const l=c.charCodeAt(0),f=Si(r.before.charCodeAt(r.before.length-1),l,i);f.inside&&(c=Ur(l)+c.slice(1));const u=c.charCodeAt(c.length-1),d=Si(r.after.charCodeAt(0),u,i);d.inside&&(c=c.slice(0,-1)+Ur(u));const h=s.move(i);return o(),n.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},a+c+h}function J1(e,t,n){return n.options.emphasis||"*"}function ey(e,t){let n=!1;return zs(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ms}),!!((!e.depth||e.depth<3)&&_s(e)&&(t.options.setext||n))}function ty(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(ey(e,n)){const f=n.enter("headingSetext"),u=n.enter("phrasing"),d=n.containerPhrasing(e,{...o.current(),before:`
133
+ `,after:`
134
+ `});return u(),f(),d+`
135
+ `+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
136
+ `))+1))}const s="#".repeat(i),a=n.enter("headingAtx"),c=n.enter("phrasing");o.move(s+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
137
+ `,...o.current()});return/^[\t ]/.test(l)&&(l=Ur(l.charCodeAt(0))+l.slice(1)),l=l?s+" "+l:s,n.options.closeAtx&&(l+=" "+s),c(),a(),l}su.peek=ny;function su(e){return e.value||""}function ny(){return"<"}au.peek=ry;function au(e,t,n,r){const i=ta(n),o=i==='"'?"Quote":"Apostrophe",s=n.enter("image");let a=n.enter("label");const c=n.createTracker(r);let l=c.move("![");return l+=c.move(n.safe(e.alt,{before:l,after:"]",...c.current()})),l+=c.move("]("),a(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(a=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(a=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),a(),e.title&&(a=n.enter(`title${o}`),l+=c.move(" "+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),a()),l+=c.move(")"),s(),l}function ry(){return"!"}lu.peek=iy;function lu(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let s=n.enter("label");const a=n.createTracker(r);let c=a.move("![");const l=n.safe(e.alt,{before:c,after:"]",...a.current()});c+=a.move(l+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const u=n.safe(n.associationId(e),{before:c,after:"]",...a.current()});return s(),n.stack=f,o(),i==="full"||!l||l!==u?c+=a.move(u+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function iy(){return"!"}cu.peek=oy;function cu(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const s=n.unsafe[o],a=n.compilePattern(s);let c;if(s.atBreak)for(;c=a.exec(r);){let l=c.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(c.index+1)}}return i+r+i}function oy(){return"`"}function uu(e,t){const n=_s(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))}fu.peek=sy;function fu(e,t,n,r){const i=ta(n),o=i==='"'?"Quote":"Apostrophe",s=n.createTracker(r);let a,c;if(uu(e,n)){const f=n.stack;n.stack=[],a=n.enter("autolink");let u=s.move("<");return u+=s.move(n.containerPhrasing(e,{before:u,after:">",...s.current()})),u+=s.move(">"),a(),n.stack=f,u}a=n.enter("link"),c=n.enter("label");let l=s.move("[");return l+=s.move(n.containerPhrasing(e,{before:l,after:"](",...s.current()})),l+=s.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+=s.move("<"),l+=s.move(n.safe(e.url,{before:l,after:">",...s.current()})),l+=s.move(">")):(c=n.enter("destinationRaw"),l+=s.move(n.safe(e.url,{before:l,after:e.title?" ":")",...s.current()}))),c(),e.title&&(c=n.enter(`title${o}`),l+=s.move(" "+i),l+=s.move(n.safe(e.title,{before:l,after:i,...s.current()})),l+=s.move(i),c()),l+=s.move(")"),a(),l}function sy(e,t,n){return uu(e,n)?"<":"["}du.peek=ay;function du(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let s=n.enter("label");const a=n.createTracker(r);let c=a.move("[");const l=n.containerPhrasing(e,{before:c,after:"]",...a.current()});c+=a.move(l+"]["),s();const f=n.stack;n.stack=[],s=n.enter("reference");const u=n.safe(n.associationId(e),{before:c,after:"]",...a.current()});return s(),n.stack=f,o(),i==="full"||!l||l!==u?c+=a.move(u+"]"):i==="shortcut"?c=c.slice(0,-1):c+=a.move("]"),c}function ay(){return"["}function na(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 ly(e){const t=na(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 cy(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 hu(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 uy(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let s=e.ordered?cy(n):na(n);const a=e.ordered?s==="."?")":".":ly(n);let c=t&&n.bulletLastUsed?s===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((s==="*"||s==="-")&&f&&(!f.children||!f.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&&(c=!0),hu(n)===s&&f){let u=-1;for(;++u<e.children.length;){const d=e.children[u];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(s=a),n.bulletCurrent=s;const l=n.containerFlow(e,r);return n.bulletLastUsed=s,n.bulletCurrent=o,i(),l}function fy(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 dy(e,t,n,r){const i=fy(n);let o=n.bulletCurrent||na(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let s=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);const a=n.createTracker(r);a.move(o+" ".repeat(s-o.length)),a.shift(s);const c=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,a.current()),f);return c(),l;function f(u,d,h){return d?(h?"":" ".repeat(s))+u:(h?o:o+" ".repeat(s-o.length))+u}}function hy(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),s=n.containerPhrasing(e,r);return o(),i(),s}const py=Ci(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xy(e,t,n,r){return(e.children.some(function(s){return py(s)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function my(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}pu.peek=gy;function pu(e,t,n,r){const i=my(n),o=n.enter("strong"),s=n.createTracker(r),a=s.move(i+i);let c=s.move(n.containerPhrasing(e,{after:i,before:a,...s.current()}));const l=c.charCodeAt(0),f=Si(r.before.charCodeAt(r.before.length-1),l,i);f.inside&&(c=Ur(l)+c.slice(1));const u=c.charCodeAt(c.length-1),d=Si(r.after.charCodeAt(0),u,i);d.inside&&(c=c.slice(0,-1)+Ur(u));const h=s.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},a+c+h}function gy(e,t,n){return n.options.strong||"*"}function yy(e,t,n,r){return n.safe(e.value,r)}function by(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 vy(e,t,n){const r=(hu(n)+(n.options.ruleSpaces?" ":"")).repeat(by(n));return n.options.ruleSpaces?r.slice(0,-1):r}const xu={blockquote:j1,break:iu,code:X1,definition:Y1,emphasis:ou,hardBreak:iu,heading:ty,html:su,image:au,imageReference:lu,inlineCode:cu,link:fu,linkReference:du,list:uy,listItem:dy,paragraph:hy,root:xy,strong:pu,text:yy,thematicBreak:vy};function wy(){return{enter:{table:Ey,tableData:mu,tableHeader:mu,tableRow:ky},exit:{codeText:Ay,table:Cy,tableData:ra,tableHeader:ra,tableRow:ra}}}function Ey(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 Cy(e){this.exit(e),this.data.inTable=void 0}function ky(e){this.enter({type:"tableRow",children:[]},e)}function ra(e){this.exit(e)}function mu(e){this.enter({type:"tableCell",children:[]},e)}function Ay(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Sy));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Sy(e,t){return t==="|"?t:e}function _y(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
138
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:s,tableCell:c,tableRow:a}};function s(h,p,x,m){return l(f(h,x,m),h.align)}function a(h,p,x,m){const g=u(h,x,m),b=l([g]);return b.slice(0,b.indexOf(`
139
+ `))}function c(h,p,x,m){const g=x.enter("tableCell"),b=x.enter("phrasing"),y=x.containerPhrasing(h,{...m,before:o,after:o});return b(),g(),y}function l(h,p){return H1(h,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function f(h,p,x){const m=h.children;let g=-1;const b=[],y=p.enter("table");for(;++g<m.length;)b[g]=u(m[g],p,x);return y(),b}function u(h,p,x){const m=h.children;let g=-1;const b=[],y=p.enter("tableRow");for(;++g<m.length;)b[g]=c(m[g],h,p,x);return y(),b}function d(h,p,x){let m=xu.inlineCode(h,p,x);return x.stack.includes("tableCell")&&(m=m.replace(/\|/g,"\\$&")),m}}function By(){return{exit:{taskListCheckValueChecked:gu,taskListCheckValueUnchecked:gu,paragraph:Fy}}}function Dy(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ty}}}function gu(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Fy(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,s;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){s=a;break}}s===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 Ty(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=n.createTracker(r);o&&a.move(s);let c=xu.listItem(e,t,n,{...r,...a.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(f){return f+s}}function Oy(){return[u1(),T1(),I1(),wy(),By()]}function Py(e){return{extensions:[f1(),O1(e),N1(),_y(e),Dy()]}}const Ry={tokenize:Uy,partial:!0},yu={tokenize:Hy,partial:!0},bu={tokenize:qy,partial:!0},vu={tokenize:jy,partial:!0},Iy={tokenize:$y,partial:!0},wu={name:"wwwAutolink",tokenize:My,previous:Cu},Eu={name:"protocolAutolink",tokenize:zy,previous:ku},Qt={name:"emailAutolink",tokenize:Ly,previous:Au},Pt={};function Ny(){return{text:Pt}}let Dn=48;for(;Dn<123;)Pt[Dn]=Qt,Dn++,Dn===58?Dn=65:Dn===91&&(Dn=97);Pt[43]=Qt,Pt[45]=Qt,Pt[46]=Qt,Pt[95]=Qt,Pt[72]=[Qt,Eu],Pt[104]=[Qt,Eu],Pt[87]=[Qt,wu],Pt[119]=[Qt,wu];function Ly(e,t,n){const r=this;let i,o;return s;function s(u){return!ia(u)||!Au.call(r,r.previous)||oa(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(u))}function a(u){return ia(u)?(e.consume(u),a):u===64?(e.consume(u),c):n(u)}function c(u){return u===46?e.check(Iy,f,l)(u):u===45||u===95||Ke(u)?(o=!0,e.consume(u),c):f(u)}function l(u){return e.consume(u),i=!0,c}function f(u){return o&&i&&Je(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function My(e,t,n){const r=this;return i;function i(s){return s!==87&&s!==119||!Cu.call(r,r.previous)||oa(r.events)?n(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Ry,e.attempt(yu,e.attempt(bu,o),n),n)(s))}function o(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function zy(e,t,n){const r=this;let i="",o=!1;return s;function s(u){return(u===72||u===104)&&ku.call(r,r.previous)&&!oa(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(u),e.consume(u),a):n(u)}function a(u){if(Je(u)&&i.length<5)return i+=String.fromCodePoint(u),e.consume(u),a;if(u===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(u),c}return n(u)}function c(u){return u===47?(e.consume(u),o?l:(o=!0,c)):n(u)}function l(u){return u===null||pi(u)||ve(u)||Bn(u)||xi(u)?n(u):e.attempt(yu,e.attempt(bu,f),n)(u)}function f(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function Uy(e,t,n){let r=0;return i;function i(s){return(s===87||s===119)&&r<3?(r++,e.consume(s),i):s===46&&r===3?(e.consume(s),o):n(s)}function o(s){return s===null?n(s):t(s)}}function Hy(e,t,n){let r,i,o;return s;function s(l){return l===46||l===95?e.check(vu,c,a)(l):l===null||ve(l)||Bn(l)||l!==45&&xi(l)?c(l):(o=!0,e.consume(l),s)}function a(l){return l===95?r=!0:(i=r,r=void 0),e.consume(l),s}function c(l){return i||r||!o?n(l):t(l)}}function qy(e,t){let n=0,r=0;return i;function i(s){return s===40?(n++,e.consume(s),i):s===41&&r<n?o(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(vu,t,o)(s):s===null||ve(s)||Bn(s)?t(s):(e.consume(s),i)}function o(s){return s===41&&r++,e.consume(s),i}}function jy(e,t,n){return r;function r(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),r):a===38?(e.consume(a),o):a===93?(e.consume(a),i):a===60||a===null||ve(a)||Bn(a)?t(a):n(a)}function i(a){return a===null||a===40||a===91||ve(a)||Bn(a)?t(a):r(a)}function o(a){return Je(a)?s(a):n(a)}function s(a){return a===59?(e.consume(a),r):Je(a)?(e.consume(a),s):n(a)}}function $y(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Ke(o)?n(o):t(o)}}function Cu(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ve(e)}function ku(e){return!Je(e)}function Au(e){return!(e===47||ia(e))}function ia(e){return e===43||e===45||e===46||e===95||Ke(e)}function oa(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 Wy={tokenize:Jy,partial:!0};function Vy(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Gy,continuation:{tokenize:Yy},exit:Zy}},text:{91:{name:"gfmFootnoteCall",tokenize:Xy},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Ky,resolveTo:Qy}}}}function Ky(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){s=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return a;function a(c){if(!s||!s._balanced)return n(c);const l=kt(r.sliceSerialize({start:s.end,end:r.now()}));return l.codePointAt(0)!==94||!o.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Qy(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},s={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...a),e}function Xy(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,s;return a;function a(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(u){if(o>999||u===93&&!s||u===null||u===91||ve(u))return n(u);if(u===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(kt(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return ve(u)||(s=!0),o++,e.consume(u),u===92?f:l}function f(u){return u===91||u===92||u===93?(e.consume(u),o++,l):l(u)}}function Gy(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,s=0,a;return c;function c(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(p)}function f(p){if(s>999||p===93&&!a||p===null||p===91||ve(p))return n(p);if(p===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return o=kt(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return ve(p)||(a=!0),s++,e.consume(p),p===92?u:f}function u(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}function d(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(o)||i.push(o),ge(e,h,"gfmFootnoteDefinitionWhitespace")):n(p)}function h(p){return t(p)}}function Yy(e,t,n){return e.check(Rr,t,e.attempt(Wy,t,n))}function Zy(e){e.exit("gfmFootnoteDefinition")}function Jy(e,t,n){const r=this;return ge(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const s=r.events[r.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(o):n(o)}}function eb(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(s,a){let c=-1;for(;++c<s.length;)if(s[c][0]==="enter"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._close){let l=c;for(;l--;)if(s[l][0]==="exit"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._open&&s[c][1].end.offset-s[c][1].start.offset===s[l][1].end.offset-s[l][1].start.offset){s[c][1].type="strikethroughSequence",s[l][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},s[l][1].start),end:Object.assign({},s[c][1].end)},u={type:"strikethroughText",start:Object.assign({},s[l][1].end),end:Object.assign({},s[c][1].start)},d=[["enter",f,a],["enter",s[l][1],a],["exit",s[l][1],a],["enter",u,a]],h=a.parser.constructs.insideSpan.null;h&&xt(d,d.length,0,mi(h,s.slice(l+1,c),a)),xt(d,d.length,0,[["exit",u,a],["enter",s[c][1],a],["exit",s[c][1],a],["exit",f,a]]),xt(s,l-1,c-l+3,d),c=l+d.length-2;break}}for(c=-1;++c<s.length;)s[c][1].type==="strikethroughSequenceTemporary"&&(s[c][1].type="data");return s}function o(s,a,c){const l=this.previous,f=this.events;let u=0;return d;function d(p){return l===126&&f[f.length-1][1].type!=="characterEscape"?c(p):(s.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const x=er(l);if(p===126)return u>1?c(p):(s.consume(p),u++,h);if(u<2&&!n)return c(p);const m=s.exit("strikethroughSequenceTemporary"),g=er(p);return m._open=!g||g===2&&!!x,m._close=!x||x===2&&!!g,a(p)}}}class tb{constructor(){this.map=[]}add(t,n,r){nb(this,t,n,r)}consume(t){if(this.map.sort(function(o,s){return o[0]-s[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.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function nb(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 rb(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function ib(){return{flow:{null:{name:"table",tokenize:ob,resolveAll:sb}}}}function ob(e,t,n){const r=this;let i=0,o=0,s;return a;function a(E){let D=r.events.length-1;for(;D>-1;){const U=r.events[D][1].type;if(U==="lineEnding"||U==="linePrefix")D--;else break}const F=D>-1?r.events[D][1].type:null,R=F==="tableHead"||F==="tableRow"?C:c;return R===C&&r.parser.lazy[r.now().line]?n(E):R(E)}function c(E){return e.enter("tableHead"),e.enter("tableRow"),l(E)}function l(E){return E===124||(s=!0,o+=1),f(E)}function f(E){return E===null?n(E):te(E)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),h):n(E):de(E)?ge(e,f,"whitespace")(E):(o+=1,s&&(s=!1,i+=1),E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),s=!0,f):(e.enter("data"),u(E)))}function u(E){return E===null||E===124||ve(E)?(e.exit("data"),f(E)):(e.consume(E),E===92?d:u)}function d(E){return E===92||E===124?(e.consume(E),u):u(E)}function h(E){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(E):(e.enter("tableDelimiterRow"),s=!1,de(E)?ge(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):p(E))}function p(E){return E===45||E===58?m(E):E===124?(s=!0,e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),x):k(E)}function x(E){return de(E)?ge(e,m,"whitespace")(E):m(E)}function m(E){return E===58?(o+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),g):E===45?(o+=1,g(E)):E===null||te(E)?v(E):k(E)}function g(E){return E===45?(e.enter("tableDelimiterFiller"),b(E)):k(E)}function b(E){return E===45?(e.consume(E),b):E===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(E),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(E))}function y(E){return de(E)?ge(e,v,"whitespace")(E):v(E)}function v(E){return E===124?p(E):E===null||te(E)?!s||i!==o?k(E):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(E)):k(E)}function k(E){return n(E)}function C(E){return e.enter("tableRow"),_(E)}function _(E){return E===124?(e.enter("tableCellDivider"),e.consume(E),e.exit("tableCellDivider"),_):E===null||te(E)?(e.exit("tableRow"),t(E)):de(E)?ge(e,_,"whitespace")(E):(e.enter("data"),A(E))}function A(E){return E===null||E===124||ve(E)?(e.exit("data"),_(E)):(e.consume(E),E===92?O:A)}function O(E){return E===92||E===124?(e.consume(E),A):A(E)}}function sb(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],s=[0,0,0,0],a=!1,c=0,l,f,u;const d=new tb;for(;++n<e.length;){const h=e[n],p=h[1];h[0]==="enter"?p.type==="tableHead"?(a=!1,c!==0&&(Su(d,t,c,l,f),f=void 0,c=0),l={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(n,0,[["enter",l,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,u=void 0,o=[0,0,0,0],s=[0,n+1,0,0],a&&(a=!1,f={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(n,0,[["enter",f,t]])),i=p.type==="tableDelimiterRow"?2:f?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,s[2]===0&&(o[1]!==0&&(s[0]=s[1],u=_i(d,t,o,i,void 0,u),o=[0,0,0,0]),s[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(s[0]=s[1],u=_i(d,t,o,i,void 0,u)),o=s,s=[o[1],n,0,0])):p.type==="tableHead"?(a=!0,c=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(c=n,o[1]!==0?(s[0]=s[1],u=_i(d,t,o,i,n,u)):s[1]!==0&&(u=_i(d,t,s,i,n,u)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(s[3]=n)}for(c!==0&&Su(d,t,c,l,f),d.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=rb(t.events,n))}return e}function _i(e,t,n,r,i,o){const s=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},nr(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=nr(t.events,n[1]);if(o={type:s,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const l=nr(t.events,n[2]),f=nr(t.events,n[3]),u={type:a,start:Object.assign({},l),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",u,t]]),r!==2){const d=t.events[n[2]],h=t.events[n[3]];if(d[1].end=Object.assign({},h[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,x=n[3]-n[2]-1;e.add(p,x,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return i!==void 0&&(o.end=Object.assign({},nr(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function Su(e,t,n,r,i){const o=[],s=nr(t.events,n);i&&(i.end=Object.assign({},s),o.push(["exit",i,t])),r.end=Object.assign({},s),o.push(["exit",r,t]),e.add(n+1,0,o)}function nr(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const ab={name:"tasklistCheck",tokenize:cb};function lb(){return{text:{91:ab}}}function cb(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return ve(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),s):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),s):n(c)}function s(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(c)}function a(c){return te(c)?t(c):de(c)?e.check({tokenize:ub},t,n)(c):n(c)}}function ub(e,t,n){return ge(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function fb(e){return ac([Ny(),Vy(),eb(e),ib(),lb()])}const db={};function hb(e){const t=this,n=e||db,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),s=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(fb(n)),o.push(Oy()),s.push(Py(n))}function _u(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=_u(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Bu(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_u(e))&&(r&&(r+=" "),r+=t);return r}const pb=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},xb=(e,t)=>({classGroupId:e,validator:t}),Du=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Bi="-",Fu=[],mb="arbitrary..",gb=e=>{const t=bb(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return yb(s);const a=s.split(Bi),c=a[0]===""&&a.length>1?1:0;return Tu(a,c,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const c=r[s],l=n[s];return c?l?pb(l,c):c:l||Fu}return n[s]||Fu}}},Tu=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const l=Tu(e,t+1,o);if(l)return l}const s=n.validators;if(s===null)return;const a=t===0?e.join(Bi):e.slice(t).join(Bi),c=s.length;for(let l=0;l<c;l++){const f=s[l];if(f.validator(a))return f.classGroupId}},yb=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?mb+r:void 0})(),bb=e=>{const{theme:t,classGroups:n}=e;return vb(n,t)},vb=(e,t)=>{const n=Du();for(const r in e){const i=e[r];sa(i,n,r,t)}return n},sa=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const s=e[o];wb(s,t,n,r)}},wb=(e,t,n,r)=>{if(typeof e=="string"){Eb(e,t,n);return}if(typeof e=="function"){Cb(e,t,n,r);return}kb(e,t,n,r)},Eb=(e,t,n)=>{const r=e===""?t:Ou(t,e);r.classGroupId=n},Cb=(e,t,n,r)=>{if(Ab(e)){sa(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(xb(n,e))},kb=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let s=0;s<o;s++){const[a,c]=i[s];sa(c,Ou(t,a),n,r)}},Ou=(e,t)=>{let n=e;const r=t.split(Bi),i=r.length;for(let o=0;o<i;o++){const s=r[o];let a=n.nextPart.get(s);a||(a=Du(),n.nextPart.set(s,a)),n=a}return n},Ab=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Sb=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,s)=>{n[o]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let s=n[o];if(s!==void 0)return s;if((s=r[o])!==void 0)return i(o,s),s},set(o,s){o in n?n[o]=s:i(o,s)}}},aa="!",Pu=":",_b=[],Ru=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Bb=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let s=0,a=0,c=0,l;const f=i.length;for(let x=0;x<f;x++){const m=i[x];if(s===0&&a===0){if(m===Pu){o.push(i.slice(c,x)),c=x+1;continue}if(m==="/"){l=x;continue}}m==="["?s++:m==="]"?s--:m==="("?a++:m===")"&&a--}const u=o.length===0?i:i.slice(c);let d=u,h=!1;u.endsWith(aa)?(d=u.slice(0,-1),h=!0):u.startsWith(aa)&&(d=u.slice(1),h=!0);const p=l&&l>c?l-c:void 0;return Ru(o,h,d,p)};if(t){const i=t+Pu,o=r;r=s=>s.startsWith(i)?o(s.slice(i.length)):Ru(_b,!1,s,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},Db=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const s=n[o],a=s[0]==="[",c=t.has(s);a||c?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(s)):i.push(s)}return i.length>0&&(i.sort(),r.push(...i)),r}},Fb=e=>({cache:Sb(e.cacheSize),parseClassName:Bb(e),sortModifiers:Db(e),...gb(e)}),Tb=/\s+/,Ob=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,s=[],a=e.trim().split(Tb);let c="";for(let l=a.length-1;l>=0;l-=1){const f=a[l],{isExternal:u,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:x}=n(f);if(u){c=f+(c.length>0?" "+c:c);continue}let m=!!x,g=r(m?p.substring(0,x):p);if(!g){if(!m){c=f+(c.length>0?" "+c:c);continue}if(g=r(p),!g){c=f+(c.length>0?" "+c:c);continue}m=!1}const b=d.length===0?"":d.length===1?d[0]:o(d).join(":"),y=h?b+aa:b,v=y+g;if(s.indexOf(v)>-1)continue;s.push(v);const k=i(g,m);for(let C=0;C<k.length;++C){const _=k[C];s.push(y+_)}c=f+(c.length>0?" "+c:c)}return c},Pb=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=Iu(n))&&(i&&(i+=" "),i+=r);return i},Iu=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Iu(e[r]))&&(n&&(n+=" "),n+=t);return n},Rb=(e,...t)=>{let n,r,i,o;const s=c=>{const l=t.reduce((f,u)=>u(f),e());return n=Fb(l),r=n.cache.get,i=n.cache.set,o=a,a(c)},a=c=>{const l=r(c);if(l)return l;const f=Ob(c,n);return i(c,f),f};return o=s,(...c)=>o(Pb(...c))},Ib=[],Ne=e=>{const t=n=>n[e]||Ib;return t.isThemeGetter=!0,t},Nu=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Lu=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Nb=/^\d+\/\d+$/,Lb=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mb=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zb=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ub=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Hb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rr=e=>Nb.test(e),ue=e=>!!e&&!Number.isNaN(Number(e)),cn=e=>!!e&&Number.isInteger(Number(e)),la=e=>e.endsWith("%")&&ue(e.slice(0,-1)),Xt=e=>Lb.test(e),qb=()=>!0,jb=e=>Mb.test(e)&&!zb.test(e),Mu=()=>!1,$b=e=>Ub.test(e),Wb=e=>Hb.test(e),Vb=e=>!G(e)&&!Y(e),Kb=e=>ir(e,ju,Mu),G=e=>Nu.test(e),Fn=e=>ir(e,$u,jb),ca=e=>ir(e,Zb,ue),zu=e=>ir(e,Hu,Mu),Qb=e=>ir(e,qu,Wb),Di=e=>ir(e,Wu,$b),Y=e=>Lu.test(e),Hr=e=>or(e,$u),Xb=e=>or(e,Jb),Uu=e=>or(e,Hu),Gb=e=>or(e,ju),Yb=e=>or(e,qu),Fi=e=>or(e,Wu,!0),ir=(e,t,n)=>{const r=Nu.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},or=(e,t,n=!1)=>{const r=Lu.exec(e);return r?r[1]?t(r[1]):n:!1},Hu=e=>e==="position"||e==="percentage",qu=e=>e==="image"||e==="url",ju=e=>e==="length"||e==="size"||e==="bg-size",$u=e=>e==="length",Zb=e=>e==="number",Jb=e=>e==="family-name",Wu=e=>e==="shadow",Vu=Rb(()=>{const e=Ne("color"),t=Ne("font"),n=Ne("text"),r=Ne("font-weight"),i=Ne("tracking"),o=Ne("leading"),s=Ne("breakpoint"),a=Ne("container"),c=Ne("spacing"),l=Ne("radius"),f=Ne("shadow"),u=Ne("inset-shadow"),d=Ne("text-shadow"),h=Ne("drop-shadow"),p=Ne("blur"),x=Ne("perspective"),m=Ne("aspect"),g=Ne("ease"),b=Ne("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...v(),Y,G],C=()=>["auto","hidden","clip","visible","scroll"],_=()=>["auto","contain","none"],A=()=>[Y,G,c],O=()=>[rr,"full","auto",...A()],E=()=>[cn,"none","subgrid",Y,G],D=()=>["auto",{span:["full",cn,Y,G]},cn,Y,G],F=()=>[cn,"auto",Y,G],R=()=>["auto","min","max","fr",Y,G],U=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...A()],X=()=>[rr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],$=()=>[e,Y,G],ne=()=>[...v(),Uu,zu,{position:[Y,G]}],S=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",Gb,Kb,{size:[Y,G]}],q=()=>[la,Hr,Fn],w=()=>["","none","full",l,Y,G],I=()=>["",ue,Hr,Fn],Z=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[ue,la,Uu,zu],Q=()=>["","none",p,Y,G],Ce=()=>["none",ue,Y,G],ke=()=>["none",ue,Y,G],$e=()=>[ue,Y,G],Le=()=>[rr,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Xt],breakpoint:[Xt],color:[qb],container:[Xt],"drop-shadow":[Xt],ease:["in","out","in-out"],font:[Vb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Xt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Xt],shadow:[Xt],spacing:["px",ue],text:[Xt],"text-shadow":[Xt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",rr,G,Y,m]}],container:["container"],columns:[{columns:[ue,G,Y,a]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:O()}],"inset-x":[{"inset-x":O()}],"inset-y":[{"inset-y":O()}],start:[{start:O()}],end:[{end:O()}],top:[{top:O()}],right:[{right:O()}],bottom:[{bottom:O()}],left:[{left:O()}],visibility:["visible","invisible","collapse"],z:[{z:[cn,"auto",Y,G]}],basis:[{basis:[rr,"full","auto",a,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ue,rr,"auto","initial","none",G]}],grow:[{grow:["",ue,Y,G]}],shrink:[{shrink:["",ue,Y,G]}],order:[{order:[cn,"first","last","none",Y,G]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":R()}],"auto-rows":[{"auto-rows":R()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:A()}],px:[{px:A()}],py:[{py:A()}],ps:[{ps:A()}],pe:[{pe:A()}],pt:[{pt:A()}],pr:[{pr:A()}],pb:[{pb:A()}],pl:[{pl:A()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],w:[{w:[a,"screen",...X()]}],"min-w":[{"min-w":[a,"screen","none",...X()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",n,Hr,Fn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Y,ca]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",la,G]}],"font-family":[{font:[Xb,G,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Y,G]}],"line-clamp":[{"line-clamp":[ue,"none",Y,ca]}],leading:[{leading:[o,...A()]}],"list-image":[{"list-image":["none",Y,G]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Y,G]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:$()}],"text-color":[{text:$()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[ue,"from-font","auto",Y,Fn]}],"text-decoration-color":[{decoration:$()}],"underline-offset":[{"underline-offset":[ue,"auto",Y,G]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y,G]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y,G]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:S()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},cn,Y,G],radial:["",Y,G],conic:[cn,Y,G]},Yb,Qb]}],"bg-color":[{bg:$()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:$()}],"gradient-via":[{via:$()}],"gradient-to":[{to:$()}],rounded:[{rounded:w()}],"rounded-s":[{"rounded-s":w()}],"rounded-e":[{"rounded-e":w()}],"rounded-t":[{"rounded-t":w()}],"rounded-r":[{"rounded-r":w()}],"rounded-b":[{"rounded-b":w()}],"rounded-l":[{"rounded-l":w()}],"rounded-ss":[{"rounded-ss":w()}],"rounded-se":[{"rounded-se":w()}],"rounded-ee":[{"rounded-ee":w()}],"rounded-es":[{"rounded-es":w()}],"rounded-tl":[{"rounded-tl":w()}],"rounded-tr":[{"rounded-tr":w()}],"rounded-br":[{"rounded-br":w()}],"rounded-bl":[{"rounded-bl":w()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":I()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:$()}],"border-color-x":[{"border-x":$()}],"border-color-y":[{"border-y":$()}],"border-color-s":[{"border-s":$()}],"border-color-e":[{"border-e":$()}],"border-color-t":[{"border-t":$()}],"border-color-r":[{"border-r":$()}],"border-color-b":[{"border-b":$()}],"border-color-l":[{"border-l":$()}],"divide-color":[{divide:$()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ue,Y,G]}],"outline-w":[{outline:["",ue,Hr,Fn]}],"outline-color":[{outline:$()}],shadow:[{shadow:["","none",f,Fi,Di]}],"shadow-color":[{shadow:$()}],"inset-shadow":[{"inset-shadow":["none",u,Fi,Di]}],"inset-shadow-color":[{"inset-shadow":$()}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:$()}],"ring-offset-w":[{"ring-offset":[ue,Fn]}],"ring-offset-color":[{"ring-offset":$()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":$()}],"text-shadow":[{"text-shadow":["none",d,Fi,Di]}],"text-shadow-color":[{"text-shadow":$()}],opacity:[{opacity:[ue,Y,G]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ue]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":$()}],"mask-image-linear-to-color":[{"mask-linear-to":$()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":$()}],"mask-image-t-to-color":[{"mask-t-to":$()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":$()}],"mask-image-r-to-color":[{"mask-r-to":$()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":$()}],"mask-image-b-to-color":[{"mask-b-to":$()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":$()}],"mask-image-l-to-color":[{"mask-l-to":$()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":$()}],"mask-image-x-to-color":[{"mask-x-to":$()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":$()}],"mask-image-y-to-color":[{"mask-y-to":$()}],"mask-image-radial":[{"mask-radial":[Y,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":$()}],"mask-image-radial-to-color":[{"mask-radial-to":$()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[ue]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":$()}],"mask-image-conic-to-color":[{"mask-conic-to":$()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:S()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Y,G]}],filter:[{filter:["","none",Y,G]}],blur:[{blur:Q()}],brightness:[{brightness:[ue,Y,G]}],contrast:[{contrast:[ue,Y,G]}],"drop-shadow":[{"drop-shadow":["","none",h,Fi,Di]}],"drop-shadow-color":[{"drop-shadow":$()}],grayscale:[{grayscale:["",ue,Y,G]}],"hue-rotate":[{"hue-rotate":[ue,Y,G]}],invert:[{invert:["",ue,Y,G]}],saturate:[{saturate:[ue,Y,G]}],sepia:[{sepia:["",ue,Y,G]}],"backdrop-filter":[{"backdrop-filter":["","none",Y,G]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[ue,Y,G]}],"backdrop-contrast":[{"backdrop-contrast":[ue,Y,G]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ue,Y,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ue,Y,G]}],"backdrop-invert":[{"backdrop-invert":["",ue,Y,G]}],"backdrop-opacity":[{"backdrop-opacity":[ue,Y,G]}],"backdrop-saturate":[{"backdrop-saturate":[ue,Y,G]}],"backdrop-sepia":[{"backdrop-sepia":["",ue,Y,G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":A()}],"border-spacing-x":[{"border-spacing-x":A()}],"border-spacing-y":[{"border-spacing-y":A()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Y,G]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ue,"initial",Y,G]}],ease:[{ease:["linear","initial",g,Y,G]}],delay:[{delay:[ue,Y,G]}],animate:[{animate:["none",b,Y,G]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,Y,G]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:Ce()}],"rotate-x":[{"rotate-x":Ce()}],"rotate-y":[{"rotate-y":Ce()}],"rotate-z":[{"rotate-z":Ce()}],scale:[{scale:ke()}],"scale-x":[{"scale-x":ke()}],"scale-y":[{"scale-y":ke()}],"scale-z":[{"scale-z":ke()}],"scale-3d":["scale-3d"],skew:[{skew:$e()}],"skew-x":[{"skew-x":$e()}],"skew-y":[{"skew-y":$e()}],transform:[{transform:[Y,G,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Le()}],"translate-x":[{"translate-x":Le()}],"translate-y":[{"translate-y":Le()}],"translate-z":[{"translate-z":Le()}],"translate-none":["translate-none"],accent:[{accent:$()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:$()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y,G]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Y,G]}],fill:[{fill:["none",...$()]}],"stroke-w":[{stroke:[ue,Hr,Fn,ca]}],stroke:[{stroke:["none",...$()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function Ku(...e){return Vu(Bu(e))}function Qu({content:e,className:t}){return T.jsx("div",{className:Ku("prose prose-sm max-w-none w-full","prose-headings:text-inherit prose-p:text-inherit prose-strong:text-inherit prose-ul:text-inherit prose-ol:text-inherit prose-li:text-inherit","dark:prose-invert",t),children:T.jsx(e1,{remarkPlugins:[hb],components:{h1:({children:n,...r})=>T.jsx("h1",{className:"text-2xl font-bold tracking-tight mb-4 mt-6 pb-2 border-b first:mt-0",...r,children:n}),h2:({children:n,...r})=>T.jsx("h2",{className:"text-xl font-semibold tracking-tight mb-3 mt-6 first:mt-0",...r,children:n}),h3:({children:n,...r})=>T.jsx("h3",{className:"text-lg font-semibold mb-2 mt-5 first:mt-0",...r,children:n}),h4:({children:n,...r})=>T.jsx("h4",{className:"text-base font-semibold mb-2 mt-4 first:mt-0",...r,children:n}),h5:({children:n,...r})=>T.jsx("h5",{className:"text-sm font-semibold mb-1.5 mt-3 first:mt-0",...r,children:n}),h6:({children:n,...r})=>T.jsx("h6",{className:"text-xs font-semibold mb-1.5 mt-3 uppercase tracking-wide first:mt-0",...r,children:n}),p:({children:n,...r})=>T.jsx("p",{className:"text-sm leading-relaxed mb-3 last:mb-0",...r,children:n}),strong:({children:n,...r})=>T.jsx("strong",{className:"font-semibold",...r,children:n}),em:({children:n,...r})=>T.jsx("em",{className:"italic",...r,children:n}),ul:({children:n,...r})=>T.jsx("ul",{className:"my-3 space-y-1.5 pl-5 list-disc marker:opacity-60",...r,children:n}),ol:({children:n,...r})=>T.jsx("ol",{className:"my-3 space-y-1.5 pl-5 list-decimal marker:font-medium",...r,children:n}),li:({children:n,...r})=>T.jsx("li",{className:"text-sm leading-relaxed pl-1",...r,children:n}),a:({children:n,...r})=>T.jsx("a",{className:"underline underline-offset-2 decoration-1 hover:decoration-2 transition-all duration-150",target:"_blank",rel:"noopener noreferrer",...r,children:n}),img:({...n})=>T.jsx("img",{className:"max-w-full h-auto rounded-lg my-4 border",loading:"lazy",alt:n.alt||"",...n}),code:({children:n,className:r,...i})=>/language-(\w+)/.exec(r||"")?T.jsx("code",{className:Ku("block rounded-lg p-4 font-mono text-xs leading-relaxed overflow-x-auto",r),...i,children:n}):T.jsx("code",{className:"px-1.5 py-0.5 rounded text-[0.85em] font-mono border",...i,children:n}),pre:({children:n,...r})=>T.jsx("pre",{className:"rounded-lg p-4 overflow-x-auto my-4 border text-sm",...r,children:n}),blockquote:({children:n,...r})=>T.jsx("blockquote",{className:"border-l-4 pl-4 my-4 italic opacity-90",...r,children:n}),table:({children:n,...r})=>T.jsx("div",{className:"w-full overflow-x-auto my-4 rounded-lg border",children:T.jsx("table",{className:"w-full text-sm border-collapse min-w-full",...r,children:n})}),thead:({children:n,...r})=>T.jsx("thead",{className:"border-b",...r,children:n}),tbody:({children:n,...r})=>T.jsx("tbody",{className:"divide-y",...r,children:n}),tr:({children:n,...r})=>T.jsx("tr",{...r,children:n}),th:({children:n,...r})=>T.jsx("th",{className:"px-4 py-2.5 text-left text-xs font-semibold uppercase tracking-wide",...r,children:n}),td:({children:n,...r})=>T.jsx("td",{className:"px-4 py-2.5 text-sm",...r,children:n}),hr:()=>T.jsx("hr",{className:"my-6 border-t"})},children:e})})}const ev=({content:e})=>{const[t,n]=z.useState("");return z.useEffect(()=>{let r=0;const i=setInterval(()=>{n(e.slice(0,r)),r++,r>e.length&&clearInterval(i)},10);return()=>clearInterval(i)},[e]),T.jsx(Qu,{content:t})};function tv({messages:e,isSending:t,config:n}){const r=z.useRef(null),i=()=>{var s;(s=r.current)==null||s.scrollIntoView({behavior:"smooth"})};z.useEffect(()=>{i()},[e]);const o=n.messageBackgroundColor.startsWith("http")?{backgroundImage:`url(${n.messageBackgroundColor})`,backgroundSize:"cover",backgroundPosition:"center"}:{backgroundColor:n.messageBackgroundColor};return T.jsxs("div",{className:"flex-1 p-4 overflow-y-auto flex flex-col gap-3 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-slate-300 [&::-webkit-scrollbar-thumb]:rounded-full",style:o,children:[e.length===0&&T.jsx("div",{className:"text-center text-gray-400 my-auto text-sm",children:n.initialMessage}),e.map(s=>T.jsxs("div",{className:`flex ${s.role==="user"?"justify-end":"justify-start gap-2"}`,children:[s.role==="assistant"&&T.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-100 flex items-center justify-center border border-gray-200 shrink-0 overflow-hidden",children:T.jsx("img",{src:n.botAvatarImage,alt:"AI",className:"w-full h-full object-cover"})}),T.jsx("div",{className:`max-w-[75%] p-3 rounded-lg text-sm ${s.role==="user"?"rounded-br-none":"border border-gray-200 rounded-tl-none shadow-sm"}`,style:s.role==="user"?{backgroundColor:n.userBubbleBackgroundColor,color:n.userBubbleTextColor}:{backgroundColor:n.botBubbleBackgroundColor,color:n.botBubbleTextColor},children:s.role==="assistant"&&s.shouldAnimate?T.jsx(ev,{content:s.content}):T.jsx(Qu,{content:s.content})})]},s.id)),t&&T.jsxs("div",{className:"flex justify-start",children:[T.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-100 flex items-center justify-center border border-gray-200 shrink-0 overflow-hidden mr-2",children:T.jsx("img",{src:n.botAvatarImage,alt:"AI",className:"w-full h-full object-cover"})}),T.jsx("div",{className:"text-gray-800 border border-gray-200 p-3 rounded-lg rounded-bl-none shadow-sm",style:{backgroundColor:n.botBubbleBackgroundColor},children:T.jsxs("span",{className:"flex gap-1",children:[T.jsx("span",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce"}),T.jsx("span",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce delay-75"}),T.jsx("span",{className:"w-1.5 h-1.5 bg-gray-400 rounded-full animate-bounce delay-150"})]})})]}),T.jsx("div",{ref:r})]})}function nv(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const rv=e=>{switch(e){case"success":return sv;case"info":return lv;case"warning":return av;case"error":return cv;default:return null}},iv=Array(12).fill(0),ov=({visible:e,className:t})=>z.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},z.createElement("div",{className:"sonner-spinner"},iv.map((n,r)=>z.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),sv=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),av=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},z.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),lv=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),cv=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},z.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),uv=z.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},z.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),z.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),fv=()=>{const[e,t]=z.useState(document.hidden);return z.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let ua=1;class dv{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:ua++,s=this.toasts.find(c=>c.id===o),a=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(c=>c.id===o?(this.publish({...c,...t,id:o,title:r}),{...c,...t,id:o,dismissible:a,title:r}):c):this.addToast({title:r,...i,dismissible:a,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,s;const a=i.then(async l=>{if(s=["resolve",l],z.isValidElement(l))o=!1,this.create({id:r,type:"default",message:l});else if(pv(l)&&!l.ok){o=!1;const u=typeof n.error=="function"?await n.error(`HTTP error! status: ${l.status}`):n.error,d=typeof n.description=="function"?await n.description(`HTTP error! status: ${l.status}`):n.description,p=typeof u=="object"&&!z.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:d,...p})}else if(l instanceof Error){o=!1;const u=typeof n.error=="function"?await n.error(l):n.error,d=typeof n.description=="function"?await n.description(l):n.description,p=typeof u=="object"&&!z.isValidElement(u)?u:{message:u};this.create({id:r,type:"error",description:d,...p})}else if(n.success!==void 0){o=!1;const u=typeof n.success=="function"?await n.success(l):n.success,d=typeof n.description=="function"?await n.description(l):n.description,p=typeof u=="object"&&!z.isValidElement(u)?u:{message:u};this.create({id:r,type:"success",description:d,...p})}}).catch(async l=>{if(s=["reject",l],n.error!==void 0){o=!1;const f=typeof n.error=="function"?await n.error(l):n.error,u=typeof n.description=="function"?await n.description(l):n.description,h=typeof f=="object"&&!z.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:u,...h})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((l,f)=>a.then(()=>s[0]==="reject"?f(s[1]):l(s[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||ua++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const lt=new dv,hv=(e,t)=>{const n=(t==null?void 0:t.id)||ua++;return lt.addToast({title:e,...t,id:n}),n},pv=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",xv=hv,mv=()=>lt.toasts,gv=()=>lt.getActiveToasts(),Ti=Object.assign(xv,{success:lt.success,info:lt.info,warning:lt.warning,error:lt.error,custom:lt.custom,message:lt.message,promise:lt.promise,dismiss:lt.dismiss,loading:lt.loading},{getHistory:mv,getToasts:gv});nv("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Oi(e){return e.label!==void 0}const yv=3,bv="24px",vv="16px",Xu=4e3,wv=356,Ev=14,Cv=45,kv=200;function Rt(...e){return e.filter(Boolean).join(" ")}function Av(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Sv=e=>{var t,n,r,i,o,s,a,c,l;const{invert:f,toast:u,unstyled:d,interacting:h,setHeights:p,visibleToasts:x,heights:m,index:g,toasts:b,expanded:y,removeToast:v,defaultRichColors:k,closeButton:C,style:_,cancelButtonStyle:A,actionButtonStyle:O,className:E="",descriptionClassName:D="",duration:F,position:R,gap:U,expandByDefault:L,classNames:j,icons:X,closeButtonAriaLabel:$="Close toast"}=e,[ne,S]=z.useState(null),[M,q]=z.useState(null),[w,I]=z.useState(!1),[Z,J]=z.useState(!1),[oe,Q]=z.useState(!1),[Ce,ke]=z.useState(!1),[$e,Le]=z.useState(!1),[nt,Me]=z.useState(0),[nn,Ft]=z.useState(0),mt=z.useRef(u.duration||F||Xu),jt=z.useRef(null),Ge=z.useRef(null),$t=g===0,rt=g+1<=x,be=u.type,We=u.dismissible!==!1,En=u.className||"",Ar=u.descriptionClassName||"",H=z.useMemo(()=>m.findIndex(se=>se.toastId===u.id)||0,[m,u.id]),V=z.useMemo(()=>{var se;return(se=u.closeButton)!=null?se:C},[u.closeButton,C]),ie=z.useMemo(()=>u.duration||F||Xu,[u.duration,F]),ae=z.useRef(0),he=z.useRef(0),Be=z.useRef(0),Te=z.useRef(null),[gt,Wt]=R.split("-"),Tt=z.useMemo(()=>m.reduce((se,Oe,ze)=>ze>=H?se:se+Oe.height,0),[m,H]),qe=fv(),Vt=u.invert||f,Ye=be==="loading";he.current=z.useMemo(()=>H*U+Tt,[H,Tt]),z.useEffect(()=>{mt.current=ie},[ie]),z.useEffect(()=>{I(!0)},[]),z.useEffect(()=>{const se=Ge.current;if(se){const Oe=se.getBoundingClientRect().height;return Ft(Oe),p(ze=>[{toastId:u.id,height:Oe,position:u.position},...ze]),()=>p(ze=>ze.filter(it=>it.toastId!==u.id))}},[p,u.id]),z.useLayoutEffect(()=>{if(!w)return;const se=Ge.current,Oe=se.style.height;se.style.height="auto";const ze=se.getBoundingClientRect().height;se.style.height=Oe,Ft(ze),p(it=>it.find(Pe=>Pe.toastId===u.id)?it.map(Pe=>Pe.toastId===u.id?{...Pe,height:ze}:Pe):[{toastId:u.id,height:ze,position:u.position},...it])},[w,u.title,u.description,p,u.id,u.jsx,u.action,u.cancel]);const Kt=z.useCallback(()=>{J(!0),Me(he.current),p(se=>se.filter(Oe=>Oe.toastId!==u.id)),setTimeout(()=>{v(u)},kv)},[u,v,p,he]);z.useEffect(()=>{if(u.promise&&be==="loading"||u.duration===1/0||u.type==="loading")return;let se;return y||h||qe?(()=>{if(Be.current<ae.current){const it=new Date().getTime()-ae.current;mt.current=mt.current-it}Be.current=new Date().getTime()})():(()=>{mt.current!==1/0&&(ae.current=new Date().getTime(),se=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),Kt()},mt.current))})(),()=>clearTimeout(se)},[y,h,u,be,qe,Kt]),z.useEffect(()=>{u.delete&&(Kt(),u.onDismiss==null||u.onDismiss.call(u,u))},[Kt,u.delete]);function Go(){var se;if(X!=null&&X.loading){var Oe;return z.createElement("div",{className:Rt(j==null?void 0:j.loader,u==null||(Oe=u.classNames)==null?void 0:Oe.loader,"sonner-loader"),"data-visible":be==="loading"},X.loading)}return z.createElement(ov,{className:Rt(j==null?void 0:j.loader,u==null||(se=u.classNames)==null?void 0:se.loader),visible:be==="loading"})}const tl=u.icon||(X==null?void 0:X[be])||rv(be);var oi,Yo;return z.createElement("li",{tabIndex:0,ref:Ge,className:Rt(E,En,j==null?void 0:j.toast,u==null||(t=u.classNames)==null?void 0:t.toast,j==null?void 0:j.default,j==null?void 0:j[be],u==null||(n=u.classNames)==null?void 0:n[be]),"data-sonner-toast":"","data-rich-colors":(oi=u.richColors)!=null?oi:k,"data-styled":!(u.jsx||u.unstyled||d),"data-mounted":w,"data-promise":!!u.promise,"data-swiped":$e,"data-removed":Z,"data-visible":rt,"data-y-position":gt,"data-x-position":Wt,"data-index":g,"data-front":$t,"data-swiping":oe,"data-dismissible":We,"data-type":be,"data-invert":Vt,"data-swipe-out":Ce,"data-swipe-direction":M,"data-expanded":!!(y||L&&w),"data-testid":u.testId,style:{"--index":g,"--toasts-before":g,"--z-index":b.length-g,"--offset":`${Z?nt:he.current}px`,"--initial-height":L?"auto":`${nn}px`,..._,...u.style},onDragEnd:()=>{Q(!1),S(null),Te.current=null},onPointerDown:se=>{se.button!==2&&(Ye||!We||(jt.current=new Date,Me(he.current),se.target.setPointerCapture(se.pointerId),se.target.tagName!=="BUTTON"&&(Q(!0),Te.current={x:se.clientX,y:se.clientY})))},onPointerUp:()=>{var se,Oe,ze;if(Ce||!We)return;Te.current=null;const it=Number(((se=Ge.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Sr=Number(((Oe=Ge.current)==null?void 0:Oe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Pe=new Date().getTime()-((ze=jt.current)==null?void 0:ze.getTime()),ht=ne==="x"?it:Sr,Qn=Math.abs(ht)/Pe;if(Math.abs(ht)>=Cv||Qn>.11){Me(he.current),u.onDismiss==null||u.onDismiss.call(u,u),q(ne==="x"?it>0?"right":"left":Sr>0?"down":"up"),Kt(),ke(!0);return}else{var Ee,Re;(Ee=Ge.current)==null||Ee.style.setProperty("--swipe-amount-x","0px"),(Re=Ge.current)==null||Re.style.setProperty("--swipe-amount-y","0px")}Le(!1),Q(!1),S(null)},onPointerMove:se=>{var Oe,ze,it;if(!Te.current||!We||((Oe=window.getSelection())==null?void 0:Oe.toString().length)>0)return;const Pe=se.clientY-Te.current.y,ht=se.clientX-Te.current.x;var Qn;const Ee=(Qn=e.swipeDirections)!=null?Qn:Av(R);!ne&&(Math.abs(ht)>1||Math.abs(Pe)>1)&&S(Math.abs(ht)>Math.abs(Pe)?"x":"y");let Re={x:0,y:0};const si=rn=>1/(1.5+Math.abs(rn)/20);if(ne==="y"){if(Ee.includes("top")||Ee.includes("bottom"))if(Ee.includes("top")&&Pe<0||Ee.includes("bottom")&&Pe>0)Re.y=Pe;else{const rn=Pe*si(Pe);Re.y=Math.abs(rn)<Math.abs(Pe)?rn:Pe}}else if(ne==="x"&&(Ee.includes("left")||Ee.includes("right")))if(Ee.includes("left")&&ht<0||Ee.includes("right")&&ht>0)Re.x=ht;else{const rn=ht*si(ht);Re.x=Math.abs(rn)<Math.abs(ht)?rn:ht}(Math.abs(Re.x)>0||Math.abs(Re.y)>0)&&Le(!0),(ze=Ge.current)==null||ze.style.setProperty("--swipe-amount-x",`${Re.x}px`),(it=Ge.current)==null||it.style.setProperty("--swipe-amount-y",`${Re.y}px`)}},V&&!u.jsx&&be!=="loading"?z.createElement("button",{"aria-label":$,"data-disabled":Ye,"data-close-button":!0,onClick:Ye||!We?()=>{}:()=>{Kt(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Rt(j==null?void 0:j.closeButton,u==null||(r=u.classNames)==null?void 0:r.closeButton)},(Yo=X==null?void 0:X.close)!=null?Yo:uv):null,(be||u.icon||u.promise)&&u.icon!==null&&((X==null?void 0:X[be])!==null||u.icon)?z.createElement("div",{"data-icon":"",className:Rt(j==null?void 0:j.icon,u==null||(i=u.classNames)==null?void 0:i.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||Go():null,u.type!=="loading"?tl:null):null,z.createElement("div",{"data-content":"",className:Rt(j==null?void 0:j.content,u==null||(o=u.classNames)==null?void 0:o.content)},z.createElement("div",{"data-title":"",className:Rt(j==null?void 0:j.title,u==null||(s=u.classNames)==null?void 0:s.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?z.createElement("div",{"data-description":"",className:Rt(D,Ar,j==null?void 0:j.description,u==null||(a=u.classNames)==null?void 0:a.description)},typeof u.description=="function"?u.description():u.description):null),z.isValidElement(u.cancel)?u.cancel:u.cancel&&Oi(u.cancel)?z.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||A,onClick:se=>{Oi(u.cancel)&&We&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,se),Kt())},className:Rt(j==null?void 0:j.cancelButton,u==null||(c=u.classNames)==null?void 0:c.cancelButton)},u.cancel.label):null,z.isValidElement(u.action)?u.action:u.action&&Oi(u.action)?z.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||O,onClick:se=>{Oi(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,se),!se.defaultPrevented&&Kt())},className:Rt(j==null?void 0:j.actionButton,u==null||(l=u.classNames)==null?void 0:l.actionButton)},u.action.label):null)};function Gu(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function _v(e,t){const n={};return[e,t].forEach((r,i)=>{const o=i===1,s=o?"--mobile-offset":"--offset",a=o?vv:bv;function c(l){["top","right","bottom","left"].forEach(f=>{n[`${s}-${f}`]=typeof l=="number"?`${l}px`:l})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(l=>{r[l]===void 0?n[`${s}-${l}`]=a:n[`${s}-${l}`]=typeof r[l]=="number"?`${r[l]}px`:r[l]}):c(a)}),n}const Bv=z.forwardRef(function(t,n){const{id:r,invert:i,position:o="bottom-right",hotkey:s=["altKey","KeyT"],expand:a,closeButton:c,className:l,offset:f,mobileOffset:u,theme:d="light",richColors:h,duration:p,style:x,visibleToasts:m=yv,toastOptions:g,dir:b=Gu(),gap:y=Ev,icons:v,containerAriaLabel:k="Notifications"}=t,[C,_]=z.useState([]),A=z.useMemo(()=>r?C.filter(w=>w.toasterId===r):C.filter(w=>!w.toasterId),[C,r]),O=z.useMemo(()=>Array.from(new Set([o].concat(A.filter(w=>w.position).map(w=>w.position)))),[A,o]),[E,D]=z.useState([]),[F,R]=z.useState(!1),[U,L]=z.useState(!1),[j,X]=z.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=z.useRef(null),ne=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),S=z.useRef(null),M=z.useRef(!1),q=z.useCallback(w=>{_(I=>{var Z;return(Z=I.find(J=>J.id===w.id))!=null&&Z.delete||lt.dismiss(w.id),I.filter(({id:J})=>J!==w.id)})},[]);return z.useEffect(()=>lt.subscribe(w=>{if(w.dismiss){requestAnimationFrame(()=>{_(I=>I.map(Z=>Z.id===w.id?{...Z,delete:!0}:Z))});return}setTimeout(()=>{_r.flushSync(()=>{_(I=>{const Z=I.findIndex(J=>J.id===w.id);return Z!==-1?[...I.slice(0,Z),{...I[Z],...w},...I.slice(Z+1)]:[w,...I]})})})}),[C]),z.useEffect(()=>{if(d!=="system"){X(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?X("dark"):X("light")),typeof window>"u")return;const w=window.matchMedia("(prefers-color-scheme: dark)");try{w.addEventListener("change",({matches:I})=>{X(I?"dark":"light")})}catch{w.addListener(({matches:Z})=>{try{X(Z?"dark":"light")}catch(J){console.error(J)}})}},[d]),z.useEffect(()=>{C.length<=1&&R(!1)},[C]),z.useEffect(()=>{const w=I=>{var Z;if(s.every(Q=>I[Q]||I.code===Q)){var oe;R(!0),(oe=$.current)==null||oe.focus()}I.code==="Escape"&&(document.activeElement===$.current||(Z=$.current)!=null&&Z.contains(document.activeElement))&&R(!1)};return document.addEventListener("keydown",w),()=>document.removeEventListener("keydown",w)},[s]),z.useEffect(()=>{if($.current)return()=>{S.current&&(S.current.focus({preventScroll:!0}),S.current=null,M.current=!1)}},[$.current]),z.createElement("section",{ref:n,"aria-label":`${k} ${ne}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},O.map((w,I)=>{var Z;const[J,oe]=w.split("-");return A.length?z.createElement("ol",{key:w,dir:b==="auto"?Gu():b,tabIndex:-1,ref:$,className:l,"data-sonner-toaster":!0,"data-sonner-theme":j,"data-y-position":J,"data-x-position":oe,style:{"--front-toast-height":`${((Z=E[0])==null?void 0:Z.height)||0}px`,"--width":`${wv}px`,"--gap":`${y}px`,...x,..._v(f,u)},onBlur:Q=>{M.current&&!Q.currentTarget.contains(Q.relatedTarget)&&(M.current=!1,S.current&&(S.current.focus({preventScroll:!0}),S.current=null))},onFocus:Q=>{Q.target instanceof HTMLElement&&Q.target.dataset.dismissible==="false"||M.current||(M.current=!0,S.current=Q.relatedTarget)},onMouseEnter:()=>R(!0),onMouseMove:()=>R(!0),onMouseLeave:()=>{U||R(!1)},onDragEnd:()=>R(!1),onPointerDown:Q=>{Q.target instanceof HTMLElement&&Q.target.dataset.dismissible==="false"||L(!0)},onPointerUp:()=>L(!1)},A.filter(Q=>!Q.position&&I===0||Q.position===w).map((Q,Ce)=>{var ke,$e;return z.createElement(Sv,{key:Q.id,icons:v,index:Ce,toast:Q,defaultRichColors:h,duration:(ke=g==null?void 0:g.duration)!=null?ke:p,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:i,visibleToasts:m,closeButton:($e=g==null?void 0:g.closeButton)!=null?$e:c,interacting:U,position:w,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,closeButtonAriaLabel:g==null?void 0:g.closeButtonAriaLabel,removeToast:q,toasts:A.filter(Le=>Le.position==Q.position),heights:E.filter(Le=>Le.position==Q.position),setHeights:D,expandByDefault:a,gap:y,expanded:F,swipeDirections:t.swipeDirections})})):null}))});function Dv({onSendMessage:e,isSending:t,config:n,onPreviewFile:r}){const[i,o]=z.useState(""),[s,a]=z.useState([]),c=z.useRef(null),l=x=>{x.preventDefault(),(i.trim()||s.length>0)&&!t&&(e(i,s),o(""),a([]))},f=x=>{x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),l(x))},u=()=>{var x;(x=c.current)==null||x.click()},d=x=>{const m=Array.from(x.target.files||[]);if(m.length===0)return;if(m.length>3){Ti.error("Maximum 3 files allowed"),c.current&&(c.current.value="");return}const g=m.reduce((k,C)=>k+C.size,0),b=5*1024*1024;if(g>b){Ti.error("Total file size must be less than 5MB"),c.current&&(c.current.value="");return}const y=["image/jpeg","image/png","image/gif","image/webp","video/mp4","application/pdf"];if(m.filter(k=>!y.includes(k.type)).length>0){Ti.error("Some files have unsupported types"),c.current&&(c.current.value="");return}a(k=>[...k,...m]),Ti.success(n.toastSuccessMessage.replace("{count}",m.length.toString())),c.current&&(c.current.value="")},h=x=>{a(m=>m.filter((g,b)=>b!==x))},p=(x,m)=>{const g=x.type.startsWith("image/"),b=x.type.startsWith("video/"),y=x.type==="application/pdf",v=x.type.includes("excel")||x.type.includes("spreadsheet")||x.type.includes("csv"),k=x.type.includes("word")||x.type.includes("document"),C=x.type==="text/plain";let _=T.jsx(jh,{className:"w-6 h-6 text-white"}),A="bg-gray-400";return y?(_=T.jsx(di,{className:"w-6 h-6 text-white"}),A="bg-red-500"):v?(_=T.jsx(qh,{className:"w-6 h-6 text-white"}),A="bg-green-500"):k?(_=T.jsx(di,{className:"w-6 h-6 text-white"}),A="bg-blue-500"):C&&(_=T.jsx(di,{className:"w-6 h-6 text-white"}),A="bg-gray-500"),T.jsxs("div",{className:"relative group w-16 h-16 shrink-0 mt-2 mr-2",children:[T.jsxs("div",{className:"w-full h-full rounded-lg overflow-hidden border border-gray-200 flex items-center justify-center bg-gray-50 relative",children:[g?T.jsx("img",{src:URL.createObjectURL(x),alt:"preview",className:"w-full h-full object-cover"}):b?T.jsx("video",{src:URL.createObjectURL(x),className:"w-full h-full object-cover"}):T.jsx("div",{className:`w-full h-full flex items-center justify-center ${A}`,children:_}),T.jsx("div",{className:"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:T.jsx("button",{type:"button",onClick:()=>r(x),className:"text-white hover:text-gray-200",children:T.jsx(Hh,{className:"w-6 h-6"})})})]}),T.jsx("button",{onClick:()=>h(m),className:"absolute -top-2 -right-2 bg-red-500 text-white rounded-full p-0.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-sm z-10",children:T.jsx(hi,{className:"w-3 h-3"})})]},m)};return T.jsxs("form",{onSubmit:l,className:"p-3 border-t border-gray-100 flex flex-col gap-3",style:{backgroundColor:n.inputSectionBackgroundColor},children:[s.length>0&&T.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2 scrollbar-hide",children:s.map((x,m)=>p(x,m))}),T.jsxs("div",{className:"flex gap-2 items-end",children:[T.jsx("input",{type:"file",multiple:!0,ref:c,className:"hidden",onChange:d}),T.jsx("button",{type:"button",disabled:t,onClick:u,className:"p-2 text-gray-400 hover:text-slate-800 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:T.jsx(Qh,{className:"w-5 h-5"})}),T.jsx("textarea",{value:i,onChange:x=>o(x.target.value),onKeyDown:f,disabled:t,placeholder:n.inputPlaceholder,rows:1,className:"flex-1 px-4 py-2 bg-gray-100 border-0 rounded-2xl focus:ring-2 focus:ring-slate-800 focus:outline-none transition-all text-sm disabled:opacity-50 resize-none overflow-y-auto [&::-webkit-scrollbar]:hidden [-ms-overflow-style:none] [scrollbar-width:none]"}),T.jsx("button",{type:"submit",disabled:!i.trim()&&s.length===0||t,className:"p-2 text-white rounded-full hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed transition-colors flex items-center justify-center shrink-0 mb-1",style:{backgroundColor:n.sendButtonBackgroundColor},children:T.jsx(Xh,{className:"h-5 w-5"})})]})]})}function Yu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zu(...e){return t=>{let n=!1;const r=e.map(i=>{const o=Yu(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():Yu(e[i],null)}}}}function Tn(...e){return P.useCallback(Zu(...e),e)}function Ju(e){const t=Fv(e),n=P.forwardRef((r,i)=>{const{children:o,...s}=r,a=P.Children.toArray(o),c=a.find(Ov);if(c){const l=c.props.children,f=a.map(u=>u===c?P.Children.count(l)>1?P.Children.only(null):P.isValidElement(l)?l.props.children:null:u);return T.jsx(t,{...s,ref:i,children:P.isValidElement(l)?P.cloneElement(l,void 0,f):null})}return T.jsx(t,{...s,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function Fv(e){const t=P.forwardRef((n,r)=>{const{children:i,...o}=n;if(P.isValidElement(i)){const s=Rv(i),a=Pv(o,i.props);return i.type!==P.Fragment&&(a.ref=r?Zu(r,s):s),P.cloneElement(i,a)}return P.Children.count(i)>1?P.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Tv=Symbol("radix.slottable");function Ov(e){return P.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Tv}function Pv(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{const c=o(...a);return i(...a),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Rv(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 Iv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Gt=Iv.reduce((e,t)=>{const n=Ju(`Primitive.${t}`),r=P.forwardRef((i,o)=>{const{asChild:s,...a}=i,c=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),T.jsx(c,{...a,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Nv(e,t){e&&Xd.flushSync(()=>e.dispatchEvent(t))}function Lv(e,t){const n=P.createContext(t),r=o=>{const{children:s,...a}=o,c=P.useMemo(()=>a,Object.values(a));return T.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function i(o){const s=P.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function Mv(e,t=[]){let n=[];function r(o,s){const a=P.createContext(s),c=n.length;n=[...n,s];const l=u=>{var g;const{scope:d,children:h,...p}=u,x=((g=d==null?void 0:d[e])==null?void 0:g[c])||a,m=P.useMemo(()=>p,Object.values(p));return T.jsx(x.Provider,{value:m,children:h})};l.displayName=o+"Provider";function f(u,d){var x;const h=((x=d==null?void 0:d[e])==null?void 0:x[c])||a,p=P.useContext(h);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${u}\` must be used within \`${o}\``)}return[l,f]}const i=()=>{const o=n.map(s=>P.createContext(s));return function(a){const c=(a==null?void 0:a[e])||o;return P.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,zv(i,...t)]}function zv(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:l})=>{const u=c(o)[`__scope${l}`];return{...a,...u}},{});return P.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function un(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}var qr=globalThis!=null&&globalThis.document?P.useLayoutEffect:()=>{},Uv=P[" useInsertionEffect ".trim().toString()]||qr;function Hv({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,s]=qv({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:i;{const f=P.useRef(e!==void 0);P.useEffect(()=>{const u=f.current;u!==a&&console.warn(`${r} is changing from ${u?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=a},[a,r])}const l=P.useCallback(f=>{var u;if(a){const d=jv(f)?f(e):f;d!==e&&((u=s.current)==null||u.call(s,d))}else o(f)},[a,e,o,s]);return[c,l]}function qv({defaultProp:e,onChange:t}){const[n,r]=P.useState(e),i=P.useRef(n),o=P.useRef(t);return Uv(()=>{o.current=t},[t]),P.useEffect(()=>{var s;i.current!==n&&((s=o.current)==null||s.call(o,n),i.current=n)},[n,i]),[n,r,o]}function jv(e){return typeof e=="function"}function $v(e,t){return P.useReducer((n,r)=>t[n][r]??n,e)}var Pi=e=>{const{present:t,children:n}=e,r=Wv(t),i=typeof n=="function"?n({present:r.isPresent}):P.Children.only(n),o=Tn(r.ref,Vv(i));return typeof n=="function"||r.isPresent?P.cloneElement(i,{ref:o}):null};Pi.displayName="Presence";function Wv(e){const[t,n]=P.useState(),r=P.useRef(null),i=P.useRef(e),o=P.useRef("none"),s=e?"mounted":"unmounted",[a,c]=$v(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return P.useEffect(()=>{const l=Ri(r.current);o.current=a==="mounted"?l:"none"},[a]),qr(()=>{const l=r.current,f=i.current;if(f!==e){const d=o.current,h=Ri(l);e?c("MOUNT"):h==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),qr(()=>{if(t){let l;const f=t.ownerDocument.defaultView??window,u=h=>{const x=Ri(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&x&&(c("ANIMATION_END"),!i.current)){const m=t.style.animationFillMode;t.style.animationFillMode="forwards",l=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=m)})}},d=h=>{h.target===t&&(o.current=Ri(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{f.clearTimeout(l),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:P.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Ri(e){return(e==null?void 0:e.animationName)||"none"}function Vv(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 Kv=P[" useId ".trim().toString()]||(()=>{}),Qv=0;function fa(e){const[t,n]=P.useState(Kv());return qr(()=>{n(r=>r??String(Qv++))},[e]),e||(t?`radix-${t}`:"")}function jr(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Xv(e,t=globalThis==null?void 0:globalThis.document){const n=jr(e);P.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 Gv="DismissableLayer",da="dismissableLayer.update",Yv="dismissableLayer.pointerDownOutside",Zv="dismissableLayer.focusOutside",e0,t0=P.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),n0=P.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:s,onDismiss:a,...c}=e,l=P.useContext(t0),[f,u]=P.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=P.useState({}),p=Tn(t,_=>u(_)),x=Array.from(l.layers),[m]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=x.indexOf(m),b=f?x.indexOf(f):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,v=b>=g,k=tw(_=>{const A=_.target,O=[...l.branches].some(E=>E.contains(A));!v||O||(i==null||i(_),s==null||s(_),_.defaultPrevented||a==null||a())},d),C=nw(_=>{const A=_.target;[...l.branches].some(E=>E.contains(A))||(o==null||o(_),s==null||s(_),_.defaultPrevented||a==null||a())},d);return Xv(_=>{b===l.layers.size-1&&(r==null||r(_),!_.defaultPrevented&&a&&(_.preventDefault(),a()))},d),P.useEffect(()=>{if(f)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(e0=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(f)),l.layers.add(f),r0(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=e0)}},[f,d,n,l]),P.useEffect(()=>()=>{f&&(l.layers.delete(f),l.layersWithOutsidePointerEventsDisabled.delete(f),r0())},[f,l]),P.useEffect(()=>{const _=()=>h({});return document.addEventListener(da,_),()=>document.removeEventListener(da,_)},[]),T.jsx(Gt.div,{...c,ref:p,style:{pointerEvents:y?v?"auto":"none":void 0,...e.style},onFocusCapture:un(e.onFocusCapture,C.onFocusCapture),onBlurCapture:un(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:un(e.onPointerDownCapture,k.onPointerDownCapture)})});n0.displayName=Gv;var Jv="DismissableLayerBranch",ew=P.forwardRef((e,t)=>{const n=P.useContext(t0),r=P.useRef(null),i=Tn(t,r);return P.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),T.jsx(Gt.div,{...e,ref:i})});ew.displayName=Jv;function tw(e,t=globalThis==null?void 0:globalThis.document){const n=jr(e),r=P.useRef(!1),i=P.useRef(()=>{});return P.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let c=function(){i0(Yv,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function nw(e,t=globalThis==null?void 0:globalThis.document){const n=jr(e),r=P.useRef(!1);return P.useEffect(()=>{const i=o=>{o.target&&!r.current&&i0(Zv,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function r0(){const e=new CustomEvent(da);document.dispatchEvent(e)}function i0(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Nv(i,o):i.dispatchEvent(o)}var ha="focusScope.autoFocusOnMount",pa="focusScope.autoFocusOnUnmount",o0={bubbles:!1,cancelable:!0},rw="FocusScope",s0=P.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,c]=P.useState(null),l=jr(i),f=jr(o),u=P.useRef(null),d=Tn(t,x=>c(x)),h=P.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;P.useEffect(()=>{if(r){let x=function(y){if(h.paused||!a)return;const v=y.target;a.contains(v)?u.current=v:fn(u.current,{select:!0})},m=function(y){if(h.paused||!a)return;const v=y.relatedTarget;v!==null&&(a.contains(v)||fn(u.current,{select:!0}))},g=function(y){if(document.activeElement===document.body)for(const k of y)k.removedNodes.length>0&&fn(a)};document.addEventListener("focusin",x),document.addEventListener("focusout",m);const b=new MutationObserver(g);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",m),b.disconnect()}}},[r,a,h.paused]),P.useEffect(()=>{if(a){c0.add(h);const x=document.activeElement;if(!a.contains(x)){const g=new CustomEvent(ha,o0);a.addEventListener(ha,l),a.dispatchEvent(g),g.defaultPrevented||(iw(cw(a0(a)),{select:!0}),document.activeElement===x&&fn(a))}return()=>{a.removeEventListener(ha,l),setTimeout(()=>{const g=new CustomEvent(pa,o0);a.addEventListener(pa,f),a.dispatchEvent(g),g.defaultPrevented||fn(x??document.body,{select:!0}),a.removeEventListener(pa,f),c0.remove(h)},0)}}},[a,l,f,h]);const p=P.useCallback(x=>{if(!n&&!r||h.paused)return;const m=x.key==="Tab"&&!x.altKey&&!x.ctrlKey&&!x.metaKey,g=document.activeElement;if(m&&g){const b=x.currentTarget,[y,v]=ow(b);y&&v?!x.shiftKey&&g===v?(x.preventDefault(),n&&fn(y,{select:!0})):x.shiftKey&&g===y&&(x.preventDefault(),n&&fn(v,{select:!0})):g===b&&x.preventDefault()}},[n,r,h.paused]);return T.jsx(Gt.div,{tabIndex:-1,...s,ref:d,onKeyDown:p})});s0.displayName=rw;function iw(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(fn(r,{select:t}),document.activeElement!==n)return}function ow(e){const t=a0(e),n=l0(t,e),r=l0(t.reverse(),e);return[n,r]}function a0(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 l0(e,t){for(const n of e)if(!sw(n,{upTo:t}))return n}function sw(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 aw(e){return e instanceof HTMLInputElement&&"select"in e}function fn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&aw(e)&&t&&e.select()}}var c0=lw();function lw(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=u0(e,t),e.unshift(t)},remove(t){var n;e=u0(e,t),(n=e[0])==null||n.resume()}}}function u0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function cw(e){return e.filter(t=>t.tagName!=="A")}var uw="Portal",f0=P.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[i,o]=P.useState(!1);qr(()=>o(!0),[]);const s=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?_r.createPortal(T.jsx(Gt.div,{...r,ref:t}),s):null});f0.displayName=uw;var xa=0;function fw(){P.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??d0()),document.body.insertAdjacentElement("beforeend",e[1]??d0()),xa++,()=>{xa===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xa--}},[])}function d0(){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 It=function(){return It=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},It.apply(this,arguments)};function h0(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 dw(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ii="right-scroll-bar-position",Ni="width-before-scroll-bar",hw="with-scroll-bars-hidden",pw="--removed-body-scroll-bar-size";function ma(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xw(e,t){var n=z.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 mw=typeof window<"u"?P.useLayoutEffect:P.useEffect,p0=new WeakMap;function gw(e,t){var n=xw(null,function(r){return e.forEach(function(i){return ma(i,r)})});return mw(function(){var r=p0.get(n);if(r){var i=new Set(r),o=new Set(e),s=n.current;i.forEach(function(a){o.has(a)||ma(a,null)}),o.forEach(function(a){i.has(a)||ma(a,s)})}p0.set(n,e)},[e]),n}function yw(e){return e}function bw(e,t){t===void 0&&(t=yw);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var c=function(){var f=s;s=[],f.forEach(o)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(f){s.push(f),l()},filter:function(f){return s=s.filter(f),n}}}};return i}function vw(e){e===void 0&&(e={});var t=bw(null);return t.options=It({async:!0,ssr:!1},e),t}var x0=function(e){var t=e.sideCar,n=h0(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 P.createElement(r,It({},n))};x0.isSideCarExport=!0;function ww(e,t){return e.useMedium(t),x0}var m0=vw(),ga=function(){},Li=P.forwardRef(function(e,t){var n=P.useRef(null),r=P.useState({onScrollCapture:ga,onWheelCapture:ga,onTouchMoveCapture:ga}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,f=e.enabled,u=e.shards,d=e.sideCar,h=e.noRelative,p=e.noIsolation,x=e.inert,m=e.allowPinchZoom,g=e.as,b=g===void 0?"div":g,y=e.gapMode,v=h0(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=d,C=gw([n,t]),_=It(It({},v),i);return P.createElement(P.Fragment,null,f&&P.createElement(k,{sideCar:m0,removeScrollBar:l,shards:u,noRelative:h,noIsolation:p,inert:x,setCallbacks:o,allowPinchZoom:!!m,lockRef:n,gapMode:y}),s?P.cloneElement(P.Children.only(a),It(It({},_),{ref:C})):P.createElement(b,It({},_,{className:c,ref:C}),a))});Li.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Li.classNames={fullWidth:Ni,zeroRight:Ii};var Ew=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Cw(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ew();return t&&e.setAttribute("nonce",t),e}function kw(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Aw(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Sw=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Cw())&&(kw(t,n),Aw(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},_w=function(){var e=Sw();return function(t,n){P.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},g0=function(){var e=_w(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Bw={left:0,top:0,right:0,gap:0},ya=function(e){return parseInt(e||"",10)||0},Dw=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[ya(n),ya(r),ya(i)]},Fw=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Bw;var t=Dw(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])}},Tw=g0(),sr="data-scroll-locked",Ow=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
140
+ .`.concat(hw,` {
141
+ overflow: hidden `).concat(r,`;
142
+ padding-right: `).concat(a,"px ").concat(r,`;
143
+ }
144
+ body[`).concat(sr,`] {
145
+ overflow: hidden `).concat(r,`;
146
+ overscroll-behavior: contain;
147
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
148
+ padding-left: `.concat(i,`px;
149
+ padding-top: `).concat(o,`px;
150
+ padding-right: `).concat(s,`px;
151
+ margin-left:0;
152
+ margin-top:0;
153
+ margin-right: `).concat(a,"px ").concat(r,`;
154
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
155
+ }
156
+
157
+ .`).concat(Ii,` {
158
+ right: `).concat(a,"px ").concat(r,`;
159
+ }
160
+
161
+ .`).concat(Ni,` {
162
+ margin-right: `).concat(a,"px ").concat(r,`;
163
+ }
164
+
165
+ .`).concat(Ii," .").concat(Ii,` {
166
+ right: 0 `).concat(r,`;
167
+ }
168
+
169
+ .`).concat(Ni," .").concat(Ni,` {
170
+ margin-right: 0 `).concat(r,`;
171
+ }
172
+
173
+ body[`).concat(sr,`] {
174
+ `).concat(pw,": ").concat(a,`px;
175
+ }
176
+ `)},y0=function(){var e=parseInt(document.body.getAttribute(sr)||"0",10);return isFinite(e)?e:0},Pw=function(){P.useEffect(function(){return document.body.setAttribute(sr,(y0()+1).toString()),function(){var e=y0()-1;e<=0?document.body.removeAttribute(sr):document.body.setAttribute(sr,e.toString())}},[])},Rw=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;Pw();var o=P.useMemo(function(){return Fw(i)},[i]);return P.createElement(Tw,{styles:Ow(o,!t,i,n?"":"!important")})},ba=!1;if(typeof window<"u")try{var Mi=Object.defineProperty({},"passive",{get:function(){return ba=!0,!0}});window.addEventListener("test",Mi,Mi),window.removeEventListener("test",Mi,Mi)}catch{ba=!1}var ar=ba?{passive:!1}:!1,Iw=function(e){return e.tagName==="TEXTAREA"},b0=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Iw(e)&&n[t]==="visible")},Nw=function(e){return b0(e,"overflowY")},Lw=function(e){return b0(e,"overflowX")},v0=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=w0(e,r);if(i){var o=E0(e,r),s=o[1],a=o[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Mw=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},zw=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},w0=function(e,t){return e==="v"?Nw(t):Lw(t)},E0=function(e,t){return e==="v"?Mw(t):zw(t)},Uw=function(e,t){return e==="h"&&t==="rtl"?-1:1},Hw=function(e,t,n,r,i){var o=Uw(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,c=t.contains(a),l=!1,f=s>0,u=0,d=0;do{if(!a)break;var h=E0(e,a),p=h[0],x=h[1],m=h[2],g=x-m-o*p;(p||g)&&w0(e,a)&&(u+=g,d+=p);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(f&&Math.abs(u)<1||!f&&Math.abs(d)<1)&&(l=!0),l},zi=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},C0=function(e){return[e.deltaX,e.deltaY]},k0=function(e){return e&&"current"in e?e.current:e},qw=function(e,t){return e[0]===t[0]&&e[1]===t[1]},jw=function(e){return`
177
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
178
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
179
+ `)},$w=0,lr=[];function Ww(e){var t=P.useRef([]),n=P.useRef([0,0]),r=P.useRef(),i=P.useState($w++)[0],o=P.useState(g0)[0],s=P.useRef(e);P.useEffect(function(){s.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var x=dw([e.lockRef.current],(e.shards||[]).map(k0),!0).filter(Boolean);return x.forEach(function(m){return m.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),x.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=P.useCallback(function(x,m){if("touches"in x&&x.touches.length===2||x.type==="wheel"&&x.ctrlKey)return!s.current.allowPinchZoom;var g=zi(x),b=n.current,y="deltaX"in x?x.deltaX:b[0]-g[0],v="deltaY"in x?x.deltaY:b[1]-g[1],k,C=x.target,_=Math.abs(y)>Math.abs(v)?"h":"v";if("touches"in x&&_==="h"&&C.type==="range")return!1;var A=window.getSelection(),O=A&&A.anchorNode,E=O?O===C||O.contains(C):!1;if(E)return!1;var D=v0(_,C);if(!D)return!0;if(D?k=_:(k=_==="v"?"h":"v",D=v0(_,C)),!D)return!1;if(!r.current&&"changedTouches"in x&&(y||v)&&(r.current=k),!k)return!0;var F=r.current||k;return Hw(F,m,x,F==="h"?y:v)},[]),c=P.useCallback(function(x){var m=x;if(!(!lr.length||lr[lr.length-1]!==o)){var g="deltaY"in m?C0(m):zi(m),b=t.current.filter(function(k){return k.name===m.type&&(k.target===m.target||m.target===k.shadowParent)&&qw(k.delta,g)})[0];if(b&&b.should){m.cancelable&&m.preventDefault();return}if(!b){var y=(s.current.shards||[]).map(k0).filter(Boolean).filter(function(k){return k.contains(m.target)}),v=y.length>0?a(m,y[0]):!s.current.noIsolation;v&&m.cancelable&&m.preventDefault()}}},[]),l=P.useCallback(function(x,m,g,b){var y={name:x,delta:m,target:g,should:b,shadowParent:Vw(g)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(v){return v!==y})},1)},[]),f=P.useCallback(function(x){n.current=zi(x),r.current=void 0},[]),u=P.useCallback(function(x){l(x.type,C0(x),x.target,a(x,e.lockRef.current))},[]),d=P.useCallback(function(x){l(x.type,zi(x),x.target,a(x,e.lockRef.current))},[]);P.useEffect(function(){return lr.push(o),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",c,ar),document.addEventListener("touchmove",c,ar),document.addEventListener("touchstart",f,ar),function(){lr=lr.filter(function(x){return x!==o}),document.removeEventListener("wheel",c,ar),document.removeEventListener("touchmove",c,ar),document.removeEventListener("touchstart",f,ar)}},[]);var h=e.removeScrollBar,p=e.inert;return P.createElement(P.Fragment,null,p?P.createElement(o,{styles:jw(i)}):null,h?P.createElement(Rw,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Vw(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Kw=ww(m0,Ww);var A0=P.forwardRef(function(e,t){return P.createElement(Li,It({},e,{ref:t,sideCar:Kw}))});A0.classNames=Li.classNames;var Qw=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},cr=new WeakMap,Ui=new WeakMap,Hi={},va=0,S0=function(e){return e&&(e.host||S0(e.parentNode))},Xw=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=S0(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})},Gw=function(e,t,n,r){var i=Xw(t,Array.isArray(e)?e:[e]);Hi[n]||(Hi[n]=new WeakMap);var o=Hi[n],s=[],a=new Set,c=new Set(i),l=function(u){!u||a.has(u)||(a.add(u),l(u.parentNode))};i.forEach(l);var f=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(d){if(a.has(d))f(d);else try{var h=d.getAttribute(r),p=h!==null&&h!=="false",x=(cr.get(d)||0)+1,m=(o.get(d)||0)+1;cr.set(d,x),o.set(d,m),s.push(d),x===1&&p&&Ui.set(d,!0),m===1&&d.setAttribute(n,"true"),p||d.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return f(t),a.clear(),va++,function(){s.forEach(function(u){var d=cr.get(u)-1,h=o.get(u)-1;cr.set(u,d),o.set(u,h),d||(Ui.has(u)||u.removeAttribute(r),Ui.delete(u)),h||u.removeAttribute(n)}),va--,va||(cr=new WeakMap,cr=new WeakMap,Ui=new WeakMap,Hi={})}},Yw=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Qw(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),Gw(r,i,n,"aria-hidden")):function(){return null}},qi="Dialog",[_0]=Mv(qi),[Zw,At]=_0(qi),B0=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=P.useRef(null),c=P.useRef(null),[l,f]=Hv({prop:r,defaultProp:i??!1,onChange:o,caller:qi});return T.jsx(Zw,{scope:t,triggerRef:a,contentRef:c,contentId:fa(),titleId:fa(),descriptionId:fa(),open:l,onOpenChange:f,onOpenToggle:P.useCallback(()=>f(u=>!u),[f]),modal:s,children:n})};B0.displayName=qi;var D0="DialogTrigger",Jw=P.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=At(D0,n),o=Tn(t,i.triggerRef);return T.jsx(Gt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Ca(i.open),...r,ref:o,onClick:un(e.onClick,i.onOpenToggle)})});Jw.displayName=D0;var wa="DialogPortal",[e2,F0]=_0(wa,{forceMount:void 0}),T0=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=At(wa,t);return T.jsx(e2,{scope:t,forceMount:n,children:P.Children.map(r,s=>T.jsx(Pi,{present:n||o.open,children:T.jsx(f0,{asChild:!0,container:i,children:s})}))})};T0.displayName=wa;var ji="DialogOverlay",O0=P.forwardRef((e,t)=>{const n=F0(ji,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=At(ji,e.__scopeDialog);return o.modal?T.jsx(Pi,{present:r||o.open,children:T.jsx(n2,{...i,ref:t})}):null});O0.displayName=ji;var t2=Ju("DialogOverlay.RemoveScroll"),n2=P.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=At(ji,n);return T.jsx(A0,{as:t2,allowPinchZoom:!0,shards:[i.contentRef],children:T.jsx(Gt.div,{"data-state":Ca(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),On="DialogContent",P0=P.forwardRef((e,t)=>{const n=F0(On,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=At(On,e.__scopeDialog);return T.jsx(Pi,{present:r||o.open,children:o.modal?T.jsx(r2,{...i,ref:t}):T.jsx(i2,{...i,ref:t})})});P0.displayName=On;var r2=P.forwardRef((e,t)=>{const n=At(On,e.__scopeDialog),r=P.useRef(null),i=Tn(t,n.contentRef,r);return P.useEffect(()=>{const o=r.current;if(o)return Yw(o)},[]),T.jsx(R0,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:un(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:un(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:un(e.onFocusOutside,o=>o.preventDefault())})}),i2=P.forwardRef((e,t)=>{const n=At(On,e.__scopeDialog),r=P.useRef(!1),i=P.useRef(!1);return T.jsx(R0,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,o),o.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const s=o.target;((l=n.triggerRef.current)==null?void 0:l.contains(s))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),R0=P.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=At(On,n),c=P.useRef(null),l=Tn(t,c);return fw(),T.jsxs(T.Fragment,{children:[T.jsx(s0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:T.jsx(n0,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Ca(a.open),...s,ref:l,onDismiss:()=>a.onOpenChange(!1)})}),T.jsxs(T.Fragment,{children:[T.jsx(a2,{titleId:a.titleId}),T.jsx(c2,{contentRef:c,descriptionId:a.descriptionId})]})]})}),Ea="DialogTitle",o2=P.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=At(Ea,n);return T.jsx(Gt.h2,{id:i.titleId,...r,ref:t})});o2.displayName=Ea;var I0="DialogDescription",s2=P.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=At(I0,n);return T.jsx(Gt.p,{id:i.descriptionId,...r,ref:t})});s2.displayName=I0;var N0="DialogClose",L0=P.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=At(N0,n);return T.jsx(Gt.button,{type:"button",...r,ref:t,onClick:un(e.onClick,()=>i.onOpenChange(!1))})});L0.displayName=N0;function Ca(e){return e?"open":"closed"}var M0="DialogTitleWarning",[q4,z0]=Lv(M0,{contentName:On,titleName:Ea,docsSlug:"dialog"}),a2=({titleId:e})=>{const t=z0(M0),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
180
+
181
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
182
+
183
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return P.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},l2="DialogDescriptionWarning",c2=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${z0(l2).contentName}}.`;return P.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},u2=B0,f2=T0,d2=O0,h2=P0,p2=L0;function U0(...e){return Vu(Bu(e))}function x2({...e}){return T.jsx(u2,{"data-slot":"dialog",...e})}function m2({...e}){return T.jsx(f2,{"data-slot":"dialog-portal",...e})}function g2({className:e,...t}){return T.jsx(d2,{"data-slot":"dialog-overlay",className:U0("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function y2({className:e,children:t,showCloseButton:n=!0,...r}){return T.jsxs(m2,{"data-slot":"dialog-portal",children:[T.jsx(g2,{}),T.jsxs(h2,{"data-slot":"dialog-content",className:U0("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",e),...r,children:[t,n&&T.jsxs(p2,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[T.jsx(hi,{}),T.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function b2({file:e,onClose:t}){return T.jsx(x2,{open:!!e,onOpenChange:n=>!n&&t(),children:T.jsx(y2,{className:"sm:max-w-xl p-0 overflow-hidden bg-transparent border-none shadow-none text-white",children:T.jsxs("div",{className:"relative flex items-center justify-center w-full h-full min-h-[300px]",children:[T.jsx("button",{onClick:t,className:"absolute top-2 right-2 p-2 bg-black/50 text-white rounded-full hover:bg-black/70 z-50",children:T.jsx(hi,{className:"w-4 h-4"})}),e&&e.type.startsWith("image/")&&T.jsx("img",{src:URL.createObjectURL(e),alt:"preview",className:"max-w-full max-h-[80vh] object-contain rounded-lg"}),e&&e.type.startsWith("video/")&&T.jsx("video",{src:URL.createObjectURL(e),controls:!0,className:"max-w-full max-h-[80vh] rounded-lg"}),e&&!e.type.startsWith("image/")&&!e.type.startsWith("video/")&&T.jsxs("div",{className:"bg-white p-8 rounded-lg flex flex-col items-center gap-4 text-slate-800 min-w-[300px]",children:[T.jsx("div",{className:"w-20 h-20 rounded-lg bg-slate-100 flex items-center justify-center",children:T.jsx(di,{className:"w-10 h-10 text-slate-500"})}),T.jsxs("div",{className:"text-center",children:[T.jsx("h3",{className:"font-medium text-lg truncate max-w-[250px]",children:e.name}),T.jsxs("p",{className:"text-sm text-slate-500",children:[(e.size/1024/1024).toFixed(2)," MB"]})]})]})]})})})}function v2({messages:e,onSendMessage:t,isSending:n,onClose:r,className:i,style:o,config:s}){const[a,c]=z.useState(null);return T.jsxs("div",{className:`fixed inset-0 w-full h-full md:inset-auto md:bottom-4 md:right-4 md:w-96 md:h-[500px] flex flex-col border-none md:border md:border-gray-200 rounded-none md:rounded-lg shadow-none md:shadow-xl overflow-hidden font-sans z-50 ${i||""}`,style:{...o},children:[T.jsx(Yh,{config:s,onClose:r}),T.jsx(tv,{messages:e,isSending:n,config:s}),T.jsx(Dv,{onSendMessage:t,isSending:n,config:s,onPreviewFile:c}),T.jsx(b2,{file:a,onClose:()=>c(null)})]})}function H0(e,t){return function(){return e.apply(t,arguments)}}const{toString:w2}=Object.prototype,{getPrototypeOf:ka}=Object,{iterator:$i,toStringTag:q0}=Symbol,Wi=(e=>t=>{const n=w2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),St=e=>(e=e.toLowerCase(),t=>Wi(t)===e),Vi=e=>t=>typeof t===e,{isArray:ur}=Array,fr=Vi("undefined");function $r(e){return e!==null&&!fr(e)&&e.constructor!==null&&!fr(e.constructor)&&ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const j0=St("ArrayBuffer");function E2(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&j0(e.buffer),t}const C2=Vi("string"),ct=Vi("function"),$0=Vi("number"),Wr=e=>e!==null&&typeof e=="object",k2=e=>e===!0||e===!1,Ki=e=>{if(Wi(e)!=="object")return!1;const t=ka(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(q0 in e)&&!($i in e)},A2=e=>{if(!Wr(e)||$r(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},S2=St("Date"),_2=St("File"),B2=St("Blob"),D2=St("FileList"),F2=e=>Wr(e)&&ct(e.pipe),T2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ct(e.append)&&((t=Wi(e))==="formdata"||t==="object"&&ct(e.toString)&&e.toString()==="[object FormData]"))},O2=St("URLSearchParams"),[P2,R2,I2,N2]=["ReadableStream","Request","Response","Headers"].map(St),L2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ur(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if($r(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(r=0;r<s;r++)a=o[r],t.call(null,e[a],a,e)}}function W0(e,t){if($r(e))return null;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 Pn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,V0=e=>!fr(e)&&e!==Pn;function Aa(){const{caseless:e,skipUndefined:t}=V0(this)&&this||{},n={},r=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const s=e&&W0(n,o)||o;Ki(n[s])&&Ki(i)?n[s]=Aa(n[s],i):Ki(i)?n[s]=Aa({},i):ur(i)?n[s]=i.slice():(!t||!fr(i))&&(n[s]=i)};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&Vr(arguments[i],r);return n}const M2=(e,t,n,{allOwnKeys:r}={})=>(Vr(t,(i,o)=>{n&&ct(i)?Object.defineProperty(e,o,{value:H0(i,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),z2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),U2=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},H2=(e,t,n,r)=>{let i,o,s;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=n!==!1&&ka(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},q2=(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},j2=e=>{if(!e)return null;if(ur(e))return e;let t=e.length;if(!$0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},$2=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ka(Uint8Array)),W2=(e,t)=>{const r=(e&&e[$i]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},V2=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},K2=St("HTMLFormElement"),Q2=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),K0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),X2=St("RegExp"),Q0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Vr(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},G2=e=>{Q0(e,(t,n)=>{if(ct(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ct(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+"'")})}})},Y2=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ur(e)?r(e):r(String(e).split(t)),n},Z2=()=>{},J2=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function eE(e){return!!(e&&ct(e.append)&&e[q0]==="FormData"&&e[$i])}const tE=e=>{const t=new Array(10),n=(r,i)=>{if(Wr(r)){if(t.indexOf(r)>=0)return;if($r(r))return r;if(!("toJSON"in r)){t[i]=r;const o=ur(r)?[]:{};return Vr(r,(s,a)=>{const c=n(s,i+1);!fr(c)&&(o[a]=c)}),t[i]=void 0,o}}return r};return n(e,0)},nE=St("AsyncFunction"),rE=e=>e&&(Wr(e)||ct(e))&&ct(e.then)&&ct(e.catch),X0=((e,t)=>e?setImmediate:t?((n,r)=>(Pn.addEventListener("message",({source:i,data:o})=>{i===Pn&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Pn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ct(Pn.postMessage)),iE=typeof queueMicrotask<"u"?queueMicrotask.bind(Pn):typeof process<"u"&&process.nextTick||X0,N={isArray:ur,isArrayBuffer:j0,isBuffer:$r,isFormData:T2,isArrayBufferView:E2,isString:C2,isNumber:$0,isBoolean:k2,isObject:Wr,isPlainObject:Ki,isEmptyObject:A2,isReadableStream:P2,isRequest:R2,isResponse:I2,isHeaders:N2,isUndefined:fr,isDate:S2,isFile:_2,isBlob:B2,isRegExp:X2,isFunction:ct,isStream:F2,isURLSearchParams:O2,isTypedArray:$2,isFileList:D2,forEach:Vr,merge:Aa,extend:M2,trim:L2,stripBOM:z2,inherits:U2,toFlatObject:H2,kindOf:Wi,kindOfTest:St,endsWith:q2,toArray:j2,forEachEntry:W2,matchAll:V2,isHTMLForm:K2,hasOwnProperty:K0,hasOwnProp:K0,reduceDescriptors:Q0,freezeMethods:G2,toObjectSet:Y2,toCamelCase:Q2,noop:Z2,toFiniteNumber:J2,findKey:W0,global:Pn,isContextDefined:V0,isSpecCompliantForm:eE,toJSONObject:tE,isAsyncFn:nE,isThenable:rE,setImmediate:X0,asap:iE,isIterable:e=>e!=null&&ct(e[$i])};let re=class Vd extends Error{static from(t,n,r,i,o,s){const a=new Vd(t.message,n||t.code,r,i,o);return a.cause=t,a.name=t.name,s&&Object.assign(a,s),a}constructor(t,n,r,i,o){super(t),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),i&&(this.request=i),o&&(this.response=o,this.status=o.status)}toJSON(){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:N.toJSONObject(this.config),code:this.code,status:this.status}}};re.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",re.ERR_BAD_OPTION="ERR_BAD_OPTION",re.ECONNABORTED="ECONNABORTED",re.ETIMEDOUT="ETIMEDOUT",re.ERR_NETWORK="ERR_NETWORK",re.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",re.ERR_DEPRECATED="ERR_DEPRECATED",re.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",re.ERR_BAD_REQUEST="ERR_BAD_REQUEST",re.ERR_CANCELED="ERR_CANCELED",re.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",re.ERR_INVALID_URL="ERR_INVALID_URL";const oE=null;function Sa(e){return N.isPlainObject(e)||N.isArray(e)}function G0(e){return N.endsWith(e,"[]")?e.slice(0,-2):e}function Y0(e,t,n){return e?e.concat(t).map(function(i,o){return i=G0(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function sE(e){return N.isArray(e)&&!e.some(Sa)}const aE=N.toFlatObject(N,{},null,function(t){return/^is[A-Z]/.test(t)});function Qi(e,t,n){if(!N.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=N.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,m){return!N.isUndefined(m[x])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(t);if(!N.isFunction(i))throw new TypeError("visitor must be a function");function l(p){if(p===null)return"";if(N.isDate(p))return p.toISOString();if(N.isBoolean(p))return p.toString();if(!c&&N.isBlob(p))throw new re("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(p)||N.isTypedArray(p)?c&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function f(p,x,m){let g=p;if(p&&!m&&typeof p=="object"){if(N.endsWith(x,"{}"))x=r?x:x.slice(0,-2),p=JSON.stringify(p);else if(N.isArray(p)&&sE(p)||(N.isFileList(p)||N.endsWith(x,"[]"))&&(g=N.toArray(p)))return x=G0(x),g.forEach(function(y,v){!(N.isUndefined(y)||y===null)&&t.append(s===!0?Y0([x],v,o):s===null?x:x+"[]",l(y))}),!1}return Sa(p)?!0:(t.append(Y0(m,x,o),l(p)),!1)}const u=[],d=Object.assign(aE,{defaultVisitor:f,convertValue:l,isVisitable:Sa});function h(p,x){if(!N.isUndefined(p)){if(u.indexOf(p)!==-1)throw Error("Circular reference detected in "+x.join("."));u.push(p),N.forEach(p,function(g,b){(!(N.isUndefined(g)||g===null)&&i.call(t,g,N.isString(b)?b.trim():b,x,d))===!0&&h(g,x?x.concat(b):[b])}),u.pop()}}if(!N.isObject(e))throw new TypeError("data must be an object");return h(e),t}function Z0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function _a(e,t){this._pairs=[],e&&Qi(e,this,t)}const J0=_a.prototype;J0.append=function(t,n){this._pairs.push([t,n])},J0.toString=function(t){const n=t?function(r){return t.call(this,r,Z0)}:Z0;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function lE(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ef(e,t,n){if(!t)return e;const r=n&&n.encode||lE,i=N.isFunction(n)?{serialize:n}:n,o=i&&i.serialize;let s;if(o?s=o(t,i):s=N.isURLSearchParams(t)?t.toString():new _a(t,i).toString(r),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class tf{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){N.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ba={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},cE={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:_a,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Da=typeof window<"u"&&typeof document<"u",Fa=typeof navigator=="object"&&navigator||void 0,uE=Da&&(!Fa||["ReactNative","NativeScript","NS"].indexOf(Fa.product)<0),fE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dE=Da&&window.location.href||"http://localhost",Qe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Da,hasStandardBrowserEnv:uE,hasStandardBrowserWebWorkerEnv:fE,navigator:Fa,origin:dE},Symbol.toStringTag,{value:"Module"})),...cE};function hE(e,t){return Qi(e,new Qe.classes.URLSearchParams,{visitor:function(n,r,i,o){return Qe.isNode&&N.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function pE(e){return N.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function xE(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],t[o]=e[o];return t}function nf(e){function t(n,r,i,o){let s=n[o++];if(s==="__proto__")return!0;const a=Number.isFinite(+s),c=o>=n.length;return s=!s&&N.isArray(i)?i.length:s,c?(N.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!N.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&N.isArray(i[s])&&(i[s]=xE(i[s])),!a)}if(N.isFormData(e)&&N.isFunction(e.entries)){const n={};return N.forEachEntry(e,(r,i)=>{t(pE(r),i,n,0)}),n}return null}function mE(e,t,n){if(N.isString(e))try{return(t||JSON.parse)(e),N.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Kr={transitional:Ba,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=N.isObject(t);if(o&&N.isHTMLForm(t)&&(t=new FormData(t)),N.isFormData(t))return i?JSON.stringify(nf(t)):t;if(N.isArrayBuffer(t)||N.isBuffer(t)||N.isStream(t)||N.isFile(t)||N.isBlob(t)||N.isReadableStream(t))return t;if(N.isArrayBufferView(t))return t.buffer;if(N.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return hE(t,this.formSerializer).toString();if((a=N.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Qi(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),mE(t)):t}],transformResponse:[function(t){const n=this.transitional||Kr.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(N.isResponse(t)||N.isReadableStream(t))return t;if(t&&N.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(a){if(s)throw a.name==="SyntaxError"?re.from(a,re.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Qe.classes.FormData,Blob:Qe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],e=>{Kr.headers[e]={}});const gE=N.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"]),yE=e=>{const t={};let n,r,i;return e&&e.split(`
184
+ `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&gE[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},rf=Symbol("internals");function Qr(e){return e&&String(e).trim().toLowerCase()}function Xi(e){return e===!1||e==null?e:N.isArray(e)?e.map(Xi):String(e)}function bE(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}const vE=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ta(e,t,n,r,i){if(N.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!N.isString(t)){if(N.isString(r))return t.indexOf(r)!==-1;if(N.isRegExp(r))return r.test(t)}}function wE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function EE(e,t){const n=N.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}let ut=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(a,c,l){const f=Qr(c);if(!f)throw new Error("header name must be a non-empty string");const u=N.findKey(i,f);(!u||i[u]===void 0||l===!0||l===void 0&&i[u]!==!1)&&(i[u||c]=Xi(a))}const s=(a,c)=>N.forEach(a,(l,f)=>o(l,f,c));if(N.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(N.isString(t)&&(t=t.trim())&&!vE(t))s(yE(t),n);else if(N.isObject(t)&&N.isIterable(t)){let a={},c,l;for(const f of t){if(!N.isArray(f))throw TypeError("Object iterator must return a key-value pair");a[l=f[0]]=(c=a[l])?N.isArray(c)?[...c,f[1]]:[c,f[1]]:f[1]}s(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=Qr(t),t){const r=N.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return bE(i);if(N.isFunction(n))return n.call(this,i,r);if(N.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Qr(t),t){const r=N.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ta(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(s){if(s=Qr(s),s){const a=N.findKey(r,s);a&&(!n||Ta(r,r[a],a,n))&&(delete r[a],i=!0)}}return N.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Ta(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return N.forEach(this,(i,o)=>{const s=N.findKey(r,o);if(s){n[s]=Xi(i),delete n[o];return}const a=t?wE(o):String(o).trim();a!==o&&delete n[o],n[a]=Xi(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return N.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&N.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(`
185
+ `)}getSetCookie(){return this.get("set-cookie")||[]}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[rf]=this[rf]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=Qr(s);r[a]||(EE(i,s),r[a]=!0)}return N.isArray(t)?t.forEach(o):o(t),this}};ut.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),N.reduceDescriptors(ut.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),N.freezeMethods(ut);function Oa(e,t){const n=this||Kr,r=t||n,i=ut.from(r.headers);let o=r.data;return N.forEach(e,function(a){o=a.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function of(e){return!!(e&&e.__CANCEL__)}let Xr=class extends re{constructor(t,n,r){super(t??"canceled",re.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function sf(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new re("Request failed with status code "+n.status,[re.ERR_BAD_REQUEST,re.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function CE(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function kE(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,s;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),f=r[o];s||(s=l),n[i]=c,r[i]=l;let u=o,d=0;for(;u!==i;)d+=n[u++],u=u%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-s<t)return;const h=f&&l-f;return h?Math.round(d*1e3/h):void 0}}function AE(e,t){let n=0,r=1e3/t,i,o;const s=(l,f=Date.now())=>{n=f,i=null,o&&(clearTimeout(o),o=null),e(...l)};return[(...l)=>{const f=Date.now(),u=f-n;u>=r?s(l,f):(i=l,o||(o=setTimeout(()=>{o=null,s(i)},r-u)))},()=>i&&s(i)]}const Gi=(e,t,n=3)=>{let r=0;const i=kE(50,250);return AE(o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,c=s-r,l=i(c),f=s<=a;r=s;const u={loaded:s,total:a,progress:a?s/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&f?(a-s)/l:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(u)},n)},af=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},lf=e=>(...t)=>N.asap(()=>e(...t)),SE=Qe.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Qe.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Qe.origin),Qe.navigator&&/(msie|trident)/i.test(Qe.navigator.userAgent)):()=>!0,_E=Qe.hasStandardBrowserEnv?{write(e,t,n,r,i,o,s){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];N.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),N.isString(r)&&a.push(`path=${r}`),N.isString(i)&&a.push(`domain=${i}`),o===!0&&a.push("secure"),N.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function BE(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function DE(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function cf(e,t,n){let r=!BE(t);return e&&(r||n==!1)?DE(e,t):t}const uf=e=>e instanceof ut?{...e}:e;function Rn(e,t){t=t||{};const n={};function r(l,f,u,d){return N.isPlainObject(l)&&N.isPlainObject(f)?N.merge.call({caseless:d},l,f):N.isPlainObject(f)?N.merge({},f):N.isArray(f)?f.slice():f}function i(l,f,u,d){if(N.isUndefined(f)){if(!N.isUndefined(l))return r(void 0,l,u,d)}else return r(l,f,u,d)}function o(l,f){if(!N.isUndefined(f))return r(void 0,f)}function s(l,f){if(N.isUndefined(f)){if(!N.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function a(l,f,u){if(u in t)return r(l,f);if(u in e)return r(void 0,l)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(l,f,u)=>i(uf(l),uf(f),u,!0)};return N.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const u=N.hasOwnProp(c,f)?c[f]:i,d=u(e[f],t[f],f);N.isUndefined(d)&&u!==a||(n[f]=d)}),n}const ff=e=>{const t=Rn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:a}=t;if(t.headers=s=ut.from(s),t.url=ef(cf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&s.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),N.isFormData(n)){if(Qe.hasStandardBrowserEnv||Qe.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(N.isFunction(n.getHeaders)){const c=n.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([f,u])=>{l.includes(f.toLowerCase())&&s.set(f,u)})}}if(Qe.hasStandardBrowserEnv&&(r&&N.isFunction(r)&&(r=r(t)),r||r!==!1&&SE(t.url))){const c=i&&o&&_E.read(o);c&&s.set(i,c)}return t},FE=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=ff(e);let o=i.data;const s=ut.from(i.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=i,f,u,d,h,p;function x(){h&&h(),p&&p(),i.cancelToken&&i.cancelToken.unsubscribe(f),i.signal&&i.signal.removeEventListener("abort",f)}let m=new XMLHttpRequest;m.open(i.method.toUpperCase(),i.url,!0),m.timeout=i.timeout;function g(){if(!m)return;const y=ut.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders()),k={data:!a||a==="text"||a==="json"?m.responseText:m.response,status:m.status,statusText:m.statusText,headers:y,config:e,request:m};sf(function(_){n(_),x()},function(_){r(_),x()},k),m=null}"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){!m||m.readyState!==4||m.status===0&&!(m.responseURL&&m.responseURL.indexOf("file:")===0)||setTimeout(g)},m.onabort=function(){m&&(r(new re("Request aborted",re.ECONNABORTED,e,m)),m=null)},m.onerror=function(v){const k=v&&v.message?v.message:"Network Error",C=new re(k,re.ERR_NETWORK,e,m);C.event=v||null,r(C),m=null},m.ontimeout=function(){let v=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const k=i.transitional||Ba;i.timeoutErrorMessage&&(v=i.timeoutErrorMessage),r(new re(v,k.clarifyTimeoutError?re.ETIMEDOUT:re.ECONNABORTED,e,m)),m=null},o===void 0&&s.setContentType(null),"setRequestHeader"in m&&N.forEach(s.toJSON(),function(v,k){m.setRequestHeader(k,v)}),N.isUndefined(i.withCredentials)||(m.withCredentials=!!i.withCredentials),a&&a!=="json"&&(m.responseType=i.responseType),l&&([d,p]=Gi(l,!0),m.addEventListener("progress",d)),c&&m.upload&&([u,h]=Gi(c),m.upload.addEventListener("progress",u),m.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(f=y=>{m&&(r(!y||y.type?new Xr(null,e,m):y),m.abort(),m=null)},i.cancelToken&&i.cancelToken.subscribe(f),i.signal&&(i.signal.aborted?f():i.signal.addEventListener("abort",f)));const b=CE(i.url);if(b&&Qe.protocols.indexOf(b)===-1){r(new re("Unsupported protocol "+b+":",re.ERR_BAD_REQUEST,e));return}m.send(o||null)})},TE=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,a();const f=l instanceof Error?l:this.reason;r.abort(f instanceof re?f:new Xr(f instanceof Error?f.message:f))}};let s=t&&setTimeout(()=>{s=null,o(new re(`timeout of ${t}ms exceeded`,re.ETIMEDOUT))},t);const a=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>N.asap(a),c}},OE=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},PE=async function*(e,t){for await(const n of RE(e))yield*OE(n,t)},RE=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},df=(e,t,n,r)=>{const i=PE(e,t);let o=0,s,a=c=>{s||(s=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:f}=await i.next();if(l){a(),c.close();return}let u=f.byteLength;if(n){let d=o+=u;n(d)}c.enqueue(new Uint8Array(f))}catch(l){throw a(l),l}},cancel(c){return a(c),i.return()}},{highWaterMark:2})},hf=64*1024,{isFunction:Yi}=N,IE=(({Request:e,Response:t})=>({Request:e,Response:t}))(N.global),{ReadableStream:pf,TextEncoder:xf}=N.global,mf=(e,...t)=>{try{return!!e(...t)}catch{return!1}},NE=e=>{e=N.merge.call({skipUndefined:!0},IE,e);const{fetch:t,Request:n,Response:r}=e,i=t?Yi(t):typeof fetch=="function",o=Yi(n),s=Yi(r);if(!i)return!1;const a=i&&Yi(pf),c=i&&(typeof xf=="function"?(p=>x=>p.encode(x))(new xf):async p=>new Uint8Array(await new n(p).arrayBuffer())),l=o&&a&&mf(()=>{let p=!1;const x=new n(Qe.origin,{body:new pf,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!x}),f=s&&a&&mf(()=>N.isReadableStream(new r("").body)),u={stream:f&&(p=>p.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!u[p]&&(u[p]=(x,m)=>{let g=x&&x[p];if(g)return g.call(x);throw new re(`Response type '${p}' is not supported`,re.ERR_NOT_SUPPORT,m)})});const d=async p=>{if(p==null)return 0;if(N.isBlob(p))return p.size;if(N.isSpecCompliantForm(p))return(await new n(Qe.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(N.isArrayBufferView(p)||N.isArrayBuffer(p))return p.byteLength;if(N.isURLSearchParams(p)&&(p=p+""),N.isString(p))return(await c(p)).byteLength},h=async(p,x)=>{const m=N.toFiniteNumber(p.getContentLength());return m??d(x)};return async p=>{let{url:x,method:m,data:g,signal:b,cancelToken:y,timeout:v,onDownloadProgress:k,onUploadProgress:C,responseType:_,headers:A,withCredentials:O="same-origin",fetchOptions:E}=ff(p),D=t||fetch;_=_?(_+"").toLowerCase():"text";let F=TE([b,y&&y.toAbortSignal()],v),R=null;const U=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let L;try{if(C&&l&&m!=="get"&&m!=="head"&&(L=await h(A,g))!==0){let M=new n(x,{method:"POST",body:g,duplex:"half"}),q;if(N.isFormData(g)&&(q=M.headers.get("content-type"))&&A.setContentType(q),M.body){const[w,I]=af(L,Gi(lf(C)));g=df(M.body,hf,w,I)}}N.isString(O)||(O=O?"include":"omit");const j=o&&"credentials"in n.prototype,X={...E,signal:F,method:m.toUpperCase(),headers:A.normalize().toJSON(),body:g,duplex:"half",credentials:j?O:void 0};R=o&&new n(x,X);let $=await(o?D(R,E):D(x,X));const ne=f&&(_==="stream"||_==="response");if(f&&(k||ne&&U)){const M={};["status","statusText","headers"].forEach(Z=>{M[Z]=$[Z]});const q=N.toFiniteNumber($.headers.get("content-length")),[w,I]=k&&af(q,Gi(lf(k),!0))||[];$=new r(df($.body,hf,w,()=>{I&&I(),U&&U()}),M)}_=_||"text";let S=await u[N.findKey(u,_)||"text"]($,p);return!ne&&U&&U(),await new Promise((M,q)=>{sf(M,q,{data:S,headers:ut.from($.headers),status:$.status,statusText:$.statusText,config:p,request:R})})}catch(j){throw U&&U(),j&&j.name==="TypeError"&&/Load failed|fetch/i.test(j.message)?Object.assign(new re("Network Error",re.ERR_NETWORK,p,R,j&&j.response),{cause:j.cause||j}):re.from(j,j&&j.code,p,R,j&&j.response)}}},LE=new Map,gf=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:i}=t,o=[r,i,n];let s=o.length,a=s,c,l,f=LE;for(;a--;)c=o[a],l=f.get(c),l===void 0&&f.set(c,l=a?new Map:NE(t)),f=l;return l};gf();const Pa={http:oE,xhr:FE,fetch:{get:gf}};N.forEach(Pa,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const yf=e=>`- ${e}`,ME=e=>N.isFunction(e)||e===null||e===!1;function zE(e,t){e=N.isArray(e)?e:[e];const{length:n}=e;let r,i;const o={};for(let s=0;s<n;s++){r=e[s];let a;if(i=r,!ME(r)&&(i=Pa[(a=String(r)).toLowerCase()],i===void 0))throw new re(`Unknown adapter '${a}'`);if(i&&(N.isFunction(i)||(i=i.get(t))))break;o[a||"#"+s]=i}if(!i){const s=Object.entries(o).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=n?s.length>1?`since :
186
+ `+s.map(yf).join(`
187
+ `):" "+yf(s[0]):"as no adapter specified";throw new re("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return i}const bf={getAdapter:zE,adapters:Pa};function Ra(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Xr(null,e)}function vf(e){return Ra(e),e.headers=ut.from(e.headers),e.data=Oa.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),bf.getAdapter(e.adapter||Kr.adapter,e)(e).then(function(r){return Ra(e),r.data=Oa.call(e,e.transformResponse,r),r.headers=ut.from(r.headers),r},function(r){return of(r)||(Ra(e),r&&r.response&&(r.response.data=Oa.call(e,e.transformResponse,r.response),r.response.headers=ut.from(r.response.headers))),Promise.reject(r)})}const wf="1.13.5",Zi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Zi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Ef={};Zi.transitional=function(t,n,r){function i(o,s){return"[Axios v"+wf+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(t===!1)throw new re(i(s," has been removed"+(n?" in "+n:"")),re.ERR_DEPRECATED);return n&&!Ef[s]&&(Ef[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,s,a):!0}},Zi.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function UE(e,t,n){if(typeof e!="object")throw new re("options must be an object",re.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],s=t[o];if(s){const a=e[o],c=a===void 0||s(a,o,e);if(c!==!0)throw new re("option "+o+" must be "+c,re.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new re("Unknown option "+o,re.ERR_BAD_OPTION)}}const Ji={assertOptions:UE,validators:Zi},vt=Ji.validators;let In=class{constructor(t){this.defaults=t||{},this.interceptors={request:new tf,response:new tf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
188
+ `+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Rn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ji.assertOptions(r,{silentJSONParsing:vt.transitional(vt.boolean),forcedJSONParsing:vt.transitional(vt.boolean),clarifyTimeoutError:vt.transitional(vt.boolean),legacyInterceptorReqResOrdering:vt.transitional(vt.boolean)},!1),i!=null&&(N.isFunction(i)?n.paramsSerializer={serialize:i}:Ji.assertOptions(i,{encode:vt.function,serialize:vt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ji.assertOptions(n,{baseUrl:vt.spelling("baseURL"),withXsrfToken:vt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&N.merge(o.common,o[n.method]);o&&N.forEach(["delete","get","head","post","put","patch","common"],p=>{delete o[p]}),n.headers=ut.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach(function(x){if(typeof x.runWhen=="function"&&x.runWhen(n)===!1)return;c=c&&x.synchronous;const m=n.transitional||Ba;m&&m.legacyInterceptorReqResOrdering?a.unshift(x.fulfilled,x.rejected):a.push(x.fulfilled,x.rejected)});const l=[];this.interceptors.response.forEach(function(x){l.push(x.fulfilled,x.rejected)});let f,u=0,d;if(!c){const p=[vf.bind(this),void 0];for(p.unshift(...a),p.push(...l),d=p.length,f=Promise.resolve(n);u<d;)f=f.then(p[u++],p[u++]);return f}d=a.length;let h=n;for(;u<d;){const p=a[u++],x=a[u++];try{h=p(h)}catch(m){x.call(this,m);break}}try{f=vf.call(this,h)}catch(p){return Promise.reject(p)}for(u=0,d=l.length;u<d;)f=f.then(l[u++],l[u++]);return f}getUri(t){t=Rn(this.defaults,t);const n=cf(t.baseURL,t.url,t.allowAbsoluteUrls);return ef(n,t.params,t.paramsSerializer)}};N.forEach(["delete","get","head","options"],function(t){In.prototype[t]=function(n,r){return this.request(Rn(r||{},{method:t,url:n,data:(r||{}).data}))}}),N.forEach(["post","put","patch"],function(t){function n(r){return function(o,s,a){return this.request(Rn(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}In.prototype[t]=n(),In.prototype[t+"Form"]=n(!0)});let HE=class Kd{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},t(function(o,s,a){r.reason||(r.reason=new Xr(o,s,a),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)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Kd(function(i){t=i}),cancel:t}}};function qE(e){return function(n){return e.apply(null,n)}}function jE(e){return N.isObject(e)&&e.isAxiosError===!0}const Ia={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ia).forEach(([e,t])=>{Ia[t]=e});function Cf(e){const t=new In(e),n=H0(In.prototype.request,t);return N.extend(n,In.prototype,t,{allOwnKeys:!0}),N.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Cf(Rn(e,i))},n}const _e=Cf(Kr);_e.Axios=In,_e.CanceledError=Xr,_e.CancelToken=HE,_e.isCancel=of,_e.VERSION=wf,_e.toFormData=Qi,_e.AxiosError=re,_e.Cancel=_e.CanceledError,_e.all=function(t){return Promise.all(t)},_e.spread=qE,_e.isAxiosError=jE,_e.mergeConfig=Rn,_e.AxiosHeaders=ut,_e.formToJSON=e=>nf(N.isHTMLForm(e)?new FormData(e):e),_e.getAdapter=bf.getAdapter,_e.HttpStatusCode=Ia,_e.default=_e;const{Axios:X4,AxiosError:G4,CanceledError:Y4,isCancel:Z4,CancelToken:J4,VERSION:e8,all:t8,Cancel:n8,isAxiosError:r8,spread:i8,toFormData:o8,AxiosHeaders:s8,HttpStatusCode:a8,formToJSON:l8,getAdapter:c8,mergeConfig:u8}=_e,qt=class qt{};Ct(qt,"handleError",(t,n)=>{console.error("Global Error:",t),console.error("Error Info:",n),console.group("🔴 Error Details"),console.error("Error:",t),console.error("Stack:",t.stack),n&&console.error("Component Stack:",n.componentStack),console.groupEnd()}),Ct(qt,"handleApiError",t=>{const n=new Error;if(t.response){const{status:r,data:i}=t.response;switch(n.statusCode=r,n.message=qt.getErrorMessage(r,i),n.details=i,r){case 400:n.code="BAD_REQUEST";break;case 401:n.code="UNAUTHORIZED";break;case 403:n.code="FORBIDDEN";break;case 404:n.code="NOT_FOUND";break;case 409:n.code="CONFLICT";break;case 422:n.code="VALIDATION_ERROR";break;case 429:n.code="RATE_LIMIT_EXCEEDED";break;case 500:n.code="INTERNAL_SERVER_ERROR";break;default:n.code="UNKNOWN_ERROR"}}else t.request?(n.code="NETWORK_ERROR",n.message="Tidak dapat terhubung ke server. Periksa koneksi internet Anda."):(n.code="REQUEST_ERROR",n.message=t.message||"Terjadi kesalahan yang tidak diketahui.");return n}),Ct(qt,"getErrorMessage",(t,n)=>{if(n!=null&&n.message)return n.message;if(n!=null&&n.detail)return n.detail;if(n!=null&&n.error)return n.error;switch(t){case 400:return"Permintaan tidak valid. Periksa data yang Anda kirim.";case 401:return"Sesi Anda telah habis. Silakan login kembali.";case 403:return"Anda tidak memiliki izin untuk mengakses resource ini.";case 404:return"Data yang diminta tidak ditemukan.";case 409:return"Konflik data. Resource sudah ada atau sedang digunakan.";case 422:return"Data yang dikirim tidak valid. Periksa kembali form Anda.";case 429:return"Terlalu banyak permintaan. Mohon tunggu sebentar dan coba lagi.";case 500:return"Terjadi kesalahan di server. Silakan coba lagi nanti.";case 503:return"Layanan sedang tidak tersedia. Silakan coba lagi nanti.";default:return"Terjadi kesalahan yang tidak diketahui."}}),Ct(qt,"isNetworkError",t=>t.code==="NETWORK_ERROR"),Ct(qt,"isValidationError",t=>t.code==="VALIDATION_ERROR"||t.statusCode===422),Ct(qt,"isAuthError",t=>t.code==="UNAUTHORIZED"||t.statusCode===401),Ct(qt,"isRateLimitError",t=>t.code==="RATE_LIMIT_EXCEEDED"||t.statusCode===429);let eo=qt;class kf{constructor(t){Ct(this,"axios");Ct(this,"retries");Ct(this,"retryDelay");this.retries=t.retries??3,this.retryDelay=t.retryDelay??1e3,this.axios=_e.create({baseURL:t.baseURL,timeout:t.timeout??1e4,headers:{"Content-Type":"application/json",...t.headers},withCredentials:!0}),this.setupInterceptors()}setupInterceptors(){this.axios.interceptors.request.use(t=>{var n;return t.metadata={startTime:Date.now()},console.log(`🚀 ${(n=t.method)==null?void 0:n.toUpperCase()} ${t.url}`,t.data?{data:t.data}:""),t},t=>Promise.reject(eo.handleApiError(t))),this.axios.interceptors.response.use(t=>{var r,i;const n=Date.now()-(((r=t.config.metadata)==null?void 0:r.startTime)||0);return console.log(`✅ ${(i=t.config.method)==null?void 0:i.toUpperCase()} ${t.config.url} (${n}ms)`,{status:t.status,data:t.data}),t},async t=>{const n=eo.handleApiError(t);return this.shouldRetry(t)&&t.config&&!t.config.__retryCount?this.retryRequest(t.config,t):Promise.reject(n)})}shouldRetry(t){return!t.response||t.response.status===429||t.response.status>=500&&t.response.status<=599}async retryRequest(t,n){var i;if(t.__retryCount=t.__retryCount||0,t.__retryCount>=this.retries)throw t;t.__retryCount+=1;let r=this.retryDelay*Math.pow(2,t.__retryCount-1);if(((i=n==null?void 0:n.response)==null?void 0:i.status)===429){const o=n.response.headers["retry-after"];if(o){const s=isNaN(o)?new Date(o).getTime()-Date.now():parseInt(o)*1e3;r=Math.max(s,1e3)}else r=6e4}return console.log(`⏳ Retrying request in ${r}ms (attempt ${t.__retryCount}/${this.retries})`),await new Promise(o=>setTimeout(o,r)),this.axios(t)}async get(t,n){return(await this.axios.get(t,n)).data}async getRaw(t,n){return await this.axios.get(t,n)}async post(t,n,r){return(await this.axios.post(t,n,r)).data}async put(t,n,r){return(await this.axios.put(t,n,r)).data}async patch(t,n,r){return(await this.axios.patch(t,n,r)).data}async delete(t,n){return(await this.axios.delete(t,n)).data}async uploadFile(t,n,r){const i=new FormData;i.append("file",n);const o={headers:{"Content-Type":"multipart/form-data"}};return r&&(o.onUploadProgress=r),(await this.axios.post(t,i,o)).data}setAuthHeader(t){this.axios.defaults.headers.common.Authorization=`Bearer ${t}`}removeAuthHeader(){delete this.axios.defaults.headers.common.Authorization}setCustomHeader(t,n){this.axios.defaults.headers.common[t]=n}removeCustomHeader(t){delete this.axios.defaults.headers.common[t]}setBaseURL(t){this.axios.defaults.baseURL=t}}var to={exports:{}};function $E(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var no={exports:{}};const WE=xp(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var VE=no.exports,Af;function pe(){return Af||(Af=1,(function(e,t){(function(n,r){e.exports=r()})(VE,function(){var n=n||(function(r,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof ys<"u"&&ys.crypto&&(o=ys.crypto),!o&&typeof $E=="function")try{o=WE}catch{}var s=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||(function(){function b(){}return function(y){var v;return b.prototype=y,v=new b,b.prototype=null,v}})(),c={},l=c.lib={},f=l.Base=(function(){return{extend:function(b){var y=a(this);return b&&y.mixIn(b),(!y.hasOwnProperty("init")||this.init===y.init)&&(y.init=function(){y.$super.init.apply(this,arguments)}),y.init.prototype=y,y.$super=this,y},create:function(){var b=this.extend();return b.init.apply(b,arguments),b},init:function(){},mixIn:function(b){for(var y in b)b.hasOwnProperty(y)&&(this[y]=b[y]);b.hasOwnProperty("toString")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}}})(),u=l.WordArray=f.extend({init:function(b,y){b=this.words=b||[],y!=i?this.sigBytes=y:this.sigBytes=b.length*4},toString:function(b){return(b||h).stringify(this)},concat:function(b){var y=this.words,v=b.words,k=this.sigBytes,C=b.sigBytes;if(this.clamp(),k%4)for(var _=0;_<C;_++){var A=v[_>>>2]>>>24-_%4*8&255;y[k+_>>>2]|=A<<24-(k+_)%4*8}else for(var O=0;O<C;O+=4)y[k+O>>>2]=v[O>>>2];return this.sigBytes+=C,this},clamp:function(){var b=this.words,y=this.sigBytes;b[y>>>2]&=4294967295<<32-y%4*8,b.length=r.ceil(y/4)},clone:function(){var b=f.clone.call(this);return b.words=this.words.slice(0),b},random:function(b){for(var y=[],v=0;v<b;v+=4)y.push(s());return new u.init(y,b)}}),d=c.enc={},h=d.Hex={stringify:function(b){for(var y=b.words,v=b.sigBytes,k=[],C=0;C<v;C++){var _=y[C>>>2]>>>24-C%4*8&255;k.push((_>>>4).toString(16)),k.push((_&15).toString(16))}return k.join("")},parse:function(b){for(var y=b.length,v=[],k=0;k<y;k+=2)v[k>>>3]|=parseInt(b.substr(k,2),16)<<24-k%8*4;return new u.init(v,y/2)}},p=d.Latin1={stringify:function(b){for(var y=b.words,v=b.sigBytes,k=[],C=0;C<v;C++){var _=y[C>>>2]>>>24-C%4*8&255;k.push(String.fromCharCode(_))}return k.join("")},parse:function(b){for(var y=b.length,v=[],k=0;k<y;k++)v[k>>>2]|=(b.charCodeAt(k)&255)<<24-k%4*8;return new u.init(v,y)}},x=d.Utf8={stringify:function(b){try{return decodeURIComponent(escape(p.stringify(b)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(b){return p.parse(unescape(encodeURIComponent(b)))}},m=l.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(b){typeof b=="string"&&(b=x.parse(b)),this._data.concat(b),this._nDataBytes+=b.sigBytes},_process:function(b){var y,v=this._data,k=v.words,C=v.sigBytes,_=this.blockSize,A=_*4,O=C/A;b?O=r.ceil(O):O=r.max((O|0)-this._minBufferSize,0);var E=O*_,D=r.min(E*4,C);if(E){for(var F=0;F<E;F+=_)this._doProcessBlock(k,F);y=k.splice(0,E),v.sigBytes-=D}return new u.init(y,D)},clone:function(){var b=f.clone.call(this);return b._data=this._data.clone(),b},_minBufferSize:0});l.Hasher=m.extend({cfg:f.extend(),init:function(b){this.cfg=this.cfg.extend(b),this.reset()},reset:function(){m.reset.call(this),this._doReset()},update:function(b){return this._append(b),this._process(),this},finalize:function(b){b&&this._append(b);var y=this._doFinalize();return y},blockSize:16,_createHelper:function(b){return function(y,v){return new b.init(v).finalize(y)}},_createHmacHelper:function(b){return function(y,v){return new g.HMAC.init(b,v).finalize(y)}}});var g=c.algo={};return c})(Math);return n})})(no)),no.exports}var ro={exports:{}},KE=ro.exports,Sf;function io(){return Sf||(Sf=1,(function(e,t){(function(n,r){e.exports=r(pe())})(KE,function(n){return(function(r){var i=n,o=i.lib,s=o.Base,a=o.WordArray,c=i.x64={};c.Word=s.extend({init:function(l,f){this.high=l,this.low=f}}),c.WordArray=s.extend({init:function(l,f){l=this.words=l||[],f!=r?this.sigBytes=f:this.sigBytes=l.length*8},toX32:function(){for(var l=this.words,f=l.length,u=[],d=0;d<f;d++){var h=l[d];u.push(h.high),u.push(h.low)}return a.create(u,this.sigBytes)},clone:function(){for(var l=s.clone.call(this),f=l.words=this.words.slice(0),u=f.length,d=0;d<u;d++)f[d]=f[d].clone();return l}})})(),n})})(ro)),ro.exports}var oo={exports:{}},QE=oo.exports,_f;function XE(){return _f||(_f=1,(function(e,t){(function(n,r){e.exports=r(pe())})(QE,function(n){return(function(){if(typeof ArrayBuffer=="function"){var r=n,i=r.lib,o=i.WordArray,s=o.init,a=o.init=function(c){if(c instanceof ArrayBuffer&&(c=new Uint8Array(c)),(c instanceof Int8Array||typeof Uint8ClampedArray<"u"&&c instanceof Uint8ClampedArray||c instanceof Int16Array||c instanceof Uint16Array||c instanceof Int32Array||c instanceof Uint32Array||c instanceof Float32Array||c instanceof Float64Array)&&(c=new Uint8Array(c.buffer,c.byteOffset,c.byteLength)),c instanceof Uint8Array){for(var l=c.byteLength,f=[],u=0;u<l;u++)f[u>>>2]|=c[u]<<24-u%4*8;s.call(this,f,l)}else s.apply(this,arguments)};a.prototype=o}})(),n.lib.WordArray})})(oo)),oo.exports}var so={exports:{}},GE=so.exports,Bf;function YE(){return Bf||(Bf=1,(function(e,t){(function(n,r){e.exports=r(pe())})(GE,function(n){return(function(){var r=n,i=r.lib,o=i.WordArray,s=r.enc;s.Utf16=s.Utf16BE={stringify:function(c){for(var l=c.words,f=c.sigBytes,u=[],d=0;d<f;d+=2){var h=l[d>>>2]>>>16-d%4*8&65535;u.push(String.fromCharCode(h))}return u.join("")},parse:function(c){for(var l=c.length,f=[],u=0;u<l;u++)f[u>>>1]|=c.charCodeAt(u)<<16-u%2*16;return o.create(f,l*2)}},s.Utf16LE={stringify:function(c){for(var l=c.words,f=c.sigBytes,u=[],d=0;d<f;d+=2){var h=a(l[d>>>2]>>>16-d%4*8&65535);u.push(String.fromCharCode(h))}return u.join("")},parse:function(c){for(var l=c.length,f=[],u=0;u<l;u++)f[u>>>1]|=a(c.charCodeAt(u)<<16-u%2*16);return o.create(f,l*2)}};function a(c){return c<<8&4278255360|c>>>8&16711935}})(),n.enc.Utf16})})(so)),so.exports}var ao={exports:{}},ZE=ao.exports,Df;function Nn(){return Df||(Df=1,(function(e,t){(function(n,r){e.exports=r(pe())})(ZE,function(n){return(function(){var r=n,i=r.lib,o=i.WordArray,s=r.enc;s.Base64={stringify:function(c){var l=c.words,f=c.sigBytes,u=this._map;c.clamp();for(var d=[],h=0;h<f;h+=3)for(var p=l[h>>>2]>>>24-h%4*8&255,x=l[h+1>>>2]>>>24-(h+1)%4*8&255,m=l[h+2>>>2]>>>24-(h+2)%4*8&255,g=p<<16|x<<8|m,b=0;b<4&&h+b*.75<f;b++)d.push(u.charAt(g>>>6*(3-b)&63));var y=u.charAt(64);if(y)for(;d.length%4;)d.push(y);return d.join("")},parse:function(c){var l=c.length,f=this._map,u=this._reverseMap;if(!u){u=this._reverseMap=[];for(var d=0;d<f.length;d++)u[f.charCodeAt(d)]=d}var h=f.charAt(64);if(h){var p=c.indexOf(h);p!==-1&&(l=p)}return a(c,l,u)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function a(c,l,f){for(var u=[],d=0,h=0;h<l;h++)if(h%4){var p=f[c.charCodeAt(h-1)]<<h%4*2,x=f[c.charCodeAt(h)]>>>6-h%4*2,m=p|x;u[d>>>2]|=m<<24-d%4*8,d++}return o.create(u,d)}})(),n.enc.Base64})})(ao)),ao.exports}var lo={exports:{}},JE=lo.exports,Ff;function eC(){return Ff||(Ff=1,(function(e,t){(function(n,r){e.exports=r(pe())})(JE,function(n){return(function(){var r=n,i=r.lib,o=i.WordArray,s=r.enc;s.Base64url={stringify:function(c,l){l===void 0&&(l=!0);var f=c.words,u=c.sigBytes,d=l?this._safe_map:this._map;c.clamp();for(var h=[],p=0;p<u;p+=3)for(var x=f[p>>>2]>>>24-p%4*8&255,m=f[p+1>>>2]>>>24-(p+1)%4*8&255,g=f[p+2>>>2]>>>24-(p+2)%4*8&255,b=x<<16|m<<8|g,y=0;y<4&&p+y*.75<u;y++)h.push(d.charAt(b>>>6*(3-y)&63));var v=d.charAt(64);if(v)for(;h.length%4;)h.push(v);return h.join("")},parse:function(c,l){l===void 0&&(l=!0);var f=c.length,u=l?this._safe_map:this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var h=0;h<u.length;h++)d[u.charCodeAt(h)]=h}var p=u.charAt(64);if(p){var x=c.indexOf(p);x!==-1&&(f=x)}return a(c,f,d)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function a(c,l,f){for(var u=[],d=0,h=0;h<l;h++)if(h%4){var p=f[c.charCodeAt(h-1)]<<h%4*2,x=f[c.charCodeAt(h)]>>>6-h%4*2,m=p|x;u[d>>>2]|=m<<24-d%4*8,d++}return o.create(u,d)}})(),n.enc.Base64url})})(lo)),lo.exports}var co={exports:{}},tC=co.exports,Tf;function Ln(){return Tf||(Tf=1,(function(e,t){(function(n,r){e.exports=r(pe())})(tC,function(n){return(function(r){var i=n,o=i.lib,s=o.WordArray,a=o.Hasher,c=i.algo,l=[];(function(){for(var x=0;x<64;x++)l[x]=r.abs(r.sin(x+1))*4294967296|0})();var f=c.MD5=a.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(x,m){for(var g=0;g<16;g++){var b=m+g,y=x[b];x[b]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360}var v=this._hash.words,k=x[m+0],C=x[m+1],_=x[m+2],A=x[m+3],O=x[m+4],E=x[m+5],D=x[m+6],F=x[m+7],R=x[m+8],U=x[m+9],L=x[m+10],j=x[m+11],X=x[m+12],$=x[m+13],ne=x[m+14],S=x[m+15],M=v[0],q=v[1],w=v[2],I=v[3];M=u(M,q,w,I,k,7,l[0]),I=u(I,M,q,w,C,12,l[1]),w=u(w,I,M,q,_,17,l[2]),q=u(q,w,I,M,A,22,l[3]),M=u(M,q,w,I,O,7,l[4]),I=u(I,M,q,w,E,12,l[5]),w=u(w,I,M,q,D,17,l[6]),q=u(q,w,I,M,F,22,l[7]),M=u(M,q,w,I,R,7,l[8]),I=u(I,M,q,w,U,12,l[9]),w=u(w,I,M,q,L,17,l[10]),q=u(q,w,I,M,j,22,l[11]),M=u(M,q,w,I,X,7,l[12]),I=u(I,M,q,w,$,12,l[13]),w=u(w,I,M,q,ne,17,l[14]),q=u(q,w,I,M,S,22,l[15]),M=d(M,q,w,I,C,5,l[16]),I=d(I,M,q,w,D,9,l[17]),w=d(w,I,M,q,j,14,l[18]),q=d(q,w,I,M,k,20,l[19]),M=d(M,q,w,I,E,5,l[20]),I=d(I,M,q,w,L,9,l[21]),w=d(w,I,M,q,S,14,l[22]),q=d(q,w,I,M,O,20,l[23]),M=d(M,q,w,I,U,5,l[24]),I=d(I,M,q,w,ne,9,l[25]),w=d(w,I,M,q,A,14,l[26]),q=d(q,w,I,M,R,20,l[27]),M=d(M,q,w,I,$,5,l[28]),I=d(I,M,q,w,_,9,l[29]),w=d(w,I,M,q,F,14,l[30]),q=d(q,w,I,M,X,20,l[31]),M=h(M,q,w,I,E,4,l[32]),I=h(I,M,q,w,R,11,l[33]),w=h(w,I,M,q,j,16,l[34]),q=h(q,w,I,M,ne,23,l[35]),M=h(M,q,w,I,C,4,l[36]),I=h(I,M,q,w,O,11,l[37]),w=h(w,I,M,q,F,16,l[38]),q=h(q,w,I,M,L,23,l[39]),M=h(M,q,w,I,$,4,l[40]),I=h(I,M,q,w,k,11,l[41]),w=h(w,I,M,q,A,16,l[42]),q=h(q,w,I,M,D,23,l[43]),M=h(M,q,w,I,U,4,l[44]),I=h(I,M,q,w,X,11,l[45]),w=h(w,I,M,q,S,16,l[46]),q=h(q,w,I,M,_,23,l[47]),M=p(M,q,w,I,k,6,l[48]),I=p(I,M,q,w,F,10,l[49]),w=p(w,I,M,q,ne,15,l[50]),q=p(q,w,I,M,E,21,l[51]),M=p(M,q,w,I,X,6,l[52]),I=p(I,M,q,w,A,10,l[53]),w=p(w,I,M,q,L,15,l[54]),q=p(q,w,I,M,C,21,l[55]),M=p(M,q,w,I,R,6,l[56]),I=p(I,M,q,w,S,10,l[57]),w=p(w,I,M,q,D,15,l[58]),q=p(q,w,I,M,$,21,l[59]),M=p(M,q,w,I,O,6,l[60]),I=p(I,M,q,w,j,10,l[61]),w=p(w,I,M,q,_,15,l[62]),q=p(q,w,I,M,U,21,l[63]),v[0]=v[0]+M|0,v[1]=v[1]+q|0,v[2]=v[2]+w|0,v[3]=v[3]+I|0},_doFinalize:function(){var x=this._data,m=x.words,g=this._nDataBytes*8,b=x.sigBytes*8;m[b>>>5]|=128<<24-b%32;var y=r.floor(g/4294967296),v=g;m[(b+64>>>9<<4)+15]=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,m[(b+64>>>9<<4)+14]=(v<<8|v>>>24)&16711935|(v<<24|v>>>8)&4278255360,x.sigBytes=(m.length+1)*4,this._process();for(var k=this._hash,C=k.words,_=0;_<4;_++){var A=C[_];C[_]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}return k},clone:function(){var x=a.clone.call(this);return x._hash=this._hash.clone(),x}});function u(x,m,g,b,y,v,k){var C=x+(m&g|~m&b)+y+k;return(C<<v|C>>>32-v)+m}function d(x,m,g,b,y,v,k){var C=x+(m&b|g&~b)+y+k;return(C<<v|C>>>32-v)+m}function h(x,m,g,b,y,v,k){var C=x+(m^g^b)+y+k;return(C<<v|C>>>32-v)+m}function p(x,m,g,b,y,v,k){var C=x+(g^(m|~b))+y+k;return(C<<v|C>>>32-v)+m}i.MD5=a._createHelper(f),i.HmacMD5=a._createHmacHelper(f)})(Math),n.MD5})})(co)),co.exports}var uo={exports:{}},nC=uo.exports,Of;function Pf(){return Of||(Of=1,(function(e,t){(function(n,r){e.exports=r(pe())})(nC,function(n){return(function(){var r=n,i=r.lib,o=i.WordArray,s=i.Hasher,a=r.algo,c=[],l=a.SHA1=s.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(f,u){for(var d=this._hash.words,h=d[0],p=d[1],x=d[2],m=d[3],g=d[4],b=0;b<80;b++){if(b<16)c[b]=f[u+b]|0;else{var y=c[b-3]^c[b-8]^c[b-14]^c[b-16];c[b]=y<<1|y>>>31}var v=(h<<5|h>>>27)+g+c[b];b<20?v+=(p&x|~p&m)+1518500249:b<40?v+=(p^x^m)+1859775393:b<60?v+=(p&x|p&m|x&m)-1894007588:v+=(p^x^m)-899497514,g=m,m=x,x=p<<30|p>>>2,p=h,h=v}d[0]=d[0]+h|0,d[1]=d[1]+p|0,d[2]=d[2]+x|0,d[3]=d[3]+m|0,d[4]=d[4]+g|0},_doFinalize:function(){var f=this._data,u=f.words,d=this._nDataBytes*8,h=f.sigBytes*8;return u[h>>>5]|=128<<24-h%32,u[(h+64>>>9<<4)+14]=Math.floor(d/4294967296),u[(h+64>>>9<<4)+15]=d,f.sigBytes=u.length*4,this._process(),this._hash},clone:function(){var f=s.clone.call(this);return f._hash=this._hash.clone(),f}});r.SHA1=s._createHelper(l),r.HmacSHA1=s._createHmacHelper(l)})(),n.SHA1})})(uo)),uo.exports}var fo={exports:{}},rC=fo.exports,Rf;function Na(){return Rf||(Rf=1,(function(e,t){(function(n,r){e.exports=r(pe())})(rC,function(n){return(function(r){var i=n,o=i.lib,s=o.WordArray,a=o.Hasher,c=i.algo,l=[],f=[];(function(){function h(g){for(var b=r.sqrt(g),y=2;y<=b;y++)if(!(g%y))return!1;return!0}function p(g){return(g-(g|0))*4294967296|0}for(var x=2,m=0;m<64;)h(x)&&(m<8&&(l[m]=p(r.pow(x,1/2))),f[m]=p(r.pow(x,1/3)),m++),x++})();var u=[],d=c.SHA256=a.extend({_doReset:function(){this._hash=new s.init(l.slice(0))},_doProcessBlock:function(h,p){for(var x=this._hash.words,m=x[0],g=x[1],b=x[2],y=x[3],v=x[4],k=x[5],C=x[6],_=x[7],A=0;A<64;A++){if(A<16)u[A]=h[p+A]|0;else{var O=u[A-15],E=(O<<25|O>>>7)^(O<<14|O>>>18)^O>>>3,D=u[A-2],F=(D<<15|D>>>17)^(D<<13|D>>>19)^D>>>10;u[A]=E+u[A-7]+F+u[A-16]}var R=v&k^~v&C,U=m&g^m&b^g&b,L=(m<<30|m>>>2)^(m<<19|m>>>13)^(m<<10|m>>>22),j=(v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25),X=_+j+R+f[A]+u[A],$=L+U;_=C,C=k,k=v,v=y+X|0,y=b,b=g,g=m,m=X+$|0}x[0]=x[0]+m|0,x[1]=x[1]+g|0,x[2]=x[2]+b|0,x[3]=x[3]+y|0,x[4]=x[4]+v|0,x[5]=x[5]+k|0,x[6]=x[6]+C|0,x[7]=x[7]+_|0},_doFinalize:function(){var h=this._data,p=h.words,x=this._nDataBytes*8,m=h.sigBytes*8;return p[m>>>5]|=128<<24-m%32,p[(m+64>>>9<<4)+14]=r.floor(x/4294967296),p[(m+64>>>9<<4)+15]=x,h.sigBytes=p.length*4,this._process(),this._hash},clone:function(){var h=a.clone.call(this);return h._hash=this._hash.clone(),h}});i.SHA256=a._createHelper(d),i.HmacSHA256=a._createHmacHelper(d)})(Math),n.SHA256})})(fo)),fo.exports}var ho={exports:{}},iC=ho.exports,If;function oC(){return If||(If=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Na())})(iC,function(n){return(function(){var r=n,i=r.lib,o=i.WordArray,s=r.algo,a=s.SHA256,c=s.SHA224=a.extend({_doReset:function(){this._hash=new o.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var l=a._doFinalize.call(this);return l.sigBytes-=4,l}});r.SHA224=a._createHelper(c),r.HmacSHA224=a._createHmacHelper(c)})(),n.SHA224})})(ho)),ho.exports}var po={exports:{}},sC=po.exports,Nf;function Lf(){return Nf||(Nf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),io())})(sC,function(n){return(function(){var r=n,i=r.lib,o=i.Hasher,s=r.x64,a=s.Word,c=s.WordArray,l=r.algo;function f(){return a.create.apply(a,arguments)}var u=[f(1116352408,3609767458),f(1899447441,602891725),f(3049323471,3964484399),f(3921009573,2173295548),f(961987163,4081628472),f(1508970993,3053834265),f(2453635748,2937671579),f(2870763221,3664609560),f(3624381080,2734883394),f(310598401,1164996542),f(607225278,1323610764),f(1426881987,3590304994),f(1925078388,4068182383),f(2162078206,991336113),f(2614888103,633803317),f(3248222580,3479774868),f(3835390401,2666613458),f(4022224774,944711139),f(264347078,2341262773),f(604807628,2007800933),f(770255983,1495990901),f(1249150122,1856431235),f(1555081692,3175218132),f(1996064986,2198950837),f(2554220882,3999719339),f(2821834349,766784016),f(2952996808,2566594879),f(3210313671,3203337956),f(3336571891,1034457026),f(3584528711,2466948901),f(113926993,3758326383),f(338241895,168717936),f(666307205,1188179964),f(773529912,1546045734),f(1294757372,1522805485),f(1396182291,2643833823),f(1695183700,2343527390),f(1986661051,1014477480),f(2177026350,1206759142),f(2456956037,344077627),f(2730485921,1290863460),f(2820302411,3158454273),f(3259730800,3505952657),f(3345764771,106217008),f(3516065817,3606008344),f(3600352804,1432725776),f(4094571909,1467031594),f(275423344,851169720),f(430227734,3100823752),f(506948616,1363258195),f(659060556,3750685593),f(883997877,3785050280),f(958139571,3318307427),f(1322822218,3812723403),f(1537002063,2003034995),f(1747873779,3602036899),f(1955562222,1575990012),f(2024104815,1125592928),f(2227730452,2716904306),f(2361852424,442776044),f(2428436474,593698344),f(2756734187,3733110249),f(3204031479,2999351573),f(3329325298,3815920427),f(3391569614,3928383900),f(3515267271,566280711),f(3940187606,3454069534),f(4118630271,4000239992),f(116418474,1914138554),f(174292421,2731055270),f(289380356,3203993006),f(460393269,320620315),f(685471733,587496836),f(852142971,1086792851),f(1017036298,365543100),f(1126000580,2618297676),f(1288033470,3409855158),f(1501505948,4234509866),f(1607167915,987167468),f(1816402316,1246189591)],d=[];(function(){for(var p=0;p<80;p++)d[p]=f()})();var h=l.SHA512=o.extend({_doReset:function(){this._hash=new c.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(p,x){for(var m=this._hash.words,g=m[0],b=m[1],y=m[2],v=m[3],k=m[4],C=m[5],_=m[6],A=m[7],O=g.high,E=g.low,D=b.high,F=b.low,R=y.high,U=y.low,L=v.high,j=v.low,X=k.high,$=k.low,ne=C.high,S=C.low,M=_.high,q=_.low,w=A.high,I=A.low,Z=O,J=E,oe=D,Q=F,Ce=R,ke=U,$e=L,Le=j,nt=X,Me=$,nn=ne,Ft=S,mt=M,jt=q,Ge=w,$t=I,rt=0;rt<80;rt++){var be,We,En=d[rt];if(rt<16)We=En.high=p[x+rt*2]|0,be=En.low=p[x+rt*2+1]|0;else{var Ar=d[rt-15],H=Ar.high,V=Ar.low,ie=(H>>>1|V<<31)^(H>>>8|V<<24)^H>>>7,ae=(V>>>1|H<<31)^(V>>>8|H<<24)^(V>>>7|H<<25),he=d[rt-2],Be=he.high,Te=he.low,gt=(Be>>>19|Te<<13)^(Be<<3|Te>>>29)^Be>>>6,Wt=(Te>>>19|Be<<13)^(Te<<3|Be>>>29)^(Te>>>6|Be<<26),Tt=d[rt-7],qe=Tt.high,Vt=Tt.low,Ye=d[rt-16],Kt=Ye.high,Go=Ye.low;be=ae+Vt,We=ie+qe+(be>>>0<ae>>>0?1:0),be=be+Wt,We=We+gt+(be>>>0<Wt>>>0?1:0),be=be+Go,We=We+Kt+(be>>>0<Go>>>0?1:0),En.high=We,En.low=be}var tl=nt&nn^~nt&mt,oi=Me&Ft^~Me&jt,Yo=Z&oe^Z&Ce^oe&Ce,se=J&Q^J&ke^Q&ke,Oe=(Z>>>28|J<<4)^(Z<<30|J>>>2)^(Z<<25|J>>>7),ze=(J>>>28|Z<<4)^(J<<30|Z>>>2)^(J<<25|Z>>>7),it=(nt>>>14|Me<<18)^(nt>>>18|Me<<14)^(nt<<23|Me>>>9),Sr=(Me>>>14|nt<<18)^(Me>>>18|nt<<14)^(Me<<23|nt>>>9),Pe=u[rt],ht=Pe.high,Qn=Pe.low,Ee=$t+Sr,Re=Ge+it+(Ee>>>0<$t>>>0?1:0),Ee=Ee+oi,Re=Re+tl+(Ee>>>0<oi>>>0?1:0),Ee=Ee+Qn,Re=Re+ht+(Ee>>>0<Qn>>>0?1:0),Ee=Ee+be,Re=Re+We+(Ee>>>0<be>>>0?1:0),si=ze+se,rn=Oe+Yo+(si>>>0<ze>>>0?1:0);Ge=mt,$t=jt,mt=nn,jt=Ft,nn=nt,Ft=Me,Me=Le+Ee|0,nt=$e+Re+(Me>>>0<Le>>>0?1:0)|0,$e=Ce,Le=ke,Ce=oe,ke=Q,oe=Z,Q=J,J=Ee+si|0,Z=Re+rn+(J>>>0<Ee>>>0?1:0)|0}E=g.low=E+J,g.high=O+Z+(E>>>0<J>>>0?1:0),F=b.low=F+Q,b.high=D+oe+(F>>>0<Q>>>0?1:0),U=y.low=U+ke,y.high=R+Ce+(U>>>0<ke>>>0?1:0),j=v.low=j+Le,v.high=L+$e+(j>>>0<Le>>>0?1:0),$=k.low=$+Me,k.high=X+nt+($>>>0<Me>>>0?1:0),S=C.low=S+Ft,C.high=ne+nn+(S>>>0<Ft>>>0?1:0),q=_.low=q+jt,_.high=M+mt+(q>>>0<jt>>>0?1:0),I=A.low=I+$t,A.high=w+Ge+(I>>>0<$t>>>0?1:0)},_doFinalize:function(){var p=this._data,x=p.words,m=this._nDataBytes*8,g=p.sigBytes*8;x[g>>>5]|=128<<24-g%32,x[(g+128>>>10<<5)+30]=Math.floor(m/4294967296),x[(g+128>>>10<<5)+31]=m,p.sigBytes=x.length*4,this._process();var b=this._hash.toX32();return b},clone:function(){var p=o.clone.call(this);return p._hash=this._hash.clone(),p},blockSize:1024/32});r.SHA512=o._createHelper(h),r.HmacSHA512=o._createHmacHelper(h)})(),n.SHA512})})(po)),po.exports}var xo={exports:{}},aC=xo.exports,Mf;function lC(){return Mf||(Mf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),io(),Lf())})(aC,function(n){return(function(){var r=n,i=r.x64,o=i.Word,s=i.WordArray,a=r.algo,c=a.SHA512,l=a.SHA384=c.extend({_doReset:function(){this._hash=new s.init([new o.init(3418070365,3238371032),new o.init(1654270250,914150663),new o.init(2438529370,812702999),new o.init(355462360,4144912697),new o.init(1731405415,4290775857),new o.init(2394180231,1750603025),new o.init(3675008525,1694076839),new o.init(1203062813,3204075428)])},_doFinalize:function(){var f=c._doFinalize.call(this);return f.sigBytes-=16,f}});r.SHA384=c._createHelper(l),r.HmacSHA384=c._createHmacHelper(l)})(),n.SHA384})})(xo)),xo.exports}var mo={exports:{}},cC=mo.exports,zf;function uC(){return zf||(zf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),io())})(cC,function(n){return(function(r){var i=n,o=i.lib,s=o.WordArray,a=o.Hasher,c=i.x64,l=c.Word,f=i.algo,u=[],d=[],h=[];(function(){for(var m=1,g=0,b=0;b<24;b++){u[m+5*g]=(b+1)*(b+2)/2%64;var y=g%5,v=(2*m+3*g)%5;m=y,g=v}for(var m=0;m<5;m++)for(var g=0;g<5;g++)d[m+5*g]=g+(2*m+3*g)%5*5;for(var k=1,C=0;C<24;C++){for(var _=0,A=0,O=0;O<7;O++){if(k&1){var E=(1<<O)-1;E<32?A^=1<<E:_^=1<<E-32}k&128?k=k<<1^113:k<<=1}h[C]=l.create(_,A)}})();var p=[];(function(){for(var m=0;m<25;m++)p[m]=l.create()})();var x=f.SHA3=a.extend({cfg:a.cfg.extend({outputLength:512}),_doReset:function(){for(var m=this._state=[],g=0;g<25;g++)m[g]=new l.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(m,g){for(var b=this._state,y=this.blockSize/2,v=0;v<y;v++){var k=m[g+2*v],C=m[g+2*v+1];k=(k<<8|k>>>24)&16711935|(k<<24|k>>>8)&4278255360,C=(C<<8|C>>>24)&16711935|(C<<24|C>>>8)&4278255360;var _=b[v];_.high^=C,_.low^=k}for(var A=0;A<24;A++){for(var O=0;O<5;O++){for(var E=0,D=0,F=0;F<5;F++){var _=b[O+5*F];E^=_.high,D^=_.low}var R=p[O];R.high=E,R.low=D}for(var O=0;O<5;O++)for(var U=p[(O+4)%5],L=p[(O+1)%5],j=L.high,X=L.low,E=U.high^(j<<1|X>>>31),D=U.low^(X<<1|j>>>31),F=0;F<5;F++){var _=b[O+5*F];_.high^=E,_.low^=D}for(var $=1;$<25;$++){var E,D,_=b[$],ne=_.high,S=_.low,M=u[$];M<32?(E=ne<<M|S>>>32-M,D=S<<M|ne>>>32-M):(E=S<<M-32|ne>>>64-M,D=ne<<M-32|S>>>64-M);var q=p[d[$]];q.high=E,q.low=D}var w=p[0],I=b[0];w.high=I.high,w.low=I.low;for(var O=0;O<5;O++)for(var F=0;F<5;F++){var $=O+5*F,_=b[$],Z=p[$],J=p[(O+1)%5+5*F],oe=p[(O+2)%5+5*F];_.high=Z.high^~J.high&oe.high,_.low=Z.low^~J.low&oe.low}var _=b[0],Q=h[A];_.high^=Q.high,_.low^=Q.low}},_doFinalize:function(){var m=this._data,g=m.words;this._nDataBytes*8;var b=m.sigBytes*8,y=this.blockSize*32;g[b>>>5]|=1<<24-b%32,g[(r.ceil((b+1)/y)*y>>>5)-1]|=128,m.sigBytes=g.length*4,this._process();for(var v=this._state,k=this.cfg.outputLength/8,C=k/8,_=[],A=0;A<C;A++){var O=v[A],E=O.high,D=O.low;E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360,D=(D<<8|D>>>24)&16711935|(D<<24|D>>>8)&4278255360,_.push(D),_.push(E)}return new s.init(_,k)},clone:function(){for(var m=a.clone.call(this),g=m._state=this._state.slice(0),b=0;b<25;b++)g[b]=g[b].clone();return m}});i.SHA3=a._createHelper(x),i.HmacSHA3=a._createHmacHelper(x)})(Math),n.SHA3})})(mo)),mo.exports}var go={exports:{}},fC=go.exports,Uf;function dC(){return Uf||(Uf=1,(function(e,t){(function(n,r){e.exports=r(pe())})(fC,function(n){/** @preserve
189
+ (c) 2012 by Cédric Mesnil. All rights reserved.
190
+
191
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
192
+
193
+ - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
194
+ - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
195
+
196
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
197
+ */return(function(r){var i=n,o=i.lib,s=o.WordArray,a=o.Hasher,c=i.algo,l=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),f=s.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),u=s.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),d=s.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),h=s.create([0,1518500249,1859775393,2400959708,2840853838]),p=s.create([1352829926,1548603684,1836072691,2053994217,0]),x=c.RIPEMD160=a.extend({_doReset:function(){this._hash=s.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(C,_){for(var A=0;A<16;A++){var O=_+A,E=C[O];C[O]=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360}var D=this._hash.words,F=h.words,R=p.words,U=l.words,L=f.words,j=u.words,X=d.words,$,ne,S,M,q,w,I,Z,J,oe;w=$=D[0],I=ne=D[1],Z=S=D[2],J=M=D[3],oe=q=D[4];for(var Q,A=0;A<80;A+=1)Q=$+C[_+U[A]]|0,A<16?Q+=m(ne,S,M)+F[0]:A<32?Q+=g(ne,S,M)+F[1]:A<48?Q+=b(ne,S,M)+F[2]:A<64?Q+=y(ne,S,M)+F[3]:Q+=v(ne,S,M)+F[4],Q=Q|0,Q=k(Q,j[A]),Q=Q+q|0,$=q,q=M,M=k(S,10),S=ne,ne=Q,Q=w+C[_+L[A]]|0,A<16?Q+=v(I,Z,J)+R[0]:A<32?Q+=y(I,Z,J)+R[1]:A<48?Q+=b(I,Z,J)+R[2]:A<64?Q+=g(I,Z,J)+R[3]:Q+=m(I,Z,J)+R[4],Q=Q|0,Q=k(Q,X[A]),Q=Q+oe|0,w=oe,oe=J,J=k(Z,10),Z=I,I=Q;Q=D[1]+S+J|0,D[1]=D[2]+M+oe|0,D[2]=D[3]+q+w|0,D[3]=D[4]+$+I|0,D[4]=D[0]+ne+Z|0,D[0]=Q},_doFinalize:function(){var C=this._data,_=C.words,A=this._nDataBytes*8,O=C.sigBytes*8;_[O>>>5]|=128<<24-O%32,_[(O+64>>>9<<4)+14]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,C.sigBytes=(_.length+1)*4,this._process();for(var E=this._hash,D=E.words,F=0;F<5;F++){var R=D[F];D[F]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}return E},clone:function(){var C=a.clone.call(this);return C._hash=this._hash.clone(),C}});function m(C,_,A){return C^_^A}function g(C,_,A){return C&_|~C&A}function b(C,_,A){return(C|~_)^A}function y(C,_,A){return C&A|_&~A}function v(C,_,A){return C^(_|~A)}function k(C,_){return C<<_|C>>>32-_}i.RIPEMD160=a._createHelper(x),i.HmacRIPEMD160=a._createHmacHelper(x)})(),n.RIPEMD160})})(go)),go.exports}var yo={exports:{}},hC=yo.exports,Hf;function La(){return Hf||(Hf=1,(function(e,t){(function(n,r){e.exports=r(pe())})(hC,function(n){(function(){var r=n,i=r.lib,o=i.Base,s=r.enc,a=s.Utf8,c=r.algo;c.HMAC=o.extend({init:function(l,f){l=this._hasher=new l.init,typeof f=="string"&&(f=a.parse(f));var u=l.blockSize,d=u*4;f.sigBytes>d&&(f=l.finalize(f)),f.clamp();for(var h=this._oKey=f.clone(),p=this._iKey=f.clone(),x=h.words,m=p.words,g=0;g<u;g++)x[g]^=1549556828,m[g]^=909522486;h.sigBytes=p.sigBytes=d,this.reset()},reset:function(){var l=this._hasher;l.reset(),l.update(this._iKey)},update:function(l){return this._hasher.update(l),this},finalize:function(l){var f=this._hasher,u=f.finalize(l);f.reset();var d=f.finalize(this._oKey.clone().concat(u));return d}})})()})})(yo)),yo.exports}var bo={exports:{}},pC=bo.exports,qf;function xC(){return qf||(qf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Na(),La())})(pC,function(n){return(function(){var r=n,i=r.lib,o=i.Base,s=i.WordArray,a=r.algo,c=a.SHA256,l=a.HMAC,f=a.PBKDF2=o.extend({cfg:o.extend({keySize:128/32,hasher:c,iterations:25e4}),init:function(u){this.cfg=this.cfg.extend(u)},compute:function(u,d){for(var h=this.cfg,p=l.create(h.hasher,u),x=s.create(),m=s.create([1]),g=x.words,b=m.words,y=h.keySize,v=h.iterations;g.length<y;){var k=p.update(d).finalize(m);p.reset();for(var C=k.words,_=C.length,A=k,O=1;O<v;O++){A=p.finalize(A),p.reset();for(var E=A.words,D=0;D<_;D++)C[D]^=E[D]}x.concat(k),b[0]++}return x.sigBytes=y*4,x}});r.PBKDF2=function(u,d,h){return f.create(h).compute(u,d)}})(),n.PBKDF2})})(bo)),bo.exports}var vo={exports:{}},mC=vo.exports,jf;function dn(){return jf||(jf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Pf(),La())})(mC,function(n){return(function(){var r=n,i=r.lib,o=i.Base,s=i.WordArray,a=r.algo,c=a.MD5,l=a.EvpKDF=o.extend({cfg:o.extend({keySize:128/32,hasher:c,iterations:1}),init:function(f){this.cfg=this.cfg.extend(f)},compute:function(f,u){for(var d,h=this.cfg,p=h.hasher.create(),x=s.create(),m=x.words,g=h.keySize,b=h.iterations;m.length<g;){d&&p.update(d),d=p.update(f).finalize(u),p.reset();for(var y=1;y<b;y++)d=p.finalize(d),p.reset();x.concat(d)}return x.sigBytes=g*4,x}});r.EvpKDF=function(f,u,d){return l.create(d).compute(f,u)}})(),n.EvpKDF})})(vo)),vo.exports}var wo={exports:{}},gC=wo.exports,$f;function Ue(){return $f||($f=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),dn())})(gC,function(n){n.lib.Cipher||(function(r){var i=n,o=i.lib,s=o.Base,a=o.WordArray,c=o.BufferedBlockAlgorithm,l=i.enc;l.Utf8;var f=l.Base64,u=i.algo,d=u.EvpKDF,h=o.Cipher=c.extend({cfg:s.extend(),createEncryptor:function(E,D){return this.create(this._ENC_XFORM_MODE,E,D)},createDecryptor:function(E,D){return this.create(this._DEC_XFORM_MODE,E,D)},init:function(E,D,F){this.cfg=this.cfg.extend(F),this._xformMode=E,this._key=D,this.reset()},reset:function(){c.reset.call(this),this._doReset()},process:function(E){return this._append(E),this._process()},finalize:function(E){E&&this._append(E);var D=this._doFinalize();return D},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:(function(){function E(D){return typeof D=="string"?O:C}return function(D){return{encrypt:function(F,R,U){return E(R).encrypt(D,F,R,U)},decrypt:function(F,R,U){return E(R).decrypt(D,F,R,U)}}}})()});o.StreamCipher=h.extend({_doFinalize:function(){var E=this._process(!0);return E},blockSize:1});var p=i.mode={},x=o.BlockCipherMode=s.extend({createEncryptor:function(E,D){return this.Encryptor.create(E,D)},createDecryptor:function(E,D){return this.Decryptor.create(E,D)},init:function(E,D){this._cipher=E,this._iv=D}}),m=p.CBC=(function(){var E=x.extend();E.Encryptor=E.extend({processBlock:function(F,R){var U=this._cipher,L=U.blockSize;D.call(this,F,R,L),U.encryptBlock(F,R),this._prevBlock=F.slice(R,R+L)}}),E.Decryptor=E.extend({processBlock:function(F,R){var U=this._cipher,L=U.blockSize,j=F.slice(R,R+L);U.decryptBlock(F,R),D.call(this,F,R,L),this._prevBlock=j}});function D(F,R,U){var L,j=this._iv;j?(L=j,this._iv=r):L=this._prevBlock;for(var X=0;X<U;X++)F[R+X]^=L[X]}return E})(),g=i.pad={},b=g.Pkcs7={pad:function(E,D){for(var F=D*4,R=F-E.sigBytes%F,U=R<<24|R<<16|R<<8|R,L=[],j=0;j<R;j+=4)L.push(U);var X=a.create(L,R);E.concat(X)},unpad:function(E){var D=E.words[E.sigBytes-1>>>2]&255;E.sigBytes-=D}};o.BlockCipher=h.extend({cfg:h.cfg.extend({mode:m,padding:b}),reset:function(){var E;h.reset.call(this);var D=this.cfg,F=D.iv,R=D.mode;this._xformMode==this._ENC_XFORM_MODE?E=R.createEncryptor:(E=R.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==E?this._mode.init(this,F&&F.words):(this._mode=E.call(R,this,F&&F.words),this._mode.__creator=E)},_doProcessBlock:function(E,D){this._mode.processBlock(E,D)},_doFinalize:function(){var E,D=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(D.pad(this._data,this.blockSize),E=this._process(!0)):(E=this._process(!0),D.unpad(E)),E},blockSize:128/32});var y=o.CipherParams=s.extend({init:function(E){this.mixIn(E)},toString:function(E){return(E||this.formatter).stringify(this)}}),v=i.format={},k=v.OpenSSL={stringify:function(E){var D,F=E.ciphertext,R=E.salt;return R?D=a.create([1398893684,1701076831]).concat(R).concat(F):D=F,D.toString(f)},parse:function(E){var D,F=f.parse(E),R=F.words;return R[0]==1398893684&&R[1]==1701076831&&(D=a.create(R.slice(2,4)),R.splice(0,4),F.sigBytes-=16),y.create({ciphertext:F,salt:D})}},C=o.SerializableCipher=s.extend({cfg:s.extend({format:k}),encrypt:function(E,D,F,R){R=this.cfg.extend(R);var U=E.createEncryptor(F,R),L=U.finalize(D),j=U.cfg;return y.create({ciphertext:L,key:F,iv:j.iv,algorithm:E,mode:j.mode,padding:j.padding,blockSize:E.blockSize,formatter:R.format})},decrypt:function(E,D,F,R){R=this.cfg.extend(R),D=this._parse(D,R.format);var U=E.createDecryptor(F,R).finalize(D.ciphertext);return U},_parse:function(E,D){return typeof E=="string"?D.parse(E,this):E}}),_=i.kdf={},A=_.OpenSSL={execute:function(E,D,F,R,U){if(R||(R=a.random(64/8)),U)var L=d.create({keySize:D+F,hasher:U}).compute(E,R);else var L=d.create({keySize:D+F}).compute(E,R);var j=a.create(L.words.slice(D),F*4);return L.sigBytes=D*4,y.create({key:L,iv:j,salt:R})}},O=o.PasswordBasedCipher=C.extend({cfg:C.cfg.extend({kdf:A}),encrypt:function(E,D,F,R){R=this.cfg.extend(R);var U=R.kdf.execute(F,E.keySize,E.ivSize,R.salt,R.hasher);R.iv=U.iv;var L=C.encrypt.call(this,E,D,U.key,R);return L.mixIn(U),L},decrypt:function(E,D,F,R){R=this.cfg.extend(R),D=this._parse(D,R.format);var U=R.kdf.execute(F,E.keySize,E.ivSize,D.salt,R.hasher);R.iv=U.iv;var L=C.decrypt.call(this,E,D,U.key,R);return L}})})()})})(wo)),wo.exports}var Eo={exports:{}},yC=Eo.exports,Wf;function bC(){return Wf||(Wf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Ue())})(yC,function(n){return n.mode.CFB=(function(){var r=n.lib.BlockCipherMode.extend();r.Encryptor=r.extend({processBlock:function(o,s){var a=this._cipher,c=a.blockSize;i.call(this,o,s,c,a),this._prevBlock=o.slice(s,s+c)}}),r.Decryptor=r.extend({processBlock:function(o,s){var a=this._cipher,c=a.blockSize,l=o.slice(s,s+c);i.call(this,o,s,c,a),this._prevBlock=l}});function i(o,s,a,c){var l,f=this._iv;f?(l=f.slice(0),this._iv=void 0):l=this._prevBlock,c.encryptBlock(l,0);for(var u=0;u<a;u++)o[s+u]^=l[u]}return r})(),n.mode.CFB})})(Eo)),Eo.exports}var Co={exports:{}},vC=Co.exports,Vf;function wC(){return Vf||(Vf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Ue())})(vC,function(n){return n.mode.CTR=(function(){var r=n.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(o,s){var a=this._cipher,c=a.blockSize,l=this._iv,f=this._counter;l&&(f=this._counter=l.slice(0),this._iv=void 0);var u=f.slice(0);a.encryptBlock(u,0),f[c-1]=f[c-1]+1|0;for(var d=0;d<c;d++)o[s+d]^=u[d]}});return r.Decryptor=i,r})(),n.mode.CTR})})(Co)),Co.exports}var ko={exports:{}},EC=ko.exports,Kf;function CC(){return Kf||(Kf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Ue())})(EC,function(n){/** @preserve
198
+ * Counter block mode compatible with Dr Brian Gladman fileenc.c
199
+ * derived from CryptoJS.mode.CTR
200
+ * Jan Hruby jhruby.web@gmail.com
201
+ */return n.mode.CTRGladman=(function(){var r=n.lib.BlockCipherMode.extend();function i(a){if((a>>24&255)===255){var c=a>>16&255,l=a>>8&255,f=a&255;c===255?(c=0,l===255?(l=0,f===255?f=0:++f):++l):++c,a=0,a+=c<<16,a+=l<<8,a+=f}else a+=1<<24;return a}function o(a){return(a[0]=i(a[0]))===0&&(a[1]=i(a[1])),a}var s=r.Encryptor=r.extend({processBlock:function(a,c){var l=this._cipher,f=l.blockSize,u=this._iv,d=this._counter;u&&(d=this._counter=u.slice(0),this._iv=void 0),o(d);var h=d.slice(0);l.encryptBlock(h,0);for(var p=0;p<f;p++)a[c+p]^=h[p]}});return r.Decryptor=s,r})(),n.mode.CTRGladman})})(ko)),ko.exports}var Ao={exports:{}},kC=Ao.exports,Qf;function AC(){return Qf||(Qf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Ue())})(kC,function(n){return n.mode.OFB=(function(){var r=n.lib.BlockCipherMode.extend(),i=r.Encryptor=r.extend({processBlock:function(o,s){var a=this._cipher,c=a.blockSize,l=this._iv,f=this._keystream;l&&(f=this._keystream=l.slice(0),this._iv=void 0),a.encryptBlock(f,0);for(var u=0;u<c;u++)o[s+u]^=f[u]}});return r.Decryptor=i,r})(),n.mode.OFB})})(Ao)),Ao.exports}var So={exports:{}},SC=So.exports,Xf;function _C(){return Xf||(Xf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Ue())})(SC,function(n){return n.mode.ECB=(function(){var r=n.lib.BlockCipherMode.extend();return r.Encryptor=r.extend({processBlock:function(i,o){this._cipher.encryptBlock(i,o)}}),r.Decryptor=r.extend({processBlock:function(i,o){this._cipher.decryptBlock(i,o)}}),r})(),n.mode.ECB})})(So)),So.exports}var _o={exports:{}},BC=_o.exports,Gf;function DC(){return Gf||(Gf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Ue())})(BC,function(n){return n.pad.AnsiX923={pad:function(r,i){var o=r.sigBytes,s=i*4,a=s-o%s,c=o+a-1;r.clamp(),r.words[c>>>2]|=a<<24-c%4*8,r.sigBytes+=a},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Ansix923})})(_o)),_o.exports}var Bo={exports:{}},FC=Bo.exports,Yf;function TC(){return Yf||(Yf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Ue())})(FC,function(n){return n.pad.Iso10126={pad:function(r,i){var o=i*4,s=o-r.sigBytes%o;r.concat(n.lib.WordArray.random(s-1)).concat(n.lib.WordArray.create([s<<24],1))},unpad:function(r){var i=r.words[r.sigBytes-1>>>2]&255;r.sigBytes-=i}},n.pad.Iso10126})})(Bo)),Bo.exports}var Do={exports:{}},OC=Do.exports,Zf;function PC(){return Zf||(Zf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Ue())})(OC,function(n){return n.pad.Iso97971={pad:function(r,i){r.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(r,i)},unpad:function(r){n.pad.ZeroPadding.unpad(r),r.sigBytes--}},n.pad.Iso97971})})(Do)),Do.exports}var Fo={exports:{}},RC=Fo.exports,Jf;function IC(){return Jf||(Jf=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Ue())})(RC,function(n){return n.pad.ZeroPadding={pad:function(r,i){var o=i*4;r.clamp(),r.sigBytes+=o-(r.sigBytes%o||o)},unpad:function(r){for(var i=r.words,o=r.sigBytes-1,o=r.sigBytes-1;o>=0;o--)if(i[o>>>2]>>>24-o%4*8&255){r.sigBytes=o+1;break}}},n.pad.ZeroPadding})})(Fo)),Fo.exports}var To={exports:{}},NC=To.exports,ed;function LC(){return ed||(ed=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Ue())})(NC,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})})(To)),To.exports}var Oo={exports:{}},MC=Oo.exports,td;function zC(){return td||(td=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Ue())})(MC,function(n){return(function(r){var i=n,o=i.lib,s=o.CipherParams,a=i.enc,c=a.Hex,l=i.format;l.Hex={stringify:function(f){return f.ciphertext.toString(c)},parse:function(f){var u=c.parse(f);return s.create({ciphertext:u})}}})(),n.format.Hex})})(Oo)),Oo.exports}var Po={exports:{}},UC=Po.exports,nd;function HC(){return nd||(nd=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Nn(),Ln(),dn(),Ue())})(UC,function(n){return(function(){var r=n,i=r.lib,o=i.BlockCipher,s=r.algo,a=[],c=[],l=[],f=[],u=[],d=[],h=[],p=[],x=[],m=[];(function(){for(var y=[],v=0;v<256;v++)v<128?y[v]=v<<1:y[v]=v<<1^283;for(var k=0,C=0,v=0;v<256;v++){var _=C^C<<1^C<<2^C<<3^C<<4;_=_>>>8^_&255^99,a[k]=_,c[_]=k;var A=y[k],O=y[A],E=y[O],D=y[_]*257^_*16843008;l[k]=D<<24|D>>>8,f[k]=D<<16|D>>>16,u[k]=D<<8|D>>>24,d[k]=D;var D=E*16843009^O*65537^A*257^k*16843008;h[_]=D<<24|D>>>8,p[_]=D<<16|D>>>16,x[_]=D<<8|D>>>24,m[_]=D,k?(k=A^y[y[y[E^A]]],C^=y[y[C]]):k=C=1}})();var g=[0,1,2,4,8,16,32,64,128,27,54],b=s.AES=o.extend({_doReset:function(){var y;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var v=this._keyPriorReset=this._key,k=v.words,C=v.sigBytes/4,_=this._nRounds=C+6,A=(_+1)*4,O=this._keySchedule=[],E=0;E<A;E++)E<C?O[E]=k[E]:(y=O[E-1],E%C?C>6&&E%C==4&&(y=a[y>>>24]<<24|a[y>>>16&255]<<16|a[y>>>8&255]<<8|a[y&255]):(y=y<<8|y>>>24,y=a[y>>>24]<<24|a[y>>>16&255]<<16|a[y>>>8&255]<<8|a[y&255],y^=g[E/C|0]<<24),O[E]=O[E-C]^y);for(var D=this._invKeySchedule=[],F=0;F<A;F++){var E=A-F;if(F%4)var y=O[E];else var y=O[E-4];F<4||E<=4?D[F]=y:D[F]=h[a[y>>>24]]^p[a[y>>>16&255]]^x[a[y>>>8&255]]^m[a[y&255]]}}},encryptBlock:function(y,v){this._doCryptBlock(y,v,this._keySchedule,l,f,u,d,a)},decryptBlock:function(y,v){var k=y[v+1];y[v+1]=y[v+3],y[v+3]=k,this._doCryptBlock(y,v,this._invKeySchedule,h,p,x,m,c);var k=y[v+1];y[v+1]=y[v+3],y[v+3]=k},_doCryptBlock:function(y,v,k,C,_,A,O,E){for(var D=this._nRounds,F=y[v]^k[0],R=y[v+1]^k[1],U=y[v+2]^k[2],L=y[v+3]^k[3],j=4,X=1;X<D;X++){var $=C[F>>>24]^_[R>>>16&255]^A[U>>>8&255]^O[L&255]^k[j++],ne=C[R>>>24]^_[U>>>16&255]^A[L>>>8&255]^O[F&255]^k[j++],S=C[U>>>24]^_[L>>>16&255]^A[F>>>8&255]^O[R&255]^k[j++],M=C[L>>>24]^_[F>>>16&255]^A[R>>>8&255]^O[U&255]^k[j++];F=$,R=ne,U=S,L=M}var $=(E[F>>>24]<<24|E[R>>>16&255]<<16|E[U>>>8&255]<<8|E[L&255])^k[j++],ne=(E[R>>>24]<<24|E[U>>>16&255]<<16|E[L>>>8&255]<<8|E[F&255])^k[j++],S=(E[U>>>24]<<24|E[L>>>16&255]<<16|E[F>>>8&255]<<8|E[R&255])^k[j++],M=(E[L>>>24]<<24|E[F>>>16&255]<<16|E[R>>>8&255]<<8|E[U&255])^k[j++];y[v]=$,y[v+1]=ne,y[v+2]=S,y[v+3]=M},keySize:256/32});r.AES=o._createHelper(b)})(),n.AES})})(Po)),Po.exports}var Ro={exports:{}},qC=Ro.exports,rd;function jC(){return rd||(rd=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Nn(),Ln(),dn(),Ue())})(qC,function(n){return(function(){var r=n,i=r.lib,o=i.WordArray,s=i.BlockCipher,a=r.algo,c=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],l=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],f=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],u=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],d=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],h=a.DES=s.extend({_doReset:function(){for(var g=this._key,b=g.words,y=[],v=0;v<56;v++){var k=c[v]-1;y[v]=b[k>>>5]>>>31-k%32&1}for(var C=this._subKeys=[],_=0;_<16;_++){for(var A=C[_]=[],O=f[_],v=0;v<24;v++)A[v/6|0]|=y[(l[v]-1+O)%28]<<31-v%6,A[4+(v/6|0)]|=y[28+(l[v+24]-1+O)%28]<<31-v%6;A[0]=A[0]<<1|A[0]>>>31;for(var v=1;v<7;v++)A[v]=A[v]>>>(v-1)*4+3;A[7]=A[7]<<5|A[7]>>>27}for(var E=this._invSubKeys=[],v=0;v<16;v++)E[v]=C[15-v]},encryptBlock:function(g,b){this._doCryptBlock(g,b,this._subKeys)},decryptBlock:function(g,b){this._doCryptBlock(g,b,this._invSubKeys)},_doCryptBlock:function(g,b,y){this._lBlock=g[b],this._rBlock=g[b+1],p.call(this,4,252645135),p.call(this,16,65535),x.call(this,2,858993459),x.call(this,8,16711935),p.call(this,1,1431655765);for(var v=0;v<16;v++){for(var k=y[v],C=this._lBlock,_=this._rBlock,A=0,O=0;O<8;O++)A|=u[O][((_^k[O])&d[O])>>>0];this._lBlock=_,this._rBlock=C^A}var E=this._lBlock;this._lBlock=this._rBlock,this._rBlock=E,p.call(this,1,1431655765),x.call(this,8,16711935),x.call(this,2,858993459),p.call(this,16,65535),p.call(this,4,252645135),g[b]=this._lBlock,g[b+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function p(g,b){var y=(this._lBlock>>>g^this._rBlock)&b;this._rBlock^=y,this._lBlock^=y<<g}function x(g,b){var y=(this._rBlock>>>g^this._lBlock)&b;this._lBlock^=y,this._rBlock^=y<<g}r.DES=s._createHelper(h);var m=a.TripleDES=s.extend({_doReset:function(){var g=this._key,b=g.words;if(b.length!==2&&b.length!==4&&b.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var y=b.slice(0,2),v=b.length<4?b.slice(0,2):b.slice(2,4),k=b.length<6?b.slice(0,2):b.slice(4,6);this._des1=h.createEncryptor(o.create(y)),this._des2=h.createEncryptor(o.create(v)),this._des3=h.createEncryptor(o.create(k))},encryptBlock:function(g,b){this._des1.encryptBlock(g,b),this._des2.decryptBlock(g,b),this._des3.encryptBlock(g,b)},decryptBlock:function(g,b){this._des3.decryptBlock(g,b),this._des2.encryptBlock(g,b),this._des1.decryptBlock(g,b)},keySize:192/32,ivSize:64/32,blockSize:64/32});r.TripleDES=s._createHelper(m)})(),n.TripleDES})})(Ro)),Ro.exports}var Io={exports:{}},$C=Io.exports,id;function WC(){return id||(id=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Nn(),Ln(),dn(),Ue())})($C,function(n){return(function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=s.RC4=o.extend({_doReset:function(){for(var f=this._key,u=f.words,d=f.sigBytes,h=this._S=[],p=0;p<256;p++)h[p]=p;for(var p=0,x=0;p<256;p++){var m=p%d,g=u[m>>>2]>>>24-m%4*8&255;x=(x+h[p]+g)%256;var b=h[p];h[p]=h[x],h[x]=b}this._i=this._j=0},_doProcessBlock:function(f,u){f[u]^=c.call(this)},keySize:256/32,ivSize:0});function c(){for(var f=this._S,u=this._i,d=this._j,h=0,p=0;p<4;p++){u=(u+1)%256,d=(d+f[u])%256;var x=f[u];f[u]=f[d],f[d]=x,h|=f[(f[u]+f[d])%256]<<24-p*8}return this._i=u,this._j=d,h}r.RC4=o._createHelper(a);var l=s.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var f=this.cfg.drop;f>0;f--)c.call(this)}});r.RC4Drop=o._createHelper(l)})(),n.RC4})})(Io)),Io.exports}var No={exports:{}},VC=No.exports,od;function KC(){return od||(od=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Nn(),Ln(),dn(),Ue())})(VC,function(n){return(function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=[],c=[],l=[],f=s.Rabbit=o.extend({_doReset:function(){for(var d=this._key.words,h=this.cfg.iv,p=0;p<4;p++)d[p]=(d[p]<<8|d[p]>>>24)&16711935|(d[p]<<24|d[p]>>>8)&4278255360;var x=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],m=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var p=0;p<4;p++)u.call(this);for(var p=0;p<8;p++)m[p]^=x[p+4&7];if(h){var g=h.words,b=g[0],y=g[1],v=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,k=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,C=v>>>16|k&4294901760,_=k<<16|v&65535;m[0]^=v,m[1]^=C,m[2]^=k,m[3]^=_,m[4]^=v,m[5]^=C,m[6]^=k,m[7]^=_;for(var p=0;p<4;p++)u.call(this)}},_doProcessBlock:function(d,h){var p=this._X;u.call(this),a[0]=p[0]^p[5]>>>16^p[3]<<16,a[1]=p[2]^p[7]>>>16^p[5]<<16,a[2]=p[4]^p[1]>>>16^p[7]<<16,a[3]=p[6]^p[3]>>>16^p[1]<<16;for(var x=0;x<4;x++)a[x]=(a[x]<<8|a[x]>>>24)&16711935|(a[x]<<24|a[x]>>>8)&4278255360,d[h+x]^=a[x]},blockSize:128/32,ivSize:64/32});function u(){for(var d=this._X,h=this._C,p=0;p<8;p++)c[p]=h[p];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<c[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<c[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<c[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<c[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<c[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<c[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<c[6]>>>0?1:0)|0,this._b=h[7]>>>0<c[7]>>>0?1:0;for(var p=0;p<8;p++){var x=d[p]+h[p],m=x&65535,g=x>>>16,b=((m*m>>>17)+m*g>>>15)+g*g,y=((x&4294901760)*x|0)+((x&65535)*x|0);l[p]=b^y}d[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,d[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,d[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,d[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,d[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,d[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,d[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,d[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}r.Rabbit=o._createHelper(f)})(),n.Rabbit})})(No)),No.exports}var Lo={exports:{}},QC=Lo.exports,sd;function XC(){return sd||(sd=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Nn(),Ln(),dn(),Ue())})(QC,function(n){return(function(){var r=n,i=r.lib,o=i.StreamCipher,s=r.algo,a=[],c=[],l=[],f=s.RabbitLegacy=o.extend({_doReset:function(){var d=this._key.words,h=this.cfg.iv,p=this._X=[d[0],d[3]<<16|d[2]>>>16,d[1],d[0]<<16|d[3]>>>16,d[2],d[1]<<16|d[0]>>>16,d[3],d[2]<<16|d[1]>>>16],x=this._C=[d[2]<<16|d[2]>>>16,d[0]&4294901760|d[1]&65535,d[3]<<16|d[3]>>>16,d[1]&4294901760|d[2]&65535,d[0]<<16|d[0]>>>16,d[2]&4294901760|d[3]&65535,d[1]<<16|d[1]>>>16,d[3]&4294901760|d[0]&65535];this._b=0;for(var m=0;m<4;m++)u.call(this);for(var m=0;m<8;m++)x[m]^=p[m+4&7];if(h){var g=h.words,b=g[0],y=g[1],v=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,k=(y<<8|y>>>24)&16711935|(y<<24|y>>>8)&4278255360,C=v>>>16|k&4294901760,_=k<<16|v&65535;x[0]^=v,x[1]^=C,x[2]^=k,x[3]^=_,x[4]^=v,x[5]^=C,x[6]^=k,x[7]^=_;for(var m=0;m<4;m++)u.call(this)}},_doProcessBlock:function(d,h){var p=this._X;u.call(this),a[0]=p[0]^p[5]>>>16^p[3]<<16,a[1]=p[2]^p[7]>>>16^p[5]<<16,a[2]=p[4]^p[1]>>>16^p[7]<<16,a[3]=p[6]^p[3]>>>16^p[1]<<16;for(var x=0;x<4;x++)a[x]=(a[x]<<8|a[x]>>>24)&16711935|(a[x]<<24|a[x]>>>8)&4278255360,d[h+x]^=a[x]},blockSize:128/32,ivSize:64/32});function u(){for(var d=this._X,h=this._C,p=0;p<8;p++)c[p]=h[p];h[0]=h[0]+1295307597+this._b|0,h[1]=h[1]+3545052371+(h[0]>>>0<c[0]>>>0?1:0)|0,h[2]=h[2]+886263092+(h[1]>>>0<c[1]>>>0?1:0)|0,h[3]=h[3]+1295307597+(h[2]>>>0<c[2]>>>0?1:0)|0,h[4]=h[4]+3545052371+(h[3]>>>0<c[3]>>>0?1:0)|0,h[5]=h[5]+886263092+(h[4]>>>0<c[4]>>>0?1:0)|0,h[6]=h[6]+1295307597+(h[5]>>>0<c[5]>>>0?1:0)|0,h[7]=h[7]+3545052371+(h[6]>>>0<c[6]>>>0?1:0)|0,this._b=h[7]>>>0<c[7]>>>0?1:0;for(var p=0;p<8;p++){var x=d[p]+h[p],m=x&65535,g=x>>>16,b=((m*m>>>17)+m*g>>>15)+g*g,y=((x&4294901760)*x|0)+((x&65535)*x|0);l[p]=b^y}d[0]=l[0]+(l[7]<<16|l[7]>>>16)+(l[6]<<16|l[6]>>>16)|0,d[1]=l[1]+(l[0]<<8|l[0]>>>24)+l[7]|0,d[2]=l[2]+(l[1]<<16|l[1]>>>16)+(l[0]<<16|l[0]>>>16)|0,d[3]=l[3]+(l[2]<<8|l[2]>>>24)+l[1]|0,d[4]=l[4]+(l[3]<<16|l[3]>>>16)+(l[2]<<16|l[2]>>>16)|0,d[5]=l[5]+(l[4]<<8|l[4]>>>24)+l[3]|0,d[6]=l[6]+(l[5]<<16|l[5]>>>16)+(l[4]<<16|l[4]>>>16)|0,d[7]=l[7]+(l[6]<<8|l[6]>>>24)+l[5]|0}r.RabbitLegacy=o._createHelper(f)})(),n.RabbitLegacy})})(Lo)),Lo.exports}var Mo={exports:{}},GC=Mo.exports,ad;function YC(){return ad||(ad=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),Nn(),Ln(),dn(),Ue())})(GC,function(n){return(function(){var r=n,i=r.lib,o=i.BlockCipher,s=r.algo;const a=16,c=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731],l=[[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946],[1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055],[3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504],[976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462]];var f={pbox:[],sbox:[]};function u(m,g){let b=g>>24&255,y=g>>16&255,v=g>>8&255,k=g&255,C=m.sbox[0][b]+m.sbox[1][y];return C=C^m.sbox[2][v],C=C+m.sbox[3][k],C}function d(m,g,b){let y=g,v=b,k;for(let C=0;C<a;++C)y=y^m.pbox[C],v=u(m,y)^v,k=y,y=v,v=k;return k=y,y=v,v=k,v=v^m.pbox[a],y=y^m.pbox[a+1],{left:y,right:v}}function h(m,g,b){let y=g,v=b,k;for(let C=a+1;C>1;--C)y=y^m.pbox[C],v=u(m,y)^v,k=y,y=v,v=k;return k=y,y=v,v=k,v=v^m.pbox[1],y=y^m.pbox[0],{left:y,right:v}}function p(m,g,b){for(let _=0;_<4;_++){m.sbox[_]=[];for(let A=0;A<256;A++)m.sbox[_][A]=l[_][A]}let y=0;for(let _=0;_<a+2;_++)m.pbox[_]=c[_]^g[y],y++,y>=b&&(y=0);let v=0,k=0,C=0;for(let _=0;_<a+2;_+=2)C=d(m,v,k),v=C.left,k=C.right,m.pbox[_]=v,m.pbox[_+1]=k;for(let _=0;_<4;_++)for(let A=0;A<256;A+=2)C=d(m,v,k),v=C.left,k=C.right,m.sbox[_][A]=v,m.sbox[_][A+1]=k;return!0}var x=s.Blowfish=o.extend({_doReset:function(){if(this._keyPriorReset!==this._key){var m=this._keyPriorReset=this._key,g=m.words,b=m.sigBytes/4;p(f,g,b)}},encryptBlock:function(m,g){var b=d(f,m[g],m[g+1]);m[g]=b.left,m[g+1]=b.right},decryptBlock:function(m,g){var b=h(f,m[g],m[g+1]);m[g]=b.left,m[g+1]=b.right},blockSize:64/32,keySize:128/32,ivSize:64/32});r.Blowfish=o._createHelper(x)})(),n.Blowfish})})(Mo)),Mo.exports}var ZC=to.exports,ld;function JC(){return ld||(ld=1,(function(e,t){(function(n,r,i){e.exports=r(pe(),io(),XE(),YE(),Nn(),eC(),Ln(),Pf(),Na(),oC(),Lf(),lC(),uC(),dC(),La(),xC(),dn(),Ue(),bC(),wC(),CC(),AC(),_C(),DC(),TC(),PC(),IC(),LC(),zC(),HC(),jC(),WC(),KC(),XC(),YC())})(ZC,function(n){return n})})(to)),to.exports}var ek=JC();const et=bs(ek),cd=et.enc.Utf8.parse("NFyekGiXWSpw3s6wv2RBtrxuPP6UIJA5");class Gr{static encrypt(t){const n=et.lib.WordArray.random(16),r=et.AES.encrypt(t,cd,{iv:n,mode:et.mode.CBC,padding:et.pad.Pkcs7});return n.toString(et.enc.Hex)+":"+r.toString()}static decrypt(t){const n=t.split(":");if(n.length!==2)return console.error("Invalid encrypted string format"),"";const r=et.enc.Hex.parse(n[0]),i=n[1];return et.AES.decrypt(i,cd,{iv:r,mode:et.mode.CBC,padding:et.pad.Pkcs7}).toString(et.enc.Utf8)}static async encryptFile(t){return new Promise((n,r)=>{const i=new FileReader;i.onload=()=>{const o=i.result,s=this.encrypt(o),a=new Blob([s],{type:"text/plain"}),c=new File([a],t.name,{type:t.type,lastModified:t.lastModified});n(c)},i.onerror=r,i.readAsDataURL(t)})}}class tk{static encode(t){const n=JSON.stringify(t),r=et.enc.Utf8.parse(n);let i=et.enc.Base64.stringify(r);return i=i.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),i}static decode(t){let n=t.replace(/-/g,"+").replace(/_/g,"/");for(;n.length%4;)n+="=";const i=et.enc.Base64.parse(n).toString(et.enc.Utf8);return JSON.parse(i)}}const nk={CHAT_MESSAGES:"chatMessages"};class ud{constructor(t){Ct(this,"apiClient");this.apiClient=new kf({baseURL:"http://localhost:9999",headers:t?{"X-API-Key":t}:{}})}updateApiKey(t){this.apiClient=new kf({baseURL:"http://localhost:9999",headers:{"X-API-Key":t}})}getSecureSessionId(t){const n=Gr.encrypt(t);return tk.encode({sid:n})}async sendMessage(t,n,r=[]){const i=new FormData,o=Gr.encrypt(t),s=this.getSecureSessionId(n);i.append("message",o),i.append("session_id",s);for(const c of r){const l=await Gr.encryptFile(c);i.append("files",l)}return await this.apiClient.post("/chat-module/send-message",i,{headers:{"Content-Type":"multipart/form-data"}})}async getThread(t){const n=this.getSecureSessionId(t),r=await this.apiClient.get(`/chat-module/thread/${n}`);return r.data&&r.data.messages&&(r.data.messages=r.data.messages.map(i=>({...i,content:i.role==="assistant"||i.role==="user"?Gr.decrypt(i.content):i.content}))),r}encodeSessionId(t){return this.getSecureSessionId(t)}}let Yr=new ud;function rk(e){return Yr=new ud(e),Yr}function ik(){return Ph({mutationFn:({message:e,sessionId:t,files:n=[]})=>Yr.sendMessage(e,t,n)})}function ok(e){return Oh({queryKey:[nk.CHAT_MESSAGES,e],queryFn:()=>Yr.getThread(e),enabled:!!e})}const Nt=Object.create(null);Nt.open="0",Nt.close="1",Nt.ping="2",Nt.pong="3",Nt.message="4",Nt.upgrade="5",Nt.noop="6";const zo=Object.create(null);Object.keys(Nt).forEach(e=>{zo[Nt[e]]=e});const Ma={type:"error",data:"parser error"},fd=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",dd=typeof ArrayBuffer=="function",hd=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,za=({type:e,data:t},n,r)=>fd&&t instanceof Blob?n?r(t):pd(t,r):dd&&(t instanceof ArrayBuffer||hd(t))?n?r(t):pd(new Blob([t]),r):r(Nt[e]+(t||"")),pd=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function xd(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Ua;function sk(e,t){if(fd&&e.data instanceof Blob)return e.data.arrayBuffer().then(xd).then(t);if(dd&&(e.data instanceof ArrayBuffer||hd(e.data)))return t(xd(e.data));za(e,!1,n=>{Ua||(Ua=new TextEncoder),t(Ua.encode(n))})}const md="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Zr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<md.length;e++)Zr[md.charCodeAt(e)]=e;const ak=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,a,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const l=new ArrayBuffer(t),f=new Uint8Array(l);for(r=0;r<n;r+=4)o=Zr[e.charCodeAt(r)],s=Zr[e.charCodeAt(r+1)],a=Zr[e.charCodeAt(r+2)],c=Zr[e.charCodeAt(r+3)],f[i++]=o<<2|s>>4,f[i++]=(s&15)<<4|a>>2,f[i++]=(a&3)<<6|c&63;return l},lk=typeof ArrayBuffer=="function",Ha=(e,t)=>{if(typeof e!="string")return{type:"message",data:gd(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:ck(e.substring(1),t)}:zo[n]?e.length>1?{type:zo[n],data:e.substring(1)}:{type:zo[n]}:Ma},ck=(e,t)=>{if(lk){const n=ak(e);return gd(n,t)}else return{base64:!0,data:e}},gd=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},yd="",uk=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{za(o,!1,a=>{r[s]=a,++i===n&&t(r.join(yd))})})},fk=(e,t)=>{const n=e.split(yd),r=[];for(let i=0;i<n.length;i++){const o=Ha(n[i],t);if(r.push(o),o.type==="error")break}return r};function dk(){return new TransformStream({transform(e,t){sk(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let qa;function Uo(e){return e.reduce((t,n)=>t+n.length,0)}function Ho(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function hk(e,t){qa||(qa=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(r===0){if(Uo(n)<1)break;const c=Ho(n,1);o=(c[0]&128)===128,i=c[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Uo(n)<2)break;const c=Ho(n,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(Uo(n)<8)break;const c=Ho(n,8),l=new DataView(c.buffer,c.byteOffset,c.length),f=l.getUint32(0);if(f>Math.pow(2,21)-1){a.enqueue(Ma);break}i=f*Math.pow(2,32)+l.getUint32(4),r=3}else{if(Uo(n)<i)break;const c=Ho(n,i);a.enqueue(Ha(o?c:qa.decode(c),t)),r=0}if(i===0||i>e){a.enqueue(Ma);break}}}})}const bd=4;function Fe(e){if(e)return pk(e)}function pk(e){for(var t in Fe.prototype)e[t]=Fe.prototype[t];return e}Fe.prototype.on=Fe.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Fe.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Fe.prototype.off=Fe.prototype.removeListener=Fe.prototype.removeAllListeners=Fe.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Fe.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},Fe.prototype.emitReserved=Fe.prototype.emit,Fe.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Fe.prototype.hasListeners=function(e){return!!this.listeners(e).length};const qo=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),wt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),xk="arraybuffer";function p8(){}function vd(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const mk=wt.setTimeout,gk=wt.clearTimeout;function jo(e,t){t.useNativeTimers?(e.setTimeoutFn=mk.bind(wt),e.clearTimeoutFn=gk.bind(wt)):(e.setTimeoutFn=wt.setTimeout.bind(wt),e.clearTimeoutFn=wt.clearTimeout.bind(wt))}const yk=1.33;function bk(e){return typeof e=="string"?vk(e):Math.ceil((e.byteLength||e.size)*yk)}function vk(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function wd(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function wk(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Ek(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class Ck extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class ja extends Fe{constructor(t){super(),this.writable=!1,jo(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Ck(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Ha(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=wk(t);return n.length?"?"+n:""}}class kk extends ja{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};fk(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,uk(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=wd()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Ed=!1;try{Ed=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Ak=Ed;function Sk(){}class _k extends kk{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Lt extends Fe{constructor(t,n,r){super(),this.createRequest=t,jo(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=vd(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Lt.requestsCount++,Lt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Sk,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Lt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Lt.requestsCount=0,Lt.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Cd);else if(typeof addEventListener=="function"){const e="onpagehide"in wt?"pagehide":"unload";addEventListener(e,Cd,!1)}}function Cd(){for(let e in Lt.requests)Lt.requests.hasOwnProperty(e)&&Lt.requests[e].abort()}const Bk=(function(){const e=kd({xdomain:!1});return e&&e.responseType!==null})();class Dk extends _k{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=Bk&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Lt(kd,this.uri(),t)}}function kd(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Ak))return new XMLHttpRequest}catch{}if(!t)try{return new wt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Ad=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Fk extends ja{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Ad?{}:vd(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;za(r,this.supportsBinary,o=>{try{this.doWrite(r,o)}catch{}i&&qo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=wd()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const $a=wt.WebSocket||wt.MozWebSocket;class Tk extends Fk{createSocket(t,n,r){return Ad?new $a(t,n,r):n?new $a(t,n):new $a(t)}doWrite(t,n){this.ws.send(n)}}class Ok extends ja{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=hk(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=dk();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&qo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Pk={websocket:Tk,webtransport:Ok,polling:Dk},Rk=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ik=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Wa(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Rk.exec(e||""),o={},s=14;for(;s--;)o[Ik[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=Nk(o,o.path),o.queryKey=Lk(o,o.query),o}function Nk(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Lk(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}const Va=typeof addEventListener=="function"&&typeof removeEventListener=="function",$o=[];Va&&addEventListener("offline",()=>{$o.forEach(e=>e())},!1);class hn extends Fe{constructor(t,n){if(super(),this.binaryType=xk,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Wa(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Wa(n.host).host);jo(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ek(this.opts.query)),Va&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},$o.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=bd,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&hn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",hn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=bk(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,qo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(hn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Va&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=$o.indexOf(this._offlineEventListener);r!==-1&&$o.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}hn.protocol=bd;class Mk extends hn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;hn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",u=>{if(!r)if(u.type==="pong"&&u.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;hn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(f(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function o(){r||(r=!0,f(),n.close(),n=null)}const s=u=>{const d=new Error("probe error: "+u);d.transport=n.name,o(),this.emitReserved("upgradeError",d)};function a(){s("transport closed")}function c(){s("socket closed")}function l(u){n&&u.name!==n.name&&o()}const f=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",c),this.off("upgrading",l)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",c),this.once("upgrading",l),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let zk=class extends Mk{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>Pk[i]).filter(i=>!!i)),super(t,r)}};function Uk(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Wa(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const Hk=typeof ArrayBuffer=="function",qk=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Sd=Object.prototype.toString,jk=typeof Blob=="function"||typeof Blob<"u"&&Sd.call(Blob)==="[object BlobConstructor]",$k=typeof File=="function"||typeof File<"u"&&Sd.call(File)==="[object FileConstructor]";function Ka(e){return Hk&&(e instanceof ArrayBuffer||qk(e))||jk&&e instanceof Blob||$k&&e instanceof File}function Wo(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Wo(e[n]))return!0;return!1}if(Ka(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Wo(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Wo(e[n]))return!0;return!1}function Wk(e){const t=[],n=e.data,r=e;return r.data=Qa(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Qa(e,t){if(!e)return e;if(Ka(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=Qa(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Qa(e[r],t));return n}return e}function Vk(e,t){return e.data=Xa(e.data,t),delete e.attachments,e}function Xa(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Xa(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Xa(e[n],t));return e}const Kk=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var xe;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(xe||(xe={}));class Qk{constructor(t){this.replacer=t}encode(t){return(t.type===xe.EVENT||t.type===xe.ACK)&&Wo(t)?this.encodeAsBinary({type:t.type===xe.EVENT?xe.BINARY_EVENT:xe.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===xe.BINARY_EVENT||t.type===xe.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Wk(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class Ga extends Fe{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===xe.BINARY_EVENT;r||n.type===xe.BINARY_ACK?(n.type=r?xe.EVENT:xe.ACK,this.reconstructor=new Xk(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ka(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(xe[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===xe.BINARY_EVENT||r.type===xe.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(o,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(Ga.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case xe.CONNECT:return _d(n);case xe.DISCONNECT:return n===void 0;case xe.CONNECT_ERROR:return typeof n=="string"||_d(n);case xe.EVENT:case xe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Kk.indexOf(n[0])===-1);case xe.ACK:case xe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Xk{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Vk(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function _d(e){return Object.prototype.toString.call(e)==="[object Object]"}const Gk=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ga,Encoder:Qk,get PacketType(){return xe}},Symbol.toStringTag,{value:"Module"}));function _t(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Yk=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Bd extends Fe{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[_t(t,"open",this.onopen.bind(this)),_t(t,"packet",this.onpacket.bind(this)),_t(t,"error",this.onerror.bind(this)),_t(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,o;if(Yk.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:xe.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const f=this.ids++,u=n.pop();this._registerAckCallback(f,u),s.id=f}const a=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,c=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),s=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,a)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,i)=>{const o=(s,a)=>s?i(s):r(a);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:xe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case xe.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case xe.EVENT:case xe.BINARY_EVENT:this.onevent(t);break;case xe.ACK:case xe.BINARY_ACK:this.onack(t);break;case xe.DISCONNECT:this.ondisconnect();break;case xe.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:xe.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:xe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function dr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}dr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},dr.prototype.reset=function(){this.attempts=0},dr.prototype.setMin=function(e){this.ms=e},dr.prototype.setMax=function(e){this.max=e},dr.prototype.setJitter=function(e){this.jitter=e};class Ya extends Fe{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,jo(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new dr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Gk;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new zk(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=_t(n,"open",function(){r.onopen(),t&&t()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},s=_t(n,"error",o);if(this._timeout!==!1){const a=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(_t(t,"ping",this.onping.bind(this)),_t(t,"data",this.ondata.bind(this)),_t(t,"error",this.onerror.bind(this)),_t(t,"close",this.onclose.bind(this)),_t(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){qo(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Bd(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Jr={};function Vo(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Uk(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=Jr[i]&&o in Jr[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let c;return a?c=new Ya(r,t):(Jr[i]||(Jr[i]=new Ya(r,t)),c=Jr[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(Vo,{Manager:Ya,Socket:Bd,io:Vo,connect:Vo});const Zk="http://localhost:9999";function Jk({sessionId:e,onGenerating:t,onCompleted:n,onError:r}){const i=z.useRef(null);return z.useEffect(()=>{if(!e)return;i.current=Vo(Zk,{transports:["websocket"],reconnectionAttempts:5});const o=i.current;return o.on("connect",()=>{console.log("Socket connected");const s=Yr.encodeSessionId(e);o.emit("join_session",{session_id:s},a=>{a!=null&&a.success?console.log(`Joined session: ${e} (Encoded)`):console.error("Failed to join session:",a)})}),o.on("connect_error",s=>{console.error("Socket connection error:",s)}),o.on("generating",s=>{t==null||t()}),o.on("completed",s=>{if(s!=null&&s.message){let a=s.message.content;try{a=Gr.decrypt(a)}catch(l){console.error("Failed to decrypt message:",l),a="Error decrypting message"}const c={id:s.message.id,role:s.message.role,content:a,timestamp:new Date(s.message.timestamp),shouldAnimate:!0};n==null||n(c)}}),o.on("chat_error",s=>{console.error("Socket chat_error event:",s),r==null||r((s==null?void 0:s.message)||"Unknown chat error")}),o.on("error",s=>{console.error("Socket error event:",s),r==null||r((s==null?void 0:s.message)||"Unknown socket error")}),()=>{o.disconnect()}},[e]),i.current}const je=[];for(let e=0;e<256;++e)je.push((e+256).toString(16).slice(1));function e4(e,t=0){return(je[e[t+0]]+je[e[t+1]]+je[e[t+2]]+je[e[t+3]]+"-"+je[e[t+4]]+je[e[t+5]]+"-"+je[e[t+6]]+je[e[t+7]]+"-"+je[e[t+8]]+je[e[t+9]]+"-"+je[e[t+10]]+je[e[t+11]]+je[e[t+12]]+je[e[t+13]]+je[e[t+14]]+je[e[t+15]]).toLowerCase()}let Za;const t4=new Uint8Array(16);function n4(){if(!Za){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Za=crypto.getRandomValues.bind(crypto)}return Za(t4)}const Ja={};function Ko(e,t,n){let r;{const i=Date.now(),o=n4();r4(Ja,i,o),r=i4(o,Ja.msecs,Ja.seq,t,n)}return t??e4(r)}function r4(e,t,n){return e.msecs??(e.msecs=-1/0),e.seq??(e.seq=0),t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function i4(e,t,n,r,i=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??(t=Date.now()),n??(n=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9]),r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=t&255,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|e[10]&3,r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}/*! js-cookie v3.0.5 | MIT */function Qo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var o4={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function el(e,t){function n(i,o,s){if(!(typeof document>"u")){s=Qo({},t,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].split(";")[0]));return document.cookie=i+"="+e.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var c=o[a].split("="),l=c.slice(1).join("=");try{var f=decodeURIComponent(c[0]);if(s[f]=e.read(l,f),i===f)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Qo({},o,{expires:-1}))},withAttributes:function(i){return el(this.converter,Qo({},this.attributes,i))},withConverter:function(i){return el(Qo({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var Dd=el(o4,{path:"/"}),s4=(e,t,n,r,i,o,s,a)=>{let c=document.documentElement,l=["light","dark"];function f(h){(Array.isArray(e)?e:[e]).forEach(p=>{let x=p==="class",m=x&&o?i.map(g=>o[g]||g):i;x?(c.classList.remove(...m),c.classList.add(o&&o[h]?o[h]:h)):c.setAttribute(p,h)}),u(h)}function u(h){a&&l.includes(h)&&(c.style.colorScheme=h)}function d(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)f(r);else try{let h=localStorage.getItem(t)||n,p=s&&h==="system"?d():h;f(p)}catch{}},a4=P.createContext(void 0),l4={setTheme:e=>{},themes:[]},c4=()=>{var e;return(e=P.useContext(a4))!=null?e:l4};P.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:o,value:s,themes:a,nonce:c,scriptProps:l})=>{let f=JSON.stringify([n,t,o,e,a,s,r,i]).slice(1,-1);return P.createElement("script",{...l,suppressHydrationWarning:!0,nonce:typeof window>"u"?c:"",dangerouslySetInnerHTML:{__html:`(${s4.toString()})(${f})`}})});const u4=({...e})=>{const{theme:t="system"}=c4();return T.jsx(Bv,{theme:t,className:"toaster group",icons:{success:T.jsx(Uh,{className:"size-4"}),info:T.jsx($h,{className:"size-4"}),warning:T.jsx(Gh,{className:"size-4"}),error:T.jsx(Kh,{className:"size-4"}),loading:T.jsx(Wh,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},...e})},Xo={headerBackgroundColor:"#f0293b",messageBackgroundColor:"#f9fafb",userBubbleBackgroundColor:"#1e293b",botBubbleBackgroundColor:"#ffffff",inputSectionBackgroundColor:"#ffffff",sendButtonBackgroundColor:"#1e293b",headerImage:"",headerTitle:"ChatWillow",subLabelTitle:"Start Chatting With Us",closeButtonColor:"#ffffff",headerTextColor:"#ffffff",subLabelColor:"#cbd5e1",userBubbleTextColor:"#ffffff",botBubbleTextColor:"#1f2937",botAvatarImage:"https://github.com/evilrabbit.png",initialMessage:"Hi there! I'm ChatWillow. How can I help you today?",inputPlaceholder:"Type your message...",toastSuccessMessage:"File(s) attached successfully",toastFailedMessage:"Failed to attach file(s)"},Fd="SESSION_ID";function f4({apiKey:e,className:t,style:n}){const[r,i]=z.useState(!1),[o]=z.useState(()=>{const p=Dd.get(Fd);if(p)return p;const x=Ko();return Dd.set(Fd,x,{expires:1}),x}),[s,a]=z.useState(!1),[c,l]=z.useState([]);z.useEffect(()=>{e&&rk(e)},[e]);const{data:f}=ok(o);z.useEffect(()=>{var p;if((p=f==null?void 0:f.data)!=null&&p.messages){const x=f.data.messages.map(m=>({...m,timestamp:new Date(m.timestamp),shouldAnimate:!1}));x.length>0?l(x):l([{id:"1",role:"assistant",content:Xo.initialMessage,timestamp:new Date}])}},[f]),Jk({sessionId:o,onGenerating:()=>{a(!0)},onCompleted:p=>{a(!1),l(x=>x.some(m=>m.id===p.id)?x:[...x,p])},onError:p=>{a(!1);const x={id:Ko(),role:"assistant",content:"I'm sorry, I'm having trouble processing your request right now. Please try again in a moment.",timestamp:new Date,shouldAnimate:!0};l(m=>[...m,x])}});const{mutate:u,isPending:d}=ik(),h=(p,x=[])=>{const m={id:Ko(),role:"user",content:p,timestamp:new Date};l(g=>[...g,m]),u({message:p,sessionId:o,files:x},{onSuccess:()=>{a(!0)},onError:g=>{const b={id:Ko(),role:"assistant",content:"I'm sorry, I encountered an issue while sending your message. Please try again later.",timestamp:new Date,shouldAnimate:!0};l(y=>[...y,b]),a(!1),console.error("Failed to send message:",g)}})};return r?T.jsxs("div",{className:`fixed bottom-0 right-0 z-50 flex flex-col items-end ${t||""}`,style:n,children:[T.jsx(u4,{richColors:!0,position:"top-center"}),T.jsx(v2,{messages:c,onSendMessage:h,isSending:d||s,onClose:()=>i(!1),config:Xo})]}):T.jsx("button",{onClick:()=>i(!0),className:`fixed bottom-4 right-4 w-14 h-14 rounded-full flex items-center justify-center shadow-lg hover:brightness-90 transition-all hover:scale-105 z-50 ${t||""}`,style:{...n,backgroundColor:Xo.headerBackgroundColor,color:Xo.headerTextColor},children:T.jsx(Vh,{})})}const d4=new bh({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});function Td(e){return T.jsx(vh,{client:d4,children:T.jsx(f4,{...e})})}const Od=e=>{if(typeof window>"u")return;const t=e.containerId||"chatwillow-root";let n=document.getElementById(t);n||(n=document.createElement("div"),n.id=t,document.body.appendChild(n)),Qd.createRoot(n).render(P.createElement(Td,e))};typeof window<"u"&&(window.ChatWillow={init:Od}),fe.ChatWillowWidget=Td,fe.init=Od,Object.defineProperty(fe,Symbol.toStringTag,{value:"Module"})}));