more-desk-one 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -0
- package/dist/index.cjs +166 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +9400 -0
- package/dist/index.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +42 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("react/jsx-runtime"),F=require("react"),ko=require("react-dom");function _o(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 f=_o(F),Po=_o(ko);function Ot(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 Zi={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 $n(e,t){function n(o,s,i){if(!(typeof document>"u")){i=Ot({},t,i),typeof i.expires=="number"&&(i.expires=new Date(Date.now()+i.expires*864e5)),i.expires&&(i.expires=i.expires.toUTCString()),o=encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in i)i[l]&&(a+="; "+l,i[l]!==!0&&(a+="="+i[l].split(";")[0]));return document.cookie=o+"="+e.write(s,o)+a}}function r(o){if(!(typeof document>"u"||arguments.length&&!o)){for(var s=document.cookie?document.cookie.split("; "):[],i={},a=0;a<s.length;a++){var l=s[a].split("="),c=l.slice(1).join("=");try{var u=decodeURIComponent(l[0]);if(i[u]=e.read(c,u),o===u)break}catch{}}return o?i[o]:i}}return Object.create({set:n,get:r,remove:function(o,s){n(o,"",Ot({},s,{expires:-1}))},withAttributes:function(o){return $n(this.converter,Ot({},this.attributes,o))},withConverter:function(o){return $n(Ot({},this.converter,o),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var X=$n(Zi,{path:"/"});class ft extends Error{}ft.prototype.name="InvalidTokenError";function Yi(e){return decodeURIComponent(atob(e).replace(/(.)/g,(t,n)=>{let r=n.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r}))}function Qi(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Yi(t)}catch{return atob(t)}}function ea(e,t){if(typeof e!="string")throw new ft("Invalid token specified: must be a string");t||(t={});const n=t.header===!0?0:1,r=e.split(".")[n];if(typeof r!="string")throw new ft(`Invalid token specified: missing part #${n+1}`);let o;try{o=Qi(r)}catch(s){throw new ft(`Invalid token specified: invalid base64 for part #${n+1} (${s.message})`)}try{return JSON.parse(o)}catch(s){throw new ft(`Invalid token specified: invalid json for part #${n+1} (${s.message})`)}}function Oo(e,t){return function(){return e.apply(t,arguments)}}const{toString:ta}=Object.prototype,{getPrototypeOf:rr}=Object,{iterator:cn,toStringTag:To}=Symbol,ln=(e=>t=>{const n=ta.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),me=e=>(e=e.toLowerCase(),t=>ln(t)===e),un=e=>t=>typeof t===e,{isArray:nt}=Array,Qe=un("undefined");function yt(e){return e!==null&&!Qe(e)&&e.constructor!==null&&!Qe(e.constructor)&&oe(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Mo=me("ArrayBuffer");function na(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Mo(e.buffer),t}const ra=un("string"),oe=un("function"),No=un("number"),xt=e=>e!==null&&typeof e=="object",oa=e=>e===!0||e===!1,Ut=e=>{if(ln(e)!=="object")return!1;const t=rr(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(To in e)&&!(cn in e)},sa=e=>{if(!xt(e)||yt(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ia=me("Date"),aa=me("File"),ca=me("Blob"),la=me("FileList"),ua=e=>xt(e)&&oe(e.pipe),da=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||oe(e.append)&&((t=ln(e))==="formdata"||t==="object"&&oe(e.toString)&&e.toString()==="[object FormData]"))},fa=me("URLSearchParams"),[pa,ma,ha,ga]=["ReadableStream","Request","Response","Headers"].map(me),ba=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ct(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),nt(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(yt(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),i=s.length;let a;for(r=0;r<i;r++)a=s[r],t.call(null,e[a],a,e)}}function Io(e,t){if(yt(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const je=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Do=e=>!Qe(e)&&e!==je;function Bn(){const{caseless:e,skipUndefined:t}=Do(this)&&this||{},n={},r=(o,s)=>{const i=e&&Io(n,s)||s;Ut(n[i])&&Ut(o)?n[i]=Bn(n[i],o):Ut(o)?n[i]=Bn({},o):nt(o)?n[i]=o.slice():(!t||!Qe(o))&&(n[i]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&Ct(arguments[o],r);return n}const va=(e,t,n,{allOwnKeys:r}={})=>(Ct(t,(o,s)=>{n&&oe(o)?e[s]=Oo(o,n):e[s]=o},{allOwnKeys:r}),e),wa=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ya=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},xa=(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&rr(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ca=(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},Sa=e=>{if(!e)return null;if(nt(e))return e;let t=e.length;if(!No(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Ea=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&rr(Uint8Array)),Ra=(e,t)=>{const r=(e&&e[cn]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},Aa=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},ka=me("HTMLFormElement"),_a=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Or=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Pa=me("RegExp"),jo=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ct(n,(o,s)=>{let i;(i=t(o,s,e))!==!1&&(r[s]=i||o)}),Object.defineProperties(e,r)},Oa=e=>{jo(e,(t,n)=>{if(oe(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(oe(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+"'")})}})},Ta=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return nt(e)?r(e):r(String(e).split(t)),n},Ma=()=>{},Na=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ia(e){return!!(e&&oe(e.append)&&e[To]==="FormData"&&e[cn])}const Da=e=>{const t=new Array(10),n=(r,o)=>{if(xt(r)){if(t.indexOf(r)>=0)return;if(yt(r))return r;if(!("toJSON"in r)){t[o]=r;const s=nt(r)?[]:{};return Ct(r,(i,a)=>{const l=n(i,o+1);!Qe(l)&&(s[a]=l)}),t[o]=void 0,s}}return r};return n(e,0)},ja=me("AsyncFunction"),La=e=>e&&(xt(e)||oe(e))&&oe(e.then)&&oe(e.catch),Lo=((e,t)=>e?setImmediate:t?((n,r)=>(je.addEventListener("message",({source:o,data:s})=>{o===je&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),je.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",oe(je.postMessage)),Fa=typeof queueMicrotask<"u"?queueMicrotask.bind(je):typeof process<"u"&&process.nextTick||Lo,$a=e=>e!=null&&oe(e[cn]),w={isArray:nt,isArrayBuffer:Mo,isBuffer:yt,isFormData:da,isArrayBufferView:na,isString:ra,isNumber:No,isBoolean:oa,isObject:xt,isPlainObject:Ut,isEmptyObject:sa,isReadableStream:pa,isRequest:ma,isResponse:ha,isHeaders:ga,isUndefined:Qe,isDate:ia,isFile:aa,isBlob:ca,isRegExp:Pa,isFunction:oe,isStream:ua,isURLSearchParams:fa,isTypedArray:Ea,isFileList:la,forEach:Ct,merge:Bn,extend:va,trim:ba,stripBOM:wa,inherits:ya,toFlatObject:xa,kindOf:ln,kindOfTest:me,endsWith:Ca,toArray:Sa,forEachEntry:Ra,matchAll:Aa,isHTMLForm:ka,hasOwnProperty:Or,hasOwnProp:Or,reduceDescriptors:jo,freezeMethods:Oa,toObjectSet:Ta,toCamelCase:_a,noop:Ma,toFiniteNumber:Na,findKey:Io,global:je,isContextDefined:Do,isSpecCompliantForm:Ia,toJSONObject:Da,isAsyncFn:ja,isThenable:La,setImmediate:Lo,asap:Fa,isIterable:$a};function j(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}w.inherits(j,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:w.toJSONObject(this.config),code:this.code,status:this.status}}});const Fo=j.prototype,$o={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{$o[e]={value:e}});Object.defineProperties(j,$o);Object.defineProperty(Fo,"isAxiosError",{value:!0});j.from=(e,t,n,r,o,s)=>{const i=Object.create(Fo);w.toFlatObject(e,i,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const a=e&&e.message?e.message:"Error",l=t==null&&e?e.code:t;return j.call(i,a,l,n,r,o),e&&i.cause==null&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",s&&Object.assign(i,s),i};const Ba=null;function Un(e){return w.isPlainObject(e)||w.isArray(e)}function Bo(e){return w.endsWith(e,"[]")?e.slice(0,-2):e}function Tr(e,t,n){return e?e.concat(t).map(function(o,s){return o=Bo(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function Ua(e){return w.isArray(e)&&!e.some(Un)}const Ha=w.toFlatObject(w,{},null,function(t){return/^is[A-Z]/.test(t)});function dn(e,t,n){if(!w.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=w.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,g){return!w.isUndefined(g[p])});const r=n.metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&w.isSpecCompliantForm(t);if(!w.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(w.isDate(m))return m.toISOString();if(w.isBoolean(m))return m.toString();if(!l&&w.isBlob(m))throw new j("Blob is not supported. Use a Buffer instead.");return w.isArrayBuffer(m)||w.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,p,g){let y=m;if(m&&!g&&typeof m=="object"){if(w.endsWith(p,"{}"))p=r?p:p.slice(0,-2),m=JSON.stringify(m);else if(w.isArray(m)&&Ua(m)||(w.isFileList(m)||w.endsWith(p,"[]"))&&(y=w.toArray(m)))return p=Bo(p),y.forEach(function(C,S){!(w.isUndefined(C)||C===null)&&t.append(i===!0?Tr([p],S,s):i===null?p:p+"[]",c(C))}),!1}return Un(m)?!0:(t.append(Tr(g,p,s),c(m)),!1)}const d=[],h=Object.assign(Ha,{defaultVisitor:u,convertValue:c,isVisitable:Un});function v(m,p){if(!w.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+p.join("."));d.push(m),w.forEach(m,function(y,x){(!(w.isUndefined(y)||y===null)&&o.call(t,y,w.isString(x)?x.trim():x,p,h))===!0&&v(y,p?p.concat(x):[x])}),d.pop()}}if(!w.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Mr(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function or(e,t){this._pairs=[],e&&dn(e,this,t)}const Uo=or.prototype;Uo.append=function(t,n){this._pairs.push([t,n])};Uo.toString=function(t){const n=t?function(r){return t.call(this,r,Mr)}:Mr;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function za(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ho(e,t,n){if(!t)return e;const r=n&&n.encode||za;w.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(o?s=o(t,n):s=w.isURLSearchParams(t)?t.toString():new or(t,n).toString(r),s){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Nr{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){w.forEach(this.handlers,function(r){r!==null&&t(r)})}}const zo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Va=typeof URLSearchParams<"u"?URLSearchParams:or,Wa=typeof FormData<"u"?FormData:null,Ka=typeof Blob<"u"?Blob:null,Ga={isBrowser:!0,classes:{URLSearchParams:Va,FormData:Wa,Blob:Ka},protocols:["http","https","file","blob","url","data"]},sr=typeof window<"u"&&typeof document<"u",Hn=typeof navigator=="object"&&navigator||void 0,qa=sr&&(!Hn||["ReactNative","NativeScript","NS"].indexOf(Hn.product)<0),Xa=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ja=sr&&window.location.href||"http://localhost",Za=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:sr,hasStandardBrowserEnv:qa,hasStandardBrowserWebWorkerEnv:Xa,navigator:Hn,origin:Ja},Symbol.toStringTag,{value:"Module"})),ne={...Za,...Ga};function Ya(e,t){return dn(e,new ne.classes.URLSearchParams,{visitor:function(n,r,o,s){return ne.isNode&&w.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function Qa(e){return w.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ec(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function Vo(e){function t(n,r,o,s){let i=n[s++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),l=s>=n.length;return i=!i&&w.isArray(o)?o.length:i,l?(w.hasOwnProp(o,i)?o[i]=[o[i],r]:o[i]=r,!a):((!o[i]||!w.isObject(o[i]))&&(o[i]=[]),t(n,r,o[i],s)&&w.isArray(o[i])&&(o[i]=ec(o[i])),!a)}if(w.isFormData(e)&&w.isFunction(e.entries)){const n={};return w.forEachEntry(e,(r,o)=>{t(Qa(r),o,n,0)}),n}return null}function tc(e,t,n){if(w.isString(e))try{return(t||JSON.parse)(e),w.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const St={transitional:zo,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=w.isObject(t);if(s&&w.isHTMLForm(t)&&(t=new FormData(t)),w.isFormData(t))return o?JSON.stringify(Vo(t)):t;if(w.isArrayBuffer(t)||w.isBuffer(t)||w.isStream(t)||w.isFile(t)||w.isBlob(t)||w.isReadableStream(t))return t;if(w.isArrayBufferView(t))return t.buffer;if(w.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ya(t,this.formSerializer).toString();if((a=w.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return dn(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),tc(t)):t}],transformResponse:[function(t){const n=this.transitional||St.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(w.isResponse(t)||w.isReadableStream(t))return t;if(t&&w.isString(t)&&(r&&!this.responseType||o)){const i=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?j.from(a,j.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:ne.classes.FormData,Blob:ne.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};w.forEach(["delete","get","head","post","put","patch"],e=>{St.headers[e]={}});const nc=w.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"]),rc=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
2
|
+
`).forEach(function(i){o=i.indexOf(":"),n=i.substring(0,o).trim().toLowerCase(),r=i.substring(o+1).trim(),!(!n||t[n]&&nc[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ir=Symbol("internals");function ut(e){return e&&String(e).trim().toLowerCase()}function Ht(e){return e===!1||e==null?e:w.isArray(e)?e.map(Ht):String(e)}function oc(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 sc=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Sn(e,t,n,r,o){if(w.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!w.isString(t)){if(w.isString(r))return t.indexOf(r)!==-1;if(w.isRegExp(r))return r.test(t)}}function ic(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function ac(e,t){const n=w.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,i){return this[r].call(this,t,o,s,i)},configurable:!0})})}let se=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(a,l,c){const u=ut(l);if(!u)throw new Error("header name must be a non-empty string");const d=w.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=Ht(a))}const i=(a,l)=>w.forEach(a,(c,u)=>s(c,u,l));if(w.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(w.isString(t)&&(t=t.trim())&&!sc(t))i(rc(t),n);else if(w.isObject(t)&&w.isIterable(t)){let a={},l,c;for(const u of t){if(!w.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?w.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}i(a,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=ut(t),t){const r=w.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return oc(o);if(w.isFunction(n))return n.call(this,o,r);if(w.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ut(t),t){const r=w.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Sn(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(i){if(i=ut(i),i){const a=w.findKey(r,i);a&&(!n||Sn(r,r[a],a,n))&&(delete r[a],o=!0)}}return w.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Sn(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return w.forEach(this,(o,s)=>{const i=w.findKey(r,s);if(i){n[i]=Ht(o),delete n[s];return}const a=t?ic(s):String(s).trim();a!==s&&delete n[s],n[a]=Ht(o),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return w.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&w.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(`
|
|
3
|
+
`)}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(o=>r.set(o)),r}static accessor(t){const r=(this[Ir]=this[Ir]={accessors:{}}).accessors,o=this.prototype;function s(i){const a=ut(i);r[a]||(ac(o,i),r[a]=!0)}return w.isArray(t)?t.forEach(s):s(t),this}};se.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);w.reduceDescriptors(se.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});w.freezeMethods(se);function En(e,t){const n=this||St,r=t||n,o=se.from(r.headers);let s=r.data;return w.forEach(e,function(a){s=a.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Wo(e){return!!(e&&e.__CANCEL__)}function rt(e,t,n){j.call(this,e??"canceled",j.ERR_CANCELED,t,n),this.name="CanceledError"}w.inherits(rt,j,{__CANCEL__:!0});function Ko(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new j("Request failed with status code "+n.status,[j.ERR_BAD_REQUEST,j.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function cc(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function lc(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,i;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[s];i||(i=c),n[o]=l,r[o]=c;let d=s,h=0;for(;d!==o;)h+=n[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),c-i<t)return;const v=u&&c-u;return v?Math.round(h*1e3/v):void 0}}function uc(e,t){let n=0,r=1e3/t,o,s;const i=(c,u=Date.now())=>{n=u,o=null,s&&(clearTimeout(s),s=null),e(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?i(c,u):(o=c,s||(s=setTimeout(()=>{s=null,i(o)},r-d)))},()=>o&&i(o)]}const Zt=(e,t,n=3)=>{let r=0;const o=lc(50,250);return uc(s=>{const i=s.loaded,a=s.lengthComputable?s.total:void 0,l=i-r,c=o(l),u=i<=a;r=i;const d={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-i)/c:void 0,event:s,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},Dr=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},jr=e=>(...t)=>w.asap(()=>e(...t)),dc=ne.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ne.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ne.origin),ne.navigator&&/(msie|trident)/i.test(ne.navigator.userAgent)):()=>!0,fc=ne.hasStandardBrowserEnv?{write(e,t,n,r,o,s,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];w.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),w.isString(r)&&a.push(`path=${r}`),w.isString(o)&&a.push(`domain=${o}`),s===!0&&a.push("secure"),w.isString(i)&&a.push(`SameSite=${i}`),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 pc(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function mc(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Go(e,t,n){let r=!pc(t);return e&&(r||n==!1)?mc(e,t):t}const Lr=e=>e instanceof se?{...e}:e;function Fe(e,t){t=t||{};const n={};function r(c,u,d,h){return w.isPlainObject(c)&&w.isPlainObject(u)?w.merge.call({caseless:h},c,u):w.isPlainObject(u)?w.merge({},u):w.isArray(u)?u.slice():u}function o(c,u,d,h){if(w.isUndefined(u)){if(!w.isUndefined(c))return r(void 0,c,d,h)}else return r(c,u,d,h)}function s(c,u){if(!w.isUndefined(u))return r(void 0,u)}function i(c,u){if(w.isUndefined(u)){if(!w.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(c,u,d)=>o(Lr(c),Lr(u),d,!0)};return w.forEach(Object.keys({...e,...t}),function(u){const d=l[u]||o,h=d(e[u],t[u],u);w.isUndefined(h)&&d!==a||(n[u]=h)}),n}const qo=e=>{const t=Fe({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;if(t.headers=i=se.from(i),t.url=Ho(Go(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),w.isFormData(n)){if(ne.hasStandardBrowserEnv||ne.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(w.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&i.set(u,d)})}}if(ne.hasStandardBrowserEnv&&(r&&w.isFunction(r)&&(r=r(t)),r||r!==!1&&dc(t.url))){const l=o&&s&&fc.read(s);l&&i.set(o,l)}return t},hc=typeof XMLHttpRequest<"u",gc=hc&&function(e){return new Promise(function(n,r){const o=qo(e);let s=o.data;const i=se.from(o.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=o,u,d,h,v,m;function p(){v&&v(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let g=new XMLHttpRequest;g.open(o.method.toUpperCase(),o.url,!0),g.timeout=o.timeout;function y(){if(!g)return;const C=se.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?g.responseText:g.response,status:g.status,statusText:g.statusText,headers:C,config:e,request:g};Ko(function(k){n(k),p()},function(k){r(k),p()},E),g=null}"onloadend"in g?g.onloadend=y:g.onreadystatechange=function(){!g||g.readyState!==4||g.status===0&&!(g.responseURL&&g.responseURL.indexOf("file:")===0)||setTimeout(y)},g.onabort=function(){g&&(r(new j("Request aborted",j.ECONNABORTED,e,g)),g=null)},g.onerror=function(S){const E=S&&S.message?S.message:"Network Error",_=new j(E,j.ERR_NETWORK,e,g);_.event=S||null,r(_),g=null},g.ontimeout=function(){let S=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const E=o.transitional||zo;o.timeoutErrorMessage&&(S=o.timeoutErrorMessage),r(new j(S,E.clarifyTimeoutError?j.ETIMEDOUT:j.ECONNABORTED,e,g)),g=null},s===void 0&&i.setContentType(null),"setRequestHeader"in g&&w.forEach(i.toJSON(),function(S,E){g.setRequestHeader(E,S)}),w.isUndefined(o.withCredentials)||(g.withCredentials=!!o.withCredentials),a&&a!=="json"&&(g.responseType=o.responseType),c&&([h,m]=Zt(c,!0),g.addEventListener("progress",h)),l&&g.upload&&([d,v]=Zt(l),g.upload.addEventListener("progress",d),g.upload.addEventListener("loadend",v)),(o.cancelToken||o.signal)&&(u=C=>{g&&(r(!C||C.type?new rt(null,e,g):C),g.abort(),g=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const x=cc(o.url);if(x&&ne.protocols.indexOf(x)===-1){r(new j("Unsupported protocol "+x+":",j.ERR_BAD_REQUEST,e));return}g.send(s||null)})},bc=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(c){if(!o){o=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof j?u:new rt(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,s(new j(`timeout ${t} of ms exceeded`,j.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),e=null)};e.forEach(c=>c.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>w.asap(a),l}},vc=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},wc=async function*(e,t){for await(const n of yc(e))yield*vc(n,t)},yc=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()}},Fr=(e,t,n,r)=>{const o=wc(e,t);let s=0,i,a=l=>{i||(i=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let h=s+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),o.return()}},{highWaterMark:2})},$r=64*1024,{isFunction:Tt}=w,xc=(({Request:e,Response:t})=>({Request:e,Response:t}))(w.global),{ReadableStream:Br,TextEncoder:Ur}=w.global,Hr=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Cc=e=>{e=w.merge.call({skipUndefined:!0},xc,e);const{fetch:t,Request:n,Response:r}=e,o=t?Tt(t):typeof fetch=="function",s=Tt(n),i=Tt(r);if(!o)return!1;const a=o&&Tt(Br),l=o&&(typeof Ur=="function"?(m=>p=>m.encode(p))(new Ur):async m=>new Uint8Array(await new n(m).arrayBuffer())),c=s&&a&&Hr(()=>{let m=!1;const p=new n(ne.origin,{body:new Br,method:"POST",get duplex(){return m=!0,"half"}}).headers.has("Content-Type");return m&&!p}),u=i&&a&&Hr(()=>w.isReadableStream(new r("").body)),d={stream:u&&(m=>m.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(m=>{!d[m]&&(d[m]=(p,g)=>{let y=p&&p[m];if(y)return y.call(p);throw new j(`Response type '${m}' is not supported`,j.ERR_NOT_SUPPORT,g)})});const h=async m=>{if(m==null)return 0;if(w.isBlob(m))return m.size;if(w.isSpecCompliantForm(m))return(await new n(ne.origin,{method:"POST",body:m}).arrayBuffer()).byteLength;if(w.isArrayBufferView(m)||w.isArrayBuffer(m))return m.byteLength;if(w.isURLSearchParams(m)&&(m=m+""),w.isString(m))return(await l(m)).byteLength},v=async(m,p)=>{const g=w.toFiniteNumber(m.getContentLength());return g??h(p)};return async m=>{let{url:p,method:g,data:y,signal:x,cancelToken:C,timeout:S,onDownloadProgress:E,onUploadProgress:_,responseType:k,headers:A,withCredentials:N="same-origin",fetchOptions:D}=qo(m),H=t||fetch;k=k?(k+"").toLowerCase():"text";let z=bc([x,C&&C.toAbortSignal()],S),V=null;const B=z&&z.unsubscribe&&(()=>{z.unsubscribe()});let K;try{if(_&&c&&g!=="get"&&g!=="head"&&(K=await v(A,y))!==0){let Z=new n(p,{method:"POST",body:y,duplex:"half"}),ee;if(w.isFormData(y)&&(ee=Z.headers.get("content-type"))&&A.setContentType(ee),Z.body){const[G,q]=Dr(K,Zt(jr(_)));y=Fr(Z.body,$r,G,q)}}w.isString(N)||(N=N?"include":"omit");const I=s&&"credentials"in n.prototype,W={...D,signal:z,method:g.toUpperCase(),headers:A.normalize().toJSON(),body:y,duplex:"half",credentials:I?N:void 0};V=s&&new n(p,W);let R=await(s?H(V,D):H(p,W));const T=u&&(k==="stream"||k==="response");if(u&&(E||T&&B)){const Z={};["status","statusText","headers"].forEach(ue=>{Z[ue]=R[ue]});const ee=w.toFiniteNumber(R.headers.get("content-length")),[G,q]=E&&Dr(ee,Zt(jr(E),!0))||[];R=new r(Fr(R.body,$r,G,()=>{q&&q(),B&&B()}),Z)}k=k||"text";let J=await d[w.findKey(d,k)||"text"](R,m);return!T&&B&&B(),await new Promise((Z,ee)=>{Ko(Z,ee,{data:J,headers:se.from(R.headers),status:R.status,statusText:R.statusText,config:m,request:V})})}catch(I){throw B&&B(),I&&I.name==="TypeError"&&/Load failed|fetch/i.test(I.message)?Object.assign(new j("Network Error",j.ERR_NETWORK,m,V),{cause:I.cause||I}):j.from(I,I&&I.code,m,V)}}},Sc=new Map,Xo=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let i=s.length,a=i,l,c,u=Sc;for(;a--;)l=s[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:Cc(t)),u=c;return c};Xo();const ir={http:Ba,xhr:gc,fetch:{get:Xo}};w.forEach(ir,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const zr=e=>`- ${e}`,Ec=e=>w.isFunction(e)||e===null||e===!1;function Rc(e,t){e=w.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i<n;i++){r=e[i];let a;if(o=r,!Ec(r)&&(o=ir[(a=String(r)).toLowerCase()],o===void 0))throw new j(`Unknown adapter '${a}'`);if(o&&(w.isFunction(o)||(o=o.get(t))))break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
|
|
4
|
+
`+i.map(zr).join(`
|
|
5
|
+
`):" "+zr(i[0]):"as no adapter specified";throw new j("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o}const Jo={getAdapter:Rc,adapters:ir};function Rn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new rt(null,e)}function Vr(e){return Rn(e),e.headers=se.from(e.headers),e.data=En.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Jo.getAdapter(e.adapter||St.adapter,e)(e).then(function(r){return Rn(e),r.data=En.call(e,e.transformResponse,r),r.headers=se.from(r.headers),r},function(r){return Wo(r)||(Rn(e),r&&r.response&&(r.response.data=En.call(e,e.transformResponse,r.response),r.response.headers=se.from(r.response.headers))),Promise.reject(r)})}const Zo="1.13.2",fn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fn[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Wr={};fn.transitional=function(t,n,r){function o(s,i){return"[Axios v"+Zo+"] Transitional option '"+s+"'"+i+(r?". "+r:"")}return(s,i,a)=>{if(t===!1)throw new j(o(i," has been removed"+(n?" in "+n:"")),j.ERR_DEPRECATED);return n&&!Wr[i]&&(Wr[i]=!0,console.warn(o(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,i,a):!0}};fn.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function Ac(e,t,n){if(typeof e!="object")throw new j("options must be an object",j.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const a=e[s],l=a===void 0||i(a,s,e);if(l!==!0)throw new j("option "+s+" must be "+l,j.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new j("Unknown option "+s,j.ERR_BAD_OPTION)}}const zt={assertOptions:Ac,validators:fn},ge=zt.validators;let Le=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Nr,response:new Nr}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?s&&!String(r.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
6
|
+
`+s):r.stack=s}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Fe(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&zt.assertOptions(r,{silentJSONParsing:ge.transitional(ge.boolean),forcedJSONParsing:ge.transitional(ge.boolean),clarifyTimeoutError:ge.transitional(ge.boolean)},!1),o!=null&&(w.isFunction(o)?n.paramsSerializer={serialize:o}:zt.assertOptions(o,{encode:ge.function,serialize:ge.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),zt.assertOptions(n,{baseUrl:ge.spelling("baseURL"),withXsrfToken:ge.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=s&&w.merge(s.common,s[n.method]);s&&w.forEach(["delete","get","head","post","put","patch","common"],m=>{delete s[m]}),n.headers=se.concat(i,s);const a=[];let l=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(l=l&&p.synchronous,a.unshift(p.fulfilled,p.rejected))});const c=[];this.interceptors.response.forEach(function(p){c.push(p.fulfilled,p.rejected)});let u,d=0,h;if(!l){const m=[Vr.bind(this),void 0];for(m.unshift(...a),m.push(...c),h=m.length,u=Promise.resolve(n);d<h;)u=u.then(m[d++],m[d++]);return u}h=a.length;let v=n;for(;d<h;){const m=a[d++],p=a[d++];try{v=m(v)}catch(g){p.call(this,g);break}}try{u=Vr.call(this,v)}catch(m){return Promise.reject(m)}for(d=0,h=c.length;d<h;)u=u.then(c[d++],c[d++]);return u}getUri(t){t=Fe(this.defaults,t);const n=Go(t.baseURL,t.url,t.allowAbsoluteUrls);return Ho(n,t.params,t.paramsSerializer)}};w.forEach(["delete","get","head","options"],function(t){Le.prototype[t]=function(n,r){return this.request(Fe(r||{},{method:t,url:n,data:(r||{}).data}))}});w.forEach(["post","put","patch"],function(t){function n(r){return function(s,i,a){return this.request(Fe(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:i}))}}Le.prototype[t]=n(),Le.prototype[t+"Form"]=n(!0)});let kc=class Yo{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const i=new Promise(a=>{r.subscribe(a),s=a}).then(o);return i.cancel=function(){r.unsubscribe(s)},i},t(function(s,i,a){r.reason||(r.reason=new rt(s,i,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 Yo(function(o){t=o}),cancel:t}}};function _c(e){return function(n){return e.apply(null,n)}}function Pc(e){return w.isObject(e)&&e.isAxiosError===!0}const zn={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(zn).forEach(([e,t])=>{zn[t]=e});function Qo(e){const t=new Le(e),n=Oo(Le.prototype.request,t);return w.extend(n,Le.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Qo(Fe(e,o))},n}const Y=Qo(St);Y.Axios=Le;Y.CanceledError=rt;Y.CancelToken=kc;Y.isCancel=Wo;Y.VERSION=Zo;Y.toFormData=dn;Y.AxiosError=j;Y.Cancel=Y.CanceledError;Y.all=function(t){return Promise.all(t)};Y.spread=_c;Y.isAxiosError=Pc;Y.mergeConfig=Fe;Y.AxiosHeaders=se;Y.formToJSON=e=>Vo(w.isHTMLForm(e)?new FormData(e):e);Y.getAdapter=Jo.getAdapter;Y.HttpStatusCode=zn;Y.default=Y;const{Axios:Pm,AxiosError:Om,CanceledError:Tm,isCancel:Mm,CancelToken:Nm,VERSION:Im,all:Dm,Cancel:jm,isAxiosError:Lm,spread:Fm,toFormData:$m,AxiosHeaders:Bm,HttpStatusCode:Um,formToJSON:Hm,getAdapter:zm,mergeConfig:Vm}=Y;function $(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}function Kr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function pn(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Kr(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Kr(e[o],null)}}}}function re(...e){return f.useCallback(pn(...e),e)}function ot(e,t=[]){let n=[];function r(s,i){const a=f.createContext(i),l=n.length;n=[...n,i];const c=d=>{const{scope:h,children:v,...m}=d,p=h?.[e]?.[l]||a,g=f.useMemo(()=>m,Object.values(m));return b.jsx(p.Provider,{value:g,children:v})};c.displayName=s+"Provider";function u(d,h){const v=h?.[e]?.[l]||a,m=f.useContext(v);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=n.map(i=>f.createContext(i));return function(a){const l=a?.[e]||s;return f.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,Oc(o,...t)]}function Oc(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const i=r.reduce((a,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...a,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Pe=globalThis?.document?f.useLayoutEffect:()=>{},Tc=f[" useInsertionEffect ".trim().toString()]||Pe;function es({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=Mc({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const u=f.useRef(e!==void 0);f.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"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.`),u.current=a},[a,r])}const c=f.useCallback(u=>{if(a){const d=Nc(u)?u(e):u;d!==e&&i.current?.(d)}else s(u)},[a,e,s,i]);return[l,c]}function Mc({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),s=f.useRef(t);return Tc(()=>{s.current=t},[t]),f.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function Nc(e){return typeof e=="function"}function ht(e){const t=Ic(e),n=f.forwardRef((r,o)=>{const{children:s,...i}=r,a=f.Children.toArray(s),l=a.find(jc);if(l){const c=l.props.children,u=a.map(d=>d===l?f.Children.count(c)>1?f.Children.only(null):f.isValidElement(c)?c.props.children:null:d);return b.jsx(t,{...i,ref:o,children:f.isValidElement(c)?f.cloneElement(c,void 0,u):null})}return b.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Ic(e){const t=f.forwardRef((n,r)=>{const{children:o,...s}=n;if(f.isValidElement(o)){const i=Fc(o),a=Lc(s,o.props);return o.type!==f.Fragment&&(a.ref=r?pn(r,i):i),f.cloneElement(o,a)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Dc=Symbol("radix.slottable");function jc(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Dc}function Lc(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Fc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var $c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],te=$c.reduce((e,t)=>{const n=ht(`Primitive.${t}`),r=f.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ts(e,t){e&&Po.flushSync(()=>e.dispatchEvent(t))}function ns(e){const t=e+"CollectionProvider",[n,r]=ot(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:g,children:y}=p,x=F.useRef(null),C=F.useRef(new Map).current;return b.jsx(o,{scope:g,itemMap:C,collectionRef:x,children:y})};i.displayName=t;const a=e+"CollectionSlot",l=ht(a),c=F.forwardRef((p,g)=>{const{scope:y,children:x}=p,C=s(a,y),S=re(g,C.collectionRef);return b.jsx(l,{ref:S,children:x})});c.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=ht(u),v=F.forwardRef((p,g)=>{const{scope:y,children:x,...C}=p,S=F.useRef(null),E=re(g,S),_=s(u,y);return F.useEffect(()=>(_.itemMap.set(S,{ref:S,...C}),()=>void _.itemMap.delete(S))),b.jsx(h,{[d]:"",ref:E,children:x})});v.displayName=u;function m(p){const g=s(e+"CollectionConsumer",p);return F.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const C=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((_,k)=>C.indexOf(_.ref.current)-C.indexOf(k.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:c,ItemSlot:v},m,r]}var Bc=f.createContext(void 0);function Uc(e){const t=f.useContext(Bc);return e||t||"ltr"}function Oe(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>t.current?.(...n),[])}function Hc(e,t=globalThis?.document){const n=Oe(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var zc="DismissableLayer",Vn="dismissableLayer.update",Vc="dismissableLayer.pointerDownOutside",Wc="dismissableLayer.focusOutside",Gr,rs=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ar=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=f.useContext(rs),[u,d]=f.useState(null),h=u?.ownerDocument??globalThis?.document,[,v]=f.useState({}),m=re(t,k=>d(k)),p=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=p.indexOf(g),x=u?p.indexOf(u):-1,C=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,E=qc(k=>{const A=k.target,N=[...c.branches].some(D=>D.contains(A));!S||N||(o?.(k),i?.(k),k.defaultPrevented||a?.())},h),_=Xc(k=>{const A=k.target;[...c.branches].some(D=>D.contains(A))||(s?.(k),i?.(k),k.defaultPrevented||a?.())},h);return Hc(k=>{x===c.layers.size-1&&(r?.(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},h),f.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Gr=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),qr(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Gr)}},[u,h,n,c]),f.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),qr())},[u,c]),f.useEffect(()=>{const k=()=>v({});return document.addEventListener(Vn,k),()=>document.removeEventListener(Vn,k)},[]),b.jsx(te.div,{...l,ref:m,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:$(e.onFocusCapture,_.onFocusCapture),onBlurCapture:$(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:$(e.onPointerDownCapture,E.onPointerDownCapture)})});ar.displayName=zc;var Kc="DismissableLayerBranch",Gc=f.forwardRef((e,t)=>{const n=f.useContext(rs),r=f.useRef(null),o=re(t,r);return f.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),b.jsx(te.div,{...e,ref:o})});Gc.displayName=Kc;function qc(e,t=globalThis?.document){const n=Oe(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){os(Vc,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Xc(e,t=globalThis?.document){const n=Oe(e),r=f.useRef(!1);return f.useEffect(()=>{const o=s=>{s.target&&!r.current&&os(Wc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function qr(){const e=new CustomEvent(Vn);document.dispatchEvent(e)}function os(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ts(o,s):o.dispatchEvent(s)}var An=0;function ss(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Xr()),document.body.insertAdjacentElement("beforeend",e[1]??Xr()),An++,()=>{An===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),An--}},[])}function Xr(){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 kn="focusScope.autoFocusOnMount",_n="focusScope.autoFocusOnUnmount",Jr={bubbles:!1,cancelable:!0},Jc="FocusScope",cr=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=f.useState(null),c=Oe(o),u=Oe(s),d=f.useRef(null),h=re(t,p=>l(p)),v=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let p=function(C){if(v.paused||!a)return;const S=C.target;a.contains(S)?d.current=S:ke(d.current,{select:!0})},g=function(C){if(v.paused||!a)return;const S=C.relatedTarget;S!==null&&(a.contains(S)||ke(d.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&ke(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",g);const x=new MutationObserver(y);return a&&x.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",g),x.disconnect()}}},[r,a,v.paused]),f.useEffect(()=>{if(a){Yr.add(v);const p=document.activeElement;if(!a.contains(p)){const y=new CustomEvent(kn,Jr);a.addEventListener(kn,c),a.dispatchEvent(y),y.defaultPrevented||(Zc(nl(is(a)),{select:!0}),document.activeElement===p&&ke(a))}return()=>{a.removeEventListener(kn,c),setTimeout(()=>{const y=new CustomEvent(_n,Jr);a.addEventListener(_n,u),a.dispatchEvent(y),y.defaultPrevented||ke(p??document.body,{select:!0}),a.removeEventListener(_n,u),Yr.remove(v)},0)}}},[a,c,u,v]);const m=f.useCallback(p=>{if(!n&&!r||v.paused)return;const g=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,y=document.activeElement;if(g&&y){const x=p.currentTarget,[C,S]=Yc(x);C&&S?!p.shiftKey&&y===S?(p.preventDefault(),n&&ke(C,{select:!0})):p.shiftKey&&y===C&&(p.preventDefault(),n&&ke(S,{select:!0})):y===x&&p.preventDefault()}},[n,r,v.paused]);return b.jsx(te.div,{tabIndex:-1,...i,ref:h,onKeyDown:m})});cr.displayName=Jc;function Zc(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ke(r,{select:t}),document.activeElement!==n)return}function Yc(e){const t=is(e),n=Zr(t,e),r=Zr(t.reverse(),e);return[n,r]}function is(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Zr(e,t){for(const n of e)if(!Qc(n,{upTo:t}))return n}function Qc(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 el(e){return e instanceof HTMLInputElement&&"select"in e}function ke(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&el(e)&&t&&e.select()}}var Yr=tl();function tl(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Qr(e,t),e.unshift(t)},remove(t){e=Qr(e,t),e[0]?.resume()}}}function Qr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function nl(e){return e.filter(t=>t.tagName!=="A")}var rl=f[" useId ".trim().toString()]||(()=>{}),ol=0;function as(e){const[t,n]=f.useState(rl());return Pe(()=>{n(r=>r??String(ol++))},[e]),e||(t?`radix-${t}`:"")}const sl=["top","right","bottom","left"],Te=Math.min,ce=Math.max,Yt=Math.round,Mt=Math.floor,we=e=>({x:e,y:e}),il={left:"right",right:"left",bottom:"top",top:"bottom"},al={start:"end",end:"start"};function Wn(e,t,n){return ce(e,Te(t,n))}function Se(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function st(e){return e.split("-")[1]}function lr(e){return e==="x"?"y":"x"}function ur(e){return e==="y"?"height":"width"}const cl=new Set(["top","bottom"]);function ve(e){return cl.has(Ee(e))?"y":"x"}function dr(e){return lr(ve(e))}function ll(e,t,n){n===void 0&&(n=!1);const r=st(e),o=dr(e),s=ur(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Qt(i)),[i,Qt(i)]}function ul(e){const t=Qt(e);return[Kn(e),t,Kn(t)]}function Kn(e){return e.replace(/start|end/g,t=>al[t])}const eo=["left","right"],to=["right","left"],dl=["top","bottom"],fl=["bottom","top"];function pl(e,t,n){switch(e){case"top":case"bottom":return n?t?to:eo:t?eo:to;case"left":case"right":return t?dl:fl;default:return[]}}function ml(e,t,n,r){const o=st(e);let s=pl(Ee(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Kn)))),s}function Qt(e){return e.replace(/left|right|bottom|top/g,t=>il[t])}function hl(e){return{top:0,right:0,bottom:0,left:0,...e}}function cs(e){return typeof e!="number"?hl(e):{top:e,right:e,bottom:e,left:e}}function en(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function no(e,t,n){let{reference:r,floating:o}=e;const s=ve(t),i=dr(t),a=ur(i),l=Ee(t),c=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let v;switch(l){case"top":v={x:u,y:r.y-o.height};break;case"bottom":v={x:u,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:d};break;case"left":v={x:r.x-o.width,y:d};break;default:v={x:r.x,y:r.y}}switch(st(t)){case"start":v[i]-=h*(n&&c?-1:1);break;case"end":v[i]+=h*(n&&c?-1:1);break}return v}const gl=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=no(c,r,l),h=r,v={},m=0;for(let p=0;p<a.length;p++){const{name:g,fn:y}=a[p],{x,y:C,data:S,reset:E}=await y({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:v,rects:c,platform:i,elements:{reference:e,floating:t}});u=x??u,d=C??d,v={...v,[g]:{...v[g],...S}},E&&m<=50&&(m++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(c=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:d}=no(c,h,l)),p=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:v}};async function gt(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:v=0}=Se(t,e),m=cs(v),g=a[h?d==="floating"?"reference":"floating":d],y=en(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(C))?await(s.getScale==null?void 0:s.getScale(C))||{x:1,y:1}:{x:1,y:1},E=en(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:x,offsetParent:C,strategy:l}):x);return{top:(y.top-E.top+m.top)/S.y,bottom:(E.bottom-y.bottom+m.bottom)/S.y,left:(y.left-E.left+m.left)/S.x,right:(E.right-y.right+m.right)/S.x}}const bl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Se(e,t)||{};if(c==null)return{};const d=cs(u),h={x:n,y:r},v=dr(o),m=ur(v),p=await i.getDimensions(c),g=v==="y",y=g?"top":"left",x=g?"bottom":"right",C=g?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[v]-h[v]-s.floating[m],E=h[v]-s.reference[v],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let k=_?_[C]:0;(!k||!await(i.isElement==null?void 0:i.isElement(_)))&&(k=a.floating[C]||s.floating[m]);const A=S/2-E/2,N=k/2-p[m]/2-1,D=Te(d[y],N),H=Te(d[x],N),z=D,V=k-p[m]-H,B=k/2-p[m]/2+A,K=Wn(z,B,V),I=!l.arrow&&st(o)!=null&&B!==K&&s.reference[m]/2-(B<z?D:H)-p[m]/2<0,W=I?B<z?B-z:B-V:0;return{[v]:h[v]+W,data:{[v]:K,centerOffset:B-K-W,...I&&{alignmentOffset:W}},reset:I}}}),vl=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:p=!0,...g}=Se(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Ee(o),x=ve(a),C=Ee(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),E=h||(C||!p?[Qt(a)]:ul(a)),_=m!=="none";!h&&_&&E.push(...ml(a,p,m,S));const k=[a,...E],A=await gt(t,g),N=[];let D=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&N.push(A[y]),d){const B=ll(o,i,S);N.push(A[B[0]],A[B[1]])}if(D=[...D,{placement:o,overflows:N}],!N.every(B=>B<=0)){var H,z;const B=(((H=s.flip)==null?void 0:H.index)||0)+1,K=k[B];if(K&&(!(d==="alignment"?x!==ve(K):!1)||D.every(R=>ve(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:B,overflows:D},reset:{placement:K}};let I=(z=D.filter(W=>W.overflows[0]<=0).sort((W,R)=>W.overflows[1]-R.overflows[1])[0])==null?void 0:z.placement;if(!I)switch(v){case"bestFit":{var V;const W=(V=D.filter(R=>{if(_){const T=ve(R.placement);return T===x||T==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(T=>T>0).reduce((T,J)=>T+J,0)]).sort((R,T)=>R[1]-T[1])[0])==null?void 0:V[0];W&&(I=W);break}case"initialPlacement":I=a;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function ro(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oo(e){return sl.some(t=>e[t]>=0)}const wl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Se(e,t);switch(r){case"referenceHidden":{const s=await gt(t,{...o,elementContext:"reference"}),i=ro(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:oo(i)}}}case"escaped":{const s=await gt(t,{...o,altBoundary:!0}),i=ro(s,n.floating);return{data:{escapedOffsets:i,escaped:oo(i)}}}default:return{}}}}},ls=new Set(["left","top"]);async function yl(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ee(n),a=st(n),l=ve(n)==="y",c=ls.has(i)?-1:1,u=s&&l?-1:1,d=Se(t,e);let{mainAxis:h,crossAxis:v,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(v=a==="end"?m*-1:m),l?{x:v*u,y:h*c}:{x:h*c,y:v*u}}const xl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await yl(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Cl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:g=>{let{x:y,y:x}=g;return{x:y,y:x}}},...l}=Se(e,t),c={x:n,y:r},u=await gt(t,l),d=ve(Ee(o)),h=lr(d);let v=c[h],m=c[d];if(s){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=v+u[g],C=v-u[y];v=Wn(x,v,C)}if(i){const g=d==="y"?"top":"left",y=d==="y"?"bottom":"right",x=m+u[g],C=m-u[y];m=Wn(x,m,C)}const p=a.fn({...t,[h]:v,[d]:m});return{...p,data:{x:p.x-n,y:p.y-r,enabled:{[h]:s,[d]:i}}}}}},Sl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Se(e,t),u={x:n,y:r},d=ve(o),h=lr(d);let v=u[h],m=u[d];const p=Se(a,t),g=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const C=h==="y"?"height":"width",S=s.reference[h]-s.floating[C]+g.mainAxis,E=s.reference[h]+s.reference[C]-g.mainAxis;v<S?v=S:v>E&&(v=E)}if(c){var y,x;const C=h==="y"?"width":"height",S=ls.has(Ee(o)),E=s.reference[d]-s.floating[C]+(S&&((y=i.offset)==null?void 0:y[d])||0)+(S?0:g.crossAxis),_=s.reference[d]+s.reference[C]+(S?0:((x=i.offset)==null?void 0:x[d])||0)-(S?g.crossAxis:0);m<E?m=E:m>_&&(m=_)}return{[h]:v,[d]:m}}}},El=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...c}=Se(e,t),u=await gt(t,c),d=Ee(o),h=st(o),v=ve(o)==="y",{width:m,height:p}=s.floating;let g,y;d==="top"||d==="bottom"?(g=d,y=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,g=h==="end"?"top":"bottom");const x=p-u.top-u.bottom,C=m-u.left-u.right,S=Te(p-u[g],x),E=Te(m-u[y],C),_=!t.middlewareData.shift;let k=S,A=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(A=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(k=x),_&&!h){const D=ce(u.left,0),H=ce(u.right,0),z=ce(u.top,0),V=ce(u.bottom,0);v?A=m-2*(D!==0||H!==0?D+H:ce(u.left,u.right)):k=p-2*(z!==0||V!==0?z+V:ce(u.top,u.bottom))}await l({...t,availableWidth:A,availableHeight:k});const N=await i.getDimensions(a.floating);return m!==N.width||p!==N.height?{reset:{rects:!0}}:{}}}};function mn(){return typeof window<"u"}function it(e){return us(e)?(e.nodeName||"").toLowerCase():"#document"}function le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xe(e){var t;return(t=(us(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function us(e){return mn()?e instanceof Node||e instanceof le(e).Node:!1}function fe(e){return mn()?e instanceof Element||e instanceof le(e).Element:!1}function ye(e){return mn()?e instanceof HTMLElement||e instanceof le(e).HTMLElement:!1}function so(e){return!mn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof le(e).ShadowRoot}const Rl=new Set(["inline","contents"]);function Et(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pe(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Rl.has(o)}const Al=new Set(["table","td","th"]);function kl(e){return Al.has(it(e))}const _l=[":popover-open",":modal"];function hn(e){return _l.some(t=>{try{return e.matches(t)}catch{return!1}})}const Pl=["transform","translate","scale","rotate","perspective"],Ol=["transform","translate","scale","rotate","perspective","filter"],Tl=["paint","layout","strict","content"];function fr(e){const t=pr(),n=fe(e)?pe(e):e;return Pl.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Ol.some(r=>(n.willChange||"").includes(r))||Tl.some(r=>(n.contain||"").includes(r))}function Ml(e){let t=Me(e);for(;ye(t)&&!et(t);){if(fr(t))return t;if(hn(t))return null;t=Me(t)}return null}function pr(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Nl=new Set(["html","body","#document"]);function et(e){return Nl.has(it(e))}function pe(e){return le(e).getComputedStyle(e)}function gn(e){return fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Me(e){if(it(e)==="html")return e;const t=e.assignedSlot||e.parentNode||so(e)&&e.host||xe(e);return so(t)?t.host:t}function ds(e){const t=Me(e);return et(t)?e.ownerDocument?e.ownerDocument.body:e.body:ye(t)&&Et(t)?t:ds(t)}function bt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ds(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=le(o);if(s){const a=Gn(i);return t.concat(i,i.visualViewport||[],Et(o)?o:[],a&&n?bt(a):[])}return t.concat(o,bt(o,[],n))}function Gn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fs(e){const t=pe(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ye(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Yt(n)!==s||Yt(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function mr(e){return fe(e)?e:e.contextElement}function Ze(e){const t=mr(e);if(!ye(t))return we(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=fs(t);let i=(s?Yt(n.width):n.width)/r,a=(s?Yt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const Il=we(0);function ps(e){const t=le(e);return!pr()||!t.visualViewport?Il:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Dl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==le(e)?!1:t}function $e(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=mr(e);let i=we(1);t&&(r?fe(r)&&(i=Ze(r)):i=Ze(e));const a=Dl(s,n,r)?ps(s):we(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const h=le(s),v=r&&fe(r)?le(r):r;let m=h,p=Gn(m);for(;p&&r&&v!==m;){const g=Ze(p),y=p.getBoundingClientRect(),x=pe(p),C=y.left+(p.clientLeft+parseFloat(x.paddingLeft))*g.x,S=y.top+(p.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=C,c+=S,m=le(p),p=Gn(m)}}return en({width:u,height:d,x:l,y:c})}function bn(e,t){const n=gn(e).scrollLeft;return t?t.left+n:$e(xe(e)).left+n}function ms(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-bn(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function jl(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=xe(r),a=t?hn(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=we(1);const u=we(0),d=ye(r);if((d||!d&&!s)&&((it(r)!=="body"||Et(i))&&(l=gn(r)),ye(r))){const v=$e(r);c=Ze(r),u.x=v.x+r.clientLeft,u.y=v.y+r.clientTop}const h=i&&!d&&!s?ms(i,l):we(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function Ll(e){return Array.from(e.getClientRects())}function Fl(e){const t=xe(e),n=gn(e),r=e.ownerDocument.body,o=ce(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ce(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+bn(e);const a=-n.scrollTop;return pe(r).direction==="rtl"&&(i+=ce(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const io=25;function $l(e,t){const n=le(e),r=xe(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const u=pr();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=bn(r);if(c<=0){const u=r.ownerDocument,d=u.body,h=getComputedStyle(d),v=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,m=Math.abs(r.clientWidth-d.clientWidth-v);m<=io&&(s-=m)}else c<=io&&(s+=c);return{width:s,height:i,x:a,y:l}}const Bl=new Set(["absolute","fixed"]);function Ul(e,t){const n=$e(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ye(e)?Ze(e):we(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function ao(e,t,n){let r;if(t==="viewport")r=$l(e,n);else if(t==="document")r=Fl(xe(e));else if(fe(t))r=Ul(t,n);else{const o=ps(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return en(r)}function hs(e,t){const n=Me(e);return n===t||!fe(n)||et(n)?!1:pe(n).position==="fixed"||hs(n,t)}function Hl(e,t){const n=t.get(e);if(n)return n;let r=bt(e,[],!1).filter(a=>fe(a)&&it(a)!=="body"),o=null;const s=pe(e).position==="fixed";let i=s?Me(e):e;for(;fe(i)&&!et(i);){const a=pe(i),l=fr(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&Bl.has(o.position)||Et(i)&&!l&&hs(e,i))?r=r.filter(u=>u!==i):o=a,i=Me(i)}return t.set(e,r),r}function zl(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?hn(t)?[]:Hl(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const d=ao(t,u,o);return c.top=ce(d.top,c.top),c.right=Te(d.right,c.right),c.bottom=Te(d.bottom,c.bottom),c.left=ce(d.left,c.left),c},ao(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Vl(e){const{width:t,height:n}=fs(e);return{width:t,height:n}}function Wl(e,t,n){const r=ye(t),o=xe(t),s=n==="fixed",i=$e(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=we(0);function c(){l.x=bn(o)}if(r||!r&&!s)if((it(t)!=="body"||Et(o))&&(a=gn(t)),r){const v=$e(t,!0,s,t);l.x=v.x+t.clientLeft,l.y=v.y+t.clientTop}else o&&c();s&&!r&&o&&c();const u=o&&!r&&!s?ms(o,a):we(0),d=i.left+a.scrollLeft-l.x-u.x,h=i.top+a.scrollTop-l.y-u.y;return{x:d,y:h,width:i.width,height:i.height}}function Pn(e){return pe(e).position==="static"}function co(e,t){if(!ye(e)||pe(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return xe(e)===n&&(n=n.ownerDocument.body),n}function gs(e,t){const n=le(e);if(hn(e))return n;if(!ye(e)){let o=Me(e);for(;o&&!et(o);){if(fe(o)&&!Pn(o))return o;o=Me(o)}return n}let r=co(e,t);for(;r&&kl(r)&&Pn(r);)r=co(r,t);return r&&et(r)&&Pn(r)&&!fr(r)?n:r||Ml(e)||n}const Kl=async function(e){const t=this.getOffsetParent||gs,n=this.getDimensions,r=await n(e.floating);return{reference:Wl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Gl(e){return pe(e).direction==="rtl"}const ql={convertOffsetParentRelativeRectToViewportRelativeRect:jl,getDocumentElement:xe,getClippingRect:zl,getOffsetParent:gs,getElementRects:Kl,getClientRects:Ll,getDimensions:Vl,getScale:Ze,isElement:fe,isRTL:Gl};function bs(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xl(e,t){let n=null,r;const o=xe(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:d,width:h,height:v}=c;if(a||t(),!h||!v)return;const m=Mt(d),p=Mt(o.clientWidth-(u+h)),g=Mt(o.clientHeight-(d+v)),y=Mt(u),C={rootMargin:-m+"px "+-p+"px "+-g+"px "+-y+"px",threshold:ce(0,Te(1,l))||1};let S=!0;function E(_){const k=_[0].intersectionRatio;if(k!==l){if(!S)return i();k?i(!1,k):r=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!bs(c,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(E,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,C)}n.observe(e)}return i(!0),s}function Jl(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=mr(e),u=o||s?[...c?bt(c):[],...bt(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const d=c&&a?Xl(c,n):null;let h=-1,v=null;i&&(v=new ResizeObserver(y=>{let[x]=y;x&&x.target===c&&v&&(v.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=v)==null||C.observe(t)})),n()}),c&&!l&&v.observe(c),v.observe(t));let m,p=l?$e(e):null;l&&g();function g(){const y=$e(e);p&&!bs(p,y)&&n(),p=y,m=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(x=>{o&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),d?.(),(y=v)==null||y.disconnect(),v=null,l&&cancelAnimationFrame(m)}}const Zl=xl,Yl=Cl,Ql=vl,eu=El,tu=wl,lo=bl,nu=Sl,ru=(e,t,n)=>{const r=new Map,o={platform:ql,...n},s={...o.platform,_c:r};return gl(e,t,{...o,platform:s})};var ou=typeof document<"u",su=function(){},Vt=ou?F.useLayoutEffect:su;function tn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!tn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!tn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function vs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uo(e,t){const n=vs(e);return Math.round(t*n)/n}function On(e){const t=f.useRef(e);return Vt(()=>{t.current=e}),t}function iu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,v]=f.useState(r);tn(h,r)||v(r);const[m,p]=f.useState(null),[g,y]=f.useState(null),x=f.useCallback(R=>{R!==_.current&&(_.current=R,p(R))},[]),C=f.useCallback(R=>{R!==k.current&&(k.current=R,y(R))},[]),S=s||m,E=i||g,_=f.useRef(null),k=f.useRef(null),A=f.useRef(u),N=l!=null,D=On(l),H=On(o),z=On(c),V=f.useCallback(()=>{if(!_.current||!k.current)return;const R={placement:t,strategy:n,middleware:h};H.current&&(R.platform=H.current),ru(_.current,k.current,R).then(T=>{const J={...T,isPositioned:z.current!==!1};B.current&&!tn(A.current,J)&&(A.current=J,Po.flushSync(()=>{d(J)}))})},[h,t,n,H,z]);Vt(()=>{c===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(R=>({...R,isPositioned:!1})))},[c]);const B=f.useRef(!1);Vt(()=>(B.current=!0,()=>{B.current=!1}),[]),Vt(()=>{if(S&&(_.current=S),E&&(k.current=E),S&&E){if(D.current)return D.current(S,E,V);V()}},[S,E,V,D,N]);const K=f.useMemo(()=>({reference:_,floating:k,setReference:x,setFloating:C}),[x,C]),I=f.useMemo(()=>({reference:S,floating:E}),[S,E]),W=f.useMemo(()=>{const R={position:n,left:0,top:0};if(!I.floating)return R;const T=uo(I.floating,u.x),J=uo(I.floating,u.y);return a?{...R,transform:"translate("+T+"px, "+J+"px)",...vs(I.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:J}},[n,a,I.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:V,refs:K,elements:I,floatingStyles:W}),[u,V,K,I,W])}const au=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?lo({element:r.current,padding:o}).fn(n):{}:r?lo({element:r,padding:o}).fn(n):{}}}},cu=(e,t)=>({...Zl(e),options:[e,t]}),lu=(e,t)=>({...Yl(e),options:[e,t]}),uu=(e,t)=>({...nu(e),options:[e,t]}),du=(e,t)=>({...Ql(e),options:[e,t]}),fu=(e,t)=>({...eu(e),options:[e,t]}),pu=(e,t)=>({...tu(e),options:[e,t]}),mu=(e,t)=>({...au(e),options:[e,t]});var hu="Arrow",ws=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return b.jsx(te.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});ws.displayName=hu;var gu=ws;function bu(e){const[t,n]=f.useState(void 0);return Pe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var hr="Popper",[ys,vn]=ot(hr),[vu,xs]=ys(hr),Cs=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return b.jsx(vu,{scope:t,anchor:r,onAnchorChange:o,children:n})};Cs.displayName=hr;var Ss="PopperAnchor",Es=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=xs(Ss,n),i=f.useRef(null),a=re(t,i),l=f.useRef(null);return f.useEffect(()=>{const c=l.current;l.current=r?.current||i.current,c!==l.current&&s.onAnchorChange(l.current)}),r?null:b.jsx(te.div,{...o,ref:a})});Es.displayName=Ss;var gr="PopperContent",[wu,yu]=ys(gr),Rs=f.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:v="optimized",onPlaced:m,...p}=e,g=xs(gr,n),[y,x]=f.useState(null),C=re(t,U=>x(U)),[S,E]=f.useState(null),_=bu(S),k=_?.width??0,A=_?.height??0,N=r+(s!=="center"?"-"+s:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},H=Array.isArray(c)?c:[c],z=H.length>0,V={padding:D,boundary:H.filter(Cu),altBoundary:z},{refs:B,floatingStyles:K,placement:I,isPositioned:W,middlewareData:R}=iu({strategy:"fixed",placement:N,whileElementsMounted:(...U)=>Jl(...U,{animationFrame:v==="always"}),elements:{reference:g.anchor},middleware:[cu({mainAxis:o+A,alignmentAxis:i}),l&&lu({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?uu():void 0,...V}),l&&du({...V}),fu({...V,apply:({elements:U,rects:Re,availableWidth:ze,availableHeight:Ve})=>{const{width:lt,height:We}=Re.reference,Pt=U.floating.style;Pt.setProperty("--radix-popper-available-width",`${ze}px`),Pt.setProperty("--radix-popper-available-height",`${Ve}px`),Pt.setProperty("--radix-popper-anchor-width",`${lt}px`),Pt.setProperty("--radix-popper-anchor-height",`${We}px`)}}),S&&mu({element:S,padding:a}),Su({arrowWidth:k,arrowHeight:A}),h&&pu({strategy:"referenceHidden",...V})]}),[T,J]=_s(I),Z=Oe(m);Pe(()=>{W&&Z?.()},[W,Z]);const ee=R.arrow?.x,G=R.arrow?.y,q=R.arrow?.centerOffset!==0,[ue,he]=f.useState();return Pe(()=>{y&&he(window.getComputedStyle(y).zIndex)},[y]),b.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:W?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[R.transformOrigin?.x,R.transformOrigin?.y].join(" "),...R.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx(wu,{scope:n,placedSide:T,onArrowChange:E,arrowX:ee,arrowY:G,shouldHideArrow:q,children:b.jsx(te.div,{"data-side":T,"data-align":J,...p,ref:C,style:{...p.style,animation:W?void 0:"none"}})})})});Rs.displayName=gr;var As="PopperArrow",xu={top:"bottom",right:"left",bottom:"top",left:"right"},ks=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=yu(As,r),i=xu[s.placedSide];return b.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:b.jsx(gu,{...o,ref:n,style:{...o.style,display:"block"}})})});ks.displayName=As;function Cu(e){return e!==null}var Su=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,u]=_s(n),d={start:"0%",center:"50%",end:"100%"}[u],h=(o.arrow?.x??0)+a/2,v=(o.arrow?.y??0)+l/2;let m="",p="";return c==="bottom"?(m=i?d:`${h}px`,p=`${-l}px`):c==="top"?(m=i?d:`${h}px`,p=`${r.floating.height+l}px`):c==="right"?(m=`${-l}px`,p=i?d:`${v}px`):c==="left"&&(m=`${r.floating.width+l}px`,p=i?d:`${v}px`),{data:{x:m,y:p}}}});function _s(e){const[t,n="center"]=e.split("-");return[t,n]}var Eu=Cs,br=Es,Ps=Rs,Os=ks,Ru="Portal",vr=f.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=f.useState(!1);Pe(()=>s(!0),[]);const i=n||o&&globalThis?.document?.body;return i?ko.createPortal(b.jsx(te.div,{...r,ref:t}),i):null});vr.displayName=Ru;function Au(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var Be=e=>{const{present:t,children:n}=e,r=ku(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),s=re(r.ref,_u(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:s}):null};Be.displayName="Presence";function ku(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),s=f.useRef("none"),i=e?"mounted":"unmounted",[a,l]=Au(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const c=Nt(r.current);s.current=a==="mounted"?c:"none"},[a]),Pe(()=>{const c=r.current,u=o.current;if(u!==e){const h=s.current,v=Nt(c);e?l("MOUNT"):v==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&h!==v?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Pe(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,d=v=>{const p=Nt(r.current).includes(CSS.escape(v.animationName));if(v.target===t&&p&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=v=>{v.target===t&&(s.current=Nt(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:f.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Nt(e){return e?.animationName||"none"}function _u(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Tn="rovingFocusGroup.onEntryFocus",Pu={bubbles:!1,cancelable:!0},Rt="RovingFocusGroup",[qn,Ts,Ou]=ns(Rt),[Tu,Ms]=ot(Rt,[Ou]),[Mu,Nu]=Tu(Rt),Ns=f.forwardRef((e,t)=>b.jsx(qn.Provider,{scope:e.__scopeRovingFocusGroup,children:b.jsx(qn.Slot,{scope:e.__scopeRovingFocusGroup,children:b.jsx(Iu,{...e,ref:t})})}));Ns.displayName=Rt;var Iu=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,h=f.useRef(null),v=re(t,h),m=Uc(s),[p,g]=es({prop:i,defaultProp:a??null,onChange:l,caller:Rt}),[y,x]=f.useState(!1),C=Oe(c),S=Ts(n),E=f.useRef(!1),[_,k]=f.useState(0);return f.useEffect(()=>{const A=h.current;if(A)return A.addEventListener(Tn,C),()=>A.removeEventListener(Tn,C)},[C]),b.jsx(Mu,{scope:n,orientation:r,dir:m,loop:o,currentTabStopId:p,onItemFocus:f.useCallback(A=>g(A),[g]),onItemShiftTab:f.useCallback(()=>x(!0),[]),onFocusableItemAdd:f.useCallback(()=>k(A=>A+1),[]),onFocusableItemRemove:f.useCallback(()=>k(A=>A-1),[]),children:b.jsx(te.div,{tabIndex:y||_===0?-1:0,"data-orientation":r,...d,ref:v,style:{outline:"none",...e.style},onMouseDown:$(e.onMouseDown,()=>{E.current=!0}),onFocus:$(e.onFocus,A=>{const N=!E.current;if(A.target===A.currentTarget&&N&&!y){const D=new CustomEvent(Tn,Pu);if(A.currentTarget.dispatchEvent(D),!D.defaultPrevented){const H=S().filter(I=>I.focusable),z=H.find(I=>I.active),V=H.find(I=>I.id===p),K=[z,V,...H].filter(Boolean).map(I=>I.ref.current);js(K,u)}}E.current=!1}),onBlur:$(e.onBlur,()=>x(!1))})})}),Is="RovingFocusGroupItem",Ds=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=as(),c=s||l,u=Nu(Is,n),d=u.currentTabStopId===c,h=Ts(n),{onFocusableItemAdd:v,onFocusableItemRemove:m,currentTabStopId:p}=u;return f.useEffect(()=>{if(r)return v(),()=>m()},[r,v,m]),b.jsx(qn.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:b.jsx(te.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:$(e.onMouseDown,g=>{r?u.onItemFocus(c):g.preventDefault()}),onFocus:$(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:$(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=Lu(g,u.orientation,u.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let C=h().filter(S=>S.focusable).map(S=>S.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const S=C.indexOf(g.currentTarget);C=u.loop?Fu(C,S+1):C.slice(S+1)}setTimeout(()=>js(C))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:p!=null}):i})})});Ds.displayName=Is;var Du={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ju(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Lu(e,t,n){const r=ju(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Du[r]}function js(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Fu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $u=Ns,Bu=Ds,Uu=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ke=new WeakMap,It=new WeakMap,Dt={},Mn=0,Ls=function(e){return e&&(e.host||Ls(e.parentNode))},Hu=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ls(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})},zu=function(e,t,n,r){var o=Hu(t,Array.isArray(e)?e:[e]);Dt[n]||(Dt[n]=new WeakMap);var s=Dt[n],i=[],a=new Set,l=new Set(o),c=function(d){!d||a.has(d)||(a.add(d),c(d.parentNode))};o.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))u(h);else try{var v=h.getAttribute(r),m=v!==null&&v!=="false",p=(Ke.get(h)||0)+1,g=(s.get(h)||0)+1;Ke.set(h,p),s.set(h,g),i.push(h),p===1&&m&&It.set(h,!0),g===1&&h.setAttribute(n,"true"),m||h.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return u(t),a.clear(),Mn++,function(){i.forEach(function(d){var h=Ke.get(d)-1,v=s.get(d)-1;Ke.set(d,h),s.set(d,v),h||(It.has(d)||d.removeAttribute(r),It.delete(d)),v||d.removeAttribute(n)}),Mn--,Mn||(Ke=new WeakMap,Ke=new WeakMap,It=new WeakMap,Dt={})}},Fs=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Uu(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),zu(r,o,n,"aria-hidden")):function(){return null}},be=function(){return be=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},be.apply(this,arguments)};function $s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Vu(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Wt="right-scroll-bar-position",Kt="width-before-scroll-bar",Wu="with-scroll-bars-hidden",Ku="--removed-body-scroll-bar-size";function Nn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Gu(e,t){var n=F.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var qu=typeof window<"u"?f.useLayoutEffect:f.useEffect,fo=new WeakMap;function Xu(e,t){var n=Gu(null,function(r){return e.forEach(function(o){return Nn(o,r)})});return qu(function(){var r=fo.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Nn(a,null)}),s.forEach(function(a){o.has(a)||Nn(a,i)})}fo.set(n,e)},[e]),n}function Ju(e){return e}function Zu(e,t){t===void 0&&(t=Ju);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var l=function(){var u=i;i=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),n}}}};return o}function Yu(e){e===void 0&&(e={});var t=Zu(null);return t.options=be({async:!0,ssr:!1},e),t}var Bs=function(e){var t=e.sideCar,n=$s(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 f.createElement(r,be({},n))};Bs.isSideCarExport=!0;function Qu(e,t){return e.useMedium(t),Bs}var Us=Yu(),In=function(){},wn=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:In,onWheelCapture:In,onTouchMoveCapture:In}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,v=e.noRelative,m=e.noIsolation,p=e.inert,g=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,C=e.gapMode,S=$s(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=h,_=Xu([n,t]),k=be(be({},S),o);return f.createElement(f.Fragment,null,u&&f.createElement(E,{sideCar:Us,removeScrollBar:c,shards:d,noRelative:v,noIsolation:m,inert:p,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:C}),i?f.cloneElement(f.Children.only(a),be(be({},k),{ref:_})):f.createElement(x,be({},k,{className:l,ref:_}),a))});wn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};wn.classNames={fullWidth:Kt,zeroRight:Wt};var ed=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function td(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ed();return t&&e.setAttribute("nonce",t),e}function nd(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rd(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var od=function(){var e=0,t=null;return{add:function(n){e==0&&(t=td())&&(nd(t,n),rd(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},sd=function(){var e=od();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Hs=function(){var e=sd(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},id={left:0,top:0,right:0,gap:0},Dn=function(e){return parseInt(e||"",10)||0},ad=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Dn(n),Dn(r),Dn(o)]},cd=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return id;var t=ad(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])}},ld=Hs(),Ye="data-scroll-locked",ud=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
7
|
+
.`.concat(Wu,` {
|
|
8
|
+
overflow: hidden `).concat(r,`;
|
|
9
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
10
|
+
}
|
|
11
|
+
body[`).concat(Ye,`] {
|
|
12
|
+
overflow: hidden `).concat(r,`;
|
|
13
|
+
overscroll-behavior: contain;
|
|
14
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
15
|
+
padding-left: `.concat(o,`px;
|
|
16
|
+
padding-top: `).concat(s,`px;
|
|
17
|
+
padding-right: `).concat(i,`px;
|
|
18
|
+
margin-left:0;
|
|
19
|
+
margin-top:0;
|
|
20
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
21
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.`).concat(Wt,` {
|
|
25
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.`).concat(Kt,` {
|
|
29
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.`).concat(Wt," .").concat(Wt,` {
|
|
33
|
+
right: 0 `).concat(r,`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.`).concat(Kt," .").concat(Kt,` {
|
|
37
|
+
margin-right: 0 `).concat(r,`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
body[`).concat(Ye,`] {
|
|
41
|
+
`).concat(Ku,": ").concat(a,`px;
|
|
42
|
+
}
|
|
43
|
+
`)},po=function(){var e=parseInt(document.body.getAttribute(Ye)||"0",10);return isFinite(e)?e:0},dd=function(){f.useEffect(function(){return document.body.setAttribute(Ye,(po()+1).toString()),function(){var e=po()-1;e<=0?document.body.removeAttribute(Ye):document.body.setAttribute(Ye,e.toString())}},[])},fd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;dd();var s=f.useMemo(function(){return cd(o)},[o]);return f.createElement(ld,{styles:ud(s,!t,o,n?"":"!important")})},Xn=!1;if(typeof window<"u")try{var jt=Object.defineProperty({},"passive",{get:function(){return Xn=!0,!0}});window.addEventListener("test",jt,jt),window.removeEventListener("test",jt,jt)}catch{Xn=!1}var Ge=Xn?{passive:!1}:!1,pd=function(e){return e.tagName==="TEXTAREA"},zs=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!pd(e)&&n[t]==="visible")},md=function(e){return zs(e,"overflowY")},hd=function(e){return zs(e,"overflowX")},mo=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Vs(e,r);if(o){var s=Ws(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},gd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},bd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Vs=function(e,t){return e==="v"?md(t):hd(t)},Ws=function(e,t){return e==="v"?gd(t):bd(t)},vd=function(e,t){return e==="h"&&t==="rtl"?-1:1},wd=function(e,t,n,r,o){var s=vd(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),c=!1,u=i>0,d=0,h=0;do{if(!a)break;var v=Ws(e,a),m=v[0],p=v[1],g=v[2],y=p-g-s*m;(m||y)&&Vs(e,a)&&(d+=y,h+=m);var x=a.parentNode;a=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&Math.abs(d)<1||!u&&Math.abs(h)<1)&&(c=!0),c},Lt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ho=function(e){return[e.deltaX,e.deltaY]},go=function(e){return e&&"current"in e?e.current:e},yd=function(e,t){return e[0]===t[0]&&e[1]===t[1]},xd=function(e){return`
|
|
44
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
45
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
46
|
+
`)},Cd=0,qe=[];function Sd(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Cd++)[0],s=f.useState(Hs)[0],i=f.useRef(e);f.useEffect(function(){i.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var p=Vu([e.lockRef.current],(e.shards||[]).map(go),!0).filter(Boolean);return p.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),p.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=f.useCallback(function(p,g){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!i.current.allowPinchZoom;var y=Lt(p),x=n.current,C="deltaX"in p?p.deltaX:x[0]-y[0],S="deltaY"in p?p.deltaY:x[1]-y[1],E,_=p.target,k=Math.abs(C)>Math.abs(S)?"h":"v";if("touches"in p&&k==="h"&&_.type==="range")return!1;var A=window.getSelection(),N=A&&A.anchorNode,D=N?N===_||N.contains(_):!1;if(D)return!1;var H=mo(k,_);if(!H)return!0;if(H?E=k:(E=k==="v"?"h":"v",H=mo(k,_)),!H)return!1;if(!r.current&&"changedTouches"in p&&(C||S)&&(r.current=E),!E)return!0;var z=r.current||E;return wd(z,g,p,z==="h"?C:S)},[]),l=f.useCallback(function(p){var g=p;if(!(!qe.length||qe[qe.length-1]!==s)){var y="deltaY"in g?ho(g):Lt(g),x=t.current.filter(function(E){return E.name===g.type&&(E.target===g.target||g.target===E.shadowParent)&&yd(E.delta,y)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var C=(i.current.shards||[]).map(go).filter(Boolean).filter(function(E){return E.contains(g.target)}),S=C.length>0?a(g,C[0]):!i.current.noIsolation;S&&g.cancelable&&g.preventDefault()}}},[]),c=f.useCallback(function(p,g,y,x){var C={name:p,delta:g,target:y,should:x,shadowParent:Ed(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(S){return S!==C})},1)},[]),u=f.useCallback(function(p){n.current=Lt(p),r.current=void 0},[]),d=f.useCallback(function(p){c(p.type,ho(p),p.target,a(p,e.lockRef.current))},[]),h=f.useCallback(function(p){c(p.type,Lt(p),p.target,a(p,e.lockRef.current))},[]);f.useEffect(function(){return qe.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Ge),document.addEventListener("touchmove",l,Ge),document.addEventListener("touchstart",u,Ge),function(){qe=qe.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,Ge),document.removeEventListener("touchmove",l,Ge),document.removeEventListener("touchstart",u,Ge)}},[]);var v=e.removeScrollBar,m=e.inert;return f.createElement(f.Fragment,null,m?f.createElement(s,{styles:xd(o)}):null,v?f.createElement(fd,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ed(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Rd=Qu(Us,Sd);var wr=f.forwardRef(function(e,t){return f.createElement(wn,be({},e,{ref:t,sideCar:Rd}))});wr.classNames=wn.classNames;var Jn=["Enter"," "],Ad=["ArrowDown","PageUp","Home"],Ks=["ArrowUp","PageDown","End"],kd=[...Ad,...Ks],_d={ltr:[...Jn,"ArrowRight"],rtl:[...Jn,"ArrowLeft"]},Pd={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yn="Menu",[vt,Od,Td]=ns(yn),[Ue,Gs]=ot(yn,[Td,vn,Ms]),yr=vn(),qs=Ms(),[Wm,He]=Ue(yn),[Km,At]=Ue(yn),Md="MenuAnchor",xr=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=yr(n);return b.jsx(br,{...o,...r,ref:t})});xr.displayName=Md;var Cr="MenuPortal",[Nd,Xs]=Ue(Cr,{forceMount:void 0}),Js=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=He(Cr,t);return b.jsx(Nd,{scope:t,forceMount:n,children:b.jsx(Be,{present:n||s.open,children:b.jsx(vr,{asChild:!0,container:o,children:r})})})};Js.displayName=Cr;var de="MenuContent",[Id,Sr]=Ue(de),Zs=f.forwardRef((e,t)=>{const n=Xs(de,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=He(de,e.__scopeMenu),i=At(de,e.__scopeMenu);return b.jsx(vt.Provider,{scope:e.__scopeMenu,children:b.jsx(Be,{present:r||s.open,children:b.jsx(vt.Slot,{scope:e.__scopeMenu,children:i.modal?b.jsx(Dd,{...o,ref:t}):b.jsx(jd,{...o,ref:t})})})})}),Dd=f.forwardRef((e,t)=>{const n=He(de,e.__scopeMenu),r=f.useRef(null),o=re(t,r);return f.useEffect(()=>{const s=r.current;if(s)return Fs(s)},[]),b.jsx(Er,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:$(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),jd=f.forwardRef((e,t)=>{const n=He(de,e.__scopeMenu);return b.jsx(Er,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ld=ht("MenuContent.ScrollLock"),Er=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:v,disableOutsideScroll:m,...p}=e,g=He(de,n),y=At(de,n),x=yr(n),C=qs(n),S=Od(n),[E,_]=f.useState(null),k=f.useRef(null),A=re(t,k,g.onContentChange),N=f.useRef(0),D=f.useRef(""),H=f.useRef(0),z=f.useRef(null),V=f.useRef("right"),B=f.useRef(0),K=m?wr:f.Fragment,I=m?{as:Ld,allowPinchZoom:!0}:void 0,W=T=>{const J=D.current+T,Z=S().filter(U=>!U.disabled),ee=document.activeElement,G=Z.find(U=>U.ref.current===ee)?.textValue,q=Z.map(U=>U.textValue),ue=Xd(q,J,G),he=Z.find(U=>U.textValue===ue)?.ref.current;(function U(Re){D.current=Re,window.clearTimeout(N.current),Re!==""&&(N.current=window.setTimeout(()=>U(""),1e3))})(J),he&&setTimeout(()=>he.focus())};f.useEffect(()=>()=>window.clearTimeout(N.current),[]),ss();const R=f.useCallback(T=>V.current===z.current?.side&&Zd(T,z.current?.area),[]);return b.jsx(Id,{scope:n,searchRef:D,onItemEnter:f.useCallback(T=>{R(T)&&T.preventDefault()},[R]),onItemLeave:f.useCallback(T=>{R(T)||(k.current?.focus(),_(null))},[R]),onTriggerLeave:f.useCallback(T=>{R(T)&&T.preventDefault()},[R]),pointerGraceTimerRef:H,onPointerGraceIntentChange:f.useCallback(T=>{z.current=T},[]),children:b.jsx(K,{...I,children:b.jsx(cr,{asChild:!0,trapped:o,onMountAutoFocus:$(s,T=>{T.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:b.jsx(ar,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:v,children:b.jsx($u,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:_,onEntryFocus:$(l,T=>{y.isUsingKeyboardRef.current||T.preventDefault()}),preventScrollOnEntryFocus:!0,children:b.jsx(Ps,{role:"menu","aria-orientation":"vertical","data-state":pi(g.open),"data-radix-menu-content":"",dir:y.dir,...x,...p,ref:A,style:{outline:"none",...p.style},onKeyDown:$(p.onKeyDown,T=>{const Z=T.target.closest("[data-radix-menu-content]")===T.currentTarget,ee=T.ctrlKey||T.altKey||T.metaKey,G=T.key.length===1;Z&&(T.key==="Tab"&&T.preventDefault(),!ee&&G&&W(T.key));const q=k.current;if(T.target!==q||!kd.includes(T.key))return;T.preventDefault();const he=S().filter(U=>!U.disabled).map(U=>U.ref.current);Ks.includes(T.key)&&he.reverse(),Gd(he)}),onBlur:$(e.onBlur,T=>{T.currentTarget.contains(T.target)||(window.clearTimeout(N.current),D.current="")}),onPointerMove:$(e.onPointerMove,wt(T=>{const J=T.target,Z=B.current!==T.clientX;if(T.currentTarget.contains(J)&&Z){const ee=T.clientX>B.current?"right":"left";V.current=ee,B.current=T.clientX}}))})})})})})})});Zs.displayName=de;var Fd="MenuGroup",Rr=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return b.jsx(te.div,{role:"group",...r,ref:t})});Rr.displayName=Fd;var $d="MenuLabel",Ys=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return b.jsx(te.div,{...r,ref:t})});Ys.displayName=$d;var nn="MenuItem",bo="menu.itemSelect",xn=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=f.useRef(null),i=At(nn,e.__scopeMenu),a=Sr(nn,e.__scopeMenu),l=re(t,s),c=f.useRef(!1),u=()=>{const d=s.current;if(!n&&d){const h=new CustomEvent(bo,{bubbles:!0,cancelable:!0});d.addEventListener(bo,v=>r?.(v),{once:!0}),ts(d,h),h.defaultPrevented?c.current=!1:i.onClose()}};return b.jsx(Qs,{...o,ref:l,disabled:n,onClick:$(e.onClick,u),onPointerDown:d=>{e.onPointerDown?.(d),c.current=!0},onPointerUp:$(e.onPointerUp,d=>{c.current||d.currentTarget?.click()}),onKeyDown:$(e.onKeyDown,d=>{const h=a.searchRef.current!=="";n||h&&d.key===" "||Jn.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});xn.displayName=nn;var Qs=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Sr(nn,n),a=qs(n),l=f.useRef(null),c=re(t,l),[u,d]=f.useState(!1),[h,v]=f.useState("");return f.useEffect(()=>{const m=l.current;m&&v((m.textContent??"").trim())},[s.children]),b.jsx(vt.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:b.jsx(Bu,{asChild:!0,...a,focusable:!r,children:b.jsx(te.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:c,onPointerMove:$(e.onPointerMove,wt(m=>{r?i.onItemLeave(m):(i.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:$(e.onPointerLeave,wt(m=>i.onItemLeave(m))),onFocus:$(e.onFocus,()=>d(!0)),onBlur:$(e.onBlur,()=>d(!1))})})})}),Bd="MenuCheckboxItem",ei=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return b.jsx(si,{scope:e.__scopeMenu,checked:n,children:b.jsx(xn,{role:"menuitemcheckbox","aria-checked":rn(n)?"mixed":n,...o,ref:t,"data-state":kr(n),onSelect:$(o.onSelect,()=>r?.(rn(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ei.displayName=Bd;var ti="MenuRadioGroup",[Ud,Hd]=Ue(ti,{value:void 0,onValueChange:()=>{}}),ni=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Oe(r);return b.jsx(Ud,{scope:e.__scopeMenu,value:n,onValueChange:s,children:b.jsx(Rr,{...o,ref:t})})});ni.displayName=ti;var ri="MenuRadioItem",oi=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=Hd(ri,e.__scopeMenu),s=n===o.value;return b.jsx(si,{scope:e.__scopeMenu,checked:s,children:b.jsx(xn,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":kr(s),onSelect:$(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});oi.displayName=ri;var Ar="MenuItemIndicator",[si,zd]=Ue(Ar,{checked:!1}),ii=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=zd(Ar,n);return b.jsx(Be,{present:r||rn(s.checked)||s.checked===!0,children:b.jsx(te.span,{...o,ref:t,"data-state":kr(s.checked)})})});ii.displayName=Ar;var Vd="MenuSeparator",ai=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return b.jsx(te.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});ai.displayName=Vd;var Wd="MenuArrow",ci=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=yr(n);return b.jsx(Os,{...o,...r,ref:t})});ci.displayName=Wd;var Kd="MenuSub",[Gm,li]=Ue(Kd),pt="MenuSubTrigger",ui=f.forwardRef((e,t)=>{const n=He(pt,e.__scopeMenu),r=At(pt,e.__scopeMenu),o=li(pt,e.__scopeMenu),s=Sr(pt,e.__scopeMenu),i=f.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,c={__scopeMenu:e.__scopeMenu},u=f.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return f.useEffect(()=>u,[u]),f.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),b.jsx(xr,{asChild:!0,...c,children:b.jsx(Qs,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":pi(n.open),...e,ref:pn(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:$(e.onPointerMove,wt(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:$(e.onPointerLeave,wt(d=>{u();const h=n.content?.getBoundingClientRect();if(h){const v=n.content?.dataset.side,m=v==="right",p=m?-5:5,g=h[m?"left":"right"],y=h[m?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+p,y:d.clientY},{x:g,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:g,y:h.bottom}],side:v}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:$(e.onKeyDown,d=>{const h=s.searchRef.current!=="";e.disabled||h&&d.key===" "||_d[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});ui.displayName=pt;var di="MenuSubContent",fi=f.forwardRef((e,t)=>{const n=Xs(de,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=He(de,e.__scopeMenu),i=At(de,e.__scopeMenu),a=li(di,e.__scopeMenu),l=f.useRef(null),c=re(t,l);return b.jsx(vt.Provider,{scope:e.__scopeMenu,children:b.jsx(Be,{present:r||s.open,children:b.jsx(vt.Slot,{scope:e.__scopeMenu,children:b.jsx(Er,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{i.isUsingKeyboardRef.current&&l.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:$(e.onFocusOutside,u=>{u.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:$(e.onEscapeKeyDown,u=>{i.onClose(),u.preventDefault()}),onKeyDown:$(e.onKeyDown,u=>{const d=u.currentTarget.contains(u.target),h=Pd[i.dir].includes(u.key);d&&h&&(s.onOpenChange(!1),a.trigger?.focus(),u.preventDefault())})})})})})});fi.displayName=di;function pi(e){return e?"open":"closed"}function rn(e){return e==="indeterminate"}function kr(e){return rn(e)?"indeterminate":e?"checked":"unchecked"}function Gd(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function qd(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Xd(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=qd(e,Math.max(s,0));o.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Jd(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],c=a.x,u=a.y,d=l.x,h=l.y;u>r!=h>r&&n<(d-c)*(r-u)/(h-u)+c&&(o=!o)}return o}function Zd(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Jd(n,t)}function wt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Yd=xr,Qd=Js,ef=Zs,tf=Rr,nf=Ys,rf=xn,of=ei,sf=ni,af=oi,cf=ii,lf=ai,uf=ci,df=ui,ff=fi,mi="DropdownMenu",[pf]=ot(mi,[Gs]),ie=Gs(),[qm,hi]=pf(mi),gi="DropdownMenuTrigger",mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=hi(gi,n),i=ie(n);return b.jsx(Yd,{asChild:!0,...i,children:b.jsx(te.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:pn(t,s.triggerRef),onPointerDown:$(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:$(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});mf.displayName=gi;var hf="DropdownMenuPortal",bi=e=>{const{__scopeDropdownMenu:t,...n}=e,r=ie(t);return b.jsx(Qd,{...r,...n})};bi.displayName=hf;var vi="DropdownMenuContent",wi=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=hi(vi,n),s=ie(n),i=f.useRef(!1);return b.jsx(ef,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:$(e.onCloseAutoFocus,a=>{i.current||o.triggerRef.current?.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:$(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!o.modal||u)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wi.displayName=vi;var gf="DropdownMenuGroup",bf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ie(n);return b.jsx(tf,{...o,...r,ref:t})});bf.displayName=gf;var vf="DropdownMenuLabel",wf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ie(n);return b.jsx(nf,{...o,...r,ref:t})});wf.displayName=vf;var yf="DropdownMenuItem",xf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ie(n);return b.jsx(rf,{...o,...r,ref:t})});xf.displayName=yf;var Cf="DropdownMenuCheckboxItem",Sf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ie(n);return b.jsx(of,{...o,...r,ref:t})});Sf.displayName=Cf;var Ef="DropdownMenuRadioGroup",Rf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ie(n);return b.jsx(sf,{...o,...r,ref:t})});Rf.displayName=Ef;var Af="DropdownMenuRadioItem",kf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ie(n);return b.jsx(af,{...o,...r,ref:t})});kf.displayName=Af;var _f="DropdownMenuItemIndicator",Pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ie(n);return b.jsx(cf,{...o,...r,ref:t})});Pf.displayName=_f;var Of="DropdownMenuSeparator",Tf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ie(n);return b.jsx(lf,{...o,...r,ref:t})});Tf.displayName=Of;var Mf="DropdownMenuArrow",Nf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ie(n);return b.jsx(uf,{...o,...r,ref:t})});Nf.displayName=Mf;var If="DropdownMenuSubTrigger",Df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ie(n);return b.jsx(df,{...o,...r,ref:t})});Df.displayName=If;var jf="DropdownMenuSubContent",Lf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=ie(n);return b.jsx(ff,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Lf.displayName=jf;var Ff=bi,yi=wi;function xi(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=xi(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function $f(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=xi(e))&&(r&&(r+=" "),r+=t);return r}const Bf=(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},Uf=(e,t)=>({classGroupId:e,validator:t}),Ci=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),on="-",vo=[],Hf="arbitrary..",zf=e=>{const t=Wf(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return Vf(i);const a=i.split(on),l=a[0]===""&&a.length>1?1:0;return Si(a,l,t)},getConflictingClassGroupIds:(i,a)=>{if(a){const l=r[i],c=n[i];return l?c?Bf(c,l):l:c||vo}return n[i]||vo}}},Si=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const c=Si(e,t+1,s);if(c)return c}const i=n.validators;if(i===null)return;const a=t===0?e.join(on):e.slice(t).join(on),l=i.length;for(let c=0;c<l;c++){const u=i[c];if(u.validator(a))return u.classGroupId}},Vf=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?Hf+r:void 0})(),Wf=e=>{const{theme:t,classGroups:n}=e;return Kf(n,t)},Kf=(e,t)=>{const n=Ci();for(const r in e){const o=e[r];_r(o,n,r,t)}return n},_r=(e,t,n,r)=>{const o=e.length;for(let s=0;s<o;s++){const i=e[s];Gf(i,t,n,r)}},Gf=(e,t,n,r)=>{if(typeof e=="string"){qf(e,t,n);return}if(typeof e=="function"){Xf(e,t,n,r);return}Jf(e,t,n,r)},qf=(e,t,n)=>{const r=e===""?t:Ei(t,e);r.classGroupId=n},Xf=(e,t,n,r)=>{if(Zf(e)){_r(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Uf(n,e))},Jf=(e,t,n,r)=>{const o=Object.entries(e),s=o.length;for(let i=0;i<s;i++){const[a,l]=o[i];_r(l,Ei(t,a),n,r)}},Ei=(e,t)=>{let n=e;const r=t.split(on),o=r.length;for(let s=0;s<o;s++){const i=r[s];let a=n.nextPart.get(i);a||(a=Ci(),n.nextPart.set(i,a)),n=a}return n},Zf=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Yf=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(s,i)=>{n[s]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let i=n[s];if(i!==void 0)return i;if((i=r[s])!==void 0)return o(s,i),i},set(s,i){s in n?n[s]=i:o(s,i)}}},Zn="!",wo=":",Qf=[],yo=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),ep=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const s=[];let i=0,a=0,l=0,c;const u=o.length;for(let p=0;p<u;p++){const g=o[p];if(i===0&&a===0){if(g===wo){s.push(o.slice(l,p)),l=p+1;continue}if(g==="/"){c=p;continue}}g==="["?i++:g==="]"?i--:g==="("?a++:g===")"&&a--}const d=s.length===0?o:o.slice(l);let h=d,v=!1;d.endsWith(Zn)?(h=d.slice(0,-1),v=!0):d.startsWith(Zn)&&(h=d.slice(1),v=!0);const m=c&&c>l?c-l:void 0;return yo(s,v,h,m)};if(t){const o=t+wo,s=r;r=i=>i.startsWith(o)?s(i.slice(o.length)):yo(Qf,!1,i,void 0,!0)}if(n){const o=r;r=s=>n({className:s,parseClassName:o})}return r},tp=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let s=0;s<n.length;s++){const i=n[s],a=i[0]==="[",l=t.has(i);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(i)):o.push(i)}return o.length>0&&(o.sort(),r.push(...o)),r}},np=e=>({cache:Yf(e.cacheSize),parseClassName:ep(e),sortModifiers:tp(e),...zf(e)}),rp=/\s+/,op=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:s}=t,i=[],a=e.trim().split(rp);let l="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{isExternal:d,modifiers:h,hasImportantModifier:v,baseClassName:m,maybePostfixModifierPosition:p}=n(u);if(d){l=u+(l.length>0?" "+l:l);continue}let g=!!p,y=r(g?m.substring(0,p):m);if(!y){if(!g){l=u+(l.length>0?" "+l:l);continue}if(y=r(m),!y){l=u+(l.length>0?" "+l:l);continue}g=!1}const x=h.length===0?"":h.length===1?h[0]:s(h).join(":"),C=v?x+Zn:x,S=C+y;if(i.indexOf(S)>-1)continue;i.push(S);const E=o(y,g);for(let _=0;_<E.length;++_){const k=E[_];i.push(C+k)}l=u+(l.length>0?" "+l:l)}return l},sp=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=Ri(n))&&(o&&(o+=" "),o+=r);return o},Ri=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ri(e[r]))&&(n&&(n+=" "),n+=t);return n},ip=(e,...t)=>{let n,r,o,s;const i=l=>{const c=t.reduce((u,d)=>d(u),e());return n=np(c),r=n.cache.get,o=n.cache.set,s=a,a(l)},a=l=>{const c=r(l);if(c)return c;const u=op(l,n);return o(l,u),u};return s=i,(...l)=>s(sp(...l))},ap=[],Q=e=>{const t=n=>n[e]||ap;return t.isThemeGetter=!0,t},Ai=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ki=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cp=/^\d+\/\d+$/,lp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,up=/\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$/,dp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xe=e=>cp.test(e),L=e=>!!e&&!Number.isNaN(Number(e)),Ae=e=>!!e&&Number.isInteger(Number(e)),jn=e=>e.endsWith("%")&&L(e.slice(0,-1)),Ce=e=>lp.test(e),mp=()=>!0,hp=e=>up.test(e)&&!dp.test(e),_i=()=>!1,gp=e=>fp.test(e),bp=e=>pp.test(e),vp=e=>!P(e)&&!O(e),wp=e=>at(e,Ti,_i),P=e=>Ai.test(e),De=e=>at(e,Mi,hp),Ln=e=>at(e,Ep,L),xo=e=>at(e,Pi,_i),yp=e=>at(e,Oi,bp),Ft=e=>at(e,Ni,gp),O=e=>ki.test(e),dt=e=>ct(e,Mi),xp=e=>ct(e,Rp),Co=e=>ct(e,Pi),Cp=e=>ct(e,Ti),Sp=e=>ct(e,Oi),$t=e=>ct(e,Ni,!0),at=(e,t,n)=>{const r=Ai.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ct=(e,t,n=!1)=>{const r=ki.exec(e);return r?r[1]?t(r[1]):n:!1},Pi=e=>e==="position"||e==="percentage",Oi=e=>e==="image"||e==="url",Ti=e=>e==="length"||e==="size"||e==="bg-size",Mi=e=>e==="length",Ep=e=>e==="number",Rp=e=>e==="family-name",Ni=e=>e==="shadow",Ap=()=>{const e=Q("color"),t=Q("font"),n=Q("text"),r=Q("font-weight"),o=Q("tracking"),s=Q("leading"),i=Q("breakpoint"),a=Q("container"),l=Q("spacing"),c=Q("radius"),u=Q("shadow"),d=Q("inset-shadow"),h=Q("text-shadow"),v=Q("drop-shadow"),m=Q("blur"),p=Q("perspective"),g=Q("aspect"),y=Q("ease"),x=Q("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...S(),O,P],_=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],A=()=>[O,P,l],N=()=>[Xe,"full","auto",...A()],D=()=>[Ae,"none","subgrid",O,P],H=()=>["auto",{span:["full",Ae,O,P]},Ae,O,P],z=()=>[Ae,"auto",O,P],V=()=>["auto","min","max","fr",O,P],B=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],K=()=>["start","end","center","stretch","center-safe","end-safe"],I=()=>["auto",...A()],W=()=>[Xe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...A()],R=()=>[e,O,P],T=()=>[...S(),Co,xo,{position:[O,P]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Z=()=>["auto","cover","contain",Cp,wp,{size:[O,P]}],ee=()=>[jn,dt,De],G=()=>["","none","full",c,O,P],q=()=>["",L,dt,De],ue=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>[L,jn,Co,xo],Re=()=>["","none",m,O,P],ze=()=>["none",L,O,P],Ve=()=>["none",L,O,P],lt=()=>[L,O,P],We=()=>[Xe,"full",...A()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ce],breakpoint:[Ce],color:[mp],container:[Ce],"drop-shadow":[Ce],ease:["in","out","in-out"],font:[vp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ce],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ce],shadow:[Ce],spacing:["px",L],text:[Ce],"text-shadow":[Ce],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xe,P,O,g]}],container:["container"],columns:[{columns:[L,P,O,a]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:E()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[Ae,"auto",O,P]}],basis:[{basis:[Xe,"full","auto",a,...A()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[L,Xe,"auto","initial","none",P]}],grow:[{grow:["",L,O,P]}],shrink:[{shrink:["",L,O,P]}],order:[{order:[Ae,"first","last","none",O,P]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:A()}],"gap-x":[{"gap-x":A()}],"gap-y":[{"gap-y":A()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...K(),"normal"]}],"justify-self":[{"justify-self":["auto",...K()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...K(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...K(),{baseline:["","last"]}]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...K(),"baseline"]}],"place-self":[{"place-self":["auto",...K()]}],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:I()}],mx:[{mx:I()}],my:[{my:I()}],ms:[{ms:I()}],me:[{me:I()}],mt:[{mt:I()}],mr:[{mr:I()}],mb:[{mb:I()}],ml:[{ml:I()}],"space-x":[{"space-x":A()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":A()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],w:[{w:[a,"screen",...W()]}],"min-w":[{"min-w":[a,"screen","none",...W()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[i]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",n,dt,De]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,O,Ln]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",jn,P]}],"font-family":[{font:[xp,P,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:[o,O,P]}],"line-clamp":[{"line-clamp":[L,"none",O,Ln]}],leading:[{leading:[s,...A()]}],"list-image":[{"list-image":["none",O,P]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",O,P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:R()}],"text-color":[{text:R()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[L,"from-font","auto",O,De]}],"text-decoration-color":[{decoration:R()}],"underline-offset":[{"underline-offset":[L,"auto",O,P]}],"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",O,P]}],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",O,P]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:Z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ae,O,P],radial:["",O,P],conic:[Ae,O,P]},Sp,yp]}],"bg-color":[{bg:R()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:R()}],"gradient-via":[{via:R()}],"gradient-to":[{to:R()}],rounded:[{rounded:G()}],"rounded-s":[{"rounded-s":G()}],"rounded-e":[{"rounded-e":G()}],"rounded-t":[{"rounded-t":G()}],"rounded-r":[{"rounded-r":G()}],"rounded-b":[{"rounded-b":G()}],"rounded-l":[{"rounded-l":G()}],"rounded-ss":[{"rounded-ss":G()}],"rounded-se":[{"rounded-se":G()}],"rounded-ee":[{"rounded-ee":G()}],"rounded-es":[{"rounded-es":G()}],"rounded-tl":[{"rounded-tl":G()}],"rounded-tr":[{"rounded-tr":G()}],"rounded-br":[{"rounded-br":G()}],"rounded-bl":[{"rounded-bl":G()}],"border-w":[{border:q()}],"border-w-x":[{"border-x":q()}],"border-w-y":[{"border-y":q()}],"border-w-s":[{"border-s":q()}],"border-w-e":[{"border-e":q()}],"border-w-t":[{"border-t":q()}],"border-w-r":[{"border-r":q()}],"border-w-b":[{"border-b":q()}],"border-w-l":[{"border-l":q()}],"divide-x":[{"divide-x":q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:R()}],"border-color-x":[{"border-x":R()}],"border-color-y":[{"border-y":R()}],"border-color-s":[{"border-s":R()}],"border-color-e":[{"border-e":R()}],"border-color-t":[{"border-t":R()}],"border-color-r":[{"border-r":R()}],"border-color-b":[{"border-b":R()}],"border-color-l":[{"border-l":R()}],"divide-color":[{divide:R()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[L,O,P]}],"outline-w":[{outline:["",L,dt,De]}],"outline-color":[{outline:R()}],shadow:[{shadow:["","none",u,$t,Ft]}],"shadow-color":[{shadow:R()}],"inset-shadow":[{"inset-shadow":["none",d,$t,Ft]}],"inset-shadow-color":[{"inset-shadow":R()}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:R()}],"ring-offset-w":[{"ring-offset":[L,De]}],"ring-offset-color":[{"ring-offset":R()}],"inset-ring-w":[{"inset-ring":q()}],"inset-ring-color":[{"inset-ring":R()}],"text-shadow":[{"text-shadow":["none",h,$t,Ft]}],"text-shadow-color":[{"text-shadow":R()}],opacity:[{opacity:[L,O,P]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"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":[L]}],"mask-image-linear-from-pos":[{"mask-linear-from":U()}],"mask-image-linear-to-pos":[{"mask-linear-to":U()}],"mask-image-linear-from-color":[{"mask-linear-from":R()}],"mask-image-linear-to-color":[{"mask-linear-to":R()}],"mask-image-t-from-pos":[{"mask-t-from":U()}],"mask-image-t-to-pos":[{"mask-t-to":U()}],"mask-image-t-from-color":[{"mask-t-from":R()}],"mask-image-t-to-color":[{"mask-t-to":R()}],"mask-image-r-from-pos":[{"mask-r-from":U()}],"mask-image-r-to-pos":[{"mask-r-to":U()}],"mask-image-r-from-color":[{"mask-r-from":R()}],"mask-image-r-to-color":[{"mask-r-to":R()}],"mask-image-b-from-pos":[{"mask-b-from":U()}],"mask-image-b-to-pos":[{"mask-b-to":U()}],"mask-image-b-from-color":[{"mask-b-from":R()}],"mask-image-b-to-color":[{"mask-b-to":R()}],"mask-image-l-from-pos":[{"mask-l-from":U()}],"mask-image-l-to-pos":[{"mask-l-to":U()}],"mask-image-l-from-color":[{"mask-l-from":R()}],"mask-image-l-to-color":[{"mask-l-to":R()}],"mask-image-x-from-pos":[{"mask-x-from":U()}],"mask-image-x-to-pos":[{"mask-x-to":U()}],"mask-image-x-from-color":[{"mask-x-from":R()}],"mask-image-x-to-color":[{"mask-x-to":R()}],"mask-image-y-from-pos":[{"mask-y-from":U()}],"mask-image-y-to-pos":[{"mask-y-to":U()}],"mask-image-y-from-color":[{"mask-y-from":R()}],"mask-image-y-to-color":[{"mask-y-to":R()}],"mask-image-radial":[{"mask-radial":[O,P]}],"mask-image-radial-from-pos":[{"mask-radial-from":U()}],"mask-image-radial-to-pos":[{"mask-radial-to":U()}],"mask-image-radial-from-color":[{"mask-radial-from":R()}],"mask-image-radial-to-color":[{"mask-radial-to":R()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[L]}],"mask-image-conic-from-pos":[{"mask-conic-from":U()}],"mask-image-conic-to-pos":[{"mask-conic-to":U()}],"mask-image-conic-from-color":[{"mask-conic-from":R()}],"mask-image-conic-to-color":[{"mask-conic-to":R()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:Z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",O,P]}],filter:[{filter:["","none",O,P]}],blur:[{blur:Re()}],brightness:[{brightness:[L,O,P]}],contrast:[{contrast:[L,O,P]}],"drop-shadow":[{"drop-shadow":["","none",v,$t,Ft]}],"drop-shadow-color":[{"drop-shadow":R()}],grayscale:[{grayscale:["",L,O,P]}],"hue-rotate":[{"hue-rotate":[L,O,P]}],invert:[{invert:["",L,O,P]}],saturate:[{saturate:[L,O,P]}],sepia:[{sepia:["",L,O,P]}],"backdrop-filter":[{"backdrop-filter":["","none",O,P]}],"backdrop-blur":[{"backdrop-blur":Re()}],"backdrop-brightness":[{"backdrop-brightness":[L,O,P]}],"backdrop-contrast":[{"backdrop-contrast":[L,O,P]}],"backdrop-grayscale":[{"backdrop-grayscale":["",L,O,P]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[L,O,P]}],"backdrop-invert":[{"backdrop-invert":["",L,O,P]}],"backdrop-opacity":[{"backdrop-opacity":[L,O,P]}],"backdrop-saturate":[{"backdrop-saturate":[L,O,P]}],"backdrop-sepia":[{"backdrop-sepia":["",L,O,P]}],"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",O,P]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[L,"initial",O,P]}],ease:[{ease:["linear","initial",y,O,P]}],delay:[{delay:[L,O,P]}],animate:[{animate:["none",x,O,P]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[p,O,P]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:ze()}],"rotate-x":[{"rotate-x":ze()}],"rotate-y":[{"rotate-y":ze()}],"rotate-z":[{"rotate-z":ze()}],scale:[{scale:Ve()}],"scale-x":[{"scale-x":Ve()}],"scale-y":[{"scale-y":Ve()}],"scale-z":[{"scale-z":Ve()}],"scale-3d":["scale-3d"],skew:[{skew:lt()}],"skew-x":[{"skew-x":lt()}],"skew-y":[{"skew-y":lt()}],transform:[{transform:[O,P,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],accent:[{accent:R()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:R()}],"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",O,P]}],"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",O,P]}],fill:[{fill:["none",...R()]}],"stroke-w":[{stroke:[L,dt,De,Ln]}],stroke:[{stroke:["none",...R()]}],"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"]}},kp=ip(Ap);var _p=Object.defineProperty,sn=Object.getOwnPropertySymbols,Ii=Object.prototype.hasOwnProperty,Di=Object.prototype.propertyIsEnumerable,So=(e,t,n)=>t in e?_p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pp=(e,t)=>{for(var n in t||(t={}))Ii.call(t,n)&&So(e,n,t[n]);if(sn)for(var n of sn(t))Di.call(t,n)&&So(e,n,t[n]);return e},Op=(e,t)=>{var n={};for(var r in e)Ii.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&sn)for(var r of sn(e))t.indexOf(r)<0&&Di.call(e,r)&&(n[r]=e[r]);return n},Tp=(e,t,n)=>new Promise((r,o)=>{var s=l=>{try{a(n.next(l))}catch(c){o(c)}},i=l=>{try{a(n.throw(l))}catch(c){o(c)}},a=l=>l.done?r(l.value):Promise.resolve(l.value).then(s,i);a((n=n.apply(e,t)).next())}),Je=class mt{static getInstance(t){return mt.instance||(mt.instance=Y.create({baseURL:t,headers:{"Content-Type":"application/json",accept:"application/json"}})),mt.instance}static request(t,n){return new Promise(r=>{mt.getInstance(n).request(t).then(o=>{r({status:o.status,data:o.data})}).catch(o=>{var s,i;r({status:((s=o?.response)==null?void 0:s.status)||403,data:((i=o?.response)==null?void 0:i.data)||{message:"Something went wrong"}})})})}},Yn=class M{static init(t){M.env=t.env,M.redirectUrl=t.redirectUrl,M.app=t.app,M.idp=t.idp}static login(t){if(M.env&&M.redirectUrl)window.open(`${M.redirectUrl}?redirect=${t}`,"_self");else throw Error("SDK is not initialized")}static getToken(t){return new Promise((n,r)=>{if(M.env&&M.redirectUrl){const o=X.get(M.env==="prod"?"prod_more_auth":"dev_more_auth");if(o){const s=`${M.app}_${M.env==="prod"?"prod_more_auth":"dev_more_auth"}`,i=X.get(s);let a=!1;if(i){const l=ea(i);if(l&&l.exp){const c=new Date(0);if(c.setUTCSeconds(l.exp),new Date().getTime()-c.getTime()>0)a=!0;else return n({token:i})}}if(a||!i){const l={method:"POST",data:{app_name:M.app,refresh_token:o},url:"/refresh-token"};return Je.request(l,M.idp).then(c=>{var u,d,h,v;const{data:m,status:p}=c;if((u=m.data)!=null&&u.token){const g=`${M.app}_${M.env==="prod"?"prod_more_auth":"dev_more_auth"}`;return X.set(g,(d=m.data)==null?void 0:d.token,{domain:"localhost",secure:process.env.NODE_ENV==="production",path:"/",expires:14/1440}),X.set(g,(h=m.data)==null?void 0:h.token,{domain:"more.in",secure:process.env.NODE_ENV==="production",path:"/",expires:14/1440}),n(m?.data)}else p===403?window.open(`${(v=M.redirectUrl)==null?void 0:v.replace("login","").trim()}no-access?app-name=${M.app}`,"_self"):M.redirectUrl&&M.login(t);return r("Invalid token")}).catch(c=>{if(M.redirectUrl){M.login(t);return}return r(c)})}else return n({token:i})}else M.login(t);r("Token not found")}else throw Error("SDK is not initialized")})}static logout(t){return Tp(this,null,function*(){if(M.env==="prod"){const n=X.get("prod_more_auth");Object.keys(X.get()).forEach(r=>{r&&r.includes("prod_more_auth")&&X.remove(r,{path:"/",domain:"more.in"})}),X.remove("prod_more_auth",{path:"/",domain:"more.in"}),n&&(yield M.callLogoutAPI(n))}else{const n=X.get("dev_more_auth");Object.keys(X.get()).forEach(r=>{r&&r.includes("dev_more_auth")&&(X.remove(r,{path:"/",domain:"more.in"}),X.remove(r,{path:"/",domain:"localhost"}))}),X.remove("dev_more_auth",{path:"/",domain:"localhost"}),X.remove("dev_more_auth",{path:"/",domain:"more.in"}),n&&(yield M.callLogoutAPI(n))}t?window.open(`${M.redirectUrl}?redirect=${t}`,"_self"):window.open(`${M.redirectUrl}`,"_self")})}static getDevToken(t){return new Promise((n,r)=>{if(M.env&&M.redirectUrl){const o=X.get(M.env==="prod"?"prod_more_auth":"dev_more_auth");if(o){const s=`${M.app}_${M.env==="prod"?"prod_more_auth":"dev_more_auth"}`,i=X.get(s);if(i)return n({token:i});{const a={method:"POST",data:{app_name:M.app,refresh_token:o},url:"/refresh-token"};return Je.request(a,M.idp).then(l=>{var c,u;const{data:d}=l;if((c=d.data)!=null&&c.token){const h=`${M.app}_${M.env==="prod"?"prod_more_auth":"dev_more_auth"}`;return X.set(h,(u=d.data)==null?void 0:u.token,{domain:"localhost",secure:process.env.NODE_ENV==="production",path:"/",expires:14/1440}),n(d?.data)}else return r("Invalid token")}).catch(l=>r(l))}}else{const s={method:"POST",data:{app_name:M.app,username:t},url:"/generate-developer-token"};return Je.request(s,M.idp).then(i=>{var a,l,c,u;const{data:d}=i;if((a=d.data)!=null&&a.token&&((l=d?.data)!=null&&l.refresh_token)){const h=`${M.app}_${M.env==="prod"?"prod_more_auth":"dev_more_auth"}`,v=M.env==="prod"?"prod_more_auth":"dev_more_auth";return X.set(h,(c=d.data)==null?void 0:c.token,{domain:"localhost",secure:process.env.NODE_ENV==="production",path:"/",expires:14/1440}),X.set(v,(u=d.data)==null?void 0:u.refresh_token,{domain:"localhost",secure:process.env.NODE_ENV==="production",path:"/",expires:14/1440}),n(d?.data)}else return r("Invalid token")}).catch(i=>r(i))}}else throw Error("SDK is not initialized")})}static getProfileDetails(){return new Promise((t,n)=>{if(M.env&&M.redirectUrl){if(X.get(M.env==="prod"?"prod_more_auth":"dev_more_auth")){const o=`${M.app}_${M.env==="prod"?"prod_more_auth":"dev_more_auth"}`,s=X.get(o);if(s){const i={headers:{Authorization:`Bearer ${s}`},url:"/profile"};return Je.request(i,M.idp).then(a=>{const{data:l}=a;return l.data?t(l?.data):n("Invalid token")}).catch(a=>n(a))}}}else throw Error("SDK is not initialized")})}static getPermittedApps(){return new Promise((t,n)=>{if(M.env&&M.redirectUrl){if(X.get(M.env==="prod"?"prod_more_auth":"dev_more_auth")){const o=`${M.app}_${M.env==="prod"?"prod_more_auth":"dev_more_auth"}`,s=X.get(o);if(s){const i={headers:{Authorization:`Bearer ${s}`},params:{source:"web",access:"assigned"},url:"/apps"};return Je.request(i,M.idp).then(a=>{var l,c;const{data:u}=a;return Array.isArray((l=u.data)==null?void 0:l.apps)?t((c=u?.data)==null?void 0:c.apps):n("Invalid token")}).catch(a=>n(a))}}}else throw Error("SDK is not initialized")})}};Yn.callLogoutAPI=e=>{const t={method:"POST",data:{refresh_token:e},url:"/logout"};return new Promise(n=>{Je.request(t,Yn.idp).then(r=>{n(!0)}).catch(r=>{n(!1)})})};var ji=Yn;function Mp(...e){return kp($f(e))}var Np=F.forwardRef((e,t)=>{var n=e,{className:r,sideOffset:o=4}=n,s=Op(n,["className","sideOffset"]);return b.jsx(Ff,{children:b.jsx(yi,Pp({ref:t,sideOffset:o,className:Mp("z-50",r)},s))})});Np.displayName=yi.displayName;const Li=F.createContext(void 0),Ip=({children:e,appName:t,apiKey:n,accessToken:r})=>{const[o,s]=F.useState(!!r),[i,a]=F.useState(!0);return b.jsx(Li.Provider,{value:{appName:t,apiKey:n,accessToken:r,authorized:o,setAuthorized:s,isChatScreen:i,setIsChatScreen:a},children:e})},kt=()=>{const e=F.useContext(Li);if(!e)throw new Error("useSdkContext must be used inside SDKProvider");return e};var Cn="Popover",[Fi]=ot(Cn,[vn]),_t=vn(),[Dp,Ie]=Fi(Cn),$i=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=_t(t),l=f.useRef(null),[c,u]=f.useState(!1),[d,h]=es({prop:r,defaultProp:o??!1,onChange:s,caller:Cn});return b.jsx(Eu,{...a,children:b.jsx(Dp,{scope:t,contentId:as(),triggerRef:l,open:d,onOpenChange:h,onOpenToggle:f.useCallback(()=>h(v=>!v),[h]),hasCustomAnchor:c,onCustomAnchorAdd:f.useCallback(()=>u(!0),[]),onCustomAnchorRemove:f.useCallback(()=>u(!1),[]),modal:i,children:n})})};$i.displayName=Cn;var Bi="PopoverAnchor",jp=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ie(Bi,n),s=_t(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return f.useEffect(()=>(i(),()=>a()),[i,a]),b.jsx(br,{...s,...r,ref:t})});jp.displayName=Bi;var Ui="PopoverTrigger",Hi=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ie(Ui,n),s=_t(n),i=re(t,o.triggerRef),a=b.jsx(te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Gi(o.open),...r,ref:i,onClick:$(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:b.jsx(br,{asChild:!0,...s,children:a})});Hi.displayName=Ui;var Pr="PopoverPortal",[Lp,Fp]=Fi(Pr,{forceMount:void 0}),zi=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=Ie(Pr,t);return b.jsx(Lp,{scope:t,forceMount:n,children:b.jsx(Be,{present:n||s.open,children:b.jsx(vr,{asChild:!0,container:o,children:r})})})};zi.displayName=Pr;var tt="PopoverContent",Vi=f.forwardRef((e,t)=>{const n=Fp(tt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=Ie(tt,e.__scopePopover);return b.jsx(Be,{present:r||s.open,children:s.modal?b.jsx(Bp,{...o,ref:t}):b.jsx(Up,{...o,ref:t})})});Vi.displayName=tt;var $p=ht("PopoverContent.RemoveScroll"),Bp=f.forwardRef((e,t)=>{const n=Ie(tt,e.__scopePopover),r=f.useRef(null),o=re(t,r),s=f.useRef(!1);return f.useEffect(()=>{const i=r.current;if(i)return Fs(i)},[]),b.jsx(wr,{as:$p,allowPinchZoom:!0,children:b.jsx(Wi,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:$(e.onCloseAutoFocus,i=>{i.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:$(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:$(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Up=f.forwardRef((e,t)=>{const n=Ie(tt,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return b.jsx(Wi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;n.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Wi=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,h=Ie(tt,n),v=_t(n);return ss(),b.jsx(cr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:b.jsx(ar,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1),children:b.jsx(Ps,{"data-state":Gi(h.open),role:"dialog",id:h.contentId,...v,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ki="PopoverClose",Hp=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ie(Ki,n);return b.jsx(te.button,{type:"button",...r,ref:t,onClick:$(e.onClick,()=>o.onOpenChange(!1))})});Hp.displayName=Ki;var zp="PopoverArrow",Vp=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=_t(n);return b.jsx(Os,{...o,...r,ref:t})});Vp.displayName=zp;function Gi(e){return e?"open":"closed"}var Wp=$i,Kp=Hi,Gp=zi,qp=Vi;const Xp=e=>f.createElement("svg",{width:36,height:36,viewBox:"0 0 36 36",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},f.createElement("path",{d:"M15.8261 8.67349C12.4046 8.67349 9.63062 11.447 9.63062 14.8685C9.63062 18.29 12.4046 21.064 15.8261 21.064C16.1656 21.064 16.4991 21.0365 16.8241 20.984C15.0221 20.4765 13.7006 18.8205 13.7006 16.856C13.7006 14.4875 15.6206 12.568 17.9886 12.568C19.8251 12.568 21.3921 13.722 22.0031 15.345C22.0151 15.188 22.0211 15.029 22.0211 14.8685C22.0211 11.447 19.2476 8.67349 15.8261 8.67349Z",fill:"#B72402"}),f.createElement("path",{d:"M17.9984 7.621C13.0309 7.621 9.00342 11.6485 9.00342 16.616C9.00342 20.526 11.4949 23.8495 14.9744 25.0915V27.785C14.9744 28.228 15.4404 28.515 15.8349 28.3125C17.5759 27.4215 21.5219 25.332 23.5549 23.696C23.6114 23.65 23.6674 23.6065 23.7214 23.5605C23.7624 23.527 23.8009 23.494 23.8394 23.4605C25.7724 21.8115 26.9964 19.356 26.9964 16.616C26.9964 11.6485 22.9689 7.621 17.9989 7.621H17.9984ZM15.8274 21.064C15.5379 21.064 15.2539 21.0435 14.9749 21.005C11.9559 20.59 9.63092 18.0015 9.63092 14.8675C9.63092 11.4465 12.4039 8.6735 15.8274 8.6735C19.2509 8.6735 22.0214 11.4465 22.0214 14.8675C22.0214 15.0265 22.0164 15.185 22.0034 15.341C21.8319 17.6225 20.4259 19.5555 18.4544 20.48C17.9424 20.7205 17.3919 20.892 16.8154 20.9845C16.4929 21.036 16.1624 21.064 15.8269 21.064H15.8274Z",fill:"#FA4B16"})),Jp=e=>f.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},f.createElement("path",{d:"M14.4167 3.58334L14.4167 5.13334L5.58341 5.13333L5.58341 3.58333L14.4167 3.58334ZM2.66675 4.5L6.06675 8.01667L2.68341 11.5167L1.56675 10.4L3.86675 8.01667L1.55008 5.61667L2.66675 4.5ZM14.4167 7.25L14.4167 8.81667L7.48341 8.81667L7.48341 7.25L14.4167 7.25ZM14.4167 10.8667L14.4167 12.4333L5.58341 12.4333L5.58341 10.8667L14.4167 10.8667Z",fill:"#172128"})),Zp=e=>f.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},f.createElement("path",{d:"M13.25 14.45L8.7667 9.98335C8.44448 10.238 8.06414 10.4378 7.6257 10.5827C7.18725 10.7276 6.71203 10.8 6.20003 10.8C4.92048 10.8 3.8367 10.3556 2.9487 9.46668C2.0607 8.57779 1.6167 7.50557 1.6167 6.25001C1.6167 4.99446 2.06114 3.92223 2.95003 3.03335C3.83892 2.14446 4.91392 1.70001 6.17503 1.70001C7.43614 1.70001 8.50837 2.14446 9.3917 3.03335C10.275 3.92223 10.7167 4.99529 10.7167 6.25251C10.7167 6.75085 10.6473 7.2139 10.5084 7.64168C10.3695 8.06946 10.1611 8.47223 9.88337 8.85001L14.3834 13.3167L13.25 14.45ZM6.1892 9.23335C7.02142 9.23335 7.72298 8.94307 8.29387 8.36251C8.86464 7.78196 9.15003 7.07779 9.15003 6.25001C9.15003 5.42223 8.86381 4.71807 8.29137 4.13751C7.71892 3.55696 7.0182 3.26668 6.1892 3.26668C5.35109 3.26668 4.64059 3.55696 4.0577 4.13751C3.47481 4.71807 3.18337 5.42223 3.18337 6.25001C3.18337 7.07779 3.47398 7.78196 4.0552 8.36251C4.63642 8.94307 5.34775 9.23335 6.1892 9.23335Z",fill:"#172128"})),Yp=e=>f.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},f.createElement("path",{d:"M10.0417 19.3958V17.7292H16.0625V16.6042H12.7292V9.70833H16.0625V8.77083C16.0625 7.10417 15.4757 5.67014 14.3021 4.46875C13.1285 3.26736 11.7049 2.66667 10.0312 2.66667C8.38542 2.66667 6.95833 3.26736 5.75 4.46875C4.54167 5.67014 3.9375 7.10417 3.9375 8.77083V9.70833H7.27083V16.6042H1.97917V8.775C1.97917 7.66722 2.19229 6.62306 2.61854 5.6425C3.04479 4.66195 3.62132 3.80319 4.34812 3.06625C5.07493 2.32931 5.92903 1.74861 6.91042 1.32417C7.89167 0.899722 8.93667 0.6875 10.0454 0.6875C11.154 0.6875 12.1944 0.899306 13.1667 1.32292C14.1389 1.74653 14.9868 2.32424 15.7104 3.05604C16.4342 3.78785 17.0036 4.64278 17.4187 5.62083C17.834 6.59889 18.0417 7.64889 18.0417 8.77083V19.3958H10.0417ZM3.9375 14.625H5.3125V11.6875H3.9375V14.625ZM14.7083 14.625H16.0625V11.6875H14.7083V14.625Z",fill:"#172128"})),Qp=e=>f.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},f.createElement("path",{d:"M1.58334 12.6167V11.0333H14.4333V12.6167H1.58334ZM1.58334 8.78333V7.21666H14.4333V8.78333H1.58334ZM1.58334 4.96666V3.38333H14.4333V4.96666H1.58334Z",fill:"#172128"})),em=e=>f.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},f.createElement("path",{d:"M12.7833 10.679C12.7833 11.9375 12.3239 12.9861 11.4053 13.825C10.4867 14.6639 9.39228 15.0834 8.12194 15.0834C6.85172 15.0834 5.76105 14.6639 4.84994 13.825C3.93883 12.9861 3.48328 11.9389 3.48328 10.6834V4.08336C3.48328 3.17869 3.81383 2.42197 4.47494 1.81319C5.13605 1.20441 5.92083 0.900024 6.82928 0.900024C7.73783 0.900024 8.52117 1.20441 9.17928 1.81319C9.8375 2.42197 10.1666 3.17869 10.1666 4.08336V10.35C10.1666 10.8935 9.96383 11.3543 9.55828 11.7325C9.15272 12.1109 8.673 12.3 8.11911 12.3C7.56533 12.3 7.09033 12.1127 6.69411 11.738C6.298 11.3634 6.09994 10.9007 6.09994 10.35V4.18336H7.54994V10.35C7.54994 10.4945 7.60711 10.6139 7.72144 10.7084C7.83578 10.8028 7.97267 10.85 8.13211 10.85C8.29155 10.85 8.42883 10.8036 8.54394 10.7109C8.65905 10.6181 8.71661 10.4978 8.71661 10.35V4.10002C8.72772 3.59714 8.54439 3.17975 8.16661 2.84786C7.78883 2.51597 7.34322 2.35002 6.82978 2.35002C6.31633 2.35002 5.87189 2.51352 5.49644 2.84052C5.121 3.16752 4.93328 3.5818 4.93328 4.08336V10.6834C4.94439 11.5417 5.26367 12.2507 5.89111 12.8105C6.51855 13.3702 7.2715 13.65 8.14994 13.65C9.01294 13.65 9.762 13.3695 10.3971 12.8084C11.0323 12.2472 11.3444 11.5389 11.3333 10.6834V3.70002H12.7833V10.679Z",fill:"white"})),tm=e=>f.createElement("svg",{width:41,height:12,viewBox:"0 0 41 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},f.createElement("g",{clipPath:"url(#clip0_100_2379)"},f.createElement("path",{d:"M21.1825 7.56627H22.1696V5.46029C21.9697 5.38454 21.6628 5.35825 21.4373 5.35825C20.6381 5.35825 19.9407 5.89477 19.9261 6.85195H19.8885L19.4834 5.40815H17.7463V11.7965H20.0681V8.80642C20.0681 8.10324 20.2821 7.56672 21.1825 7.56672V7.56627Z",fill:"#172128"}),f.createElement("path",{d:"M2.31875 8.00074C2.31875 7.40005 2.55889 7.11976 3.04271 7.11976C3.48584 7.11976 3.69989 7.3996 3.69989 8.00074V11.7956H6.0217V8.00074C6.0217 7.40005 6.26184 7.11976 6.74256 7.11976C7.18835 7.11976 7.4024 7.3996 7.4024 8.00074V11.7956H9.72111V7.32385C9.72111 6.14831 9.12761 5.21786 7.68013 5.21786C6.74212 5.21786 6.14862 5.53603 5.78111 6.25036H5.75502C5.4627 5.62605 4.8661 5.21786 3.98028 5.21786C3.04227 5.21786 2.45761 5.53603 2.10426 6.25036H2.07817L1.80043 5.40725H3.8147e-05V11.7956H2.31875V8.00074Z",fill:"#172128"}),f.createElement("path",{d:"M10.1851 8.7301C10.1851 10.8129 11.8701 12 13.7227 12C15.5753 12 17.2837 10.8129 17.2837 8.7301V8.47342C17.2837 6.37903 15.5726 5.20349 13.7227 5.20349C11.8728 5.20349 10.1851 6.38215 10.1851 8.47342V8.7301ZM13.7346 7.02071C14.5975 7.02071 14.9765 7.70919 14.9765 8.59017C14.9765 9.47116 14.597 10.1743 13.7346 10.1743C12.8722 10.1743 12.4928 9.47116 12.4928 8.59017C12.4928 7.70919 12.8749 7.02071 13.7346 7.02071Z",fill:"#172128"}),f.createElement("path",{d:"M25.7969 5.20346C23.9324 5.20346 22.3867 6.43158 22.3867 8.47339V8.73007C22.3867 10.8623 24.0602 12 25.8982 12C27.3545 12 28.7874 11.2589 29.0797 9.70151H26.975C26.8101 10.1333 26.3669 10.2764 25.9618 10.2764C25.2264 10.2764 24.7837 9.76301 24.7315 9.08611H29.0912C29.1173 8.87044 29.1173 8.60173 29.1173 8.38293C29.1173 6.08444 27.3686 5.20346 25.7969 5.20346ZM24.7576 7.75862C24.8067 7.19848 25.137 6.71143 25.846 6.71143H25.8491C26.4948 6.71143 26.8623 7.19581 26.8623 7.75862H24.7576Z",fill:"#172128"}),f.createElement("path",{d:"M34.376 3.1975C33.6653 3.44883 32.9979 3.86058 32.4292 4.43319C31.8605 5.00581 31.4523 5.67824 31.2028 6.39435C30.9538 5.67824 30.5448 5.00581 29.9765 4.43275C29.4082 3.86013 28.7408 3.44838 28.0301 3.19705C28.7408 2.94572 29.4082 2.53398 29.9769 1.96136C30.5452 1.38874 30.9538 0.716307 31.2033 -0.000244141C31.4527 0.716307 31.8613 1.3883 32.4301 1.96136C32.9984 2.53398 33.6657 2.94572 34.3764 3.19705L34.376 3.1975Z",fill:"url(#paint0_linear_100_2379)"}),f.createElement("path",{d:"M35.4872 12.0001C34.8667 12.0001 34.2696 11.7715 33.9119 11.3869C33.5895 11.0621 33.4108 10.6655 33.4108 10.1722V10.1C33.4108 8.82507 34.4611 8.12769 35.9051 8.12769C36.4061 8.12769 36.9077 8.17581 37.3729 8.34426V7.94721C37.3729 6.92497 37.0027 6.27571 35.8812 6.27571C35.1413 6.27571 34.4492 6.5404 34.4134 7.38217H33.6854V7.30998C33.8287 6.0471 34.7835 5.61441 35.8578 5.61441C37.1708 5.61441 38.0898 6.17945 38.0898 7.93563V11.808H37.5768C37.4932 11.5915 37.4335 11.3508 37.3499 11.1347H37.326C36.932 11.6516 36.1682 12.0005 35.488 12.0005L35.4872 12.0001ZM37.3729 9.54697V9.01803C36.8718 8.84958 36.3823 8.76536 35.8812 8.76536C35.01 8.76536 34.1507 9.13834 34.1507 10.0643C34.1507 10.9061 34.7831 11.3152 35.6066 11.3152C36.43 11.3152 37.3729 10.5937 37.3729 9.54742V9.54697Z",fill:"#172128"}),f.createElement("path",{d:"M40.9998 3.77446C40.9998 4.09931 40.7371 4.3395 40.4152 4.3395C40.0932 4.3395 39.8305 4.09887 39.8305 3.77446V3.7504C39.8305 3.40148 40.0932 3.19739 40.4152 3.19739C40.7371 3.19739 40.9998 3.40193 40.9998 3.7504V3.77446ZM40.0569 11.8076V5.79444H40.7729V11.8076H40.0569Z",fill:"#172128"})),f.createElement("defs",null,f.createElement("linearGradient",{id:"paint0_linear_100_2379",x1:31.3237,y1:301678e-10,x2:34.1742,y2:2.06507,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{stopColor:"#FA4B16"}),f.createElement("stop",{offset:1,stopColor:"#8E64EF"})),f.createElement("clipPath",{id:"clip0_100_2379"},f.createElement("rect",{width:41,height:12,fill:"white"})))),nm=e=>f.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},f.createElement("path",{d:"M14.4241 8.00167C12.9851 8.50672 11.6338 9.33413 10.4822 10.4848C9.33067 11.6355 8.50415 12.9868 7.9991 14.4258C7.49495 12.9868 6.66664 11.6355 5.51596 10.4839C4.36528 9.33324 3.01402 8.50582 1.575 8.00078C3.01402 7.49573 4.36528 6.66832 5.51686 5.51764C6.66754 4.36696 7.49495 3.01569 8 1.57578C8.50504 3.01569 9.33246 4.36606 10.484 5.51764C11.6347 6.66832 12.986 7.49573 14.425 8.00078L14.4241 8.00167Z",fill:"url(#paint0_linear_100_2352)"}),f.createElement("defs",null,f.createElement("linearGradient",{id:"paint0_linear_100_2352",x1:8.24377,y1:1.57633,x2:13.9855,y2:5.76743,gradientUnits:"userSpaceOnUse"},f.createElement("stop",{stopColor:"#FA4B16"}),f.createElement("stop",{offset:1,stopColor:"#8E64EF"}))));function rm({title:e,children:t,side:n="top",align:r="end"}){const o=kt();return console.log(o,"values from sdk"),b.jsxs(Wp,{children:[b.jsx(Kp,{asChild:!0,className:"data-[state=open]:mhb-outline data-[state=open]:mhb-outline-neutral-110",children:b.jsx("button",{type:"button",className:"mhb-h-12 mhb-w-12 mhb-rounded-[16px] mhb-bg-neutral-10 mhb-flex mhb-items-center mhb-justify-center",children:b.jsx(Yp,{className:"mhb-h-5 mhb-w-5"})})}),b.jsx(Gp,{children:b.jsx(qp,{side:n,align:r,sideOffset:12,className:`mhb-popover
|
|
47
|
+
mhb-flex mhb-flex-col
|
|
48
|
+
mhb-h-[460px] mhb-max-h-[460px]
|
|
49
|
+
mhb-w-[323px]
|
|
50
|
+
mhb-bg-white
|
|
51
|
+
mhb-rounded-[16px]
|
|
52
|
+
mhb-border mhb-border-neutral-10
|
|
53
|
+
mhb-shadow-[0_4px_20px_rgba(23,33,40,0.05)]
|
|
54
|
+
mhb-overflow-hidden`,children:b.jsx("div",{className:"mhb-popover-children mhb-h-full mhb-flex mhb-flex-col",children:t})})})]})}const om=()=>b.jsxs("div",{className:"mhb-h-[48px] mhb-flex mhb-rounded-[9999px] mhb-bg-neutral-10 mhb-items-center mhb-gap-3 mhb-px-3",children:[b.jsx(Zp,{className:"mhb-h-4 mhb-w-4"}),b.jsx("input",{type:"text",placeholder:"Search your chats",className:`
|
|
55
|
+
mhb-input
|
|
56
|
+
mhb-flex-1
|
|
57
|
+
mhb-w-full
|
|
58
|
+
mhb-typography-para-30
|
|
59
|
+
mhb-text-neutral-110
|
|
60
|
+
mhb-bg-transparent
|
|
61
|
+
mhb-border-0
|
|
62
|
+
mhb-outline-none
|
|
63
|
+
mhb-whitespace-nowrap
|
|
64
|
+
mhb-overflow-visible
|
|
65
|
+
placeholder:mhb-text-neutral-40
|
|
66
|
+
focus:mhb-outline-none
|
|
67
|
+
`})]}),sm=()=>b.jsx("div",{className:"mhb-text-center",children:b.jsx("div",{role:"status",children:b.jsxs("svg",{"aria-hidden":"true",className:"mhb-inline mhb-w-8 mhb-h-8 mhb-text-neutral-tertiary mhb-animate-spin mhb-fill-brand",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[b.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),b.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]})})});let ae=null,Fn=0,Qn=!1,im=0;const _e={};let Gt=!1,qt="",qi="",Xt="";function am(){const t={host:new URL(qt).hostname,"x-api-key":Xt},n={},r=btoa(JSON.stringify(t)),o=btoa(JSON.stringify(n)),s=`${qi}?header=${r}&payload=${o}`;return new WebSocket(s,["graphql-ws"])}const Xi=()=>{Qn=!1,ae=am(),Gt=!1,ae.onopen=()=>{Fn=0,ae?.send(JSON.stringify({type:"connection_init"}))},ae.onmessage=e=>{const t=JSON.parse(e.data);if(Gt)t.type==="error"||(t.type==="data"&&_e[t.id]?_e[t.id].callback(t.payload.data):t.type==="complete"&&_e[t.id]&&delete _e[t.id]);else if(t.type==="connection_ack"){Gt=!0;for(const n in _e)ae?.send(JSON.stringify(_e[n].message))}},ae.onclose=()=>{if(Qn)return;const e=Math.min(1e3*Math.pow(2,Fn)+Math.random()*1e3,3e4);setTimeout(()=>{Fn++,Xi()},e)},ae.onerror=e=>{console.error("WebSocket error:",e),ae?.close()}},cm=e=>(qt=e.apiURL,Xt=e.apiKey,qi=e.apiURL.replace("https://","wss://").replace("appsync-api","appsync-realtime-api"),Xi(),{executeGraphql:async(t,n={},r)=>{try{const s=await(await fetch(qt,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":Xt,...r?{Authorization:`Bearer ${r}`}:{}},body:JSON.stringify({query:t,variables:n})})).json();if(s.errors)throw new Error(s.errors.map(i=>i.message).join(", "));return s.data}catch(o){throw console.error("GraphQL operation failed:",o),o}},subscribe:(t,n={},r)=>{if(!t.trim().startsWith("subscription"))return()=>{};const o=`${++im}`,s={id:o,type:"start",payload:{data:JSON.stringify({query:t,variables:n}),extensions:{authorization:{host:new URL(qt).hostname,"x-api-key":Xt}}}};return _e[o]={message:s,callback:r},Gt&&ae?.readyState===WebSocket.OPEN&&ae.send(JSON.stringify(s)),()=>{ae?.readyState===WebSocket.OPEN&&ae.send(JSON.stringify({id:o,type:"stop"})),delete _e[o]}},close:()=>{Qn=!0,ae?.close()}});let Ne;const lm=e=>{Ne||(Ne=cm(e))},er=async(e,t={},n)=>{if(!Ne)throw new Error("client is not created");return Ne.executeGraphql(e,t,n)},um=async(e,t={},n)=>{if(!Ne)throw new Error("client is not created");return Ne.executeGraphql(e,t,n)},dm=(e,t={},n)=>{if(!Ne)throw new Error("client is not created");return Ne.subscribe(e,t,n)},Eo=`query AssistHistory($limit: Int, $offset: Int , $ticket_id: Int) {
|
|
68
|
+
assistHistory(limit: $limit, offset: $offset, ticket_id: $ticket_id) {
|
|
69
|
+
message_id
|
|
70
|
+
text
|
|
71
|
+
attachments
|
|
72
|
+
ticket_id
|
|
73
|
+
handover
|
|
74
|
+
created_at
|
|
75
|
+
end
|
|
76
|
+
user{
|
|
77
|
+
user_name
|
|
78
|
+
user_type
|
|
79
|
+
}
|
|
80
|
+
}}`,fm=`query EmployeeAssistTickets {
|
|
81
|
+
EmployeeAssistTickets {
|
|
82
|
+
ticket_id
|
|
83
|
+
parent_id
|
|
84
|
+
user_id
|
|
85
|
+
source
|
|
86
|
+
source_reference_id
|
|
87
|
+
title
|
|
88
|
+
description
|
|
89
|
+
status
|
|
90
|
+
status_id
|
|
91
|
+
assigned_to
|
|
92
|
+
priority
|
|
93
|
+
is_escalated
|
|
94
|
+
resolution_comments
|
|
95
|
+
bill_no
|
|
96
|
+
customer_rating
|
|
97
|
+
agent_rating
|
|
98
|
+
due_date
|
|
99
|
+
created_at
|
|
100
|
+
modified_by
|
|
101
|
+
updated_at
|
|
102
|
+
ticket_meta
|
|
103
|
+
broadcast_list
|
|
104
|
+
cat_desc
|
|
105
|
+
subcat_desc
|
|
106
|
+
user_type
|
|
107
|
+
last_message_time
|
|
108
|
+
ticket_type
|
|
109
|
+
chat_handover
|
|
110
|
+
is_new
|
|
111
|
+
}
|
|
112
|
+
}`,pm=()=>{const[e,t]=F.useState([]),[n,r]=F.useState(!0),[o,s]=F.useState(null),{accessToken:i}=kt();return F.useEffect(()=>{er(fm,{},i).then(async a=>{t(a?.EmployeeAssistTickets??[])}).catch(a=>{s(a)}).finally(()=>{r(!1)})},[]),{ticketData:e,loading:n,error:o}};function tr(e){return(e?new Date(e):new Date).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",timeZone:"Asia/Kolkata"})}function mm(e,t="Asia/Kolkata",n="en-GB"){const r=new Date(e);if(Number.isNaN(r.getTime()))return"";const o=new Intl.DateTimeFormat(n,{day:"2-digit",month:"short",year:"2-digit",timeZone:t}).formatToParts(r),s=o.find(c=>c.type==="day")?.value??"",i=o.find(c=>c.type==="month")?.value??"",a=o.find(c=>c.type==="year")?.value??"",l=new Intl.DateTimeFormat(n,{hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:t}).format(r);return`${s} ${i} ‘${a}, ${l}`}const Ji=(e,t)=>{sessionStorage.setItem(e,JSON.stringify(t))},Bt=e=>{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null},hm=()=>{const{ticketData:e,loading:t}=pm(),{setIsChatScreen:n}=kt();console.log(e,"set ticket Data");const r=(o,s)=>{Ji("userAndTicket",{ticket_id:o,employee_id:s}),n(i=>!i)};return b.jsxs("div",{className:"mhb-flex mhb-flex-col mhb-h-full mhb-min-h-0",children:[b.jsx("div",{className:"mhb-searchbarContainer mhb-flex mhb-flex-col mhb-border-b mhb-border-neutral-20",children:b.jsx(om,{})}),b.jsx("div",{className:"mhb-history-main-container mhb-no-scrollbar mhb-py-3 mhb-flex mhb-flex-col mhb-gap-1 mhb-overflow-y-auto mhb-flex-1 mhb-min-h-0",children:t?b.jsx(sm,{}):e.map(o=>b.jsxs("button",{type:"button",className:"mhb-history-container mhb-p-3 mhb-flex mhb-flex-col mhb-rounded-[12px] mhb-bg-neutral-10 mhb-gap-2 mhb-items-start",onClick:()=>r(o.ticket_id,o.user_id),children:[b.jsx("div",{className:"mhb-flex mhb-justify-between",children:b.jsx("p",{className:"mhb-typography-para-thick-30 mhb-text-neutral-110 mhb-m-0",children:o.title})}),b.jsx("p",{className:"mhb-typography-para-30 mhb-text-neutral-60 mhb-m-0",children:mm(o.created_at)})]},o.ticket_id))})]})},gm=({isChatScreen:e,setIsChatScreen:t})=>{const n=()=>{t(r=>!r)};return b.jsxs("div",{className:"mhb-header mhb-border-b mhb-border-neutral-20 mhb-flex mhb-items-center mhb-justify-between",children:[b.jsx(Xp,{className:"h-[36px] w-[36px] fill-current"}),b.jsx("button",{type:"button",className:"mhb-h-[36px] mhb-w-[36px] mhb-flex mhb-items-center mhb-justify-center mhb-rounded-full mhb-bg-neutral-10",onClick:n,children:e?b.jsx(Qp,{className:"mhb-h-[16px] mhb-w-[16px] fill-current"}):b.jsx(Jp,{className:"mhb-h-[16px] mhb-w-[16px]"})})]})},bm=`
|
|
113
|
+
mutation AssistChat(
|
|
114
|
+
$message: String!
|
|
115
|
+
$ticket_id: Int
|
|
116
|
+
$handover: Boolean
|
|
117
|
+
$attachments: [String]
|
|
118
|
+
) {
|
|
119
|
+
assistChat(
|
|
120
|
+
data: {
|
|
121
|
+
ticket_id: $ticket_id,
|
|
122
|
+
handover: $handover,
|
|
123
|
+
message: $message,
|
|
124
|
+
attachments: $attachments
|
|
125
|
+
}
|
|
126
|
+
) {
|
|
127
|
+
message_id
|
|
128
|
+
text
|
|
129
|
+
attachments
|
|
130
|
+
created_at
|
|
131
|
+
ticket_id
|
|
132
|
+
handover
|
|
133
|
+
end
|
|
134
|
+
user{
|
|
135
|
+
user_name
|
|
136
|
+
user_type
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
`,vm=`subscription onAssistChat($ticket_id: Int!) {
|
|
141
|
+
onAssistChat(ticket_id: $ticket_id) {
|
|
142
|
+
message_id
|
|
143
|
+
text
|
|
144
|
+
attachments
|
|
145
|
+
created_at
|
|
146
|
+
ticket_id
|
|
147
|
+
handover
|
|
148
|
+
end
|
|
149
|
+
user{
|
|
150
|
+
user_name
|
|
151
|
+
user_type
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}`,Ro=10,wm=()=>{const[e,t]=F.useState([]),[n,r]=F.useState(!0),[o,s]=F.useState(null),[i,a]=F.useState(!1),[l,c]=F.useState(!1),[u,d]=F.useState(null),{accessToken:h}=kt(),v=async()=>{const E=await ji.getProfileDetails();d(E)},m=Bt("userAndTicket")?.ticket_id,p=Bt("userAndTicket")?.employee_id,g=F.useMemo(()=>e.find(E=>E.ticket_id!=null)?.ticket_id??null,[e]);let y=m??g??null;return F.useEffect(()=>{v()},[]),F.useEffect(()=>{if(!y||!u)return;if(p&&u?.employee_id!=p){console.log("inside subscription",p,"employeeId",u?.employee_id),sessionStorage.removeItem("userAndTicket");return}const E=dm(vm,{ticket_id:y},_=>{console.log(_,"data subscription sdk");const k=_;k?.onAssistChat?.user?.user_type==="agent"&&t(A=>[...A,k.onAssistChat])});return()=>E()},[y,u]),F.useEffect(()=>{if(!h||!u)return;p&&u?.employee_id!==p&&(console.log("inside history load",p,"employeeId",u?.employee_id),sessionStorage.removeItem("userAndTicket"),y=null);const E={...y&&{ticket_id:y},limit:Ro};er(Eo,E,h).then(async _=>{t(_?.assistHistory??[])}).catch(_=>{s(_)}).finally(()=>{r(!1)})},[h,u,p]),{historyData:e,msgLoading:n,msgError:o,isSending:l,sendMessage:E=>{const _=e.find(N=>N.ticket_id!=null)?.ticket_id??null,k=e.find(N=>N.handover==!0)?.handover??!1,A={message:E,..._&&{ticket_id:_},handover:k,attachments:null,text:E,message_id:Math.random(),created_at:tr(),user:{user_name:null,user_type:"employee"}};c(!0),t(N=>[...N,A]),um(bm,A,h).then(async N=>{const D=N;D.assistChat.user.user_type!=="employee"&&t(H=>[...H,D.assistChat]),!Bt("userAndTicket")&&D.assistChat?.ticket_id&&u&&Ji("userAndTicket",{ticket_id:D.assistChat?.ticket_id,employee_id:u.employee_id})}).catch(()=>t(N=>N.slice(0,-1))).finally(()=>c(!1))},getNextPageData:E=>{if(!h||i)return;const _=Bt("userAndTicket")?.ticket_id,k={..._&&{ticket_id:_},limit:Ro,offset:E};a(!0),er(Eo,k,h).then(async A=>{const D=A?.assistHistory??[];t(H=>[...D,...H])}).catch(A=>{s(A)}).finally(()=>{a(!1)})},isLoadingMore:i,upload:()=>{}}},ym=({toastMsg:e})=>b.jsxs("div",{id:"toast-simple",className:"mhb-border-red-60 mhb-fixed mhb-bottom-6 mhb-right-6 mhb-z-50 mhb-flex mhb-max-w-xs mhb-items-center mhb-space-x-4 mhb-divide-x mhb-divide-gray-200 mhb-rounded-lg mhb-border mhb-bg-white mhb-p-4 mhb-text-gray-700 mhb-shadow-lg dark:mhb-divide-gray-700 dark:mhb-border-gray-600 dark:mhb-bg-gray-800 dark:mhb-text-gray-300",role:"alert",children:[b.jsx("svg",{className:"mhb-text-red-60 mhb-h-3 mhb-w-3","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 14 14",children:b.jsx("path",{stroke:"currentColor",d:"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"})}),b.jsx("div",{className:"mhb-text-red-60 mhb-typography-label-thick-30 mhb-ps-4",children:e})]}),Ao=["image/jpeg","image/jpg","image/png"],xm=()=>{const[e,t]=F.useState(""),n=F.useRef(null),r=F.useRef(null),o=F.useRef(null),s=F.useRef(0),i=F.useRef(0),a=F.useRef(!1),{historyData:l,sendMessage:c,getNextPageData:u,isLoadingMore:d,isSending:h}=wm();console.log(l,"historyData"),F.useLayoutEffect(()=>{const x=n.current;if(x)if(a.current){const C=s.current,S=i.current,_=x.scrollHeight-C;x.scrollTop=S+_,a.current=!1}else x.scrollTop=x.scrollHeight},[l?.length]);const v=()=>{const x=r.current?.value?.trim();x&&(c(x),r.current&&(r.current.value=""))},m=x=>{h||x.key==="Enter"&&(x.preventDefault(),v())},p=x=>{const C=x.currentTarget;if(C.scrollTop<=20&&!d){const S=l.length;s.current=C.scrollHeight,i.current=C.scrollTop,a.current=!0,u(S)}},g=x=>{const C=Array.from(x.target.files||[]),S=C.filter(_=>Ao.includes(_.type));if(C.filter(_=>!Ao.includes(_.type)).length>0){t("Only JPG, PNG, and PDF files are allowed. Other files like videos are not supported."),setTimeout(()=>t(null),3e3),x.target.value="";return}console.log(S,"check validFiles")},y=()=>{o.current?.click()};return b.jsxs("div",{className:"mhb-flex mhb-h-full mhb-flex-col mhb-overflow-hidden mhb-bg-white",children:[b.jsx("div",{ref:n,className:"mhb-flex-grow mhb-overflow-y-auto mhb-py-3 [&>*]:[mhb-overflow-anchor:none]",onScroll:p,children:b.jsx("div",{className:"mhb-flex mhb-min-h-full mhb-flex-col mhb-justify-end mhb-gap-1",children:l?.map(x=>b.jsx("div",{className:`mhb-flex ${x.user.user_type==="bot"||x.user.user_type==="agent"?"mhb-justify-start":"mhb-justify-end"}`,children:b.jsxs("div",{className:"mhb-max-w-[75%]",children:[b.jsx("div",{className:`mhb-mb-1 mhb-flex mhb-items-center${x.user.user_type==="bot"||x.user.user_type==="agent"?"mhb-justify-start":"mhb-justify-end"}`,children:x.user.user_type==="bot"?b.jsxs("div",{className:"mhb-flex mhb-gap-2 mhb-items-center",children:[b.jsxs("div",{className:"mhb-flex mhb-items-center mhb-gap-2",children:[b.jsx(nm,{}),b.jsx(tm,{})]}),b.jsxs("div",{className:"mhb-mt-1 mhb-flex mhb-gap-2",children:[b.jsx("div",{className:"mhb-h-[2px] mhb-w-[2px] mhb-rounded-full mhb-bg-neutral-60 mhb-flex mhb-self-center"}),b.jsx("p",{className:"mhb-typography-para-30 mhb-text-neutral-60",children:x?.message?x.created_at:tr(x.created_at)})]})]}):x.user.user_type==="employee"?b.jsxs("div",{className:"mhb-flex mhb-gap-2 mhb-items-center",children:[b.jsxs("div",{className:"mhb-flex mhb-gap-2",children:[b.jsx("p",{className:"mhb-typography-para-30 mhb-text-neutral-60",children:x?.message?x.created_at:tr(x.created_at)}),b.jsx("div",{className:"mhb-h-[2px] mhb-w-[2px] mhb-rounded-full mhb-bg-neutral-60 mhb-flex mhb-self-center"})]}),b.jsx("div",{className:"mhb-flex mhb-items-center mhb-gap-2",children:b.jsx("p",{className:"mhb-typography-para-thick-40 mhb-text-neutral-110",children:x.user.user_name})})]}):null}),b.jsx("div",{className:"mhb-flex mhb-overflow-hidden mhb-min-w-0",children:b.jsx("p",{className:`mhb-whitespace-pre-line mhb-break-words mhb-rounded-[16px] mhb-p-3
|
|
155
|
+
mhb-typography-para-30 mhb-ml-auto ${x.user.user_type==="bot"||x.user.user_type==="agent"?"mhb-bg-orange-60 mhb-text-white mhb-rounded-tl-[4px]":"mhb-bg-neutral-10 mhb-text-neutral-110 mhb-rounded-tr-[4px]"}
|
|
156
|
+
`,children:x?.text})})]})},x.message_id))})}),b.jsx("div",{className:"mhb-chat-input-container mhb-sticky mhb-bottom-0 mhb-bg-white mhb-py-3 mhb-flex mhb-items-center mhb-gap-2",children:b.jsxs("div",{className:"mhb-bg-neutral-10 mhb-flex mhb-h-[80px] mhb-flex-1 mhb-rounded-xl mhb-p-3",children:[b.jsx("div",{className:"mhb-flex mhb-flex-1",children:b.jsx("textarea",{ref:r,placeholder:"Type your message here...",className:`
|
|
157
|
+
mhb-textarea
|
|
158
|
+
mhb-flex-grow
|
|
159
|
+
mhb-text-neutral-70
|
|
160
|
+
mhb-caret-orange-70
|
|
161
|
+
mhb-typography-para-30
|
|
162
|
+
mhb-bg-transparent
|
|
163
|
+
mhb-resize-none
|
|
164
|
+
placeholder:mhb-text-neutral-40
|
|
165
|
+
`,style:{outline:"none",boxShadow:"none",border:"none"},onKeyDown:m})}),b.jsxs("div",{className:"mhb-flex mhb-gap-1 mhb-justify-end mhb-items-end",children:[b.jsxs("button",{type:"button",className:"mhb-h-[36px] mhb-w-[36px] mhb-rounded-full mhb-bg-neutral-100 mhb-flex mhb-items-center mhb-justify-center mhb-outline-none",style:{outline:"none",boxShadow:"none",border:"none"},onClick:y,children:[b.jsx(em,{className:"h-[16px] w-[16px] mhb-fill-current"}),b.jsx("input",{type:"file",multiple:!0,accept:".jpg,.jpeg,.png,.pdf",ref:o,onChange:g,className:"hidden"})]}),b.jsx("button",{type:"button",className:"mhb-h-[36px] mhb-rounded-[9999px] mhb-bg-orange-60 mhb-flex mhb-p-3 mhb-items-center mhb-justify-center mhb-shadow-[0_4px_12px_0_rgba(250,75,22,0.50)] mhb-outline-none",style:{outline:"none",boxShadow:"none",border:"none"},disabled:h,onClick:v,children:b.jsx("p",{className:"mhb-typography-label-thick-30 mhb-text-white",children:"Send"})})]})]})}),e&&b.jsx(ym,{toastMsg:e})]})};function Cm({side:e="top",align:t="end"}){const{authorized:n,isChatScreen:r,setIsChatScreen:o}=kt();return b.jsx("div",{className:"mhb-root",children:b.jsx(rm,{side:e,align:t,children:b.jsxs("div",{className:"mhb-h-full mhb-w-full mhb-flex mhb-flex-col mhb-min-h-0",children:[b.jsx(gm,{isChatScreen:r,setIsChatScreen:o}),r?b.jsx(xm,{}):b.jsx(hm,{})]})})})}function Sm(e){const{apiKey:t,accessToken:n}=e;if(!t||!n)throw new Error("Missing parameters: apiKey, and accessToken are required")}let nr=null,an=!1,Jt=[];function Em(){for(const e of Jt)e()}function Rm(e){an||(Sm(e),ji.init({env:e.env,redirectUrl:e.redirectUrl,app:e.app,idp:e.idp}),nr=e,an=!0,Em(),lm({apiKey:e.apiKey,apiURL:e.apiURL}))}function Am(e){const[t,n]=F.useState({initialized:an,sdkOptions:nr});return F.useEffect(()=>{const r=()=>{n({initialized:an,sdkOptions:nr})};return Jt.push(r),()=>{Jt=Jt.filter(o=>o!==r)}},[]),!t.initialized||!t.sdkOptions?null:b.jsx(Ip,{appName:t.sdkOptions.app,apiKey:t.sdkOptions.apiKey,accessToken:t.sdkOptions.accessToken,children:b.jsx(Cm,{...e})})}exports.ChatButton=Am;exports.init=Rm;
|
|
166
|
+
//# sourceMappingURL=index.cjs.map
|