@ukpc-lib/react 0.3.46 → 0.4.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/dist/components/Topbar/index.d.ts +5 -2
- package/dist/components/index.cjs +25 -24
- package/dist/components/index.js +1773 -1721
- package/dist/index.module-0c1e4251.js +32095 -0
- package/dist/index.module-77c85236.cjs +1092 -0
- package/dist/share/AuthProvider/index.d.ts +9 -8
- package/dist/share/hooks/useUser.d.ts +5 -0
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +32 -28
- package/dist/share/interceptor/index.d.ts +12 -6
- package/package.json +2 -1
- package/web-components-bundle/access-denied/index.js +3 -4
- package/web-components-bundle/global-menu/index.js +2 -2
- package/web-components-bundle/global-topbar/index.js +3 -5
- package/web-components-bundle/has-permission/index.js +4 -6
- package/web-components-bundle/index-4e66c5fb.js +31131 -0
- package/web-components-bundle/index-a8aaf6f3.js +9879 -0
- package/dist/index.module-0e847207.js +0 -22058
- package/dist/index.module-50c1929c.cjs +0 -987
- package/dist/share/interceptor/interceptor.const.d.ts +0 -6
- package/web-components-bundle/access-denied/index.cjs +0 -2
- package/web-components-bundle/global-menu/index.cjs +0 -1
- package/web-components-bundle/global-topbar/index.cjs +0 -1
- package/web-components-bundle/has-permission/index.cjs +0 -1
- package/web-components-bundle/index-0db61062.js +0 -18850
- package/web-components-bundle/index-4327002b.cjs +0 -3
- package/web-components-bundle/index-5e5489dd.cjs +0 -40
- package/web-components-bundle/index-a33584fd.js +0 -7909
- package/web-components-bundle/index-ac079ff9.cjs +0 -1096
- package/web-components-bundle/index-b3659f2e.js +0 -3518
- package/web-components-bundle/react-to-web-component-3847ebf5.cjs +0 -40
- package/web-components-bundle/react-to-web-component-469d91d4.js +0 -6379
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";const p=require("./react-to-web-component-3847ebf5.cjs");function Es(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ya}=Object.prototype,{getPrototypeOf:ar}=Object,Qe=(t=>e=>{const n=Ya.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ct=t=>(t=t.toLowerCase(),e=>Qe(e)===t),tn=t=>e=>typeof e===t,{isArray:te}=Array,pe=tn("undefined");function Ja(t){return t!==null&&!pe(t)&&t.constructor!==null&&!pe(t.constructor)&&nt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ss=ct("ArrayBuffer");function Za(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ss(t.buffer),e}const Qa=tn("string"),nt=tn("function"),Ts=tn("number"),en=t=>t!==null&&typeof t=="object",tl=t=>t===!0||t===!1,Ve=t=>{if(Qe(t)!=="object")return!1;const e=ar(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},el=ct("Date"),nl=ct("File"),rl=ct("Blob"),il=ct("FileList"),sl=t=>en(t)&&nt(t.pipe),ol=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||nt(t.append)&&((e=Qe(t))==="formdata"||e==="object"&&nt(t.toString)&&t.toString()==="[object FormData]"))},al=ct("URLSearchParams"),ll=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function xe(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),te(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const o=n?Object.getOwnPropertyNames(t):Object.keys(t),s=o.length;let a;for(r=0;r<s;r++)a=o[r],e.call(null,t[a],a,t)}}function Ps(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const As=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Cs=t=>!pe(t)&&t!==As;function Bn(){const{caseless:t}=Cs(this)&&this||{},e={},n=(r,i)=>{const o=t&&Ps(e,i)||i;Ve(e[o])&&Ve(r)?e[o]=Bn(e[o],r):Ve(r)?e[o]=Bn({},r):te(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&xe(arguments[r],n);return e}const cl=(t,e,n,{allOwnKeys:r}={})=>(xe(e,(i,o)=>{n&&nt(i)?t[o]=Es(i,n):t[o]=i},{allOwnKeys:r}),t),ul=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),fl=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},hl=(t,e,n,r)=>{let i,o,s;const a={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&ar(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},dl=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},pl=t=>{if(!t)return null;if(te(t))return t;let e=t.length;if(!Ts(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},ml=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&ar(Uint8Array)),gl=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},yl=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},vl=ct("HTMLFormElement"),xl=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Wr=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),bl=ct("RegExp"),Rs=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};xe(n,(i,o)=>{let s;(s=e(i,o,t))!==!1&&(r[o]=s||i)}),Object.defineProperties(t,r)},wl=t=>{Rs(t,(e,n)=>{if(nt(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(nt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},El=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return te(t)?r(t):r(String(t).split(e)),n},Sl=()=>{},Tl=(t,e)=>(t=+t,Number.isFinite(t)?t:e),vn="abcdefghijklmnopqrstuvwxyz",Ur="0123456789",Os={DIGIT:Ur,ALPHA:vn,ALPHA_DIGIT:vn+vn.toUpperCase()+Ur},Pl=(t=16,e=Os.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Al(t){return!!(t&&nt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Cl=t=>{const e=new Array(10),n=(r,i)=>{if(en(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=te(r)?[]:{};return xe(r,(s,a)=>{const c=n(s,i+1);!pe(c)&&(o[a]=c)}),e[i]=void 0,o}}return r};return n(t,0)},Rl=ct("AsyncFunction"),Ol=t=>t&&(en(t)||nt(t))&&nt(t.then)&&nt(t.catch),b={isArray:te,isArrayBuffer:Ss,isBuffer:Ja,isFormData:ol,isArrayBufferView:Za,isString:Qa,isNumber:Ts,isBoolean:tl,isObject:en,isPlainObject:Ve,isUndefined:pe,isDate:el,isFile:nl,isBlob:rl,isRegExp:bl,isFunction:nt,isStream:sl,isURLSearchParams:al,isTypedArray:ml,isFileList:il,forEach:xe,merge:Bn,extend:cl,trim:ll,stripBOM:ul,inherits:fl,toFlatObject:hl,kindOf:Qe,kindOfTest:ct,endsWith:dl,toArray:pl,forEachEntry:gl,matchAll:yl,isHTMLForm:vl,hasOwnProperty:Wr,hasOwnProp:Wr,reduceDescriptors:Rs,freezeMethods:wl,toObjectSet:El,toCamelCase:xl,noop:Sl,toFiniteNumber:Tl,findKey:Ps,global:As,isContextDefined:Cs,ALPHABET:Os,generateString:Pl,isSpecCompliantForm:Al,toJSONObject:Cl,isAsyncFn:Rl,isThenable:Ol};function O(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}b.inherits(O,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:b.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ks=O.prototype,js={};["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(t=>{js[t]={value:t}});Object.defineProperties(O,js);Object.defineProperty(ks,"isAxiosError",{value:!0});O.from=(t,e,n,r,i,o)=>{const s=Object.create(ks);return b.toFlatObject(t,s,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),O.call(s,t.message,e,n,r,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const kl=null;function In(t){return b.isPlainObject(t)||b.isArray(t)}function _s(t){return b.endsWith(t,"[]")?t.slice(0,-2):t}function zr(t,e,n){return t?t.concat(e).map(function(i,o){return i=_s(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function jl(t){return b.isArray(t)&&!t.some(In)}const _l=b.toFlatObject(b,{},null,function(e){return/^is[A-Z]/.test(e)});function nn(t,e,n){if(!b.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=b.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!b.isUndefined(v[m])});const r=n.metaTokens,i=n.visitor||f,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&b.isSpecCompliantForm(e);if(!b.isFunction(i))throw new TypeError("visitor must be a function");function l(g){if(g===null)return"";if(b.isDate(g))return g.toISOString();if(!c&&b.isBlob(g))throw new O("Blob is not supported. Use a Buffer instead.");return b.isArrayBuffer(g)||b.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function f(g,m,v){let x=g;if(g&&!v&&typeof g=="object"){if(b.endsWith(m,"{}"))m=r?m:m.slice(0,-2),g=JSON.stringify(g);else if(b.isArray(g)&&jl(g)||(b.isFileList(g)||b.endsWith(m,"[]"))&&(x=b.toArray(g)))return m=_s(m),x.forEach(function(y,E){!(b.isUndefined(y)||y===null)&&e.append(s===!0?zr([m],E,o):s===null?m:m+"[]",l(y))}),!1}return In(g)?!0:(e.append(zr(v,m,o),l(g)),!1)}const u=[],h=Object.assign(_l,{defaultVisitor:f,convertValue:l,isVisitable:In});function d(g,m){if(!b.isUndefined(g)){if(u.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));u.push(g),b.forEach(g,function(x,w){(!(b.isUndefined(x)||x===null)&&i.call(e,x,b.isString(w)?w.trim():w,m,h))===!0&&d(x,m?m.concat(w):[w])}),u.pop()}}if(!b.isObject(t))throw new TypeError("data must be an object");return d(t),e}function Hr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function lr(t,e){this._pairs=[],t&&nn(t,this,e)}const Vs=lr.prototype;Vs.append=function(e,n){this._pairs.push([e,n])};Vs.toString=function(e){const n=e?function(r){return e.call(this,r,Hr)}:Hr;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Vl(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ms(t,e,n){if(!e)return t;const r=n&&n.encode||Vl,i=n&&n.serialize;let o;if(i?o=i(e,n):o=b.isURLSearchParams(e)?e.toString():new lr(e,n).toString(r),o){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Ml{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){b.forEach(this.handlers,function(r){r!==null&&e(r)})}}const $r=Ml,Ls={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ll=typeof URLSearchParams<"u"?URLSearchParams:lr,Dl=typeof FormData<"u"?FormData:null,Nl=typeof Blob<"u"?Blob:null,Fl={isBrowser:!0,classes:{URLSearchParams:Ll,FormData:Dl,Blob:Nl},protocols:["http","https","file","blob","url","data"]},Ds=typeof window<"u"&&typeof document<"u",Bl=(t=>Ds&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),Il=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Wl=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ds,hasStandardBrowserEnv:Bl,hasStandardBrowserWebWorkerEnv:Il},Symbol.toStringTag,{value:"Module"})),at={...Wl,...Fl};function Ul(t,e){return nn(t,new at.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return at.isNode&&b.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function zl(t){return b.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Hl(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r<i;r++)o=n[r],e[o]=t[o];return e}function Ns(t){function e(n,r,i,o){let s=n[o++];const a=Number.isFinite(+s),c=o>=n.length;return s=!s&&b.isArray(i)?i.length:s,c?(b.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!a):((!i[s]||!b.isObject(i[s]))&&(i[s]=[]),e(n,r,i[s],o)&&b.isArray(i[s])&&(i[s]=Hl(i[s])),!a)}if(b.isFormData(t)&&b.isFunction(t.entries)){const n={};return b.forEachEntry(t,(r,i)=>{e(zl(r),i,n,0)}),n}return null}function $l(t,e,n){if(b.isString(t))try{return(e||JSON.parse)(t),b.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const cr={transitional:Ls,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=b.isObject(e);if(o&&b.isHTMLForm(e)&&(e=new FormData(e)),b.isFormData(e))return i&&i?JSON.stringify(Ns(e)):e;if(b.isArrayBuffer(e)||b.isBuffer(e)||b.isStream(e)||b.isFile(e)||b.isBlob(e))return e;if(b.isArrayBufferView(e))return e.buffer;if(b.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Ul(e,this.formSerializer).toString();if((a=b.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return nn(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),$l(e)):e}],transformResponse:[function(e){const n=this.transitional||cr.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(e&&b.isString(e)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?O.from(a,O.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:at.classes.FormData,Blob:at.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};b.forEach(["delete","get","head","post","put","patch"],t=>{cr.headers[t]={}});const ur=cr,ql=b.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"]),Gl=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
2
|
-
`).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||e[n]&&ql[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},qr=Symbol("internals");function re(t){return t&&String(t).trim().toLowerCase()}function Me(t){return t===!1||t==null?t:b.isArray(t)?t.map(Me):String(t)}function Kl(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const Xl=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function xn(t,e,n,r,i){if(b.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!b.isString(e)){if(b.isString(r))return e.indexOf(r)!==-1;if(b.isRegExp(r))return r.test(e)}}function Yl(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function Jl(t,e){const n=b.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,s){return this[r].call(this,e,i,o,s)},configurable:!0})})}class rn{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(a,c,l){const f=re(c);if(!f)throw new Error("header name must be a non-empty string");const u=b.findKey(i,f);(!u||i[u]===void 0||l===!0||l===void 0&&i[u]!==!1)&&(i[u||c]=Me(a))}const s=(a,c)=>b.forEach(a,(l,f)=>o(l,f,c));return b.isPlainObject(e)||e instanceof this.constructor?s(e,n):b.isString(e)&&(e=e.trim())&&!Xl(e)?s(Gl(e),n):e!=null&&o(n,e,r),this}get(e,n){if(e=re(e),e){const r=b.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return Kl(i);if(b.isFunction(n))return n.call(this,i,r);if(b.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=re(e),e){const r=b.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||xn(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(s){if(s=re(s),s){const a=b.findKey(r,s);a&&(!n||xn(r,r[a],a,n))&&(delete r[a],i=!0)}}return b.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||xn(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return b.forEach(this,(i,o)=>{const s=b.findKey(r,o);if(s){n[s]=Me(i),delete n[o];return}const a=e?Yl(o):String(o).trim();a!==o&&delete n[o],n[a]=Me(i),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return b.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&&b.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[qr]=this[qr]={accessors:{}}).accessors,i=this.prototype;function o(s){const a=re(s);r[a]||(Jl(i,s),r[a]=!0)}return b.isArray(e)?e.forEach(o):o(e),this}}rn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);b.reduceDescriptors(rn.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});b.freezeMethods(rn);const dt=rn;function bn(t,e){const n=this||ur,r=e||n,i=dt.from(r.headers);let o=r.data;return b.forEach(t,function(a){o=a.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function Fs(t){return!!(t&&t.__CANCEL__)}function be(t,e,n){O.call(this,t??"canceled",O.ERR_CANCELED,e,n),this.name="CanceledError"}b.inherits(be,O,{__CANCEL__:!0});function Zl(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new O("Request failed with status code "+n.status,[O.ERR_BAD_REQUEST,O.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Ql=at.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const s=[t+"="+encodeURIComponent(e)];b.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),b.isString(r)&&s.push("path="+r),b.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function tc(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ec(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function Bs(t,e){return t&&!tc(e)?ec(t,e):e}const nc=at.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(o){let s=o;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const a=b.isString(s)?i(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function rc(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function ic(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,s;return e=e!==void 0?e:1e3,function(c){const l=Date.now(),f=r[o];s||(s=l),n[i]=c,r[i]=l;let u=o,h=0;for(;u!==i;)h+=n[u++],u=u%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),l-s<e)return;const d=f&&l-f;return d?Math.round(h*1e3/d):void 0}}function Gr(t,e){let n=0;const r=ic(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-n,c=r(a),l=o<=s;n=o;const f={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&l?(s-o)/c:void 0,event:i};f[e?"download":"upload"]=!0,t(f)}}const sc=typeof XMLHttpRequest<"u",oc=sc&&function(t){return new Promise(function(n,r){let i=t.data;const o=dt.from(t.headers).normalize();let{responseType:s,withXSRFToken:a}=t,c;function l(){t.cancelToken&&t.cancelToken.unsubscribe(c),t.signal&&t.signal.removeEventListener("abort",c)}let f;if(b.isFormData(i)){if(at.hasStandardBrowserEnv||at.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((f=o.getContentType())!==!1){const[m,...v]=f?f.split(";").map(x=>x.trim()).filter(Boolean):[];o.setContentType([m||"multipart/form-data",...v].join("; "))}}let u=new XMLHttpRequest;if(t.auth){const m=t.auth.username||"",v=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(m+":"+v))}const h=Bs(t.baseURL,t.url);u.open(t.method.toUpperCase(),Ms(h,t.params,t.paramsSerializer),!0),u.timeout=t.timeout;function d(){if(!u)return;const m=dt.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:m,config:t,request:u};Zl(function(y){n(y),l()},function(y){r(y),l()},x),u=null}if("onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(r(new O("Request aborted",O.ECONNABORTED,t,u)),u=null)},u.onerror=function(){r(new O("Network Error",O.ERR_NETWORK,t,u)),u=null},u.ontimeout=function(){let v=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const x=t.transitional||Ls;t.timeoutErrorMessage&&(v=t.timeoutErrorMessage),r(new O(v,x.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,t,u)),u=null},at.hasStandardBrowserEnv&&(a&&b.isFunction(a)&&(a=a(t)),a||a!==!1&&nc(h))){const m=t.xsrfHeaderName&&t.xsrfCookieName&&Ql.read(t.xsrfCookieName);m&&o.set(t.xsrfHeaderName,m)}i===void 0&&o.setContentType(null),"setRequestHeader"in u&&b.forEach(o.toJSON(),function(v,x){u.setRequestHeader(x,v)}),b.isUndefined(t.withCredentials)||(u.withCredentials=!!t.withCredentials),s&&s!=="json"&&(u.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&u.addEventListener("progress",Gr(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",Gr(t.onUploadProgress)),(t.cancelToken||t.signal)&&(c=m=>{u&&(r(!m||m.type?new be(null,t,u):m),u.abort(),u=null)},t.cancelToken&&t.cancelToken.subscribe(c),t.signal&&(t.signal.aborted?c():t.signal.addEventListener("abort",c)));const g=rc(h);if(g&&at.protocols.indexOf(g)===-1){r(new O("Unsupported protocol "+g+":",O.ERR_BAD_REQUEST,t));return}u.send(i||null)})},Wn={http:kl,xhr:oc};b.forEach(Wn,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Kr=t=>`- ${t}`,ac=t=>b.isFunction(t)||t===null||t===!1,Is={getAdapter:t=>{t=b.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o<e;o++){n=t[o];let s;if(r=n,!ac(n)&&(r=Wn[(s=String(n)).toLowerCase()],r===void 0))throw new O(`Unknown adapter '${s}'`);if(r)break;i[s||"#"+o]=r}if(!r){const o=Object.entries(i).map(([a,c])=>`adapter ${a} `+(c===!1?"is not supported by the environment":"is not available in the build"));let s=e?o.length>1?`since :
|
|
4
|
-
`+o.map(Kr).join(`
|
|
5
|
-
`):" "+Kr(o[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:Wn};function wn(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new be(null,t)}function Xr(t){return wn(t),t.headers=dt.from(t.headers),t.data=bn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Is.getAdapter(t.adapter||ur.adapter)(t).then(function(r){return wn(t),r.data=bn.call(t,t.transformResponse,r),r.headers=dt.from(r.headers),r},function(r){return Fs(r)||(wn(t),r&&r.response&&(r.response.data=bn.call(t,t.transformResponse,r.response),r.response.headers=dt.from(r.response.headers))),Promise.reject(r)})}const Yr=t=>t instanceof dt?t.toJSON():t;function Yt(t,e){e=e||{};const n={};function r(l,f,u){return b.isPlainObject(l)&&b.isPlainObject(f)?b.merge.call({caseless:u},l,f):b.isPlainObject(f)?b.merge({},f):b.isArray(f)?f.slice():f}function i(l,f,u){if(b.isUndefined(f)){if(!b.isUndefined(l))return r(void 0,l,u)}else return r(l,f,u)}function o(l,f){if(!b.isUndefined(f))return r(void 0,f)}function s(l,f){if(b.isUndefined(f)){if(!b.isUndefined(l))return r(void 0,l)}else return r(void 0,f)}function a(l,f,u){if(u in e)return r(l,f);if(u in t)return r(void 0,l)}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(l,f)=>i(Yr(l),Yr(f),!0)};return b.forEach(Object.keys(Object.assign({},t,e)),function(f){const u=c[f]||i,h=u(t[f],e[f],f);b.isUndefined(h)&&u!==a||(n[f]=h)}),n}const Ws="1.6.2",fr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{fr[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const Jr={};fr.transitional=function(e,n,r){function i(o,s){return"[Axios v"+Ws+"] Transitional option '"+o+"'"+s+(r?". "+r:"")}return(o,s,a)=>{if(e===!1)throw new O(i(s," has been removed"+(n?" in "+n:"")),O.ERR_DEPRECATED);return n&&!Jr[s]&&(Jr[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,s,a):!0}};function lc(t,e,n){if(typeof t!="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],s=e[o];if(s){const a=t[o],c=a===void 0||s(a,o,t);if(c!==!0)throw new O("option "+o+" must be "+c,O.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new O("Unknown option "+o,O.ERR_BAD_OPTION)}}const Un={assertOptions:lc,validators:fr},yt=Un.validators;class Be{constructor(e){this.defaults=e,this.interceptors={request:new $r,response:new $r}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Yt(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Un.assertOptions(r,{silentJSONParsing:yt.transitional(yt.boolean),forcedJSONParsing:yt.transitional(yt.boolean),clarifyTimeoutError:yt.transitional(yt.boolean)},!1),i!=null&&(b.isFunction(i)?n.paramsSerializer={serialize:i}:Un.assertOptions(i,{encode:yt.function,serialize:yt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=o&&b.merge(o.common,o[n.method]);o&&b.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=dt.concat(s,o);const a=[];let c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(c=c&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const l=[];this.interceptors.response.forEach(function(m){l.push(m.fulfilled,m.rejected)});let f,u=0,h;if(!c){const g=[Xr.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,l),h=g.length,f=Promise.resolve(n);u<h;)f=f.then(g[u++],g[u++]);return f}h=a.length;let d=n;for(u=0;u<h;){const g=a[u++],m=a[u++];try{d=g(d)}catch(v){m.call(this,v);break}}try{f=Xr.call(this,d)}catch(g){return Promise.reject(g)}for(u=0,h=l.length;u<h;)f=f.then(l[u++],l[u++]);return f}getUri(e){e=Yt(this.defaults,e);const n=Bs(e.baseURL,e.url);return Ms(n,e.params,e.paramsSerializer)}}b.forEach(["delete","get","head","options"],function(e){Be.prototype[e]=function(n,r){return this.request(Yt(r||{},{method:e,url:n,data:(r||{}).data}))}});b.forEach(["post","put","patch"],function(e){function n(r){return function(o,s,a){return this.request(Yt(a||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}Be.prototype[e]=n(),Be.prototype[e+"Form"]=n(!0)});const Le=Be;class hr{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(i=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const s=new Promise(a=>{r.subscribe(a),o=a}).then(i);return s.cancel=function(){r.unsubscribe(o)},s},e(function(o,s,a){r.reason||(r.reason=new be(o,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new hr(function(i){e=i}),cancel:e}}}const cc=hr;function uc(t){return function(n){return t.apply(null,n)}}function fc(t){return b.isObject(t)&&t.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};Object.entries(zn).forEach(([t,e])=>{zn[e]=t});const hc=zn;function Us(t){const e=new Le(t),n=Es(Le.prototype.request,e);return b.extend(n,Le.prototype,e,{allOwnKeys:!0}),b.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return Us(Yt(t,i))},n}const W=Us(ur);W.Axios=Le;W.CanceledError=be;W.CancelToken=cc;W.isCancel=Fs;W.VERSION=Ws;W.toFormData=nn;W.AxiosError=O;W.Cancel=W.CanceledError;W.all=function(e){return Promise.all(e)};W.spread=uc;W.isAxiosError=fc;W.mergeConfig=Yt;W.AxiosHeaders=dt;W.formToJSON=t=>Ns(b.isHTMLForm(t)?new FormData(t):t);W.getAdapter=Is.getAdapter;W.HttpStatusCode=hc;W.default=W;const zs=W;var dc=typeof global=="object"&&global&&global.Object===Object&&global;const pc=dc;var mc=typeof self=="object"&&self&&self.Object===Object&&self,gc=pc||mc||Function("return this")();const Hs=gc;var yc=Hs.Symbol;const Ie=yc;var $s=Object.prototype,vc=$s.hasOwnProperty,xc=$s.toString,ie=Ie?Ie.toStringTag:void 0;function bc(t){var e=vc.call(t,ie),n=t[ie];try{t[ie]=void 0;var r=!0}catch{}var i=xc.call(t);return r&&(e?t[ie]=n:delete t[ie]),i}var wc=Object.prototype,Ec=wc.toString;function Sc(t){return Ec.call(t)}var Tc="[object Null]",Pc="[object Undefined]",Zr=Ie?Ie.toStringTag:void 0;function Ac(t){return t==null?t===void 0?Pc:Tc:Zr&&Zr in Object(t)?bc(t):Sc(t)}function Cc(t){return t!=null&&typeof t=="object"}var Rc="[object Symbol]";function Oc(t){return typeof t=="symbol"||Cc(t)&&Ac(t)==Rc}var kc=/\s/;function jc(t){for(var e=t.length;e--&&kc.test(t.charAt(e)););return e}var _c=/^\s+/;function Vc(t){return t&&t.slice(0,jc(t)+1).replace(_c,"")}function We(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Qr=0/0,Mc=/^[-+]0x[0-9a-f]+$/i,Lc=/^0b[01]+$/i,Dc=/^0o[0-7]+$/i,Nc=parseInt;function ti(t){if(typeof t=="number")return t;if(Oc(t))return Qr;if(We(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=We(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Vc(t);var n=Lc.test(t);return n||Dc.test(t)?Nc(t.slice(2),n?2:8):Mc.test(t)?Qr:+t}var Fc=function(){return Hs.Date.now()};const En=Fc;var Bc="Expected a function",Ic=Math.max,Wc=Math.min;function De(t,e,n){var r,i,o,s,a,c,l=0,f=!1,u=!1,h=!0;if(typeof t!="function")throw new TypeError(Bc);e=ti(e)||0,We(n)&&(f=!!n.leading,u="maxWait"in n,o=u?Ic(ti(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function d(T){var P=r,A=i;return r=i=void 0,l=T,s=t.apply(A,P),s}function g(T){return l=T,a=setTimeout(x,e),f?d(T):s}function m(T){var P=T-c,A=T-l,R=e-P;return u?Wc(R,o-A):R}function v(T){var P=T-c,A=T-l;return c===void 0||P>=e||P<0||u&&A>=o}function x(){var T=En();if(v(T))return w(T);a=setTimeout(x,m(T))}function w(T){return a=void 0,h&&r?d(T):(r=i=void 0,s)}function y(){a!==void 0&&clearTimeout(a),l=0,r=c=i=a=void 0}function E(){return a===void 0?s:w(En())}function S(){var T=En(),P=v(T);if(r=arguments,i=this,c=T,P){if(a===void 0)return g(c);if(u)return clearTimeout(a),a=setTimeout(x,e),d(c)}return a===void 0&&(a=setTimeout(x,e)),s}return S.cancel=y,S.flush=E,S}var Uc="Expected a function";function zc(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(Uc);return We(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),De(t,e,{leading:r,maxWait:e,trailing:i})}var Hc=!!(typeof window<"u"&&window.document&&window.document.createElement),$c=Hc;const qs=p.getDefaultExportFromCjs($c);var Ht=function(){return Ht=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Ht.apply(this,arguments)},Ut=null,ei=null;qs&&window.addEventListener("resize",function(){ei!==window.devicePixelRatio&&(ei=window.devicePixelRatio,Ut=null)});function ni(){if(Ut===null){if(typeof document>"u")return Ut=0,Ut;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var n=e.getBoundingClientRect().right;t.removeChild(e),Ut=n}return Ut}function Gs(t){return!t||!t.ownerDocument||!t.ownerDocument.defaultView?window:t.ownerDocument.defaultView}function Ks(t){return!t||!t.ownerDocument?document:t.ownerDocument}var Xs=function(t){var e={},n=Array.prototype.reduce.call(t,function(r,i){var o=i.name.match(/data-simplebar-(.+)/);if(o){var s=o[1].replace(/\W+(.)/g,function(a,c){return c.toUpperCase()});switch(i.value){case"true":r[s]=!0;break;case"false":r[s]=!1;break;case void 0:r[s]=!0;break;default:r[s]=i.value}}return r},e);return n};function Ys(t,e){var n;t&&(n=t.classList).add.apply(n,e.split(" "))}function Js(t,e){t&&e.split(" ").forEach(function(n){t.classList.remove(n)})}function Zs(t){return".".concat(t.split(" ").join("."))}var qc=Object.freeze({__proto__:null,getElementWindow:Gs,getElementDocument:Ks,getOptions:Xs,addClasses:Ys,removeClasses:Js,classNamesToQuery:Zs}),vt=Gs,Sn=Ks,Gc=Xs,xt=Ys,bt=Js,G=Zs,Ae=function(){function t(e,n){n===void 0&&(n={});var r=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var i=vt(r.el);r.scrollXTicking||(i.requestAnimationFrame(r.scrollX),r.scrollXTicking=!0),r.scrollYTicking||(i.requestAnimationFrame(r.scrollY),r.scrollYTicking=!0),r.isScrolling||(r.isScrolling=!0,xt(r.el,r.classNames.scrolling)),r.showScrollbar("x"),r.showScrollbar("y"),r.onStopScrolling()},this.scrollX=function(){r.axis.x.isOverflowing&&r.positionScrollbar("x"),r.scrollXTicking=!1},this.scrollY=function(){r.axis.y.isOverflowing&&r.positionScrollbar("y"),r.scrollYTicking=!1},this._onStopScrolling=function(){bt(r.el,r.classNames.scrolling),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isScrolling=!1},this.onMouseEnter=function(){r.isMouseEntering||(xt(r.el,r.classNames.mouseEntered),r.showScrollbar("x"),r.showScrollbar("y"),r.isMouseEntering=!0),r.onMouseEntered()},this._onMouseEntered=function(){bt(r.el,r.classNames.mouseEntered),r.options.autoHide&&(r.hideScrollbar("x"),r.hideScrollbar("y")),r.isMouseEntering=!1},this._onMouseMove=function(i){r.mouseX=i.clientX,r.mouseY=i.clientY,(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseMoveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseMoveForAxis("y")},this.onMouseLeave=function(){r.onMouseMove.cancel(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&r.onMouseLeaveForAxis("x"),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&r.onMouseLeaveForAxis("y"),r.mouseX=-1,r.mouseY=-1},this._onWindowResize=function(){r.scrollbarWidth=r.getScrollbarWidth(),r.hideNativeScrollbar()},this.onPointerEvent=function(i){if(!(!r.axis.x.track.el||!r.axis.y.track.el||!r.axis.x.scrollbar.el||!r.axis.y.scrollbar.el)){var o,s;r.axis.x.track.rect=r.axis.x.track.el.getBoundingClientRect(),r.axis.y.track.rect=r.axis.y.track.el.getBoundingClientRect(),(r.axis.x.isOverflowing||r.axis.x.forceVisible)&&(o=r.isWithinBounds(r.axis.x.track.rect)),(r.axis.y.isOverflowing||r.axis.y.forceVisible)&&(s=r.isWithinBounds(r.axis.y.track.rect)),(o||s)&&(i.stopPropagation(),i.type==="pointerdown"&&i.pointerType!=="touch"&&(o&&(r.axis.x.scrollbar.rect=r.axis.x.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.x.scrollbar.rect)?r.onDragStart(i,"x"):r.onTrackClick(i,"x")),s&&(r.axis.y.scrollbar.rect=r.axis.y.scrollbar.el.getBoundingClientRect(),r.isWithinBounds(r.axis.y.scrollbar.rect)?r.onDragStart(i,"y"):r.onTrackClick(i,"y"))))}},this.drag=function(i){var o,s,a,c,l,f,u,h,d,g,m;if(!(!r.draggedAxis||!r.contentWrapperEl)){var v,x=r.axis[r.draggedAxis].track,w=(s=(o=x.rect)===null||o===void 0?void 0:o[r.axis[r.draggedAxis].sizeAttr])!==null&&s!==void 0?s:0,y=r.axis[r.draggedAxis].scrollbar,E=(c=(a=r.contentWrapperEl)===null||a===void 0?void 0:a[r.axis[r.draggedAxis].scrollSizeAttr])!==null&&c!==void 0?c:0,S=parseInt((f=(l=r.elStyles)===null||l===void 0?void 0:l[r.axis[r.draggedAxis].sizeAttr])!==null&&f!==void 0?f:"0px",10);i.preventDefault(),i.stopPropagation(),r.draggedAxis==="y"?v=i.pageY:v=i.pageX;var T=v-((h=(u=x.rect)===null||u===void 0?void 0:u[r.axis[r.draggedAxis].offsetAttr])!==null&&h!==void 0?h:0)-r.axis[r.draggedAxis].dragOffset;T=r.draggedAxis==="x"&&r.isRtl?((g=(d=x.rect)===null||d===void 0?void 0:d[r.axis[r.draggedAxis].sizeAttr])!==null&&g!==void 0?g:0)-y.size-T:T;var P=T/(w-y.size),A=P*(E-S);r.draggedAxis==="x"&&r.isRtl&&(A=!((m=t.getRtlHelpers())===null||m===void 0)&&m.isScrollingToNegative?-A:A),r.contentWrapperEl[r.axis[r.draggedAxis].scrollOffsetAttr]=A}},this.onEndDrag=function(i){var o=Sn(r.el),s=vt(r.el);i.preventDefault(),i.stopPropagation(),bt(r.el,r.classNames.dragging),o.removeEventListener("mousemove",r.drag,!0),o.removeEventListener("mouseup",r.onEndDrag,!0),r.removePreventClickId=s.setTimeout(function(){o.removeEventListener("click",r.preventClick,!0),o.removeEventListener("dblclick",r.preventClick,!0),r.removePreventClickId=null})},this.preventClick=function(i){i.preventDefault(),i.stopPropagation()},this.el=e,this.options=Ht(Ht({},t.defaultOptions),n),this.classNames=Ht(Ht({},t.defaultOptions.classNames),n.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},typeof this.el!="object"||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=zc(this._onMouseMove,64),this.onWindowResize=De(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=De(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=De(this._onMouseEntered,this.stopScrollDelay),this.init()}return t.getRtlHelpers=function(){if(t.rtlHelpers)return t.rtlHelpers;var e=document.createElement("div");e.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=e.firstElementChild,r=n==null?void 0:n.firstElementChild;if(!r)return null;document.body.appendChild(n),n.scrollLeft=0;var i=t.getOffset(n),o=t.getOffset(r);n.scrollLeft=-999;var s=t.getOffset(r);return document.body.removeChild(n),t.rtlHelpers={isScrollOriginAtZero:i.left!==o.left,isScrollingToNegative:o.left!==s.left},t.rtlHelpers},t.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display==="none"||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:ni()}catch{return ni()}},t.getOffset=function(e){var n=e.getBoundingClientRect(),r=Sn(e),i=vt(e);return{top:n.top+(i.pageYOffset||r.documentElement.scrollTop),left:n.left+(i.pageXOffset||r.documentElement.scrollLeft)}},t.prototype.init=function(){qs&&(this.initDOM(),this.rtlHelpers=t.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},t.prototype.initDOM=function(){var e,n;this.wrapperEl=this.el.querySelector(G(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(G(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(G(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(G(this.classNames.offset)),this.maskEl=this.el.querySelector(G(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,G(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(G(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(G(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(G(this.classNames.track)).concat(G(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(G(this.classNames.track)).concat(G(this.classNames.vertical))),this.axis.x.scrollbar.el=((e=this.axis.x.track.el)===null||e===void 0?void 0:e.querySelector(G(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=((n=this.axis.y.track.el)===null||n===void 0?void 0:n.querySelector(G(this.classNames.scrollbar)))||null,this.options.autoHide||(xt(this.axis.x.scrollbar.el,this.classNames.visible),xt(this.axis.y.scrollbar.el,this.classNames.visible))},t.prototype.initListeners=function(){var e=this,n,r=vt(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),(n=this.contentWrapperEl)===null||n===void 0||n.addEventListener("scroll",this.onScroll),r.addEventListener("resize",this.onWindowResize),!!this.contentEl){if(window.ResizeObserver){var i=!1,o=r.ResizeObserver||ResizeObserver;this.resizeObserver=new o(function(){i&&r.requestAnimationFrame(function(){e.recalculate()})}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),r.requestAnimationFrame(function(){i=!0})}this.mutationObserver=new r.MutationObserver(function(){r.requestAnimationFrame(function(){e.recalculate()})}),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},t.prototype.recalculate=function(){if(!(!this.heightAutoObserverEl||!this.contentEl||!this.contentWrapperEl||!this.wrapperEl||!this.placeholderEl)){var e=vt(this.el);this.elStyles=e.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var n=this.contentEl.offsetWidth,r=this.heightAutoObserverEl.offsetHeight<=1,i=this.heightAutoObserverEl.offsetWidth<=1||n>0,o=this.contentWrapperEl.offsetWidth,s=this.elStyles.overflowX,a=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var c=this.contentEl.scrollHeight,l=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=r?"auto":"100%",this.placeholderEl.style.width=i?"".concat(n||l,"px"):"auto",this.placeholderEl.style.height="".concat(c,"px");var f=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=n!==0&&l>n,this.axis.y.isOverflowing=c>f,this.axis.x.isOverflowing=s==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=a==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var u=this.axis.x.isOverflowing?this.scrollbarWidth:0,h=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&l>o-h,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&c>f-u,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},t.prototype.getScrollbarSize=function(e){var n,r;if(e===void 0&&(e="y"),!this.axis[e].isOverflowing||!this.contentEl)return 0;var i=this.contentEl[this.axis[e].scrollSizeAttr],o=(r=(n=this.axis[e].track.el)===null||n===void 0?void 0:n[this.axis[e].offsetSizeAttr])!==null&&r!==void 0?r:0,s=o/i,a;return a=Math.max(~~(s*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},t.prototype.positionScrollbar=function(e){var n,r,i;e===void 0&&(e="y");var o=this.axis[e].scrollbar;if(!(!this.axis[e].isOverflowing||!this.contentWrapperEl||!o.el||!this.elStyles)){var s=this.contentWrapperEl[this.axis[e].scrollSizeAttr],a=((n=this.axis[e].track.el)===null||n===void 0?void 0:n[this.axis[e].offsetSizeAttr])||0,c=parseInt(this.elStyles[this.axis[e].sizeAttr],10),l=this.contentWrapperEl[this.axis[e].scrollOffsetAttr];l=e==="x"&&this.isRtl&&(!((r=t.getRtlHelpers())===null||r===void 0)&&r.isScrollOriginAtZero)?-l:l,e==="x"&&this.isRtl&&(l=!((i=t.getRtlHelpers())===null||i===void 0)&&i.isScrollingToNegative?l:-l);var f=l/(s-c),u=~~((a-o.size)*f);u=e==="x"&&this.isRtl?-u+(a-o.size):u,o.el.style.transform=e==="x"?"translate3d(".concat(u,"px, 0, 0)"):"translate3d(0, ".concat(u,"px, 0)")}},t.prototype.toggleTrackVisibility=function(e){e===void 0&&(e="y");var n=this.axis[e].track.el,r=this.axis[e].scrollbar.el;!n||!r||!this.contentWrapperEl||(this.axis[e].isOverflowing||this.axis[e].forceVisible?(n.style.visibility="visible",this.contentWrapperEl.style[this.axis[e].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(e))):(n.style.visibility="hidden",this.contentWrapperEl.style[this.axis[e].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(e))),this.axis[e].isOverflowing?r.style.display="block":r.style.display="none")},t.prototype.showScrollbar=function(e){e===void 0&&(e="y"),this.axis[e].isOverflowing&&!this.axis[e].scrollbar.isVisible&&(xt(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!0)},t.prototype.hideScrollbar=function(e){e===void 0&&(e="y"),this.axis[e].isOverflowing&&this.axis[e].scrollbar.isVisible&&(bt(this.axis[e].scrollbar.el,this.classNames.visible),this.axis[e].scrollbar.isVisible=!1)},t.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},t.prototype.onMouseMoveForAxis=function(e){e===void 0&&(e="y");var n=this.axis[e];!n.track.el||!n.scrollbar.el||(n.track.rect=n.track.el.getBoundingClientRect(),n.scrollbar.rect=n.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(n.track.rect)?(this.showScrollbar(e),xt(n.track.el,this.classNames.hover),this.isWithinBounds(n.scrollbar.rect)?xt(n.scrollbar.el,this.classNames.hover):bt(n.scrollbar.el,this.classNames.hover)):(bt(n.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)))},t.prototype.onMouseLeaveForAxis=function(e){e===void 0&&(e="y"),bt(this.axis[e].track.el,this.classNames.hover),bt(this.axis[e].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(e)},t.prototype.onDragStart=function(e,n){var r;n===void 0&&(n="y");var i=Sn(this.el),o=vt(this.el),s=this.axis[n].scrollbar,a=n==="y"?e.pageY:e.pageX;this.axis[n].dragOffset=a-(((r=s.rect)===null||r===void 0?void 0:r[this.axis[n].offsetAttr])||0),this.draggedAxis=n,xt(this.el,this.classNames.dragging),i.addEventListener("mousemove",this.drag,!0),i.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(i.addEventListener("click",this.preventClick,!0),i.addEventListener("dblclick",this.preventClick,!0)):(o.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},t.prototype.onTrackClick=function(e,n){var r=this,i,o,s,a;n===void 0&&(n="y");var c=this.axis[n];if(!(!this.options.clickOnTrack||!c.scrollbar.el||!this.contentWrapperEl)){e.preventDefault();var l=vt(this.el);this.axis[n].scrollbar.rect=c.scrollbar.el.getBoundingClientRect();var f=this.axis[n].scrollbar,u=(o=(i=f.rect)===null||i===void 0?void 0:i[this.axis[n].offsetAttr])!==null&&o!==void 0?o:0,h=parseInt((a=(s=this.elStyles)===null||s===void 0?void 0:s[this.axis[n].sizeAttr])!==null&&a!==void 0?a:"0px",10),d=this.contentWrapperEl[this.axis[n].scrollOffsetAttr],g=n==="y"?this.mouseY-u:this.mouseX-u,m=g<0?-1:1,v=m===-1?d-h:d+h,x=40,w=function(){r.contentWrapperEl&&(m===-1?d>v&&(d-=x,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=d,l.requestAnimationFrame(w)):d<v&&(d+=x,r.contentWrapperEl[r.axis[n].scrollOffsetAttr]=d,l.requestAnimationFrame(w)))};w()}},t.prototype.getContentElement=function(){return this.contentEl},t.prototype.getScrollElement=function(){return this.contentWrapperEl},t.prototype.removeListeners=function(){var e=vt(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},t.prototype.unMount=function(){this.removeListeners()},t.prototype.isWithinBounds=function(e){return this.mouseX>=e.left&&this.mouseX<=e.left+e.width&&this.mouseY>=e.top&&this.mouseY<=e.top+e.height},t.prototype.findChild=function(e,n){var r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;return Array.prototype.filter.call(e.children,function(i){return r.call(i,n)})[0]},t.rtlHelpers=null,t.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},t.getOptions=Gc,t.helpers=qc,t}(),Z=function(){return Z=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Z.apply(this,arguments)};function Kc(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}var Qs=p.reactExports.forwardRef(function(t,e){var n=t.children,r=t.scrollableNodeProps,i=r===void 0?{}:r,o=Kc(t,["children","scrollableNodeProps"]),s=p.reactExports.useRef(),a=p.reactExports.useRef(),c=p.reactExports.useRef(),l={},f={};Object.keys(o).forEach(function(d){Object.prototype.hasOwnProperty.call(Ae.defaultOptions,d)?l[d]=o[d]:f[d]=o[d]});var u=Z(Z({},Ae.defaultOptions.classNames),l.classNames),h=Z(Z({},i),{className:"".concat(u.contentWrapper).concat(i.className?" ".concat(i.className):""),tabIndex:0,role:"region","aria-label":l.ariaLabel||Ae.defaultOptions.ariaLabel});return p.reactExports.useEffect(function(){var d;return a.current=h.ref?h.ref.current:a.current,s.current&&(d=new Ae(s.current,Z(Z(Z({},l),a.current&&{scrollableNode:a.current}),c.current&&{contentNode:c.current})),typeof e=="function"?e(d):e&&(e.current=d)),function(){d==null||d.unMount(),d=null,typeof e=="function"&&e(null)}},[]),p.reactExports.createElement("div",Z({"data-simplebar":"init",ref:s},f),p.reactExports.createElement("div",{className:u.wrapper},p.reactExports.createElement("div",{className:u.heightAutoObserverWrapperEl},p.reactExports.createElement("div",{className:u.heightAutoObserverEl})),p.reactExports.createElement("div",{className:u.mask},p.reactExports.createElement("div",{className:u.offset},typeof n=="function"?n({scrollableNodeRef:a,scrollableNodeProps:Z(Z({},h),{ref:a}),contentNodeRef:c,contentNodeProps:{className:u.contentEl,ref:c}}):p.reactExports.createElement("div",Z({},h),p.reactExports.createElement("div",{className:u.contentEl},n)))),p.reactExports.createElement("div",{className:u.placeholder})),p.reactExports.createElement("div",{className:"".concat(u.track," simplebar-horizontal")},p.reactExports.createElement("div",{className:u.scrollbar})),p.reactExports.createElement("div",{className:"".concat(u.track," simplebar-vertical")},p.reactExports.createElement("div",{className:u.scrollbar})))});Qs.displayName="SimpleBar";const Xc=`[data-simplebar]{position:relative;flex-direction:column;flex-wrap:wrap;justify-content:flex-start;align-content:flex-start;align-items:flex-start}.simplebar-wrapper{overflow:hidden;width:inherit;height:inherit;max-width:inherit;max-height:inherit}.simplebar-mask{direction:inherit;position:absolute;overflow:hidden;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:0}.simplebar-offset{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.simplebar-content-wrapper{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:auto;max-width:100%;max-height:100%;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.simplebar-content-wrapper::-webkit-scrollbar,.simplebar-hide-scrollbar::-webkit-scrollbar{display:none;width:0;height:0}.simplebar-content:after,.simplebar-content:before{content:" ";display:table}.simplebar-placeholder{max-height:100%;max-width:100%;width:100%;pointer-events:none}.simplebar-height-auto-observer-wrapper{box-sizing:inherit!important;height:100%;width:100%;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none;flex-grow:inherit;flex-shrink:0;flex-basis:0}.simplebar-height-auto-observer{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:1000%;width:1000%;min-height:1px;min-width:1px;overflow:hidden;pointer-events:none;z-index:-1}.simplebar-track{z-index:1;position:absolute;right:0;bottom:0;pointer-events:none;overflow:hidden}[data-simplebar].simplebar-dragging,[data-simplebar].simplebar-dragging .simplebar-content{pointer-events:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}[data-simplebar].simplebar-dragging .simplebar-track{pointer-events:all}.simplebar-scrollbar{position:absolute;left:0;right:0;min-height:10px}.simplebar-scrollbar:before{position:absolute;content:"";background:#000;border-radius:7px;left:2px;right:2px;opacity:0;transition:opacity .2s .5s linear}.simplebar-scrollbar.simplebar-visible:before{opacity:.5;transition-delay:0s;transition-duration:0s}.simplebar-track.simplebar-vertical{top:0;width:11px}.simplebar-scrollbar:before{top:2px;bottom:2px;left:2px;right:2px}.simplebar-track.simplebar-horizontal{left:0;height:11px}.simplebar-track.simplebar-horizontal .simplebar-scrollbar{right:auto;left:0;top:0;bottom:0;min-height:0;min-width:10px;width:auto}[data-simplebar-direction=rtl] .simplebar-track.simplebar-vertical{right:auto;left:0}.simplebar-dummy-scrollbar-size{direction:rtl;position:fixed;opacity:0;visibility:hidden;height:500px;width:500px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:scrollbar!important}.simplebar-dummy-scrollbar-size>div{width:200%;height:200%;margin:10px 0}.simplebar-hide-scrollbar{position:fixed;left:0;visibility:hidden;overflow-y:scroll;scrollbar-width:none;-ms-overflow-style:none}
|
|
6
|
-
`,Yc={TOKEN_MALFORMED:"token_malformed",TOKEN_EXPIRED:"token_expired"},Jc=t=>{window.location.href=`${t}/authentication/login?callbackUrl=${window.location.href}`},Zc=t=>{window.location.href=`${t}/authentication/logout?callbackUrl=${window.location.href}`},Qc=`.modal-overlay{z-index:1300;position:fixed;top:0;right:0;bottom:0;left:0;background:hsla(0,0%,0%,.254);--tw-backdrop-blur: blur(4px);justify-content:center;align-items:center;-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.modal-title{font-size:1.25rem;line-height:1.75rem;color:#e01b00;font-weight:500}.modal-footer{display:flex;justify-content:space-between;width:80%}.modal-container{background:#ffffff;-webkit-backdrop-filter:blur(4.5px);backdrop-filter:blur(4.5px);display:flex;padding:32px 24px 40px;flex-direction:column;align-items:center;gap:24px;align-self:stretch;width:500px;height:204px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:.5rem}.modal-button{border-radius:3px;border:1px solid #ddd;background:#ddd;padding:8px 32px;font-size:14px;transition:background-color .25s cubic-bezier(.4,0,.2,1) 0ms,box-shadow .25s cubic-bezier(.4,0,.2,1) 0ms,border-color .25s cubic-bezier(.4,0,.2,1) 0ms,color .25s cubic-bezier(.4,0,.2,1) 0ms}.cancel-btn:hover{background:#C5C5C5}.confirm-btn{background:#e01b00!important}.confirm-btn:hover{background:#BE1700!important}.text-white{color:#fff}.text-sm{font-size:.875rem;line-height:1.25rem}
|
|
7
|
-
`;function to({isOpen:t,onClose:e,onConfirm:n}){if(!t)return null;function r(i){var o;((o=i.target)==null?void 0:o.id)==="modal-wrapper"&&e()}return p.jsxRuntimeExports.jsxs(p.jsxRuntimeExports.Fragment,{children:[p.jsxRuntimeExports.jsx("style",{type:"text/css",children:Qc}),p.jsxRuntimeExports.jsx("div",{onClick:r,className:"modal-overlay",id:"modal-wrapper",children:p.jsxRuntimeExports.jsxs("div",{className:"modal-container",children:[p.jsxRuntimeExports.jsx("h3",{className:"modal-title",children:"Log out"}),p.jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Are you sure want to log out?"}),p.jsxRuntimeExports.jsxs("div",{className:"modal-footer",children:[p.jsxRuntimeExports.jsx("button",{className:"modal-button cancel-btn",onClick:e,children:"Cancel"}),p.jsxRuntimeExports.jsx("button",{onClick:n,className:"text-white confirm-btn modal-button",children:"Confirm"})]})]})})]})}const tu=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}
|
|
8
|
-
`;function eo({children:t,styles:e=[],...n}){return p.jsxRuntimeExports.jsxs("div",{...n,children:[[tu,...e].map((r,i)=>p.jsxRuntimeExports.jsx("style",{type:"text/css",children:r},i)),t]})}const dr=t=>typeof t=="number"&&!isNaN(t),le=t=>typeof t=="string",no=t=>typeof t=="function",eu=t=>p.reactExports.isValidElement(t)||le(t)||no(t)||dr(t),ot=new Map;let Hn=[];const ri=new Set,ro=()=>ot.size>0;function nu(t,e){var n;if(e)return!((n=ot.get(e))==null||!n.isToastActive(t));let r=!1;return ot.forEach(i=>{i.isToastActive(t)&&(r=!0)}),r}function ru(t,e){eu(t)&&(ro()||Hn.push({content:t,options:e}),ot.forEach(n=>{n.buildToast(t,e)}))}function ii(t,e){ot.forEach(n=>{e!=null&&e!=null&&e.containerId?(e==null?void 0:e.containerId)===n.id&&n.toggle(t,e==null?void 0:e.id):n.toggle(t,e==null?void 0:e.id)})}let iu=1;const io=()=>""+iu++;function su(t){return t&&(le(t.toastId)||dr(t.toastId))?t.toastId:io()}function ce(t,e){return ru(t,e),e.toastId}function Ue(t,e){return{...e,type:e&&e.type||t,toastId:su(e)}}function Ce(t){return(e,n)=>ce(e,Ue(t,n))}function V(t,e){return ce(t,Ue("default",e))}V.loading=(t,e)=>ce(t,Ue("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),V.promise=function(t,e,n){let r,{pending:i,error:o,success:s}=e;i&&(r=le(i)?V.loading(i,n):V.loading(i.render,{...n,...i}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(f,u,h)=>{if(u==null)return void V.dismiss(r);const d={type:f,...a,...n,data:h},g=le(u)?{render:u}:u;return r?V.update(r,{...d,...g}):V(g.render,{...d,...g}),h},l=no(t)?t():t;return l.then(f=>c("success",s,f)).catch(f=>c("error",o,f)),l},V.success=Ce("success"),V.info=Ce("info"),V.error=Ce("error"),V.warning=Ce("warning"),V.warn=V.warning,V.dark=(t,e)=>ce(t,Ue("default",{theme:"dark",...e})),V.dismiss=function(t){(function(e){var n;if(ro()){if(e==null||le(n=e)||dr(n))ot.forEach(i=>{i.removeToast(e)});else if(e&&("containerId"in e||"id"in e)){var r;(r=ot.get(e.containerId))!=null&&r.removeToast(e.id)||ot.forEach(i=>{i.removeToast(e.id)})}}else Hn=Hn.filter(i=>e!=null&&i.options.toastId!==e)})(t)},V.clearWaitingQueue=function(t){t===void 0&&(t={}),ot.forEach(e=>{!e.props.limit||t.containerId&&e.id!==t.containerId||e.clearQueue()})},V.isActive=nu,V.update=function(t,e){e===void 0&&(e={});const n=((r,i)=>{var o;let{containerId:s}=i;return(o=ot.get(s||1))==null?void 0:o.toasts.get(r)})(t,e);if(n){const{props:r,content:i}=n,o={delay:100,...r,...e,toastId:e.toastId||t,updateId:io()};o.toastId!==t&&(o.staleId=t);const s=o.render||i;delete o.render,ce(s,o)}},V.done=t=>{V.update(t,{progress:1})},V.onChange=function(t){return ri.add(t),()=>{ri.delete(t)}},V.play=t=>ii(!0,t),V.pause=t=>ii(!1,t);const Xt={primary100:"#F0F6E1",primary200:"#E5F5ED",primary300:"#93D500",primary400:"#009D4F",primary500:"#2E7D32",secondary:"#CC0066",secondaryDark:"#AE1857",textPrimary:"#292929",white:"#FFFFFF",grey100:"#FAFAFA",grey200:"#EEEEEE",grey300:"#DDDDDD",grey400:"#C5C5C5",grey500:"#BFBFBF",grey600:"#85858A",success:"#009D4F",successLight:"#E5F5ED",warning:"#FFB600",warningLight:"#FFF8E5",danger:"#E01B00",dangerLight:"#FCE8E5",dangerDark:"#BE1700",linkPrimary:"#007BFF",linkLight:"#007BFF10",headerBgColor:"#292929",headerTextColor:"#FFF",buttonText:"#292929",buttonHover:"#2E7D32"};function ou(){return p.jsxRuntimeExports.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsxRuntimeExports.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 1C16.5222 1 21 5.47676 21 11C21 16.5222 16.5222 21 11 21C5.47676 21 1 16.5222 1 11C1 5.47676 5.47676 1 11 1Z",stroke:"#E01B00",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),p.jsxRuntimeExports.jsx("path",{d:"M10.9942 6.89636V11.6737",stroke:"#E01B00",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),p.jsxRuntimeExports.jsx("path",{d:"M10.9941 15.1038H11.0049",stroke:"#E01B00",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}const au={paddingLeft:"16px",borderLeft:"2px solid",boxShadow:"none",fontFamily:"inherit"},lu=({closeToast:t})=>p.jsxRuntimeExports.jsx("i",{className:"material-icons",onClick:t,style:{cursor:"pointer"},children:p.jsxRuntimeExports.jsx("svg",{width:"24",height:"25",viewBox:"0 0 24 25",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsxRuntimeExports.jsx("path",{d:"M7.05086 6.13616C6.66033 5.74563 6.02717 5.74563 5.63664 6.13616C5.24612 6.52668 5.24612 7.15984 5.63664 7.55037L10.5864 12.5001L5.63664 17.4499C5.24612 17.8404 5.24612 18.4736 5.63664 18.8641C6.02717 19.2546 6.66033 19.2546 7.05086 18.8641L12.0006 13.9143L16.9504 18.8641C17.3409 19.2546 17.974 19.2546 18.3646 18.8641C18.7551 18.4736 18.7551 17.8404 18.3646 17.4499L13.4148 12.5001L18.3646 7.55037C18.7551 7.15984 18.7551 6.52668 18.3646 6.13616C17.974 5.74563 17.3409 5.74563 16.9504 6.13616L12.0006 11.0859L7.05086 6.13616Z",fill:"#85858A"})})}),so=t=>{V.error(t,{icon:p.jsxRuntimeExports.jsx(ou,{}),position:"bottom-right",style:{...au,background:Xt.dangerLight,borderColor:Xt.danger,color:Xt.danger}})},cu=t=>{V(t,{closeButton:lu,toastId:"notify",position:"top-right",closeOnClick:!1,hideProgressBar:!0,containerId:"toastifyNotification",style:{width:"610px",minHeight:"72px",padding:"12px 24px 12px 0",color:Xt.textPrimary}})},oo=p.reactExports.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),sn=p.reactExports.createContext({}),pr=p.reactExports.createContext(null),on=typeof document<"u",uu=on?p.reactExports.useLayoutEffect:p.reactExports.useEffect,ao=p.reactExports.createContext({strict:!1}),mr=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),fu="framerAppearId",lo="data-"+mr(fu);function hu(t,e,n,r){const{visualElement:i}=p.reactExports.useContext(sn),o=p.reactExports.useContext(ao),s=p.reactExports.useContext(pr),a=p.reactExports.useContext(oo).reducedMotion,c=p.reactExports.useRef();r=r||o.renderer,!c.current&&r&&(c.current=r(t,{visualState:e,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const l=c.current;p.reactExports.useInsertionEffect(()=>{l&&l.update(n,s)});const f=p.reactExports.useRef(!!(n[lo]&&!window.HandoffComplete));return uu(()=>{l&&(l.render(),f.current&&l.animationState&&l.animationState.animateChanges())}),p.reactExports.useEffect(()=>{l&&(l.updateFeatures(),!f.current&&l.animationState&&l.animationState.animateChanges(),f.current&&(f.current=!1,window.HandoffComplete=!0))}),l}function $t(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function du(t,e,n){return p.reactExports.useCallback(r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):$t(n)&&(n.current=r))},[e])}function me(t){return typeof t=="string"||Array.isArray(t)}function an(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}const gr=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yr=["initial",...gr];function ln(t){return an(t.animate)||yr.some(e=>me(t[e]))}function co(t){return!!(ln(t)||t.variants)}function pu(t,e){if(ln(t)){const{initial:n,animate:r}=t;return{initial:n===!1||me(n)?n:void 0,animate:me(r)?r:void 0}}return t.inherit!==!1?e:{}}function mu(t){const{initial:e,animate:n}=pu(t,p.reactExports.useContext(sn));return p.reactExports.useMemo(()=>({initial:e,animate:n}),[si(e),si(n)])}function si(t){return Array.isArray(t)?t.join(" "):t}const oi={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},ge={};for(const t in oi)ge[t]={isEnabled:e=>oi[t].some(n=>!!e[n])};function gu(t){for(const e in t)ge[e]={...ge[e],...t[e]}}const uo=p.reactExports.createContext({}),fo=p.reactExports.createContext({}),yu=Symbol.for("motionComponentSymbol");function vu({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:i}){t&&gu(t);function o(a,c){let l;const f={...p.reactExports.useContext(oo),...a,layoutId:xu(a)},{isStatic:u}=f,h=mu(a),d=r(a,u);if(!u&&on){h.visualElement=hu(i,d,f,e);const g=p.reactExports.useContext(fo),m=p.reactExports.useContext(ao).strict;h.visualElement&&(l=h.visualElement.loadFeatures(f,m,t,g))}return p.reactExports.createElement(sn.Provider,{value:h},l&&h.visualElement?p.reactExports.createElement(l,{visualElement:h.visualElement,...f}):null,n(i,a,du(d,h.visualElement,c),d,u,h.visualElement))}const s=p.reactExports.forwardRef(o);return s[yu]=i,s}function xu({layoutId:t}){const e=p.reactExports.useContext(uo).id;return e&&t!==void 0?e+"-"+t:t}function bu(t){function e(r,i={}){return vu(t(r,i))}if(typeof Proxy>"u")return e;const n=new Map;return new Proxy(e,{get:(r,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const wu=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function vr(t){return typeof t!="string"||t.includes("-")?!1:!!(wu.indexOf(t)>-1||/[A-Z]/.test(t))}const ze={};function Eu(t){Object.assign(ze,t)}const we=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Dt=new Set(we);function ho(t,{layout:e,layoutId:n}){return Dt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ze[t]||t==="opacity")}const K=t=>!!(t&&t.getVelocity),Su={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Tu=we.length;function Pu(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<Tu;s++){const a=we[s];if(t[a]!==void 0){const c=Su[a]||a;o+=`${c}(${t[a]}) `}}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,r?"":o):n&&r&&(o="none"),o}const po=t=>e=>typeof e=="string"&&e.startsWith(t),mo=po("--"),$n=po("var(--"),Au=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,Cu=(t,e)=>e&&typeof t=="number"?e.transform(t):t,At=(t,e,n)=>Math.min(Math.max(n,t),e),Nt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},ue={...Nt,transform:t=>At(0,1,t)},Re={...Nt,default:1},fe=t=>Math.round(t*1e5)/1e5,cn=/(-)?([\d]*\.?[\d])+/g,go=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Ru=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Ee(t){return typeof t=="string"}const Se=t=>({test:e=>Ee(e)&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),wt=Se("deg"),lt=Se("%"),C=Se("px"),Ou=Se("vh"),ku=Se("vw"),ai={...lt,parse:t=>lt.parse(t)/100,transform:t=>lt.transform(t*100)},li={...Nt,transform:Math.round},yo={borderWidth:C,borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C,borderRadius:C,radius:C,borderTopLeftRadius:C,borderTopRightRadius:C,borderBottomRightRadius:C,borderBottomLeftRadius:C,width:C,maxWidth:C,height:C,maxHeight:C,size:C,top:C,right:C,bottom:C,left:C,padding:C,paddingTop:C,paddingRight:C,paddingBottom:C,paddingLeft:C,margin:C,marginTop:C,marginRight:C,marginBottom:C,marginLeft:C,rotate:wt,rotateX:wt,rotateY:wt,rotateZ:wt,scale:Re,scaleX:Re,scaleY:Re,scaleZ:Re,skew:wt,skewX:wt,skewY:wt,distance:C,translateX:C,translateY:C,translateZ:C,x:C,y:C,z:C,perspective:C,transformPerspective:C,opacity:ue,originX:ai,originY:ai,originZ:C,zIndex:li,fillOpacity:ue,strokeOpacity:ue,numOctaves:li};function xr(t,e,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=t;let c=!1,l=!1,f=!0;for(const u in e){const h=e[u];if(mo(u)){o[u]=h;continue}const d=yo[u],g=Cu(h,d);if(Dt.has(u)){if(c=!0,s[u]=g,!f)continue;h!==(d.default||0)&&(f=!1)}else u.startsWith("origin")?(l=!0,a[u]=g):i[u]=g}if(e.transform||(c||r?i.transform=Pu(t.transform,n,f,r):i.transform&&(i.transform="none")),l){const{originX:u="50%",originY:h="50%",originZ:d=0}=a;i.transformOrigin=`${u} ${h} ${d}`}}const br=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vo(t,e,n){for(const r in e)!K(e[r])&&!ho(r,n)&&(t[r]=e[r])}function ju({transformTemplate:t},e,n){return p.reactExports.useMemo(()=>{const r=br();return xr(r,e,{enableHardwareAcceleration:!n},t),Object.assign({},r.vars,r.style)},[e])}function _u(t,e,n){const r=t.style||{},i={};return vo(i,r,t),Object.assign(i,ju(t,e,n)),t.transformValues?t.transformValues(i):i}function Vu(t,e,n){const r={},i=_u(t,e,n);return t.drag&&t.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=i,r}const Mu=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function He(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Mu.has(t)}let xo=t=>!He(t);function Lu(t){t&&(xo=e=>e.startsWith("on")?!He(e):t(e))}try{Lu(require("@emotion/is-prop-valid").default)}catch{}function Du(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(xo(i)||n===!0&&He(i)||!e&&!He(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}function ci(t,e,n){return typeof t=="string"?t:C.transform(e+n*t)}function Nu(t,e,n){const r=ci(e,t.x,t.width),i=ci(n,t.y,t.height);return`${r} ${i}`}const Fu={offset:"stroke-dashoffset",array:"stroke-dasharray"},Bu={offset:"strokeDashoffset",array:"strokeDasharray"};function Iu(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?Fu:Bu;t[o.offset]=C.transform(-r);const s=C.transform(e),a=C.transform(n);t[o.array]=`${s} ${a}`}function wr(t,{attrX:e,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...l},f,u,h){if(xr(t,l,f,h),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:d,style:g,dimensions:m}=t;d.transform&&(m&&(g.transform=d.transform),delete d.transform),m&&(i!==void 0||o!==void 0||g.transform)&&(g.transformOrigin=Nu(m,i!==void 0?i:.5,o!==void 0?o:.5)),e!==void 0&&(d.x=e),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),s!==void 0&&Iu(d,s,a,c,!1)}const bo=()=>({...br(),attrs:{}}),Er=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Wu(t,e,n,r){const i=p.reactExports.useMemo(()=>{const o=bo();return wr(o,e,{enableHardwareAcceleration:!1},Er(r),t.transformTemplate),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};vo(o,t.style,t),i.style={...o,...i.style}}return i}function Uu(t=!1){return(n,r,i,{latestValues:o},s)=>{const c=(vr(n)?Wu:Vu)(r,o,s,n),f={...Du(r,typeof n=="string",t),...c,ref:i},{children:u}=r,h=p.reactExports.useMemo(()=>K(u)?u.get():u,[u]);return p.reactExports.createElement(n,{...f,children:h})}}function wo(t,{style:e,vars:n},r,i){Object.assign(t.style,e,i&&i.getProjectionStyles(r));for(const o in n)t.style.setProperty(o,n[o])}const Eo=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function So(t,e,n,r){wo(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(Eo.has(i)?i:mr(i),e.attrs[i])}function Sr(t,e){const{style:n}=t,r={};for(const i in n)(K(n[i])||e.style&&K(e.style[i])||ho(i,t))&&(r[i]=n[i]);return r}function To(t,e){const n=Sr(t,e);for(const r in t)if(K(t[r])||K(e[r])){const i=we.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=t[r]}return n}function Tr(t,e,n,r={},i={}){return typeof e=="function"&&(e=e(n!==void 0?n:t.custom,r,i)),typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"&&(e=e(n!==void 0?n:t.custom,r,i)),e}function zu(t){const e=p.reactExports.useRef(null);return e.current===null&&(e.current=t()),e.current}const $e=t=>Array.isArray(t),Hu=t=>!!(t&&typeof t=="object"&&t.mix&&t.toValue),$u=t=>$e(t)?t[t.length-1]||0:t;function Ne(t){const e=K(t)?t.get():t;return Hu(e)?e.toValue():e}function qu({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},r,i,o){const s={latestValues:Gu(r,i,o,t),renderState:e()};return n&&(s.mount=a=>n(r,a,s)),s}const Po=t=>(e,n)=>{const r=p.reactExports.useContext(sn),i=p.reactExports.useContext(pr),o=()=>qu(t,e,r,i);return n?o():zu(o)};function Gu(t,e,n,r){const i={},o=r(t,{});for(const h in o)i[h]=Ne(o[h]);let{initial:s,animate:a}=t;const c=ln(t),l=co(t);e&&l&&!c&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let f=n?n.initial===!1:!1;f=f||s===!1;const u=f?a:s;return u&&typeof u!="boolean"&&!an(u)&&(Array.isArray(u)?u:[u]).forEach(d=>{const g=Tr(t,d);if(!g)return;const{transitionEnd:m,transition:v,...x}=g;for(const w in x){let y=x[w];if(Array.isArray(y)){const E=f?y.length-1:0;y=y[E]}y!==null&&(i[w]=y)}for(const w in m)i[w]=m[w]}),i}const F=t=>t;class ui{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const n=this.order.indexOf(e);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function Ku(t){let e=new ui,n=new ui,r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(c,l=!1,f=!1)=>{const u=f&&i,h=u?e:n;return l&&s.add(c),h.add(c)&&u&&i&&(r=e.order.length),c},cancel:c=>{n.remove(c),s.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let l=0;l<r;l++){const f=e.order[l];f(c),s.has(f)&&(a.schedule(f),t())}i=!1,o&&(o=!1,a.process(c))}};return a}const Oe=["prepare","read","update","preRender","render","postRender"],Xu=40;function Yu(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Oe.reduce((u,h)=>(u[h]=Ku(()=>n=!0),u),{}),s=u=>o[u].process(i),a=()=>{const u=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(u-i.timestamp,Xu),1),i.timestamp=u,i.isProcessing=!0,Oe.forEach(s),i.isProcessing=!1,n&&e&&(r=!1,t(a))},c=()=>{n=!0,r=!0,i.isProcessing||t(a)};return{schedule:Oe.reduce((u,h)=>{const d=o[h];return u[h]=(g,m=!1,v=!1)=>(n||c(),d.schedule(g,m,v)),u},{}),cancel:u=>Oe.forEach(h=>o[h].cancel(u)),state:i,steps:o}}const{schedule:M,cancel:gt,state:$,steps:Tn}=Yu(typeof requestAnimationFrame<"u"?requestAnimationFrame:F,!0),Ju={useVisualState:Po({scrapeMotionValuesFromProps:To,createRenderState:bo,onMount:(t,e,{renderState:n,latestValues:r})=>{M.read(()=>{try{n.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),M.render(()=>{wr(n,r,{enableHardwareAcceleration:!1},Er(e.tagName),t.transformTemplate),So(e,n)})}})},Zu={useVisualState:Po({scrapeMotionValuesFromProps:Sr,createRenderState:br})};function Qu(t,{forwardMotionProps:e=!1},n,r){return{...vr(t)?Ju:Zu,preloadedFeatures:n,useRender:Uu(e),createVisualElement:r,Component:t}}function ht(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const Ao=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function un(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const tf=t=>e=>Ao(e)&&t(e,un(e));function pt(t,e,n,r){return ht(t,e,tf(n),r)}const ef=(t,e)=>n=>e(t(n)),Tt=(...t)=>t.reduce(ef);function Co(t){let e=null;return()=>{const n=()=>{e=null};return e===null?(e=t,n):!1}}const fi=Co("dragHorizontal"),hi=Co("dragVertical");function Ro(t){let e=!1;if(t==="y")e=hi();else if(t==="x")e=fi();else{const n=fi(),r=hi();n&&r?e=()=>{n(),r()}:(n&&n(),r&&r())}return e}function Oo(){const t=Ro(!0);return t?(t(),!1):!0}class Rt{constructor(e){this.isMounted=!1,this.node=e}update(){}}function di(t,e){const n="pointer"+(e?"enter":"leave"),r="onHover"+(e?"Start":"End"),i=(o,s)=>{if(o.pointerType==="touch"||Oo())return;const a=t.getProps();t.animationState&&a.whileHover&&t.animationState.setActive("whileHover",e),a[r]&&M.update(()=>a[r](o,s))};return pt(t.current,n,i,{passive:!t.getProps()[r]})}class nf extends Rt{mount(){this.unmount=Tt(di(this.node,!0),di(this.node,!1))}unmount(){}}class rf extends Rt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Tt(ht(this.node.current,"focus",()=>this.onFocus()),ht(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const ko=(t,e)=>e?t===e?!0:ko(t,e.parentElement):!1;function Pn(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,un(n))}class sf extends Rt{constructor(){super(...arguments),this.removeStartListeners=F,this.removeEndListeners=F,this.removeAccessibleListeners=F,this.startPointerPress=(e,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=pt(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:l,onTapCancel:f,globalTapTarget:u}=this.node.getProps();M.update(()=>{!u&&!ko(this.node.current,a.target)?f&&f(a,c):l&&l(a,c)})},{passive:!(r.onTap||r.onPointerUp)}),s=pt(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Tt(o,s),this.startPress(e,n)},this.startAccessiblePress=()=>{const e=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Pn("up",(c,l)=>{const{onTap:f}=this.node.getProps();f&&M.update(()=>f(c,l))})};this.removeEndListeners(),this.removeEndListeners=ht(this.node.current,"keyup",s),Pn("down",(a,c)=>{this.startPress(a,c)})},n=ht(this.node.current,"keydown",e),r=()=>{this.isPressing&&Pn("cancel",(o,s)=>this.cancelPress(o,s))},i=ht(this.node.current,"blur",r);this.removeAccessibleListeners=Tt(n,i)}}startPress(e,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&M.update(()=>r(e,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Oo()}cancelPress(e,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&M.update(()=>r(e,n))}mount(){const e=this.node.getProps(),n=pt(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),r=ht(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Tt(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const qn=new WeakMap,An=new WeakMap,of=t=>{const e=qn.get(t.target);e&&e(t)},af=t=>{t.forEach(of)};function lf({root:t,...e}){const n=t||document;An.has(n)||An.set(n,{});const r=An.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(af,{root:t,...e})),r[i]}function cf(t,e,n){const r=lf(e);return qn.set(t,n),r.observe(t),()=>{qn.delete(t),r.unobserve(t)}}const uf={some:0,all:1};class ff extends Rt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:uf[i]},a=c=>{const{isIntersecting:l}=c;if(this.isInView===l||(this.isInView=l,o&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:f,onViewportLeave:u}=this.node.getProps(),h=l?f:u;h&&h(c)};return cf(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(hf(e,n))&&this.startObserver()}unmount(){}}function hf({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const df={inView:{Feature:ff},tap:{Feature:sf},focus:{Feature:rf},hover:{Feature:nf}};function jo(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function pf(t){const e={};return t.values.forEach((n,r)=>e[r]=n.get()),e}function mf(t){const e={};return t.values.forEach((n,r)=>e[r]=n.getVelocity()),e}function fn(t,e,n){const r=t.getProps();return Tr(r,e,n!==void 0?n:r.custom,pf(t),mf(t))}let gf=F,Pr=F;const Pt=t=>t*1e3,mt=t=>t/1e3,yf={current:!1},_o=t=>Array.isArray(t)&&typeof t[0]=="number";function Vo(t){return!!(!t||typeof t=="string"&&Mo[t]||_o(t)||Array.isArray(t)&&t.every(Vo))}const ae=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Mo={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ae([0,.65,.55,1]),circOut:ae([.55,0,1,.45]),backIn:ae([.31,.01,.66,-.59]),backOut:ae([.33,1.53,.69,.99])};function Lo(t){if(t)return _o(t)?ae(t):Array.isArray(t)?t.map(Lo):Mo[t]}function vf(t,e,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:c}={}){const l={[e]:n};c&&(l.offset=c);const f=Lo(a);return Array.isArray(f)&&(l.easing=f),t.animate(l,{delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function xf(t,{repeat:e,repeatType:n="loop"}){const r=e&&n!=="loop"&&e%2===1?0:t.length-1;return t[r]}const Do=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,bf=1e-7,wf=12;function Ef(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=Do(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>bf&&++a<wf);return s}function Te(t,e,n,r){if(t===e&&n===r)return F;const i=o=>Ef(o,0,1,t,n);return o=>o===0||o===1?o:Do(i(o),e,r)}const Sf=Te(.42,0,1,1),Tf=Te(0,0,.58,1),No=Te(.42,0,.58,1),Pf=t=>Array.isArray(t)&&typeof t[0]!="number",Fo=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Bo=t=>e=>1-t(1-e),Ar=t=>1-Math.sin(Math.acos(t)),Io=Bo(Ar),Af=Fo(Ar),Wo=Te(.33,1.53,.69,.99),Cr=Bo(Wo),Cf=Fo(Cr),Rf=t=>(t*=2)<1?.5*Cr(t):.5*(2-Math.pow(2,-10*(t-1))),Of={linear:F,easeIn:Sf,easeInOut:No,easeOut:Tf,circIn:Ar,circInOut:Af,circOut:Io,backIn:Cr,backInOut:Cf,backOut:Wo,anticipate:Rf},pi=t=>{if(Array.isArray(t)){Pr(t.length===4);const[e,n,r,i]=t;return Te(e,n,r,i)}else if(typeof t=="string")return Of[t];return t},Rr=(t,e)=>n=>!!(Ee(n)&&Ru.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Uo=(t,e,n)=>r=>{if(!Ee(r))return r;const[i,o,s,a]=r.match(cn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},kf=t=>At(0,255,t),Cn={...Nt,transform:t=>Math.round(kf(t))},Mt={test:Rr("rgb","red"),parse:Uo("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Cn.transform(t)+", "+Cn.transform(e)+", "+Cn.transform(n)+", "+fe(ue.transform(r))+")"};function jf(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Gn={test:Rr("#"),parse:jf,transform:Mt.transform},qt={test:Rr("hsl","hue"),parse:Uo("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+lt.transform(fe(e))+", "+lt.transform(fe(n))+", "+fe(ue.transform(r))+")"},q={test:t=>Mt.test(t)||Gn.test(t)||qt.test(t),parse:t=>Mt.test(t)?Mt.parse(t):qt.test(t)?qt.parse(t):Gn.parse(t),transform:t=>Ee(t)?t:t.hasOwnProperty("red")?Mt.transform(t):qt.transform(t)},D=(t,e,n)=>-n*t+n*e+t;function Rn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function _f({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,o=0,s=0;if(!e)i=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,c=2*n-a;i=Rn(c,a,t+1/3),o=Rn(c,a,t),s=Rn(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const On=(t,e,n)=>{const r=t*t;return Math.sqrt(Math.max(0,n*(e*e-r)+r))},Vf=[Gn,Mt,qt],Mf=t=>Vf.find(e=>e.test(t));function mi(t){const e=Mf(t);let n=e.parse(t);return e===qt&&(n=_f(n)),n}const zo=(t,e)=>{const n=mi(t),r=mi(e),i={...n};return o=>(i.red=On(n.red,r.red,o),i.green=On(n.green,r.green,o),i.blue=On(n.blue,r.blue,o),i.alpha=D(n.alpha,r.alpha,o),Mt.transform(i))};function Lf(t){var e,n;return isNaN(t)&&Ee(t)&&(((e=t.match(cn))===null||e===void 0?void 0:e.length)||0)+(((n=t.match(go))===null||n===void 0?void 0:n.length)||0)>0}const Ho={regex:Au,countKey:"Vars",token:"${v}",parse:F},$o={regex:go,countKey:"Colors",token:"${c}",parse:q.parse},qo={regex:cn,countKey:"Numbers",token:"${n}",parse:Nt.parse};function kn(t,{regex:e,countKey:n,token:r,parse:i}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,r),t.values.push(...o.map(i)))}function qe(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&kn(n,Ho),kn(n,$o),kn(n,qo),n}function Go(t){return qe(t).values}function Ko(t){const{values:e,numColors:n,numVars:r,tokenised:i}=qe(t),o=e.length;return s=>{let a=i;for(let c=0;c<o;c++)c<r?a=a.replace(Ho.token,s[c]):c<r+n?a=a.replace($o.token,q.transform(s[c])):a=a.replace(qo.token,fe(s[c]));return a}}const Df=t=>typeof t=="number"?0:t;function Nf(t){const e=Go(t);return Ko(t)(e.map(Df))}const Ct={test:Lf,parse:Go,createTransformer:Ko,getAnimatableNone:Nf},Xo=(t,e)=>n=>`${n>0?e:t}`;function Yo(t,e){return typeof t=="number"?n=>D(t,e,n):q.test(t)?zo(t,e):t.startsWith("var(")?Xo(t,e):Zo(t,e)}const Jo=(t,e)=>{const n=[...t],r=n.length,i=t.map((o,s)=>Yo(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},Ff=(t,e)=>{const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Yo(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},Zo=(t,e)=>{const n=Ct.createTransformer(e),r=qe(t),i=qe(e);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Tt(Jo(r.values,i.values),n):Xo(t,e)},ye=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r},gi=(t,e)=>n=>D(t,e,n);function Bf(t){return typeof t=="number"?gi:typeof t=="string"?q.test(t)?zo:Zo:Array.isArray(t)?Jo:typeof t=="object"?Ff:gi}function If(t,e,n){const r=[],i=n||Bf(t[0]),o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const c=Array.isArray(e)?e[s]||F:e;a=Tt(c,a)}r.push(a)}return r}function Qo(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(Pr(o===e.length),o===1)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const s=If(e,r,i),a=s.length,c=l=>{let f=0;if(a>1)for(;f<t.length-2&&!(l<t[f+1]);f++);const u=ye(t[f],t[f+1],l);return s[f](u)};return n?l=>c(At(t[0],t[o-1],l)):c}function Wf(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=ye(0,e,r);t.push(D(n,1,i))}}function Uf(t){const e=[0];return Wf(e,t.length-1),e}function zf(t,e){return t.map(n=>n*e)}function Hf(t,e){return t.map(()=>e||No).splice(0,t.length-1)}function Ge({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=Pf(r)?r.map(pi):pi(r),o={done:!1,value:e[0]},s=zf(n&&n.length===e.length?n:Uf(e),t),a=Qo(s,e,{ease:Array.isArray(i)?i:Hf(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}function ta(t,e){return e?t*(1e3/e):0}const $f=5;function ea(t,e,n){const r=Math.max(e-$f,0);return ta(n-t(r),e-r)}const jn=.001,qf=.01,yi=10,Gf=.05,Kf=1;function Xf({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let i,o;gf(t<=Pt(yi));let s=1-e;s=At(Gf,Kf,s),t=At(qf,yi,mt(t)),s<1?(i=l=>{const f=l*s,u=f*t,h=f-n,d=Kn(l,s),g=Math.exp(-u);return jn-h/d*g},o=l=>{const u=l*s*t,h=u*n+n,d=Math.pow(s,2)*Math.pow(l,2)*t,g=Math.exp(-u),m=Kn(Math.pow(l,2),s);return(-i(l)+jn>0?-1:1)*((h-d)*g)/m}):(i=l=>{const f=Math.exp(-l*t),u=(l-n)*t+1;return-jn+f*u},o=l=>{const f=Math.exp(-l*t),u=(n-l)*(t*t);return f*u});const a=5/t,c=Jf(i,o,a);if(t=Pt(t),isNaN(c))return{stiffness:100,damping:10,duration:t};{const l=Math.pow(c,2)*r;return{stiffness:l,damping:s*2*Math.sqrt(r*l),duration:t}}}const Yf=12;function Jf(t,e,n){let r=n;for(let i=1;i<Yf;i++)r=r-t(r)/e(r);return r}function Kn(t,e){return t*Math.sqrt(1-e*e)}const Zf=["duration","bounce"],Qf=["stiffness","damping","mass"];function vi(t,e){return e.some(n=>t[n]!==void 0)}function th(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!vi(t,Qf)&&vi(t,Zf)){const n=Xf(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}function na({keyframes:t,restDelta:e,restSpeed:n,...r}){const i=t[0],o=t[t.length-1],s={done:!1,value:i},{stiffness:a,damping:c,mass:l,duration:f,velocity:u,isResolvedFromDuration:h}=th({...r,velocity:-mt(r.velocity||0)}),d=u||0,g=c/(2*Math.sqrt(a*l)),m=o-i,v=mt(Math.sqrt(a/l)),x=Math.abs(m)<5;n||(n=x?.01:2),e||(e=x?.005:.5);let w;if(g<1){const y=Kn(v,g);w=E=>{const S=Math.exp(-g*v*E);return o-S*((d+g*v*m)/y*Math.sin(y*E)+m*Math.cos(y*E))}}else if(g===1)w=y=>o-Math.exp(-v*y)*(m+(d+v*m)*y);else{const y=v*Math.sqrt(g*g-1);w=E=>{const S=Math.exp(-g*v*E),T=Math.min(y*E,300);return o-S*((d+g*v*m)*Math.sinh(T)+y*m*Math.cosh(T))/y}}return{calculatedDuration:h&&f||null,next:y=>{const E=w(y);if(h)s.done=y>=f;else{let S=d;y!==0&&(g<1?S=ea(w,y,E):S=0);const T=Math.abs(S)<=n,P=Math.abs(o-E)<=e;s.done=T&&P}return s.value=s.done?o:E,s}}}function xi({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:l=.5,restSpeed:f}){const u=t[0],h={done:!1,value:u},d=A=>a!==void 0&&A<a||c!==void 0&&A>c,g=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let m=n*e;const v=u+m,x=s===void 0?v:s(v);x!==v&&(m=x-u);const w=A=>-m*Math.exp(-A/r),y=A=>x+w(A),E=A=>{const R=w(A),k=y(A);h.done=Math.abs(R)<=l,h.value=h.done?x:k};let S,T;const P=A=>{d(h.value)&&(S=A,T=na({keyframes:[h.value,g(h.value)],velocity:ea(y,A,h.value),damping:i,stiffness:o,restDelta:l,restSpeed:f}))};return P(0),{calculatedDuration:null,next:A=>{let R=!1;return!T&&S===void 0&&(R=!0,E(A),P(A)),S!==void 0&&A>S?T.next(A-S):(!R&&E(A),h)}}}const eh=t=>{const e=({timestamp:n})=>t(n);return{start:()=>M.update(e,!0),stop:()=>gt(e),now:()=>$.isProcessing?$.timestamp:performance.now()}},bi=2e4;function wi(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<bi;)e+=n,r=t.next(e);return e>=bi?1/0:e}const nh={decay:xi,inertia:xi,tween:Ge,keyframes:Ge,spring:na};function Ke({autoplay:t=!0,delay:e=0,driver:n=eh,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:c,onStop:l,onComplete:f,onUpdate:u,...h}){let d=1,g=!1,m,v;const x=()=>{v=new Promise(_=>{m=_})};x();let w;const y=nh[i]||Ge;let E;y!==Ge&&typeof r[0]!="number"&&(E=Qo([0,100],r,{clamp:!1}),r=[0,100]);const S=y({...h,keyframes:r});let T;a==="mirror"&&(T=y({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let P="idle",A=null,R=null,k=null;S.calculatedDuration===null&&o&&(S.calculatedDuration=wi(S));const{calculatedDuration:H}=S;let j=1/0,U=1/0;H!==null&&(j=H+s,U=j*(o+1)-s);let B=0;const X=_=>{if(R===null)return;d>0&&(R=Math.min(R,_)),d<0&&(R=Math.min(_-U/d,R)),A!==null?B=A:B=Math.round(_-R)*d;const Ft=B-e*(d>=0?1:-1),Bt=d>=0?Ft<0:Ft>U;B=Math.max(Ft,0),P==="finished"&&A===null&&(B=U);let gn=B,Ot=S;if(o){const ne=Math.min(B,U)/j;let kt=Math.floor(ne),rt=ne%1;!rt&&ne>=1&&(rt=1),rt===1&&kt--,kt=Math.min(kt,o+1),!!(kt%2)&&(a==="reverse"?(rt=1-rt,s&&(rt-=s/j)):a==="mirror"&&(Ot=T)),gn=At(0,1,rt)*j}const ft=Bt?{done:!1,value:r[0]}:Ot.next(gn);E&&(ft.value=E(ft.value));let{done:It}=ft;!Bt&&H!==null&&(It=d>=0?B>=U:B<=0);const Wt=A===null&&(P==="finished"||P==="running"&&It);return u&&u(ft.value),Wt&&L(),ft},N=()=>{w&&w.stop(),w=void 0},Y=()=>{P="idle",N(),m(),x(),R=k=null},L=()=>{P="finished",f&&f(),N(),m()},J=()=>{if(g)return;w||(w=n(X));const _=w.now();c&&c(),A!==null?R=_-A:(!R||P==="finished")&&(R=_),P==="finished"&&x(),k=R,A=null,P="running",w.start()};t&&J();const ut={then(_,Ft){return v.then(_,Ft)},get time(){return mt(B)},set time(_){_=Pt(_),B=_,A!==null||!w||d===0?A=_:R=w.now()-_/d},get duration(){const _=S.calculatedDuration===null?wi(S):S.calculatedDuration;return mt(_)},get speed(){return d},set speed(_){_===d||!w||(d=_,ut.time=mt(B))},get state(){return P},play:J,pause:()=>{P="paused",A=B},stop:()=>{g=!0,P!=="idle"&&(P="idle",l&&l(),Y())},cancel:()=>{k!==null&&X(k),Y()},complete:()=>{P="finished"},sample:_=>(R=0,X(_))};return ut}function rh(t){let e;return()=>(e===void 0&&(e=t()),e)}const ih=rh(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),sh=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ke=10,oh=2e4,ah=(t,e)=>e.type==="spring"||t==="backgroundColor"||!Vo(e.ease);function lh(t,e,{onUpdate:n,onComplete:r,...i}){if(!(ih()&&sh.has(e)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,c,l=!1;const f=()=>{c=new Promise(y=>{a=y})};f();let{keyframes:u,duration:h=300,ease:d,times:g}=i;if(ah(e,i)){const y=Ke({...i,repeat:0,delay:0});let E={done:!1,value:u[0]};const S=[];let T=0;for(;!E.done&&T<oh;)E=y.sample(T),S.push(E.value),T+=ke;g=void 0,u=S,h=T-ke,d="linear"}const m=vf(t.owner.current,e,u,{...i,duration:h,ease:d,times:g}),v=()=>{l=!1,m.cancel()},x=()=>{l=!0,M.update(v),a(),f()};return m.onfinish=()=>{l||(t.set(xf(u,i)),r&&r(),x())},{then(y,E){return c.then(y,E)},attachTimeline(y){return m.timeline=y,m.onfinish=null,F},get time(){return mt(m.currentTime||0)},set time(y){m.currentTime=Pt(y)},get speed(){return m.playbackRate},set speed(y){m.playbackRate=y},get duration(){return mt(h)},play:()=>{s||(m.play(),gt(v))},pause:()=>m.pause(),stop:()=>{if(s=!0,m.playState==="idle")return;const{currentTime:y}=m;if(y){const E=Ke({...i,autoplay:!1});t.setWithVelocity(E.sample(y-ke).value,E.sample(y).value,ke)}x()},complete:()=>{l||m.finish()},cancel:x}}function ch({keyframes:t,delay:e,onUpdate:n,onComplete:r}){const i=()=>(n&&n(t[t.length-1]),r&&r(),{time:0,speed:1,duration:0,play:F,pause:F,stop:F,then:o=>(o(),Promise.resolve()),cancel:F,complete:F});return e?Ke({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}const uh={type:"spring",stiffness:500,damping:25,restSpeed:10},fh=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),hh={type:"keyframes",duration:.8},dh={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ph=(t,{keyframes:e})=>e.length>2?hh:Dt.has(t)?t.startsWith("scale")?fh(e[1]):uh:dh,Xn=(t,e)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ct.test(e)||e==="0")&&!e.startsWith("url(")),mh=new Set(["brightness","contrast","saturate","opacity"]);function gh(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(cn)||[];if(!r)return t;const i=n.replace(r,"");let o=mh.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const yh=/([a-z-]*)\(.*?\)/g,Yn={...Ct,getAnimatableNone:t=>{const e=t.match(yh);return e?e.map(gh).join(" "):t}},vh={...yo,color:q,backgroundColor:q,outlineColor:q,fill:q,stroke:q,borderColor:q,borderTopColor:q,borderRightColor:q,borderBottomColor:q,borderLeftColor:q,filter:Yn,WebkitFilter:Yn},Or=t=>vh[t];function ra(t,e){let n=Or(t);return n!==Yn&&(n=Ct),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const ia=t=>/^0[^.\s]+$/.test(t);function xh(t){if(typeof t=="number")return t===0;if(t!==null)return t==="none"||t==="0"||ia(t)}function bh(t,e,n,r){const i=Xn(e,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:t.get();let a;const c=[];for(let l=0;l<o.length;l++)o[l]===null&&(o[l]=l===0?s:o[l-1]),xh(o[l])&&c.push(l),typeof o[l]=="string"&&o[l]!=="none"&&o[l]!=="0"&&(a=o[l]);if(i&&c.length&&a)for(let l=0;l<c.length;l++){const f=c[l];o[f]=ra(e,a)}return o}function wh({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:l,...f}){return!!Object.keys(f).length}function kr(t,e){return t[e]||t.default||t}const Eh={skipAnimations:!1},jr=(t,e,n,r={})=>i=>{const o=kr(r,t)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-Pt(s);const c=bh(e,t,n,o),l=c[0],f=c[c.length-1],u=Xn(t,l),h=Xn(t,f);let d={keyframes:c,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:g=>{e.set(g),o.onUpdate&&o.onUpdate(g)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(wh(o)||(d={...d,...ph(t,d)}),d.duration&&(d.duration=Pt(d.duration)),d.repeatDelay&&(d.repeatDelay=Pt(d.repeatDelay)),!u||!h||yf.current||o.type===!1||Eh.skipAnimations)return ch(d);if(!r.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const g=lh(e,t,d);if(g)return g}return Ke(d)};function Xe(t){return!!(K(t)&&t.add)}const sa=t=>/^\-?\d*\.?\d+$/.test(t);function _r(t,e){t.indexOf(e)===-1&&t.push(e)}function Vr(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Mr{constructor(){this.subscriptions=[]}add(e){return _r(this.subscriptions,e),()=>Vr(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Sh=t=>!isNaN(parseFloat(t));class Th{constructor(e,n={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=$;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,M.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>M.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Sh(this.current),this.owner=n.owner}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Mr);const r=this.events[e].add(n);return e==="change"?()=>{r(),M.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,r){this.set(n),this.prev=e,this.timeDelta=r}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ta(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Jt(t,e){return new Th(t,e)}const oa=t=>e=>e.test(t),Ph={test:t=>t==="auto",parse:t=>t},aa=[Nt,C,lt,wt,ku,Ou,Ph],se=t=>aa.find(oa(t)),Ah=[...aa,q,Ct],Ch=t=>Ah.find(oa(t));function Rh(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Jt(n))}function Oh(t,e){const n=fn(t,e);let{transitionEnd:r={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=$u(o[s]);Rh(t,s,a)}}function kh(t,e,n){var r,i;const o=Object.keys(e).filter(a=>!t.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const c=o[a],l=e[c];let f=null;Array.isArray(l)&&(f=l[0]),f===null&&(f=(i=(r=n[c])!==null&&r!==void 0?r:t.readValue(c))!==null&&i!==void 0?i:e[c]),f!=null&&(typeof f=="string"&&(sa(f)||ia(f))?f=parseFloat(f):!Ch(f)&&Ct.test(l)&&(f=ra(c,l)),t.addValue(c,Jt(f,{owner:t})),n[c]===void 0&&(n[c]=f),f!==null&&t.setBaseTarget(c,f))}}function jh(t,e){return e?(e[t]||e.default||e).from:void 0}function _h(t,e,n){const r={};for(const i in t){const o=jh(i,e);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function Vh({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Mh(t,e){const n=t.get();if(Array.isArray(e)){for(let r=0;r<e.length;r++)if(e[r]!==n)return!0}else return n!==e}function la(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=t.makeTargetAnimatable(e);const c=t.getValue("willChange");r&&(o=r);const l=[],f=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const h=t.getValue(u),d=a[u];if(!h||d===void 0||f&&Vh(f,u))continue;const g={delay:n,elapsed:0,...kr(o||{},u)};if(window.HandoffAppearAnimations){const x=t.getProps()[lo];if(x){const w=window.HandoffAppearAnimations(x,u,h,M);w!==null&&(g.elapsed=w,g.isHandoff=!0)}}let m=!g.isHandoff&&!Mh(h,d);if(g.type==="spring"&&(h.getVelocity()||g.velocity)&&(m=!1),h.animation&&(m=!1),m)continue;h.start(jr(u,h,d,t.shouldReduceMotion&&Dt.has(u)?{type:!1}:g));const v=h.animation;Xe(c)&&(c.add(u),v.then(()=>c.remove(u))),l.push(v)}return s&&Promise.all(l).then(()=>{s&&Oh(t,s)}),l}function Jn(t,e,n={}){const r=fn(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(la(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(c=0)=>{const{delayChildren:l=0,staggerChildren:f,staggerDirection:u}=i;return Lh(t,e,l+c,f,u,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,l]=a==="beforeChildren"?[o,s]:[s,o];return c().then(()=>l())}else return Promise.all([o(),s(n.delay)])}function Lh(t,e,n=0,r=0,i=1,o){const s=[],a=(t.variantChildren.size-1)*r,c=i===1?(l=0)=>l*r:(l=0)=>a-l*r;return Array.from(t.variantChildren).sort(Dh).forEach((l,f)=>{l.notify("AnimationStart",e),s.push(Jn(l,e,{...o,delay:n+c(f)}).then(()=>l.notify("AnimationComplete",e)))}),Promise.all(s)}function Dh(t,e){return t.sortNodePosition(e)}function Nh(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>Jn(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=Jn(t,e,n);else{const i=typeof e=="function"?fn(t,e,n.custom):e;r=Promise.all(la(t,i,n))}return r.then(()=>t.notify("AnimationComplete",e))}const Fh=[...gr].reverse(),Bh=gr.length;function Ih(t){return e=>Promise.all(e.map(({animation:n,options:r})=>Nh(t,n,r)))}function Wh(t){let e=Ih(t);const n=zh();let r=!0;const i=(c,l)=>{const f=fn(t,l);if(f){const{transition:u,transitionEnd:h,...d}=f;c={...c,...d,...h}}return c};function o(c){e=c(t)}function s(c,l){const f=t.getProps(),u=t.getVariantContext(!0)||{},h=[],d=new Set;let g={},m=1/0;for(let x=0;x<Bh;x++){const w=Fh[x],y=n[w],E=f[w]!==void 0?f[w]:u[w],S=me(E),T=w===l?y.isActive:null;T===!1&&(m=x);let P=E===u[w]&&E!==f[w]&&S;if(P&&r&&t.manuallyAnimateOnMount&&(P=!1),y.protectedKeys={...g},!y.isActive&&T===null||!E&&!y.prevProp||an(E)||typeof E=="boolean")continue;let R=Uh(y.prevProp,E)||w===l&&y.isActive&&!P&&S||x>m&&S,k=!1;const H=Array.isArray(E)?E:[E];let j=H.reduce(i,{});T===!1&&(j={});const{prevResolvedValues:U={}}=y,B={...U,...j},X=N=>{R=!0,d.has(N)&&(k=!0,d.delete(N)),y.needsAnimating[N]=!0};for(const N in B){const Y=j[N],L=U[N];if(g.hasOwnProperty(N))continue;let J=!1;$e(Y)&&$e(L)?J=!jo(Y,L):J=Y!==L,J?Y!==void 0?X(N):d.add(N):Y!==void 0&&d.has(N)?X(N):y.protectedKeys[N]=!0}y.prevProp=E,y.prevResolvedValues=j,y.isActive&&(g={...g,...j}),r&&t.blockInitialAnimation&&(R=!1),R&&(!P||k)&&h.push(...H.map(N=>({animation:N,options:{type:w,...c}})))}if(d.size){const x={};d.forEach(w=>{const y=t.getBaseTarget(w);y!==void 0&&(x[w]=y)}),h.push({animation:x})}let v=!!h.length;return r&&(f.initial===!1||f.initial===f.animate)&&!t.manuallyAnimateOnMount&&(v=!1),r=!1,v?e(h):Promise.resolve()}function a(c,l,f){var u;if(n[c].isActive===l)return Promise.resolve();(u=t.variantChildren)===null||u===void 0||u.forEach(d=>{var g;return(g=d.animationState)===null||g===void 0?void 0:g.setActive(c,l)}),n[c].isActive=l;const h=s(f,c);for(const d in n)n[d].protectedKeys={};return h}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function Uh(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!jo(e,t):!1}function jt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zh(){return{animate:jt(!0),whileInView:jt(),whileHover:jt(),whileTap:jt(),whileDrag:jt(),whileFocus:jt(),exit:jt()}}class Hh extends Rt{constructor(e){super(e),e.animationState||(e.animationState=Wh(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),an(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let $h=0;class qh extends Rt{constructor(){super(...arguments),this.id=$h++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;const o=this.node.animationState.setActive("exit",!e,{custom:r??this.node.getProps().custom});n&&!e&&o.then(()=>n(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Gh={animation:{Feature:Hh},exit:{Feature:qh}},Ei=(t,e)=>Math.abs(t-e);function Kh(t,e){const n=Ei(t.x,e.x),r=Ei(t.y,e.y);return Math.sqrt(n**2+r**2)}class ca{constructor(e,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const u=Vn(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=Kh(u.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:g}=u,{timestamp:m}=$;this.history.push({...g,timestamp:m});const{onStart:v,onMove:x}=this.handlers;h||(v&&v(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=_n(h,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{this.end();const{onEnd:d,onSessionEnd:g,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Vn(u.type==="pointercancel"?this.lastMoveEventInfo:_n(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,v),g&&g(u,v)},!Ao(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const s=un(e),a=_n(s,this.transformPagePoint),{point:c}=a,{timestamp:l}=$;this.history=[{...c,timestamp:l}];const{onSessionStart:f}=n;f&&f(e,Vn(a,this.history)),this.removeListeners=Tt(pt(this.contextWindow,"pointermove",this.handlePointerMove),pt(this.contextWindow,"pointerup",this.handlePointerUp),pt(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),gt(this.updatePoint)}}function _n(t,e){return e?{point:e(t.point)}:t}function Si(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Vn({point:t},e){return{point:t,delta:Si(t,ua(e)),offset:Si(t,Xh(e)),velocity:Yh(e,.1)}}function Xh(t){return t[0]}function ua(t){return t[t.length-1]}function Yh(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=ua(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Pt(e)));)n--;if(!r)return{x:0,y:0};const o=mt(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Q(t){return t.max-t.min}function Zn(t,e=0,n=.01){return Math.abs(t-e)<=n}function Ti(t,e,n,r=.5){t.origin=r,t.originPoint=D(e.min,e.max,t.origin),t.scale=Q(n)/Q(e),(Zn(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=D(n.min,n.max,t.origin)-t.originPoint,(Zn(t.translate)||isNaN(t.translate))&&(t.translate=0)}function he(t,e,n,r){Ti(t.x,e.x,n.x,r?r.originX:void 0),Ti(t.y,e.y,n.y,r?r.originY:void 0)}function Pi(t,e,n){t.min=n.min+e.min,t.max=t.min+Q(e)}function Jh(t,e,n){Pi(t.x,e.x,n.x),Pi(t.y,e.y,n.y)}function Ai(t,e,n){t.min=e.min-n.min,t.max=t.min+Q(e)}function de(t,e,n){Ai(t.x,e.x,n.x),Ai(t.y,e.y,n.y)}function Zh(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?D(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?D(n,t,r.max):Math.min(t,n)),t}function Ci(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function Qh(t,{top:e,left:n,bottom:r,right:i}){return{x:Ci(t.x,n,i),y:Ci(t.y,e,r)}}function Ri(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function td(t,e){return{x:Ri(t.x,e.x),y:Ri(t.y,e.y)}}function ed(t,e){let n=.5;const r=Q(t),i=Q(e);return i>r?n=ye(e.min,e.max-r,t.min):r>i&&(n=ye(t.min,t.max-i,e.min)),At(0,1,n)}function nd(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Qn=.35;function rd(t=Qn){return t===!1?t=0:t===!0&&(t=Qn),{x:Oi(t,"left","right"),y:Oi(t,"top","bottom")}}function Oi(t,e,n){return{min:ki(t,e),max:ki(t,n)}}function ki(t,e){return typeof t=="number"?t:t[e]||0}const ji=()=>({translate:0,scale:1,origin:0,originPoint:0}),Gt=()=>({x:ji(),y:ji()}),_i=()=>({min:0,max:0}),I=()=>({x:_i(),y:_i()});function et(t){return[t("x"),t("y")]}function fa({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function id({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function sd(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Mn(t){return t===void 0||t===1}function tr({scale:t,scaleX:e,scaleY:n}){return!Mn(t)||!Mn(e)||!Mn(n)}function _t(t){return tr(t)||ha(t)||t.z||t.rotate||t.rotateX||t.rotateY}function ha(t){return Vi(t.x)||Vi(t.y)}function Vi(t){return t&&t!=="0%"}function Ye(t,e,n){const r=t-n,i=e*r;return n+i}function Mi(t,e,n,r,i){return i!==void 0&&(t=Ye(t,i,r)),Ye(t,n,r)+e}function er(t,e=0,n=1,r,i){t.min=Mi(t.min,e,n,r,i),t.max=Mi(t.max,e,n,r,i)}function da(t,{x:e,y:n}){er(t.x,e.translate,e.scale,e.originPoint),er(t.y,n.translate,n.scale,n.originPoint)}function od(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const c=o.instance;c&&c.style&&c.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Kt(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,da(t,s)),r&&_t(o.latestValues)&&Kt(t,o.latestValues))}e.x=Li(e.x),e.y=Li(e.y)}function Li(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Et(t,e){t.min=t.min+e,t.max=t.max+e}function Di(t,e,[n,r,i]){const o=e[i]!==void 0?e[i]:.5,s=D(t.min,t.max,o);er(t,e[n],e[r],s,e.scale)}const ad=["x","scaleX","originX"],ld=["y","scaleY","originY"];function Kt(t,e){Di(t.x,e,ad),Di(t.y,e,ld)}function pa(t,e){return fa(sd(t.getBoundingClientRect(),e))}function cd(t,e,n){const r=pa(t,n),{scroll:i}=e;return i&&(Et(r.x,i.offset.x),Et(r.y,i.offset.y)),r}const ma=({current:t})=>t?t.ownerDocument.defaultView:null,ud=new WeakMap;class fd{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=I(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:u}=this.getProps();u?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(un(f,"page").point)},o=(f,u)=>{const{drag:h,dragPropagation:d,onDragStart:g}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=Ro(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),et(v=>{let x=this.getAxisMotionValue(v).get()||0;if(lt.test(x)){const{projection:w}=this.visualElement;if(w&&w.layout){const y=w.layout.layoutBox[v];y&&(x=Q(y)*(parseFloat(x)/100))}}this.originPoint[v]=x}),g&&M.update(()=>g(f,u),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},s=(f,u)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:g,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:v}=u;if(d&&this.currentDirection===null){this.currentDirection=hd(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",u.point,v),this.updateAxis("y",u.point,v),this.visualElement.render(),m&&m(f,u)},a=(f,u)=>this.stop(f,u),c=()=>et(f=>{var u;return this.getAnimationState(f)==="paused"&&((u=this.getAxisMotionValue(f).animation)===null||u===void 0?void 0:u.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new ca(e,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,contextWindow:ma(this.visualElement)})}stop(e,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&M.update(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!je(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=Zh(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){var e;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,o=this.constraints;n&&$t(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=Qh(i.layoutBox,n):this.constraints=!1,this.elastic=rd(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&et(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=nd(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!$t(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=cd(r,i.root,this.visualElement.getTransformPagePoint());let s=td(i.layout.layoutBox,o);if(n){const a=n(id(s));this.hasMutatedConstraints=!!a,a&&(s=fa(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},l=et(f=>{if(!je(f,n,this.currentDirection))return;let u=c&&c[f]||{};s&&(u={min:0,max:0});const h=i?200:1e6,d=i?40:1e7,g={type:"inertia",velocity:r?e[f]:0,bounceStiffness:h,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...u};return this.startAxisValueAnimation(f,g)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return r.start(jr(e,r,0,n))}stopAnimation(){et(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){et(e=>{var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(e){const n="_drag"+e.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){et(n=>{const{drag:r}=this.getProps();if(!je(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(e[n]-D(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!$t(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};et(s=>{const a=this.getAxisMotionValue(s);if(a){const c=a.get();i[s]=ed({min:c,max:c},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),et(s=>{if(!je(s,e,null))return;const a=this.getAxisMotionValue(s),{min:c,max:l}=this.constraints[s];a.set(D(c,l,i[s]))})}addListeners(){if(!this.visualElement.current)return;ud.set(this.visualElement,this);const e=this.visualElement.current,n=pt(e,"pointerdown",c=>{const{drag:l,dragListener:f=!0}=this.getProps();l&&f&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();$t(c)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=ht(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:l})=>{this.isDragging&&l&&(et(f=>{const u=this.getAxisMotionValue(f);u&&(this.originPoint[f]+=c[f].translate,u.set(u.get()+c[f].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Qn,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function je(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function hd(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class dd extends Rt{constructor(e){super(e),this.removeGroupControls=F,this.removeListeners=F,this.controls=new fd(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||F}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ni=t=>(e,n)=>{t&&M.update(()=>t(e,n))};class pd extends Rt{constructor(){super(...arguments),this.removePointerDownListener=F}onPointerDown(e){this.session=new ca(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ma(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ni(e),onStart:Ni(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&M.update(()=>i(o,s))}}}mount(){this.removePointerDownListener=pt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function md(){const t=p.reactExports.useContext(pr);if(t===null)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,i=p.reactExports.useId();return p.reactExports.useEffect(()=>r(i),[]),!e&&n?[!1,()=>n&&n(i)]:[!0]}const Fe={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Fi(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const oe={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(C.test(t))t=parseFloat(t);else return t;const n=Fi(t,e.target.x),r=Fi(t,e.target.y);return`${n}% ${r}%`}},gd={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=Ct.parse(t);if(i.length>5)return r;const o=Ct.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=c;const l=D(a,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=l),typeof i[3+s]=="number"&&(i[3+s]/=l),o(i)}};class yd extends p.React$1.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;Eu(vd),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Fe.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||e.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||M.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ga(t){const[e,n]=md(),r=p.reactExports.useContext(uo);return p.React$1.createElement(yd,{...t,layoutGroup:r,switchLayoutGroup:p.reactExports.useContext(fo),isPresent:e,safeToRemove:n})}const vd={borderRadius:{...oe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomLeftRadius:oe,borderBottomRightRadius:oe,boxShadow:gd},ya=["TopLeft","TopRight","BottomLeft","BottomRight"],xd=ya.length,Bi=t=>typeof t=="string"?parseFloat(t):t,Ii=t=>typeof t=="number"||C.test(t);function bd(t,e,n,r,i,o){i?(t.opacity=D(0,n.opacity!==void 0?n.opacity:1,wd(r)),t.opacityExit=D(e.opacity!==void 0?e.opacity:1,0,Ed(r))):o&&(t.opacity=D(e.opacity!==void 0?e.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<xd;s++){const a=`border${ya[s]}Radius`;let c=Wi(e,a),l=Wi(n,a);if(c===void 0&&l===void 0)continue;c||(c=0),l||(l=0),c===0||l===0||Ii(c)===Ii(l)?(t[a]=Math.max(D(Bi(c),Bi(l),r),0),(lt.test(l)||lt.test(c))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=D(e.rotate||0,n.rotate||0,r))}function Wi(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const wd=va(0,.5,Io),Ed=va(.5,.95,F);function va(t,e,n){return r=>r<t?0:r>e?1:n(ye(t,e,r))}function Ui(t,e){t.min=e.min,t.max=e.max}function tt(t,e){Ui(t.x,e.x),Ui(t.y,e.y)}function zi(t,e,n,r,i){return t-=e,t=Ye(t,1/n,r),i!==void 0&&(t=Ye(t,1/i,r)),t}function Sd(t,e=0,n=1,r=.5,i,o=t,s=t){if(lt.test(e)&&(e=parseFloat(e),e=D(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=D(o.min,o.max,r);t===o&&(a-=e),t.min=zi(t.min,e,n,a,i),t.max=zi(t.max,e,n,a,i)}function Hi(t,e,[n,r,i],o,s){Sd(t,e[n],e[r],e[i],e.scale,o,s)}const Td=["x","scaleX","originX"],Pd=["y","scaleY","originY"];function $i(t,e,n,r){Hi(t.x,e,Td,n?n.x:void 0,r?r.x:void 0),Hi(t.y,e,Pd,n?n.y:void 0,r?r.y:void 0)}function qi(t){return t.translate===0&&t.scale===1}function xa(t){return qi(t.x)&&qi(t.y)}function Ad(t,e){return t.x.min===e.x.min&&t.x.max===e.x.max&&t.y.min===e.y.min&&t.y.max===e.y.max}function ba(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Gi(t){return Q(t.x)/Q(t.y)}class Cd{constructor(){this.members=[]}add(e){_r(this.members,e),e.scheduleRender()}remove(e){if(Vr(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Ki(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:c,rotateX:l,rotateY:f}=n;c&&(r+=`rotate(${c}deg) `),l&&(r+=`rotateX(${l}deg) `),f&&(r+=`rotateY(${f}deg) `)}const s=t.x.scale*e.x,a=t.y.scale*e.y;return(s!==1||a!==1)&&(r+=`scale(${s}, ${a})`),r||"none"}const Rd=(t,e)=>t.depth-e.depth;class Od{constructor(){this.children=[],this.isDirty=!1}add(e){_r(this.children,e),this.isDirty=!0}remove(e){Vr(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Rd),this.isDirty=!1,this.children.forEach(e)}}function kd(t,e){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(gt(r),t(o-e))};return M.read(r,!0),()=>gt(r)}function jd(t){window.MotionDebug&&window.MotionDebug.record(t)}function _d(t){return t instanceof SVGElement&&t.tagName!=="svg"}function Vd(t,e,n){const r=K(t)?t:Jt(t);return r.start(jr("",r,e,n)),r.animation}const Xi=["","X","Y","Z"],Md={visibility:"hidden"},Yi=1e3;let Ld=0;const Vt={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function wa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=Ld++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Vt.totalNodes=Vt.resolvedTargetDeltas=Vt.recalculatedProjection=0,this.nodes.forEach(Fd),this.nodes.forEach(zd),this.nodes.forEach(Hd),this.nodes.forEach(Bd),jd(Vt)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Od)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Mr),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=_d(s),this.instance=s;const{layoutId:c,layout:l,visualElement:f}=this.options;if(f&&!f.current&&f.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(l||c)&&(this.isLayoutDirty=!0),t){let u;const h=()=>this.root.updateBlockedByResize=!1;t(s,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=kd(h,250),Fe.hasAnimatedSinceResize&&(Fe.hasAnimatedSinceResize=!1,this.nodes.forEach(Zi))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&f&&(c||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeTargetChanged:d,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||f.getDefaultTransition()||Xd,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=f.getProps(),w=!this.targetLayout||!ba(this.targetLayout,g)||d,y=!h&&d;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||h&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,y);const E={...kr(m,"layout"),onPlay:v,onComplete:x};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else h||Zi(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,gt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach($d),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let f=0;f<this.path.length;f++){const u=this.path[f];u.shouldResetTransform=!0,u.updateScroll("snapshot"),u.options.layoutRoot&&u.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ji);return}this.isUpdating||this.nodes.forEach(Wd),this.isUpdating=!1,this.nodes.forEach(Ud),this.nodes.forEach(Dd),this.nodes.forEach(Nd),this.clearAllSnapshots();const a=performance.now();$.delta=At(0,1e3/60,a-$.timestamp),$.timestamp=a,$.isProcessing=!0,Tn.update.process($),Tn.preRender.process($),Tn.render.process($),$.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(Id),this.sharedNodes.forEach(qd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=I(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!xa(this.projectionDelta),c=this.getTransformTemplate(),l=c?c(this.latestValues,""):void 0,f=l!==this.prevTransformTemplateValue;s&&(a||_t(this.latestValues)||f)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),Yd(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return I();const a=s.measureViewportBox(),{scroll:c}=this.root;return c&&(Et(a.x,c.offset.x),Et(a.y,c.offset.y)),a}removeElementScroll(s){const a=I();tt(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c],{scroll:f,options:u}=l;if(l!==this.root&&f&&u.layoutScroll){if(f.isRoot){tt(a,s);const{scroll:h}=this.root;h&&(Et(a.x,-h.offset.x),Et(a.y,-h.offset.y))}Et(a.x,f.offset.x),Et(a.y,f.offset.y)}}return a}applyTransform(s,a=!1){const c=I();tt(c,s);for(let l=0;l<this.path.length;l++){const f=this.path[l];!a&&f.options.layoutScroll&&f.scroll&&f!==f.root&&Kt(c,{x:-f.scroll.offset.x,y:-f.scroll.offset.y}),_t(f.latestValues)&&Kt(c,f.latestValues)}return _t(this.latestValues)&&Kt(c,this.latestValues),c}removeTransform(s){const a=I();tt(a,s);for(let c=0;c<this.path.length;c++){const l=this.path[c];if(!l.instance||!_t(l.latestValues))continue;tr(l.latestValues)&&l.updateSnapshot();const f=I(),u=l.measurePageBox();tt(f,u),$i(a,l.latestValues,l.snapshot?l.snapshot.layoutBox:void 0,f)}return _t(this.latestValues)&&$i(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==$.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==c;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:u,layoutId:h}=this.options;if(!(!this.layout||!(u||h))){if(this.resolvedRelativeTargetAt=$.timestamp,!this.targetDelta&&!this.relativeTarget){const d=this.getClosestProjectingParent();d&&d.layout&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=I(),this.relativeTargetOrigin=I(),de(this.relativeTargetOrigin,this.layout.layoutBox,d.layout.layoutBox),tt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=I(),this.targetWithTransforms=I()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Jh(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):tt(this.target,this.layout.layoutBox),da(this.target,this.targetDelta)):tt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const d=this.getClosestProjectingParent();d&&!!d.resumingFrom==!!this.resumingFrom&&!d.options.layoutScroll&&d.target&&this.animationProgress!==1?(this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=I(),this.relativeTargetOrigin=I(),de(this.relativeTargetOrigin,this.target,d.target),tt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Vt.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||tr(this.parent.latestValues)||ha(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),c=!!this.resumingFrom||this!==a;let l=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(l=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===$.timestamp&&(l=!1),l)return;const{layout:f,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||u))return;tt(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,d=this.treeScale.y;od(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox);const{target:g}=a;if(!g){this.projectionTransform&&(this.projectionDelta=Gt(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=Gt(),this.projectionDeltaWithTransform=Gt());const m=this.projectionTransform;he(this.projectionDelta,this.layoutCorrected,g,this.latestValues),this.projectionTransform=Ki(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==h||this.treeScale.y!==d)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g)),Vt.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const c=this.snapshot,l=c?c.latestValues:{},f={...this.latestValues},u=Gt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=I(),d=c?c.source:void 0,g=this.layout?this.layout.source:void 0,m=d!==g,v=this.getStack(),x=!v||v.members.length<=1,w=!!(m&&!x&&this.options.crossfade===!0&&!this.path.some(Kd));this.animationProgress=0;let y;this.mixTargetDelta=E=>{const S=E/1e3;Qi(u.x,s.x,S),Qi(u.y,s.y,S),this.setTargetDelta(u),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(de(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Gd(this.relativeTarget,this.relativeTargetOrigin,h,S),y&&Ad(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=I()),tt(y,this.relativeTarget)),m&&(this.animationValues=f,bd(f,l,this.latestValues,S,w,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Fe.hasAnimatedSinceResize=!0,this.currentAnimation=Vd(0,Yi,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Yi),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:l,latestValues:f}=s;if(!(!a||!c||!l)){if(this!==s&&this.layout&&l&&Ea(this.options.animationType,this.layout.layoutBox,l.layoutBox)){c=this.target||I();const u=Q(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+u;const h=Q(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+h}tt(a,c),Kt(a,f),he(this.projectionDeltaWithTransform,this.layoutCorrected,a,f)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Cd),this.sharedNodes.get(s).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:c}={}){const l=this.getStack();l&&l.promote(this,c),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:c}=s;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const l={};for(let f=0;f<Xi.length;f++){const u="rotate"+Xi[f];c[u]&&(l[u]=c[u],s.setStaticValue(u,0))}s.render();for(const f in l)s.setStaticValue(f,l[f]);s.scheduleRender()}getProjectionStyles(s){var a,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Md;const l={visibility:""},f=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Ne(s==null?void 0:s.pointerEvents)||"",l.transform=f?f(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Ne(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!_t(this.latestValues)&&(m.transform=f?f({},""):"none",this.hasProjected=!1),m}const h=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=Ki(this.projectionDeltaWithTransform,this.treeScale,h),f&&(l.transform=f(h,l.transform));const{x:d,y:g}=this.projectionDelta;l.transformOrigin=`${d.origin*100}% ${g.origin*100}% 0`,u.animationValues?l.opacity=u===this?(c=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:l.opacity=u===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const m in ze){if(h[m]===void 0)continue;const{correct:v,applyTo:x}=ze[m],w=l.transform==="none"?h[m]:v(h[m],u);if(x){const y=x.length;for(let E=0;E<y;E++)l[x[E]]=w}else l[m]=w}return this.options.layoutId&&(l.pointerEvents=u===this?Ne(s==null?void 0:s.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Ji),this.root.sharedNodes.clear()}}}function Dd(t){t.updateLayout()}function Nd(t){var e;const n=((e=t.resumeFrom)===null||e===void 0?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:o}=t.options,s=n.source!==t.layout.source;o==="size"?et(u=>{const h=s?n.measuredBox[u]:n.layoutBox[u],d=Q(h);h.min=r[u].min,h.max=h.min+d}):Ea(o,n.layoutBox,r)&&et(u=>{const h=s?n.measuredBox[u]:n.layoutBox[u],d=Q(r[u]);h.max=h.min+d,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+d)});const a=Gt();he(a,r,n.layoutBox);const c=Gt();s?he(c,t.applyTransform(i,!0),n.measuredBox):he(c,r,n.layoutBox);const l=!xa(a);let f=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:d}=u;if(h&&d){const g=I();de(g,n.layoutBox,h.layoutBox);const m=I();de(m,r,d.layoutBox),ba(g,m)||(f=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=g,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:a,hasLayoutChanged:l,hasRelativeTargetChanged:f})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function Fd(t){Vt.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Bd(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Id(t){t.clearSnapshot()}function Ji(t){t.clearMeasurements()}function Wd(t){t.isLayoutDirty=!1}function Ud(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Zi(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function zd(t){t.resolveTargetDelta()}function Hd(t){t.calcProjection()}function $d(t){t.resetRotation()}function qd(t){t.removeLeadSnapshot()}function Qi(t,e,n){t.translate=D(e.translate,0,n),t.scale=D(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function ts(t,e,n,r){t.min=D(e.min,n.min,r),t.max=D(e.max,n.max,r)}function Gd(t,e,n,r){ts(t.x,e.x,n.x,r),ts(t.y,e.y,n.y,r)}function Kd(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const Xd={duration:.45,ease:[.4,0,.1,1]},es=t=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(t),ns=es("applewebkit/")&&!es("chrome/")?Math.round:F;function rs(t){t.min=ns(t.min),t.max=ns(t.max)}function Yd(t){rs(t.x),rs(t.y)}function Ea(t,e,n){return t==="position"||t==="preserve-aspect"&&!Zn(Gi(e),Gi(n),.2)}const Jd=wa({attachResizeListener:(t,e)=>ht(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ln={current:void 0},Sa=wa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ln.current){const t=new Jd({});t.mount(window),t.setOptions({layoutScroll:!0}),Ln.current=t}return Ln.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Zd={pan:{Feature:pd},drag:{Feature:dd,ProjectionNode:Sa,MeasureLayout:ga}},Qd=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function tp(t){const e=Qd.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}function nr(t,e,n=1){const[r,i]=tp(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return sa(s)?parseFloat(s):s}else return $n(i)?nr(i,e,n+1):i}function ep(t,{...e},n){const r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach(i=>{const o=i.get();if(!$n(o))return;const s=nr(o,r);s&&i.set(s)});for(const i in e){const o=e[i];if(!$n(o))continue;const s=nr(o,r);s&&(e[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:e,transitionEnd:n}}const np=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Ta=t=>np.has(t),rp=t=>Object.keys(t).some(Ta),is=t=>t===Nt||t===C,ss=(t,e)=>parseFloat(t.split(", ")[e]),os=(t,e)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return ss(i[1],e);{const o=r.match(/^matrix\((.+)\)$/);return o?ss(o[1],t):0}},ip=new Set(["x","y","z"]),sp=we.filter(t=>!ip.has(t));function op(t){const e=[];return sp.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e.length&&t.render(),e}const Zt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:os(4,13),y:os(5,14)};Zt.translateX=Zt.x;Zt.translateY=Zt.y;const ap=(t,e,n)=>{const r=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&e.setStaticValue("display",t.display||"block"),n.forEach(l=>{a[l]=Zt[l](r,o)}),e.render();const c=e.measureViewportBox();return n.forEach(l=>{const f=e.getValue(l);f&&f.jump(a[l]),t[l]=Zt[l](c,o)}),t},lp=(t,e,n={},r={})=>{e={...e},r={...r};const i=Object.keys(e).filter(Ta);let o=[],s=!1;const a=[];if(i.forEach(c=>{const l=t.getValue(c);if(!t.hasValue(c))return;let f=n[c],u=se(f);const h=e[c];let d;if($e(h)){const g=h.length,m=h[0]===null?1:0;f=h[m],u=se(f);for(let v=m;v<g&&h[v]!==null;v++)d?Pr(se(h[v])===d):d=se(h[v])}else d=se(h);if(u!==d)if(is(u)&&is(d)){const g=l.get();typeof g=="string"&&l.set(parseFloat(g)),typeof h=="string"?e[c]=parseFloat(h):Array.isArray(h)&&d===C&&(e[c]=h.map(parseFloat))}else u!=null&&u.transform&&(d!=null&&d.transform)&&(f===0||h===0)?f===0?l.set(d.transform(f)):e[c]=u.transform(h):(s||(o=op(t),s=!0),a.push(c),r[c]=r[c]!==void 0?r[c]:e[c],l.jump(h))}),a.length){const c=a.indexOf("height")>=0?window.pageYOffset:null,l=ap(e,t,a);return o.length&&o.forEach(([f,u])=>{t.getValue(f).set(u)}),t.render(),on&&c!==null&&window.scrollTo({top:c}),{target:l,transitionEnd:r}}else return{target:e,transitionEnd:r}};function cp(t,e,n,r){return rp(e)?lp(t,e,n,r):{target:e,transitionEnd:r}}const up=(t,e,n,r)=>{const i=ep(t,e,r);return e=i.target,r=i.transitionEnd,cp(t,e,n,r)},rr={current:null},Pa={current:!1};function fp(){if(Pa.current=!0,!!on)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>rr.current=t.matches;t.addListener(e),e()}else rr.current=!1}function hp(t,e,n){const{willChange:r}=e;for(const i in e){const o=e[i],s=n[i];if(K(o))t.addValue(i,o),Xe(r)&&r.add(i);else if(K(s))t.addValue(i,Jt(o,{owner:t})),Xe(r)&&r.remove(i);else if(s!==o)if(t.hasValue(i)){const a=t.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=t.getStaticValue(i);t.addValue(i,Jt(a!==void 0?a:o,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const as=new WeakMap,Aa=Object.keys(ge),dp=Aa.length,ls=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],pp=yr.length;class mp{constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>M.render(this.render,!1,!0);const{latestValues:a,renderState:c}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=ln(n),this.isVariantNode=co(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...f}=this.scrapeMotionValuesFromProps(n,{});for(const u in f){const h=f[u];a[u]!==void 0&&K(h)&&(h.set(a[u],!1),Xe(l)&&l.add(u))}}scrapeMotionValuesFromProps(e,n){return{}}mount(e){this.current=e,as.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Pa.current||fp(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:rr.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){as.delete(this.current),this.projection&&this.projection.unmount(),gt(this.notifyUpdate),gt(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,n){const r=Dt.has(e),i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&M.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{i(),o()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...n},r,i,o){let s,a;for(let c=0;c<dp;c++){const l=Aa[c],{isEnabled:f,Feature:u,ProjectionNode:h,MeasureLayout:d}=ge[l];h&&(s=h),f(n)&&(!this.features[l]&&u&&(this.features[l]=new u(this)),d&&(a=d))}if((this.type==="html"||this.type==="svg")&&!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:l,drag:f,dragConstraints:u,layoutScroll:h,layoutRoot:d}=n;this.projection.setOptions({layoutId:c,layout:l,alwaysMeasureLayout:!!f||u&&$t(u),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof l=="string"?l:"both",initialPromotionConfig:o,layoutScroll:h,layoutRoot:d})}return a}updateFeatures(){for(const e in this.features){const n=this.features[e];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):I()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}makeTargetAnimatable(e,n=!0){return this.makeTargetAnimatableFromInstance(e,this.props,n)}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<ls.length;r++){const i=ls[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=e["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=hp(this,this.scrapeMotionValuesFromProps(e,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<pp;r++){const i=yr[r],o=this.props[i];(me(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){n!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,n)),this.values.set(e,n),this.latestValues[e]=n.get()}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=Jt(n,{owner:this}),this.addValue(e,r)),r}readValue(e){var n;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(n=this.getBaseTargetFromProps(this.props,e))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Tr(this.props,r))===null||n===void 0?void 0:n[e]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,e);return o!==void 0&&!K(o)?o:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Mr),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}class Ca extends mp{sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:n,...r},{transformValues:i},o){let s=_h(r,e||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){kh(this,r,s);const a=up(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:e,transitionEnd:n,...r}}}function gp(t){return window.getComputedStyle(t)}class yp extends Ca{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,n){if(Dt.has(n)){const r=Or(n);return r&&r.default||0}else{const r=gp(e),i=(mo(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return pa(e,n)}build(e,n,r,i){xr(e,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(e,n){return Sr(e,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;K(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(e,n,r,i){wo(e,n,r,i)}}class vp extends Ca{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Dt.has(n)){const r=Or(n);return r&&r.default||0}return n=Eo.has(n)?n:mr(n),e.getAttribute(n)}measureInstanceViewportBox(){return I()}scrapeMotionValuesFromProps(e,n){return To(e,n)}build(e,n,r,i){wr(e,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(e,n,r,i){So(e,n,r,i)}mount(e){this.isSVGTag=Er(e.tagName),super.mount(e)}}const xp=(t,e)=>vr(t)?new vp(e,{enableHardwareAcceleration:!1}):new yp(e,{enableHardwareAcceleration:!0}),bp={layout:{ProjectionNode:Sa,MeasureLayout:ga}},wp={...Gh,...df,...Zd,...bp},Ep=bu((t,e)=>Qu(t,e,wp,xp));/**
|
|
9
|
-
* @remix-run/router v1.15.3
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) Remix Software Inc.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the MIT license found in the
|
|
14
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
15
|
-
*
|
|
16
|
-
* @license MIT
|
|
17
|
-
*/function ve(){return ve=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ve.apply(this,arguments)}var Lt;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Lt||(Lt={}));const cs="popstate";function Sp(t){t===void 0&&(t={});function e(r,i){let{pathname:o,search:s,hash:a}=r.location;return ir("",{pathname:o,search:s,hash:a},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:Je(i)}return Pp(e,n,null,t)}function it(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Tp(){return Math.random().toString(36).substr(2,8)}function us(t,e){return{usr:t.state,key:t.key,idx:e}}function ir(t,e,n,r){return n===void 0&&(n=null),ve({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?hn(e):e,{state:n,key:e&&e.key||r||Tp()})}function Je(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function hn(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function Pp(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Lt.Pop,c=null,l=f();l==null&&(l=0,s.replaceState(ve({},s.state,{idx:l}),""));function f(){return(s.state||{idx:null}).idx}function u(){a=Lt.Pop;let v=f(),x=v==null?null:v-l;l=v,c&&c({action:a,location:m.location,delta:x})}function h(v,x){a=Lt.Push;let w=ir(m.location,v,x);n&&n(w,v),l=f()+1;let y=us(w,l),E=m.createHref(w);try{s.pushState(y,"",E)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(E)}o&&c&&c({action:a,location:m.location,delta:1})}function d(v,x){a=Lt.Replace;let w=ir(m.location,v,x);n&&n(w,v),l=f();let y=us(w,l),E=m.createHref(w);s.replaceState(y,"",E),o&&c&&c({action:a,location:m.location,delta:0})}function g(v){let x=i.location.origin!=="null"?i.location.origin:i.location.href,w=typeof v=="string"?v:Je(v);return w=w.replace(/ $/,"%20"),it(x,"No window.location.(origin|href) available to create URL for href: "+w),new URL(w,x)}let m={get action(){return a},get location(){return t(i,s)},listen(v){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(cs,u),c=v,()=>{i.removeEventListener(cs,u),c=null}},createHref(v){return e(i,v)},createURL:g,encodeLocation(v){let x=g(v);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:d,go(v){return s.go(v)}};return m}var fs;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(fs||(fs={}));function Ra(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function Ap(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?hn(t):t;return{pathname:n?n.startsWith("/")?n:Cp(n,e):e,search:Op(r),hash:kp(i)}}function Cp(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Dn(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Rp(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function Oa(t,e){let n=Rp(t);return e?n.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function ka(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=hn(t):(i=ve({},t),it(!i.pathname||!i.pathname.includes("?"),Dn("?","pathname","search",i)),it(!i.pathname||!i.pathname.includes("#"),Dn("#","pathname","hash",i)),it(!i.search||!i.search.includes("#"),Dn("#","search","hash",i)));let o=t===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let u=e.length-1;if(!r&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),u-=1;i.pathname=h.join("/")}a=u>=0?e[u]:"/"}let c=Ap(i,a),l=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(l||f)&&(c.pathname+="/"),c}const ja=t=>t.join("/").replace(/\/\/+/g,"/"),Op=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,kp=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,_a=["post","put","patch","delete"];new Set(_a);const jp=["get",..._a];new Set(jp);/**
|
|
18
|
-
* React Router v6.22.3
|
|
19
|
-
*
|
|
20
|
-
* Copyright (c) Remix Software Inc.
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the MIT license found in the
|
|
23
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
24
|
-
*
|
|
25
|
-
* @license MIT
|
|
26
|
-
*/function Ze(){return Ze=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ze.apply(this,arguments)}const Va=p.reactExports.createContext(null),ee=p.reactExports.createContext(null),Lr=p.reactExports.createContext(null),dn=p.reactExports.createContext({outlet:null,matches:[],isDataRoute:!1});function _p(t,e){let{relative:n}=e===void 0?{}:e;pn()||it(!1);let{basename:r,navigator:i}=p.reactExports.useContext(ee),{hash:o,pathname:s,search:a}=La(t,{relative:n}),c=s;return r!=="/"&&(c=s==="/"?r:ja([r,s])),i.createHref({pathname:c,search:a,hash:o})}function pn(){return p.reactExports.useContext(Lr)!=null}function mn(){return pn()||it(!1),p.reactExports.useContext(Lr).location}function Ma(t){p.reactExports.useContext(ee).static||p.reactExports.useLayoutEffect(t)}function Vp(){let{isDataRoute:t}=p.reactExports.useContext(dn);return t?Fp():Mp()}function Mp(){pn()||it(!1);let t=p.reactExports.useContext(Va),{basename:e,future:n,navigator:r}=p.reactExports.useContext(ee),{matches:i}=p.reactExports.useContext(dn),{pathname:o}=mn(),s=JSON.stringify(Oa(i,n.v7_relativeSplatPath)),a=p.reactExports.useRef(!1);return Ma(()=>{a.current=!0}),p.reactExports.useCallback(function(l,f){if(f===void 0&&(f={}),!a.current)return;if(typeof l=="number"){r.go(l);return}let u=ka(l,JSON.parse(s),o,f.relative==="path");t==null&&e!=="/"&&(u.pathname=u.pathname==="/"?e:ja([e,u.pathname])),(f.replace?r.replace:r.push)(u,f.state,f)},[e,r,s,o,t])}function La(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=p.reactExports.useContext(ee),{matches:i}=p.reactExports.useContext(dn),{pathname:o}=mn(),s=JSON.stringify(Oa(i,r.v7_relativeSplatPath));return p.reactExports.useMemo(()=>ka(t,JSON.parse(s),o,n==="path"),[t,s,o,n])}var Da=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(Da||{}),Na=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(Na||{});function Lp(t){let e=p.reactExports.useContext(Va);return e||it(!1),e}function Dp(t){let e=p.reactExports.useContext(dn);return e||it(!1),e}function Np(t){let e=Dp(),n=e.matches[e.matches.length-1];return n.route.id||it(!1),n.route.id}function Fp(){let{router:t}=Lp(Da.UseNavigateStable),e=Np(Na.UseNavigateStable),n=p.reactExports.useRef(!1);return Ma(()=>{n.current=!0}),p.reactExports.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Ze({fromRouteId:e},o)))},[t,e])}function Bp(t){let{basename:e="/",children:n=null,location:r,navigationType:i=Lt.Pop,navigator:o,static:s=!1,future:a}=t;pn()&&it(!1);let c=e.replace(/^\/*/,"/"),l=p.reactExports.useMemo(()=>({basename:c,navigator:o,static:s,future:Ze({v7_relativeSplatPath:!1},a)}),[c,a,o,s]);typeof r=="string"&&(r=hn(r));let{pathname:f="/",search:u="",hash:h="",state:d=null,key:g="default"}=r,m=p.reactExports.useMemo(()=>{let v=Ra(f,c);return v==null?null:{location:{pathname:v,search:u,hash:h,state:d,key:g},navigationType:i}},[c,f,u,h,d,g,i]);return m==null?null:p.reactExports.createElement(ee.Provider,{value:l},p.reactExports.createElement(Lr.Provider,{children:n,value:m}))}new Promise(()=>{});/**
|
|
27
|
-
* React Router DOM v6.22.3
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Remix Software Inc.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
33
|
-
*
|
|
34
|
-
* @license MIT
|
|
35
|
-
*/function sr(){return sr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},sr.apply(this,arguments)}function Ip(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function Wp(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Up(t,e){return t.button===0&&(!e||e==="_self")&&!Wp(t)}const zp=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Hp="6";try{window.__reactRouterVersion=Hp}catch{}const $p="startTransition",hs=p.React[$p];function qp(t){let{basename:e,children:n,future:r,window:i}=t,o=p.reactExports.useRef();o.current==null&&(o.current=Sp({window:i,v5Compat:!0}));let s=o.current,[a,c]=p.reactExports.useState({action:s.action,location:s.location}),{v7_startTransition:l}=r||{},f=p.reactExports.useCallback(u=>{l&&hs?hs(()=>c(u)):c(u)},[c,l]);return p.reactExports.useLayoutEffect(()=>s.listen(f),[s,f]),p.reactExports.createElement(Bp,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const Gp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Kp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xp=p.reactExports.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:c,to:l,preventScrollReset:f,unstable_viewTransition:u}=e,h=Ip(e,zp),{basename:d}=p.reactExports.useContext(ee),g,m=!1;if(typeof l=="string"&&Kp.test(l)&&(g=l,Gp))try{let y=new URL(window.location.href),E=l.startsWith("//")?new URL(y.protocol+l):new URL(l),S=Ra(E.pathname,d);E.origin===y.origin&&S!=null?l=S+E.search+E.hash:m=!0}catch{}let v=_p(l,{relative:i}),x=Yp(l,{replace:s,state:a,target:c,preventScrollReset:f,relative:i,unstable_viewTransition:u});function w(y){r&&r(y),y.defaultPrevented||x(y)}return p.reactExports.createElement("a",sr({},h,{href:g||v,onClick:m||o?r:w,ref:n,target:c}))});var ds;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(ds||(ds={}));var ps;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(ps||(ps={}));function Yp(t,e){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a}=e===void 0?{}:e,c=Vp(),l=mn(),f=La(t,{relative:s});return p.reactExports.useCallback(u=>{if(Up(u,n)){u.preventDefault();let h=r!==void 0?r:Je(l)===Je(f);c(t,{replace:h,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a})}},[l,c,f,r,i,n,t,o,s,a])}function Dr(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,o;for(o=0;o<r.length;o++)i=r[o],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}const Jp=Object.freeze(Object.defineProperty({__proto__:null,default:Dr},Symbol.toStringTag,{value:"Module"}));function Qt(){return Qt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Qt.apply(this,arguments)}const Zp=Object.freeze(Object.defineProperty({__proto__:null,default:Qt},Symbol.toStringTag,{value:"Module"}));function Fa(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,p._setPrototypeOf(t,e)}function Nn(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r<i;r++)(o||!(r in e))&&(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))}/*!
|
|
36
|
-
* content-type
|
|
37
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
38
|
-
* MIT Licensed
|
|
39
|
-
*/var ms=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,Qp=/\\([\u000b\u0020-\u00ff])/g,tm=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,em=nm;function nm(t){if(!t)throw new TypeError("argument string is required");var e=typeof t=="object"?rm(t):t;if(typeof e!="string")throw new TypeError("argument string is required to be a string");var n=e.indexOf(";"),r=n!==-1?e.slice(0,n).trim():e.trim();if(!tm.test(r))throw new TypeError("invalid media type");var i=new im(r.toLowerCase());if(n!==-1){var o,s,a;for(ms.lastIndex=n;s=ms.exec(e);){if(s.index!==n)throw new TypeError("invalid parameter format");n+=s[0].length,o=s[1].toLowerCase(),a=s[2],a.charCodeAt(0)===34&&(a=a.slice(1,-1),a.indexOf("\\")!==-1&&(a=a.replace(Qp,"$1"))),i.parameters[o]=a}if(n!==e.length)throw new TypeError("invalid parameter format")}return i}function rm(t){var e;if(typeof t.getHeader=="function"?e=t.getHeader("content-type"):typeof t.headers=="object"&&(e=t.headers&&t.headers["content-type"]),typeof e!="string")throw new TypeError("content-type header is missing from object");return e}function im(t){this.parameters=Object.create(null),this.type=t}var zt=new Map,Ba=function(e){return e.cloneNode(!0)},gs=function(){return window.location.protocol==="file:"},Ia=function(e,n,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&i.readyState===2){var o=i.getResponseHeader("Content-Type");if(!o)throw new Error("Content type not found");var s=em(o).type;if(!(s==="image/svg+xml"||s==="text/plain"))throw new Error("Invalid content type: ".concat(s))}if(i.readyState===4){if(i.status===404||i.responseXML===null)throw new Error(gs()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(i.status===200||gs()&&i.status===0)r(null,i);else throw new Error("There was a problem injecting the SVG: "+i.status+" "+i.statusText)}}catch(a){if(i.abort(),a instanceof Error)r(a,i);else throw a}},i.open("GET",e),i.withCredentials=n,i.overrideMimeType&&i.overrideMimeType("text/xml"),i.send()},St={},ys=function(e,n){St[e]=St[e]||[],St[e].push(n)},sm=function(e){for(var n=function(s,a){setTimeout(function(){if(Array.isArray(St[e])){var c=zt.get(e),l=St[e][s];c instanceof SVGSVGElement&&l(null,Ba(c)),c instanceof Error&&l(c),s===St[e].length-1&&delete St[e]}},0)},r=0,i=St[e].length;r<i;r++)n(r)},om=function(e,n,r){if(zt.has(e)){var i=zt.get(e);if(i===void 0){ys(e,r);return}if(i instanceof SVGSVGElement){r(null,Ba(i));return}}zt.set(e,void 0),ys(e,r),Ia(e,n,function(o,s){var a;o?zt.set(e,o):((a=s.responseXML)===null||a===void 0?void 0:a.documentElement)instanceof SVGSVGElement&&zt.set(e,s.responseXML.documentElement),sm(e)})},am=function(e,n,r){Ia(e,n,function(i,o){var s;i?r(i):((s=o.responseXML)===null||s===void 0?void 0:s.documentElement)instanceof SVGSVGElement&&r(null,o.responseXML.documentElement)})},lm=0,cm=function(){return++lm},st=[],vs={},um="http://www.w3.org/2000/svg",Fn="http://www.w3.org/1999/xlink",xs=function(e,n,r,i,o,s,a){var c=e.getAttribute("data-src")||e.getAttribute("src");if(!c){a(new Error("Invalid data-src or src attribute"));return}if(st.indexOf(e)!==-1){st.splice(st.indexOf(e),1),e=null;return}st.push(e),e.setAttribute("src","");var l=i?om:am;l(c,o,function(f,u){if(!u){st.splice(st.indexOf(e),1),e=null,a(f);return}var h=e.getAttribute("id");h&&u.setAttribute("id",h);var d=e.getAttribute("title");d&&u.setAttribute("title",d);var g=e.getAttribute("width");g&&u.setAttribute("width",g);var m=e.getAttribute("height");m&&u.setAttribute("height",m);var v=Array.from(new Set(Nn(Nn(Nn([],(u.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();u.setAttribute("class",v);var x=e.getAttribute("style");x&&u.setAttribute("style",x),u.setAttribute("data-src",c);var w=[].filter.call(e.attributes,function(L){return/^data-\w[\w-]*$/.test(L.name)});if(Array.prototype.forEach.call(w,function(L){L.name&&L.value&&u.setAttribute(L.name,L.value)}),r){var y={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]},E,S,T,P,A;Object.keys(y).forEach(function(L){E=L,T=y[L],S=u.querySelectorAll(E+"[id]");for(var J=function(Bt,gn){P=S[Bt].id,A=P+"-"+cm();var Ot;Array.prototype.forEach.call(T,function(yn){Ot=u.querySelectorAll("["+yn+'*="'+P+'"]');for(var Pe=0,Xa=Ot.length;Pe<Xa;Pe++){var Ir=Ot[Pe].getAttribute(yn);Ir&&!Ir.match(new RegExp('url\\("?#'+P+'"?\\)'))||Ot[Pe].setAttribute(yn,"url(#"+A+")")}});for(var ft=u.querySelectorAll("[*|href]"),It=[],Wt=0,ne=ft.length;Wt<ne;Wt++){var kt=ft[Wt].getAttributeNS(Fn,"href");kt&&kt.toString()==="#"+S[Bt].id&&It.push(ft[Wt])}for(var rt=0,Br=It.length;rt<Br;rt++)It[rt].setAttributeNS(Fn,"href","#"+A);S[Bt].id=A},ut=0,_=S.length;ut<_;ut++)J(ut)})}u.removeAttribute("xmlns:a");for(var R=u.querySelectorAll("script"),k=[],H,j,U=0,B=R.length;U<B;U++)j=R[U].getAttribute("type"),(!j||j==="application/ecmascript"||j==="application/javascript"||j==="text/javascript")&&(H=R[U].innerText||R[U].textContent,H&&k.push(H),u.removeChild(R[U]));if(k.length>0&&(n==="always"||n==="once"&&!vs[c])){for(var X=0,N=k.length;X<N;X++)new Function(k[X])(window);vs[c]=!0}var Y=u.querySelectorAll("style");if(Array.prototype.forEach.call(Y,function(L){L.textContent+=""}),u.setAttribute("xmlns",um),u.setAttribute("xmlns:xlink",Fn),s(u),!e.parentNode){st.splice(st.indexOf(e),1),e=null,a(new Error("Parent node is null"));return}e.parentNode.replaceChild(u,e),st.splice(st.indexOf(e),1),e=null,a(null,u)})},fm=function(e,n){var r=n===void 0?{}:n,i=r.afterAll,o=i===void 0?function(){}:i,s=r.afterEach,a=s===void 0?function(){}:s,c=r.beforeEach,l=c===void 0?function(){}:c,f=r.cacheRequests,u=f===void 0?!0:f,h=r.evalScripts,d=h===void 0?"never":h,g=r.httpRequestWithCredentials,m=g===void 0?!1:g,v=r.renumerateIRIElements,x=v===void 0?!0:v;if(e&&"length"in e)for(var w=0,y=0,E=e.length;y<E;y++)xs(e[y],d,x,u,m,l,function(S,T){a(S,T),e&&"length"in e&&e.length===++w&&o(w)});else e?xs(e,d,x,u,m,l,function(S,T){a(S,T),o(1),e=null}):o(0)},Wa={exports:{}},hm="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",dm=hm,pm=dm;function Ua(){}function za(){}za.resetWarningCache=Ua;var mm=function(){function t(r,i,o,s,a,c){if(c!==pm){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:za,resetWarningCache:Ua};return n.PropTypes=n,n};Wa.exports=mm();var z=Wa.exports,gm=function(e){var n=(e==null?void 0:e.ownerDocument)||document;return n.defaultView||window},ym=function(e,n){for(var r in e)if(!(r in n))return!0;for(var i in n)if(e[i]!==n[i])return!0;return!1},vm=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],_e="http://www.w3.org/2000/svg",bs="http://www.w3.org/1999/xlink",Nr=function(t){Fa(e,t);function e(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return r=t.call.apply(t,[this].concat(o))||this,r.initialState={hasError:!1,isLoading:!0},r.state=r.initialState,r._isMounted=!1,r.reactWrapper=void 0,r.nonReactWrapper=void 0,r.refCallback=function(a){r.reactWrapper=a},r}var n=e.prototype;return n.renderSVG=function(){var i=this;if(this.reactWrapper instanceof gm(this.reactWrapper).Node){var o=this.props,s=o.desc,a=o.evalScripts,c=o.httpRequestWithCredentials,l=o.renumerateIRIElements,f=o.src,u=o.title,h=o.useRequestCache,d=this.props.onError,g=this.props.beforeInjection,m=this.props.afterInjection,v=this.props.wrapper,x,w;v==="svg"?(x=document.createElementNS(_e,v),x.setAttribute("xmlns",_e),x.setAttribute("xmlns:xlink",bs),w=document.createElementNS(_e,v)):(x=document.createElement(v),w=document.createElement(v)),x.appendChild(w),w.dataset.src=f,this.nonReactWrapper=this.reactWrapper.appendChild(x);var y=function(P){if(i.removeSVG(),!i._isMounted){d(P);return}i.setState(function(){return{hasError:!0,isLoading:!1}},function(){d(P)})},E=function(P,A){if(P){y(P);return}i._isMounted&&i.setState(function(){return{isLoading:!1}},function(){try{m(A)}catch(R){y(R)}})},S=function(P){if(P.setAttribute("role","img"),s){var A=P.querySelector(":scope > desc");A&&P.removeChild(A);var R=document.createElement("desc");R.innerHTML=s,P.prepend(R)}if(u){var k=P.querySelector(":scope > title");k&&P.removeChild(k);var H=document.createElement("title");H.innerHTML=u,P.prepend(H)}try{g(P)}catch(j){y(j)}};fm(w,{afterEach:E,beforeEach:S,cacheRequests:h,evalScripts:a,httpRequestWithCredentials:c,renumerateIRIElements:l})}},n.removeSVG=function(){var i;(i=this.nonReactWrapper)!=null&&i.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},n.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},n.componentDidUpdate=function(i){var o=this;ym(Qt({},i),this.props)&&this.setState(function(){return o.initialState},function(){o.removeSVG(),o.renderSVG()})},n.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},n.render=function(){var i=this.props;i.afterInjection,i.beforeInjection,i.desc,i.evalScripts;var o=i.fallback;i.httpRequestWithCredentials;var s=i.loading;i.renumerateIRIElements,i.src,i.title,i.useRequestCache;var a=i.wrapper,c=Dr(i,vm),l=a;return p.reactExports.createElement(l,Qt({},c,{ref:this.refCallback},a==="svg"?{xmlns:_e,xmlnsXlink:bs}:{}),this.state.isLoading&&s&&p.reactExports.createElement(s,null),this.state.hasError&&o&&p.reactExports.createElement(o,null))},e}(p.reactExports.Component);Nr.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"};Nr.propTypes={afterInjection:z.func,beforeInjection:z.func,desc:z.string,evalScripts:z.oneOf(["always","once","never"]),fallback:z.oneOfType([z.func,z.object,z.string]),httpRequestWithCredentials:z.bool,loading:z.oneOfType([z.func,z.object,z.string]),onError:z.func,renumerateIRIElements:z.bool,src:z.string.isRequired,title:z.string,useRequestCache:z.bool,wrapper:z.oneOf(["div","span","svg"])};function xm(t){return p.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",...t,children:p.jsxRuntimeExports.jsx("path",{fill:"currenColor",d:"M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"})})}function bm(t){const{renderChildren:e,parentRef:n,onlyChild:r}=t,[i,o]=p.reactExports.useState({top:0,left:0}),s=p.reactExports.useRef(null),[a,c]=p.reactExports.useState("auto");return p.reactExports.useLayoutEffect(()=>{if(n.current&&s.current){const l=n.current.getBoundingClientRect(),f=s.current.getBoundingClientRect();let u=l.top;const h=l.left+l.width,d=f.height+(window.innerHeight-l.top)>window.innerHeight;d&&(console.log("overtop"),c(window.innerHeight-l.top-50)),l.top+f.height>window.innerHeight&&!d&&(u=l.top-f.height+l.height),o({top:u,left:h})}},[n,s]),r?e({maxHeight:a}):p.reactDomExports.createPortal(p.jsxRuntimeExports.jsx("div",{ref:s,style:{position:"fixed",top:i.top,left:i.left,zIndex:1200},children:e({maxHeight:a})}),n.current)}function wm(t){const{children:e,title:n,hasTooltip:r}=t,i=p.reactExports.useRef(),[o,s]=p.reactExports.useState(!1),[a,c]=p.reactExports.useState({top:0,left:0});return p.jsxRuntimeExports.jsxs("div",{className:"tooltip-item__wrapper",onMouseOver:()=>{if(s(!0),i.current){const l=i.current.getBoundingClientRect();c({top:l.top-20,left:l.left})}},onMouseLeave:()=>s(!1),ref:i,children:[p.jsxRuntimeExports.jsx("div",{children:e}),o&&r&&p.jsxRuntimeExports.jsx("div",{className:"tooltip-item__content",style:{position:"fixed",background:"#85858A",borderRadius:"4px",color:"#fff",padding:"4px 8px",top:a.top,left:a.left,zIndex:1400,fontSize:"10px",transition:"all 0.2s ease-in-out",animation:"fadeIn 0.2s ease-in-out",pointerEvents:"none"},children:n})]})}function Em(t,e){return e?t:void 0}function Ha({item:t,level:e=0,...n}){var U,B,X,N,Y;const{isActive:r,isCollapsed:i,expanded:o,toggleExpand:s}=n,a=`level-${e}`,c=i?"collapsed":"expanded",l=r(t.id)?"active":"",f=(L,J=a)=>`${L} ${J} ${c} ${l}`,u=!!((U=t.children)!=null&&U.length),[h,d]=p.reactExports.useState(!1),g=p.reactExports.useRef(),m=p.reactExports.useRef(),v=(m==null?void 0:m.current)&&((B=m==null?void 0:m.current)==null?void 0:B.scrollWidth)>((X=m==null?void 0:m.current)==null?void 0:X.clientWidth),x=window.location.origin,w=t.path&&t.path.includes("http")?new URL(t.path):{origin:"",pathname:""},y=window.location.pathname.split("/")[1],E=w.pathname.split("/")[1],S=n.ssr||!x.includes("local")&&x!==w.origin||E!==y,T=u||e===0?"div":S?"a":Xp,P=t.path||"#",A=e+1,R=u&&!(i&&A>=2&&!h),k=i||e===0?void 0:`${e}rem`,H=()=>{d(!0)},j=()=>{d(!1)};return p.jsxRuntimeExports.jsxs("div",{ref:g,className:f("menu-item__wrapper"),onMouseOver:H,onMouseOut:j,children:[p.jsxRuntimeExports.jsx(wm,{hasTooltip:v||i&&e===1,children:p.jsxRuntimeExports.jsxs(T,{to:P,href:P,className:f("menu-item__link"),style:{paddingLeft:k,transition:"all 0.3s",color:r(t.id)?((N=n.brandColors)==null?void 0:N.primary400)||Xt.primary400:void 0,backgroundColor:r(t.id)&&e===1?(Y=n.brandColors)==null?void 0:Y.primary200:void 0},onClick:L=>{u&&(L.preventDefault(),i||s(t.id))},children:[e!==0&&p.jsxRuntimeExports.jsx(Sm,{cls:f,item:t}),p.jsxRuntimeExports.jsx("span",{className:f("menu-item__label"),ref:m,children:t.name}),u&&p.jsxRuntimeExports.jsx("div",{className:f("menu-item__icon-arrow__wrapper"),children:p.jsxRuntimeExports.jsx(xm,{className:f(`menu-item__icon-arrow__icon ${o(t.id)?"open":"close"}`)})})]}),title:t.name}),R&&p.jsxRuntimeExports.jsx(bm,{parentRef:g,onlyChild:!i||i&&A<2,renderChildren:({maxHeight:L})=>{var J;return p.jsxRuntimeExports.jsx(Ep.div,{className:f(`menu-item__dropdown ${o(t.id)?"menu-item__dropdown--open":"menu-item__dropdown--close"}`,`level-${A}`),initial:{height:i||o(t.id)?"auto":0},animate:{height:i||o(t.id)?"auto":0},transition:{duration:.25},style:Em({maxHeight:L,overflowY:"auto",paddingRight:3},L!=="auto"&&!!A),children:(J=t.children)==null?void 0:J.map(ut=>p.reactExports.createElement(Ha,{...n,key:ut.id,item:ut,level:A}))})}})]})}function Sm({item:t,cls:e}){var s,a;const[n,r]=p.reactExports.useState(!t.icon),i=()=>{r(!0)},o=(s=t.icon)==null?void 0:s.endsWith(".svg");return p.jsxRuntimeExports.jsx("div",{className:e("menu-item__icon"),children:n?p.jsxRuntimeExports.jsx("div",{style:{width:24,height:24,backgroundColor:"#dadada",borderRadius:"5px",display:"flex",justifyContent:"center",alignItems:"center"},children:(a=t.name.trim().at(0))==null?void 0:a.toUpperCase()}):o?p.jsxRuntimeExports.jsx(Nr,{src:t.icon,beforeInjection:c=>{c.setAttribute("style","margin: 0 auto;"),c.querySelectorAll("path").forEach(f=>{f.hasAttribute("fill")&&f.setAttribute("fill","currentColor"),f.hasAttribute("stroke")&&f.setAttribute("stroke","currentColor")})}}):p.jsxRuntimeExports.jsx("img",{src:t.icon||"/",alt:" ",style:{height:24,maxHeight:24},onError:i})})}function Tm(){return p.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:p.jsxRuntimeExports.jsx("path",{d:"M21 18v2H3v-2h18zM6.596 3.903L8.01 5.318 4.828 8.5 8.01 11.68l-1.414 1.415L2 8.5l4.596-4.597zM21 11v2h-9v-2h9zm0-7v2h-9V4h9z"})})}function Pm(){return p.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",fill:"currentColor",stroke:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",children:p.jsxRuntimeExports.jsx("path",{d:"M3 4h18v2H3V4zm0 7h18v2H3v-2zm0 7h18v2H3v-2z"})})}function Am(t){return p.jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"20",fill:"none",viewBox:"0 0 18 20",...t,children:p.jsxRuntimeExports.jsx("path",{fill:"#E01B00",fillRule:"evenodd",d:"M.179 2.875A2.375 2.375 0 012.554.5h3.393a1.018 1.018 0 010 2.036H2.554a.34.34 0 00-.34.339v14.25c0 .187.152.34.34.34h3.393a1.018 1.018 0 110 2.035H2.554a2.375 2.375 0 01-2.375-2.375V2.875zm14.167 6.107h-7.72a1.018 1.018 0 000 2.036h7.72l-2.673 2.673a1.018 1.018 0 101.44 1.44l4.41-4.411a1.018 1.018 0 000-1.44l-4.41-4.41a1.018 1.018 0 10-1.44 1.439l2.673 2.673z",clipRule:"evenodd"})})}const Cm=`.wrap-section{padding:0 8px;transition:all .3s}.wrap-section.collapsed{padding:0 4px}.side-bar{display:flex;flex-direction:column;max-width:18rem;height:calc(100vh - 64px);border-right:1px solid #ddd;background-color:#fafafa;transition:all .3s}.side-bar.expanded{width:17rem}.side-bar.collapsed{width:64px}.side-bar__wrap-btn-logout,.side-bar__btn-logout{margin:40px 0}.side-bar__logout-btn__text{margin-left:12px;font-size:.875rem;opacity:1}.side-bar__logout-btn__text.collapsed{opacity:0;transition:ease-in-out .2s;transition-delay:.15s}.side-bar__wrapper-toggle-btn{display:flex;flex-direction:row;justify-content:flex-end;transition:all .3s;margin-right:-8px;margin-top:40px}.side-bar__wrapper-toggle-btn.collapsed{justify-content:center;width:100%}.side-bar__toggle-btn{margin-top:-6px;color:#85858a}.side-bar__logout-btn{width:100%;text-align:left;display:flex;flex-direction:row;align-items:center;padding:8px 16px 8px 18.6665px;min-height:48px;border-radius:.375rem;overflow:hidden;transition:all .3s ease-in-out;background-color:initial}.side-bar__logout-btn:hover{background-color:#919eab14}.side-bar__icon-logout{flex-shrink:0}.menu-item__wrapper{display:flex;flex-direction:column;position:relative;width:100%}.menu-item__link{display:flex;flex-direction:row;border-radius:.375rem;align-items:center;padding:.5rem;position:relative;height:48px;cursor:pointer;color:#85858a}.menu-item__link:hover{background-color:#919eab14}.menu-item__link.collapsed.level-1{padding-left:calc(.5rem + 7.665px)!important}.menu-item__link.active{background-color:#009d4f1a;color:inherit}.menu-item__link.active.level-2,.menu-item__link.active.level-3,.menu-item__link.active.level-4,.menu-item__link.active.level-5,.menu-item__link.active.level-6,.menu-item__link.active.level-7,.menu-item__link.active.level-8,.menu-item__link.active.level-9,.menu-item__link.active.level-10{background-color:inherit;color:inherit}.menu-item__link.active.level-2:hover,.menu-item__link.active.level-3:hover,.menu-item__link.active.level-4:hover,.menu-item__link.active.level-5:hover,.menu-item__link.active.level-6:hover,.menu-item__link.active.level-7:hover,.menu-item__link.active.level-8:hover,.menu-item__link.active.level-9:hover,.menu-item__link.active.level-10:hover{background-color:#919eab14}.menu-item__link.level-0{height:37px}.menu-item__link.menu-item__link.collapsed.level-0{padding:0;height:0;transition:all .15s}.menu-item__icon{width:1.5rem;height:1.5rem;flex-shrink:0;display:grid;place-items:center}.menu-item__icon.collapsed.level-1>*{margin:0 auto}.menu-item__label{font-size:.875rem;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;width:100%;flex-shrink:1;margin-left:12px;padding-right:12px;color:#292929;opacity:1}.menu-item__label.level-1.collapsed{text-overflow:unset}.menu-item__label.active{color:inherit}.menu-item__label.collapsed{margin-left:8px;font-size:.75rem;line-height:1rem}.menu-item__label.collapsed.level-0,.menu-item__label.collapsed.level-1{font-size:.875rem;opacity:0;transition-delay:.15s}.menu-item__label.level-0{color:#85858a;margin-left:0}.menu-item__icon-arrow__wrapper{display:grid;place-items:center;position:absolute;top:50%;transform:translateY(-50%);right:0}.menu-item__icon-arrow__wrapper.expanded{right:4px}.menu-item__icon-arrow__wrapper.level-0.collapsed{display:none}.menu-item__icon-arrow__icon{transition:all .3s!important;transform:rotate(-90deg)!important}.menu-item__icon-arrow__icon.active{color:inherit}.menu-item__icon-arrow__icon.expanded.open{transform:rotate(0)!important}.menu-item__dropdown.collapsed{background-color:#fafafa;border:1px solid #ddd;box-shadow:#0000001a 0 10px 15px -3px,#0000000d 0 4px 6px -2px;border-radius:4px;width:180px;max-width:180px;padding:4px;z-index:1200}.menu-item__dropdown::-webkit-scrollbar{width:4px}.menu-item__dropdown::-webkit-scrollbar-thumb{background-color:#9b9b9b99;border-radius:2px}.menu-item__dropdown,.menu-item__dropdown>*{margin-top:4px}.menu-item__dropdown.expanded.menu-item__dropdown--close{margin-top:0;transition:margin-top .3s}.menu-item__dropdown:first-of-type{margin-top:0}.menu-item__dropdown>*:first-child{margin-top:0}.menu-item__dropdown.collapsed .menu-item__link{height:40px}.menu-item__dropdown.collapsed .menu-item__link.level-1{height:48px}.menu-item__dropdown.collapsed.level-1{width:auto;max-width:unset;box-shadow:none;border:none;padding:0;background-color:unset}.menu-item__dropdown.expanded{overflow:hidden}.icon-btn{display:inline-flex;align-items:center;justify-content:center;padding:8px;border-radius:50%;background-color:transparent;transition:background-color .3s ease;border:none}.icon-btn:hover{background-color:var(--btn-bg-hover)}.simplebar-scrollbar:before{background-color:#0000002d}.side-bar__menu.collapsed .simplebar-track.simplebar-vertical{display:none}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}
|
|
40
|
-
`,ws=localStorage.getItem("isCollapsed");function Rm(t){const e=mn(),[n,r]=p.reactExports.useState([]),[i,o]=p.reactExports.useState(ws===null?!0:ws==="true"),[s,a]=p.reactExports.useState({}),c=Fr(n),[l,f]=p.reactExports.useState(window.location.href);p.reactExports.useEffect(()=>{f(window.location.href)},[e]);const u=$a(c,l).filter(y=>y.parentKey!==0);console.log("matchPaths:",l,e,u);const h=y=>{a({...s,[y]:!s[y]})},d=()=>{o(!i),localStorage.setItem("isCollapsed",JSON.stringify(!i))};p.reactExports.useLayoutEffect(()=>{(async()=>{var E,S,T;try{const P=t.menuPath||"/global-menu-config/api/v1/menu-items/user",A=t.baseUrl+P,{data:R}=await zs.get(A,{withCredentials:!0});let k=R.map(j=>({...j,parentKey:0}));k=Ga(k),k=qa(k,t.replacePath??(j=>j)),console.log("_filterDisableMenuItems menuItems:",k),(E=t.disabledMenuItems)!=null&&E.length&&(k=or(k,t.disabledMenuItems));const H=km(k);a(H),r(k)}catch(P){console.log(P),so(((T=(S=P.response)==null?void 0:S.data)==null?void 0:T.errorMessage)||"Have error when get menu items")}})()},[t.baseUrl,t.menuPath,t.replacePath]),p.reactExports.useEffect(()=>{var y;(y=t.disabledMenuItems)!=null&&y.length&&r(E=>or(E,t.disabledMenuItems))},[t.disabledMenuItems]);const[g,m]=p.reactExports.useState(!1),v=i?"collapsed":"expanded",x=y=>`${y} ${v}`,w=p.reactExports.useRef(null);return p.jsxRuntimeExports.jsxs("div",{className:x("side-bar"),children:[p.jsxRuntimeExports.jsx("div",{className:x("wrap-section side-bar__wrapper-toggle-btn"),children:p.jsxRuntimeExports.jsx("button",{className:"icon-btn side-bar__toggle-btn",onClick:d,children:i?p.jsxRuntimeExports.jsx(Pm,{}):p.jsxRuntimeExports.jsx(Tm,{})})}),p.jsxRuntimeExports.jsx(Qs,{ref:w,className:x("wrap-section side-bar__menu"),style:{marginTop:24,flex:1,overflow:"auto",height:"100%",overflowX:"hidden"},children:n.map(y=>{const E=S=>u.some(T=>T.id===S);return p.jsxRuntimeExports.jsx(Ha,{item:y,isActive:E,isCollapsed:i,expanded:S=>s[S],toggleExpand:h,replacePath:t.replacePath,ssr:t.ssr,brandColors:t.brandColors},y.id)})}),p.jsxRuntimeExports.jsxs("div",{className:x("wrap-section side-bar__wrap-btn-logout"),children:[p.jsxRuntimeExports.jsxs("button",{className:x("side-bar__logout-btn"),onClick:()=>m(!0),children:[p.jsxRuntimeExports.jsx(Am,{className:x("side-bar__icon-logout")}),p.jsxRuntimeExports.jsx("span",{className:x("side-bar__logout-btn__text"),children:"Logout"})]}),p.jsxRuntimeExports.jsx(to,{isOpen:g,onClose:()=>m(!1),onConfirm:()=>t.logout?t.logout():Zc(t.baseUrl)})]})]})}function Fr(t){let e=[];for(const n of t)e.push(n),n.children&&(e=e.concat(Fr(n.children)));return e}function Om(t,e){const n=new URL(t).searchParams,r=new URL(e).searchParams;return Array.from(r).filter(([i,o])=>o===n.get(i)).length}function $a(t,e){var c;const n=new URL(e);let r=t.filter(l=>l.path&&l.path.includes("http")).map(l=>({item:l,itemUrl:new URL(l.path),matchingParamsCount:Om(e,l.path)})).sort((l,f)=>{const u=new URL(l.itemUrl).searchParams,h=new URL(f.itemUrl).searchParams;return Array.from(u).length-Array.from(h).length}).filter(({itemUrl:l})=>n.origin===l.origin);const i=r.filter(({itemUrl:l})=>n.pathname===l.pathname),o=r.filter(({itemUrl:l})=>n.pathname.includes(l.pathname));r=i.length>0?i:o,r=r.sort((l,f)=>f.matchingParamsCount-l.matchingParamsCount);let s=r.length>0?(c=r.find(l=>l.item.parentKey))==null?void 0:c.item:null;console.log("matchingItems:",r);let a=[];for(;s;)a=[s,...a],s=t.find(l=>l.id===(s==null?void 0:s.parentKey))||null;return console.log("parents:",a),a}function qa(t,e){return t.map(n=>{var r;return(r=n.children)!=null&&r.length?(n.path="",n.children=qa(n.children,e)):n.path=e(n.path),n})}function Ga(t){return t.map(n=>n.path&&!n.path.includes("http")&&n.path.includes("/")?{...n,path:window.location.origin+n.path}:(n.children&&(n.children=Ga(n.children)),n))}function km(t){const e=Fr(t),n=$a(e,window.location.href),r={};return n.forEach(i=>r[i.id]=!0),e.forEach(i=>{i.parentKey||(r[i.id]=!0)}),r}function or(t,e){return t.filter(n=>(n.children&&(n.children=or(n.children,e)),!e.includes(n.serviceKey)))}function Ka(t){return p.jsxRuntimeExports.jsx(eo,{styles:[Xc,Cm],style:{position:"sticky",zIndex:20},children:p.jsxRuntimeExports.jsx(Rm,{...t})})}function jm(t){return p.jsxRuntimeExports.jsx(qp,{children:p.jsxRuntimeExports.jsx(Ka,{...t,ssr:!0})})}{const t=p.s(jm,{props:{baseUrl:"string",menuPath:"string",logout:"function",replacePath:"function",ssr:"boolean",brandColors:"json",disabledMenuItems:"json"},shadow:"open"});customElements.define("global-menu",t)}exports.ERROR_MESSAGE=Yc;exports.GlobalMenu=Ka;exports.LogoutConfirmModal=to;exports.StyleWrapper=eo;exports._extends=Qt;exports._extends$1=Zp;exports._inheritsLoose=Fa;exports._objectWithoutPropertiesLoose=Dr;exports.axios=zs;exports.color=Xt;exports.login=Jc;exports.notify=cu;exports.objectWithoutPropertiesLoose=Jp;exports.pushError=so;
|