ode-explorer 2.6.19-develop-pedago.20261124100152 → 2.6.19-develop-pedago.20261124162948

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -43,7 +43,7 @@ Error generating stack: `+n0.message+`
43
43
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(_e){return _e instanceof this?_e:new this(_e)}static concat(_e,...i0){const r0=new this(_e);return i0.forEach(t0=>r0.set(t0)),r0}static accessor(_e){const r0=(this[$internals]=this[$internals]={accessors:{}}).accessors,t0=this.prototype;function n0(s0){const o0=normalizeHeader(s0);r0[o0]||(buildAccessors(t0,s0),r0[o0]=!0)}return utils$1.isArray(_e)?_e.forEach(n0):n0(_e),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:e0},_e)=>{let i0=_e[0].toUpperCase()+_e.slice(1);return{get:()=>e0,set(r0){this[i0]=r0}}});utils$1.freezeMethods(AxiosHeaders$1);function transformData(e0,_e){const i0=this||defaults$3,r0=_e||i0,t0=AxiosHeaders$1.from(r0.headers);let n0=r0.data;return utils$1.forEach(e0,function(o0){n0=o0.call(i0,n0,t0.normalize(),_e?_e.status:void 0)}),t0.normalize(),n0}function isCancel$1(e0){return!!(e0&&e0.__CANCEL__)}let CanceledError$1=class extends AxiosError$1{constructor(_e,i0,r0){super(_e??"canceled",AxiosError$1.ERR_CANCELED,i0,r0),this.name="CanceledError",this.__CANCEL__=!0}};function settle(e0,_e,i0){const r0=i0.config.validateStatus;!i0.status||!r0||r0(i0.status)?e0(i0):_e(new AxiosError$1("Request failed with status code "+i0.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(i0.status/100)-4],i0.config,i0.request,i0))}function parseProtocol(e0){const _e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e0);return _e&&_e[1]||""}function speedometer(e0,_e){e0=e0||10;const i0=new Array(e0),r0=new Array(e0);let t0=0,n0=0,s0;return _e=_e!==void 0?_e:1e3,function(a0){const f0=Date.now(),l0=r0[n0];s0||(s0=f0),i0[t0]=a0,r0[t0]=f0;let u0=n0,A0=0;for(;u0!==t0;)A0+=i0[u0++],u0=u0%e0;if(t0=(t0+1)%e0,t0===n0&&(n0=(n0+1)%e0),f0-s0<_e)return;const c0=l0&&f0-l0;return c0?Math.round(A0*1e3/c0):void 0}}function throttle(e0,_e){let i0=0,r0=1e3/_e,t0,n0;const s0=(f0,l0=Date.now())=>{i0=l0,t0=null,n0&&(clearTimeout(n0),n0=null),e0(...f0)};return[(...f0)=>{const l0=Date.now(),u0=l0-i0;u0>=r0?s0(f0,l0):(t0=f0,n0||(n0=setTimeout(()=>{n0=null,s0(t0)},r0-u0)))},()=>t0&&s0(t0)]}const progressEventReducer=(e0,_e,i0=3)=>{let r0=0;const t0=speedometer(50,250);return throttle(n0=>{const s0=n0.loaded,o0=n0.lengthComputable?n0.total:void 0,a0=s0-r0,f0=t0(a0),l0=s0<=o0;r0=s0;const u0={loaded:s0,total:o0,progress:o0?s0/o0:void 0,bytes:a0,rate:f0||void 0,estimated:f0&&o0&&l0?(o0-s0)/f0:void 0,event:n0,lengthComputable:o0!=null,[_e?"download":"upload"]:!0};e0(u0)},i0)},progressEventDecorator=(e0,_e)=>{const i0=e0!=null;return[r0=>_e[0]({lengthComputable:i0,total:e0,loaded:r0}),_e[1]]},asyncDecorator=e0=>(..._e)=>utils$1.asap(()=>e0(..._e)),isURLSameOrigin=platform$1.hasStandardBrowserEnv?((e0,_e)=>i0=>(i0=new URL(i0,platform$1.origin),e0.protocol===i0.protocol&&e0.host===i0.host&&(_e||e0.port===i0.port)))(new URL(platform$1.origin),platform$1.navigator&&/(msie|trident)/i.test(platform$1.navigator.userAgent)):()=>!0,cookies=platform$1.hasStandardBrowserEnv?{write(e0,_e,i0,r0,t0,n0,s0){if(typeof document>"u")return;const o0=[`${e0}=${encodeURIComponent(_e)}`];utils$1.isNumber(i0)&&o0.push(`expires=${new Date(i0).toUTCString()}`),utils$1.isString(r0)&&o0.push(`path=${r0}`),utils$1.isString(t0)&&o0.push(`domain=${t0}`),n0===!0&&o0.push("secure"),utils$1.isString(s0)&&o0.push(`SameSite=${s0}`),document.cookie=o0.join("; ")},read(e0){if(typeof document>"u")return null;const _e=document.cookie.match(new RegExp("(?:^|; )"+e0+"=([^;]*)"));return _e?decodeURIComponent(_e[1]):null},remove(e0){this.write(e0,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(e0){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e0)}function combineURLs(e0,_e){return _e?e0.replace(/\/?\/$/,"")+"/"+_e.replace(/^\/+/,""):e0}function buildFullPath(e0,_e,i0){let r0=!isAbsoluteURL(_e);return e0&&(r0||i0==!1)?combineURLs(e0,_e):_e}const headersToObject=e0=>e0 instanceof AxiosHeaders$1?{...e0}:e0;function mergeConfig$2(e0,_e){_e=_e||{};const i0={};function r0(f0,l0,u0,A0){return utils$1.isPlainObject(f0)&&utils$1.isPlainObject(l0)?utils$1.merge.call({caseless:A0},f0,l0):utils$1.isPlainObject(l0)?utils$1.merge({},l0):utils$1.isArray(l0)?l0.slice():l0}function t0(f0,l0,u0,A0){if(utils$1.isUndefined(l0)){if(!utils$1.isUndefined(f0))return r0(void 0,f0,u0,A0)}else return r0(f0,l0,u0,A0)}function n0(f0,l0){if(!utils$1.isUndefined(l0))return r0(void 0,l0)}function s0(f0,l0){if(utils$1.isUndefined(l0)){if(!utils$1.isUndefined(f0))return r0(void 0,f0)}else return r0(void 0,l0)}function o0(f0,l0,u0){if(u0 in _e)return r0(f0,l0);if(u0 in e0)return r0(void 0,f0)}const a0={url:n0,method:n0,data:n0,baseURL:s0,transformRequest:s0,transformResponse:s0,paramsSerializer:s0,timeout:s0,timeoutMessage:s0,withCredentials:s0,withXSRFToken:s0,adapter:s0,responseType:s0,xsrfCookieName:s0,xsrfHeaderName:s0,onUploadProgress:s0,onDownloadProgress:s0,decompress:s0,maxContentLength:s0,maxBodyLength:s0,beforeRedirect:s0,transport:s0,httpAgent:s0,httpsAgent:s0,cancelToken:s0,socketPath:s0,responseEncoding:s0,validateStatus:o0,headers:(f0,l0,u0)=>t0(headersToObject(f0),headersToObject(l0),u0,!0)};return utils$1.forEach(Object.keys({...e0,..._e}),function(l0){const u0=a0[l0]||t0,A0=u0(e0[l0],_e[l0],l0);utils$1.isUndefined(A0)&&u0!==o0||(i0[l0]=A0)}),i0}const resolveConfig=e0=>{const _e=mergeConfig$2({},e0);let{data:i0,withXSRFToken:r0,xsrfHeaderName:t0,xsrfCookieName:n0,headers:s0,auth:o0}=_e;if(_e.headers=s0=AxiosHeaders$1.from(s0),_e.url=buildURL(buildFullPath(_e.baseURL,_e.url,_e.allowAbsoluteUrls),e0.params,e0.paramsSerializer),o0&&s0.set("Authorization","Basic "+btoa((o0.username||"")+":"+(o0.password?unescape(encodeURIComponent(o0.password)):""))),utils$1.isFormData(i0)){if(platform$1.hasStandardBrowserEnv||platform$1.hasStandardBrowserWebWorkerEnv)s0.setContentType(void 0);else if(utils$1.isFunction(i0.getHeaders)){const a0=i0.getHeaders(),f0=["content-type","content-length"];Object.entries(a0).forEach(([l0,u0])=>{f0.includes(l0.toLowerCase())&&s0.set(l0,u0)})}}if(platform$1.hasStandardBrowserEnv&&(r0&&utils$1.isFunction(r0)&&(r0=r0(_e)),r0||r0!==!1&&isURLSameOrigin(_e.url))){const a0=t0&&n0&&cookies.read(n0);a0&&s0.set(t0,a0)}return _e},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e0){return new Promise(function(i0,r0){const t0=resolveConfig(e0);let n0=t0.data;const s0=AxiosHeaders$1.from(t0.headers).normalize();let{responseType:o0,onUploadProgress:a0,onDownloadProgress:f0}=t0,l0,u0,A0,c0,k0;function d0(){c0&&c0(),k0&&k0(),t0.cancelToken&&t0.cancelToken.unsubscribe(l0),t0.signal&&t0.signal.removeEventListener("abort",l0)}let h0=new XMLHttpRequest;h0.open(t0.method.toUpperCase(),t0.url,!0),h0.timeout=t0.timeout;function b0(){if(!h0)return;const m0=AxiosHeaders$1.from("getAllResponseHeaders"in h0&&h0.getAllResponseHeaders()),v0={data:!o0||o0==="text"||o0==="json"?h0.responseText:h0.response,status:h0.status,statusText:h0.statusText,headers:m0,config:e0,request:h0};settle(function(x0){i0(x0),d0()},function(x0){r0(x0),d0()},v0),h0=null}"onloadend"in h0?h0.onloadend=b0:h0.onreadystatechange=function(){!h0||h0.readyState!==4||h0.status===0&&!(h0.responseURL&&h0.responseURL.indexOf("file:")===0)||setTimeout(b0)},h0.onabort=function(){h0&&(r0(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e0,h0)),h0=null)},h0.onerror=function(g0){const v0=g0&&g0.message?g0.message:"Network Error",w0=new AxiosError$1(v0,AxiosError$1.ERR_NETWORK,e0,h0);w0.event=g0||null,r0(w0),h0=null},h0.ontimeout=function(){let g0=t0.timeout?"timeout of "+t0.timeout+"ms exceeded":"timeout exceeded";const v0=t0.transitional||transitionalDefaults;t0.timeoutErrorMessage&&(g0=t0.timeoutErrorMessage),r0(new AxiosError$1(g0,v0.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e0,h0)),h0=null},n0===void 0&&s0.setContentType(null),"setRequestHeader"in h0&&utils$1.forEach(s0.toJSON(),function(g0,v0){h0.setRequestHeader(v0,g0)}),utils$1.isUndefined(t0.withCredentials)||(h0.withCredentials=!!t0.withCredentials),o0&&o0!=="json"&&(h0.responseType=t0.responseType),f0&&([A0,k0]=progressEventReducer(f0,!0),h0.addEventListener("progress",A0)),a0&&h0.upload&&([u0,c0]=progressEventReducer(a0),h0.upload.addEventListener("progress",u0),h0.upload.addEventListener("loadend",c0)),(t0.cancelToken||t0.signal)&&(l0=m0=>{h0&&(r0(!m0||m0.type?new CanceledError$1(null,e0,h0):m0),h0.abort(),h0=null)},t0.cancelToken&&t0.cancelToken.subscribe(l0),t0.signal&&(t0.signal.aborted?l0():t0.signal.addEventListener("abort",l0)));const p0=parseProtocol(t0.url);if(p0&&platform$1.protocols.indexOf(p0)===-1){r0(new AxiosError$1("Unsupported protocol "+p0+":",AxiosError$1.ERR_BAD_REQUEST,e0));return}h0.send(n0||null)})},composeSignals=(e0,_e)=>{const{length:i0}=e0=e0?e0.filter(Boolean):[];if(_e||i0){let r0=new AbortController,t0;const n0=function(f0){if(!t0){t0=!0,o0();const l0=f0 instanceof Error?f0:this.reason;r0.abort(l0 instanceof AxiosError$1?l0:new CanceledError$1(l0 instanceof Error?l0.message:l0))}};let s0=_e&&setTimeout(()=>{s0=null,n0(new AxiosError$1(`timeout of ${_e}ms exceeded`,AxiosError$1.ETIMEDOUT))},_e);const o0=()=>{e0&&(s0&&clearTimeout(s0),s0=null,e0.forEach(f0=>{f0.unsubscribe?f0.unsubscribe(n0):f0.removeEventListener("abort",n0)}),e0=null)};e0.forEach(f0=>f0.addEventListener("abort",n0));const{signal:a0}=r0;return a0.unsubscribe=()=>utils$1.asap(o0),a0}},streamChunk=function*(e0,_e){let i0=e0.byteLength;if(i0<_e){yield e0;return}let r0=0,t0;for(;r0<i0;)t0=r0+_e,yield e0.slice(r0,t0),r0=t0},readBytes=async function*(e0,_e){for await(const i0 of readStream(e0))yield*streamChunk(i0,_e)},readStream=async function*(e0){if(e0[Symbol.asyncIterator]){yield*e0;return}const _e=e0.getReader();try{for(;;){const{done:i0,value:r0}=await _e.read();if(i0)break;yield r0}}finally{await _e.cancel()}},trackStream=(e0,_e,i0,r0)=>{const t0=readBytes(e0,_e);let n0=0,s0,o0=a0=>{s0||(s0=!0,r0&&r0(a0))};return new ReadableStream({async pull(a0){try{const{done:f0,value:l0}=await t0.next();if(f0){o0(),a0.close();return}let u0=l0.byteLength;if(i0){let A0=n0+=u0;i0(A0)}a0.enqueue(new Uint8Array(l0))}catch(f0){throw o0(f0),f0}},cancel(a0){return o0(a0),t0.return()}},{highWaterMark:2})},DEFAULT_CHUNK_SIZE=64*1024,{isFunction:isFunction$1}=utils$1,globalFetchAPI=(({Request:e0,Response:_e})=>({Request:e0,Response:_e}))(utils$1.global),{ReadableStream:ReadableStream$1,TextEncoder}=utils$1.global,test=(e0,..._e)=>{try{return!!e0(..._e)}catch{return!1}},factory=e0=>{e0=utils$1.merge.call({skipUndefined:!0},globalFetchAPI,e0);const{fetch:_e,Request:i0,Response:r0}=e0,t0=_e?isFunction$1(_e):typeof fetch=="function",n0=isFunction$1(i0),s0=isFunction$1(r0);if(!t0)return!1;const o0=t0&&isFunction$1(ReadableStream$1),a0=t0&&(typeof TextEncoder=="function"?(k0=>d0=>k0.encode(d0))(new TextEncoder):async k0=>new Uint8Array(await new i0(k0).arrayBuffer())),f0=n0&&o0&&test(()=>{let k0=!1;const d0=new i0(platform$1.origin,{body:new ReadableStream$1,method:"POST",get duplex(){return k0=!0,"half"}}).headers.has("Content-Type");return k0&&!d0}),l0=s0&&o0&&test(()=>utils$1.isReadableStream(new r0("").body)),u0={stream:l0&&(k0=>k0.body)};t0&&["text","arrayBuffer","blob","formData","stream"].forEach(k0=>{!u0[k0]&&(u0[k0]=(d0,h0)=>{let b0=d0&&d0[k0];if(b0)return b0.call(d0);throw new AxiosError$1(`Response type '${k0}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,h0)})});const A0=async k0=>{if(k0==null)return 0;if(utils$1.isBlob(k0))return k0.size;if(utils$1.isSpecCompliantForm(k0))return(await new i0(platform$1.origin,{method:"POST",body:k0}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(k0)||utils$1.isArrayBuffer(k0))return k0.byteLength;if(utils$1.isURLSearchParams(k0)&&(k0=k0+""),utils$1.isString(k0))return(await a0(k0)).byteLength},c0=async(k0,d0)=>{const h0=utils$1.toFiniteNumber(k0.getContentLength());return h0??A0(d0)};return async k0=>{let{url:d0,method:h0,data:b0,signal:p0,cancelToken:m0,timeout:g0,onDownloadProgress:v0,onUploadProgress:w0,responseType:x0,headers:_0,withCredentials:y0="same-origin",fetchOptions:S0}=resolveConfig(k0),B0=_e||fetch;x0=x0?(x0+"").toLowerCase():"text";let I0=composeSignals([p0,m0&&m0.toAbortSignal()],g0),F0=null;const C0=I0&&I0.unsubscribe&&(()=>{I0.unsubscribe()});let E0;try{if(w0&&f0&&h0!=="get"&&h0!=="head"&&(E0=await c0(_0,b0))!==0){let N0=new i0(d0,{method:"POST",body:b0,duplex:"half"}),O0;if(utils$1.isFormData(b0)&&(O0=N0.headers.get("content-type"))&&_0.setContentType(O0),N0.body){const[Y0,D0]=progressEventDecorator(E0,progressEventReducer(asyncDecorator(w0)));b0=trackStream(N0.body,DEFAULT_CHUNK_SIZE,Y0,D0)}}utils$1.isString(y0)||(y0=y0?"include":"omit");const R0=n0&&"credentials"in i0.prototype,M0={...S0,signal:I0,method:h0.toUpperCase(),headers:_0.normalize().toJSON(),body:b0,duplex:"half",credentials:R0?y0:void 0};F0=n0&&new i0(d0,M0);let T0=await(n0?B0(F0,S0):B0(d0,M0));const G0=l0&&(x0==="stream"||x0==="response");if(l0&&(v0||G0&&C0)){const N0={};["status","statusText","headers"].forEach($0=>{N0[$0]=T0[$0]});const O0=utils$1.toFiniteNumber(T0.headers.get("content-length")),[Y0,D0]=v0&&progressEventDecorator(O0,progressEventReducer(asyncDecorator(v0),!0))||[];T0=new r0(trackStream(T0.body,DEFAULT_CHUNK_SIZE,Y0,()=>{D0&&D0(),C0&&C0()}),N0)}x0=x0||"text";let j0=await u0[utils$1.findKey(u0,x0)||"text"](T0,k0);return!G0&&C0&&C0(),await new Promise((N0,O0)=>{settle(N0,O0,{data:j0,headers:AxiosHeaders$1.from(T0.headers),status:T0.status,statusText:T0.statusText,config:k0,request:F0})})}catch(R0){throw C0&&C0(),R0&&R0.name==="TypeError"&&/Load failed|fetch/i.test(R0.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,k0,F0),{cause:R0.cause||R0}):AxiosError$1.from(R0,R0&&R0.code,k0,F0)}}},seedCache=new Map,getFetch=e0=>{let _e=e0&&e0.env||{};const{fetch:i0,Request:r0,Response:t0}=_e,n0=[r0,t0,i0];let s0=n0.length,o0=s0,a0,f0,l0=seedCache;for(;o0--;)a0=n0[o0],f0=l0.get(a0),f0===void 0&&l0.set(a0,f0=o0?new Map:factory(_e)),l0=f0;return f0};getFetch();const knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:{get:getFetch}};utils$1.forEach(knownAdapters,(e0,_e)=>{if(e0){try{Object.defineProperty(e0,"name",{value:_e})}catch{}Object.defineProperty(e0,"adapterName",{value:_e})}});const renderReason=e0=>`- ${e0}`,isResolvedHandle=e0=>utils$1.isFunction(e0)||e0===null||e0===!1;function getAdapter$1(e0,_e){e0=utils$1.isArray(e0)?e0:[e0];const{length:i0}=e0;let r0,t0;const n0={};for(let s0=0;s0<i0;s0++){r0=e0[s0];let o0;if(t0=r0,!isResolvedHandle(r0)&&(t0=knownAdapters[(o0=String(r0)).toLowerCase()],t0===void 0))throw new AxiosError$1(`Unknown adapter '${o0}'`);if(t0&&(utils$1.isFunction(t0)||(t0=t0.get(_e))))break;n0[o0||"#"+s0]=t0}if(!t0){const s0=Object.entries(n0).map(([a0,f0])=>`adapter ${a0} `+(f0===!1?"is not supported by the environment":"is not available in the build"));let o0=i0?s0.length>1?`since :
44
44
  `+s0.map(renderReason).join(`
45
45
  `):" "+renderReason(s0[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+o0,"ERR_NOT_SUPPORT")}return t0}const adapters={getAdapter:getAdapter$1,adapters:knownAdapters};function throwIfCancellationRequested(e0){if(e0.cancelToken&&e0.cancelToken.throwIfRequested(),e0.signal&&e0.signal.aborted)throw new CanceledError$1(null,e0)}function dispatchRequest(e0){return throwIfCancellationRequested(e0),e0.headers=AxiosHeaders$1.from(e0.headers),e0.data=transformData.call(e0,e0.transformRequest),["post","put","patch"].indexOf(e0.method)!==-1&&e0.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e0.adapter||defaults$3.adapter,e0)(e0).then(function(r0){return throwIfCancellationRequested(e0),r0.data=transformData.call(e0,e0.transformResponse,r0),r0.headers=AxiosHeaders$1.from(r0.headers),r0},function(r0){return isCancel$1(r0)||(throwIfCancellationRequested(e0),r0&&r0.response&&(r0.response.data=transformData.call(e0,e0.transformResponse,r0.response),r0.response.headers=AxiosHeaders$1.from(r0.response.headers))),Promise.reject(r0)})}const VERSION$3="1.13.4",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e0,_e)=>{validators$1[e0]=function(r0){return typeof r0===e0||"a"+(_e<1?"n ":" ")+e0}});const deprecatedWarnings={};validators$1.transitional=function(_e,i0,r0){function t0(n0,s0){return"[Axios v"+VERSION$3+"] Transitional option '"+n0+"'"+s0+(r0?". "+r0:"")}return(n0,s0,o0)=>{if(_e===!1)throw new AxiosError$1(t0(s0," has been removed"+(i0?" in "+i0:"")),AxiosError$1.ERR_DEPRECATED);return i0&&!deprecatedWarnings[s0]&&(deprecatedWarnings[s0]=!0,console.warn(t0(s0," has been deprecated since v"+i0+" and will be removed in the near future"))),_e?_e(n0,s0,o0):!0}};validators$1.spelling=function(_e){return(i0,r0)=>(console.warn(`${r0} is likely a misspelling of ${_e}`),!0)};function assertOptions(e0,_e,i0){if(typeof e0!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const r0=Object.keys(e0);let t0=r0.length;for(;t0-- >0;){const n0=r0[t0],s0=_e[n0];if(s0){const o0=e0[n0],a0=o0===void 0||s0(o0,n0,e0);if(a0!==!0)throw new AxiosError$1("option "+n0+" must be "+a0,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(i0!==!0)throw new AxiosError$1("Unknown option "+n0,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(_e){this.defaults=_e||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(_e,i0){try{return await this._request(_e,i0)}catch(r0){if(r0 instanceof Error){let t0={};Error.captureStackTrace?Error.captureStackTrace(t0):t0=new Error;const n0=t0.stack?t0.stack.replace(/^.+\n/,""):"";try{r0.stack?n0&&!String(r0.stack).endsWith(n0.replace(/^.+\n.+\n/,""))&&(r0.stack+=`
46
- `+n0):r0.stack=n0}catch{}}throw r0}}_request(_e,i0){typeof _e=="string"?(i0=i0||{},i0.url=_e):i0=_e||{},i0=mergeConfig$2(this.defaults,i0);const{transitional:r0,paramsSerializer:t0,headers:n0}=i0;r0!==void 0&&validator.assertOptions(r0,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),t0!=null&&(utils$1.isFunction(t0)?i0.paramsSerializer={serialize:t0}:validator.assertOptions(t0,{encode:validators.function,serialize:validators.function},!0)),i0.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i0.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i0.allowAbsoluteUrls=!0),validator.assertOptions(i0,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),i0.method=(i0.method||this.defaults.method||"get").toLowerCase();let s0=n0&&utils$1.merge(n0.common,n0[i0.method]);n0&&utils$1.forEach(["delete","get","head","post","put","patch","common"],k0=>{delete n0[k0]}),i0.headers=AxiosHeaders$1.concat(s0,n0);const o0=[];let a0=!0;this.interceptors.request.forEach(function(d0){typeof d0.runWhen=="function"&&d0.runWhen(i0)===!1||(a0=a0&&d0.synchronous,o0.unshift(d0.fulfilled,d0.rejected))});const f0=[];this.interceptors.response.forEach(function(d0){f0.push(d0.fulfilled,d0.rejected)});let l0,u0=0,A0;if(!a0){const k0=[dispatchRequest.bind(this),void 0];for(k0.unshift(...o0),k0.push(...f0),A0=k0.length,l0=Promise.resolve(i0);u0<A0;)l0=l0.then(k0[u0++],k0[u0++]);return l0}A0=o0.length;let c0=i0;for(;u0<A0;){const k0=o0[u0++],d0=o0[u0++];try{c0=k0(c0)}catch(h0){d0.call(this,h0);break}}try{l0=dispatchRequest.call(this,c0)}catch(k0){return Promise.reject(k0)}for(u0=0,A0=f0.length;u0<A0;)l0=l0.then(f0[u0++],f0[u0++]);return l0}getUri(_e){_e=mergeConfig$2(this.defaults,_e);const i0=buildFullPath(_e.baseURL,_e.url,_e.allowAbsoluteUrls);return buildURL(i0,_e.params,_e.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function(_e){Axios$1.prototype[_e]=function(i0,r0){return this.request(mergeConfig$2(r0||{},{method:_e,url:i0,data:(r0||{}).data}))}});utils$1.forEach(["post","put","patch"],function(_e){function i0(r0){return function(n0,s0,o0){return this.request(mergeConfig$2(o0||{},{method:_e,headers:r0?{"Content-Type":"multipart/form-data"}:{},url:n0,data:s0}))}}Axios$1.prototype[_e]=i0(),Axios$1.prototype[_e+"Form"]=i0(!0)});let CancelToken$1=class Qt{constructor(_e){if(typeof _e!="function")throw new TypeError("executor must be a function.");let i0;this.promise=new Promise(function(n0){i0=n0});const r0=this;this.promise.then(t0=>{if(!r0._listeners)return;let n0=r0._listeners.length;for(;n0-- >0;)r0._listeners[n0](t0);r0._listeners=null}),this.promise.then=t0=>{let n0;const s0=new Promise(o0=>{r0.subscribe(o0),n0=o0}).then(t0);return s0.cancel=function(){r0.unsubscribe(n0)},s0},_e(function(n0,s0,o0){r0.reason||(r0.reason=new CanceledError$1(n0,s0,o0),i0(r0.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 i0=this._listeners.indexOf(_e);i0!==-1&&this._listeners.splice(i0,1)}toAbortSignal(){const _e=new AbortController,i0=r0=>{_e.abort(r0)};return this.subscribe(i0),_e.signal.unsubscribe=()=>this.unsubscribe(i0),_e.signal}static source(){let _e;return{token:new Qt(function(t0){_e=t0}),cancel:_e}}};function spread$1(e0){return function(i0){return e0.apply(null,i0)}}function isAxiosError$1(e0){return utils$1.isObject(e0)&&e0.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(HttpStatusCode$1).forEach(([e0,_e])=>{HttpStatusCode$1[_e]=e0});function createInstance(e0){const _e=new Axios$1(e0),i0=bind(Axios$1.prototype.request,_e);return utils$1.extend(i0,Axios$1.prototype,_e,{allOwnKeys:!0}),utils$1.extend(i0,_e,null,{allOwnKeys:!0}),i0.create=function(t0){return createInstance(mergeConfig$2(e0,t0))},i0}const axios=createInstance(defaults$3);axios.Axios=Axios$1;axios.CanceledError=CanceledError$1;axios.CancelToken=CancelToken$1;axios.isCancel=isCancel$1;axios.VERSION=VERSION$3;axios.toFormData=toFormData$1;axios.AxiosError=AxiosError$1;axios.Cancel=axios.CanceledError;axios.all=function(_e){return Promise.all(_e)};axios.spread=spread$1;axios.isAxiosError=isAxiosError$1;axios.mergeConfig=mergeConfig$2;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=e0=>formDataToJSON(utils$1.isHTMLForm(e0)?new FormData(e0):e0);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION:VERSION$2,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig:mergeConfig$1}=axios;var LIBVERSION="2.0.9",UA_MAX_LENGTH=500,USER_AGENT="user-agent",EMPTY="",UNKNOWN="?",TYPEOF={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},BROWSER="browser",CPU="cpu",DEVICE="device",ENGINE="engine",OS="os",RESULT="result",NAME="name",TYPE="type",VENDOR="vendor",VERSION$1="version",ARCHITECTURE="architecture",MAJOR="major",MODEL="model",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",XR="xr",EMBEDDED="embedded",FETCHER="fetcher",INAPP="inapp",BRANDS="brands",FORMFACTORS="formFactors",FULLVERLIST="fullVersionList",PLATFORM="platform",PLATFORMVER="platformVersion",BITNESS="bitness",CH="sec-ch-ua",CH_FULL_VER_LIST=CH+"-full-version-list",CH_ARCH=CH+"-arch",CH_BITNESS=CH+"-"+BITNESS,CH_FORM_FACTORS=CH+"-form-factors",CH_MOBILE=CH+"-"+MOBILE,CH_MODEL=CH+"-"+MODEL,CH_PLATFORM=CH+"-"+PLATFORM,CH_PLATFORM_VER=CH_PLATFORM+"-version",CH_ALL_VALUES=[BRANDS,FULLVERLIST,MOBILE,MODEL,PLATFORM,PLATFORMVER,ARCHITECTURE,FORMFACTORS,BITNESS],AMAZON="Amazon",APPLE="Apple",ASUS="ASUS",BLACKBERRY="BlackBerry",GOOGLE="Google",HUAWEI="Huawei",LENOVO="Lenovo",HONOR="Honor",LG="LG",MICROSOFT="Microsoft",MOTOROLA="Motorola",NVIDIA="Nvidia",ONEPLUS="OnePlus",OPPO="OPPO",SAMSUNG="Samsung",SHARP="Sharp",SONY="Sony",XIAOMI="Xiaomi",ZEBRA="Zebra",CHROME="Chrome",CHROMIUM="Chromium",CHROMECAST="Chromecast",EDGE="Edge",FIREFOX="Firefox",OPERA="Opera",FACEBOOK="Facebook",SOGOU="Sogou",PREFIX_MOBILE="Mobile ",SUFFIX_BROWSER=" Browser",WINDOWS="Windows",isWindow$1=typeof window!==TYPEOF.UNDEFINED,NAVIGATOR=isWindow$1&&window.navigator?window.navigator:void 0,NAVIGATOR_UADATA=NAVIGATOR&&NAVIGATOR.userAgentData?NAVIGATOR.userAgentData:void 0,extend$3=function(e0,_e){var i0={},r0=_e;if(!isExtensions(_e)){r0={};for(var t0 in _e)for(var n0 in _e[t0])r0[n0]=_e[t0][n0].concat(r0[n0]?r0[n0]:[])}for(var s0 in e0)i0[s0]=r0[s0]&&r0[s0].length%2===0?r0[s0].concat(e0[s0]):e0[s0];return i0},enumerize=function(e0){for(var _e={},i0=0;i0<e0.length;i0++)_e[e0[i0].toUpperCase()]=e0[i0];return _e},has=function(e0,_e){if(typeof e0===TYPEOF.OBJECT&&e0.length>0){for(var i0 in e0)if(lowerize(_e)==lowerize(e0[i0]))return!0;return!1}return isString$1(e0)?lowerize(_e)==lowerize(e0):!1},isExtensions=function(e0,_e){for(var i0 in e0)return/^(browser|cpu|device|engine|os)$/.test(i0)||(_e?isExtensions(e0[i0]):!1)},isString$1=function(e0){return typeof e0===TYPEOF.STRING},itemListToArray=function(e0){if(e0){for(var _e=[],i0=strip(/\\?\"/g,e0).split(","),r0=0;r0<i0.length;r0++)if(i0[r0].indexOf(";")>-1){var t0=trim$2(i0[r0]).split(";v=");_e[r0]={brand:t0[0],version:t0[1]}}else _e[r0]=trim$2(i0[r0]);return _e}},lowerize=function(e0){return isString$1(e0)?e0.toLowerCase():e0},majorize=function(e0){return isString$1(e0)?strip(/[^\d\.]/g,e0).split(".")[0]:void 0},setProps=function(e0){for(var _e in e0)if(e0.hasOwnProperty(_e)){var i0=e0[_e];typeof i0==TYPEOF.OBJECT&&i0.length==2?this[i0[0]]=i0[1]:this[i0]=void 0}return this},strip=function(e0,_e){return isString$1(_e)?_e.replace(e0,EMPTY):_e},stripQuotes=function(e0){return strip(/\\?\"/g,e0)},trim$2=function(e0,_e){return e0=strip(/^\s\s*/,String(e0)),typeof _e===TYPEOF.UNDEFINED?e0:e0.substring(0,_e)},rgxMapper=function(e0,_e){if(!(!e0||!_e))for(var i0=0,r0,t0,n0,s0,o0,a0;i0<_e.length&&!o0;){var f0=_e[i0],l0=_e[i0+1];for(r0=t0=0;r0<f0.length&&!o0&&f0[r0];)if(o0=f0[r0++].exec(e0),o0)for(n0=0;n0<l0.length;n0++)a0=o0[++t0],s0=l0[n0],typeof s0===TYPEOF.OBJECT&&s0.length>0?s0.length===2?typeof s0[1]==TYPEOF.FUNCTION?this[s0[0]]=s0[1].call(this,a0):this[s0[0]]=s0[1]:s0.length>=3&&(typeof s0[1]===TYPEOF.FUNCTION&&!(s0[1].exec&&s0[1].test)?s0.length>3?this[s0[0]]=a0?s0[1].apply(this,s0.slice(2)):void 0:this[s0[0]]=a0?s0[1].call(this,a0,s0[2]):void 0:s0.length==3?this[s0[0]]=a0?a0.replace(s0[1],s0[2]):void 0:s0.length==4?this[s0[0]]=a0?s0[3].call(this,a0.replace(s0[1],s0[2])):void 0:s0.length>4&&(this[s0[0]]=a0?s0[3].apply(this,[a0.replace(s0[1],s0[2])].concat(s0.slice(4))):void 0)):this[s0]=a0||void 0;i0+=2}},strMapper=function(e0,_e){for(var i0 in _e)if(typeof _e[i0]===TYPEOF.OBJECT&&_e[i0].length>0){for(var r0=0;r0<_e[i0].length;r0++)if(has(_e[i0][r0],e0))return i0===UNKNOWN?void 0:i0}else if(has(_e[i0],e0))return i0===UNKNOWN?void 0:i0;return _e.hasOwnProperty("*")?_e["*"]:e0},windowsVersionMap={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},formFactorsMap={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},browserHintsMap={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},defaultRegexes={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[VERSION$1,[NAME,PREFIX_MOBILE+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[VERSION$1,[NAME,EDGE+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[VERSION$1,[NAME,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[NAME,VERSION$1],[/opios[\/ ]+([\w\.]+)/i],[VERSION$1,[NAME,OPERA+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[VERSION$1,[NAME,OPERA+" GX"]],[/\bopr\/([\w\.]+)/i],[VERSION$1,[NAME,OPERA]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[VERSION$1,[NAME,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[VERSION$1,[NAME,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[NAME,VERSION$1],[/quark(?:pc)?\/([-\w\.]+)/i],[VERSION$1,[NAME,"Quark"]],[/\bddg\/([\w\.]+)/i],[VERSION$1,[NAME,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[VERSION$1,[NAME,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[VERSION$1,[NAME,"WeChat"]],[/konqueror\/([\w\.]+)/i],[VERSION$1,[NAME,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[VERSION$1,[NAME,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[VERSION$1,[NAME,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[VERSION$1,[NAME,"Smart "+LENOVO+SUFFIX_BROWSER]],[/(av(?:ast|g|ira))\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 Secure"+SUFFIX_BROWSER],VERSION$1],[/norton\/([\w\.]+)/i],[VERSION$1,[NAME,"Norton Private"+SUFFIX_BROWSER]],[/\bfocus\/([\w\.]+)/i],[VERSION$1,[NAME,FIREFOX+" Focus"]],[/ mms\/([\w\.]+)$/i],[VERSION$1,[NAME,OPERA+" Neon"]],[/ opt\/([\w\.]+)$/i],[VERSION$1,[NAME,OPERA+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[VERSION$1,[NAME,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[VERSION$1,[NAME,"Dolphin"]],[/coast\/([\w\.]+)/i],[VERSION$1,[NAME,OPERA+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[VERSION$1,[NAME,"MIUI"+SUFFIX_BROWSER]],[/fxios\/([\w\.-]+)/i],[VERSION$1,[NAME,PREFIX_MOBILE+FIREFOX]],[/\bqihoobrowser\/?([\w\.]*)/i],[VERSION$1,[NAME,"360"]],[/\b(qq)\/([\w\.]+)/i],[[NAME,/(.+)/,"$1Browser"],VERSION$1],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[NAME,/(.+)/,"$1"+SUFFIX_BROWSER],VERSION$1],[/samsungbrowser\/([\w\.]+)/i],[VERSION$1,[NAME,SAMSUNG+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[VERSION$1,[NAME,SOGOU+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[NAME,SOGOU+" Mobile"],VERSION$1],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[NAME,VERSION$1],[/(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i],[NAME],[/ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i],[VERSION$1,NAME],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[NAME,FACEBOOK],VERSION$1,[TYPE,INAPP]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[NAME,VERSION$1,[TYPE,INAPP]],[/\bgsa\/([\w\.]+) .*safari\//i],[VERSION$1,[NAME,"GSA"],[TYPE,INAPP]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[VERSION$1,[NAME,"TikTok"],[TYPE,INAPP]],[/\[(linkedin)app\]/i],[NAME,[TYPE,INAPP]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[NAME,/(.+)/,"Zalo"],VERSION$1,[TYPE,INAPP]],[/(chromium)[\/ ]([-\w\.]+)/i],[NAME,VERSION$1],[/ome-(lighthouse)$/i],[NAME,[TYPE,FETCHER]],[/headlesschrome(?:\/([\w\.]+)| )/i],[VERSION$1,[NAME,CHROME+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[VERSION$1,[NAME,EDGE+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[NAME,CHROME+" WebView"],VERSION$1],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[VERSION$1,[NAME,"Android"+SUFFIX_BROWSER]],[/chrome\/([\w\.]+) mobile/i],[VERSION$1,[NAME,PREFIX_MOBILE+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[NAME,VERSION$1],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[VERSION$1,[NAME,PREFIX_MOBILE+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[NAME,PREFIX_MOBILE+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[VERSION$1,NAME],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[NAME,[VERSION$1,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[NAME,VERSION$1],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[NAME,PREFIX_MOBILE+FIREFOX],VERSION$1],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[NAME,"Netscape"],VERSION$1],[/(wolvic|librewolf)\/([\w\.]+)/i],[NAME,VERSION$1],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[VERSION$1,[NAME,FIREFOX+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[NAME,[VERSION$1,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[NAME,[VERSION$1,/[^\d\.]+./,EMPTY]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[ARCHITECTURE,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[ARCHITECTURE,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[ARCHITECTURE,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[ARCHITECTURE,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[ARCHITECTURE,"arm"]],[/ sun4\w[;\)]/i],[[ARCHITECTURE,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[ARCHITECTURE,/ower/,EMPTY,lowerize]],[/mc680.0/i],[[ARCHITECTURE,"68k"]],[/winnt.+\[axp/i],[[ARCHITECTURE,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,TABLET]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,MOBILE]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[MODEL,[VENDOR,APPLE],[TYPE,MOBILE]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[MODEL,[VENDOR,APPLE],[TYPE,TABLET]],[/(macintosh);/i],[MODEL,[VENDOR,APPLE]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[MODEL,[VENDOR,SHARP],[TYPE,MOBILE]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[MODEL,[VENDOR,HONOR],[TYPE,TABLET]],[/honor([-\w ]+)[;\)]/i],[MODEL,[VENDOR,HONOR],[TYPE,MOBILE]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,TABLET]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,MOBILE]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[MODEL,/_/g," "],[VENDOR,XIAOMI],[TYPE,TABLET]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[MODEL,/_/g," "],[VENDOR,XIAOMI],[TYPE,MOBILE]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[MODEL,[VENDOR,ONEPLUS],[TYPE,MOBILE]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[MODEL,[VENDOR,OPPO],[TYPE,MOBILE]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[MODEL,[VENDOR,strMapper,{OnePlus:["203","304","403","404","413","415"],"*":OPPO}],[TYPE,TABLET]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[MODEL,[VENDOR,"BLU"],[TYPE,MOBILE]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[MODEL,[VENDOR,"Vivo"],[TYPE,MOBILE]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[MODEL,[VENDOR,"Realme"],[TYPE,MOBILE]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[MODEL,[VENDOR,LENOVO],[TYPE,TABLET]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[MODEL,[VENDOR,LENOVO],[TYPE,MOBILE]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[MODEL,[VENDOR,MOTOROLA],[TYPE,MOBILE]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[MODEL,[VENDOR,MOTOROLA],[TYPE,TABLET]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[MODEL,[VENDOR,LG],[TYPE,TABLET]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[MODEL,[VENDOR,LG],[TYPE,MOBILE]],[/(nokia) (t[12][01])/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[MODEL,/_/g," "],[TYPE,MOBILE],[VENDOR,"Nokia"]],[/(pixel (c|tablet))\b/i],[MODEL,[VENDOR,GOOGLE],[TYPE,TABLET]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[MODEL,[VENDOR,GOOGLE],[TYPE,MOBILE]],[/(google) (pixelbook( go)?)/i],[VENDOR,MODEL],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[MODEL,[VENDOR,SONY],[TYPE,MOBILE]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[MODEL,"Xperia Tablet"],[VENDOR,SONY],[TYPE,TABLET]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[MODEL,[VENDOR,AMAZON],[TYPE,TABLET]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[MODEL,/(.+)/g,"Fire Phone $1"],[VENDOR,AMAZON],[TYPE,MOBILE]],[/(playbook);[-\w\),; ]+(rim)/i],[MODEL,VENDOR,[TYPE,TABLET]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[MODEL,[VENDOR,BLACKBERRY],[TYPE,MOBILE]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[MODEL,[VENDOR,ASUS],[TYPE,TABLET]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[MODEL,[VENDOR,ASUS],[TYPE,MOBILE]],[/(nexus 9)/i],[MODEL,[VENDOR,"HTC"],[TYPE,TABLET]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[VENDOR,[MODEL,/_/g," "],[TYPE,MOBILE]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[MODEL,[VENDOR,"TCL"],[TYPE,TABLET]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[MODEL,[VENDOR,"TCL"],[TYPE,MOBILE]],[/(itel) ((\w+))/i],[[VENDOR,lowerize],MODEL,[TYPE,strMapper,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[MODEL,[VENDOR,"Acer"],[TYPE,TABLET]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[MODEL,[VENDOR,"Meizu"],[TYPE,MOBILE]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[MODEL,[VENDOR,"Ulefone"],[TYPE,MOBILE]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[MODEL,[VENDOR,"Energizer"],[TYPE,MOBILE]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[MODEL,[VENDOR,"Cat"],[TYPE,MOBILE]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[MODEL,[VENDOR,"Smartfren"],[TYPE,MOBILE]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[MODEL,[VENDOR,"Nothing"],[TYPE,MOBILE]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[MODEL,[VENDOR,"Archos"],[TYPE,TABLET]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[MODEL,[VENDOR,"Archos"],[TYPE,MOBILE]],[/; (n159v)/i],[MODEL,[VENDOR,"HMD"],[TYPE,MOBILE]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(surface duo)/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,TABLET]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[MODEL,[VENDOR,"Fairphone"],[TYPE,MOBILE]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[MODEL,[VENDOR,NVIDIA],[TYPE,TABLET]],[/(sprint) (\w+)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kin\.[onetw]{3})/i],[[MODEL,/\./g," "],[VENDOR,MICROSOFT],[TYPE,MOBILE]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,TABLET]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,MOBILE]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[VENDOR,[TYPE,SMARTTV]],[/hbbtv.+maple;(\d+)/i],[[MODEL,/^/,"SmartTV"],[VENDOR,SAMSUNG],[TYPE,SMARTTV]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[VENDOR,MODEL,[TYPE,SMARTTV]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[VENDOR,LG],[TYPE,SMARTTV]],[/(apple) ?tv/i],[VENDOR,[MODEL,APPLE+" TV"],[TYPE,SMARTTV]],[/crkey.*devicetype\/chromecast/i],[[MODEL,CHROMECAST+" Third Generation"],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/crkey.*devicetype\/([^/]*)/i],[[MODEL,/^/,"Chromecast "],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/fuchsia.*crkey/i],[[MODEL,CHROMECAST+" Nest Hub"],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/crkey/i],[[MODEL,CHROMECAST],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/(portaltv)/i],[MODEL,[VENDOR,FACEBOOK],[TYPE,SMARTTV]],[/droid.+aft(\w+)( bui|\))/i],[MODEL,[VENDOR,AMAZON],[TYPE,SMARTTV]],[/(shield \w+ tv)/i],[MODEL,[VENDOR,NVIDIA],[TYPE,SMARTTV]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[MODEL,[VENDOR,SHARP],[TYPE,SMARTTV]],[/(bravia[\w ]+)( bui|\))/i],[MODEL,[VENDOR,SONY],[TYPE,SMARTTV]],[/(mi(tv|box)-?\w+) bui/i],[MODEL,[VENDOR,XIAOMI],[TYPE,SMARTTV]],[/Hbbtv.*(technisat) (.*);/i],[VENDOR,MODEL,[TYPE,SMARTTV]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[VENDOR,/.+\/(\w+)/,"$1",strMapper,{LG:"lge"}],[MODEL,trim$2],[TYPE,SMARTTV]],[/(playstation \w+)/i],[MODEL,[VENDOR,SONY],[TYPE,CONSOLE]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,CONSOLE]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[VENDOR,strMapper,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],MODEL,[TYPE,CONSOLE]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,WEARABLE]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[VENDOR,MODEL,[TYPE,WEARABLE]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[MODEL,[VENDOR,OPPO],[TYPE,WEARABLE]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[MODEL,[VENDOR,APPLE],[TYPE,WEARABLE]],[/(opwwe\d{3})/i],[MODEL,[VENDOR,ONEPLUS],[TYPE,WEARABLE]],[/(moto 360)/i],[MODEL,[VENDOR,MOTOROLA],[TYPE,WEARABLE]],[/(smartwatch 3)/i],[MODEL,[VENDOR,SONY],[TYPE,WEARABLE]],[/(g watch r)/i],[MODEL,[VENDOR,LG],[TYPE,WEARABLE]],[/droid.+; (wt63?0{2,3})\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,WEARABLE]],[/droid.+; (glass) \d/i],[MODEL,[VENDOR,GOOGLE],[TYPE,XR]],[/(pico) ([\w ]+) os\d/i],[VENDOR,MODEL,[TYPE,XR]],[/(quest( \d| pro)?s?).+vr/i],[MODEL,[VENDOR,FACEBOOK],[TYPE,XR]],[/mobile vr; rv.+firefox/i],[[TYPE,XR]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[VENDOR,[TYPE,EMBEDDED]],[/(aeobc)\b/i],[MODEL,[VENDOR,AMAZON],[TYPE,EMBEDDED]],[/(homepod).+mac os/i],[MODEL,[VENDOR,APPLE],[TYPE,EMBEDDED]],[/windows iot/i],[[TYPE,EMBEDDED]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[MODEL,[TYPE,SMARTTV]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[TYPE,SMARTTV]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[MODEL,[TYPE,strMapper,{mobile:"Mobile",xr:"VR","*":TABLET}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[TYPE,TABLET]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[TYPE,MOBILE]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[MODEL,[VENDOR,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[VERSION$1,[NAME,EDGE+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[NAME,VERSION$1],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[VERSION$1,[NAME,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[NAME,VERSION$1],[/ladybird\//i],[[NAME,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[VERSION$1,NAME]],os:[[/(windows nt) (6\.[23]); arm/i],[[NAME,/N/,"R"],[VERSION$1,strMapper,windowsVersionMap]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[NAME,VERSION$1],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[VERSION$1,/(;|\))/g,"",strMapper,windowsVersionMap],[NAME,WINDOWS]],[/(windows ce)\/?([\d\.]*)/i],[NAME,VERSION$1],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[VERSION$1,/_/g,"."],[NAME,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[NAME,"macOS"],[VERSION$1,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[VERSION$1,[NAME,CHROMECAST+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[VERSION$1,[NAME,CHROMECAST+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[VERSION$1,[NAME,CHROMECAST+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[VERSION$1,[NAME,CHROMECAST+" Linux"]],[/crkey\/([\d\.]+)/i],[VERSION$1,[NAME,CHROMECAST]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[VERSION$1,NAME],[/(ubuntu) ([\w\.]+) like android/i],[[NAME,/(.+)/,"$1 Touch"],VERSION$1],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[NAME,VERSION$1],[/\(bb(10);/i],[VERSION$1,[NAME,BLACKBERRY]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[VERSION$1,[NAME,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[VERSION$1,[NAME,FIREFOX+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[VERSION$1,[NAME,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[VERSION$1,strMapper,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[NAME,"webOS"]],[/watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i],[VERSION$1,[NAME,"watchOS"]],[/cros [\w]+(?:\)| ([\w\.]+)\b)/i],[VERSION$1,[NAME,"Chrome OS"]],[/kepler ([\w\.]+); (aft|aeo)/i],[VERSION$1,[NAME,"Vega OS"]],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[NAME,VERSION$1],[/(sunos) ?([\d\.]*)/i],[[NAME,"Solaris"],VERSION$1],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[NAME,VERSION$1]]},defaultProps=function(){var e0={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return setProps.call(e0.init,[[BROWSER,[NAME,VERSION$1,MAJOR,TYPE]],[CPU,[ARCHITECTURE]],[DEVICE,[TYPE,MODEL,VENDOR]],[ENGINE,[NAME,VERSION$1]],[OS,[NAME,VERSION$1]]]),setProps.call(e0.isIgnore,[[BROWSER,[VERSION$1,MAJOR]],[ENGINE,[VERSION$1]],[OS,[VERSION$1]]]),setProps.call(e0.isIgnoreRgx,[[BROWSER,/ ?browser$/i],[OS,/ ?os$/i]]),setProps.call(e0.toString,[[BROWSER,[NAME,VERSION$1]],[CPU,[ARCHITECTURE]],[DEVICE,[VENDOR,MODEL]],[ENGINE,[NAME,VERSION$1]],[OS,[NAME,VERSION$1]]]),e0}(),createIData=function(e0,_e){var i0=defaultProps.init[_e],r0=defaultProps.isIgnore[_e]||0,t0=defaultProps.isIgnoreRgx[_e]||0,n0=defaultProps.toString[_e]||0;function s0(){setProps.call(this,i0)}return s0.prototype.getItem=function(){return e0},s0.prototype.withClientHints=function(){return NAVIGATOR_UADATA?NAVIGATOR_UADATA.getHighEntropyValues(CH_ALL_VALUES).then(function(o0){return e0.setCH(new UACHData(o0,!1)).parseCH().get()}):e0.parseCH().get()},s0.prototype.withFeatureCheck=function(){return e0.detectFeature().get()},_e!=RESULT&&(s0.prototype.is=function(o0){var a0=!1;for(var f0 in this)if(this.hasOwnProperty(f0)&&!has(r0,f0)&&lowerize(t0?strip(t0,this[f0]):this[f0])==lowerize(t0?strip(t0,o0):o0)){if(a0=!0,o0!=TYPEOF.UNDEFINED)break}else if(o0==TYPEOF.UNDEFINED&&a0){a0=!a0;break}return a0},s0.prototype.toString=function(){var o0=EMPTY;for(var a0 in n0)typeof this[n0[a0]]!==TYPEOF.UNDEFINED&&(o0+=(o0?" ":EMPTY)+this[n0[a0]]);return o0||TYPEOF.UNDEFINED}),s0.prototype.then=function(o0){var a0=this,f0=function(){for(var u0 in a0)a0.hasOwnProperty(u0)&&(this[u0]=a0[u0])};f0.prototype={is:s0.prototype.is,toString:s0.prototype.toString,withClientHints:s0.prototype.withClientHints,withFeatureCheck:s0.prototype.withFeatureCheck};var l0=new f0;return o0(l0),l0},new s0};function UACHData(e0,_e){if(e0=e0||{},setProps.call(this,CH_ALL_VALUES),_e)setProps.call(this,[[BRANDS,itemListToArray(e0[CH])],[FULLVERLIST,itemListToArray(e0[CH_FULL_VER_LIST])],[MOBILE,/\?1/.test(e0[CH_MOBILE])],[MODEL,stripQuotes(e0[CH_MODEL])],[PLATFORM,stripQuotes(e0[CH_PLATFORM])],[PLATFORMVER,stripQuotes(e0[CH_PLATFORM_VER])],[ARCHITECTURE,stripQuotes(e0[CH_ARCH])],[FORMFACTORS,itemListToArray(e0[CH_FORM_FACTORS])],[BITNESS,stripQuotes(e0[CH_BITNESS])]]);else for(var i0 in e0)this.hasOwnProperty(i0)&&typeof e0[i0]!==TYPEOF.UNDEFINED&&(this[i0]=e0[i0])}function UAItem(e0,_e,i0,r0){return setProps.call(this,[["itemType",e0],["ua",_e],["uaCH",r0],["rgxMap",i0],["data",createIData(this,e0)]]),this}UAItem.prototype.get=function(e0){return e0?this.data.hasOwnProperty(e0)?this.data[e0]:void 0:this.data};UAItem.prototype.set=function(e0,_e){return this.data[e0]=_e,this};UAItem.prototype.setCH=function(e0){return this.uaCH=e0,this};UAItem.prototype.detectFeature=function(){if(NAVIGATOR&&NAVIGATOR.userAgent==this.ua)switch(this.itemType){case BROWSER:NAVIGATOR.brave&&typeof NAVIGATOR.brave.isBrave==TYPEOF.FUNCTION&&this.set(NAME,"Brave");break;case DEVICE:!this.get(TYPE)&&NAVIGATOR_UADATA&&NAVIGATOR_UADATA[MOBILE]&&this.set(TYPE,MOBILE),this.get(MODEL)=="Macintosh"&&NAVIGATOR&&typeof NAVIGATOR.standalone!==TYPEOF.UNDEFINED&&NAVIGATOR.maxTouchPoints&&NAVIGATOR.maxTouchPoints>2&&this.set(MODEL,"iPad").set(TYPE,TABLET);break;case OS:!this.get(NAME)&&NAVIGATOR_UADATA&&NAVIGATOR_UADATA[PLATFORM]&&this.set(NAME,NAVIGATOR_UADATA[PLATFORM]);break;case RESULT:var e0=this.data,_e=function(i0){return e0[i0].getItem().detectFeature().get()};this.set(BROWSER,_e(BROWSER)).set(CPU,_e(CPU)).set(DEVICE,_e(DEVICE)).set(ENGINE,_e(ENGINE)).set(OS,_e(OS))}return this};UAItem.prototype.parseUA=function(){switch(this.itemType!=RESULT&&rgxMapper.call(this.data,this.ua,this.rgxMap),this.itemType){case BROWSER:this.set(MAJOR,majorize(this.get(VERSION$1)));break;case OS:if(this.get(NAME)=="iOS"&&this.get(VERSION$1)=="18.6"){var e0=/\) Version\/([\d\.]+)/.exec(this.ua);e0&&parseInt(e0[1].substring(0,2),10)>=26&&this.set(VERSION$1,e0[1])}break}return this};UAItem.prototype.parseCH=function(){var e0=this.uaCH,_e=this.rgxMap;switch(this.itemType){case BROWSER:case ENGINE:var i0=e0[FULLVERLIST]||e0[BRANDS],r0;if(i0)for(var t0=0;t0<i0.length;t0++){var n0=i0[t0].brand||i0[t0],s0=i0[t0].version;this.itemType==BROWSER&&!/not.a.brand/i.test(n0)&&(!r0||/Chrom/.test(r0)&&n0!=CHROMIUM||r0==EDGE&&/WebView2/.test(n0))&&(n0=strMapper(n0,browserHintsMap),r0=this.get(NAME),r0&&!/Chrom/.test(r0)&&/Chrom/.test(n0)||this.set(NAME,n0).set(VERSION$1,s0).set(MAJOR,majorize(s0)),r0=n0),this.itemType==ENGINE&&n0==CHROMIUM&&this.set(VERSION$1,s0)}break;case CPU:var o0=e0[ARCHITECTURE];o0&&(o0&&e0[BITNESS]=="64"&&(o0+="64"),rgxMapper.call(this.data,o0+";",_e));break;case DEVICE:if(e0[MOBILE]&&this.set(TYPE,MOBILE),e0[MODEL]&&(this.set(MODEL,e0[MODEL]),!this.get(TYPE)||!this.get(VENDOR))){var a0={};rgxMapper.call(a0,"droid 9; "+e0[MODEL]+")",_e),!this.get(TYPE)&&a0.type&&this.set(TYPE,a0.type),!this.get(VENDOR)&&a0.vendor&&this.set(VENDOR,a0.vendor)}if(e0[FORMFACTORS]){var f0;if(typeof e0[FORMFACTORS]!="string")for(var l0=0;!f0&&l0<e0[FORMFACTORS].length;)f0=strMapper(e0[FORMFACTORS][l0++],formFactorsMap);else f0=strMapper(e0[FORMFACTORS],formFactorsMap);this.set(TYPE,f0)}break;case OS:var u0=e0[PLATFORM];if(u0){var A0=e0[PLATFORMVER];u0==WINDOWS&&(A0=parseInt(majorize(A0),10)>=13?"11":"10"),this.set(NAME,u0).set(VERSION$1,A0)}this.get(NAME)==WINDOWS&&e0[MODEL]=="Xbox"&&this.set(NAME,"Xbox").set(VERSION$1,void 0);break;case RESULT:var c0=this.data,k0=function(d0){return c0[d0].getItem().setCH(e0).parseCH().get()};this.set(BROWSER,k0(BROWSER)).set(CPU,k0(CPU)).set(DEVICE,k0(DEVICE)).set(ENGINE,k0(ENGINE)).set(OS,k0(OS))}return this};function UAParser(e0,_e,i0){if(typeof e0===TYPEOF.OBJECT?(isExtensions(e0,!0)?(typeof _e===TYPEOF.OBJECT&&(i0=_e),_e=e0):(i0=e0,_e=void 0),e0=void 0):typeof e0===TYPEOF.STRING&&!isExtensions(_e,!0)&&(i0=_e,_e=void 0),i0)if(typeof i0.append===TYPEOF.FUNCTION){var r0={};i0.forEach(function(l0,u0){r0[String(u0).toLowerCase()]=l0}),i0=r0}else{var t0={};for(var n0 in i0)i0.hasOwnProperty(n0)&&(t0[String(n0).toLowerCase()]=i0[n0]);i0=t0}if(!(this instanceof UAParser))return new UAParser(e0,_e,i0).getResult();var s0=typeof e0===TYPEOF.STRING?e0:i0&&i0[USER_AGENT]?i0[USER_AGENT]:NAVIGATOR&&NAVIGATOR.userAgent?NAVIGATOR.userAgent:EMPTY,o0=new UACHData(i0,!0),a0=_e?extend$3(defaultRegexes,_e):defaultRegexes,f0=function(l0){return l0==RESULT?function(){return new UAItem(l0,s0,a0,o0).set("ua",s0).set(BROWSER,this.getBrowser()).set(CPU,this.getCPU()).set(DEVICE,this.getDevice()).set(ENGINE,this.getEngine()).set(OS,this.getOS()).get()}:function(){return new UAItem(l0,s0,a0[l0],o0).parseUA().get()}};return setProps.call(this,[["getBrowser",f0(BROWSER)],["getCPU",f0(CPU)],["getDevice",f0(DEVICE)],["getEngine",f0(ENGINE)],["getOS",f0(OS)],["getResult",f0(RESULT)],["getUA",function(){return s0}],["setUA",function(l0){return isString$1(l0)&&(s0=trim$2(l0,UA_MAX_LENGTH)),this}]]).setUA(s0),this}UAParser.VERSION=LIBVERSION;UAParser.BROWSER=enumerize([NAME,VERSION$1,MAJOR,TYPE]);UAParser.CPU=enumerize([ARCHITECTURE]);UAParser.DEVICE=enumerize([MODEL,VENDOR,TYPE,CONSOLE,MOBILE,SMARTTV,TABLET,WEARABLE,EMBEDDED]);UAParser.ENGINE=UAParser.OS=enumerize([NAME,VERSION$1]);function e$b(e0){let _e=new Date().getTime();return`${e0}${e0.includes("?")?"&":"?"}timestamp=${_e}`}var e$a=(e0,_e)=>{if(e0==0)return"0 octets";let i0=1e3,r0=_e,t0=["octets","Ko","Mo","Go"],n0=Math.floor(Math.log(e0)/Math.log(i0));return parseFloat((e0/i0**n0).toFixed(r0))+" "+t0[n0]},e$9=class{static isLocalURL(_e){return _e.length>0&&_e.charAt(0)==="/"}static startWithHttp(_e){return/^https?:\/\//gi.test(_e)}static toCounter(_e){return _e>999?`${Number(_e/1e3).toFixed(1)} k`:""+_e}static generateVirtualId(){return"xxxx-xxxx-xxx-xxxx".replace(/[x]/g,()=>Math.floor(Math.random()*16).toString(16))}},t$6=(e0,_e)=>{let i0="virtualID";if(!Object.hasOwnProperty.apply(e0,[i0])){let r0=_e??`${e$9.generateVirtualId()}#${e0.size}`;Object.defineProperty(e0,i0,{value:r0,writable:!1})}return e0[i0]},e$8=class{static changeDimension(_e,i0,r0,t0){return r0>t0&&(_e=Math.round(_e*t0/r0),r0=t0),_e>i0&&(r0=Math.round(r0*i0/_e),_e=i0),{height:_e,width:r0}}static renameFileNameExtension(_e,i0){let r0=_e.split(".");return r0.pop(),r0.join(".")+"."+i0}static resizeImage(_e,i0,r0,t0,n0="jpeg",s0=80){let o0=s0/100,a0=document.createElement("canvas"),f0=`image/${n0}`,l0=_e.width,u0=_e.height,A0=this.changeDimension(u0,t0,l0,r0);l0=A0.width,u0=A0.height;let c0=a0.getContext("2d");return c0&&(a0.width=l0,a0.height=u0,c0.fillStyle="white",c0.fillRect(0,0,a0.width,a0.height),c0.imageSmoothingEnabled&&c0.imageSmoothingQuality&&(c0.imageSmoothingQuality="high"),c0.drawImage(_e,0,0,l0,u0)),new Promise((k0,d0)=>{a0.toBlob(h0=>{h0?k0(new File([h0],i0,{type:f0,lastModified:new Date().getTime()})):d0()},f0,o0)})}static async resizeImageFile(_e,i0=1440,r0=1440,t0=80){if(!_e)throw Error("Image resizer: file not found!");if(!_e.type||!_e.type.startsWith("image/"))throw Error("Image resizer: the file given is not an image.");let n0="jpeg";return new Promise(s0=>{let o0=new Image;o0.setAttribute("style","max-width: none;"),o0.src=URL.createObjectURL(_e),o0.onload=async()=>{s0(await this.resizeImage(o0,this.renameFileNameExtension(_e.name,n0),i0,r0,n0,t0))},o0.onerror=a0=>{throw Error("Image Loading Error: "+a0)}})}},e$7={blog:"Blog",mindmap:"MindMap",scrapbook:"ScrapBook",collaborativewall:"CollaborativeWall",timelinegenerator:"TimelineGenerator",wiki:"Wiki",exercizer:"Exercizer"},Er,e$6=(Er=class{constructor(){Z0(this,"wordExtensions",new Set);Z0(this,"excelExtensions",new Set);Z0(this,"pptExtensions",new Set);Z0(this,"fileExtensionMap",new Map);Z0(this,"csvContentType",new Set);Z0(this,"csvExtensions",new Set);Z0(this,"txtExtensions",new Set);Z0(this,"mdExtensions",new Set);Z0(this,"PDF","application/pdf");Z0(this,"OCTET_STREAM","application/octet-stream");this.txtExtensions.add("txt"),this.mdExtensions.add("md"),this.wordExtensions.add("doc"),this.wordExtensions.add("dot"),this.wordExtensions.add("docx"),this.wordExtensions.add("dotx"),this.wordExtensions.add("docm"),this.wordExtensions.add("dotm"),this.wordExtensions.add("odt"),this.wordExtensions.add("ott"),this.wordExtensions.add("oth"),this.wordExtensions.add("odm"),this.excelExtensions.add("xls"),this.excelExtensions.add("xlt"),this.excelExtensions.add("xla"),this.excelExtensions.add("xlsx"),this.excelExtensions.add("xltx"),this.excelExtensions.add("xlsm"),this.excelExtensions.add("xltm"),this.excelExtensions.add("xlam"),this.excelExtensions.add("xlsb"),this.excelExtensions.add("ods"),this.excelExtensions.add("ots"),this.pptExtensions.add("ppt"),this.pptExtensions.add("pot"),this.pptExtensions.add("pps"),this.pptExtensions.add("ppa"),this.pptExtensions.add("pptx"),this.pptExtensions.add("potx"),this.pptExtensions.add("ppsx"),this.pptExtensions.add("ppam"),this.pptExtensions.add("pptm"),this.pptExtensions.add("potm"),this.pptExtensions.add("ppsm"),this.pptExtensions.add("odp"),this.pptExtensions.add("otp"),this.csvExtensions.add("csv"),this.fileExtensionMap.set("doc","application/msword"),this.fileExtensionMap.set("dot","application/msword"),this.fileExtensionMap.set("docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"),this.fileExtensionMap.set("dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"),this.fileExtensionMap.set("docm","application/vnd.ms-word.document.macroEnabled.12"),this.fileExtensionMap.set("dotm","application/vnd.ms-word.template.macroEnabled.12"),this.fileExtensionMap.set("xls","application/vnd.ms-excel"),this.fileExtensionMap.set("xlt","application/vnd.ms-excel"),this.fileExtensionMap.set("xla","application/vnd.ms-excel"),this.fileExtensionMap.set("xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),this.fileExtensionMap.set("xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"),this.fileExtensionMap.set("xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"),this.fileExtensionMap.set("xltm","application/vnd.ms-excel.template.macroEnabled.12"),this.fileExtensionMap.set("xlam","application/vnd.ms-excel.addin.macroEnabled.12"),this.fileExtensionMap.set("xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"),this.fileExtensionMap.set("ppt","application/vnd.ms-powerpoint"),this.fileExtensionMap.set("pot","application/vnd.ms-powerpoint"),this.fileExtensionMap.set("pps","application/vnd.ms-powerpoint"),this.fileExtensionMap.set("ppa","application/vnd.ms-powerpoint"),this.fileExtensionMap.set("pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"),this.fileExtensionMap.set("potx","application/vnd.openxmlformats-officedocument.presentationml.template"),this.fileExtensionMap.set("ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"),this.fileExtensionMap.set("ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"),this.fileExtensionMap.set("pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"),this.fileExtensionMap.set("potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"),this.fileExtensionMap.set("ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"),this.fileExtensionMap.set("odt","application/vnd.oasis.opendocument.text"),this.fileExtensionMap.set("ott","application/vnd.oasis.opendocument.text-template"),this.fileExtensionMap.set("oth","application/vnd.oasis.opendocument.text-web"),this.fileExtensionMap.set("odm","application/vnd.oasis.opendocument.text-master"),this.fileExtensionMap.set("odg","application/vnd.oasis.opendocument.graphics"),this.fileExtensionMap.set("otg","application/vnd.oasis.opendocument.graphics-template"),this.fileExtensionMap.set("odp","application/vnd.oasis.opendocument.presentation"),this.fileExtensionMap.set("otp","application/vnd.oasis.opendocument.presentation-template"),this.fileExtensionMap.set("ods","application/vnd.oasis.opendocument.spreadsheet"),this.fileExtensionMap.set("ots","application/vnd.oasis.opendocument.spreadsheet-template"),this.fileExtensionMap.set("odc","application/vnd.oasis.opendocument.chart"),this.fileExtensionMap.set("odf","application/vnd.oasis.opendocument.formula"),this.fileExtensionMap.set("odb","application/vnd.oasis.opendocument.database"),this.fileExtensionMap.set("odi","application/vnd.oasis.opendocument.image"),this.fileExtensionMap.set("oxt","application/vnd.openofficeorg.extension"),this.fileExtensionMap.set("txt","text/plain"),this.fileExtensionMap.set("md","text/markdown"),this.csvContentType.add("text/comma-separated-values"),this.csvContentType.add("text/csv"),this.csvContentType.add("application/csv")}getContentTypeForExtension(_e){return this.fileExtensionMap.has(_e)?this.fileExtensionMap.get(_e)??null:null}getExtensionForContentType(_e){for(let i0 of Array.from(this.fileExtensionMap.keys()))if((this.fileExtensionMap.get(i0)||"").toLowerCase()==(_e||"").toLowerCase())return i0;return null}isWordLike(_e,i0){let r0=this.getExtensionForContentType(_e);return r0?this.wordExtensions.has(r0):_e==this.OCTET_STREAM&&i0?this.wordExtensions.has(i0):!1}isExcelLike(_e,i0){let r0=this.getExtensionForContentType(_e);return r0?this.excelExtensions.has(r0):_e==this.OCTET_STREAM&&i0?this.excelExtensions.has(i0):!1}isCsvLike(_e,i0){return this.csvContentType.has(_e)?!0:_e==this.OCTET_STREAM&&i0?this.csvExtensions.has(i0):!1}isPowerpointLike(_e,i0){let r0=this.getExtensionForContentType(_e);return r0?this.pptExtensions.has(r0):_e==this.OCTET_STREAM&&i0?this.pptExtensions.has(i0):!1}isTxtLike(_e,i0){let r0=this.getExtensionForContentType(_e);return r0?this.txtExtensions.has(r0):_e==this.OCTET_STREAM&&i0?this.txtExtensions.has(i0):!1}isMdLike(_e,i0){let r0=this.getExtensionForContentType(_e);return r0?this.mdExtensions.has(r0):_e==this.OCTET_STREAM&&i0?this.mdExtensions.has(i0):!1}},Z0(Er,"INSTANCE",new Er),Er),e$5=e0=>{if(e0>0){let _e=Math.floor(e0/1e3),i0=Math.floor(_e/60);return _e%=60,i0%=60,t$5(i0)+":"+t$5(_e)}return"00:00"},t$5=e0=>e0.toString().padStart(2,"0"),e$4=()=>MediaRecorder.isTypeSupported?["video/webm;codecs=vp9",'video/mp4; codecs="avc1.424028, mp4a.40.2"',"video/webm;codecs=vp8,opus","video/webm"].find(e0=>MediaRecorder.isTypeSupported(e0)?!0:(console.error(`${e0} is not Supported`),!1))||"video/ogg":"video/webm;codecs=vp8,opus",ERROR_CODE={SUCCESS:"0000",UNKNOWN:"0010",NOT_INITIALIZED:"0020",NOT_SUPPORTED:"0030",APP_NOT_FOUND:"0040",AGENT_NOT_FOUND:"0050",TRANSPORT_ERROR:"0060",TIME_OUT:"0070",MALFORMED_DATA:"0080",NOT_LOGGED_IN:"0090"},APP$1={VIDEO:"video"},tr,SimpleChannel=(tr=class{constructor(_e){Z0(this,"name");Z0(this,"listeners",new Set);this.name=_e}static getChannel(_e){let i0=tr.channels.get(_e);return i0||(i0=new tr(_e),tr.channels.set(_e,i0)),i0}listen(_e){return this.listeners.add(_e),()=>{this.listeners.delete(_e)}}publish(_e){for(let i0 of Array.from(this.listeners))try{i0(_e)}catch(r0){console.error("[SimpleChannel] publish failed",r0)}}close(){this.listeners.clear(),tr.channels.delete(this.name)}},Z0(tr,"channels",new Map),tr),Subscription=class{constructor(e0,_e){Z0(this,"_channel");Z0(this,"revoke");this._channel=e0,this.revoke=this.setReceiver(i0=>_e==null?void 0:_e(i0))}setReceiver(e0){if(!this._channel)return()=>{};let _e=this._channel.listen(e0);return()=>{_e(),this._channel=void 0}}},Subject=class{constructor(){Z0(this,"publishChannels",new Map)}getChannelName(e0){return"Subject:"+e0}getPublishChannel(e0){let _e=this.getChannelName(e0),i0=this.publishChannels.get(_e);return i0||(i0=this.newChannel(e0),this.publishChannels.set(_e,i0)),i0}newChannel(e0){let _e=this.getChannelName(e0);return SimpleChannel.getChannel(_e)}publish(e0,_e){typeof e0=="string"&&this.getPublishChannel(e0).publish(_e)}subscribe(e0,_e){return typeof e0=="string"?new Subscription(this.newChannel(e0),_e):new Subscription}},ASYNC_DATA_NAME={SESSION_READY:"sessionReady",LANG_READY:"langReady",SKIN_READY:"skinReady",OVERRIDE_READY:"overrideReady",APPCONF_READY:"appConfReady"},Promisified=class{constructor(){Z0(this,"_resolution");Z0(this,"_rejection");Z0(this,"_promise",new Promise((e0,_e)=>{this._resolution=e0,this._rejection=_e}))}get promise(){return this._promise}resolve(e0){this._resolution&&this._resolution(e0)}reject(e0){this._rejection&&this._rejection(e0)}},NotifyFramework=class{constructor(){Z0(this,"promises",{});Z0(this,"subject",new Subject)}asyncData(e0){return this.promises[e0]===void 0&&(this.promises[e0]=new Promisified),this.promises[e0]}onSessionReady(){return this.asyncData(ASYNC_DATA_NAME.SESSION_READY)}onLangReady(){return this.asyncData(ASYNC_DATA_NAME.LANG_READY)}onSkinReady(){return this.asyncData(ASYNC_DATA_NAME.SKIN_READY)}onOverridesReady(){return this.asyncData(ASYNC_DATA_NAME.OVERRIDE_READY)}onAppConfReady(){return this.asyncData(ASYNC_DATA_NAME.APPCONF_READY)}promisify(){return new Promisified}events(){return this.subject}},notify=new NotifyFramework,loadedScripts$1={},Http=class{constructor(e0){Z0(this,"axios");Z0(this,"_latestResponse");this.axios=axios.create(e0)}setCdn(e0){e0&&XMLHttpRequest&&!XMLHttpRequest.prototype.cdnUrl&&(XMLHttpRequest.prototype.cdnUrl=e0,XMLHttpRequest.prototype.baseOpen=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(){let _e=arguments[1];return _e.startsWith("/infra/public")&&(arguments[1]=e0+_e),/^\/([^\/]*)\/public/.test(_e)&&(arguments[1]=e0+_e),_e.startsWith("/assets")&&(arguments[1]=e0+_e),_e=="/conf/public"&&(arguments[1]=_e),_e.startsWith("http")&&(arguments[1]=_e),this.baseOpen.apply(this,arguments)})}toAxiosConfig(e0){if(e0){let _e=Object.assign({},this.axios.defaults);return e0.headers&&(_e.headers&&(_e.headers=Object.assign({},this.axios.defaults.headers)),Object.assign(_e.headers,e0.headers)),e0.responseType&&(_e.responseType=e0.responseType),e0.queryParams&&(_e.params=Object.assign({},e0.queryParams)),_e}else return this.axios.defaults}toCdnUrl(e0){let _e=ConfigurationFrameworkFactory.instance().Platform.cdnDomain;if((_e==null?void 0:_e.length)>0&&e0!=="/conf/public"){let i0=""+e0;(i0.startsWith("/infra/public")||i0.startsWith("/assets")||/^\/([^\/]*)\/public/.test(i0))&&(e0=_e+i0)}return e0}mapAxiosError(e0,_e){return e0.response?this._latestResponse=e0.response:e0.request?this._latestResponse={status:408,statusText:ERROR_CODE.TIME_OUT}:this._latestResponse={status:500,statusText:ERROR_CODE.UNKNOWN},!_e||_e.disableNotifications,this._latestResponse}mapAxiosResponse(e0,_e){return this._latestResponse=e0,e0.data}get latestResponse(){return this._latestResponse}isResponseError(){return this.latestResponse.status<200||this.latestResponse.status>=300}get(e0,_e){return this.axios.get(this.toCdnUrl(e0),this.toAxiosConfig(_e)).then(i0=>this.mapAxiosResponse(i0,_e)).catch(i0=>this.mapAxiosError(i0,_e))}post(e0,_e,i0){return this.axios.post(e0,_e,this.toAxiosConfig(i0)).then(r0=>this.mapAxiosResponse(r0,i0)).catch(r0=>this.mapAxiosError(r0,i0))}postFile(e0,_e,i0){let r0=this.toAxiosConfig(i0);return r0.headers&&r0.headers["Content-Type"]&&delete r0.headers["Content-Type"],this.axios.post(e0,_e,r0).then(t0=>this.mapAxiosResponse(t0,i0)).catch(t0=>this.mapAxiosError(t0,i0))}postJson(e0,_e,i0){let r0=this.toAxiosConfig();return r0.headers&&(r0.headers["Content-Type"]="application/json"),this.axios.post(e0,_e,this.toAxiosConfig(i0)).then(t0=>this.mapAxiosResponse(t0,i0)).catch(t0=>this.mapAxiosError(t0,i0))}put(e0,_e,i0){return this.axios.put(e0,_e,this.toAxiosConfig(i0)).then(r0=>this.mapAxiosResponse(r0,i0)).catch(r0=>this.mapAxiosError(r0,i0))}putJson(e0,_e,i0){let r0=this.toAxiosConfig(i0);return r0.headers&&(r0.headers["Content-Type"]="application/json"),this.axios.put(e0,_e,r0).then(t0=>this.mapAxiosResponse(t0,i0)).catch(t0=>this.mapAxiosError(t0,i0))}delete(e0,_e){return this.axios.delete(e0,this.toAxiosConfig(_e)).then(i0=>this.mapAxiosResponse(i0,_e)).catch(i0=>this.mapAxiosError(i0,_e))}deleteJson(e0,_e){return this.axios.delete(e0,{data:_e}).then(i0=>this.mapAxiosResponse(i0)).catch(i0=>this.mapAxiosError(i0))}getScript(e0,_e,i0){let r0=i0??"exports",t0=this.toAxiosConfig(_e);return t0.headers&&(t0.headers.Accept="application/javascript"),this.axios.get(this.toCdnUrl(e0),t0).then(n0=>this.mapAxiosResponse(n0,_e)).then(n0=>{try{let s0=`"use strict";var ${r0.split(".")[0]}={};${n0};return ${r0};`;return Function(s0)()}catch{return n0}}).catch(n0=>{throw this.mapAxiosError(n0,_e),n0})}loadScript(e0,_e){return loadedScripts$1[e0]?Promise.resolve():this.getScript(e0,_e).then(i0=>{loadedScripts$1[e0]=!0})}},TransportFramework=class{constructor(){Z0(this,"_http",new Http)}get http(){return this._http}newHttpInstance(e0){return new Http(e0)}},transport=new TransportFramework,ConfigurationFrameworkFactory=class{static instance(){return configure}},http$2=transport.http,Session=class{constructor(){Z0(this,"_me",null);Z0(this,"_currentLanguage","");Z0(this,"_notLoggedIn",!0);Z0(this,"_description");Z0(this,"_profile")}get currentLanguage(){return this._currentLanguage}get notLoggedIn(){return this._notLoggedIn}get description(){return this._description}get avatarUrl(){let e0=this.description.photo;return(!e0||e0==="no-avatar.jpg"||e0==="no-avatar.svg")&&(e0=ConfigurationFrameworkFactory.instance().Platform.theme.basePath+"/img/illustrations/no-avatar.svg"),e0}get user(){return this._me}get currentApp(){return configure.Platform.apps.currentApp}async initialize(){return http$2.get("/auth/oauth2/userinfo").then(e0=>{if(http$2.isResponseError()||typeof e0=="string")throw ERROR_CODE.NOT_LOGGED_IN;return this.setCurrentModel(e0),this._notLoggedIn?this.loadDefaultLanguage():this.loadUserLanguage()}).then(e0=>(this.setCurrentLanguage(e0),this.loadDescription())).then(()=>this.getUserProfile()).then(()=>{notify.onSessionReady().resolve(this._me)}).catch(e0=>{if(e0===ERROR_CODE.NOT_LOGGED_IN)return Promise.resolve();notify.onSessionReady().reject(e0)})}setCurrentModel(e0){this._me=e0,this._notLoggedIn=!(e0&&e0.sessionMetadata&&e0.sessionMetadata.userId)}hasWorkflow(e0){var _e;return e0===void 0||((_e=this._me)==null?void 0:_e.authorizedActions.findIndex(i0=>i0.name===e0))!==-1}hasRight(e0,_e){if(_e==="owner")return e0.owner&&e0.owner.userId===this._me.userId;let i0=_e.right||_e,r0=e0.shared.filter(n0=>(this._me.groupsIds||[]).indexOf(n0.groupId)!==-1||n0.userId===this._me.userId).find(n0=>n0[i0]||n0.manager)!==void 0,t0=_e.workflow?this.hasWorkflow(_e.workflow):!0;return r0&&t0}get latestQuotaAndUsage(){return http$2.get(`/workspace/quota/user/${this._me.userId}`).then(e0=>(this._description&&(this._description.quota=e0.quota,this._description.storage=e0.storage),e0)).catch(()=>({quota:0,storage:0}))}setCurrentLanguage(e0){this._currentLanguage=e0,notify.onLangReady().resolve(e0)}loadDefaultLanguage(){return http$2.get("/locale").then(e0=>e0.locale).catch(()=>this._currentLanguage)}loadDescription(){return Promise.all([http$2.get("/userbook/api/person",{requestName:"refreshAvatar"}),http$2.get("/directory/userbook/"+this._me.userId)]).then(e0=>(e0[0].status==="ok"&&e0[0].result&&e0[0].result.length>0?this._description=e0[0].result[0]:this._description={},this._description.type&&!this._description.profiles&&(this._description.profiles=this._description.type),Object.assign(this._description,e0[1]),this._description))}get profile(){return this._profile}getUserProfile(){return http$2.get("/userbook/api/person").then(e0=>e0.result).then(e0=>this._profile=e0[0].type)}loadUserLanguage(){return http$2.get("/userbook/preference/language").then(e0=>{try{return JSON.parse(e0.preference)["default-domain"]}catch{return this.loadDefaultLanguage()}}).catch(()=>this.loadDefaultLanguage())}getEmailValidationInfos(){return http$2.get("/directory/user/mailstate")}checkEmail(e0){return http$2.put("/directory/user/mailstate",{email:e0})}tryEmailValidation(e0){return http$2.post("/directory/user/mailstate",{key:e0})}getMobileValidationInfos(){return http$2.get("/directory/user/mobilestate")}checkMobile(e0){return http$2.put("/directory/user/mobilestate",{mobile:e0})}tryMobileValidation(e0){return http$2.post("/directory/user/mobilestate",{key:e0})}getMfaInfos(){return http$2.get("/auth/user/mfa/code")}tryMfaCode(e0){return http$2.post("/auth/user/mfa/code",{key:e0})}},SessionFramework=class{constructor(){Z0(this,"session",new Session)}initialize(){return this.session.initialize()}login(e0,_e,i0,r0){let t0=new FormData;return t0.append("email",e0),t0.append("password",_e),i0!==void 0&&t0.append("rememberMe",""+i0),r0!==void 0&&t0.append("secureLocation",""+r0),transport.http.post("/auth/login",t0,{headers:{"content-type":"application/x-www-form-urlencoded"}}).finally(()=>{switch(transport.http.latestResponse.status){case 200:throw ERROR_CODE.MALFORMED_DATA}})}logout(){return transport.http.get("/auth/logout").finally(()=>{})}},session=new SessionFramework,Theme$1=class{constructor(){Z0(this,"_conf");Z0(this,"_loaded");Z0(this,"skinName","");Z0(this,"themeName","");Z0(this,"skin","raw");Z0(this,"themeUrl","/assets/themes/raw/default/");Z0(this,"templateOverrides",{});Z0(this,"portalTemplate","/assets/themes/raw/portal.html");Z0(this,"basePath","");Z0(this,"logoutCallback","");Z0(this,"skins",[]);Z0(this,"is1D",!1);Z0(this,"is2D",!1);Z0(this,"_onSkinReady",notify.onSkinReady());Z0(this,"_onOverrideReady",notify.onOverridesReady())}initialize(_e){return notify.onSessionReady().promise.then(()=>this.load(_e))}get version(){return configure.Platform.deploymentTag}get cdnDomain(){return configure.Platform.cdnDomain}async onFullyReady(){return await this._loaded,this}onSkinReady(){return this._onSkinReady.promise}onOverrideReady(){return this._onOverrideReady.promise}async getConf(_e){return this._conf=this._conf??await transport.http.getScript("/assets/theme-conf.js",{queryParams:{v:_e??this.version}},"exports.conf"),this._conf}load(_e){return _e??(_e=this.version),this._loaded||(this._loaded=(session.session.notLoggedIn?this.loadDisconnected(_e):this.loadConnected(_e)).then(async()=>{var r0,t0;let i0=await this.listSkins();this.is1D=((r0=i0.find(n0=>n0.child===this.skin))==null?void 0:r0.parent)==="panda",this.is2D=((t0=i0.find(n0=>n0.child===this.skin))==null?void 0:t0.parent)==="theme-open-ent"})),this._loaded}loadDisconnected(_e){return new Promise((i0,r0)=>{transport.http.get("/skin",{queryParams:{v:this.version}}).then(t0=>{this.skin=t0.skin,this.themeUrl=`${this.cdnDomain}/assets/themes/${t0.skin}/skins/default/`,this.basePath=this.themeUrl+"../../",this._onSkinReady.resolve(this),transport.http.get(`/assets/themes/${t0.skin}/template/override.json`,{disableNotifications:!0,queryParams:{v:_e}}).then(n0=>{this.templateOverrides=n0,this._onOverrideReady.resolve(n0),i0()}).catch(n0=>{if(transport.http.latestResponse.status===404)i0();else throw n0})}).catch(t0=>{this._onSkinReady.reject(t0),this._onOverrideReady.reject(t0),r0()})})}loadConnected(_e){return new Promise((i0,r0)=>{this.loadDefaultTheme(_e).then(()=>{this._onSkinReady.resolve(this),transport.http.get(`/assets/themes/${this.skin}/template/override.json`,{disableNotifications:!0,queryParams:{v:_e}}).then(t0=>{this.templateOverrides=t0,this._onOverrideReady.resolve(t0),i0()}).catch(t0=>{if(transport.http.latestResponse.status===404)i0(),this._onSkinReady.reject(t0),this._onOverrideReady.reject(t0);else throw t0})})})}async loadDefaultTheme(_e){return session.session.notLoggedIn?Promise.reject():transport.http.get("/theme",{queryParams:{_:_e}}).then(i0=>{this.skinName=i0.skinName,this.themeName=i0.themeName,this.themeUrl=i0.skin,this.basePath=`${this.cdnDomain}${this.themeUrl}../../`,this.skin=this.themeUrl.split("/assets/themes/")[1].split("/")[0],this.portalTemplate=`${this.cdnDomain}/assets/themes/${this.skin}/portal.html`,this.logoutCallback=i0.logoutCallback})}listThemes(){return transport.http.get("/themes")}async setDefaultTheme(_e){await transport.http.get("/userbook/api/edit-userbook-info?prop=theme-"+this.skin+"&value="+_e._id),await this.loadDefaultTheme(this.version)}listSkins(){return this.skins.length>0?Promise.resolve(this.skins):this.getConf().then(_e=>{let i0=_e.overriding.find(r0=>r0.child===this.skin);return i0!=null&&i0.group?this.skins=this.skins.concat(_e.overriding.filter(r0=>r0.group===i0.group)):this.skins=this.skins.concat(_e.overriding),this.skins})}async getHelpPath(){var _e;return((_e=(await this.listSkins()).find(i0=>i0.child===this.skin))==null?void 0:_e.help)??"/help"}},bundle$1={},promises$1={},defaultDiacriticsRemovalMap$1=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],Idiom=class{translate(e0,_e){e0??(e0="");let i0=bundle$1[e0]===void 0?e0:bundle$1[e0];if(_e&&typeof _e=="object")for(let r0 in _e)_e[r0]!==void 0&&(i0=i0.replace(RegExp("\\${"+r0+"}","g"),""+_e[r0]));return i0}addBundlePromise(e0){return this.loadBundlePromise(session.session.currentLanguage,e0)}addBundle(e0,_e){this.loadBundle(session.session.currentLanguage,e0,_e)}loadBundlePromise(e0,_e){return this.loadBundle(e0,_e),promises$1[_e]}loadBundle(e0,_e,i0){let r0=promises$1[_e];if(r0)i0&&r0.then(i0).catch(i0);else{let t0=new Promisified;promises$1[_e]=t0.promise;let n0={};e0&&(n0["Accept-Language"]=e0),transport.http.get(_e,{headers:n0}).then(s0=>{Object.assign(bundle$1,s0),typeof i0=="function"&&i0(),t0.resolve()}).catch(s0=>{typeof i0=="function"&&i0(),t0.reject()})}}addTranslations(e0,_e){notify.onLangReady().promise.then(i0=>{this.loadBundle(i0,e0+"/"+i0+".json",_e)})}addAllTranslations(e0){return e0&&e0.length>0?notify.onLangReady().promise.then(_e=>Promise.all(e0.map(i0=>this.loadBundlePromise(_e,i0+"/"+_e+".json")))).then(()=>{}):Promise.reject()}addKeys(e0){for(let _e in e0)typeof bundle$1[_e]!="string"&&(bundle$1[_e]=e0[_e])}removeAccents(e0){for(let _e=0;_e<defaultDiacriticsRemovalMap$1.length;_e++)e0=e0.replace(defaultDiacriticsRemovalMap$1[_e].letters,defaultDiacriticsRemovalMap$1[_e].base);return e0}},UserPreferences=class{constructor(){Z0(this,"data",{})}get(e0){return this.data[e0]}load(e0,_e){return transport.http.get("/userbook/preference/"+e0).then(i0=>{try{return JSON.parse(i0.preference)}catch{return _e??{}}}).then(i0=>(this.data[e0]=i0??{},i0))}update(e0,_e){return _e!==void 0&&(this.data[e0]=_e),this}save(e0){return transport.http.putJson("/userbook/preference/"+e0,this.data[e0])}},User=class{constructor(){Z0(this,"_me",null);Z0(this,"_keepOpenOnLogout",!1);Z0(this,"_preferences",new UserPreferences);Z0(this,"_bookmarkedApps",[])}get keepOpenOnLogout(){return this._keepOpenOnLogout}get preferences(){return this._preferences}get bookmarkedApps(){return this._bookmarkedApps}initialize(e0){return this.loadPublicConf(),notify.onSessionReady().promise.then(_e=>{_e&&this.setCurrentModel(_e)})}setCurrentModel(e0){this._me=e0,this._preferences=new UserPreferences,this.loadBookmarks()}loadPublicConf(){return transport.http.get("/conf/public").then(e0=>(this._keepOpenOnLogout=(e0==null?void 0:e0.keepOpenOnLogout)||!1,e0))}async loadBookmarks(){await transport.http.get("/userbook/preference/apps").then(e0=>{e0.preference||(e0.preference=null);let _e=JSON.parse(e0.preference),i0;if(_e&&_e.length&&typeof _e.concat=="function"){this._bookmarkedApps=_e,i0={bookmarks:_e.map(n0=>n0.name),applications:[]},transport.http.putJson("/userbook/preference/apps",i0);return}else i0=_e;i0||(i0={bookmarks:[],applications:[]});let r0=!0,t0=[];i0.bookmarks.forEach((n0,s0)=>{let o0=this._me.apps.find(a0=>a0.name===n0);if(o0){let a0=Object.assign({},o0);this._bookmarkedApps.push(a0)}else t0.push(n0),r0=!1}),t0.forEach(n0=>{let s0=i0.bookmarks.indexOf(n0);s0!==-1&&i0.bookmarks.splice(s0,1)}),r0||transport.http.putJson("/userbook/preference/apps",i0)})}loadAppPrefs(e0){return this.preferences.load(e0,{})}saveAppPrefs(e0){return this.preferences.save(e0)}loadLanguage(){return this.preferences.load("language",{"default-domain":session.session.currentLanguage}).then(e0=>e0["default-domain"])}saveLanguage(e0){return this.preferences.update("language",{"default-domain":e0}).save("language")}},http$1=transport==null?void 0:transport.http,AppConf=class{constructor(){Z0(this,"_publicConf",{});Z0(this,"_currentApp");Z0(this,"_appConf",{})}get currentApp(){return this._currentApp??null}setCurrentApp(e0){return this._currentApp=e0,this}async initialize(e0,_e=!1){_e||this.setCurrentApp(e0),await Promise.all([this.getPublicConf(e0),this.loadI18n(e0)])}async getPublicConf(e0){return this._publicConf[e0]||(this._publicConf[e0]=await http$1.get(`/${e0}/conf/public`,{queryParams:{_:configure.Platform.deploymentTag}})),this._publicConf[e0]}async getWebAppConf(e0){let _e;return this._appConf[e0]||(await http$1.get("/applications-list")).apps.forEach(i0=>{if(i0!=null&&i0.prefix){let r0=i0.prefix.replace("/","");this._appConf[r0]=i0}else i0!=null&&i0.name&&i0.name.toLowerCase()==e0&&(_e=i0)}),this._appConf[e0]??_e}async loadI18n(e0){return await notify.onLangReady().promise,configure.Platform.idiom.addBundlePromise(`/${e0}/i18n`)}},Analytics=class{constructor(){Z0(this,"_status","void");Z0(this,"_params")}get status(){return this._status}xiti(){return this.parametersWithCheck("xiti",!1)}parameters(e0){return this.parametersWithCheck(e0,!0)}async parametersWithCheck(e0,_e){return this.initialize().promise.then(i0=>!_e||i0.type===e0||i0.type==="multiple"?i0[e0]:void 0)}initialize(){return this._params||(this._params=notify.promisify(),this._status="pending",Promise.all([transport.http.get("/analyticsConf"),transport.http.get("/xiti/config")]).then(async e0=>{var _e;if(!e0||!e0[0]||!e0[0].type)throw ERROR_CODE.MALFORMED_DATA;e0[1]&&e0[1].active&&(e0[0].xiti=await this.initializeXiti(e0[1])),(_e=this._params)==null||_e.resolve(e0[0]),this._status="ready"}).catch(e0=>{var _e;throw this._status="failed",(_e=this._params)==null||_e.reject(),e0})),this._params}async initializeXiti(e0){if(!e0.structureMap||!configure.Platform.apps.currentApp)return;let _e=await notify.onSessionReady().promise,i0=session.session.description,r0;for(let o0 of _e.structures){let a0=e0.structureMap[o0];if(a0&&a0.collectiviteId&&a0.UAI){r0=a0;break}}if(!r0||!r0.active)return;let t0=await configure.Platform.apps.getPublicConf(configure.Platform.apps.currentApp);if(!t0)return;let n0=t0.xiti;if(!n0||!n0.LIBELLE_SERVICE||!r0.UAI)return;function s0(o0){let a0="";for(let f0=0;f0<o0.length;f0++)a0+=o0.charCodeAt(f0);return a0}return{LIBELLE_SERVICE:n0.LIBELLE_SERVICE,TYPE:n0.OUTIL?"TIERS":"NATIF",OUTIL:n0.OUTIL?n0.OUTIL:"",STRUCT_ID:r0.collectiviteId,STRUCT_UAI:r0.UAI,PROJET:r0.projetId?r0.projetId:e0.ID_PROJET,EXPLOITANT:e0.ID_EXPLOITANT,PLATFORME:r0.plateformeId?r0.plateformeId:e0.ID_PLATEFORME,ID_PERSO:s0(_e.userId),PROFILE:i0.profiles&&i0.profiles.length>0?{Student:"ELEVE",Teacher:"ENSEIGNANT",Relative:"PARENT",Personnel:"ADMIN_VIE_SCOL_TECH",Guest:"AUTRE"}[i0.profiles[0]]??"":""}}};function setCookie(e0,_e){if(typeof document>"u")return;let i0=location.protocol==="https:"?"None; Secure":"Lax";document.cookie=`${e0}=${encodeURIComponent(_e)}; path=/; SameSite=${i0}`}function isPad(){return typeof window<"u"&&"ongesturechange"in window}function detectDevice(){if(typeof window>"u")return{osName:"",osVersion:"",deviceType:"",deviceName:""};let e0=UAParser(),_e=isPad(),i0=e0.device.vendor||"",r0=e0.device.model||"",t0=i0&&r0?`${i0} ${r0}`:r0||i0||"Unknown",n0=e0.os.name||"Unknown",s0=e0.device.type||(_e?"tablet":"desktop"),o0=t0;return _e&&n0.toLowerCase()=="macos"&&(n0="iPadOS",s0="tablet",o0="iPad"),{osName:n0,osVersion:e0.os.version||"Unknown",deviceType:s0,deviceName:o0}}function setDeviceCookies(){try{let e0=detectDevice();return setCookie("osName",e0.osName),setCookie("osVersion",e0.osVersion),setCookie("deviceType",e0.deviceType),setCookie("deviceName",e0.deviceName),e0}catch(e0){return console.warn("Device detection failed, using Unknown values:",e0),{osName:"Unknown",osVersion:"Unknown",deviceType:"Unknown",deviceName:"Unknown"}}}var ConfigurationFramework=class{constructor(){Z0(this,"Platform",{deploymentTag:"",cdnDomain:"",apps:new AppConf,theme:new Theme$1,analytics:new Analytics,idiom:new Idiom,listLanguages:()=>transport.http.get("/languages")});Z0(this,"School",{});Z0(this,"User",new User);setDeviceCookies()}async initialize(e0,_e){if(!e0){let r0=a0=>(a0<10?"0":"")+a0.toFixed(0),t0=new Date,n0=t0.getFullYear(),s0=t0.getMonth()+1,o0=t0.getDate();e0=`${n0}${r0(s0)}${r0(o0)}`}let i0=e0;this.Platform.deploymentTag=e0,typeof _e=="string"&&_e.length>0&&(this.Platform.cdnDomain=_e),transport.http.setCdn(this.Platform.cdnDomain),await Promise.all([this.Platform.theme.initialize(i0),notify.onSessionReady().promise.then(r0=>this.Platform.idiom.addBundlePromise("/i18n")),this.User.initialize(i0)])}},configure=new ConfigurationFramework;transport==null||transport.http;var Ft;(Ft=session==null?void 0:session.session)==null||Ft.user;var NotifyFrameworkFactory=class{static instance(){return notify}},LAYER_NAME={TRANSPORT:"transport",WEB_DATA:"webDataPipeline"},EVENT_NAME={ERROR_OCCURED:"error",DATA_TRACKED:"track"},ServiceRegistry=class extends Map{register({application:e0,resourceType:_e},i0){this.set(`${e0}:main`,i0),this.set(`${e0}:${_e}`,i0)}findService(e0,_e){return this.lookupService(e0,_e)}findMainService({application:e0},_e){return this.lookupService({application:e0,resourceType:"main"},_e)}isRegistered({application:e0,resourceType:_e}){return this.get(`${e0}:${_e}`)!==void 0}lookupService({application:e0,resourceType:_e},i0){let r0=this.get(`${e0}:${_e}`);if(r0===void 0)throw`Service not found: ${e0}:${_e}`;return r0(i0)}},E2,ResourceService=(E2=class{constructor(_e){Z0(this,"context");Z0(this,"checkHttpResponse",_e=>{if(this.http.latestResponse.status>=300)throw this.http.latestResponse.statusText;return _e});this.context=_e}get http(){return this.context.http()}async copy(_e){let i0=await this.http.post("/archive/duplicate",{application:_e.application,resourceId:_e.resourceId});return this.checkHttpResponse(i0)}async publish(_e){let i0=new FormData;return i0.append("title",_e.title),i0.append("cover",_e.cover),i0.append("coverName",_e.cover.name),i0.append("coverType",_e.cover.type),i0.append("teacherAvatar",_e.teacherAvatar),i0.append("teacherAvatarName",_e.teacherAvatar.name||`teacherAvatar_${_e.userId}`),i0.append("teacherAvatarType",_e.teacherAvatar.type),i0.append("language",_e.language),_e.activityType.forEach(r0=>{i0.append("activityType[]",r0)}),_e.subjectArea.forEach(r0=>{i0.append("subjectArea[]",r0)}),_e.age.forEach(r0=>{i0.append("age[]",r0.toString())}),i0.append("description",_e.description),_e.keyWords.split(",").forEach(r0=>{i0.append("keyWords[]",r0.trim())}),i0.append("licence",_e.licence),i0.append("pdfUri",`${window.location.origin}${this.getPrintUrl(_e.resourceEntId)}`),i0.append("application",_e.application?_e.application:""),i0.append("resourceId",_e.resourceId),i0.append("teacherSchool",_e.userStructureName),await this.http.post("/appregistry/library/resource",i0,{headers:{"Content-Type":"multipart/form-data"}})}async createContext(_e){let i0=await this.http.get("/explorer/context",{queryParams:this.toQueryParams(_e)});return this.checkHttpResponse(i0)}async searchContext(_e){let i0=await this.http.get("/explorer/resources",{queryParams:this.toQueryParams(_e)});return this.checkHttpResponse(i0)}async searchResource(_e){let i0=await this.http.get(`/explorer/resources/${_e.id}`,{queryParams:this.getResourceParams(_e)});return this.checkHttpResponse(i0)}async createFolder(_e){let i0=await this.http.post("/explorer/folders",this.createFolderToBodyParams(_e));return this.checkHttpResponse(i0)}async updateFolder(_e){let i0=await this.http.put(`/explorer/folders/${_e.folderId}`,this.createFolderToBodyParams(_e));return this.checkHttpResponse(i0)}async moveToFolder(_e,i0=!1){_e.resourceIds=i0?await this.mapAssetIdToIds({application:_e.application,assetIds:_e.resourceIds}):_e.resourceIds;let r0=await this.http.post(`/explorer/folders/${_e.folderId}/move`,this.moveToBodyParams(_e));return this.checkHttpResponse(r0)}async listSubfolders(_e){let i0=await this.http.get(`/explorer/folders/${_e}`);return this.checkHttpResponse(i0)}async deleteAll(_e,i0=!1){_e.resourceIds=i0?await this.mapAssetIdToIds({application:_e.application,assetIds:_e.resourceIds}):_e.resourceIds;let r0=await this.http.deleteJson("/explorer",_e);return this.checkHttpResponse(r0)}async trashAll({resourceType:_e,...i0},r0=!1){i0.resourceIds=r0?await this.mapAssetIdToIds({application:i0.application,assetIds:i0.resourceIds}):i0.resourceIds;let t0=await this.http.putJson("/explorer/trash",i0);return this.checkHttpResponse(t0)}async restoreAll({resourceType:_e,...i0},r0=!1){i0.resourceIds=r0?await this.mapAssetIdToIds({application:i0.application,assetIds:i0.resourceIds}):i0.resourceIds;let t0=await this.http.putJson("/explorer/restore",i0);return this.checkHttpResponse(t0)}async mapAssetIdToIds({application:_e,assetIds:i0}){let r0=await this.searchContext({application:_e,pagination:{startIdx:0,pageSize:i0.length+1},types:[],filters:{},asset_id:i0});return i0.map(t0=>{let n0=r0.resources.find(s0=>s0.assetId===t0);if(n0===void 0)throw"explorer.assetid.notfound";return n0.id})}async getThumbnailPath(_e){if(_e===void 0)return _e;if(typeof _e=="string")if(_e.startsWith("blob:")){let i0=await fetch(_e).then(r0=>r0.blob());return`/workspace/document/${(await this.context.workspace().saveFile(i0,{visibility:"protected",application:this.getApplication()}))._id}`}else return _e;else return`/workspace/document/${(await this.context.workspace().saveFile(_e,{visibility:"protected",application:this.getApplication()}))._id}`}toQueryParams(_e){let i0={application:_e.application,start_idx:_e.pagination.startIdx,page_size:_e.pagination.pageSize,trashed:_e.trashed};if(_e.types.length>0&&(i0.resource_type=_e.types[0]),_e.orders&&Object.entries(_e.orders).length){let[[r0,t0]]=Object.entries(_e.orders);i0.order_by=`${r0}:${t0}`}return _e.filters&&Object.assign(i0,_e.filters),typeof _e.search=="string"&&(i0.search=_e.search),_e.asset_id!==void 0&&(i0.asset_id=[..._e.asset_id]),_e.id!==void 0&&(i0.id=_e.id),i0}getResourceParams(_e){return{application:_e.application}}createFolderToBodyParams(_e){return{application:_e.application,resourceType:_e.type,parentId:_e.parentId,name:_e.name}}moveToBodyParams(_e){return{application:_e.application,resourceType:this.getResourceType(),resourceIds:_e.resourceIds,folderIds:_e.folderIds}}},Z0(E2,"registry",new ServiceRegistry),Z0(E2,"register",E2.registry.register.bind(E2.registry)),Z0(E2,"findService",E2.registry.findService.bind(E2.registry)),Z0(E2,"findMainService",E2.registry.findMainService.bind(E2.registry)),Z0(E2,"isRegistered",E2.registry.isRegistered.bind(E2.registry)),E2),APP$4="collaborativeeditor",RESOURCE$3="collaborativeeditor",CollaborativeEditorResourceService=class extends ResourceService{async create(e0){let{name:_e,description:i0,thumbnail:r0,folder:t0}=e0,n0=r0?await this.getThumbnailPath(r0):"",s0=await this.http.post("/collaborativeeditor",{name:_e,description:i0,thumbnail:n0,folder:t0});return this.checkHttpResponse(s0),s0}async update(e0){let{name:_e,description:i0,thumbnail:r0,entId:t0}=e0,n0=await this.getThumbnailPath(r0),s0=await this.http.put(`/collaborativeeditor/${t0}`,{name:_e,description:i0,thumbnail:n0});return this.checkHttpResponse(s0),{thumbnail:n0,entId:t0}}getResourceType(){return RESOURCE$3}getApplication(){return APP$4}getFormUrl(){throw Error("Method not implemented.")}getViewUrl(e0){return`/collaborativeeditor#/view/${e0}`}getPrintUrl(){throw Error("Method not implemented.")}getEditUrl(){throw Error("Method not implemented.")}getExportUrl(){throw Error("Method not implemented.")}};ResourceService.register({application:RESOURCE$3,resourceType:RESOURCE$3},e0=>new CollaborativeEditorResourceService(e0));var APP$3="homeworks",RESOURCE$2="homeworks",HomeworksResourceService=class extends ResourceService{async create(e0){let _e=await this.getThumbnailPath(e0.thumbnail),i0=await this.http.post("/homeworks",{title:e0.name,thumbnail:_e,description:e0.description,repeats:e0.repeats,folder:e0.folder});return this.checkHttpResponse(i0),{thumbnail:_e,entId:i0._id}}async update(e0){let _e=await this.getThumbnailPath(e0.thumbnail),i0=await this.http.put(`/homeworks/${e0.entId}`,{title:e0.name,thumbnail:_e,description:e0.description,repeats:e0.repeats});return this.checkHttpResponse(i0),{thumbnail:_e,entId:e0.entId}}getResourceType(){return RESOURCE$2}getApplication(){return APP$3}getFormUrl(e0){return e0?`/homeworks?folderid=${e0}#/create-homeworks/`:"/homeworks#/create-homeworks/"}getViewUrl(e0){return`/homeworks#/view-homeworks/${e0}`}getPrintUrl(e0){return`/homeworks/print#/print-homeworks/${e0}`}getEditUrl(e0){return`/homeworks#/edit-homeworks/${e0}`}getExportUrl(){throw Error("Export not implemented.")}};ResourceService.register({application:RESOURCE$2,resourceType:RESOURCE$2},e0=>new HomeworksResourceService(e0));var APP$2="scrapbook",RESOURCE$1="scrapbook",ScrapbookResourceService=class extends ResourceService{create(e0){throw Error("Method not implemented.")}async update(e0){let _e=await this.getThumbnailPath(e0.thumbnail),i0=await this.http.put(`/scrapbook/${e0.entId}`,{trashed:+!!e0.trashed,title:e0.name,icon:_e,subTitle:e0.description});return this.checkHttpResponse(i0),{thumbnail:_e,entId:e0.entId}}getResourceType(){return RESOURCE$1}getApplication(){return APP$2}getFormUrl(e0){return e0?`/scrapbook?folderid=${e0}#/create-scrapbook/`:"/scrapbook#/create-scrapbook/"}getViewUrl(e0){return`/scrapbook#/view-scrapbook/${e0}`}getPrintUrl(e0){return`/scrapbook/print#/print-scrapbook/${e0}`}getEditUrl(e0){return`/scrapbook#/edit-scrapbook/${e0}`}getExportUrl(e0){return`/scrapbook/exportHtml/${e0}`}};ResourceService.register({application:RESOURCE$1,resourceType:RESOURCE$1},e0=>new ScrapbookResourceService(e0));var APP$1$1="timelinegenerator",RESOURCE$4="timelinegenerator",TimelineGeneratorResourceService=class extends ResourceService{async create(e0){let _e=e0.thumbnail?await this.getThumbnailPath(e0.thumbnail):"",i0=await this.http.post("/timelinegenerator/timelines",{headline:e0.name,text:e0.description,icon:_e,type:"default",folder:e0.folder});return this.checkHttpResponse(i0),i0}async update(e0){let _e=await this.getThumbnailPath(e0.thumbnail),i0=await this.http.put(`/timelinegenerator/timeline/${e0.entId}`,{headline:e0.name,text:e0.description,icon:_e,trashed:!!e0.trashed,_id:e0.entId,type:"default"});return this.checkHttpResponse(i0),{thumbnail:_e,entId:e0.entId}}getResourceType(){return RESOURCE$4}getApplication(){return APP$1$1}getFormUrl(){throw Error("Method not implemented.")}getViewUrl(e0){return`/timelinegenerator#/view/${e0}`}getPrintUrl(e0){return`/timelinegenerator/print#/print/${e0}`}getEditUrl(){throw Error("Method not implemented.")}getExportUrl(){throw Error("Method not implemented.")}};ResourceService.register({application:RESOURCE$4,resourceType:RESOURCE$4},e0=>new TimelineGeneratorResourceService(e0));var ATTag,AnalyticsService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}get session(){return this.context.session()}async trackPageLoad(e0,_e){let[i0]=await Promise.all([this.getXitiConfig(_e.name.toLowerCase()),this.loadXitiScript()]);if(!i0||!ATInternet)return;let r0=i0.LIBELLE_SERVICE.default||null;for(let t0 in i0.LIBELLE_SERVICE)if(t0!=="default"&&e0.indexOf(t0)>=0){r0=i0.LIBELLE_SERVICE[t0];break}ATTag=new ATInternet.Tracker.Tag({site:i0.STRUCT_ID}),ATTag.setProps({SERVICE:r0,TYPE:i0.TYPE,OUTIL:i0.OUTIL,UAI:i0.STRUCT_UAI,PROJET:i0.PROJET,EXPLOITANT:i0.EXPLOITANT,PLATEFORME:i0.PLATFORME,PROFIL:i0.PROFILE},!0),ATTag.identifiedVisitor.set({id:i0.ID_PERSO,category:i0.PROFILE}),ATTag.page.set({name:(_e==null?void 0:_e.prefix)==="userbook"?"directory":_e==null?void 0:_e.prefix,chapter1:"",chapter2:"",chapter3:"",level2:i0.STRUCT_UAI}),ATTag.dispatch()}async getXitiConfig(e0){let[_e,i0]=await Promise.all([this.http.get("/analyticsConf"),this.http.get("/xiti/config")]);if(!(_e!=null&&_e.type))throw ERROR_CODE.MALFORMED_DATA;return i0!=null&&i0.active&&(_e.xiti=await this.getXitiTrackingParams(i0,e0)),_e.xiti}async loadXitiScript(){if(typeof ATInternet>"u"){const scriptPath="/xiti/public/js/lib/smarttag_ENT.js",response=await this.http.get(scriptPath,{headers:{Accept:"application/javascript"}});if(this.http.latestResponse.status!=200)throw"Error while loading XiTi script";eval(response)}}async getXitiTrackingParams(e0,_e){if(!e0.structureMap||!_e)return;let i0=await this.session.getUser(),r0=await this.session.getUserProfile(),t0;if(!(i0!=null&&i0.structures))return;for(let a0 of i0.structures){let f0=e0.structureMap[a0];if(f0&&f0.collectiviteId&&f0.UAI){t0=f0;break}}if(!t0||!t0.active)return;let n0=await configure.Platform.apps.getPublicConf(_e);if(!n0)return;let s0=n0.xiti;if(!s0||!s0.LIBELLE_SERVICE||!t0.UAI)return;function o0(a0){let f0="";for(let l0=0;l0<a0.length;l0++)f0+=a0.charCodeAt(l0);return f0}return{LIBELLE_SERVICE:s0.LIBELLE_SERVICE,TYPE:s0.OUTIL?"TIERS":"NATIF",OUTIL:s0.OUTIL?s0.OUTIL:"",STRUCT_ID:t0.collectiviteId,STRUCT_UAI:t0.UAI,PROJET:t0.projetId?t0.projetId:e0.ID_PROJET,EXPLOITANT:e0.ID_EXPLOITANT,PLATFORME:t0.plateformeId?t0.plateformeId:e0.ID_PLATEFORME,ID_PERSO:o0(i0.userId),PROFILE:r0&&r0.length>0?{Student:"ELEVE",Teacher:"ENSEIGNANT",Relative:"PARENT",Personnel:"ADMIN_VIE_SCOL_TECH",Guest:"AUTRE"}[r0[0]]??"":""}}},ReactionsService=class{constructor(e0,_e,i0){Z0(this,"context");Z0(this,"module");Z0(this,"resourceType");this.context=e0,this.module=_e,this.resourceType=i0}get http(){return this.context.http()}async loadAvailableReactions(){try{let{"reaction-types":e0}=await this.context.conf().getPublicConf("audience");return Array.isArray(e0)?e0:void 0}catch{console.error("Audience configuration not found");return}}async loadReactionSummaries(e0){let _e=await this.http.get(`/audience/reactions/${this.module}/${this.resourceType}?resourceIds=${e0.join(",")}`);return this.http.isResponseError()?{}:_e.reactionsByResource}async loadReactionDetails(e0,_e,i0){let r0=await this.http.get(`/audience/reactions/${this.module}/${this.resourceType}/${e0}?page=${_e}&size=${i0}`);return this.http.isResponseError()?void 0:r0}async deleteReaction(e0){await this.http.delete(`/audience/reactions/${this.module}/${this.resourceType}/${e0}`)}async updateReaction(e0,_e){await this.http.putJson(`/audience/reactions/${this.module}/${this.resourceType}`,{resourceId:e0,reactionType:_e})}async createReaction(e0,_e){await this.http.postJson(`/audience/reactions/${this.module}/${this.resourceType}`,{resourceId:e0,reactionType:_e})}},ViewsService=class{constructor(e0,_e,i0){Z0(this,"context");Z0(this,"module");Z0(this,"resourceType");this.context=e0,this.module=_e,this.resourceType=i0}get http(){return this.context.http()}async getCounters(e0){let _e=await this.http.get(`/audience/views/count/${this.module}/${this.resourceType}?resourceIds=${e0.join(",")}`);return this.http.isResponseError()?{}:_e}async getDetails(e0){let _e=await this.http.get(`/audience/views/details/${this.module}/${this.resourceType}/${e0}`);return this.http.isResponseError()?void 0:_e}trigger(e0){return this.http.post(`/audience/views/${this.module}/${this.resourceType}/${e0}`)}},AudienceService=class{constructor(e0,_e,i0){Z0(this,"context");Z0(this,"module");Z0(this,"resourceType");this.context=e0,this.module=_e,this.resourceType=i0}get views(){return new ViewsService(this.context,this.module,this.resourceType)}get reactions(){return new ReactionsService(this.context,this.module,this.resourceType)}},globalCache={},mutexPromise={},CacheService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}async fromCacheIfPossible(e0,_e,i0){if(mutexPromise[e0]!==void 0&&await mutexPromise[e0],globalCache[e0])return globalCache[e0];try{let r0=_e();mutexPromise[e0]=r0;let t0=await r0;return i0(t0)&&(globalCache[e0]=t0),t0}catch(r0){throw console.error(`Failed to retrieve value for: ${e0}`,r0),r0}}clearCache(e0){if(e0)delete globalCache[e0];else for(let _e in globalCache)globalCache.hasOwnProperty(_e)&&delete globalCache[_e]}async httpGet(e0,_e){return this.fromCacheIfPossible(e0,async()=>({value:await this.http.get(e0,_e),response:{...this.http.latestResponse}}),({response:i0})=>!(i0.status<200||i0.status>=300))}async httpGetJson(e0,_e){let{response:i0,value:r0}=await this.httpGet(e0,_e);if(i0.status<200||i0.status>=300)throw`Bad http status (${i0.status}) for url: ${e0}`;return r0}},ConfService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}get cache(){return this.context.cache()}get cdnDomain(){return configure.Platform.cdnDomain}get notify(){return this.context.notify()}async getConf(e0){let[_e,i0]=await Promise.all([this.getThemeConf(),this.getApplicationsList()]),[r0,t0]=await Promise.all([this.getTheme({conf:_e,publicTheme:i0===void 0}),this.getWebAppConf({app:e0,applications:i0??[]})]),n0={app:e0,applications:i0??[],conf:_e,currentApp:t0,theme:r0};return this.notify.onAppConfReady().resolve(n0),n0}async getPublicConf(e0){let{response:_e,value:i0}=await this.cache.httpGet(`/${e0}/conf/public`,{queryParams:{_:configure.Platform.deploymentTag}});if(_e.status<200||_e.status>=300)throw ERROR_CODE.APP_NOT_FOUND;return i0}getCdnUrl(){}async getUserPreferences(){let e0=await this.http.get("/userbook/api/preferences");if(this.http.isResponseError()||typeof e0=="string")throw ERROR_CODE.NOT_LOGGED_IN;return e0}async saveUserPreferences(e0){return this.http.putJson("/userbook/api/preferences",e0)}async getPreference(e0){let _e=await this.http.get(`/userbook/preference/${e0}`);return this.http.isResponseError()||typeof _e=="string"?{}:JSON.parse(_e.preference)}async savePreference(e0,_e){this.http.putJson(`/userbook/preference/${e0}`,_e)}async getThemeConf(e0){return await this.http.getScript("/assets/theme-conf.js",{queryParams:{v:e0}},"exports.conf")}async getApplicationsList(){let e0=await this.http.get("/applications-list");if(!(this.http.isResponseError()||typeof e0=="string"))return e0.apps}async getWebAppConf({app:e0,applications:_e}){return _e.find(i0=>{if(i0!=null&&i0.prefix)return(i0==null?void 0:i0.prefix.replace("/",""))===e0})}async getTheme({version:e0,conf:_e,publicTheme:i0}){var l0;let r0=await this.http.get("/theme"),t0=(l0=_e==null?void 0:_e.overriding)==null?void 0:l0.find(u0=>i0?u0.parent==="theme-open-ent"&&u0.bootstrapVersion==="ode-bootstrap-neo":u0.child===(r0==null?void 0:r0.themeName)),n0=i0?"default":(r0==null?void 0:r0.skinName)||(t0==null?void 0:t0.skins[0]),s0=(r0==null?void 0:r0.skin)||`/assets/themes/${t0==null?void 0:t0.child}/skins/${n0}/`,o0=t0==null?void 0:t0.skins,a0=t0==null?void 0:t0.bootstrapVersion.split("-").slice(-1)[0],f0=(t0==null?void 0:t0.parent)==="panda";return{basePath:`${this.cdnDomain}${s0}../../`,bootstrapVersion:a0,is1d:f0,logoutCallback:(r0==null?void 0:r0.logoutCallback)||"",skin:t0==null?void 0:t0.child,skinName:n0,skins:o0,themeName:t0==null?void 0:t0.child,themeUrl:s0,npmTheme:(t0==null?void 0:t0.npmTheme)??void 0,uiOverrides:t0==null?void 0:t0.uiOverrides}}async getLogoutCallback(e0){let{response:_e,value:i0}=await this.cache.httpGet("/theme",{queryParams:{_:e0}});if(_e.status<200||_e.status>=300)throw ERROR_CODE.NOT_LOGGED_IN;return i0.logoutCallback}},WebBroker=class{constructor(e0){Z0(this,"odeServices");Z0(this,"subscription");this.odeServices=e0}get http(){return this.odeServices.http()}get events(){return this.odeServices.notify().events()}dispatchEvent(e0,_e){_e.findIndex(i0=>i0==="*"||e0.data["event-type"]===i0)>=0&&this.http.post("/infra/event/web/store",e0.data,{disableNotifications:!0})}initialize(e0){if(e0===void 0||e0.send===void 0||e0.send.length>0){let _e=(e0==null?void 0:e0.send)??["*"];this.subscription=this.events.subscribe(LAYER_NAME.WEB_DATA,i0=>this.dispatchEvent(i0,_e))}return this}destroy(){this.subscription&&(this.subscription.revoke(),delete this.subscription)}},DataService=class{constructor(e0){Z0(this,"odeServices");Z0(this,"_webBroker");Z0(this,"app");Z0(this,"user");Z0(this,"profile");this.odeServices=e0}get conf(){return this.odeServices.conf()}get notify(){return this.odeServices.notify()}async initialize(){try{let{app:e0}=await this.notify.onAppConfReady().promise;this.app=e0,this.user=await this.odeServices.session().getUser(),this.profile=await this.odeServices.session().getUserProfile();let{"data-service":_e}=await this.conf.getPublicConf(e0);this._webBroker=new WebBroker(this.odeServices).initialize(_e==null?void 0:_e.web)}catch{console.log("DataService not initialized, usage data unavailable.")}}predestroy(){this._webBroker&&(this._webBroker.destroy(),delete this._webBroker)}trackWebEvent(e0){this.notify.events().publish(LAYER_NAME.WEB_DATA,{name:EVENT_NAME.DATA_TRACKED,data:e0})}addUserInfos(e0){return this.user&&(e0.userId=this.user.userId,e0.structure=this.user.structureNames[0]),this.profile&&(e0.profil=this.profile[0]),e0}trackVideoSave(e0,_e,i0,r0,t0,n0,s0){let o0=this.addUserInfos({"event-type":"VIDEO_SAVE",module:this.app||"video",video_id:e0,browser:n0,duration:Math.round(_e),weight:i0,source:r0?"CAPTURED":"UPLOADED",url:t0});s0&&(o0.device_type=s0),this.trackWebEvent(o0)}trackVideoRead(e0,_e,i0,r0,t0){let n0=this.addUserInfos({"event-type":"VIDEO_READ",module:"video",video_id:e0,browser:r0,source:_e?"CAPTURED":"UPLOADED",url:i0});this.app&&(n0["override-module"]=this.app),t0&&(n0.device_type=t0),this.trackWebEvent(n0)}trackSpeechAndText(e0){let _e=this.addUserInfos({"event-type":"SPEECH_AND_TEXT",function:e0});this.app&&(_e.module=this.app),this.trackWebEvent(_e)}trackAccessLibraryFromExplorer(){let e0=this.addUserInfos({"event-type":"ACCESS_LIBRARY_FROM_EXPLORER"});this.app&&(e0.module=this.app),this.trackWebEvent(e0)}},DirectoryService=class{constructor(e0){Z0(this,"odeServices");this.odeServices=e0}get http(){return this.odeServices.http()}get cache(){return this.odeServices.cache()}getAvatarUrl(e0,_e,i0="100x100"){return _e==="user"?`/userbook/avatar/${e0}?thumbnail=${i0}`:"/assets/img/illustrations/group-avatar.svg"}getDirectoryUrl(e0,_e){return _e==="user"?`/userbook/annuaire#/${e0}`:`/userbook/annuaire#/group-view/${e0}`}getChildren(e0){return this.http.get(`/directory/user/${e0}/children`)}async getBookMarks(){return(await this.cache.httpGetJson("/directory/sharebookmark/all")).map(({id:e0,name:_e})=>({id:e0,displayName:_e,notVisibleCount:0,members:[]}))}async getBookMarkById(e0){let{groups:_e,id:i0,name:r0,users:t0,notVisibleCount:n0}=await this.http.get(`/directory/sharebookmark/${e0}`);return{id:i0,displayName:r0,notVisibleCount:n0,groups:_e.map(({name:s0,id:o0,nbUsers:a0})=>({nbUsers:a0,displayName:s0,id:o0})),users:t0.map(({displayName:s0,id:o0,profile:a0})=>({profile:a0,displayName:s0,firstName:"",lastName:"",login:"",id:o0}))}}async saveBookmarks(e0,{bookmarks:_e,groups:i0,users:r0}){this.cache.clearCache("/directory/sharebookmark/all");let t0=r0.map(l0=>typeof l0=="string"?l0:l0.id),n0=i0.map(l0=>typeof l0=="string"?l0:l0.id),s0=_e.map(async l0=>{if(typeof l0=="string"){let{displayName:u0,groups:A0,id:c0,notVisibleCount:k0,users:d0}=await this.getBookMarkById(l0),h0=d0.map(b0=>b0.id);return{displayName:u0,id:c0,notVisibleCount:k0,members:[...A0.map(b0=>b0.id),...h0]}}else return Promise.resolve(l0)}),o0=(await Promise.all(s0)).map(l0=>l0.members).reduce((l0,u0)=>[...l0,...u0],[]),a0={name:e0,members:[...t0,...n0,...o0]},{id:f0}=await this.http.postJson("/directory/sharebookmark",a0);return{id:f0,displayName:e0,notVisibleCount:0,members:a0.members}}},EmbedderService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}async getDefault(){return this.http.get("/infra/embed/default")}async getCustom(){return this.http.get("/infra/embed/custom")}getProviderFromUrl(e0,_e){for(let i0 of e0)if(this.isUrlFromProvider(_e,i0))return i0}urlIsFromPattern(e0,_e){let i0=RegExp("[^{}]+(?=(?:[^{}]*{[^}]*})*[^}]*$)","g"),r0=RegExp("{[^}]*}","g"),t0=!0,n0=_e.match(i0)||[],s0=[];return(_e.match(r0)||[]).forEach((o0,a0)=>{o0.includes("ignore")||s0.push(n0[a0])}),s0.forEach(o0=>{if(!e0.includes(o0)){t0=!1;return}}),t0}isUrlFromProvider(e0,_e){typeof _e.url=="string"&&(_e.url=[_e.url]);for(let i0 of _e.url)if(this.urlIsFromPattern(e0,i0))return!0;return!1}getEmbedCodeForProvider(e0,_e){for(let i0 of e0.url)if(this.urlIsFromPattern(_e,i0)){let r0=RegExp("{[a-zA-Z0-9_.]+}","g"),t0=i0.match(r0)||[],n0=e0.embed;for(let s0 of t0){let o0=i0.split(s0)[0],a0=o0.split("}");a0.length>1&&(o0=a0[a0.length-1]);let f0=_e.split(o0)[1];if(!f0)continue;let l0=i0.split(s0)[1].split("{")[0];l0&&(f0=f0.split(l0)[0]);let u0=RegExp("\\"+s0.replace(/}/,"\\}"),"g");n0=n0.replace(u0,f0)}return n0}return""}},bundle={},promises={},defaultDiacriticsRemovalMap=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],IdiomService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}async getIdiom(e0,_e){await Promise.all([this.addBundlePromise(e0,"/i18n"),this.addBundlePromise(e0,`/${_e}/i18n`)])}translate(e0,_e){e0??(e0="");let i0=bundle[e0]===void 0?e0:bundle[e0];if(_e&&typeof _e=="object")for(let r0 in _e)_e[r0]!==void 0&&(i0=i0.replace(RegExp("\\${"+r0+"}","g"),""+_e[r0]));return i0}addBundlePromise(e0,_e){return this.loadBundlePromise(e0,_e)}addBundle(e0,_e,i0){this.loadBundle(e0,_e,i0)}loadBundlePromise(e0,_e){return this.loadBundle(e0,_e),promises[_e]}loadBundle(e0,_e,i0){let r0=promises[_e];if(r0)i0&&r0.then(i0).catch(i0);else{let t0=new Promisified;promises[_e]=t0.promise;let n0={};e0&&(n0["Accept-Language"]=e0),this.http.get(_e,{headers:n0}).then(s0=>{Object.assign(bundle,s0),typeof i0=="function"&&i0(),t0.resolve()}).catch(s0=>{typeof i0=="function"&&i0(),t0.reject()})}}addTranslations(e0,_e){notify.onLangReady().promise.then(i0=>{this.loadBundle(i0,e0+"/"+i0+".json",_e)})}addAllTranslations(e0){return e0&&e0.length>0?notify.onLangReady().promise.then(_e=>Promise.all(e0.map(i0=>this.loadBundlePromise(_e,i0+"/"+_e+".json")))).then(()=>{}):Promise.reject()}addKeys(e0){for(let _e in e0)typeof bundle[_e]!="string"&&(bundle[_e]=e0[_e])}removeAccents(e0){for(let _e=0;_e<defaultDiacriticsRemovalMap.length;_e++)e0=e0.replace(defaultDiacriticsRemovalMap[_e].letters,defaultDiacriticsRemovalMap[_e].base);return e0}};function toRelativePath(e0,_e){let i0=`/remote.php/dav/files/${_e}`,r0=e0.startsWith(i0)?e0.slice(i0.length):e0;return decodeURIComponent(r0||"/")}function toNextcloudDocument(e0,_e){return{path:toRelativePath(e0.path,_e),name:decodeURIComponent(e0.displayname),ownerDisplayName:e0.ownerDisplayName,contentType:e0.contentType,size:e0.size,favorite:e0.favorite,etag:e0.etag,fileId:e0.fileId,isFolder:e0.isFolder,lastModified:e0.lastModified}}var NextcloudService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}async listDocuments(e0,_e){return(await this.http.get(`/nextcloud/files/user/${e0}`,{queryParams:_e?{path:_e}:void 0})).data.map(i0=>toNextcloudDocument(i0,e0))}async copyDocumentToWorkspace(e0,_e,i0,r0){let t0=_e.map(n0=>`path=${encodeURIComponent(n0)}`).join("&");return(await this.http.put(`/nextcloud/files/user/${e0}/copy/workspace?${t0}`,void 0,{queryParams:{...i0?{parentId:i0}:{},...r0!=null&&r0.application?{application:r0.application}:{},...(r0==null?void 0:r0.visibility)==="protected"?{protected:!0}:{}}})).data.filter(n0=>!!(n0!=null&&n0._id))}async createFolder(e0,_e){await this.http.post(`/nextcloud/files/user/${e0}/create/folder`,void 0,{queryParams:{path:_e}})}async getOauth2Status(e0){return this.http.get(`/nextcloud/user/${e0}/oauth2/status`)}getFileUrl(e0,_e){return`/nextcloud/files/user/${e0}/file/${encodeURIComponent(_e.name)}/download?path=${encodeURIComponent(_e.path)}&contentType=${encodeURIComponent(_e.contentType??"")}&isFolder=${_e.isFolder}`}},AbstractBehaviourService=class{constructor(e0){Z0(this,"context");Z0(this,"_cache");this.context=e0,this._cache=new CacheService(this.context)}getApplication(){return this.APP}getResourceType(){return this.RESOURCE}httpGet(e0,_e){return this._cache.httpGetJson(e0,_e)}dataToResource({modified:e0,..._e}){let i0=typeof e0=="string"?e0:e0!=null&&e0.$date?""+e0.$date:"";return{application:this.RESOURCE,name:_e.title,creatorId:_e.owner,creatorName:_e.ownerName,thumbnail:_e.icon,assetId:_e._id,modifiedAt:i0,shared:_e.shared,path:_e.path}}},ActualitesBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","actualites");Z0(this,"RESOURCE","actualites")}async loadResources(){let[_e,i0]=await Promise.all([this.httpGet("/actualites/api/v1/infos/linker"),this.httpGet("/actualites/api/v1/threads")]),r0=i0.reduce((t0,n0)=>t0.set(n0.id,n0),new Map);return _e.map(t0=>{var s0;let n0;return n0=t0.threadIcon?t0.threadIcon+"?thumbnail=48x48":"/img/icons/glyphicons_036_file.png",this.dataToResource({title:t0.title+" ["+((s0=r0.get(t0.threadId))==null?void 0:s0.title)+"]",ownerName:t0.owner.displayName,owner:t0.owner.id,icon:n0,path:"/actualites/threads/"+t0.threadId+"?info="+t0.id,_id:`${t0.threadId}#${t0.id}`,shared:!!(t0.shared&&t0.shared.length>=0),modified:t0.modified})})}},hexToDataUrl=(e0,_e=1,i0=1)=>{let r0=document.createElement("canvas");r0.width=_e,r0.height=i0;let t0=r0.getContext("2d");return t0?(t0.fillStyle=e0,t0.fillRect(0,0,_e,i0),r0.toDataURL("image/png")):""},AppointmentsBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","appointments");Z0(this,"RESOURCE","appointments")}async loadResources(){return(await this.httpGet("/appointments/grids/linker")).map(_e=>this.dataToResource({_id:_e.id.toString(),icon:hexToDataUrl(_e.color,100,100),title:_e.name,ownerName:_e.ownerName,owner:_e.ownerId,path:`${window.location.origin}/appointments#?gridId=${_e.id}`,shared:!1,modified:_e.updatingDate}))}},BlogBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","blog");Z0(this,"RESOURCE","blog")}loadResources(){return new Promise(async(_e,i0)=>{try{let r0=await this.httpGet("/blog/linker"),t0=[];r0.forEach(n0=>{n0.thumbnail?n0.thumbnail+="?thumbnail=48x48":n0.thumbnail="/img/illustrations/blog.svg";let s0=n0.fetchPosts.map(o0=>this.dataToResource({owner:n0.author.userId,ownerName:n0.author.username,title:o0.title+" ["+n0.title+"]",_id:`${n0._id}#${o0._id}`,icon:n0.thumbnail,path:`/blog/id/${n0._id}/post/${o0._id}`,shared:!!(n0.shared&&n0.shared.length>=0),modified:n0.modified}));t0.push(...s0)}),_e(t0)}catch(r0){i0(r0)}})}},CollaborativewallBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","collaborativewall");Z0(this,"RESOURCE","collaborativewall")}async loadResources(){return(await this.httpGet("/collaborativewall/list/all")).map(_e=>this.dataToResource({title:_e.name,ownerName:_e.owner.displayName,owner:_e.owner.userId,icon:_e.icon?_e.icon:"/img/illustrations/collaborative-wall-default.png",path:"/collaborativewall#/view/"+_e._id,_id:_e._id,shared:!!(_e.shared&&_e.shared.length>=0),modified:_e.modified}))}},CommunityBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","community");Z0(this,"RESOURCE","community")}async loadResources(){return(await this.httpGet("/community/listallpages")).map(_e=>{let i0;return i0=_e.thumbnail===void 0||_e.thumbnail===""?"/img/icons/glyphicons_036_file.png":_e.thumbnail+"?thumbnail=48x48",this.dataToResource({title:_e.name,icon:i0,path:"/community#/view/"+_e.id,_id:_e.id,owner:"",ownerName:"",shared:!!(_e.shared&&_e.shared.length>=0),modified:_e.name})})}},ExercizerBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","exercizer");Z0(this,"RESOURCE","exercizer")}async loadResources(){return(await this.httpGet("/exercizer/subjects-scheduled")).map(_e=>{let i0=_e.picture?_e.picture+"?thumbnail=48x48":"/img/illustrations/exercizer.svg",r0,t0=!1,n0=JSON.parse(_e.scheduled_at);return n0.groupList.length>0?(t0=!0,r0=n0.groupList[0].name):n0.userList.length>0?(t0=!0,r0=n0.userList[0].name):r0="",n0.groupList.length+n0.userList.length>1&&(r0+="..."),this.dataToResource({title:_e.title,owner:_e.owner,ownerName:r0,icon:i0,path:"/exercizer#/linker/"+_e.id,_id:""+_e.id,shared:t0,modified:_e.modified})})}},FormulaireBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","formulaire");Z0(this,"RESOURCE","formulaire")}async loadResources(){return(await this.httpGet("/formulaire/forms/linker")).map(_e=>(_e.picture||(_e.picture="/formulaire/public/img/logo.svg"),this.dataToResource({_id:""+_e.id,icon:_e.picture,title:_e.title,ownerName:_e.owner_name,owner:_e.owner_id,path:_e.is_public?`${window.location.origin}/formulaire-public#/form/${_e.public_key}`:`${window.location.origin}/formulaire#/form/${_e.id}/${_e.rgpd?"rgpd":"new"}`,shared:!!(_e.shared&&_e.shared.length>=0),modified:""+_e.date_modification})))}},ForumBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","forum");Z0(this,"RESOURCE","forum")}async loadResources(){return(await this.httpGet("/forum/categories")).map(_e=>this.dataToResource({_id:_e._id,title:_e.name,icon:_e.icon||"/img/illustrations/forum.svg",path:"/forum#/view/"+_e._id,ownerName:_e.owner.displayName,owner:_e.owner.userId,shared:!!(_e.shared&&_e.shared.length>=0),modified:_e.modified}))}},HomeworksBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","homeworks");Z0(this,"RESOURCE","homeworks")}async loadResources(){return(await this.httpGet("/homeworks/list")).filter(_e=>_e.owner&&_e.trashed===0).map(_e=>this.dataToResource({title:_e.title,ownerName:_e.owner.displayName,owner:_e.owner.userId,icon:_e.thumbnail||"/img/illustrations/homeworks.svg",path:"/homeworks#/view-homeworks/"+_e._id,_id:""+_e._id,shared:_e.shared!==void 0,modified:_e.modified}))}},MagnetoBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","magneto");Z0(this,"RESOURCE","magneto")}async loadResources(){let{all:_e}=await this.httpGet("/magneto/boards/editable");return _e.map(i0=>this.dataToResource({_id:i0._id,title:i0.title,icon:i0.imageUrl,owner:i0.ownerId,ownerName:i0.ownerName,path:`/magneto#/board/${i0._id}/view`,shared:!!(i0.shared&&i0.shared.length>=0),modified:""+i0.modificationDate}))}},MindmapBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","mindmap");Z0(this,"RESOURCE","mindmap")}async loadResources(){return(await this.httpGet("/mindmap/list/all")).map(_e=>this.dataToResource({title:_e.name,ownerName:_e.owner.displayName,owner:_e.owner.userId,icon:_e.thumbnail||"/img/illustrations/mindmap-default.png",path:"/mindmap#/view/"+_e._id,_id:_e._id,shared:!!(_e.shared&&_e.shared.length>=0),modified:_e.modified}))}},PagesBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","pages");Z0(this,"RESOURCE","pages")}async loadResources(){let _e=await this.httpGet("/pages/list/all"),i0=[];return _e.forEach(r0=>{var n0;let t0=r0.thumbnail?r0.thumbnail+"?thumbnail=48x48":"/img/illustrations/pages.svg";i0.push(this.dataToResource({title:r0.title,owner:r0.owner.userId,ownerName:r0.owner.displayName,icon:t0,path:"/pages#/website/"+r0._id,_id:r0._id,shared:r0.shared!==void 0,modified:r0.modified})),(n0=r0.pages)==null||n0.forEach(s0=>{i0.push(this.dataToResource({title:s0.title,owner:r0.owner.userId,ownerName:r0.owner.displayName,icon:t0,path:"/pages#/website/"+r0._id+"/"+s0.titleLink,_id:r0._id+"/"+s0.titleLink,shared:r0.shared!==void 0,modified:r0.modified}))})}),i0}},PollBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","poll");Z0(this,"RESOURCE","poll")}async loadResources(){return(await this.httpGet("/poll/list/all")).map(_e=>{let i0=_e.icon?_e.icon+"?thumbnail=48x48":"/img/icons/glyphicons_036_file.png";return this.dataToResource({title:_e.question,ownerName:_e.owner.displayName,icon:i0,path:"/poll#/view/"+_e._id,_id:_e._id,owner:_e.owner.userId,shared:!!(_e.shared&&_e.shared.length>=0),modified:_e.modified})})}},ScrapbookBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","scrapbook");Z0(this,"RESOURCE","scrapbook")}async loadResources(){return(await this.httpGet("/scrapbook/list/all")).map(_e=>{let i0=_e.icon||"/img/illustrations/scrapbook.svg";return this.dataToResource({title:_e.name,owner:_e.owner.userId,ownerName:_e.owner.displayName,icon:i0,path:"/scrapbook#/view-scrapbook/"+_e._id,_id:_e._id,shared:!!(_e.shared&&_e.shared.length>=0),modified:_e.modified})})}},TimelinegeneratorBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","timelinegenerator");Z0(this,"RESOURCE","timelinegenerator")}loadResources(){return new Promise(async(_e,i0)=>{try{_e((await this.httpGet("/timelinegenerator/timelines")).map(r0=>{let t0=r0.icon||"/img/illustrations/timeline-default.png";return this.dataToResource({title:r0.headline,ownerName:r0.owner.displayName,owner:r0.owner.userId,icon:t0,path:"/timelinegenerator#/view/"+r0._id,_id:r0._id,shared:r0.shared!==void 0,modified:r0.modified})}))}catch(r0){i0(r0)}})}},WikiBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","wiki");Z0(this,"RESOURCE","wiki")}async loadResources(){return(await this.httpGet("/wiki/listallpages?visible=true")).map(_e=>_e.pages.map(i0=>{let r0;return r0=_e.thumbnail===void 0||_e.thumbnail===""?"/img/icons/glyphicons_036_file.png":_e.thumbnail+"?thumbnail=48x48",this.dataToResource({title:i0.title+" ["+_e.title+"]",ownerName:_e.owner.displayName,owner:_e.owner.userId,icon:r0,path:"/wiki#/view/"+_e._id+"/"+i0._id,_id:`${_e._id}#${i0._id}`,shared:_e.shared!==void 0,modified:i0.modified})})).flat()}},WorkspaceBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","workspace");Z0(this,"RESOURCE","workspace")}loadResources({search:_e,asset_id:i0}){return new Promise(async(r0,t0)=>{try{let n0="/workspace/documents?filter=all&hierarchical=true";(i0&&i0.length||_e&&_e.length)&&(n0+=`&search=${_e}`),r0((await this.httpGet(n0)).filter(s0=>!s0.deleted).map(s0=>{let o0=s0.metadata["content-type"]&&s0.metadata["content-type"].indexOf("image")!==-1?`/workspace/document/${s0._id}?thumbnail=120x120`:"/img/icons/unknown-large.png";return this.dataToResource({title:s0.name,ownerName:s0.ownerName,owner:s0.owner,icon:o0,path:`/workspace/document/${s0._id}`,_id:s0._id,shared:!!(s0.shared&&s0.shared.length>=0),modified:s0.modified})}))}catch(n0){t0(n0)}})}},Z2,SnipletsService=(Z2=class{static async initialize(_e,i0){let r0=_e.http();if(!this.resourceProducingApps.length){this.resourceProducingApps=[i0,"workspace"];try{let[t0,n0]=await Promise.all([r0.get("/resources-applications"),_e.session().getUser()]);n0!=null&&n0.apps&&(t0!=null&&t0.length)&&(this.resourceProducingApps=t0.filter(s0=>n0.apps.some(o0=>o0.address.includes(s0))))}catch(t0){console.warn("Failed to load resource-producing apps:",t0)}}return this.resourceProducingApps}static registerCustomBehaviour(_e,i0,r0){this.registry.register({application:_e,resourceType:i0},r0)}static async registerBehaviours(_e){this.resourceProducingApps.forEach(i0=>{let r0={application:_e,resourceType:i0};this.registry.register(r0,t0=>this.serviceFor(t0,_e,i0))})}static serviceFor(_e,i0,r0){let t0;switch(r0){case"timelinegenerator":t0=new TimelinegeneratorBehaviour(_e);break;case"workspace":t0=new WorkspaceBehaviour(_e);break;case"blog":t0=new BlogBehaviour(_e);break;case"actualites":t0=new ActualitesBehaviour(_e);break;case"wiki":t0=new WikiBehaviour(_e);break;case"pages":t0=new PagesBehaviour(_e);break;case"poll":t0=new PollBehaviour(_e);break;case"community":t0=new CommunityBehaviour(_e);break;case"mindmap":t0=new MindmapBehaviour(_e);break;case"forum":t0=new ForumBehaviour(_e);break;case"homeworks":t0=new HomeworksBehaviour(_e);break;case"scrapbook":t0=new ScrapbookBehaviour(_e);break;case"collaborativewall":t0=new CollaborativewallBehaviour(_e);break;case"exercizer":t0=new ExercizerBehaviour(_e);break;case"formulaire":t0=new FormulaireBehaviour(_e);break;case"magneto":t0=new MagnetoBehaviour(_e);break;case"appointments":t0=new AppointmentsBehaviour(_e);break;default:throw ERROR_CODE.NOT_SUPPORTED}return t0.APP=i0,t0}},Z0(Z2,"registry",new ServiceRegistry),Z0(Z2,"findBehaviour",Z2.registry.findService.bind(Z2.registry)),Z0(Z2,"hasBehaviour",Z2.registry.isRegistered.bind(Z2.registry)),Z0(Z2,"resourceProducingApps",[]),Z2),RightService=class{constructor(e0){Z0(this,"context");this.context=e0}get session(){return this.context.session()}parseResourceRight(e0){let _e=e0.split(":");if(_e.length===2){if(_e[0]==="creator")return{id:_e[1],right:"creator",type:"creator"}}else return _e.length===3?{id:_e[1],right:_e[2],type:_e[0]}:void 0}parseResourceRights(e0){return e0.map(_e=>this.parseResourceRight(_e)).filter(_e=>_e!==void 0)}hasResourceRight({id:e0,groupIds:_e},i0,r0){let t0=r0.map(n0=>typeof n0=="string"?this.parseResourceRight(n0):n0).filter(n0=>n0!==void 0);for(let n0 of t0){if(n0.id===e0&&n0.type==="creator")return!0;if(n0.id===e0&&n0.type==="user"&&n0.right===i0)return!0;if(_e.includes(n0.id)&&n0.type==="group"&&n0.right===i0)return!0}return!1}async sessionHasResourceRight(e0,_e){try{let i0=await this.session.getUser();return!!i0&&this.hasResourceRight({groupIds:i0.groupsIds,id:i0.userId},e0,_e)}catch(i0){return console.error(`Unexpected error ${i0} in sessionHasResourceRight()`),!1}}async sessionHasAtLeastOneResourceRight(e0,_e){for(let i0 of e0)if(await this.sessionHasResourceRight(i0,_e))return!0;return!1}async sessionHasResourceRightForEachList(e0,_e){let i0=0;for(let r0 of _e)await this.sessionHasResourceRight(e0,r0)&&i0++;return i0===_e.length}async sessionHasAtLeastOneResourceRightForEachList(e0,_e){for(let i0 of e0){let r0=0;for(let t0 of _e)await this.sessionHasResourceRight(i0,t0)&&r0++;if(r0===_e.length)return!0}return!1}hasWorkflowRight(e0,_e){return _e.findIndex(i0=>i0===e0)!==-1}async sessionHasWorkflowRight(e0){try{let _e=await this.session.getUser();return!!_e&&this.hasWorkflowRight(e0,_e.authorizedActions.map(i0=>i0.name))}catch(_e){return console.error(`Unexpected error ${_e} in sessionHasWorkflowRight()`),!1}}async sessionHasWorkflowRights(e0){let _e={};try{let i0=await this.session.getUser();for(let r0 of e0)_e[r0]=!!i0&&this.hasWorkflowRight(r0,i0.authorizedActions.map(t0=>t0.name))}catch(i0){console.error(`Unexpected error ${i0} in sessionHasWorkflowRights()`);for(let r0 of e0)_e[r0]=!1}return _e}},SessionService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}get cache(){return this.context.cache()}get conf(){return this.context.conf()}onLogout(){this.cache.clearCache()}onRefreshSession(){this.cache.clearCache()}async getSession(){let[e0,_e]=await Promise.all([this.getUser(),this.getPerson()]),[i0,r0,t0,n0,s0]=await Promise.all([this.getCurrentLanguage(e0),this.latestQuotaAndUsage(e0),this.loadDescription(e0),this.getUserProfile(),this.getBookmarks(e0)]),{type:o0,...a0}=_e||{};return{user:e0,quotaAndUsage:r0,currentLanguage:i0,userDescription:{...a0,profiles:o0||["Guest"],...t0},userProfile:n0,bookmarkedApps:s0}}login(e0,_e,i0,r0){let t0=new FormData;return t0.append("email",e0),t0.append("password",_e),i0!==void 0&&t0.append("rememberMe",""+i0),r0!==void 0&&t0.append("secureLocation",""+r0),this.http.post("/auth/login",t0,{headers:{"content-type":"application/x-www-form-urlencoded"}}).finally(()=>{switch(this.http.latestResponse.status){case 200:throw ERROR_CODE.MALFORMED_DATA}})}async logout(){let e0=await this.conf.getLogoutCallback();return this.http.get("/auth/logout?callback="+e0).finally(()=>{})}async latestQuotaAndUsage(e0){let _e={quota:0,storage:0};if(!e0)return _e;try{return await this.http.get(`/workspace/quota/user/${e0==null?void 0:e0.userId}`)}catch(i0){return console.error(i0),_e}}async getCurrentLanguage(e0){let _e=(e0==null?void 0:e0.sessionMetadata)&&(e0==null?void 0:e0.sessionMetadata.userId);try{let i0;return i0=_e?await this.loadUserLanguage():await this.loadDefaultLanguage(),i0}catch(i0){console.error(i0)}}async loadUserLanguage(){try{let e0=await this.http.get("/userbook/preference/language");return JSON.parse(e0.preference)["default-domain"]}catch{return await this.loadDefaultLanguage()}}async loadDefaultLanguage(){return(await this.cache.httpGetJson("/locale")).locale}async getUser(){let{response:e0,value:_e}=await this.cache.httpGet("/auth/oauth2/userinfo");if(!(e0.status<200||e0.status>=300)&&typeof _e=="object")return _e;throw ERROR_CODE.NOT_LOGGED_IN}hasWorkflow({workflowName:e0,user:_e}){return e0===void 0||(_e==null?void 0:_e.authorizedActions.findIndex(i0=>i0.name===e0))!==-1}async loadDescription(e0){if(!e0)return{};try{let[_e,i0]=await Promise.all([this.getUserProfile({options:{requestName:"refreshAvatar"}}),this.http.get("/directory/userbook/"+(e0==null?void 0:e0.userId))]);return{...i0,profiles:_e}}catch(_e){return console.error(_e),{}}}async getBookmarks(e0){if(!e0)return[];let _e=await this.http.get("/userbook/preference/apps");_e.preference||(_e.preference=null);let i0=JSON.parse(_e.preference),r0;r0=i0,r0||(r0={bookmarks:[],applications:[]});let t0=[];return r0.bookmarks.forEach((n0,s0)=>{let o0=((e0==null?void 0:e0.apps)||[]).find(a0=>a0.name===n0);if(o0){let a0=Object.assign({},o0);t0.push(a0)}}),t0}async getUserProfile(e0={}){var _e;return((_e=await this.getPerson(e0))==null?void 0:_e.type)||["Guest"]}async getPerson(e0={}){var o0;let{options:_e={},params:i0={}}=e0,r0=new URLSearchParams(i0).toString(),t0=`/userbook/api/person${r0?`?${r0}`:""}`,{response:n0,value:s0}=await this.cache.httpGet(t0,_e);return n0.status<200||n0.status>=300||typeof s0=="string"?null:((o0=s0==null?void 0:s0.result)==null?void 0:o0[0])||null}async isAdml(){var e0;return((e0=await this.getUser())==null?void 0:e0.functions.ADMIN_LOCAL)!==void 0}async getWebApp(e0){var _e;return(_e=await this.getUser())==null?void 0:_e.apps.find(i0=>{var r0;return i0!=null&&i0.prefix?(i0==null?void 0:i0.prefix.replace("/",""))===e0||!1:(i0==null?void 0:i0.address)&&((r0=i0.address)==null?void 0:r0.split("/")[1])===e0||!1})}},StringUtils=class{static removeAccents(e0){for(let _e=0;_e<defaultDiacriticsRemovalMap.length;_e++)e0=e0.replace(defaultDiacriticsRemovalMap[_e].letters,defaultDiacriticsRemovalMap[_e].base);return e0}},ShareService=class{constructor(e0){Z0(this,"context");this.context=e0}get directory(){return this.context.directory()}get http(){return this.context.http()}get cache(){return this.context.cache()}getSearchUrl(e0,_e,i0,r0){if(!r0)return`/${e0}/share/json/${_e}?search=${i0}`;if(r0.includes("?search=")){let[t0]=r0.split("?search=");return`${t0}?search=${i0}`}else return r0.includes("?")?`${r0}&search=${i0}`:`${r0}?search=${i0}`}async searchShareSubjects(e0,_e,i0,r0){let t0=StringUtils.removeAccents(i0).toLowerCase(),n0=this.getSearchUrl(e0,_e,i0,r0),s0=await this.cache.httpGetJson(n0),o0=s0.users.visibles.filter(({username:f0,firstName:l0,lastName:u0,login:A0})=>{let c0=StringUtils.removeAccents(u0||"").toLowerCase(),k0=StringUtils.removeAccents(l0||"").toLowerCase(),d0=StringUtils.removeAccents(f0||"").toLowerCase(),h0=StringUtils.removeAccents(A0||"").toLowerCase();return d0.includes(t0)||k0.includes(t0)||c0.includes(t0)||h0.includes(t0)}).map(f0=>({avatarUrl:this.directory.getAvatarUrl(f0.id,"user"),directoryUrl:this.directory.getDirectoryUrl(f0.id,"user"),displayName:f0.username,id:f0.id,profile:f0.profile,type:"user"})),a0=s0.groups.visibles.filter(({name:f0})=>StringUtils.removeAccents(f0||"").toLowerCase().includes(t0)).map(f0=>({avatarUrl:this.directory.getAvatarUrl(f0.id,"group"),directoryUrl:this.directory.getDirectoryUrl(f0.id,"group"),displayName:f0.name,id:f0.id,type:"group",structureName:f0.structureName}));return[...(await this.directory.getBookMarks()).filter(({displayName:f0})=>StringUtils.removeAccents(f0||"").toLowerCase().includes(t0)).map(f0=>({avatarUrl:"",directoryUrl:"",profile:"",displayName:f0.displayName,id:f0.id,type:"sharebookmark"})),...o0,...a0]}async getShareMapping(e0,_e){let i0=await this.cache.httpGetJson(_e||`/${e0}/rights/sharing`);for(let r0 of Object.keys(i0))if(r0.includes(".")){let t0=r0.split(".")[1],n0=i0[r0];delete i0[r0],i0[t0]=n0}return i0}getActionsAvailableFor({id:e0,type:_e},i0,r0){let t0=(_e==="user"?i0.users.checked[e0]:i0.groups.checked[e0])||[],n0=Object.keys(r0),s0=[];for(let o0 of n0)r0[o0].filter(a0=>t0.includes(a0)).length>0&&s0.push(o0);return s0}async getRightsForResource(e0,_e,i0){let r0=await this.directory.getBookMarks(),t0=this.getSearchUrl(e0,_e,"",i0==null?void 0:i0.getResourceRights),n0=await this.cache.httpGetJson(t0),s0=await this.getShareMapping(e0,i0==null?void 0:i0.getShareMapping),o0=await this.cache.httpGetJson("/infra/public/json/sharing-rights.json"),a0=Object.keys(n0.users.checked).map(l0=>n0.users.visibles.find(u0=>u0.id===l0)).filter(l0=>l0!==void 0).map(l0=>{let u0=this.getActionsAvailableFor({id:l0.id,type:"user"},n0,s0);return{id:l0.id,type:"user",displayName:l0.username,profile:l0.profile,avatarUrl:this.directory.getAvatarUrl(l0.id,"user"),directoryUrl:this.directory.getDirectoryUrl(l0.id,"user"),actions:u0.map(A0=>({displayName:A0,id:A0,priority:o0[A0].priority}))}}).sort((l0,u0)=>(l0.displayName||"").localeCompare(u0.displayName)),f0=Object.keys(n0.groups.checked).map(l0=>n0.groups.visibles.find(u0=>u0.id===l0)).filter(l0=>l0!==void 0).map(l0=>{let u0=this.getActionsAvailableFor({id:l0.id,type:"group"},n0,s0);return{id:l0.id,type:"group",displayName:l0.name,profile:void 0,avatarUrl:this.directory.getAvatarUrl(l0.id,"group"),directoryUrl:this.directory.getDirectoryUrl(l0.id,"group"),actions:u0.map(A0=>({displayName:A0,id:A0,priority:o0[A0].priority}))}}).sort((l0,u0)=>(l0.displayName||"").localeCompare(u0.displayName));return{rights:[...a0,...f0],visibleBookmarks:r0,visibleGroups:n0.groups.visibles.map(({groupDisplayName:l0,id:u0,name:A0,labels:c0})=>({labels:c0,displayName:l0||A0,id:u0})),visibleUsers:n0.users.visibles.map(({id:l0,profile:u0,username:A0,firstName:c0,lastName:k0,login:d0})=>({displayName:A0,firstName:c0,lastName:k0,login:d0,profile:u0,id:l0}))}}async getPutSharePayload(e0,_e,i0){let r0={users:{},groups:{},bookmarks:{}},t0=await this.getShareMapping(e0,i0);for(let n0 of _e){let s0=n0.actions.map(a0=>t0[a0.id]).reduce((a0,f0)=>Array.isArray(f0)?[...a0,...f0]:a0,[]),o0=[...new Set(s0)];o0.length>0&&(n0.type==="user"?r0.users[n0.id]=o0:n0.type==="group"?r0.groups[n0.id]=o0:r0.bookmarks[n0.id]=o0)}return r0}async saveRights(e0,_e,i0,r0){let t0=await this.getPutSharePayload(e0,i0,r0==null?void 0:r0.getShareMapping),n0=(r0==null?void 0:r0.saveResourceRights)||`/${e0}/share/resource/${_e}`,s0=this.getSearchUrl(e0,_e,"",r0==null?void 0:r0.getResourceRights);return this.cache.clearCache(s0),await this.http.putJson(n0,t0)}async getActionsForApp(e0,_e){let i0=await this.cache.httpGetJson("/infra/public/json/sharing-rights.json"),r0=await this.getShareMapping(e0,_e);return Object.keys(i0).map(t0=>{let n0=i0[t0];return{displayName:t0,id:t0,priority:n0.priority,requires:n0.requires}}).filter(t0=>{var n0;return((n0=r0[t0.id])==null?void 0:n0.length)>0}).sort((t0,n0)=>t0.priority-n0.priority)}},loadedScripts={},HttpService=class{constructor(e0,_e){Z0(this,"context");Z0(this,"axios");Z0(this,"baseUrl");Z0(this,"headers",{});Z0(this,"_latestResponse");this.context=e0,this.axios=axios.create(_e)}fixBaseUrl(e0){return e0.startsWith("http://")||e0.startsWith("https://")?e0:this.baseUrl?this.baseUrl.endsWith("/")||e0.startsWith("/")?`${this.baseUrl}${e0}`:`${this.baseUrl}/${e0}`:e0}useBaseUrl(e0){return this.baseUrl=e0,this}useHeaders(e0){return this.headers=e0,this}setCdn(e0){e0&&XMLHttpRequest&&!XMLHttpRequest.prototype.cdnUrl&&(XMLHttpRequest.prototype.cdnUrl=e0,XMLHttpRequest.prototype.baseOpen=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(){let _e=arguments[1];return _e.startsWith("/infra/public")&&(arguments[1]=e0+_e),/^\/([^\/]*)\/public/.test(_e)&&(arguments[1]=e0+_e),_e.startsWith("/assets")&&(arguments[1]=e0+_e),_e=="/conf/public"&&(arguments[1]=_e),_e.startsWith("http")&&(arguments[1]=_e),this.baseOpen.apply(this,arguments)})}toAxiosConfig(e0){if(e0){let _e=Object.assign({},this.axios.defaults);return e0.headers&&(_e.headers=Object.assign({},this.axios.defaults.headers),Object.assign(_e.headers,e0.headers)),e0.responseType&&(_e.responseType=e0.responseType),e0.queryParams&&(_e.params=Object.assign({},e0.queryParams)),_e.headers={..._e.headers??{},...this.headers},_e}else return this.axios.defaults}toCdnUrl(e0){e0=this.fixBaseUrl(e0);let _e=this.context.conf().getCdnUrl()||"";if(_e.length>0&&e0!=="/conf/public"){let i0=""+e0;(i0.startsWith("/infra/public")||i0.startsWith("/assets")||/^\/([^\/]*)\/public/.test(i0))&&(e0=_e+i0)}return e0}mapAxiosError(e0,_e){e0.response?this._latestResponse=e0.response:e0.request?this._latestResponse={status:408,statusText:ERROR_CODE.TIME_OUT}:this._latestResponse={status:500,statusText:ERROR_CODE.UNKNOWN};let{status:i0,statusText:r0,headers:t0,data:n0}=this._latestResponse;return _e!=null&&_e.disableNotifications||notify.events().publish(LAYER_NAME.TRANSPORT,{name:EVENT_NAME.ERROR_OCCURED,data:{params:_e,response:{status:i0,statusText:r0,headers:t0},payload:n0}}),n0}mapAxiosResponse(e0,_e){return this._latestResponse=e0,e0.data}get latestResponse(){return this._latestResponse}isResponseError(){return this.latestResponse.status<200||this.latestResponse.status>=300}async get(e0,_e){try{let i0=await this.axios.get(this.toCdnUrl(e0),this.toAxiosConfig(_e));return this.mapAxiosResponse(i0,_e)}catch(i0){throw this.mapAxiosError(i0,_e)}}async post(e0,_e,i0){try{let r0=await this.axios.post(this.fixBaseUrl(e0),_e,this.toAxiosConfig(i0));return this.mapAxiosResponse(r0,i0)}catch(r0){throw this.mapAxiosError(r0,i0)}}async postFile(e0,_e,i0){let r0=this.toAxiosConfig(i0);r0.headers&&r0.headers["Content-Type"]&&delete r0.headers["Content-Type"];try{let t0=await this.axios.post(this.fixBaseUrl(e0),_e,{...r0,headers:{"Content-Type":"multipart/form-data"}});return this.mapAxiosResponse(t0,i0)}catch(t0){throw this.mapAxiosError(t0,i0)}}async postJson(e0,_e,i0){let r0=this.toAxiosConfig();r0.headers&&(r0.headers["Content-Type"]="application/json");try{let t0=await this.axios.post(this.fixBaseUrl(e0),_e,this.toAxiosConfig(i0));return this.mapAxiosResponse(t0,i0)}catch(t0){throw this.mapAxiosError(t0,i0)}}async put(e0,_e,i0){try{let r0=await this.axios.put(this.fixBaseUrl(e0),_e,this.toAxiosConfig(i0));return this.mapAxiosResponse(r0,i0)}catch(r0){throw this.mapAxiosError(r0,i0)}}async putFile(e0,_e,i0){try{let r0=this.toAxiosConfig(i0);r0.headers&&r0.headers["Content-Type"]&&delete r0.headers["Content-Type"];let t0=await this.axios.put(this.fixBaseUrl(e0),_e,{...r0,headers:{"Content-Type":"multipart/form-data"}});return this.mapAxiosResponse(t0,i0)}catch(r0){throw this.mapAxiosError(r0,i0)}}async putJson(e0,_e,i0){let r0=this.toAxiosConfig(i0);r0.headers&&(r0.headers["Content-Type"]="application/json");try{let t0=await this.axios.put(this.fixBaseUrl(e0),_e,r0);return this.mapAxiosResponse(t0,i0)}catch(t0){throw this.mapAxiosError(t0,i0)}}async patch(e0,_e,i0){try{let r0=await this.axios.patch(this.fixBaseUrl(e0),_e,this.toAxiosConfig(i0));return this.mapAxiosResponse(r0,i0)}catch(r0){throw this.mapAxiosError(r0,i0)}}async patchFile(e0,_e,i0){try{let r0=this.toAxiosConfig(i0);r0.headers&&r0.headers["Content-Type"]&&delete r0.headers["Content-Type"];let t0=await this.axios.patch(this.fixBaseUrl(e0),_e,{...r0,headers:{"Content-Type":"multipart/form-data"}});return this.mapAxiosResponse(t0,i0)}catch(r0){throw this.mapAxiosError(r0,i0)}}async patchJson(e0,_e,i0){let r0=this.toAxiosConfig(i0);r0.headers&&(r0.headers["Content-Type"]="application/json");try{let t0=await this.axios.patch(this.fixBaseUrl(e0),_e,r0);return this.mapAxiosResponse(t0,i0)}catch(t0){throw this.mapAxiosError(t0,i0)}}async delete(e0,_e){try{let i0=await this.axios.delete(this.fixBaseUrl(e0),this.toAxiosConfig(_e));return this.mapAxiosResponse(i0,_e)}catch(i0){throw this.mapAxiosError(i0,_e)}}async deleteJson(e0,_e){try{let i0=await this.axios.delete(this.fixBaseUrl(e0),{data:_e});return this.mapAxiosResponse(i0)}catch(i0){throw this.mapAxiosError(i0)}}getScript(e0,_e,i0){let r0=i0??"exports",t0=this.toAxiosConfig(_e);return t0.headers&&(t0.headers.Accept="application/javascript"),this.axios.get(this.toCdnUrl(e0),t0).then(n0=>this.mapAxiosResponse(n0,_e)).then(n0=>{try{let s0=`"use strict";var ${r0.split(".")[0]}={};${n0};return ${r0};`;return Function(s0)()}catch{return n0}}).catch(n0=>{throw this.mapAxiosError(n0,_e),n0})}loadScript(e0,_e){return loadedScripts[e0]?Promise.resolve():this.getScript(e0,_e).then(i0=>{loadedScripts[e0]=!0})}},lr,VideoService=(lr=class{constructor(_e){Z0(this,"context");this.context=_e}get http(){return this.context.http()}get conf(){return this.context.conf()}async getVideoConf(){var i0;let _e=await this.conf.getPublicConf(APP$1.VIDEO);return{maxWeight:(_e==null?void 0:_e["max-videosize-mbytes"])??lr.MAX_WEIGHT,maxDuration:(_e==null?void 0:_e["max-videoduration-minutes"])??lr.MAX_DURATION,acceptVideoUploadExtensions:((i0=_e==null?void 0:_e["accept-videoupload-extensions"])==null?void 0:i0.map(r0=>r0.toUpperCase()))??[]}}async upload({data:_e,appCode:i0,captation:r0,duration:t0}){if(!_e.file)throw Error("Invalid video file.");if(!_e.filename)throw Error("Invalid video filename");let n0=`${_e.browser.name} ${_e.browser.version}`,s0=new FormData;s0.append("device",_e.device||""),s0.append("browser",n0),s0.append("url",_e.url),s0.append("app",i0),s0.append("file",_e.file,_e.filename),s0.append("weight",""+_e.file.size),s0.append("captation",""+r0);let o0=`/video/encode?captation=${r0}`;t0&&(o0+=`&duration=${t0}`);let a0=await this.http.post(o0,s0,{headers:{"Content-Type":"multipart/form-data"}});if(a0.state=="running"){let f0=0,l0=1;do{let u0=l0+f0;await new Promise(c0=>setTimeout(c0,u0*1e3)),f0=l0,l0=Math.min(8,u0);let A0=await this.http.get(`/video/status/${a0.processid}`);if(A0.state=="succeed")return A0.videoworkspaceid&&A0.videosize&&this.context.data().trackVideoSave(A0.videoworkspaceid,Math.round(t0),A0.videosize,r0,_e.url,n0,_e.device),A0;if(A0.state=="error")break}while(!0)}throw Error("Video cannot be uploaded.")}},Z0(lr,"MAX_WEIGHT",50),Z0(lr,"MAX_DURATION",3),lr),WidgetService=class{constructor(e0){Z0(this,"context");this.context=e0}get session(){return this.context.session()}async getSystemWidgets(){var e0;try{return(e0=await this.session.getUser())==null?void 0:e0.widgets}catch(_e){throw console.error("[WidgetService] getSystemWidgets failed",_e),_e}}async getPreferences(){return await this.context.conf().getPreference("widgets")}async setPreferences(e0){await this.context.conf().savePreference("widgets",e0)}},defaultMappers={csv:function({type:e0,extension:_e}){return e$6.INSTANCE.isCsvLike(e0,_e)},doc:function({type:e0,extension:_e}){return e$6.INSTANCE.isWordLike(e0,_e)?!0:e0.indexOf("document")!==-1&&e0.indexOf("wordprocessing")!==-1},xls:function({type:e0,extension:_e}){return e$6.INSTANCE.isExcelLike(e0,_e)?!0:e0.indexOf("document")!==-1&&e0.indexOf("spreadsheet")!==-1||e0.indexOf("ms-excel")!==-1},img:function({type:e0}){return e0.indexOf("image")!==-1},pdf:function({type:e0}){return e0.indexOf("pdf")!==-1||e0==="application/x-download"},ppt:function({type:e0,extension:_e}){return e$6.INSTANCE.isPowerpointLike(e0,_e)?!0:e0.indexOf("document")!==-1&&e0.indexOf("presentation")!==-1||e0.indexOf("powerpoint")!==-1},txt:function({type:e0,extension:_e}){return e$6.INSTANCE.isTxtLike(e0,_e)},md:function({type:e0,extension:_e}){return e$6.INSTANCE.isMdLike(e0,_e)},video:function({type:e0}){return e0.indexOf("video")!==-1},audio:function({type:e0}){return e0.indexOf("audio")!==-1},zip:function({type:e0}){return e0.indexOf("zip")!==-1||e0.indexOf("rar")!==-1||e0.indexOf("tar")!==-1||e0.indexOf("7z")!==-1}},Br,DocumentHelper=(Br=class{static getRole(_e){var i0,r0;return Br.role((i0=_e.metadata)==null?void 0:i0["content-type"],!1,(r0=_e.metadata)==null?void 0:r0.extension)}static role(_e,i0=!1,r0){if(r0&&(r0=r0.trim()),!_e)return"unknown";this.roleMappers||console.warn("[DocumentHelper.role] should not have empty roles",this);let t0={type:_e,previewRole:i0,extension:r0};for(let n0 of this.roleMappers){let s0=n0(t0);if(s0)return s0}return"unknown"}},Z0(Br,"roleMappers",[_e=>Object.keys(defaultMappers).find(i0=>defaultMappers[i0](_e))]),Br),WorkspaceService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}extractMetadata(e0){let _e=e0.name||"",i0=_e.split("."),r0=e0.type||"application/octet-stream",t0=i0.length>1?i0[i0.length-1]:"",n0={"content-type":r0,filename:_e,size:e0.size,extension:t0,role:DocumentHelper.role(r0,!1,t0)},s0=_e.replace("."+n0.extension,"");return{basename:s0,fullname:n0.extension?s0+"."+n0.extension:s0,metadata:n0}}async saveFile(e0,_e){let{fullname:i0,metadata:r0}=this.extractMetadata(e0),t0=new FormData;t0.append("file",e0,i0);let n0=[];((_e==null?void 0:_e.visibility)==="public"||(_e==null?void 0:_e.visibility)==="protected")&&n0.push(`${_e.visibility}=true`),_e!=null&&_e.application&&n0.push(`application=${_e.application}`),r0.role==="img"&&n0.push("quality=1"),_e!=null&&_e.parentId&&n0.push(`parentId=${_e.parentId}`);let s0=await this.http.postFile(`/workspace/document?${n0.join("&")}`,t0);if(this.http.isResponseError())throw this.http.latestResponse.statusText;return s0}async updateFile(e0,_e,i0){let{fullname:r0,metadata:t0}=this.extractMetadata(_e),n0=new FormData;n0.append("file",_e,r0);let s0=[];t0.role==="img"&&s0.push("quality=1"),i0!=null&&i0.alt&&s0.push(`alt=${i0.alt}`),i0!=null&&i0.legend&&s0.push(`legend=${i0.legend}`),i0!=null&&i0.name&&s0.push(`name=${i0.name}`);let o0=await this.http.putFile(`/workspace/document/${e0}?${s0.join("&")}`,n0);if(this.http.isResponseError())throw this.http.latestResponse.statusText;return o0}async deleteFile(e0){let _e=e0.map(i0=>i0._id);if(_e.length==0)Promise.resolve(null);else if(await this.http.deleteJson("/workspace/documents",{ids:_e}),this.http.isResponseError())throw this.http.latestResponse.statusText}async acceptDocuments(e0){let _e=await this.context.session().getUser();return i0=>i0.deleted&&i0.trasher?(_e==null?void 0:_e.userId)==i0.trasher:!0}async searchDocuments(e0){let _e=e0.filter!=="external"||e0.parentId?await this.http.get("/workspace/documents",{queryParams:{...e0,_:new Date().getTime()}}):[],i0=await this.acceptDocuments(e0);return _e.filter(i0)}async listDocuments(e0,_e){return this.searchDocuments({filter:e0,parentId:_e,includeall:!0})}async transferDocuments(e0,_e,i0="protected"){let r0=[];if(e0.forEach(t0=>{(i0==="public"&&!t0.public||!t0.public&&!t0.protected)&&r0.push(t0)}),r0.length>0){let t0=await this.http.post("/workspace/documents/transfer",{application:_e,visibility:i0,ids:r0.map(n0=>n0._id)});if(this.http.isResponseError())throw this.http.latestResponse.statusText;return r0.forEach((n0,s0)=>{let o0=e0.findIndex(a0=>a0._id===n0._id);0<=o0&&o0<e0.length&&(e0[o0]=t0[s0])}),e0.filter(n0=>!!n0)}return e0}getThumbnailUrl(e0,_e=0,i0=0){var t0,n0;let r0=_e>0||i0>0?`${_e}x${i0}`:"120x120";if(typeof e0=="string")return e0.includes("data:image")||e0.includes("thumbnail")?e0:`${e0}${e0.includes("?")?"&":"?"}thumbnail=${r0}`;{let s0=`/workspace/${e0.public?"pub/":""}document/${e0._id}?thumbnail=`,o0=e0.thumbnails;if((n0=(t0=e0.metadata)==null?void 0:t0["content-type"])!=null&&n0.includes("video")){let a0=o0&&Object.keys(o0).length>0?Object.keys(o0)[0]:null;return a0?s0+a0:null}else return s0+r0}}listFolder(e0,_e=!1,i0,r0){let t0={filter:e0,hierarchical:_e,parentId:i0,directShared:r0};return this.http.get("/workspace/folders/list",{queryParams:t0})}listOwnerFolders(e0,_e){return this.listFolder("owner",e0,_e)}listSharedFolders(e0,_e){return this.listFolder("shared",e0,_e,!0)}createFolder(e0,_e){let i0=new FormData;return i0.append("name",e0),_e&&i0.append("parentFolderId",_e),this.http.postFile("/workspace/folder",i0)}},OdeServices=class{constructor(){Z0(this,"_analytics");Z0(this,"_cache");Z0(this,"_conf");Z0(this,"_data");Z0(this,"_directory");Z0(this,"_http");Z0(this,"_idiom");Z0(this,"_nextcloud");Z0(this,"_notify");Z0(this,"_rights");Z0(this,"_session");Z0(this,"_share");Z0(this,"_video");Z0(this,"_widget");Z0(this,"_workspace");Z0(this,"_embedder");this._analytics=new AnalyticsService(this),this._cache=new CacheService(this),this._conf=new ConfService(this),this._data=new DataService(this),this._directory=new DirectoryService(this),this._http=new HttpService(this),this._idiom=new IdiomService(this),this._nextcloud=new NextcloudService(this),this._notify=NotifyFrameworkFactory.instance(),this._rights=new RightService(this),this._session=new SessionService(this),this._share=new ShareService(this),this._video=new VideoService(this),this._widget=new WidgetService(this),this._workspace=new WorkspaceService(this),this._embedder=new EmbedderService(this)}initialize(){return this._data.initialize(),this}analytics(){return this._analytics}audience(e0,_e){return new AudienceService(this,e0,_e)}cache(){return this._cache}conf(){return this._conf}data(){return this._data}directory(){return this._directory}http(){return this._http}idiom(){return this._idiom}nextcloud(){return this._nextcloud}notify(){return this._notify}resource(e0,_e){return _e?ResourceService.findService({application:e0,resourceType:_e},this):ResourceService.findMainService({application:e0},this)}behaviour(e0,_e){return SnipletsService.findBehaviour({application:e0,resourceType:_e},this)}rights(){return this._rights}session(){return this._session}share(){return this._share}video(){return this._video}widget(){return this._widget}workspace(){return this._workspace}embedder(){return this._embedder}},ACTION={OPEN:"open",MANAGE:"manage",UPD_PROPS:"properties",DELETE:"delete",RESTORE:"restore",MOVE:"move",COPY:"copy",EXPORT:"export",SHARE:"share",PRINT:"print",PUBLISH:"publish"},FOLDER={BIN:"bin",DEFAULT:"default"},SORT_ORDER={DESC:"desc"},odeServices=new OdeServices().initialize(),isActionAvailable=(e0,_e)=>{let i0=_e==null?void 0:_e.filter(r0=>r0.id===e0&&r0.available);return i0&&i0.length>0},Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e0){return this.listeners.add(e0),this.onSubscribe(),()=>{this.listeners.delete(e0),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},isServer=typeof window>"u"||"Deno"in globalThis;function noop$6(){}function functionalUpdate(e0,_e){return typeof e0=="function"?e0(_e):e0}function isValidTimeout(e0){return typeof e0=="number"&&e0>=0&&e0!==1/0}function timeUntilStale(e0,_e){return Math.max(e0+(_e||0)-Date.now(),0)}function resolveStaleTime(e0,_e){return typeof e0=="function"?e0(_e):e0}function resolveEnabled(e0,_e){return typeof e0=="function"?e0(_e):e0}function matchQuery(e0,_e){const{type:i0="all",exact:r0,fetchStatus:t0,predicate:n0,queryKey:s0,stale:o0}=e0;if(s0){if(r0){if(_e.queryHash!==hashQueryKeyByOptions(s0,_e.options))return!1}else if(!partialMatchKey(_e.queryKey,s0))return!1}if(i0!=="all"){const a0=_e.isActive();if(i0==="active"&&!a0||i0==="inactive"&&a0)return!1}return!(typeof o0=="boolean"&&_e.isStale()!==o0||t0&&t0!==_e.state.fetchStatus||n0&&!n0(_e))}function matchMutation(e0,_e){const{exact:i0,status:r0,predicate:t0,mutationKey:n0}=e0;if(n0){if(!_e.options.mutationKey)return!1;if(i0){if(hashKey(_e.options.mutationKey)!==hashKey(n0))return!1}else if(!partialMatchKey(_e.options.mutationKey,n0))return!1}return!(r0&&_e.state.status!==r0||t0&&!t0(_e))}function hashQueryKeyByOptions(e0,_e){return((_e==null?void 0:_e.queryKeyHashFn)||hashKey)(e0)}function hashKey(e0){return JSON.stringify(e0,(_e,i0)=>isPlainObject$1(i0)?Object.keys(i0).sort().reduce((r0,t0)=>(r0[t0]=i0[t0],r0),{}):i0)}function partialMatchKey(e0,_e){return e0===_e?!0:typeof e0!=typeof _e?!1:e0&&_e&&typeof e0=="object"&&typeof _e=="object"?!Object.keys(_e).some(i0=>!partialMatchKey(e0[i0],_e[i0])):!1}function replaceEqualDeep(e0,_e){if(e0===_e)return e0;const i0=isPlainArray(e0)&&isPlainArray(_e);if(i0||isPlainObject$1(e0)&&isPlainObject$1(_e)){const r0=i0?e0:Object.keys(e0),t0=r0.length,n0=i0?_e:Object.keys(_e),s0=n0.length,o0=i0?[]:{};let a0=0;for(let f0=0;f0<s0;f0++){const l0=i0?f0:n0[f0];(!i0&&r0.includes(l0)||i0)&&e0[l0]===void 0&&_e[l0]===void 0?(o0[l0]=void 0,a0++):(o0[l0]=replaceEqualDeep(e0[l0],_e[l0]),o0[l0]===e0[l0]&&e0[l0]!==void 0&&a0++)}return t0===s0&&a0===t0?e0:o0}return _e}function shallowEqualObjects(e0,_e){if(!_e||Object.keys(e0).length!==Object.keys(_e).length)return!1;for(const i0 in e0)if(e0[i0]!==_e[i0])return!1;return!0}function isPlainArray(e0){return Array.isArray(e0)&&e0.length===Object.keys(e0).length}function isPlainObject$1(e0){if(!hasObjectPrototype(e0))return!1;const _e=e0.constructor;if(_e===void 0)return!0;const i0=_e.prototype;return!(!hasObjectPrototype(i0)||!i0.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e0)!==Object.prototype)}function hasObjectPrototype(e0){return Object.prototype.toString.call(e0)==="[object Object]"}function sleep(e0){return new Promise(_e=>{setTimeout(_e,e0)})}function replaceData(e0,_e,i0){return typeof i0.structuralSharing=="function"?i0.structuralSharing(e0,_e):i0.structuralSharing!==!1?replaceEqualDeep(e0,_e):_e}function addToEnd(e0,_e,i0=0){const r0=[...e0,_e];return i0&&r0.length>i0?r0.slice(1):r0}function addToStart(e0,_e,i0=0){const r0=[_e,...e0];return i0&&r0.length>i0?r0.slice(0,-1):r0}var skipToken=Symbol();function ensureQueryFn(e0,_e){return!e0.queryFn&&(_e!=null&&_e.initialPromise)?()=>_e.initialPromise:!e0.queryFn||e0.queryFn===skipToken?()=>Promise.reject(new Error(`Missing queryFn: '${e0.queryHash}'`)):e0.queryFn}var Cr,kr,Vr,Gt,FocusManager=(Gt=class extends Subscribable{constructor(){super();l2(this,Cr);l2(this,kr);l2(this,Vr);t2(this,Vr,_e=>{if(!isServer&&window.addEventListener){const i0=()=>_e();return window.addEventListener("visibilitychange",i0,!1),()=>{window.removeEventListener("visibilitychange",i0)}}})}onSubscribe(){V0(this,kr)||this.setEventListener(V0(this,Vr))}onUnsubscribe(){var _e;this.hasListeners()||((_e=V0(this,kr))==null||_e.call(this),t2(this,kr,void 0))}setEventListener(_e){var i0;t2(this,Vr,_e),(i0=V0(this,kr))==null||i0.call(this),t2(this,kr,_e(r0=>{typeof r0=="boolean"?this.setFocused(r0):this.onFocus()}))}setFocused(_e){V0(this,Cr)!==_e&&(t2(this,Cr,_e),this.onFocus())}onFocus(){const _e=this.isFocused();this.listeners.forEach(i0=>{i0(_e)})}isFocused(){var _e;return typeof V0(this,Cr)=="boolean"?V0(this,Cr):((_e=globalThis.document)==null?void 0:_e.visibilityState)!=="hidden"}},Cr=new WeakMap,kr=new WeakMap,Vr=new WeakMap,Gt),focusManager=new FocusManager,Wr,dr,Dr,Mt,OnlineManager=(Mt=class extends Subscribable{constructor(){super();l2(this,Wr,!0);l2(this,dr);l2(this,Dr);t2(this,Dr,_e=>{if(!isServer&&window.addEventListener){const i0=()=>_e(!0),r0=()=>_e(!1);return window.addEventListener("online",i0,!1),window.addEventListener("offline",r0,!1),()=>{window.removeEventListener("online",i0),window.removeEventListener("offline",r0)}}})}onSubscribe(){V0(this,dr)||this.setEventListener(V0(this,Dr))}onUnsubscribe(){var _e;this.hasListeners()||((_e=V0(this,dr))==null||_e.call(this),t2(this,dr,void 0))}setEventListener(_e){var i0;t2(this,Dr,_e),(i0=V0(this,dr))==null||i0.call(this),t2(this,dr,_e(this.setOnline.bind(this)))}setOnline(_e){V0(this,Wr)!==_e&&(t2(this,Wr,_e),this.listeners.forEach(r0=>{r0(_e)}))}isOnline(){return V0(this,Wr)}},Wr=new WeakMap,dr=new WeakMap,Dr=new WeakMap,Mt),onlineManager=new OnlineManager;function pendingThenable(){let e0,_e;const i0=new Promise((t0,n0)=>{e0=t0,_e=n0});i0.status="pending",i0.catch(()=>{});function r0(t0){Object.assign(i0,t0),delete i0.resolve,delete i0.reject}return i0.resolve=t0=>{r0({status:"fulfilled",value:t0}),e0(t0)},i0.reject=t0=>{r0({status:"rejected",reason:t0}),_e(t0)},i0}function defaultRetryDelay(e0){return Math.min(1e3*2**e0,3e4)}function canFetch(e0){return(e0??"online")==="online"?onlineManager.isOnline():!0}var CancelledError=class extends Error{constructor(e0){super("CancelledError"),this.revert=e0==null?void 0:e0.revert,this.silent=e0==null?void 0:e0.silent}};function isCancelledError(e0){return e0 instanceof CancelledError}function createRetryer(e0){let _e=!1,i0=0,r0=!1,t0;const n0=pendingThenable(),s0=d0=>{var h0;r0||(A0(new CancelledError(d0)),(h0=e0.abort)==null||h0.call(e0))},o0=()=>{_e=!0},a0=()=>{_e=!1},f0=()=>focusManager.isFocused()&&(e0.networkMode==="always"||onlineManager.isOnline())&&e0.canRun(),l0=()=>canFetch(e0.networkMode)&&e0.canRun(),u0=d0=>{var h0;r0||(r0=!0,(h0=e0.onSuccess)==null||h0.call(e0,d0),t0==null||t0(),n0.resolve(d0))},A0=d0=>{var h0;r0||(r0=!0,(h0=e0.onError)==null||h0.call(e0,d0),t0==null||t0(),n0.reject(d0))},c0=()=>new Promise(d0=>{var h0;t0=b0=>{(r0||f0())&&d0(b0)},(h0=e0.onPause)==null||h0.call(e0)}).then(()=>{var d0;t0=void 0,r0||(d0=e0.onContinue)==null||d0.call(e0)}),k0=()=>{if(r0)return;let d0;const h0=i0===0?e0.initialPromise:void 0;try{d0=h0??e0.fn()}catch(b0){d0=Promise.reject(b0)}Promise.resolve(d0).then(u0).catch(b0=>{var w0;if(r0)return;const p0=e0.retry??(isServer?0:3),m0=e0.retryDelay??defaultRetryDelay,g0=typeof m0=="function"?m0(i0,b0):m0,v0=p0===!0||typeof p0=="number"&&i0<p0||typeof p0=="function"&&p0(i0,b0);if(_e||!v0){A0(b0);return}i0++,(w0=e0.onFail)==null||w0.call(e0,i0,b0),sleep(g0).then(()=>f0()?void 0:c0()).then(()=>{_e?A0(b0):k0()})})};return{promise:n0,cancel:s0,continue:()=>(t0==null||t0(),n0),cancelRetry:o0,continueRetry:a0,canStart:l0,start:()=>(l0()?k0():c0().then(k0),n0)}}function createNotifyManager(){let e0=[],_e=0,i0=o0=>{o0()},r0=o0=>{o0()},t0=o0=>setTimeout(o0,0);const n0=o0=>{_e?e0.push(o0):t0(()=>{i0(o0)})},s0=()=>{const o0=e0;e0=[],o0.length&&t0(()=>{r0(()=>{o0.forEach(a0=>{i0(a0)})})})};return{batch:o0=>{let a0;_e++;try{a0=o0()}finally{_e--,_e||s0()}return a0},batchCalls:o0=>(...a0)=>{n0(()=>{o0(...a0)})},schedule:n0,setNotifyFunction:o0=>{i0=o0},setBatchNotifyFunction:o0=>{r0=o0},setScheduler:o0=>{t0=o0}}}var notifyManager=createNotifyManager(),Rr,jt,Removable=(jt=class{constructor(){l2(this,Rr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.gcTime)&&t2(this,Rr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e0){this.gcTime=Math.max(this.gcTime||0,e0??(isServer?1/0:5*60*1e3))}clearGcTimeout(){V0(this,Rr)&&(clearTimeout(V0(this,Rr)),t2(this,Rr,void 0))}},Rr=new WeakMap,jt),Nr,Zr,Q2,S2,rt,Sr,L2,sr,Pt,Query=(Pt=class extends Removable{constructor(_e){super();l2(this,L2);l2(this,Nr);l2(this,Zr);l2(this,Q2);l2(this,S2);l2(this,rt);l2(this,Sr);t2(this,Sr,!1),t2(this,rt,_e.defaultOptions),this.setOptions(_e.options),this.observers=[],t2(this,Q2,_e.cache),this.queryKey=_e.queryKey,this.queryHash=_e.queryHash,t2(this,Nr,getDefaultState$1(this.options)),this.state=_e.state??V0(this,Nr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var _e;return(_e=V0(this,S2))==null?void 0:_e.promise}setOptions(_e){this.options={...V0(this,rt),..._e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&V0(this,Q2).remove(this)}setData(_e,i0){const r0=replaceData(this.state.data,_e,this.options);return k2(this,L2,sr).call(this,{data:r0,type:"success",dataUpdatedAt:i0==null?void 0:i0.updatedAt,manual:i0==null?void 0:i0.manual}),r0}setState(_e,i0){k2(this,L2,sr).call(this,{type:"setState",state:_e,setStateOptions:i0})}cancel(_e){var r0,t0;const i0=(r0=V0(this,S2))==null?void 0:r0.promise;return(t0=V0(this,S2))==null||t0.cancel(_e),i0?i0.then(noop$6).catch(noop$6):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(V0(this,Nr))}isActive(){return this.observers.some(_e=>resolveEnabled(_e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(_e=>_e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(_e=0){return this.state.isInvalidated||this.state.data===void 0||!timeUntilStale(this.state.dataUpdatedAt,_e)}onFocus(){var i0;const _e=this.observers.find(r0=>r0.shouldFetchOnWindowFocus());_e==null||_e.refetch({cancelRefetch:!1}),(i0=V0(this,S2))==null||i0.continue()}onOnline(){var i0;const _e=this.observers.find(r0=>r0.shouldFetchOnReconnect());_e==null||_e.refetch({cancelRefetch:!1}),(i0=V0(this,S2))==null||i0.continue()}addObserver(_e){this.observers.includes(_e)||(this.observers.push(_e),this.clearGcTimeout(),V0(this,Q2).notify({type:"observerAdded",query:this,observer:_e}))}removeObserver(_e){this.observers.includes(_e)&&(this.observers=this.observers.filter(i0=>i0!==_e),this.observers.length||(V0(this,S2)&&(V0(this,Sr)?V0(this,S2).cancel({revert:!0}):V0(this,S2).cancelRetry()),this.scheduleGc()),V0(this,Q2).notify({type:"observerRemoved",query:this,observer:_e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||k2(this,L2,sr).call(this,{type:"invalidate"})}fetch(_e,i0){var a0,f0,l0;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(i0!=null&&i0.cancelRefetch))this.cancel({silent:!0});else if(V0(this,S2))return V0(this,S2).continueRetry(),V0(this,S2).promise}if(_e&&this.setOptions(_e),!this.options.queryFn){const u0=this.observers.find(A0=>A0.options.queryFn);u0&&this.setOptions(u0.options)}const r0=new AbortController,t0=u0=>{Object.defineProperty(u0,"signal",{enumerable:!0,get:()=>(t2(this,Sr,!0),r0.signal)})},n0=()=>{const u0=ensureQueryFn(this.options,i0),A0={queryKey:this.queryKey,meta:this.meta};return t0(A0),t2(this,Sr,!1),this.options.persister?this.options.persister(u0,A0,this):u0(A0)},s0={fetchOptions:i0,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:n0};t0(s0),(a0=this.options.behavior)==null||a0.onFetch(s0,this),t2(this,Zr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f0=s0.fetchOptions)==null?void 0:f0.meta))&&k2(this,L2,sr).call(this,{type:"fetch",meta:(l0=s0.fetchOptions)==null?void 0:l0.meta});const o0=u0=>{var A0,c0,k0,d0;isCancelledError(u0)&&u0.silent||k2(this,L2,sr).call(this,{type:"error",error:u0}),isCancelledError(u0)||((c0=(A0=V0(this,Q2).config).onError)==null||c0.call(A0,u0,this),(d0=(k0=V0(this,Q2).config).onSettled)==null||d0.call(k0,this.state.data,u0,this)),this.scheduleGc()};return t2(this,S2,createRetryer({initialPromise:i0==null?void 0:i0.initialPromise,fn:s0.fetchFn,abort:r0.abort.bind(r0),onSuccess:u0=>{var A0,c0,k0,d0;if(u0===void 0){o0(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u0)}catch(h0){o0(h0);return}(c0=(A0=V0(this,Q2).config).onSuccess)==null||c0.call(A0,u0,this),(d0=(k0=V0(this,Q2).config).onSettled)==null||d0.call(k0,u0,this.state.error,this),this.scheduleGc()},onError:o0,onFail:(u0,A0)=>{k2(this,L2,sr).call(this,{type:"failed",failureCount:u0,error:A0})},onPause:()=>{k2(this,L2,sr).call(this,{type:"pause"})},onContinue:()=>{k2(this,L2,sr).call(this,{type:"continue"})},retry:s0.options.retry,retryDelay:s0.options.retryDelay,networkMode:s0.options.networkMode,canRun:()=>!0})),V0(this,S2).start()}},Nr=new WeakMap,Zr=new WeakMap,Q2=new WeakMap,S2=new WeakMap,rt=new WeakMap,Sr=new WeakMap,L2=new WeakSet,sr=function(_e){const i0=r0=>{switch(_e.type){case"failed":return{...r0,fetchFailureCount:_e.failureCount,fetchFailureReason:_e.error};case"pause":return{...r0,fetchStatus:"paused"};case"continue":return{...r0,fetchStatus:"fetching"};case"fetch":return{...r0,...fetchState(r0.data,this.options),fetchMeta:_e.meta??null};case"success":return{...r0,data:_e.data,dataUpdateCount:r0.dataUpdateCount+1,dataUpdatedAt:_e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!_e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const t0=_e.error;return isCancelledError(t0)&&t0.revert&&V0(this,Zr)?{...V0(this,Zr),fetchStatus:"idle"}:{...r0,error:t0,errorUpdateCount:r0.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r0.fetchFailureCount+1,fetchFailureReason:t0,fetchStatus:"idle",status:"error"};case"invalidate":return{...r0,isInvalidated:!0};case"setState":return{...r0,..._e.state}}};this.state=i0(this.state),notifyManager.batch(()=>{this.observers.forEach(r0=>{r0.onQueryUpdate()}),V0(this,Q2).notify({query:this,type:"updated",action:_e})})},Pt);function fetchState(e0,_e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:canFetch(_e.networkMode)?"fetching":"paused",...e0===void 0&&{error:null,status:"pending"}}}function getDefaultState$1(e0){const _e=typeof e0.initialData=="function"?e0.initialData():e0.initialData,i0=_e!==void 0,r0=i0?typeof e0.initialDataUpdatedAt=="function"?e0.initialDataUpdatedAt():e0.initialDataUpdatedAt:0;return{data:_e,dataUpdateCount:0,dataUpdatedAt:i0?r0??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i0?"success":"pending",fetchStatus:"idle"}}var K2,Vt,QueryCache=(Vt=class extends Subscribable{constructor(_e={}){super();l2(this,K2);this.config=_e,t2(this,K2,new Map)}build(_e,i0,r0){const t0=i0.queryKey,n0=i0.queryHash??hashQueryKeyByOptions(t0,i0);let s0=this.get(n0);return s0||(s0=new Query({cache:this,queryKey:t0,queryHash:n0,options:_e.defaultQueryOptions(i0),state:r0,defaultOptions:_e.getQueryDefaults(t0)}),this.add(s0)),s0}add(_e){V0(this,K2).has(_e.queryHash)||(V0(this,K2).set(_e.queryHash,_e),this.notify({type:"added",query:_e}))}remove(_e){const i0=V0(this,K2).get(_e.queryHash);i0&&(_e.destroy(),i0===_e&&V0(this,K2).delete(_e.queryHash),this.notify({type:"removed",query:_e}))}clear(){notifyManager.batch(()=>{this.getAll().forEach(_e=>{this.remove(_e)})})}get(_e){return V0(this,K2).get(_e)}getAll(){return[...V0(this,K2).values()]}find(_e){const i0={exact:!0,..._e};return this.getAll().find(r0=>matchQuery(i0,r0))}findAll(_e={}){const i0=this.getAll();return Object.keys(_e).length>0?i0.filter(r0=>matchQuery(_e,r0)):i0}notify(_e){notifyManager.batch(()=>{this.listeners.forEach(i0=>{i0(_e)})})}onFocus(){notifyManager.batch(()=>{this.getAll().forEach(_e=>{_e.onFocus()})})}onOnline(){notifyManager.batch(()=>{this.getAll().forEach(_e=>{_e.onOnline()})})}},K2=new WeakMap,Vt),er,j2,Tr,ir,cr,Wt,Mutation=(Wt=class extends Removable{constructor(_e){super();l2(this,ir);l2(this,er);l2(this,j2);l2(this,Tr);this.mutationId=_e.mutationId,t2(this,j2,_e.mutationCache),t2(this,er,[]),this.state=_e.state||getDefaultState(),this.setOptions(_e.options),this.scheduleGc()}setOptions(_e){this.options=_e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(_e){V0(this,er).includes(_e)||(V0(this,er).push(_e),this.clearGcTimeout(),V0(this,j2).notify({type:"observerAdded",mutation:this,observer:_e}))}removeObserver(_e){t2(this,er,V0(this,er).filter(i0=>i0!==_e)),this.scheduleGc(),V0(this,j2).notify({type:"observerRemoved",mutation:this,observer:_e})}optionalRemove(){V0(this,er).length||(this.state.status==="pending"?this.scheduleGc():V0(this,j2).remove(this))}continue(){var _e;return((_e=V0(this,Tr))==null?void 0:_e.continue())??this.execute(this.state.variables)}async execute(_e){var t0,n0,s0,o0,a0,f0,l0,u0,A0,c0,k0,d0,h0,b0,p0,m0,g0,v0,w0,x0;t2(this,Tr,createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(_e):Promise.reject(new Error("No mutationFn found")),onFail:(_0,y0)=>{k2(this,ir,cr).call(this,{type:"failed",failureCount:_0,error:y0})},onPause:()=>{k2(this,ir,cr).call(this,{type:"pause"})},onContinue:()=>{k2(this,ir,cr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>V0(this,j2).canRun(this)}));const i0=this.state.status==="pending",r0=!V0(this,Tr).canStart();try{if(!i0){k2(this,ir,cr).call(this,{type:"pending",variables:_e,isPaused:r0}),await((n0=(t0=V0(this,j2).config).onMutate)==null?void 0:n0.call(t0,_e,this));const y0=await((o0=(s0=this.options).onMutate)==null?void 0:o0.call(s0,_e));y0!==this.state.context&&k2(this,ir,cr).call(this,{type:"pending",context:y0,variables:_e,isPaused:r0})}const _0=await V0(this,Tr).start();return await((f0=(a0=V0(this,j2).config).onSuccess)==null?void 0:f0.call(a0,_0,_e,this.state.context,this)),await((u0=(l0=this.options).onSuccess)==null?void 0:u0.call(l0,_0,_e,this.state.context)),await((c0=(A0=V0(this,j2).config).onSettled)==null?void 0:c0.call(A0,_0,null,this.state.variables,this.state.context,this)),await((d0=(k0=this.options).onSettled)==null?void 0:d0.call(k0,_0,null,_e,this.state.context)),k2(this,ir,cr).call(this,{type:"success",data:_0}),_0}catch(_0){try{throw await((b0=(h0=V0(this,j2).config).onError)==null?void 0:b0.call(h0,_0,_e,this.state.context,this)),await((m0=(p0=this.options).onError)==null?void 0:m0.call(p0,_0,_e,this.state.context)),await((v0=(g0=V0(this,j2).config).onSettled)==null?void 0:v0.call(g0,void 0,_0,this.state.variables,this.state.context,this)),await((x0=(w0=this.options).onSettled)==null?void 0:x0.call(w0,void 0,_0,_e,this.state.context)),_0}finally{k2(this,ir,cr).call(this,{type:"error",error:_0})}}finally{V0(this,j2).runNext(this)}}},er=new WeakMap,j2=new WeakMap,Tr=new WeakMap,ir=new WeakSet,cr=function(_e){const i0=r0=>{switch(_e.type){case"failed":return{...r0,failureCount:_e.failureCount,failureReason:_e.error};case"pause":return{...r0,isPaused:!0};case"continue":return{...r0,isPaused:!1};case"pending":return{...r0,context:_e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:_e.isPaused,status:"pending",variables:_e.variables,submittedAt:Date.now()};case"success":return{...r0,data:_e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r0,data:void 0,error:_e.error,failureCount:r0.failureCount+1,failureReason:_e.error,isPaused:!1,status:"error"}}};this.state=i0(this.state),notifyManager.batch(()=>{V0(this,er).forEach(r0=>{r0.onMutationUpdate(_e)}),V0(this,j2).notify({mutation:this,type:"updated",action:_e})})},Wt);function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var N2,tt,Dt,MutationCache=(Dt=class extends Subscribable{constructor(_e={}){super();l2(this,N2);l2(this,tt);this.config=_e,t2(this,N2,new Map),t2(this,tt,Date.now())}build(_e,i0,r0){const t0=new Mutation({mutationCache:this,mutationId:++at(this,tt)._,options:_e.defaultMutationOptions(i0),state:r0});return this.add(t0),t0}add(_e){const i0=scopeFor(_e),r0=V0(this,N2).get(i0)??[];r0.push(_e),V0(this,N2).set(i0,r0),this.notify({type:"added",mutation:_e})}remove(_e){var r0;const i0=scopeFor(_e);if(V0(this,N2).has(i0)){const t0=(r0=V0(this,N2).get(i0))==null?void 0:r0.filter(n0=>n0!==_e);t0&&(t0.length===0?V0(this,N2).delete(i0):V0(this,N2).set(i0,t0))}this.notify({type:"removed",mutation:_e})}canRun(_e){var r0;const i0=(r0=V0(this,N2).get(scopeFor(_e)))==null?void 0:r0.find(t0=>t0.state.status==="pending");return!i0||i0===_e}runNext(_e){var r0;const i0=(r0=V0(this,N2).get(scopeFor(_e)))==null?void 0:r0.find(t0=>t0!==_e&&t0.state.isPaused);return(i0==null?void 0:i0.continue())??Promise.resolve()}clear(){notifyManager.batch(()=>{this.getAll().forEach(_e=>{this.remove(_e)})})}getAll(){return[...V0(this,N2).values()].flat()}find(_e){const i0={exact:!0,..._e};return this.getAll().find(r0=>matchMutation(i0,r0))}findAll(_e={}){return this.getAll().filter(i0=>matchMutation(_e,i0))}notify(_e){notifyManager.batch(()=>{this.listeners.forEach(i0=>{i0(_e)})})}resumePausedMutations(){const _e=this.getAll().filter(i0=>i0.state.isPaused);return notifyManager.batch(()=>Promise.all(_e.map(i0=>i0.continue().catch(noop$6))))}},N2=new WeakMap,tt=new WeakMap,Dt);function scopeFor(e0){var _e;return((_e=e0.options.scope)==null?void 0:_e.id)??String(e0.mutationId)}function infiniteQueryBehavior(e0){return{onFetch:(_e,i0)=>{var l0,u0,A0,c0,k0;const r0=_e.options,t0=(A0=(u0=(l0=_e.fetchOptions)==null?void 0:l0.meta)==null?void 0:u0.fetchMore)==null?void 0:A0.direction,n0=((c0=_e.state.data)==null?void 0:c0.pages)||[],s0=((k0=_e.state.data)==null?void 0:k0.pageParams)||[];let o0={pages:[],pageParams:[]},a0=0;const f0=async()=>{let d0=!1;const h0=m0=>{Object.defineProperty(m0,"signal",{enumerable:!0,get:()=>(_e.signal.aborted?d0=!0:_e.signal.addEventListener("abort",()=>{d0=!0}),_e.signal)})},b0=ensureQueryFn(_e.options,_e.fetchOptions),p0=async(m0,g0,v0)=>{if(d0)return Promise.reject();if(g0==null&&m0.pages.length)return Promise.resolve(m0);const w0={queryKey:_e.queryKey,pageParam:g0,direction:v0?"backward":"forward",meta:_e.options.meta};h0(w0);const x0=await b0(w0),{maxPages:_0}=_e.options,y0=v0?addToStart:addToEnd;return{pages:y0(m0.pages,x0,_0),pageParams:y0(m0.pageParams,g0,_0)}};if(t0&&n0.length){const m0=t0==="backward",g0=m0?getPreviousPageParam:getNextPageParam,v0={pages:n0,pageParams:s0},w0=g0(r0,v0);o0=await p0(v0,w0,m0)}else{const m0=e0??n0.length;do{const g0=a0===0?s0[0]??r0.initialPageParam:getNextPageParam(r0,o0);if(a0>0&&g0==null)break;o0=await p0(o0,g0),a0++}while(a0<m0)}return o0};_e.options.persister?_e.fetchFn=()=>{var d0,h0;return(h0=(d0=_e.options).persister)==null?void 0:h0.call(d0,f0,{queryKey:_e.queryKey,meta:_e.options.meta,signal:_e.signal},i0)}:_e.fetchFn=f0}}}function getNextPageParam(e0,{pages:_e,pageParams:i0}){const r0=_e.length-1;return _e.length>0?e0.getNextPageParam(_e[r0],_e,i0[r0],i0):void 0}function getPreviousPageParam(e0,{pages:_e,pageParams:i0}){var r0;return _e.length>0?(r0=e0.getPreviousPageParam)==null?void 0:r0.call(e0,_e[0],_e,i0[0],i0):void 0}function hasNextPage(e0,_e){return _e?getNextPageParam(e0,_e)!=null:!1}function hasPreviousPage(e0,_e){return!_e||!e0.getPreviousPageParam?!1:getPreviousPageParam(e0,_e)!=null}var v2,hr,pr,Or,Xr,br,Qr,$r,Nt,QueryClient=(Nt=class{constructor(e0={}){l2(this,v2);l2(this,hr);l2(this,pr);l2(this,Or);l2(this,Xr);l2(this,br);l2(this,Qr);l2(this,$r);t2(this,v2,e0.queryCache||new QueryCache),t2(this,hr,e0.mutationCache||new MutationCache),t2(this,pr,e0.defaultOptions||{}),t2(this,Or,new Map),t2(this,Xr,new Map),t2(this,br,0)}mount(){at(this,br)._++,V0(this,br)===1&&(t2(this,Qr,focusManager.subscribe(async e0=>{e0&&(await this.resumePausedMutations(),V0(this,v2).onFocus())})),t2(this,$r,onlineManager.subscribe(async e0=>{e0&&(await this.resumePausedMutations(),V0(this,v2).onOnline())})))}unmount(){var e0,_e;at(this,br)._--,V0(this,br)===0&&((e0=V0(this,Qr))==null||e0.call(this),t2(this,Qr,void 0),(_e=V0(this,$r))==null||_e.call(this),t2(this,$r,void 0))}isFetching(e0){return V0(this,v2).findAll({...e0,fetchStatus:"fetching"}).length}isMutating(e0){return V0(this,hr).findAll({...e0,status:"pending"}).length}getQueryData(e0){var i0;const _e=this.defaultQueryOptions({queryKey:e0});return(i0=V0(this,v2).get(_e.queryHash))==null?void 0:i0.state.data}ensureQueryData(e0){const _e=this.defaultQueryOptions(e0),i0=V0(this,v2).build(this,_e),r0=i0.state.data;return r0===void 0?this.fetchQuery(e0):(e0.revalidateIfStale&&i0.isStaleByTime(resolveStaleTime(_e.staleTime,i0))&&this.prefetchQuery(_e),Promise.resolve(r0))}getQueriesData(e0){return V0(this,v2).findAll(e0).map(({queryKey:_e,state:i0})=>{const r0=i0.data;return[_e,r0]})}setQueryData(e0,_e,i0){const r0=this.defaultQueryOptions({queryKey:e0}),t0=V0(this,v2).get(r0.queryHash),n0=t0==null?void 0:t0.state.data,s0=functionalUpdate(_e,n0);if(s0!==void 0)return V0(this,v2).build(this,r0).setData(s0,{...i0,manual:!0})}setQueriesData(e0,_e,i0){return notifyManager.batch(()=>V0(this,v2).findAll(e0).map(({queryKey:r0})=>[r0,this.setQueryData(r0,_e,i0)]))}getQueryState(e0){var i0;const _e=this.defaultQueryOptions({queryKey:e0});return(i0=V0(this,v2).get(_e.queryHash))==null?void 0:i0.state}removeQueries(e0){const _e=V0(this,v2);notifyManager.batch(()=>{_e.findAll(e0).forEach(i0=>{_e.remove(i0)})})}resetQueries(e0,_e){const i0=V0(this,v2),r0={type:"active",...e0};return notifyManager.batch(()=>(i0.findAll(e0).forEach(t0=>{t0.reset()}),this.refetchQueries(r0,_e)))}cancelQueries(e0,_e={}){const i0={revert:!0,..._e},r0=notifyManager.batch(()=>V0(this,v2).findAll(e0).map(t0=>t0.cancel(i0)));return Promise.all(r0).then(noop$6).catch(noop$6)}invalidateQueries(e0,_e={}){return notifyManager.batch(()=>{if(V0(this,v2).findAll(e0).forEach(r0=>{r0.invalidate()}),(e0==null?void 0:e0.refetchType)==="none")return Promise.resolve();const i0={...e0,type:(e0==null?void 0:e0.refetchType)??(e0==null?void 0:e0.type)??"active"};return this.refetchQueries(i0,_e)})}refetchQueries(e0,_e={}){const i0={..._e,cancelRefetch:_e.cancelRefetch??!0},r0=notifyManager.batch(()=>V0(this,v2).findAll(e0).filter(t0=>!t0.isDisabled()).map(t0=>{let n0=t0.fetch(void 0,i0);return i0.throwOnError||(n0=n0.catch(noop$6)),t0.state.fetchStatus==="paused"?Promise.resolve():n0}));return Promise.all(r0).then(noop$6)}fetchQuery(e0){const _e=this.defaultQueryOptions(e0);_e.retry===void 0&&(_e.retry=!1);const i0=V0(this,v2).build(this,_e);return i0.isStaleByTime(resolveStaleTime(_e.staleTime,i0))?i0.fetch(_e):Promise.resolve(i0.state.data)}prefetchQuery(e0){return this.fetchQuery(e0).then(noop$6).catch(noop$6)}fetchInfiniteQuery(e0){return e0.behavior=infiniteQueryBehavior(e0.pages),this.fetchQuery(e0)}prefetchInfiniteQuery(e0){return this.fetchInfiniteQuery(e0).then(noop$6).catch(noop$6)}ensureInfiniteQueryData(e0){return e0.behavior=infiniteQueryBehavior(e0.pages),this.ensureQueryData(e0)}resumePausedMutations(){return onlineManager.isOnline()?V0(this,hr).resumePausedMutations():Promise.resolve()}getQueryCache(){return V0(this,v2)}getMutationCache(){return V0(this,hr)}getDefaultOptions(){return V0(this,pr)}setDefaultOptions(e0){t2(this,pr,e0)}setQueryDefaults(e0,_e){V0(this,Or).set(hashKey(e0),{queryKey:e0,defaultOptions:_e})}getQueryDefaults(e0){const _e=[...V0(this,Or).values()],i0={};return _e.forEach(r0=>{partialMatchKey(e0,r0.queryKey)&&Object.assign(i0,r0.defaultOptions)}),i0}setMutationDefaults(e0,_e){V0(this,Xr).set(hashKey(e0),{mutationKey:e0,defaultOptions:_e})}getMutationDefaults(e0){const _e=[...V0(this,Xr).values()];let i0={};return _e.forEach(r0=>{partialMatchKey(e0,r0.mutationKey)&&(i0={...i0,...r0.defaultOptions})}),i0}defaultQueryOptions(e0){if(e0._defaulted)return e0;const _e={...V0(this,pr).queries,...this.getQueryDefaults(e0.queryKey),...e0,_defaulted:!0};return _e.queryHash||(_e.queryHash=hashQueryKeyByOptions(_e.queryKey,_e)),_e.refetchOnReconnect===void 0&&(_e.refetchOnReconnect=_e.networkMode!=="always"),_e.throwOnError===void 0&&(_e.throwOnError=!!_e.suspense),!_e.networkMode&&_e.persister&&(_e.networkMode="offlineFirst"),_e.queryFn===skipToken&&(_e.enabled=!1),_e}defaultMutationOptions(e0){return e0!=null&&e0._defaulted?e0:{...V0(this,pr).mutations,...(e0==null?void 0:e0.mutationKey)&&this.getMutationDefaults(e0.mutationKey),...e0,_defaulted:!0}}clear(){V0(this,v2).clear(),V0(this,hr).clear()}},v2=new WeakMap,hr=new WeakMap,pr=new WeakMap,Or=new WeakMap,Xr=new WeakMap,br=new WeakMap,Qr=new WeakMap,$r=new WeakMap,Nt),V2,d2,nt,P2,Ir,Ur,mr,rr,st,Lr,zr,Fr,Gr,gr,Hr,p2,qr,kt,dt,ht,bt,mt,gt,vt,$t,Zt,QueryObserver=(Zt=class extends Subscribable{constructor(_e,i0){super();l2(this,p2);l2(this,V2);l2(this,d2);l2(this,nt);l2(this,P2);l2(this,Ir);l2(this,Ur);l2(this,mr);l2(this,rr);l2(this,st);l2(this,Lr);l2(this,zr);l2(this,Fr);l2(this,Gr);l2(this,gr);l2(this,Hr,new Set);this.options=i0,t2(this,V2,_e),t2(this,rr,null),t2(this,mr,pendingThenable()),this.options.experimental_prefetchInRender||V0(this,mr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(i0)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(V0(this,d2).addObserver(this),shouldFetchOnMount(V0(this,d2),this.options)?k2(this,p2,qr).call(this):this.updateResult(),k2(this,p2,bt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(V0(this,d2),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(V0(this,d2),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,k2(this,p2,mt).call(this),k2(this,p2,gt).call(this),V0(this,d2).removeObserver(this)}setOptions(_e,i0){const r0=this.options,t0=V0(this,d2);if(this.options=V0(this,V2).defaultQueryOptions(_e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof resolveEnabled(this.options.enabled,V0(this,d2))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");k2(this,p2,vt).call(this),V0(this,d2).setOptions(this.options),r0._defaulted&&!shallowEqualObjects(this.options,r0)&&V0(this,V2).getQueryCache().notify({type:"observerOptionsUpdated",query:V0(this,d2),observer:this});const n0=this.hasListeners();n0&&shouldFetchOptionally(V0(this,d2),t0,this.options,r0)&&k2(this,p2,qr).call(this),this.updateResult(i0),n0&&(V0(this,d2)!==t0||resolveEnabled(this.options.enabled,V0(this,d2))!==resolveEnabled(r0.enabled,V0(this,d2))||resolveStaleTime(this.options.staleTime,V0(this,d2))!==resolveStaleTime(r0.staleTime,V0(this,d2)))&&k2(this,p2,kt).call(this);const s0=k2(this,p2,dt).call(this);n0&&(V0(this,d2)!==t0||resolveEnabled(this.options.enabled,V0(this,d2))!==resolveEnabled(r0.enabled,V0(this,d2))||s0!==V0(this,gr))&&k2(this,p2,ht).call(this,s0)}getOptimisticResult(_e){const i0=V0(this,V2).getQueryCache().build(V0(this,V2),_e),r0=this.createResult(i0,_e);return shouldAssignObserverCurrentProperties(this,r0)&&(t2(this,P2,r0),t2(this,Ur,this.options),t2(this,Ir,V0(this,d2).state)),r0}getCurrentResult(){return V0(this,P2)}trackResult(_e,i0){const r0={};return Object.keys(_e).forEach(t0=>{Object.defineProperty(r0,t0,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(t0),i0==null||i0(t0),_e[t0])})}),r0}trackProp(_e){V0(this,Hr).add(_e)}getCurrentQuery(){return V0(this,d2)}refetch({..._e}={}){return this.fetch({..._e})}fetchOptimistic(_e){const i0=V0(this,V2).defaultQueryOptions(_e),r0=V0(this,V2).getQueryCache().build(V0(this,V2),i0);return r0.fetch().then(()=>this.createResult(r0,i0))}fetch(_e){return k2(this,p2,qr).call(this,{..._e,cancelRefetch:_e.cancelRefetch??!0}).then(()=>(this.updateResult(),V0(this,P2)))}createResult(_e,i0){var _0;const r0=V0(this,d2),t0=this.options,n0=V0(this,P2),s0=V0(this,Ir),o0=V0(this,Ur),f0=_e!==r0?_e.state:V0(this,nt),{state:l0}=_e;let u0={...l0},A0=!1,c0;if(i0._optimisticResults){const y0=this.hasListeners(),S0=!y0&&shouldFetchOnMount(_e,i0),B0=y0&&shouldFetchOptionally(_e,r0,i0,t0);(S0||B0)&&(u0={...u0,...fetchState(l0.data,_e.options)}),i0._optimisticResults==="isRestoring"&&(u0.fetchStatus="idle")}let{error:k0,errorUpdatedAt:d0,status:h0}=u0;if(i0.select&&u0.data!==void 0)if(n0&&u0.data===(s0==null?void 0:s0.data)&&i0.select===V0(this,st))c0=V0(this,Lr);else try{t2(this,st,i0.select),c0=i0.select(u0.data),c0=replaceData(n0==null?void 0:n0.data,c0,i0),t2(this,Lr,c0),t2(this,rr,null)}catch(y0){t2(this,rr,y0)}else c0=u0.data;if(i0.placeholderData!==void 0&&c0===void 0&&h0==="pending"){let y0;if(n0!=null&&n0.isPlaceholderData&&i0.placeholderData===(o0==null?void 0:o0.placeholderData))y0=n0.data;else if(y0=typeof i0.placeholderData=="function"?i0.placeholderData((_0=V0(this,zr))==null?void 0:_0.state.data,V0(this,zr)):i0.placeholderData,i0.select&&y0!==void 0)try{y0=i0.select(y0),t2(this,rr,null)}catch(S0){t2(this,rr,S0)}y0!==void 0&&(h0="success",c0=replaceData(n0==null?void 0:n0.data,y0,i0),A0=!0)}V0(this,rr)&&(k0=V0(this,rr),c0=V0(this,Lr),d0=Date.now(),h0="error");const b0=u0.fetchStatus==="fetching",p0=h0==="pending",m0=h0==="error",g0=p0&&b0,v0=c0!==void 0,x0={status:h0,fetchStatus:u0.fetchStatus,isPending:p0,isSuccess:h0==="success",isError:m0,isInitialLoading:g0,isLoading:g0,data:c0,dataUpdatedAt:u0.dataUpdatedAt,error:k0,errorUpdatedAt:d0,failureCount:u0.fetchFailureCount,failureReason:u0.fetchFailureReason,errorUpdateCount:u0.errorUpdateCount,isFetched:u0.dataUpdateCount>0||u0.errorUpdateCount>0,isFetchedAfterMount:u0.dataUpdateCount>f0.dataUpdateCount||u0.errorUpdateCount>f0.errorUpdateCount,isFetching:b0,isRefetching:b0&&!p0,isLoadingError:m0&&!v0,isPaused:u0.fetchStatus==="paused",isPlaceholderData:A0,isRefetchError:m0&&v0,isStale:isStale(_e,i0),refetch:this.refetch,promise:V0(this,mr)};if(this.options.experimental_prefetchInRender){const y0=I0=>{x0.status==="error"?I0.reject(x0.error):x0.data!==void 0&&I0.resolve(x0.data)},S0=()=>{const I0=t2(this,mr,x0.promise=pendingThenable());y0(I0)},B0=V0(this,mr);switch(B0.status){case"pending":_e.queryHash===r0.queryHash&&y0(B0);break;case"fulfilled":(x0.status==="error"||x0.data!==B0.value)&&S0();break;case"rejected":(x0.status!=="error"||x0.error!==B0.reason)&&S0();break}}return x0}updateResult(_e){const i0=V0(this,P2),r0=this.createResult(V0(this,d2),this.options);if(t2(this,Ir,V0(this,d2).state),t2(this,Ur,this.options),V0(this,Ir).data!==void 0&&t2(this,zr,V0(this,d2)),shallowEqualObjects(r0,i0))return;t2(this,P2,r0);const t0={},n0=()=>{if(!i0)return!0;const{notifyOnChangeProps:s0}=this.options,o0=typeof s0=="function"?s0():s0;if(o0==="all"||!o0&&!V0(this,Hr).size)return!0;const a0=new Set(o0??V0(this,Hr));return this.options.throwOnError&&a0.add("error"),Object.keys(V0(this,P2)).some(f0=>{const l0=f0;return V0(this,P2)[l0]!==i0[l0]&&a0.has(l0)})};(_e==null?void 0:_e.listeners)!==!1&&n0()&&(t0.listeners=!0),k2(this,p2,$t).call(this,{...t0,..._e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&k2(this,p2,bt).call(this)}},V2=new WeakMap,d2=new WeakMap,nt=new WeakMap,P2=new WeakMap,Ir=new WeakMap,Ur=new WeakMap,mr=new WeakMap,rr=new WeakMap,st=new WeakMap,Lr=new WeakMap,zr=new WeakMap,Fr=new WeakMap,Gr=new WeakMap,gr=new WeakMap,Hr=new WeakMap,p2=new WeakSet,qr=function(_e){k2(this,p2,vt).call(this);let i0=V0(this,d2).fetch(this.options,_e);return _e!=null&&_e.throwOnError||(i0=i0.catch(noop$6)),i0},kt=function(){k2(this,p2,mt).call(this);const _e=resolveStaleTime(this.options.staleTime,V0(this,d2));if(isServer||V0(this,P2).isStale||!isValidTimeout(_e))return;const r0=timeUntilStale(V0(this,P2).dataUpdatedAt,_e)+1;t2(this,Fr,setTimeout(()=>{V0(this,P2).isStale||this.updateResult()},r0))},dt=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(V0(this,d2)):this.options.refetchInterval)??!1},ht=function(_e){k2(this,p2,gt).call(this),t2(this,gr,_e),!(isServer||resolveEnabled(this.options.enabled,V0(this,d2))===!1||!isValidTimeout(V0(this,gr))||V0(this,gr)===0)&&t2(this,Gr,setInterval(()=>{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&k2(this,p2,qr).call(this)},V0(this,gr)))},bt=function(){k2(this,p2,kt).call(this),k2(this,p2,ht).call(this,k2(this,p2,dt).call(this))},mt=function(){V0(this,Fr)&&(clearTimeout(V0(this,Fr)),t2(this,Fr,void 0))},gt=function(){V0(this,Gr)&&(clearInterval(V0(this,Gr)),t2(this,Gr,void 0))},vt=function(){const _e=V0(this,V2).getQueryCache().build(V0(this,V2),this.options);if(_e===V0(this,d2))return;const i0=V0(this,d2);t2(this,d2,_e),t2(this,nt,_e.state),this.hasListeners()&&(i0==null||i0.removeObserver(this),_e.addObserver(this))},$t=function(_e){notifyManager.batch(()=>{_e.listeners&&this.listeners.forEach(i0=>{i0(V0(this,P2))}),V0(this,V2).getQueryCache().notify({query:V0(this,d2),type:"observerResultsUpdated"})})},Zt);function shouldLoadOnMount(e0,_e){return resolveEnabled(_e.enabled,e0)!==!1&&e0.state.data===void 0&&!(e0.state.status==="error"&&_e.retryOnMount===!1)}function shouldFetchOnMount(e0,_e){return shouldLoadOnMount(e0,_e)||e0.state.data!==void 0&&shouldFetchOn(e0,_e,_e.refetchOnMount)}function shouldFetchOn(e0,_e,i0){if(resolveEnabled(_e.enabled,e0)!==!1){const r0=typeof i0=="function"?i0(e0):i0;return r0==="always"||r0!==!1&&isStale(e0,_e)}return!1}function shouldFetchOptionally(e0,_e,i0,r0){return(e0!==_e||resolveEnabled(r0.enabled,e0)===!1)&&(!i0.suspense||e0.state.status!=="error")&&isStale(e0,i0)}function isStale(e0,_e){return resolveEnabled(_e.enabled,e0)!==!1&&e0.isStaleByTime(resolveStaleTime(_e.staleTime,e0))}function shouldAssignObserverCurrentProperties(e0,_e){return!shallowEqualObjects(e0.getCurrentResult(),_e)}var InfiniteQueryObserver=class extends QueryObserver{constructor(e0,_e){super(e0,_e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e0,_e){super.setOptions({...e0,behavior:infiniteQueryBehavior()},_e)}getOptimisticResult(e0){return e0.behavior=infiniteQueryBehavior(),super.getOptimisticResult(e0)}fetchNextPage(e0){return this.fetch({...e0,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e0){return this.fetch({...e0,meta:{fetchMore:{direction:"backward"}}})}createResult(e0,_e){var k0,d0;const{state:i0}=e0,r0=super.createResult(e0,_e),{isFetching:t0,isRefetching:n0,isError:s0,isRefetchError:o0}=r0,a0=(d0=(k0=i0.fetchMeta)==null?void 0:k0.fetchMore)==null?void 0:d0.direction,f0=s0&&a0==="forward",l0=t0&&a0==="forward",u0=s0&&a0==="backward",A0=t0&&a0==="backward";return{...r0,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:hasNextPage(_e,i0.data),hasPreviousPage:hasPreviousPage(_e,i0.data),isFetchNextPageError:f0,isFetchingNextPage:l0,isFetchPreviousPageError:u0,isFetchingPreviousPage:A0,isRefetchError:o0&&!f0&&!u0,isRefetching:n0&&!l0&&!A0}}},vr,wr,W2,ar,ur,ft,wt,Ot,MutationObserver$1=(Ot=class extends Subscribable{constructor(i0,r0){super();l2(this,ur);l2(this,vr);l2(this,wr);l2(this,W2);l2(this,ar);t2(this,vr,i0),this.setOptions(r0),this.bindMethods(),k2(this,ur,ft).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i0){var t0;const r0=this.options;this.options=V0(this,vr).defaultMutationOptions(i0),shallowEqualObjects(this.options,r0)||V0(this,vr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:V0(this,W2),observer:this}),r0!=null&&r0.mutationKey&&this.options.mutationKey&&hashKey(r0.mutationKey)!==hashKey(this.options.mutationKey)?this.reset():((t0=V0(this,W2))==null?void 0:t0.state.status)==="pending"&&V0(this,W2).setOptions(this.options)}onUnsubscribe(){var i0;this.hasListeners()||(i0=V0(this,W2))==null||i0.removeObserver(this)}onMutationUpdate(i0){k2(this,ur,ft).call(this),k2(this,ur,wt).call(this,i0)}getCurrentResult(){return V0(this,wr)}reset(){var i0;(i0=V0(this,W2))==null||i0.removeObserver(this),t2(this,W2,void 0),k2(this,ur,ft).call(this),k2(this,ur,wt).call(this)}mutate(i0,r0){var t0;return t2(this,ar,r0),(t0=V0(this,W2))==null||t0.removeObserver(this),t2(this,W2,V0(this,vr).getMutationCache().build(V0(this,vr),this.options)),V0(this,W2).addObserver(this),V0(this,W2).execute(i0)}},vr=new WeakMap,wr=new WeakMap,W2=new WeakMap,ar=new WeakMap,ur=new WeakSet,ft=function(){var r0;const i0=((r0=V0(this,W2))==null?void 0:r0.state)??getDefaultState();t2(this,wr,{...i0,isPending:i0.status==="pending",isSuccess:i0.status==="success",isError:i0.status==="error",isIdle:i0.status==="idle",mutate:this.mutate,reset:this.reset})},wt=function(i0){notifyManager.batch(()=>{var r0,t0,n0,s0,o0,a0,f0,l0;if(V0(this,ar)&&this.hasListeners()){const u0=V0(this,wr).variables,A0=V0(this,wr).context;(i0==null?void 0:i0.type)==="success"?((t0=(r0=V0(this,ar)).onSuccess)==null||t0.call(r0,i0.data,u0,A0),(s0=(n0=V0(this,ar)).onSettled)==null||s0.call(n0,i0.data,null,u0,A0)):(i0==null?void 0:i0.type)==="error"&&((a0=(o0=V0(this,ar)).onError)==null||a0.call(o0,i0.error,u0,A0),(l0=(f0=V0(this,ar)).onSettled)==null||l0.call(f0,void 0,i0.error,u0,A0))}this.listeners.forEach(u0=>{u0(V0(this,wr))})})},Ot),QueryClientContext=reactExports.createContext(void 0),useQueryClient=e0=>{const _e=reactExports.useContext(QueryClientContext);if(!_e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return _e},QueryClientProvider=({client:e0,children:_e})=>(reactExports.useEffect(()=>(e0.mount(),()=>{e0.unmount()}),[e0]),jsxRuntimeExports.jsx(QueryClientContext.Provider,{value:e0,children:_e})),IsRestoringContext=reactExports.createContext(!1),useIsRestoring=()=>reactExports.useContext(IsRestoringContext);IsRestoringContext.Provider;function createValue(){let e0=!1;return{clearReset:()=>{e0=!1},reset:()=>{e0=!0},isReset:()=>e0}}var QueryErrorResetBoundaryContext=reactExports.createContext(createValue()),useQueryErrorResetBoundary=()=>reactExports.useContext(QueryErrorResetBoundaryContext);function shouldThrowError(e0,_e){return typeof e0=="function"?e0(..._e):!!e0}function noop$5(){}var ensurePreventErrorBoundaryRetry=(e0,_e)=>{(e0.suspense||e0.throwOnError||e0.experimental_prefetchInRender)&&(_e.isReset()||(e0.retryOnMount=!1))},useClearResetErrorBoundary=e0=>{reactExports.useEffect(()=>{e0.clearReset()},[e0])},getHasError=({result:e0,errorResetBoundary:_e,throwOnError:i0,query:r0})=>e0.isError&&!_e.isReset()&&!e0.isFetching&&r0&&shouldThrowError(i0,[e0.error,r0]),ensureSuspenseTimers=e0=>{e0.suspense&&(e0.staleTime===void 0&&(e0.staleTime=1e3),typeof e0.gcTime=="number"&&(e0.gcTime=Math.max(e0.gcTime,1e3)))},willFetch=(e0,_e)=>e0.isLoading&&e0.isFetching&&!_e,shouldSuspend=(e0,_e)=>(e0==null?void 0:e0.suspense)&&_e.isPending,fetchOptimistic=(e0,_e,i0)=>_e.fetchOptimistic(e0).catch(()=>{i0.clearReset()});function useBaseQuery(e0,_e,i0){var l0,u0,A0,c0,k0;const r0=useQueryClient(),t0=useIsRestoring(),n0=useQueryErrorResetBoundary(),s0=r0.defaultQueryOptions(e0);(u0=(l0=r0.getDefaultOptions().queries)==null?void 0:l0._experimental_beforeQuery)==null||u0.call(l0,s0),s0._optimisticResults=t0?"isRestoring":"optimistic",ensureSuspenseTimers(s0),ensurePreventErrorBoundaryRetry(s0,n0),useClearResetErrorBoundary(n0);const o0=!r0.getQueryCache().get(s0.queryHash),[a0]=reactExports.useState(()=>new _e(r0,s0)),f0=a0.getOptimisticResult(s0);if(reactExports.useSyncExternalStore(reactExports.useCallback(d0=>{const h0=t0?noop$5:a0.subscribe(notifyManager.batchCalls(d0));return a0.updateResult(),h0},[a0,t0]),()=>a0.getCurrentResult(),()=>a0.getCurrentResult()),reactExports.useEffect(()=>{a0.setOptions(s0,{listeners:!1})},[s0,a0]),shouldSuspend(s0,f0))throw fetchOptimistic(s0,a0,n0);if(getHasError({result:f0,errorResetBoundary:n0,throwOnError:s0.throwOnError,query:r0.getQueryCache().get(s0.queryHash)}))throw f0.error;if((c0=(A0=r0.getDefaultOptions().queries)==null?void 0:A0._experimental_afterQuery)==null||c0.call(A0,s0,f0),s0.experimental_prefetchInRender&&!isServer&&willFetch(f0,t0)){const d0=o0?fetchOptimistic(s0,a0,n0):(k0=r0.getQueryCache().get(s0.queryHash))==null?void 0:k0.promise;d0==null||d0.catch(noop$5).finally(()=>{a0.updateResult()})}return s0.notifyOnChangeProps?f0:a0.trackResult(f0)}function useQuery(e0,_e){return useBaseQuery(e0,QueryObserver)}function queryOptions(e0){return e0}function infiniteQueryOptions(e0){return e0}function useMutation(e0,_e){const i0=useQueryClient(),[r0]=reactExports.useState(()=>new MutationObserver$1(i0,e0));reactExports.useEffect(()=>{r0.setOptions(e0)},[r0,e0]);const t0=reactExports.useSyncExternalStore(reactExports.useCallback(s0=>r0.subscribe(notifyManager.batchCalls(s0)),[r0]),()=>r0.getCurrentResult(),()=>r0.getCurrentResult()),n0=reactExports.useCallback((s0,o0)=>{r0.mutate(s0,o0).catch(noop$5)},[r0]);if(t0.error&&shouldThrowError(r0.options.throwOnError,[t0.error]))throw t0.error;return{...t0,mutate:n0,mutateAsync:t0.mutate}}function useInfiniteQuery(e0,_e){return useBaseQuery(e0,InfiniteQueryObserver)}var USER_PREFERENCES_QUERY_KEY=["user","preferences"];function useUserPreferences(){let e0=useQueryClient(),{data:_e,isLoading:i0,isError:r0,refetch:t0}=useQuery({queryKey:USER_PREFERENCES_QUERY_KEY,queryFn:()=>odeServices.conf().getUserPreferences(),staleTime:15e3}),n0=useMutation({mutationFn:s0=>odeServices.conf().saveUserPreferences(s0),onMutate:async s0=>{e0.setQueryData(USER_PREFERENCES_QUERY_KEY,s0)},onError:()=>{e0.invalidateQueries({queryKey:USER_PREFERENCES_QUERY_KEY})},onSuccess:s0=>{e0.setQueryData(USER_PREFERENCES_QUERY_KEY,s0)}});return{preferences:_e,isLoading:i0,isError:r0,refetch:t0,savePreferences:s0=>n0.mutateAsync(s0)}}var useBackground_default=()=>{var t0;let e0=useUiOverride("layout.background"),_e=useUiOverride("background.default"),{preferences:i0}=useUserPreferences(),r0=(e0==null?void 0:e0.variant)==="image";return{betaEnabled:(t0=i0==null?void 0:i0.homePage)==null?void 0:t0.betaEnabled,background:(i0==null?void 0:i0.background)??(_e==null?void 0:_e.variant)??"default",isBackgroundImageOverridden:r0,productOverride:e0==null?void 0:e0.theme}},EdificeClientContext=reactExports.createContext(null);function useEdificeClient(){let e0=reactExports.useContext(EdificeClientContext);if(!e0)throw Error("Cannot be used outside of EdificeClientProvider");return e0}function useBookmark(){var i0;let{sessionQuery:e0}=useEdificeClient(),_e=new Set;return(i0=e0==null?void 0:e0.data)==null?void 0:i0.bookmarkedApps.filter(r0=>{let t0=_e.has(r0.displayName);return _e.add(r0.displayName),!t0})}function useDebounce(e0,_e){const[i0,r0]=reactExports.useState(e0);return reactExports.useEffect(()=>{const t0=setTimeout(()=>{r0(e0)},_e);return()=>{clearTimeout(t0)}},[e0,_e]),i0}function useHover$2(){const[e0,_e]=reactExports.useState(!1),i0=reactExports.useRef(null),r0=reactExports.useCallback(()=>{_e(!0)},[]),t0=reactExports.useCallback(()=>{_e(!1)},[]);return[reactExports.useCallback(s0=>{var o0;((o0=i0.current)==null?void 0:o0.nodeType)===Node.ELEMENT_NODE&&(i0.current.removeEventListener("mouseenter",r0),i0.current.removeEventListener("mouseleave",t0)),(s0==null?void 0:s0.nodeType)===Node.ELEMENT_NODE&&(s0.addEventListener("mouseenter",r0),s0.addEventListener("mouseleave",t0)),i0.current=s0},[r0,t0]),e0]}function useMediaQuery(e0){const _e=reactExports.useCallback(t0=>{const n0=window.matchMedia(e0);return n0.addEventListener("change",t0),()=>{n0.removeEventListener("change",t0)}},[e0]),i0=()=>window.matchMedia(e0).matches,r0=()=>{throw Error("useMediaQuery is a client-only hook")};return reactExports.useSyncExternalStore(_e,i0,r0)}function useToggle$1(e0){const[_e,i0]=reactExports.useState(()=>e0),r0=reactExports.useCallback(t0=>i0(typeof t0=="boolean"?t0:n0=>!n0),[]);return[_e,r0]}function useBreakpoint(){return{xs:useMediaQuery("only screen and (min-width: 0)"),sm:useMediaQuery("only screen and (min-width: 375px)"),md:useMediaQuery("only screen and (min-width: 768px)"),lg:useMediaQuery("only screen and (min-width: 1024px)"),xl:useMediaQuery("only screen and (min-width: 1280px)"),xxl:useMediaQuery("only screen and (min-width: 1400px)")}}var uaParser={exports:{}};(function(e0,_e){(function(i0,r0){var t0="1.0.36",n0="",s0="?",o0="function",a0="undefined",f0="object",l0="string",u0="major",A0="model",c0="name",k0="type",d0="vendor",h0="version",b0="architecture",p0="console",m0="mobile",g0="tablet",v0="smarttv",w0="wearable",x0="embedded",_0=350,y0="Amazon",S0="Apple",B0="ASUS",I0="BlackBerry",F0="Browser",C0="Chrome",E0="Edge",R0="Firefox",M0="Google",T0="Huawei",G0="LG",j0="Microsoft",N0="Motorola",O0="Opera",Y0="Samsung",D0="Sharp",$0="Sony",z0="Xiaomi",K0="Zebra",e2="Facebook",J0="Chromium OS",_i="Mac OS",Q0=function(L0,H0){var q0={};for(var n2 in L0)H0[n2]&&H0[n2].length%2===0?q0[n2]=H0[n2].concat(L0[n2]):q0[n2]=L0[n2];return q0},U0=function(L0){for(var H0={},q0=0;q0<L0.length;q0++)H0[L0[q0].toUpperCase()]=L0[q0];return H0},i2=function(L0,H0){return typeof L0===l0?s2(H0).indexOf(s2(L0))!==-1:!1},s2=function(L0){return L0.toLowerCase()},f2=function(L0){return typeof L0===l0?L0.replace(/[^\d\.]/g,n0).split(".")[0]:r0},c2=function(L0,H0){if(typeof L0===l0)return L0=L0.replace(/^\s\s*/,n0),typeof H0===a0?L0:L0.substring(0,_0)},m2=function(L0,H0){for(var q0=0,n2,A2,h2,u2,o2,C2;q0<H0.length&&!o2;){var $2=H0[q0],U2=H0[q0+1];for(n2=A2=0;n2<$2.length&&!o2&&$2[n2];)if(o2=$2[n2++].exec(L0),o2)for(h2=0;h2<U2.length;h2++)C2=o2[++A2],u2=U2[h2],typeof u2===f0&&u2.length>0?u2.length===2?typeof u2[1]==o0?this[u2[0]]=u2[1].call(this,C2):this[u2[0]]=u2[1]:u2.length===3?typeof u2[1]===o0&&!(u2[1].exec&&u2[1].test)?this[u2[0]]=C2?u2[1].call(this,C2,u2[2]):r0:this[u2[0]]=C2?C2.replace(u2[1],u2[2]):r0:u2.length===4&&(this[u2[0]]=C2?u2[3].call(this,C2.replace(u2[1],u2[2])):r0):this[u2]=C2||r0;q0+=2}},w2=function(L0,H0){for(var q0 in H0)if(typeof H0[q0]===f0&&H0[q0].length>0){for(var n2=0;n2<H0[q0].length;n2++)if(i2(H0[q0][n2],L0))return q0===s0?r0:q0}else if(i2(H0[q0],L0))return q0===s0?r0:q0;return L0},_2={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},b2={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},P0={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h0,[c0,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h0,[c0,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c0,h0],[/opios[\/ ]+([\w\.]+)/i],[h0,[c0,O0+" Mini"]],[/\bopr\/([\w\.]+)/i],[h0,[c0,O0]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c0,h0],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h0,[c0,"UC"+F0]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[h0,[c0,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h0,[c0,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h0,[c0,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h0,[c0,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h0,[c0,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c0,/(.+)/,"$1 Secure "+F0],h0],[/\bfocus\/([\w\.]+)/i],[h0,[c0,R0+" Focus"]],[/\bopt\/([\w\.]+)/i],[h0,[c0,O0+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h0,[c0,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h0,[c0,"Dolphin"]],[/coast\/([\w\.]+)/i],[h0,[c0,O0+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h0,[c0,"MIUI "+F0]],[/fxios\/([-\w\.]+)/i],[h0,[c0,R0]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c0,"360 "+F0]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c0,/(.+)/,"$1 "+F0],h0],[/(comodo_dragon)\/([\w\.]+)/i],[[c0,/_/g," "],h0],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c0,h0],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[c0],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c0,e2],h0],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c0,h0],[/\bgsa\/([\w\.]+) .*safari\//i],[h0,[c0,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h0,[c0,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h0,[c0,C0+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c0,C0+" WebView"],h0],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h0,[c0,"Android "+F0]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c0,h0],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h0,[c0,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h0,c0],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c0,[h0,w2,_2]],[/(webkit|khtml)\/([\w\.]+)/i],[c0,h0],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c0,"Netscape"],h0],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h0,[c0,R0+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[c0,h0],[/(cobalt)\/([\w\.]+)/i],[c0,[h0,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[b0,"amd64"]],[/(ia32(?=;))/i],[[b0,s2]],[/((?:i[346]|x)86)[;\)]/i],[[b0,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[b0,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b0,"armhf"]],[/windows (ce|mobile); ppc;/i],[[b0,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[b0,/ower/,n0,s2]],[/(sun4\w)[;\)]/i],[[b0,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b0,s2]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[A0,[d0,Y0],[k0,g0]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[A0,[d0,Y0],[k0,m0]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[A0,[d0,S0],[k0,m0]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[A0,[d0,S0],[k0,g0]],[/(macintosh);/i],[A0,[d0,S0]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[A0,[d0,D0],[k0,m0]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[A0,[d0,T0],[k0,g0]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[A0,[d0,T0],[k0,m0]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[A0,/_/g," "],[d0,z0],[k0,m0]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[A0,/_/g," "],[d0,z0],[k0,g0]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[A0,[d0,"OPPO"],[k0,m0]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[A0,[d0,"Vivo"],[k0,m0]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[A0,[d0,"Realme"],[k0,m0]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[A0,[d0,N0],[k0,m0]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[A0,[d0,N0],[k0,g0]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[A0,[d0,G0],[k0,g0]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[A0,[d0,G0],[k0,m0]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[A0,[d0,"Lenovo"],[k0,g0]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[A0,/_/g," "],[d0,"Nokia"],[k0,m0]],[/(pixel c)\b/i],[A0,[d0,M0],[k0,g0]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[A0,[d0,M0],[k0,m0]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[A0,[d0,$0],[k0,m0]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[A0,"Xperia Tablet"],[d0,$0],[k0,g0]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[A0,[d0,"OnePlus"],[k0,m0]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[A0,[d0,y0],[k0,g0]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[A0,/(.+)/g,"Fire Phone $1"],[d0,y0],[k0,m0]],[/(playbook);[-\w\),; ]+(rim)/i],[A0,d0,[k0,g0]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[A0,[d0,I0],[k0,m0]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[A0,[d0,B0],[k0,g0]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[A0,[d0,B0],[k0,m0]],[/(nexus 9)/i],[A0,[d0,"HTC"],[k0,g0]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d0,[A0,/_/g," "],[k0,m0]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[A0,[d0,"Acer"],[k0,g0]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[A0,[d0,"Meizu"],[k0,m0]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d0,A0,[k0,m0]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d0,A0,[k0,g0]],[/(surface duo)/i],[A0,[d0,j0],[k0,g0]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[A0,[d0,"Fairphone"],[k0,m0]],[/(u304aa)/i],[A0,[d0,"AT&T"],[k0,m0]],[/\bsie-(\w*)/i],[A0,[d0,"Siemens"],[k0,m0]],[/\b(rct\w+) b/i],[A0,[d0,"RCA"],[k0,g0]],[/\b(venue[\d ]{2,7}) b/i],[A0,[d0,"Dell"],[k0,g0]],[/\b(q(?:mv|ta)\w+) b/i],[A0,[d0,"Verizon"],[k0,g0]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[A0,[d0,"Barnes & Noble"],[k0,g0]],[/\b(tm\d{3}\w+) b/i],[A0,[d0,"NuVision"],[k0,g0]],[/\b(k88) b/i],[A0,[d0,"ZTE"],[k0,g0]],[/\b(nx\d{3}j) b/i],[A0,[d0,"ZTE"],[k0,m0]],[/\b(gen\d{3}) b.+49h/i],[A0,[d0,"Swiss"],[k0,m0]],[/\b(zur\d{3}) b/i],[A0,[d0,"Swiss"],[k0,g0]],[/\b((zeki)?tb.*\b) b/i],[A0,[d0,"Zeki"],[k0,g0]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d0,"Dragon Touch"],A0,[k0,g0]],[/\b(ns-?\w{0,9}) b/i],[A0,[d0,"Insignia"],[k0,g0]],[/\b((nxa|next)-?\w{0,9}) b/i],[A0,[d0,"NextBook"],[k0,g0]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d0,"Voice"],A0,[k0,m0]],[/\b(lvtel\-)?(v1[12]) b/i],[[d0,"LvTel"],A0,[k0,m0]],[/\b(ph-1) /i],[A0,[d0,"Essential"],[k0,m0]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[A0,[d0,"Envizen"],[k0,g0]],[/\b(trio[-\w\. ]+) b/i],[A0,[d0,"MachSpeed"],[k0,g0]],[/\btu_(1491) b/i],[A0,[d0,"Rotor"],[k0,g0]],[/(shield[\w ]+) b/i],[A0,[d0,"Nvidia"],[k0,g0]],[/(sprint) (\w+)/i],[d0,A0,[k0,m0]],[/(kin\.[onetw]{3})/i],[[A0,/\./g," "],[d0,j0],[k0,m0]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[A0,[d0,K0],[k0,g0]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[A0,[d0,K0],[k0,m0]],[/smart-tv.+(samsung)/i],[d0,[k0,v0]],[/hbbtv.+maple;(\d+)/i],[[A0,/^/,"SmartTV"],[d0,Y0],[k0,v0]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d0,G0],[k0,v0]],[/(apple) ?tv/i],[d0,[A0,S0+" TV"],[k0,v0]],[/crkey/i],[[A0,C0+"cast"],[d0,M0],[k0,v0]],[/droid.+aft(\w+)( bui|\))/i],[A0,[d0,y0],[k0,v0]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[A0,[d0,D0],[k0,v0]],[/(bravia[\w ]+)( bui|\))/i],[A0,[d0,$0],[k0,v0]],[/(mitv-\w{5}) bui/i],[A0,[d0,z0],[k0,v0]],[/Hbbtv.*(technisat) (.*);/i],[d0,A0,[k0,v0]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d0,c2],[A0,c2],[k0,v0]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[k0,v0]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d0,A0,[k0,p0]],[/droid.+; (shield) bui/i],[A0,[d0,"Nvidia"],[k0,p0]],[/(playstation [345portablevi]+)/i],[A0,[d0,$0],[k0,p0]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[A0,[d0,j0],[k0,p0]],[/((pebble))app/i],[d0,A0,[k0,w0]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[A0,[d0,S0],[k0,w0]],[/droid.+; (glass) \d/i],[A0,[d0,M0],[k0,w0]],[/droid.+; (wt63?0{2,3})\)/i],[A0,[d0,K0],[k0,w0]],[/(quest( 2| pro)?)/i],[A0,[d0,e2],[k0,w0]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d0,[k0,x0]],[/(aeobc)\b/i],[A0,[d0,y0],[k0,x0]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[A0,[k0,m0]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[A0,[k0,g0]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[k0,g0]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[k0,m0]],[/(android[-\w\. ]{0,9});.+buil/i],[A0,[d0,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h0,[c0,E0+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h0,[c0,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c0,h0],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h0,c0]],os:[[/microsoft (windows) (vista|xp)/i],[c0,h0],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c0,[h0,w2,b2]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c0,"Windows"],[h0,w2,b2]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h0,/_/g,"."],[c0,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c0,_i],[h0,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h0,c0],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c0,h0],[/\(bb(10);/i],[h0,[c0,I0]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h0,[c0,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h0,[c0,R0+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h0,[c0,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h0,[c0,"watchOS"]],[/crkey\/([\d\.]+)/i],[h0,[c0,C0+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c0,J0],h0],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c0,h0],[/(sunos) ?([\w\.\d]*)/i],[[c0,"Solaris"],h0],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c0,h0]]},W0=function(L0,H0){if(typeof L0===f0&&(H0=L0,L0=r0),!(this instanceof W0))return new W0(L0,H0).getResult();var q0=typeof i0!==a0&&i0.navigator?i0.navigator:r0,n2=L0||(q0&&q0.userAgent?q0.userAgent:n0),A2=q0&&q0.userAgentData?q0.userAgentData:r0,h2=H0?Q0(P0,H0):P0,u2=q0&&q0.userAgent==n2;return this.getBrowser=function(){var o2={};return o2[c0]=r0,o2[h0]=r0,m2.call(o2,n2,h2.browser),o2[u0]=f2(o2[h0]),u2&&q0&&q0.brave&&typeof q0.brave.isBrave==o0&&(o2[c0]="Brave"),o2},this.getCPU=function(){var o2={};return o2[b0]=r0,m2.call(o2,n2,h2.cpu),o2},this.getDevice=function(){var o2={};return o2[d0]=r0,o2[A0]=r0,o2[k0]=r0,m2.call(o2,n2,h2.device),u2&&!o2[k0]&&A2&&A2.mobile&&(o2[k0]=m0),u2&&o2[A0]=="Macintosh"&&q0&&typeof q0.standalone!==a0&&q0.maxTouchPoints&&q0.maxTouchPoints>2&&(o2[A0]="iPad",o2[k0]=g0),o2},this.getEngine=function(){var o2={};return o2[c0]=r0,o2[h0]=r0,m2.call(o2,n2,h2.engine),o2},this.getOS=function(){var o2={};return o2[c0]=r0,o2[h0]=r0,m2.call(o2,n2,h2.os),u2&&!o2[c0]&&A2&&A2.platform!="Unknown"&&(o2[c0]=A2.platform.replace(/chrome os/i,J0).replace(/macos/i,_i)),o2},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n2},this.setUA=function(o2){return n2=typeof o2===l0&&o2.length>_0?c2(o2,_0):o2,this},this.setUA(n2),this};W0.VERSION=t0,W0.BROWSER=U0([c0,h0,u0]),W0.CPU=U0([b0]),W0.DEVICE=U0([A0,d0,k0,p0,m0,v0,g0,w0,x0]),W0.ENGINE=W0.OS=U0([c0,h0]),e0.exports&&(_e=e0.exports=W0),_e.UAParser=W0;var X0=typeof i0!==a0&&(i0.jQuery||i0.Zepto);if(X0&&!X0.ua){var r2=new W0;X0.ua=r2.getResult(),X0.ua.get=function(){return r2.getUA()},X0.ua.set=function(L0){r2.setUA(L0);var H0=r2.getResult();for(var q0 in H0)X0.ua[q0]=H0[q0]}}})(typeof window=="object"?window:commonjsGlobal)})(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;function useBrowserInfo(e0){let _e=new uaParserExports.UAParser(e0),i0=_e.getOS(),r0=_e.getDevice(),t0=_e.getBrowser(),n0=r0.model??"";return{os:i0,device:r0,browser:t0,isIphone:n0.includes("iPhone"),isIpod:n0.includes("iPod"),isIpad:n0.includes("iPad")}}function useHasWorkflow(e0){let[_e,i0]=reactExports.useState();return reactExports.useEffect(()=>{(async()=>{let r0;r0=typeof e0=="string"?await odeServices.rights().sessionHasWorkflowRight(e0):await odeServices.rights().sessionHasWorkflowRights(e0),i0(r0)})()},[e0]),_e}function useCantoo(){let e0=useHasWorkflow("org.entcore.portal.controllers.PortalController|optionalFeatureCantoo");return reactExports.useEffect(()=>{e0&&!document.getElementById("cantoo-edifice-script")&&(async()=>{let _e=await odeServices.http().get("/optionalFeature/cantoo");if(_e&&_e.scriptPath){let i0=document.createElement("script");i0.id="cantoo-edifice-script",i0.src=_e.scriptPath,i0.async=!0,document.body.appendChild(i0)}})()},[e0]),null}var CARBONIO_PREAUTH_WORKFLOW="org.entcore.auth.controllers.CarbonioPreauthController|preauth",useCarbonioUnread=()=>{let e0=useHasWorkflow(CARBONIO_PREAUTH_WORKFLOW)||!1,{data:_e}=useQuery({queryKey:["carbonio","unread","count"],queryFn:()=>odeServices.http().get("/auth/carbonio/unread",{disableNotifications:!0}),enabled:e0,staleTime:300*1e3,retry:!1});return{hasCarbonioWorkflow:e0,unreadCount:(_e==null?void 0:_e.count)??0}},DEFAULT_EVENTS=["mousedown","touchstart"];function useClickOutside(e0,_e,i0,r0=!0){let t0=reactExports.useRef(null);return reactExports.useEffect(()=>{if(!r0)return;let n0=s0=>{let{target:o0}=s0??{};if(Array.isArray(i0)){let a0=(o0==null?void 0:o0.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(o0)&&o0.tagName!=="HTML";i0.every(f0=>!!f0&&!s0.composedPath().includes(f0))&&!a0&&e0()}else t0.current&&!t0.current.contains(o0)&&e0()};return DEFAULT_EVENTS.forEach(s0=>{document.addEventListener(s0,n0)}),()=>{DEFAULT_EVENTS.forEach(s0=>{document.removeEventListener(s0,n0)})}},[t0,e0,i0,_e,r0]),t0}var useConversation=()=>{let e0=useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|view"),_e=useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|preauth"),[i0,r0]=reactExports.useState(""),t0={unread:!0,_:new Date().getTime()},{data:n0}=useQuery({queryKey:["folder","count","inbox"],queryFn:async()=>await odeServices.http().get(e0?"/zimbra/count/INBOX":"/conversation/api/count/inbox",{queryParams:t0}),staleTime:300*1e3}),s0=async()=>{let o0="/zimbra/zimbra";try{let{preference:a0}=await odeServices.http().get("/userbook/preference/zimbra");r0(a0&&JSON.parse(a0).modeExpert&&_e?"/zimbra/preauth":window.location.origin+o0)}catch(a0){console.error(a0),r0(window.location.origin+o0)}};return reactExports.useEffect(()=>{s0()},[]),{messages:n0?n0.count:0,msgLink:i0,zimbraWorkflow:e0}},dayjs_min={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){var i0=1e3,r0=6e4,t0=36e5,n0="millisecond",s0="second",o0="minute",a0="hour",f0="day",l0="week",u0="month",A0="quarter",c0="year",k0="date",d0="Invalid Date",h0=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b0=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p0={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(C0){var E0=["th","st","nd","rd"],R0=C0%100;return"["+C0+(E0[(R0-20)%10]||E0[R0]||E0[0])+"]"}},m0=function(C0,E0,R0){var M0=String(C0);return!M0||M0.length>=E0?C0:""+Array(E0+1-M0.length).join(R0)+C0},g0={s:m0,z:function(C0){var E0=-C0.utcOffset(),R0=Math.abs(E0),M0=Math.floor(R0/60),T0=R0%60;return(E0<=0?"+":"-")+m0(M0,2,"0")+":"+m0(T0,2,"0")},m:function C0(E0,R0){if(E0.date()<R0.date())return-C0(R0,E0);var M0=12*(R0.year()-E0.year())+(R0.month()-E0.month()),T0=E0.clone().add(M0,u0),G0=R0-T0<0,j0=E0.clone().add(M0+(G0?-1:1),u0);return+(-(M0+(R0-T0)/(G0?T0-j0:j0-T0))||0)},a:function(C0){return C0<0?Math.ceil(C0)||0:Math.floor(C0)},p:function(C0){return{M:u0,y:c0,w:l0,d:f0,D:k0,h:a0,m:o0,s:s0,ms:n0,Q:A0}[C0]||String(C0||"").toLowerCase().replace(/s$/,"")},u:function(C0){return C0===void 0}},v0="en",w0={};w0[v0]=p0;var x0="$isDayjsObject",_0=function(C0){return C0 instanceof I0||!(!C0||!C0[x0])},y0=function C0(E0,R0,M0){var T0;if(!E0)return v0;if(typeof E0=="string"){var G0=E0.toLowerCase();w0[G0]&&(T0=G0),R0&&(w0[G0]=R0,T0=G0);var j0=E0.split("-");if(!T0&&j0.length>1)return C0(j0[0])}else{var N0=E0.name;w0[N0]=E0,T0=N0}return!M0&&T0&&(v0=T0),T0||!M0&&v0},S0=function(C0,E0){if(_0(C0))return C0.clone();var R0=typeof E0=="object"?E0:{};return R0.date=C0,R0.args=arguments,new I0(R0)},B0=g0;B0.l=y0,B0.i=_0,B0.w=function(C0,E0){return S0(C0,{locale:E0.$L,utc:E0.$u,x:E0.$x,$offset:E0.$offset})};var I0=function(){function C0(R0){this.$L=y0(R0.locale,null,!0),this.parse(R0),this.$x=this.$x||R0.x||{},this[x0]=!0}var E0=C0.prototype;return E0.parse=function(R0){this.$d=function(M0){var T0=M0.date,G0=M0.utc;if(T0===null)return new Date(NaN);if(B0.u(T0))return new Date;if(T0 instanceof Date)return new Date(T0);if(typeof T0=="string"&&!/Z$/i.test(T0)){var j0=T0.match(h0);if(j0){var N0=j0[2]-1||0,O0=(j0[7]||"0").substring(0,3);return G0?new Date(Date.UTC(j0[1],N0,j0[3]||1,j0[4]||0,j0[5]||0,j0[6]||0,O0)):new Date(j0[1],N0,j0[3]||1,j0[4]||0,j0[5]||0,j0[6]||0,O0)}}return new Date(T0)}(R0),this.init()},E0.init=function(){var R0=this.$d;this.$y=R0.getFullYear(),this.$M=R0.getMonth(),this.$D=R0.getDate(),this.$W=R0.getDay(),this.$H=R0.getHours(),this.$m=R0.getMinutes(),this.$s=R0.getSeconds(),this.$ms=R0.getMilliseconds()},E0.$utils=function(){return B0},E0.isValid=function(){return this.$d.toString()!==d0},E0.isSame=function(R0,M0){var T0=S0(R0);return this.startOf(M0)<=T0&&T0<=this.endOf(M0)},E0.isAfter=function(R0,M0){return S0(R0)<this.startOf(M0)},E0.isBefore=function(R0,M0){return this.endOf(M0)<S0(R0)},E0.$g=function(R0,M0,T0){return B0.u(R0)?this[M0]:this.set(T0,R0)},E0.unix=function(){return Math.floor(this.valueOf()/1e3)},E0.valueOf=function(){return this.$d.getTime()},E0.startOf=function(R0,M0){var T0=this,G0=!!B0.u(M0)||M0,j0=B0.p(R0),N0=function(J0,_i){var Q0=B0.w(T0.$u?Date.UTC(T0.$y,_i,J0):new Date(T0.$y,_i,J0),T0);return G0?Q0:Q0.endOf(f0)},O0=function(J0,_i){return B0.w(T0.toDate()[J0].apply(T0.toDate("s"),(G0?[0,0,0,0]:[23,59,59,999]).slice(_i)),T0)},Y0=this.$W,D0=this.$M,$0=this.$D,z0="set"+(this.$u?"UTC":"");switch(j0){case c0:return G0?N0(1,0):N0(31,11);case u0:return G0?N0(1,D0):N0(0,D0+1);case l0:var K0=this.$locale().weekStart||0,e2=(Y0<K0?Y0+7:Y0)-K0;return N0(G0?$0-e2:$0+(6-e2),D0);case f0:case k0:return O0(z0+"Hours",0);case a0:return O0(z0+"Minutes",1);case o0:return O0(z0+"Seconds",2);case s0:return O0(z0+"Milliseconds",3);default:return this.clone()}},E0.endOf=function(R0){return this.startOf(R0,!1)},E0.$set=function(R0,M0){var T0,G0=B0.p(R0),j0="set"+(this.$u?"UTC":""),N0=(T0={},T0[f0]=j0+"Date",T0[k0]=j0+"Date",T0[u0]=j0+"Month",T0[c0]=j0+"FullYear",T0[a0]=j0+"Hours",T0[o0]=j0+"Minutes",T0[s0]=j0+"Seconds",T0[n0]=j0+"Milliseconds",T0)[G0],O0=G0===f0?this.$D+(M0-this.$W):M0;if(G0===u0||G0===c0){var Y0=this.clone().set(k0,1);Y0.$d[N0](O0),Y0.init(),this.$d=Y0.set(k0,Math.min(this.$D,Y0.daysInMonth())).$d}else N0&&this.$d[N0](O0);return this.init(),this},E0.set=function(R0,M0){return this.clone().$set(R0,M0)},E0.get=function(R0){return this[B0.p(R0)]()},E0.add=function(R0,M0){var T0,G0=this;R0=Number(R0);var j0=B0.p(M0),N0=function(D0){var $0=S0(G0);return B0.w($0.date($0.date()+Math.round(D0*R0)),G0)};if(j0===u0)return this.set(u0,this.$M+R0);if(j0===c0)return this.set(c0,this.$y+R0);if(j0===f0)return N0(1);if(j0===l0)return N0(7);var O0=(T0={},T0[o0]=r0,T0[a0]=t0,T0[s0]=i0,T0)[j0]||1,Y0=this.$d.getTime()+R0*O0;return B0.w(Y0,this)},E0.subtract=function(R0,M0){return this.add(-1*R0,M0)},E0.format=function(R0){var M0=this,T0=this.$locale();if(!this.isValid())return T0.invalidDate||d0;var G0=R0||"YYYY-MM-DDTHH:mm:ssZ",j0=B0.z(this),N0=this.$H,O0=this.$m,Y0=this.$M,D0=T0.weekdays,$0=T0.months,z0=T0.meridiem,K0=function(_i,Q0,U0,i2){return _i&&(_i[Q0]||_i(M0,G0))||U0[Q0].slice(0,i2)},e2=function(_i){return B0.s(N0%12||12,_i,"0")},J0=z0||function(_i,Q0,U0){var i2=_i<12?"AM":"PM";return U0?i2.toLowerCase():i2};return G0.replace(b0,function(_i,Q0){return Q0||function(U0){switch(U0){case"YY":return String(M0.$y).slice(-2);case"YYYY":return B0.s(M0.$y,4,"0");case"M":return Y0+1;case"MM":return B0.s(Y0+1,2,"0");case"MMM":return K0(T0.monthsShort,Y0,$0,3);case"MMMM":return K0($0,Y0);case"D":return M0.$D;case"DD":return B0.s(M0.$D,2,"0");case"d":return String(M0.$W);case"dd":return K0(T0.weekdaysMin,M0.$W,D0,2);case"ddd":return K0(T0.weekdaysShort,M0.$W,D0,3);case"dddd":return D0[M0.$W];case"H":return String(N0);case"HH":return B0.s(N0,2,"0");case"h":return e2(1);case"hh":return e2(2);case"a":return J0(N0,O0,!0);case"A":return J0(N0,O0,!1);case"m":return String(O0);case"mm":return B0.s(O0,2,"0");case"s":return String(M0.$s);case"ss":return B0.s(M0.$s,2,"0");case"SSS":return B0.s(M0.$ms,3,"0");case"Z":return j0}return null}(_i)||j0.replace(":","")})},E0.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E0.diff=function(R0,M0,T0){var G0,j0=this,N0=B0.p(M0),O0=S0(R0),Y0=(O0.utcOffset()-this.utcOffset())*r0,D0=this-O0,$0=function(){return B0.m(j0,O0)};switch(N0){case c0:G0=$0()/12;break;case u0:G0=$0();break;case A0:G0=$0()/3;break;case l0:G0=(D0-Y0)/6048e5;break;case f0:G0=(D0-Y0)/864e5;break;case a0:G0=D0/t0;break;case o0:G0=D0/r0;break;case s0:G0=D0/i0;break;default:G0=D0}return T0?G0:B0.a(G0)},E0.daysInMonth=function(){return this.endOf(u0).$D},E0.$locale=function(){return w0[this.$L]},E0.locale=function(R0,M0){if(!R0)return this.$L;var T0=this.clone(),G0=y0(R0,M0,!0);return G0&&(T0.$L=G0),T0},E0.clone=function(){return B0.w(this.$d,this)},E0.toDate=function(){return new Date(this.valueOf())},E0.toJSON=function(){return this.isValid()?this.toISOString():null},E0.toISOString=function(){return this.$d.toISOString()},E0.toString=function(){return this.$d.toUTCString()},C0}(),F0=I0.prototype;return S0.prototype=F0,[["$ms",n0],["$s",s0],["$m",o0],["$H",a0],["$W",f0],["$M",u0],["$y",c0],["$D",k0]].forEach(function(C0){F0[C0[1]]=function(E0){return this.$g(E0,C0[0],C0[1])}}),S0.extend=function(C0,E0){return C0.$i||(C0(E0,I0,S0),C0.$i=!0),S0},S0.locale=y0,S0.isDayjs=_0,S0.unix=function(C0){return S0(1e3*C0)},S0.en=w0[v0],S0.Ls=w0,S0.p={},S0})})(dayjs_min);var dayjs_minExports=dayjs_min.exports;const dayjs=getDefaultExportFromCjs(dayjs_minExports);var customParseFormat$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){var i0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r0=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,t0=/\d/,n0=/\d\d/,s0=/\d\d?/,o0=/\d*[^-_:/,()\s\d]+/,a0={},f0=function(h0){return(h0=+h0)+(h0>68?1900:2e3)},l0=function(h0){return function(b0){this[h0]=+b0}},u0=[/[+-]\d\d:?(\d\d)?|Z/,function(h0){(this.zone||(this.zone={})).offset=function(b0){if(!b0||b0==="Z")return 0;var p0=b0.match(/([+-]|\d\d)/g),m0=60*p0[1]+(+p0[2]||0);return m0===0?0:p0[0]==="+"?-m0:m0}(h0)}],A0=function(h0){var b0=a0[h0];return b0&&(b0.indexOf?b0:b0.s.concat(b0.f))},c0=function(h0,b0){var p0,m0=a0.meridiem;if(m0){for(var g0=1;g0<=24;g0+=1)if(h0.indexOf(m0(g0,0,b0))>-1){p0=g0>12;break}}else p0=h0===(b0?"pm":"PM");return p0},k0={A:[o0,function(h0){this.afternoon=c0(h0,!1)}],a:[o0,function(h0){this.afternoon=c0(h0,!0)}],Q:[t0,function(h0){this.month=3*(h0-1)+1}],S:[t0,function(h0){this.milliseconds=100*+h0}],SS:[n0,function(h0){this.milliseconds=10*+h0}],SSS:[/\d{3}/,function(h0){this.milliseconds=+h0}],s:[s0,l0("seconds")],ss:[s0,l0("seconds")],m:[s0,l0("minutes")],mm:[s0,l0("minutes")],H:[s0,l0("hours")],h:[s0,l0("hours")],HH:[s0,l0("hours")],hh:[s0,l0("hours")],D:[s0,l0("day")],DD:[n0,l0("day")],Do:[o0,function(h0){var b0=a0.ordinal,p0=h0.match(/\d+/);if(this.day=p0[0],b0)for(var m0=1;m0<=31;m0+=1)b0(m0).replace(/\[|\]/g,"")===h0&&(this.day=m0)}],w:[s0,l0("week")],ww:[n0,l0("week")],M:[s0,l0("month")],MM:[n0,l0("month")],MMM:[o0,function(h0){var b0=A0("months"),p0=(A0("monthsShort")||b0.map(function(m0){return m0.slice(0,3)})).indexOf(h0)+1;if(p0<1)throw new Error;this.month=p0%12||p0}],MMMM:[o0,function(h0){var b0=A0("months").indexOf(h0)+1;if(b0<1)throw new Error;this.month=b0%12||b0}],Y:[/[+-]?\d+/,l0("year")],YY:[n0,function(h0){this.year=f0(h0)}],YYYY:[/\d{4}/,l0("year")],Z:u0,ZZ:u0};function d0(h0){var b0,p0;b0=h0,p0=a0&&a0.formats;for(var m0=(h0=b0.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S0,B0,I0){var F0=I0&&I0.toUpperCase();return B0||p0[I0]||i0[I0]||p0[F0].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(C0,E0,R0){return E0||R0.slice(1)})})).match(r0),g0=m0.length,v0=0;v0<g0;v0+=1){var w0=m0[v0],x0=k0[w0],_0=x0&&x0[0],y0=x0&&x0[1];m0[v0]=y0?{regex:_0,parser:y0}:w0.replace(/^\[|\]$/g,"")}return function(S0){for(var B0={},I0=0,F0=0;I0<g0;I0+=1){var C0=m0[I0];if(typeof C0=="string")F0+=C0.length;else{var E0=C0.regex,R0=C0.parser,M0=S0.slice(F0),T0=E0.exec(M0)[0];R0.call(B0,T0),S0=S0.replace(T0,"")}}return function(G0){var j0=G0.afternoon;if(j0!==void 0){var N0=G0.hours;j0?N0<12&&(G0.hours+=12):N0===12&&(G0.hours=0),delete G0.afternoon}}(B0),B0}}return function(h0,b0,p0){p0.p.customParseFormat=!0,h0&&h0.parseTwoDigitYear&&(f0=h0.parseTwoDigitYear);var m0=b0.prototype,g0=m0.parse;m0.parse=function(v0){var w0=v0.date,x0=v0.utc,_0=v0.args;this.$u=x0;var y0=_0[1];if(typeof y0=="string"){var S0=_0[2]===!0,B0=_0[3]===!0,I0=S0||B0,F0=_0[2];B0&&(F0=_0[2]),a0=this.$locale(),!S0&&F0&&(a0=p0.Ls[F0]),this.$d=function(M0,T0,G0,j0){try{if(["x","X"].indexOf(T0)>-1)return new Date((T0==="X"?1e3:1)*M0);var N0=d0(T0)(M0),O0=N0.year,Y0=N0.month,D0=N0.day,$0=N0.hours,z0=N0.minutes,K0=N0.seconds,e2=N0.milliseconds,J0=N0.zone,_i=N0.week,Q0=new Date,U0=D0||(O0||Y0?1:Q0.getDate()),i2=O0||Q0.getFullYear(),s2=0;O0&&!Y0||(s2=Y0>0?Y0-1:Q0.getMonth());var f2,c2=$0||0,m2=z0||0,w2=K0||0,_2=e2||0;return J0?new Date(Date.UTC(i2,s2,U0,c2,m2,w2,_2+60*J0.offset*1e3)):G0?new Date(Date.UTC(i2,s2,U0,c2,m2,w2,_2)):(f2=new Date(i2,s2,U0,c2,m2,w2,_2),_i&&(f2=j0(f2).week(_i).toDate()),f2)}catch{return new Date("")}}(w0,y0,x0,p0),this.init(),F0&&F0!==!0&&(this.$L=this.locale(F0).$L),I0&&w0!=this.format(y0)&&(this.$d=new Date("")),a0={}}else if(y0 instanceof Array)for(var C0=y0.length,E0=1;E0<=C0;E0+=1){_0[1]=y0[E0-1];var R0=p0.apply(this,_0);if(R0.isValid()){this.$d=R0.$d,this.$L=R0.$L,this.init();break}E0===C0&&(this.$d=new Date(""))}else g0.call(this,v0)}}})})(customParseFormat$1);var customParseFormatExports=customParseFormat$1.exports;const customParseFormat=getDefaultExportFromCjs(customParseFormatExports);var isSameOrAfter$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){return function(i0,r0){r0.prototype.isSameOrAfter=function(t0,n0){return this.isSame(t0,n0)||this.isAfter(t0,n0)}}})})(isSameOrAfter$1);var isSameOrAfterExports=isSameOrAfter$1.exports;const isSameOrAfter=getDefaultExportFromCjs(isSameOrAfterExports);var isToday$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){return function(i0,r0,t0){r0.prototype.isToday=function(){var n0="YYYY-MM-DD",s0=t0();return this.format(n0)===s0.format(n0)}}})})(isToday$1);var isTodayExports=isToday$1.exports;const isToday=getDefaultExportFromCjs(isTodayExports);var localizedFormat$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){var i0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r0,t0,n0){var s0=t0.prototype,o0=s0.format;n0.en.formats=i0,s0.format=function(a0){a0===void 0&&(a0="YYYY-MM-DDTHH:mm:ssZ");var f0=this.$locale().formats,l0=function(u0,A0){return u0.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(c0,k0,d0){var h0=d0&&d0.toUpperCase();return k0||A0[d0]||i0[d0]||A0[h0].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(b0,p0,m0){return p0||m0.slice(1)})})}(a0,f0===void 0?{}:f0);return o0.call(this,l0)}}})})(localizedFormat$1);var localizedFormatExports=localizedFormat$1.exports;const localizedFormat=getDefaultExportFromCjs(localizedFormatExports);var relativeTime$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){return function(i0,r0,t0){i0=i0||{};var n0=r0.prototype,s0={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o0(f0,l0,u0,A0){return n0.fromToBase(f0,l0,u0,A0)}t0.en.relativeTime=s0,n0.fromToBase=function(f0,l0,u0,A0,c0){for(var k0,d0,h0,b0=u0.$locale().relativeTime||s0,p0=i0.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m0=p0.length,g0=0;g0<m0;g0+=1){var v0=p0[g0];v0.d&&(k0=A0?t0(f0).diff(u0,v0.d,!0):u0.diff(f0,v0.d,!0));var w0=(i0.rounding||Math.round)(Math.abs(k0));if(h0=k0>0,w0<=v0.r||!v0.r){w0<=1&&g0>0&&(v0=p0[g0-1]);var x0=b0[v0.l];c0&&(w0=c0(""+w0)),d0=typeof x0=="string"?x0.replace("%d",w0):x0(w0,l0,v0.l,h0);break}}if(l0)return d0;var _0=h0?b0.future:b0.past;return typeof _0=="function"?_0(d0):_0.replace("%s",d0)},n0.to=function(f0,l0){return o0(f0,l0,this,!0)},n0.from=function(f0,l0){return o0(f0,l0,this)};var a0=function(f0){return f0.$u?t0.utc():t0()};n0.toNow=function(f0){return this.to(a0(this),f0)},n0.fromNow=function(f0){return this.from(a0(this),f0)}}})})(relativeTime$1);var relativeTimeExports=relativeTime$1.exports;const relativeTime=getDefaultExportFromCjs(relativeTimeExports);var de$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal,function(i0){function r0(a0){return a0&&typeof a0=="object"&&"default"in a0?a0:{default:a0}}var t0=r0(i0),n0={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function s0(a0,f0,l0){var u0=n0[l0];return Array.isArray(u0)&&(u0=u0[f0?0:1]),u0.replace("%d",a0)}var o0={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(a0){return a0+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:s0,m:s0,mm:s0,h:s0,hh:s0,d:s0,dd:s0,M:s0,MM:s0,y:s0,yy:s0}};return t0.default.locale(o0,null,!0),o0})})(de$1);var es={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(s0){return s0+"º"}};return t0.default.locale(n0,null,!0),n0})})(es);var fr={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(s0){return""+s0+(s0===1?"er":"")}};return t0.default.locale(n0,null,!0),n0})})(fr);var it={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(s0){return s0+"º"}};return t0.default.locale(n0,null,!0),n0})})(it);var pt={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"pt",weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sab".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sa".split("_"),months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(s0){return s0+"º"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},relativeTime:{future:"em %s",past:"há %s",s:"alguns segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"}};return t0.default.locale(n0,null,!0),n0})})(pt);dayjs.extend(relativeTime),dayjs.extend(customParseFormat),dayjs.extend(localizedFormat),dayjs.extend(isSameOrAfter),dayjs.extend(isToday);function formatRelativeToNow(e0,_e){let i0=e0.diff(_e,"second"),r0=i0>0,t0=Math.abs(i0),n0,s0;t0<60?(n0="s",s0=t0):t0<3600?(s0=Math.floor(t0/60),n0=s0<2?"m":"mm"):(s0=Math.floor(t0/3600),n0=s0<2?"h":"hh");let o0=(dayjs.Ls[e0.locale()]??dayjs.Ls.en).relativeTime,a0=o0[n0],f0=typeof a0=="function"?a0(s0,!1,n0,r0):(a0??"").replace("%d",String(s0)),l0=o0[r0?"future":"past"];return typeof l0=="function"?l0(f0):(l0??"%s").replace("%s",f0)}var FRIENDLY_RELATIVE_MAX_HOURS=3;function useDate(){let{currentLanguage:e0}=useEdificeClient(),{t:_e}=useTranslation(),i0=reactExports.useCallback((g0,v0)=>{if(g0.length<11)return dayjs(g0,["YYYY-MM-DD"],v0??e0);if(g0.split("").findIndex(w0=>"0">w0||w0>"9")<0)return dayjs(Number.parseInt(g0)).locale(e0);{let w0=dayjs(g0).locale(e0);return w0.isValid()||(w0=dayjs(g0,["YYYY-MM-DD HH:mm:ss.SSS"]).locale(e0)),w0}},[e0]),r0=reactExports.useCallback(g0=>{let v0=dayjs();try{return g0===void 0?void 0:(typeof g0=="string"?v0=i0(g0):g0 instanceof Date||typeof g0=="number"?v0=dayjs(g0).locale(e0):typeof g0.$date=="number"?v0=dayjs(new Date(g0.$date)).locale(e0):typeof g0.$date=="string"&&(v0=i0(g0.$date)),v0)}catch(w0){console.error(w0)}return v0},[e0,i0]),t0=reactExports.useCallback((g0,v0)=>{let w0=r0(g0);if(!(w0!=null&&w0.isValid()))return"";let x0=dayjs();if(w0.isToday()||Math.abs(x0.diff(w0,"hour"))<=FRIENDLY_RELATIVE_MAX_HOURS)return formatRelativeToNow(w0,x0);let _0;return _0=w0.isSame(x0.subtract(1,"day"),"day")?"yesterday":w0.isSame(x0.add(1,"day"),"day")?"tomorrow":Math.abs(x0.diff(w0,"day"))<7?"weekday":w0.isSame(x0,"year")?"currentYear":"otherYear",w0.format(_e(`date.friendly.${v0}.${_0}`))},[r0,_e]),n0=reactExports.useCallback(g0=>t0(g0,"datetime"),[t0]),s0=reactExports.useCallback(g0=>t0(g0,"date"),[t0]),o0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.format(_e("date.long.datetime")):""},[r0,_e]),a0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.format(_e("date.long.date")):""},[r0,_e]),f0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.format(_e("date.raw.date")):""},[r0,_e]),l0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.format(_e("date.raw.datetime")):""},[r0,_e]),u0=reactExports.useCallback((g0,v0="full")=>{let w0=r0(g0);if(!(w0!=null&&w0.isValid()))return"";let x0=dayjs();if(w0.isToday())return _e("date.calendar.today");if(w0.isSame(x0.subtract(1,"day"),"day"))return _e("date.calendar.yesterday");if(w0.isSame(x0.add(1,"day"),"day"))return _e("date.calendar.tomorrow");let _0=w0.isSame(x0,"year")?"currentYear":"otherYear";return w0.format(_e(`date.calendar.${v0}.${_0}`))},[r0,_e]),A0=reactExports.useCallback(g0=>{let v0=r0(g0);if(!(v0!=null&&v0.isValid()))return"";let w0=dayjs().locale(e0),x0=v0.startOf("week"),_0=x0.diff(w0.startOf("week"),"week");if(_0===0)return _e("date.week.current");let y0=x0.endOf("week");return _0===-1||_0===1?_e(_0===-1?"date.week.last":"date.week.next",{start:x0.format(_e("date.week.boundary.short")),end:y0.format(_e("date.week.boundary.short"))}):_e(x0.isSame(w0,"year")?"date.week.other.currentYear":"date.week.other.otherYear",{start:x0.format(_e("date.week.boundary.day")),end:y0.format(_e("date.week.boundary.dayMonth")),year:x0.format("YYYY")})},[e0,r0,_e]),c0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.toDate():void 0},[r0]),k0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.valueOf():void 0},[r0]),d0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.toISOString():void 0},[r0]),h0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?{$date:v0.valueOf()}:void 0},[r0]),b0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.fromNow():""},[r0]),p0=reactExports.useCallback(g0=>{let v0=r0(g0);if(!(v0!=null&&v0.isValid()))return"";let w0=dayjs();return v0.isSame(w0,"date")?v0.fromNow():v0.isSame(w0.subtract(1,"day"),"date")?_e("date.format.yesterday"):w0.diff(v0,"days")<=7?v0.format(_e("date.format.currentWeek")):v0.isSame(w0,"year")?v0.format(_e("date.format.currentYear")):v0.format(_e("date.format.previousYear"))},[r0,_e]),m0=reactExports.useCallback((g0,v0="short")=>{let w0=r0(g0),x0="";switch(v0){case"short":x0="L";break;case"long":x0="LL";break;case"abbr":x0="ll";break;default:x0=v0}return w0!=null&&w0.isValid()?w0.locale(e0).format(x0):""},[e0,r0]);return{formatRelativeDateTime:n0,formatRelativeDate:s0,formatLongDateTime:o0,formatLongDate:a0,formatRawDate:f0,formatRawDateTime:l0,formatCalendarDate:u0,formatWeek:A0,toJsDate:c0,toTimestamp:k0,toIsoDate:d0,toMongoDate:h0,dateIsSame:reactExports.useCallback((g0,v0,w0="day")=>{let x0=r0(g0),_0=r0(v0);return(x0==null?void 0:x0.isSame(_0,w0))??!1},[r0]),dateIsSameOrAfter:reactExports.useCallback((g0,v0,w0="day")=>{let x0=r0(g0),_0=r0(v0);return(x0==null?void 0:x0.isSameOrAfter(_0,w0))??!1},[r0]),dateIsToday:reactExports.useCallback(g0=>{var v0;return((v0=r0(g0))==null?void 0:v0.isToday())??!1},[r0]),fromNow:b0,formatDate:m0,formatTimeAgo:p0}}var useDirectory=()=>{function e0(i0,r0){if(i0!=="")return odeServices.directory().getAvatarUrl(i0,r0)}function _e(i0,r0){return odeServices.directory().getDirectoryUrl(i0,r0)}return{getAvatarURL:e0,getUserbookURL:_e}};function mergeRefs(...e0){return _e=>{setRef(_e,...e0)}}function setRef(e0,..._e){_e.forEach(i0=>{typeof i0=="function"?i0(e0):i0!=null&&(i0.current=e0)})}function getNodeName$2(e0){return isNode$3(e0)?(e0.nodeName||"").toLowerCase():"#document"}function getWindow$4(e0){var _e;return(e0==null||(_e=e0.ownerDocument)==null?void 0:_e.defaultView)||window}function getDocumentElement$2(e0){var _e;return(_e=(isNode$3(e0)?e0.ownerDocument:e0.document)||window.document)==null?void 0:_e.documentElement}function isNode$3(e0){return e0 instanceof Node||e0 instanceof getWindow$4(e0).Node}function isElement$2(e0){return e0 instanceof Element||e0 instanceof getWindow$4(e0).Element}function isHTMLElement$4(e0){return e0 instanceof HTMLElement||e0 instanceof getWindow$4(e0).HTMLElement}function isShadowRoot$2(e0){return typeof ShadowRoot>"u"?!1:e0 instanceof ShadowRoot||e0 instanceof getWindow$4(e0).ShadowRoot}function isLastTraversableNode$1(e0){return["html","body","#document"].includes(getNodeName$2(e0))}function getComputedStyle$4(e0){return getWindow$4(e0).getComputedStyle(e0)}function getParentNode$2(e0){if(getNodeName$2(e0)==="html")return e0;const _e=e0.assignedSlot||e0.parentNode||isShadowRoot$2(e0)&&e0.host||getDocumentElement$2(e0);return isShadowRoot$2(_e)?_e.host:_e}function activeElement(e0){let _e=e0.activeElement;for(;((i0=_e)==null||(r0=i0.shadowRoot)==null?void 0:r0.activeElement)!=null;){var i0,r0;_e=_e.shadowRoot.activeElement}return _e}function contains$2(e0,_e){if(!e0||!_e)return!1;const i0=_e.getRootNode&&_e.getRootNode();if(e0.contains(_e))return!0;if(i0&&isShadowRoot$2(i0)){let r0=_e;for(;r0;){if(e0===r0)return!0;r0=r0.parentNode||r0.host}}return!1}function getPlatform(){const e0=navigator.userAgentData;return e0!=null&&e0.platform?e0.platform:navigator.platform}function getUserAgent(){const e0=navigator.userAgentData;return e0&&Array.isArray(e0.brands)?e0.brands.map(_e=>{let{brand:i0,version:r0}=_e;return i0+"/"+r0}).join(" "):navigator.userAgent}function isVirtualClick(e0){return e0.mozInputSource===0&&e0.isTrusted?!0:isAndroid()&&e0.pointerType?e0.type==="click"&&e0.buttons===1:e0.detail===0&&!e0.pointerType}function isVirtualPointerEvent(e0){return!isAndroid()&&e0.width===0&&e0.height===0||e0.width===1&&e0.height===1&&e0.pressure===0&&e0.detail===0&&e0.pointerType==="mouse"||e0.width<1&&e0.height<1&&e0.pressure===0&&e0.detail===0}function isSafari$1(){return/apple/i.test(navigator.vendor)}function isAndroid(){const e0=/android/i;return e0.test(getPlatform())||e0.test(getUserAgent())}function isMouseLikePointerType(e0,_e){const i0=["mouse","pen"];return _e||i0.push("",void 0),i0.includes(e0)}function isReactEvent(e0){return"nativeEvent"in e0}function isRootElement(e0){return e0.matches("html,body")}function getDocument$1(e0){return(e0==null?void 0:e0.ownerDocument)||document}function isEventTargetWithin(e0,_e){if(_e==null)return!1;if("composedPath"in e0)return e0.composedPath().includes(_e);const i0=e0;return i0.target!=null&&_e.contains(i0.target)}function getTarget(e0){return"composedPath"in e0?e0.composedPath()[0]:e0.target}const TYPEABLE_SELECTOR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function isTypeableElement(e0){return isHTMLElement$4(e0)&&e0.matches(TYPEABLE_SELECTOR)}const min$1=Math.min,max$1=Math.max,round$3=Math.round,floor=Math.floor,createCoords=e0=>({x:e0,y:e0}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"};function evaluate(e0,_e){return typeof e0=="function"?e0(_e):e0}function getSide(e0){return e0.split("-")[0]}function getAlignment(e0){return e0.split("-")[1]}function getOppositeAxis(e0){return e0==="x"?"y":"x"}function getAxisLength(e0){return e0==="y"?"height":"width"}function getSideAxis(e0){const _e=e0[0];return _e==="t"||_e==="b"?"y":"x"}function getAlignmentAxis(e0){return getOppositeAxis(getSideAxis(e0))}function getAlignmentSides(e0,_e,i0){i0===void 0&&(i0=!1);const r0=getAlignment(e0),t0=getAlignmentAxis(e0),n0=getAxisLength(t0);let s0=t0==="x"?r0===(i0?"end":"start")?"right":"left":r0==="start"?"bottom":"top";return _e.reference[n0]>_e.floating[n0]&&(s0=getOppositePlacement$1(s0)),[s0,getOppositePlacement$1(s0)]}function getExpandedPlacements(e0){const _e=getOppositePlacement$1(e0);return[getOppositeAlignmentPlacement(e0),_e,getOppositeAlignmentPlacement(_e)]}function getOppositeAlignmentPlacement(e0){return e0.includes("start")?e0.replace("start","end"):e0.replace("end","start")}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(e0,_e,i0){switch(e0){case"top":case"bottom":return i0?_e?rlPlacement:lrPlacement:_e?lrPlacement:rlPlacement;case"left":case"right":return _e?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(e0,_e,i0,r0){const t0=getAlignment(e0);let n0=getSideList(getSide(e0),i0==="start",r0);return t0&&(n0=n0.map(s0=>s0+"-"+t0),_e&&(n0=n0.concat(n0.map(getOppositeAlignmentPlacement)))),n0}function getOppositePlacement$1(e0){const _e=getSide(e0);return oppositeSideMap[_e]+e0.slice(_e.length)}function expandPaddingObject(e0){var _e,i0,r0,t0;return{top:(_e=e0.top)!=null?_e:0,right:(i0=e0.right)!=null?i0:0,bottom:(r0=e0.bottom)!=null?r0:0,left:(t0=e0.left)!=null?t0:0}}function getPaddingObject(e0){return typeof e0!="number"?expandPaddingObject(e0):{top:e0,right:e0,bottom:e0,left:e0}}function rectToClientRect$1(e0){const{x:_e,y:i0,width:r0,height:t0}=e0;return{width:r0,height:t0,top:i0,left:_e,right:_e+r0,bottom:i0+t0,x:_e,y:i0}}function computeCoordsFromPlacement(e0,_e,i0){let{reference:r0,floating:t0}=e0;const n0=getSideAxis(_e),s0=getAlignmentAxis(_e),o0=getAxisLength(s0),a0=getSide(_e),f0=n0==="y",l0=r0.x+r0.width/2-t0.width/2,u0=r0.y+r0.height/2-t0.height/2,A0=r0[o0]/2-t0[o0]/2;let c0;switch(a0){case"top":c0={x:l0,y:r0.y-t0.height};break;case"bottom":c0={x:l0,y:r0.y+r0.height};break;case"right":c0={x:r0.x+r0.width,y:u0};break;case"left":c0={x:r0.x-t0.width,y:u0};break;default:c0={x:r0.x,y:r0.y}}const k0=getAlignment(_e);return k0&&(c0[s0]+=A0*(k0==="end"?1:-1)*(i0&&f0?-1:1)),c0}async function detectOverflow$1(e0,_e){var i0;_e===void 0&&(_e={});const{x:r0,y:t0,platform:n0,rects:s0,elements:o0,strategy:a0}=e0,{boundary:f0="clippingAncestors",rootBoundary:l0="viewport",elementContext:u0="floating",altBoundary:A0=!1,padding:c0=0}=evaluate(_e,e0),k0=getPaddingObject(c0),h0=o0[A0?u0==="floating"?"reference":"floating":u0],b0=rectToClientRect$1(await n0.getClippingRect({element:(i0=await(n0.isElement==null?void 0:n0.isElement(h0)))==null||i0?h0:h0.contextElement||await(n0.getDocumentElement==null?void 0:n0.getDocumentElement(o0.floating)),boundary:f0,rootBoundary:l0,strategy:a0})),p0=u0==="floating"?{x:r0,y:t0,width:s0.floating.width,height:s0.floating.height}:s0.reference,m0=await(n0.getOffsetParent==null?void 0:n0.getOffsetParent(o0.floating)),g0=await(n0.isElement==null?void 0:n0.isElement(m0))&&await(n0.getScale==null?void 0:n0.getScale(m0))||{x:1,y:1},v0=rectToClientRect$1(n0.convertOffsetParentRelativeRectToViewportRelativeRect?await n0.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o0,rect:p0,offsetParent:m0,strategy:a0}):p0);return{top:(b0.top-v0.top+k0.top)/g0.y,bottom:(v0.bottom-b0.bottom+k0.bottom)/g0.y,left:(b0.left-v0.left+k0.left)/g0.x,right:(v0.right-b0.right+k0.right)/g0.x}}const MAX_RESET_COUNT=50,computePosition$1=async(e0,_e,i0)=>{const{placement:r0="bottom",strategy:t0="absolute",middleware:n0=[],platform:s0}=i0,o0=s0.detectOverflow?s0:{...s0,detectOverflow:detectOverflow$1},a0=await(s0.isRTL==null?void 0:s0.isRTL(_e));let f0=await s0.getElementRects({reference:e0,floating:_e,strategy:t0}),{x:l0,y:u0}=computeCoordsFromPlacement(f0,r0,a0),A0=r0,c0=0;const k0={};for(let d0=0;d0<n0.length;d0++){const h0=n0[d0];if(!h0)continue;const{name:b0,fn:p0}=h0,{x:m0,y:g0,data:v0,reset:w0}=await p0({x:l0,y:u0,initialPlacement:r0,placement:A0,strategy:t0,middlewareData:k0,rects:f0,platform:o0,elements:{reference:e0,floating:_e}});l0=m0??l0,u0=g0??u0,k0[b0]={...k0[b0],...v0},w0&&c0<MAX_RESET_COUNT&&(c0++,typeof w0=="object"&&(w0.placement&&(A0=w0.placement),w0.rects&&(f0=w0.rects===!0?await s0.getElementRects({reference:e0,floating:_e,strategy:t0}):w0.rects),{x:l0,y:u0}=computeCoordsFromPlacement(f0,A0,a0)),d0=-1)}return{x:l0,y:u0,placement:A0,strategy:t0,middlewareData:k0}},flip$4=function(e0){return e0===void 0&&(e0={}),{name:"flip",options:e0,async fn(_e){var i0,r0;const{placement:t0,middlewareData:n0,rects:s0,initialPlacement:o0,platform:a0,elements:f0}=_e,{mainAxis:l0=!0,crossAxis:u0=!0,fallbackPlacements:A0,fallbackStrategy:c0="bestFit",fallbackAxisSideDirection:k0="none",flipAlignment:d0=!0,...h0}=evaluate(e0,_e);if((i0=n0.arrow)!=null&&i0.alignmentOffset)return{};const b0=getSide(t0),p0=getSideAxis(o0),m0=getSide(o0)===o0,g0=await(a0.isRTL==null?void 0:a0.isRTL(f0.floating)),v0=A0||(m0||!d0?[getOppositePlacement$1(o0)]:getExpandedPlacements(o0)),w0=k0!=="none";!A0&&w0&&v0.push(...getOppositeAxisPlacements(o0,d0,k0,g0));const x0=[o0,...v0],_0=await a0.detectOverflow(_e,h0),y0=[];let S0=((r0=n0.flip)==null?void 0:r0.overflows)||[];if(l0&&y0.push(_0[b0]),u0){const C0=getAlignmentSides(t0,s0,g0);y0.push(_0[C0[0]],_0[C0[1]])}if(S0=[...S0,{placement:t0,overflows:y0}],!y0.every(C0=>C0<=0)){var B0,I0;const C0=(((B0=n0.flip)==null?void 0:B0.index)||0)+1,E0=x0[C0];if(E0&&(!(u0==="alignment"?p0!==getSideAxis(E0):!1)||S0.every(T0=>getSideAxis(T0.placement)===p0?T0.overflows[0]>0:!0)))return{data:{index:C0,overflows:S0},reset:{placement:E0}};let R0=(I0=S0.filter(M0=>M0.overflows[0]<=0).sort((M0,T0)=>M0.overflows[1]-T0.overflows[1])[0])==null?void 0:I0.placement;if(!R0)switch(c0){case"bestFit":{var F0;const M0=(F0=S0.filter(T0=>{if(w0){const G0=getSideAxis(T0.placement);return G0===p0||G0==="y"}return!0}).map(T0=>[T0.placement,T0.overflows.filter(G0=>G0>0).reduce((G0,j0)=>G0+j0,0)]).sort((T0,G0)=>T0[1]-G0[1])[0])==null?void 0:F0[0];M0&&(R0=M0);break}case"initialPlacement":R0=o0;break}if(t0!==R0)return{reset:{placement:R0}}}return{}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(e0,_e){const{placement:i0,platform:r0,elements:t0}=e0,n0=await(r0.isRTL==null?void 0:r0.isRTL(t0.floating)),s0=getSide(i0),o0=getAlignment(i0),a0=getSideAxis(i0)==="y",f0=originSides.has(s0)?-1:1,l0=n0&&a0?-1:1,u0=evaluate(_e,e0);let{mainAxis:A0,crossAxis:c0,alignmentAxis:k0}=typeof u0=="number"?{mainAxis:u0,crossAxis:0,alignmentAxis:null}:{mainAxis:u0.mainAxis||0,crossAxis:u0.crossAxis||0,alignmentAxis:u0.alignmentAxis};return o0&&typeof k0=="number"&&(c0=o0==="end"?k0*-1:k0),a0?{x:c0*l0,y:A0*f0}:{x:A0*f0,y:c0*l0}}const offset$4=function(e0){return e0===void 0&&(e0=0),{name:"offset",options:e0,async fn(_e){var i0,r0;const{x:t0,y:n0,placement:s0,middlewareData:o0}=_e,a0=await convertValueToCoords(_e,e0);return s0===((i0=o0.offset)==null?void 0:i0.placement)&&(r0=o0.arrow)!=null&&r0.alignmentOffset?{}:{x:t0+a0.x,y:n0+a0.y,data:{...a0,placement:s0}}}}},size$2=function(e0){return e0===void 0&&(e0={}),{name:"size",options:e0,async fn(_e){const{placement:i0,rects:r0,platform:t0,elements:n0}=_e,{apply:s0=()=>{},...o0}=evaluate(e0,_e),a0=await t0.detectOverflow(_e,o0),f0=getSide(i0),l0=getAlignment(i0),u0=getSideAxis(i0)==="y",{width:A0,height:c0}=r0.floating;let k0,d0;f0==="top"||f0==="bottom"?(k0=f0,d0=l0===(await(t0.isRTL==null?void 0:t0.isRTL(n0.floating))?"start":"end")?"left":"right"):(d0=f0,k0=l0==="end"?"top":"bottom");const h0=c0-a0.top-a0.bottom,b0=A0-a0.left-a0.right,p0=min$1(c0-a0[k0],h0),m0=min$1(A0-a0[d0],b0),g0=_e.middlewareData.shift,v0=!g0;let w0=p0,x0=m0;g0!=null&&g0.enabled.x&&(x0=b0),g0!=null&&g0.enabled.y&&(w0=h0),v0&&!l0&&(u0?x0=A0-2*max$1(a0.left,a0.right):w0=c0-2*max$1(a0.top,a0.bottom)),await s0({..._e,availableWidth:x0,availableHeight:w0});const _0=await t0.getDimensions(n0.floating);return A0!==_0.width||c0!==_0.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName$1(e0){return isNode$2(e0)?(e0.nodeName||"").toLowerCase():"#document"}function getWindow$3(e0){var _e;return(e0==null||(_e=e0.ownerDocument)==null?void 0:_e.defaultView)||window}function getDocumentElement$1(e0){var _e;return(_e=(isNode$2(e0)?e0.ownerDocument:e0.document)||window.document)==null?void 0:_e.documentElement}function isNode$2(e0){return hasWindow()?e0 instanceof Node||e0 instanceof getWindow$3(e0).Node:!1}function isElement$1(e0){return hasWindow()?e0 instanceof Element||e0 instanceof getWindow$3(e0).Element:!1}function isHTMLElement$3(e0){return hasWindow()?e0 instanceof HTMLElement||e0 instanceof getWindow$3(e0).HTMLElement:!1}function isShadowRoot$1(e0){return!hasWindow()||typeof ShadowRoot>"u"?!1:e0 instanceof ShadowRoot||e0 instanceof getWindow$3(e0).ShadowRoot}function isOverflowElement(e0){const{overflow:_e,overflowX:i0,overflowY:r0,display:t0}=getComputedStyle$3(e0);return/auto|scroll|overlay|hidden|clip/.test(_e+r0+i0)&&t0!=="inline"&&t0!=="contents"}function isTableElement$1(e0){return/^(table|td|th)$/.test(getNodeName$1(e0))}function isTopLayer(e0){try{if(e0.matches(":popover-open"))return!0}catch{}try{return e0.matches(":modal")}catch{return!1}}const willChangeRe=/transform|translate|scale|rotate|perspective|filter/,containRe=/paint|layout|strict|content/,isNotNone=e0=>!!e0&&e0!=="none";let isWebKitValue;function isContainingBlock(e0){const _e=isElement$1(e0)?getComputedStyle$3(e0):e0;return isNotNone(_e.transform)||isNotNone(_e.translate)||isNotNone(_e.scale)||isNotNone(_e.rotate)||isNotNone(_e.perspective)||!isWebKit()&&(isNotNone(_e.backdropFilter)||isNotNone(_e.filter))||willChangeRe.test(_e.willChange||"")||containRe.test(_e.contain||"")}function getContainingBlock$1(e0){let _e=getParentNode$1(e0);for(;isHTMLElement$3(_e)&&!isLastTraversableNode(_e);){if(isContainingBlock(_e))return _e;if(isTopLayer(_e))return null;_e=getParentNode$1(_e)}return null}function isWebKit(){return isWebKitValue==null&&(isWebKitValue=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),isWebKitValue}function isLastTraversableNode(e0){return/^(html|body|#document)$/.test(getNodeName$1(e0))}function getComputedStyle$3(e0){return getWindow$3(e0).getComputedStyle(e0)}function getNodeScroll$1(e0){return isElement$1(e0)?{scrollLeft:e0.scrollLeft,scrollTop:e0.scrollTop}:{scrollLeft:e0.scrollX,scrollTop:e0.scrollY}}function getParentNode$1(e0){if(getNodeName$1(e0)==="html")return e0;const _e=e0.assignedSlot||e0.parentNode||isShadowRoot$1(e0)&&e0.host||getDocumentElement$1(e0);return isShadowRoot$1(_e)?_e.host:_e}function getNearestOverflowAncestor(e0){const _e=getParentNode$1(e0);return isLastTraversableNode(_e)?(e0.ownerDocument||e0).body:isHTMLElement$3(_e)&&isOverflowElement(_e)?_e:getNearestOverflowAncestor(_e)}function getOverflowAncestors(e0,_e,i0){var r0;_e===void 0&&(_e=[]),i0===void 0&&(i0=!0);const t0=getNearestOverflowAncestor(e0),n0=t0===((r0=e0.ownerDocument)==null?void 0:r0.body),s0=getWindow$3(t0);if(n0){const o0=getFrameElement(s0);return _e.concat(s0,s0.visualViewport||[],isOverflowElement(t0)?t0:[],o0&&i0?getOverflowAncestors(o0):[])}else return _e.concat(t0,getOverflowAncestors(t0,[],i0))}function getFrameElement(e0){return e0.parent&&Object.getPrototypeOf(e0.parent)?e0.frameElement:null}function getCssDimensions(e0){const _e=getComputedStyle$3(e0);let i0=parseFloat(_e.width)||0,r0=parseFloat(_e.height)||0;const t0=isHTMLElement$3(e0),n0=t0?e0.offsetWidth:i0,s0=t0?e0.offsetHeight:r0,o0=round$3(i0)!==n0||round$3(r0)!==s0;return o0&&(i0=n0,r0=s0),{width:i0,height:r0,$:o0}}function unwrapElement(e0){return isElement$1(e0)?e0:e0.contextElement}function getScale(e0){const _e=unwrapElement(e0);if(!isHTMLElement$3(_e))return createCoords(1);const i0=_e.getBoundingClientRect(),{width:r0,height:t0,$:n0}=getCssDimensions(_e);let s0=(n0?round$3(i0.width):i0.width)/r0,o0=(n0?round$3(i0.height):i0.height)/t0;return(!s0||!Number.isFinite(s0))&&(s0=1),(!o0||!Number.isFinite(o0))&&(o0=1),{x:s0,y:o0}}const noOffsets=createCoords(0);function getVisualOffsets(e0){const _e=getWindow$3(e0);return!isWebKit()||!_e.visualViewport?noOffsets:{x:_e.visualViewport.offsetLeft,y:_e.visualViewport.offsetTop}}function shouldAddVisualOffsets(e0,_e,i0){return _e===void 0&&(_e=!1),!!i0&&_e&&i0===getWindow$3(e0)}function getBoundingClientRect$1(e0,_e,i0,r0){_e===void 0&&(_e=!1),i0===void 0&&(i0=!1);const t0=e0.getBoundingClientRect(),n0=unwrapElement(e0);let s0=createCoords(1);_e&&(r0?isElement$1(r0)&&(s0=getScale(r0)):s0=getScale(e0));const o0=shouldAddVisualOffsets(n0,i0,r0)?getVisualOffsets(n0):createCoords(0);let a0=(t0.left+o0.x)/s0.x,f0=(t0.top+o0.y)/s0.y,l0=t0.width/s0.x,u0=t0.height/s0.y;if(n0&&r0){const A0=getWindow$3(n0),c0=isElement$1(r0)?getWindow$3(r0):r0;let k0=A0,d0=getFrameElement(k0);for(;d0&&c0!==k0;){const h0=getScale(d0),b0=d0.getBoundingClientRect(),p0=getComputedStyle$3(d0),m0=b0.left+(d0.clientLeft+parseFloat(p0.paddingLeft))*h0.x,g0=b0.top+(d0.clientTop+parseFloat(p0.paddingTop))*h0.y;a0*=h0.x,f0*=h0.y,l0*=h0.x,u0*=h0.y,a0+=m0,f0+=g0,k0=getWindow$3(d0),d0=getFrameElement(k0)}}return rectToClientRect$1({width:l0,height:u0,x:a0,y:f0})}function getWindowScrollBarX$1(e0,_e){const i0=getNodeScroll$1(e0).scrollLeft;return _e?_e.left+i0:getBoundingClientRect$1(getDocumentElement$1(e0)).left+i0}function getHTMLOffset(e0,_e){const i0=e0.getBoundingClientRect(),r0=i0.left+_e.scrollLeft-getWindowScrollBarX$1(e0,i0),t0=i0.top+_e.scrollTop;return{x:r0,y:t0}}function convertOffsetParentRelativeRectToViewportRelativeRect(e0){let{elements:_e,rect:i0,offsetParent:r0,strategy:t0}=e0;const n0=t0==="fixed",s0=getDocumentElement$1(r0),o0=_e?isTopLayer(_e.floating):!1;if(r0===s0||o0&&n0)return i0;let a0={scrollLeft:0,scrollTop:0},f0=createCoords(1);const l0=createCoords(0),u0=isHTMLElement$3(r0);if((u0||!n0)&&((getNodeName$1(r0)!=="body"||isOverflowElement(s0))&&(a0=getNodeScroll$1(r0)),u0)){const c0=getBoundingClientRect$1(r0);f0=getScale(r0),l0.x=c0.x+r0.clientLeft,l0.y=c0.y+r0.clientTop}const A0=s0&&!u0&&!n0?getHTMLOffset(s0,a0):createCoords(0);return{width:i0.width*f0.x,height:i0.height*f0.y,x:i0.x*f0.x-a0.scrollLeft*f0.x+l0.x+A0.x,y:i0.y*f0.y-a0.scrollTop*f0.y+l0.y+A0.y}}function getClientRects(e0){return e0.getClientRects?Array.from(e0.getClientRects()):[]}function getDocumentRect$1(e0){const _e=getNodeScroll$1(e0),i0=e0.ownerDocument.body,r0=max$1(e0.scrollWidth,e0.clientWidth,i0.scrollWidth,i0.clientWidth),t0=max$1(e0.scrollHeight,e0.clientHeight,i0.scrollHeight,i0.clientHeight);let n0=-_e.scrollLeft+getWindowScrollBarX$1(e0);const s0=-_e.scrollTop;return getComputedStyle$3(i0).direction==="rtl"&&(n0+=max$1(e0.clientWidth,i0.clientWidth)-r0),{width:r0,height:t0,x:n0,y:s0}}const SCROLLBAR_MAX=25;function getViewportRect$1(e0,_e,i0){i0===void 0&&(i0="viewport");const r0=i0==="layoutViewport",t0=getWindow$3(e0),n0=getDocumentElement$1(e0),s0=t0.visualViewport;let o0=n0.clientWidth,a0=n0.clientHeight,f0=0,l0=0;if(s0){const A0=!isWebKit()||_e==="fixed";r0?A0||(f0=-s0.offsetLeft,l0=-s0.offsetTop):(o0=s0.width,a0=s0.height,A0&&(f0=s0.offsetLeft,l0=s0.offsetTop))}if(getWindowScrollBarX$1(n0)<=0){const A0=n0.ownerDocument,c0=A0.body,k0=getComputedStyle(c0),d0=A0.compatMode==="CSS1Compat"&&parseFloat(k0.marginLeft)+parseFloat(k0.marginRight)||0,h0=Math.abs(n0.clientWidth-c0.clientWidth-d0),b0=getComputedStyle(n0).scrollbarGutter==="stable both-edges"?h0/2:h0;b0<=SCROLLBAR_MAX&&(o0-=b0)}return{width:o0,height:a0,x:f0,y:l0}}function getInnerBoundingClientRect$1(e0,_e){const i0=getBoundingClientRect$1(e0,!0,_e==="fixed"),r0=i0.top+e0.clientTop,t0=i0.left+e0.clientLeft,n0=getScale(e0),s0=e0.clientWidth*n0.x,o0=e0.clientHeight*n0.y,a0=t0*n0.x,f0=r0*n0.y;return{width:s0,height:o0,x:a0,y:f0}}function getClientRectFromClippingAncestor(e0,_e,i0){let r0;if(_e==="viewport"||_e==="layoutViewport")r0=getViewportRect$1(e0,i0,_e);else if(_e==="document")r0=getDocumentRect$1(getDocumentElement$1(e0));else if(isElement$1(_e))r0=getInnerBoundingClientRect$1(_e,i0);else{const t0=getVisualOffsets(e0);r0={x:_e.x-t0.x,y:_e.y-t0.y,width:_e.width,height:_e.height}}return rectToClientRect$1(r0)}function getClippingElementAncestors(e0,_e){const i0=_e.get(e0);if(i0)return i0;let r0=getOverflowAncestors(e0,[],!1).filter(o0=>isElement$1(o0)&&getNodeName$1(o0)!=="body"),t0=null;const n0=getComputedStyle$3(e0).position==="fixed";let s0=n0?getParentNode$1(e0):e0;for(;isElement$1(s0)&&!isLastTraversableNode(s0);){const o0=getComputedStyle$3(s0),a0=isContainingBlock(s0),f0=t0?t0.position:n0?"fixed":"";!a0&&(f0==="fixed"||f0==="absolute"&&o0.position==="static")?r0=r0.filter(u0=>u0!==s0):t0=o0,s0=getParentNode$1(s0)}return _e.set(e0,r0),r0}function getClippingRect$1(e0){let{element:_e,boundary:i0,rootBoundary:r0,strategy:t0}=e0;const s0=[...i0==="clippingAncestors"?isTopLayer(_e)?[]:getClippingElementAncestors(_e,this._c):[].concat(i0),r0],o0=getClientRectFromClippingAncestor(_e,s0[0],t0);let a0=o0.top,f0=o0.right,l0=o0.bottom,u0=o0.left;for(let A0=1;A0<s0.length;A0++){const c0=getClientRectFromClippingAncestor(_e,s0[A0],t0);a0=max$1(c0.top,a0),f0=min$1(c0.right,f0),l0=min$1(c0.bottom,l0),u0=max$1(c0.left,u0)}return{width:f0-u0,height:l0-a0,x:u0,y:a0}}function getDimensions(e0){const{width:_e,height:i0}=getCssDimensions(e0);return{width:_e,height:i0}}function getRectRelativeToOffsetParent(e0,_e,i0){const r0=isHTMLElement$3(_e),t0=getDocumentElement$1(_e),n0=i0==="fixed",s0=getBoundingClientRect$1(e0,!0,n0,_e);let o0={scrollLeft:0,scrollTop:0};const a0=createCoords(0);if((r0||!n0)&&((getNodeName$1(_e)!=="body"||isOverflowElement(t0))&&(o0=getNodeScroll$1(_e)),r0)){const A0=getBoundingClientRect$1(_e,!0,n0,_e);a0.x=A0.x+_e.clientLeft,a0.y=A0.y+_e.clientTop}!r0&&t0&&(a0.x=getWindowScrollBarX$1(t0));const f0=t0&&!r0&&!n0?getHTMLOffset(t0,o0):createCoords(0),l0=s0.left+o0.scrollLeft-a0.x-f0.x,u0=s0.top+o0.scrollTop-a0.y-f0.y;return{x:l0,y:u0,width:s0.width,height:s0.height}}function isStaticPositioned(e0){return getComputedStyle$3(e0).position==="static"}function getTrueOffsetParent$1(e0,_e){if(!isHTMLElement$3(e0)||getComputedStyle$3(e0).position==="fixed")return null;if(_e)return _e(e0);let i0=e0.offsetParent;return getDocumentElement$1(e0)===i0&&(i0=i0.ownerDocument.body),i0}function getOffsetParent$1(e0,_e){const i0=getWindow$3(e0);if(isTopLayer(e0))return i0;if(!isHTMLElement$3(e0)){let t0=getParentNode$1(e0);for(;t0&&!isLastTraversableNode(t0);){if(isElement$1(t0)&&!isStaticPositioned(t0))return t0;t0=getParentNode$1(t0)}return i0}let r0=getTrueOffsetParent$1(e0,_e);for(;r0&&isTableElement$1(r0)&&isStaticPositioned(r0);)r0=getTrueOffsetParent$1(r0,_e);return r0&&isLastTraversableNode(r0)&&isStaticPositioned(r0)&&!isContainingBlock(r0)?i0:r0||getContainingBlock$1(e0)||i0}const getElementRects=async function(e0){const _e=this.getOffsetParent||getOffsetParent$1,i0=this.getDimensions,r0=await i0(e0.floating);return{reference:getRectRelativeToOffsetParent(e0.reference,await _e(e0.floating),e0.strategy),floating:{x:0,y:0,width:r0.width,height:r0.height}}};function isRTL(e0){return getComputedStyle$3(e0).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement$1,getClippingRect:getClippingRect$1,getOffsetParent:getOffsetParent$1,getElementRects,getClientRects,getDimensions,getScale,isElement:isElement$1,isRTL};function rectsAreEqual(e0,_e){return e0.x===_e.x&&e0.y===_e.y&&e0.width===_e.width&&e0.height===_e.height}function observeMove(e0,_e,i0){let r0=null,t0;const n0=getDocumentElement$1(e0);function s0(){var l0;clearTimeout(t0),(l0=r0)==null||l0.disconnect(),r0=null}function o0(l0,u0){l0===void 0&&(l0=!1),u0===void 0&&(u0=1),s0();const A0=e0.getBoundingClientRect(),{left:c0,top:k0,width:d0,height:h0}=A0;if(l0||_e(),!d0||!h0)return;const b0=floor(k0),p0=floor(n0.clientWidth-(c0+d0)),m0=floor(n0.clientHeight-(k0+h0)),g0=floor(c0),w0={rootMargin:-b0+"px "+-p0+"px "+-m0+"px "+-g0+"px",threshold:max$1(0,min$1(1,u0))||1};let x0=!0;function _0(y0){const S0=y0[0].intersectionRatio;if(!rectsAreEqual(A0,e0.getBoundingClientRect()))return o0();if(S0!==u0){if(!x0)return o0();S0?o0(!1,S0):t0=setTimeout(()=>{o0(!1,1e-7)},1e3)}x0=!1}try{r0=new IntersectionObserver(_0,{...w0,root:n0.ownerDocument})}catch{r0=new IntersectionObserver(_0,w0)}r0.observe(e0)}const a0=getWindow$3(e0),f0=()=>o0(i0);return a0.addEventListener("resize",f0),o0(!0),()=>{a0.removeEventListener("resize",f0),s0()}}function autoUpdate(e0,_e,i0,r0){r0===void 0&&(r0={});const{ancestorScroll:t0=!0,ancestorResize:n0=!0,elementResize:s0=typeof ResizeObserver=="function",layoutShift:o0=typeof IntersectionObserver=="function",animationFrame:a0=!1}=r0,f0=unwrapElement(e0),l0=t0||n0?[...f0?getOverflowAncestors(f0):[],..._e?getOverflowAncestors(_e):[]]:[];l0.forEach(b0=>{t0&&b0.addEventListener("scroll",i0),n0&&b0.addEventListener("resize",i0)});const u0=f0&&o0?observeMove(f0,i0,n0):null;let A0=-1,c0=null;s0&&(c0=new ResizeObserver(b0=>{let[p0]=b0;p0&&p0.target===f0&&c0&&_e&&(c0.unobserve(_e),cancelAnimationFrame(A0),A0=requestAnimationFrame(()=>{var m0;(m0=c0)==null||m0.observe(_e)})),i0()}),f0&&!a0&&c0.observe(f0),_e&&c0.observe(_e));let k0,d0=a0?getBoundingClientRect$1(e0):null;a0&&h0();function h0(){const b0=getBoundingClientRect$1(e0);d0&&!rectsAreEqual(d0,b0)&&i0(),d0=b0,k0=requestAnimationFrame(h0)}return i0(),()=>{var b0;l0.forEach(p0=>{t0&&p0.removeEventListener("scroll",i0),n0&&p0.removeEventListener("resize",i0)}),u0==null||u0(),(b0=c0)==null||b0.disconnect(),c0=null,a0&&cancelAnimationFrame(k0)}}const offset$3=offset$4,flip$3=flip$4,size$1=size$2,computePosition=(e0,_e,i0)=>{const r0=new Map,t0=i0??{},n0={...platform,...t0.platform,_c:r0};return computePosition$1(e0,_e,{...t0,platform:n0})};var isClient=typeof document<"u",noop$4=function e0(){},index$1=isClient?reactExports.useLayoutEffect:noop$4;function deepEqual$1(e0,_e){if(e0===_e)return!0;if(typeof e0!=typeof _e)return!1;if(typeof e0=="function"&&e0.toString()===_e.toString())return!0;let i0,r0,t0;if(e0&&_e&&typeof e0=="object"){if(Array.isArray(e0)){if(i0=e0.length,i0!==_e.length)return!1;for(r0=i0;r0--!==0;)if(!deepEqual$1(e0[r0],_e[r0]))return!1;return!0}if(t0=Object.keys(e0),i0=t0.length,i0!==Object.keys(_e).length)return!1;for(r0=i0;r0--!==0;)if(!{}.hasOwnProperty.call(_e,t0[r0]))return!1;for(r0=i0;r0--!==0;){const n0=t0[r0];if(!(n0==="_owner"&&e0.$$typeof)&&!deepEqual$1(e0[n0],_e[n0]))return!1}return!0}return e0!==e0&&_e!==_e}function getDPR(e0){return typeof window>"u"?1:(e0.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e0,_e){const i0=getDPR(e0);return Math.round(_e*i0)/i0}function useLatestRef$1(e0){const _e=reactExports.useRef(e0);return index$1(()=>{_e.current=e0}),_e}function useFloating$1(e0){e0===void 0&&(e0={});const{placement:_e="bottom",strategy:i0="absolute",middleware:r0=[],platform:t0,elements:{reference:n0,floating:s0}={},transform:o0=!0,whileElementsMounted:a0,open:f0}=e0,[l0,u0]=reactExports.useState({x:0,y:0,strategy:i0,placement:_e,middlewareData:{},isPositioned:!1}),[A0,c0]=reactExports.useState(r0);deepEqual$1(A0,r0)||c0(r0);const[k0,d0]=reactExports.useState(null),[h0,b0]=reactExports.useState(null),p0=reactExports.useCallback(T0=>{T0!==w0.current&&(w0.current=T0,d0(T0))},[]),m0=reactExports.useCallback(T0=>{T0!==x0.current&&(x0.current=T0,b0(T0))},[]),g0=n0||k0,v0=s0||h0,w0=reactExports.useRef(null),x0=reactExports.useRef(null),_0=reactExports.useRef(l0),y0=a0!=null,S0=useLatestRef$1(a0),B0=useLatestRef$1(t0),I0=useLatestRef$1(f0),F0=reactExports.useCallback(()=>{if(!w0.current||!x0.current)return;const T0={placement:_e,strategy:i0,middleware:A0};B0.current&&(T0.platform=B0.current),computePosition(w0.current,x0.current,T0).then(G0=>{const j0={...G0,isPositioned:I0.current!==!1};C0.current&&!deepEqual$1(_0.current,j0)&&(_0.current=j0,reactDomExports.flushSync(()=>{u0(j0)}))})},[A0,_e,i0,B0,I0]);index$1(()=>{f0===!1&&_0.current.isPositioned&&(_0.current.isPositioned=!1,u0(T0=>({...T0,isPositioned:!1})))},[f0]);const C0=reactExports.useRef(!1);index$1(()=>(C0.current=!0,()=>{C0.current=!1}),[]),index$1(()=>{if(g0&&(w0.current=g0),v0&&(x0.current=v0),g0&&v0){if(S0.current)return S0.current(g0,v0,F0);F0()}},[g0,v0,F0,S0,y0]);const E0=reactExports.useMemo(()=>({reference:w0,floating:x0,setReference:p0,setFloating:m0}),[p0,m0]),R0=reactExports.useMemo(()=>({reference:g0,floating:v0}),[g0,v0]),M0=reactExports.useMemo(()=>{const T0={position:i0,left:0,top:0};if(!R0.floating)return T0;const G0=roundByDPR(R0.floating,l0.x),j0=roundByDPR(R0.floating,l0.y);return o0?{...T0,transform:"translate("+G0+"px, "+j0+"px)",...getDPR(R0.floating)>=1.5&&{willChange:"transform"}}:{position:i0,left:G0,top:j0}},[i0,o0,R0.floating,l0.x,l0.y]);return reactExports.useMemo(()=>({...l0,update:F0,refs:E0,elements:R0,floatingStyles:M0}),[l0,F0,E0,R0,M0])}const offset$2=(e0,_e)=>{const i0=offset$3(e0);return{name:i0.name,fn:i0.fn,options:[e0,_e]}},flip$2=(e0,_e)=>{const i0=flip$3(e0);return{name:i0.name,fn:i0.fn,options:[e0,_e]}},size=(e0,_e)=>{const i0=size$1(e0);return{name:i0.name,fn:i0.fn,options:[e0,_e]}};var index=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;let serverHandoffComplete=!1,count$1=0;const genId=()=>"floating-ui-"+count$1++;function useFloatingId(){const[e0,_e]=reactExports.useState(()=>serverHandoffComplete?genId():void 0);return index(()=>{e0==null&&_e(genId())},[]),reactExports.useEffect(()=>{serverHandoffComplete||(serverHandoffComplete=!0)},[]),e0}const useReactId=React$5.useId,useId$1=useReactId||useFloatingId;function createPubSub(){const e0=new Map;return{emit(_e,i0){var r0;(r0=e0.get(_e))==null||r0.forEach(t0=>t0(i0))},on(_e,i0){e0.set(_e,[...e0.get(_e)||[],i0])},off(_e,i0){var r0;e0.set(_e,((r0=e0.get(_e))==null?void 0:r0.filter(t0=>t0!==i0))||[])}}}const FloatingNodeContext=reactExports.createContext(null),FloatingTreeContext=reactExports.createContext(null),useFloatingParentNodeId=()=>{var e0;return((e0=reactExports.useContext(FloatingNodeContext))==null?void 0:e0.id)||null},useFloatingTree=()=>reactExports.useContext(FloatingTreeContext);function createAttribute(e0){return"data-floating-ui-"+e0}function useLatestRef(e0){const _e=reactExports.useRef(e0);return index(()=>{_e.current=e0}),_e}const safePolygonIdentifier=createAttribute("safe-polygon");function getDelay(e0,_e,i0){return i0&&!isMouseLikePointerType(i0)?0:typeof e0=="number"?e0:e0==null?void 0:e0[_e]}function useHover$1(e0,_e){_e===void 0&&(_e={});const{open:i0,onOpenChange:r0,dataRef:t0,events:n0,elements:{domReference:s0,floating:o0},refs:a0}=e0,{enabled:f0=!0,delay:l0=0,handleClose:u0=null,mouseOnly:A0=!1,restMs:c0=0,move:k0=!0}=_e,d0=useFloatingTree(),h0=useFloatingParentNodeId(),b0=useLatestRef(u0),p0=useLatestRef(l0),m0=reactExports.useRef(),g0=reactExports.useRef(),v0=reactExports.useRef(),w0=reactExports.useRef(),x0=reactExports.useRef(!0),_0=reactExports.useRef(!1),y0=reactExports.useRef(()=>{}),S0=reactExports.useCallback(()=>{var C0;const E0=(C0=t0.current.openEvent)==null?void 0:C0.type;return(E0==null?void 0:E0.includes("mouse"))&&E0!=="mousedown"},[t0]);reactExports.useEffect(()=>{if(!f0)return;function C0(){clearTimeout(g0.current),clearTimeout(w0.current),x0.current=!0}return n0.on("dismiss",C0),()=>{n0.off("dismiss",C0)}},[f0,n0]),reactExports.useEffect(()=>{if(!f0||!b0.current||!i0)return;function C0(R0){S0()&&r0(!1,R0)}const E0=getDocument$1(o0).documentElement;return E0.addEventListener("mouseleave",C0),()=>{E0.removeEventListener("mouseleave",C0)}},[o0,i0,r0,f0,b0,t0,S0]);const B0=reactExports.useCallback(function(C0,E0){E0===void 0&&(E0=!0);const R0=getDelay(p0.current,"close",m0.current);R0&&!v0.current?(clearTimeout(g0.current),g0.current=setTimeout(()=>r0(!1,C0),R0)):E0&&(clearTimeout(g0.current),r0(!1,C0))},[p0,r0]),I0=reactExports.useCallback(()=>{y0.current(),v0.current=void 0},[]),F0=reactExports.useCallback(()=>{if(_0.current){const C0=getDocument$1(a0.floating.current).body;C0.style.pointerEvents="",C0.removeAttribute(safePolygonIdentifier),_0.current=!1}},[a0]);return reactExports.useEffect(()=>{if(!f0)return;function C0(){return t0.current.openEvent?["click","mousedown"].includes(t0.current.openEvent.type):!1}function E0(T0){if(clearTimeout(g0.current),x0.current=!1,A0&&!isMouseLikePointerType(m0.current)||c0>0&&getDelay(p0.current,"open")===0)return;const G0=getDelay(p0.current,"open",m0.current);G0?g0.current=setTimeout(()=>{r0(!0,T0)},G0):r0(!0,T0)}function R0(T0){if(C0())return;y0.current();const G0=getDocument$1(o0);if(clearTimeout(w0.current),b0.current){i0||clearTimeout(g0.current),v0.current=b0.current({...e0,tree:d0,x:T0.clientX,y:T0.clientY,onClose(){F0(),I0(),B0(T0)}});const N0=v0.current;G0.addEventListener("mousemove",N0),y0.current=()=>{G0.removeEventListener("mousemove",N0)};return}(m0.current==="touch"?!contains$2(o0,T0.relatedTarget):!0)&&B0(T0)}function M0(T0){C0()||b0.current==null||b0.current({...e0,tree:d0,x:T0.clientX,y:T0.clientY,onClose(){F0(),I0(),B0(T0)}})(T0)}if(isElement$2(s0)){const T0=s0;return i0&&T0.addEventListener("mouseleave",M0),o0==null||o0.addEventListener("mouseleave",M0),k0&&T0.addEventListener("mousemove",E0,{once:!0}),T0.addEventListener("mouseenter",E0),T0.addEventListener("mouseleave",R0),()=>{i0&&T0.removeEventListener("mouseleave",M0),o0==null||o0.removeEventListener("mouseleave",M0),k0&&T0.removeEventListener("mousemove",E0),T0.removeEventListener("mouseenter",E0),T0.removeEventListener("mouseleave",R0)}}},[s0,o0,f0,e0,A0,c0,k0,B0,I0,F0,r0,i0,d0,p0,b0,t0]),index(()=>{var C0;if(f0&&i0&&(C0=b0.current)!=null&&C0.__options.blockPointerEvents&&S0()){const M0=getDocument$1(o0).body;if(M0.setAttribute(safePolygonIdentifier,""),M0.style.pointerEvents="none",_0.current=!0,isElement$2(s0)&&o0){var E0,R0;const T0=s0,G0=d0==null||(E0=d0.nodesRef.current.find(j0=>j0.id===h0))==null||(R0=E0.context)==null?void 0:R0.elements.floating;return G0&&(G0.style.pointerEvents=""),T0.style.pointerEvents="auto",o0.style.pointerEvents="auto",()=>{T0.style.pointerEvents="",o0.style.pointerEvents=""}}}},[f0,i0,h0,o0,s0,d0,b0,t0,S0]),index(()=>{i0||(m0.current=void 0,I0(),F0())},[i0,I0,F0]),reactExports.useEffect(()=>()=>{I0(),clearTimeout(g0.current),clearTimeout(w0.current),F0()},[f0,s0,I0,F0]),reactExports.useMemo(()=>{if(!f0)return{};function C0(E0){m0.current=E0.pointerType}return{reference:{onPointerDown:C0,onPointerEnter:C0,onMouseMove(E0){i0||c0===0||(clearTimeout(w0.current),w0.current=setTimeout(()=>{x0.current||r0(!0,E0.nativeEvent)},c0))}},floating:{onMouseEnter(){clearTimeout(g0.current)},onMouseLeave(E0){n0.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),B0(E0.nativeEvent,!1)}}}},[n0,f0,c0,i0,r0,B0])}function getChildren$1(e0,_e){let i0=e0.filter(t0=>{var n0;return t0.parentId===_e&&((n0=t0.context)==null?void 0:n0.open)}),r0=i0;for(;r0.length;)r0=e0.filter(t0=>{var n0;return(n0=r0)==null?void 0:n0.some(s0=>{var o0;return t0.parentId===s0.id&&((o0=t0.context)==null?void 0:o0.open)})}),i0=i0.concat(r0);return i0}function isButtonTarget(e0){return isHTMLElement$4(e0.target)&&e0.target.tagName==="BUTTON"}function isSpaceIgnored(e0){return isTypeableElement(e0)}function useClick(e0,_e){_e===void 0&&(_e={});const{open:i0,onOpenChange:r0,dataRef:t0,elements:{domReference:n0}}=e0,{enabled:s0=!0,event:o0="click",toggle:a0=!0,ignoreMouse:f0=!1,keyboardHandlers:l0=!0}=_e,u0=reactExports.useRef(),A0=reactExports.useRef(!1);return reactExports.useMemo(()=>s0?{reference:{onPointerDown(c0){u0.current=c0.pointerType},onMouseDown(c0){c0.button===0&&(isMouseLikePointerType(u0.current,!0)&&f0||o0!=="click"&&(i0&&a0&&(!t0.current.openEvent||t0.current.openEvent.type==="mousedown")?r0(!1,c0.nativeEvent):(c0.preventDefault(),r0(!0,c0.nativeEvent))))},onClick(c0){if(o0==="mousedown"&&u0.current){u0.current=void 0;return}isMouseLikePointerType(u0.current,!0)&&f0||(i0&&a0&&(!t0.current.openEvent||t0.current.openEvent.type==="click")?r0(!1,c0.nativeEvent):r0(!0,c0.nativeEvent))},onKeyDown(c0){u0.current=void 0,!(c0.defaultPrevented||!l0||isButtonTarget(c0))&&(c0.key===" "&&!isSpaceIgnored(n0)&&(c0.preventDefault(),A0.current=!0),c0.key==="Enter"&&r0(!(i0&&a0),c0.nativeEvent))},onKeyUp(c0){c0.defaultPrevented||!l0||isButtonTarget(c0)||isSpaceIgnored(n0)||c0.key===" "&&A0.current&&(A0.current=!1,r0(!(i0&&a0),c0.nativeEvent))}}}:{},[s0,t0,o0,f0,l0,n0,a0,i0,r0])}const useInsertionEffect$2=React$5.useInsertionEffect,useSafeInsertionEffect=useInsertionEffect$2||(e0=>e0());function useEffectEvent(e0){const _e=reactExports.useRef(()=>{});return useSafeInsertionEffect(()=>{_e.current=e0}),reactExports.useCallback(function(){for(var i0=arguments.length,r0=new Array(i0),t0=0;t0<i0;t0++)r0[t0]=arguments[t0];return _e.current==null?void 0:_e.current(...r0)},[])}const bubbleHandlerKeys={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},captureHandlerKeys={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},normalizeBubblesProp=e0=>{var _e,i0;return{escapeKeyBubbles:typeof e0=="boolean"?e0:(_e=e0==null?void 0:e0.escapeKey)!=null?_e:!1,outsidePressBubbles:typeof e0=="boolean"?e0:(i0=e0==null?void 0:e0.outsidePress)!=null?i0:!0}};function useDismiss(e0,_e){_e===void 0&&(_e={});const{open:i0,onOpenChange:r0,events:t0,nodeId:n0,elements:{reference:s0,domReference:o0,floating:a0},dataRef:f0}=e0,{enabled:l0=!0,escapeKey:u0=!0,outsidePress:A0=!0,outsidePressEvent:c0="pointerdown",referencePress:k0=!1,referencePressEvent:d0="pointerdown",ancestorScroll:h0=!1,bubbles:b0}=_e,p0=useFloatingTree(),m0=useFloatingParentNodeId()!=null,g0=useEffectEvent(typeof A0=="function"?A0:()=>!1),v0=typeof A0=="function"?g0:A0,w0=reactExports.useRef(!1),x0=reactExports.useRef(!1),{escapeKeyBubbles:_0,outsidePressBubbles:y0}=normalizeBubblesProp(b0),S0=useEffectEvent(I0=>{if(!i0||!l0||!u0||I0.key!=="Escape")return;const F0=p0?getChildren$1(p0.nodesRef.current,n0):[];if(!_0&&(I0.stopPropagation(),F0.length>0)){let C0=!0;if(F0.forEach(E0=>{var R0;if((R0=E0.context)!=null&&R0.open&&!E0.context.dataRef.current.__escapeKeyBubbles){C0=!1;return}}),!C0)return}t0.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r0(!1,isReactEvent(I0)?I0.nativeEvent:I0)}),B0=useEffectEvent(I0=>{const F0=w0.current;w0.current=!1;const C0=x0.current;if(x0.current=!1,c0==="click"&&C0||F0||typeof v0=="function"&&!v0(I0))return;const E0=getTarget(I0),R0="["+createAttribute("inert")+"]",M0=getDocument$1(a0).querySelectorAll(R0);let T0=isElement$2(E0)?E0:null;for(;T0&&!isLastTraversableNode$1(T0);){const N0=getParentNode$2(T0);if(N0===getDocument$1(a0).body||!isElement$2(N0))break;T0=N0}if(M0.length&&isElement$2(E0)&&!isRootElement(E0)&&!contains$2(E0,a0)&&Array.from(M0).every(N0=>!contains$2(T0,N0)))return;if(isHTMLElement$4(E0)&&a0){const N0=E0.clientWidth>0&&E0.scrollWidth>E0.clientWidth,O0=E0.clientHeight>0&&E0.scrollHeight>E0.clientHeight;let Y0=O0&&I0.offsetX>E0.clientWidth;if(O0&&getComputedStyle$4(E0).direction==="rtl"&&(Y0=I0.offsetX<=E0.offsetWidth-E0.clientWidth),Y0||N0&&I0.offsetY>E0.clientHeight)return}const G0=p0&&getChildren$1(p0.nodesRef.current,n0).some(N0=>{var O0;return isEventTargetWithin(I0,(O0=N0.context)==null?void 0:O0.elements.floating)});if(isEventTargetWithin(I0,a0)||isEventTargetWithin(I0,o0)||G0)return;const j0=p0?getChildren$1(p0.nodesRef.current,n0):[];if(j0.length>0){let N0=!0;if(j0.forEach(O0=>{var Y0;if((Y0=O0.context)!=null&&Y0.open&&!O0.context.dataRef.current.__outsidePressBubbles){N0=!1;return}}),!N0)return}t0.emit("dismiss",{type:"outsidePress",data:{returnFocus:m0?{preventScroll:!0}:isVirtualClick(I0)||isVirtualPointerEvent(I0)}}),r0(!1,I0)});return reactExports.useEffect(()=>{if(!i0||!l0)return;f0.current.__escapeKeyBubbles=_0,f0.current.__outsidePressBubbles=y0;function I0(E0){r0(!1,E0)}const F0=getDocument$1(a0);u0&&F0.addEventListener("keydown",S0),v0&&F0.addEventListener(c0,B0);let C0=[];return h0&&(isElement$2(o0)&&(C0=getOverflowAncestors(o0)),isElement$2(a0)&&(C0=C0.concat(getOverflowAncestors(a0))),!isElement$2(s0)&&s0&&s0.contextElement&&(C0=C0.concat(getOverflowAncestors(s0.contextElement)))),C0=C0.filter(E0=>{var R0;return E0!==((R0=F0.defaultView)==null?void 0:R0.visualViewport)}),C0.forEach(E0=>{E0.addEventListener("scroll",I0,{passive:!0})}),()=>{u0&&F0.removeEventListener("keydown",S0),v0&&F0.removeEventListener(c0,B0),C0.forEach(E0=>{E0.removeEventListener("scroll",I0)})}},[f0,a0,o0,s0,u0,v0,c0,i0,r0,h0,l0,_0,y0,S0,B0]),reactExports.useEffect(()=>{w0.current=!1},[v0,c0]),reactExports.useMemo(()=>l0?{reference:{onKeyDown:S0,[bubbleHandlerKeys[d0]]:I0=>{k0&&(t0.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r0(!1,I0.nativeEvent))}},floating:{onKeyDown:S0,onMouseDown(){x0.current=!0},onMouseUp(){x0.current=!0},[captureHandlerKeys[c0]]:()=>{w0.current=!0}}}:{},[l0,t0,k0,c0,d0,r0,S0])}function useFloating(e0){var _e;e0===void 0&&(e0={});const{open:i0=!1,onOpenChange:r0,nodeId:t0}=e0,[n0,s0]=reactExports.useState(null),o0=((_e=e0.elements)==null?void 0:_e.reference)||n0,a0=useFloating$1(e0),f0=useFloatingTree(),l0=useEffectEvent((g0,v0)=>{g0&&(A0.current.openEvent=v0),r0==null||r0(g0,v0)}),u0=reactExports.useRef(null),A0=reactExports.useRef({}),c0=reactExports.useState(()=>createPubSub())[0],k0=useId$1(),d0=reactExports.useCallback(g0=>{const v0=isElement$2(g0)?{getBoundingClientRect:()=>g0.getBoundingClientRect(),contextElement:g0}:g0;a0.refs.setReference(v0)},[a0.refs]),h0=reactExports.useCallback(g0=>{(isElement$2(g0)||g0===null)&&(u0.current=g0,s0(g0)),(isElement$2(a0.refs.reference.current)||a0.refs.reference.current===null||g0!==null&&!isElement$2(g0))&&a0.refs.setReference(g0)},[a0.refs]),b0=reactExports.useMemo(()=>({...a0.refs,setReference:h0,setPositionReference:d0,domReference:u0}),[a0.refs,h0,d0]),p0=reactExports.useMemo(()=>({...a0.elements,domReference:o0}),[a0.elements,o0]),m0=reactExports.useMemo(()=>({...a0,refs:b0,elements:p0,dataRef:A0,nodeId:t0,floatingId:k0,events:c0,open:i0,onOpenChange:l0}),[a0,t0,k0,c0,i0,l0,b0,p0]);return index(()=>{const g0=f0==null?void 0:f0.nodesRef.current.find(v0=>v0.id===t0);g0&&(g0.context=m0)}),reactExports.useMemo(()=>({...a0,context:m0,refs:b0,elements:p0}),[a0,b0,p0,m0])}function useFocus(e0,_e){_e===void 0&&(_e={});const{open:i0,onOpenChange:r0,events:t0,refs:n0,elements:{floating:s0,domReference:o0}}=e0,{enabled:a0=!0,visibleOnly:f0=!0}=_e,l0=reactExports.useRef(!1),u0=reactExports.useRef(),A0=reactExports.useRef(!1);return reactExports.useEffect(()=>{if(!a0)return;const c0=getWindow$4(o0);function k0(){!i0&&isHTMLElement$4(o0)&&o0===activeElement(getDocument$1(o0))&&(l0.current=!0)}function d0(){A0.current=!0}return c0.addEventListener("blur",k0),c0.addEventListener("keydown",d0,!0),()=>{c0.removeEventListener("blur",k0),c0.removeEventListener("keydown",d0,!0)}},[s0,o0,i0,a0]),reactExports.useEffect(()=>{if(!a0)return;function c0(k0){(k0.type==="referencePress"||k0.type==="escapeKey")&&(l0.current=!0)}return t0.on("dismiss",c0),()=>{t0.off("dismiss",c0)}},[t0,a0]),reactExports.useEffect(()=>()=>{clearTimeout(u0.current)},[]),reactExports.useMemo(()=>a0?{reference:{onPointerDown(){A0.current=!1},onMouseLeave(){l0.current=!1},onFocus(c0){if(l0.current)return;const k0=getTarget(c0.nativeEvent);if(f0&&isElement$2(k0))try{if(isSafari$1())throw Error();if(!k0.matches(":focus-visible"))return}catch{if(!A0.current&&!isTypeableElement(k0))return}r0(!0,c0.nativeEvent)},onBlur(c0){l0.current=!1;const k0=c0.relatedTarget,d0=isElement$2(k0)&&k0.hasAttribute(createAttribute("focus-guard"))&&k0.getAttribute("data-type")==="outside";u0.current=window.setTimeout(()=>{const h0=activeElement(o0?o0.ownerDocument:document);!k0&&h0===o0||contains$2(n0.floating.current,k0)||contains$2(o0,k0)||d0||r0(!1,c0.nativeEvent)})}}}:{},[a0,f0,o0,n0,r0])}function mergeProps(e0,_e,i0){const r0=new Map;return{...i0==="floating"&&{tabIndex:-1},...e0,..._e.map(t0=>t0?t0[i0]:null).concat(e0).reduce((t0,n0)=>(n0&&Object.entries(n0).forEach(s0=>{let[o0,a0]=s0;if(o0.indexOf("on")===0){if(r0.has(o0)||r0.set(o0,[]),typeof a0=="function"){var f0;(f0=r0.get(o0))==null||f0.push(a0),t0[o0]=function(){for(var l0,u0=arguments.length,A0=new Array(u0),c0=0;c0<u0;c0++)A0[c0]=arguments[c0];return(l0=r0.get(o0))==null?void 0:l0.map(k0=>k0(...A0)).find(k0=>k0!==void 0)}}}else t0[o0]=a0}),t0),{})}}function useInteractions(e0){e0===void 0&&(e0=[]);const _e=e0,i0=reactExports.useCallback(n0=>mergeProps(n0,e0,"reference"),_e),r0=reactExports.useCallback(n0=>mergeProps(n0,e0,"floating"),_e),t0=reactExports.useCallback(n0=>mergeProps(n0,e0,"item"),e0.map(n0=>n0==null?void 0:n0.item));return reactExports.useMemo(()=>({getReferenceProps:i0,getFloatingProps:r0,getItemProps:t0}),[i0,r0,t0])}function isPointInPolygon(e0,_e){const[i0,r0]=e0;let t0=!1;const n0=_e.length;for(let s0=0,o0=n0-1;s0<n0;o0=s0++){const[a0,f0]=_e[s0]||[0,0],[l0,u0]=_e[o0]||[0,0];f0>=r0!=u0>=r0&&i0<=(l0-a0)*(r0-f0)/(u0-f0)+a0&&(t0=!t0)}return t0}function isInside(e0,_e){return e0[0]>=_e.x&&e0[0]<=_e.x+_e.width&&e0[1]>=_e.y&&e0[1]<=_e.y+_e.height}function safePolygon(e0){e0===void 0&&(e0={});const{buffer:_e=.5,blockPointerEvents:i0=!1,requireIntent:r0=!0}=e0;let t0,n0=!1,s0=null,o0=null,a0=performance.now();function f0(u0,A0){const c0=performance.now(),k0=c0-a0;if(s0===null||o0===null||k0===0)return s0=u0,o0=A0,a0=c0,null;const d0=u0-s0,h0=A0-o0,p0=Math.sqrt(d0*d0+h0*h0)/k0;return s0=u0,o0=A0,a0=c0,p0}const l0=u0=>{let{x:A0,y:c0,placement:k0,elements:d0,onClose:h0,nodeId:b0,tree:p0}=u0;return function(g0){function v0(){clearTimeout(t0),h0()}if(clearTimeout(t0),!d0.domReference||!d0.floating||k0==null||A0==null||c0==null)return;const{clientX:w0,clientY:x0}=g0,_0=[w0,x0],y0=getTarget(g0),S0=g0.type==="mouseleave",B0=contains$2(d0.floating,y0),I0=contains$2(d0.domReference,y0),F0=d0.domReference.getBoundingClientRect(),C0=d0.floating.getBoundingClientRect(),E0=k0.split("-")[0],R0=A0>C0.right-C0.width/2,M0=c0>C0.bottom-C0.height/2,T0=isInside(_0,F0),G0=C0.width>F0.width,j0=C0.height>F0.height,N0=(G0?F0:C0).left,O0=(G0?F0:C0).right,Y0=(j0?F0:C0).top,D0=(j0?F0:C0).bottom;if(B0&&(n0=!0,!S0))return;if(I0&&(n0=!1),I0&&!S0){n0=!0;return}if(S0&&isElement$2(g0.relatedTarget)&&contains$2(d0.floating,g0.relatedTarget)||p0&&getChildren$1(p0.nodesRef.current,b0).some(K0=>{let{context:e2}=K0;return e2==null?void 0:e2.open}))return;if(E0==="top"&&c0>=F0.bottom-1||E0==="bottom"&&c0<=F0.top+1||E0==="left"&&A0>=F0.right-1||E0==="right"&&A0<=F0.left+1)return v0();let $0=[];switch(E0){case"top":$0=[[N0,F0.top+1],[N0,C0.bottom-1],[O0,C0.bottom-1],[O0,F0.top+1]];break;case"bottom":$0=[[N0,C0.top+1],[N0,F0.bottom-1],[O0,F0.bottom-1],[O0,C0.top+1]];break;case"left":$0=[[C0.right-1,D0],[C0.right-1,Y0],[F0.left+1,Y0],[F0.left+1,D0]];break;case"right":$0=[[F0.right-1,D0],[F0.right-1,Y0],[C0.left+1,Y0],[C0.left+1,D0]];break}function z0(K0){let[e2,J0]=K0;switch(E0){case"top":{const _i=[G0?e2+_e/2:R0?e2+_e*4:e2-_e*4,J0+_e+1],Q0=[G0?e2-_e/2:R0?e2+_e*4:e2-_e*4,J0+_e+1],U0=[[C0.left,R0||G0?C0.bottom-_e:C0.top],[C0.right,R0?G0?C0.bottom-_e:C0.top:C0.bottom-_e]];return[_i,Q0,...U0]}case"bottom":{const _i=[G0?e2+_e/2:R0?e2+_e*4:e2-_e*4,J0-_e],Q0=[G0?e2-_e/2:R0?e2+_e*4:e2-_e*4,J0-_e],U0=[[C0.left,R0||G0?C0.top+_e:C0.bottom],[C0.right,R0?G0?C0.top+_e:C0.bottom:C0.top+_e]];return[_i,Q0,...U0]}case"left":{const _i=[e2+_e+1,j0?J0+_e/2:M0?J0+_e*4:J0-_e*4],Q0=[e2+_e+1,j0?J0-_e/2:M0?J0+_e*4:J0-_e*4];return[...[[M0||j0?C0.right-_e:C0.left,C0.top],[M0?j0?C0.right-_e:C0.left:C0.right-_e,C0.bottom]],_i,Q0]}case"right":{const _i=[e2-_e,j0?J0+_e/2:M0?J0+_e*4:J0-_e*4],Q0=[e2-_e,j0?J0-_e/2:M0?J0+_e*4:J0-_e*4],U0=[[M0||j0?C0.left+_e:C0.right,C0.top],[M0?j0?C0.left+_e:C0.right:C0.left+_e,C0.bottom]];return[_i,Q0,...U0]}}}if(!isPointInPolygon([w0,x0],$0)){if(n0&&!T0)return v0();if(!S0&&r0){const K0=f0(g0.clientX,g0.clientY);if(K0!==null&&K0<.1)return v0()}isPointInPolygon([w0,x0],z0([A0,c0]))?!n0&&r0&&(t0=window.setTimeout(v0,40)):v0()}}};return l0.__options={blockPointerEvents:i0},l0}var useDropdown=(e0,_e,i0=!1,r0=!0,t0=!0,n0=!0)=>{let s0=reactExports.useId(),[o0,a0]=reactExports.useState(!1),[f0,l0]=reactExports.useState(-1),[u0,A0]=reactExports.useState(null),c0=reactExports.useRef(null),{refs:k0,floatingStyles:d0,context:h0}=useFloating({placement:e0,open:o0,onOpenChange:a0,whileElementsMounted:autoUpdate,middleware:[offset$2(0),size({apply({rects:T0,elements:G0}){G0.floating.style.minWidth=`${T0.reference.width}px`}}),flip$2({padding:0})]});useHover$1(h0,{enabled:i0,delay:{open:200},handleClose:safePolygon()});let b0=reactExports.useRef(null),p0=reactExports.useRef(null),m0=reactExports.useRef({}),g0=()=>{var T0;l0(-1),A0(null),(T0=c0.current)==null||T0.focus({preventScroll:!0})};reactExports.useEffect(()=>{o0&&c0.current&&r0?g0():o0&&b0.current&&r0?(b0.current.focus(),l0(0)):(l0(-1),m0.current={})},[o0]),reactExports.useEffect(()=>{if(f0!==-1){let T0=Object.values(m0.current).filter(j0=>!!j0);if(f0<0||f0>=T0.length){l0(-1),A0(null);return}let G0=T0[f0];G0&&(A0(G0.getAttribute("id")),G0.focus())}},[f0]);let v0=()=>Object.values(m0.current).filter(Boolean).length,w0=()=>{let T0=Object.values(m0.current).find(Boolean);T0&&(l0(0),A0(T0.getAttribute("id")),T0.focus())},x0=()=>{if(c0.current&&document.activeElement===c0.current){w0();return}let T0=v0();T0!==0&&l0(G0=>(G0+1)%T0)},_0=()=>{if(f0===0&&c0.current){g0();return}let T0=v0();T0!==0&&l0(G0=>(G0-1+T0)%T0)},y0=()=>{l0(0)},S0=()=>{l0(v0()-1)},B0=reactExports.useCallback(()=>{a0(!0)},[]),I0=reactExports.useCallback(()=>{p0.current&&(p0.current.focus({preventScroll:!0}),a0(!1))},[]),F0=(T0,G0)=>{T0&&(G0.stopPropagation(),G0.preventDefault())},C0=reactExports.useCallback(T0=>{let G0=!1;switch(T0.code){case" ":case"Space":if(!t0)break;B0(),G0=!0;break;case"Enter":case"ArrowDown":case"Down":B0(),G0=!0;break;case"Esc":case"Escape":I0(),G0=!0;break;case"Up":case"ArrowUp":B0(),G0=!0;break}_e==null||_e(T0),F0(G0,T0)},[I0,B0]),E0=T0=>{let G0=!!c0.current&&document.activeElement===c0.current;n0&&!G0&&l0(Object.values(m0.current).filter(j0=>!!j0).findIndex(j0=>j0.id===T0.currentTarget.getAttribute("id")))},R0=reactExports.useCallback((T0,G0,j0=!0)=>{let N0=!1;if(T0.shiftKey)T0.key==="Tab"&&(I0(),N0=!0);else{switch(T0.code){case"Escape":I0();break;case" ":case"Enter":f0!==-1&&(Object.values(m0.current).filter(Boolean)[f0].getAttribute("role")==="menuitem"&&j0&&p0.current&&(p0.current.focus(),a0(!1)),G0==null||G0()),N0=!0;break;case"ArrowDown":case"Down":x0(),N0=!0;break;case"ArrowUp":case"Up":_0(),N0=!0;break;case"Home":y0(),N0=!0;break;case"End":S0(),N0=!0;break}F0(N0,T0)}},[f0,I0]),M0=reactExports.useCallback(T0=>{a0(o0!==!0),T0.stopPropagation(),T0.preventDefault()},[o0]);return{isFocused:u0,visible:o0,itemRefs:m0,triggerRef:p0,menuRef:b0,searchInputRef:c0,triggerProps:{ref:mergeRefs(p0,k0.setReference),id:`dropdown-toggle-${s0}`,"aria-haspopup":"menu","aria-controls":`dropdown-${s0}`,"aria-expanded":!!o0,className:`${o0?"selected":""}`,onClick:M0,onKeyDown:C0,"aria-activedescendant":u0},menuProps:{ref:mergeRefs(b0,k0.setFloating),className:"dropdown-menu","aria-labelledby":`dropdown-toggle-${s0}`,style:{...d0}},itemProps:{onMenuItemMouseEnter:E0,onMenuItemClick:I0,onMenuItemKeyDown:R0},openDropdown:B0,closeDropdown:I0,setVisible:a0}};const scriptRel="modulepreload",assetsURL=function(e0){return"/"+e0},seen={},__vitePreload=function e0(_e,i0,r0){let t0=Promise.resolve();if(i0&&i0.length>0){document.getElementsByTagName("link");const n0=document.querySelector("meta[property=csp-nonce]"),s0=(n0==null?void 0:n0.nonce)||(n0==null?void 0:n0.getAttribute("nonce"));t0=Promise.all(i0.map(o0=>{if(o0=assetsURL(o0),o0 in seen)return;seen[o0]=!0;const a0=o0.endsWith(".css"),f0=a0?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o0}"]${f0}`))return;const l0=document.createElement("link");if(l0.rel=a0?"stylesheet":scriptRel,a0||(l0.as="script",l0.crossOrigin=""),l0.href=o0,s0&&l0.setAttribute("nonce",s0),document.head.appendChild(l0),a0)return new Promise((u0,A0)=>{l0.addEventListener("load",u0),l0.addEventListener("error",()=>A0(new Error(`Unable to preload CSS for ${o0}`)))})}))}return t0.then(()=>_e()).catch(n0=>{const s0=new Event("vite:preloadError",{cancelable:!0});if(s0.payload=n0,window.dispatchEvent(s0),!s0.defaultPrevented)throw n0})};var HEIC_MIME_TYPES=["image/heic","image/heif"],useDropzone=e0=>{let[_e,i0]=reactExports.useState(!1),[r0,t0]=reactExports.useState([]),n0=reactExports.useRef(null),s0=h0=>{l0([h0])},o0=h0=>{t0(b0=>b0.filter(p0=>p0.name!==h0.name))},a0=(h0,b0)=>{t0(p0=>{if(0<=h0&&h0<p0.length){let m0=p0.slice(0,h0),g0=h0===p0.length-1?[]:p0.slice(h0+1);return[...m0,b0,...g0]}return p0})},f0=h0=>{var p0;let b0=h0;if((p0=n0.current)!=null&&p0.accept){let m0=n0.current.accept.split(",").map(w0=>w0.trim().toLowerCase()),g0=m0.filter(w0=>w0.startsWith(".")),v0=m0.filter(w0=>!w0.startsWith(".")).map(w0=>w0.replace("*",""));b0=[],h0.forEach(w0=>{let x0=w0.name.toLowerCase();(g0.some(_0=>x0.endsWith(_0))||v0.some(_0=>w0.type.includes(_0)))&&b0.push(w0)})}return b0},l0=async h0=>{let b0=(await u0(h0)).sort((p0,m0)=>p0.lastModified-m0.lastModified).map(p0=>new File([p0],p0.name.replace(/[!:,;="']/g,""),{type:p0.type,lastModified:p0.lastModified}));e0!=null&&e0.forceFilters&&(b0=f0(b0)),b0&&b0.length&&t0(p0=>[...p0,...b0])},u0=async h0=>{if(h0===null||h0.length===0)return[];let b0;return h0.some(p0=>HEIC_MIME_TYPES.includes(p0.type))&&(b0=await __vitePreload(()=>Promise.resolve().then(()=>heicTo),void 0)),Promise.all(h0.map(async p0=>{if(b0&&b0.isHeic(p0))try{let m0=await b0.heicTo({blob:p0,toType:"image/jpeg"});return new File([m0],p0.name.replace(/\.(heic|heif)$/i,".jpeg"),{type:"image/jpeg",lastModified:p0.lastModified})}catch(m0){return console.error(`Failed to convert HEIC image: ${p0.name}`,m0),p0}return p0}))},A0=()=>{t0([])},c0=h0=>{let b0=h0.target.files;b0&&l0([...b0])},k0=h0=>{h0.preventDefault(),h0.stopPropagation(),i0(!0)},d0=h0=>{h0.preventDefault(),h0.stopPropagation(),i0(!1)};return{inputRef:n0,files:r0,dragging:_e,handleDragging:k0,handleDragLeave:d0,handleDrop:async h0=>{var p0;d0(h0);let b0=(p0=h0.dataTransfer)==null?void 0:p0.files;b0&&(await l0([...b0]),n0!=null&&n0.current&&(n0.current.files=b0))},replaceFileAt:a0,deleteFile:o0,addFile:s0,addFiles:l0,cleanFiles:A0,handleOnChange:c0}},PLACEHOLDER_ICON="placeholder";function useEdificeIcons(){let e0={"last-infos-widget":"ic-widget-actualites",birthday:"ic-star","calendar-widget":"ic-widget-calendar","carnet-de-bord":"ic-widget-carnet-de-bord","record-me":"ic-widget-microphone",mood:"ic-star","my-apps":"ic-widget-apps",notes:"ic-widget-notes","rss-widget":"ic-widget-rss","bookmark-widget":"ic-widget-signets",qwant:"ic-widget-qwant","qwant-junior":"ic-widget-qwant","agenda-widget":"ic-widget-agenda","cursus-widget":"ic-widget-aide-devoirs","maxicours-widget":"ic-widget-maxicours","school-widget":"ic-widget-schoolbook","universalis-widget":"ic-widget-universalis","briefme-widget":"ic-widget-briefme"};function _e(a0){let f0="";switch(f0=typeof a0=="string"?a0:(a0==null?void 0:a0.icon)===void 0?PLACEHOLDER_ICON:a0==null?void 0:a0.icon.trim().toLowerCase(),f0&&f0.length>0?f0.endsWith("-large")&&(f0=f0.replace("-large","")):typeof a0=="object"&&(f0=(a0==null?void 0:a0.displayName)===void 0?"":a0==null?void 0:a0.displayName.trim().toLowerCase()),f0){case"admin.title":f0="admin";break;case"banques des savoirs":f0="banquesavoir";break;case"collaborativewall":f0="collaborative-wall";break;case"collect":f0="rack";break;case"communautés":f0="community";break;case"directory.user":f0="userbook";break;case"emploi du temps":f0="edt";break;case"formulaire":f0="forms";break;case"messagerie":f0="conversation";break;case"news":f0="actualites";break;case"homeworks":case"cahier de texte":f0="cahier-de-texte";break;case"diary":case"cahier de texte 2d":f0="cahier-textes";break;case"scrap-book":f0="scrapbook";break}return f0}function i0(a0){return a0&&(a0.startsWith("/")||a0.startsWith("http://")||a0.startsWith("https://"))}function r0(a0){let f0=_e(a0)||PLACEHOLDER_ICON;return`color-app-${f0} color-app app-${f0}`}function t0(a0){let f0=_e(a0)||PLACEHOLDER_ICON;return`bg-app-${f0} bg-app app-${f0}`}function n0(a0){let f0=_e(a0)||PLACEHOLDER_ICON;return`bg-light-${f0} bg-app-light app-${f0}`}function s0(a0){let f0=_e(a0)||PLACEHOLDER_ICON;return`border-app-${f0} border-app app-${f0}`}function o0(a0){return e0[a0.platformConf.name]}return{getIconClass:r0,getBackgroundIconClass:t0,getBackgroundLightIconClass:n0,getBorderIconClass:s0,getIconCode:_e,getWidgetIconClass:o0,isIconUrl:i0}}function useHover(){let[e0,_e]=reactExports.useState(!1),i0=reactExports.useRef(null),r0=()=>{_e(!0)},t0=()=>{_e(!1)};return reactExports.useEffect(()=>{let n0=i0.current;if(n0)return n0.addEventListener("mouseover",r0),n0.addEventListener("mouseout",t0),()=>{n0.removeEventListener("mouseover",r0),n0.removeEventListener("mouseout",t0)}},[i0]),[i0,e0]}function useKeyPress(e0,_e){let i0=reactExports.useCallback(({code:r0})=>{_e.includes(r0)&&e0()},[e0,_e]);reactExports.useEffect(()=>(window.addEventListener("keydown",i0),()=>{window.removeEventListener("keydown",i0)}),[i0])}function useTrapFocus(e0){let _e=reactExports.useRef(null),i0='button:not([disabled]), [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';return reactExports.useEffect(()=>{if(!e0)return;let r0=_e.current,t0=r0.querySelectorAll(i0)[0],n0=r0.querySelectorAll(i0),s0=_e&&(n0==null?void 0:n0[n0.length-1]),o0=a0=>{a0.key==="Tab"&&(a0.shiftKey?document.activeElement===t0&&(s0.focus(),a0.preventDefault()):document.activeElement===s0&&(t0.focus(),a0.preventDefault()))};if(r0)return r0.addEventListener("keydown",o0),()=>{r0.removeEventListener("keydown",o0)}},[e0]),_e}var ModalContext=reactExports.createContext({ariaLabelId:"",ariaDescriptionId:"",focusId:""}),useModalContext=()=>{let e0=reactExports.useContext(ModalContext);if(!e0)throw Error("Cannot be rendered outside the Modal component");return e0},ModalBody=e0=>{let{ariaDescriptionId:_e}=useModalContext(),{children:i0,className:r0}=e0;return jsxRuntimeExports.jsx("div",{id:_e,className:clsx("modal-body",r0),children:i0})},ModalFooter=e0=>jsxRuntimeExports.jsx("div",{className:"modal-footer",children:e0.children}),SvgIconClose=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.222 4.222a1.1 1.1 0 0 1 1.556 0l14 14a1.1 1.1 0 1 1-1.556 1.556l-14-14a1.1 1.1 0 0 1 0-1.556",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M19.778 4.222a1.1 1.1 0 0 1 0 1.556l-14 14a1.1 1.1 0 1 1-1.556-1.556l14-14a1.1 1.1 0 0 1 1.556 0",clipRule:"evenodd"})]}),ModalHeader=e0=>{let{onModalClose:_e,children:i0}=e0,{ariaLabelId:r0,focusId:t0}=useModalContext(),n0=reactExports.useRef(null),{t:s0}=useTranslation();return reactExports.useEffect(()=>{var o0;t0||((o0=n0.current)==null||o0.focus())},[t0]),jsxRuntimeExports.jsxs("div",{className:clsx("modal-header",{"align-self-center":e0.centered}),children:[jsxRuntimeExports.jsx("h2",{id:r0,className:"modal-title",tabIndex:-1,children:i0}),jsxRuntimeExports.jsx(IconButton,{ref:n0,"aria-label":s0("close"),color:"tertiary",icon:jsxRuntimeExports.jsx(SvgIconClose,{}),type:"button",variant:"ghost",title:s0("close"),onClick:_e,className:"btn-close"})]})},ModalSubtitle=e0=>jsxRuntimeExports.jsx("p",{className:"modal-subtitle",children:e0.children}),updateQueue=makeQueue(),raf$1=e0=>schedule(e0,updateQueue),writeQueue=makeQueue();raf$1.write=e0=>schedule(e0,writeQueue);var onStartQueue=makeQueue();raf$1.onStart=e0=>schedule(e0,onStartQueue);var onFrameQueue=makeQueue();raf$1.onFrame=e0=>schedule(e0,onFrameQueue);var onFinishQueue=makeQueue();raf$1.onFinish=e0=>schedule(e0,onFinishQueue);var timeouts=[];raf$1.setTimeout=(e0,_e)=>{const i0=raf$1.now()+_e,r0=()=>{const n0=timeouts.findIndex(s0=>s0.cancel==r0);~n0&&timeouts.splice(n0,1),pendingCount-=~n0?1:0},t0={time:i0,handler:e0,cancel:r0};return timeouts.splice(findTimeout(i0),0,t0),pendingCount+=1,start$4(),t0};var findTimeout=e0=>~(~timeouts.findIndex(_e=>_e.time>e0)||~timeouts.length);raf$1.cancel=e0=>{onStartQueue.delete(e0),onFrameQueue.delete(e0),onFinishQueue.delete(e0),updateQueue.delete(e0),writeQueue.delete(e0)};raf$1.sync=e0=>{sync=!0,raf$1.batchedUpdates(e0),sync=!1};raf$1.throttle=e0=>{let _e;function i0(){try{e0(..._e)}finally{_e=null}}function r0(...t0){_e=t0,raf$1.onStart(i0)}return r0.handler=e0,r0.cancel=()=>{onStartQueue.delete(i0),_e=null},r0};var nativeRaf=typeof window<"u"?window.requestAnimationFrame:()=>{};raf$1.use=e0=>nativeRaf=e0;raf$1.now=typeof performance<"u"?()=>performance.now():Date.now;raf$1.batchedUpdates=e0=>e0();raf$1.catch=console.error;raf$1.frameLoop="always";raf$1.advance=()=>{raf$1.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):update$1()};var ts=-1,pendingCount=0,sync=!1;function schedule(e0,_e){sync?(_e.delete(e0),e0(0)):(_e.add(e0),start$4())}function start$4(){ts<0&&(ts=0,raf$1.frameLoop!=="demand"&&nativeRaf(loop$1))}function stop$3(){ts=-1}function loop$1(){~ts&&(nativeRaf(loop$1),raf$1.batchedUpdates(update$1))}function update$1(){const e0=ts;ts=raf$1.now();const _e=findTimeout(ts);if(_e&&(eachSafely(timeouts.splice(0,_e),i0=>i0.handler()),pendingCount-=_e),!pendingCount){stop$3();return}onStartQueue.flush(),updateQueue.flush(e0?Math.min(64,ts-e0):16.667),onFrameQueue.flush(),writeQueue.flush(),onFinishQueue.flush()}function makeQueue(){let e0=new Set,_e=e0;return{add(i0){pendingCount+=_e==e0&&!e0.has(i0)?1:0,e0.add(i0)},delete(i0){return pendingCount-=_e==e0&&e0.has(i0)?1:0,e0.delete(i0)},flush(i0){_e.size&&(e0=new Set,pendingCount-=_e.size,eachSafely(_e,r0=>r0(i0)&&e0.add(r0)),pendingCount+=e0.size,_e=e0)}}}function eachSafely(e0,_e){e0.forEach(i0=>{try{_e(i0)}catch(r0){raf$1.catch(r0)}})}var __defProp$1=Object.defineProperty,__export=(e0,_e)=>{for(var i0 in _e)__defProp$1(e0,i0,{get:_e[i0],enumerable:!0})},globals_exports={};__export(globals_exports,{assign:()=>assign,colors:()=>colors,createStringInterpolator:()=>createStringInterpolator,skipAnimation:()=>skipAnimation,to:()=>to,willAdvance:()=>willAdvance});function noop$3(){}var defineHidden=(e0,_e,i0)=>Object.defineProperty(e0,_e,{value:i0,writable:!0,configurable:!0}),is$2={arr:Array.isArray,obj:e0=>!!e0&&e0.constructor.name==="Object",fun:e0=>typeof e0=="function",str:e0=>typeof e0=="string",num:e0=>typeof e0=="number",und:e0=>e0===void 0};function isEqual$2(e0,_e){if(is$2.arr(e0)){if(!is$2.arr(_e)||e0.length!==_e.length)return!1;for(let i0=0;i0<e0.length;i0++)if(e0[i0]!==_e[i0])return!1;return!0}return e0===_e}var each=(e0,_e)=>e0.forEach(_e);function eachProp(e0,_e,i0){if(is$2.arr(e0)){for(let r0=0;r0<e0.length;r0++)_e.call(i0,e0[r0],`${r0}`);return}for(const r0 in e0)e0.hasOwnProperty(r0)&&_e.call(i0,e0[r0],r0)}var toArray=e0=>is$2.und(e0)?[]:is$2.arr(e0)?e0:[e0];function flush(e0,_e){if(e0.size){const i0=Array.from(e0);e0.clear(),each(i0,_e)}}var flushCalls=(e0,..._e)=>flush(e0,i0=>i0(..._e)),isSSR=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),createStringInterpolator,to,colors=null,skipAnimation=!1,willAdvance=noop$3,assign=e0=>{e0.to&&(to=e0.to),e0.now&&(raf$1.now=e0.now),e0.colors!==void 0&&(colors=e0.colors),e0.skipAnimation!=null&&(skipAnimation=e0.skipAnimation),e0.createStringInterpolator&&(createStringInterpolator=e0.createStringInterpolator),e0.requestAnimationFrame&&raf$1.use(e0.requestAnimationFrame),e0.batchedUpdates&&(raf$1.batchedUpdates=e0.batchedUpdates),e0.willAdvance&&(willAdvance=e0.willAdvance),e0.frameLoop&&(raf$1.frameLoop=e0.frameLoop)},startQueue=new Set,currentFrame=[],prevFrame=[],priority=0,frameLoop={get idle(){return!startQueue.size&&!currentFrame.length},start(e0){priority>e0.priority?(startQueue.add(e0),raf$1.onStart(flushStartQueue)):(startSafely(e0),raf$1(advance))},advance,sort(e0){if(priority)raf$1.onFrame(()=>frameLoop.sort(e0));else{const _e=currentFrame.indexOf(e0);~_e&&(currentFrame.splice(_e,1),startUnsafely(e0))}},clear(){currentFrame=[],startQueue.clear()}};function flushStartQueue(){startQueue.forEach(startSafely),startQueue.clear(),raf$1(advance)}function startSafely(e0){currentFrame.includes(e0)||startUnsafely(e0)}function startUnsafely(e0){currentFrame.splice(findIndex(currentFrame,_e=>_e.priority>e0.priority),0,e0)}function advance(e0){const _e=prevFrame;for(let i0=0;i0<currentFrame.length;i0++){const r0=currentFrame[i0];priority=r0.priority,r0.idle||(willAdvance(r0),r0.advance(e0),r0.idle||_e.push(r0))}return priority=0,prevFrame=currentFrame,prevFrame.length=0,currentFrame=_e,currentFrame.length>0}function findIndex(e0,_e){const i0=e0.findIndex(_e);return i0<0?e0.length:i0}var colors2={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function call$1(...e0){return"\\(\\s*("+e0.join(")\\s*,\\s*(")+")\\s*\\)"}var rgb=new RegExp("rgb"+call$1(NUMBER,NUMBER,NUMBER)),rgba=new RegExp("rgba"+call$1(NUMBER,NUMBER,NUMBER,NUMBER)),hsl=new RegExp("hsl"+call$1(NUMBER,PERCENTAGE,PERCENTAGE)),hsla=new RegExp("hsla"+call$1(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6=/^#([0-9a-fA-F]{6})$/,hex8=/^#([0-9a-fA-F]{8})$/;function normalizeColor(e0){let _e;return typeof e0=="number"?e0>>>0===e0&&e0>=0&&e0<=4294967295?e0:null:(_e=hex6.exec(e0))?parseInt(_e[1]+"ff",16)>>>0:colors&&colors[e0]!==void 0?colors[e0]:(_e=rgb.exec(e0))?(parse255(_e[1])<<24|parse255(_e[2])<<16|parse255(_e[3])<<8|255)>>>0:(_e=rgba.exec(e0))?(parse255(_e[1])<<24|parse255(_e[2])<<16|parse255(_e[3])<<8|parse1(_e[4]))>>>0:(_e=hex3.exec(e0))?parseInt(_e[1]+_e[1]+_e[2]+_e[2]+_e[3]+_e[3]+"ff",16)>>>0:(_e=hex8.exec(e0))?parseInt(_e[1],16)>>>0:(_e=hex4.exec(e0))?parseInt(_e[1]+_e[1]+_e[2]+_e[2]+_e[3]+_e[3]+_e[4]+_e[4],16)>>>0:(_e=hsl.exec(e0))?(hslToRgb(parse360(_e[1]),parsePercentage(_e[2]),parsePercentage(_e[3]))|255)>>>0:(_e=hsla.exec(e0))?(hslToRgb(parse360(_e[1]),parsePercentage(_e[2]),parsePercentage(_e[3]))|parse1(_e[4]))>>>0:null}function hue2rgb(e0,_e,i0){return i0<0&&(i0+=1),i0>1&&(i0-=1),i0<1/6?e0+(_e-e0)*6*i0:i0<1/2?_e:i0<2/3?e0+(_e-e0)*(2/3-i0)*6:e0}function hslToRgb(e0,_e,i0){const r0=i0<.5?i0*(1+_e):i0+_e-i0*_e,t0=2*i0-r0,n0=hue2rgb(t0,r0,e0+1/3),s0=hue2rgb(t0,r0,e0),o0=hue2rgb(t0,r0,e0-1/3);return Math.round(n0*255)<<24|Math.round(s0*255)<<16|Math.round(o0*255)<<8}function parse255(e0){const _e=parseInt(e0,10);return _e<0?0:_e>255?255:_e}function parse360(e0){return(parseFloat(e0)%360+360)%360/360}function parse1(e0){const _e=parseFloat(e0);return _e<0?0:_e>1?255:Math.round(_e*255)}function parsePercentage(e0){const _e=parseFloat(e0);return _e<0?0:_e>100?1:_e/100}function colorToRgba(e0){let _e=normalizeColor(e0);if(_e===null)return e0;_e=_e||0;const i0=(_e&4278190080)>>>24,r0=(_e&16711680)>>>16,t0=(_e&65280)>>>8,n0=(_e&255)/255;return`rgba(${i0}, ${r0}, ${t0}, ${n0})`}var createInterpolator=(e0,_e,i0)=>{if(is$2.fun(e0))return e0;if(is$2.arr(e0))return createInterpolator({range:e0,output:_e,extrapolate:i0});if(is$2.str(e0.output[0]))return createStringInterpolator(e0);const r0=e0,t0=r0.output,n0=r0.range||[0,1],s0=r0.extrapolateLeft||r0.extrapolate||"extend",o0=r0.extrapolateRight||r0.extrapolate||"extend",a0=r0.easing||(f0=>f0);return f0=>{const l0=findRange(f0,n0);return interpolate(f0,n0[l0],n0[l0+1],t0[l0],t0[l0+1],a0,s0,o0,r0.map)}};function interpolate(e0,_e,i0,r0,t0,n0,s0,o0,a0){let f0=a0?a0(e0):e0;if(f0<_e){if(s0==="identity")return f0;s0==="clamp"&&(f0=_e)}if(f0>i0){if(o0==="identity")return f0;o0==="clamp"&&(f0=i0)}return r0===t0?r0:_e===i0?e0<=_e?r0:t0:(_e===-1/0?f0=-f0:i0===1/0?f0=f0-_e:f0=(f0-_e)/(i0-_e),f0=n0(f0),r0===-1/0?f0=-f0:t0===1/0?f0=f0+r0:f0=f0*(t0-r0)+r0,f0)}function findRange(e0,_e){for(var i0=1;i0<_e.length-1&&!(_e[i0]>=e0);++i0);return i0-1}var easings={linear:e0=>e0},$get=Symbol.for("FluidValue.get"),$observers=Symbol.for("FluidValue.observers"),hasFluidValue=e0=>!!(e0&&e0[$get]),getFluidValue=e0=>e0&&e0[$get]?e0[$get]():e0,getFluidObservers=e0=>e0[$observers]||null;function callFluidObserver(e0,_e){e0.eventObserved?e0.eventObserved(_e):e0(_e)}function callFluidObservers(e0,_e){const i0=e0[$observers];i0&&i0.forEach(r0=>{callFluidObserver(r0,_e)})}var FluidValue=class{constructor(e0){if(!e0&&!(e0=this.get))throw Error("Unknown getter");setFluidGetter(this,e0)}},setFluidGetter=(e0,_e)=>setHidden(e0,$get,_e);function addFluidObserver(e0,_e){if(e0[$get]){let i0=e0[$observers];i0||setHidden(e0,$observers,i0=new Set),i0.has(_e)||(i0.add(_e),e0.observerAdded&&e0.observerAdded(i0.size,_e))}return _e}function removeFluidObserver(e0,_e){const i0=e0[$observers];if(i0&&i0.has(_e)){const r0=i0.size-1;r0?i0.delete(_e):e0[$observers]=null,e0.observerRemoved&&e0.observerRemoved(r0,_e)}}var setHidden=(e0,_e,i0)=>Object.defineProperty(e0,_e,{value:i0,writable:!0,configurable:!0}),numberRegex=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,colorRegex=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,unitRegex=new RegExp(`(${numberRegex.source})(%|[a-z]+)`,"i"),rgbaRegex=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,cssVariableRegex=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,variableToRgba=e0=>{const[_e,i0]=parseCSSVariable(e0);if(!_e||isSSR())return e0;const r0=window.getComputedStyle(document.documentElement).getPropertyValue(_e);if(r0)return r0.trim();if(i0&&i0.startsWith("--")){const t0=window.getComputedStyle(document.documentElement).getPropertyValue(i0);return t0||e0}else{if(i0&&cssVariableRegex.test(i0))return variableToRgba(i0);if(i0)return i0}return e0},parseCSSVariable=e0=>{const _e=cssVariableRegex.exec(e0);if(!_e)return[,];const[,i0,r0]=_e;return[i0,r0]},namedColorRegex,rgbaRound=(e0,_e,i0,r0,t0)=>`rgba(${Math.round(_e)}, ${Math.round(i0)}, ${Math.round(r0)}, ${t0})`,createStringInterpolator2=e0=>{namedColorRegex||(namedColorRegex=colors?new RegExp(`(${Object.keys(colors).join("|")})(?!\\w)`,"g"):/^\b$/);const _e=e0.output.map(n0=>getFluidValue(n0).replace(cssVariableRegex,variableToRgba).replace(colorRegex,colorToRgba).replace(namedColorRegex,colorToRgba)),i0=_e.map(n0=>n0.match(numberRegex).map(Number)),t0=i0[0].map((n0,s0)=>i0.map(o0=>{if(!(s0 in o0))throw Error('The arity of each "output" value must be equal');return o0[s0]})).map(n0=>createInterpolator({...e0,output:n0}));return n0=>{var a0;const s0=!unitRegex.test(_e[0])&&((a0=_e.find(f0=>unitRegex.test(f0)))==null?void 0:a0.replace(numberRegex,""));let o0=0;return _e[0].replace(numberRegex,()=>`${t0[o0++](n0)}${s0||""}`).replace(rgbaRegex,rgbaRound)}},prefix="react-spring: ",once=e0=>{const _e=e0;let i0=!1;if(typeof _e!="function")throw new TypeError(`${prefix}once requires a function parameter`);return(...r0)=>{i0||(_e(...r0),i0=!0)}},warnInterpolate=once(console.warn);function deprecateInterpolate(){warnInterpolate(`${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var warnDirectCall=once(console.warn);function deprecateDirectCall(){warnDirectCall(`${prefix}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function isAnimatedString(e0){return is$2.str(e0)&&(e0[0]=="#"||/\d/.test(e0)||!isSSR()&&cssVariableRegex.test(e0)||e0 in(colors||{}))}var useIsomorphicLayoutEffect$6=isSSR()?reactExports.useEffect:reactExports.useLayoutEffect,useIsMounted=()=>{const e0=reactExports.useRef(!1);return useIsomorphicLayoutEffect$6(()=>(e0.current=!0,()=>{e0.current=!1}),[]),e0};function useForceUpdate(){const e0=reactExports.useState()[1],_e=useIsMounted();return()=>{_e.current&&e0(Math.random())}}function useMemoOne(e0,_e){const[i0]=reactExports.useState(()=>({inputs:_e,result:e0()})),r0=reactExports.useRef(),t0=r0.current;let n0=t0;return n0?_e&&n0.inputs&&areInputsEqual(_e,n0.inputs)||(n0={inputs:_e,result:e0()}):n0=i0,reactExports.useEffect(()=>{r0.current=n0,t0==i0&&(i0.inputs=i0.result=void 0)},[n0]),n0.result}function areInputsEqual(e0,_e){if(e0.length!==_e.length)return!1;for(let i0=0;i0<e0.length;i0++)if(e0[i0]!==_e[i0])return!1;return!0}var useOnce=e0=>reactExports.useEffect(e0,emptyDeps),emptyDeps=[];function usePrev(e0){const _e=reactExports.useRef();return reactExports.useEffect(()=>{_e.current=e0}),_e.current}var $node=Symbol.for("Animated:node"),isAnimated=e0=>!!e0&&e0[$node]===e0,getAnimated=e0=>e0&&e0[$node],setAnimated=(e0,_e)=>defineHidden(e0,$node,_e),getPayload=e0=>e0&&e0[$node]&&e0[$node].getPayload(),Animated=class{constructor(){setAnimated(this,this)}getPayload(){return this.payload||[]}},AnimatedValue=class extends Animated{constructor(e0){super(),this._value=e0,this.done=!0,this.durationProgress=0,is$2.num(this._value)&&(this.lastPosition=this._value)}static create(e0){return new AnimatedValue(e0)}getPayload(){return[this]}getValue(){return this._value}setValue(e0,_e){return is$2.num(e0)&&(this.lastPosition=e0,_e&&(e0=Math.round(e0/_e)*_e,this.done&&(this.lastPosition=e0))),this._value===e0?!1:(this._value=e0,!0)}reset(){const{done:e0}=this;this.done=!1,is$2.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e0&&(this.lastVelocity=null),this.v0=null)}},AnimatedString=class extends AnimatedValue{constructor(e0){super(0),this._string=null,this._toString=createInterpolator({output:[e0,e0]})}static create(e0){return new AnimatedString(e0)}getValue(){const e0=this._string;return e0??(this._string=this._toString(this._value))}setValue(e0){if(is$2.str(e0)){if(e0==this._string)return!1;this._string=e0,this._value=1}else if(super.setValue(e0))this._string=null;else return!1;return!0}reset(e0){e0&&(this._toString=createInterpolator({output:[this.getValue(),e0]})),this._value=0,super.reset()}},TreeContext={dependencies:null},AnimatedObject=class extends Animated{constructor(e0){super(),this.source=e0,this.setValue(e0)}getValue(e0){const _e={};return eachProp(this.source,(i0,r0)=>{isAnimated(i0)?_e[r0]=i0.getValue(e0):hasFluidValue(i0)?_e[r0]=getFluidValue(i0):e0||(_e[r0]=i0)}),_e}setValue(e0){this.source=e0,this.payload=this._makePayload(e0)}reset(){this.payload&&each(this.payload,e0=>e0.reset())}_makePayload(e0){if(e0){const _e=new Set;return eachProp(e0,this._addToPayload,_e),Array.from(_e)}}_addToPayload(e0){TreeContext.dependencies&&hasFluidValue(e0)&&TreeContext.dependencies.add(e0);const _e=getPayload(e0);_e&&each(_e,i0=>this.add(i0))}},AnimatedArray=class extends AnimatedObject{constructor(e0){super(e0)}static create(e0){return new AnimatedArray(e0)}getValue(){return this.source.map(e0=>e0.getValue())}setValue(e0){const _e=this.getPayload();return e0.length==_e.length?_e.map((i0,r0)=>i0.setValue(e0[r0])).some(Boolean):(super.setValue(e0.map(makeAnimated)),!0)}};function makeAnimated(e0){return(isAnimatedString(e0)?AnimatedString:AnimatedValue).create(e0)}function getAnimatedType(e0){const _e=getAnimated(e0);return _e?_e.constructor:is$2.arr(e0)?AnimatedArray:isAnimatedString(e0)?AnimatedString:AnimatedValue}var withAnimated=(e0,_e)=>{const i0=!is$2.fun(e0)||e0.prototype&&e0.prototype.isReactComponent;return reactExports.forwardRef((r0,t0)=>{const n0=reactExports.useRef(null),s0=i0&&reactExports.useCallback(k0=>{n0.current=updateRef(t0,k0)},[t0]),[o0,a0]=getAnimatedState(r0,_e),f0=useForceUpdate(),l0=()=>{const k0=n0.current;if(i0&&!k0)return;(k0?_e.applyAnimatedValues(k0,o0.getValue(!0)):!1)===!1&&f0()},u0=new PropsObserver(l0,a0),A0=reactExports.useRef();useIsomorphicLayoutEffect$6(()=>(A0.current=u0,each(a0,k0=>addFluidObserver(k0,u0)),()=>{A0.current&&(each(A0.current.deps,k0=>removeFluidObserver(k0,A0.current)),raf$1.cancel(A0.current.update))})),reactExports.useEffect(l0,[]),useOnce(()=>()=>{const k0=A0.current;each(k0.deps,d0=>removeFluidObserver(d0,k0))});const c0=_e.getComponentProps(o0.getValue());return reactExports.createElement(e0,{...c0,ref:s0})})},PropsObserver=class{constructor(e0,_e){this.update=e0,this.deps=_e}eventObserved(e0){e0.type=="change"&&raf$1.write(this.update)}};function getAnimatedState(e0,_e){const i0=new Set;return TreeContext.dependencies=i0,e0.style&&(e0={...e0,style:_e.createAnimatedStyle(e0.style)}),e0=new AnimatedObject(e0),TreeContext.dependencies=null,[e0,i0]}function updateRef(e0,_e){return e0&&(is$2.fun(e0)?e0(_e):e0.current=_e),_e}var cacheKey=Symbol.for("AnimatedComponent"),createHost=(e0,{applyAnimatedValues:_e=()=>!1,createAnimatedStyle:i0=t0=>new AnimatedObject(t0),getComponentProps:r0=t0=>t0}={})=>{const t0={applyAnimatedValues:_e,createAnimatedStyle:i0,getComponentProps:r0},n0=s0=>{const o0=getDisplayName(s0)||"Anonymous";return is$2.str(s0)?s0=n0[s0]||(n0[s0]=withAnimated(s0,t0)):s0=s0[cacheKey]||(s0[cacheKey]=withAnimated(s0,t0)),s0.displayName=`Animated(${o0})`,s0};return eachProp(e0,(s0,o0)=>{is$2.arr(e0)&&(o0=getDisplayName(s0)),n0[o0]=n0(s0)}),{animated:n0}},getDisplayName=e0=>is$2.str(e0)?e0:e0&&is$2.str(e0.displayName)?e0.displayName:is$2.fun(e0)&&e0.name||null;function callProp(e0,..._e){return is$2.fun(e0)?e0(..._e):e0}var matchProp=(e0,_e)=>e0===!0||!!(_e&&e0&&(is$2.fun(e0)?e0(_e):toArray(e0).includes(_e))),resolveProp=(e0,_e)=>is$2.obj(e0)?_e&&e0[_e]:e0,getDefaultProp=(e0,_e)=>e0.default===!0?e0[_e]:e0.default?e0.default[_e]:void 0,noopTransform=e0=>e0,getDefaultProps=(e0,_e=noopTransform)=>{let i0=DEFAULT_PROPS;e0.default&&e0.default!==!0&&(e0=e0.default,i0=Object.keys(e0));const r0={};for(const t0 of i0){const n0=_e(e0[t0],t0);is$2.und(n0)||(r0[t0]=n0)}return r0},DEFAULT_PROPS=["config","onProps","onStart","onChange","onPause","onResume","onRest"],RESERVED_PROPS={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function getForwardProps(e0){const _e={};let i0=0;if(eachProp(e0,(r0,t0)=>{RESERVED_PROPS[t0]||(_e[t0]=r0,i0++)}),i0)return _e}function inferTo(e0){const _e=getForwardProps(e0);if(_e){const i0={to:_e};return eachProp(e0,(r0,t0)=>t0 in _e||(i0[t0]=r0)),i0}return{...e0}}function computeGoal(e0){return e0=getFluidValue(e0),is$2.arr(e0)?e0.map(computeGoal):isAnimatedString(e0)?globals_exports.createStringInterpolator({range:[0,1],output:[e0,e0]})(1):e0}function hasProps(e0){for(const _e in e0)return!0;return!1}function isAsyncTo(e0){return is$2.fun(e0)||is$2.arr(e0)&&is$2.obj(e0[0])}function detachRefs(e0,_e){var i0;(i0=e0.ref)==null||i0.delete(e0),_e==null||_e.delete(e0)}function replaceRef(e0,_e){var i0;_e&&e0.ref!==_e&&((i0=e0.ref)==null||i0.delete(e0),_e.add(e0),e0.ref=_e)}var config$1={default:{tension:170,friction:26}},defaults$2={...config$1.default,mass:1,damping:1,easing:easings.linear,clamp:!1},AnimationConfig=class{constructor(){this.velocity=0,Object.assign(this,defaults$2)}};function mergeConfig(e0,_e,i0){i0&&(i0={...i0},sanitizeConfig(i0,_e),_e={...i0,..._e}),sanitizeConfig(e0,_e),Object.assign(e0,_e);for(const s0 in defaults$2)e0[s0]==null&&(e0[s0]=defaults$2[s0]);let{frequency:r0,damping:t0}=e0;const{mass:n0}=e0;return is$2.und(r0)||(r0<.01&&(r0=.01),t0<0&&(t0=0),e0.tension=Math.pow(2*Math.PI/r0,2)*n0,e0.friction=4*Math.PI*t0*n0/r0),e0}function sanitizeConfig(e0,_e){if(!is$2.und(_e.decay))e0.duration=void 0;else{const i0=!is$2.und(_e.tension)||!is$2.und(_e.friction);(i0||!is$2.und(_e.frequency)||!is$2.und(_e.damping)||!is$2.und(_e.mass))&&(e0.duration=void 0,e0.decay=void 0),i0&&(e0.frequency=void 0)}}var emptyArray$1=[],Animation=class{constructor(){this.changed=!1,this.values=emptyArray$1,this.toValues=null,this.fromValues=emptyArray$1,this.config=new AnimationConfig,this.immediate=!1}};function scheduleProps(e0,{key:_e,props:i0,defaultProps:r0,state:t0,actions:n0}){return new Promise((s0,o0)=>{let a0,f0,l0=matchProp(i0.cancel??(r0==null?void 0:r0.cancel),_e);if(l0)c0();else{is$2.und(i0.pause)||(t0.paused=matchProp(i0.pause,_e));let k0=r0==null?void 0:r0.pause;k0!==!0&&(k0=t0.paused||matchProp(k0,_e)),a0=callProp(i0.delay||0,_e),k0?(t0.resumeQueue.add(A0),n0.pause()):(n0.resume(),A0())}function u0(){t0.resumeQueue.add(A0),t0.timeouts.delete(f0),f0.cancel(),a0=f0.time-raf$1.now()}function A0(){a0>0&&!globals_exports.skipAnimation?(t0.delayed=!0,f0=raf$1.setTimeout(c0,a0),t0.pauseQueue.add(u0),t0.timeouts.add(f0)):c0()}function c0(){t0.delayed&&(t0.delayed=!1),t0.pauseQueue.delete(u0),t0.timeouts.delete(f0),e0<=(t0.cancelId||0)&&(l0=!0);try{n0.start({...i0,callId:e0,cancel:l0},s0)}catch(k0){o0(k0)}}})}var getCombinedResult=(e0,_e)=>_e.length==1?_e[0]:_e.some(i0=>i0.cancelled)?getCancelledResult(e0.get()):_e.every(i0=>i0.noop)?getNoopResult(e0.get()):getFinishedResult(e0.get(),_e.every(i0=>i0.finished)),getNoopResult=e0=>({value:e0,noop:!0,finished:!0,cancelled:!1}),getFinishedResult=(e0,_e,i0=!1)=>({value:e0,finished:_e,cancelled:i0}),getCancelledResult=e0=>({value:e0,cancelled:!0,finished:!1});function runAsync(e0,_e,i0,r0){const{callId:t0,parentId:n0,onRest:s0}=_e,{asyncTo:o0,promise:a0}=i0;return!n0&&e0===o0&&!_e.reset?a0:i0.promise=(async()=>{i0.asyncId=t0,i0.asyncTo=e0;const f0=getDefaultProps(_e,(h0,b0)=>b0==="onRest"?void 0:h0);let l0,u0;const A0=new Promise((h0,b0)=>(l0=h0,u0=b0)),c0=h0=>{const b0=t0<=(i0.cancelId||0)&&getCancelledResult(r0)||t0!==i0.asyncId&&getFinishedResult(r0,!1);if(b0)throw h0.result=b0,u0(h0),h0},k0=(h0,b0)=>{const p0=new BailSignal,m0=new SkipAnimationSignal;return(async()=>{if(globals_exports.skipAnimation)throw stopAsync(i0),m0.result=getFinishedResult(r0,!1),u0(m0),m0;c0(p0);const g0=is$2.obj(h0)?{...h0}:{...b0,to:h0};g0.parentId=t0,eachProp(f0,(w0,x0)=>{is$2.und(g0[x0])&&(g0[x0]=w0)});const v0=await r0.start(g0);return c0(p0),i0.paused&&await new Promise(w0=>{i0.resumeQueue.add(w0)}),v0})()};let d0;if(globals_exports.skipAnimation)return stopAsync(i0),getFinishedResult(r0,!1);try{let h0;is$2.arr(e0)?h0=(async b0=>{for(const p0 of b0)await k0(p0)})(e0):h0=Promise.resolve(e0(k0,r0.stop.bind(r0))),await Promise.all([h0.then(l0),A0]),d0=getFinishedResult(r0.get(),!0,!1)}catch(h0){if(h0 instanceof BailSignal)d0=h0.result;else if(h0 instanceof SkipAnimationSignal)d0=h0.result;else throw h0}finally{t0==i0.asyncId&&(i0.asyncId=n0,i0.asyncTo=n0?o0:void 0,i0.promise=n0?a0:void 0)}return is$2.fun(s0)&&raf$1.batchedUpdates(()=>{s0(d0,r0,r0.item)}),d0})()}function stopAsync(e0,_e){flush(e0.timeouts,i0=>i0.cancel()),e0.pauseQueue.clear(),e0.resumeQueue.clear(),e0.asyncId=e0.asyncTo=e0.promise=void 0,_e&&(e0.cancelId=_e)}var BailSignal=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},SkipAnimationSignal=class extends Error{constructor(){super("SkipAnimationSignal")}},isFrameValue=e0=>e0 instanceof FrameValue,nextId=1,FrameValue=class extends FluidValue{constructor(){super(...arguments),this.id=nextId++,this._priority=0}get priority(){return this._priority}set priority(e0){this._priority!=e0&&(this._priority=e0,this._onPriorityChange(e0))}get(){const e0=getAnimated(this);return e0&&e0.getValue()}to(...e0){return globals_exports.to(this,e0)}interpolate(...e0){return deprecateInterpolate(),globals_exports.to(this,e0)}toJSON(){return this.get()}observerAdded(e0){e0==1&&this._attach()}observerRemoved(e0){e0==0&&this._detach()}_attach(){}_detach(){}_onChange(e0,_e=!1){callFluidObservers(this,{type:"change",parent:this,value:e0,idle:_e})}_onPriorityChange(e0){this.idle||frameLoop.sort(this),callFluidObservers(this,{type:"priority",parent:this,priority:e0})}},$P=Symbol.for("SpringPhase"),HAS_ANIMATED=1,IS_ANIMATING=2,IS_PAUSED=4,hasAnimated=e0=>(e0[$P]&HAS_ANIMATED)>0,isAnimating=e0=>(e0[$P]&IS_ANIMATING)>0,isPaused=e0=>(e0[$P]&IS_PAUSED)>0,setActiveBit=(e0,_e)=>_e?e0[$P]|=IS_ANIMATING|HAS_ANIMATED:e0[$P]&=~IS_ANIMATING,setPausedBit=(e0,_e)=>_e?e0[$P]|=IS_PAUSED:e0[$P]&=~IS_PAUSED,SpringValue=class extends FrameValue{constructor(e0,_e){if(super(),this.animation=new Animation,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!is$2.und(e0)||!is$2.und(_e)){const i0=is$2.obj(e0)?{...e0}:{..._e,from:e0};is$2.und(i0.default)&&(i0.default=!0),this.start(i0)}}get idle(){return!(isAnimating(this)||this._state.asyncTo)||isPaused(this)}get goal(){return getFluidValue(this.animation.to)}get velocity(){const e0=getAnimated(this);return e0 instanceof AnimatedValue?e0.lastVelocity||0:e0.getPayload().map(_e=>_e.lastVelocity||0)}get hasAnimated(){return hasAnimated(this)}get isAnimating(){return isAnimating(this)}get isPaused(){return isPaused(this)}get isDelayed(){return this._state.delayed}advance(e0){let _e=!0,i0=!1;const r0=this.animation;let{toValues:t0}=r0;const{config:n0}=r0,s0=getPayload(r0.to);!s0&&hasFluidValue(r0.to)&&(t0=toArray(getFluidValue(r0.to))),r0.values.forEach((f0,l0)=>{if(f0.done)return;const u0=f0.constructor==AnimatedString?1:s0?s0[l0].lastPosition:t0[l0];let A0=r0.immediate,c0=u0;if(!A0){if(c0=f0.lastPosition,n0.tension<=0){f0.done=!0;return}let k0=f0.elapsedTime+=e0;const d0=r0.fromValues[l0],h0=f0.v0!=null?f0.v0:f0.v0=is$2.arr(n0.velocity)?n0.velocity[l0]:n0.velocity;let b0;const p0=n0.precision||(d0==u0?.005:Math.min(1,Math.abs(u0-d0)*.001));if(is$2.und(n0.duration))if(n0.decay){const m0=n0.decay===!0?.998:n0.decay,g0=Math.exp(-(1-m0)*k0);c0=d0+h0/(1-m0)*(1-g0),A0=Math.abs(f0.lastPosition-c0)<=p0,b0=h0*g0}else{b0=f0.lastVelocity==null?h0:f0.lastVelocity;const m0=n0.restVelocity||p0/10,g0=n0.clamp?0:n0.bounce,v0=!is$2.und(g0),w0=d0==u0?f0.v0>0:d0<u0;let x0,_0=!1;const y0=1,S0=Math.ceil(e0/y0);for(let B0=0;B0<S0&&(x0=Math.abs(b0)>m0,!(!x0&&(A0=Math.abs(u0-c0)<=p0,A0)));++B0){v0&&(_0=c0==u0||c0>u0==w0,_0&&(b0=-b0*g0,c0=u0));const I0=-n0.tension*1e-6*(c0-u0),F0=-n0.friction*.001*b0,C0=(I0+F0)/n0.mass;b0=b0+C0*y0,c0=c0+b0*y0}}else{let m0=1;n0.duration>0&&(this._memoizedDuration!==n0.duration&&(this._memoizedDuration=n0.duration,f0.durationProgress>0&&(f0.elapsedTime=n0.duration*f0.durationProgress,k0=f0.elapsedTime+=e0)),m0=(n0.progress||0)+k0/this._memoizedDuration,m0=m0>1?1:m0<0?0:m0,f0.durationProgress=m0),c0=d0+n0.easing(m0)*(u0-d0),b0=(c0-f0.lastPosition)/e0,A0=m0==1}f0.lastVelocity=b0,Number.isNaN(c0)&&(console.warn("Got NaN while animating:",this),A0=!0)}s0&&!s0[l0].done&&(A0=!1),A0?f0.done=!0:_e=!1,f0.setValue(c0,n0.round)&&(i0=!0)});const o0=getAnimated(this),a0=o0.getValue();if(_e){const f0=getFluidValue(r0.to);(a0!==f0||i0)&&!n0.decay?(o0.setValue(f0),this._onChange(f0)):i0&&n0.decay&&this._onChange(a0),this._stop()}else i0&&this._onChange(a0)}set(e0){return raf$1.batchedUpdates(()=>{this._stop(),this._focus(e0),this._set(e0)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(isAnimating(this)){const{to:e0,config:_e}=this.animation;raf$1.batchedUpdates(()=>{this._onStart(),_e.decay||this._set(e0,!1),this._stop()})}return this}update(e0){return(this.queue||(this.queue=[])).push(e0),this}start(e0,_e){let i0;return is$2.und(e0)?(i0=this.queue||[],this.queue=[]):i0=[is$2.obj(e0)?e0:{..._e,to:e0}],Promise.all(i0.map(r0=>this._update(r0))).then(r0=>getCombinedResult(this,r0))}stop(e0){const{to:_e}=this.animation;return this._focus(this.get()),stopAsync(this._state,e0&&this._lastCallId),raf$1.batchedUpdates(()=>this._stop(_e,e0)),this}reset(){this._update({reset:!0})}eventObserved(e0){e0.type=="change"?this._start():e0.type=="priority"&&(this.priority=e0.priority+1)}_prepareNode(e0){const _e=this.key||"";let{to:i0,from:r0}=e0;i0=is$2.obj(i0)?i0[_e]:i0,(i0==null||isAsyncTo(i0))&&(i0=void 0),r0=is$2.obj(r0)?r0[_e]:r0,r0==null&&(r0=void 0);const t0={to:i0,from:r0};return hasAnimated(this)||(e0.reverse&&([i0,r0]=[r0,i0]),r0=getFluidValue(r0),is$2.und(r0)?getAnimated(this)||this._set(i0):this._set(r0)),t0}_update({...e0},_e){const{key:i0,defaultProps:r0}=this;e0.default&&Object.assign(r0,getDefaultProps(e0,(s0,o0)=>/^on/.test(o0)?resolveProp(s0,i0):s0)),mergeActiveFn(this,e0,"onProps"),sendEvent(this,"onProps",e0,this);const t0=this._prepareNode(e0);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const n0=this._state;return scheduleProps(++this._lastCallId,{key:i0,props:e0,defaultProps:r0,state:n0,actions:{pause:()=>{isPaused(this)||(setPausedBit(this,!0),flushCalls(n0.pauseQueue),sendEvent(this,"onPause",getFinishedResult(this,checkFinished(this,this.animation.to)),this))},resume:()=>{isPaused(this)&&(setPausedBit(this,!1),isAnimating(this)&&this._resume(),flushCalls(n0.resumeQueue),sendEvent(this,"onResume",getFinishedResult(this,checkFinished(this,this.animation.to)),this))},start:this._merge.bind(this,t0)}}).then(s0=>{if(e0.loop&&s0.finished&&!(_e&&s0.noop)){const o0=createLoopUpdate(e0);if(o0)return this._update(o0,!0)}return s0})}_merge(e0,_e,i0){if(_e.cancel)return this.stop(!0),i0(getCancelledResult(this));const r0=!is$2.und(e0.to),t0=!is$2.und(e0.from);if(r0||t0)if(_e.callId>this._lastToId)this._lastToId=_e.callId;else return i0(getCancelledResult(this));const{key:n0,defaultProps:s0,animation:o0}=this,{to:a0,from:f0}=o0;let{to:l0=a0,from:u0=f0}=e0;t0&&!r0&&(!_e.default||is$2.und(l0))&&(l0=u0),_e.reverse&&([l0,u0]=[u0,l0]);const A0=!isEqual$2(u0,f0);A0&&(o0.from=u0),u0=getFluidValue(u0);const c0=!isEqual$2(l0,a0);c0&&this._focus(l0);const k0=isAsyncTo(_e.to),{config:d0}=o0,{decay:h0,velocity:b0}=d0;(r0||t0)&&(d0.velocity=0),_e.config&&!k0&&mergeConfig(d0,callProp(_e.config,n0),_e.config!==s0.config?callProp(s0.config,n0):void 0);let p0=getAnimated(this);if(!p0||is$2.und(l0))return i0(getFinishedResult(this,!0));const m0=is$2.und(_e.reset)?t0&&!_e.default:!is$2.und(u0)&&matchProp(_e.reset,n0),g0=m0?u0:this.get(),v0=computeGoal(l0),w0=is$2.num(v0)||is$2.arr(v0)||isAnimatedString(v0),x0=!k0&&(!w0||matchProp(s0.immediate||_e.immediate,n0));if(c0){const B0=getAnimatedType(l0);if(B0!==p0.constructor)if(x0)p0=this._set(v0);else throw Error(`Cannot animate between ${p0.constructor.name} and ${B0.name}, as the "to" prop suggests`)}const _0=p0.constructor;let y0=hasFluidValue(l0),S0=!1;if(!y0){const B0=m0||!hasAnimated(this)&&A0;(c0||B0)&&(S0=isEqual$2(computeGoal(g0),v0),y0=!S0),(!isEqual$2(o0.immediate,x0)&&!x0||!isEqual$2(d0.decay,h0)||!isEqual$2(d0.velocity,b0))&&(y0=!0)}if(S0&&isAnimating(this)&&(o0.changed&&!m0?y0=!0:y0||this._stop(a0)),!k0&&((y0||hasFluidValue(a0))&&(o0.values=p0.getPayload(),o0.toValues=hasFluidValue(l0)?null:_0==AnimatedString?[1]:toArray(v0)),o0.immediate!=x0&&(o0.immediate=x0,!x0&&!m0&&this._set(a0)),y0)){const{onRest:B0}=o0;each(ACTIVE_EVENTS,F0=>mergeActiveFn(this,_e,F0));const I0=getFinishedResult(this,checkFinished(this,a0));flushCalls(this._pendingCalls,I0),this._pendingCalls.add(i0),o0.changed&&raf$1.batchedUpdates(()=>{var F0;o0.changed=!m0,B0==null||B0(I0,this),m0?callProp(s0.onRest,I0):(F0=o0.onStart)==null||F0.call(o0,I0,this)})}m0&&this._set(g0),k0?i0(runAsync(_e.to,_e,this._state,this)):y0?this._start():isAnimating(this)&&!c0?this._pendingCalls.add(i0):i0(getNoopResult(g0))}_focus(e0){const _e=this.animation;e0!==_e.to&&(getFluidObservers(this)&&this._detach(),_e.to=e0,getFluidObservers(this)&&this._attach())}_attach(){let e0=0;const{to:_e}=this.animation;hasFluidValue(_e)&&(addFluidObserver(_e,this),isFrameValue(_e)&&(e0=_e.priority+1)),this.priority=e0}_detach(){const{to:e0}=this.animation;hasFluidValue(e0)&&removeFluidObserver(e0,this)}_set(e0,_e=!0){const i0=getFluidValue(e0);if(!is$2.und(i0)){const r0=getAnimated(this);if(!r0||!isEqual$2(i0,r0.getValue())){const t0=getAnimatedType(i0);!r0||r0.constructor!=t0?setAnimated(this,t0.create(i0)):r0.setValue(i0),r0&&raf$1.batchedUpdates(()=>{this._onChange(i0,_e)})}}return getAnimated(this)}_onStart(){const e0=this.animation;e0.changed||(e0.changed=!0,sendEvent(this,"onStart",getFinishedResult(this,checkFinished(this,e0.to)),this))}_onChange(e0,_e){_e||(this._onStart(),callProp(this.animation.onChange,e0,this)),callProp(this.defaultProps.onChange,e0,this),super._onChange(e0,_e)}_start(){const e0=this.animation;getAnimated(this).reset(getFluidValue(e0.to)),e0.immediate||(e0.fromValues=e0.values.map(_e=>_e.lastPosition)),isAnimating(this)||(setActiveBit(this,!0),isPaused(this)||this._resume())}_resume(){globals_exports.skipAnimation?this.finish():frameLoop.start(this)}_stop(e0,_e){if(isAnimating(this)){setActiveBit(this,!1);const i0=this.animation;each(i0.values,t0=>{t0.done=!0}),i0.toValues&&(i0.onChange=i0.onPause=i0.onResume=void 0),callFluidObservers(this,{type:"idle",parent:this});const r0=_e?getCancelledResult(this.get()):getFinishedResult(this.get(),checkFinished(this,e0??i0.to));flushCalls(this._pendingCalls,r0),i0.changed&&(i0.changed=!1,sendEvent(this,"onRest",r0,this))}}};function checkFinished(e0,_e){const i0=computeGoal(_e),r0=computeGoal(e0.get());return isEqual$2(r0,i0)}function createLoopUpdate(e0,_e=e0.loop,i0=e0.to){const r0=callProp(_e);if(r0){const t0=r0!==!0&&inferTo(r0),n0=(t0||e0).reverse,s0=!t0||t0.reset;return createUpdate({...e0,loop:_e,default:!1,pause:void 0,to:!n0||isAsyncTo(i0)?i0:void 0,from:s0?e0.from:void 0,reset:s0,...t0})}}function createUpdate(e0){const{to:_e,from:i0}=e0=inferTo(e0),r0=new Set;return is$2.obj(_e)&&findDefined(_e,r0),is$2.obj(i0)&&findDefined(i0,r0),e0.keys=r0.size?Array.from(r0):null,e0}function declareUpdate(e0){const _e=createUpdate(e0);return is$2.und(_e.default)&&(_e.default=getDefaultProps(_e)),_e}function findDefined(e0,_e){eachProp(e0,(i0,r0)=>i0!=null&&_e.add(r0))}var ACTIVE_EVENTS=["onStart","onRest","onChange","onPause","onResume"];function mergeActiveFn(e0,_e,i0){e0.animation[i0]=_e[i0]!==getDefaultProp(_e,i0)?resolveProp(_e[i0],e0.key):void 0}function sendEvent(e0,_e,...i0){var r0,t0,n0,s0;(t0=(r0=e0.animation)[_e])==null||t0.call(r0,...i0),(s0=(n0=e0.defaultProps)[_e])==null||s0.call(n0,...i0)}var BATCHED_EVENTS=["onStart","onChange","onRest"],nextId2=1,Controller$1=class{constructor(_e,i0){this.id=nextId2++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),i0&&(this._flush=i0),_e&&this.start({default:!0,..._e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(_e=>_e.idle&&!_e.isDelayed&&!_e.isPaused)}get item(){return this._item}set item(_e){this._item=_e}get(){const _e={};return this.each((i0,r0)=>_e[r0]=i0.get()),_e}set(_e){for(const i0 in _e){const r0=_e[i0];is$2.und(r0)||this.springs[i0].set(r0)}}update(_e){return _e&&this.queue.push(createUpdate(_e)),this}start(_e){let{queue:i0}=this;return _e?i0=toArray(_e).map(createUpdate):this.queue=[],this._flush?this._flush(this,i0):(prepareKeys(this,i0),flushUpdateQueue(this,i0))}stop(_e,i0){if(_e!==!!_e&&(i0=_e),i0){const r0=this.springs;each(toArray(i0),t0=>r0[t0].stop(!!_e))}else stopAsync(this._state,this._lastAsyncId),this.each(r0=>r0.stop(!!_e));return this}pause(_e){if(is$2.und(_e))this.start({pause:!0});else{const i0=this.springs;each(toArray(_e),r0=>i0[r0].pause())}return this}resume(_e){if(is$2.und(_e))this.start({pause:!1});else{const i0=this.springs;each(toArray(_e),r0=>i0[r0].resume())}return this}each(_e){eachProp(this.springs,_e)}_onFrame(){const{onStart:_e,onChange:i0,onRest:r0}=this._events,t0=this._active.size>0,n0=this._changed.size>0;(t0&&!this._started||n0&&!this._started)&&(this._started=!0,flush(_e,([a0,f0])=>{f0.value=this.get(),a0(f0,this,this._item)}));const s0=!t0&&this._started,o0=n0||s0&&r0.size?this.get():null;n0&&i0.size&&flush(i0,([a0,f0])=>{f0.value=o0,a0(f0,this,this._item)}),s0&&(this._started=!1,flush(r0,([a0,f0])=>{f0.value=o0,a0(f0,this,this._item)}))}eventObserved(_e){if(_e.type=="change")this._changed.add(_e.parent),_e.idle||this._active.add(_e.parent);else if(_e.type=="idle")this._active.delete(_e.parent);else return;raf$1.onFrame(this._onFrame)}};function flushUpdateQueue(e0,_e){return Promise.all(_e.map(i0=>flushUpdate(e0,i0))).then(i0=>getCombinedResult(e0,i0))}async function flushUpdate(e0,_e,i0){const{keys:r0,to:t0,from:n0,loop:s0,onRest:o0,onResolve:a0}=_e,f0=is$2.obj(_e.default)&&_e.default;s0&&(_e.loop=!1),t0===!1&&(_e.to=null),n0===!1&&(_e.from=null);const l0=is$2.arr(t0)||is$2.fun(t0)?t0:void 0;l0?(_e.to=void 0,_e.onRest=void 0,f0&&(f0.onRest=void 0)):each(BATCHED_EVENTS,d0=>{const h0=_e[d0];if(is$2.fun(h0)){const b0=e0._events[d0];_e[d0]=({finished:p0,cancelled:m0})=>{const g0=b0.get(h0);g0?(p0||(g0.finished=!1),m0&&(g0.cancelled=!0)):b0.set(h0,{value:null,finished:p0||!1,cancelled:m0||!1})},f0&&(f0[d0]=_e[d0])}});const u0=e0._state;_e.pause===!u0.paused?(u0.paused=_e.pause,flushCalls(_e.pause?u0.pauseQueue:u0.resumeQueue)):u0.paused&&(_e.pause=!0);const A0=(r0||Object.keys(e0.springs)).map(d0=>e0.springs[d0].start(_e)),c0=_e.cancel===!0||getDefaultProp(_e,"cancel")===!0;(l0||c0&&u0.asyncId)&&A0.push(scheduleProps(++e0._lastAsyncId,{props:_e,state:u0,actions:{pause:noop$3,resume:noop$3,start(d0,h0){c0?(stopAsync(u0,e0._lastAsyncId),h0(getCancelledResult(e0))):(d0.onRest=o0,h0(runAsync(l0,d0,u0,e0)))}}})),u0.paused&&await new Promise(d0=>{u0.resumeQueue.add(d0)});const k0=getCombinedResult(e0,await Promise.all(A0));if(s0&&k0.finished&&!(i0&&k0.noop)){const d0=createLoopUpdate(_e,s0,t0);if(d0)return prepareKeys(e0,[d0]),flushUpdate(e0,d0,!0)}return a0&&raf$1.batchedUpdates(()=>a0(k0,e0,e0.item)),k0}function getSprings(e0,_e){const i0={...e0.springs};return _e&&each(toArray(_e),r0=>{is$2.und(r0.keys)&&(r0=createUpdate(r0)),is$2.obj(r0.to)||(r0={...r0,to:void 0}),prepareSprings(i0,r0,t0=>createSpring(t0))}),setSprings(e0,i0),i0}function setSprings(e0,_e){eachProp(_e,(i0,r0)=>{e0.springs[r0]||(e0.springs[r0]=i0,addFluidObserver(i0,e0))})}function createSpring(e0,_e){const i0=new SpringValue;return i0.key=e0,_e&&addFluidObserver(i0,_e),i0}function prepareSprings(e0,_e,i0){_e.keys&&each(_e.keys,r0=>{(e0[r0]||(e0[r0]=i0(r0)))._prepareNode(_e)})}function prepareKeys(e0,_e){each(_e,i0=>{prepareSprings(e0.springs,i0,r0=>createSpring(r0,e0))})}var SpringContext=({children:e0,..._e})=>{const i0=reactExports.useContext(ctx),r0=_e.pause||!!i0.pause,t0=_e.immediate||!!i0.immediate;_e=useMemoOne(()=>({pause:r0,immediate:t0}),[r0,t0]);const{Provider:n0}=ctx;return reactExports.createElement(n0,{value:_e},e0)},ctx=makeContext(SpringContext,{});SpringContext.Provider=ctx.Provider;SpringContext.Consumer=ctx.Consumer;function makeContext(e0,_e){return Object.assign(e0,reactExports.createContext(_e)),e0.Provider._context=e0,e0.Consumer._context=e0,e0}var SpringRef=()=>{const e0=[],_e=function(r0){deprecateDirectCall();const t0=[];return each(e0,(n0,s0)=>{if(is$2.und(r0))t0.push(n0.start());else{const o0=i0(r0,n0,s0);o0&&t0.push(n0.start(o0))}}),t0};_e.current=e0,_e.add=function(r0){e0.includes(r0)||e0.push(r0)},_e.delete=function(r0){const t0=e0.indexOf(r0);~t0&&e0.splice(t0,1)},_e.pause=function(){return each(e0,r0=>r0.pause(...arguments)),this},_e.resume=function(){return each(e0,r0=>r0.resume(...arguments)),this},_e.set=function(r0){each(e0,(t0,n0)=>{const s0=is$2.fun(r0)?r0(n0,t0):r0;s0&&t0.set(s0)})},_e.start=function(r0){const t0=[];return each(e0,(n0,s0)=>{if(is$2.und(r0))t0.push(n0.start());else{const o0=this._getProps(r0,n0,s0);o0&&t0.push(n0.start(o0))}}),t0},_e.stop=function(){return each(e0,r0=>r0.stop(...arguments)),this},_e.update=function(r0){return each(e0,(t0,n0)=>t0.update(this._getProps(r0,t0,n0))),this};const i0=function(r0,t0,n0){return is$2.fun(r0)?r0(n0,t0):r0};return _e._getProps=i0,_e};function useSprings(e0,_e,i0){const r0=is$2.fun(_e)&&_e;r0&&!i0&&(i0=[]);const t0=reactExports.useMemo(()=>r0||arguments.length==3?SpringRef():void 0,[]),n0=reactExports.useRef(0),s0=useForceUpdate(),o0=reactExports.useMemo(()=>({ctrls:[],queue:[],flush(b0,p0){const m0=getSprings(b0,p0);return n0.current>0&&!o0.queue.length&&!Object.keys(m0).some(v0=>!b0.springs[v0])?flushUpdateQueue(b0,p0):new Promise(v0=>{setSprings(b0,m0),o0.queue.push(()=>{v0(flushUpdateQueue(b0,p0))}),s0()})}}),[]),a0=reactExports.useRef([...o0.ctrls]),f0=[],l0=usePrev(e0)||0;reactExports.useMemo(()=>{each(a0.current.slice(e0,l0),b0=>{detachRefs(b0,t0),b0.stop(!0)}),a0.current.length=e0,u0(l0,e0)},[e0]),reactExports.useMemo(()=>{u0(0,Math.min(l0,e0))},i0);function u0(b0,p0){for(let m0=b0;m0<p0;m0++){const g0=a0.current[m0]||(a0.current[m0]=new Controller$1(null,o0.flush)),v0=r0?r0(m0,g0):_e[m0];v0&&(f0[m0]=declareUpdate(v0))}}const A0=a0.current.map((b0,p0)=>getSprings(b0,f0[p0])),c0=reactExports.useContext(SpringContext),k0=usePrev(c0),d0=c0!==k0&&hasProps(c0);useIsomorphicLayoutEffect$6(()=>{n0.current++,o0.ctrls=a0.current;const{queue:b0}=o0;b0.length&&(o0.queue=[],each(b0,p0=>p0())),each(a0.current,(p0,m0)=>{t0==null||t0.add(p0),d0&&p0.start({default:c0});const g0=f0[m0];g0&&(replaceRef(p0,g0.ref),p0.ref?p0.queue.push(g0):p0.start(g0))})}),useOnce(()=>()=>{each(o0.ctrls,b0=>b0.stop(!0))});const h0=A0.map(b0=>({...b0}));return t0?[h0,t0]:h0}function useSpring(e0,_e){const i0=is$2.fun(e0),[[r0],t0]=useSprings(1,i0?e0:[e0],i0?[]:_e);return i0||arguments.length==2?[r0,t0]:r0}function useTransition(e0,_e,i0){const r0=is$2.fun(_e)&&_e,{reset:t0,sort:n0,trail:s0=0,expires:o0=!0,exitBeforeEnter:a0=!1,onDestroyed:f0,ref:l0,config:u0}=r0?r0():_e,A0=reactExports.useMemo(()=>r0||arguments.length==3?SpringRef():void 0,[]),c0=toArray(e0),k0=[],d0=reactExports.useRef(null),h0=t0?null:d0.current;useIsomorphicLayoutEffect$6(()=>{d0.current=k0}),useOnce(()=>(each(k0,C0=>{A0==null||A0.add(C0.ctrl),C0.ctrl.ref=A0}),()=>{each(d0.current,C0=>{C0.expired&&clearTimeout(C0.expirationId),detachRefs(C0.ctrl,A0),C0.ctrl.stop(!0)})}));const b0=getKeys(c0,r0?r0():_e,h0),p0=t0&&d0.current||[];useIsomorphicLayoutEffect$6(()=>each(p0,({ctrl:C0,item:E0,key:R0})=>{detachRefs(C0,A0),callProp(f0,E0,R0)}));const m0=[];if(h0&&each(h0,(C0,E0)=>{C0.expired?(clearTimeout(C0.expirationId),p0.push(C0)):(E0=m0[E0]=b0.indexOf(C0.key),~E0&&(k0[E0]=C0))}),each(c0,(C0,E0)=>{k0[E0]||(k0[E0]={key:b0[E0],item:C0,phase:"mount",ctrl:new Controller$1},k0[E0].ctrl.item=C0)}),m0.length){let C0=-1;const{leave:E0}=r0?r0():_e;each(m0,(R0,M0)=>{const T0=h0[M0];~R0?(C0=k0.indexOf(T0),k0[C0]={...T0,item:c0[R0]}):E0&&k0.splice(++C0,0,T0)})}is$2.fun(n0)&&k0.sort((C0,E0)=>n0(C0.item,E0.item));let g0=-s0;const v0=useForceUpdate(),w0=getDefaultProps(_e),x0=new Map,_0=reactExports.useRef(new Map),y0=reactExports.useRef(!1);each(k0,(C0,E0)=>{const R0=C0.key,M0=C0.phase,T0=r0?r0():_e;let G0,j0;const N0=callProp(T0.delay||0,R0);if(M0=="mount")G0=T0.enter,j0="enter";else{const $0=b0.indexOf(R0)<0;if(M0!="leave")if($0)G0=T0.leave,j0="leave";else if(G0=T0.update)j0="update";else return;else if(!$0)G0=T0.enter,j0="enter";else return}if(G0=callProp(G0,C0.item,E0),G0=is$2.obj(G0)?inferTo(G0):{to:G0},!G0.config){const $0=u0||w0.config;G0.config=callProp($0,C0.item,E0,j0)}g0+=s0;const O0={...w0,delay:N0+g0,ref:l0,immediate:T0.immediate,reset:!1,...G0};if(j0=="enter"&&is$2.und(O0.from)){const $0=r0?r0():_e,z0=is$2.und($0.initial)||h0?$0.from:$0.initial;O0.from=callProp(z0,C0.item,E0)}const{onResolve:Y0}=O0;O0.onResolve=$0=>{callProp(Y0,$0);const z0=d0.current,K0=z0.find(e2=>e2.key===R0);if(K0&&!($0.cancelled&&K0.phase!="update")&&K0.ctrl.idle){const e2=z0.every(J0=>J0.ctrl.idle);if(K0.phase=="leave"){const J0=callProp(o0,K0.item);if(J0!==!1){const _i=J0===!0?0:J0;if(K0.expired=!0,!e2&&_i>0){_i<=2147483647&&(K0.expirationId=setTimeout(v0,_i));return}}}e2&&z0.some(J0=>J0.expired)&&(_0.current.delete(K0),a0&&(y0.current=!0),v0())}};const D0=getSprings(C0.ctrl,O0);j0==="leave"&&a0?_0.current.set(C0,{phase:j0,springs:D0,payload:O0}):x0.set(C0,{phase:j0,springs:D0,payload:O0})});const S0=reactExports.useContext(SpringContext),B0=usePrev(S0),I0=S0!==B0&&hasProps(S0);useIsomorphicLayoutEffect$6(()=>{I0&&each(k0,C0=>{C0.ctrl.start({default:S0})})},[S0]),each(x0,(C0,E0)=>{if(_0.current.size){const R0=k0.findIndex(M0=>M0.key===E0.key);k0.splice(R0,1)}}),useIsomorphicLayoutEffect$6(()=>{each(_0.current.size?_0.current:x0,({phase:C0,payload:E0},R0)=>{const{ctrl:M0}=R0;R0.phase=C0,A0==null||A0.add(M0),I0&&C0=="enter"&&M0.start({default:S0}),E0&&(replaceRef(M0,E0.ref),(M0.ref||A0)&&!y0.current?M0.update(E0):(M0.start(E0),y0.current&&(y0.current=!1)))})},t0?void 0:i0);const F0=C0=>reactExports.createElement(reactExports.Fragment,null,k0.map((E0,R0)=>{const{springs:M0}=x0.get(E0)||E0.ctrl,T0=C0({...M0},E0.item,E0,R0);return T0&&T0.type?reactExports.createElement(T0.type,{...T0.props,key:is$2.str(E0.key)||is$2.num(E0.key)?E0.key:E0.ctrl.id,ref:T0.ref}):T0}));return A0?[F0,A0]:F0}var nextKey=1;function getKeys(e0,{key:_e,keys:i0=_e},r0){if(i0===null){const t0=new Set;return e0.map(n0=>{const s0=r0&&r0.find(o0=>o0.item===n0&&o0.phase!=="leave"&&!t0.has(o0));return s0?(t0.add(s0),s0.key):nextKey++})}return is$2.und(i0)?e0:is$2.fun(i0)?e0.map(i0):toArray(i0)}var Interpolation=class extends FrameValue{constructor(e0,_e){super(),this.source=e0,this.idle=!0,this._active=new Set,this.calc=createInterpolator(..._e);const i0=this._get(),r0=getAnimatedType(i0);setAnimated(this,r0.create(i0))}advance(e0){const _e=this._get(),i0=this.get();isEqual$2(_e,i0)||(getAnimated(this).setValue(_e),this._onChange(_e,this.idle)),!this.idle&&checkIdle(this._active)&&becomeIdle(this)}_get(){const e0=is$2.arr(this.source)?this.source.map(getFluidValue):toArray(getFluidValue(this.source));return this.calc(...e0)}_start(){this.idle&&!checkIdle(this._active)&&(this.idle=!1,each(getPayload(this),e0=>{e0.done=!1}),globals_exports.skipAnimation?(raf$1.batchedUpdates(()=>this.advance()),becomeIdle(this)):frameLoop.start(this))}_attach(){let e0=1;each(toArray(this.source),_e=>{hasFluidValue(_e)&&addFluidObserver(_e,this),isFrameValue(_e)&&(_e.idle||this._active.add(_e),e0=Math.max(e0,_e.priority+1))}),this.priority=e0,this._start()}_detach(){each(toArray(this.source),e0=>{hasFluidValue(e0)&&removeFluidObserver(e0,this)}),this._active.clear(),becomeIdle(this)}eventObserved(e0){e0.type=="change"?e0.idle?this.advance():(this._active.add(e0.parent),this._start()):e0.type=="idle"?this._active.delete(e0.parent):e0.type=="priority"&&(this.priority=toArray(this.source).reduce((_e,i0)=>Math.max(_e,(isFrameValue(i0)?i0.priority:0)+1),0))}};function isIdle(e0){return e0.idle!==!1}function checkIdle(e0){return!e0.size||Array.from(e0).every(isIdle)}function becomeIdle(e0){e0.idle||(e0.idle=!0,each(getPayload(e0),_e=>{_e.done=!0}),callFluidObservers(e0,{type:"idle",parent:e0}))}globals_exports.assign({createStringInterpolator:createStringInterpolator2,to:(e0,_e)=>new Interpolation(e0,_e)});var isCustomPropRE=/^--/;function dangerousStyleValue(e0,_e){return _e==null||typeof _e=="boolean"||_e===""?"":typeof _e=="number"&&_e!==0&&!isCustomPropRE.test(e0)&&!(isUnitlessNumber.hasOwnProperty(e0)&&isUnitlessNumber[e0])?_e+"px":(""+_e).trim()}var attributeCache={};function applyAnimatedValues(e0,_e){if(!e0.nodeType||!e0.setAttribute)return!1;const i0=e0.nodeName==="filter"||e0.parentNode&&e0.parentNode.nodeName==="filter",{className:r0,style:t0,children:n0,scrollTop:s0,scrollLeft:o0,viewBox:a0,...f0}=_e,l0=Object.values(f0),u0=Object.keys(f0).map(A0=>i0||e0.hasAttribute(A0)?A0:attributeCache[A0]||(attributeCache[A0]=A0.replace(/([A-Z])/g,c0=>"-"+c0.toLowerCase())));n0!==void 0&&(e0.textContent=n0);for(const A0 in t0)if(t0.hasOwnProperty(A0)){const c0=dangerousStyleValue(A0,t0[A0]);isCustomPropRE.test(A0)?e0.style.setProperty(A0,c0):e0.style[A0]=c0}u0.forEach((A0,c0)=>{e0.setAttribute(A0,l0[c0])}),r0!==void 0&&(e0.className=r0),s0!==void 0&&(e0.scrollTop=s0),o0!==void 0&&(e0.scrollLeft=o0),a0!==void 0&&e0.setAttribute("viewBox",a0)}var isUnitlessNumber={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},prefixKey=(e0,_e)=>e0+_e.charAt(0).toUpperCase()+_e.substring(1),prefixes=["Webkit","Ms","Moz","O"];isUnitlessNumber=Object.keys(isUnitlessNumber).reduce((e0,_e)=>(prefixes.forEach(i0=>e0[prefixKey(i0,_e)]=e0[_e]),e0),isUnitlessNumber);var domTransforms=/^(matrix|translate|scale|rotate|skew)/,pxTransforms=/^(translate)/,degTransforms=/^(rotate|skew)/,addUnit=(e0,_e)=>is$2.num(e0)&&e0!==0?e0+_e:e0,isValueIdentity=(e0,_e)=>is$2.arr(e0)?e0.every(i0=>isValueIdentity(i0,_e)):is$2.num(e0)?e0===_e:parseFloat(e0)===_e,AnimatedStyle=class extends AnimatedObject{constructor({x:e0,y:_e,z:i0,...r0}){const t0=[],n0=[];(e0||_e||i0)&&(t0.push([e0||0,_e||0,i0||0]),n0.push(s0=>[`translate3d(${s0.map(o0=>addUnit(o0,"px")).join(",")})`,isValueIdentity(s0,0)])),eachProp(r0,(s0,o0)=>{if(o0==="transform")t0.push([s0||""]),n0.push(a0=>[a0,a0===""]);else if(domTransforms.test(o0)){if(delete r0[o0],is$2.und(s0))return;const a0=pxTransforms.test(o0)?"px":degTransforms.test(o0)?"deg":"";t0.push(toArray(s0)),n0.push(o0==="rotate3d"?([f0,l0,u0,A0])=>[`rotate3d(${f0},${l0},${u0},${addUnit(A0,a0)})`,isValueIdentity(A0,0)]:f0=>[`${o0}(${f0.map(l0=>addUnit(l0,a0)).join(",")})`,isValueIdentity(f0,o0.startsWith("scale")?1:0)])}}),t0.length&&(r0.transform=new FluidTransform(t0,n0)),super(r0)}},FluidTransform=class extends FluidValue{constructor(e0,_e){super(),this.inputs=e0,this.transforms=_e,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e0="",_e=!0;return each(this.inputs,(i0,r0)=>{const t0=getFluidValue(i0[0]),[n0,s0]=this.transforms[r0](is$2.arr(t0)?t0:i0.map(getFluidValue));e0+=" "+n0,_e=_e&&s0}),_e?"none":e0}observerAdded(e0){e0==1&&each(this.inputs,_e=>each(_e,i0=>hasFluidValue(i0)&&addFluidObserver(i0,this)))}observerRemoved(e0){e0==0&&each(this.inputs,_e=>each(_e,i0=>hasFluidValue(i0)&&removeFluidObserver(i0,this)))}eventObserved(e0){e0.type=="change"&&(this._value=null),callFluidObservers(this,e0)}},primitives=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];globals_exports.assign({batchedUpdates:reactDomExports.unstable_batchedUpdates,createStringInterpolator:createStringInterpolator2,colors:colors2});var host=createHost(primitives,{applyAnimatedValues,createAnimatedStyle:e0=>new AnimatedStyle(e0),getComponentProps:({scrollTop:e0,scrollLeft:_e,...i0})=>i0}),animated=host.animated,Root$5=reactExports.forwardRef(({id:e0,isOpen:_e,onModalClose:i0,size:r0="md",viewport:t0=!1,scrollable:n0=!1,focusId:s0,children:o0,...a0},f0)=>{let l0=`aria_label_${e0}`,u0=`aria_desc_${e0}`,A0=useClickOutside(i0),c0=useTrapFocus(_e);useKeyPress(i0,["Escape"]),reactExports.useEffect(()=>{var p0;return _e&&(document.body.style.overflow="hidden",s0&&((p0=document.getElementById(s0))==null||p0.focus())),()=>{document.body.style.overflow=""}},[s0,_e]);let k0=clsx("modal fade",{"show d-block":_e,"modal-scrollable":n0,viewport:t0,[`modal-${r0}`]:r0}),d0=clsx("modal-dialog"),h0={ariaLabelId:l0,ariaDescriptionId:u0,focusId:s0},b0=useTransition(_e,{from:{x:-50,opacity:0},enter:{x:0,opacity:1},leave:{x:50,opacity:0}});return jsxRuntimeExports.jsx(ModalContext.Provider,{value:h0,children:b0((p0,m0)=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[m0&&jsxRuntimeExports.jsx(animated.div,{id:e0,ref:f0,role:"dialog","aria-modal":"true","aria-labelledby":l0,"aria-describedby":u0,className:k0,style:p0,tabIndex:-1,...a0,children:jsxRuntimeExports.jsx("div",{id:`${e0}_ref`,ref:g0=>{A0.current=g0,m0&&(c0.current=g0)},className:d0,children:jsxRuntimeExports.jsx("div",{className:"modal-content",children:o0})})}),m0&&jsxRuntimeExports.jsx(animated.div,{className:"modal-backdrop fade show",style:{opacity:.65}})]}))})}),Modal=Object.assign(Root$5,{Header:ModalHeader,Subtitle:ModalSubtitle,Body:ModalBody,Footer:ModalFooter});function usePreferences(e0){return{getPreference:async()=>await odeServices.conf().getPreference(e0),savePreference:async _e=>await odeServices.conf().savePreference(e0,JSON.stringify(_e))}}var useOnboardingModal=(e0,_e)=>{let i0=reactExports.useRef(),[r0,t0]=reactExports.useState(!1),[n0,s0]=reactExports.useState(!1),{getPreference:o0,savePreference:a0}=usePreferences(e0);return reactExports.useEffect(()=>{(async()=>{let f0=await o0();if(f0)if(_e){let{display:l0,nextState:u0}=_e(f0.key);t0(l0),s0(l0),i0.current=u0}else f0.key===!0&&t0(!0),s0(!!f0.key),i0.current=void 0;else t0(!0),s0(!0),i0.current=void 0})()},[]),{isOpen:r0,setIsOpen:t0,isOnboarding:n0,handleSavePreference:reactExports.useCallback(async()=>{await a0({key:i0.current}),t0(!1),s0(!1)},[a0,t0,s0])}};function useImage({src:e0,placeholder:_e}){let[i0,r0]=reactExports.useState(e0||_e),t0=reactExports.useCallback(()=>{r0(_e)},[_e]);return reactExports.useEffect(()=>{r0(e0)},[e0]),{imgSrc:i0,onError:t0}}const commonPlaceholder="/assets/js/ode-explorer/image-placeholder.png";var Image$1=reactExports.forwardRef(({src:e0,alt:_e,imgPlaceholder:i0,ratio:r0,objectFit:t0,className:n0,onError:s0,...o0},a0)=>{let{imgSrc:f0,onError:l0}=useImage({src:e0,placeholder:i0??commonPlaceholder}),u0=h0=>{l0(),s0==null||s0(h0)},A0={"ratio ratio-1x1":r0==="1","ratio ratio-4x3":r0==="4","ratio ratio-16x9":r0==="16","ratio ratio-21x9":r0==="21"},c0={"object-fit-contain":t0==="contain","object-fit-cover":t0==="cover","object-fit-fill":t0==="fill","object-fit-scale":t0==="scale","object-fit-none":t0==="none"},k0=clsx({...A0}),d0=jsxRuntimeExports.jsx("img",{alt:_e,onError:u0,ref:a0,src:f0,className:clsx({...c0},n0),...o0});return r0?jsxRuntimeExports.jsx("div",{className:k0,children:d0}):d0});function isObject$4(e0){return e0!==null&&typeof e0=="object"&&"constructor"in e0&&e0.constructor===Object}function extend$2(e0,_e){e0===void 0&&(e0={}),_e===void 0&&(_e={}),Object.keys(_e).forEach(i0=>{typeof e0[i0]>"u"?e0[i0]=_e[i0]:isObject$4(_e[i0])&&isObject$4(e0[i0])&&Object.keys(_e[i0]).length>0&&extend$2(e0[i0],_e[i0])})}const ssrDocument={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function getDocument(){const e0=typeof document<"u"?document:{};return extend$2(e0,ssrDocument),e0}const ssrWindow={document:ssrDocument,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function e0(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e0){return typeof setTimeout>"u"?(e0(),null):setTimeout(e0,0)},cancelAnimationFrame(e0){typeof setTimeout>"u"||clearTimeout(e0)}};function getWindow$2(){const e0=typeof window<"u"?window:{};return extend$2(e0,ssrWindow),e0}function deleteProps(e0){const _e=e0;Object.keys(_e).forEach(i0=>{try{_e[i0]=null}catch{}try{delete _e[i0]}catch{}})}function nextTick(e0,_e){return _e===void 0&&(_e=0),setTimeout(e0,_e)}function now(){return Date.now()}function getComputedStyle$2(e0){const _e=getWindow$2();let i0;return _e.getComputedStyle&&(i0=_e.getComputedStyle(e0,null)),!i0&&e0.currentStyle&&(i0=e0.currentStyle),i0||(i0=e0.style),i0}function getTranslate(e0,_e){_e===void 0&&(_e="x");const i0=getWindow$2();let r0,t0,n0;const s0=getComputedStyle$2(e0);return i0.WebKitCSSMatrix?(t0=s0.transform||s0.webkitTransform,t0.split(",").length>6&&(t0=t0.split(", ").map(o0=>o0.replace(",",".")).join(", ")),n0=new i0.WebKitCSSMatrix(t0==="none"?"":t0)):(n0=s0.MozTransform||s0.OTransform||s0.MsTransform||s0.msTransform||s0.transform||s0.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r0=n0.toString().split(",")),_e==="x"&&(i0.WebKitCSSMatrix?t0=n0.m41:r0.length===16?t0=parseFloat(r0[12]):t0=parseFloat(r0[4])),_e==="y"&&(i0.WebKitCSSMatrix?t0=n0.m42:r0.length===16?t0=parseFloat(r0[13]):t0=parseFloat(r0[5])),t0||0}function isObject$3(e0){return typeof e0=="object"&&e0!==null&&e0.constructor&&Object.prototype.toString.call(e0).slice(8,-1)==="Object"}function isNode$1(e0){return typeof window<"u"&&typeof window.HTMLElement<"u"?e0 instanceof HTMLElement:e0&&(e0.nodeType===1||e0.nodeType===11)}function extend$1(){const e0=Object(arguments.length<=0?void 0:arguments[0]),_e=["__proto__","constructor","prototype"];for(let i0=1;i0<arguments.length;i0+=1){const r0=i0<0||arguments.length<=i0?void 0:arguments[i0];if(r0!=null&&!isNode$1(r0)){const t0=Object.keys(Object(r0)).filter(n0=>_e.indexOf(n0)<0);for(let n0=0,s0=t0.length;n0<s0;n0+=1){const o0=t0[n0],a0=Object.getOwnPropertyDescriptor(r0,o0);a0!==void 0&&a0.enumerable&&(isObject$3(e0[o0])&&isObject$3(r0[o0])?r0[o0].__swiper__?e0[o0]=r0[o0]:extend$1(e0[o0],r0[o0]):!isObject$3(e0[o0])&&isObject$3(r0[o0])?(e0[o0]={},r0[o0].__swiper__?e0[o0]=r0[o0]:extend$1(e0[o0],r0[o0])):e0[o0]=r0[o0])}}}return e0}function setCSSProperty(e0,_e,i0){e0.style.setProperty(_e,i0)}function animateCSSModeScroll(e0){let{swiper:_e,targetPosition:i0,side:r0}=e0;const t0=getWindow$2(),n0=-_e.translate;let s0=null,o0;const a0=_e.params.speed;_e.wrapperEl.style.scrollSnapType="none",t0.cancelAnimationFrame(_e.cssModeFrameID);const f0=i0>n0?"next":"prev",l0=(A0,c0)=>f0==="next"&&A0>=c0||f0==="prev"&&A0<=c0,u0=()=>{o0=new Date().getTime(),s0===null&&(s0=o0);const A0=Math.max(Math.min((o0-s0)/a0,1),0),c0=.5-Math.cos(A0*Math.PI)/2;let k0=n0+c0*(i0-n0);if(l0(k0,i0)&&(k0=i0),_e.wrapperEl.scrollTo({[r0]:k0}),l0(k0,i0)){_e.wrapperEl.style.overflow="hidden",_e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{_e.wrapperEl.style.overflow="",_e.wrapperEl.scrollTo({[r0]:k0})}),t0.cancelAnimationFrame(_e.cssModeFrameID);return}_e.cssModeFrameID=t0.requestAnimationFrame(u0)};u0()}function elementChildren(e0,_e){return _e===void 0&&(_e=""),[...e0.children].filter(i0=>i0.matches(_e))}function createElement(e0,_e){_e===void 0&&(_e=[]);const i0=document.createElement(e0);return i0.classList.add(...Array.isArray(_e)?_e:[_e]),i0}function elementPrevAll(e0,_e){const i0=[];for(;e0.previousElementSibling;){const r0=e0.previousElementSibling;_e?r0.matches(_e)&&i0.push(r0):i0.push(r0),e0=r0}return i0}function elementNextAll(e0,_e){const i0=[];for(;e0.nextElementSibling;){const r0=e0.nextElementSibling;_e?r0.matches(_e)&&i0.push(r0):i0.push(r0),e0=r0}return i0}function elementStyle(e0,_e){return getWindow$2().getComputedStyle(e0,null).getPropertyValue(_e)}function elementIndex(e0){let _e=e0,i0;if(_e){for(i0=0;(_e=_e.previousSibling)!==null;)_e.nodeType===1&&(i0+=1);return i0}}function elementParents(e0,_e){const i0=[];let r0=e0.parentElement;for(;r0;)_e?r0.matches(_e)&&i0.push(r0):i0.push(r0),r0=r0.parentElement;return i0}function elementOuterSize(e0,_e,i0){const r0=getWindow$2();return e0[_e==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r0.getComputedStyle(e0,null).getPropertyValue(_e==="width"?"margin-right":"margin-top"))+parseFloat(r0.getComputedStyle(e0,null).getPropertyValue(_e==="width"?"margin-left":"margin-bottom"))}function createElementIfNotDefined(e0,_e,i0,r0){return e0.params.createElements&&Object.keys(r0).forEach(t0=>{if(!i0[t0]&&i0.auto===!0){let n0=elementChildren(e0.el,`.${r0[t0]}`)[0];n0||(n0=createElement("div",r0[t0]),n0.className=r0[t0],e0.el.append(n0)),i0[t0]=n0,_e[t0]=n0}}),i0}function classesToSelector(e0){return e0===void 0&&(e0=""),`.${e0.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function Pagination(e0){let{swiper:_e,extendParams:i0,on:r0,emit:t0}=e0;const n0="swiper-pagination";i0({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:p0=>p0,formatFractionTotal:p0=>p0,bulletClass:`${n0}-bullet`,bulletActiveClass:`${n0}-bullet-active`,modifierClass:`${n0}-`,currentClass:`${n0}-current`,totalClass:`${n0}-total`,hiddenClass:`${n0}-hidden`,progressbarFillClass:`${n0}-progressbar-fill`,progressbarOppositeClass:`${n0}-progressbar-opposite`,clickableClass:`${n0}-clickable`,lockClass:`${n0}-lock`,horizontalClass:`${n0}-horizontal`,verticalClass:`${n0}-vertical`,paginationDisabledClass:`${n0}-disabled`}}),_e.pagination={el:null,bullets:[]};let s0,o0=0;const a0=p0=>(Array.isArray(p0)?p0:[p0]).filter(m0=>!!m0);function f0(){return!_e.params.pagination.el||!_e.pagination.el||Array.isArray(_e.pagination.el)&&_e.pagination.el.length===0}function l0(p0,m0){const{bulletActiveClass:g0}=_e.params.pagination;p0&&(p0=p0[`${m0==="prev"?"previous":"next"}ElementSibling`],p0&&(p0.classList.add(`${g0}-${m0}`),p0=p0[`${m0==="prev"?"previous":"next"}ElementSibling`],p0&&p0.classList.add(`${g0}-${m0}-${m0}`)))}function u0(p0){const m0=p0.target.closest(classesToSelector(_e.params.pagination.bulletClass));if(!m0)return;p0.preventDefault();const g0=elementIndex(m0)*_e.params.slidesPerGroup;if(_e.params.loop){if(_e.realIndex===g0)return;const v0=_e.getSlideIndexByData(g0),w0=_e.getSlideIndexByData(_e.realIndex);v0>_e.slides.length-_e.loopedSlides&&_e.loopFix({direction:v0>w0?"next":"prev",activeSlideIndex:v0,slideTo:!1}),_e.slideToLoop(g0)}else _e.slideTo(g0)}function A0(){const p0=_e.rtl,m0=_e.params.pagination;if(f0())return;let g0=_e.pagination.el;g0=a0(g0);let v0,w0;const x0=_e.virtual&&_e.params.virtual.enabled?_e.virtual.slides.length:_e.slides.length,_0=_e.params.loop?Math.ceil(x0/_e.params.slidesPerGroup):_e.snapGrid.length;if(_e.params.loop?(w0=_e.previousRealIndex||0,v0=_e.params.slidesPerGroup>1?Math.floor(_e.realIndex/_e.params.slidesPerGroup):_e.realIndex):typeof _e.snapIndex<"u"?(v0=_e.snapIndex,w0=_e.previousSnapIndex):(w0=_e.previousIndex||0,v0=_e.activeIndex||0),m0.type==="bullets"&&_e.pagination.bullets&&_e.pagination.bullets.length>0){const y0=_e.pagination.bullets;let S0,B0,I0;if(m0.dynamicBullets&&(s0=elementOuterSize(y0[0],_e.isHorizontal()?"width":"height"),g0.forEach(F0=>{F0.style[_e.isHorizontal()?"width":"height"]=`${s0*(m0.dynamicMainBullets+4)}px`}),m0.dynamicMainBullets>1&&w0!==void 0&&(o0+=v0-(w0||0),o0>m0.dynamicMainBullets-1?o0=m0.dynamicMainBullets-1:o0<0&&(o0=0)),S0=Math.max(v0-o0,0),B0=S0+(Math.min(y0.length,m0.dynamicMainBullets)-1),I0=(B0+S0)/2),y0.forEach(F0=>{const C0=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(E0=>`${m0.bulletActiveClass}${E0}`)].map(E0=>typeof E0=="string"&&E0.includes(" ")?E0.split(" "):E0).flat();F0.classList.remove(...C0)}),g0.length>1)y0.forEach(F0=>{const C0=elementIndex(F0);C0===v0?F0.classList.add(...m0.bulletActiveClass.split(" ")):_e.isElement&&F0.setAttribute("part","bullet"),m0.dynamicBullets&&(C0>=S0&&C0<=B0&&F0.classList.add(...`${m0.bulletActiveClass}-main`.split(" ")),C0===S0&&l0(F0,"prev"),C0===B0&&l0(F0,"next"))});else{const F0=y0[v0];if(F0&&F0.classList.add(...m0.bulletActiveClass.split(" ")),_e.isElement&&y0.forEach((C0,E0)=>{C0.setAttribute("part",E0===v0?"bullet-active":"bullet")}),m0.dynamicBullets){const C0=y0[S0],E0=y0[B0];for(let R0=S0;R0<=B0;R0+=1)y0[R0]&&y0[R0].classList.add(...`${m0.bulletActiveClass}-main`.split(" "));l0(C0,"prev"),l0(E0,"next")}}if(m0.dynamicBullets){const F0=Math.min(y0.length,m0.dynamicMainBullets+4),C0=(s0*F0-s0)/2-I0*s0,E0=p0?"right":"left";y0.forEach(R0=>{R0.style[_e.isHorizontal()?E0:"top"]=`${C0}px`})}}g0.forEach((y0,S0)=>{if(m0.type==="fraction"&&(y0.querySelectorAll(classesToSelector(m0.currentClass)).forEach(B0=>{B0.textContent=m0.formatFractionCurrent(v0+1)}),y0.querySelectorAll(classesToSelector(m0.totalClass)).forEach(B0=>{B0.textContent=m0.formatFractionTotal(_0)})),m0.type==="progressbar"){let B0;m0.progressbarOpposite?B0=_e.isHorizontal()?"vertical":"horizontal":B0=_e.isHorizontal()?"horizontal":"vertical";const I0=(v0+1)/_0;let F0=1,C0=1;B0==="horizontal"?F0=I0:C0=I0,y0.querySelectorAll(classesToSelector(m0.progressbarFillClass)).forEach(E0=>{E0.style.transform=`translate3d(0,0,0) scaleX(${F0}) scaleY(${C0})`,E0.style.transitionDuration=`${_e.params.speed}ms`})}m0.type==="custom"&&m0.renderCustom?(y0.innerHTML=m0.renderCustom(_e,v0+1,_0),S0===0&&t0("paginationRender",y0)):(S0===0&&t0("paginationRender",y0),t0("paginationUpdate",y0)),_e.params.watchOverflow&&_e.enabled&&y0.classList[_e.isLocked?"add":"remove"](m0.lockClass)})}function c0(){const p0=_e.params.pagination;if(f0())return;const m0=_e.virtual&&_e.params.virtual.enabled?_e.virtual.slides.length:_e.slides.length;let g0=_e.pagination.el;g0=a0(g0);let v0="";if(p0.type==="bullets"){let w0=_e.params.loop?Math.ceil(m0/_e.params.slidesPerGroup):_e.snapGrid.length;_e.params.freeMode&&_e.params.freeMode.enabled&&w0>m0&&(w0=m0);for(let x0=0;x0<w0;x0+=1)p0.renderBullet?v0+=p0.renderBullet.call(_e,x0,p0.bulletClass):v0+=`<${p0.bulletElement} ${_e.isElement?'part="bullet"':""} class="${p0.bulletClass}"></${p0.bulletElement}>`}p0.type==="fraction"&&(p0.renderFraction?v0=p0.renderFraction.call(_e,p0.currentClass,p0.totalClass):v0=`<span class="${p0.currentClass}"></span> / <span class="${p0.totalClass}"></span>`),p0.type==="progressbar"&&(p0.renderProgressbar?v0=p0.renderProgressbar.call(_e,p0.progressbarFillClass):v0=`<span class="${p0.progressbarFillClass}"></span>`),_e.pagination.bullets=[],g0.forEach(w0=>{p0.type!=="custom"&&(w0.innerHTML=v0||""),p0.type==="bullets"&&_e.pagination.bullets.push(...w0.querySelectorAll(classesToSelector(p0.bulletClass)))}),p0.type!=="custom"&&t0("paginationRender",g0[0])}function k0(){_e.params.pagination=createElementIfNotDefined(_e,_e.originalParams.pagination,_e.params.pagination,{el:"swiper-pagination"});const p0=_e.params.pagination;if(!p0.el)return;let m0;typeof p0.el=="string"&&_e.isElement&&(m0=_e.el.querySelector(p0.el)),!m0&&typeof p0.el=="string"&&(m0=[...document.querySelectorAll(p0.el)]),m0||(m0=p0.el),!(!m0||m0.length===0)&&(_e.params.uniqueNavElements&&typeof p0.el=="string"&&Array.isArray(m0)&&m0.length>1&&(m0=[..._e.el.querySelectorAll(p0.el)],m0.length>1&&(m0=m0.filter(g0=>elementParents(g0,".swiper")[0]===_e.el)[0])),Array.isArray(m0)&&m0.length===1&&(m0=m0[0]),Object.assign(_e.pagination,{el:m0}),m0=a0(m0),m0.forEach(g0=>{p0.type==="bullets"&&p0.clickable&&g0.classList.add(p0.clickableClass),g0.classList.add(p0.modifierClass+p0.type),g0.classList.add(_e.isHorizontal()?p0.horizontalClass:p0.verticalClass),p0.type==="bullets"&&p0.dynamicBullets&&(g0.classList.add(`${p0.modifierClass}${p0.type}-dynamic`),o0=0,p0.dynamicMainBullets<1&&(p0.dynamicMainBullets=1)),p0.type==="progressbar"&&p0.progressbarOpposite&&g0.classList.add(p0.progressbarOppositeClass),p0.clickable&&g0.addEventListener("click",u0),_e.enabled||g0.classList.add(p0.lockClass)}))}function d0(){const p0=_e.params.pagination;if(f0())return;let m0=_e.pagination.el;m0&&(m0=a0(m0),m0.forEach(g0=>{g0.classList.remove(p0.hiddenClass),g0.classList.remove(p0.modifierClass+p0.type),g0.classList.remove(_e.isHorizontal()?p0.horizontalClass:p0.verticalClass),p0.clickable&&g0.removeEventListener("click",u0)})),_e.pagination.bullets&&_e.pagination.bullets.forEach(g0=>g0.classList.remove(...p0.bulletActiveClass.split(" ")))}r0("changeDirection",()=>{if(!_e.pagination||!_e.pagination.el)return;const p0=_e.params.pagination;let{el:m0}=_e.pagination;m0=a0(m0),m0.forEach(g0=>{g0.classList.remove(p0.horizontalClass,p0.verticalClass),g0.classList.add(_e.isHorizontal()?p0.horizontalClass:p0.verticalClass)})}),r0("init",()=>{_e.params.pagination.enabled===!1?b0():(k0(),c0(),A0())}),r0("activeIndexChange",()=>{typeof _e.snapIndex>"u"&&A0()}),r0("snapIndexChange",()=>{A0()}),r0("snapGridLengthChange",()=>{c0(),A0()}),r0("destroy",()=>{d0()}),r0("enable disable",()=>{let{el:p0}=_e.pagination;p0&&(p0=a0(p0),p0.forEach(m0=>m0.classList[_e.enabled?"remove":"add"](_e.params.pagination.lockClass)))}),r0("lock unlock",()=>{A0()}),r0("click",(p0,m0)=>{const g0=m0.target,v0=a0(_e.pagination.el);if(_e.params.pagination.el&&_e.params.pagination.hideOnClick&&v0&&v0.length>0&&!g0.classList.contains(_e.params.pagination.bulletClass)){if(_e.navigation&&(_e.navigation.nextEl&&g0===_e.navigation.nextEl||_e.navigation.prevEl&&g0===_e.navigation.prevEl))return;const w0=v0[0].classList.contains(_e.params.pagination.hiddenClass);t0(w0===!0?"paginationShow":"paginationHide"),v0.forEach(x0=>x0.classList.toggle(_e.params.pagination.hiddenClass))}});const h0=()=>{_e.el.classList.remove(_e.params.pagination.paginationDisabledClass);let{el:p0}=_e.pagination;p0&&(p0=a0(p0),p0.forEach(m0=>m0.classList.remove(_e.params.pagination.paginationDisabledClass))),k0(),c0(),A0()},b0=()=>{_e.el.classList.add(_e.params.pagination.paginationDisabledClass);let{el:p0}=_e.pagination;p0&&(p0=a0(p0),p0.forEach(m0=>m0.classList.add(_e.params.pagination.paginationDisabledClass))),d0()};Object.assign(_e.pagination,{enable:h0,disable:b0,render:c0,update:A0,init:k0,destroy:d0})}let support;function calcSupport(){const e0=getWindow$2(),_e=getDocument();return{smoothScroll:_e.documentElement&&_e.documentElement.style&&"scrollBehavior"in _e.documentElement.style,touch:!!("ontouchstart"in e0||e0.DocumentTouch&&_e instanceof e0.DocumentTouch)}}function getSupport(){return support||(support=calcSupport()),support}let deviceCached;function calcDevice(e0){let{userAgent:_e}=e0===void 0?{}:e0;const i0=getSupport(),r0=getWindow$2(),t0=r0.navigator.platform,n0=_e||r0.navigator.userAgent,s0={ios:!1,android:!1},o0=r0.screen.width,a0=r0.screen.height,f0=n0.match(/(Android);?[\s\/]+([\d.]+)?/);let l0=n0.match(/(iPad).*OS\s([\d_]+)/);const u0=n0.match(/(iPod)(.*OS\s([\d_]+))?/),A0=!l0&&n0.match(/(iPhone\sOS|iOS)\s([\d_]+)/),c0=t0==="Win32";let k0=t0==="MacIntel";const d0=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!l0&&k0&&i0.touch&&d0.indexOf(`${o0}x${a0}`)>=0&&(l0=n0.match(/(Version)\/([\d.]+)/),l0||(l0=[0,1,"13_0_0"]),k0=!1),f0&&!c0&&(s0.os="android",s0.android=!0),(l0||A0||u0)&&(s0.os="ios",s0.ios=!0),s0}function getDevice(e0){return e0===void 0&&(e0={}),deviceCached||(deviceCached=calcDevice(e0)),deviceCached}let browser;function calcBrowser(){const e0=getWindow$2();let _e=!1;function i0(){const r0=e0.navigator.userAgent.toLowerCase();return r0.indexOf("safari")>=0&&r0.indexOf("chrome")<0&&r0.indexOf("android")<0}if(i0()){const r0=String(e0.navigator.userAgent);if(r0.includes("Version/")){const[t0,n0]=r0.split("Version/")[1].split(" ")[0].split(".").map(s0=>Number(s0));_e=t0<16||t0===16&&n0<2}}return{isSafari:_e||i0(),needPerspectiveFix:_e,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e0.navigator.userAgent)}}function getBrowser(){return browser||(browser=calcBrowser()),browser}function Resize(e0){let{swiper:_e,on:i0,emit:r0}=e0;const t0=getWindow$2();let n0=null,s0=null;const o0=()=>{!_e||_e.destroyed||!_e.initialized||(r0("beforeResize"),r0("resize"))},a0=()=>{!_e||_e.destroyed||!_e.initialized||(n0=new ResizeObserver(u0=>{s0=t0.requestAnimationFrame(()=>{const{width:A0,height:c0}=_e;let k0=A0,d0=c0;u0.forEach(h0=>{let{contentBoxSize:b0,contentRect:p0,target:m0}=h0;m0&&m0!==_e.el||(k0=p0?p0.width:(b0[0]||b0).inlineSize,d0=p0?p0.height:(b0[0]||b0).blockSize)}),(k0!==A0||d0!==c0)&&o0()})}),n0.observe(_e.el))},f0=()=>{s0&&t0.cancelAnimationFrame(s0),n0&&n0.unobserve&&_e.el&&(n0.unobserve(_e.el),n0=null)},l0=()=>{!_e||_e.destroyed||!_e.initialized||r0("orientationchange")};i0("init",()=>{if(_e.params.resizeObserver&&typeof t0.ResizeObserver<"u"){a0();return}t0.addEventListener("resize",o0),t0.addEventListener("orientationchange",l0)}),i0("destroy",()=>{f0(),t0.removeEventListener("resize",o0),t0.removeEventListener("orientationchange",l0)})}function Observer(e0){let{swiper:_e,extendParams:i0,on:r0,emit:t0}=e0;const n0=[],s0=getWindow$2(),o0=function(l0,u0){u0===void 0&&(u0={});const A0=s0.MutationObserver||s0.WebkitMutationObserver,c0=new A0(k0=>{if(_e.__preventObserver__)return;if(k0.length===1){t0("observerUpdate",k0[0]);return}const d0=function(){t0("observerUpdate",k0[0])};s0.requestAnimationFrame?s0.requestAnimationFrame(d0):s0.setTimeout(d0,0)});c0.observe(l0,{attributes:typeof u0.attributes>"u"?!0:u0.attributes,childList:typeof u0.childList>"u"?!0:u0.childList,characterData:typeof u0.characterData>"u"?!0:u0.characterData}),n0.push(c0)},a0=()=>{if(_e.params.observer){if(_e.params.observeParents){const l0=elementParents(_e.hostEl);for(let u0=0;u0<l0.length;u0+=1)o0(l0[u0])}o0(_e.hostEl,{childList:_e.params.observeSlideChildren}),o0(_e.wrapperEl,{attributes:!1})}},f0=()=>{n0.forEach(l0=>{l0.disconnect()}),n0.splice(0,n0.length)};i0({observer:!1,observeParents:!1,observeSlideChildren:!1}),r0("init",a0),r0("destroy",f0)}var eventsEmitter={on(e0,_e,i0){const r0=this;if(!r0.eventsListeners||r0.destroyed||typeof _e!="function")return r0;const t0=i0?"unshift":"push";return e0.split(" ").forEach(n0=>{r0.eventsListeners[n0]||(r0.eventsListeners[n0]=[]),r0.eventsListeners[n0][t0](_e)}),r0},once(e0,_e,i0){const r0=this;if(!r0.eventsListeners||r0.destroyed||typeof _e!="function")return r0;function t0(){r0.off(e0,t0),t0.__emitterProxy&&delete t0.__emitterProxy;for(var n0=arguments.length,s0=new Array(n0),o0=0;o0<n0;o0++)s0[o0]=arguments[o0];_e.apply(r0,s0)}return t0.__emitterProxy=_e,r0.on(e0,t0,i0)},onAny(e0,_e){const i0=this;if(!i0.eventsListeners||i0.destroyed||typeof e0!="function")return i0;const r0=_e?"unshift":"push";return i0.eventsAnyListeners.indexOf(e0)<0&&i0.eventsAnyListeners[r0](e0),i0},offAny(e0){const _e=this;if(!_e.eventsListeners||_e.destroyed||!_e.eventsAnyListeners)return _e;const i0=_e.eventsAnyListeners.indexOf(e0);return i0>=0&&_e.eventsAnyListeners.splice(i0,1),_e},off(e0,_e){const i0=this;return!i0.eventsListeners||i0.destroyed||!i0.eventsListeners||e0.split(" ").forEach(r0=>{typeof _e>"u"?i0.eventsListeners[r0]=[]:i0.eventsListeners[r0]&&i0.eventsListeners[r0].forEach((t0,n0)=>{(t0===_e||t0.__emitterProxy&&t0.__emitterProxy===_e)&&i0.eventsListeners[r0].splice(n0,1)})}),i0},emit(){const e0=this;if(!e0.eventsListeners||e0.destroyed||!e0.eventsListeners)return e0;let _e,i0,r0;for(var t0=arguments.length,n0=new Array(t0),s0=0;s0<t0;s0++)n0[s0]=arguments[s0];return typeof n0[0]=="string"||Array.isArray(n0[0])?(_e=n0[0],i0=n0.slice(1,n0.length),r0=e0):(_e=n0[0].events,i0=n0[0].data,r0=n0[0].context||e0),i0.unshift(r0),(Array.isArray(_e)?_e:_e.split(" ")).forEach(a0=>{e0.eventsAnyListeners&&e0.eventsAnyListeners.length&&e0.eventsAnyListeners.forEach(f0=>{f0.apply(r0,[a0,...i0])}),e0.eventsListeners&&e0.eventsListeners[a0]&&e0.eventsListeners[a0].forEach(f0=>{f0.apply(r0,i0)})}),e0}};function updateSize(){const e0=this;let _e,i0;const r0=e0.el;typeof e0.params.width<"u"&&e0.params.width!==null?_e=e0.params.width:_e=r0.clientWidth,typeof e0.params.height<"u"&&e0.params.height!==null?i0=e0.params.height:i0=r0.clientHeight,!(_e===0&&e0.isHorizontal()||i0===0&&e0.isVertical())&&(_e=_e-parseInt(elementStyle(r0,"padding-left")||0,10)-parseInt(elementStyle(r0,"padding-right")||0,10),i0=i0-parseInt(elementStyle(r0,"padding-top")||0,10)-parseInt(elementStyle(r0,"padding-bottom")||0,10),Number.isNaN(_e)&&(_e=0),Number.isNaN(i0)&&(i0=0),Object.assign(e0,{width:_e,height:i0,size:e0.isHorizontal()?_e:i0}))}function updateSlides(){const e0=this;function _e(B0){return e0.isHorizontal()?B0:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[B0]}function i0(B0,I0){return parseFloat(B0.getPropertyValue(_e(I0))||0)}const r0=e0.params,{wrapperEl:t0,slidesEl:n0,size:s0,rtlTranslate:o0,wrongRTL:a0}=e0,f0=e0.virtual&&r0.virtual.enabled,l0=f0?e0.virtual.slides.length:e0.slides.length,u0=elementChildren(n0,`.${e0.params.slideClass}, swiper-slide`),A0=f0?e0.virtual.slides.length:u0.length;let c0=[];const k0=[],d0=[];let h0=r0.slidesOffsetBefore;typeof h0=="function"&&(h0=r0.slidesOffsetBefore.call(e0));let b0=r0.slidesOffsetAfter;typeof b0=="function"&&(b0=r0.slidesOffsetAfter.call(e0));const p0=e0.snapGrid.length,m0=e0.slidesGrid.length;let g0=r0.spaceBetween,v0=-h0,w0=0,x0=0;if(typeof s0>"u")return;typeof g0=="string"&&g0.indexOf("%")>=0?g0=parseFloat(g0.replace("%",""))/100*s0:typeof g0=="string"&&(g0=parseFloat(g0)),e0.virtualSize=-g0,u0.forEach(B0=>{o0?B0.style.marginLeft="":B0.style.marginRight="",B0.style.marginBottom="",B0.style.marginTop=""}),r0.centeredSlides&&r0.cssMode&&(setCSSProperty(t0,"--swiper-centered-offset-before",""),setCSSProperty(t0,"--swiper-centered-offset-after",""));const _0=r0.grid&&r0.grid.rows>1&&e0.grid;_0&&e0.grid.initSlides(A0);let y0;const S0=r0.slidesPerView==="auto"&&r0.breakpoints&&Object.keys(r0.breakpoints).filter(B0=>typeof r0.breakpoints[B0].slidesPerView<"u").length>0;for(let B0=0;B0<A0;B0+=1){y0=0;let I0;if(u0[B0]&&(I0=u0[B0]),_0&&e0.grid.updateSlide(B0,I0,A0,_e),!(u0[B0]&&elementStyle(I0,"display")==="none")){if(r0.slidesPerView==="auto"){S0&&(u0[B0].style[_e("width")]="");const F0=getComputedStyle(I0),C0=I0.style.transform,E0=I0.style.webkitTransform;if(C0&&(I0.style.transform="none"),E0&&(I0.style.webkitTransform="none"),r0.roundLengths)y0=e0.isHorizontal()?elementOuterSize(I0,"width"):elementOuterSize(I0,"height");else{const R0=i0(F0,"width"),M0=i0(F0,"padding-left"),T0=i0(F0,"padding-right"),G0=i0(F0,"margin-left"),j0=i0(F0,"margin-right"),N0=F0.getPropertyValue("box-sizing");if(N0&&N0==="border-box")y0=R0+G0+j0;else{const{clientWidth:O0,offsetWidth:Y0}=I0;y0=R0+M0+T0+G0+j0+(Y0-O0)}}C0&&(I0.style.transform=C0),E0&&(I0.style.webkitTransform=E0),r0.roundLengths&&(y0=Math.floor(y0))}else y0=(s0-(r0.slidesPerView-1)*g0)/r0.slidesPerView,r0.roundLengths&&(y0=Math.floor(y0)),u0[B0]&&(u0[B0].style[_e("width")]=`${y0}px`);u0[B0]&&(u0[B0].swiperSlideSize=y0),d0.push(y0),r0.centeredSlides?(v0=v0+y0/2+w0/2+g0,w0===0&&B0!==0&&(v0=v0-s0/2-g0),B0===0&&(v0=v0-s0/2-g0),Math.abs(v0)<1/1e3&&(v0=0),r0.roundLengths&&(v0=Math.floor(v0)),x0%r0.slidesPerGroup===0&&c0.push(v0),k0.push(v0)):(r0.roundLengths&&(v0=Math.floor(v0)),(x0-Math.min(e0.params.slidesPerGroupSkip,x0))%e0.params.slidesPerGroup===0&&c0.push(v0),k0.push(v0),v0=v0+y0+g0),e0.virtualSize+=y0+g0,w0=y0,x0+=1}}if(e0.virtualSize=Math.max(e0.virtualSize,s0)+b0,o0&&a0&&(r0.effect==="slide"||r0.effect==="coverflow")&&(t0.style.width=`${e0.virtualSize+g0}px`),r0.setWrapperSize&&(t0.style[_e("width")]=`${e0.virtualSize+g0}px`),_0&&e0.grid.updateWrapperSize(y0,c0,_e),!r0.centeredSlides){const B0=[];for(let I0=0;I0<c0.length;I0+=1){let F0=c0[I0];r0.roundLengths&&(F0=Math.floor(F0)),c0[I0]<=e0.virtualSize-s0&&B0.push(F0)}c0=B0,Math.floor(e0.virtualSize-s0)-Math.floor(c0[c0.length-1])>1&&c0.push(e0.virtualSize-s0)}if(f0&&r0.loop){const B0=d0[0]+g0;if(r0.slidesPerGroup>1){const I0=Math.ceil((e0.virtual.slidesBefore+e0.virtual.slidesAfter)/r0.slidesPerGroup),F0=B0*r0.slidesPerGroup;for(let C0=0;C0<I0;C0+=1)c0.push(c0[c0.length-1]+F0)}for(let I0=0;I0<e0.virtual.slidesBefore+e0.virtual.slidesAfter;I0+=1)r0.slidesPerGroup===1&&c0.push(c0[c0.length-1]+B0),k0.push(k0[k0.length-1]+B0),e0.virtualSize+=B0}if(c0.length===0&&(c0=[0]),g0!==0){const B0=e0.isHorizontal()&&o0?"marginLeft":_e("marginRight");u0.filter((I0,F0)=>!r0.cssMode||r0.loop?!0:F0!==u0.length-1).forEach(I0=>{I0.style[B0]=`${g0}px`})}if(r0.centeredSlides&&r0.centeredSlidesBounds){let B0=0;d0.forEach(F0=>{B0+=F0+(g0||0)}),B0-=g0;const I0=B0-s0;c0=c0.map(F0=>F0<=0?-h0:F0>I0?I0+b0:F0)}if(r0.centerInsufficientSlides){let B0=0;if(d0.forEach(I0=>{B0+=I0+(g0||0)}),B0-=g0,B0<s0){const I0=(s0-B0)/2;c0.forEach((F0,C0)=>{c0[C0]=F0-I0}),k0.forEach((F0,C0)=>{k0[C0]=F0+I0})}}if(Object.assign(e0,{slides:u0,snapGrid:c0,slidesGrid:k0,slidesSizesGrid:d0}),r0.centeredSlides&&r0.cssMode&&!r0.centeredSlidesBounds){setCSSProperty(t0,"--swiper-centered-offset-before",`${-c0[0]}px`),setCSSProperty(t0,"--swiper-centered-offset-after",`${e0.size/2-d0[d0.length-1]/2}px`);const B0=-e0.snapGrid[0],I0=-e0.slidesGrid[0];e0.snapGrid=e0.snapGrid.map(F0=>F0+B0),e0.slidesGrid=e0.slidesGrid.map(F0=>F0+I0)}if(A0!==l0&&e0.emit("slidesLengthChange"),c0.length!==p0&&(e0.params.watchOverflow&&e0.checkOverflow(),e0.emit("snapGridLengthChange")),k0.length!==m0&&e0.emit("slidesGridLengthChange"),r0.watchSlidesProgress&&e0.updateSlidesOffset(),!f0&&!r0.cssMode&&(r0.effect==="slide"||r0.effect==="fade")){const B0=`${r0.containerModifierClass}backface-hidden`,I0=e0.el.classList.contains(B0);A0<=r0.maxBackfaceHiddenSlides?I0||e0.el.classList.add(B0):I0&&e0.el.classList.remove(B0)}}function updateAutoHeight(e0){const _e=this,i0=[],r0=_e.virtual&&_e.params.virtual.enabled;let t0=0,n0;typeof e0=="number"?_e.setTransition(e0):e0===!0&&_e.setTransition(_e.params.speed);const s0=o0=>r0?_e.slides[_e.getSlideIndexByData(o0)]:_e.slides[o0];if(_e.params.slidesPerView!=="auto"&&_e.params.slidesPerView>1)if(_e.params.centeredSlides)(_e.visibleSlides||[]).forEach(o0=>{i0.push(o0)});else for(n0=0;n0<Math.ceil(_e.params.slidesPerView);n0+=1){const o0=_e.activeIndex+n0;if(o0>_e.slides.length&&!r0)break;i0.push(s0(o0))}else i0.push(s0(_e.activeIndex));for(n0=0;n0<i0.length;n0+=1)if(typeof i0[n0]<"u"){const o0=i0[n0].offsetHeight;t0=o0>t0?o0:t0}(t0||t0===0)&&(_e.wrapperEl.style.height=`${t0}px`)}function updateSlidesOffset(){const e0=this,_e=e0.slides,i0=e0.isElement?e0.isHorizontal()?e0.wrapperEl.offsetLeft:e0.wrapperEl.offsetTop:0;for(let r0=0;r0<_e.length;r0+=1)_e[r0].swiperSlideOffset=(e0.isHorizontal()?_e[r0].offsetLeft:_e[r0].offsetTop)-i0-e0.cssOverflowAdjustment()}function updateSlidesProgress(e0){e0===void 0&&(e0=this&&this.translate||0);const _e=this,i0=_e.params,{slides:r0,rtlTranslate:t0,snapGrid:n0}=_e;if(r0.length===0)return;typeof r0[0].swiperSlideOffset>"u"&&_e.updateSlidesOffset();let s0=-e0;t0&&(s0=e0),r0.forEach(a0=>{a0.classList.remove(i0.slideVisibleClass)}),_e.visibleSlidesIndexes=[],_e.visibleSlides=[];let o0=i0.spaceBetween;typeof o0=="string"&&o0.indexOf("%")>=0?o0=parseFloat(o0.replace("%",""))/100*_e.size:typeof o0=="string"&&(o0=parseFloat(o0));for(let a0=0;a0<r0.length;a0+=1){const f0=r0[a0];let l0=f0.swiperSlideOffset;i0.cssMode&&i0.centeredSlides&&(l0-=r0[0].swiperSlideOffset);const u0=(s0+(i0.centeredSlides?_e.minTranslate():0)-l0)/(f0.swiperSlideSize+o0),A0=(s0-n0[0]+(i0.centeredSlides?_e.minTranslate():0)-l0)/(f0.swiperSlideSize+o0),c0=-(s0-l0),k0=c0+_e.slidesSizesGrid[a0];(c0>=0&&c0<_e.size-1||k0>1&&k0<=_e.size||c0<=0&&k0>=_e.size)&&(_e.visibleSlides.push(f0),_e.visibleSlidesIndexes.push(a0),r0[a0].classList.add(i0.slideVisibleClass)),f0.progress=t0?-u0:u0,f0.originalProgress=t0?-A0:A0}}function updateProgress(e0){const _e=this;if(typeof e0>"u"){const l0=_e.rtlTranslate?-1:1;e0=_e&&_e.translate&&_e.translate*l0||0}const i0=_e.params,r0=_e.maxTranslate()-_e.minTranslate();let{progress:t0,isBeginning:n0,isEnd:s0,progressLoop:o0}=_e;const a0=n0,f0=s0;if(r0===0)t0=0,n0=!0,s0=!0;else{t0=(e0-_e.minTranslate())/r0;const l0=Math.abs(e0-_e.minTranslate())<1,u0=Math.abs(e0-_e.maxTranslate())<1;n0=l0||t0<=0,s0=u0||t0>=1,l0&&(t0=0),u0&&(t0=1)}if(i0.loop){const l0=_e.getSlideIndexByData(0),u0=_e.getSlideIndexByData(_e.slides.length-1),A0=_e.slidesGrid[l0],c0=_e.slidesGrid[u0],k0=_e.slidesGrid[_e.slidesGrid.length-1],d0=Math.abs(e0);d0>=A0?o0=(d0-A0)/k0:o0=(d0+k0-c0)/k0,o0>1&&(o0-=1)}Object.assign(_e,{progress:t0,progressLoop:o0,isBeginning:n0,isEnd:s0}),(i0.watchSlidesProgress||i0.centeredSlides&&i0.autoHeight)&&_e.updateSlidesProgress(e0),n0&&!a0&&_e.emit("reachBeginning toEdge"),s0&&!f0&&_e.emit("reachEnd toEdge"),(a0&&!n0||f0&&!s0)&&_e.emit("fromEdge"),_e.emit("progress",t0)}function updateSlidesClasses(){const e0=this,{slides:_e,params:i0,slidesEl:r0,activeIndex:t0}=e0,n0=e0.virtual&&i0.virtual.enabled,s0=a0=>elementChildren(r0,`.${i0.slideClass}${a0}, swiper-slide${a0}`)[0];_e.forEach(a0=>{a0.classList.remove(i0.slideActiveClass,i0.slideNextClass,i0.slidePrevClass)});let o0;if(n0)if(i0.loop){let a0=t0-e0.virtual.slidesBefore;a0<0&&(a0=e0.virtual.slides.length+a0),a0>=e0.virtual.slides.length&&(a0-=e0.virtual.slides.length),o0=s0(`[data-swiper-slide-index="${a0}"]`)}else o0=s0(`[data-swiper-slide-index="${t0}"]`);else o0=_e[t0];if(o0){o0.classList.add(i0.slideActiveClass);let a0=elementNextAll(o0,`.${i0.slideClass}, swiper-slide`)[0];i0.loop&&!a0&&(a0=_e[0]),a0&&a0.classList.add(i0.slideNextClass);let f0=elementPrevAll(o0,`.${i0.slideClass}, swiper-slide`)[0];i0.loop&&!f0===0&&(f0=_e[_e.length-1]),f0&&f0.classList.add(i0.slidePrevClass)}e0.emitSlidesClasses()}const processLazyPreloader=(e0,_e)=>{if(!e0||e0.destroyed||!e0.params)return;const i0=()=>e0.isElement?"swiper-slide":`.${e0.params.slideClass}`,r0=_e.closest(i0());if(r0){const t0=r0.querySelector(`.${e0.params.lazyPreloaderClass}`);t0&&t0.remove()}},unlazy=(e0,_e)=>{if(!e0.slides[_e])return;const i0=e0.slides[_e].querySelector('[loading="lazy"]');i0&&i0.removeAttribute("loading")},preload=e0=>{if(!e0||e0.destroyed||!e0.params)return;let _e=e0.params.lazyPreloadPrevNext;const i0=e0.slides.length;if(!i0||!_e||_e<0)return;_e=Math.min(_e,i0);const r0=e0.params.slidesPerView==="auto"?e0.slidesPerViewDynamic():Math.ceil(e0.params.slidesPerView),t0=e0.activeIndex;if(e0.params.grid&&e0.params.grid.rows>1){const s0=t0,o0=[s0-_e];o0.push(...Array.from({length:_e}).map((a0,f0)=>s0+r0+f0)),e0.slides.forEach((a0,f0)=>{o0.includes(a0.column)&&unlazy(e0,f0)});return}const n0=t0+r0-1;if(e0.params.rewind||e0.params.loop)for(let s0=t0-_e;s0<=n0+_e;s0+=1){const o0=(s0%i0+i0)%i0;(o0<t0||o0>n0)&&unlazy(e0,o0)}else for(let s0=Math.max(t0-_e,0);s0<=Math.min(n0+_e,i0-1);s0+=1)s0!==t0&&(s0>n0||s0<t0)&&unlazy(e0,s0)};function getActiveIndexByTranslate(e0){const{slidesGrid:_e,params:i0}=e0,r0=e0.rtlTranslate?e0.translate:-e0.translate;let t0;for(let n0=0;n0<_e.length;n0+=1)typeof _e[n0+1]<"u"?r0>=_e[n0]&&r0<_e[n0+1]-(_e[n0+1]-_e[n0])/2?t0=n0:r0>=_e[n0]&&r0<_e[n0+1]&&(t0=n0+1):r0>=_e[n0]&&(t0=n0);return i0.normalizeSlideIndex&&(t0<0||typeof t0>"u")&&(t0=0),t0}function updateActiveIndex(e0){const _e=this,i0=_e.rtlTranslate?_e.translate:-_e.translate,{snapGrid:r0,params:t0,activeIndex:n0,realIndex:s0,snapIndex:o0}=_e;let a0=e0,f0;const l0=A0=>{let c0=A0-_e.virtual.slidesBefore;return c0<0&&(c0=_e.virtual.slides.length+c0),c0>=_e.virtual.slides.length&&(c0-=_e.virtual.slides.length),c0};if(typeof a0>"u"&&(a0=getActiveIndexByTranslate(_e)),r0.indexOf(i0)>=0)f0=r0.indexOf(i0);else{const A0=Math.min(t0.slidesPerGroupSkip,a0);f0=A0+Math.floor((a0-A0)/t0.slidesPerGroup)}if(f0>=r0.length&&(f0=r0.length-1),a0===n0){f0!==o0&&(_e.snapIndex=f0,_e.emit("snapIndexChange")),_e.params.loop&&_e.virtual&&_e.params.virtual.enabled&&(_e.realIndex=l0(a0));return}let u0;_e.virtual&&t0.virtual.enabled&&t0.loop?u0=l0(a0):_e.slides[a0]?u0=parseInt(_e.slides[a0].getAttribute("data-swiper-slide-index")||a0,10):u0=a0,Object.assign(_e,{previousSnapIndex:o0,snapIndex:f0,previousRealIndex:s0,realIndex:u0,previousIndex:n0,activeIndex:a0}),_e.initialized&&preload(_e),_e.emit("activeIndexChange"),_e.emit("snapIndexChange"),s0!==u0&&_e.emit("realIndexChange"),(_e.initialized||_e.params.runCallbacksOnInit)&&_e.emit("slideChange")}function updateClickedSlide(e0){const _e=this,i0=_e.params,r0=e0.closest(`.${i0.slideClass}, swiper-slide`);let t0=!1,n0;if(r0){for(let s0=0;s0<_e.slides.length;s0+=1)if(_e.slides[s0]===r0){t0=!0,n0=s0;break}}if(r0&&t0)_e.clickedSlide=r0,_e.virtual&&_e.params.virtual.enabled?_e.clickedIndex=parseInt(r0.getAttribute("data-swiper-slide-index"),10):_e.clickedIndex=n0;else{_e.clickedSlide=void 0,_e.clickedIndex=void 0;return}i0.slideToClickedSlide&&_e.clickedIndex!==void 0&&_e.clickedIndex!==_e.activeIndex&&_e.slideToClickedSlide()}var update={updateSize,updateSlides,updateAutoHeight,updateSlidesOffset,updateSlidesProgress,updateProgress,updateSlidesClasses,updateActiveIndex,updateClickedSlide};function getSwiperTranslate(e0){e0===void 0&&(e0=this.isHorizontal()?"x":"y");const _e=this,{params:i0,rtlTranslate:r0,translate:t0,wrapperEl:n0}=_e;if(i0.virtualTranslate)return r0?-t0:t0;if(i0.cssMode)return t0;let s0=getTranslate(n0,e0);return s0+=_e.cssOverflowAdjustment(),r0&&(s0=-s0),s0||0}function setTranslate(e0,_e){const i0=this,{rtlTranslate:r0,params:t0,wrapperEl:n0,progress:s0}=i0;let o0=0,a0=0;const f0=0;i0.isHorizontal()?o0=r0?-e0:e0:a0=e0,t0.roundLengths&&(o0=Math.floor(o0),a0=Math.floor(a0)),i0.previousTranslate=i0.translate,i0.translate=i0.isHorizontal()?o0:a0,t0.cssMode?n0[i0.isHorizontal()?"scrollLeft":"scrollTop"]=i0.isHorizontal()?-o0:-a0:t0.virtualTranslate||(i0.isHorizontal()?o0-=i0.cssOverflowAdjustment():a0-=i0.cssOverflowAdjustment(),n0.style.transform=`translate3d(${o0}px, ${a0}px, ${f0}px)`);let l0;const u0=i0.maxTranslate()-i0.minTranslate();u0===0?l0=0:l0=(e0-i0.minTranslate())/u0,l0!==s0&&i0.updateProgress(e0),i0.emit("setTranslate",i0.translate,_e)}function minTranslate(){return-this.snapGrid[0]}function maxTranslate(){return-this.snapGrid[this.snapGrid.length-1]}function translateTo(e0,_e,i0,r0,t0){e0===void 0&&(e0=0),_e===void 0&&(_e=this.params.speed),i0===void 0&&(i0=!0),r0===void 0&&(r0=!0);const n0=this,{params:s0,wrapperEl:o0}=n0;if(n0.animating&&s0.preventInteractionOnTransition)return!1;const a0=n0.minTranslate(),f0=n0.maxTranslate();let l0;if(r0&&e0>a0?l0=a0:r0&&e0<f0?l0=f0:l0=e0,n0.updateProgress(l0),s0.cssMode){const u0=n0.isHorizontal();if(_e===0)o0[u0?"scrollLeft":"scrollTop"]=-l0;else{if(!n0.support.smoothScroll)return animateCSSModeScroll({swiper:n0,targetPosition:-l0,side:u0?"left":"top"}),!0;o0.scrollTo({[u0?"left":"top"]:-l0,behavior:"smooth"})}return!0}return _e===0?(n0.setTransition(0),n0.setTranslate(l0),i0&&(n0.emit("beforeTransitionStart",_e,t0),n0.emit("transitionEnd"))):(n0.setTransition(_e),n0.setTranslate(l0),i0&&(n0.emit("beforeTransitionStart",_e,t0),n0.emit("transitionStart")),n0.animating||(n0.animating=!0,n0.onTranslateToWrapperTransitionEnd||(n0.onTranslateToWrapperTransitionEnd=function(A0){!n0||n0.destroyed||A0.target===this&&(n0.wrapperEl.removeEventListener("transitionend",n0.onTranslateToWrapperTransitionEnd),n0.onTranslateToWrapperTransitionEnd=null,delete n0.onTranslateToWrapperTransitionEnd,i0&&n0.emit("transitionEnd"))}),n0.wrapperEl.addEventListener("transitionend",n0.onTranslateToWrapperTransitionEnd))),!0}var translate={getTranslate:getSwiperTranslate,setTranslate,minTranslate,maxTranslate,translateTo};function setTransition(e0,_e){const i0=this;i0.params.cssMode||(i0.wrapperEl.style.transitionDuration=`${e0}ms`),i0.emit("setTransition",e0,_e)}function transitionEmit(e0){let{swiper:_e,runCallbacks:i0,direction:r0,step:t0}=e0;const{activeIndex:n0,previousIndex:s0}=_e;let o0=r0;if(o0||(n0>s0?o0="next":n0<s0?o0="prev":o0="reset"),_e.emit(`transition${t0}`),i0&&n0!==s0){if(o0==="reset"){_e.emit(`slideResetTransition${t0}`);return}_e.emit(`slideChangeTransition${t0}`),o0==="next"?_e.emit(`slideNextTransition${t0}`):_e.emit(`slidePrevTransition${t0}`)}}function transitionStart(e0,_e){e0===void 0&&(e0=!0);const i0=this,{params:r0}=i0;r0.cssMode||(r0.autoHeight&&i0.updateAutoHeight(),transitionEmit({swiper:i0,runCallbacks:e0,direction:_e,step:"Start"}))}function transitionEnd(e0,_e){e0===void 0&&(e0=!0);const i0=this,{params:r0}=i0;i0.animating=!1,!r0.cssMode&&(i0.setTransition(0),transitionEmit({swiper:i0,runCallbacks:e0,direction:_e,step:"End"}))}var transition={setTransition,transitionStart,transitionEnd};function slideTo(e0,_e,i0,r0,t0){e0===void 0&&(e0=0),_e===void 0&&(_e=this.params.speed),i0===void 0&&(i0=!0),typeof e0=="string"&&(e0=parseInt(e0,10));const n0=this;let s0=e0;s0<0&&(s0=0);const{params:o0,snapGrid:a0,slidesGrid:f0,previousIndex:l0,activeIndex:u0,rtlTranslate:A0,wrapperEl:c0,enabled:k0}=n0;if(n0.animating&&o0.preventInteractionOnTransition||!k0&&!r0&&!t0)return!1;const d0=Math.min(n0.params.slidesPerGroupSkip,s0);let h0=d0+Math.floor((s0-d0)/n0.params.slidesPerGroup);h0>=a0.length&&(h0=a0.length-1);const b0=-a0[h0];if(o0.normalizeSlideIndex)for(let m0=0;m0<f0.length;m0+=1){const g0=-Math.floor(b0*100),v0=Math.floor(f0[m0]*100),w0=Math.floor(f0[m0+1]*100);typeof f0[m0+1]<"u"?g0>=v0&&g0<w0-(w0-v0)/2?s0=m0:g0>=v0&&g0<w0&&(s0=m0+1):g0>=v0&&(s0=m0)}if(n0.initialized&&s0!==u0&&(!n0.allowSlideNext&&(A0?b0>n0.translate&&b0>n0.minTranslate():b0<n0.translate&&b0<n0.minTranslate())||!n0.allowSlidePrev&&b0>n0.translate&&b0>n0.maxTranslate()&&(u0||0)!==s0))return!1;s0!==(l0||0)&&i0&&n0.emit("beforeSlideChangeStart"),n0.updateProgress(b0);let p0;if(s0>u0?p0="next":s0<u0?p0="prev":p0="reset",A0&&-b0===n0.translate||!A0&&b0===n0.translate)return n0.updateActiveIndex(s0),o0.autoHeight&&n0.updateAutoHeight(),n0.updateSlidesClasses(),o0.effect!=="slide"&&n0.setTranslate(b0),p0!=="reset"&&(n0.transitionStart(i0,p0),n0.transitionEnd(i0,p0)),!1;if(o0.cssMode){const m0=n0.isHorizontal(),g0=A0?b0:-b0;if(_e===0){const v0=n0.virtual&&n0.params.virtual.enabled;v0&&(n0.wrapperEl.style.scrollSnapType="none",n0._immediateVirtual=!0),v0&&!n0._cssModeVirtualInitialSet&&n0.params.initialSlide>0?(n0._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{c0[m0?"scrollLeft":"scrollTop"]=g0})):c0[m0?"scrollLeft":"scrollTop"]=g0,v0&&requestAnimationFrame(()=>{n0.wrapperEl.style.scrollSnapType="",n0._immediateVirtual=!1})}else{if(!n0.support.smoothScroll)return animateCSSModeScroll({swiper:n0,targetPosition:g0,side:m0?"left":"top"}),!0;c0.scrollTo({[m0?"left":"top"]:g0,behavior:"smooth"})}return!0}return n0.setTransition(_e),n0.setTranslate(b0),n0.updateActiveIndex(s0),n0.updateSlidesClasses(),n0.emit("beforeTransitionStart",_e,r0),n0.transitionStart(i0,p0),_e===0?n0.transitionEnd(i0,p0):n0.animating||(n0.animating=!0,n0.onSlideToWrapperTransitionEnd||(n0.onSlideToWrapperTransitionEnd=function(g0){!n0||n0.destroyed||g0.target===this&&(n0.wrapperEl.removeEventListener("transitionend",n0.onSlideToWrapperTransitionEnd),n0.onSlideToWrapperTransitionEnd=null,delete n0.onSlideToWrapperTransitionEnd,n0.transitionEnd(i0,p0))}),n0.wrapperEl.addEventListener("transitionend",n0.onSlideToWrapperTransitionEnd)),!0}function slideToLoop(e0,_e,i0,r0){e0===void 0&&(e0=0),_e===void 0&&(_e=this.params.speed),i0===void 0&&(i0=!0),typeof e0=="string"&&(e0=parseInt(e0,10));const t0=this;let n0=e0;return t0.params.loop&&(t0.virtual&&t0.params.virtual.enabled?n0=n0+t0.virtual.slidesBefore:n0=t0.getSlideIndexByData(n0)),t0.slideTo(n0,_e,i0,r0)}function slideNext(e0,_e,i0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0);const r0=this,{enabled:t0,params:n0,animating:s0}=r0;if(!t0)return r0;let o0=n0.slidesPerGroup;n0.slidesPerView==="auto"&&n0.slidesPerGroup===1&&n0.slidesPerGroupAuto&&(o0=Math.max(r0.slidesPerViewDynamic("current",!0),1));const a0=r0.activeIndex<n0.slidesPerGroupSkip?1:o0,f0=r0.virtual&&n0.virtual.enabled;if(n0.loop){if(s0&&!f0&&n0.loopPreventsSliding)return!1;r0.loopFix({direction:"next"}),r0._clientLeft=r0.wrapperEl.clientLeft}return n0.rewind&&r0.isEnd?r0.slideTo(0,e0,_e,i0):r0.slideTo(r0.activeIndex+a0,e0,_e,i0)}function slidePrev(e0,_e,i0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0);const r0=this,{params:t0,snapGrid:n0,slidesGrid:s0,rtlTranslate:o0,enabled:a0,animating:f0}=r0;if(!a0)return r0;const l0=r0.virtual&&t0.virtual.enabled;if(t0.loop){if(f0&&!l0&&t0.loopPreventsSliding)return!1;r0.loopFix({direction:"prev"}),r0._clientLeft=r0.wrapperEl.clientLeft}const u0=o0?r0.translate:-r0.translate;function A0(b0){return b0<0?-Math.floor(Math.abs(b0)):Math.floor(b0)}const c0=A0(u0),k0=n0.map(b0=>A0(b0));let d0=n0[k0.indexOf(c0)-1];if(typeof d0>"u"&&t0.cssMode){let b0;n0.forEach((p0,m0)=>{c0>=p0&&(b0=m0)}),typeof b0<"u"&&(d0=n0[b0>0?b0-1:b0])}let h0=0;if(typeof d0<"u"&&(h0=s0.indexOf(d0),h0<0&&(h0=r0.activeIndex-1),t0.slidesPerView==="auto"&&t0.slidesPerGroup===1&&t0.slidesPerGroupAuto&&(h0=h0-r0.slidesPerViewDynamic("previous",!0)+1,h0=Math.max(h0,0))),t0.rewind&&r0.isBeginning){const b0=r0.params.virtual&&r0.params.virtual.enabled&&r0.virtual?r0.virtual.slides.length-1:r0.slides.length-1;return r0.slideTo(b0,e0,_e,i0)}return r0.slideTo(h0,e0,_e,i0)}function slideReset(e0,_e,i0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0);const r0=this;return r0.slideTo(r0.activeIndex,e0,_e,i0)}function slideToClosest(e0,_e,i0,r0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0),r0===void 0&&(r0=.5);const t0=this;let n0=t0.activeIndex;const s0=Math.min(t0.params.slidesPerGroupSkip,n0),o0=s0+Math.floor((n0-s0)/t0.params.slidesPerGroup),a0=t0.rtlTranslate?t0.translate:-t0.translate;if(a0>=t0.snapGrid[o0]){const f0=t0.snapGrid[o0],l0=t0.snapGrid[o0+1];a0-f0>(l0-f0)*r0&&(n0+=t0.params.slidesPerGroup)}else{const f0=t0.snapGrid[o0-1],l0=t0.snapGrid[o0];a0-f0<=(l0-f0)*r0&&(n0-=t0.params.slidesPerGroup)}return n0=Math.max(n0,0),n0=Math.min(n0,t0.slidesGrid.length-1),t0.slideTo(n0,e0,_e,i0)}function slideToClickedSlide(){const e0=this,{params:_e,slidesEl:i0}=e0,r0=_e.slidesPerView==="auto"?e0.slidesPerViewDynamic():_e.slidesPerView;let t0=e0.clickedIndex,n0;const s0=e0.isElement?"swiper-slide":`.${_e.slideClass}`;if(_e.loop){if(e0.animating)return;n0=parseInt(e0.clickedSlide.getAttribute("data-swiper-slide-index"),10),_e.centeredSlides?t0<e0.loopedSlides-r0/2||t0>e0.slides.length-e0.loopedSlides+r0/2?(e0.loopFix(),t0=e0.getSlideIndex(elementChildren(i0,`${s0}[data-swiper-slide-index="${n0}"]`)[0]),nextTick(()=>{e0.slideTo(t0)})):e0.slideTo(t0):t0>e0.slides.length-r0?(e0.loopFix(),t0=e0.getSlideIndex(elementChildren(i0,`${s0}[data-swiper-slide-index="${n0}"]`)[0]),nextTick(()=>{e0.slideTo(t0)})):e0.slideTo(t0)}else e0.slideTo(t0)}var slide={slideTo,slideToLoop,slideNext,slidePrev,slideReset,slideToClosest,slideToClickedSlide};function loopCreate(e0){const _e=this,{params:i0,slidesEl:r0}=_e;if(!i0.loop||_e.virtual&&_e.params.virtual.enabled)return;elementChildren(r0,`.${i0.slideClass}, swiper-slide`).forEach((n0,s0)=>{n0.setAttribute("data-swiper-slide-index",s0)}),_e.loopFix({slideRealIndex:e0,direction:i0.centeredSlides?void 0:"next"})}function loopFix(e0){let{slideRealIndex:_e,slideTo:i0=!0,direction:r0,setTranslate:t0,activeSlideIndex:n0,byController:s0,byMousewheel:o0}=e0===void 0?{}:e0;const a0=this;if(!a0.params.loop)return;a0.emit("beforeLoopFix");const{slides:f0,allowSlidePrev:l0,allowSlideNext:u0,slidesEl:A0,params:c0}=a0;if(a0.allowSlidePrev=!0,a0.allowSlideNext=!0,a0.virtual&&c0.virtual.enabled){i0&&(!c0.centeredSlides&&a0.snapIndex===0?a0.slideTo(a0.virtual.slides.length,0,!1,!0):c0.centeredSlides&&a0.snapIndex<c0.slidesPerView?a0.slideTo(a0.virtual.slides.length+a0.snapIndex,0,!1,!0):a0.snapIndex===a0.snapGrid.length-1&&a0.slideTo(a0.virtual.slidesBefore,0,!1,!0)),a0.allowSlidePrev=l0,a0.allowSlideNext=u0,a0.emit("loopFix");return}const k0=c0.slidesPerView==="auto"?a0.slidesPerViewDynamic():Math.ceil(parseFloat(c0.slidesPerView,10));let d0=c0.loopedSlides||k0;d0%c0.slidesPerGroup!==0&&(d0+=c0.slidesPerGroup-d0%c0.slidesPerGroup),a0.loopedSlides=d0;const h0=[],b0=[];let p0=a0.activeIndex;typeof n0>"u"?n0=a0.getSlideIndex(a0.slides.filter(x0=>x0.classList.contains(c0.slideActiveClass))[0]):p0=n0;const m0=r0==="next"||!r0,g0=r0==="prev"||!r0;let v0=0,w0=0;if(n0<d0){v0=Math.max(d0-n0,c0.slidesPerGroup);for(let x0=0;x0<d0-n0;x0+=1){const _0=x0-Math.floor(x0/f0.length)*f0.length;h0.push(f0.length-_0-1)}}else if(n0>a0.slides.length-d0*2){w0=Math.max(n0-(a0.slides.length-d0*2),c0.slidesPerGroup);for(let x0=0;x0<w0;x0+=1){const _0=x0-Math.floor(x0/f0.length)*f0.length;b0.push(_0)}}if(g0&&h0.forEach(x0=>{a0.slides[x0].swiperLoopMoveDOM=!0,A0.prepend(a0.slides[x0]),a0.slides[x0].swiperLoopMoveDOM=!1}),m0&&b0.forEach(x0=>{a0.slides[x0].swiperLoopMoveDOM=!0,A0.append(a0.slides[x0]),a0.slides[x0].swiperLoopMoveDOM=!1}),a0.recalcSlides(),c0.slidesPerView==="auto"&&a0.updateSlides(),c0.watchSlidesProgress&&a0.updateSlidesOffset(),i0){if(h0.length>0&&g0)if(typeof _e>"u"){const x0=a0.slidesGrid[p0],y0=a0.slidesGrid[p0+v0]-x0;o0?a0.setTranslate(a0.translate-y0):(a0.slideTo(p0+v0,0,!1,!0),t0&&(a0.touches[a0.isHorizontal()?"startX":"startY"]+=y0,a0.touchEventsData.currentTranslate=a0.translate))}else t0&&(a0.slideToLoop(_e,0,!1,!0),a0.touchEventsData.currentTranslate=a0.translate);else if(b0.length>0&&m0)if(typeof _e>"u"){const x0=a0.slidesGrid[p0],y0=a0.slidesGrid[p0-w0]-x0;o0?a0.setTranslate(a0.translate-y0):(a0.slideTo(p0-w0,0,!1,!0),t0&&(a0.touches[a0.isHorizontal()?"startX":"startY"]+=y0,a0.touchEventsData.currentTranslate=a0.translate))}else a0.slideToLoop(_e,0,!1,!0)}if(a0.allowSlidePrev=l0,a0.allowSlideNext=u0,a0.controller&&a0.controller.control&&!s0){const x0={slideRealIndex:_e,slideTo:!1,direction:r0,setTranslate:t0,activeSlideIndex:n0,byController:!0};Array.isArray(a0.controller.control)?a0.controller.control.forEach(_0=>{!_0.destroyed&&_0.params.loop&&_0.loopFix(x0)}):a0.controller.control instanceof a0.constructor&&a0.controller.control.params.loop&&a0.controller.control.loopFix(x0)}a0.emit("loopFix")}function loopDestroy(){const e0=this,{params:_e,slidesEl:i0}=e0;if(!_e.loop||e0.virtual&&e0.params.virtual.enabled)return;e0.recalcSlides();const r0=[];e0.slides.forEach(t0=>{const n0=typeof t0.swiperSlideIndex>"u"?t0.getAttribute("data-swiper-slide-index")*1:t0.swiperSlideIndex;r0[n0]=t0}),e0.slides.forEach(t0=>{t0.removeAttribute("data-swiper-slide-index")}),r0.forEach(t0=>{i0.append(t0)}),e0.recalcSlides(),e0.slideTo(e0.realIndex,0)}var loop={loopCreate,loopFix,loopDestroy};function setGrabCursor(e0){const _e=this;if(!_e.params.simulateTouch||_e.params.watchOverflow&&_e.isLocked||_e.params.cssMode)return;const i0=_e.params.touchEventsTarget==="container"?_e.el:_e.wrapperEl;_e.isElement&&(_e.__preventObserver__=!0),i0.style.cursor="move",i0.style.cursor=e0?"grabbing":"grab",_e.isElement&&requestAnimationFrame(()=>{_e.__preventObserver__=!1})}function unsetGrabCursor(){const e0=this;e0.params.watchOverflow&&e0.isLocked||e0.params.cssMode||(e0.isElement&&(e0.__preventObserver__=!0),e0[e0.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e0.isElement&&requestAnimationFrame(()=>{e0.__preventObserver__=!1}))}var grabCursor={setGrabCursor,unsetGrabCursor};function closestElement(e0,_e){_e===void 0&&(_e=this);function i0(r0){if(!r0||r0===getDocument()||r0===getWindow$2())return null;r0.assignedSlot&&(r0=r0.assignedSlot);const t0=r0.closest(e0);return!t0&&!r0.getRootNode?null:t0||i0(r0.getRootNode().host)}return i0(_e)}function onTouchStart(e0){const _e=this,i0=getDocument(),r0=getWindow$2(),t0=_e.touchEventsData;t0.evCache.push(e0);const{params:n0,touches:s0,enabled:o0}=_e;if(!o0||!n0.simulateTouch&&e0.pointerType==="mouse"||_e.animating&&n0.preventInteractionOnTransition)return;!_e.animating&&n0.cssMode&&n0.loop&&_e.loopFix();let a0=e0;a0.originalEvent&&(a0=a0.originalEvent);let f0=a0.target;if(n0.touchEventsTarget==="wrapper"&&!_e.wrapperEl.contains(f0)||"which"in a0&&a0.which===3||"button"in a0&&a0.button>0||t0.isTouched&&t0.isMoved)return;const l0=!!n0.noSwipingClass&&n0.noSwipingClass!=="",u0=e0.composedPath?e0.composedPath():e0.path;l0&&a0.target&&a0.target.shadowRoot&&u0&&(f0=u0[0]);const A0=n0.noSwipingSelector?n0.noSwipingSelector:`.${n0.noSwipingClass}`,c0=!!(a0.target&&a0.target.shadowRoot);if(n0.noSwiping&&(c0?closestElement(A0,f0):f0.closest(A0))){_e.allowClick=!0;return}if(n0.swipeHandler&&!f0.closest(n0.swipeHandler))return;s0.currentX=a0.pageX,s0.currentY=a0.pageY;const k0=s0.currentX,d0=s0.currentY,h0=n0.edgeSwipeDetection||n0.iOSEdgeSwipeDetection,b0=n0.edgeSwipeThreshold||n0.iOSEdgeSwipeThreshold;if(h0&&(k0<=b0||k0>=r0.innerWidth-b0))if(h0==="prevent")e0.preventDefault();else return;Object.assign(t0,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s0.startX=k0,s0.startY=d0,t0.touchStartTime=now(),_e.allowClick=!0,_e.updateSize(),_e.swipeDirection=void 0,n0.threshold>0&&(t0.allowThresholdMove=!1);let p0=!0;f0.matches(t0.focusableElements)&&(p0=!1,f0.nodeName==="SELECT"&&(t0.isTouched=!1)),i0.activeElement&&i0.activeElement.matches(t0.focusableElements)&&i0.activeElement!==f0&&i0.activeElement.blur();const m0=p0&&_e.allowTouchMove&&n0.touchStartPreventDefault;(n0.touchStartForcePreventDefault||m0)&&!f0.isContentEditable&&a0.preventDefault(),n0.freeMode&&n0.freeMode.enabled&&_e.freeMode&&_e.animating&&!n0.cssMode&&_e.freeMode.onTouchStart(),_e.emit("touchStart",a0)}function onTouchMove(e0){const _e=getDocument(),i0=this,r0=i0.touchEventsData,{params:t0,touches:n0,rtlTranslate:s0,enabled:o0}=i0;if(!o0||!t0.simulateTouch&&e0.pointerType==="mouse")return;let a0=e0;if(a0.originalEvent&&(a0=a0.originalEvent),!r0.isTouched){r0.startMoving&&r0.isScrolling&&i0.emit("touchMoveOpposite",a0);return}const f0=r0.evCache.findIndex(w0=>w0.pointerId===a0.pointerId);f0>=0&&(r0.evCache[f0]=a0);const l0=r0.evCache.length>1?r0.evCache[0]:a0,u0=l0.pageX,A0=l0.pageY;if(a0.preventedByNestedSwiper){n0.startX=u0,n0.startY=A0;return}if(!i0.allowTouchMove){a0.target.matches(r0.focusableElements)||(i0.allowClick=!1),r0.isTouched&&(Object.assign(n0,{startX:u0,startY:A0,prevX:i0.touches.currentX,prevY:i0.touches.currentY,currentX:u0,currentY:A0}),r0.touchStartTime=now());return}if(t0.touchReleaseOnEdges&&!t0.loop){if(i0.isVertical()){if(A0<n0.startY&&i0.translate<=i0.maxTranslate()||A0>n0.startY&&i0.translate>=i0.minTranslate()){r0.isTouched=!1,r0.isMoved=!1;return}}else if(u0<n0.startX&&i0.translate<=i0.maxTranslate()||u0>n0.startX&&i0.translate>=i0.minTranslate())return}if(_e.activeElement&&a0.target===_e.activeElement&&a0.target.matches(r0.focusableElements)){r0.isMoved=!0,i0.allowClick=!1;return}if(r0.allowTouchCallbacks&&i0.emit("touchMove",a0),a0.targetTouches&&a0.targetTouches.length>1)return;n0.currentX=u0,n0.currentY=A0;const c0=n0.currentX-n0.startX,k0=n0.currentY-n0.startY;if(i0.params.threshold&&Math.sqrt(c0**2+k0**2)<i0.params.threshold)return;if(typeof r0.isScrolling>"u"){let w0;i0.isHorizontal()&&n0.currentY===n0.startY||i0.isVertical()&&n0.currentX===n0.startX?r0.isScrolling=!1:c0*c0+k0*k0>=25&&(w0=Math.atan2(Math.abs(k0),Math.abs(c0))*180/Math.PI,r0.isScrolling=i0.isHorizontal()?w0>t0.touchAngle:90-w0>t0.touchAngle)}if(r0.isScrolling&&i0.emit("touchMoveOpposite",a0),typeof r0.startMoving>"u"&&(n0.currentX!==n0.startX||n0.currentY!==n0.startY)&&(r0.startMoving=!0),r0.isScrolling||i0.zoom&&i0.params.zoom&&i0.params.zoom.enabled&&r0.evCache.length>1){r0.isTouched=!1;return}if(!r0.startMoving)return;i0.allowClick=!1,!t0.cssMode&&a0.cancelable&&a0.preventDefault(),t0.touchMoveStopPropagation&&!t0.nested&&a0.stopPropagation();let d0=i0.isHorizontal()?c0:k0,h0=i0.isHorizontal()?n0.currentX-n0.previousX:n0.currentY-n0.previousY;t0.oneWayMovement&&(d0=Math.abs(d0)*(s0?1:-1),h0=Math.abs(h0)*(s0?1:-1)),n0.diff=d0,d0*=t0.touchRatio,s0&&(d0=-d0,h0=-h0);const b0=i0.touchesDirection;i0.swipeDirection=d0>0?"prev":"next",i0.touchesDirection=h0>0?"prev":"next";const p0=i0.params.loop&&!t0.cssMode;if(!r0.isMoved){if(p0&&i0.loopFix({direction:i0.swipeDirection}),r0.startTranslate=i0.getTranslate(),i0.setTransition(0),i0.animating){const w0=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});i0.wrapperEl.dispatchEvent(w0)}r0.allowMomentumBounce=!1,t0.grabCursor&&(i0.allowSlideNext===!0||i0.allowSlidePrev===!0)&&i0.setGrabCursor(!0),i0.emit("sliderFirstMove",a0)}let m0;r0.isMoved&&b0!==i0.touchesDirection&&p0&&Math.abs(d0)>=1&&(i0.loopFix({direction:i0.swipeDirection,setTranslate:!0}),m0=!0),i0.emit("sliderMove",a0),r0.isMoved=!0,r0.currentTranslate=d0+r0.startTranslate;let g0=!0,v0=t0.resistanceRatio;if(t0.touchReleaseOnEdges&&(v0=0),d0>0?(p0&&!m0&&r0.currentTranslate>(t0.centeredSlides?i0.minTranslate()-i0.size/2:i0.minTranslate())&&i0.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r0.currentTranslate>i0.minTranslate()&&(g0=!1,t0.resistance&&(r0.currentTranslate=i0.minTranslate()-1+(-i0.minTranslate()+r0.startTranslate+d0)**v0))):d0<0&&(p0&&!m0&&r0.currentTranslate<(t0.centeredSlides?i0.maxTranslate()+i0.size/2:i0.maxTranslate())&&i0.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:i0.slides.length-(t0.slidesPerView==="auto"?i0.slidesPerViewDynamic():Math.ceil(parseFloat(t0.slidesPerView,10)))}),r0.currentTranslate<i0.maxTranslate()&&(g0=!1,t0.resistance&&(r0.currentTranslate=i0.maxTranslate()+1-(i0.maxTranslate()-r0.startTranslate-d0)**v0))),g0&&(a0.preventedByNestedSwiper=!0),!i0.allowSlideNext&&i0.swipeDirection==="next"&&r0.currentTranslate<r0.startTranslate&&(r0.currentTranslate=r0.startTranslate),!i0.allowSlidePrev&&i0.swipeDirection==="prev"&&r0.currentTranslate>r0.startTranslate&&(r0.currentTranslate=r0.startTranslate),!i0.allowSlidePrev&&!i0.allowSlideNext&&(r0.currentTranslate=r0.startTranslate),t0.threshold>0)if(Math.abs(d0)>t0.threshold||r0.allowThresholdMove){if(!r0.allowThresholdMove){r0.allowThresholdMove=!0,n0.startX=n0.currentX,n0.startY=n0.currentY,r0.currentTranslate=r0.startTranslate,n0.diff=i0.isHorizontal()?n0.currentX-n0.startX:n0.currentY-n0.startY;return}}else{r0.currentTranslate=r0.startTranslate;return}!t0.followFinger||t0.cssMode||((t0.freeMode&&t0.freeMode.enabled&&i0.freeMode||t0.watchSlidesProgress)&&(i0.updateActiveIndex(),i0.updateSlidesClasses()),t0.freeMode&&t0.freeMode.enabled&&i0.freeMode&&i0.freeMode.onTouchMove(),i0.updateProgress(r0.currentTranslate),i0.setTranslate(r0.currentTranslate))}function onTouchEnd(e0){const _e=this,i0=_e.touchEventsData,r0=i0.evCache.findIndex(m0=>m0.pointerId===e0.pointerId);if(r0>=0&&i0.evCache.splice(r0,1),["pointercancel","pointerout","pointerleave"].includes(e0.type)&&!(e0.type==="pointercancel"&&(_e.browser.isSafari||_e.browser.isWebView)))return;const{params:t0,touches:n0,rtlTranslate:s0,slidesGrid:o0,enabled:a0}=_e;if(!a0||!t0.simulateTouch&&e0.pointerType==="mouse")return;let f0=e0;if(f0.originalEvent&&(f0=f0.originalEvent),i0.allowTouchCallbacks&&_e.emit("touchEnd",f0),i0.allowTouchCallbacks=!1,!i0.isTouched){i0.isMoved&&t0.grabCursor&&_e.setGrabCursor(!1),i0.isMoved=!1,i0.startMoving=!1;return}t0.grabCursor&&i0.isMoved&&i0.isTouched&&(_e.allowSlideNext===!0||_e.allowSlidePrev===!0)&&_e.setGrabCursor(!1);const l0=now(),u0=l0-i0.touchStartTime;if(_e.allowClick){const m0=f0.path||f0.composedPath&&f0.composedPath();_e.updateClickedSlide(m0&&m0[0]||f0.target),_e.emit("tap click",f0),u0<300&&l0-i0.lastClickTime<300&&_e.emit("doubleTap doubleClick",f0)}if(i0.lastClickTime=now(),nextTick(()=>{_e.destroyed||(_e.allowClick=!0)}),!i0.isTouched||!i0.isMoved||!_e.swipeDirection||n0.diff===0||i0.currentTranslate===i0.startTranslate){i0.isTouched=!1,i0.isMoved=!1,i0.startMoving=!1;return}i0.isTouched=!1,i0.isMoved=!1,i0.startMoving=!1;let A0;if(t0.followFinger?A0=s0?_e.translate:-_e.translate:A0=-i0.currentTranslate,t0.cssMode)return;if(t0.freeMode&&t0.freeMode.enabled){_e.freeMode.onTouchEnd({currentPos:A0});return}let c0=0,k0=_e.slidesSizesGrid[0];for(let m0=0;m0<o0.length;m0+=m0<t0.slidesPerGroupSkip?1:t0.slidesPerGroup){const g0=m0<t0.slidesPerGroupSkip-1?1:t0.slidesPerGroup;typeof o0[m0+g0]<"u"?A0>=o0[m0]&&A0<o0[m0+g0]&&(c0=m0,k0=o0[m0+g0]-o0[m0]):A0>=o0[m0]&&(c0=m0,k0=o0[o0.length-1]-o0[o0.length-2])}let d0=null,h0=null;t0.rewind&&(_e.isBeginning?h0=t0.virtual&&t0.virtual.enabled&&_e.virtual?_e.virtual.slides.length-1:_e.slides.length-1:_e.isEnd&&(d0=0));const b0=(A0-o0[c0])/k0,p0=c0<t0.slidesPerGroupSkip-1?1:t0.slidesPerGroup;if(u0>t0.longSwipesMs){if(!t0.longSwipes){_e.slideTo(_e.activeIndex);return}_e.swipeDirection==="next"&&(b0>=t0.longSwipesRatio?_e.slideTo(t0.rewind&&_e.isEnd?d0:c0+p0):_e.slideTo(c0)),_e.swipeDirection==="prev"&&(b0>1-t0.longSwipesRatio?_e.slideTo(c0+p0):h0!==null&&b0<0&&Math.abs(b0)>t0.longSwipesRatio?_e.slideTo(h0):_e.slideTo(c0))}else{if(!t0.shortSwipes){_e.slideTo(_e.activeIndex);return}_e.navigation&&(f0.target===_e.navigation.nextEl||f0.target===_e.navigation.prevEl)?f0.target===_e.navigation.nextEl?_e.slideTo(c0+p0):_e.slideTo(c0):(_e.swipeDirection==="next"&&_e.slideTo(d0!==null?d0:c0+p0),_e.swipeDirection==="prev"&&_e.slideTo(h0!==null?h0:c0))}}function onResize(){const e0=this,{params:_e,el:i0}=e0;if(i0&&i0.offsetWidth===0)return;_e.breakpoints&&e0.setBreakpoint();const{allowSlideNext:r0,allowSlidePrev:t0,snapGrid:n0}=e0,s0=e0.virtual&&e0.params.virtual.enabled;e0.allowSlideNext=!0,e0.allowSlidePrev=!0,e0.updateSize(),e0.updateSlides(),e0.updateSlidesClasses();const o0=s0&&_e.loop;(_e.slidesPerView==="auto"||_e.slidesPerView>1)&&e0.isEnd&&!e0.isBeginning&&!e0.params.centeredSlides&&!o0?e0.slideTo(e0.slides.length-1,0,!1,!0):e0.params.loop&&!s0?e0.slideToLoop(e0.realIndex,0,!1,!0):e0.slideTo(e0.activeIndex,0,!1,!0),e0.autoplay&&e0.autoplay.running&&e0.autoplay.paused&&(clearTimeout(e0.autoplay.resizeTimeout),e0.autoplay.resizeTimeout=setTimeout(()=>{e0.autoplay&&e0.autoplay.running&&e0.autoplay.paused&&e0.autoplay.resume()},500)),e0.allowSlidePrev=t0,e0.allowSlideNext=r0,e0.params.watchOverflow&&n0!==e0.snapGrid&&e0.checkOverflow()}function onClick(e0){const _e=this;_e.enabled&&(_e.allowClick||(_e.params.preventClicks&&e0.preventDefault(),_e.params.preventClicksPropagation&&_e.animating&&(e0.stopPropagation(),e0.stopImmediatePropagation())))}function onScroll(){const e0=this,{wrapperEl:_e,rtlTranslate:i0,enabled:r0}=e0;if(!r0)return;e0.previousTranslate=e0.translate,e0.isHorizontal()?e0.translate=-_e.scrollLeft:e0.translate=-_e.scrollTop,e0.translate===0&&(e0.translate=0),e0.updateActiveIndex(),e0.updateSlidesClasses();let t0;const n0=e0.maxTranslate()-e0.minTranslate();n0===0?t0=0:t0=(e0.translate-e0.minTranslate())/n0,t0!==e0.progress&&e0.updateProgress(i0?-e0.translate:e0.translate),e0.emit("setTranslate",e0.translate,!1)}function onLoad(e0){const _e=this;processLazyPreloader(_e,e0.target),!(_e.params.cssMode||_e.params.slidesPerView!=="auto"&&!_e.params.autoHeight)&&_e.update()}let dummyEventAttached=!1;function dummyEventListener(){}const events$3=(e0,_e)=>{const i0=getDocument(),{params:r0,el:t0,wrapperEl:n0,device:s0}=e0,o0=!!r0.nested,a0=_e==="on"?"addEventListener":"removeEventListener",f0=_e;t0[a0]("pointerdown",e0.onTouchStart,{passive:!1}),i0[a0]("pointermove",e0.onTouchMove,{passive:!1,capture:o0}),i0[a0]("pointerup",e0.onTouchEnd,{passive:!0}),i0[a0]("pointercancel",e0.onTouchEnd,{passive:!0}),i0[a0]("pointerout",e0.onTouchEnd,{passive:!0}),i0[a0]("pointerleave",e0.onTouchEnd,{passive:!0}),(r0.preventClicks||r0.preventClicksPropagation)&&t0[a0]("click",e0.onClick,!0),r0.cssMode&&n0[a0]("scroll",e0.onScroll),r0.updateOnWindowResize?e0[f0](s0.ios||s0.android?"resize orientationchange observerUpdate":"resize observerUpdate",onResize,!0):e0[f0]("observerUpdate",onResize,!0),t0[a0]("load",e0.onLoad,{capture:!0})};function attachEvents(){const e0=this,_e=getDocument(),{params:i0}=e0;e0.onTouchStart=onTouchStart.bind(e0),e0.onTouchMove=onTouchMove.bind(e0),e0.onTouchEnd=onTouchEnd.bind(e0),i0.cssMode&&(e0.onScroll=onScroll.bind(e0)),e0.onClick=onClick.bind(e0),e0.onLoad=onLoad.bind(e0),dummyEventAttached||(_e.addEventListener("touchstart",dummyEventListener),dummyEventAttached=!0),events$3(e0,"on")}function detachEvents(){events$3(this,"off")}var events$1$1={attachEvents,detachEvents};const isGridEnabled=(e0,_e)=>e0.grid&&_e.grid&&_e.grid.rows>1;function setBreakpoint(){const e0=this,{realIndex:_e,initialized:i0,params:r0,el:t0}=e0,n0=r0.breakpoints;if(!n0||n0&&Object.keys(n0).length===0)return;const s0=e0.getBreakpoint(n0,e0.params.breakpointsBase,e0.el);if(!s0||e0.currentBreakpoint===s0)return;const a0=(s0 in n0?n0[s0]:void 0)||e0.originalParams,f0=isGridEnabled(e0,r0),l0=isGridEnabled(e0,a0),u0=r0.enabled;f0&&!l0?(t0.classList.remove(`${r0.containerModifierClass}grid`,`${r0.containerModifierClass}grid-column`),e0.emitContainerClasses()):!f0&&l0&&(t0.classList.add(`${r0.containerModifierClass}grid`),(a0.grid.fill&&a0.grid.fill==="column"||!a0.grid.fill&&r0.grid.fill==="column")&&t0.classList.add(`${r0.containerModifierClass}grid-column`),e0.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(d0=>{if(typeof a0[d0]>"u")return;const h0=r0[d0]&&r0[d0].enabled,b0=a0[d0]&&a0[d0].enabled;h0&&!b0&&e0[d0].disable(),!h0&&b0&&e0[d0].enable()});const A0=a0.direction&&a0.direction!==r0.direction,c0=r0.loop&&(a0.slidesPerView!==r0.slidesPerView||A0);A0&&i0&&e0.changeDirection(),extend$1(e0.params,a0);const k0=e0.params.enabled;Object.assign(e0,{allowTouchMove:e0.params.allowTouchMove,allowSlideNext:e0.params.allowSlideNext,allowSlidePrev:e0.params.allowSlidePrev}),u0&&!k0?e0.disable():!u0&&k0&&e0.enable(),e0.currentBreakpoint=s0,e0.emit("_beforeBreakpoint",a0),c0&&i0&&(e0.loopDestroy(),e0.loopCreate(_e),e0.updateSlides()),e0.emit("breakpoint",a0)}function getBreakpoint(e0,_e,i0){if(_e===void 0&&(_e="window"),!e0||_e==="container"&&!i0)return;let r0=!1;const t0=getWindow$2(),n0=_e==="window"?t0.innerHeight:i0.clientHeight,s0=Object.keys(e0).map(o0=>{if(typeof o0=="string"&&o0.indexOf("@")===0){const a0=parseFloat(o0.substr(1));return{value:n0*a0,point:o0}}return{value:o0,point:o0}});s0.sort((o0,a0)=>parseInt(o0.value,10)-parseInt(a0.value,10));for(let o0=0;o0<s0.length;o0+=1){const{point:a0,value:f0}=s0[o0];_e==="window"?t0.matchMedia(`(min-width: ${f0}px)`).matches&&(r0=a0):f0<=i0.clientWidth&&(r0=a0)}return r0||"max"}var breakpoints={setBreakpoint,getBreakpoint};function prepareClasses(e0,_e){const i0=[];return e0.forEach(r0=>{typeof r0=="object"?Object.keys(r0).forEach(t0=>{r0[t0]&&i0.push(_e+t0)}):typeof r0=="string"&&i0.push(_e+r0)}),i0}function addClasses(){const e0=this,{classNames:_e,params:i0,rtl:r0,el:t0,device:n0}=e0,s0=prepareClasses(["initialized",i0.direction,{"free-mode":e0.params.freeMode&&i0.freeMode.enabled},{autoheight:i0.autoHeight},{rtl:r0},{grid:i0.grid&&i0.grid.rows>1},{"grid-column":i0.grid&&i0.grid.rows>1&&i0.grid.fill==="column"},{android:n0.android},{ios:n0.ios},{"css-mode":i0.cssMode},{centered:i0.cssMode&&i0.centeredSlides},{"watch-progress":i0.watchSlidesProgress}],i0.containerModifierClass);_e.push(...s0),t0.classList.add(..._e),e0.emitContainerClasses()}function removeClasses(){const e0=this,{el:_e,classNames:i0}=e0;_e.classList.remove(...i0),e0.emitContainerClasses()}var classes={addClasses,removeClasses};function checkOverflow(){const e0=this,{isLocked:_e,params:i0}=e0,{slidesOffsetBefore:r0}=i0;if(r0){const t0=e0.slides.length-1,n0=e0.slidesGrid[t0]+e0.slidesSizesGrid[t0]+r0*2;e0.isLocked=e0.size>n0}else e0.isLocked=e0.snapGrid.length===1;i0.allowSlideNext===!0&&(e0.allowSlideNext=!e0.isLocked),i0.allowSlidePrev===!0&&(e0.allowSlidePrev=!e0.isLocked),_e&&_e!==e0.isLocked&&(e0.isEnd=!1),_e!==e0.isLocked&&e0.emit(e0.isLocked?"lock":"unlock")}var checkOverflow$1={checkOverflow},defaults$1={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function moduleExtendParams(e0,_e){return function(r0){r0===void 0&&(r0={});const t0=Object.keys(r0)[0],n0=r0[t0];if(typeof n0!="object"||n0===null){extend$1(_e,r0);return}if(["navigation","pagination","scrollbar"].indexOf(t0)>=0&&e0[t0]===!0&&(e0[t0]={auto:!0}),!(t0 in e0&&"enabled"in n0)){extend$1(_e,r0);return}e0[t0]===!0&&(e0[t0]={enabled:!0}),typeof e0[t0]=="object"&&!("enabled"in e0[t0])&&(e0[t0].enabled=!0),e0[t0]||(e0[t0]={enabled:!1}),extend$1(_e,r0)}}const prototypes={eventsEmitter,update,translate,transition,slide,loop,grabCursor,events:events$1$1,breakpoints,checkOverflow:checkOverflow$1,classes},extendedDefaults={};let Swiper$1=class or{constructor(){let _e,i0;for(var r0=arguments.length,t0=new Array(r0),n0=0;n0<r0;n0++)t0[n0]=arguments[n0];t0.length===1&&t0[0].constructor&&Object.prototype.toString.call(t0[0]).slice(8,-1)==="Object"?i0=t0[0]:[_e,i0]=t0,i0||(i0={}),i0=extend$1({},i0),_e&&!i0.el&&(i0.el=_e);const s0=getDocument();if(i0.el&&typeof i0.el=="string"&&s0.querySelectorAll(i0.el).length>1){const l0=[];return s0.querySelectorAll(i0.el).forEach(u0=>{const A0=extend$1({},i0,{el:u0});l0.push(new or(A0))}),l0}const o0=this;o0.__swiper__=!0,o0.support=getSupport(),o0.device=getDevice({userAgent:i0.userAgent}),o0.browser=getBrowser(),o0.eventsListeners={},o0.eventsAnyListeners=[],o0.modules=[...o0.__modules__],i0.modules&&Array.isArray(i0.modules)&&o0.modules.push(...i0.modules);const a0={};o0.modules.forEach(l0=>{l0({params:i0,swiper:o0,extendParams:moduleExtendParams(i0,a0),on:o0.on.bind(o0),once:o0.once.bind(o0),off:o0.off.bind(o0),emit:o0.emit.bind(o0)})});const f0=extend$1({},defaults$1,a0);return o0.params=extend$1({},f0,extendedDefaults,i0),o0.originalParams=extend$1({},o0.params),o0.passedParams=extend$1({},i0),o0.params&&o0.params.on&&Object.keys(o0.params.on).forEach(l0=>{o0.on(l0,o0.params.on[l0])}),o0.params&&o0.params.onAny&&o0.onAny(o0.params.onAny),Object.assign(o0,{enabled:o0.params.enabled,el:_e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return o0.params.direction==="horizontal"},isVertical(){return o0.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:o0.params.allowSlideNext,allowSlidePrev:o0.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:o0.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:o0.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o0.emit("_swiper"),o0.params.init&&o0.init(),o0}getSlideIndex(_e){const{slidesEl:i0,params:r0}=this,t0=elementChildren(i0,`.${r0.slideClass}, swiper-slide`),n0=elementIndex(t0[0]);return elementIndex(_e)-n0}getSlideIndexByData(_e){return this.getSlideIndex(this.slides.filter(i0=>i0.getAttribute("data-swiper-slide-index")*1===_e)[0])}recalcSlides(){const _e=this,{slidesEl:i0,params:r0}=_e;_e.slides=elementChildren(i0,`.${r0.slideClass}, swiper-slide`)}enable(){const _e=this;_e.enabled||(_e.enabled=!0,_e.params.grabCursor&&_e.setGrabCursor(),_e.emit("enable"))}disable(){const _e=this;_e.enabled&&(_e.enabled=!1,_e.params.grabCursor&&_e.unsetGrabCursor(),_e.emit("disable"))}setProgress(_e,i0){const r0=this;_e=Math.min(Math.max(_e,0),1);const t0=r0.minTranslate(),s0=(r0.maxTranslate()-t0)*_e+t0;r0.translateTo(s0,typeof i0>"u"?0:i0),r0.updateActiveIndex(),r0.updateSlidesClasses()}emitContainerClasses(){const _e=this;if(!_e.params._emitClasses||!_e.el)return;const i0=_e.el.className.split(" ").filter(r0=>r0.indexOf("swiper")===0||r0.indexOf(_e.params.containerModifierClass)===0);_e.emit("_containerClasses",i0.join(" "))}getSlideClasses(_e){const i0=this;return i0.destroyed?"":_e.className.split(" ").filter(r0=>r0.indexOf("swiper-slide")===0||r0.indexOf(i0.params.slideClass)===0).join(" ")}emitSlidesClasses(){const _e=this;if(!_e.params._emitClasses||!_e.el)return;const i0=[];_e.slides.forEach(r0=>{const t0=_e.getSlideClasses(r0);i0.push({slideEl:r0,classNames:t0}),_e.emit("_slideClass",r0,t0)}),_e.emit("_slideClasses",i0)}slidesPerViewDynamic(_e,i0){_e===void 0&&(_e="current"),i0===void 0&&(i0=!1);const r0=this,{params:t0,slides:n0,slidesGrid:s0,slidesSizesGrid:o0,size:a0,activeIndex:f0}=r0;let l0=1;if(t0.centeredSlides){let u0=n0[f0]?n0[f0].swiperSlideSize:0,A0;for(let c0=f0+1;c0<n0.length;c0+=1)n0[c0]&&!A0&&(u0+=n0[c0].swiperSlideSize,l0+=1,u0>a0&&(A0=!0));for(let c0=f0-1;c0>=0;c0-=1)n0[c0]&&!A0&&(u0+=n0[c0].swiperSlideSize,l0+=1,u0>a0&&(A0=!0))}else if(_e==="current")for(let u0=f0+1;u0<n0.length;u0+=1)(i0?s0[u0]+o0[u0]-s0[f0]<a0:s0[u0]-s0[f0]<a0)&&(l0+=1);else for(let u0=f0-1;u0>=0;u0-=1)s0[f0]-s0[u0]<a0&&(l0+=1);return l0}update(){const _e=this;if(!_e||_e.destroyed)return;const{snapGrid:i0,params:r0}=_e;r0.breakpoints&&_e.setBreakpoint(),[..._e.el.querySelectorAll('[loading="lazy"]')].forEach(s0=>{s0.complete&&processLazyPreloader(_e,s0)}),_e.updateSize(),_e.updateSlides(),_e.updateProgress(),_e.updateSlidesClasses();function t0(){const s0=_e.rtlTranslate?_e.translate*-1:_e.translate,o0=Math.min(Math.max(s0,_e.maxTranslate()),_e.minTranslate());_e.setTranslate(o0),_e.updateActiveIndex(),_e.updateSlidesClasses()}let n0;if(r0.freeMode&&r0.freeMode.enabled&&!r0.cssMode)t0(),r0.autoHeight&&_e.updateAutoHeight();else{if((r0.slidesPerView==="auto"||r0.slidesPerView>1)&&_e.isEnd&&!r0.centeredSlides){const s0=_e.virtual&&r0.virtual.enabled?_e.virtual.slides:_e.slides;n0=_e.slideTo(s0.length-1,0,!1,!0)}else n0=_e.slideTo(_e.activeIndex,0,!1,!0);n0||t0()}r0.watchOverflow&&i0!==_e.snapGrid&&_e.checkOverflow(),_e.emit("update")}changeDirection(_e,i0){i0===void 0&&(i0=!0);const r0=this,t0=r0.params.direction;return _e||(_e=t0==="horizontal"?"vertical":"horizontal"),_e===t0||_e!=="horizontal"&&_e!=="vertical"||(r0.el.classList.remove(`${r0.params.containerModifierClass}${t0}`),r0.el.classList.add(`${r0.params.containerModifierClass}${_e}`),r0.emitContainerClasses(),r0.params.direction=_e,r0.slides.forEach(n0=>{_e==="vertical"?n0.style.width="":n0.style.height=""}),r0.emit("changeDirection"),i0&&r0.update()),r0}changeLanguageDirection(_e){const i0=this;i0.rtl&&_e==="rtl"||!i0.rtl&&_e==="ltr"||(i0.rtl=_e==="rtl",i0.rtlTranslate=i0.params.direction==="horizontal"&&i0.rtl,i0.rtl?(i0.el.classList.add(`${i0.params.containerModifierClass}rtl`),i0.el.dir="rtl"):(i0.el.classList.remove(`${i0.params.containerModifierClass}rtl`),i0.el.dir="ltr"),i0.update())}mount(_e){const i0=this;if(i0.mounted)return!0;let r0=_e||i0.params.el;if(typeof r0=="string"&&(r0=document.querySelector(r0)),!r0)return!1;r0.swiper=i0,r0.parentNode&&r0.parentNode.host&&r0.parentNode.host.nodeName==="SWIPER-CONTAINER"&&(i0.isElement=!0);const t0=()=>`.${(i0.params.wrapperClass||"").trim().split(" ").join(".")}`;let s0=r0&&r0.shadowRoot&&r0.shadowRoot.querySelector?r0.shadowRoot.querySelector(t0()):elementChildren(r0,t0())[0];return!s0&&i0.params.createElements&&(s0=createElement("div",i0.params.wrapperClass),r0.append(s0),elementChildren(r0,`.${i0.params.slideClass}`).forEach(o0=>{s0.append(o0)})),Object.assign(i0,{el:r0,wrapperEl:s0,slidesEl:i0.isElement&&!r0.parentNode.host.slideSlots?r0.parentNode.host:s0,hostEl:i0.isElement?r0.parentNode.host:r0,mounted:!0,rtl:r0.dir.toLowerCase()==="rtl"||elementStyle(r0,"direction")==="rtl",rtlTranslate:i0.params.direction==="horizontal"&&(r0.dir.toLowerCase()==="rtl"||elementStyle(r0,"direction")==="rtl"),wrongRTL:elementStyle(s0,"display")==="-webkit-box"}),!0}init(_e){const i0=this;return i0.initialized||i0.mount(_e)===!1||(i0.emit("beforeInit"),i0.params.breakpoints&&i0.setBreakpoint(),i0.addClasses(),i0.updateSize(),i0.updateSlides(),i0.params.watchOverflow&&i0.checkOverflow(),i0.params.grabCursor&&i0.enabled&&i0.setGrabCursor(),i0.params.loop&&i0.virtual&&i0.params.virtual.enabled?i0.slideTo(i0.params.initialSlide+i0.virtual.slidesBefore,0,i0.params.runCallbacksOnInit,!1,!0):i0.slideTo(i0.params.initialSlide,0,i0.params.runCallbacksOnInit,!1,!0),i0.params.loop&&i0.loopCreate(),i0.attachEvents(),[...i0.el.querySelectorAll('[loading="lazy"]')].forEach(t0=>{t0.complete?processLazyPreloader(i0,t0):t0.addEventListener("load",n0=>{processLazyPreloader(i0,n0.target)})}),preload(i0),i0.initialized=!0,preload(i0),i0.emit("init"),i0.emit("afterInit")),i0}destroy(_e,i0){_e===void 0&&(_e=!0),i0===void 0&&(i0=!0);const r0=this,{params:t0,el:n0,wrapperEl:s0,slides:o0}=r0;return typeof r0.params>"u"||r0.destroyed||(r0.emit("beforeDestroy"),r0.initialized=!1,r0.detachEvents(),t0.loop&&r0.loopDestroy(),i0&&(r0.removeClasses(),n0.removeAttribute("style"),s0.removeAttribute("style"),o0&&o0.length&&o0.forEach(a0=>{a0.classList.remove(t0.slideVisibleClass,t0.slideActiveClass,t0.slideNextClass,t0.slidePrevClass),a0.removeAttribute("style"),a0.removeAttribute("data-swiper-slide-index")})),r0.emit("destroy"),Object.keys(r0.eventsListeners).forEach(a0=>{r0.off(a0)}),_e!==!1&&(r0.el.swiper=null,deleteProps(r0)),r0.destroyed=!0),null}static extendDefaults(_e){extend$1(extendedDefaults,_e)}static get extendedDefaults(){return extendedDefaults}static get defaults(){return defaults$1}static installModule(_e){or.prototype.__modules__||(or.prototype.__modules__=[]);const i0=or.prototype.__modules__;typeof _e=="function"&&i0.indexOf(_e)<0&&i0.push(_e)}static use(_e){return Array.isArray(_e)?(_e.forEach(i0=>or.installModule(i0)),or):(or.installModule(_e),or)}};Object.keys(prototypes).forEach(e0=>{Object.keys(prototypes[e0]).forEach(_e=>{Swiper$1.prototype[_e]=prototypes[e0][_e]})});Swiper$1.use([Resize,Observer]);const paramsList=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopedSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideNextClass","slidePrevClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function isObject$2(e0){return typeof e0=="object"&&e0!==null&&e0.constructor&&Object.prototype.toString.call(e0).slice(8,-1)==="Object"}function extend(e0,_e){const i0=["__proto__","constructor","prototype"];Object.keys(_e).filter(r0=>i0.indexOf(r0)<0).forEach(r0=>{typeof e0[r0]>"u"?e0[r0]=_e[r0]:isObject$2(_e[r0])&&isObject$2(e0[r0])&&Object.keys(_e[r0]).length>0?_e[r0].__swiper__?e0[r0]=_e[r0]:extend(e0[r0],_e[r0]):e0[r0]=_e[r0]})}function needsNavigation(e0){return e0===void 0&&(e0={}),e0.navigation&&typeof e0.navigation.nextEl>"u"&&typeof e0.navigation.prevEl>"u"}function needsPagination(e0){return e0===void 0&&(e0={}),e0.pagination&&typeof e0.pagination.el>"u"}function needsScrollbar(e0){return e0===void 0&&(e0={}),e0.scrollbar&&typeof e0.scrollbar.el>"u"}function uniqueClasses(e0){e0===void 0&&(e0="");const _e=e0.split(" ").map(r0=>r0.trim()).filter(r0=>!!r0),i0=[];return _e.forEach(r0=>{i0.indexOf(r0)<0&&i0.push(r0)}),i0.join(" ")}function wrapperClass(e0){return e0===void 0&&(e0=""),e0?e0.includes("swiper-wrapper")?e0:`swiper-wrapper ${e0}`:"swiper-wrapper"}function updateSwiper(e0){let{swiper:_e,slides:i0,passedParams:r0,changedParams:t0,nextEl:n0,prevEl:s0,scrollbarEl:o0,paginationEl:a0}=e0;const f0=t0.filter(y0=>y0!=="children"&&y0!=="direction"&&y0!=="wrapperClass"),{params:l0,pagination:u0,navigation:A0,scrollbar:c0,virtual:k0,thumbs:d0}=_e;let h0,b0,p0,m0,g0,v0,w0,x0;t0.includes("thumbs")&&r0.thumbs&&r0.thumbs.swiper&&l0.thumbs&&!l0.thumbs.swiper&&(h0=!0),t0.includes("controller")&&r0.controller&&r0.controller.control&&l0.controller&&!l0.controller.control&&(b0=!0),t0.includes("pagination")&&r0.pagination&&(r0.pagination.el||a0)&&(l0.pagination||l0.pagination===!1)&&u0&&!u0.el&&(p0=!0),t0.includes("scrollbar")&&r0.scrollbar&&(r0.scrollbar.el||o0)&&(l0.scrollbar||l0.scrollbar===!1)&&c0&&!c0.el&&(m0=!0),t0.includes("navigation")&&r0.navigation&&(r0.navigation.prevEl||s0)&&(r0.navigation.nextEl||n0)&&(l0.navigation||l0.navigation===!1)&&A0&&!A0.prevEl&&!A0.nextEl&&(g0=!0);const _0=y0=>{_e[y0]&&(_e[y0].destroy(),y0==="navigation"?(_e.isElement&&(_e[y0].prevEl.remove(),_e[y0].nextEl.remove()),l0[y0].prevEl=void 0,l0[y0].nextEl=void 0,_e[y0].prevEl=void 0,_e[y0].nextEl=void 0):(_e.isElement&&_e[y0].el.remove(),l0[y0].el=void 0,_e[y0].el=void 0))};t0.includes("loop")&&_e.isElement&&(l0.loop&&!r0.loop?v0=!0:!l0.loop&&r0.loop?w0=!0:x0=!0),f0.forEach(y0=>{if(isObject$2(l0[y0])&&isObject$2(r0[y0]))extend(l0[y0],r0[y0]),(y0==="navigation"||y0==="pagination"||y0==="scrollbar")&&"enabled"in r0[y0]&&!r0[y0].enabled&&_0(y0);else{const S0=r0[y0];(S0===!0||S0===!1)&&(y0==="navigation"||y0==="pagination"||y0==="scrollbar")?S0===!1&&_0(y0):l0[y0]=r0[y0]}}),f0.includes("controller")&&!b0&&_e.controller&&_e.controller.control&&l0.controller&&l0.controller.control&&(_e.controller.control=l0.controller.control),t0.includes("children")&&i0&&k0&&l0.virtual.enabled&&(k0.slides=i0,k0.update(!0)),t0.includes("children")&&i0&&l0.loop&&(x0=!0),h0&&d0.init()&&d0.update(!0),b0&&(_e.controller.control=l0.controller.control),p0&&(_e.isElement&&(!a0||typeof a0=="string")&&(a0=document.createElement("div"),a0.classList.add("swiper-pagination"),_e.el.appendChild(a0)),a0&&(l0.pagination.el=a0),u0.init(),u0.render(),u0.update()),m0&&(_e.isElement&&(!o0||typeof o0=="string")&&(o0=document.createElement("div"),o0.classList.add("swiper-scrollbar"),_e.el.appendChild(o0)),o0&&(l0.scrollbar.el=o0),c0.init(),c0.updateSize(),c0.setTranslate()),g0&&(_e.isElement&&((!n0||typeof n0=="string")&&(n0=document.createElement("div"),n0.classList.add("swiper-button-next"),n0.innerHTML=_e.hostEl.nextButtonSvg,_e.el.appendChild(n0)),(!s0||typeof s0=="string")&&(s0=document.createElement("div"),s0.classList.add("swiper-button-prev"),n0.innerHTML=_e.hostEl.prevButtonSvg,_e.el.appendChild(s0))),n0&&(l0.navigation.nextEl=n0),s0&&(l0.navigation.prevEl=s0),A0.init(),A0.update()),t0.includes("allowSlideNext")&&(_e.allowSlideNext=r0.allowSlideNext),t0.includes("allowSlidePrev")&&(_e.allowSlidePrev=r0.allowSlidePrev),t0.includes("direction")&&_e.changeDirection(r0.direction,!1),(v0||x0)&&_e.loopDestroy(),(w0||x0)&&_e.loopCreate(),_e.update()}function getParams(e0,_e){e0===void 0&&(e0={}),_e===void 0&&(_e=!0);const i0={on:{}},r0={},t0={};extend(i0,defaults$1),i0._emitClasses=!0,i0.init=!1;const n0={},s0=paramsList.map(a0=>a0.replace(/_/,"")),o0=Object.assign({},e0);return Object.keys(o0).forEach(a0=>{typeof e0[a0]>"u"||(s0.indexOf(a0)>=0?isObject$2(e0[a0])?(i0[a0]={},t0[a0]={},extend(i0[a0],e0[a0]),extend(t0[a0],e0[a0])):(i0[a0]=e0[a0],t0[a0]=e0[a0]):a0.search(/on[A-Z]/)===0&&typeof e0[a0]=="function"?_e?r0[`${a0[2].toLowerCase()}${a0.substr(3)}`]=e0[a0]:i0.on[`${a0[2].toLowerCase()}${a0.substr(3)}`]=e0[a0]:n0[a0]=e0[a0])}),["navigation","pagination","scrollbar"].forEach(a0=>{i0[a0]===!0&&(i0[a0]={}),i0[a0]===!1&&delete i0[a0]}),{params:i0,passedParams:t0,rest:n0,events:r0}}function mountSwiper(e0,_e){let{el:i0,nextEl:r0,prevEl:t0,paginationEl:n0,scrollbarEl:s0,swiper:o0}=e0;needsNavigation(_e)&&r0&&t0&&(o0.params.navigation.nextEl=r0,o0.originalParams.navigation.nextEl=r0,o0.params.navigation.prevEl=t0,o0.originalParams.navigation.prevEl=t0),needsPagination(_e)&&n0&&(o0.params.pagination.el=n0,o0.originalParams.pagination.el=n0),needsScrollbar(_e)&&s0&&(o0.params.scrollbar.el=s0,o0.originalParams.scrollbar.el=s0),o0.init(i0)}function getChangedParams(e0,_e,i0,r0,t0){const n0=[];if(!_e)return n0;const s0=a0=>{n0.indexOf(a0)<0&&n0.push(a0)};if(i0&&r0){const a0=r0.map(t0),f0=i0.map(t0);a0.join("")!==f0.join("")&&s0("children"),r0.length!==i0.length&&s0("children")}return paramsList.filter(a0=>a0[0]==="_").map(a0=>a0.replace(/_/,"")).forEach(a0=>{if(a0 in e0&&a0 in _e)if(isObject$2(e0[a0])&&isObject$2(_e[a0])){const f0=Object.keys(e0[a0]),l0=Object.keys(_e[a0]);f0.length!==l0.length?s0(a0):(f0.forEach(u0=>{e0[a0][u0]!==_e[a0][u0]&&s0(a0)}),l0.forEach(u0=>{e0[a0][u0]!==_e[a0][u0]&&s0(a0)}))}else e0[a0]!==_e[a0]&&s0(a0)}),n0}const updateOnVirtualData=e0=>{!e0||e0.destroyed||!e0.params.virtual||e0.params.virtual&&!e0.params.virtual.enabled||(e0.updateSlides(),e0.updateProgress(),e0.updateSlidesClasses(),e0.parallax&&e0.params.parallax&&e0.params.parallax.enabled&&e0.parallax.setTranslate())};function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(e0){for(var _e=1;_e<arguments.length;_e++){var i0=arguments[_e];for(var r0 in i0)Object.prototype.hasOwnProperty.call(i0,r0)&&(e0[r0]=i0[r0])}return e0},_extends$1.apply(this,arguments)}function isChildSwiperSlide(e0){return e0.type&&e0.type.displayName&&e0.type.displayName.includes("SwiperSlide")}function processChildren(e0){const _e=[];return React$4.Children.toArray(e0).forEach(i0=>{isChildSwiperSlide(i0)?_e.push(i0):i0.props&&i0.props.children&&processChildren(i0.props.children).forEach(r0=>_e.push(r0))}),_e}function getChildren(e0){const _e=[],i0={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return React$4.Children.toArray(e0).forEach(r0=>{if(isChildSwiperSlide(r0))_e.push(r0);else if(r0.props&&r0.props.slot&&i0[r0.props.slot])i0[r0.props.slot].push(r0);else if(r0.props&&r0.props.children){const t0=processChildren(r0.props.children);t0.length>0?t0.forEach(n0=>_e.push(n0)):i0["container-end"].push(r0)}else i0["container-end"].push(r0)}),{slides:_e,slots:i0}}function renderVirtual(e0,_e,i0){if(!i0)return null;const r0=l0=>{let u0=l0;return l0<0?u0=_e.length+l0:u0>=_e.length&&(u0=u0-_e.length),u0},t0=e0.isHorizontal()?{[e0.rtlTranslate?"right":"left"]:`${i0.offset}px`}:{top:`${i0.offset}px`},{from:n0,to:s0}=i0,o0=e0.params.loop?-_e.length:0,a0=e0.params.loop?_e.length*2:_e.length,f0=[];for(let l0=o0;l0<a0;l0+=1)l0>=n0&&l0<=s0&&f0.push(_e[r0(l0)]);return f0.map((l0,u0)=>React$4.cloneElement(l0,{swiper:e0,style:t0,key:`slide-${u0}`}))}function useIsomorphicLayoutEffect$5(e0,_e){return typeof window>"u"?reactExports.useEffect(e0,_e):reactExports.useLayoutEffect(e0,_e)}const SwiperSlideContext=reactExports.createContext(null),SwiperContext=reactExports.createContext(null),Swiper=reactExports.forwardRef(function(e0,_e){let{className:i0,tag:r0="div",wrapperTag:t0="div",children:n0,onSwiper:s0,...o0}=e0===void 0?{}:e0,a0=!1;const[f0,l0]=reactExports.useState("swiper"),[u0,A0]=reactExports.useState(null),[c0,k0]=reactExports.useState(!1),d0=reactExports.useRef(!1),h0=reactExports.useRef(null),b0=reactExports.useRef(null),p0=reactExports.useRef(null),m0=reactExports.useRef(null),g0=reactExports.useRef(null),v0=reactExports.useRef(null),w0=reactExports.useRef(null),x0=reactExports.useRef(null),{params:_0,passedParams:y0,rest:S0,events:B0}=getParams(o0),{slides:I0,slots:F0}=getChildren(n0),C0=()=>{k0(!c0)};Object.assign(_0.on,{_containerClasses(G0,j0){l0(j0)}});const E0=()=>{Object.assign(_0.on,B0),a0=!0;const G0={..._0};if(delete G0.wrapperClass,b0.current=new Swiper$1(G0),b0.current.virtual&&b0.current.params.virtual.enabled){b0.current.virtual.slides=I0;const j0={cache:!1,slides:I0,renderExternal:A0,renderExternalUpdate:!1};extend(b0.current.params.virtual,j0),extend(b0.current.originalParams.virtual,j0)}};h0.current||E0(),b0.current&&b0.current.on("_beforeBreakpoint",C0);const R0=()=>{a0||!B0||!b0.current||Object.keys(B0).forEach(G0=>{b0.current.on(G0,B0[G0])})},M0=()=>{!B0||!b0.current||Object.keys(B0).forEach(G0=>{b0.current.off(G0,B0[G0])})};reactExports.useEffect(()=>()=>{b0.current&&b0.current.off("_beforeBreakpoint",C0)}),reactExports.useEffect(()=>{!d0.current&&b0.current&&(b0.current.emitSlidesClasses(),d0.current=!0)}),useIsomorphicLayoutEffect$5(()=>{if(_e&&(_e.current=h0.current),!!h0.current)return b0.current.destroyed&&E0(),mountSwiper({el:h0.current,nextEl:g0.current,prevEl:v0.current,paginationEl:w0.current,scrollbarEl:x0.current,swiper:b0.current},_0),s0&&s0(b0.current),()=>{b0.current&&!b0.current.destroyed&&b0.current.destroy(!0,!1)}},[]),useIsomorphicLayoutEffect$5(()=>{R0();const G0=getChangedParams(y0,p0.current,I0,m0.current,j0=>j0.key);return p0.current=y0,m0.current=I0,G0.length&&b0.current&&!b0.current.destroyed&&updateSwiper({swiper:b0.current,slides:I0,passedParams:y0,changedParams:G0,nextEl:g0.current,prevEl:v0.current,scrollbarEl:x0.current,paginationEl:w0.current}),()=>{M0()}}),useIsomorphicLayoutEffect$5(()=>{updateOnVirtualData(b0.current)},[u0]);function T0(){return _0.virtual?renderVirtual(b0.current,I0,u0):I0.map((G0,j0)=>React$4.cloneElement(G0,{swiper:b0.current,swiperSlideIndex:j0}))}return React$4.createElement(r0,_extends$1({ref:h0,className:uniqueClasses(`${f0}${i0?` ${i0}`:""}`)},S0),React$4.createElement(SwiperContext.Provider,{value:b0.current},F0["container-start"],React$4.createElement(t0,{className:wrapperClass(_0.wrapperClass)},F0["wrapper-start"],T0(),F0["wrapper-end"]),needsNavigation(_0)&&React$4.createElement(React$4.Fragment,null,React$4.createElement("div",{ref:v0,className:"swiper-button-prev"}),React$4.createElement("div",{ref:g0,className:"swiper-button-next"})),needsScrollbar(_0)&&React$4.createElement("div",{ref:x0,className:"swiper-scrollbar"}),needsPagination(_0)&&React$4.createElement("div",{ref:w0,className:"swiper-pagination"}),F0["container-end"]))});Swiper.displayName="Swiper";const SwiperSlide=reactExports.forwardRef(function(e0,_e){let{tag:i0="div",children:r0,className:t0="",swiper:n0,zoom:s0,lazy:o0,virtualIndex:a0,swiperSlideIndex:f0,...l0}=e0===void 0?{}:e0;const u0=reactExports.useRef(null),[A0,c0]=reactExports.useState("swiper-slide"),[k0,d0]=reactExports.useState(!1);function h0(g0,v0,w0){v0===u0.current&&c0(w0)}useIsomorphicLayoutEffect$5(()=>{if(typeof f0<"u"&&(u0.current.swiperSlideIndex=f0),_e&&(_e.current=u0.current),!(!u0.current||!n0)){if(n0.destroyed){A0!=="swiper-slide"&&c0("swiper-slide");return}return n0.on("_slideClass",h0),()=>{n0&&n0.off("_slideClass",h0)}}}),useIsomorphicLayoutEffect$5(()=>{n0&&u0.current&&!n0.destroyed&&c0(n0.getSlideClasses(u0.current))},[n0]);const b0={isActive:A0.indexOf("swiper-slide-active")>=0,isVisible:A0.indexOf("swiper-slide-visible")>=0,isPrev:A0.indexOf("swiper-slide-prev")>=0,isNext:A0.indexOf("swiper-slide-next")>=0},p0=()=>typeof r0=="function"?r0(b0):r0,m0=()=>{d0(!0)};return React$4.createElement(i0,_extends$1({ref:u0,className:uniqueClasses(`${A0}${t0?` ${t0}`:""}`),"data-swiper-slide-index":a0,onLoad:m0},l0),s0&&React$4.createElement(SwiperSlideContext.Provider,{value:b0},React$4.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s0=="number"?s0:void 0},p0(),o0&&!k0&&React$4.createElement("div",{className:"swiper-lazy-preloader"}))),!s0&&React$4.createElement(SwiperSlideContext.Provider,{value:b0},p0(),o0&&!k0&&React$4.createElement("div",{className:"swiper-lazy-preloader"})))});SwiperSlide.displayName="SwiperSlide";var OnboardingModal$2=reactExports.forwardRef(({id:e0,items:_e,modalOptions:i0={},isOnboardingChange:r0,onDisplayRuleCheck:t0=s0=>({display:s0===!0,nextState:!1})},n0)=>{var w0;let[s0,o0]=reactExports.useState(),[a0,f0]=reactExports.useState(0),{isOpen:l0,isOnboarding:u0,setIsOpen:A0,handleSavePreference:c0}=useOnboardingModal(e0,t0);reactExports.useImperativeHandle(n0,()=>({setIsOpen:A0,handleSavePreference:c0})),reactExports.useEffect(()=>{r0==null||r0(u0)},[u0,r0]),reactExports.useEffect(()=>{let x0=document.createElement("link");return x0.href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",x0.rel="stylesheet",x0.type="text/css",document.head.appendChild(x0),()=>{document.head.removeChild(x0)}},[]);let{t:k0}=useTranslation(),{title:d0,prevText:h0,closeText:b0,nextText:p0}=i0,m0=(s0==null?void 0:s0.activeIndex)!=null&&((w0=_e[s0==null?void 0:s0.activeIndex])!=null&&w0.title)?_e[s0.activeIndex].title:d0,g0=()=>{c0(),f0(0)},v0=()=>{A0(!1),f0(0)};return l0?reactDomExports.createPortal(jsxRuntimeExports.jsxs(Modal,{id:"onboarding-modal","data-testid":"modal-onboarding",size:"md",isOpen:l0,focusId:"nextButtonId",onModalClose:v0,children:[jsxRuntimeExports.jsx(Modal.Header,{onModalClose:v0,centered:!0,children:k0(m0||"explorer.modal.onboarding.trash.title")}),jsxRuntimeExports.jsx(Modal.Body,{children:jsxRuntimeExports.jsx(Swiper,{modules:[Pagination],onSwiper:x0=>{o0(x0)},onSlideChange:x0=>{f0(x0.progress)},pagination:{clickable:!0},children:_e.map((x0,_0)=>jsxRuntimeExports.jsxs(SwiperSlide,{children:[jsxRuntimeExports.jsx(Image$1,{width:"270",height:"140",className:"mx-auto my-12 onboarding-modal-image",loading:"lazy",src:x0.src,alt:k0(x0.alt)}),jsxRuntimeExports.jsx("p",{className:"text-center",dangerouslySetInnerHTML:{__html:k0(x0.text)}})]},_0))})}),jsxRuntimeExports.jsxs(Modal.Footer,{children:[jsxRuntimeExports.jsx(Button,{"data-testid":"modal-onboarding-later",type:"button",color:"tertiary",variant:"ghost",onClick:v0,children:k0("explorer.modal.onboarding.trash.later")}),a0>0&&jsxRuntimeExports.jsx(Button,{"data-testid":"modal-onboarding-previous",type:"button",color:"primary",variant:"outline",onClick:()=>s0.slidePrev(),children:k0(h0||"explorer.modal.onboarding.trash.prev")}),_e.length>1&&a0<1&&jsxRuntimeExports.jsx(Button,{id:"nextButtonId","data-testid":"modal-onboarding-next",type:"button",color:"primary",variant:"filled",onClick:()=>s0.slideNext(),children:k0(p0||"explorer.modal.onboarding.trash.next")}),(_e.length===1||a0===1)&&jsxRuntimeExports.jsx(Button,{"data-testid":"modal-onboarding-close",type:"button",color:"primary",variant:"filled",onClick:()=>{u0?g0():v0()},children:k0(b0||"explorer.modal.onboarding.trash.close")})]})]}),document.getElementById("portal")||document.body):null}),SvgIconMic=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 .5a4.07 4.07 0 0 0-2.812 1.115A3.8 3.8 0 0 0 8 4.364V12a3.8 3.8 0 0 0 1.188 2.748A4.07 4.07 0 0 0 12 15.864a4.07 4.07 0 0 0 2.812-1.116A3.8 3.8 0 0 0 16 12V4.364a3.8 3.8 0 0 0-1.188-2.749A4.07 4.07 0 0 0 12 .5m-1.43 2.562A2.07 2.07 0 0 1 12 2.5c.545 0 1.059.207 1.43.562.371.354.57.823.57 1.302V12a1.8 1.8 0 0 1-.57 1.302 2.07 2.07 0 0 1-1.43.562 2.07 2.07 0 0 1-1.43-.562A1.8 1.8 0 0 1 10 12V4.364a1.8 1.8 0 0 1 .57-1.302M6 10.091a1 1 0 0 0-2 0V12c0 2.053.855 4.011 2.36 5.448A8.13 8.13 0 0 0 11 19.622V21.5H8a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2h-3v-1.878a8.13 8.13 0 0 0 4.64-2.174C19.145 16.011 20 14.053 20 12v-1.91a1 1 0 0 0-2 0V12c0 1.491-.62 2.932-1.74 4.001s-2.646 1.678-4.248 1.68h-.024c-1.602-.002-3.128-.611-4.247-1.68C6.62 14.931 6 13.491 6 12z",clipRule:"evenodd"})]}),RECORD_NAME_DATE_FORMAT="YYYY-MM-DD HH[h]mm",SvgIconPause=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.5 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm0 2h3v16h-3zm10-2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm0 2h3v16h-3z",clipRule:"evenodd"})]}),SvgIconRecord=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("circle",{cx:12,cy:12,r:11,fill:"currentColor"})]}),AudioRecorderTimer=({recordState:e0,playState:_e,recordTime:i0,audioTime:r0,maxDuration:t0})=>jsxRuntimeExports.jsxs("div",{className:"audio-recorder-time",children:[_e==="IDLE"&&jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center",children:[jsxRuntimeExports.jsx(e0==="PAUSED"?SvgIconPause:SvgIconRecord,{width:12,height:12,className:"me-8 text-danger"}),e$5(e0==="IDLE"?0:i0)+" / "+e$5(t0)]}),_e!=="IDLE"&&jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center mx-auto",children:[jsxRuntimeExports.jsx(SvgIconMic,{width:12,height:12,className:"me-8"}),e$5(r0*1e3)," /",e$5(i0)]})]}),SvgIconPlayFilled=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M5 3.804c0-1.57 1.728-2.528 3.06-1.696l13.113 8.196a2 2 0 0 1 0 3.392L8.06 21.892C6.728 22.724 5 21.767 5 20.196z"})]}),SvgIconRecordPause=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M23 12c0 6.075-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1s11 4.925 11 11M10 6H8a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1m4 0h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1",clipRule:"evenodd"})]}),SvgIconRefresh=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("g",{clipPath:"url(#icon-refresh_svg__a)",children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.304 21c3.015 0 5.65-1.924 6.838-4.752a.986.986 0 0 1 1.297-.53c.503.216.738.803.524 1.311C19.498 20.522 16.19 23 12.304 23c-4.644 0-8.444-3.522-9.299-8.113L1.86 17.142a.99.99 0 0 1-1.33.449 1 1 0 0 1-.417-1.348L2.51 11.52c.135-.265.376-.457.66-.527a.96.96 0 0 1 .812.169L8.1 14.297c.433.33.515.958.185 1.404a.98.98 0 0 1-1.382.212L4.93 14.41c.65 3.785 3.744 6.59 7.374 6.59m4.794-12.913a.98.98 0 0 0-1.381.211 1.01 1.01 0 0 0 .184 1.405l4.117 3.135a.96.96 0 0 0 .812.169c.284-.07.525-.262.66-.527l2.398-4.723c.252-.496.065-1.1-.418-1.348a.99.99 0 0 0-1.329.449l-1.145 2.255C20.14 4.522 16.34 1 11.696 1 7.81 1 4.505 3.478 3.037 6.97a1.004 1.004 0 0 0 .525 1.312.986.986 0 0 0 1.297-.53C6.046 4.924 8.681 3 11.697 3c3.63 0 6.724 2.805 7.374 6.59z",clipRule:"evenodd"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-refresh_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),SvgIconRestart=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M17.919 3.15c1.33-.856 3.081.1 3.081 1.682v14.336c0 1.583-1.75 2.538-3.081 1.683L7 13.83V19a2 2 0 1 1-4 0V5a2 2 0 1 1 4 0v5.168z"})]}),SvgIconSave=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5 4a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h1v-7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7h1a1 1 0 0 0 1-1V8.414L15.586 4H8v3h7a1 1 0 1 1 0 2H7a1 1 0 0 1-1-1V4zm2-2H5a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V8a1 1 0 0 0-.293-.707l-5-5A1 1 0 0 0 16 2zm1 12v6h8v-6z",clipRule:"evenodd"})]}),useWorkspaceFile=()=>({createOrUpdate:async({alt:e0,uri:_e,blob:i0,legend:r0,parentId:t0,application:n0,visibility:s0})=>{let o0=(_e??"").match(/\/workspace\/document\/([0-9a-fA-F-]+)/);if(o0&&o0.length===2){let a0=o0[1],f0=await odeServices.workspace().searchDocuments({filter:"all",id:a0,limit:1}),l0=f0.length?f0[0].name:void 0;await odeServices.workspace().updateFile(a0,i0,{alt:e0,legend:r0,name:l0});let u0=(await odeServices.workspace().searchDocuments({filter:"all",id:a0,limit:1}))[0];return{file:u0,src:`/workspace/${u0.public?"pub/":""}document/${a0}`}}else{let a0=await odeServices.workspace().saveFile(i0,{application:n0,parentId:t0,visibility:s0});return`/workspace/${a0.public?"pub/":""}document/${a0._id}`}},create:async(e0,_e)=>await odeServices.workspace().saveFile(e0,_e),remove:async e0=>!e0||Array.isArray(e0)&&e0.length===0?Promise.resolve():await odeServices.workspace().deleteFile(Array.isArray(e0)?e0:[e0])});function useAudioRecorder(e0,_e,i0=!1,r0="protected",t0="media-library"){var _i;function n0(Q0,U0){return{...Q0,...U0.updatedState}}let[{recordState:s0,playState:o0,micStream:a0,micStreamAudioSourceNode:f0,audioWorkletNode:l0,audioContext:u0,encoderWorker:A0,maxDuration:c0,recordTime:k0,isEncoding:d0},h0]=reactExports.useReducer(n0,{recordState:"IDLE",isEncoding:!1,playState:"IDLE",recordTime:0,maxDuration:180}),b0=reactExports.useRef(null),p0=reactExports.useRef(null),m0=reactExports.useRef(),g0=reactExports.useRef(),[v0,w0]=reactExports.useState(),{t:x0}=useTranslation(),{create:_0}=useWorkspaceFile(),y0=48e3;reactExports.useEffect(()=>{let Q0=new Worker("/infra/public/js/audioEncoder.js");return h0({type:"update",updatedState:{encoderWorker:Q0}}),Q0.postMessage(["init",(u0==null?void 0:u0.sampleRate)||y0]),()=>{B0(),Q0.terminate()}},[]),reactExports.useEffect(()=>{let Q0=!1;return(async()=>{var U0;try{if(!((U0=navigator.mediaDevices)!=null&&U0.getUserMedia))throw Error("Media devices are not available");(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(i2=>i2.stop())}catch(i2){console.error(i2),Q0||w0(i2)}})(),()=>{Q0=!0}},[]);let S0=Q0=>{var s2,f2;let U0=Q0.data.inputs[0][0],i2=Q0.data.inputs[0][1];(!i2||i2.filter(c2=>c2!==void 0).length===0)&&(i2=U0),(s2=m0.current)==null||s2.push(U0),(f2=g0.current)==null||f2.push(i2)},B0=reactExports.useCallback(()=>{a0==null||a0.getTracks().forEach(Q0=>Q0.stop()),f0==null||f0.disconnect(),l0==null||l0.port.removeEventListener("message",S0),l0==null||l0.port.close(),l0==null||l0.disconnect(),u0==null||u0.close()},[u0,l0,a0,f0]),I0=async()=>{let Q0;try{Q0=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(f2){console.error(f2),w0(f2);return}Q0.getTracks().forEach(f2=>{f2.onended=()=>w0(Error("Track ended"))});let U0=new AudioContext({sampleRate:y0}),i2=U0.createMediaStreamSource(Q0);try{await U0.audioWorklet.addModule("/infra/public/js/audio-recorder-processor.js")}catch(f2){console.error(f2)}let s2=new AudioWorkletNode(U0,"audio-recorder-processor");s2.port.addEventListener("message",S0),h0({type:"update",updatedState:{micStream:Q0,micStreamAudioSourceNode:i2,audioContext:U0,recordTime:0,audioWorkletNode:s2,recordState:"RECORDING",playState:"IDLE"}}),g0.current=[],m0.current=[],s2.port.start(),i2.connect(s2),s2.connect(U0.destination)},F0=reactExports.useCallback(async()=>{p0.current&&(p0.current.currentTime=0,p0.current.pause()),s0==="PAUSED"?(h0({type:"update",updatedState:{recordState:"RECORDING",playState:"IDLE"}}),u0==null||u0.resume(),_e==null||_e(void 0)):I0()},[s0,u0,p0]),C0=reactExports.useCallback(()=>{h0({type:"update",updatedState:{recordState:"PAUSED",playState:"IDLE",isEncoding:!0}}),u0==null||u0.suspend(),A0&&m0.current&&g0.current&&(A0.postMessage(["wav",g0.current,m0.current,g0.current.length*128]),A0.onmessage=Q0=>{let U0=window.URL.createObjectURL(Q0.data);h0({type:"update",updatedState:{isEncoding:!1}}),p0.current&&(p0.current.src=U0),_e&&_e(U0)})},[u0,A0,_e]),E0=reactExports.useCallback(()=>{var Q0;h0({type:"update",updatedState:{playState:"PLAYING"}}),((Q0=p0==null?void 0:p0.current)!=null&&Q0.currentTime||p0.current)&&p0.current.play()},[p0]),R0=reactExports.useCallback(()=>{var Q0;(Q0=p0==null?void 0:p0.current)==null||Q0.pause(),h0({type:"update",updatedState:{playState:"PAUSED"}})},[p0]),M0=reactExports.useCallback(()=>{B0(),h0({type:"update",updatedState:{playState:"IDLE",recordState:"IDLE"}}),g0.current=[],m0.current=[],_e&&_e(void 0)},[B0,_e]),T0=reactExports.useCallback(async()=>{var U0;let Q0=(U0=b0.current)==null?void 0:U0.value;if(!Q0){console.error("Audio name is required");return}return p0.current&&(p0.current.pause(),p0.current.currentTime=0),h0({type:"update",updatedState:{recordState:"SAVING",playState:"IDLE"}}),new Promise((i2,s2)=>{try{if(A0&&m0.current&&g0.current)A0.postMessage(["mp3",g0.current,m0.current,g0.current.length*128]),A0.onmessage=async f2=>{if(f2.data instanceof Blob)try{let c2=await _0(new File([f2.data],Q0,{type:"audio/mp3"}),{application:t0,visibility:r0});c2&&e0&&e0(c2),h0({type:"update",updatedState:{recordState:"SAVED"}}),i2(c2)}catch(c2){h0({type:"update",updatedState:{recordState:"RECORDED"}}),console.error("Error while saving",c2),s2(c2)}};else throw Error("Audio encoder is not ready")}catch(f2){h0({type:"update",updatedState:{playState:"IDLE",recordState:"IDLE"}}),console.error("Error while saving",f2),s2()}})},[s0,e0,B0]),G0=reactExports.useCallback(()=>{p0!=null&&p0.current&&(p0.current.pause(),p0.current.currentTime=0),h0({type:"update",updatedState:{playState:"IDLE"}})},[p0]),j0=reactExports.useCallback(()=>{h0({type:"update",updatedState:{playState:"PAUSED"}}),p0.current&&(p0.current.currentTime=0)},[p0]);reactExports.useEffect(()=>{if(s0==="RECORDING"&&u0){let Q0=window.setInterval(()=>{h0({type:"update",updatedState:{recordTime:u0.currentTime}}),u0.currentTime>=c0&&(C0(),window.clearInterval(Q0))},100);return()=>window.clearInterval(Q0)}},[u0,C0,c0,s0]);let N0=x0(s0==="IDLE"?"bbm.audio.record.start":"bbm.audio.record.resume"),O0=(Q0,U0)=>U0?void 0:jsxRuntimeExports.jsx("span",{className:"audio-recorder-toolbar-label",children:Q0}),Y0=s0!=="IDLE"&&s0!=="PAUSED"||k0>=c0,D0=s0!=="RECORDING",$0=s0!=="RECORDED"&&s0!=="PAUSED"&&s0!=="SAVED",z0=o0!=="PLAYING"&&o0!=="PAUSED",K0=s0!=="RECORDED"&&s0!=="PAUSED"&&o0!=="PLAYING"&&o0!=="PAUSED",e2=K0||s0==="SAVED"||!((_i=b0.current)!=null&&_i.value),J0=[{type:"button",name:"record",visibility:s0==="RECORDING"?"hide":"show",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconRecord,{}),color:"danger",disabled:Y0,onClick:F0,children:O0(N0,Y0)},tooltip:N0},{type:"button",name:"recordPause",visibility:s0==="RECORDING"?"show":"hide",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconRecordPause,{}),color:"danger",disabled:D0,onClick:C0,children:O0(x0("bbm.audio.record.pause"),D0)},tooltip:x0("bbm.audio.record.pause")},{type:"icon",name:"encoding",visibility:d0?"show":"hide",props:{icon:jsxRuntimeExports.jsx(SvgIconLoader,{style:{animation:"loading 1s infinite"}}),disabled:!0}},{type:"button",name:"play",visibility:d0||o0==="PLAYING"?"hide":"show",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconPlayFilled,{}),disabled:$0,onClick:E0,children:O0(x0("bbm.audio.play.start"),$0)},tooltip:x0("bbm.audio.play.start")},{type:"button",name:"playPause",visibility:!d0&&o0==="PLAYING"?"show":"hide",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconPause,{}),onClick:R0,children:O0(x0("bbm.audio.play.pause"),!1)},tooltip:x0("bbm.audio.play.pause")},{type:"button",name:"stop",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconRestart,{}),disabled:z0,onClick:G0,children:O0(x0("bbm.audio.play.stop"),z0)},tooltip:x0("bbm.audio.play.stop")},{type:"divider"},{type:"button",name:"reset",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconRefresh,{}),disabled:K0,onClick:M0,children:O0(x0("bbm.audio.record.reset"),K0)},tooltip:x0("bbm.audio.record.reset")},{type:"button",name:"save",visibility:i0?"hide":"show",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconSave,{}),disabled:e2,onClick:T0,children:O0(x0("bbm.audio.record.save"),e2)},tooltip:x0("bbm.audio.record.save")}];return{recordState:s0,playState:o0,audioContext:u0,recordTime:k0*1e3,maxDuration:c0*1e3,audioRef:p0,audioNameRef:b0,toolbarItems:J0,micError:v0,handlePlayEnded:j0,handleSave:T0}}var Context$1=reactExports.createContext(null),useFormControl=()=>{let e0=reactExports.useContext(Context$1);if(!e0)throw Error("Cannot be rendered outside the FormControl component");return e0},Input=reactExports.forwardRef(({placeholder:e0,size:_e="md",type:i0="text",className:r0,showCounter:t0=!1,autoComplete:n0="off",clearable:s0=!1,noValidationIcon:o0,...a0},f0)=>{var x0;let{id:l0,isRequired:u0,isReadOnly:A0,status:c0}=useFormControl(),{t:k0}=useTranslation(),d0=reactExports.useRef(null),[h0,b0]=reactExports.useState(((x0=a0.defaultValue)==null?void 0:x0.toString().length)||0);reactExports.useLayoutEffect(()=>{d0.current&&b0(d0.current.value.length)},[]);let p0=_0=>{d0.current=_0,typeof f0=="function"?f0(_0):f0&&(f0.current=_0)},m0=clsx("input",{"input--lg":_e==="lg","input--invalid":c0==="invalid","input--valid":c0==="valid","input--plaintext":A0},r0),g0=_0=>{var y0;b0(_0.target.value.length),(y0=a0.onChange)==null||y0.call(a0,_0)},v0=()=>{var y0,S0;let _0=d0.current;_0&&((S0=(y0=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:y0.set)==null||S0.call(_0,""),_0.dispatchEvent(new Event("input",{bubbles:!0})),_0.focus())},w0=a0.maxLength??0;return jsxRuntimeExports.jsxs("div",{className:m0,children:[jsxRuntimeExports.jsx("input",{ref:p0,id:l0,className:"input__field",type:i0,placeholder:e0,required:u0,readOnly:A0,...a0,onChange:g0,autoComplete:n0}),s0&&!A0&&jsxRuntimeExports.jsx("button",{type:"button",className:"input__clear",onClick:v0,"aria-label":k0("clear"),children:jsxRuntimeExports.jsx(SvgIconClose,{})}),t0&&jsxRuntimeExports.jsxs("span",{className:clsx("input__counter",{"input__counter--max":h0===w0}),children:[h0," / ",w0]})]})}),Label=reactExports.forwardRef(({leftIcon:e0,optionalText:_e,requiredText:i0="*",children:r0,className:t0},n0)=>{let{id:s0,isOptional:o0,isRequired:a0}=useFormControl(),{t:f0}=useTranslation(),l0=clsx("input-label",{"input-label--has-icon":e0},t0),u0=o0&&!a0,A0=a0&&!o0;return reactExports.useEffect(()=>{if(o0&&a0)throw Error("Cannot be optional and required at the same time")},[o0,a0]),jsxRuntimeExports.jsxs("label",{ref:n0,htmlFor:s0,className:l0,children:[e0,r0,u0&&jsxRuntimeExports.jsxs("em",{className:"input-label__optional",children:["- ",_e??f0("explorer.optional")]}),A0&&jsxRuntimeExports.jsx("em",{className:"input-label__required",children:i0})]})}),SvgIconError=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M3 12a9 9 0 1 1 18 0 9 9 0 0 1-18 0m9-11C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1M8.293 15.707a1 1 0 0 1 0-1.414L10.586 12 8.293 9.707a1 1 0 0 1 1.414-1.414L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414 0",clipRule:"evenodd"})]}),SvgIconSuccessOutline=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.59 8.192a1 1 0 0 1 .218 1.397l-4.375 6a1 1 0 0 1-1.584.042L8.224 12.4a1 1 0 0 1 1.552-1.261l1.806 2.223 3.61-4.951a1 1 0 0 1 1.397-.219",clipRule:"evenodd"})]}),FormText=({children:e0})=>{let{status:_e}=useFormControl(),i0=clsx("input-message",{"input-message--invalid":_e==="invalid","input-message--valid":_e==="valid"}),r0=_e==="invalid"?SvgIconError:_e==="valid"?SvgIconSuccessOutline:null;return jsxRuntimeExports.jsxs("p",{className:i0,children:[r0&&jsxRuntimeExports.jsx(r0,{className:"input-message__icon","aria-hidden":"true"}),e0]})},Root$4=reactExports.forwardRef(({children:e0,className:_e,id:i0,isOptional:r0,isReadOnly:t0,isRequired:n0,status:s0,...o0},a0)=>{let f0=reactExports.useMemo(()=>({id:i0,isOptional:r0,isRequired:n0,isReadOnly:t0,status:s0}),[i0,r0,t0,n0,s0]);return jsxRuntimeExports.jsx(Context$1.Provider,{value:f0,children:jsxRuntimeExports.jsx("div",{ref:a0,className:_e,...o0,children:e0})})}),FormControl=Object.assign(Root$4,{Label,Input,Text:FormText}),DropdownContext=reactExports.createContext(null),useDropdownContext=()=>{let e0=reactExports.useContext(DropdownContext);if(!e0)throw Error("Cannot be rendered outside the Dropdown Component");return e0},Checkbox=reactExports.forwardRef(({label:e0,disabled:_e=!1,checked:i0=!1,indeterminate:r0=!1,...t0},n0)=>{let s0=reactExports.useRef(null);reactExports.useImperativeHandle(n0,()=>({...s0.current})),reactExports.useEffect(()=>{s0.current.indeterminate=r0},[s0,r0]);let o0=reactExports.useId(),a0={type:"checkbox",checked:i0,disabled:_e,ref:s0,className:clsx(t0.className,"form-check-input"),id:o0},f0={...t0,...a0};return jsxRuntimeExports.jsxs("div",{className:"form-check d-flex align-items-center gap-8",children:[jsxRuntimeExports.jsx("input",{...f0}),e0&&jsxRuntimeExports.jsx("label",{className:"form-check-label",htmlFor:f0.id,children:e0})]})}),normalize=e0=>e0.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),useDropdownItemFilter=e0=>{let{searchQuery:_e,reportMatch:i0,unregisterMatch:r0,registerUnfilteredItem:t0}=useDropdownContext(),n0=reactExports.useId(),s0=e0!==void 0&&_e!==""&&!normalize(e0).includes(normalize(_e));return reactExports.useLayoutEffect(()=>e0===void 0?t0==null?void 0:t0(n0):(i0(n0,!s0),()=>r0(n0)),[n0,s0,e0,i0,r0,t0]),{id:n0,isFiltered:s0}},DropdownItemHidden=({children:e0,collapse:_e})=>jsxRuntimeExports.jsx("div",{"aria-hidden":"true",style:_e?{height:0,overflow:"hidden",margin:0,pointerEvents:"none",width:"100%",maxWidth:"max-content"}:{display:"none",width:"100%",maxWidth:"max-content"},children:e0}),DropdownCheckboxItem=({children:e0,value:_e,model:i0,onChange:r0,searchValue:t0})=>{let{itemProps:n0,itemRefs:s0,isFocused:o0}=useDropdownContext(),{id:a0,isFiltered:f0}=useDropdownItemFilter(t0),{onMenuItemKeyDown:l0,onMenuItemMouseEnter:u0}=n0,A0=i0.includes(_e),c0={value:_e,model:i0,checked:A0,readOnly:!0},k0=clsx("dropdown-item c-pointer",{focus:o0===a0}),d0=jsxRuntimeExports.jsxs("div",{className:"d-flex gap-8 align-items-center justify-content-between position-relative",children:[e0,jsxRuntimeExports.jsx(Checkbox,{...c0})]});return f0?jsxRuntimeExports.jsx(DropdownItemHidden,{collapse:!0,children:d0}):jsxRuntimeExports.jsx("div",{id:a0,ref:h0=>s0.current[a0]=h0,role:"menuitemcheckbox","aria-checked":A0,onMouseUp:()=>r0(_e),onKeyDown:h0=>l0(h0,()=>r0(_e)),onMouseEnter:u0,tabIndex:A0?0:-1,className:k0,children:d0})},DropdownItem=({type:e0="action",icon:_e,onClick:i0,children:r0,className:t0,minWidth:n0,disabled:s0,searchValue:o0,...a0})=>{let{itemProps:f0,itemRefs:l0,isFocused:u0}=useDropdownContext(),{id:A0,isFiltered:c0}=useDropdownItemFilter(o0),{onMenuItemKeyDown:k0,onMenuItemMouseEnter:d0,onMenuItemClick:h0}=f0,b0=v0=>{s0||(i0==null||i0(v0),e0==="action"&&(h0(),v0.stopPropagation()))},p0=clsx("dropdown-item",{focus:u0===A0},{"text-gray-600":s0},t0),m0={...n0&&{minWidth:`${n0}px`}},g0=jsxRuntimeExports.jsxs("div",{className:"d-flex gap-8 align-items-center",children:[_e,r0]});return c0?jsxRuntimeExports.jsx(DropdownItemHidden,{children:g0}):jsxRuntimeExports.jsx("div",{id:A0,role:"menuitem",style:m0,ref:v0=>l0.current[A0]=v0,tabIndex:u0===A0?0:-1,className:p0,"aria-current":u0===A0,onClick:b0,onMouseEnter:d0,onKeyDown:v0=>k0(v0,i0,e0==="action"),...a0,children:g0})},DropdownMenu=reactExports.forwardRef(({children:e0,block:_e,unstyled:i0,...r0},t0)=>{let{menuProps:n0,visible:s0}=useDropdownContext(),o0=clsx({"w-100":_e,"bg-white shadow rounded-4 p-8":!i0},n0.className,r0.className),a0={...n0,...r0,className:o0};return s0?jsxRuntimeExports.jsx("div",{ref:t0,...a0,children:e0}):null}),useMatchRegistry=()=>{let[e0,_e]=reactExports.useState(!0),i0=reactExports.useRef(new Map);return{hasMatches:e0,reportMatch:reactExports.useCallback((r0,t0)=>{i0.current.set(r0,t0);let n0=[...i0.current.values()].some(Boolean);_e(s0=>s0===n0?s0:n0)},[]),unregisterMatch:reactExports.useCallback(r0=>{i0.current.delete(r0);let t0=i0.current.size===0||[...i0.current.values()].some(Boolean);_e(n0=>n0===t0?n0:t0)},[])}},DropdownMenuGroup=reactExports.forwardRef(({label:e0,children:_e},i0)=>{let r0=reactExports.useContext(DropdownContext),{hasMatches:t0,reportMatch:n0,unregisterMatch:s0}=useMatchRegistry(),o0=r0==null?void 0:r0.reportMatch,a0=r0==null?void 0:r0.unregisterMatch,f0=reactExports.useCallback((c0,k0)=>{n0(c0,k0),o0==null||o0(c0,k0)},[n0,o0]),l0=reactExports.useCallback(c0=>{s0(c0),a0==null||a0(c0)},[s0,a0]),u0=reactExports.useCallback(c0=>(n0(c0,!0),()=>s0(c0)),[n0,s0]),A0=reactExports.useMemo(()=>r0&&{...r0,reportMatch:f0,unregisterMatch:l0,registerUnfilteredItem:u0},[r0,f0,l0,u0]);return jsxRuntimeExports.jsx(DropdownContext.Provider,{value:A0,children:jsxRuntimeExports.jsxs("div",{ref:i0,role:"group",hidden:!t0,children:[jsxRuntimeExports.jsx("span",{className:"small px-4",children:jsxRuntimeExports.jsx("strong",{children:e0})}),_e]})})}),Radio=reactExports.forwardRef(({model:e0,icon:_e,label:i0=!1,disabled:r0=!1,checked:t0,...n0},s0)=>{let o0=reactExports.useId(),a0={type:"radio",checked:t0,disabled:r0,ref:s0,className:clsx(n0.className,"form-check-input c-pointer",_e&&"d-none"),id:o0},f0={...n0,...a0};return jsxRuntimeExports.jsxs("div",{className:clsx("form-check d-flex align-items-center gap-8",_e&&"ps-0"),children:[jsxRuntimeExports.jsx("input",{...f0}),_e&&jsxRuntimeExports.jsx("label",{htmlFor:f0.id,className:clsx("c-pointer",e0!==n0.value&&"text-muted"),children:_e}),!_e&&i0&&jsxRuntimeExports.jsx("label",{className:"form-check-label",htmlFor:f0.id,children:i0})]})}),DropdownRadioItem=({children:e0,value:_e,model:i0,onChange:r0,searchValue:t0})=>{let{itemProps:n0,itemRefs:s0,isFocused:o0}=useDropdownContext(),{id:a0,isFiltered:f0}=useDropdownItemFilter(t0),{onMenuItemKeyDown:l0,onMenuItemMouseEnter:u0}=n0,A0={value:_e,model:i0,checked:_e===i0,readOnly:!0},c0=clsx("dropdown-item c-pointer",{focus:o0===a0}),k0=jsxRuntimeExports.jsxs("div",{className:"d-flex gap-8 align-items-center justify-content-between position-relative",children:[e0,jsxRuntimeExports.jsx(Radio,{...A0,className:"position-absolute start-0 end-0 top-0 bottom-0 opacity-0"})]});return f0?jsxRuntimeExports.jsx(DropdownItemHidden,{children:k0}):jsxRuntimeExports.jsx("div",{id:a0,ref:d0=>s0.current[a0]=d0,role:"menuitemradio","aria-checked":_e===i0,onMouseUp:()=>r0(_e),onKeyDown:d0=>l0(d0,()=>r0(_e)),onMouseEnter:u0,tabIndex:_e===i0?0:-1,className:c0,children:k0})},SvgIconSearch$1=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 10a7 7 0 1 1 14 0 7 7 0 0 1-14 0m7-9a9 9 0 1 0 5.7 15.96 1 1 0 0 0 .24.4l4.35 4.35a1 1 0 0 0 1.42-1.42l-4.35-4.35a1 1 0 0 0-.4-.24A9 9 0 0 0 11 1",clipRule:"evenodd"})]}),ButtonBeta=reactExports.forwardRef(({color:e0="default",type:_e="button",size:i0="md",variant:r0="filled",children:t0,isLoading:n0,leftIcon:s0,rightIcon:o0,className:a0,...f0},l0)=>jsxRuntimeExports.jsxs("button",{ref:l0,"data-testid":"button-beta",className:clsx("btn-beta",`btn-beta-${e0}`,{"btn-beta--outline":r0==="outline","btn-beta--ghost":r0==="ghost","btn-beta--small":i0==="sm","btn-beta--icon-only":!t0,"btn-beta--with-left-icon":!!(s0&&t0),"btn-beta--with-right-icon":!!(o0&&t0),"btn-beta--loading":n0},a0),type:_e,...f0,children:[n0&&jsxRuntimeExports.jsx(Loading,{isLoading:!0}),jsxRuntimeExports.jsxs("span",{children:[s0,t0,o0]})]})),SearchBar=({isVariant:e0=!1,size:_e="md",placeholder:i0="search",className:r0,disabled:t0,buttonDisabled:n0,onChange:s0,onClick:o0,value:a0,clearable:f0=!0,...l0})=>{var _0;let{t:u0}=useTranslation(),A0=()=>{o0==null||o0()},c0=y0=>{y0.key==="Enter"&&(y0.preventDefault(),A0())},k0=reactExports.useRef(null),d0=a0!==void 0,[h0,b0]=reactExports.useState(!!((_0=l0.defaultValue)!=null&&_0.toString())),p0=d0?!!a0:h0,[m0,g0]=reactExports.useState(!1),v0=y0=>{y0.currentTarget.contains(y0.relatedTarget)||g0(!1)},w0=y0=>{y0.target.closest("button")&&y0.preventDefault()},x0=m0||p0;return jsxRuntimeExports.jsxs(FormControl,{id:"search-bar",className:clsx("searchbar",`searchbar--${_e}`,{"searchbar--active":x0},r0),onFocus:()=>g0(!0),onBlur:v0,onMouseDown:w0,children:[e0&&jsxRuntimeExports.jsx("div",{className:"searchbar__icon",children:jsxRuntimeExports.jsx(SvgIconSearch$1,{width:20,height:20})}),jsxRuntimeExports.jsx(FormControl.Input,{ref:k0,type:"search",placeholder:u0(i0),size:_e,className:"searchbar__input",onChange:y0=>{d0||b0(!!y0.target.value),s0==null||s0(y0)},value:a0,disabled:t0,onKeyDown:c0,clearable:f0&&!t0,...l0}),!e0&&jsxRuntimeExports.jsx(ButtonBeta,{type:"submit",className:"btn-search","aria-label":u0("search"),leftIcon:jsxRuntimeExports.jsx(SvgIconSearch$1,{}),onClick:A0,disabled:n0||t0})]})},DropdownSearchInput=({placeholder:e0="Rechercher...",noResultsLabel:_e="Pas de résultat",onSearch:i0})=>{let{searchQuery:r0,setSearchQuery:t0,hasMatches:n0,searchInputRef:s0,setHasSearchInput:o0,rootElement:a0,itemProps:f0}=useDropdownContext(),l0=jsxRuntimeExports.jsx("div",{ref:reactExports.useCallback(u0=>{s0.current=(u0==null?void 0:u0.querySelector("input"))??null,o0(!!u0)},[s0,o0]),className:"dropdown-search position-absolute top-0 start-0 w-100 h-100 z-1",children:jsxRuntimeExports.jsx(SearchBar,{isVariant:!0,clearable:!0,size:"md",className:"h-100",placeholder:e0,value:r0,onChange:u0=>{t0(u0.target.value),i0==null||i0(u0.target.value)},onKeyDown:u0=>{(u0.key==="ArrowDown"||u0.key==="Escape"||u0.key==="Tab"&&u0.shiftKey)&&f0.onMenuItemKeyDown(u0),["ArrowUp","ArrowDown","Enter"," "].includes(u0.key)&&u0.stopPropagation()}})});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[a0&&reactDomExports.createPortal(l0,a0),r0&&!n0&&jsxRuntimeExports.jsx("p",{className:"body-2 text-gray-700 text-center my-8",children:_e})]})},DropdownSeparator=()=>jsxRuntimeExports.jsx("div",{role:"separator",className:"px-4",children:jsxRuntimeExports.jsx("hr",{className:"m-0"})}),SvgIconRafterUp=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M19.988 17.129a1.5 1.5 0 0 1-2.117-.141L12 10.278l-5.871 6.71a1.5 1.5 0 0 1-2.258-1.976l7-8a1.5 1.5 0 0 1 2.258 0l7 8a1.5 1.5 0 0 1-.141 2.117",clipRule:"evenodd"})]}),Badge=reactExports.forwardRef(({className:e0,variant:_e={type:"notification",level:"info"},children:i0,...r0},t0)=>{let{getIconClass:n0,getBackgroundLightIconClass:s0,getBorderIconClass:o0}=useEdificeIcons(),a0="";return _e.type==="appVersion"&&_e.app&&(a0=`${n0(_e.app)} ${s0(_e.app)} ${o0(_e.app)}`),jsxRuntimeExports.jsxs("span",{ref:t0,className:clsx("badge rounded-pill",(_e.type==="content"||_e.type==="user")&&"background"in _e?"bg-gray-200":(_e.type==="content"||_e.type==="user")&&!("background"in _e)?"border border-0":"",_e.type==="content"&&`text-${_e.level}`,_e.type==="notification"&&`badge-notification bg-${_e.level} text-light border border-0`,_e.type==="status"&&`badge-status badge-status-${_e.level} caption fw-normal`,_e.type==="user"&&`badge-profile-${_e.profile.toLowerCase()}`,_e.type==="link"&&"badge-link border border-0",_e.type==="chip"&&"bg-gray-200",_e.type==="appVersion"&&a0,e0),...r0,children:[_e.type==="chip"&&jsxRuntimeExports.jsx("div",{className:"d-flex fw-800 align-items-center",children:i0}),_e.type==="appVersion"&&(i0??"BÊTA"),_e.type!=="chip"&&_e.type!=="appVersion"&&i0]})}),DropdownTrigger=reactExports.forwardRef(({label:e0,icon:_e,variant:i0="default",disabled:r0=!1,size:t0,badgeContent:n0,hideCarret:s0=!1,pill:o0=!1,innerBorderColor:a0,innerBorderWidth:f0,outerBorderColor:l0,outerBorderWidth:u0,outerBorderOffset:A0,baseShade:c0,...k0},d0)=>{let{triggerProps:h0,block:b0,visible:p0,hasSearchInput:m0}=useDropdownContext(),g0=clsx("dropdown-toggle ",t0,i0,{"w-100":b0},{"opacity-0":p0&&m0},h0.className,k0.className,{"rounded-pill":o0},{"base-shade":c0}),v0={...l0&&{outline:`${u0}px solid var(--edifice-${l0})`,outlineOffset:A0},...a0&&{border:`${f0}px solid var(--edifice-${a0})`}};return jsxRuntimeExports.jsxs("button",{ref:d0,type:"button",disabled:r0,...h0,...k0,className:g0,style:v0,children:[_e,e0,n0?jsxRuntimeExports.jsx(Badge,{variant:{level:"info",type:"notification"},children:n0}):!s0&&jsxRuntimeExports.jsx(SvgIconRafterUp,{width:16,height:16,className:"dropdown-toggle-caret"})]})});function memo(e0,_e,i0){let r0=i0.initialDeps??[],t0;function n0(){var s0,o0,a0,f0;let l0;i0.key&&((s0=i0.debug)!=null&&s0.call(i0))&&(l0=Date.now());const u0=e0();if(!(u0.length!==r0.length||u0.some((k0,d0)=>r0[d0]!==k0)))return t0;r0=u0;let c0;if(i0.key&&((o0=i0.debug)!=null&&o0.call(i0))&&(c0=Date.now()),t0=_e(...u0),i0.key&&((a0=i0.debug)!=null&&a0.call(i0))){const k0=Math.round((Date.now()-l0)*100)/100,d0=Math.round((Date.now()-c0)*100)/100,h0=d0/16,b0=(p0,m0)=>{for(p0=String(p0);p0.length<m0;)p0=" "+p0;return p0};console.info(`%c⏱ ${b0(d0,5)} /${b0(k0,5)} ms`,`
46
+ `+n0):r0.stack=n0}catch{}}throw r0}}_request(_e,i0){typeof _e=="string"?(i0=i0||{},i0.url=_e):i0=_e||{},i0=mergeConfig$2(this.defaults,i0);const{transitional:r0,paramsSerializer:t0,headers:n0}=i0;r0!==void 0&&validator.assertOptions(r0,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),t0!=null&&(utils$1.isFunction(t0)?i0.paramsSerializer={serialize:t0}:validator.assertOptions(t0,{encode:validators.function,serialize:validators.function},!0)),i0.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i0.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i0.allowAbsoluteUrls=!0),validator.assertOptions(i0,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),i0.method=(i0.method||this.defaults.method||"get").toLowerCase();let s0=n0&&utils$1.merge(n0.common,n0[i0.method]);n0&&utils$1.forEach(["delete","get","head","post","put","patch","common"],k0=>{delete n0[k0]}),i0.headers=AxiosHeaders$1.concat(s0,n0);const o0=[];let a0=!0;this.interceptors.request.forEach(function(d0){typeof d0.runWhen=="function"&&d0.runWhen(i0)===!1||(a0=a0&&d0.synchronous,o0.unshift(d0.fulfilled,d0.rejected))});const f0=[];this.interceptors.response.forEach(function(d0){f0.push(d0.fulfilled,d0.rejected)});let l0,u0=0,A0;if(!a0){const k0=[dispatchRequest.bind(this),void 0];for(k0.unshift(...o0),k0.push(...f0),A0=k0.length,l0=Promise.resolve(i0);u0<A0;)l0=l0.then(k0[u0++],k0[u0++]);return l0}A0=o0.length;let c0=i0;for(;u0<A0;){const k0=o0[u0++],d0=o0[u0++];try{c0=k0(c0)}catch(h0){d0.call(this,h0);break}}try{l0=dispatchRequest.call(this,c0)}catch(k0){return Promise.reject(k0)}for(u0=0,A0=f0.length;u0<A0;)l0=l0.then(f0[u0++],f0[u0++]);return l0}getUri(_e){_e=mergeConfig$2(this.defaults,_e);const i0=buildFullPath(_e.baseURL,_e.url,_e.allowAbsoluteUrls);return buildURL(i0,_e.params,_e.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function(_e){Axios$1.prototype[_e]=function(i0,r0){return this.request(mergeConfig$2(r0||{},{method:_e,url:i0,data:(r0||{}).data}))}});utils$1.forEach(["post","put","patch"],function(_e){function i0(r0){return function(n0,s0,o0){return this.request(mergeConfig$2(o0||{},{method:_e,headers:r0?{"Content-Type":"multipart/form-data"}:{},url:n0,data:s0}))}}Axios$1.prototype[_e]=i0(),Axios$1.prototype[_e+"Form"]=i0(!0)});let CancelToken$1=class Qt{constructor(_e){if(typeof _e!="function")throw new TypeError("executor must be a function.");let i0;this.promise=new Promise(function(n0){i0=n0});const r0=this;this.promise.then(t0=>{if(!r0._listeners)return;let n0=r0._listeners.length;for(;n0-- >0;)r0._listeners[n0](t0);r0._listeners=null}),this.promise.then=t0=>{let n0;const s0=new Promise(o0=>{r0.subscribe(o0),n0=o0}).then(t0);return s0.cancel=function(){r0.unsubscribe(n0)},s0},_e(function(n0,s0,o0){r0.reason||(r0.reason=new CanceledError$1(n0,s0,o0),i0(r0.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 i0=this._listeners.indexOf(_e);i0!==-1&&this._listeners.splice(i0,1)}toAbortSignal(){const _e=new AbortController,i0=r0=>{_e.abort(r0)};return this.subscribe(i0),_e.signal.unsubscribe=()=>this.unsubscribe(i0),_e.signal}static source(){let _e;return{token:new Qt(function(t0){_e=t0}),cancel:_e}}};function spread$1(e0){return function(i0){return e0.apply(null,i0)}}function isAxiosError$1(e0){return utils$1.isObject(e0)&&e0.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(HttpStatusCode$1).forEach(([e0,_e])=>{HttpStatusCode$1[_e]=e0});function createInstance(e0){const _e=new Axios$1(e0),i0=bind(Axios$1.prototype.request,_e);return utils$1.extend(i0,Axios$1.prototype,_e,{allOwnKeys:!0}),utils$1.extend(i0,_e,null,{allOwnKeys:!0}),i0.create=function(t0){return createInstance(mergeConfig$2(e0,t0))},i0}const axios=createInstance(defaults$3);axios.Axios=Axios$1;axios.CanceledError=CanceledError$1;axios.CancelToken=CancelToken$1;axios.isCancel=isCancel$1;axios.VERSION=VERSION$3;axios.toFormData=toFormData$1;axios.AxiosError=AxiosError$1;axios.Cancel=axios.CanceledError;axios.all=function(_e){return Promise.all(_e)};axios.spread=spread$1;axios.isAxiosError=isAxiosError$1;axios.mergeConfig=mergeConfig$2;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=e0=>formDataToJSON(utils$1.isHTMLForm(e0)?new FormData(e0):e0);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION:VERSION$2,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig:mergeConfig$1}=axios;var LIBVERSION="2.0.9",UA_MAX_LENGTH=500,USER_AGENT="user-agent",EMPTY="",UNKNOWN="?",TYPEOF={FUNCTION:"function",OBJECT:"object",STRING:"string",UNDEFINED:"undefined"},BROWSER="browser",CPU="cpu",DEVICE="device",ENGINE="engine",OS="os",RESULT="result",NAME="name",TYPE="type",VENDOR="vendor",VERSION$1="version",ARCHITECTURE="architecture",MAJOR="major",MODEL="model",CONSOLE="console",MOBILE="mobile",TABLET="tablet",SMARTTV="smarttv",WEARABLE="wearable",XR="xr",EMBEDDED="embedded",FETCHER="fetcher",INAPP="inapp",BRANDS="brands",FORMFACTORS="formFactors",FULLVERLIST="fullVersionList",PLATFORM="platform",PLATFORMVER="platformVersion",BITNESS="bitness",CH="sec-ch-ua",CH_FULL_VER_LIST=CH+"-full-version-list",CH_ARCH=CH+"-arch",CH_BITNESS=CH+"-"+BITNESS,CH_FORM_FACTORS=CH+"-form-factors",CH_MOBILE=CH+"-"+MOBILE,CH_MODEL=CH+"-"+MODEL,CH_PLATFORM=CH+"-"+PLATFORM,CH_PLATFORM_VER=CH_PLATFORM+"-version",CH_ALL_VALUES=[BRANDS,FULLVERLIST,MOBILE,MODEL,PLATFORM,PLATFORMVER,ARCHITECTURE,FORMFACTORS,BITNESS],AMAZON="Amazon",APPLE="Apple",ASUS="ASUS",BLACKBERRY="BlackBerry",GOOGLE="Google",HUAWEI="Huawei",LENOVO="Lenovo",HONOR="Honor",LG="LG",MICROSOFT="Microsoft",MOTOROLA="Motorola",NVIDIA="Nvidia",ONEPLUS="OnePlus",OPPO="OPPO",SAMSUNG="Samsung",SHARP="Sharp",SONY="Sony",XIAOMI="Xiaomi",ZEBRA="Zebra",CHROME="Chrome",CHROMIUM="Chromium",CHROMECAST="Chromecast",EDGE="Edge",FIREFOX="Firefox",OPERA="Opera",FACEBOOK="Facebook",SOGOU="Sogou",PREFIX_MOBILE="Mobile ",SUFFIX_BROWSER=" Browser",WINDOWS="Windows",isWindow$1=typeof window!==TYPEOF.UNDEFINED,NAVIGATOR=isWindow$1&&window.navigator?window.navigator:void 0,NAVIGATOR_UADATA=NAVIGATOR&&NAVIGATOR.userAgentData?NAVIGATOR.userAgentData:void 0,extend$3=function(e0,_e){var i0={},r0=_e;if(!isExtensions(_e)){r0={};for(var t0 in _e)for(var n0 in _e[t0])r0[n0]=_e[t0][n0].concat(r0[n0]?r0[n0]:[])}for(var s0 in e0)i0[s0]=r0[s0]&&r0[s0].length%2===0?r0[s0].concat(e0[s0]):e0[s0];return i0},enumerize=function(e0){for(var _e={},i0=0;i0<e0.length;i0++)_e[e0[i0].toUpperCase()]=e0[i0];return _e},has=function(e0,_e){if(typeof e0===TYPEOF.OBJECT&&e0.length>0){for(var i0 in e0)if(lowerize(_e)==lowerize(e0[i0]))return!0;return!1}return isString$1(e0)?lowerize(_e)==lowerize(e0):!1},isExtensions=function(e0,_e){for(var i0 in e0)return/^(browser|cpu|device|engine|os)$/.test(i0)||(_e?isExtensions(e0[i0]):!1)},isString$1=function(e0){return typeof e0===TYPEOF.STRING},itemListToArray=function(e0){if(e0){for(var _e=[],i0=strip(/\\?\"/g,e0).split(","),r0=0;r0<i0.length;r0++)if(i0[r0].indexOf(";")>-1){var t0=trim$2(i0[r0]).split(";v=");_e[r0]={brand:t0[0],version:t0[1]}}else _e[r0]=trim$2(i0[r0]);return _e}},lowerize=function(e0){return isString$1(e0)?e0.toLowerCase():e0},majorize=function(e0){return isString$1(e0)?strip(/[^\d\.]/g,e0).split(".")[0]:void 0},setProps=function(e0){for(var _e in e0)if(e0.hasOwnProperty(_e)){var i0=e0[_e];typeof i0==TYPEOF.OBJECT&&i0.length==2?this[i0[0]]=i0[1]:this[i0]=void 0}return this},strip=function(e0,_e){return isString$1(_e)?_e.replace(e0,EMPTY):_e},stripQuotes=function(e0){return strip(/\\?\"/g,e0)},trim$2=function(e0,_e){return e0=strip(/^\s\s*/,String(e0)),typeof _e===TYPEOF.UNDEFINED?e0:e0.substring(0,_e)},rgxMapper=function(e0,_e){if(!(!e0||!_e))for(var i0=0,r0,t0,n0,s0,o0,a0;i0<_e.length&&!o0;){var f0=_e[i0],l0=_e[i0+1];for(r0=t0=0;r0<f0.length&&!o0&&f0[r0];)if(o0=f0[r0++].exec(e0),o0)for(n0=0;n0<l0.length;n0++)a0=o0[++t0],s0=l0[n0],typeof s0===TYPEOF.OBJECT&&s0.length>0?s0.length===2?typeof s0[1]==TYPEOF.FUNCTION?this[s0[0]]=s0[1].call(this,a0):this[s0[0]]=s0[1]:s0.length>=3&&(typeof s0[1]===TYPEOF.FUNCTION&&!(s0[1].exec&&s0[1].test)?s0.length>3?this[s0[0]]=a0?s0[1].apply(this,s0.slice(2)):void 0:this[s0[0]]=a0?s0[1].call(this,a0,s0[2]):void 0:s0.length==3?this[s0[0]]=a0?a0.replace(s0[1],s0[2]):void 0:s0.length==4?this[s0[0]]=a0?s0[3].call(this,a0.replace(s0[1],s0[2])):void 0:s0.length>4&&(this[s0[0]]=a0?s0[3].apply(this,[a0.replace(s0[1],s0[2])].concat(s0.slice(4))):void 0)):this[s0]=a0||void 0;i0+=2}},strMapper=function(e0,_e){for(var i0 in _e)if(typeof _e[i0]===TYPEOF.OBJECT&&_e[i0].length>0){for(var r0=0;r0<_e[i0].length;r0++)if(has(_e[i0][r0],e0))return i0===UNKNOWN?void 0:i0}else if(has(_e[i0],e0))return i0===UNKNOWN?void 0:i0;return _e.hasOwnProperty("*")?_e["*"]:e0},windowsVersionMap={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2","8.1":"6.3",10:["6.4","10.0"],NT:""},formFactorsMap={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},browserHintsMap={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},defaultRegexes={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[VERSION$1,[NAME,PREFIX_MOBILE+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[VERSION$1,[NAME,EDGE+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[VERSION$1,[NAME,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[NAME,VERSION$1],[/opios[\/ ]+([\w\.]+)/i],[VERSION$1,[NAME,OPERA+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[VERSION$1,[NAME,OPERA+" GX"]],[/\bopr\/([\w\.]+)/i],[VERSION$1,[NAME,OPERA]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[VERSION$1,[NAME,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[VERSION$1,[NAME,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(atlas|flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:hi|lg |ovi|qute)browser|palemoon)\/v?([-\w\.]+)/i,/(brave)(?: chrome)?\/([\d\.]+)/i,/(aloha|heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[NAME,VERSION$1],[/quark(?:pc)?\/([-\w\.]+)/i],[VERSION$1,[NAME,"Quark"]],[/\bddg\/([\w\.]+)/i],[VERSION$1,[NAME,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[VERSION$1,[NAME,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[VERSION$1,[NAME,"WeChat"]],[/konqueror\/([\w\.]+)/i],[VERSION$1,[NAME,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[VERSION$1,[NAME,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[VERSION$1,[NAME,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[VERSION$1,[NAME,"Smart "+LENOVO+SUFFIX_BROWSER]],[/(av(?:ast|g|ira))\/([\w\.]+)/i],[[NAME,/(.+)/,"$1 Secure"+SUFFIX_BROWSER],VERSION$1],[/norton\/([\w\.]+)/i],[VERSION$1,[NAME,"Norton Private"+SUFFIX_BROWSER]],[/\bfocus\/([\w\.]+)/i],[VERSION$1,[NAME,FIREFOX+" Focus"]],[/ mms\/([\w\.]+)$/i],[VERSION$1,[NAME,OPERA+" Neon"]],[/ opt\/([\w\.]+)$/i],[VERSION$1,[NAME,OPERA+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[VERSION$1,[NAME,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[VERSION$1,[NAME,"Dolphin"]],[/coast\/([\w\.]+)/i],[VERSION$1,[NAME,OPERA+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[VERSION$1,[NAME,"MIUI"+SUFFIX_BROWSER]],[/fxios\/([\w\.-]+)/i],[VERSION$1,[NAME,PREFIX_MOBILE+FIREFOX]],[/\bqihoobrowser\/?([\w\.]*)/i],[VERSION$1,[NAME,"360"]],[/\b(qq)\/([\w\.]+)/i],[[NAME,/(.+)/,"$1Browser"],VERSION$1],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[NAME,/(.+)/,"$1"+SUFFIX_BROWSER],VERSION$1],[/samsungbrowser\/([\w\.]+)/i],[VERSION$1,[NAME,SAMSUNG+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[VERSION$1,[NAME,SOGOU+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[NAME,SOGOU+" Mobile"],VERSION$1],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[NAME,VERSION$1],[/(lbbrowser|luakit|rekonq|steam(?= (clie|tenf|gameo)))/i],[NAME],[/ome\/([\w\.]+).+(iron(?= saf)|360(?=[es]e$))/i],[VERSION$1,NAME],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[NAME,FACEBOOK],VERSION$1,[TYPE,INAPP]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[NAME,VERSION$1,[TYPE,INAPP]],[/\bgsa\/([\w\.]+) .*safari\//i],[VERSION$1,[NAME,"GSA"],[TYPE,INAPP]],[/(?:musical_ly|trill)(?:.+app_?version\/|_)([\w\.]+)/i],[VERSION$1,[NAME,"TikTok"],[TYPE,INAPP]],[/\[(linkedin)app\]/i],[NAME,[TYPE,INAPP]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[NAME,/(.+)/,"Zalo"],VERSION$1,[TYPE,INAPP]],[/(chromium)[\/ ]([-\w\.]+)/i],[NAME,VERSION$1],[/ome-(lighthouse)$/i],[NAME,[TYPE,FETCHER]],[/headlesschrome(?:\/([\w\.]+)| )/i],[VERSION$1,[NAME,CHROME+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[VERSION$1,[NAME,EDGE+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[NAME,CHROME+" WebView"],VERSION$1],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[VERSION$1,[NAME,"Android"+SUFFIX_BROWSER]],[/chrome\/([\w\.]+) mobile/i],[VERSION$1,[NAME,PREFIX_MOBILE+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[NAME,VERSION$1],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[VERSION$1,[NAME,PREFIX_MOBILE+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[NAME,PREFIX_MOBILE+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[VERSION$1,NAME],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[NAME,[VERSION$1,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[NAME,VERSION$1],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[NAME,PREFIX_MOBILE+FIREFOX],VERSION$1],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[NAME,"Netscape"],VERSION$1],[/(wolvic|librewolf)\/([\w\.]+)/i],[NAME,VERSION$1],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[VERSION$1,[NAME,FIREFOX+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[NAME,[VERSION$1,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[NAME,[VERSION$1,/[^\d\.]+./,EMPTY]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[ARCHITECTURE,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[ARCHITECTURE,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[ARCHITECTURE,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[ARCHITECTURE,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[ARCHITECTURE,"arm"]],[/ sun4\w[;\)]/i],[[ARCHITECTURE,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[ARCHITECTURE,/ower/,EMPTY,lowerize]],[/mc680.0/i],[[ARCHITECTURE,"68k"]],[/winnt.+\[axp/i],[[ARCHITECTURE,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,TABLET]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,MOBILE]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[MODEL,[VENDOR,APPLE],[TYPE,MOBILE]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[MODEL,[VENDOR,APPLE],[TYPE,TABLET]],[/(macintosh);/i],[MODEL,[VENDOR,APPLE]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[MODEL,[VENDOR,SHARP],[TYPE,MOBILE]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[MODEL,[VENDOR,HONOR],[TYPE,TABLET]],[/honor([-\w ]+)[;\)]/i],[MODEL,[VENDOR,HONOR],[TYPE,MOBILE]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,TABLET]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[MODEL,[VENDOR,HUAWEI],[TYPE,MOBILE]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[MODEL,/_/g," "],[VENDOR,XIAOMI],[TYPE,TABLET]],[/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/oid[^\)]+; (redmi[\-_ ]?(?:note|k)?[\w_ ]+|m?[12]\d[01]\d\w{3,6}|poco[\w ]+|(shark )?\w{3}-[ah]0|qin ?[1-3](s\+|ultra| pro)?)( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[MODEL,/_/g," "],[VENDOR,XIAOMI],[TYPE,MOBILE]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-l]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[MODEL,[VENDOR,ONEPLUS],[TYPE,MOBILE]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[MODEL,[VENDOR,OPPO],[TYPE,MOBILE]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[MODEL,[VENDOR,strMapper,{OnePlus:["203","304","403","404","413","415"],"*":OPPO}],[TYPE,TABLET]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[MODEL,[VENDOR,"BLU"],[TYPE,MOBILE]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[MODEL,[VENDOR,"Vivo"],[TYPE,MOBILE]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[MODEL,[VENDOR,"Realme"],[TYPE,MOBILE]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[MODEL,[VENDOR,LENOVO],[TYPE,TABLET]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[MODEL,[VENDOR,LENOVO],[TYPE,MOBILE]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[MODEL,[VENDOR,MOTOROLA],[TYPE,MOBILE]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[MODEL,[VENDOR,MOTOROLA],[TYPE,TABLET]],[/\b(?:lg)?([vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[MODEL,[VENDOR,LG],[TYPE,TABLET]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[MODEL,[VENDOR,LG],[TYPE,MOBILE]],[/(nokia) (t[12][01])/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[MODEL,/_/g," "],[TYPE,MOBILE],[VENDOR,"Nokia"]],[/(pixel (c|tablet))\b/i],[MODEL,[VENDOR,GOOGLE],[TYPE,TABLET]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[MODEL,[VENDOR,GOOGLE],[TYPE,MOBILE]],[/(google) (pixelbook( go)?)/i],[VENDOR,MODEL],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[MODEL,[VENDOR,SONY],[TYPE,MOBILE]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[MODEL,"Xperia Tablet"],[VENDOR,SONY],[TYPE,TABLET]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[MODEL,[VENDOR,AMAZON],[TYPE,TABLET]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[MODEL,/(.+)/g,"Fire Phone $1"],[VENDOR,AMAZON],[TYPE,MOBILE]],[/(playbook);[-\w\),; ]+(rim)/i],[MODEL,VENDOR,[TYPE,TABLET]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[MODEL,[VENDOR,BLACKBERRY],[TYPE,MOBILE]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[MODEL,[VENDOR,ASUS],[TYPE,TABLET]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[MODEL,[VENDOR,ASUS],[TYPE,MOBILE]],[/(nexus 9)/i],[MODEL,[VENDOR,"HTC"],[TYPE,TABLET]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[VENDOR,[MODEL,/_/g," "],[TYPE,MOBILE]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[MODEL,[VENDOR,"TCL"],[TYPE,TABLET]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[MODEL,[VENDOR,"TCL"],[TYPE,MOBILE]],[/(itel) ((\w+))/i],[[VENDOR,lowerize],MODEL,[TYPE,strMapper,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[MODEL,[VENDOR,"Acer"],[TYPE,TABLET]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[MODEL,[VENDOR,"Meizu"],[TYPE,MOBILE]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[MODEL,[VENDOR,"Ulefone"],[TYPE,MOBILE]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[MODEL,[VENDOR,"Energizer"],[TYPE,MOBILE]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[MODEL,[VENDOR,"Cat"],[TYPE,MOBILE]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[MODEL,[VENDOR,"Smartfren"],[TYPE,MOBILE]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[MODEL,[VENDOR,"Nothing"],[TYPE,MOBILE]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[MODEL,[VENDOR,"Archos"],[TYPE,TABLET]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[MODEL,[VENDOR,"Archos"],[TYPE,MOBILE]],[/; (n159v)/i],[MODEL,[VENDOR,"HMD"],[TYPE,MOBILE]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[VENDOR,MODEL,[TYPE,TABLET]],[/(surface duo)/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,TABLET]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[MODEL,[VENDOR,"Fairphone"],[TYPE,MOBILE]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[MODEL,[VENDOR,NVIDIA],[TYPE,TABLET]],[/(sprint) (\w+)/i],[VENDOR,MODEL,[TYPE,MOBILE]],[/(kin\.[onetw]{3})/i],[[MODEL,/\./g," "],[VENDOR,MICROSOFT],[TYPE,MOBILE]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,TABLET]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,MOBILE]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[VENDOR,[TYPE,SMARTTV]],[/hbbtv.+maple;(\d+)/i],[[MODEL,/^/,"SmartTV"],[VENDOR,SAMSUNG],[TYPE,SMARTTV]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[VENDOR,MODEL,[TYPE,SMARTTV]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[VENDOR,LG],[TYPE,SMARTTV]],[/(apple) ?tv/i],[VENDOR,[MODEL,APPLE+" TV"],[TYPE,SMARTTV]],[/crkey.*devicetype\/chromecast/i],[[MODEL,CHROMECAST+" Third Generation"],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/crkey.*devicetype\/([^/]*)/i],[[MODEL,/^/,"Chromecast "],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/fuchsia.*crkey/i],[[MODEL,CHROMECAST+" Nest Hub"],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/crkey/i],[[MODEL,CHROMECAST],[VENDOR,GOOGLE],[TYPE,SMARTTV]],[/(portaltv)/i],[MODEL,[VENDOR,FACEBOOK],[TYPE,SMARTTV]],[/droid.+aft(\w+)( bui|\))/i],[MODEL,[VENDOR,AMAZON],[TYPE,SMARTTV]],[/(shield \w+ tv)/i],[MODEL,[VENDOR,NVIDIA],[TYPE,SMARTTV]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[MODEL,[VENDOR,SHARP],[TYPE,SMARTTV]],[/(bravia[\w ]+)( bui|\))/i],[MODEL,[VENDOR,SONY],[TYPE,SMARTTV]],[/(mi(tv|box)-?\w+) bui/i],[MODEL,[VENDOR,XIAOMI],[TYPE,SMARTTV]],[/Hbbtv.*(technisat) (.*);/i],[VENDOR,MODEL,[TYPE,SMARTTV]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[VENDOR,/.+\/(\w+)/,"$1",strMapper,{LG:"lge"}],[MODEL,trim$2],[TYPE,SMARTTV]],[/(playstation \w+)/i],[MODEL,[VENDOR,SONY],[TYPE,CONSOLE]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[MODEL,[VENDOR,MICROSOFT],[TYPE,CONSOLE]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i,/(valve).+(steam deck)/i,/droid.+; ((shield|rgcube|gr0006))( bui|\))/i],[[VENDOR,strMapper,{Nvidia:"Shield",Anbernic:"RGCUBE",Logitech:"GR0006"}],MODEL,[TYPE,CONSOLE]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[MODEL,[VENDOR,SAMSUNG],[TYPE,WEARABLE]],[/((pebble))app/i,/(asus|google|lg|oppo|xiaomi) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[VENDOR,MODEL,[TYPE,WEARABLE]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[MODEL,[VENDOR,OPPO],[TYPE,WEARABLE]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[MODEL,[VENDOR,APPLE],[TYPE,WEARABLE]],[/(opwwe\d{3})/i],[MODEL,[VENDOR,ONEPLUS],[TYPE,WEARABLE]],[/(moto 360)/i],[MODEL,[VENDOR,MOTOROLA],[TYPE,WEARABLE]],[/(smartwatch 3)/i],[MODEL,[VENDOR,SONY],[TYPE,WEARABLE]],[/(g watch r)/i],[MODEL,[VENDOR,LG],[TYPE,WEARABLE]],[/droid.+; (wt63?0{2,3})\)/i],[MODEL,[VENDOR,ZEBRA],[TYPE,WEARABLE]],[/droid.+; (glass) \d/i],[MODEL,[VENDOR,GOOGLE],[TYPE,XR]],[/(pico) ([\w ]+) os\d/i],[VENDOR,MODEL,[TYPE,XR]],[/(quest( \d| pro)?s?).+vr/i],[MODEL,[VENDOR,FACEBOOK],[TYPE,XR]],[/mobile vr; rv.+firefox/i],[[TYPE,XR]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[VENDOR,[TYPE,EMBEDDED]],[/(aeobc)\b/i],[MODEL,[VENDOR,AMAZON],[TYPE,EMBEDDED]],[/(homepod).+mac os/i],[MODEL,[VENDOR,APPLE],[TYPE,EMBEDDED]],[/windows iot/i],[[TYPE,EMBEDDED]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[MODEL,[TYPE,SMARTTV]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[TYPE,SMARTTV]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[MODEL,[TYPE,strMapper,{mobile:"Mobile",xr:"VR","*":TABLET}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[TYPE,TABLET]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[TYPE,MOBILE]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[MODEL,[VENDOR,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[VERSION$1,[NAME,EDGE+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[NAME,VERSION$1],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[VERSION$1,[NAME,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links|dillo)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[NAME,VERSION$1],[/ladybird\//i],[[NAME,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[VERSION$1,NAME]],os:[[/(windows nt) (6\.[23]); arm/i],[[NAME,/N/,"R"],[VERSION$1,strMapper,windowsVersionMap]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[NAME,VERSION$1],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[VERSION$1,/(;|\))/g,"",strMapper,windowsVersionMap],[NAME,WINDOWS]],[/(windows ce)\/?([\d\.]*)/i],[NAME,VERSION$1],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone)|.+apple ?tv)|ip(?:ad|hone)(?: |.+i(?:pad)?)os|apple ?tv.+ios)[\/ ]([\w\.]+)/i,/\btvos ?([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[VERSION$1,/_/g,"."],[NAME,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[NAME,"macOS"],[VERSION$1,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[VERSION$1,[NAME,CHROMECAST+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[VERSION$1,[NAME,CHROMECAST+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[VERSION$1,[NAME,CHROMECAST+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[VERSION$1,[NAME,CHROMECAST+" Linux"]],[/crkey\/([\d\.]+)/i],[VERSION$1,[NAME,CHROMECAST]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[VERSION$1,NAME],[/(ubuntu) ([\w\.]+) like android/i],[[NAME,/(.+)/,"$1 Touch"],VERSION$1],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[NAME,VERSION$1],[/\(bb(10);/i],[VERSION$1,[NAME,BLACKBERRY]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[VERSION$1,[NAME,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile[;\w ]*|tablet|tv|[^\)]*(?:viera|lg(?:l25|-d300)|alcatel ?o.+|y300-f1)); rv:([\w\.]+)\).+gecko\//i],[VERSION$1,[NAME,FIREFOX+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[VERSION$1,[NAME,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[VERSION$1,strMapper,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[NAME,"webOS"]],[/watch(?: ?os[,\/ ]|\d,\d\/)([\d\.]+)/i],[VERSION$1,[NAME,"watchOS"]],[/cros [\w]+(?:\)| ([\w\.]+)\b)/i],[VERSION$1,[NAME,"Chrome OS"]],[/kepler ([\w\.]+); (aft|aeo)/i],[VERSION$1,[NAME,"Vega OS"]],[/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[NAME,VERSION$1],[/(sunos) ?([\d\.]*)/i],[[NAME,"Solaris"],VERSION$1],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[NAME,VERSION$1]]},defaultProps=function(){var e0={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return setProps.call(e0.init,[[BROWSER,[NAME,VERSION$1,MAJOR,TYPE]],[CPU,[ARCHITECTURE]],[DEVICE,[TYPE,MODEL,VENDOR]],[ENGINE,[NAME,VERSION$1]],[OS,[NAME,VERSION$1]]]),setProps.call(e0.isIgnore,[[BROWSER,[VERSION$1,MAJOR]],[ENGINE,[VERSION$1]],[OS,[VERSION$1]]]),setProps.call(e0.isIgnoreRgx,[[BROWSER,/ ?browser$/i],[OS,/ ?os$/i]]),setProps.call(e0.toString,[[BROWSER,[NAME,VERSION$1]],[CPU,[ARCHITECTURE]],[DEVICE,[VENDOR,MODEL]],[ENGINE,[NAME,VERSION$1]],[OS,[NAME,VERSION$1]]]),e0}(),createIData=function(e0,_e){var i0=defaultProps.init[_e],r0=defaultProps.isIgnore[_e]||0,t0=defaultProps.isIgnoreRgx[_e]||0,n0=defaultProps.toString[_e]||0;function s0(){setProps.call(this,i0)}return s0.prototype.getItem=function(){return e0},s0.prototype.withClientHints=function(){return NAVIGATOR_UADATA?NAVIGATOR_UADATA.getHighEntropyValues(CH_ALL_VALUES).then(function(o0){return e0.setCH(new UACHData(o0,!1)).parseCH().get()}):e0.parseCH().get()},s0.prototype.withFeatureCheck=function(){return e0.detectFeature().get()},_e!=RESULT&&(s0.prototype.is=function(o0){var a0=!1;for(var f0 in this)if(this.hasOwnProperty(f0)&&!has(r0,f0)&&lowerize(t0?strip(t0,this[f0]):this[f0])==lowerize(t0?strip(t0,o0):o0)){if(a0=!0,o0!=TYPEOF.UNDEFINED)break}else if(o0==TYPEOF.UNDEFINED&&a0){a0=!a0;break}return a0},s0.prototype.toString=function(){var o0=EMPTY;for(var a0 in n0)typeof this[n0[a0]]!==TYPEOF.UNDEFINED&&(o0+=(o0?" ":EMPTY)+this[n0[a0]]);return o0||TYPEOF.UNDEFINED}),s0.prototype.then=function(o0){var a0=this,f0=function(){for(var u0 in a0)a0.hasOwnProperty(u0)&&(this[u0]=a0[u0])};f0.prototype={is:s0.prototype.is,toString:s0.prototype.toString,withClientHints:s0.prototype.withClientHints,withFeatureCheck:s0.prototype.withFeatureCheck};var l0=new f0;return o0(l0),l0},new s0};function UACHData(e0,_e){if(e0=e0||{},setProps.call(this,CH_ALL_VALUES),_e)setProps.call(this,[[BRANDS,itemListToArray(e0[CH])],[FULLVERLIST,itemListToArray(e0[CH_FULL_VER_LIST])],[MOBILE,/\?1/.test(e0[CH_MOBILE])],[MODEL,stripQuotes(e0[CH_MODEL])],[PLATFORM,stripQuotes(e0[CH_PLATFORM])],[PLATFORMVER,stripQuotes(e0[CH_PLATFORM_VER])],[ARCHITECTURE,stripQuotes(e0[CH_ARCH])],[FORMFACTORS,itemListToArray(e0[CH_FORM_FACTORS])],[BITNESS,stripQuotes(e0[CH_BITNESS])]]);else for(var i0 in e0)this.hasOwnProperty(i0)&&typeof e0[i0]!==TYPEOF.UNDEFINED&&(this[i0]=e0[i0])}function UAItem(e0,_e,i0,r0){return setProps.call(this,[["itemType",e0],["ua",_e],["uaCH",r0],["rgxMap",i0],["data",createIData(this,e0)]]),this}UAItem.prototype.get=function(e0){return e0?this.data.hasOwnProperty(e0)?this.data[e0]:void 0:this.data};UAItem.prototype.set=function(e0,_e){return this.data[e0]=_e,this};UAItem.prototype.setCH=function(e0){return this.uaCH=e0,this};UAItem.prototype.detectFeature=function(){if(NAVIGATOR&&NAVIGATOR.userAgent==this.ua)switch(this.itemType){case BROWSER:NAVIGATOR.brave&&typeof NAVIGATOR.brave.isBrave==TYPEOF.FUNCTION&&this.set(NAME,"Brave");break;case DEVICE:!this.get(TYPE)&&NAVIGATOR_UADATA&&NAVIGATOR_UADATA[MOBILE]&&this.set(TYPE,MOBILE),this.get(MODEL)=="Macintosh"&&NAVIGATOR&&typeof NAVIGATOR.standalone!==TYPEOF.UNDEFINED&&NAVIGATOR.maxTouchPoints&&NAVIGATOR.maxTouchPoints>2&&this.set(MODEL,"iPad").set(TYPE,TABLET);break;case OS:!this.get(NAME)&&NAVIGATOR_UADATA&&NAVIGATOR_UADATA[PLATFORM]&&this.set(NAME,NAVIGATOR_UADATA[PLATFORM]);break;case RESULT:var e0=this.data,_e=function(i0){return e0[i0].getItem().detectFeature().get()};this.set(BROWSER,_e(BROWSER)).set(CPU,_e(CPU)).set(DEVICE,_e(DEVICE)).set(ENGINE,_e(ENGINE)).set(OS,_e(OS))}return this};UAItem.prototype.parseUA=function(){switch(this.itemType!=RESULT&&rgxMapper.call(this.data,this.ua,this.rgxMap),this.itemType){case BROWSER:this.set(MAJOR,majorize(this.get(VERSION$1)));break;case OS:if(this.get(NAME)=="iOS"&&this.get(VERSION$1)=="18.6"){var e0=/\) Version\/([\d\.]+)/.exec(this.ua);e0&&parseInt(e0[1].substring(0,2),10)>=26&&this.set(VERSION$1,e0[1])}break}return this};UAItem.prototype.parseCH=function(){var e0=this.uaCH,_e=this.rgxMap;switch(this.itemType){case BROWSER:case ENGINE:var i0=e0[FULLVERLIST]||e0[BRANDS],r0;if(i0)for(var t0=0;t0<i0.length;t0++){var n0=i0[t0].brand||i0[t0],s0=i0[t0].version;this.itemType==BROWSER&&!/not.a.brand/i.test(n0)&&(!r0||/Chrom/.test(r0)&&n0!=CHROMIUM||r0==EDGE&&/WebView2/.test(n0))&&(n0=strMapper(n0,browserHintsMap),r0=this.get(NAME),r0&&!/Chrom/.test(r0)&&/Chrom/.test(n0)||this.set(NAME,n0).set(VERSION$1,s0).set(MAJOR,majorize(s0)),r0=n0),this.itemType==ENGINE&&n0==CHROMIUM&&this.set(VERSION$1,s0)}break;case CPU:var o0=e0[ARCHITECTURE];o0&&(o0&&e0[BITNESS]=="64"&&(o0+="64"),rgxMapper.call(this.data,o0+";",_e));break;case DEVICE:if(e0[MOBILE]&&this.set(TYPE,MOBILE),e0[MODEL]&&(this.set(MODEL,e0[MODEL]),!this.get(TYPE)||!this.get(VENDOR))){var a0={};rgxMapper.call(a0,"droid 9; "+e0[MODEL]+")",_e),!this.get(TYPE)&&a0.type&&this.set(TYPE,a0.type),!this.get(VENDOR)&&a0.vendor&&this.set(VENDOR,a0.vendor)}if(e0[FORMFACTORS]){var f0;if(typeof e0[FORMFACTORS]!="string")for(var l0=0;!f0&&l0<e0[FORMFACTORS].length;)f0=strMapper(e0[FORMFACTORS][l0++],formFactorsMap);else f0=strMapper(e0[FORMFACTORS],formFactorsMap);this.set(TYPE,f0)}break;case OS:var u0=e0[PLATFORM];if(u0){var A0=e0[PLATFORMVER];u0==WINDOWS&&(A0=parseInt(majorize(A0),10)>=13?"11":"10"),this.set(NAME,u0).set(VERSION$1,A0)}this.get(NAME)==WINDOWS&&e0[MODEL]=="Xbox"&&this.set(NAME,"Xbox").set(VERSION$1,void 0);break;case RESULT:var c0=this.data,k0=function(d0){return c0[d0].getItem().setCH(e0).parseCH().get()};this.set(BROWSER,k0(BROWSER)).set(CPU,k0(CPU)).set(DEVICE,k0(DEVICE)).set(ENGINE,k0(ENGINE)).set(OS,k0(OS))}return this};function UAParser(e0,_e,i0){if(typeof e0===TYPEOF.OBJECT?(isExtensions(e0,!0)?(typeof _e===TYPEOF.OBJECT&&(i0=_e),_e=e0):(i0=e0,_e=void 0),e0=void 0):typeof e0===TYPEOF.STRING&&!isExtensions(_e,!0)&&(i0=_e,_e=void 0),i0)if(typeof i0.append===TYPEOF.FUNCTION){var r0={};i0.forEach(function(l0,u0){r0[String(u0).toLowerCase()]=l0}),i0=r0}else{var t0={};for(var n0 in i0)i0.hasOwnProperty(n0)&&(t0[String(n0).toLowerCase()]=i0[n0]);i0=t0}if(!(this instanceof UAParser))return new UAParser(e0,_e,i0).getResult();var s0=typeof e0===TYPEOF.STRING?e0:i0&&i0[USER_AGENT]?i0[USER_AGENT]:NAVIGATOR&&NAVIGATOR.userAgent?NAVIGATOR.userAgent:EMPTY,o0=new UACHData(i0,!0),a0=_e?extend$3(defaultRegexes,_e):defaultRegexes,f0=function(l0){return l0==RESULT?function(){return new UAItem(l0,s0,a0,o0).set("ua",s0).set(BROWSER,this.getBrowser()).set(CPU,this.getCPU()).set(DEVICE,this.getDevice()).set(ENGINE,this.getEngine()).set(OS,this.getOS()).get()}:function(){return new UAItem(l0,s0,a0[l0],o0).parseUA().get()}};return setProps.call(this,[["getBrowser",f0(BROWSER)],["getCPU",f0(CPU)],["getDevice",f0(DEVICE)],["getEngine",f0(ENGINE)],["getOS",f0(OS)],["getResult",f0(RESULT)],["getUA",function(){return s0}],["setUA",function(l0){return isString$1(l0)&&(s0=trim$2(l0,UA_MAX_LENGTH)),this}]]).setUA(s0),this}UAParser.VERSION=LIBVERSION;UAParser.BROWSER=enumerize([NAME,VERSION$1,MAJOR,TYPE]);UAParser.CPU=enumerize([ARCHITECTURE]);UAParser.DEVICE=enumerize([MODEL,VENDOR,TYPE,CONSOLE,MOBILE,SMARTTV,TABLET,WEARABLE,EMBEDDED]);UAParser.ENGINE=UAParser.OS=enumerize([NAME,VERSION$1]);function e$b(e0){let _e=new Date().getTime();return`${e0}${e0.includes("?")?"&":"?"}timestamp=${_e}`}var e$a=(e0,_e)=>{if(e0==0)return"0 octets";let i0=1e3,r0=_e,t0=["octets","Ko","Mo","Go"],n0=Math.floor(Math.log(e0)/Math.log(i0));return parseFloat((e0/i0**n0).toFixed(r0))+" "+t0[n0]},e$9=class{static isLocalURL(_e){return _e.length>0&&_e.charAt(0)==="/"}static startWithHttp(_e){return/^https?:\/\//gi.test(_e)}static toCounter(_e){return _e>999?`${Number(_e/1e3).toFixed(1)} k`:""+_e}static generateVirtualId(){return"xxxx-xxxx-xxx-xxxx".replace(/[x]/g,()=>Math.floor(Math.random()*16).toString(16))}},t$6=(e0,_e)=>{let i0="virtualID";if(!Object.hasOwnProperty.apply(e0,[i0])){let r0=_e??`${e$9.generateVirtualId()}#${e0.size}`;Object.defineProperty(e0,i0,{value:r0,writable:!1})}return e0[i0]},e$8=class{static changeDimension(_e,i0,r0,t0){return r0>t0&&(_e=Math.round(_e*t0/r0),r0=t0),_e>i0&&(r0=Math.round(r0*i0/_e),_e=i0),{height:_e,width:r0}}static renameFileNameExtension(_e,i0){let r0=_e.split(".");return r0.pop(),r0.join(".")+"."+i0}static resizeImage(_e,i0,r0,t0,n0="jpeg",s0=80){let o0=s0/100,a0=document.createElement("canvas"),f0=`image/${n0}`,l0=_e.width,u0=_e.height,A0=this.changeDimension(u0,t0,l0,r0);l0=A0.width,u0=A0.height;let c0=a0.getContext("2d");return c0&&(a0.width=l0,a0.height=u0,c0.fillStyle="white",c0.fillRect(0,0,a0.width,a0.height),c0.imageSmoothingEnabled&&c0.imageSmoothingQuality&&(c0.imageSmoothingQuality="high"),c0.drawImage(_e,0,0,l0,u0)),new Promise((k0,d0)=>{a0.toBlob(h0=>{h0?k0(new File([h0],i0,{type:f0,lastModified:new Date().getTime()})):d0()},f0,o0)})}static async resizeImageFile(_e,i0=1440,r0=1440,t0=80){if(!_e)throw Error("Image resizer: file not found!");if(!_e.type||!_e.type.startsWith("image/"))throw Error("Image resizer: the file given is not an image.");let n0="jpeg";return new Promise(s0=>{let o0=new Image;o0.setAttribute("style","max-width: none;"),o0.src=URL.createObjectURL(_e),o0.onload=async()=>{s0(await this.resizeImage(o0,this.renameFileNameExtension(_e.name,n0),i0,r0,n0,t0))},o0.onerror=a0=>{throw Error("Image Loading Error: "+a0)}})}},e$7={blog:"Blog",mindmap:"MindMap",scrapbook:"ScrapBook",collaborativewall:"CollaborativeWall",timelinegenerator:"TimelineGenerator",wiki:"Wiki",exercizer:"Exercizer"},Er,e$6=(Er=class{constructor(){Z0(this,"wordExtensions",new Set);Z0(this,"excelExtensions",new Set);Z0(this,"pptExtensions",new Set);Z0(this,"fileExtensionMap",new Map);Z0(this,"csvContentType",new Set);Z0(this,"csvExtensions",new Set);Z0(this,"txtExtensions",new Set);Z0(this,"mdExtensions",new Set);Z0(this,"PDF","application/pdf");Z0(this,"OCTET_STREAM","application/octet-stream");this.txtExtensions.add("txt"),this.mdExtensions.add("md"),this.wordExtensions.add("doc"),this.wordExtensions.add("dot"),this.wordExtensions.add("docx"),this.wordExtensions.add("dotx"),this.wordExtensions.add("docm"),this.wordExtensions.add("dotm"),this.wordExtensions.add("odt"),this.wordExtensions.add("ott"),this.wordExtensions.add("oth"),this.wordExtensions.add("odm"),this.excelExtensions.add("xls"),this.excelExtensions.add("xlt"),this.excelExtensions.add("xla"),this.excelExtensions.add("xlsx"),this.excelExtensions.add("xltx"),this.excelExtensions.add("xlsm"),this.excelExtensions.add("xltm"),this.excelExtensions.add("xlam"),this.excelExtensions.add("xlsb"),this.excelExtensions.add("ods"),this.excelExtensions.add("ots"),this.pptExtensions.add("ppt"),this.pptExtensions.add("pot"),this.pptExtensions.add("pps"),this.pptExtensions.add("ppa"),this.pptExtensions.add("pptx"),this.pptExtensions.add("potx"),this.pptExtensions.add("ppsx"),this.pptExtensions.add("ppam"),this.pptExtensions.add("pptm"),this.pptExtensions.add("potm"),this.pptExtensions.add("ppsm"),this.pptExtensions.add("odp"),this.pptExtensions.add("otp"),this.csvExtensions.add("csv"),this.fileExtensionMap.set("doc","application/msword"),this.fileExtensionMap.set("dot","application/msword"),this.fileExtensionMap.set("docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"),this.fileExtensionMap.set("dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"),this.fileExtensionMap.set("docm","application/vnd.ms-word.document.macroEnabled.12"),this.fileExtensionMap.set("dotm","application/vnd.ms-word.template.macroEnabled.12"),this.fileExtensionMap.set("xls","application/vnd.ms-excel"),this.fileExtensionMap.set("xlt","application/vnd.ms-excel"),this.fileExtensionMap.set("xla","application/vnd.ms-excel"),this.fileExtensionMap.set("xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"),this.fileExtensionMap.set("xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"),this.fileExtensionMap.set("xlsm","application/vnd.ms-excel.sheet.macroEnabled.12"),this.fileExtensionMap.set("xltm","application/vnd.ms-excel.template.macroEnabled.12"),this.fileExtensionMap.set("xlam","application/vnd.ms-excel.addin.macroEnabled.12"),this.fileExtensionMap.set("xlsb","application/vnd.ms-excel.sheet.binary.macroEnabled.12"),this.fileExtensionMap.set("ppt","application/vnd.ms-powerpoint"),this.fileExtensionMap.set("pot","application/vnd.ms-powerpoint"),this.fileExtensionMap.set("pps","application/vnd.ms-powerpoint"),this.fileExtensionMap.set("ppa","application/vnd.ms-powerpoint"),this.fileExtensionMap.set("pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"),this.fileExtensionMap.set("potx","application/vnd.openxmlformats-officedocument.presentationml.template"),this.fileExtensionMap.set("ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"),this.fileExtensionMap.set("ppam","application/vnd.ms-powerpoint.addin.macroEnabled.12"),this.fileExtensionMap.set("pptm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"),this.fileExtensionMap.set("potm","application/vnd.ms-powerpoint.presentation.macroEnabled.12"),this.fileExtensionMap.set("ppsm","application/vnd.ms-powerpoint.slideshow.macroEnabled.12"),this.fileExtensionMap.set("odt","application/vnd.oasis.opendocument.text"),this.fileExtensionMap.set("ott","application/vnd.oasis.opendocument.text-template"),this.fileExtensionMap.set("oth","application/vnd.oasis.opendocument.text-web"),this.fileExtensionMap.set("odm","application/vnd.oasis.opendocument.text-master"),this.fileExtensionMap.set("odg","application/vnd.oasis.opendocument.graphics"),this.fileExtensionMap.set("otg","application/vnd.oasis.opendocument.graphics-template"),this.fileExtensionMap.set("odp","application/vnd.oasis.opendocument.presentation"),this.fileExtensionMap.set("otp","application/vnd.oasis.opendocument.presentation-template"),this.fileExtensionMap.set("ods","application/vnd.oasis.opendocument.spreadsheet"),this.fileExtensionMap.set("ots","application/vnd.oasis.opendocument.spreadsheet-template"),this.fileExtensionMap.set("odc","application/vnd.oasis.opendocument.chart"),this.fileExtensionMap.set("odf","application/vnd.oasis.opendocument.formula"),this.fileExtensionMap.set("odb","application/vnd.oasis.opendocument.database"),this.fileExtensionMap.set("odi","application/vnd.oasis.opendocument.image"),this.fileExtensionMap.set("oxt","application/vnd.openofficeorg.extension"),this.fileExtensionMap.set("txt","text/plain"),this.fileExtensionMap.set("md","text/markdown"),this.csvContentType.add("text/comma-separated-values"),this.csvContentType.add("text/csv"),this.csvContentType.add("application/csv")}getContentTypeForExtension(_e){return this.fileExtensionMap.has(_e)?this.fileExtensionMap.get(_e)??null:null}getExtensionForContentType(_e){for(let i0 of Array.from(this.fileExtensionMap.keys()))if((this.fileExtensionMap.get(i0)||"").toLowerCase()==(_e||"").toLowerCase())return i0;return null}isWordLike(_e,i0){let r0=this.getExtensionForContentType(_e);return r0?this.wordExtensions.has(r0):_e==this.OCTET_STREAM&&i0?this.wordExtensions.has(i0):!1}isExcelLike(_e,i0){let r0=this.getExtensionForContentType(_e);return r0?this.excelExtensions.has(r0):_e==this.OCTET_STREAM&&i0?this.excelExtensions.has(i0):!1}isCsvLike(_e,i0){return this.csvContentType.has(_e)?!0:_e==this.OCTET_STREAM&&i0?this.csvExtensions.has(i0):!1}isPowerpointLike(_e,i0){let r0=this.getExtensionForContentType(_e);return r0?this.pptExtensions.has(r0):_e==this.OCTET_STREAM&&i0?this.pptExtensions.has(i0):!1}isTxtLike(_e,i0){let r0=this.getExtensionForContentType(_e);return r0?this.txtExtensions.has(r0):_e==this.OCTET_STREAM&&i0?this.txtExtensions.has(i0):!1}isMdLike(_e,i0){let r0=this.getExtensionForContentType(_e);return r0?this.mdExtensions.has(r0):_e==this.OCTET_STREAM&&i0?this.mdExtensions.has(i0):!1}},Z0(Er,"INSTANCE",new Er),Er),e$5=e0=>{if(e0>0){let _e=Math.floor(e0/1e3),i0=Math.floor(_e/60);return _e%=60,i0%=60,t$5(i0)+":"+t$5(_e)}return"00:00"},t$5=e0=>e0.toString().padStart(2,"0"),e$4=()=>MediaRecorder.isTypeSupported?["video/webm;codecs=vp9",'video/mp4; codecs="avc1.424028, mp4a.40.2"',"video/webm;codecs=vp8,opus","video/webm"].find(e0=>MediaRecorder.isTypeSupported(e0)?!0:(console.error(`${e0} is not Supported`),!1))||"video/ogg":"video/webm;codecs=vp8,opus",ERROR_CODE={SUCCESS:"0000",UNKNOWN:"0010",NOT_INITIALIZED:"0020",NOT_SUPPORTED:"0030",APP_NOT_FOUND:"0040",AGENT_NOT_FOUND:"0050",TRANSPORT_ERROR:"0060",TIME_OUT:"0070",MALFORMED_DATA:"0080",NOT_LOGGED_IN:"0090"},APP$1={VIDEO:"video"},tr,SimpleChannel=(tr=class{constructor(_e){Z0(this,"name");Z0(this,"listeners",new Set);this.name=_e}static getChannel(_e){let i0=tr.channels.get(_e);return i0||(i0=new tr(_e),tr.channels.set(_e,i0)),i0}listen(_e){return this.listeners.add(_e),()=>{this.listeners.delete(_e)}}publish(_e){for(let i0 of Array.from(this.listeners))try{i0(_e)}catch(r0){console.error("[SimpleChannel] publish failed",r0)}}close(){this.listeners.clear(),tr.channels.delete(this.name)}},Z0(tr,"channels",new Map),tr),Subscription=class{constructor(e0,_e){Z0(this,"_channel");Z0(this,"revoke");this._channel=e0,this.revoke=this.setReceiver(i0=>_e==null?void 0:_e(i0))}setReceiver(e0){if(!this._channel)return()=>{};let _e=this._channel.listen(e0);return()=>{_e(),this._channel=void 0}}},Subject=class{constructor(){Z0(this,"publishChannels",new Map)}getChannelName(e0){return"Subject:"+e0}getPublishChannel(e0){let _e=this.getChannelName(e0),i0=this.publishChannels.get(_e);return i0||(i0=this.newChannel(e0),this.publishChannels.set(_e,i0)),i0}newChannel(e0){let _e=this.getChannelName(e0);return SimpleChannel.getChannel(_e)}publish(e0,_e){typeof e0=="string"&&this.getPublishChannel(e0).publish(_e)}subscribe(e0,_e){return typeof e0=="string"?new Subscription(this.newChannel(e0),_e):new Subscription}},ASYNC_DATA_NAME={SESSION_READY:"sessionReady",LANG_READY:"langReady",SKIN_READY:"skinReady",OVERRIDE_READY:"overrideReady",APPCONF_READY:"appConfReady"},Promisified=class{constructor(){Z0(this,"_resolution");Z0(this,"_rejection");Z0(this,"_promise",new Promise((e0,_e)=>{this._resolution=e0,this._rejection=_e}))}get promise(){return this._promise}resolve(e0){this._resolution&&this._resolution(e0)}reject(e0){this._rejection&&this._rejection(e0)}},NotifyFramework=class{constructor(){Z0(this,"promises",{});Z0(this,"subject",new Subject)}asyncData(e0){return this.promises[e0]===void 0&&(this.promises[e0]=new Promisified),this.promises[e0]}onSessionReady(){return this.asyncData(ASYNC_DATA_NAME.SESSION_READY)}onLangReady(){return this.asyncData(ASYNC_DATA_NAME.LANG_READY)}onSkinReady(){return this.asyncData(ASYNC_DATA_NAME.SKIN_READY)}onOverridesReady(){return this.asyncData(ASYNC_DATA_NAME.OVERRIDE_READY)}onAppConfReady(){return this.asyncData(ASYNC_DATA_NAME.APPCONF_READY)}promisify(){return new Promisified}events(){return this.subject}},notify=new NotifyFramework,loadedScripts$1={},Http=class{constructor(e0){Z0(this,"axios");Z0(this,"_latestResponse");this.axios=axios.create(e0)}setCdn(e0){e0&&XMLHttpRequest&&!XMLHttpRequest.prototype.cdnUrl&&(XMLHttpRequest.prototype.cdnUrl=e0,XMLHttpRequest.prototype.baseOpen=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(){let _e=arguments[1];return _e.startsWith("/infra/public")&&(arguments[1]=e0+_e),/^\/([^\/]*)\/public/.test(_e)&&(arguments[1]=e0+_e),_e.startsWith("/assets")&&(arguments[1]=e0+_e),_e=="/conf/public"&&(arguments[1]=_e),_e.startsWith("http")&&(arguments[1]=_e),this.baseOpen.apply(this,arguments)})}toAxiosConfig(e0){if(e0){let _e=Object.assign({},this.axios.defaults);return e0.headers&&(_e.headers&&(_e.headers=Object.assign({},this.axios.defaults.headers)),Object.assign(_e.headers,e0.headers)),e0.responseType&&(_e.responseType=e0.responseType),e0.queryParams&&(_e.params=Object.assign({},e0.queryParams)),_e}else return this.axios.defaults}toCdnUrl(e0){let _e=ConfigurationFrameworkFactory.instance().Platform.cdnDomain;if((_e==null?void 0:_e.length)>0&&e0!=="/conf/public"){let i0=""+e0;(i0.startsWith("/infra/public")||i0.startsWith("/assets")||/^\/([^\/]*)\/public/.test(i0))&&(e0=_e+i0)}return e0}mapAxiosError(e0,_e){return e0.response?this._latestResponse=e0.response:e0.request?this._latestResponse={status:408,statusText:ERROR_CODE.TIME_OUT}:this._latestResponse={status:500,statusText:ERROR_CODE.UNKNOWN},!_e||_e.disableNotifications,this._latestResponse}mapAxiosResponse(e0,_e){return this._latestResponse=e0,e0.data}get latestResponse(){return this._latestResponse}isResponseError(){return this.latestResponse.status<200||this.latestResponse.status>=300}get(e0,_e){return this.axios.get(this.toCdnUrl(e0),this.toAxiosConfig(_e)).then(i0=>this.mapAxiosResponse(i0,_e)).catch(i0=>this.mapAxiosError(i0,_e))}post(e0,_e,i0){return this.axios.post(e0,_e,this.toAxiosConfig(i0)).then(r0=>this.mapAxiosResponse(r0,i0)).catch(r0=>this.mapAxiosError(r0,i0))}postFile(e0,_e,i0){let r0=this.toAxiosConfig(i0);return r0.headers&&r0.headers["Content-Type"]&&delete r0.headers["Content-Type"],this.axios.post(e0,_e,r0).then(t0=>this.mapAxiosResponse(t0,i0)).catch(t0=>this.mapAxiosError(t0,i0))}postJson(e0,_e,i0){let r0=this.toAxiosConfig();return r0.headers&&(r0.headers["Content-Type"]="application/json"),this.axios.post(e0,_e,this.toAxiosConfig(i0)).then(t0=>this.mapAxiosResponse(t0,i0)).catch(t0=>this.mapAxiosError(t0,i0))}put(e0,_e,i0){return this.axios.put(e0,_e,this.toAxiosConfig(i0)).then(r0=>this.mapAxiosResponse(r0,i0)).catch(r0=>this.mapAxiosError(r0,i0))}putJson(e0,_e,i0){let r0=this.toAxiosConfig(i0);return r0.headers&&(r0.headers["Content-Type"]="application/json"),this.axios.put(e0,_e,r0).then(t0=>this.mapAxiosResponse(t0,i0)).catch(t0=>this.mapAxiosError(t0,i0))}delete(e0,_e){return this.axios.delete(e0,this.toAxiosConfig(_e)).then(i0=>this.mapAxiosResponse(i0,_e)).catch(i0=>this.mapAxiosError(i0,_e))}deleteJson(e0,_e){return this.axios.delete(e0,{data:_e}).then(i0=>this.mapAxiosResponse(i0)).catch(i0=>this.mapAxiosError(i0))}getScript(e0,_e,i0){let r0=i0??"exports",t0=this.toAxiosConfig(_e);return t0.headers&&(t0.headers.Accept="application/javascript"),this.axios.get(this.toCdnUrl(e0),t0).then(n0=>this.mapAxiosResponse(n0,_e)).then(n0=>{try{let s0=`"use strict";var ${r0.split(".")[0]}={};${n0};return ${r0};`;return Function(s0)()}catch{return n0}}).catch(n0=>{throw this.mapAxiosError(n0,_e),n0})}loadScript(e0,_e){return loadedScripts$1[e0]?Promise.resolve():this.getScript(e0,_e).then(i0=>{loadedScripts$1[e0]=!0})}},TransportFramework=class{constructor(){Z0(this,"_http",new Http)}get http(){return this._http}newHttpInstance(e0){return new Http(e0)}},transport=new TransportFramework,ConfigurationFrameworkFactory=class{static instance(){return configure}},http$2=transport.http,Session=class{constructor(){Z0(this,"_me",null);Z0(this,"_currentLanguage","");Z0(this,"_notLoggedIn",!0);Z0(this,"_description");Z0(this,"_profile")}get currentLanguage(){return this._currentLanguage}get notLoggedIn(){return this._notLoggedIn}get description(){return this._description}get avatarUrl(){let e0=this.description.photo;return(!e0||e0==="no-avatar.jpg"||e0==="no-avatar.svg")&&(e0=ConfigurationFrameworkFactory.instance().Platform.theme.basePath+"/img/illustrations/no-avatar.svg"),e0}get user(){return this._me}get currentApp(){return configure.Platform.apps.currentApp}async initialize(){return http$2.get("/auth/oauth2/userinfo").then(e0=>{if(http$2.isResponseError()||typeof e0=="string")throw ERROR_CODE.NOT_LOGGED_IN;return this.setCurrentModel(e0),this._notLoggedIn?this.loadDefaultLanguage():this.loadUserLanguage()}).then(e0=>(this.setCurrentLanguage(e0),this.loadDescription())).then(()=>this.getUserProfile()).then(()=>{notify.onSessionReady().resolve(this._me)}).catch(e0=>{if(e0===ERROR_CODE.NOT_LOGGED_IN)return Promise.resolve();notify.onSessionReady().reject(e0)})}setCurrentModel(e0){this._me=e0,this._notLoggedIn=!(e0&&e0.sessionMetadata&&e0.sessionMetadata.userId)}hasWorkflow(e0){var _e;return e0===void 0||((_e=this._me)==null?void 0:_e.authorizedActions.findIndex(i0=>i0.name===e0))!==-1}hasRight(e0,_e){if(_e==="owner")return e0.owner&&e0.owner.userId===this._me.userId;let i0=_e.right||_e,r0=e0.shared.filter(n0=>(this._me.groupsIds||[]).indexOf(n0.groupId)!==-1||n0.userId===this._me.userId).find(n0=>n0[i0]||n0.manager)!==void 0,t0=_e.workflow?this.hasWorkflow(_e.workflow):!0;return r0&&t0}get latestQuotaAndUsage(){return http$2.get(`/workspace/quota/user/${this._me.userId}`).then(e0=>(this._description&&(this._description.quota=e0.quota,this._description.storage=e0.storage),e0)).catch(()=>({quota:0,storage:0}))}setCurrentLanguage(e0){this._currentLanguage=e0,notify.onLangReady().resolve(e0)}loadDefaultLanguage(){return http$2.get("/locale").then(e0=>e0.locale).catch(()=>this._currentLanguage)}loadDescription(){return Promise.all([http$2.get("/userbook/api/person",{requestName:"refreshAvatar"}),http$2.get("/directory/userbook/"+this._me.userId)]).then(e0=>(e0[0].status==="ok"&&e0[0].result&&e0[0].result.length>0?this._description=e0[0].result[0]:this._description={},this._description.type&&!this._description.profiles&&(this._description.profiles=this._description.type),Object.assign(this._description,e0[1]),this._description))}get profile(){return this._profile}getUserProfile(){return http$2.get("/userbook/api/person").then(e0=>e0.result).then(e0=>this._profile=e0[0].type)}loadUserLanguage(){return http$2.get("/userbook/preference/language").then(e0=>{try{return JSON.parse(e0.preference)["default-domain"]}catch{return this.loadDefaultLanguage()}}).catch(()=>this.loadDefaultLanguage())}getEmailValidationInfos(){return http$2.get("/directory/user/mailstate")}checkEmail(e0){return http$2.put("/directory/user/mailstate",{email:e0})}tryEmailValidation(e0){return http$2.post("/directory/user/mailstate",{key:e0})}getMobileValidationInfos(){return http$2.get("/directory/user/mobilestate")}checkMobile(e0){return http$2.put("/directory/user/mobilestate",{mobile:e0})}tryMobileValidation(e0){return http$2.post("/directory/user/mobilestate",{key:e0})}getMfaInfos(){return http$2.get("/auth/user/mfa/code")}tryMfaCode(e0){return http$2.post("/auth/user/mfa/code",{key:e0})}},SessionFramework=class{constructor(){Z0(this,"session",new Session)}initialize(){return this.session.initialize()}login(e0,_e,i0,r0){let t0=new FormData;return t0.append("email",e0),t0.append("password",_e),i0!==void 0&&t0.append("rememberMe",""+i0),r0!==void 0&&t0.append("secureLocation",""+r0),transport.http.post("/auth/login",t0,{headers:{"content-type":"application/x-www-form-urlencoded"}}).finally(()=>{switch(transport.http.latestResponse.status){case 200:throw ERROR_CODE.MALFORMED_DATA}})}logout(){return transport.http.get("/auth/logout").finally(()=>{})}},session=new SessionFramework,Theme$1=class{constructor(){Z0(this,"_conf");Z0(this,"_loaded");Z0(this,"skinName","");Z0(this,"themeName","");Z0(this,"skin","raw");Z0(this,"themeUrl","/assets/themes/raw/default/");Z0(this,"templateOverrides",{});Z0(this,"portalTemplate","/assets/themes/raw/portal.html");Z0(this,"basePath","");Z0(this,"logoutCallback","");Z0(this,"skins",[]);Z0(this,"is1D",!1);Z0(this,"is2D",!1);Z0(this,"_onSkinReady",notify.onSkinReady());Z0(this,"_onOverrideReady",notify.onOverridesReady())}initialize(_e){return notify.onSessionReady().promise.then(()=>this.load(_e))}get version(){return configure.Platform.deploymentTag}get cdnDomain(){return configure.Platform.cdnDomain}async onFullyReady(){return await this._loaded,this}onSkinReady(){return this._onSkinReady.promise}onOverrideReady(){return this._onOverrideReady.promise}async getConf(_e){return this._conf=this._conf??await transport.http.getScript("/assets/theme-conf.js",{queryParams:{v:_e??this.version}},"exports.conf"),this._conf}load(_e){return _e??(_e=this.version),this._loaded||(this._loaded=(session.session.notLoggedIn?this.loadDisconnected(_e):this.loadConnected(_e)).then(async()=>{var r0,t0;let i0=await this.listSkins();this.is1D=((r0=i0.find(n0=>n0.child===this.skin))==null?void 0:r0.parent)==="panda",this.is2D=((t0=i0.find(n0=>n0.child===this.skin))==null?void 0:t0.parent)==="theme-open-ent"})),this._loaded}loadDisconnected(_e){return new Promise((i0,r0)=>{transport.http.get("/skin",{queryParams:{v:this.version}}).then(t0=>{this.skin=t0.skin,this.themeUrl=`${this.cdnDomain}/assets/themes/${t0.skin}/skins/default/`,this.basePath=this.themeUrl+"../../",this._onSkinReady.resolve(this),transport.http.get(`/assets/themes/${t0.skin}/template/override.json`,{disableNotifications:!0,queryParams:{v:_e}}).then(n0=>{this.templateOverrides=n0,this._onOverrideReady.resolve(n0),i0()}).catch(n0=>{if(transport.http.latestResponse.status===404)i0();else throw n0})}).catch(t0=>{this._onSkinReady.reject(t0),this._onOverrideReady.reject(t0),r0()})})}loadConnected(_e){return new Promise((i0,r0)=>{this.loadDefaultTheme(_e).then(()=>{this._onSkinReady.resolve(this),transport.http.get(`/assets/themes/${this.skin}/template/override.json`,{disableNotifications:!0,queryParams:{v:_e}}).then(t0=>{this.templateOverrides=t0,this._onOverrideReady.resolve(t0),i0()}).catch(t0=>{if(transport.http.latestResponse.status===404)i0(),this._onSkinReady.reject(t0),this._onOverrideReady.reject(t0);else throw t0})})})}async loadDefaultTheme(_e){return session.session.notLoggedIn?Promise.reject():transport.http.get("/theme",{queryParams:{_:_e}}).then(i0=>{this.skinName=i0.skinName,this.themeName=i0.themeName,this.themeUrl=i0.skin,this.basePath=`${this.cdnDomain}${this.themeUrl}../../`,this.skin=this.themeUrl.split("/assets/themes/")[1].split("/")[0],this.portalTemplate=`${this.cdnDomain}/assets/themes/${this.skin}/portal.html`,this.logoutCallback=i0.logoutCallback})}listThemes(){return transport.http.get("/themes")}async setDefaultTheme(_e){await transport.http.get("/userbook/api/edit-userbook-info?prop=theme-"+this.skin+"&value="+_e._id),await this.loadDefaultTheme(this.version)}listSkins(){return this.skins.length>0?Promise.resolve(this.skins):this.getConf().then(_e=>{let i0=_e.overriding.find(r0=>r0.child===this.skin);return i0!=null&&i0.group?this.skins=this.skins.concat(_e.overriding.filter(r0=>r0.group===i0.group)):this.skins=this.skins.concat(_e.overriding),this.skins})}async getHelpPath(){var _e;return((_e=(await this.listSkins()).find(i0=>i0.child===this.skin))==null?void 0:_e.help)??"/help"}},bundle$1={},promises$1={},defaultDiacriticsRemovalMap$1=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],Idiom=class{translate(e0,_e){e0??(e0="");let i0=bundle$1[e0]===void 0?e0:bundle$1[e0];if(_e&&typeof _e=="object")for(let r0 in _e)_e[r0]!==void 0&&(i0=i0.replace(RegExp("\\${"+r0+"}","g"),""+_e[r0]));return i0}addBundlePromise(e0){return this.loadBundlePromise(session.session.currentLanguage,e0)}addBundle(e0,_e){this.loadBundle(session.session.currentLanguage,e0,_e)}loadBundlePromise(e0,_e){return this.loadBundle(e0,_e),promises$1[_e]}loadBundle(e0,_e,i0){let r0=promises$1[_e];if(r0)i0&&r0.then(i0).catch(i0);else{let t0=new Promisified;promises$1[_e]=t0.promise;let n0={};e0&&(n0["Accept-Language"]=e0),transport.http.get(_e,{headers:n0}).then(s0=>{Object.assign(bundle$1,s0),typeof i0=="function"&&i0(),t0.resolve()}).catch(s0=>{typeof i0=="function"&&i0(),t0.reject()})}}addTranslations(e0,_e){notify.onLangReady().promise.then(i0=>{this.loadBundle(i0,e0+"/"+i0+".json",_e)})}addAllTranslations(e0){return e0&&e0.length>0?notify.onLangReady().promise.then(_e=>Promise.all(e0.map(i0=>this.loadBundlePromise(_e,i0+"/"+_e+".json")))).then(()=>{}):Promise.reject()}addKeys(e0){for(let _e in e0)typeof bundle$1[_e]!="string"&&(bundle$1[_e]=e0[_e])}removeAccents(e0){for(let _e=0;_e<defaultDiacriticsRemovalMap$1.length;_e++)e0=e0.replace(defaultDiacriticsRemovalMap$1[_e].letters,defaultDiacriticsRemovalMap$1[_e].base);return e0}},UserPreferences=class{constructor(){Z0(this,"data",{})}get(e0){return this.data[e0]}load(e0,_e){return transport.http.get("/userbook/preference/"+e0).then(i0=>{try{return JSON.parse(i0.preference)}catch{return _e??{}}}).then(i0=>(this.data[e0]=i0??{},i0))}update(e0,_e){return _e!==void 0&&(this.data[e0]=_e),this}save(e0){return transport.http.putJson("/userbook/preference/"+e0,this.data[e0])}},User=class{constructor(){Z0(this,"_me",null);Z0(this,"_keepOpenOnLogout",!1);Z0(this,"_preferences",new UserPreferences);Z0(this,"_bookmarkedApps",[])}get keepOpenOnLogout(){return this._keepOpenOnLogout}get preferences(){return this._preferences}get bookmarkedApps(){return this._bookmarkedApps}initialize(e0){return this.loadPublicConf(),notify.onSessionReady().promise.then(_e=>{_e&&this.setCurrentModel(_e)})}setCurrentModel(e0){this._me=e0,this._preferences=new UserPreferences,this.loadBookmarks()}loadPublicConf(){return transport.http.get("/conf/public").then(e0=>(this._keepOpenOnLogout=(e0==null?void 0:e0.keepOpenOnLogout)||!1,e0))}async loadBookmarks(){await transport.http.get("/userbook/preference/apps").then(e0=>{e0.preference||(e0.preference=null);let _e=JSON.parse(e0.preference),i0;if(_e&&_e.length&&typeof _e.concat=="function"){this._bookmarkedApps=_e,i0={bookmarks:_e.map(n0=>n0.name),applications:[]},transport.http.putJson("/userbook/preference/apps",i0);return}else i0=_e;i0||(i0={bookmarks:[],applications:[]});let r0=!0,t0=[];i0.bookmarks.forEach((n0,s0)=>{let o0=this._me.apps.find(a0=>a0.name===n0);if(o0){let a0=Object.assign({},o0);this._bookmarkedApps.push(a0)}else t0.push(n0),r0=!1}),t0.forEach(n0=>{let s0=i0.bookmarks.indexOf(n0);s0!==-1&&i0.bookmarks.splice(s0,1)}),r0||transport.http.putJson("/userbook/preference/apps",i0)})}loadAppPrefs(e0){return this.preferences.load(e0,{})}saveAppPrefs(e0){return this.preferences.save(e0)}loadLanguage(){return this.preferences.load("language",{"default-domain":session.session.currentLanguage}).then(e0=>e0["default-domain"])}saveLanguage(e0){return this.preferences.update("language",{"default-domain":e0}).save("language")}},http$1=transport==null?void 0:transport.http,AppConf=class{constructor(){Z0(this,"_publicConf",{});Z0(this,"_currentApp");Z0(this,"_appConf",{})}get currentApp(){return this._currentApp??null}setCurrentApp(e0){return this._currentApp=e0,this}async initialize(e0,_e=!1){_e||this.setCurrentApp(e0),await Promise.all([this.getPublicConf(e0),this.loadI18n(e0)])}async getPublicConf(e0){return this._publicConf[e0]||(this._publicConf[e0]=await http$1.get(`/${e0}/conf/public`,{queryParams:{_:configure.Platform.deploymentTag}})),this._publicConf[e0]}async getWebAppConf(e0){let _e;return this._appConf[e0]||(await http$1.get("/applications-list")).apps.forEach(i0=>{if(i0!=null&&i0.prefix){let r0=i0.prefix.replace("/","");this._appConf[r0]=i0}else i0!=null&&i0.name&&i0.name.toLowerCase()==e0&&(_e=i0)}),this._appConf[e0]??_e}async loadI18n(e0){return await notify.onLangReady().promise,configure.Platform.idiom.addBundlePromise(`/${e0}/i18n`)}},Analytics=class{constructor(){Z0(this,"_status","void");Z0(this,"_params")}get status(){return this._status}xiti(){return this.parametersWithCheck("xiti",!1)}parameters(e0){return this.parametersWithCheck(e0,!0)}async parametersWithCheck(e0,_e){return this.initialize().promise.then(i0=>!_e||i0.type===e0||i0.type==="multiple"?i0[e0]:void 0)}initialize(){return this._params||(this._params=notify.promisify(),this._status="pending",Promise.all([transport.http.get("/analyticsConf"),transport.http.get("/xiti/config")]).then(async e0=>{var _e;if(!e0||!e0[0]||!e0[0].type)throw ERROR_CODE.MALFORMED_DATA;e0[1]&&e0[1].active&&(e0[0].xiti=await this.initializeXiti(e0[1])),(_e=this._params)==null||_e.resolve(e0[0]),this._status="ready"}).catch(e0=>{var _e;throw this._status="failed",(_e=this._params)==null||_e.reject(),e0})),this._params}async initializeXiti(e0){if(!e0.structureMap||!configure.Platform.apps.currentApp)return;let _e=await notify.onSessionReady().promise,i0=session.session.description,r0;for(let o0 of _e.structures){let a0=e0.structureMap[o0];if(a0&&a0.collectiviteId&&a0.UAI){r0=a0;break}}if(!r0||!r0.active)return;let t0=await configure.Platform.apps.getPublicConf(configure.Platform.apps.currentApp);if(!t0)return;let n0=t0.xiti;if(!n0||!n0.LIBELLE_SERVICE||!r0.UAI)return;function s0(o0){let a0="";for(let f0=0;f0<o0.length;f0++)a0+=o0.charCodeAt(f0);return a0}return{LIBELLE_SERVICE:n0.LIBELLE_SERVICE,TYPE:n0.OUTIL?"TIERS":"NATIF",OUTIL:n0.OUTIL?n0.OUTIL:"",STRUCT_ID:r0.collectiviteId,STRUCT_UAI:r0.UAI,PROJET:r0.projetId?r0.projetId:e0.ID_PROJET,EXPLOITANT:e0.ID_EXPLOITANT,PLATFORME:r0.plateformeId?r0.plateformeId:e0.ID_PLATEFORME,ID_PERSO:s0(_e.userId),PROFILE:i0.profiles&&i0.profiles.length>0?{Student:"ELEVE",Teacher:"ENSEIGNANT",Relative:"PARENT",Personnel:"ADMIN_VIE_SCOL_TECH",Guest:"AUTRE"}[i0.profiles[0]]??"":""}}};function setCookie(e0,_e){if(typeof document>"u")return;let i0=location.protocol==="https:"?"None; Secure":"Lax";document.cookie=`${e0}=${encodeURIComponent(_e)}; path=/; SameSite=${i0}`}function isPad(){return typeof window<"u"&&"ongesturechange"in window}function detectDevice(){if(typeof window>"u")return{osName:"",osVersion:"",deviceType:"",deviceName:""};let e0=UAParser(),_e=isPad(),i0=e0.device.vendor||"",r0=e0.device.model||"",t0=i0&&r0?`${i0} ${r0}`:r0||i0||"Unknown",n0=e0.os.name||"Unknown",s0=e0.device.type||(_e?"tablet":"desktop"),o0=t0;return _e&&n0.toLowerCase()=="macos"&&(n0="iPadOS",s0="tablet",o0="iPad"),{osName:n0,osVersion:e0.os.version||"Unknown",deviceType:s0,deviceName:o0}}function setDeviceCookies(){try{let e0=detectDevice();return setCookie("osName",e0.osName),setCookie("osVersion",e0.osVersion),setCookie("deviceType",e0.deviceType),setCookie("deviceName",e0.deviceName),e0}catch(e0){return console.warn("Device detection failed, using Unknown values:",e0),{osName:"Unknown",osVersion:"Unknown",deviceType:"Unknown",deviceName:"Unknown"}}}var ConfigurationFramework=class{constructor(){Z0(this,"Platform",{deploymentTag:"",cdnDomain:"",apps:new AppConf,theme:new Theme$1,analytics:new Analytics,idiom:new Idiom,listLanguages:()=>transport.http.get("/languages")});Z0(this,"School",{});Z0(this,"User",new User);setDeviceCookies()}async initialize(e0,_e){if(!e0){let r0=a0=>(a0<10?"0":"")+a0.toFixed(0),t0=new Date,n0=t0.getFullYear(),s0=t0.getMonth()+1,o0=t0.getDate();e0=`${n0}${r0(s0)}${r0(o0)}`}let i0=e0;this.Platform.deploymentTag=e0,typeof _e=="string"&&_e.length>0&&(this.Platform.cdnDomain=_e),transport.http.setCdn(this.Platform.cdnDomain),await Promise.all([this.Platform.theme.initialize(i0),notify.onSessionReady().promise.then(r0=>this.Platform.idiom.addBundlePromise("/i18n")),this.User.initialize(i0)])}},configure=new ConfigurationFramework;transport==null||transport.http;var Ft;(Ft=session==null?void 0:session.session)==null||Ft.user;var NotifyFrameworkFactory=class{static instance(){return notify}},LAYER_NAME={TRANSPORT:"transport",WEB_DATA:"webDataPipeline"},EVENT_NAME={ERROR_OCCURED:"error",DATA_TRACKED:"track"},ServiceRegistry=class extends Map{register({application:e0,resourceType:_e},i0){this.set(`${e0}:main`,i0),this.set(`${e0}:${_e}`,i0)}findService(e0,_e){return this.lookupService(e0,_e)}findMainService({application:e0},_e){return this.lookupService({application:e0,resourceType:"main"},_e)}isRegistered({application:e0,resourceType:_e}){return this.get(`${e0}:${_e}`)!==void 0}lookupService({application:e0,resourceType:_e},i0){let r0=this.get(`${e0}:${_e}`);if(r0===void 0)throw`Service not found: ${e0}:${_e}`;return r0(i0)}},E2,ResourceService=(E2=class{constructor(_e){Z0(this,"context");Z0(this,"checkHttpResponse",_e=>{if(this.http.latestResponse.status>=300)throw this.http.latestResponse.statusText;return _e});this.context=_e}get http(){return this.context.http()}async copy(_e){let i0=await this.http.post("/archive/duplicate",{application:_e.application,resourceId:_e.resourceId});return this.checkHttpResponse(i0)}async publish(_e){let i0=new FormData;return i0.append("title",_e.title),i0.append("cover",_e.cover),i0.append("coverName",_e.cover.name),i0.append("coverType",_e.cover.type),i0.append("teacherAvatar",_e.teacherAvatar),i0.append("teacherAvatarName",_e.teacherAvatar.name||`teacherAvatar_${_e.userId}`),i0.append("teacherAvatarType",_e.teacherAvatar.type),i0.append("language",_e.language),_e.activityType.forEach(r0=>{i0.append("activityType[]",r0)}),_e.subjectArea.forEach(r0=>{i0.append("subjectArea[]",r0)}),_e.age.forEach(r0=>{i0.append("age[]",r0.toString())}),i0.append("description",_e.description),_e.keyWords.split(",").forEach(r0=>{i0.append("keyWords[]",r0.trim())}),i0.append("licence",_e.licence),i0.append("pdfUri",`${window.location.origin}${this.getPrintUrl(_e.resourceEntId)}`),i0.append("application",_e.application?_e.application:""),i0.append("resourceId",_e.resourceId),i0.append("teacherSchool",_e.userStructureName),await this.http.post("/appregistry/library/resource",i0,{headers:{"Content-Type":"multipart/form-data"}})}async createContext(_e){let i0=await this.http.get("/explorer/context",{queryParams:this.toQueryParams(_e)});return this.checkHttpResponse(i0)}async searchContext(_e){let i0=await this.http.get("/explorer/resources",{queryParams:this.toQueryParams(_e)});return this.checkHttpResponse(i0)}async searchResource(_e){let i0=await this.http.get(`/explorer/resources/${_e.id}`,{queryParams:this.getResourceParams(_e)});return this.checkHttpResponse(i0)}async createFolder(_e){let i0=await this.http.post("/explorer/folders",this.createFolderToBodyParams(_e));return this.checkHttpResponse(i0)}async updateFolder(_e){let i0=await this.http.put(`/explorer/folders/${_e.folderId}`,this.createFolderToBodyParams(_e));return this.checkHttpResponse(i0)}async moveToFolder(_e,i0=!1){_e.resourceIds=i0?await this.mapAssetIdToIds({application:_e.application,assetIds:_e.resourceIds}):_e.resourceIds;let r0=await this.http.post(`/explorer/folders/${_e.folderId}/move`,this.moveToBodyParams(_e));return this.checkHttpResponse(r0)}async listSubfolders(_e){let i0=await this.http.get(`/explorer/folders/${_e}`);return this.checkHttpResponse(i0)}async deleteAll(_e,i0=!1){_e.resourceIds=i0?await this.mapAssetIdToIds({application:_e.application,assetIds:_e.resourceIds}):_e.resourceIds;let r0=await this.http.deleteJson("/explorer",_e);return this.checkHttpResponse(r0)}async trashAll({resourceType:_e,...i0},r0=!1){i0.resourceIds=r0?await this.mapAssetIdToIds({application:i0.application,assetIds:i0.resourceIds}):i0.resourceIds;let t0=await this.http.putJson("/explorer/trash",i0);return this.checkHttpResponse(t0)}async restoreAll({resourceType:_e,...i0},r0=!1){i0.resourceIds=r0?await this.mapAssetIdToIds({application:i0.application,assetIds:i0.resourceIds}):i0.resourceIds;let t0=await this.http.putJson("/explorer/restore",i0);return this.checkHttpResponse(t0)}async mapAssetIdToIds({application:_e,assetIds:i0}){let r0=await this.searchContext({application:_e,pagination:{startIdx:0,pageSize:i0.length+1},types:[],filters:{},asset_id:i0});return i0.map(t0=>{let n0=r0.resources.find(s0=>s0.assetId===t0);if(n0===void 0)throw"explorer.assetid.notfound";return n0.id})}async getThumbnailPath(_e){if(_e===void 0)return _e;if(typeof _e=="string")if(_e.startsWith("blob:")){let i0=await fetch(_e).then(r0=>r0.blob());return`/workspace/document/${(await this.context.workspace().saveFile(i0,{visibility:"protected",application:this.getApplication()}))._id}`}else return _e;else return`/workspace/document/${(await this.context.workspace().saveFile(_e,{visibility:"protected",application:this.getApplication()}))._id}`}toQueryParams(_e){let i0={application:_e.application,start_idx:_e.pagination.startIdx,page_size:_e.pagination.pageSize,trashed:_e.trashed};if(_e.types.length>0&&(i0.resource_type=_e.types[0]),_e.orders&&Object.entries(_e.orders).length){let[[r0,t0]]=Object.entries(_e.orders);i0.order_by=`${r0}:${t0}`}return _e.filters&&Object.assign(i0,_e.filters),typeof _e.search=="string"&&(i0.search=_e.search),_e.asset_id!==void 0&&(i0.asset_id=[..._e.asset_id]),_e.id!==void 0&&(i0.id=_e.id),i0}getResourceParams(_e){return{application:_e.application}}createFolderToBodyParams(_e){return{application:_e.application,resourceType:_e.type,parentId:_e.parentId,name:_e.name}}moveToBodyParams(_e){return{application:_e.application,resourceType:this.getResourceType(),resourceIds:_e.resourceIds,folderIds:_e.folderIds}}},Z0(E2,"registry",new ServiceRegistry),Z0(E2,"register",E2.registry.register.bind(E2.registry)),Z0(E2,"findService",E2.registry.findService.bind(E2.registry)),Z0(E2,"findMainService",E2.registry.findMainService.bind(E2.registry)),Z0(E2,"isRegistered",E2.registry.isRegistered.bind(E2.registry)),E2),APP$4="collaborativeeditor",RESOURCE$3="collaborativeeditor",CollaborativeEditorResourceService=class extends ResourceService{async create(e0){let{name:_e,description:i0,thumbnail:r0,folder:t0}=e0,n0=r0?await this.getThumbnailPath(r0):"",s0=await this.http.post("/collaborativeeditor",{name:_e,description:i0,thumbnail:n0,folder:t0});return this.checkHttpResponse(s0),s0}async update(e0){let{name:_e,description:i0,thumbnail:r0,entId:t0}=e0,n0=await this.getThumbnailPath(r0),s0=await this.http.put(`/collaborativeeditor/${t0}`,{name:_e,description:i0,thumbnail:n0});return this.checkHttpResponse(s0),{thumbnail:n0,entId:t0}}getResourceType(){return RESOURCE$3}getApplication(){return APP$4}getFormUrl(){throw Error("Method not implemented.")}getViewUrl(e0){return`/collaborativeeditor#/view/${e0}`}getPrintUrl(){throw Error("Method not implemented.")}getEditUrl(){throw Error("Method not implemented.")}getExportUrl(){throw Error("Method not implemented.")}};ResourceService.register({application:RESOURCE$3,resourceType:RESOURCE$3},e0=>new CollaborativeEditorResourceService(e0));var APP$3="homeworks",RESOURCE$2="homeworks",HomeworksResourceService=class extends ResourceService{async create(e0){let _e=await this.getThumbnailPath(e0.thumbnail),i0=await this.http.post("/homeworks",{title:e0.name,thumbnail:_e,description:e0.description,repeats:e0.repeats,folder:e0.folder});return this.checkHttpResponse(i0),{thumbnail:_e,entId:i0._id}}async update(e0){let _e=await this.getThumbnailPath(e0.thumbnail),i0=await this.http.put(`/homeworks/${e0.entId}`,{title:e0.name,thumbnail:_e,description:e0.description,repeats:e0.repeats});return this.checkHttpResponse(i0),{thumbnail:_e,entId:e0.entId}}getResourceType(){return RESOURCE$2}getApplication(){return APP$3}getFormUrl(e0){return e0?`/homeworks?folderid=${e0}#/create-homeworks/`:"/homeworks#/create-homeworks/"}getViewUrl(e0){return`/homeworks#/view-homeworks/${e0}`}getPrintUrl(e0){return`/homeworks/print#/print-homeworks/${e0}`}getEditUrl(e0){return`/homeworks#/edit-homeworks/${e0}`}getExportUrl(){throw Error("Export not implemented.")}};ResourceService.register({application:RESOURCE$2,resourceType:RESOURCE$2},e0=>new HomeworksResourceService(e0));var APP$2="scrapbook",RESOURCE$1="scrapbook",ScrapbookResourceService=class extends ResourceService{create(e0){throw Error("Method not implemented.")}async update(e0){let _e=await this.getThumbnailPath(e0.thumbnail),i0=await this.http.put(`/scrapbook/${e0.entId}`,{trashed:+!!e0.trashed,title:e0.name,icon:_e,subTitle:e0.description});return this.checkHttpResponse(i0),{thumbnail:_e,entId:e0.entId}}getResourceType(){return RESOURCE$1}getApplication(){return APP$2}getFormUrl(e0){return e0?`/scrapbook?folderid=${e0}#/create-scrapbook/`:"/scrapbook#/create-scrapbook/"}getViewUrl(e0){return`/scrapbook#/view-scrapbook/${e0}`}getPrintUrl(e0){return`/scrapbook/print#/print-scrapbook/${e0}`}getEditUrl(e0){return`/scrapbook#/edit-scrapbook/${e0}`}getExportUrl(e0){return`/scrapbook/exportHtml/${e0}`}};ResourceService.register({application:RESOURCE$1,resourceType:RESOURCE$1},e0=>new ScrapbookResourceService(e0));var APP$1$1="timelinegenerator",RESOURCE$4="timelinegenerator",TimelineGeneratorResourceService=class extends ResourceService{async create(e0){let _e=e0.thumbnail?await this.getThumbnailPath(e0.thumbnail):"",i0=await this.http.post("/timelinegenerator/timelines",{headline:e0.name,text:e0.description,icon:_e,type:"default",folder:e0.folder});return this.checkHttpResponse(i0),i0}async update(e0){let _e=await this.getThumbnailPath(e0.thumbnail),i0=await this.http.put(`/timelinegenerator/timeline/${e0.entId}`,{headline:e0.name,text:e0.description,icon:_e,trashed:!!e0.trashed,_id:e0.entId,type:"default"});return this.checkHttpResponse(i0),{thumbnail:_e,entId:e0.entId}}getResourceType(){return RESOURCE$4}getApplication(){return APP$1$1}getFormUrl(){throw Error("Method not implemented.")}getViewUrl(e0){return`/timelinegenerator#/view/${e0}`}getPrintUrl(e0){return`/timelinegenerator/print#/print/${e0}`}getEditUrl(){throw Error("Method not implemented.")}getExportUrl(){throw Error("Method not implemented.")}};ResourceService.register({application:RESOURCE$4,resourceType:RESOURCE$4},e0=>new TimelineGeneratorResourceService(e0));var ATTag,AnalyticsService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}get session(){return this.context.session()}async trackPageLoad(e0,_e){let[i0]=await Promise.all([this.getXitiConfig(_e.name.toLowerCase()),this.loadXitiScript()]);if(!i0||!ATInternet)return;let r0=i0.LIBELLE_SERVICE.default||null;for(let t0 in i0.LIBELLE_SERVICE)if(t0!=="default"&&e0.indexOf(t0)>=0){r0=i0.LIBELLE_SERVICE[t0];break}ATTag=new ATInternet.Tracker.Tag({site:i0.STRUCT_ID}),ATTag.setProps({SERVICE:r0,TYPE:i0.TYPE,OUTIL:i0.OUTIL,UAI:i0.STRUCT_UAI,PROJET:i0.PROJET,EXPLOITANT:i0.EXPLOITANT,PLATEFORME:i0.PLATFORME,PROFIL:i0.PROFILE},!0),ATTag.identifiedVisitor.set({id:i0.ID_PERSO,category:i0.PROFILE}),ATTag.page.set({name:(_e==null?void 0:_e.prefix)==="userbook"?"directory":_e==null?void 0:_e.prefix,chapter1:"",chapter2:"",chapter3:"",level2:i0.STRUCT_UAI}),ATTag.dispatch()}async getXitiConfig(e0){let[_e,i0]=await Promise.all([this.http.get("/analyticsConf"),this.http.get("/xiti/config")]);if(!(_e!=null&&_e.type))throw ERROR_CODE.MALFORMED_DATA;return i0!=null&&i0.active&&(_e.xiti=await this.getXitiTrackingParams(i0,e0)),_e.xiti}async loadXitiScript(){if(typeof ATInternet>"u"){const scriptPath="/xiti/public/js/lib/smarttag_ENT.js",response=await this.http.get(scriptPath,{headers:{Accept:"application/javascript"}});if(this.http.latestResponse.status!=200)throw"Error while loading XiTi script";eval(response)}}async getXitiTrackingParams(e0,_e){if(!e0.structureMap||!_e)return;let i0=await this.session.getUser(),r0=await this.session.getUserProfile(),t0;if(!(i0!=null&&i0.structures))return;for(let a0 of i0.structures){let f0=e0.structureMap[a0];if(f0&&f0.collectiviteId&&f0.UAI){t0=f0;break}}if(!t0||!t0.active)return;let n0=await configure.Platform.apps.getPublicConf(_e);if(!n0)return;let s0=n0.xiti;if(!s0||!s0.LIBELLE_SERVICE||!t0.UAI)return;function o0(a0){let f0="";for(let l0=0;l0<a0.length;l0++)f0+=a0.charCodeAt(l0);return f0}return{LIBELLE_SERVICE:s0.LIBELLE_SERVICE,TYPE:s0.OUTIL?"TIERS":"NATIF",OUTIL:s0.OUTIL?s0.OUTIL:"",STRUCT_ID:t0.collectiviteId,STRUCT_UAI:t0.UAI,PROJET:t0.projetId?t0.projetId:e0.ID_PROJET,EXPLOITANT:e0.ID_EXPLOITANT,PLATFORME:t0.plateformeId?t0.plateformeId:e0.ID_PLATEFORME,ID_PERSO:o0(i0.userId),PROFILE:r0&&r0.length>0?{Student:"ELEVE",Teacher:"ENSEIGNANT",Relative:"PARENT",Personnel:"ADMIN_VIE_SCOL_TECH",Guest:"AUTRE"}[r0[0]]??"":""}}},ReactionsService=class{constructor(e0,_e,i0){Z0(this,"context");Z0(this,"module");Z0(this,"resourceType");this.context=e0,this.module=_e,this.resourceType=i0}get http(){return this.context.http()}async loadAvailableReactions(){try{let{"reaction-types":e0}=await this.context.conf().getPublicConf("audience");return Array.isArray(e0)?e0:void 0}catch{console.error("Audience configuration not found");return}}async loadReactionSummaries(e0){let _e=await this.http.get(`/audience/reactions/${this.module}/${this.resourceType}?resourceIds=${e0.join(",")}`);return this.http.isResponseError()?{}:_e.reactionsByResource}async loadReactionDetails(e0,_e,i0){let r0=await this.http.get(`/audience/reactions/${this.module}/${this.resourceType}/${e0}?page=${_e}&size=${i0}`);return this.http.isResponseError()?void 0:r0}async deleteReaction(e0){await this.http.delete(`/audience/reactions/${this.module}/${this.resourceType}/${e0}`)}async updateReaction(e0,_e){await this.http.putJson(`/audience/reactions/${this.module}/${this.resourceType}`,{resourceId:e0,reactionType:_e})}async createReaction(e0,_e){await this.http.postJson(`/audience/reactions/${this.module}/${this.resourceType}`,{resourceId:e0,reactionType:_e})}},ViewsService=class{constructor(e0,_e,i0){Z0(this,"context");Z0(this,"module");Z0(this,"resourceType");this.context=e0,this.module=_e,this.resourceType=i0}get http(){return this.context.http()}async getCounters(e0){let _e=await this.http.get(`/audience/views/count/${this.module}/${this.resourceType}?resourceIds=${e0.join(",")}`);return this.http.isResponseError()?{}:_e}async getDetails(e0){let _e=await this.http.get(`/audience/views/details/${this.module}/${this.resourceType}/${e0}`);return this.http.isResponseError()?void 0:_e}trigger(e0){return this.http.post(`/audience/views/${this.module}/${this.resourceType}/${e0}`)}},AudienceService=class{constructor(e0,_e,i0){Z0(this,"context");Z0(this,"module");Z0(this,"resourceType");this.context=e0,this.module=_e,this.resourceType=i0}get views(){return new ViewsService(this.context,this.module,this.resourceType)}get reactions(){return new ReactionsService(this.context,this.module,this.resourceType)}},globalCache={},mutexPromise={},CacheService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}async fromCacheIfPossible(e0,_e,i0){if(mutexPromise[e0]!==void 0&&await mutexPromise[e0],globalCache[e0])return globalCache[e0];try{let r0=_e();mutexPromise[e0]=r0;let t0=await r0;return i0(t0)&&(globalCache[e0]=t0),t0}catch(r0){throw console.error(`Failed to retrieve value for: ${e0}`,r0),r0}}clearCache(e0){if(e0)delete globalCache[e0];else for(let _e in globalCache)globalCache.hasOwnProperty(_e)&&delete globalCache[_e]}async httpGet(e0,_e){return this.fromCacheIfPossible(e0,async()=>({value:await this.http.get(e0,_e),response:{...this.http.latestResponse}}),({response:i0})=>!(i0.status<200||i0.status>=300))}async httpGetJson(e0,_e){let{response:i0,value:r0}=await this.httpGet(e0,_e);if(i0.status<200||i0.status>=300)throw`Bad http status (${i0.status}) for url: ${e0}`;return r0}},ConfService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}get cache(){return this.context.cache()}get cdnDomain(){return configure.Platform.cdnDomain}get notify(){return this.context.notify()}async getConf(e0){let[_e,i0]=await Promise.all([this.getThemeConf(),this.getApplicationsList()]),[r0,t0]=await Promise.all([this.getTheme({conf:_e,publicTheme:i0===void 0}),this.getWebAppConf({app:e0,applications:i0??[]})]),n0={app:e0,applications:i0??[],conf:_e,currentApp:t0,theme:r0};return this.notify.onAppConfReady().resolve(n0),n0}async getPublicConf(e0){let{response:_e,value:i0}=await this.cache.httpGet(`/${e0}/conf/public`,{queryParams:{_:configure.Platform.deploymentTag}});if(_e.status<200||_e.status>=300)throw ERROR_CODE.APP_NOT_FOUND;return i0}getCdnUrl(){}async getUserPreferences(){let e0=await this.http.get("/userbook/api/preferences");if(this.http.isResponseError()||typeof e0=="string")throw ERROR_CODE.NOT_LOGGED_IN;return e0}async saveUserPreferences(e0){return this.http.putJson("/userbook/api/preferences",e0)}async getPreference(e0){let _e=await this.http.get(`/userbook/preference/${e0}`);return this.http.isResponseError()||typeof _e=="string"?{}:JSON.parse(_e.preference)}async savePreference(e0,_e){this.http.putJson(`/userbook/preference/${e0}`,_e)}async getThemeConf(e0){return await this.http.getScript("/assets/theme-conf.js",{queryParams:{v:e0}},"exports.conf")}async getApplicationsList(){let e0=await this.http.get("/applications-list");if(!(this.http.isResponseError()||typeof e0=="string"))return e0.apps}async getWebAppConf({app:e0,applications:_e}){return _e.find(i0=>{if(i0!=null&&i0.prefix)return(i0==null?void 0:i0.prefix.replace("/",""))===e0})}async getTheme({version:e0,conf:_e,publicTheme:i0}){var l0;let r0=await this.http.get("/theme"),t0=(l0=_e==null?void 0:_e.overriding)==null?void 0:l0.find(u0=>i0?u0.parent==="theme-open-ent"&&u0.bootstrapVersion==="ode-bootstrap-neo":u0.child===(r0==null?void 0:r0.themeName)),n0=i0?"default":(r0==null?void 0:r0.skinName)||(t0==null?void 0:t0.skins[0]),s0=(r0==null?void 0:r0.skin)||`/assets/themes/${t0==null?void 0:t0.child}/skins/${n0}/`,o0=t0==null?void 0:t0.skins,a0=t0==null?void 0:t0.bootstrapVersion.split("-").slice(-1)[0],f0=(t0==null?void 0:t0.parent)==="panda";return{basePath:`${this.cdnDomain}${s0}../../`,bootstrapVersion:a0,is1d:f0,logoutCallback:(r0==null?void 0:r0.logoutCallback)||"",skin:t0==null?void 0:t0.child,skinName:n0,skins:o0,themeName:t0==null?void 0:t0.child,themeUrl:s0,npmTheme:(t0==null?void 0:t0.npmTheme)??void 0,uiOverrides:t0==null?void 0:t0.uiOverrides}}async getLogoutCallback(e0){let{response:_e,value:i0}=await this.cache.httpGet("/theme",{queryParams:{_:e0}});if(_e.status<200||_e.status>=300)throw ERROR_CODE.NOT_LOGGED_IN;return i0.logoutCallback}},WebBroker=class{constructor(e0){Z0(this,"odeServices");Z0(this,"subscription");this.odeServices=e0}get http(){return this.odeServices.http()}get events(){return this.odeServices.notify().events()}dispatchEvent(e0,_e){_e.findIndex(i0=>i0==="*"||e0.data["event-type"]===i0)>=0&&this.http.post("/infra/event/web/store",e0.data,{disableNotifications:!0})}initialize(e0){if(e0===void 0||e0.send===void 0||e0.send.length>0){let _e=(e0==null?void 0:e0.send)??["*"];this.subscription=this.events.subscribe(LAYER_NAME.WEB_DATA,i0=>this.dispatchEvent(i0,_e))}return this}destroy(){this.subscription&&(this.subscription.revoke(),delete this.subscription)}},DataService=class{constructor(e0){Z0(this,"odeServices");Z0(this,"_webBroker");Z0(this,"app");Z0(this,"user");Z0(this,"profile");this.odeServices=e0}get conf(){return this.odeServices.conf()}get notify(){return this.odeServices.notify()}async initialize(){try{let{app:e0}=await this.notify.onAppConfReady().promise;this.app=e0,this.user=await this.odeServices.session().getUser(),this.profile=await this.odeServices.session().getUserProfile();let{"data-service":_e}=await this.conf.getPublicConf(e0);this._webBroker=new WebBroker(this.odeServices).initialize(_e==null?void 0:_e.web)}catch{console.log("DataService not initialized, usage data unavailable.")}}predestroy(){this._webBroker&&(this._webBroker.destroy(),delete this._webBroker)}trackWebEvent(e0){this.notify.events().publish(LAYER_NAME.WEB_DATA,{name:EVENT_NAME.DATA_TRACKED,data:e0})}addUserInfos(e0){return this.user&&(e0.userId=this.user.userId,e0.structure=this.user.structureNames[0]),this.profile&&(e0.profil=this.profile[0]),e0}trackVideoSave(e0,_e,i0,r0,t0,n0,s0){let o0=this.addUserInfos({"event-type":"VIDEO_SAVE",module:this.app||"video",video_id:e0,browser:n0,duration:Math.round(_e),weight:i0,source:r0?"CAPTURED":"UPLOADED",url:t0});s0&&(o0.device_type=s0),this.trackWebEvent(o0)}trackVideoRead(e0,_e,i0,r0,t0){let n0=this.addUserInfos({"event-type":"VIDEO_READ",module:"video",video_id:e0,browser:r0,source:_e?"CAPTURED":"UPLOADED",url:i0});this.app&&(n0["override-module"]=this.app),t0&&(n0.device_type=t0),this.trackWebEvent(n0)}trackSpeechAndText(e0){let _e=this.addUserInfos({"event-type":"SPEECH_AND_TEXT",function:e0});this.app&&(_e.module=this.app),this.trackWebEvent(_e)}trackAccessLibraryFromExplorer(){let e0=this.addUserInfos({"event-type":"ACCESS_LIBRARY_FROM_EXPLORER"});this.app&&(e0.module=this.app),this.trackWebEvent(e0)}},DirectoryService=class{constructor(e0){Z0(this,"odeServices");this.odeServices=e0}get http(){return this.odeServices.http()}get cache(){return this.odeServices.cache()}getAvatarUrl(e0,_e,i0="100x100"){return _e==="user"?`/userbook/avatar/${e0}?thumbnail=${i0}`:"/assets/img/illustrations/group-avatar.svg"}getDirectoryUrl(e0,_e){return _e==="user"?`/userbook/annuaire#/${e0}`:`/userbook/annuaire#/group-view/${e0}`}getChildren(e0){return this.http.get(`/directory/user/${e0}/children`)}async getBookMarks(){return(await this.cache.httpGetJson("/directory/sharebookmark/all")).map(({id:e0,name:_e})=>({id:e0,displayName:_e,notVisibleCount:0,members:[]}))}async getBookMarkById(e0){let{groups:_e,id:i0,name:r0,users:t0,notVisibleCount:n0}=await this.http.get(`/directory/sharebookmark/${e0}`);return{id:i0,displayName:r0,notVisibleCount:n0,groups:_e.map(({name:s0,id:o0,nbUsers:a0})=>({nbUsers:a0,displayName:s0,id:o0})),users:t0.map(({displayName:s0,id:o0,profile:a0})=>({profile:a0,displayName:s0,firstName:"",lastName:"",login:"",id:o0}))}}async saveBookmarks(e0,{bookmarks:_e,groups:i0,users:r0}){this.cache.clearCache("/directory/sharebookmark/all");let t0=r0.map(l0=>typeof l0=="string"?l0:l0.id),n0=i0.map(l0=>typeof l0=="string"?l0:l0.id),s0=_e.map(async l0=>{if(typeof l0=="string"){let{displayName:u0,groups:A0,id:c0,notVisibleCount:k0,users:d0}=await this.getBookMarkById(l0),h0=d0.map(b0=>b0.id);return{displayName:u0,id:c0,notVisibleCount:k0,members:[...A0.map(b0=>b0.id),...h0]}}else return Promise.resolve(l0)}),o0=(await Promise.all(s0)).map(l0=>l0.members).reduce((l0,u0)=>[...l0,...u0],[]),a0={name:e0,members:[...t0,...n0,...o0]},{id:f0}=await this.http.postJson("/directory/sharebookmark",a0);return{id:f0,displayName:e0,notVisibleCount:0,members:a0.members}}},EmbedderService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}async getDefault(){return this.http.get("/infra/embed/default")}async getCustom(){return this.http.get("/infra/embed/custom")}getProviderFromUrl(e0,_e){for(let i0 of e0)if(this.isUrlFromProvider(_e,i0))return i0}urlIsFromPattern(e0,_e){let i0=RegExp("[^{}]+(?=(?:[^{}]*{[^}]*})*[^}]*$)","g"),r0=RegExp("{[^}]*}","g"),t0=!0,n0=_e.match(i0)||[],s0=[];return(_e.match(r0)||[]).forEach((o0,a0)=>{o0.includes("ignore")||s0.push(n0[a0])}),s0.forEach(o0=>{if(!e0.includes(o0)){t0=!1;return}}),t0}isUrlFromProvider(e0,_e){typeof _e.url=="string"&&(_e.url=[_e.url]);for(let i0 of _e.url)if(this.urlIsFromPattern(e0,i0))return!0;return!1}getEmbedCodeForProvider(e0,_e){for(let i0 of e0.url)if(this.urlIsFromPattern(_e,i0)){let r0=RegExp("{[a-zA-Z0-9_.]+}","g"),t0=i0.match(r0)||[],n0=e0.embed;for(let s0 of t0){let o0=i0.split(s0)[0],a0=o0.split("}");a0.length>1&&(o0=a0[a0.length-1]);let f0=_e.split(o0)[1];if(!f0)continue;let l0=i0.split(s0)[1].split("{")[0];l0&&(f0=f0.split(l0)[0]);let u0=RegExp("\\"+s0.replace(/}/,"\\}"),"g");n0=n0.replace(u0,f0)}return n0}return""}},bundle={},promises={},defaultDiacriticsRemovalMap=[{base:"A",letters:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},{base:"AA",letters:/[\uA732]/g},{base:"AE",letters:/[\u00C6\u01FC\u01E2]/g},{base:"AO",letters:/[\uA734]/g},{base:"AU",letters:/[\uA736]/g},{base:"AV",letters:/[\uA738\uA73A]/g},{base:"AY",letters:/[\uA73C]/g},{base:"B",letters:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g},{base:"C",letters:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g},{base:"D",letters:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g},{base:"DZ",letters:/[\u01F1\u01C4]/g},{base:"Dz",letters:/[\u01F2\u01C5]/g},{base:"E",letters:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g},{base:"F",letters:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g},{base:"G",letters:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g},{base:"H",letters:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g},{base:"I",letters:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g},{base:"J",letters:/[\u004A\u24BF\uFF2A\u0134\u0248]/g},{base:"K",letters:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g},{base:"L",letters:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g},{base:"LJ",letters:/[\u01C7]/g},{base:"Lj",letters:/[\u01C8]/g},{base:"M",letters:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g},{base:"N",letters:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g},{base:"NJ",letters:/[\u01CA]/g},{base:"Nj",letters:/[\u01CB]/g},{base:"O",letters:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g},{base:"OI",letters:/[\u01A2]/g},{base:"OO",letters:/[\uA74E]/g},{base:"OU",letters:/[\u0222]/g},{base:"P",letters:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g},{base:"Q",letters:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g},{base:"R",letters:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g},{base:"S",letters:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g},{base:"T",letters:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g},{base:"TZ",letters:/[\uA728]/g},{base:"U",letters:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g},{base:"V",letters:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g},{base:"VY",letters:/[\uA760]/g},{base:"W",letters:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g},{base:"X",letters:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g},{base:"Y",letters:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g},{base:"Z",letters:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g},{base:"a",letters:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g},{base:"aa",letters:/[\uA733]/g},{base:"ae",letters:/[\u00E6\u01FD\u01E3]/g},{base:"ao",letters:/[\uA735]/g},{base:"au",letters:/[\uA737]/g},{base:"av",letters:/[\uA739\uA73B]/g},{base:"ay",letters:/[\uA73D]/g},{base:"b",letters:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g},{base:"c",letters:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g},{base:"d",letters:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g},{base:"dz",letters:/[\u01F3\u01C6]/g},{base:"e",letters:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g},{base:"f",letters:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g},{base:"g",letters:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g},{base:"h",letters:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g},{base:"hv",letters:/[\u0195]/g},{base:"i",letters:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g},{base:"j",letters:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g},{base:"k",letters:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g},{base:"l",letters:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g},{base:"lj",letters:/[\u01C9]/g},{base:"m",letters:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g},{base:"n",letters:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g},{base:"nj",letters:/[\u01CC]/g},{base:"o",letters:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g},{base:"oi",letters:/[\u01A3]/g},{base:"ou",letters:/[\u0223]/g},{base:"oo",letters:/[\uA74F]/g},{base:"p",letters:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g},{base:"q",letters:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g},{base:"r",letters:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g},{base:"s",letters:/[\u0073\u24E2\uFF53\u00DF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g},{base:"t",letters:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g},{base:"tz",letters:/[\uA729]/g},{base:"u",letters:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g},{base:"v",letters:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g},{base:"vy",letters:/[\uA761]/g},{base:"w",letters:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g},{base:"x",letters:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g},{base:"y",letters:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g},{base:"z",letters:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g}],IdiomService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}async getIdiom(e0,_e){await Promise.all([this.addBundlePromise(e0,"/i18n"),this.addBundlePromise(e0,`/${_e}/i18n`)])}translate(e0,_e){e0??(e0="");let i0=bundle[e0]===void 0?e0:bundle[e0];if(_e&&typeof _e=="object")for(let r0 in _e)_e[r0]!==void 0&&(i0=i0.replace(RegExp("\\${"+r0+"}","g"),""+_e[r0]));return i0}addBundlePromise(e0,_e){return this.loadBundlePromise(e0,_e)}addBundle(e0,_e,i0){this.loadBundle(e0,_e,i0)}loadBundlePromise(e0,_e){return this.loadBundle(e0,_e),promises[_e]}loadBundle(e0,_e,i0){let r0=promises[_e];if(r0)i0&&r0.then(i0).catch(i0);else{let t0=new Promisified;promises[_e]=t0.promise;let n0={};e0&&(n0["Accept-Language"]=e0),this.http.get(_e,{headers:n0}).then(s0=>{Object.assign(bundle,s0),typeof i0=="function"&&i0(),t0.resolve()}).catch(s0=>{typeof i0=="function"&&i0(),t0.reject()})}}addTranslations(e0,_e){notify.onLangReady().promise.then(i0=>{this.loadBundle(i0,e0+"/"+i0+".json",_e)})}addAllTranslations(e0){return e0&&e0.length>0?notify.onLangReady().promise.then(_e=>Promise.all(e0.map(i0=>this.loadBundlePromise(_e,i0+"/"+_e+".json")))).then(()=>{}):Promise.reject()}addKeys(e0){for(let _e in e0)typeof bundle[_e]!="string"&&(bundle[_e]=e0[_e])}removeAccents(e0){for(let _e=0;_e<defaultDiacriticsRemovalMap.length;_e++)e0=e0.replace(defaultDiacriticsRemovalMap[_e].letters,defaultDiacriticsRemovalMap[_e].base);return e0}};function toRelativePath(e0,_e){let i0=`/remote.php/dav/files/${_e}`,r0=e0.startsWith(i0)?e0.slice(i0.length):e0;return decodeURIComponent(r0||"/")}function toNextcloudDocument(e0,_e){return{path:toRelativePath(e0.path,_e),name:decodeURIComponent(e0.displayname),ownerDisplayName:e0.ownerDisplayName,contentType:e0.contentType,size:e0.size,favorite:e0.favorite,etag:e0.etag,fileId:e0.fileId,isFolder:e0.isFolder,lastModified:e0.lastModified}}var NextcloudService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}async listDocuments(e0,_e){return(await this.http.get(`/nextcloud/files/user/${e0}`,{queryParams:_e?{path:_e}:void 0})).data.map(i0=>toNextcloudDocument(i0,e0))}async copyDocumentToWorkspace(e0,_e,i0,r0){let t0=_e.map(n0=>`path=${encodeURIComponent(n0)}`).join("&");return(await this.http.put(`/nextcloud/files/user/${e0}/copy/workspace?${t0}`,void 0,{queryParams:{...i0?{parentId:i0}:{},...r0!=null&&r0.application?{application:r0.application}:{},...(r0==null?void 0:r0.visibility)==="protected"?{protected:!0}:{}}})).data.filter(n0=>!!(n0!=null&&n0._id))}async createFolder(e0,_e){await this.http.post(`/nextcloud/files/user/${e0}/create/folder`,void 0,{queryParams:{path:_e}})}async getOauth2Status(e0){return this.http.get(`/nextcloud/user/${e0}/oauth2/status`)}getFileUrl(e0,_e){return`/nextcloud/files/user/${e0}/file/${encodeURIComponent(_e.name)}/download?path=${encodeURIComponent(_e.path)}&contentType=${encodeURIComponent(_e.contentType??"")}&isFolder=${_e.isFolder}`}},AbstractBehaviourService=class{constructor(e0){Z0(this,"context");Z0(this,"_cache");this.context=e0,this._cache=new CacheService(this.context)}getApplication(){return this.APP}getResourceType(){return this.RESOURCE}httpGet(e0,_e){return this._cache.httpGetJson(e0,_e)}dataToResource({modified:e0,..._e}){let i0=typeof e0=="string"?e0:e0!=null&&e0.$date?""+e0.$date:"";return{application:this.RESOURCE,name:_e.title,creatorId:_e.owner,creatorName:_e.ownerName,thumbnail:_e.icon,assetId:_e._id,modifiedAt:i0,shared:_e.shared,path:_e.path}}},ActualitesBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","actualites");Z0(this,"RESOURCE","actualites")}async loadResources(){let[_e,i0]=await Promise.all([this.httpGet("/actualites/api/v1/infos/linker"),this.httpGet("/actualites/api/v1/threads")]),r0=i0.reduce((t0,n0)=>t0.set(n0.id,n0),new Map);return _e.map(t0=>{var s0;let n0;return n0=t0.threadIcon?t0.threadIcon+"?thumbnail=48x48":"/img/icons/glyphicons_036_file.png",this.dataToResource({title:t0.title+" ["+((s0=r0.get(t0.threadId))==null?void 0:s0.title)+"]",ownerName:t0.owner.displayName,owner:t0.owner.id,icon:n0,path:"/actualites/threads/"+t0.threadId+"?info="+t0.id,_id:`${t0.threadId}#${t0.id}`,shared:!!(t0.shared&&t0.shared.length>=0),modified:t0.modified})})}},hexToDataUrl=(e0,_e=1,i0=1)=>{let r0=document.createElement("canvas");r0.width=_e,r0.height=i0;let t0=r0.getContext("2d");return t0?(t0.fillStyle=e0,t0.fillRect(0,0,_e,i0),r0.toDataURL("image/png")):""},AppointmentsBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","appointments");Z0(this,"RESOURCE","appointments")}async loadResources(){return(await this.httpGet("/appointments/grids/linker")).map(_e=>this.dataToResource({_id:_e.id.toString(),icon:hexToDataUrl(_e.color,100,100),title:_e.name,ownerName:_e.ownerName,owner:_e.ownerId,path:`${window.location.origin}/appointments#?gridId=${_e.id}`,shared:!1,modified:_e.updatingDate}))}},BlogBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","blog");Z0(this,"RESOURCE","blog")}loadResources(){return new Promise(async(_e,i0)=>{try{let r0=await this.httpGet("/blog/linker"),t0=[];r0.forEach(n0=>{n0.thumbnail?n0.thumbnail+="?thumbnail=48x48":n0.thumbnail="/img/illustrations/blog.svg";let s0=n0.fetchPosts.map(o0=>this.dataToResource({owner:n0.author.userId,ownerName:n0.author.username,title:o0.title+" ["+n0.title+"]",_id:`${n0._id}#${o0._id}`,icon:n0.thumbnail,path:`/blog/id/${n0._id}/post/${o0._id}`,shared:!!(n0.shared&&n0.shared.length>=0),modified:n0.modified}));t0.push(...s0)}),_e(t0)}catch(r0){i0(r0)}})}},CollaborativewallBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","collaborativewall");Z0(this,"RESOURCE","collaborativewall")}async loadResources(){return(await this.httpGet("/collaborativewall/list/all")).map(_e=>this.dataToResource({title:_e.name,ownerName:_e.owner.displayName,owner:_e.owner.userId,icon:_e.icon?_e.icon:"/img/illustrations/collaborative-wall-default.png",path:"/collaborativewall#/view/"+_e._id,_id:_e._id,shared:!!(_e.shared&&_e.shared.length>=0),modified:_e.modified}))}},CommunityBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","community");Z0(this,"RESOURCE","community")}async loadResources(){return(await this.httpGet("/community/listallpages")).map(_e=>{let i0;return i0=_e.thumbnail===void 0||_e.thumbnail===""?"/img/icons/glyphicons_036_file.png":_e.thumbnail+"?thumbnail=48x48",this.dataToResource({title:_e.name,icon:i0,path:"/community#/view/"+_e.id,_id:_e.id,owner:"",ownerName:"",shared:!!(_e.shared&&_e.shared.length>=0),modified:_e.name})})}},ExercizerBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","exercizer");Z0(this,"RESOURCE","exercizer")}async loadResources(){return(await this.httpGet("/exercizer/subjects-scheduled")).map(_e=>{let i0=_e.picture?_e.picture+"?thumbnail=48x48":"/img/illustrations/exercizer.svg",r0,t0=!1,n0=JSON.parse(_e.scheduled_at);return n0.groupList.length>0?(t0=!0,r0=n0.groupList[0].name):n0.userList.length>0?(t0=!0,r0=n0.userList[0].name):r0="",n0.groupList.length+n0.userList.length>1&&(r0+="..."),this.dataToResource({title:_e.title,owner:_e.owner,ownerName:r0,icon:i0,path:"/exercizer#/linker/"+_e.id,_id:""+_e.id,shared:t0,modified:_e.modified})})}},FormulaireBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","formulaire");Z0(this,"RESOURCE","formulaire")}async loadResources(){return(await this.httpGet("/formulaire/forms/linker")).map(_e=>(_e.picture||(_e.picture="/formulaire/public/img/logo.svg"),this.dataToResource({_id:""+_e.id,icon:_e.picture,title:_e.title,ownerName:_e.owner_name,owner:_e.owner_id,path:_e.is_public?`${window.location.origin}/formulaire-public#/form/${_e.public_key}`:`${window.location.origin}/formulaire#/form/${_e.id}/${_e.rgpd?"rgpd":"new"}`,shared:!!(_e.shared&&_e.shared.length>=0),modified:""+_e.date_modification})))}},ForumBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","forum");Z0(this,"RESOURCE","forum")}async loadResources(){return(await this.httpGet("/forum/categories")).map(_e=>this.dataToResource({_id:_e._id,title:_e.name,icon:_e.icon||"/img/illustrations/forum.svg",path:"/forum#/view/"+_e._id,ownerName:_e.owner.displayName,owner:_e.owner.userId,shared:!!(_e.shared&&_e.shared.length>=0),modified:_e.modified}))}},HomeworksBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","homeworks");Z0(this,"RESOURCE","homeworks")}async loadResources(){return(await this.httpGet("/homeworks/list")).filter(_e=>_e.owner&&_e.trashed===0).map(_e=>this.dataToResource({title:_e.title,ownerName:_e.owner.displayName,owner:_e.owner.userId,icon:_e.thumbnail||"/img/illustrations/homeworks.svg",path:"/homeworks#/view-homeworks/"+_e._id,_id:""+_e._id,shared:_e.shared!==void 0,modified:_e.modified}))}},MagnetoBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","magneto");Z0(this,"RESOURCE","magneto")}async loadResources(){let{all:_e}=await this.httpGet("/magneto/boards/editable");return _e.map(i0=>this.dataToResource({_id:i0._id,title:i0.title,icon:i0.imageUrl,owner:i0.ownerId,ownerName:i0.ownerName,path:`/magneto#/board/${i0._id}/view`,shared:!!(i0.shared&&i0.shared.length>=0),modified:""+i0.modificationDate}))}},MindmapBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","mindmap");Z0(this,"RESOURCE","mindmap")}async loadResources(){return(await this.httpGet("/mindmap/list/all")).map(_e=>this.dataToResource({title:_e.name,ownerName:_e.owner.displayName,owner:_e.owner.userId,icon:_e.thumbnail||"/img/illustrations/mindmap-default.png",path:"/mindmap#/view/"+_e._id,_id:_e._id,shared:!!(_e.shared&&_e.shared.length>=0),modified:_e.modified}))}},PagesBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","pages");Z0(this,"RESOURCE","pages")}async loadResources(){let _e=await this.httpGet("/pages/list/all"),i0=[];return _e.forEach(r0=>{var n0;let t0=r0.thumbnail?r0.thumbnail+"?thumbnail=48x48":"/img/illustrations/pages.svg";i0.push(this.dataToResource({title:r0.title,owner:r0.owner.userId,ownerName:r0.owner.displayName,icon:t0,path:"/pages#/website/"+r0._id,_id:r0._id,shared:r0.shared!==void 0,modified:r0.modified})),(n0=r0.pages)==null||n0.forEach(s0=>{i0.push(this.dataToResource({title:s0.title,owner:r0.owner.userId,ownerName:r0.owner.displayName,icon:t0,path:"/pages#/website/"+r0._id+"/"+s0.titleLink,_id:r0._id+"/"+s0.titleLink,shared:r0.shared!==void 0,modified:r0.modified}))})}),i0}},PollBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","poll");Z0(this,"RESOURCE","poll")}async loadResources(){return(await this.httpGet("/poll/list/all")).map(_e=>{let i0=_e.icon?_e.icon+"?thumbnail=48x48":"/img/icons/glyphicons_036_file.png";return this.dataToResource({title:_e.question,ownerName:_e.owner.displayName,icon:i0,path:"/poll#/view/"+_e._id,_id:_e._id,owner:_e.owner.userId,shared:!!(_e.shared&&_e.shared.length>=0),modified:_e.modified})})}},ScrapbookBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","scrapbook");Z0(this,"RESOURCE","scrapbook")}async loadResources(){return(await this.httpGet("/scrapbook/list/all")).map(_e=>{let i0=_e.icon||"/img/illustrations/scrapbook.svg";return this.dataToResource({title:_e.name,owner:_e.owner.userId,ownerName:_e.owner.displayName,icon:i0,path:"/scrapbook#/view-scrapbook/"+_e._id,_id:_e._id,shared:!!(_e.shared&&_e.shared.length>=0),modified:_e.modified})})}},TimelinegeneratorBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","timelinegenerator");Z0(this,"RESOURCE","timelinegenerator")}loadResources(){return new Promise(async(_e,i0)=>{try{_e((await this.httpGet("/timelinegenerator/timelines")).map(r0=>{let t0=r0.icon||"/img/illustrations/timeline-default.png";return this.dataToResource({title:r0.headline,ownerName:r0.owner.displayName,owner:r0.owner.userId,icon:t0,path:"/timelinegenerator#/view/"+r0._id,_id:r0._id,shared:r0.shared!==void 0,modified:r0.modified})}))}catch(r0){i0(r0)}})}},WikiBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","wiki");Z0(this,"RESOURCE","wiki")}async loadResources(){return(await this.httpGet("/wiki/listallpages?visible=true")).map(_e=>_e.pages.map(i0=>{let r0;return r0=_e.thumbnail===void 0||_e.thumbnail===""?"/img/icons/glyphicons_036_file.png":_e.thumbnail+"?thumbnail=48x48",this.dataToResource({title:i0.title+" ["+_e.title+"]",ownerName:_e.owner.displayName,owner:_e.owner.userId,icon:r0,path:"/wiki#/view/"+_e._id+"/"+i0._id,_id:`${_e._id}#${i0._id}`,shared:_e.shared!==void 0,modified:i0.modified})})).flat()}},WorkspaceBehaviour=class extends AbstractBehaviourService{constructor(){super(...arguments);Z0(this,"APP","workspace");Z0(this,"RESOURCE","workspace")}loadResources({search:_e,asset_id:i0}){return new Promise(async(r0,t0)=>{try{let n0="/workspace/documents?filter=all&hierarchical=true";(i0&&i0.length||_e&&_e.length)&&(n0+=`&search=${_e}`),r0((await this.httpGet(n0)).filter(s0=>!s0.deleted).map(s0=>{let o0=s0.metadata["content-type"]&&s0.metadata["content-type"].indexOf("image")!==-1?`/workspace/document/${s0._id}?thumbnail=120x120`:"/img/icons/unknown-large.png";return this.dataToResource({title:s0.name,ownerName:s0.ownerName,owner:s0.owner,icon:o0,path:`/workspace/document/${s0._id}`,_id:s0._id,shared:!!(s0.shared&&s0.shared.length>=0),modified:s0.modified})}))}catch(n0){t0(n0)}})}},Z2,SnipletsService=(Z2=class{static async initialize(_e,i0){let r0=_e.http();if(!this.resourceProducingApps.length){this.resourceProducingApps=[i0,"workspace"];try{let[t0,n0]=await Promise.all([r0.get("/resources-applications"),_e.session().getUser()]);n0!=null&&n0.apps&&(t0!=null&&t0.length)&&(this.resourceProducingApps=t0.filter(s0=>n0.apps.some(o0=>o0.address.includes(s0))))}catch(t0){console.warn("Failed to load resource-producing apps:",t0)}}return this.resourceProducingApps}static registerCustomBehaviour(_e,i0,r0){this.registry.register({application:_e,resourceType:i0},r0)}static async registerBehaviours(_e){this.resourceProducingApps.forEach(i0=>{let r0={application:_e,resourceType:i0};this.registry.register(r0,t0=>this.serviceFor(t0,_e,i0))})}static serviceFor(_e,i0,r0){let t0;switch(r0){case"timelinegenerator":t0=new TimelinegeneratorBehaviour(_e);break;case"workspace":t0=new WorkspaceBehaviour(_e);break;case"blog":t0=new BlogBehaviour(_e);break;case"actualites":t0=new ActualitesBehaviour(_e);break;case"wiki":t0=new WikiBehaviour(_e);break;case"pages":t0=new PagesBehaviour(_e);break;case"poll":t0=new PollBehaviour(_e);break;case"community":t0=new CommunityBehaviour(_e);break;case"mindmap":t0=new MindmapBehaviour(_e);break;case"forum":t0=new ForumBehaviour(_e);break;case"homeworks":t0=new HomeworksBehaviour(_e);break;case"scrapbook":t0=new ScrapbookBehaviour(_e);break;case"collaborativewall":t0=new CollaborativewallBehaviour(_e);break;case"exercizer":t0=new ExercizerBehaviour(_e);break;case"formulaire":t0=new FormulaireBehaviour(_e);break;case"magneto":t0=new MagnetoBehaviour(_e);break;case"appointments":t0=new AppointmentsBehaviour(_e);break;default:throw ERROR_CODE.NOT_SUPPORTED}return t0.APP=i0,t0}},Z0(Z2,"registry",new ServiceRegistry),Z0(Z2,"findBehaviour",Z2.registry.findService.bind(Z2.registry)),Z0(Z2,"hasBehaviour",Z2.registry.isRegistered.bind(Z2.registry)),Z0(Z2,"resourceProducingApps",[]),Z2),RightService=class{constructor(e0){Z0(this,"context");this.context=e0}get session(){return this.context.session()}parseResourceRight(e0){let _e=e0.split(":");if(_e.length===2){if(_e[0]==="creator")return{id:_e[1],right:"creator",type:"creator"}}else return _e.length===3?{id:_e[1],right:_e[2],type:_e[0]}:void 0}parseResourceRights(e0){return e0.map(_e=>this.parseResourceRight(_e)).filter(_e=>_e!==void 0)}hasResourceRight({id:e0,groupIds:_e},i0,r0){let t0=r0.map(n0=>typeof n0=="string"?this.parseResourceRight(n0):n0).filter(n0=>n0!==void 0);for(let n0 of t0){if(n0.id===e0&&n0.type==="creator")return!0;if(n0.id===e0&&n0.type==="user"&&n0.right===i0)return!0;if(_e.includes(n0.id)&&n0.type==="group"&&n0.right===i0)return!0}return!1}async sessionHasResourceRight(e0,_e){try{let i0=await this.session.getUser();return!!i0&&this.hasResourceRight({groupIds:i0.groupsIds,id:i0.userId},e0,_e)}catch(i0){return console.error(`Unexpected error ${i0} in sessionHasResourceRight()`),!1}}async sessionHasAtLeastOneResourceRight(e0,_e){for(let i0 of e0)if(await this.sessionHasResourceRight(i0,_e))return!0;return!1}async sessionHasResourceRightForEachList(e0,_e){let i0=0;for(let r0 of _e)await this.sessionHasResourceRight(e0,r0)&&i0++;return i0===_e.length}async sessionHasAtLeastOneResourceRightForEachList(e0,_e){for(let i0 of e0){let r0=0;for(let t0 of _e)await this.sessionHasResourceRight(i0,t0)&&r0++;if(r0===_e.length)return!0}return!1}hasWorkflowRight(e0,_e){return _e.findIndex(i0=>i0===e0)!==-1}async sessionHasWorkflowRight(e0){try{let _e=await this.session.getUser();return!!_e&&this.hasWorkflowRight(e0,_e.authorizedActions.map(i0=>i0.name))}catch(_e){return console.error(`Unexpected error ${_e} in sessionHasWorkflowRight()`),!1}}async sessionHasWorkflowRights(e0){let _e={};try{let i0=await this.session.getUser();for(let r0 of e0)_e[r0]=!!i0&&this.hasWorkflowRight(r0,i0.authorizedActions.map(t0=>t0.name))}catch(i0){console.error(`Unexpected error ${i0} in sessionHasWorkflowRights()`);for(let r0 of e0)_e[r0]=!1}return _e}},SessionService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}get cache(){return this.context.cache()}get conf(){return this.context.conf()}onLogout(){this.cache.clearCache()}onRefreshSession(){this.cache.clearCache()}async getSession(){let[e0,_e]=await Promise.all([this.getUser(),this.getPerson()]),[i0,r0,t0,n0,s0]=await Promise.all([this.getCurrentLanguage(e0),this.latestQuotaAndUsage(e0),this.loadDescription(e0),this.getUserProfile(),this.getBookmarks(e0)]),{type:o0,...a0}=_e||{};return{user:e0,quotaAndUsage:r0,currentLanguage:i0,userDescription:{...a0,profiles:o0||["Guest"],...t0},userProfile:n0,bookmarkedApps:s0}}login(e0,_e,i0,r0){let t0=new FormData;return t0.append("email",e0),t0.append("password",_e),i0!==void 0&&t0.append("rememberMe",""+i0),r0!==void 0&&t0.append("secureLocation",""+r0),this.http.post("/auth/login",t0,{headers:{"content-type":"application/x-www-form-urlencoded"}}).finally(()=>{switch(this.http.latestResponse.status){case 200:throw ERROR_CODE.MALFORMED_DATA}})}async logout(){let e0=await this.conf.getLogoutCallback();return this.http.get("/auth/logout?callback="+e0).finally(()=>{})}async latestQuotaAndUsage(e0){let _e={quota:0,storage:0};if(!e0)return _e;try{return await this.http.get(`/workspace/quota/user/${e0==null?void 0:e0.userId}`)}catch(i0){return console.error(i0),_e}}async getCurrentLanguage(e0){let _e=(e0==null?void 0:e0.sessionMetadata)&&(e0==null?void 0:e0.sessionMetadata.userId);try{let i0;return i0=_e?await this.loadUserLanguage():await this.loadDefaultLanguage(),i0}catch(i0){console.error(i0)}}async loadUserLanguage(){try{let e0=await this.http.get("/userbook/preference/language");return JSON.parse(e0.preference)["default-domain"]}catch{return await this.loadDefaultLanguage()}}async loadDefaultLanguage(){return(await this.cache.httpGetJson("/locale")).locale}async getUser(){let{response:e0,value:_e}=await this.cache.httpGet("/auth/oauth2/userinfo");if(!(e0.status<200||e0.status>=300)&&typeof _e=="object")return _e;throw ERROR_CODE.NOT_LOGGED_IN}hasWorkflow({workflowName:e0,user:_e}){return e0===void 0||(_e==null?void 0:_e.authorizedActions.findIndex(i0=>i0.name===e0))!==-1}async loadDescription(e0){if(!e0)return{};try{let[_e,i0]=await Promise.all([this.getUserProfile({options:{requestName:"refreshAvatar"}}),this.http.get("/directory/userbook/"+(e0==null?void 0:e0.userId))]);return{...i0,profiles:_e}}catch(_e){return console.error(_e),{}}}async getBookmarks(e0){if(!e0)return[];let _e=await this.http.get("/userbook/preference/apps");_e.preference||(_e.preference=null);let i0=JSON.parse(_e.preference),r0;r0=i0,r0||(r0={bookmarks:[],applications:[]});let t0=[];return r0.bookmarks.forEach((n0,s0)=>{let o0=((e0==null?void 0:e0.apps)||[]).find(a0=>a0.name===n0);if(o0){let a0=Object.assign({},o0);t0.push(a0)}}),t0}async getUserProfile(e0={}){var _e;return((_e=await this.getPerson(e0))==null?void 0:_e.type)||["Guest"]}async getPerson(e0={}){var o0;let{options:_e={},params:i0={}}=e0,r0=new URLSearchParams(i0).toString(),t0=`/userbook/api/person${r0?`?${r0}`:""}`,{response:n0,value:s0}=await this.cache.httpGet(t0,_e);return n0.status<200||n0.status>=300||typeof s0=="string"?null:((o0=s0==null?void 0:s0.result)==null?void 0:o0[0])||null}async isAdml(){var e0;return((e0=await this.getUser())==null?void 0:e0.functions.ADMIN_LOCAL)!==void 0}async getWebApp(e0){var _e;return(_e=await this.getUser())==null?void 0:_e.apps.find(i0=>{var r0;return i0!=null&&i0.prefix?(i0==null?void 0:i0.prefix.replace("/",""))===e0||!1:(i0==null?void 0:i0.address)&&((r0=i0.address)==null?void 0:r0.split("/")[1])===e0||!1})}},StringUtils=class{static removeAccents(e0){for(let _e=0;_e<defaultDiacriticsRemovalMap.length;_e++)e0=e0.replace(defaultDiacriticsRemovalMap[_e].letters,defaultDiacriticsRemovalMap[_e].base);return e0}},ShareService=class{constructor(e0){Z0(this,"context");this.context=e0}get directory(){return this.context.directory()}get http(){return this.context.http()}get cache(){return this.context.cache()}getSearchUrl(e0,_e,i0,r0){if(!r0)return`/${e0}/share/json/${_e}?search=${i0}`;if(r0.includes("?search=")){let[t0]=r0.split("?search=");return`${t0}?search=${i0}`}else return r0.includes("?")?`${r0}&search=${i0}`:`${r0}?search=${i0}`}async searchShareSubjects(e0,_e,i0,r0){let t0=StringUtils.removeAccents(i0).toLowerCase(),n0=this.getSearchUrl(e0,_e,i0,r0),s0=await this.cache.httpGetJson(n0),o0=s0.users.visibles.filter(({username:f0,firstName:l0,lastName:u0,login:A0})=>{let c0=StringUtils.removeAccents(u0||"").toLowerCase(),k0=StringUtils.removeAccents(l0||"").toLowerCase(),d0=StringUtils.removeAccents(f0||"").toLowerCase(),h0=StringUtils.removeAccents(A0||"").toLowerCase();return d0.includes(t0)||k0.includes(t0)||c0.includes(t0)||h0.includes(t0)}).map(f0=>({avatarUrl:this.directory.getAvatarUrl(f0.id,"user"),directoryUrl:this.directory.getDirectoryUrl(f0.id,"user"),displayName:f0.username,id:f0.id,profile:f0.profile,type:"user"})),a0=s0.groups.visibles.filter(({name:f0})=>StringUtils.removeAccents(f0||"").toLowerCase().includes(t0)).map(f0=>({avatarUrl:this.directory.getAvatarUrl(f0.id,"group"),directoryUrl:this.directory.getDirectoryUrl(f0.id,"group"),displayName:f0.name,id:f0.id,type:"group",structureName:f0.structureName}));return[...(await this.directory.getBookMarks()).filter(({displayName:f0})=>StringUtils.removeAccents(f0||"").toLowerCase().includes(t0)).map(f0=>({avatarUrl:"",directoryUrl:"",profile:"",displayName:f0.displayName,id:f0.id,type:"sharebookmark"})),...o0,...a0]}async getShareMapping(e0,_e){let i0=await this.cache.httpGetJson(_e||`/${e0}/rights/sharing`);for(let r0 of Object.keys(i0))if(r0.includes(".")){let t0=r0.split(".")[1],n0=i0[r0];delete i0[r0],i0[t0]=n0}return i0}getActionsAvailableFor({id:e0,type:_e},i0,r0){let t0=(_e==="user"?i0.users.checked[e0]:i0.groups.checked[e0])||[],n0=Object.keys(r0),s0=[];for(let o0 of n0)r0[o0].filter(a0=>t0.includes(a0)).length>0&&s0.push(o0);return s0}async getRightsForResource(e0,_e,i0){let r0=await this.directory.getBookMarks(),t0=this.getSearchUrl(e0,_e,"",i0==null?void 0:i0.getResourceRights),n0=await this.cache.httpGetJson(t0),s0=await this.getShareMapping(e0,i0==null?void 0:i0.getShareMapping),o0=await this.cache.httpGetJson("/infra/public/json/sharing-rights.json"),a0=Object.keys(n0.users.checked).map(l0=>n0.users.visibles.find(u0=>u0.id===l0)).filter(l0=>l0!==void 0).map(l0=>{let u0=this.getActionsAvailableFor({id:l0.id,type:"user"},n0,s0);return{id:l0.id,type:"user",displayName:l0.username,profile:l0.profile,avatarUrl:this.directory.getAvatarUrl(l0.id,"user"),directoryUrl:this.directory.getDirectoryUrl(l0.id,"user"),actions:u0.map(A0=>({displayName:A0,id:A0,priority:o0[A0].priority}))}}).sort((l0,u0)=>(l0.displayName||"").localeCompare(u0.displayName)),f0=Object.keys(n0.groups.checked).map(l0=>n0.groups.visibles.find(u0=>u0.id===l0)).filter(l0=>l0!==void 0).map(l0=>{let u0=this.getActionsAvailableFor({id:l0.id,type:"group"},n0,s0);return{id:l0.id,type:"group",displayName:l0.name,profile:void 0,avatarUrl:this.directory.getAvatarUrl(l0.id,"group"),directoryUrl:this.directory.getDirectoryUrl(l0.id,"group"),actions:u0.map(A0=>({displayName:A0,id:A0,priority:o0[A0].priority}))}}).sort((l0,u0)=>(l0.displayName||"").localeCompare(u0.displayName));return{rights:[...a0,...f0],visibleBookmarks:r0,visibleGroups:n0.groups.visibles.map(({groupDisplayName:l0,id:u0,name:A0,labels:c0})=>({labels:c0,displayName:l0||A0,id:u0})),visibleUsers:n0.users.visibles.map(({id:l0,profile:u0,username:A0,firstName:c0,lastName:k0,login:d0})=>({displayName:A0,firstName:c0,lastName:k0,login:d0,profile:u0,id:l0}))}}async getPutSharePayload(e0,_e,i0){let r0={users:{},groups:{},bookmarks:{}},t0=await this.getShareMapping(e0,i0);for(let n0 of _e){let s0=n0.actions.map(a0=>t0[a0.id]).reduce((a0,f0)=>Array.isArray(f0)?[...a0,...f0]:a0,[]),o0=[...new Set(s0)];o0.length>0&&(n0.type==="user"?r0.users[n0.id]=o0:n0.type==="group"?r0.groups[n0.id]=o0:r0.bookmarks[n0.id]=o0)}return r0}async saveRights(e0,_e,i0,r0){let t0=await this.getPutSharePayload(e0,i0,r0==null?void 0:r0.getShareMapping),n0=(r0==null?void 0:r0.saveResourceRights)||`/${e0}/share/resource/${_e}`,s0=this.getSearchUrl(e0,_e,"",r0==null?void 0:r0.getResourceRights);return this.cache.clearCache(s0),await this.http.putJson(n0,t0)}async getActionsForApp(e0,_e){let i0=await this.cache.httpGetJson("/infra/public/json/sharing-rights.json"),r0=await this.getShareMapping(e0,_e);return Object.keys(i0).map(t0=>{let n0=i0[t0];return{displayName:t0,id:t0,priority:n0.priority,requires:n0.requires}}).filter(t0=>{var n0;return((n0=r0[t0.id])==null?void 0:n0.length)>0}).sort((t0,n0)=>t0.priority-n0.priority)}},loadedScripts={},HttpService=class{constructor(e0,_e){Z0(this,"context");Z0(this,"axios");Z0(this,"baseUrl");Z0(this,"headers",{});Z0(this,"_latestResponse");this.context=e0,this.axios=axios.create(_e)}fixBaseUrl(e0){return e0.startsWith("http://")||e0.startsWith("https://")?e0:this.baseUrl?this.baseUrl.endsWith("/")||e0.startsWith("/")?`${this.baseUrl}${e0}`:`${this.baseUrl}/${e0}`:e0}useBaseUrl(e0){return this.baseUrl=e0,this}useHeaders(e0){return this.headers=e0,this}setCdn(e0){e0&&XMLHttpRequest&&!XMLHttpRequest.prototype.cdnUrl&&(XMLHttpRequest.prototype.cdnUrl=e0,XMLHttpRequest.prototype.baseOpen=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(){let _e=arguments[1];return _e.startsWith("/infra/public")&&(arguments[1]=e0+_e),/^\/([^\/]*)\/public/.test(_e)&&(arguments[1]=e0+_e),_e.startsWith("/assets")&&(arguments[1]=e0+_e),_e=="/conf/public"&&(arguments[1]=_e),_e.startsWith("http")&&(arguments[1]=_e),this.baseOpen.apply(this,arguments)})}toAxiosConfig(e0){if(e0){let _e=Object.assign({},this.axios.defaults);return e0.headers&&(_e.headers=Object.assign({},this.axios.defaults.headers),Object.assign(_e.headers,e0.headers)),e0.responseType&&(_e.responseType=e0.responseType),e0.queryParams&&(_e.params=Object.assign({},e0.queryParams)),_e.headers={..._e.headers??{},...this.headers},_e}else return this.axios.defaults}toCdnUrl(e0){e0=this.fixBaseUrl(e0);let _e=this.context.conf().getCdnUrl()||"";if(_e.length>0&&e0!=="/conf/public"){let i0=""+e0;(i0.startsWith("/infra/public")||i0.startsWith("/assets")||/^\/([^\/]*)\/public/.test(i0))&&(e0=_e+i0)}return e0}mapAxiosError(e0,_e){e0.response?this._latestResponse=e0.response:e0.request?this._latestResponse={status:408,statusText:ERROR_CODE.TIME_OUT}:this._latestResponse={status:500,statusText:ERROR_CODE.UNKNOWN};let{status:i0,statusText:r0,headers:t0,data:n0}=this._latestResponse;return _e!=null&&_e.disableNotifications||notify.events().publish(LAYER_NAME.TRANSPORT,{name:EVENT_NAME.ERROR_OCCURED,data:{params:_e,response:{status:i0,statusText:r0,headers:t0},payload:n0}}),n0}mapAxiosResponse(e0,_e){return this._latestResponse=e0,e0.data}get latestResponse(){return this._latestResponse}isResponseError(){return this.latestResponse.status<200||this.latestResponse.status>=300}async get(e0,_e){try{let i0=await this.axios.get(this.toCdnUrl(e0),this.toAxiosConfig(_e));return this.mapAxiosResponse(i0,_e)}catch(i0){throw this.mapAxiosError(i0,_e)}}async post(e0,_e,i0){try{let r0=await this.axios.post(this.fixBaseUrl(e0),_e,this.toAxiosConfig(i0));return this.mapAxiosResponse(r0,i0)}catch(r0){throw this.mapAxiosError(r0,i0)}}async postFile(e0,_e,i0){let r0=this.toAxiosConfig(i0);r0.headers&&r0.headers["Content-Type"]&&delete r0.headers["Content-Type"];try{let t0=await this.axios.post(this.fixBaseUrl(e0),_e,{...r0,headers:{"Content-Type":"multipart/form-data"}});return this.mapAxiosResponse(t0,i0)}catch(t0){throw this.mapAxiosError(t0,i0)}}async postJson(e0,_e,i0){let r0=this.toAxiosConfig();r0.headers&&(r0.headers["Content-Type"]="application/json");try{let t0=await this.axios.post(this.fixBaseUrl(e0),_e,this.toAxiosConfig(i0));return this.mapAxiosResponse(t0,i0)}catch(t0){throw this.mapAxiosError(t0,i0)}}async put(e0,_e,i0){try{let r0=await this.axios.put(this.fixBaseUrl(e0),_e,this.toAxiosConfig(i0));return this.mapAxiosResponse(r0,i0)}catch(r0){throw this.mapAxiosError(r0,i0)}}async putFile(e0,_e,i0){try{let r0=this.toAxiosConfig(i0);r0.headers&&r0.headers["Content-Type"]&&delete r0.headers["Content-Type"];let t0=await this.axios.put(this.fixBaseUrl(e0),_e,{...r0,headers:{"Content-Type":"multipart/form-data"}});return this.mapAxiosResponse(t0,i0)}catch(r0){throw this.mapAxiosError(r0,i0)}}async putJson(e0,_e,i0){let r0=this.toAxiosConfig(i0);r0.headers&&(r0.headers["Content-Type"]="application/json");try{let t0=await this.axios.put(this.fixBaseUrl(e0),_e,r0);return this.mapAxiosResponse(t0,i0)}catch(t0){throw this.mapAxiosError(t0,i0)}}async patch(e0,_e,i0){try{let r0=await this.axios.patch(this.fixBaseUrl(e0),_e,this.toAxiosConfig(i0));return this.mapAxiosResponse(r0,i0)}catch(r0){throw this.mapAxiosError(r0,i0)}}async patchFile(e0,_e,i0){try{let r0=this.toAxiosConfig(i0);r0.headers&&r0.headers["Content-Type"]&&delete r0.headers["Content-Type"];let t0=await this.axios.patch(this.fixBaseUrl(e0),_e,{...r0,headers:{"Content-Type":"multipart/form-data"}});return this.mapAxiosResponse(t0,i0)}catch(r0){throw this.mapAxiosError(r0,i0)}}async patchJson(e0,_e,i0){let r0=this.toAxiosConfig(i0);r0.headers&&(r0.headers["Content-Type"]="application/json");try{let t0=await this.axios.patch(this.fixBaseUrl(e0),_e,r0);return this.mapAxiosResponse(t0,i0)}catch(t0){throw this.mapAxiosError(t0,i0)}}async delete(e0,_e){try{let i0=await this.axios.delete(this.fixBaseUrl(e0),this.toAxiosConfig(_e));return this.mapAxiosResponse(i0,_e)}catch(i0){throw this.mapAxiosError(i0,_e)}}async deleteJson(e0,_e){try{let i0=await this.axios.delete(this.fixBaseUrl(e0),{data:_e});return this.mapAxiosResponse(i0)}catch(i0){throw this.mapAxiosError(i0)}}getScript(e0,_e,i0){let r0=i0??"exports",t0=this.toAxiosConfig(_e);return t0.headers&&(t0.headers.Accept="application/javascript"),this.axios.get(this.toCdnUrl(e0),t0).then(n0=>this.mapAxiosResponse(n0,_e)).then(n0=>{try{let s0=`"use strict";var ${r0.split(".")[0]}={};${n0};return ${r0};`;return Function(s0)()}catch{return n0}}).catch(n0=>{throw this.mapAxiosError(n0,_e),n0})}loadScript(e0,_e){return loadedScripts[e0]?Promise.resolve():this.getScript(e0,_e).then(i0=>{loadedScripts[e0]=!0})}},lr,VideoService=(lr=class{constructor(_e){Z0(this,"context");this.context=_e}get http(){return this.context.http()}get conf(){return this.context.conf()}async getVideoConf(){var i0;let _e=await this.conf.getPublicConf(APP$1.VIDEO);return{maxWeight:(_e==null?void 0:_e["max-videosize-mbytes"])??lr.MAX_WEIGHT,maxDuration:(_e==null?void 0:_e["max-videoduration-minutes"])??lr.MAX_DURATION,acceptVideoUploadExtensions:((i0=_e==null?void 0:_e["accept-videoupload-extensions"])==null?void 0:i0.map(r0=>r0.toUpperCase()))??[]}}async upload({data:_e,appCode:i0,captation:r0,duration:t0}){if(!_e.file)throw Error("Invalid video file.");if(!_e.filename)throw Error("Invalid video filename");let n0=`${_e.browser.name} ${_e.browser.version}`,s0=new FormData;s0.append("device",_e.device||""),s0.append("browser",n0),s0.append("url",_e.url),s0.append("app",i0),s0.append("file",_e.file,_e.filename),s0.append("weight",""+_e.file.size),s0.append("captation",""+r0);let o0=`/video/encode?captation=${r0}`;t0&&(o0+=`&duration=${t0}`);let a0=await this.http.post(o0,s0,{headers:{"Content-Type":"multipart/form-data"}});if(a0.state=="running"){let f0=0,l0=1;do{let u0=l0+f0;await new Promise(c0=>setTimeout(c0,u0*1e3)),f0=l0,l0=Math.min(8,u0);let A0=await this.http.get(`/video/status/${a0.processid}`);if(A0.state=="succeed")return A0.videoworkspaceid&&A0.videosize&&this.context.data().trackVideoSave(A0.videoworkspaceid,Math.round(t0),A0.videosize,r0,_e.url,n0,_e.device),A0;if(A0.state=="error")break}while(!0)}throw Error("Video cannot be uploaded.")}},Z0(lr,"MAX_WEIGHT",50),Z0(lr,"MAX_DURATION",3),lr),WidgetService=class{constructor(e0){Z0(this,"context");this.context=e0}get session(){return this.context.session()}async getSystemWidgets(){var e0;try{return(e0=await this.session.getUser())==null?void 0:e0.widgets}catch(_e){throw console.error("[WidgetService] getSystemWidgets failed",_e),_e}}async getPreferences(){return await this.context.conf().getPreference("widgets")}async setPreferences(e0){await this.context.conf().savePreference("widgets",e0)}},defaultMappers={csv:function({type:e0,extension:_e}){return e$6.INSTANCE.isCsvLike(e0,_e)},doc:function({type:e0,extension:_e}){return e$6.INSTANCE.isWordLike(e0,_e)?!0:e0.indexOf("document")!==-1&&e0.indexOf("wordprocessing")!==-1},xls:function({type:e0,extension:_e}){return e$6.INSTANCE.isExcelLike(e0,_e)?!0:e0.indexOf("document")!==-1&&e0.indexOf("spreadsheet")!==-1||e0.indexOf("ms-excel")!==-1},img:function({type:e0}){return e0.indexOf("image")!==-1},pdf:function({type:e0}){return e0.indexOf("pdf")!==-1||e0==="application/x-download"},ppt:function({type:e0,extension:_e}){return e$6.INSTANCE.isPowerpointLike(e0,_e)?!0:e0.indexOf("document")!==-1&&e0.indexOf("presentation")!==-1||e0.indexOf("powerpoint")!==-1},txt:function({type:e0,extension:_e}){return e$6.INSTANCE.isTxtLike(e0,_e)},md:function({type:e0,extension:_e}){return e$6.INSTANCE.isMdLike(e0,_e)},video:function({type:e0}){return e0.indexOf("video")!==-1},audio:function({type:e0}){return e0.indexOf("audio")!==-1},zip:function({type:e0}){return e0.indexOf("zip")!==-1||e0.indexOf("rar")!==-1||e0.indexOf("tar")!==-1||e0.indexOf("7z")!==-1}},Br,DocumentHelper=(Br=class{static getRole(_e){var i0,r0;return Br.role((i0=_e.metadata)==null?void 0:i0["content-type"],!1,(r0=_e.metadata)==null?void 0:r0.extension)}static role(_e,i0=!1,r0){if(r0&&(r0=r0.trim()),!_e)return"unknown";this.roleMappers||console.warn("[DocumentHelper.role] should not have empty roles",this);let t0={type:_e,previewRole:i0,extension:r0};for(let n0 of this.roleMappers){let s0=n0(t0);if(s0)return s0}return"unknown"}},Z0(Br,"roleMappers",[_e=>Object.keys(defaultMappers).find(i0=>defaultMappers[i0](_e))]),Br),WorkspaceService=class{constructor(e0){Z0(this,"context");this.context=e0}get http(){return this.context.http()}extractMetadata(e0){let _e=e0.name||"",i0=_e.split("."),r0=e0.type||"application/octet-stream",t0=i0.length>1?i0[i0.length-1]:"",n0={"content-type":r0,filename:_e,size:e0.size,extension:t0,role:DocumentHelper.role(r0,!1,t0)},s0=_e.replace("."+n0.extension,"");return{basename:s0,fullname:n0.extension?s0+"."+n0.extension:s0,metadata:n0}}async saveFile(e0,_e){let{fullname:i0,metadata:r0}=this.extractMetadata(e0),t0=new FormData;t0.append("file",e0,i0);let n0=[];((_e==null?void 0:_e.visibility)==="public"||(_e==null?void 0:_e.visibility)==="protected")&&n0.push(`${_e.visibility}=true`),_e!=null&&_e.application&&n0.push(`application=${_e.application}`),r0.role==="img"&&n0.push("quality=1"),_e!=null&&_e.parentId&&n0.push(`parentId=${_e.parentId}`);let s0=await this.http.postFile(`/workspace/document?${n0.join("&")}`,t0);if(this.http.isResponseError())throw this.http.latestResponse.statusText;return s0}async updateFile(e0,_e,i0){let{fullname:r0,metadata:t0}=this.extractMetadata(_e),n0=new FormData;n0.append("file",_e,r0);let s0=[];t0.role==="img"&&s0.push("quality=1"),i0!=null&&i0.alt&&s0.push(`alt=${i0.alt}`),i0!=null&&i0.legend&&s0.push(`legend=${i0.legend}`),i0!=null&&i0.name&&s0.push(`name=${i0.name}`);let o0=await this.http.putFile(`/workspace/document/${e0}?${s0.join("&")}`,n0);if(this.http.isResponseError())throw this.http.latestResponse.statusText;return o0}async deleteFile(e0){let _e=e0.map(i0=>i0._id);if(_e.length==0)Promise.resolve(null);else if(await this.http.deleteJson("/workspace/documents",{ids:_e}),this.http.isResponseError())throw this.http.latestResponse.statusText}async acceptDocuments(e0){let _e=await this.context.session().getUser();return i0=>i0.deleted&&i0.trasher?(_e==null?void 0:_e.userId)==i0.trasher:!0}async searchDocuments(e0){let _e=e0.filter!=="external"||e0.parentId?await this.http.get("/workspace/documents",{queryParams:{...e0,_:new Date().getTime()}}):[],i0=await this.acceptDocuments(e0);return _e.filter(i0)}async listDocuments(e0,_e){return this.searchDocuments({filter:e0,parentId:_e,includeall:!0})}async transferDocuments(e0,_e,i0="protected"){let r0=[];if(e0.forEach(t0=>{(i0==="public"&&!t0.public||!t0.public&&!t0.protected)&&r0.push(t0)}),r0.length>0){let t0=await this.http.post("/workspace/documents/transfer",{application:_e,visibility:i0,ids:r0.map(n0=>n0._id)});if(this.http.isResponseError())throw this.http.latestResponse.statusText;return r0.forEach((n0,s0)=>{let o0=e0.findIndex(a0=>a0._id===n0._id);0<=o0&&o0<e0.length&&(e0[o0]=t0[s0])}),e0.filter(n0=>!!n0)}return e0}getThumbnailUrl(e0,_e=0,i0=0){var t0,n0;let r0=_e>0||i0>0?`${_e}x${i0}`:"120x120";if(typeof e0=="string")return e0.includes("data:image")||e0.includes("thumbnail")?e0:`${e0}${e0.includes("?")?"&":"?"}thumbnail=${r0}`;{let s0=`/workspace/${e0.public?"pub/":""}document/${e0._id}?thumbnail=`,o0=e0.thumbnails;if((n0=(t0=e0.metadata)==null?void 0:t0["content-type"])!=null&&n0.includes("video")){let a0=o0&&Object.keys(o0).length>0?Object.keys(o0)[0]:null;return a0?s0+a0:null}else return s0+r0}}listFolder(e0,_e=!1,i0,r0){let t0={filter:e0,hierarchical:_e,parentId:i0,directShared:r0};return this.http.get("/workspace/folders/list",{queryParams:t0})}listOwnerFolders(e0,_e){return this.listFolder("owner",e0,_e)}listSharedFolders(e0,_e){return this.listFolder("shared",e0,_e,!0)}createFolder(e0,_e){let i0=new FormData;return i0.append("name",e0),_e&&i0.append("parentFolderId",_e),this.http.postFile("/workspace/folder",i0)}},OdeServices=class{constructor(){Z0(this,"_analytics");Z0(this,"_cache");Z0(this,"_conf");Z0(this,"_data");Z0(this,"_directory");Z0(this,"_http");Z0(this,"_idiom");Z0(this,"_nextcloud");Z0(this,"_notify");Z0(this,"_rights");Z0(this,"_session");Z0(this,"_share");Z0(this,"_video");Z0(this,"_widget");Z0(this,"_workspace");Z0(this,"_embedder");this._analytics=new AnalyticsService(this),this._cache=new CacheService(this),this._conf=new ConfService(this),this._data=new DataService(this),this._directory=new DirectoryService(this),this._http=new HttpService(this),this._idiom=new IdiomService(this),this._nextcloud=new NextcloudService(this),this._notify=NotifyFrameworkFactory.instance(),this._rights=new RightService(this),this._session=new SessionService(this),this._share=new ShareService(this),this._video=new VideoService(this),this._widget=new WidgetService(this),this._workspace=new WorkspaceService(this),this._embedder=new EmbedderService(this)}initialize(){return this._data.initialize(),this}analytics(){return this._analytics}audience(e0,_e){return new AudienceService(this,e0,_e)}cache(){return this._cache}conf(){return this._conf}data(){return this._data}directory(){return this._directory}http(){return this._http}idiom(){return this._idiom}nextcloud(){return this._nextcloud}notify(){return this._notify}resource(e0,_e){return _e?ResourceService.findService({application:e0,resourceType:_e},this):ResourceService.findMainService({application:e0},this)}behaviour(e0,_e){return SnipletsService.findBehaviour({application:e0,resourceType:_e},this)}rights(){return this._rights}session(){return this._session}share(){return this._share}video(){return this._video}widget(){return this._widget}workspace(){return this._workspace}embedder(){return this._embedder}},ACTION={OPEN:"open",MANAGE:"manage",UPD_PROPS:"properties",DELETE:"delete",RESTORE:"restore",MOVE:"move",COPY:"copy",EXPORT:"export",SHARE:"share",PRINT:"print",PUBLISH:"publish"},FOLDER={BIN:"bin",DEFAULT:"default"},SORT_ORDER={DESC:"desc"},odeServices=new OdeServices().initialize(),isActionAvailable=(e0,_e)=>{let i0=_e==null?void 0:_e.filter(r0=>r0.id===e0&&r0.available);return i0&&i0.length>0},Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e0){return this.listeners.add(e0),this.onSubscribe(),()=>{this.listeners.delete(e0),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},isServer=typeof window>"u"||"Deno"in globalThis;function noop$6(){}function functionalUpdate(e0,_e){return typeof e0=="function"?e0(_e):e0}function isValidTimeout(e0){return typeof e0=="number"&&e0>=0&&e0!==1/0}function timeUntilStale(e0,_e){return Math.max(e0+(_e||0)-Date.now(),0)}function resolveStaleTime(e0,_e){return typeof e0=="function"?e0(_e):e0}function resolveEnabled(e0,_e){return typeof e0=="function"?e0(_e):e0}function matchQuery(e0,_e){const{type:i0="all",exact:r0,fetchStatus:t0,predicate:n0,queryKey:s0,stale:o0}=e0;if(s0){if(r0){if(_e.queryHash!==hashQueryKeyByOptions(s0,_e.options))return!1}else if(!partialMatchKey(_e.queryKey,s0))return!1}if(i0!=="all"){const a0=_e.isActive();if(i0==="active"&&!a0||i0==="inactive"&&a0)return!1}return!(typeof o0=="boolean"&&_e.isStale()!==o0||t0&&t0!==_e.state.fetchStatus||n0&&!n0(_e))}function matchMutation(e0,_e){const{exact:i0,status:r0,predicate:t0,mutationKey:n0}=e0;if(n0){if(!_e.options.mutationKey)return!1;if(i0){if(hashKey(_e.options.mutationKey)!==hashKey(n0))return!1}else if(!partialMatchKey(_e.options.mutationKey,n0))return!1}return!(r0&&_e.state.status!==r0||t0&&!t0(_e))}function hashQueryKeyByOptions(e0,_e){return((_e==null?void 0:_e.queryKeyHashFn)||hashKey)(e0)}function hashKey(e0){return JSON.stringify(e0,(_e,i0)=>isPlainObject$1(i0)?Object.keys(i0).sort().reduce((r0,t0)=>(r0[t0]=i0[t0],r0),{}):i0)}function partialMatchKey(e0,_e){return e0===_e?!0:typeof e0!=typeof _e?!1:e0&&_e&&typeof e0=="object"&&typeof _e=="object"?!Object.keys(_e).some(i0=>!partialMatchKey(e0[i0],_e[i0])):!1}function replaceEqualDeep(e0,_e){if(e0===_e)return e0;const i0=isPlainArray(e0)&&isPlainArray(_e);if(i0||isPlainObject$1(e0)&&isPlainObject$1(_e)){const r0=i0?e0:Object.keys(e0),t0=r0.length,n0=i0?_e:Object.keys(_e),s0=n0.length,o0=i0?[]:{};let a0=0;for(let f0=0;f0<s0;f0++){const l0=i0?f0:n0[f0];(!i0&&r0.includes(l0)||i0)&&e0[l0]===void 0&&_e[l0]===void 0?(o0[l0]=void 0,a0++):(o0[l0]=replaceEqualDeep(e0[l0],_e[l0]),o0[l0]===e0[l0]&&e0[l0]!==void 0&&a0++)}return t0===s0&&a0===t0?e0:o0}return _e}function shallowEqualObjects(e0,_e){if(!_e||Object.keys(e0).length!==Object.keys(_e).length)return!1;for(const i0 in e0)if(e0[i0]!==_e[i0])return!1;return!0}function isPlainArray(e0){return Array.isArray(e0)&&e0.length===Object.keys(e0).length}function isPlainObject$1(e0){if(!hasObjectPrototype(e0))return!1;const _e=e0.constructor;if(_e===void 0)return!0;const i0=_e.prototype;return!(!hasObjectPrototype(i0)||!i0.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e0)!==Object.prototype)}function hasObjectPrototype(e0){return Object.prototype.toString.call(e0)==="[object Object]"}function sleep(e0){return new Promise(_e=>{setTimeout(_e,e0)})}function replaceData(e0,_e,i0){return typeof i0.structuralSharing=="function"?i0.structuralSharing(e0,_e):i0.structuralSharing!==!1?replaceEqualDeep(e0,_e):_e}function addToEnd(e0,_e,i0=0){const r0=[...e0,_e];return i0&&r0.length>i0?r0.slice(1):r0}function addToStart(e0,_e,i0=0){const r0=[_e,...e0];return i0&&r0.length>i0?r0.slice(0,-1):r0}var skipToken=Symbol();function ensureQueryFn(e0,_e){return!e0.queryFn&&(_e!=null&&_e.initialPromise)?()=>_e.initialPromise:!e0.queryFn||e0.queryFn===skipToken?()=>Promise.reject(new Error(`Missing queryFn: '${e0.queryHash}'`)):e0.queryFn}var Cr,kr,Vr,Gt,FocusManager=(Gt=class extends Subscribable{constructor(){super();l2(this,Cr);l2(this,kr);l2(this,Vr);t2(this,Vr,_e=>{if(!isServer&&window.addEventListener){const i0=()=>_e();return window.addEventListener("visibilitychange",i0,!1),()=>{window.removeEventListener("visibilitychange",i0)}}})}onSubscribe(){V0(this,kr)||this.setEventListener(V0(this,Vr))}onUnsubscribe(){var _e;this.hasListeners()||((_e=V0(this,kr))==null||_e.call(this),t2(this,kr,void 0))}setEventListener(_e){var i0;t2(this,Vr,_e),(i0=V0(this,kr))==null||i0.call(this),t2(this,kr,_e(r0=>{typeof r0=="boolean"?this.setFocused(r0):this.onFocus()}))}setFocused(_e){V0(this,Cr)!==_e&&(t2(this,Cr,_e),this.onFocus())}onFocus(){const _e=this.isFocused();this.listeners.forEach(i0=>{i0(_e)})}isFocused(){var _e;return typeof V0(this,Cr)=="boolean"?V0(this,Cr):((_e=globalThis.document)==null?void 0:_e.visibilityState)!=="hidden"}},Cr=new WeakMap,kr=new WeakMap,Vr=new WeakMap,Gt),focusManager=new FocusManager,Wr,dr,Dr,Mt,OnlineManager=(Mt=class extends Subscribable{constructor(){super();l2(this,Wr,!0);l2(this,dr);l2(this,Dr);t2(this,Dr,_e=>{if(!isServer&&window.addEventListener){const i0=()=>_e(!0),r0=()=>_e(!1);return window.addEventListener("online",i0,!1),window.addEventListener("offline",r0,!1),()=>{window.removeEventListener("online",i0),window.removeEventListener("offline",r0)}}})}onSubscribe(){V0(this,dr)||this.setEventListener(V0(this,Dr))}onUnsubscribe(){var _e;this.hasListeners()||((_e=V0(this,dr))==null||_e.call(this),t2(this,dr,void 0))}setEventListener(_e){var i0;t2(this,Dr,_e),(i0=V0(this,dr))==null||i0.call(this),t2(this,dr,_e(this.setOnline.bind(this)))}setOnline(_e){V0(this,Wr)!==_e&&(t2(this,Wr,_e),this.listeners.forEach(r0=>{r0(_e)}))}isOnline(){return V0(this,Wr)}},Wr=new WeakMap,dr=new WeakMap,Dr=new WeakMap,Mt),onlineManager=new OnlineManager;function pendingThenable(){let e0,_e;const i0=new Promise((t0,n0)=>{e0=t0,_e=n0});i0.status="pending",i0.catch(()=>{});function r0(t0){Object.assign(i0,t0),delete i0.resolve,delete i0.reject}return i0.resolve=t0=>{r0({status:"fulfilled",value:t0}),e0(t0)},i0.reject=t0=>{r0({status:"rejected",reason:t0}),_e(t0)},i0}function defaultRetryDelay(e0){return Math.min(1e3*2**e0,3e4)}function canFetch(e0){return(e0??"online")==="online"?onlineManager.isOnline():!0}var CancelledError=class extends Error{constructor(e0){super("CancelledError"),this.revert=e0==null?void 0:e0.revert,this.silent=e0==null?void 0:e0.silent}};function isCancelledError(e0){return e0 instanceof CancelledError}function createRetryer(e0){let _e=!1,i0=0,r0=!1,t0;const n0=pendingThenable(),s0=d0=>{var h0;r0||(A0(new CancelledError(d0)),(h0=e0.abort)==null||h0.call(e0))},o0=()=>{_e=!0},a0=()=>{_e=!1},f0=()=>focusManager.isFocused()&&(e0.networkMode==="always"||onlineManager.isOnline())&&e0.canRun(),l0=()=>canFetch(e0.networkMode)&&e0.canRun(),u0=d0=>{var h0;r0||(r0=!0,(h0=e0.onSuccess)==null||h0.call(e0,d0),t0==null||t0(),n0.resolve(d0))},A0=d0=>{var h0;r0||(r0=!0,(h0=e0.onError)==null||h0.call(e0,d0),t0==null||t0(),n0.reject(d0))},c0=()=>new Promise(d0=>{var h0;t0=b0=>{(r0||f0())&&d0(b0)},(h0=e0.onPause)==null||h0.call(e0)}).then(()=>{var d0;t0=void 0,r0||(d0=e0.onContinue)==null||d0.call(e0)}),k0=()=>{if(r0)return;let d0;const h0=i0===0?e0.initialPromise:void 0;try{d0=h0??e0.fn()}catch(b0){d0=Promise.reject(b0)}Promise.resolve(d0).then(u0).catch(b0=>{var w0;if(r0)return;const p0=e0.retry??(isServer?0:3),m0=e0.retryDelay??defaultRetryDelay,g0=typeof m0=="function"?m0(i0,b0):m0,v0=p0===!0||typeof p0=="number"&&i0<p0||typeof p0=="function"&&p0(i0,b0);if(_e||!v0){A0(b0);return}i0++,(w0=e0.onFail)==null||w0.call(e0,i0,b0),sleep(g0).then(()=>f0()?void 0:c0()).then(()=>{_e?A0(b0):k0()})})};return{promise:n0,cancel:s0,continue:()=>(t0==null||t0(),n0),cancelRetry:o0,continueRetry:a0,canStart:l0,start:()=>(l0()?k0():c0().then(k0),n0)}}function createNotifyManager(){let e0=[],_e=0,i0=o0=>{o0()},r0=o0=>{o0()},t0=o0=>setTimeout(o0,0);const n0=o0=>{_e?e0.push(o0):t0(()=>{i0(o0)})},s0=()=>{const o0=e0;e0=[],o0.length&&t0(()=>{r0(()=>{o0.forEach(a0=>{i0(a0)})})})};return{batch:o0=>{let a0;_e++;try{a0=o0()}finally{_e--,_e||s0()}return a0},batchCalls:o0=>(...a0)=>{n0(()=>{o0(...a0)})},schedule:n0,setNotifyFunction:o0=>{i0=o0},setBatchNotifyFunction:o0=>{r0=o0},setScheduler:o0=>{t0=o0}}}var notifyManager=createNotifyManager(),Rr,jt,Removable=(jt=class{constructor(){l2(this,Rr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),isValidTimeout(this.gcTime)&&t2(this,Rr,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e0){this.gcTime=Math.max(this.gcTime||0,e0??(isServer?1/0:5*60*1e3))}clearGcTimeout(){V0(this,Rr)&&(clearTimeout(V0(this,Rr)),t2(this,Rr,void 0))}},Rr=new WeakMap,jt),Nr,Zr,Q2,S2,rt,Sr,L2,sr,Pt,Query=(Pt=class extends Removable{constructor(_e){super();l2(this,L2);l2(this,Nr);l2(this,Zr);l2(this,Q2);l2(this,S2);l2(this,rt);l2(this,Sr);t2(this,Sr,!1),t2(this,rt,_e.defaultOptions),this.setOptions(_e.options),this.observers=[],t2(this,Q2,_e.cache),this.queryKey=_e.queryKey,this.queryHash=_e.queryHash,t2(this,Nr,getDefaultState$1(this.options)),this.state=_e.state??V0(this,Nr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var _e;return(_e=V0(this,S2))==null?void 0:_e.promise}setOptions(_e){this.options={...V0(this,rt),..._e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&V0(this,Q2).remove(this)}setData(_e,i0){const r0=replaceData(this.state.data,_e,this.options);return k2(this,L2,sr).call(this,{data:r0,type:"success",dataUpdatedAt:i0==null?void 0:i0.updatedAt,manual:i0==null?void 0:i0.manual}),r0}setState(_e,i0){k2(this,L2,sr).call(this,{type:"setState",state:_e,setStateOptions:i0})}cancel(_e){var r0,t0;const i0=(r0=V0(this,S2))==null?void 0:r0.promise;return(t0=V0(this,S2))==null||t0.cancel(_e),i0?i0.then(noop$6).catch(noop$6):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(V0(this,Nr))}isActive(){return this.observers.some(_e=>resolveEnabled(_e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(_e=>_e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(_e=0){return this.state.isInvalidated||this.state.data===void 0||!timeUntilStale(this.state.dataUpdatedAt,_e)}onFocus(){var i0;const _e=this.observers.find(r0=>r0.shouldFetchOnWindowFocus());_e==null||_e.refetch({cancelRefetch:!1}),(i0=V0(this,S2))==null||i0.continue()}onOnline(){var i0;const _e=this.observers.find(r0=>r0.shouldFetchOnReconnect());_e==null||_e.refetch({cancelRefetch:!1}),(i0=V0(this,S2))==null||i0.continue()}addObserver(_e){this.observers.includes(_e)||(this.observers.push(_e),this.clearGcTimeout(),V0(this,Q2).notify({type:"observerAdded",query:this,observer:_e}))}removeObserver(_e){this.observers.includes(_e)&&(this.observers=this.observers.filter(i0=>i0!==_e),this.observers.length||(V0(this,S2)&&(V0(this,Sr)?V0(this,S2).cancel({revert:!0}):V0(this,S2).cancelRetry()),this.scheduleGc()),V0(this,Q2).notify({type:"observerRemoved",query:this,observer:_e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||k2(this,L2,sr).call(this,{type:"invalidate"})}fetch(_e,i0){var a0,f0,l0;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(i0!=null&&i0.cancelRefetch))this.cancel({silent:!0});else if(V0(this,S2))return V0(this,S2).continueRetry(),V0(this,S2).promise}if(_e&&this.setOptions(_e),!this.options.queryFn){const u0=this.observers.find(A0=>A0.options.queryFn);u0&&this.setOptions(u0.options)}const r0=new AbortController,t0=u0=>{Object.defineProperty(u0,"signal",{enumerable:!0,get:()=>(t2(this,Sr,!0),r0.signal)})},n0=()=>{const u0=ensureQueryFn(this.options,i0),A0={queryKey:this.queryKey,meta:this.meta};return t0(A0),t2(this,Sr,!1),this.options.persister?this.options.persister(u0,A0,this):u0(A0)},s0={fetchOptions:i0,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:n0};t0(s0),(a0=this.options.behavior)==null||a0.onFetch(s0,this),t2(this,Zr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f0=s0.fetchOptions)==null?void 0:f0.meta))&&k2(this,L2,sr).call(this,{type:"fetch",meta:(l0=s0.fetchOptions)==null?void 0:l0.meta});const o0=u0=>{var A0,c0,k0,d0;isCancelledError(u0)&&u0.silent||k2(this,L2,sr).call(this,{type:"error",error:u0}),isCancelledError(u0)||((c0=(A0=V0(this,Q2).config).onError)==null||c0.call(A0,u0,this),(d0=(k0=V0(this,Q2).config).onSettled)==null||d0.call(k0,this.state.data,u0,this)),this.scheduleGc()};return t2(this,S2,createRetryer({initialPromise:i0==null?void 0:i0.initialPromise,fn:s0.fetchFn,abort:r0.abort.bind(r0),onSuccess:u0=>{var A0,c0,k0,d0;if(u0===void 0){o0(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u0)}catch(h0){o0(h0);return}(c0=(A0=V0(this,Q2).config).onSuccess)==null||c0.call(A0,u0,this),(d0=(k0=V0(this,Q2).config).onSettled)==null||d0.call(k0,u0,this.state.error,this),this.scheduleGc()},onError:o0,onFail:(u0,A0)=>{k2(this,L2,sr).call(this,{type:"failed",failureCount:u0,error:A0})},onPause:()=>{k2(this,L2,sr).call(this,{type:"pause"})},onContinue:()=>{k2(this,L2,sr).call(this,{type:"continue"})},retry:s0.options.retry,retryDelay:s0.options.retryDelay,networkMode:s0.options.networkMode,canRun:()=>!0})),V0(this,S2).start()}},Nr=new WeakMap,Zr=new WeakMap,Q2=new WeakMap,S2=new WeakMap,rt=new WeakMap,Sr=new WeakMap,L2=new WeakSet,sr=function(_e){const i0=r0=>{switch(_e.type){case"failed":return{...r0,fetchFailureCount:_e.failureCount,fetchFailureReason:_e.error};case"pause":return{...r0,fetchStatus:"paused"};case"continue":return{...r0,fetchStatus:"fetching"};case"fetch":return{...r0,...fetchState(r0.data,this.options),fetchMeta:_e.meta??null};case"success":return{...r0,data:_e.data,dataUpdateCount:r0.dataUpdateCount+1,dataUpdatedAt:_e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!_e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const t0=_e.error;return isCancelledError(t0)&&t0.revert&&V0(this,Zr)?{...V0(this,Zr),fetchStatus:"idle"}:{...r0,error:t0,errorUpdateCount:r0.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r0.fetchFailureCount+1,fetchFailureReason:t0,fetchStatus:"idle",status:"error"};case"invalidate":return{...r0,isInvalidated:!0};case"setState":return{...r0,..._e.state}}};this.state=i0(this.state),notifyManager.batch(()=>{this.observers.forEach(r0=>{r0.onQueryUpdate()}),V0(this,Q2).notify({query:this,type:"updated",action:_e})})},Pt);function fetchState(e0,_e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:canFetch(_e.networkMode)?"fetching":"paused",...e0===void 0&&{error:null,status:"pending"}}}function getDefaultState$1(e0){const _e=typeof e0.initialData=="function"?e0.initialData():e0.initialData,i0=_e!==void 0,r0=i0?typeof e0.initialDataUpdatedAt=="function"?e0.initialDataUpdatedAt():e0.initialDataUpdatedAt:0;return{data:_e,dataUpdateCount:0,dataUpdatedAt:i0?r0??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i0?"success":"pending",fetchStatus:"idle"}}var K2,Vt,QueryCache=(Vt=class extends Subscribable{constructor(_e={}){super();l2(this,K2);this.config=_e,t2(this,K2,new Map)}build(_e,i0,r0){const t0=i0.queryKey,n0=i0.queryHash??hashQueryKeyByOptions(t0,i0);let s0=this.get(n0);return s0||(s0=new Query({cache:this,queryKey:t0,queryHash:n0,options:_e.defaultQueryOptions(i0),state:r0,defaultOptions:_e.getQueryDefaults(t0)}),this.add(s0)),s0}add(_e){V0(this,K2).has(_e.queryHash)||(V0(this,K2).set(_e.queryHash,_e),this.notify({type:"added",query:_e}))}remove(_e){const i0=V0(this,K2).get(_e.queryHash);i0&&(_e.destroy(),i0===_e&&V0(this,K2).delete(_e.queryHash),this.notify({type:"removed",query:_e}))}clear(){notifyManager.batch(()=>{this.getAll().forEach(_e=>{this.remove(_e)})})}get(_e){return V0(this,K2).get(_e)}getAll(){return[...V0(this,K2).values()]}find(_e){const i0={exact:!0,..._e};return this.getAll().find(r0=>matchQuery(i0,r0))}findAll(_e={}){const i0=this.getAll();return Object.keys(_e).length>0?i0.filter(r0=>matchQuery(_e,r0)):i0}notify(_e){notifyManager.batch(()=>{this.listeners.forEach(i0=>{i0(_e)})})}onFocus(){notifyManager.batch(()=>{this.getAll().forEach(_e=>{_e.onFocus()})})}onOnline(){notifyManager.batch(()=>{this.getAll().forEach(_e=>{_e.onOnline()})})}},K2=new WeakMap,Vt),er,j2,Tr,ir,cr,Wt,Mutation=(Wt=class extends Removable{constructor(_e){super();l2(this,ir);l2(this,er);l2(this,j2);l2(this,Tr);this.mutationId=_e.mutationId,t2(this,j2,_e.mutationCache),t2(this,er,[]),this.state=_e.state||getDefaultState(),this.setOptions(_e.options),this.scheduleGc()}setOptions(_e){this.options=_e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(_e){V0(this,er).includes(_e)||(V0(this,er).push(_e),this.clearGcTimeout(),V0(this,j2).notify({type:"observerAdded",mutation:this,observer:_e}))}removeObserver(_e){t2(this,er,V0(this,er).filter(i0=>i0!==_e)),this.scheduleGc(),V0(this,j2).notify({type:"observerRemoved",mutation:this,observer:_e})}optionalRemove(){V0(this,er).length||(this.state.status==="pending"?this.scheduleGc():V0(this,j2).remove(this))}continue(){var _e;return((_e=V0(this,Tr))==null?void 0:_e.continue())??this.execute(this.state.variables)}async execute(_e){var t0,n0,s0,o0,a0,f0,l0,u0,A0,c0,k0,d0,h0,b0,p0,m0,g0,v0,w0,x0;t2(this,Tr,createRetryer({fn:()=>this.options.mutationFn?this.options.mutationFn(_e):Promise.reject(new Error("No mutationFn found")),onFail:(_0,y0)=>{k2(this,ir,cr).call(this,{type:"failed",failureCount:_0,error:y0})},onPause:()=>{k2(this,ir,cr).call(this,{type:"pause"})},onContinue:()=>{k2(this,ir,cr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>V0(this,j2).canRun(this)}));const i0=this.state.status==="pending",r0=!V0(this,Tr).canStart();try{if(!i0){k2(this,ir,cr).call(this,{type:"pending",variables:_e,isPaused:r0}),await((n0=(t0=V0(this,j2).config).onMutate)==null?void 0:n0.call(t0,_e,this));const y0=await((o0=(s0=this.options).onMutate)==null?void 0:o0.call(s0,_e));y0!==this.state.context&&k2(this,ir,cr).call(this,{type:"pending",context:y0,variables:_e,isPaused:r0})}const _0=await V0(this,Tr).start();return await((f0=(a0=V0(this,j2).config).onSuccess)==null?void 0:f0.call(a0,_0,_e,this.state.context,this)),await((u0=(l0=this.options).onSuccess)==null?void 0:u0.call(l0,_0,_e,this.state.context)),await((c0=(A0=V0(this,j2).config).onSettled)==null?void 0:c0.call(A0,_0,null,this.state.variables,this.state.context,this)),await((d0=(k0=this.options).onSettled)==null?void 0:d0.call(k0,_0,null,_e,this.state.context)),k2(this,ir,cr).call(this,{type:"success",data:_0}),_0}catch(_0){try{throw await((b0=(h0=V0(this,j2).config).onError)==null?void 0:b0.call(h0,_0,_e,this.state.context,this)),await((m0=(p0=this.options).onError)==null?void 0:m0.call(p0,_0,_e,this.state.context)),await((v0=(g0=V0(this,j2).config).onSettled)==null?void 0:v0.call(g0,void 0,_0,this.state.variables,this.state.context,this)),await((x0=(w0=this.options).onSettled)==null?void 0:x0.call(w0,void 0,_0,_e,this.state.context)),_0}finally{k2(this,ir,cr).call(this,{type:"error",error:_0})}}finally{V0(this,j2).runNext(this)}}},er=new WeakMap,j2=new WeakMap,Tr=new WeakMap,ir=new WeakSet,cr=function(_e){const i0=r0=>{switch(_e.type){case"failed":return{...r0,failureCount:_e.failureCount,failureReason:_e.error};case"pause":return{...r0,isPaused:!0};case"continue":return{...r0,isPaused:!1};case"pending":return{...r0,context:_e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:_e.isPaused,status:"pending",variables:_e.variables,submittedAt:Date.now()};case"success":return{...r0,data:_e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r0,data:void 0,error:_e.error,failureCount:r0.failureCount+1,failureReason:_e.error,isPaused:!1,status:"error"}}};this.state=i0(this.state),notifyManager.batch(()=>{V0(this,er).forEach(r0=>{r0.onMutationUpdate(_e)}),V0(this,j2).notify({mutation:this,type:"updated",action:_e})})},Wt);function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var N2,tt,Dt,MutationCache=(Dt=class extends Subscribable{constructor(_e={}){super();l2(this,N2);l2(this,tt);this.config=_e,t2(this,N2,new Map),t2(this,tt,Date.now())}build(_e,i0,r0){const t0=new Mutation({mutationCache:this,mutationId:++at(this,tt)._,options:_e.defaultMutationOptions(i0),state:r0});return this.add(t0),t0}add(_e){const i0=scopeFor(_e),r0=V0(this,N2).get(i0)??[];r0.push(_e),V0(this,N2).set(i0,r0),this.notify({type:"added",mutation:_e})}remove(_e){var r0;const i0=scopeFor(_e);if(V0(this,N2).has(i0)){const t0=(r0=V0(this,N2).get(i0))==null?void 0:r0.filter(n0=>n0!==_e);t0&&(t0.length===0?V0(this,N2).delete(i0):V0(this,N2).set(i0,t0))}this.notify({type:"removed",mutation:_e})}canRun(_e){var r0;const i0=(r0=V0(this,N2).get(scopeFor(_e)))==null?void 0:r0.find(t0=>t0.state.status==="pending");return!i0||i0===_e}runNext(_e){var r0;const i0=(r0=V0(this,N2).get(scopeFor(_e)))==null?void 0:r0.find(t0=>t0!==_e&&t0.state.isPaused);return(i0==null?void 0:i0.continue())??Promise.resolve()}clear(){notifyManager.batch(()=>{this.getAll().forEach(_e=>{this.remove(_e)})})}getAll(){return[...V0(this,N2).values()].flat()}find(_e){const i0={exact:!0,..._e};return this.getAll().find(r0=>matchMutation(i0,r0))}findAll(_e={}){return this.getAll().filter(i0=>matchMutation(_e,i0))}notify(_e){notifyManager.batch(()=>{this.listeners.forEach(i0=>{i0(_e)})})}resumePausedMutations(){const _e=this.getAll().filter(i0=>i0.state.isPaused);return notifyManager.batch(()=>Promise.all(_e.map(i0=>i0.continue().catch(noop$6))))}},N2=new WeakMap,tt=new WeakMap,Dt);function scopeFor(e0){var _e;return((_e=e0.options.scope)==null?void 0:_e.id)??String(e0.mutationId)}function infiniteQueryBehavior(e0){return{onFetch:(_e,i0)=>{var l0,u0,A0,c0,k0;const r0=_e.options,t0=(A0=(u0=(l0=_e.fetchOptions)==null?void 0:l0.meta)==null?void 0:u0.fetchMore)==null?void 0:A0.direction,n0=((c0=_e.state.data)==null?void 0:c0.pages)||[],s0=((k0=_e.state.data)==null?void 0:k0.pageParams)||[];let o0={pages:[],pageParams:[]},a0=0;const f0=async()=>{let d0=!1;const h0=m0=>{Object.defineProperty(m0,"signal",{enumerable:!0,get:()=>(_e.signal.aborted?d0=!0:_e.signal.addEventListener("abort",()=>{d0=!0}),_e.signal)})},b0=ensureQueryFn(_e.options,_e.fetchOptions),p0=async(m0,g0,v0)=>{if(d0)return Promise.reject();if(g0==null&&m0.pages.length)return Promise.resolve(m0);const w0={queryKey:_e.queryKey,pageParam:g0,direction:v0?"backward":"forward",meta:_e.options.meta};h0(w0);const x0=await b0(w0),{maxPages:_0}=_e.options,y0=v0?addToStart:addToEnd;return{pages:y0(m0.pages,x0,_0),pageParams:y0(m0.pageParams,g0,_0)}};if(t0&&n0.length){const m0=t0==="backward",g0=m0?getPreviousPageParam:getNextPageParam,v0={pages:n0,pageParams:s0},w0=g0(r0,v0);o0=await p0(v0,w0,m0)}else{const m0=e0??n0.length;do{const g0=a0===0?s0[0]??r0.initialPageParam:getNextPageParam(r0,o0);if(a0>0&&g0==null)break;o0=await p0(o0,g0),a0++}while(a0<m0)}return o0};_e.options.persister?_e.fetchFn=()=>{var d0,h0;return(h0=(d0=_e.options).persister)==null?void 0:h0.call(d0,f0,{queryKey:_e.queryKey,meta:_e.options.meta,signal:_e.signal},i0)}:_e.fetchFn=f0}}}function getNextPageParam(e0,{pages:_e,pageParams:i0}){const r0=_e.length-1;return _e.length>0?e0.getNextPageParam(_e[r0],_e,i0[r0],i0):void 0}function getPreviousPageParam(e0,{pages:_e,pageParams:i0}){var r0;return _e.length>0?(r0=e0.getPreviousPageParam)==null?void 0:r0.call(e0,_e[0],_e,i0[0],i0):void 0}function hasNextPage(e0,_e){return _e?getNextPageParam(e0,_e)!=null:!1}function hasPreviousPage(e0,_e){return!_e||!e0.getPreviousPageParam?!1:getPreviousPageParam(e0,_e)!=null}var v2,hr,pr,Or,Xr,br,Qr,$r,Nt,QueryClient=(Nt=class{constructor(e0={}){l2(this,v2);l2(this,hr);l2(this,pr);l2(this,Or);l2(this,Xr);l2(this,br);l2(this,Qr);l2(this,$r);t2(this,v2,e0.queryCache||new QueryCache),t2(this,hr,e0.mutationCache||new MutationCache),t2(this,pr,e0.defaultOptions||{}),t2(this,Or,new Map),t2(this,Xr,new Map),t2(this,br,0)}mount(){at(this,br)._++,V0(this,br)===1&&(t2(this,Qr,focusManager.subscribe(async e0=>{e0&&(await this.resumePausedMutations(),V0(this,v2).onFocus())})),t2(this,$r,onlineManager.subscribe(async e0=>{e0&&(await this.resumePausedMutations(),V0(this,v2).onOnline())})))}unmount(){var e0,_e;at(this,br)._--,V0(this,br)===0&&((e0=V0(this,Qr))==null||e0.call(this),t2(this,Qr,void 0),(_e=V0(this,$r))==null||_e.call(this),t2(this,$r,void 0))}isFetching(e0){return V0(this,v2).findAll({...e0,fetchStatus:"fetching"}).length}isMutating(e0){return V0(this,hr).findAll({...e0,status:"pending"}).length}getQueryData(e0){var i0;const _e=this.defaultQueryOptions({queryKey:e0});return(i0=V0(this,v2).get(_e.queryHash))==null?void 0:i0.state.data}ensureQueryData(e0){const _e=this.defaultQueryOptions(e0),i0=V0(this,v2).build(this,_e),r0=i0.state.data;return r0===void 0?this.fetchQuery(e0):(e0.revalidateIfStale&&i0.isStaleByTime(resolveStaleTime(_e.staleTime,i0))&&this.prefetchQuery(_e),Promise.resolve(r0))}getQueriesData(e0){return V0(this,v2).findAll(e0).map(({queryKey:_e,state:i0})=>{const r0=i0.data;return[_e,r0]})}setQueryData(e0,_e,i0){const r0=this.defaultQueryOptions({queryKey:e0}),t0=V0(this,v2).get(r0.queryHash),n0=t0==null?void 0:t0.state.data,s0=functionalUpdate(_e,n0);if(s0!==void 0)return V0(this,v2).build(this,r0).setData(s0,{...i0,manual:!0})}setQueriesData(e0,_e,i0){return notifyManager.batch(()=>V0(this,v2).findAll(e0).map(({queryKey:r0})=>[r0,this.setQueryData(r0,_e,i0)]))}getQueryState(e0){var i0;const _e=this.defaultQueryOptions({queryKey:e0});return(i0=V0(this,v2).get(_e.queryHash))==null?void 0:i0.state}removeQueries(e0){const _e=V0(this,v2);notifyManager.batch(()=>{_e.findAll(e0).forEach(i0=>{_e.remove(i0)})})}resetQueries(e0,_e){const i0=V0(this,v2),r0={type:"active",...e0};return notifyManager.batch(()=>(i0.findAll(e0).forEach(t0=>{t0.reset()}),this.refetchQueries(r0,_e)))}cancelQueries(e0,_e={}){const i0={revert:!0,..._e},r0=notifyManager.batch(()=>V0(this,v2).findAll(e0).map(t0=>t0.cancel(i0)));return Promise.all(r0).then(noop$6).catch(noop$6)}invalidateQueries(e0,_e={}){return notifyManager.batch(()=>{if(V0(this,v2).findAll(e0).forEach(r0=>{r0.invalidate()}),(e0==null?void 0:e0.refetchType)==="none")return Promise.resolve();const i0={...e0,type:(e0==null?void 0:e0.refetchType)??(e0==null?void 0:e0.type)??"active"};return this.refetchQueries(i0,_e)})}refetchQueries(e0,_e={}){const i0={..._e,cancelRefetch:_e.cancelRefetch??!0},r0=notifyManager.batch(()=>V0(this,v2).findAll(e0).filter(t0=>!t0.isDisabled()).map(t0=>{let n0=t0.fetch(void 0,i0);return i0.throwOnError||(n0=n0.catch(noop$6)),t0.state.fetchStatus==="paused"?Promise.resolve():n0}));return Promise.all(r0).then(noop$6)}fetchQuery(e0){const _e=this.defaultQueryOptions(e0);_e.retry===void 0&&(_e.retry=!1);const i0=V0(this,v2).build(this,_e);return i0.isStaleByTime(resolveStaleTime(_e.staleTime,i0))?i0.fetch(_e):Promise.resolve(i0.state.data)}prefetchQuery(e0){return this.fetchQuery(e0).then(noop$6).catch(noop$6)}fetchInfiniteQuery(e0){return e0.behavior=infiniteQueryBehavior(e0.pages),this.fetchQuery(e0)}prefetchInfiniteQuery(e0){return this.fetchInfiniteQuery(e0).then(noop$6).catch(noop$6)}ensureInfiniteQueryData(e0){return e0.behavior=infiniteQueryBehavior(e0.pages),this.ensureQueryData(e0)}resumePausedMutations(){return onlineManager.isOnline()?V0(this,hr).resumePausedMutations():Promise.resolve()}getQueryCache(){return V0(this,v2)}getMutationCache(){return V0(this,hr)}getDefaultOptions(){return V0(this,pr)}setDefaultOptions(e0){t2(this,pr,e0)}setQueryDefaults(e0,_e){V0(this,Or).set(hashKey(e0),{queryKey:e0,defaultOptions:_e})}getQueryDefaults(e0){const _e=[...V0(this,Or).values()],i0={};return _e.forEach(r0=>{partialMatchKey(e0,r0.queryKey)&&Object.assign(i0,r0.defaultOptions)}),i0}setMutationDefaults(e0,_e){V0(this,Xr).set(hashKey(e0),{mutationKey:e0,defaultOptions:_e})}getMutationDefaults(e0){const _e=[...V0(this,Xr).values()];let i0={};return _e.forEach(r0=>{partialMatchKey(e0,r0.mutationKey)&&(i0={...i0,...r0.defaultOptions})}),i0}defaultQueryOptions(e0){if(e0._defaulted)return e0;const _e={...V0(this,pr).queries,...this.getQueryDefaults(e0.queryKey),...e0,_defaulted:!0};return _e.queryHash||(_e.queryHash=hashQueryKeyByOptions(_e.queryKey,_e)),_e.refetchOnReconnect===void 0&&(_e.refetchOnReconnect=_e.networkMode!=="always"),_e.throwOnError===void 0&&(_e.throwOnError=!!_e.suspense),!_e.networkMode&&_e.persister&&(_e.networkMode="offlineFirst"),_e.queryFn===skipToken&&(_e.enabled=!1),_e}defaultMutationOptions(e0){return e0!=null&&e0._defaulted?e0:{...V0(this,pr).mutations,...(e0==null?void 0:e0.mutationKey)&&this.getMutationDefaults(e0.mutationKey),...e0,_defaulted:!0}}clear(){V0(this,v2).clear(),V0(this,hr).clear()}},v2=new WeakMap,hr=new WeakMap,pr=new WeakMap,Or=new WeakMap,Xr=new WeakMap,br=new WeakMap,Qr=new WeakMap,$r=new WeakMap,Nt),V2,d2,nt,P2,Ir,Ur,mr,rr,st,Lr,zr,Fr,Gr,gr,Hr,p2,qr,kt,dt,ht,bt,mt,gt,vt,$t,Zt,QueryObserver=(Zt=class extends Subscribable{constructor(_e,i0){super();l2(this,p2);l2(this,V2);l2(this,d2);l2(this,nt);l2(this,P2);l2(this,Ir);l2(this,Ur);l2(this,mr);l2(this,rr);l2(this,st);l2(this,Lr);l2(this,zr);l2(this,Fr);l2(this,Gr);l2(this,gr);l2(this,Hr,new Set);this.options=i0,t2(this,V2,_e),t2(this,rr,null),t2(this,mr,pendingThenable()),this.options.experimental_prefetchInRender||V0(this,mr).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(i0)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(V0(this,d2).addObserver(this),shouldFetchOnMount(V0(this,d2),this.options)?k2(this,p2,qr).call(this):this.updateResult(),k2(this,p2,bt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(V0(this,d2),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(V0(this,d2),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,k2(this,p2,mt).call(this),k2(this,p2,gt).call(this),V0(this,d2).removeObserver(this)}setOptions(_e,i0){const r0=this.options,t0=V0(this,d2);if(this.options=V0(this,V2).defaultQueryOptions(_e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof resolveEnabled(this.options.enabled,V0(this,d2))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");k2(this,p2,vt).call(this),V0(this,d2).setOptions(this.options),r0._defaulted&&!shallowEqualObjects(this.options,r0)&&V0(this,V2).getQueryCache().notify({type:"observerOptionsUpdated",query:V0(this,d2),observer:this});const n0=this.hasListeners();n0&&shouldFetchOptionally(V0(this,d2),t0,this.options,r0)&&k2(this,p2,qr).call(this),this.updateResult(i0),n0&&(V0(this,d2)!==t0||resolveEnabled(this.options.enabled,V0(this,d2))!==resolveEnabled(r0.enabled,V0(this,d2))||resolveStaleTime(this.options.staleTime,V0(this,d2))!==resolveStaleTime(r0.staleTime,V0(this,d2)))&&k2(this,p2,kt).call(this);const s0=k2(this,p2,dt).call(this);n0&&(V0(this,d2)!==t0||resolveEnabled(this.options.enabled,V0(this,d2))!==resolveEnabled(r0.enabled,V0(this,d2))||s0!==V0(this,gr))&&k2(this,p2,ht).call(this,s0)}getOptimisticResult(_e){const i0=V0(this,V2).getQueryCache().build(V0(this,V2),_e),r0=this.createResult(i0,_e);return shouldAssignObserverCurrentProperties(this,r0)&&(t2(this,P2,r0),t2(this,Ur,this.options),t2(this,Ir,V0(this,d2).state)),r0}getCurrentResult(){return V0(this,P2)}trackResult(_e,i0){const r0={};return Object.keys(_e).forEach(t0=>{Object.defineProperty(r0,t0,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(t0),i0==null||i0(t0),_e[t0])})}),r0}trackProp(_e){V0(this,Hr).add(_e)}getCurrentQuery(){return V0(this,d2)}refetch({..._e}={}){return this.fetch({..._e})}fetchOptimistic(_e){const i0=V0(this,V2).defaultQueryOptions(_e),r0=V0(this,V2).getQueryCache().build(V0(this,V2),i0);return r0.fetch().then(()=>this.createResult(r0,i0))}fetch(_e){return k2(this,p2,qr).call(this,{..._e,cancelRefetch:_e.cancelRefetch??!0}).then(()=>(this.updateResult(),V0(this,P2)))}createResult(_e,i0){var _0;const r0=V0(this,d2),t0=this.options,n0=V0(this,P2),s0=V0(this,Ir),o0=V0(this,Ur),f0=_e!==r0?_e.state:V0(this,nt),{state:l0}=_e;let u0={...l0},A0=!1,c0;if(i0._optimisticResults){const y0=this.hasListeners(),S0=!y0&&shouldFetchOnMount(_e,i0),B0=y0&&shouldFetchOptionally(_e,r0,i0,t0);(S0||B0)&&(u0={...u0,...fetchState(l0.data,_e.options)}),i0._optimisticResults==="isRestoring"&&(u0.fetchStatus="idle")}let{error:k0,errorUpdatedAt:d0,status:h0}=u0;if(i0.select&&u0.data!==void 0)if(n0&&u0.data===(s0==null?void 0:s0.data)&&i0.select===V0(this,st))c0=V0(this,Lr);else try{t2(this,st,i0.select),c0=i0.select(u0.data),c0=replaceData(n0==null?void 0:n0.data,c0,i0),t2(this,Lr,c0),t2(this,rr,null)}catch(y0){t2(this,rr,y0)}else c0=u0.data;if(i0.placeholderData!==void 0&&c0===void 0&&h0==="pending"){let y0;if(n0!=null&&n0.isPlaceholderData&&i0.placeholderData===(o0==null?void 0:o0.placeholderData))y0=n0.data;else if(y0=typeof i0.placeholderData=="function"?i0.placeholderData((_0=V0(this,zr))==null?void 0:_0.state.data,V0(this,zr)):i0.placeholderData,i0.select&&y0!==void 0)try{y0=i0.select(y0),t2(this,rr,null)}catch(S0){t2(this,rr,S0)}y0!==void 0&&(h0="success",c0=replaceData(n0==null?void 0:n0.data,y0,i0),A0=!0)}V0(this,rr)&&(k0=V0(this,rr),c0=V0(this,Lr),d0=Date.now(),h0="error");const b0=u0.fetchStatus==="fetching",p0=h0==="pending",m0=h0==="error",g0=p0&&b0,v0=c0!==void 0,x0={status:h0,fetchStatus:u0.fetchStatus,isPending:p0,isSuccess:h0==="success",isError:m0,isInitialLoading:g0,isLoading:g0,data:c0,dataUpdatedAt:u0.dataUpdatedAt,error:k0,errorUpdatedAt:d0,failureCount:u0.fetchFailureCount,failureReason:u0.fetchFailureReason,errorUpdateCount:u0.errorUpdateCount,isFetched:u0.dataUpdateCount>0||u0.errorUpdateCount>0,isFetchedAfterMount:u0.dataUpdateCount>f0.dataUpdateCount||u0.errorUpdateCount>f0.errorUpdateCount,isFetching:b0,isRefetching:b0&&!p0,isLoadingError:m0&&!v0,isPaused:u0.fetchStatus==="paused",isPlaceholderData:A0,isRefetchError:m0&&v0,isStale:isStale(_e,i0),refetch:this.refetch,promise:V0(this,mr)};if(this.options.experimental_prefetchInRender){const y0=I0=>{x0.status==="error"?I0.reject(x0.error):x0.data!==void 0&&I0.resolve(x0.data)},S0=()=>{const I0=t2(this,mr,x0.promise=pendingThenable());y0(I0)},B0=V0(this,mr);switch(B0.status){case"pending":_e.queryHash===r0.queryHash&&y0(B0);break;case"fulfilled":(x0.status==="error"||x0.data!==B0.value)&&S0();break;case"rejected":(x0.status!=="error"||x0.error!==B0.reason)&&S0();break}}return x0}updateResult(_e){const i0=V0(this,P2),r0=this.createResult(V0(this,d2),this.options);if(t2(this,Ir,V0(this,d2).state),t2(this,Ur,this.options),V0(this,Ir).data!==void 0&&t2(this,zr,V0(this,d2)),shallowEqualObjects(r0,i0))return;t2(this,P2,r0);const t0={},n0=()=>{if(!i0)return!0;const{notifyOnChangeProps:s0}=this.options,o0=typeof s0=="function"?s0():s0;if(o0==="all"||!o0&&!V0(this,Hr).size)return!0;const a0=new Set(o0??V0(this,Hr));return this.options.throwOnError&&a0.add("error"),Object.keys(V0(this,P2)).some(f0=>{const l0=f0;return V0(this,P2)[l0]!==i0[l0]&&a0.has(l0)})};(_e==null?void 0:_e.listeners)!==!1&&n0()&&(t0.listeners=!0),k2(this,p2,$t).call(this,{...t0,..._e})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&k2(this,p2,bt).call(this)}},V2=new WeakMap,d2=new WeakMap,nt=new WeakMap,P2=new WeakMap,Ir=new WeakMap,Ur=new WeakMap,mr=new WeakMap,rr=new WeakMap,st=new WeakMap,Lr=new WeakMap,zr=new WeakMap,Fr=new WeakMap,Gr=new WeakMap,gr=new WeakMap,Hr=new WeakMap,p2=new WeakSet,qr=function(_e){k2(this,p2,vt).call(this);let i0=V0(this,d2).fetch(this.options,_e);return _e!=null&&_e.throwOnError||(i0=i0.catch(noop$6)),i0},kt=function(){k2(this,p2,mt).call(this);const _e=resolveStaleTime(this.options.staleTime,V0(this,d2));if(isServer||V0(this,P2).isStale||!isValidTimeout(_e))return;const r0=timeUntilStale(V0(this,P2).dataUpdatedAt,_e)+1;t2(this,Fr,setTimeout(()=>{V0(this,P2).isStale||this.updateResult()},r0))},dt=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(V0(this,d2)):this.options.refetchInterval)??!1},ht=function(_e){k2(this,p2,gt).call(this),t2(this,gr,_e),!(isServer||resolveEnabled(this.options.enabled,V0(this,d2))===!1||!isValidTimeout(V0(this,gr))||V0(this,gr)===0)&&t2(this,Gr,setInterval(()=>{(this.options.refetchIntervalInBackground||focusManager.isFocused())&&k2(this,p2,qr).call(this)},V0(this,gr)))},bt=function(){k2(this,p2,kt).call(this),k2(this,p2,ht).call(this,k2(this,p2,dt).call(this))},mt=function(){V0(this,Fr)&&(clearTimeout(V0(this,Fr)),t2(this,Fr,void 0))},gt=function(){V0(this,Gr)&&(clearInterval(V0(this,Gr)),t2(this,Gr,void 0))},vt=function(){const _e=V0(this,V2).getQueryCache().build(V0(this,V2),this.options);if(_e===V0(this,d2))return;const i0=V0(this,d2);t2(this,d2,_e),t2(this,nt,_e.state),this.hasListeners()&&(i0==null||i0.removeObserver(this),_e.addObserver(this))},$t=function(_e){notifyManager.batch(()=>{_e.listeners&&this.listeners.forEach(i0=>{i0(V0(this,P2))}),V0(this,V2).getQueryCache().notify({query:V0(this,d2),type:"observerResultsUpdated"})})},Zt);function shouldLoadOnMount(e0,_e){return resolveEnabled(_e.enabled,e0)!==!1&&e0.state.data===void 0&&!(e0.state.status==="error"&&_e.retryOnMount===!1)}function shouldFetchOnMount(e0,_e){return shouldLoadOnMount(e0,_e)||e0.state.data!==void 0&&shouldFetchOn(e0,_e,_e.refetchOnMount)}function shouldFetchOn(e0,_e,i0){if(resolveEnabled(_e.enabled,e0)!==!1){const r0=typeof i0=="function"?i0(e0):i0;return r0==="always"||r0!==!1&&isStale(e0,_e)}return!1}function shouldFetchOptionally(e0,_e,i0,r0){return(e0!==_e||resolveEnabled(r0.enabled,e0)===!1)&&(!i0.suspense||e0.state.status!=="error")&&isStale(e0,i0)}function isStale(e0,_e){return resolveEnabled(_e.enabled,e0)!==!1&&e0.isStaleByTime(resolveStaleTime(_e.staleTime,e0))}function shouldAssignObserverCurrentProperties(e0,_e){return!shallowEqualObjects(e0.getCurrentResult(),_e)}var InfiniteQueryObserver=class extends QueryObserver{constructor(e0,_e){super(e0,_e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e0,_e){super.setOptions({...e0,behavior:infiniteQueryBehavior()},_e)}getOptimisticResult(e0){return e0.behavior=infiniteQueryBehavior(),super.getOptimisticResult(e0)}fetchNextPage(e0){return this.fetch({...e0,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e0){return this.fetch({...e0,meta:{fetchMore:{direction:"backward"}}})}createResult(e0,_e){var k0,d0;const{state:i0}=e0,r0=super.createResult(e0,_e),{isFetching:t0,isRefetching:n0,isError:s0,isRefetchError:o0}=r0,a0=(d0=(k0=i0.fetchMeta)==null?void 0:k0.fetchMore)==null?void 0:d0.direction,f0=s0&&a0==="forward",l0=t0&&a0==="forward",u0=s0&&a0==="backward",A0=t0&&a0==="backward";return{...r0,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:hasNextPage(_e,i0.data),hasPreviousPage:hasPreviousPage(_e,i0.data),isFetchNextPageError:f0,isFetchingNextPage:l0,isFetchPreviousPageError:u0,isFetchingPreviousPage:A0,isRefetchError:o0&&!f0&&!u0,isRefetching:n0&&!l0&&!A0}}},vr,wr,W2,ar,ur,ft,wt,Ot,MutationObserver$1=(Ot=class extends Subscribable{constructor(i0,r0){super();l2(this,ur);l2(this,vr);l2(this,wr);l2(this,W2);l2(this,ar);t2(this,vr,i0),this.setOptions(r0),this.bindMethods(),k2(this,ur,ft).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i0){var t0;const r0=this.options;this.options=V0(this,vr).defaultMutationOptions(i0),shallowEqualObjects(this.options,r0)||V0(this,vr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:V0(this,W2),observer:this}),r0!=null&&r0.mutationKey&&this.options.mutationKey&&hashKey(r0.mutationKey)!==hashKey(this.options.mutationKey)?this.reset():((t0=V0(this,W2))==null?void 0:t0.state.status)==="pending"&&V0(this,W2).setOptions(this.options)}onUnsubscribe(){var i0;this.hasListeners()||(i0=V0(this,W2))==null||i0.removeObserver(this)}onMutationUpdate(i0){k2(this,ur,ft).call(this),k2(this,ur,wt).call(this,i0)}getCurrentResult(){return V0(this,wr)}reset(){var i0;(i0=V0(this,W2))==null||i0.removeObserver(this),t2(this,W2,void 0),k2(this,ur,ft).call(this),k2(this,ur,wt).call(this)}mutate(i0,r0){var t0;return t2(this,ar,r0),(t0=V0(this,W2))==null||t0.removeObserver(this),t2(this,W2,V0(this,vr).getMutationCache().build(V0(this,vr),this.options)),V0(this,W2).addObserver(this),V0(this,W2).execute(i0)}},vr=new WeakMap,wr=new WeakMap,W2=new WeakMap,ar=new WeakMap,ur=new WeakSet,ft=function(){var r0;const i0=((r0=V0(this,W2))==null?void 0:r0.state)??getDefaultState();t2(this,wr,{...i0,isPending:i0.status==="pending",isSuccess:i0.status==="success",isError:i0.status==="error",isIdle:i0.status==="idle",mutate:this.mutate,reset:this.reset})},wt=function(i0){notifyManager.batch(()=>{var r0,t0,n0,s0,o0,a0,f0,l0;if(V0(this,ar)&&this.hasListeners()){const u0=V0(this,wr).variables,A0=V0(this,wr).context;(i0==null?void 0:i0.type)==="success"?((t0=(r0=V0(this,ar)).onSuccess)==null||t0.call(r0,i0.data,u0,A0),(s0=(n0=V0(this,ar)).onSettled)==null||s0.call(n0,i0.data,null,u0,A0)):(i0==null?void 0:i0.type)==="error"&&((a0=(o0=V0(this,ar)).onError)==null||a0.call(o0,i0.error,u0,A0),(l0=(f0=V0(this,ar)).onSettled)==null||l0.call(f0,void 0,i0.error,u0,A0))}this.listeners.forEach(u0=>{u0(V0(this,wr))})})},Ot),QueryClientContext=reactExports.createContext(void 0),useQueryClient=e0=>{const _e=reactExports.useContext(QueryClientContext);if(!_e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return _e},QueryClientProvider=({client:e0,children:_e})=>(reactExports.useEffect(()=>(e0.mount(),()=>{e0.unmount()}),[e0]),jsxRuntimeExports.jsx(QueryClientContext.Provider,{value:e0,children:_e})),IsRestoringContext=reactExports.createContext(!1),useIsRestoring=()=>reactExports.useContext(IsRestoringContext);IsRestoringContext.Provider;function createValue(){let e0=!1;return{clearReset:()=>{e0=!1},reset:()=>{e0=!0},isReset:()=>e0}}var QueryErrorResetBoundaryContext=reactExports.createContext(createValue()),useQueryErrorResetBoundary=()=>reactExports.useContext(QueryErrorResetBoundaryContext);function shouldThrowError(e0,_e){return typeof e0=="function"?e0(..._e):!!e0}function noop$5(){}var ensurePreventErrorBoundaryRetry=(e0,_e)=>{(e0.suspense||e0.throwOnError||e0.experimental_prefetchInRender)&&(_e.isReset()||(e0.retryOnMount=!1))},useClearResetErrorBoundary=e0=>{reactExports.useEffect(()=>{e0.clearReset()},[e0])},getHasError=({result:e0,errorResetBoundary:_e,throwOnError:i0,query:r0})=>e0.isError&&!_e.isReset()&&!e0.isFetching&&r0&&shouldThrowError(i0,[e0.error,r0]),ensureSuspenseTimers=e0=>{e0.suspense&&(e0.staleTime===void 0&&(e0.staleTime=1e3),typeof e0.gcTime=="number"&&(e0.gcTime=Math.max(e0.gcTime,1e3)))},willFetch=(e0,_e)=>e0.isLoading&&e0.isFetching&&!_e,shouldSuspend=(e0,_e)=>(e0==null?void 0:e0.suspense)&&_e.isPending,fetchOptimistic=(e0,_e,i0)=>_e.fetchOptimistic(e0).catch(()=>{i0.clearReset()});function useBaseQuery(e0,_e,i0){var l0,u0,A0,c0,k0;const r0=useQueryClient(),t0=useIsRestoring(),n0=useQueryErrorResetBoundary(),s0=r0.defaultQueryOptions(e0);(u0=(l0=r0.getDefaultOptions().queries)==null?void 0:l0._experimental_beforeQuery)==null||u0.call(l0,s0),s0._optimisticResults=t0?"isRestoring":"optimistic",ensureSuspenseTimers(s0),ensurePreventErrorBoundaryRetry(s0,n0),useClearResetErrorBoundary(n0);const o0=!r0.getQueryCache().get(s0.queryHash),[a0]=reactExports.useState(()=>new _e(r0,s0)),f0=a0.getOptimisticResult(s0);if(reactExports.useSyncExternalStore(reactExports.useCallback(d0=>{const h0=t0?noop$5:a0.subscribe(notifyManager.batchCalls(d0));return a0.updateResult(),h0},[a0,t0]),()=>a0.getCurrentResult(),()=>a0.getCurrentResult()),reactExports.useEffect(()=>{a0.setOptions(s0,{listeners:!1})},[s0,a0]),shouldSuspend(s0,f0))throw fetchOptimistic(s0,a0,n0);if(getHasError({result:f0,errorResetBoundary:n0,throwOnError:s0.throwOnError,query:r0.getQueryCache().get(s0.queryHash)}))throw f0.error;if((c0=(A0=r0.getDefaultOptions().queries)==null?void 0:A0._experimental_afterQuery)==null||c0.call(A0,s0,f0),s0.experimental_prefetchInRender&&!isServer&&willFetch(f0,t0)){const d0=o0?fetchOptimistic(s0,a0,n0):(k0=r0.getQueryCache().get(s0.queryHash))==null?void 0:k0.promise;d0==null||d0.catch(noop$5).finally(()=>{a0.updateResult()})}return s0.notifyOnChangeProps?f0:a0.trackResult(f0)}function useQuery(e0,_e){return useBaseQuery(e0,QueryObserver)}function queryOptions(e0){return e0}function infiniteQueryOptions(e0){return e0}function useMutation(e0,_e){const i0=useQueryClient(),[r0]=reactExports.useState(()=>new MutationObserver$1(i0,e0));reactExports.useEffect(()=>{r0.setOptions(e0)},[r0,e0]);const t0=reactExports.useSyncExternalStore(reactExports.useCallback(s0=>r0.subscribe(notifyManager.batchCalls(s0)),[r0]),()=>r0.getCurrentResult(),()=>r0.getCurrentResult()),n0=reactExports.useCallback((s0,o0)=>{r0.mutate(s0,o0).catch(noop$5)},[r0]);if(t0.error&&shouldThrowError(r0.options.throwOnError,[t0.error]))throw t0.error;return{...t0,mutate:n0,mutateAsync:t0.mutate}}function useInfiniteQuery(e0,_e){return useBaseQuery(e0,InfiniteQueryObserver)}var USER_PREFERENCES_QUERY_KEY=["user","preferences"];function useUserPreferences(){let e0=useQueryClient(),{data:_e,isLoading:i0,isError:r0,refetch:t0}=useQuery({queryKey:USER_PREFERENCES_QUERY_KEY,queryFn:()=>odeServices.conf().getUserPreferences(),staleTime:15e3}),n0=useMutation({mutationFn:s0=>odeServices.conf().saveUserPreferences(s0),onMutate:async s0=>{e0.setQueryData(USER_PREFERENCES_QUERY_KEY,s0)},onError:()=>{e0.invalidateQueries({queryKey:USER_PREFERENCES_QUERY_KEY})},onSuccess:s0=>{e0.setQueryData(USER_PREFERENCES_QUERY_KEY,s0)}});return{preferences:_e,isLoading:i0,isError:r0,refetch:t0,savePreferences:s0=>n0.mutateAsync(s0)}}var useBackground_default=()=>{var t0;let e0=useUiOverride("layout.background"),_e=useUiOverride("background.default"),{preferences:i0}=useUserPreferences(),r0=(e0==null?void 0:e0.variant)==="image";return{betaEnabled:(t0=i0==null?void 0:i0.homePage)==null?void 0:t0.betaEnabled,background:(i0==null?void 0:i0.background)??(_e==null?void 0:_e.variant)??"default",isBackgroundImageOverridden:r0,productOverride:e0==null?void 0:e0.theme}},EdificeClientContext=reactExports.createContext(null);function useEdificeClient(){let e0=reactExports.useContext(EdificeClientContext);if(!e0)throw Error("Cannot be used outside of EdificeClientProvider");return e0}function useBookmark(){var i0;let{sessionQuery:e0}=useEdificeClient(),_e=new Set;return(i0=e0==null?void 0:e0.data)==null?void 0:i0.bookmarkedApps.filter(r0=>{let t0=_e.has(r0.displayName);return _e.add(r0.displayName),!t0})}function useDebounce(e0,_e){const[i0,r0]=reactExports.useState(e0);return reactExports.useEffect(()=>{const t0=setTimeout(()=>{r0(e0)},_e);return()=>{clearTimeout(t0)}},[e0,_e]),i0}function useHover$2(){const[e0,_e]=reactExports.useState(!1),i0=reactExports.useRef(null),r0=reactExports.useCallback(()=>{_e(!0)},[]),t0=reactExports.useCallback(()=>{_e(!1)},[]);return[reactExports.useCallback(s0=>{var o0;((o0=i0.current)==null?void 0:o0.nodeType)===Node.ELEMENT_NODE&&(i0.current.removeEventListener("mouseenter",r0),i0.current.removeEventListener("mouseleave",t0)),(s0==null?void 0:s0.nodeType)===Node.ELEMENT_NODE&&(s0.addEventListener("mouseenter",r0),s0.addEventListener("mouseleave",t0)),i0.current=s0},[r0,t0]),e0]}function useMediaQuery(e0){const _e=reactExports.useCallback(t0=>{const n0=window.matchMedia(e0);return n0.addEventListener("change",t0),()=>{n0.removeEventListener("change",t0)}},[e0]),i0=()=>window.matchMedia(e0).matches,r0=()=>{throw Error("useMediaQuery is a client-only hook")};return reactExports.useSyncExternalStore(_e,i0,r0)}function useToggle$1(e0){const[_e,i0]=reactExports.useState(()=>e0),r0=reactExports.useCallback(t0=>i0(typeof t0=="boolean"?t0:n0=>!n0),[]);return[_e,r0]}function useBreakpoint(){return{xs:useMediaQuery("only screen and (min-width: 0)"),sm:useMediaQuery("only screen and (min-width: 375px)"),md:useMediaQuery("only screen and (min-width: 768px)"),lg:useMediaQuery("only screen and (min-width: 1024px)"),xl:useMediaQuery("only screen and (min-width: 1280px)"),xxl:useMediaQuery("only screen and (min-width: 1400px)")}}var uaParser={exports:{}};(function(e0,_e){(function(i0,r0){var t0="1.0.36",n0="",s0="?",o0="function",a0="undefined",f0="object",l0="string",u0="major",A0="model",c0="name",k0="type",d0="vendor",h0="version",b0="architecture",p0="console",m0="mobile",g0="tablet",v0="smarttv",w0="wearable",x0="embedded",_0=350,y0="Amazon",S0="Apple",B0="ASUS",I0="BlackBerry",F0="Browser",C0="Chrome",E0="Edge",R0="Firefox",M0="Google",T0="Huawei",G0="LG",j0="Microsoft",N0="Motorola",O0="Opera",Y0="Samsung",D0="Sharp",$0="Sony",z0="Xiaomi",K0="Zebra",e2="Facebook",J0="Chromium OS",_i="Mac OS",Q0=function(L0,H0){var q0={};for(var n2 in L0)H0[n2]&&H0[n2].length%2===0?q0[n2]=H0[n2].concat(L0[n2]):q0[n2]=L0[n2];return q0},U0=function(L0){for(var H0={},q0=0;q0<L0.length;q0++)H0[L0[q0].toUpperCase()]=L0[q0];return H0},i2=function(L0,H0){return typeof L0===l0?s2(H0).indexOf(s2(L0))!==-1:!1},s2=function(L0){return L0.toLowerCase()},f2=function(L0){return typeof L0===l0?L0.replace(/[^\d\.]/g,n0).split(".")[0]:r0},c2=function(L0,H0){if(typeof L0===l0)return L0=L0.replace(/^\s\s*/,n0),typeof H0===a0?L0:L0.substring(0,_0)},m2=function(L0,H0){for(var q0=0,n2,A2,h2,u2,o2,C2;q0<H0.length&&!o2;){var $2=H0[q0],U2=H0[q0+1];for(n2=A2=0;n2<$2.length&&!o2&&$2[n2];)if(o2=$2[n2++].exec(L0),o2)for(h2=0;h2<U2.length;h2++)C2=o2[++A2],u2=U2[h2],typeof u2===f0&&u2.length>0?u2.length===2?typeof u2[1]==o0?this[u2[0]]=u2[1].call(this,C2):this[u2[0]]=u2[1]:u2.length===3?typeof u2[1]===o0&&!(u2[1].exec&&u2[1].test)?this[u2[0]]=C2?u2[1].call(this,C2,u2[2]):r0:this[u2[0]]=C2?C2.replace(u2[1],u2[2]):r0:u2.length===4&&(this[u2[0]]=C2?u2[3].call(this,C2.replace(u2[1],u2[2])):r0):this[u2]=C2||r0;q0+=2}},w2=function(L0,H0){for(var q0 in H0)if(typeof H0[q0]===f0&&H0[q0].length>0){for(var n2=0;n2<H0[q0].length;n2++)if(i2(H0[q0][n2],L0))return q0===s0?r0:q0}else if(i2(H0[q0],L0))return q0===s0?r0:q0;return L0},_2={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},b2={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},P0={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h0,[c0,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h0,[c0,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c0,h0],[/opios[\/ ]+([\w\.]+)/i],[h0,[c0,O0+" Mini"]],[/\bopr\/([\w\.]+)/i],[h0,[c0,O0]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c0,h0],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h0,[c0,"UC"+F0]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[h0,[c0,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h0,[c0,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h0,[c0,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h0,[c0,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h0,[c0,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[c0,/(.+)/,"$1 Secure "+F0],h0],[/\bfocus\/([\w\.]+)/i],[h0,[c0,R0+" Focus"]],[/\bopt\/([\w\.]+)/i],[h0,[c0,O0+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h0,[c0,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h0,[c0,"Dolphin"]],[/coast\/([\w\.]+)/i],[h0,[c0,O0+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h0,[c0,"MIUI "+F0]],[/fxios\/([-\w\.]+)/i],[h0,[c0,R0]],[/\bqihu|(qi?ho?o?|360)browser/i],[[c0,"360 "+F0]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[c0,/(.+)/,"$1 "+F0],h0],[/(comodo_dragon)\/([\w\.]+)/i],[[c0,/_/g," "],h0],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[c0,h0],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[c0],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c0,e2],h0],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c0,h0],[/\bgsa\/([\w\.]+) .*safari\//i],[h0,[c0,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h0,[c0,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h0,[c0,C0+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c0,C0+" WebView"],h0],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h0,[c0,"Android "+F0]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c0,h0],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h0,[c0,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h0,c0],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c0,[h0,w2,_2]],[/(webkit|khtml)\/([\w\.]+)/i],[c0,h0],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c0,"Netscape"],h0],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h0,[c0,R0+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[c0,h0],[/(cobalt)\/([\w\.]+)/i],[c0,[h0,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[b0,"amd64"]],[/(ia32(?=;))/i],[[b0,s2]],[/((?:i[346]|x)86)[;\)]/i],[[b0,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[b0,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[b0,"armhf"]],[/windows (ce|mobile); ppc;/i],[[b0,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[b0,/ower/,n0,s2]],[/(sun4\w)[;\)]/i],[[b0,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[b0,s2]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[A0,[d0,Y0],[k0,g0]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[A0,[d0,Y0],[k0,m0]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[A0,[d0,S0],[k0,m0]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[A0,[d0,S0],[k0,g0]],[/(macintosh);/i],[A0,[d0,S0]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[A0,[d0,D0],[k0,m0]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[A0,[d0,T0],[k0,g0]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[A0,[d0,T0],[k0,m0]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[A0,/_/g," "],[d0,z0],[k0,m0]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[A0,/_/g," "],[d0,z0],[k0,g0]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[A0,[d0,"OPPO"],[k0,m0]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[A0,[d0,"Vivo"],[k0,m0]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[A0,[d0,"Realme"],[k0,m0]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[A0,[d0,N0],[k0,m0]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[A0,[d0,N0],[k0,g0]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[A0,[d0,G0],[k0,g0]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[A0,[d0,G0],[k0,m0]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[A0,[d0,"Lenovo"],[k0,g0]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[A0,/_/g," "],[d0,"Nokia"],[k0,m0]],[/(pixel c)\b/i],[A0,[d0,M0],[k0,g0]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[A0,[d0,M0],[k0,m0]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[A0,[d0,$0],[k0,m0]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[A0,"Xperia Tablet"],[d0,$0],[k0,g0]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[A0,[d0,"OnePlus"],[k0,m0]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[A0,[d0,y0],[k0,g0]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[A0,/(.+)/g,"Fire Phone $1"],[d0,y0],[k0,m0]],[/(playbook);[-\w\),; ]+(rim)/i],[A0,d0,[k0,g0]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[A0,[d0,I0],[k0,m0]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[A0,[d0,B0],[k0,g0]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[A0,[d0,B0],[k0,m0]],[/(nexus 9)/i],[A0,[d0,"HTC"],[k0,g0]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[d0,[A0,/_/g," "],[k0,m0]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[A0,[d0,"Acer"],[k0,g0]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[A0,[d0,"Meizu"],[k0,m0]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[d0,A0,[k0,m0]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[d0,A0,[k0,g0]],[/(surface duo)/i],[A0,[d0,j0],[k0,g0]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[A0,[d0,"Fairphone"],[k0,m0]],[/(u304aa)/i],[A0,[d0,"AT&T"],[k0,m0]],[/\bsie-(\w*)/i],[A0,[d0,"Siemens"],[k0,m0]],[/\b(rct\w+) b/i],[A0,[d0,"RCA"],[k0,g0]],[/\b(venue[\d ]{2,7}) b/i],[A0,[d0,"Dell"],[k0,g0]],[/\b(q(?:mv|ta)\w+) b/i],[A0,[d0,"Verizon"],[k0,g0]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[A0,[d0,"Barnes & Noble"],[k0,g0]],[/\b(tm\d{3}\w+) b/i],[A0,[d0,"NuVision"],[k0,g0]],[/\b(k88) b/i],[A0,[d0,"ZTE"],[k0,g0]],[/\b(nx\d{3}j) b/i],[A0,[d0,"ZTE"],[k0,m0]],[/\b(gen\d{3}) b.+49h/i],[A0,[d0,"Swiss"],[k0,m0]],[/\b(zur\d{3}) b/i],[A0,[d0,"Swiss"],[k0,g0]],[/\b((zeki)?tb.*\b) b/i],[A0,[d0,"Zeki"],[k0,g0]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[d0,"Dragon Touch"],A0,[k0,g0]],[/\b(ns-?\w{0,9}) b/i],[A0,[d0,"Insignia"],[k0,g0]],[/\b((nxa|next)-?\w{0,9}) b/i],[A0,[d0,"NextBook"],[k0,g0]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[d0,"Voice"],A0,[k0,m0]],[/\b(lvtel\-)?(v1[12]) b/i],[[d0,"LvTel"],A0,[k0,m0]],[/\b(ph-1) /i],[A0,[d0,"Essential"],[k0,m0]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[A0,[d0,"Envizen"],[k0,g0]],[/\b(trio[-\w\. ]+) b/i],[A0,[d0,"MachSpeed"],[k0,g0]],[/\btu_(1491) b/i],[A0,[d0,"Rotor"],[k0,g0]],[/(shield[\w ]+) b/i],[A0,[d0,"Nvidia"],[k0,g0]],[/(sprint) (\w+)/i],[d0,A0,[k0,m0]],[/(kin\.[onetw]{3})/i],[[A0,/\./g," "],[d0,j0],[k0,m0]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[A0,[d0,K0],[k0,g0]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[A0,[d0,K0],[k0,m0]],[/smart-tv.+(samsung)/i],[d0,[k0,v0]],[/hbbtv.+maple;(\d+)/i],[[A0,/^/,"SmartTV"],[d0,Y0],[k0,v0]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[d0,G0],[k0,v0]],[/(apple) ?tv/i],[d0,[A0,S0+" TV"],[k0,v0]],[/crkey/i],[[A0,C0+"cast"],[d0,M0],[k0,v0]],[/droid.+aft(\w+)( bui|\))/i],[A0,[d0,y0],[k0,v0]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[A0,[d0,D0],[k0,v0]],[/(bravia[\w ]+)( bui|\))/i],[A0,[d0,$0],[k0,v0]],[/(mitv-\w{5}) bui/i],[A0,[d0,z0],[k0,v0]],[/Hbbtv.*(technisat) (.*);/i],[d0,A0,[k0,v0]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[d0,c2],[A0,c2],[k0,v0]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[k0,v0]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[d0,A0,[k0,p0]],[/droid.+; (shield) bui/i],[A0,[d0,"Nvidia"],[k0,p0]],[/(playstation [345portablevi]+)/i],[A0,[d0,$0],[k0,p0]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[A0,[d0,j0],[k0,p0]],[/((pebble))app/i],[d0,A0,[k0,w0]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[A0,[d0,S0],[k0,w0]],[/droid.+; (glass) \d/i],[A0,[d0,M0],[k0,w0]],[/droid.+; (wt63?0{2,3})\)/i],[A0,[d0,K0],[k0,w0]],[/(quest( 2| pro)?)/i],[A0,[d0,e2],[k0,w0]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[d0,[k0,x0]],[/(aeobc)\b/i],[A0,[d0,y0],[k0,x0]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[A0,[k0,m0]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[A0,[k0,g0]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[k0,g0]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[k0,m0]],[/(android[-\w\. ]{0,9});.+buil/i],[A0,[d0,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h0,[c0,E0+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h0,[c0,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c0,h0],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h0,c0]],os:[[/microsoft (windows) (vista|xp)/i],[c0,h0],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[c0,[h0,w2,b2]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[c0,"Windows"],[h0,w2,b2]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h0,/_/g,"."],[c0,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c0,_i],[h0,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h0,c0],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[c0,h0],[/\(bb(10);/i],[h0,[c0,I0]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h0,[c0,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h0,[c0,R0+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h0,[c0,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h0,[c0,"watchOS"]],[/crkey\/([\d\.]+)/i],[h0,[c0,C0+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c0,J0],h0],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c0,h0],[/(sunos) ?([\w\.\d]*)/i],[[c0,"Solaris"],h0],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c0,h0]]},W0=function(L0,H0){if(typeof L0===f0&&(H0=L0,L0=r0),!(this instanceof W0))return new W0(L0,H0).getResult();var q0=typeof i0!==a0&&i0.navigator?i0.navigator:r0,n2=L0||(q0&&q0.userAgent?q0.userAgent:n0),A2=q0&&q0.userAgentData?q0.userAgentData:r0,h2=H0?Q0(P0,H0):P0,u2=q0&&q0.userAgent==n2;return this.getBrowser=function(){var o2={};return o2[c0]=r0,o2[h0]=r0,m2.call(o2,n2,h2.browser),o2[u0]=f2(o2[h0]),u2&&q0&&q0.brave&&typeof q0.brave.isBrave==o0&&(o2[c0]="Brave"),o2},this.getCPU=function(){var o2={};return o2[b0]=r0,m2.call(o2,n2,h2.cpu),o2},this.getDevice=function(){var o2={};return o2[d0]=r0,o2[A0]=r0,o2[k0]=r0,m2.call(o2,n2,h2.device),u2&&!o2[k0]&&A2&&A2.mobile&&(o2[k0]=m0),u2&&o2[A0]=="Macintosh"&&q0&&typeof q0.standalone!==a0&&q0.maxTouchPoints&&q0.maxTouchPoints>2&&(o2[A0]="iPad",o2[k0]=g0),o2},this.getEngine=function(){var o2={};return o2[c0]=r0,o2[h0]=r0,m2.call(o2,n2,h2.engine),o2},this.getOS=function(){var o2={};return o2[c0]=r0,o2[h0]=r0,m2.call(o2,n2,h2.os),u2&&!o2[c0]&&A2&&A2.platform!="Unknown"&&(o2[c0]=A2.platform.replace(/chrome os/i,J0).replace(/macos/i,_i)),o2},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n2},this.setUA=function(o2){return n2=typeof o2===l0&&o2.length>_0?c2(o2,_0):o2,this},this.setUA(n2),this};W0.VERSION=t0,W0.BROWSER=U0([c0,h0,u0]),W0.CPU=U0([b0]),W0.DEVICE=U0([A0,d0,k0,p0,m0,v0,g0,w0,x0]),W0.ENGINE=W0.OS=U0([c0,h0]),e0.exports&&(_e=e0.exports=W0),_e.UAParser=W0;var X0=typeof i0!==a0&&(i0.jQuery||i0.Zepto);if(X0&&!X0.ua){var r2=new W0;X0.ua=r2.getResult(),X0.ua.get=function(){return r2.getUA()},X0.ua.set=function(L0){r2.setUA(L0);var H0=r2.getResult();for(var q0 in H0)X0.ua[q0]=H0[q0]}}})(typeof window=="object"?window:commonjsGlobal)})(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;function useBrowserInfo(e0){let _e=new uaParserExports.UAParser(e0),i0=_e.getOS(),r0=_e.getDevice(),t0=_e.getBrowser(),n0=r0.model??"";return{os:i0,device:r0,browser:t0,isIphone:n0.includes("iPhone"),isIpod:n0.includes("iPod"),isIpad:n0.includes("iPad")}}function useHasWorkflow(e0){let[_e,i0]=reactExports.useState();return reactExports.useEffect(()=>{(async()=>{let r0;r0=typeof e0=="string"?await odeServices.rights().sessionHasWorkflowRight(e0):await odeServices.rights().sessionHasWorkflowRights(e0),i0(r0)})()},[e0]),_e}function useCantoo(){let e0=useHasWorkflow("org.entcore.portal.controllers.PortalController|optionalFeatureCantoo");return reactExports.useEffect(()=>{e0&&!document.getElementById("cantoo-edifice-script")&&(async()=>{let _e=await odeServices.http().get("/optionalFeature/cantoo");if(_e&&_e.scriptPath){let i0=document.createElement("script");i0.id="cantoo-edifice-script",i0.src=_e.scriptPath,i0.async=!0,document.body.appendChild(i0)}})()},[e0]),null}var CARBONIO_PREAUTH_WORKFLOW="org.entcore.auth.controllers.CarbonioPreauthController|preauth",useCarbonioUnread=()=>{let e0=useHasWorkflow(CARBONIO_PREAUTH_WORKFLOW)||!1,{data:_e}=useQuery({queryKey:["carbonio","unread","count"],queryFn:()=>odeServices.http().get("/auth/carbonio/unread",{disableNotifications:!0}),enabled:e0,staleTime:300*1e3,retry:!1});return{hasCarbonioWorkflow:e0,unreadCount:(_e==null?void 0:_e.count)??0}},DEFAULT_EVENTS=["mousedown","touchstart"];function useClickOutside(e0,_e,i0,r0=!0){let t0=reactExports.useRef(null);return reactExports.useEffect(()=>{if(!r0)return;let n0=s0=>{let{target:o0}=s0??{};if(Array.isArray(i0)){let a0=(o0==null?void 0:o0.hasAttribute("data-ignore-outside-clicks"))||!document.body.contains(o0)&&o0.tagName!=="HTML";i0.every(f0=>!!f0&&!s0.composedPath().includes(f0))&&!a0&&e0()}else t0.current&&!t0.current.contains(o0)&&e0()};return DEFAULT_EVENTS.forEach(s0=>{document.addEventListener(s0,n0)}),()=>{DEFAULT_EVENTS.forEach(s0=>{document.removeEventListener(s0,n0)})}},[t0,e0,i0,_e,r0]),t0}var useConversation=()=>{let e0=useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|view"),_e=useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|preauth"),[i0,r0]=reactExports.useState(""),t0={unread:!0,_:new Date().getTime()},{data:n0}=useQuery({queryKey:["folder","count","inbox"],queryFn:async()=>await odeServices.http().get(e0?"/zimbra/count/INBOX":"/conversation/api/count/inbox",{queryParams:t0}),staleTime:300*1e3}),s0=async()=>{let o0="/zimbra/zimbra";try{let{preference:a0}=await odeServices.http().get("/userbook/preference/zimbra");r0(a0&&JSON.parse(a0).modeExpert&&_e?"/zimbra/preauth":window.location.origin+o0)}catch(a0){console.error(a0),r0(window.location.origin+o0)}};return reactExports.useEffect(()=>{s0()},[]),{messages:n0?n0.count:0,msgLink:i0,zimbraWorkflow:e0}},dayjs_min={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){var i0=1e3,r0=6e4,t0=36e5,n0="millisecond",s0="second",o0="minute",a0="hour",f0="day",l0="week",u0="month",A0="quarter",c0="year",k0="date",d0="Invalid Date",h0=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b0=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,p0={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(C0){var E0=["th","st","nd","rd"],R0=C0%100;return"["+C0+(E0[(R0-20)%10]||E0[R0]||E0[0])+"]"}},m0=function(C0,E0,R0){var M0=String(C0);return!M0||M0.length>=E0?C0:""+Array(E0+1-M0.length).join(R0)+C0},g0={s:m0,z:function(C0){var E0=-C0.utcOffset(),R0=Math.abs(E0),M0=Math.floor(R0/60),T0=R0%60;return(E0<=0?"+":"-")+m0(M0,2,"0")+":"+m0(T0,2,"0")},m:function C0(E0,R0){if(E0.date()<R0.date())return-C0(R0,E0);var M0=12*(R0.year()-E0.year())+(R0.month()-E0.month()),T0=E0.clone().add(M0,u0),G0=R0-T0<0,j0=E0.clone().add(M0+(G0?-1:1),u0);return+(-(M0+(R0-T0)/(G0?T0-j0:j0-T0))||0)},a:function(C0){return C0<0?Math.ceil(C0)||0:Math.floor(C0)},p:function(C0){return{M:u0,y:c0,w:l0,d:f0,D:k0,h:a0,m:o0,s:s0,ms:n0,Q:A0}[C0]||String(C0||"").toLowerCase().replace(/s$/,"")},u:function(C0){return C0===void 0}},v0="en",w0={};w0[v0]=p0;var x0="$isDayjsObject",_0=function(C0){return C0 instanceof I0||!(!C0||!C0[x0])},y0=function C0(E0,R0,M0){var T0;if(!E0)return v0;if(typeof E0=="string"){var G0=E0.toLowerCase();w0[G0]&&(T0=G0),R0&&(w0[G0]=R0,T0=G0);var j0=E0.split("-");if(!T0&&j0.length>1)return C0(j0[0])}else{var N0=E0.name;w0[N0]=E0,T0=N0}return!M0&&T0&&(v0=T0),T0||!M0&&v0},S0=function(C0,E0){if(_0(C0))return C0.clone();var R0=typeof E0=="object"?E0:{};return R0.date=C0,R0.args=arguments,new I0(R0)},B0=g0;B0.l=y0,B0.i=_0,B0.w=function(C0,E0){return S0(C0,{locale:E0.$L,utc:E0.$u,x:E0.$x,$offset:E0.$offset})};var I0=function(){function C0(R0){this.$L=y0(R0.locale,null,!0),this.parse(R0),this.$x=this.$x||R0.x||{},this[x0]=!0}var E0=C0.prototype;return E0.parse=function(R0){this.$d=function(M0){var T0=M0.date,G0=M0.utc;if(T0===null)return new Date(NaN);if(B0.u(T0))return new Date;if(T0 instanceof Date)return new Date(T0);if(typeof T0=="string"&&!/Z$/i.test(T0)){var j0=T0.match(h0);if(j0){var N0=j0[2]-1||0,O0=(j0[7]||"0").substring(0,3);return G0?new Date(Date.UTC(j0[1],N0,j0[3]||1,j0[4]||0,j0[5]||0,j0[6]||0,O0)):new Date(j0[1],N0,j0[3]||1,j0[4]||0,j0[5]||0,j0[6]||0,O0)}}return new Date(T0)}(R0),this.init()},E0.init=function(){var R0=this.$d;this.$y=R0.getFullYear(),this.$M=R0.getMonth(),this.$D=R0.getDate(),this.$W=R0.getDay(),this.$H=R0.getHours(),this.$m=R0.getMinutes(),this.$s=R0.getSeconds(),this.$ms=R0.getMilliseconds()},E0.$utils=function(){return B0},E0.isValid=function(){return this.$d.toString()!==d0},E0.isSame=function(R0,M0){var T0=S0(R0);return this.startOf(M0)<=T0&&T0<=this.endOf(M0)},E0.isAfter=function(R0,M0){return S0(R0)<this.startOf(M0)},E0.isBefore=function(R0,M0){return this.endOf(M0)<S0(R0)},E0.$g=function(R0,M0,T0){return B0.u(R0)?this[M0]:this.set(T0,R0)},E0.unix=function(){return Math.floor(this.valueOf()/1e3)},E0.valueOf=function(){return this.$d.getTime()},E0.startOf=function(R0,M0){var T0=this,G0=!!B0.u(M0)||M0,j0=B0.p(R0),N0=function(J0,_i){var Q0=B0.w(T0.$u?Date.UTC(T0.$y,_i,J0):new Date(T0.$y,_i,J0),T0);return G0?Q0:Q0.endOf(f0)},O0=function(J0,_i){return B0.w(T0.toDate()[J0].apply(T0.toDate("s"),(G0?[0,0,0,0]:[23,59,59,999]).slice(_i)),T0)},Y0=this.$W,D0=this.$M,$0=this.$D,z0="set"+(this.$u?"UTC":"");switch(j0){case c0:return G0?N0(1,0):N0(31,11);case u0:return G0?N0(1,D0):N0(0,D0+1);case l0:var K0=this.$locale().weekStart||0,e2=(Y0<K0?Y0+7:Y0)-K0;return N0(G0?$0-e2:$0+(6-e2),D0);case f0:case k0:return O0(z0+"Hours",0);case a0:return O0(z0+"Minutes",1);case o0:return O0(z0+"Seconds",2);case s0:return O0(z0+"Milliseconds",3);default:return this.clone()}},E0.endOf=function(R0){return this.startOf(R0,!1)},E0.$set=function(R0,M0){var T0,G0=B0.p(R0),j0="set"+(this.$u?"UTC":""),N0=(T0={},T0[f0]=j0+"Date",T0[k0]=j0+"Date",T0[u0]=j0+"Month",T0[c0]=j0+"FullYear",T0[a0]=j0+"Hours",T0[o0]=j0+"Minutes",T0[s0]=j0+"Seconds",T0[n0]=j0+"Milliseconds",T0)[G0],O0=G0===f0?this.$D+(M0-this.$W):M0;if(G0===u0||G0===c0){var Y0=this.clone().set(k0,1);Y0.$d[N0](O0),Y0.init(),this.$d=Y0.set(k0,Math.min(this.$D,Y0.daysInMonth())).$d}else N0&&this.$d[N0](O0);return this.init(),this},E0.set=function(R0,M0){return this.clone().$set(R0,M0)},E0.get=function(R0){return this[B0.p(R0)]()},E0.add=function(R0,M0){var T0,G0=this;R0=Number(R0);var j0=B0.p(M0),N0=function(D0){var $0=S0(G0);return B0.w($0.date($0.date()+Math.round(D0*R0)),G0)};if(j0===u0)return this.set(u0,this.$M+R0);if(j0===c0)return this.set(c0,this.$y+R0);if(j0===f0)return N0(1);if(j0===l0)return N0(7);var O0=(T0={},T0[o0]=r0,T0[a0]=t0,T0[s0]=i0,T0)[j0]||1,Y0=this.$d.getTime()+R0*O0;return B0.w(Y0,this)},E0.subtract=function(R0,M0){return this.add(-1*R0,M0)},E0.format=function(R0){var M0=this,T0=this.$locale();if(!this.isValid())return T0.invalidDate||d0;var G0=R0||"YYYY-MM-DDTHH:mm:ssZ",j0=B0.z(this),N0=this.$H,O0=this.$m,Y0=this.$M,D0=T0.weekdays,$0=T0.months,z0=T0.meridiem,K0=function(_i,Q0,U0,i2){return _i&&(_i[Q0]||_i(M0,G0))||U0[Q0].slice(0,i2)},e2=function(_i){return B0.s(N0%12||12,_i,"0")},J0=z0||function(_i,Q0,U0){var i2=_i<12?"AM":"PM";return U0?i2.toLowerCase():i2};return G0.replace(b0,function(_i,Q0){return Q0||function(U0){switch(U0){case"YY":return String(M0.$y).slice(-2);case"YYYY":return B0.s(M0.$y,4,"0");case"M":return Y0+1;case"MM":return B0.s(Y0+1,2,"0");case"MMM":return K0(T0.monthsShort,Y0,$0,3);case"MMMM":return K0($0,Y0);case"D":return M0.$D;case"DD":return B0.s(M0.$D,2,"0");case"d":return String(M0.$W);case"dd":return K0(T0.weekdaysMin,M0.$W,D0,2);case"ddd":return K0(T0.weekdaysShort,M0.$W,D0,3);case"dddd":return D0[M0.$W];case"H":return String(N0);case"HH":return B0.s(N0,2,"0");case"h":return e2(1);case"hh":return e2(2);case"a":return J0(N0,O0,!0);case"A":return J0(N0,O0,!1);case"m":return String(O0);case"mm":return B0.s(O0,2,"0");case"s":return String(M0.$s);case"ss":return B0.s(M0.$s,2,"0");case"SSS":return B0.s(M0.$ms,3,"0");case"Z":return j0}return null}(_i)||j0.replace(":","")})},E0.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E0.diff=function(R0,M0,T0){var G0,j0=this,N0=B0.p(M0),O0=S0(R0),Y0=(O0.utcOffset()-this.utcOffset())*r0,D0=this-O0,$0=function(){return B0.m(j0,O0)};switch(N0){case c0:G0=$0()/12;break;case u0:G0=$0();break;case A0:G0=$0()/3;break;case l0:G0=(D0-Y0)/6048e5;break;case f0:G0=(D0-Y0)/864e5;break;case a0:G0=D0/t0;break;case o0:G0=D0/r0;break;case s0:G0=D0/i0;break;default:G0=D0}return T0?G0:B0.a(G0)},E0.daysInMonth=function(){return this.endOf(u0).$D},E0.$locale=function(){return w0[this.$L]},E0.locale=function(R0,M0){if(!R0)return this.$L;var T0=this.clone(),G0=y0(R0,M0,!0);return G0&&(T0.$L=G0),T0},E0.clone=function(){return B0.w(this.$d,this)},E0.toDate=function(){return new Date(this.valueOf())},E0.toJSON=function(){return this.isValid()?this.toISOString():null},E0.toISOString=function(){return this.$d.toISOString()},E0.toString=function(){return this.$d.toUTCString()},C0}(),F0=I0.prototype;return S0.prototype=F0,[["$ms",n0],["$s",s0],["$m",o0],["$H",a0],["$W",f0],["$M",u0],["$y",c0],["$D",k0]].forEach(function(C0){F0[C0[1]]=function(E0){return this.$g(E0,C0[0],C0[1])}}),S0.extend=function(C0,E0){return C0.$i||(C0(E0,I0,S0),C0.$i=!0),S0},S0.locale=y0,S0.isDayjs=_0,S0.unix=function(C0){return S0(1e3*C0)},S0.en=w0[v0],S0.Ls=w0,S0.p={},S0})})(dayjs_min);var dayjs_minExports=dayjs_min.exports;const dayjs=getDefaultExportFromCjs(dayjs_minExports);var customParseFormat$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){var i0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r0=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,t0=/\d/,n0=/\d\d/,s0=/\d\d?/,o0=/\d*[^-_:/,()\s\d]+/,a0={},f0=function(h0){return(h0=+h0)+(h0>68?1900:2e3)},l0=function(h0){return function(b0){this[h0]=+b0}},u0=[/[+-]\d\d:?(\d\d)?|Z/,function(h0){(this.zone||(this.zone={})).offset=function(b0){if(!b0||b0==="Z")return 0;var p0=b0.match(/([+-]|\d\d)/g),m0=60*p0[1]+(+p0[2]||0);return m0===0?0:p0[0]==="+"?-m0:m0}(h0)}],A0=function(h0){var b0=a0[h0];return b0&&(b0.indexOf?b0:b0.s.concat(b0.f))},c0=function(h0,b0){var p0,m0=a0.meridiem;if(m0){for(var g0=1;g0<=24;g0+=1)if(h0.indexOf(m0(g0,0,b0))>-1){p0=g0>12;break}}else p0=h0===(b0?"pm":"PM");return p0},k0={A:[o0,function(h0){this.afternoon=c0(h0,!1)}],a:[o0,function(h0){this.afternoon=c0(h0,!0)}],Q:[t0,function(h0){this.month=3*(h0-1)+1}],S:[t0,function(h0){this.milliseconds=100*+h0}],SS:[n0,function(h0){this.milliseconds=10*+h0}],SSS:[/\d{3}/,function(h0){this.milliseconds=+h0}],s:[s0,l0("seconds")],ss:[s0,l0("seconds")],m:[s0,l0("minutes")],mm:[s0,l0("minutes")],H:[s0,l0("hours")],h:[s0,l0("hours")],HH:[s0,l0("hours")],hh:[s0,l0("hours")],D:[s0,l0("day")],DD:[n0,l0("day")],Do:[o0,function(h0){var b0=a0.ordinal,p0=h0.match(/\d+/);if(this.day=p0[0],b0)for(var m0=1;m0<=31;m0+=1)b0(m0).replace(/\[|\]/g,"")===h0&&(this.day=m0)}],w:[s0,l0("week")],ww:[n0,l0("week")],M:[s0,l0("month")],MM:[n0,l0("month")],MMM:[o0,function(h0){var b0=A0("months"),p0=(A0("monthsShort")||b0.map(function(m0){return m0.slice(0,3)})).indexOf(h0)+1;if(p0<1)throw new Error;this.month=p0%12||p0}],MMMM:[o0,function(h0){var b0=A0("months").indexOf(h0)+1;if(b0<1)throw new Error;this.month=b0%12||b0}],Y:[/[+-]?\d+/,l0("year")],YY:[n0,function(h0){this.year=f0(h0)}],YYYY:[/\d{4}/,l0("year")],Z:u0,ZZ:u0};function d0(h0){var b0,p0;b0=h0,p0=a0&&a0.formats;for(var m0=(h0=b0.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(S0,B0,I0){var F0=I0&&I0.toUpperCase();return B0||p0[I0]||i0[I0]||p0[F0].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(C0,E0,R0){return E0||R0.slice(1)})})).match(r0),g0=m0.length,v0=0;v0<g0;v0+=1){var w0=m0[v0],x0=k0[w0],_0=x0&&x0[0],y0=x0&&x0[1];m0[v0]=y0?{regex:_0,parser:y0}:w0.replace(/^\[|\]$/g,"")}return function(S0){for(var B0={},I0=0,F0=0;I0<g0;I0+=1){var C0=m0[I0];if(typeof C0=="string")F0+=C0.length;else{var E0=C0.regex,R0=C0.parser,M0=S0.slice(F0),T0=E0.exec(M0)[0];R0.call(B0,T0),S0=S0.replace(T0,"")}}return function(G0){var j0=G0.afternoon;if(j0!==void 0){var N0=G0.hours;j0?N0<12&&(G0.hours+=12):N0===12&&(G0.hours=0),delete G0.afternoon}}(B0),B0}}return function(h0,b0,p0){p0.p.customParseFormat=!0,h0&&h0.parseTwoDigitYear&&(f0=h0.parseTwoDigitYear);var m0=b0.prototype,g0=m0.parse;m0.parse=function(v0){var w0=v0.date,x0=v0.utc,_0=v0.args;this.$u=x0;var y0=_0[1];if(typeof y0=="string"){var S0=_0[2]===!0,B0=_0[3]===!0,I0=S0||B0,F0=_0[2];B0&&(F0=_0[2]),a0=this.$locale(),!S0&&F0&&(a0=p0.Ls[F0]),this.$d=function(M0,T0,G0,j0){try{if(["x","X"].indexOf(T0)>-1)return new Date((T0==="X"?1e3:1)*M0);var N0=d0(T0)(M0),O0=N0.year,Y0=N0.month,D0=N0.day,$0=N0.hours,z0=N0.minutes,K0=N0.seconds,e2=N0.milliseconds,J0=N0.zone,_i=N0.week,Q0=new Date,U0=D0||(O0||Y0?1:Q0.getDate()),i2=O0||Q0.getFullYear(),s2=0;O0&&!Y0||(s2=Y0>0?Y0-1:Q0.getMonth());var f2,c2=$0||0,m2=z0||0,w2=K0||0,_2=e2||0;return J0?new Date(Date.UTC(i2,s2,U0,c2,m2,w2,_2+60*J0.offset*1e3)):G0?new Date(Date.UTC(i2,s2,U0,c2,m2,w2,_2)):(f2=new Date(i2,s2,U0,c2,m2,w2,_2),_i&&(f2=j0(f2).week(_i).toDate()),f2)}catch{return new Date("")}}(w0,y0,x0,p0),this.init(),F0&&F0!==!0&&(this.$L=this.locale(F0).$L),I0&&w0!=this.format(y0)&&(this.$d=new Date("")),a0={}}else if(y0 instanceof Array)for(var C0=y0.length,E0=1;E0<=C0;E0+=1){_0[1]=y0[E0-1];var R0=p0.apply(this,_0);if(R0.isValid()){this.$d=R0.$d,this.$L=R0.$L,this.init();break}E0===C0&&(this.$d=new Date(""))}else g0.call(this,v0)}}})})(customParseFormat$1);var customParseFormatExports=customParseFormat$1.exports;const customParseFormat=getDefaultExportFromCjs(customParseFormatExports);var isSameOrAfter$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){return function(i0,r0){r0.prototype.isSameOrAfter=function(t0,n0){return this.isSame(t0,n0)||this.isAfter(t0,n0)}}})})(isSameOrAfter$1);var isSameOrAfterExports=isSameOrAfter$1.exports;const isSameOrAfter=getDefaultExportFromCjs(isSameOrAfterExports);var isToday$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){return function(i0,r0,t0){r0.prototype.isToday=function(){var n0="YYYY-MM-DD",s0=t0();return this.format(n0)===s0.format(n0)}}})})(isToday$1);var isTodayExports=isToday$1.exports;const isToday=getDefaultExportFromCjs(isTodayExports);var localizedFormat$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){var i0={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r0,t0,n0){var s0=t0.prototype,o0=s0.format;n0.en.formats=i0,s0.format=function(a0){a0===void 0&&(a0="YYYY-MM-DDTHH:mm:ssZ");var f0=this.$locale().formats,l0=function(u0,A0){return u0.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(c0,k0,d0){var h0=d0&&d0.toUpperCase();return k0||A0[d0]||i0[d0]||A0[h0].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(b0,p0,m0){return p0||m0.slice(1)})})}(a0,f0===void 0?{}:f0);return o0.call(this,l0)}}})})(localizedFormat$1);var localizedFormatExports=localizedFormat$1.exports;const localizedFormat=getDefaultExportFromCjs(localizedFormatExports);var relativeTime$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0()})(commonjsGlobal,function(){return function(i0,r0,t0){i0=i0||{};var n0=r0.prototype,s0={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function o0(f0,l0,u0,A0){return n0.fromToBase(f0,l0,u0,A0)}t0.en.relativeTime=s0,n0.fromToBase=function(f0,l0,u0,A0,c0){for(var k0,d0,h0,b0=u0.$locale().relativeTime||s0,p0=i0.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m0=p0.length,g0=0;g0<m0;g0+=1){var v0=p0[g0];v0.d&&(k0=A0?t0(f0).diff(u0,v0.d,!0):u0.diff(f0,v0.d,!0));var w0=(i0.rounding||Math.round)(Math.abs(k0));if(h0=k0>0,w0<=v0.r||!v0.r){w0<=1&&g0>0&&(v0=p0[g0-1]);var x0=b0[v0.l];c0&&(w0=c0(""+w0)),d0=typeof x0=="string"?x0.replace("%d",w0):x0(w0,l0,v0.l,h0);break}}if(l0)return d0;var _0=h0?b0.future:b0.past;return typeof _0=="function"?_0(d0):_0.replace("%s",d0)},n0.to=function(f0,l0){return o0(f0,l0,this,!0)},n0.from=function(f0,l0){return o0(f0,l0,this)};var a0=function(f0){return f0.$u?t0.utc():t0()};n0.toNow=function(f0){return this.to(a0(this),f0)},n0.fromNow=function(f0){return this.from(a0(this),f0)}}})})(relativeTime$1);var relativeTimeExports=relativeTime$1.exports;const relativeTime=getDefaultExportFromCjs(relativeTimeExports);var de$1={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal,function(i0){function r0(a0){return a0&&typeof a0=="object"&&"default"in a0?a0:{default:a0}}var t0=r0(i0),n0={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function s0(a0,f0,l0){var u0=n0[l0];return Array.isArray(u0)&&(u0=u0[f0?0:1]),u0.replace("%d",a0)}var o0={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(a0){return a0+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:s0,m:s0,mm:s0,h:s0,hh:s0,d:s0,dd:s0,M:s0,MM:s0,y:s0,yy:s0}};return t0.default.locale(o0,null,!0),o0})})(de$1);var es={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(s0){return s0+"º"}};return t0.default.locale(n0,null,!0),n0})})(es);var fr={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(s0){return""+s0+(s0===1?"er":"")}};return t0.default.locale(n0,null,!0),n0})})(fr);var it={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(s0){return s0+"º"}};return t0.default.locale(n0,null,!0),n0})})(it);var pt={exports:{}};(function(e0,_e){(function(i0,r0){e0.exports=r0(dayjs_minExports)})(commonjsGlobal,function(i0){function r0(s0){return s0&&typeof s0=="object"&&"default"in s0?s0:{default:s0}}var t0=r0(i0),n0={name:"pt",weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sab".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sa".split("_"),months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(s0){return s0+"º"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},relativeTime:{future:"em %s",past:"há %s",s:"alguns segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"}};return t0.default.locale(n0,null,!0),n0})})(pt);dayjs.extend(relativeTime),dayjs.extend(customParseFormat),dayjs.extend(localizedFormat),dayjs.extend(isSameOrAfter),dayjs.extend(isToday);function formatRelativeToNow(e0,_e){let i0=e0.diff(_e,"second"),r0=i0>0,t0=Math.abs(i0),n0,s0;t0<60?(n0="s",s0=t0):t0<3600?(s0=Math.floor(t0/60),n0=s0<2?"m":"mm"):(s0=Math.floor(t0/3600),n0=s0<2?"h":"hh");let o0=(dayjs.Ls[e0.locale()]??dayjs.Ls.en).relativeTime,a0=o0[n0],f0=typeof a0=="function"?a0(s0,!1,n0,r0):(a0??"").replace("%d",String(s0)),l0=o0[r0?"future":"past"];return typeof l0=="function"?l0(f0):(l0??"%s").replace("%s",f0)}var FRIENDLY_RELATIVE_MAX_HOURS=3;function useDate(){let{currentLanguage:e0}=useEdificeClient(),{t:_e}=useTranslation(),i0=reactExports.useCallback((g0,v0)=>{if(g0.length<11)return dayjs(g0,["YYYY-MM-DD"],v0??e0);if(g0.split("").findIndex(w0=>"0">w0||w0>"9")<0)return dayjs(Number.parseInt(g0)).locale(e0);{let w0=dayjs(g0).locale(e0);return w0.isValid()||(w0=dayjs(g0,["YYYY-MM-DD HH:mm:ss.SSS"]).locale(e0)),w0}},[e0]),r0=reactExports.useCallback(g0=>{let v0=dayjs();try{return g0===void 0?void 0:(typeof g0=="string"?v0=i0(g0):g0 instanceof Date||typeof g0=="number"?v0=dayjs(g0).locale(e0):typeof g0.$date=="number"?v0=dayjs(new Date(g0.$date)).locale(e0):typeof g0.$date=="string"&&(v0=i0(g0.$date)),v0)}catch(w0){console.error(w0)}return v0},[e0,i0]),t0=reactExports.useCallback((g0,v0)=>{let w0=r0(g0);if(!(w0!=null&&w0.isValid()))return"";let x0=dayjs();if(w0.isToday()||Math.abs(x0.diff(w0,"hour"))<=FRIENDLY_RELATIVE_MAX_HOURS)return formatRelativeToNow(w0,x0);let _0;return _0=w0.isSame(x0.subtract(1,"day"),"day")?"yesterday":w0.isSame(x0.add(1,"day"),"day")?"tomorrow":Math.abs(x0.diff(w0,"day"))<7?"weekday":w0.isSame(x0,"year")?"currentYear":"otherYear",w0.format(_e(`date.friendly.${v0}.${_0}`))},[r0,_e]),n0=reactExports.useCallback(g0=>t0(g0,"datetime"),[t0]),s0=reactExports.useCallback(g0=>t0(g0,"date"),[t0]),o0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.format(_e("date.long.datetime")):""},[r0,_e]),a0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.format(_e("date.long.date")):""},[r0,_e]),f0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.format(_e("date.raw.date")):""},[r0,_e]),l0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.format(_e("date.raw.datetime")):""},[r0,_e]),u0=reactExports.useCallback((g0,v0="full")=>{let w0=r0(g0);if(!(w0!=null&&w0.isValid()))return"";let x0=dayjs();if(w0.isToday())return _e("date.calendar.today");if(w0.isSame(x0.subtract(1,"day"),"day"))return _e("date.calendar.yesterday");if(w0.isSame(x0.add(1,"day"),"day"))return _e("date.calendar.tomorrow");let _0=w0.isSame(x0,"year")?"currentYear":"otherYear";return w0.format(_e(`date.calendar.${v0}.${_0}`))},[r0,_e]),A0=reactExports.useCallback(g0=>{let v0=r0(g0);if(!(v0!=null&&v0.isValid()))return"";let w0=dayjs().locale(e0),x0=v0.startOf("week"),_0=x0.diff(w0.startOf("week"),"week");if(_0===0)return _e("date.week.current");let y0=x0.endOf("week");return _0===-1||_0===1?_e(_0===-1?"date.week.last":"date.week.next",{start:x0.format(_e("date.week.boundary.short")),end:y0.format(_e("date.week.boundary.short"))}):_e(x0.isSame(w0,"year")?"date.week.other.currentYear":"date.week.other.otherYear",{start:x0.format(_e("date.week.boundary.day")),end:y0.format(_e("date.week.boundary.dayMonth")),year:x0.format("YYYY")})},[e0,r0,_e]),c0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.toDate():void 0},[r0]),k0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.valueOf():void 0},[r0]),d0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.toISOString():void 0},[r0]),h0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?{$date:v0.valueOf()}:void 0},[r0]),b0=reactExports.useCallback(g0=>{let v0=r0(g0);return v0!=null&&v0.isValid()?v0.fromNow():""},[r0]),p0=reactExports.useCallback(g0=>{let v0=r0(g0);if(!(v0!=null&&v0.isValid()))return"";let w0=dayjs();return v0.isSame(w0,"date")?v0.fromNow():v0.isSame(w0.subtract(1,"day"),"date")?_e("date.format.yesterday"):w0.diff(v0,"days")<=7?v0.format(_e("date.format.currentWeek")):v0.isSame(w0,"year")?v0.format(_e("date.format.currentYear")):v0.format(_e("date.format.previousYear"))},[r0,_e]),m0=reactExports.useCallback((g0,v0="short")=>{let w0=r0(g0),x0="";switch(v0){case"short":x0="L";break;case"long":x0="LL";break;case"abbr":x0="ll";break;default:x0=v0}return w0!=null&&w0.isValid()?w0.locale(e0).format(x0):""},[e0,r0]);return{formatRelativeDateTime:n0,formatRelativeDate:s0,formatLongDateTime:o0,formatLongDate:a0,formatRawDate:f0,formatRawDateTime:l0,formatCalendarDate:u0,formatWeek:A0,toJsDate:c0,toTimestamp:k0,toIsoDate:d0,toMongoDate:h0,dateIsSame:reactExports.useCallback((g0,v0,w0="day")=>{let x0=r0(g0),_0=r0(v0);return(x0==null?void 0:x0.isSame(_0,w0))??!1},[r0]),dateIsSameOrAfter:reactExports.useCallback((g0,v0,w0="day")=>{let x0=r0(g0),_0=r0(v0);return(x0==null?void 0:x0.isSameOrAfter(_0,w0))??!1},[r0]),dateIsToday:reactExports.useCallback(g0=>{var v0;return((v0=r0(g0))==null?void 0:v0.isToday())??!1},[r0]),fromNow:b0,formatDate:m0,formatTimeAgo:p0}}var useDirectory=()=>{function e0(i0,r0){if(i0!=="")return odeServices.directory().getAvatarUrl(i0,r0)}function _e(i0,r0){return odeServices.directory().getDirectoryUrl(i0,r0)}return{getAvatarURL:e0,getUserbookURL:_e}};function mergeRefs(...e0){return _e=>{setRef(_e,...e0)}}function setRef(e0,..._e){_e.forEach(i0=>{typeof i0=="function"?i0(e0):i0!=null&&(i0.current=e0)})}function getNodeName$2(e0){return isNode$3(e0)?(e0.nodeName||"").toLowerCase():"#document"}function getWindow$4(e0){var _e;return(e0==null||(_e=e0.ownerDocument)==null?void 0:_e.defaultView)||window}function getDocumentElement$2(e0){var _e;return(_e=(isNode$3(e0)?e0.ownerDocument:e0.document)||window.document)==null?void 0:_e.documentElement}function isNode$3(e0){return e0 instanceof Node||e0 instanceof getWindow$4(e0).Node}function isElement$2(e0){return e0 instanceof Element||e0 instanceof getWindow$4(e0).Element}function isHTMLElement$4(e0){return e0 instanceof HTMLElement||e0 instanceof getWindow$4(e0).HTMLElement}function isShadowRoot$2(e0){return typeof ShadowRoot>"u"?!1:e0 instanceof ShadowRoot||e0 instanceof getWindow$4(e0).ShadowRoot}function isLastTraversableNode$1(e0){return["html","body","#document"].includes(getNodeName$2(e0))}function getComputedStyle$4(e0){return getWindow$4(e0).getComputedStyle(e0)}function getParentNode$2(e0){if(getNodeName$2(e0)==="html")return e0;const _e=e0.assignedSlot||e0.parentNode||isShadowRoot$2(e0)&&e0.host||getDocumentElement$2(e0);return isShadowRoot$2(_e)?_e.host:_e}function activeElement(e0){let _e=e0.activeElement;for(;((i0=_e)==null||(r0=i0.shadowRoot)==null?void 0:r0.activeElement)!=null;){var i0,r0;_e=_e.shadowRoot.activeElement}return _e}function contains$2(e0,_e){if(!e0||!_e)return!1;const i0=_e.getRootNode&&_e.getRootNode();if(e0.contains(_e))return!0;if(i0&&isShadowRoot$2(i0)){let r0=_e;for(;r0;){if(e0===r0)return!0;r0=r0.parentNode||r0.host}}return!1}function getPlatform(){const e0=navigator.userAgentData;return e0!=null&&e0.platform?e0.platform:navigator.platform}function getUserAgent(){const e0=navigator.userAgentData;return e0&&Array.isArray(e0.brands)?e0.brands.map(_e=>{let{brand:i0,version:r0}=_e;return i0+"/"+r0}).join(" "):navigator.userAgent}function isVirtualClick(e0){return e0.mozInputSource===0&&e0.isTrusted?!0:isAndroid()&&e0.pointerType?e0.type==="click"&&e0.buttons===1:e0.detail===0&&!e0.pointerType}function isVirtualPointerEvent(e0){return!isAndroid()&&e0.width===0&&e0.height===0||e0.width===1&&e0.height===1&&e0.pressure===0&&e0.detail===0&&e0.pointerType==="mouse"||e0.width<1&&e0.height<1&&e0.pressure===0&&e0.detail===0}function isSafari$1(){return/apple/i.test(navigator.vendor)}function isAndroid(){const e0=/android/i;return e0.test(getPlatform())||e0.test(getUserAgent())}function isMouseLikePointerType(e0,_e){const i0=["mouse","pen"];return _e||i0.push("",void 0),i0.includes(e0)}function isReactEvent(e0){return"nativeEvent"in e0}function isRootElement(e0){return e0.matches("html,body")}function getDocument$1(e0){return(e0==null?void 0:e0.ownerDocument)||document}function isEventTargetWithin(e0,_e){if(_e==null)return!1;if("composedPath"in e0)return e0.composedPath().includes(_e);const i0=e0;return i0.target!=null&&_e.contains(i0.target)}function getTarget(e0){return"composedPath"in e0?e0.composedPath()[0]:e0.target}const TYPEABLE_SELECTOR="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function isTypeableElement(e0){return isHTMLElement$4(e0)&&e0.matches(TYPEABLE_SELECTOR)}const min$1=Math.min,max$1=Math.max,round$3=Math.round,floor=Math.floor,createCoords=e0=>({x:e0,y:e0}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"};function evaluate(e0,_e){return typeof e0=="function"?e0(_e):e0}function getSide(e0){return e0.split("-")[0]}function getAlignment(e0){return e0.split("-")[1]}function getOppositeAxis(e0){return e0==="x"?"y":"x"}function getAxisLength(e0){return e0==="y"?"height":"width"}function getSideAxis(e0){const _e=e0[0];return _e==="t"||_e==="b"?"y":"x"}function getAlignmentAxis(e0){return getOppositeAxis(getSideAxis(e0))}function getAlignmentSides(e0,_e,i0){i0===void 0&&(i0=!1);const r0=getAlignment(e0),t0=getAlignmentAxis(e0),n0=getAxisLength(t0);let s0=t0==="x"?r0===(i0?"end":"start")?"right":"left":r0==="start"?"bottom":"top";return _e.reference[n0]>_e.floating[n0]&&(s0=getOppositePlacement$1(s0)),[s0,getOppositePlacement$1(s0)]}function getExpandedPlacements(e0){const _e=getOppositePlacement$1(e0);return[getOppositeAlignmentPlacement(e0),_e,getOppositeAlignmentPlacement(_e)]}function getOppositeAlignmentPlacement(e0){return e0.includes("start")?e0.replace("start","end"):e0.replace("end","start")}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(e0,_e,i0){switch(e0){case"top":case"bottom":return i0?_e?rlPlacement:lrPlacement:_e?lrPlacement:rlPlacement;case"left":case"right":return _e?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(e0,_e,i0,r0){const t0=getAlignment(e0);let n0=getSideList(getSide(e0),i0==="start",r0);return t0&&(n0=n0.map(s0=>s0+"-"+t0),_e&&(n0=n0.concat(n0.map(getOppositeAlignmentPlacement)))),n0}function getOppositePlacement$1(e0){const _e=getSide(e0);return oppositeSideMap[_e]+e0.slice(_e.length)}function expandPaddingObject(e0){var _e,i0,r0,t0;return{top:(_e=e0.top)!=null?_e:0,right:(i0=e0.right)!=null?i0:0,bottom:(r0=e0.bottom)!=null?r0:0,left:(t0=e0.left)!=null?t0:0}}function getPaddingObject(e0){return typeof e0!="number"?expandPaddingObject(e0):{top:e0,right:e0,bottom:e0,left:e0}}function rectToClientRect$1(e0){const{x:_e,y:i0,width:r0,height:t0}=e0;return{width:r0,height:t0,top:i0,left:_e,right:_e+r0,bottom:i0+t0,x:_e,y:i0}}function computeCoordsFromPlacement(e0,_e,i0){let{reference:r0,floating:t0}=e0;const n0=getSideAxis(_e),s0=getAlignmentAxis(_e),o0=getAxisLength(s0),a0=getSide(_e),f0=n0==="y",l0=r0.x+r0.width/2-t0.width/2,u0=r0.y+r0.height/2-t0.height/2,A0=r0[o0]/2-t0[o0]/2;let c0;switch(a0){case"top":c0={x:l0,y:r0.y-t0.height};break;case"bottom":c0={x:l0,y:r0.y+r0.height};break;case"right":c0={x:r0.x+r0.width,y:u0};break;case"left":c0={x:r0.x-t0.width,y:u0};break;default:c0={x:r0.x,y:r0.y}}const k0=getAlignment(_e);return k0&&(c0[s0]+=A0*(k0==="end"?1:-1)*(i0&&f0?-1:1)),c0}async function detectOverflow$1(e0,_e){var i0;_e===void 0&&(_e={});const{x:r0,y:t0,platform:n0,rects:s0,elements:o0,strategy:a0}=e0,{boundary:f0="clippingAncestors",rootBoundary:l0="viewport",elementContext:u0="floating",altBoundary:A0=!1,padding:c0=0}=evaluate(_e,e0),k0=getPaddingObject(c0),h0=o0[A0?u0==="floating"?"reference":"floating":u0],b0=rectToClientRect$1(await n0.getClippingRect({element:(i0=await(n0.isElement==null?void 0:n0.isElement(h0)))==null||i0?h0:h0.contextElement||await(n0.getDocumentElement==null?void 0:n0.getDocumentElement(o0.floating)),boundary:f0,rootBoundary:l0,strategy:a0})),p0=u0==="floating"?{x:r0,y:t0,width:s0.floating.width,height:s0.floating.height}:s0.reference,m0=await(n0.getOffsetParent==null?void 0:n0.getOffsetParent(o0.floating)),g0=await(n0.isElement==null?void 0:n0.isElement(m0))&&await(n0.getScale==null?void 0:n0.getScale(m0))||{x:1,y:1},v0=rectToClientRect$1(n0.convertOffsetParentRelativeRectToViewportRelativeRect?await n0.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o0,rect:p0,offsetParent:m0,strategy:a0}):p0);return{top:(b0.top-v0.top+k0.top)/g0.y,bottom:(v0.bottom-b0.bottom+k0.bottom)/g0.y,left:(b0.left-v0.left+k0.left)/g0.x,right:(v0.right-b0.right+k0.right)/g0.x}}const MAX_RESET_COUNT=50,computePosition$1=async(e0,_e,i0)=>{const{placement:r0="bottom",strategy:t0="absolute",middleware:n0=[],platform:s0}=i0,o0=s0.detectOverflow?s0:{...s0,detectOverflow:detectOverflow$1},a0=await(s0.isRTL==null?void 0:s0.isRTL(_e));let f0=await s0.getElementRects({reference:e0,floating:_e,strategy:t0}),{x:l0,y:u0}=computeCoordsFromPlacement(f0,r0,a0),A0=r0,c0=0;const k0={};for(let d0=0;d0<n0.length;d0++){const h0=n0[d0];if(!h0)continue;const{name:b0,fn:p0}=h0,{x:m0,y:g0,data:v0,reset:w0}=await p0({x:l0,y:u0,initialPlacement:r0,placement:A0,strategy:t0,middlewareData:k0,rects:f0,platform:o0,elements:{reference:e0,floating:_e}});l0=m0??l0,u0=g0??u0,k0[b0]={...k0[b0],...v0},w0&&c0<MAX_RESET_COUNT&&(c0++,typeof w0=="object"&&(w0.placement&&(A0=w0.placement),w0.rects&&(f0=w0.rects===!0?await s0.getElementRects({reference:e0,floating:_e,strategy:t0}):w0.rects),{x:l0,y:u0}=computeCoordsFromPlacement(f0,A0,a0)),d0=-1)}return{x:l0,y:u0,placement:A0,strategy:t0,middlewareData:k0}},flip$4=function(e0){return e0===void 0&&(e0={}),{name:"flip",options:e0,async fn(_e){var i0,r0;const{placement:t0,middlewareData:n0,rects:s0,initialPlacement:o0,platform:a0,elements:f0}=_e,{mainAxis:l0=!0,crossAxis:u0=!0,fallbackPlacements:A0,fallbackStrategy:c0="bestFit",fallbackAxisSideDirection:k0="none",flipAlignment:d0=!0,...h0}=evaluate(e0,_e);if((i0=n0.arrow)!=null&&i0.alignmentOffset)return{};const b0=getSide(t0),p0=getSideAxis(o0),m0=getSide(o0)===o0,g0=await(a0.isRTL==null?void 0:a0.isRTL(f0.floating)),v0=A0||(m0||!d0?[getOppositePlacement$1(o0)]:getExpandedPlacements(o0)),w0=k0!=="none";!A0&&w0&&v0.push(...getOppositeAxisPlacements(o0,d0,k0,g0));const x0=[o0,...v0],_0=await a0.detectOverflow(_e,h0),y0=[];let S0=((r0=n0.flip)==null?void 0:r0.overflows)||[];if(l0&&y0.push(_0[b0]),u0){const C0=getAlignmentSides(t0,s0,g0);y0.push(_0[C0[0]],_0[C0[1]])}if(S0=[...S0,{placement:t0,overflows:y0}],!y0.every(C0=>C0<=0)){var B0,I0;const C0=(((B0=n0.flip)==null?void 0:B0.index)||0)+1,E0=x0[C0];if(E0&&(!(u0==="alignment"?p0!==getSideAxis(E0):!1)||S0.every(T0=>getSideAxis(T0.placement)===p0?T0.overflows[0]>0:!0)))return{data:{index:C0,overflows:S0},reset:{placement:E0}};let R0=(I0=S0.filter(M0=>M0.overflows[0]<=0).sort((M0,T0)=>M0.overflows[1]-T0.overflows[1])[0])==null?void 0:I0.placement;if(!R0)switch(c0){case"bestFit":{var F0;const M0=(F0=S0.filter(T0=>{if(w0){const G0=getSideAxis(T0.placement);return G0===p0||G0==="y"}return!0}).map(T0=>[T0.placement,T0.overflows.filter(G0=>G0>0).reduce((G0,j0)=>G0+j0,0)]).sort((T0,G0)=>T0[1]-G0[1])[0])==null?void 0:F0[0];M0&&(R0=M0);break}case"initialPlacement":R0=o0;break}if(t0!==R0)return{reset:{placement:R0}}}return{}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(e0,_e){const{placement:i0,platform:r0,elements:t0}=e0,n0=await(r0.isRTL==null?void 0:r0.isRTL(t0.floating)),s0=getSide(i0),o0=getAlignment(i0),a0=getSideAxis(i0)==="y",f0=originSides.has(s0)?-1:1,l0=n0&&a0?-1:1,u0=evaluate(_e,e0);let{mainAxis:A0,crossAxis:c0,alignmentAxis:k0}=typeof u0=="number"?{mainAxis:u0,crossAxis:0,alignmentAxis:null}:{mainAxis:u0.mainAxis||0,crossAxis:u0.crossAxis||0,alignmentAxis:u0.alignmentAxis};return o0&&typeof k0=="number"&&(c0=o0==="end"?k0*-1:k0),a0?{x:c0*l0,y:A0*f0}:{x:A0*f0,y:c0*l0}}const offset$4=function(e0){return e0===void 0&&(e0=0),{name:"offset",options:e0,async fn(_e){var i0,r0;const{x:t0,y:n0,placement:s0,middlewareData:o0}=_e,a0=await convertValueToCoords(_e,e0);return s0===((i0=o0.offset)==null?void 0:i0.placement)&&(r0=o0.arrow)!=null&&r0.alignmentOffset?{}:{x:t0+a0.x,y:n0+a0.y,data:{...a0,placement:s0}}}}},size$2=function(e0){return e0===void 0&&(e0={}),{name:"size",options:e0,async fn(_e){const{placement:i0,rects:r0,platform:t0,elements:n0}=_e,{apply:s0=()=>{},...o0}=evaluate(e0,_e),a0=await t0.detectOverflow(_e,o0),f0=getSide(i0),l0=getAlignment(i0),u0=getSideAxis(i0)==="y",{width:A0,height:c0}=r0.floating;let k0,d0;f0==="top"||f0==="bottom"?(k0=f0,d0=l0===(await(t0.isRTL==null?void 0:t0.isRTL(n0.floating))?"start":"end")?"left":"right"):(d0=f0,k0=l0==="end"?"top":"bottom");const h0=c0-a0.top-a0.bottom,b0=A0-a0.left-a0.right,p0=min$1(c0-a0[k0],h0),m0=min$1(A0-a0[d0],b0),g0=_e.middlewareData.shift,v0=!g0;let w0=p0,x0=m0;g0!=null&&g0.enabled.x&&(x0=b0),g0!=null&&g0.enabled.y&&(w0=h0),v0&&!l0&&(u0?x0=A0-2*max$1(a0.left,a0.right):w0=c0-2*max$1(a0.top,a0.bottom)),await s0({..._e,availableWidth:x0,availableHeight:w0});const _0=await t0.getDimensions(n0.floating);return A0!==_0.width||c0!==_0.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName$1(e0){return isNode$2(e0)?(e0.nodeName||"").toLowerCase():"#document"}function getWindow$3(e0){var _e;return(e0==null||(_e=e0.ownerDocument)==null?void 0:_e.defaultView)||window}function getDocumentElement$1(e0){var _e;return(_e=(isNode$2(e0)?e0.ownerDocument:e0.document)||window.document)==null?void 0:_e.documentElement}function isNode$2(e0){return hasWindow()?e0 instanceof Node||e0 instanceof getWindow$3(e0).Node:!1}function isElement$1(e0){return hasWindow()?e0 instanceof Element||e0 instanceof getWindow$3(e0).Element:!1}function isHTMLElement$3(e0){return hasWindow()?e0 instanceof HTMLElement||e0 instanceof getWindow$3(e0).HTMLElement:!1}function isShadowRoot$1(e0){return!hasWindow()||typeof ShadowRoot>"u"?!1:e0 instanceof ShadowRoot||e0 instanceof getWindow$3(e0).ShadowRoot}function isOverflowElement(e0){const{overflow:_e,overflowX:i0,overflowY:r0,display:t0}=getComputedStyle$3(e0);return/auto|scroll|overlay|hidden|clip/.test(_e+r0+i0)&&t0!=="inline"&&t0!=="contents"}function isTableElement$1(e0){return/^(table|td|th)$/.test(getNodeName$1(e0))}function isTopLayer(e0){try{if(e0.matches(":popover-open"))return!0}catch{}try{return e0.matches(":modal")}catch{return!1}}const willChangeRe=/transform|translate|scale|rotate|perspective|filter/,containRe=/paint|layout|strict|content/,isNotNone=e0=>!!e0&&e0!=="none";let isWebKitValue;function isContainingBlock(e0){const _e=isElement$1(e0)?getComputedStyle$3(e0):e0;return isNotNone(_e.transform)||isNotNone(_e.translate)||isNotNone(_e.scale)||isNotNone(_e.rotate)||isNotNone(_e.perspective)||!isWebKit()&&(isNotNone(_e.backdropFilter)||isNotNone(_e.filter))||willChangeRe.test(_e.willChange||"")||containRe.test(_e.contain||"")}function getContainingBlock$1(e0){let _e=getParentNode$1(e0);for(;isHTMLElement$3(_e)&&!isLastTraversableNode(_e);){if(isContainingBlock(_e))return _e;if(isTopLayer(_e))return null;_e=getParentNode$1(_e)}return null}function isWebKit(){return isWebKitValue==null&&(isWebKitValue=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),isWebKitValue}function isLastTraversableNode(e0){return/^(html|body|#document)$/.test(getNodeName$1(e0))}function getComputedStyle$3(e0){return getWindow$3(e0).getComputedStyle(e0)}function getNodeScroll$1(e0){return isElement$1(e0)?{scrollLeft:e0.scrollLeft,scrollTop:e0.scrollTop}:{scrollLeft:e0.scrollX,scrollTop:e0.scrollY}}function getParentNode$1(e0){if(getNodeName$1(e0)==="html")return e0;const _e=e0.assignedSlot||e0.parentNode||isShadowRoot$1(e0)&&e0.host||getDocumentElement$1(e0);return isShadowRoot$1(_e)?_e.host:_e}function getNearestOverflowAncestor(e0){const _e=getParentNode$1(e0);return isLastTraversableNode(_e)?(e0.ownerDocument||e0).body:isHTMLElement$3(_e)&&isOverflowElement(_e)?_e:getNearestOverflowAncestor(_e)}function getOverflowAncestors(e0,_e,i0){var r0;_e===void 0&&(_e=[]),i0===void 0&&(i0=!0);const t0=getNearestOverflowAncestor(e0),n0=t0===((r0=e0.ownerDocument)==null?void 0:r0.body),s0=getWindow$3(t0);if(n0){const o0=getFrameElement(s0);return _e.concat(s0,s0.visualViewport||[],isOverflowElement(t0)?t0:[],o0&&i0?getOverflowAncestors(o0):[])}else return _e.concat(t0,getOverflowAncestors(t0,[],i0))}function getFrameElement(e0){return e0.parent&&Object.getPrototypeOf(e0.parent)?e0.frameElement:null}function getCssDimensions(e0){const _e=getComputedStyle$3(e0);let i0=parseFloat(_e.width)||0,r0=parseFloat(_e.height)||0;const t0=isHTMLElement$3(e0),n0=t0?e0.offsetWidth:i0,s0=t0?e0.offsetHeight:r0,o0=round$3(i0)!==n0||round$3(r0)!==s0;return o0&&(i0=n0,r0=s0),{width:i0,height:r0,$:o0}}function unwrapElement(e0){return isElement$1(e0)?e0:e0.contextElement}function getScale(e0){const _e=unwrapElement(e0);if(!isHTMLElement$3(_e))return createCoords(1);const i0=_e.getBoundingClientRect(),{width:r0,height:t0,$:n0}=getCssDimensions(_e);let s0=(n0?round$3(i0.width):i0.width)/r0,o0=(n0?round$3(i0.height):i0.height)/t0;return(!s0||!Number.isFinite(s0))&&(s0=1),(!o0||!Number.isFinite(o0))&&(o0=1),{x:s0,y:o0}}const noOffsets=createCoords(0);function getVisualOffsets(e0){const _e=getWindow$3(e0);return!isWebKit()||!_e.visualViewport?noOffsets:{x:_e.visualViewport.offsetLeft,y:_e.visualViewport.offsetTop}}function shouldAddVisualOffsets(e0,_e,i0){return _e===void 0&&(_e=!1),!!i0&&_e&&i0===getWindow$3(e0)}function getBoundingClientRect$1(e0,_e,i0,r0){_e===void 0&&(_e=!1),i0===void 0&&(i0=!1);const t0=e0.getBoundingClientRect(),n0=unwrapElement(e0);let s0=createCoords(1);_e&&(r0?isElement$1(r0)&&(s0=getScale(r0)):s0=getScale(e0));const o0=shouldAddVisualOffsets(n0,i0,r0)?getVisualOffsets(n0):createCoords(0);let a0=(t0.left+o0.x)/s0.x,f0=(t0.top+o0.y)/s0.y,l0=t0.width/s0.x,u0=t0.height/s0.y;if(n0&&r0){const A0=getWindow$3(n0),c0=isElement$1(r0)?getWindow$3(r0):r0;let k0=A0,d0=getFrameElement(k0);for(;d0&&c0!==k0;){const h0=getScale(d0),b0=d0.getBoundingClientRect(),p0=getComputedStyle$3(d0),m0=b0.left+(d0.clientLeft+parseFloat(p0.paddingLeft))*h0.x,g0=b0.top+(d0.clientTop+parseFloat(p0.paddingTop))*h0.y;a0*=h0.x,f0*=h0.y,l0*=h0.x,u0*=h0.y,a0+=m0,f0+=g0,k0=getWindow$3(d0),d0=getFrameElement(k0)}}return rectToClientRect$1({width:l0,height:u0,x:a0,y:f0})}function getWindowScrollBarX$1(e0,_e){const i0=getNodeScroll$1(e0).scrollLeft;return _e?_e.left+i0:getBoundingClientRect$1(getDocumentElement$1(e0)).left+i0}function getHTMLOffset(e0,_e){const i0=e0.getBoundingClientRect(),r0=i0.left+_e.scrollLeft-getWindowScrollBarX$1(e0,i0),t0=i0.top+_e.scrollTop;return{x:r0,y:t0}}function convertOffsetParentRelativeRectToViewportRelativeRect(e0){let{elements:_e,rect:i0,offsetParent:r0,strategy:t0}=e0;const n0=t0==="fixed",s0=getDocumentElement$1(r0),o0=_e?isTopLayer(_e.floating):!1;if(r0===s0||o0&&n0)return i0;let a0={scrollLeft:0,scrollTop:0},f0=createCoords(1);const l0=createCoords(0),u0=isHTMLElement$3(r0);if((u0||!n0)&&((getNodeName$1(r0)!=="body"||isOverflowElement(s0))&&(a0=getNodeScroll$1(r0)),u0)){const c0=getBoundingClientRect$1(r0);f0=getScale(r0),l0.x=c0.x+r0.clientLeft,l0.y=c0.y+r0.clientTop}const A0=s0&&!u0&&!n0?getHTMLOffset(s0,a0):createCoords(0);return{width:i0.width*f0.x,height:i0.height*f0.y,x:i0.x*f0.x-a0.scrollLeft*f0.x+l0.x+A0.x,y:i0.y*f0.y-a0.scrollTop*f0.y+l0.y+A0.y}}function getClientRects(e0){return e0.getClientRects?Array.from(e0.getClientRects()):[]}function getDocumentRect$1(e0){const _e=getNodeScroll$1(e0),i0=e0.ownerDocument.body,r0=max$1(e0.scrollWidth,e0.clientWidth,i0.scrollWidth,i0.clientWidth),t0=max$1(e0.scrollHeight,e0.clientHeight,i0.scrollHeight,i0.clientHeight);let n0=-_e.scrollLeft+getWindowScrollBarX$1(e0);const s0=-_e.scrollTop;return getComputedStyle$3(i0).direction==="rtl"&&(n0+=max$1(e0.clientWidth,i0.clientWidth)-r0),{width:r0,height:t0,x:n0,y:s0}}const SCROLLBAR_MAX=25;function getViewportRect$1(e0,_e,i0){i0===void 0&&(i0="viewport");const r0=i0==="layoutViewport",t0=getWindow$3(e0),n0=getDocumentElement$1(e0),s0=t0.visualViewport;let o0=n0.clientWidth,a0=n0.clientHeight,f0=0,l0=0;if(s0){const A0=!isWebKit()||_e==="fixed";r0?A0||(f0=-s0.offsetLeft,l0=-s0.offsetTop):(o0=s0.width,a0=s0.height,A0&&(f0=s0.offsetLeft,l0=s0.offsetTop))}if(getWindowScrollBarX$1(n0)<=0){const A0=n0.ownerDocument,c0=A0.body,k0=getComputedStyle(c0),d0=A0.compatMode==="CSS1Compat"&&parseFloat(k0.marginLeft)+parseFloat(k0.marginRight)||0,h0=Math.abs(n0.clientWidth-c0.clientWidth-d0),b0=getComputedStyle(n0).scrollbarGutter==="stable both-edges"?h0/2:h0;b0<=SCROLLBAR_MAX&&(o0-=b0)}return{width:o0,height:a0,x:f0,y:l0}}function getInnerBoundingClientRect$1(e0,_e){const i0=getBoundingClientRect$1(e0,!0,_e==="fixed"),r0=i0.top+e0.clientTop,t0=i0.left+e0.clientLeft,n0=getScale(e0),s0=e0.clientWidth*n0.x,o0=e0.clientHeight*n0.y,a0=t0*n0.x,f0=r0*n0.y;return{width:s0,height:o0,x:a0,y:f0}}function getClientRectFromClippingAncestor(e0,_e,i0){let r0;if(_e==="viewport"||_e==="layoutViewport")r0=getViewportRect$1(e0,i0,_e);else if(_e==="document")r0=getDocumentRect$1(getDocumentElement$1(e0));else if(isElement$1(_e))r0=getInnerBoundingClientRect$1(_e,i0);else{const t0=getVisualOffsets(e0);r0={x:_e.x-t0.x,y:_e.y-t0.y,width:_e.width,height:_e.height}}return rectToClientRect$1(r0)}function getClippingElementAncestors(e0,_e){const i0=_e.get(e0);if(i0)return i0;let r0=getOverflowAncestors(e0,[],!1).filter(o0=>isElement$1(o0)&&getNodeName$1(o0)!=="body"),t0=null;const n0=getComputedStyle$3(e0).position==="fixed";let s0=n0?getParentNode$1(e0):e0;for(;isElement$1(s0)&&!isLastTraversableNode(s0);){const o0=getComputedStyle$3(s0),a0=isContainingBlock(s0),f0=t0?t0.position:n0?"fixed":"";!a0&&(f0==="fixed"||f0==="absolute"&&o0.position==="static")?r0=r0.filter(u0=>u0!==s0):t0=o0,s0=getParentNode$1(s0)}return _e.set(e0,r0),r0}function getClippingRect$1(e0){let{element:_e,boundary:i0,rootBoundary:r0,strategy:t0}=e0;const s0=[...i0==="clippingAncestors"?isTopLayer(_e)?[]:getClippingElementAncestors(_e,this._c):[].concat(i0),r0],o0=getClientRectFromClippingAncestor(_e,s0[0],t0);let a0=o0.top,f0=o0.right,l0=o0.bottom,u0=o0.left;for(let A0=1;A0<s0.length;A0++){const c0=getClientRectFromClippingAncestor(_e,s0[A0],t0);a0=max$1(c0.top,a0),f0=min$1(c0.right,f0),l0=min$1(c0.bottom,l0),u0=max$1(c0.left,u0)}return{width:f0-u0,height:l0-a0,x:u0,y:a0}}function getDimensions(e0){const{width:_e,height:i0}=getCssDimensions(e0);return{width:_e,height:i0}}function getRectRelativeToOffsetParent(e0,_e,i0){const r0=isHTMLElement$3(_e),t0=getDocumentElement$1(_e),n0=i0==="fixed",s0=getBoundingClientRect$1(e0,!0,n0,_e);let o0={scrollLeft:0,scrollTop:0};const a0=createCoords(0);if((r0||!n0)&&((getNodeName$1(_e)!=="body"||isOverflowElement(t0))&&(o0=getNodeScroll$1(_e)),r0)){const A0=getBoundingClientRect$1(_e,!0,n0,_e);a0.x=A0.x+_e.clientLeft,a0.y=A0.y+_e.clientTop}!r0&&t0&&(a0.x=getWindowScrollBarX$1(t0));const f0=t0&&!r0&&!n0?getHTMLOffset(t0,o0):createCoords(0),l0=s0.left+o0.scrollLeft-a0.x-f0.x,u0=s0.top+o0.scrollTop-a0.y-f0.y;return{x:l0,y:u0,width:s0.width,height:s0.height}}function isStaticPositioned(e0){return getComputedStyle$3(e0).position==="static"}function getTrueOffsetParent$1(e0,_e){if(!isHTMLElement$3(e0)||getComputedStyle$3(e0).position==="fixed")return null;if(_e)return _e(e0);let i0=e0.offsetParent;return getDocumentElement$1(e0)===i0&&(i0=i0.ownerDocument.body),i0}function getOffsetParent$1(e0,_e){const i0=getWindow$3(e0);if(isTopLayer(e0))return i0;if(!isHTMLElement$3(e0)){let t0=getParentNode$1(e0);for(;t0&&!isLastTraversableNode(t0);){if(isElement$1(t0)&&!isStaticPositioned(t0))return t0;t0=getParentNode$1(t0)}return i0}let r0=getTrueOffsetParent$1(e0,_e);for(;r0&&isTableElement$1(r0)&&isStaticPositioned(r0);)r0=getTrueOffsetParent$1(r0,_e);return r0&&isLastTraversableNode(r0)&&isStaticPositioned(r0)&&!isContainingBlock(r0)?i0:r0||getContainingBlock$1(e0)||i0}const getElementRects=async function(e0){const _e=this.getOffsetParent||getOffsetParent$1,i0=this.getDimensions,r0=await i0(e0.floating);return{reference:getRectRelativeToOffsetParent(e0.reference,await _e(e0.floating),e0.strategy),floating:{x:0,y:0,width:r0.width,height:r0.height}}};function isRTL(e0){return getComputedStyle$3(e0).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement:getDocumentElement$1,getClippingRect:getClippingRect$1,getOffsetParent:getOffsetParent$1,getElementRects,getClientRects,getDimensions,getScale,isElement:isElement$1,isRTL};function rectsAreEqual(e0,_e){return e0.x===_e.x&&e0.y===_e.y&&e0.width===_e.width&&e0.height===_e.height}function observeMove(e0,_e,i0){let r0=null,t0;const n0=getDocumentElement$1(e0);function s0(){var l0;clearTimeout(t0),(l0=r0)==null||l0.disconnect(),r0=null}function o0(l0,u0){l0===void 0&&(l0=!1),u0===void 0&&(u0=1),s0();const A0=e0.getBoundingClientRect(),{left:c0,top:k0,width:d0,height:h0}=A0;if(l0||_e(),!d0||!h0)return;const b0=floor(k0),p0=floor(n0.clientWidth-(c0+d0)),m0=floor(n0.clientHeight-(k0+h0)),g0=floor(c0),w0={rootMargin:-b0+"px "+-p0+"px "+-m0+"px "+-g0+"px",threshold:max$1(0,min$1(1,u0))||1};let x0=!0;function _0(y0){const S0=y0[0].intersectionRatio;if(!rectsAreEqual(A0,e0.getBoundingClientRect()))return o0();if(S0!==u0){if(!x0)return o0();S0?o0(!1,S0):t0=setTimeout(()=>{o0(!1,1e-7)},1e3)}x0=!1}try{r0=new IntersectionObserver(_0,{...w0,root:n0.ownerDocument})}catch{r0=new IntersectionObserver(_0,w0)}r0.observe(e0)}const a0=getWindow$3(e0),f0=()=>o0(i0);return a0.addEventListener("resize",f0),o0(!0),()=>{a0.removeEventListener("resize",f0),s0()}}function autoUpdate(e0,_e,i0,r0){r0===void 0&&(r0={});const{ancestorScroll:t0=!0,ancestorResize:n0=!0,elementResize:s0=typeof ResizeObserver=="function",layoutShift:o0=typeof IntersectionObserver=="function",animationFrame:a0=!1}=r0,f0=unwrapElement(e0),l0=t0||n0?[...f0?getOverflowAncestors(f0):[],..._e?getOverflowAncestors(_e):[]]:[];l0.forEach(b0=>{t0&&b0.addEventListener("scroll",i0),n0&&b0.addEventListener("resize",i0)});const u0=f0&&o0?observeMove(f0,i0,n0):null;let A0=-1,c0=null;s0&&(c0=new ResizeObserver(b0=>{let[p0]=b0;p0&&p0.target===f0&&c0&&_e&&(c0.unobserve(_e),cancelAnimationFrame(A0),A0=requestAnimationFrame(()=>{var m0;(m0=c0)==null||m0.observe(_e)})),i0()}),f0&&!a0&&c0.observe(f0),_e&&c0.observe(_e));let k0,d0=a0?getBoundingClientRect$1(e0):null;a0&&h0();function h0(){const b0=getBoundingClientRect$1(e0);d0&&!rectsAreEqual(d0,b0)&&i0(),d0=b0,k0=requestAnimationFrame(h0)}return i0(),()=>{var b0;l0.forEach(p0=>{t0&&p0.removeEventListener("scroll",i0),n0&&p0.removeEventListener("resize",i0)}),u0==null||u0(),(b0=c0)==null||b0.disconnect(),c0=null,a0&&cancelAnimationFrame(k0)}}const offset$3=offset$4,flip$3=flip$4,size$1=size$2,computePosition=(e0,_e,i0)=>{const r0=new Map,t0=i0??{},n0={...platform,...t0.platform,_c:r0};return computePosition$1(e0,_e,{...t0,platform:n0})};var isClient=typeof document<"u",noop$4=function e0(){},index$1=isClient?reactExports.useLayoutEffect:noop$4;function deepEqual$1(e0,_e){if(e0===_e)return!0;if(typeof e0!=typeof _e)return!1;if(typeof e0=="function"&&e0.toString()===_e.toString())return!0;let i0,r0,t0;if(e0&&_e&&typeof e0=="object"){if(Array.isArray(e0)){if(i0=e0.length,i0!==_e.length)return!1;for(r0=i0;r0--!==0;)if(!deepEqual$1(e0[r0],_e[r0]))return!1;return!0}if(t0=Object.keys(e0),i0=t0.length,i0!==Object.keys(_e).length)return!1;for(r0=i0;r0--!==0;)if(!{}.hasOwnProperty.call(_e,t0[r0]))return!1;for(r0=i0;r0--!==0;){const n0=t0[r0];if(!(n0==="_owner"&&e0.$$typeof)&&!deepEqual$1(e0[n0],_e[n0]))return!1}return!0}return e0!==e0&&_e!==_e}function getDPR(e0){return typeof window>"u"?1:(e0.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e0,_e){const i0=getDPR(e0);return Math.round(_e*i0)/i0}function useLatestRef$1(e0){const _e=reactExports.useRef(e0);return index$1(()=>{_e.current=e0}),_e}function useFloating$1(e0){e0===void 0&&(e0={});const{placement:_e="bottom",strategy:i0="absolute",middleware:r0=[],platform:t0,elements:{reference:n0,floating:s0}={},transform:o0=!0,whileElementsMounted:a0,open:f0}=e0,[l0,u0]=reactExports.useState({x:0,y:0,strategy:i0,placement:_e,middlewareData:{},isPositioned:!1}),[A0,c0]=reactExports.useState(r0);deepEqual$1(A0,r0)||c0(r0);const[k0,d0]=reactExports.useState(null),[h0,b0]=reactExports.useState(null),p0=reactExports.useCallback(T0=>{T0!==w0.current&&(w0.current=T0,d0(T0))},[]),m0=reactExports.useCallback(T0=>{T0!==x0.current&&(x0.current=T0,b0(T0))},[]),g0=n0||k0,v0=s0||h0,w0=reactExports.useRef(null),x0=reactExports.useRef(null),_0=reactExports.useRef(l0),y0=a0!=null,S0=useLatestRef$1(a0),B0=useLatestRef$1(t0),I0=useLatestRef$1(f0),F0=reactExports.useCallback(()=>{if(!w0.current||!x0.current)return;const T0={placement:_e,strategy:i0,middleware:A0};B0.current&&(T0.platform=B0.current),computePosition(w0.current,x0.current,T0).then(G0=>{const j0={...G0,isPositioned:I0.current!==!1};C0.current&&!deepEqual$1(_0.current,j0)&&(_0.current=j0,reactDomExports.flushSync(()=>{u0(j0)}))})},[A0,_e,i0,B0,I0]);index$1(()=>{f0===!1&&_0.current.isPositioned&&(_0.current.isPositioned=!1,u0(T0=>({...T0,isPositioned:!1})))},[f0]);const C0=reactExports.useRef(!1);index$1(()=>(C0.current=!0,()=>{C0.current=!1}),[]),index$1(()=>{if(g0&&(w0.current=g0),v0&&(x0.current=v0),g0&&v0){if(S0.current)return S0.current(g0,v0,F0);F0()}},[g0,v0,F0,S0,y0]);const E0=reactExports.useMemo(()=>({reference:w0,floating:x0,setReference:p0,setFloating:m0}),[p0,m0]),R0=reactExports.useMemo(()=>({reference:g0,floating:v0}),[g0,v0]),M0=reactExports.useMemo(()=>{const T0={position:i0,left:0,top:0};if(!R0.floating)return T0;const G0=roundByDPR(R0.floating,l0.x),j0=roundByDPR(R0.floating,l0.y);return o0?{...T0,transform:"translate("+G0+"px, "+j0+"px)",...getDPR(R0.floating)>=1.5&&{willChange:"transform"}}:{position:i0,left:G0,top:j0}},[i0,o0,R0.floating,l0.x,l0.y]);return reactExports.useMemo(()=>({...l0,update:F0,refs:E0,elements:R0,floatingStyles:M0}),[l0,F0,E0,R0,M0])}const offset$2=(e0,_e)=>{const i0=offset$3(e0);return{name:i0.name,fn:i0.fn,options:[e0,_e]}},flip$2=(e0,_e)=>{const i0=flip$3(e0);return{name:i0.name,fn:i0.fn,options:[e0,_e]}},size=(e0,_e)=>{const i0=size$1(e0);return{name:i0.name,fn:i0.fn,options:[e0,_e]}};var index=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;let serverHandoffComplete=!1,count$1=0;const genId=()=>"floating-ui-"+count$1++;function useFloatingId(){const[e0,_e]=reactExports.useState(()=>serverHandoffComplete?genId():void 0);return index(()=>{e0==null&&_e(genId())},[]),reactExports.useEffect(()=>{serverHandoffComplete||(serverHandoffComplete=!0)},[]),e0}const useReactId=React$5.useId,useId$1=useReactId||useFloatingId;function createPubSub(){const e0=new Map;return{emit(_e,i0){var r0;(r0=e0.get(_e))==null||r0.forEach(t0=>t0(i0))},on(_e,i0){e0.set(_e,[...e0.get(_e)||[],i0])},off(_e,i0){var r0;e0.set(_e,((r0=e0.get(_e))==null?void 0:r0.filter(t0=>t0!==i0))||[])}}}const FloatingNodeContext=reactExports.createContext(null),FloatingTreeContext=reactExports.createContext(null),useFloatingParentNodeId=()=>{var e0;return((e0=reactExports.useContext(FloatingNodeContext))==null?void 0:e0.id)||null},useFloatingTree=()=>reactExports.useContext(FloatingTreeContext);function createAttribute(e0){return"data-floating-ui-"+e0}function useLatestRef(e0){const _e=reactExports.useRef(e0);return index(()=>{_e.current=e0}),_e}const safePolygonIdentifier=createAttribute("safe-polygon");function getDelay(e0,_e,i0){return i0&&!isMouseLikePointerType(i0)?0:typeof e0=="number"?e0:e0==null?void 0:e0[_e]}function useHover$1(e0,_e){_e===void 0&&(_e={});const{open:i0,onOpenChange:r0,dataRef:t0,events:n0,elements:{domReference:s0,floating:o0},refs:a0}=e0,{enabled:f0=!0,delay:l0=0,handleClose:u0=null,mouseOnly:A0=!1,restMs:c0=0,move:k0=!0}=_e,d0=useFloatingTree(),h0=useFloatingParentNodeId(),b0=useLatestRef(u0),p0=useLatestRef(l0),m0=reactExports.useRef(),g0=reactExports.useRef(),v0=reactExports.useRef(),w0=reactExports.useRef(),x0=reactExports.useRef(!0),_0=reactExports.useRef(!1),y0=reactExports.useRef(()=>{}),S0=reactExports.useCallback(()=>{var C0;const E0=(C0=t0.current.openEvent)==null?void 0:C0.type;return(E0==null?void 0:E0.includes("mouse"))&&E0!=="mousedown"},[t0]);reactExports.useEffect(()=>{if(!f0)return;function C0(){clearTimeout(g0.current),clearTimeout(w0.current),x0.current=!0}return n0.on("dismiss",C0),()=>{n0.off("dismiss",C0)}},[f0,n0]),reactExports.useEffect(()=>{if(!f0||!b0.current||!i0)return;function C0(R0){S0()&&r0(!1,R0)}const E0=getDocument$1(o0).documentElement;return E0.addEventListener("mouseleave",C0),()=>{E0.removeEventListener("mouseleave",C0)}},[o0,i0,r0,f0,b0,t0,S0]);const B0=reactExports.useCallback(function(C0,E0){E0===void 0&&(E0=!0);const R0=getDelay(p0.current,"close",m0.current);R0&&!v0.current?(clearTimeout(g0.current),g0.current=setTimeout(()=>r0(!1,C0),R0)):E0&&(clearTimeout(g0.current),r0(!1,C0))},[p0,r0]),I0=reactExports.useCallback(()=>{y0.current(),v0.current=void 0},[]),F0=reactExports.useCallback(()=>{if(_0.current){const C0=getDocument$1(a0.floating.current).body;C0.style.pointerEvents="",C0.removeAttribute(safePolygonIdentifier),_0.current=!1}},[a0]);return reactExports.useEffect(()=>{if(!f0)return;function C0(){return t0.current.openEvent?["click","mousedown"].includes(t0.current.openEvent.type):!1}function E0(T0){if(clearTimeout(g0.current),x0.current=!1,A0&&!isMouseLikePointerType(m0.current)||c0>0&&getDelay(p0.current,"open")===0)return;const G0=getDelay(p0.current,"open",m0.current);G0?g0.current=setTimeout(()=>{r0(!0,T0)},G0):r0(!0,T0)}function R0(T0){if(C0())return;y0.current();const G0=getDocument$1(o0);if(clearTimeout(w0.current),b0.current){i0||clearTimeout(g0.current),v0.current=b0.current({...e0,tree:d0,x:T0.clientX,y:T0.clientY,onClose(){F0(),I0(),B0(T0)}});const N0=v0.current;G0.addEventListener("mousemove",N0),y0.current=()=>{G0.removeEventListener("mousemove",N0)};return}(m0.current==="touch"?!contains$2(o0,T0.relatedTarget):!0)&&B0(T0)}function M0(T0){C0()||b0.current==null||b0.current({...e0,tree:d0,x:T0.clientX,y:T0.clientY,onClose(){F0(),I0(),B0(T0)}})(T0)}if(isElement$2(s0)){const T0=s0;return i0&&T0.addEventListener("mouseleave",M0),o0==null||o0.addEventListener("mouseleave",M0),k0&&T0.addEventListener("mousemove",E0,{once:!0}),T0.addEventListener("mouseenter",E0),T0.addEventListener("mouseleave",R0),()=>{i0&&T0.removeEventListener("mouseleave",M0),o0==null||o0.removeEventListener("mouseleave",M0),k0&&T0.removeEventListener("mousemove",E0),T0.removeEventListener("mouseenter",E0),T0.removeEventListener("mouseleave",R0)}}},[s0,o0,f0,e0,A0,c0,k0,B0,I0,F0,r0,i0,d0,p0,b0,t0]),index(()=>{var C0;if(f0&&i0&&(C0=b0.current)!=null&&C0.__options.blockPointerEvents&&S0()){const M0=getDocument$1(o0).body;if(M0.setAttribute(safePolygonIdentifier,""),M0.style.pointerEvents="none",_0.current=!0,isElement$2(s0)&&o0){var E0,R0;const T0=s0,G0=d0==null||(E0=d0.nodesRef.current.find(j0=>j0.id===h0))==null||(R0=E0.context)==null?void 0:R0.elements.floating;return G0&&(G0.style.pointerEvents=""),T0.style.pointerEvents="auto",o0.style.pointerEvents="auto",()=>{T0.style.pointerEvents="",o0.style.pointerEvents=""}}}},[f0,i0,h0,o0,s0,d0,b0,t0,S0]),index(()=>{i0||(m0.current=void 0,I0(),F0())},[i0,I0,F0]),reactExports.useEffect(()=>()=>{I0(),clearTimeout(g0.current),clearTimeout(w0.current),F0()},[f0,s0,I0,F0]),reactExports.useMemo(()=>{if(!f0)return{};function C0(E0){m0.current=E0.pointerType}return{reference:{onPointerDown:C0,onPointerEnter:C0,onMouseMove(E0){i0||c0===0||(clearTimeout(w0.current),w0.current=setTimeout(()=>{x0.current||r0(!0,E0.nativeEvent)},c0))}},floating:{onMouseEnter(){clearTimeout(g0.current)},onMouseLeave(E0){n0.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),B0(E0.nativeEvent,!1)}}}},[n0,f0,c0,i0,r0,B0])}function getChildren$1(e0,_e){let i0=e0.filter(t0=>{var n0;return t0.parentId===_e&&((n0=t0.context)==null?void 0:n0.open)}),r0=i0;for(;r0.length;)r0=e0.filter(t0=>{var n0;return(n0=r0)==null?void 0:n0.some(s0=>{var o0;return t0.parentId===s0.id&&((o0=t0.context)==null?void 0:o0.open)})}),i0=i0.concat(r0);return i0}function isButtonTarget(e0){return isHTMLElement$4(e0.target)&&e0.target.tagName==="BUTTON"}function isSpaceIgnored(e0){return isTypeableElement(e0)}function useClick(e0,_e){_e===void 0&&(_e={});const{open:i0,onOpenChange:r0,dataRef:t0,elements:{domReference:n0}}=e0,{enabled:s0=!0,event:o0="click",toggle:a0=!0,ignoreMouse:f0=!1,keyboardHandlers:l0=!0}=_e,u0=reactExports.useRef(),A0=reactExports.useRef(!1);return reactExports.useMemo(()=>s0?{reference:{onPointerDown(c0){u0.current=c0.pointerType},onMouseDown(c0){c0.button===0&&(isMouseLikePointerType(u0.current,!0)&&f0||o0!=="click"&&(i0&&a0&&(!t0.current.openEvent||t0.current.openEvent.type==="mousedown")?r0(!1,c0.nativeEvent):(c0.preventDefault(),r0(!0,c0.nativeEvent))))},onClick(c0){if(o0==="mousedown"&&u0.current){u0.current=void 0;return}isMouseLikePointerType(u0.current,!0)&&f0||(i0&&a0&&(!t0.current.openEvent||t0.current.openEvent.type==="click")?r0(!1,c0.nativeEvent):r0(!0,c0.nativeEvent))},onKeyDown(c0){u0.current=void 0,!(c0.defaultPrevented||!l0||isButtonTarget(c0))&&(c0.key===" "&&!isSpaceIgnored(n0)&&(c0.preventDefault(),A0.current=!0),c0.key==="Enter"&&r0(!(i0&&a0),c0.nativeEvent))},onKeyUp(c0){c0.defaultPrevented||!l0||isButtonTarget(c0)||isSpaceIgnored(n0)||c0.key===" "&&A0.current&&(A0.current=!1,r0(!(i0&&a0),c0.nativeEvent))}}}:{},[s0,t0,o0,f0,l0,n0,a0,i0,r0])}const useInsertionEffect$2=React$5.useInsertionEffect,useSafeInsertionEffect=useInsertionEffect$2||(e0=>e0());function useEffectEvent(e0){const _e=reactExports.useRef(()=>{});return useSafeInsertionEffect(()=>{_e.current=e0}),reactExports.useCallback(function(){for(var i0=arguments.length,r0=new Array(i0),t0=0;t0<i0;t0++)r0[t0]=arguments[t0];return _e.current==null?void 0:_e.current(...r0)},[])}const bubbleHandlerKeys={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},captureHandlerKeys={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},normalizeBubblesProp=e0=>{var _e,i0;return{escapeKeyBubbles:typeof e0=="boolean"?e0:(_e=e0==null?void 0:e0.escapeKey)!=null?_e:!1,outsidePressBubbles:typeof e0=="boolean"?e0:(i0=e0==null?void 0:e0.outsidePress)!=null?i0:!0}};function useDismiss(e0,_e){_e===void 0&&(_e={});const{open:i0,onOpenChange:r0,events:t0,nodeId:n0,elements:{reference:s0,domReference:o0,floating:a0},dataRef:f0}=e0,{enabled:l0=!0,escapeKey:u0=!0,outsidePress:A0=!0,outsidePressEvent:c0="pointerdown",referencePress:k0=!1,referencePressEvent:d0="pointerdown",ancestorScroll:h0=!1,bubbles:b0}=_e,p0=useFloatingTree(),m0=useFloatingParentNodeId()!=null,g0=useEffectEvent(typeof A0=="function"?A0:()=>!1),v0=typeof A0=="function"?g0:A0,w0=reactExports.useRef(!1),x0=reactExports.useRef(!1),{escapeKeyBubbles:_0,outsidePressBubbles:y0}=normalizeBubblesProp(b0),S0=useEffectEvent(I0=>{if(!i0||!l0||!u0||I0.key!=="Escape")return;const F0=p0?getChildren$1(p0.nodesRef.current,n0):[];if(!_0&&(I0.stopPropagation(),F0.length>0)){let C0=!0;if(F0.forEach(E0=>{var R0;if((R0=E0.context)!=null&&R0.open&&!E0.context.dataRef.current.__escapeKeyBubbles){C0=!1;return}}),!C0)return}t0.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r0(!1,isReactEvent(I0)?I0.nativeEvent:I0)}),B0=useEffectEvent(I0=>{const F0=w0.current;w0.current=!1;const C0=x0.current;if(x0.current=!1,c0==="click"&&C0||F0||typeof v0=="function"&&!v0(I0))return;const E0=getTarget(I0),R0="["+createAttribute("inert")+"]",M0=getDocument$1(a0).querySelectorAll(R0);let T0=isElement$2(E0)?E0:null;for(;T0&&!isLastTraversableNode$1(T0);){const N0=getParentNode$2(T0);if(N0===getDocument$1(a0).body||!isElement$2(N0))break;T0=N0}if(M0.length&&isElement$2(E0)&&!isRootElement(E0)&&!contains$2(E0,a0)&&Array.from(M0).every(N0=>!contains$2(T0,N0)))return;if(isHTMLElement$4(E0)&&a0){const N0=E0.clientWidth>0&&E0.scrollWidth>E0.clientWidth,O0=E0.clientHeight>0&&E0.scrollHeight>E0.clientHeight;let Y0=O0&&I0.offsetX>E0.clientWidth;if(O0&&getComputedStyle$4(E0).direction==="rtl"&&(Y0=I0.offsetX<=E0.offsetWidth-E0.clientWidth),Y0||N0&&I0.offsetY>E0.clientHeight)return}const G0=p0&&getChildren$1(p0.nodesRef.current,n0).some(N0=>{var O0;return isEventTargetWithin(I0,(O0=N0.context)==null?void 0:O0.elements.floating)});if(isEventTargetWithin(I0,a0)||isEventTargetWithin(I0,o0)||G0)return;const j0=p0?getChildren$1(p0.nodesRef.current,n0):[];if(j0.length>0){let N0=!0;if(j0.forEach(O0=>{var Y0;if((Y0=O0.context)!=null&&Y0.open&&!O0.context.dataRef.current.__outsidePressBubbles){N0=!1;return}}),!N0)return}t0.emit("dismiss",{type:"outsidePress",data:{returnFocus:m0?{preventScroll:!0}:isVirtualClick(I0)||isVirtualPointerEvent(I0)}}),r0(!1,I0)});return reactExports.useEffect(()=>{if(!i0||!l0)return;f0.current.__escapeKeyBubbles=_0,f0.current.__outsidePressBubbles=y0;function I0(E0){r0(!1,E0)}const F0=getDocument$1(a0);u0&&F0.addEventListener("keydown",S0),v0&&F0.addEventListener(c0,B0);let C0=[];return h0&&(isElement$2(o0)&&(C0=getOverflowAncestors(o0)),isElement$2(a0)&&(C0=C0.concat(getOverflowAncestors(a0))),!isElement$2(s0)&&s0&&s0.contextElement&&(C0=C0.concat(getOverflowAncestors(s0.contextElement)))),C0=C0.filter(E0=>{var R0;return E0!==((R0=F0.defaultView)==null?void 0:R0.visualViewport)}),C0.forEach(E0=>{E0.addEventListener("scroll",I0,{passive:!0})}),()=>{u0&&F0.removeEventListener("keydown",S0),v0&&F0.removeEventListener(c0,B0),C0.forEach(E0=>{E0.removeEventListener("scroll",I0)})}},[f0,a0,o0,s0,u0,v0,c0,i0,r0,h0,l0,_0,y0,S0,B0]),reactExports.useEffect(()=>{w0.current=!1},[v0,c0]),reactExports.useMemo(()=>l0?{reference:{onKeyDown:S0,[bubbleHandlerKeys[d0]]:I0=>{k0&&(t0.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r0(!1,I0.nativeEvent))}},floating:{onKeyDown:S0,onMouseDown(){x0.current=!0},onMouseUp(){x0.current=!0},[captureHandlerKeys[c0]]:()=>{w0.current=!0}}}:{},[l0,t0,k0,c0,d0,r0,S0])}function useFloating(e0){var _e;e0===void 0&&(e0={});const{open:i0=!1,onOpenChange:r0,nodeId:t0}=e0,[n0,s0]=reactExports.useState(null),o0=((_e=e0.elements)==null?void 0:_e.reference)||n0,a0=useFloating$1(e0),f0=useFloatingTree(),l0=useEffectEvent((g0,v0)=>{g0&&(A0.current.openEvent=v0),r0==null||r0(g0,v0)}),u0=reactExports.useRef(null),A0=reactExports.useRef({}),c0=reactExports.useState(()=>createPubSub())[0],k0=useId$1(),d0=reactExports.useCallback(g0=>{const v0=isElement$2(g0)?{getBoundingClientRect:()=>g0.getBoundingClientRect(),contextElement:g0}:g0;a0.refs.setReference(v0)},[a0.refs]),h0=reactExports.useCallback(g0=>{(isElement$2(g0)||g0===null)&&(u0.current=g0,s0(g0)),(isElement$2(a0.refs.reference.current)||a0.refs.reference.current===null||g0!==null&&!isElement$2(g0))&&a0.refs.setReference(g0)},[a0.refs]),b0=reactExports.useMemo(()=>({...a0.refs,setReference:h0,setPositionReference:d0,domReference:u0}),[a0.refs,h0,d0]),p0=reactExports.useMemo(()=>({...a0.elements,domReference:o0}),[a0.elements,o0]),m0=reactExports.useMemo(()=>({...a0,refs:b0,elements:p0,dataRef:A0,nodeId:t0,floatingId:k0,events:c0,open:i0,onOpenChange:l0}),[a0,t0,k0,c0,i0,l0,b0,p0]);return index(()=>{const g0=f0==null?void 0:f0.nodesRef.current.find(v0=>v0.id===t0);g0&&(g0.context=m0)}),reactExports.useMemo(()=>({...a0,context:m0,refs:b0,elements:p0}),[a0,b0,p0,m0])}function useFocus(e0,_e){_e===void 0&&(_e={});const{open:i0,onOpenChange:r0,events:t0,refs:n0,elements:{floating:s0,domReference:o0}}=e0,{enabled:a0=!0,visibleOnly:f0=!0}=_e,l0=reactExports.useRef(!1),u0=reactExports.useRef(),A0=reactExports.useRef(!1);return reactExports.useEffect(()=>{if(!a0)return;const c0=getWindow$4(o0);function k0(){!i0&&isHTMLElement$4(o0)&&o0===activeElement(getDocument$1(o0))&&(l0.current=!0)}function d0(){A0.current=!0}return c0.addEventListener("blur",k0),c0.addEventListener("keydown",d0,!0),()=>{c0.removeEventListener("blur",k0),c0.removeEventListener("keydown",d0,!0)}},[s0,o0,i0,a0]),reactExports.useEffect(()=>{if(!a0)return;function c0(k0){(k0.type==="referencePress"||k0.type==="escapeKey")&&(l0.current=!0)}return t0.on("dismiss",c0),()=>{t0.off("dismiss",c0)}},[t0,a0]),reactExports.useEffect(()=>()=>{clearTimeout(u0.current)},[]),reactExports.useMemo(()=>a0?{reference:{onPointerDown(){A0.current=!1},onMouseLeave(){l0.current=!1},onFocus(c0){if(l0.current)return;const k0=getTarget(c0.nativeEvent);if(f0&&isElement$2(k0))try{if(isSafari$1())throw Error();if(!k0.matches(":focus-visible"))return}catch{if(!A0.current&&!isTypeableElement(k0))return}r0(!0,c0.nativeEvent)},onBlur(c0){l0.current=!1;const k0=c0.relatedTarget,d0=isElement$2(k0)&&k0.hasAttribute(createAttribute("focus-guard"))&&k0.getAttribute("data-type")==="outside";u0.current=window.setTimeout(()=>{const h0=activeElement(o0?o0.ownerDocument:document);!k0&&h0===o0||contains$2(n0.floating.current,k0)||contains$2(o0,k0)||d0||r0(!1,c0.nativeEvent)})}}}:{},[a0,f0,o0,n0,r0])}function mergeProps(e0,_e,i0){const r0=new Map;return{...i0==="floating"&&{tabIndex:-1},...e0,..._e.map(t0=>t0?t0[i0]:null).concat(e0).reduce((t0,n0)=>(n0&&Object.entries(n0).forEach(s0=>{let[o0,a0]=s0;if(o0.indexOf("on")===0){if(r0.has(o0)||r0.set(o0,[]),typeof a0=="function"){var f0;(f0=r0.get(o0))==null||f0.push(a0),t0[o0]=function(){for(var l0,u0=arguments.length,A0=new Array(u0),c0=0;c0<u0;c0++)A0[c0]=arguments[c0];return(l0=r0.get(o0))==null?void 0:l0.map(k0=>k0(...A0)).find(k0=>k0!==void 0)}}}else t0[o0]=a0}),t0),{})}}function useInteractions(e0){e0===void 0&&(e0=[]);const _e=e0,i0=reactExports.useCallback(n0=>mergeProps(n0,e0,"reference"),_e),r0=reactExports.useCallback(n0=>mergeProps(n0,e0,"floating"),_e),t0=reactExports.useCallback(n0=>mergeProps(n0,e0,"item"),e0.map(n0=>n0==null?void 0:n0.item));return reactExports.useMemo(()=>({getReferenceProps:i0,getFloatingProps:r0,getItemProps:t0}),[i0,r0,t0])}function isPointInPolygon(e0,_e){const[i0,r0]=e0;let t0=!1;const n0=_e.length;for(let s0=0,o0=n0-1;s0<n0;o0=s0++){const[a0,f0]=_e[s0]||[0,0],[l0,u0]=_e[o0]||[0,0];f0>=r0!=u0>=r0&&i0<=(l0-a0)*(r0-f0)/(u0-f0)+a0&&(t0=!t0)}return t0}function isInside(e0,_e){return e0[0]>=_e.x&&e0[0]<=_e.x+_e.width&&e0[1]>=_e.y&&e0[1]<=_e.y+_e.height}function safePolygon(e0){e0===void 0&&(e0={});const{buffer:_e=.5,blockPointerEvents:i0=!1,requireIntent:r0=!0}=e0;let t0,n0=!1,s0=null,o0=null,a0=performance.now();function f0(u0,A0){const c0=performance.now(),k0=c0-a0;if(s0===null||o0===null||k0===0)return s0=u0,o0=A0,a0=c0,null;const d0=u0-s0,h0=A0-o0,p0=Math.sqrt(d0*d0+h0*h0)/k0;return s0=u0,o0=A0,a0=c0,p0}const l0=u0=>{let{x:A0,y:c0,placement:k0,elements:d0,onClose:h0,nodeId:b0,tree:p0}=u0;return function(g0){function v0(){clearTimeout(t0),h0()}if(clearTimeout(t0),!d0.domReference||!d0.floating||k0==null||A0==null||c0==null)return;const{clientX:w0,clientY:x0}=g0,_0=[w0,x0],y0=getTarget(g0),S0=g0.type==="mouseleave",B0=contains$2(d0.floating,y0),I0=contains$2(d0.domReference,y0),F0=d0.domReference.getBoundingClientRect(),C0=d0.floating.getBoundingClientRect(),E0=k0.split("-")[0],R0=A0>C0.right-C0.width/2,M0=c0>C0.bottom-C0.height/2,T0=isInside(_0,F0),G0=C0.width>F0.width,j0=C0.height>F0.height,N0=(G0?F0:C0).left,O0=(G0?F0:C0).right,Y0=(j0?F0:C0).top,D0=(j0?F0:C0).bottom;if(B0&&(n0=!0,!S0))return;if(I0&&(n0=!1),I0&&!S0){n0=!0;return}if(S0&&isElement$2(g0.relatedTarget)&&contains$2(d0.floating,g0.relatedTarget)||p0&&getChildren$1(p0.nodesRef.current,b0).some(K0=>{let{context:e2}=K0;return e2==null?void 0:e2.open}))return;if(E0==="top"&&c0>=F0.bottom-1||E0==="bottom"&&c0<=F0.top+1||E0==="left"&&A0>=F0.right-1||E0==="right"&&A0<=F0.left+1)return v0();let $0=[];switch(E0){case"top":$0=[[N0,F0.top+1],[N0,C0.bottom-1],[O0,C0.bottom-1],[O0,F0.top+1]];break;case"bottom":$0=[[N0,C0.top+1],[N0,F0.bottom-1],[O0,F0.bottom-1],[O0,C0.top+1]];break;case"left":$0=[[C0.right-1,D0],[C0.right-1,Y0],[F0.left+1,Y0],[F0.left+1,D0]];break;case"right":$0=[[F0.right-1,D0],[F0.right-1,Y0],[C0.left+1,Y0],[C0.left+1,D0]];break}function z0(K0){let[e2,J0]=K0;switch(E0){case"top":{const _i=[G0?e2+_e/2:R0?e2+_e*4:e2-_e*4,J0+_e+1],Q0=[G0?e2-_e/2:R0?e2+_e*4:e2-_e*4,J0+_e+1],U0=[[C0.left,R0||G0?C0.bottom-_e:C0.top],[C0.right,R0?G0?C0.bottom-_e:C0.top:C0.bottom-_e]];return[_i,Q0,...U0]}case"bottom":{const _i=[G0?e2+_e/2:R0?e2+_e*4:e2-_e*4,J0-_e],Q0=[G0?e2-_e/2:R0?e2+_e*4:e2-_e*4,J0-_e],U0=[[C0.left,R0||G0?C0.top+_e:C0.bottom],[C0.right,R0?G0?C0.top+_e:C0.bottom:C0.top+_e]];return[_i,Q0,...U0]}case"left":{const _i=[e2+_e+1,j0?J0+_e/2:M0?J0+_e*4:J0-_e*4],Q0=[e2+_e+1,j0?J0-_e/2:M0?J0+_e*4:J0-_e*4];return[...[[M0||j0?C0.right-_e:C0.left,C0.top],[M0?j0?C0.right-_e:C0.left:C0.right-_e,C0.bottom]],_i,Q0]}case"right":{const _i=[e2-_e,j0?J0+_e/2:M0?J0+_e*4:J0-_e*4],Q0=[e2-_e,j0?J0-_e/2:M0?J0+_e*4:J0-_e*4],U0=[[M0||j0?C0.left+_e:C0.right,C0.top],[M0?j0?C0.left+_e:C0.right:C0.left+_e,C0.bottom]];return[_i,Q0,...U0]}}}if(!isPointInPolygon([w0,x0],$0)){if(n0&&!T0)return v0();if(!S0&&r0){const K0=f0(g0.clientX,g0.clientY);if(K0!==null&&K0<.1)return v0()}isPointInPolygon([w0,x0],z0([A0,c0]))?!n0&&r0&&(t0=window.setTimeout(v0,40)):v0()}}};return l0.__options={blockPointerEvents:i0},l0}var useDropdown=(e0,_e,i0=!1,r0=!0,t0=!0,n0=!0)=>{let s0=reactExports.useId(),[o0,a0]=reactExports.useState(!1),[f0,l0]=reactExports.useState(-1),[u0,A0]=reactExports.useState(null),c0=reactExports.useRef(null),{refs:k0,floatingStyles:d0,context:h0}=useFloating({placement:e0,open:o0,onOpenChange:a0,whileElementsMounted:autoUpdate,middleware:[offset$2(0),size({apply({rects:T0,elements:G0}){G0.floating.style.minWidth=`${T0.reference.width}px`}}),flip$2({padding:0})]});useHover$1(h0,{enabled:i0,delay:{open:200},handleClose:safePolygon()});let b0=reactExports.useRef(null),p0=reactExports.useRef(null),m0=reactExports.useRef({}),g0=()=>{var T0;l0(-1),A0(null),(T0=c0.current)==null||T0.focus({preventScroll:!0})};reactExports.useEffect(()=>{o0&&c0.current&&r0?g0():o0&&b0.current&&r0?(b0.current.focus(),l0(0)):(l0(-1),m0.current={})},[o0]),reactExports.useEffect(()=>{if(f0!==-1){let T0=Object.values(m0.current).filter(j0=>!!j0);if(f0<0||f0>=T0.length){l0(-1),A0(null);return}let G0=T0[f0];G0&&(A0(G0.getAttribute("id")),G0.focus())}},[f0]);let v0=()=>Object.values(m0.current).filter(Boolean).length,w0=()=>{let T0=Object.values(m0.current).find(Boolean);T0&&(l0(0),A0(T0.getAttribute("id")),T0.focus())},x0=()=>{if(c0.current&&document.activeElement===c0.current){w0();return}let T0=v0();T0!==0&&l0(G0=>(G0+1)%T0)},_0=()=>{if(f0===0&&c0.current){g0();return}let T0=v0();T0!==0&&l0(G0=>(G0-1+T0)%T0)},y0=()=>{l0(0)},S0=()=>{l0(v0()-1)},B0=reactExports.useCallback(()=>{a0(!0)},[]),I0=reactExports.useCallback(()=>{p0.current&&(p0.current.focus({preventScroll:!0}),a0(!1))},[]),F0=(T0,G0)=>{T0&&(G0.stopPropagation(),G0.preventDefault())},C0=reactExports.useCallback(T0=>{let G0=!1;switch(T0.code){case" ":case"Space":if(!t0)break;B0(),G0=!0;break;case"Enter":case"ArrowDown":case"Down":B0(),G0=!0;break;case"Esc":case"Escape":I0(),G0=!0;break;case"Up":case"ArrowUp":B0(),G0=!0;break}_e==null||_e(T0),F0(G0,T0)},[I0,B0]),E0=T0=>{let G0=!!c0.current&&document.activeElement===c0.current;n0&&!G0&&l0(Object.values(m0.current).filter(j0=>!!j0).findIndex(j0=>j0.id===T0.currentTarget.getAttribute("id")))},R0=reactExports.useCallback((T0,G0,j0=!0)=>{let N0=!1;if(T0.shiftKey)T0.key==="Tab"&&(I0(),N0=!0);else{switch(T0.code){case"Escape":I0();break;case" ":case"Enter":f0!==-1&&(Object.values(m0.current).filter(Boolean)[f0].getAttribute("role")==="menuitem"&&j0&&p0.current&&(p0.current.focus(),a0(!1)),G0==null||G0()),N0=!0;break;case"ArrowDown":case"Down":x0(),N0=!0;break;case"ArrowUp":case"Up":_0(),N0=!0;break;case"Home":y0(),N0=!0;break;case"End":S0(),N0=!0;break}F0(N0,T0)}},[f0,I0]),M0=reactExports.useCallback(T0=>{a0(o0!==!0),T0.stopPropagation(),T0.preventDefault()},[o0]);return{isFocused:u0,visible:o0,itemRefs:m0,triggerRef:p0,menuRef:b0,searchInputRef:c0,triggerProps:{ref:mergeRefs(p0,k0.setReference),id:`dropdown-toggle-${s0}`,"aria-haspopup":"menu","aria-controls":`dropdown-${s0}`,"aria-expanded":!!o0,className:`${o0?"selected":""}`,onClick:M0,onKeyDown:C0,"aria-activedescendant":u0},menuProps:{ref:mergeRefs(b0,k0.setFloating),className:"dropdown-menu","aria-labelledby":`dropdown-toggle-${s0}`,style:{...d0}},itemProps:{onMenuItemMouseEnter:E0,onMenuItemClick:I0,onMenuItemKeyDown:R0},openDropdown:B0,closeDropdown:I0,setVisible:a0}};const scriptRel="modulepreload",assetsURL=function(e0){return"/"+e0},seen={},__vitePreload=function e0(_e,i0,r0){let t0=Promise.resolve();if(i0&&i0.length>0){document.getElementsByTagName("link");const n0=document.querySelector("meta[property=csp-nonce]"),s0=(n0==null?void 0:n0.nonce)||(n0==null?void 0:n0.getAttribute("nonce"));t0=Promise.all(i0.map(o0=>{if(o0=assetsURL(o0),o0 in seen)return;seen[o0]=!0;const a0=o0.endsWith(".css"),f0=a0?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o0}"]${f0}`))return;const l0=document.createElement("link");if(l0.rel=a0?"stylesheet":scriptRel,a0||(l0.as="script",l0.crossOrigin=""),l0.href=o0,s0&&l0.setAttribute("nonce",s0),document.head.appendChild(l0),a0)return new Promise((u0,A0)=>{l0.addEventListener("load",u0),l0.addEventListener("error",()=>A0(new Error(`Unable to preload CSS for ${o0}`)))})}))}return t0.then(()=>_e()).catch(n0=>{const s0=new Event("vite:preloadError",{cancelable:!0});if(s0.payload=n0,window.dispatchEvent(s0),!s0.defaultPrevented)throw n0})};var HEIC_MIME_TYPES=["image/heic","image/heif"],useDropzone=e0=>{let[_e,i0]=reactExports.useState(!1),[r0,t0]=reactExports.useState([]),n0=reactExports.useRef(null),s0=h0=>{l0([h0])},o0=h0=>{t0(b0=>b0.filter(p0=>p0.name!==h0.name))},a0=(h0,b0)=>{t0(p0=>{if(0<=h0&&h0<p0.length){let m0=p0.slice(0,h0),g0=h0===p0.length-1?[]:p0.slice(h0+1);return[...m0,b0,...g0]}return p0})},f0=h0=>{var p0;let b0=h0;if((p0=n0.current)!=null&&p0.accept){let m0=n0.current.accept.split(",").map(w0=>w0.trim().toLowerCase()),g0=m0.filter(w0=>w0.startsWith(".")),v0=m0.filter(w0=>!w0.startsWith(".")).map(w0=>w0.replace("*",""));b0=[],h0.forEach(w0=>{let x0=w0.name.toLowerCase();(g0.some(_0=>x0.endsWith(_0))||v0.some(_0=>w0.type.includes(_0)))&&b0.push(w0)})}return b0},l0=async h0=>{let b0=(await u0(h0)).sort((p0,m0)=>p0.lastModified-m0.lastModified).map(p0=>new File([p0],p0.name.replace(/[!:,;="']/g,""),{type:p0.type,lastModified:p0.lastModified}));e0!=null&&e0.forceFilters&&(b0=f0(b0)),b0&&b0.length&&t0(p0=>[...p0,...b0])},u0=async h0=>{if(h0===null||h0.length===0)return[];let b0;return h0.some(p0=>HEIC_MIME_TYPES.includes(p0.type))&&(b0=await __vitePreload(()=>Promise.resolve().then(()=>heicTo),void 0)),Promise.all(h0.map(async p0=>{if(b0&&b0.isHeic(p0))try{let m0=await b0.heicTo({blob:p0,toType:"image/jpeg"});return new File([m0],p0.name.replace(/\.(heic|heif)$/i,".jpeg"),{type:"image/jpeg",lastModified:p0.lastModified})}catch(m0){return console.error(`Failed to convert HEIC image: ${p0.name}`,m0),p0}return p0}))},A0=()=>{t0([])},c0=h0=>{let b0=h0.target.files;b0&&l0([...b0])},k0=h0=>{h0.preventDefault(),h0.stopPropagation(),i0(!0)},d0=h0=>{h0.preventDefault(),h0.stopPropagation(),i0(!1)};return{inputRef:n0,files:r0,dragging:_e,handleDragging:k0,handleDragLeave:d0,handleDrop:async h0=>{var p0;d0(h0);let b0=(p0=h0.dataTransfer)==null?void 0:p0.files;b0&&(await l0([...b0]),n0!=null&&n0.current&&(n0.current.files=b0))},replaceFileAt:a0,deleteFile:o0,addFile:s0,addFiles:l0,cleanFiles:A0,handleOnChange:c0}},PLACEHOLDER_ICON="placeholder";function useEdificeIcons(){let e0={"last-infos-widget":"ic-widget-actualites",birthday:"ic-star","calendar-widget":"ic-widget-calendar","carnet-de-bord":"ic-widget-carnet-de-bord","record-me":"ic-widget-microphone",mood:"ic-star","my-apps":"ic-widget-apps",notes:"ic-widget-notes","rss-widget":"ic-widget-rss","bookmark-widget":"ic-widget-signets",qwant:"ic-widget-qwant","qwant-junior":"ic-widget-qwant","agenda-widget":"ic-widget-agenda","cursus-widget":"ic-widget-aide-devoirs","maxicours-widget":"ic-widget-maxicours","school-widget":"ic-widget-schoolbook","universalis-widget":"ic-widget-universalis","briefme-widget":"ic-widget-briefme"};function _e(a0){let f0="";switch(f0=typeof a0=="string"?a0:(a0==null?void 0:a0.icon)===void 0?PLACEHOLDER_ICON:a0==null?void 0:a0.icon.trim().toLowerCase(),f0&&f0.length>0?f0.endsWith("-large")&&(f0=f0.replace("-large","")):typeof a0=="object"&&(f0=(a0==null?void 0:a0.displayName)===void 0?"":a0==null?void 0:a0.displayName.trim().toLowerCase()),f0){case"admin.title":f0="admin";break;case"banques des savoirs":f0="banquesavoir";break;case"collaborativewall":f0="collaborative-wall";break;case"collect":f0="rack";break;case"communautés":f0="community";break;case"directory.user":f0="userbook";break;case"emploi du temps":f0="edt";break;case"formulaire":f0="forms";break;case"messagerie":f0="conversation";break;case"news":f0="actualites";break;case"homeworks":case"cahier de texte":f0="cahier-de-texte";break;case"diary":case"cahier de texte 2d":f0="cahier-textes";break;case"scrap-book":f0="scrapbook";break}return f0}function i0(a0){return a0&&(a0.startsWith("/")||a0.startsWith("http://")||a0.startsWith("https://"))}function r0(a0){let f0=_e(a0)||PLACEHOLDER_ICON;return`color-app-${f0} color-app app-${f0}`}function t0(a0){let f0=_e(a0)||PLACEHOLDER_ICON;return`bg-app-${f0} bg-app app-${f0}`}function n0(a0){let f0=_e(a0)||PLACEHOLDER_ICON;return`bg-light-${f0} bg-app-light app-${f0}`}function s0(a0){let f0=_e(a0)||PLACEHOLDER_ICON;return`border-app-${f0} border-app app-${f0}`}function o0(a0){return e0[a0.platformConf.name]}return{getIconClass:r0,getBackgroundIconClass:t0,getBackgroundLightIconClass:n0,getBorderIconClass:s0,getIconCode:_e,getWidgetIconClass:o0,isIconUrl:i0}}function useHover(){let[e0,_e]=reactExports.useState(!1),i0=reactExports.useRef(null),r0=()=>{_e(!0)},t0=()=>{_e(!1)};return reactExports.useEffect(()=>{let n0=i0.current;if(n0)return n0.addEventListener("mouseover",r0),n0.addEventListener("mouseout",t0),()=>{n0.removeEventListener("mouseover",r0),n0.removeEventListener("mouseout",t0)}},[i0]),[i0,e0]}function useKeyPress(e0,_e){let i0=reactExports.useCallback(({code:r0})=>{_e.includes(r0)&&e0()},[e0,_e]);reactExports.useEffect(()=>(window.addEventListener("keydown",i0),()=>{window.removeEventListener("keydown",i0)}),[i0])}function useTrapFocus(e0){let _e=reactExports.useRef(null),i0='button:not([disabled]), [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';return reactExports.useEffect(()=>{if(!e0)return;let r0=_e.current,t0=r0.querySelectorAll(i0)[0],n0=r0.querySelectorAll(i0),s0=_e&&(n0==null?void 0:n0[n0.length-1]),o0=a0=>{a0.key==="Tab"&&(a0.shiftKey?document.activeElement===t0&&(s0.focus(),a0.preventDefault()):document.activeElement===s0&&(t0.focus(),a0.preventDefault()))};if(r0)return r0.addEventListener("keydown",o0),()=>{r0.removeEventListener("keydown",o0)}},[e0]),_e}var ModalContext=reactExports.createContext({ariaLabelId:"",ariaDescriptionId:"",focusId:""}),useModalContext=()=>{let e0=reactExports.useContext(ModalContext);if(!e0)throw Error("Cannot be rendered outside the Modal component");return e0},ModalBody=e0=>{let{ariaDescriptionId:_e}=useModalContext(),{children:i0,className:r0}=e0;return jsxRuntimeExports.jsx("div",{id:_e,className:clsx("modal-body",r0),children:i0})},ModalFooter=e0=>jsxRuntimeExports.jsx("div",{className:"modal-footer",children:e0.children}),SvgIconClose=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.222 4.222a1.1 1.1 0 0 1 1.556 0l14 14a1.1 1.1 0 1 1-1.556 1.556l-14-14a1.1 1.1 0 0 1 0-1.556",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M19.778 4.222a1.1 1.1 0 0 1 0 1.556l-14 14a1.1 1.1 0 1 1-1.556-1.556l14-14a1.1 1.1 0 0 1 1.556 0",clipRule:"evenodd"})]}),ModalHeader=e0=>{let{onModalClose:_e,children:i0}=e0,{ariaLabelId:r0,focusId:t0}=useModalContext(),n0=reactExports.useRef(null),{t:s0}=useTranslation();return reactExports.useEffect(()=>{var o0;t0||((o0=n0.current)==null||o0.focus())},[t0]),jsxRuntimeExports.jsxs("div",{className:clsx("modal-header",{"align-self-center":e0.centered}),children:[jsxRuntimeExports.jsx("h2",{id:r0,className:"modal-title",tabIndex:-1,children:i0}),jsxRuntimeExports.jsx(IconButton,{ref:n0,"aria-label":s0("close"),color:"tertiary",icon:jsxRuntimeExports.jsx(SvgIconClose,{}),type:"button",variant:"ghost",title:s0("close"),onClick:_e,className:"btn-close"})]})},ModalSubtitle=e0=>jsxRuntimeExports.jsx("p",{className:"modal-subtitle",children:e0.children}),updateQueue=makeQueue(),raf$1=e0=>schedule(e0,updateQueue),writeQueue=makeQueue();raf$1.write=e0=>schedule(e0,writeQueue);var onStartQueue=makeQueue();raf$1.onStart=e0=>schedule(e0,onStartQueue);var onFrameQueue=makeQueue();raf$1.onFrame=e0=>schedule(e0,onFrameQueue);var onFinishQueue=makeQueue();raf$1.onFinish=e0=>schedule(e0,onFinishQueue);var timeouts=[];raf$1.setTimeout=(e0,_e)=>{const i0=raf$1.now()+_e,r0=()=>{const n0=timeouts.findIndex(s0=>s0.cancel==r0);~n0&&timeouts.splice(n0,1),pendingCount-=~n0?1:0},t0={time:i0,handler:e0,cancel:r0};return timeouts.splice(findTimeout(i0),0,t0),pendingCount+=1,start$4(),t0};var findTimeout=e0=>~(~timeouts.findIndex(_e=>_e.time>e0)||~timeouts.length);raf$1.cancel=e0=>{onStartQueue.delete(e0),onFrameQueue.delete(e0),onFinishQueue.delete(e0),updateQueue.delete(e0),writeQueue.delete(e0)};raf$1.sync=e0=>{sync=!0,raf$1.batchedUpdates(e0),sync=!1};raf$1.throttle=e0=>{let _e;function i0(){try{e0(..._e)}finally{_e=null}}function r0(...t0){_e=t0,raf$1.onStart(i0)}return r0.handler=e0,r0.cancel=()=>{onStartQueue.delete(i0),_e=null},r0};var nativeRaf=typeof window<"u"?window.requestAnimationFrame:()=>{};raf$1.use=e0=>nativeRaf=e0;raf$1.now=typeof performance<"u"?()=>performance.now():Date.now;raf$1.batchedUpdates=e0=>e0();raf$1.catch=console.error;raf$1.frameLoop="always";raf$1.advance=()=>{raf$1.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):update$1()};var ts=-1,pendingCount=0,sync=!1;function schedule(e0,_e){sync?(_e.delete(e0),e0(0)):(_e.add(e0),start$4())}function start$4(){ts<0&&(ts=0,raf$1.frameLoop!=="demand"&&nativeRaf(loop$1))}function stop$3(){ts=-1}function loop$1(){~ts&&(nativeRaf(loop$1),raf$1.batchedUpdates(update$1))}function update$1(){const e0=ts;ts=raf$1.now();const _e=findTimeout(ts);if(_e&&(eachSafely(timeouts.splice(0,_e),i0=>i0.handler()),pendingCount-=_e),!pendingCount){stop$3();return}onStartQueue.flush(),updateQueue.flush(e0?Math.min(64,ts-e0):16.667),onFrameQueue.flush(),writeQueue.flush(),onFinishQueue.flush()}function makeQueue(){let e0=new Set,_e=e0;return{add(i0){pendingCount+=_e==e0&&!e0.has(i0)?1:0,e0.add(i0)},delete(i0){return pendingCount-=_e==e0&&e0.has(i0)?1:0,e0.delete(i0)},flush(i0){_e.size&&(e0=new Set,pendingCount-=_e.size,eachSafely(_e,r0=>r0(i0)&&e0.add(r0)),pendingCount+=e0.size,_e=e0)}}}function eachSafely(e0,_e){e0.forEach(i0=>{try{_e(i0)}catch(r0){raf$1.catch(r0)}})}var __defProp$1=Object.defineProperty,__export=(e0,_e)=>{for(var i0 in _e)__defProp$1(e0,i0,{get:_e[i0],enumerable:!0})},globals_exports={};__export(globals_exports,{assign:()=>assign,colors:()=>colors,createStringInterpolator:()=>createStringInterpolator,skipAnimation:()=>skipAnimation,to:()=>to,willAdvance:()=>willAdvance});function noop$3(){}var defineHidden=(e0,_e,i0)=>Object.defineProperty(e0,_e,{value:i0,writable:!0,configurable:!0}),is$2={arr:Array.isArray,obj:e0=>!!e0&&e0.constructor.name==="Object",fun:e0=>typeof e0=="function",str:e0=>typeof e0=="string",num:e0=>typeof e0=="number",und:e0=>e0===void 0};function isEqual$2(e0,_e){if(is$2.arr(e0)){if(!is$2.arr(_e)||e0.length!==_e.length)return!1;for(let i0=0;i0<e0.length;i0++)if(e0[i0]!==_e[i0])return!1;return!0}return e0===_e}var each=(e0,_e)=>e0.forEach(_e);function eachProp(e0,_e,i0){if(is$2.arr(e0)){for(let r0=0;r0<e0.length;r0++)_e.call(i0,e0[r0],`${r0}`);return}for(const r0 in e0)e0.hasOwnProperty(r0)&&_e.call(i0,e0[r0],r0)}var toArray=e0=>is$2.und(e0)?[]:is$2.arr(e0)?e0:[e0];function flush(e0,_e){if(e0.size){const i0=Array.from(e0);e0.clear(),each(i0,_e)}}var flushCalls=(e0,..._e)=>flush(e0,i0=>i0(..._e)),isSSR=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),createStringInterpolator,to,colors=null,skipAnimation=!1,willAdvance=noop$3,assign=e0=>{e0.to&&(to=e0.to),e0.now&&(raf$1.now=e0.now),e0.colors!==void 0&&(colors=e0.colors),e0.skipAnimation!=null&&(skipAnimation=e0.skipAnimation),e0.createStringInterpolator&&(createStringInterpolator=e0.createStringInterpolator),e0.requestAnimationFrame&&raf$1.use(e0.requestAnimationFrame),e0.batchedUpdates&&(raf$1.batchedUpdates=e0.batchedUpdates),e0.willAdvance&&(willAdvance=e0.willAdvance),e0.frameLoop&&(raf$1.frameLoop=e0.frameLoop)},startQueue=new Set,currentFrame=[],prevFrame=[],priority=0,frameLoop={get idle(){return!startQueue.size&&!currentFrame.length},start(e0){priority>e0.priority?(startQueue.add(e0),raf$1.onStart(flushStartQueue)):(startSafely(e0),raf$1(advance))},advance,sort(e0){if(priority)raf$1.onFrame(()=>frameLoop.sort(e0));else{const _e=currentFrame.indexOf(e0);~_e&&(currentFrame.splice(_e,1),startUnsafely(e0))}},clear(){currentFrame=[],startQueue.clear()}};function flushStartQueue(){startQueue.forEach(startSafely),startQueue.clear(),raf$1(advance)}function startSafely(e0){currentFrame.includes(e0)||startUnsafely(e0)}function startUnsafely(e0){currentFrame.splice(findIndex(currentFrame,_e=>_e.priority>e0.priority),0,e0)}function advance(e0){const _e=prevFrame;for(let i0=0;i0<currentFrame.length;i0++){const r0=currentFrame[i0];priority=r0.priority,r0.idle||(willAdvance(r0),r0.advance(e0),r0.idle||_e.push(r0))}return priority=0,prevFrame=currentFrame,prevFrame.length=0,currentFrame=_e,currentFrame.length>0}function findIndex(e0,_e){const i0=e0.findIndex(_e);return i0<0?e0.length:i0}var colors2={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},NUMBER="[-+]?\\d*\\.?\\d+",PERCENTAGE=NUMBER+"%";function call$1(...e0){return"\\(\\s*("+e0.join(")\\s*,\\s*(")+")\\s*\\)"}var rgb=new RegExp("rgb"+call$1(NUMBER,NUMBER,NUMBER)),rgba=new RegExp("rgba"+call$1(NUMBER,NUMBER,NUMBER,NUMBER)),hsl=new RegExp("hsl"+call$1(NUMBER,PERCENTAGE,PERCENTAGE)),hsla=new RegExp("hsla"+call$1(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)),hex3=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6=/^#([0-9a-fA-F]{6})$/,hex8=/^#([0-9a-fA-F]{8})$/;function normalizeColor(e0){let _e;return typeof e0=="number"?e0>>>0===e0&&e0>=0&&e0<=4294967295?e0:null:(_e=hex6.exec(e0))?parseInt(_e[1]+"ff",16)>>>0:colors&&colors[e0]!==void 0?colors[e0]:(_e=rgb.exec(e0))?(parse255(_e[1])<<24|parse255(_e[2])<<16|parse255(_e[3])<<8|255)>>>0:(_e=rgba.exec(e0))?(parse255(_e[1])<<24|parse255(_e[2])<<16|parse255(_e[3])<<8|parse1(_e[4]))>>>0:(_e=hex3.exec(e0))?parseInt(_e[1]+_e[1]+_e[2]+_e[2]+_e[3]+_e[3]+"ff",16)>>>0:(_e=hex8.exec(e0))?parseInt(_e[1],16)>>>0:(_e=hex4.exec(e0))?parseInt(_e[1]+_e[1]+_e[2]+_e[2]+_e[3]+_e[3]+_e[4]+_e[4],16)>>>0:(_e=hsl.exec(e0))?(hslToRgb(parse360(_e[1]),parsePercentage(_e[2]),parsePercentage(_e[3]))|255)>>>0:(_e=hsla.exec(e0))?(hslToRgb(parse360(_e[1]),parsePercentage(_e[2]),parsePercentage(_e[3]))|parse1(_e[4]))>>>0:null}function hue2rgb(e0,_e,i0){return i0<0&&(i0+=1),i0>1&&(i0-=1),i0<1/6?e0+(_e-e0)*6*i0:i0<1/2?_e:i0<2/3?e0+(_e-e0)*(2/3-i0)*6:e0}function hslToRgb(e0,_e,i0){const r0=i0<.5?i0*(1+_e):i0+_e-i0*_e,t0=2*i0-r0,n0=hue2rgb(t0,r0,e0+1/3),s0=hue2rgb(t0,r0,e0),o0=hue2rgb(t0,r0,e0-1/3);return Math.round(n0*255)<<24|Math.round(s0*255)<<16|Math.round(o0*255)<<8}function parse255(e0){const _e=parseInt(e0,10);return _e<0?0:_e>255?255:_e}function parse360(e0){return(parseFloat(e0)%360+360)%360/360}function parse1(e0){const _e=parseFloat(e0);return _e<0?0:_e>1?255:Math.round(_e*255)}function parsePercentage(e0){const _e=parseFloat(e0);return _e<0?0:_e>100?1:_e/100}function colorToRgba(e0){let _e=normalizeColor(e0);if(_e===null)return e0;_e=_e||0;const i0=(_e&4278190080)>>>24,r0=(_e&16711680)>>>16,t0=(_e&65280)>>>8,n0=(_e&255)/255;return`rgba(${i0}, ${r0}, ${t0}, ${n0})`}var createInterpolator=(e0,_e,i0)=>{if(is$2.fun(e0))return e0;if(is$2.arr(e0))return createInterpolator({range:e0,output:_e,extrapolate:i0});if(is$2.str(e0.output[0]))return createStringInterpolator(e0);const r0=e0,t0=r0.output,n0=r0.range||[0,1],s0=r0.extrapolateLeft||r0.extrapolate||"extend",o0=r0.extrapolateRight||r0.extrapolate||"extend",a0=r0.easing||(f0=>f0);return f0=>{const l0=findRange(f0,n0);return interpolate(f0,n0[l0],n0[l0+1],t0[l0],t0[l0+1],a0,s0,o0,r0.map)}};function interpolate(e0,_e,i0,r0,t0,n0,s0,o0,a0){let f0=a0?a0(e0):e0;if(f0<_e){if(s0==="identity")return f0;s0==="clamp"&&(f0=_e)}if(f0>i0){if(o0==="identity")return f0;o0==="clamp"&&(f0=i0)}return r0===t0?r0:_e===i0?e0<=_e?r0:t0:(_e===-1/0?f0=-f0:i0===1/0?f0=f0-_e:f0=(f0-_e)/(i0-_e),f0=n0(f0),r0===-1/0?f0=-f0:t0===1/0?f0=f0+r0:f0=f0*(t0-r0)+r0,f0)}function findRange(e0,_e){for(var i0=1;i0<_e.length-1&&!(_e[i0]>=e0);++i0);return i0-1}var easings={linear:e0=>e0},$get=Symbol.for("FluidValue.get"),$observers=Symbol.for("FluidValue.observers"),hasFluidValue=e0=>!!(e0&&e0[$get]),getFluidValue=e0=>e0&&e0[$get]?e0[$get]():e0,getFluidObservers=e0=>e0[$observers]||null;function callFluidObserver(e0,_e){e0.eventObserved?e0.eventObserved(_e):e0(_e)}function callFluidObservers(e0,_e){const i0=e0[$observers];i0&&i0.forEach(r0=>{callFluidObserver(r0,_e)})}var FluidValue=class{constructor(e0){if(!e0&&!(e0=this.get))throw Error("Unknown getter");setFluidGetter(this,e0)}},setFluidGetter=(e0,_e)=>setHidden(e0,$get,_e);function addFluidObserver(e0,_e){if(e0[$get]){let i0=e0[$observers];i0||setHidden(e0,$observers,i0=new Set),i0.has(_e)||(i0.add(_e),e0.observerAdded&&e0.observerAdded(i0.size,_e))}return _e}function removeFluidObserver(e0,_e){const i0=e0[$observers];if(i0&&i0.has(_e)){const r0=i0.size-1;r0?i0.delete(_e):e0[$observers]=null,e0.observerRemoved&&e0.observerRemoved(r0,_e)}}var setHidden=(e0,_e,i0)=>Object.defineProperty(e0,_e,{value:i0,writable:!0,configurable:!0}),numberRegex=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,colorRegex=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,unitRegex=new RegExp(`(${numberRegex.source})(%|[a-z]+)`,"i"),rgbaRegex=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,cssVariableRegex=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,variableToRgba=e0=>{const[_e,i0]=parseCSSVariable(e0);if(!_e||isSSR())return e0;const r0=window.getComputedStyle(document.documentElement).getPropertyValue(_e);if(r0)return r0.trim();if(i0&&i0.startsWith("--")){const t0=window.getComputedStyle(document.documentElement).getPropertyValue(i0);return t0||e0}else{if(i0&&cssVariableRegex.test(i0))return variableToRgba(i0);if(i0)return i0}return e0},parseCSSVariable=e0=>{const _e=cssVariableRegex.exec(e0);if(!_e)return[,];const[,i0,r0]=_e;return[i0,r0]},namedColorRegex,rgbaRound=(e0,_e,i0,r0,t0)=>`rgba(${Math.round(_e)}, ${Math.round(i0)}, ${Math.round(r0)}, ${t0})`,createStringInterpolator2=e0=>{namedColorRegex||(namedColorRegex=colors?new RegExp(`(${Object.keys(colors).join("|")})(?!\\w)`,"g"):/^\b$/);const _e=e0.output.map(n0=>getFluidValue(n0).replace(cssVariableRegex,variableToRgba).replace(colorRegex,colorToRgba).replace(namedColorRegex,colorToRgba)),i0=_e.map(n0=>n0.match(numberRegex).map(Number)),t0=i0[0].map((n0,s0)=>i0.map(o0=>{if(!(s0 in o0))throw Error('The arity of each "output" value must be equal');return o0[s0]})).map(n0=>createInterpolator({...e0,output:n0}));return n0=>{var a0;const s0=!unitRegex.test(_e[0])&&((a0=_e.find(f0=>unitRegex.test(f0)))==null?void 0:a0.replace(numberRegex,""));let o0=0;return _e[0].replace(numberRegex,()=>`${t0[o0++](n0)}${s0||""}`).replace(rgbaRegex,rgbaRound)}},prefix="react-spring: ",once=e0=>{const _e=e0;let i0=!1;if(typeof _e!="function")throw new TypeError(`${prefix}once requires a function parameter`);return(...r0)=>{i0||(_e(...r0),i0=!0)}},warnInterpolate=once(console.warn);function deprecateInterpolate(){warnInterpolate(`${prefix}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var warnDirectCall=once(console.warn);function deprecateDirectCall(){warnDirectCall(`${prefix}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function isAnimatedString(e0){return is$2.str(e0)&&(e0[0]=="#"||/\d/.test(e0)||!isSSR()&&cssVariableRegex.test(e0)||e0 in(colors||{}))}var useIsomorphicLayoutEffect$6=isSSR()?reactExports.useEffect:reactExports.useLayoutEffect,useIsMounted=()=>{const e0=reactExports.useRef(!1);return useIsomorphicLayoutEffect$6(()=>(e0.current=!0,()=>{e0.current=!1}),[]),e0};function useForceUpdate(){const e0=reactExports.useState()[1],_e=useIsMounted();return()=>{_e.current&&e0(Math.random())}}function useMemoOne(e0,_e){const[i0]=reactExports.useState(()=>({inputs:_e,result:e0()})),r0=reactExports.useRef(),t0=r0.current;let n0=t0;return n0?_e&&n0.inputs&&areInputsEqual(_e,n0.inputs)||(n0={inputs:_e,result:e0()}):n0=i0,reactExports.useEffect(()=>{r0.current=n0,t0==i0&&(i0.inputs=i0.result=void 0)},[n0]),n0.result}function areInputsEqual(e0,_e){if(e0.length!==_e.length)return!1;for(let i0=0;i0<e0.length;i0++)if(e0[i0]!==_e[i0])return!1;return!0}var useOnce=e0=>reactExports.useEffect(e0,emptyDeps),emptyDeps=[];function usePrev(e0){const _e=reactExports.useRef();return reactExports.useEffect(()=>{_e.current=e0}),_e.current}var $node=Symbol.for("Animated:node"),isAnimated=e0=>!!e0&&e0[$node]===e0,getAnimated=e0=>e0&&e0[$node],setAnimated=(e0,_e)=>defineHidden(e0,$node,_e),getPayload=e0=>e0&&e0[$node]&&e0[$node].getPayload(),Animated=class{constructor(){setAnimated(this,this)}getPayload(){return this.payload||[]}},AnimatedValue=class extends Animated{constructor(e0){super(),this._value=e0,this.done=!0,this.durationProgress=0,is$2.num(this._value)&&(this.lastPosition=this._value)}static create(e0){return new AnimatedValue(e0)}getPayload(){return[this]}getValue(){return this._value}setValue(e0,_e){return is$2.num(e0)&&(this.lastPosition=e0,_e&&(e0=Math.round(e0/_e)*_e,this.done&&(this.lastPosition=e0))),this._value===e0?!1:(this._value=e0,!0)}reset(){const{done:e0}=this;this.done=!1,is$2.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e0&&(this.lastVelocity=null),this.v0=null)}},AnimatedString=class extends AnimatedValue{constructor(e0){super(0),this._string=null,this._toString=createInterpolator({output:[e0,e0]})}static create(e0){return new AnimatedString(e0)}getValue(){const e0=this._string;return e0??(this._string=this._toString(this._value))}setValue(e0){if(is$2.str(e0)){if(e0==this._string)return!1;this._string=e0,this._value=1}else if(super.setValue(e0))this._string=null;else return!1;return!0}reset(e0){e0&&(this._toString=createInterpolator({output:[this.getValue(),e0]})),this._value=0,super.reset()}},TreeContext={dependencies:null},AnimatedObject=class extends Animated{constructor(e0){super(),this.source=e0,this.setValue(e0)}getValue(e0){const _e={};return eachProp(this.source,(i0,r0)=>{isAnimated(i0)?_e[r0]=i0.getValue(e0):hasFluidValue(i0)?_e[r0]=getFluidValue(i0):e0||(_e[r0]=i0)}),_e}setValue(e0){this.source=e0,this.payload=this._makePayload(e0)}reset(){this.payload&&each(this.payload,e0=>e0.reset())}_makePayload(e0){if(e0){const _e=new Set;return eachProp(e0,this._addToPayload,_e),Array.from(_e)}}_addToPayload(e0){TreeContext.dependencies&&hasFluidValue(e0)&&TreeContext.dependencies.add(e0);const _e=getPayload(e0);_e&&each(_e,i0=>this.add(i0))}},AnimatedArray=class extends AnimatedObject{constructor(e0){super(e0)}static create(e0){return new AnimatedArray(e0)}getValue(){return this.source.map(e0=>e0.getValue())}setValue(e0){const _e=this.getPayload();return e0.length==_e.length?_e.map((i0,r0)=>i0.setValue(e0[r0])).some(Boolean):(super.setValue(e0.map(makeAnimated)),!0)}};function makeAnimated(e0){return(isAnimatedString(e0)?AnimatedString:AnimatedValue).create(e0)}function getAnimatedType(e0){const _e=getAnimated(e0);return _e?_e.constructor:is$2.arr(e0)?AnimatedArray:isAnimatedString(e0)?AnimatedString:AnimatedValue}var withAnimated=(e0,_e)=>{const i0=!is$2.fun(e0)||e0.prototype&&e0.prototype.isReactComponent;return reactExports.forwardRef((r0,t0)=>{const n0=reactExports.useRef(null),s0=i0&&reactExports.useCallback(k0=>{n0.current=updateRef(t0,k0)},[t0]),[o0,a0]=getAnimatedState(r0,_e),f0=useForceUpdate(),l0=()=>{const k0=n0.current;if(i0&&!k0)return;(k0?_e.applyAnimatedValues(k0,o0.getValue(!0)):!1)===!1&&f0()},u0=new PropsObserver(l0,a0),A0=reactExports.useRef();useIsomorphicLayoutEffect$6(()=>(A0.current=u0,each(a0,k0=>addFluidObserver(k0,u0)),()=>{A0.current&&(each(A0.current.deps,k0=>removeFluidObserver(k0,A0.current)),raf$1.cancel(A0.current.update))})),reactExports.useEffect(l0,[]),useOnce(()=>()=>{const k0=A0.current;each(k0.deps,d0=>removeFluidObserver(d0,k0))});const c0=_e.getComponentProps(o0.getValue());return reactExports.createElement(e0,{...c0,ref:s0})})},PropsObserver=class{constructor(e0,_e){this.update=e0,this.deps=_e}eventObserved(e0){e0.type=="change"&&raf$1.write(this.update)}};function getAnimatedState(e0,_e){const i0=new Set;return TreeContext.dependencies=i0,e0.style&&(e0={...e0,style:_e.createAnimatedStyle(e0.style)}),e0=new AnimatedObject(e0),TreeContext.dependencies=null,[e0,i0]}function updateRef(e0,_e){return e0&&(is$2.fun(e0)?e0(_e):e0.current=_e),_e}var cacheKey=Symbol.for("AnimatedComponent"),createHost=(e0,{applyAnimatedValues:_e=()=>!1,createAnimatedStyle:i0=t0=>new AnimatedObject(t0),getComponentProps:r0=t0=>t0}={})=>{const t0={applyAnimatedValues:_e,createAnimatedStyle:i0,getComponentProps:r0},n0=s0=>{const o0=getDisplayName(s0)||"Anonymous";return is$2.str(s0)?s0=n0[s0]||(n0[s0]=withAnimated(s0,t0)):s0=s0[cacheKey]||(s0[cacheKey]=withAnimated(s0,t0)),s0.displayName=`Animated(${o0})`,s0};return eachProp(e0,(s0,o0)=>{is$2.arr(e0)&&(o0=getDisplayName(s0)),n0[o0]=n0(s0)}),{animated:n0}},getDisplayName=e0=>is$2.str(e0)?e0:e0&&is$2.str(e0.displayName)?e0.displayName:is$2.fun(e0)&&e0.name||null;function callProp(e0,..._e){return is$2.fun(e0)?e0(..._e):e0}var matchProp=(e0,_e)=>e0===!0||!!(_e&&e0&&(is$2.fun(e0)?e0(_e):toArray(e0).includes(_e))),resolveProp=(e0,_e)=>is$2.obj(e0)?_e&&e0[_e]:e0,getDefaultProp=(e0,_e)=>e0.default===!0?e0[_e]:e0.default?e0.default[_e]:void 0,noopTransform=e0=>e0,getDefaultProps=(e0,_e=noopTransform)=>{let i0=DEFAULT_PROPS;e0.default&&e0.default!==!0&&(e0=e0.default,i0=Object.keys(e0));const r0={};for(const t0 of i0){const n0=_e(e0[t0],t0);is$2.und(n0)||(r0[t0]=n0)}return r0},DEFAULT_PROPS=["config","onProps","onStart","onChange","onPause","onResume","onRest"],RESERVED_PROPS={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function getForwardProps(e0){const _e={};let i0=0;if(eachProp(e0,(r0,t0)=>{RESERVED_PROPS[t0]||(_e[t0]=r0,i0++)}),i0)return _e}function inferTo(e0){const _e=getForwardProps(e0);if(_e){const i0={to:_e};return eachProp(e0,(r0,t0)=>t0 in _e||(i0[t0]=r0)),i0}return{...e0}}function computeGoal(e0){return e0=getFluidValue(e0),is$2.arr(e0)?e0.map(computeGoal):isAnimatedString(e0)?globals_exports.createStringInterpolator({range:[0,1],output:[e0,e0]})(1):e0}function hasProps(e0){for(const _e in e0)return!0;return!1}function isAsyncTo(e0){return is$2.fun(e0)||is$2.arr(e0)&&is$2.obj(e0[0])}function detachRefs(e0,_e){var i0;(i0=e0.ref)==null||i0.delete(e0),_e==null||_e.delete(e0)}function replaceRef(e0,_e){var i0;_e&&e0.ref!==_e&&((i0=e0.ref)==null||i0.delete(e0),_e.add(e0),e0.ref=_e)}var config$1={default:{tension:170,friction:26}},defaults$2={...config$1.default,mass:1,damping:1,easing:easings.linear,clamp:!1},AnimationConfig=class{constructor(){this.velocity=0,Object.assign(this,defaults$2)}};function mergeConfig(e0,_e,i0){i0&&(i0={...i0},sanitizeConfig(i0,_e),_e={...i0,..._e}),sanitizeConfig(e0,_e),Object.assign(e0,_e);for(const s0 in defaults$2)e0[s0]==null&&(e0[s0]=defaults$2[s0]);let{frequency:r0,damping:t0}=e0;const{mass:n0}=e0;return is$2.und(r0)||(r0<.01&&(r0=.01),t0<0&&(t0=0),e0.tension=Math.pow(2*Math.PI/r0,2)*n0,e0.friction=4*Math.PI*t0*n0/r0),e0}function sanitizeConfig(e0,_e){if(!is$2.und(_e.decay))e0.duration=void 0;else{const i0=!is$2.und(_e.tension)||!is$2.und(_e.friction);(i0||!is$2.und(_e.frequency)||!is$2.und(_e.damping)||!is$2.und(_e.mass))&&(e0.duration=void 0,e0.decay=void 0),i0&&(e0.frequency=void 0)}}var emptyArray$1=[],Animation=class{constructor(){this.changed=!1,this.values=emptyArray$1,this.toValues=null,this.fromValues=emptyArray$1,this.config=new AnimationConfig,this.immediate=!1}};function scheduleProps(e0,{key:_e,props:i0,defaultProps:r0,state:t0,actions:n0}){return new Promise((s0,o0)=>{let a0,f0,l0=matchProp(i0.cancel??(r0==null?void 0:r0.cancel),_e);if(l0)c0();else{is$2.und(i0.pause)||(t0.paused=matchProp(i0.pause,_e));let k0=r0==null?void 0:r0.pause;k0!==!0&&(k0=t0.paused||matchProp(k0,_e)),a0=callProp(i0.delay||0,_e),k0?(t0.resumeQueue.add(A0),n0.pause()):(n0.resume(),A0())}function u0(){t0.resumeQueue.add(A0),t0.timeouts.delete(f0),f0.cancel(),a0=f0.time-raf$1.now()}function A0(){a0>0&&!globals_exports.skipAnimation?(t0.delayed=!0,f0=raf$1.setTimeout(c0,a0),t0.pauseQueue.add(u0),t0.timeouts.add(f0)):c0()}function c0(){t0.delayed&&(t0.delayed=!1),t0.pauseQueue.delete(u0),t0.timeouts.delete(f0),e0<=(t0.cancelId||0)&&(l0=!0);try{n0.start({...i0,callId:e0,cancel:l0},s0)}catch(k0){o0(k0)}}})}var getCombinedResult=(e0,_e)=>_e.length==1?_e[0]:_e.some(i0=>i0.cancelled)?getCancelledResult(e0.get()):_e.every(i0=>i0.noop)?getNoopResult(e0.get()):getFinishedResult(e0.get(),_e.every(i0=>i0.finished)),getNoopResult=e0=>({value:e0,noop:!0,finished:!0,cancelled:!1}),getFinishedResult=(e0,_e,i0=!1)=>({value:e0,finished:_e,cancelled:i0}),getCancelledResult=e0=>({value:e0,cancelled:!0,finished:!1});function runAsync(e0,_e,i0,r0){const{callId:t0,parentId:n0,onRest:s0}=_e,{asyncTo:o0,promise:a0}=i0;return!n0&&e0===o0&&!_e.reset?a0:i0.promise=(async()=>{i0.asyncId=t0,i0.asyncTo=e0;const f0=getDefaultProps(_e,(h0,b0)=>b0==="onRest"?void 0:h0);let l0,u0;const A0=new Promise((h0,b0)=>(l0=h0,u0=b0)),c0=h0=>{const b0=t0<=(i0.cancelId||0)&&getCancelledResult(r0)||t0!==i0.asyncId&&getFinishedResult(r0,!1);if(b0)throw h0.result=b0,u0(h0),h0},k0=(h0,b0)=>{const p0=new BailSignal,m0=new SkipAnimationSignal;return(async()=>{if(globals_exports.skipAnimation)throw stopAsync(i0),m0.result=getFinishedResult(r0,!1),u0(m0),m0;c0(p0);const g0=is$2.obj(h0)?{...h0}:{...b0,to:h0};g0.parentId=t0,eachProp(f0,(w0,x0)=>{is$2.und(g0[x0])&&(g0[x0]=w0)});const v0=await r0.start(g0);return c0(p0),i0.paused&&await new Promise(w0=>{i0.resumeQueue.add(w0)}),v0})()};let d0;if(globals_exports.skipAnimation)return stopAsync(i0),getFinishedResult(r0,!1);try{let h0;is$2.arr(e0)?h0=(async b0=>{for(const p0 of b0)await k0(p0)})(e0):h0=Promise.resolve(e0(k0,r0.stop.bind(r0))),await Promise.all([h0.then(l0),A0]),d0=getFinishedResult(r0.get(),!0,!1)}catch(h0){if(h0 instanceof BailSignal)d0=h0.result;else if(h0 instanceof SkipAnimationSignal)d0=h0.result;else throw h0}finally{t0==i0.asyncId&&(i0.asyncId=n0,i0.asyncTo=n0?o0:void 0,i0.promise=n0?a0:void 0)}return is$2.fun(s0)&&raf$1.batchedUpdates(()=>{s0(d0,r0,r0.item)}),d0})()}function stopAsync(e0,_e){flush(e0.timeouts,i0=>i0.cancel()),e0.pauseQueue.clear(),e0.resumeQueue.clear(),e0.asyncId=e0.asyncTo=e0.promise=void 0,_e&&(e0.cancelId=_e)}var BailSignal=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},SkipAnimationSignal=class extends Error{constructor(){super("SkipAnimationSignal")}},isFrameValue=e0=>e0 instanceof FrameValue,nextId=1,FrameValue=class extends FluidValue{constructor(){super(...arguments),this.id=nextId++,this._priority=0}get priority(){return this._priority}set priority(e0){this._priority!=e0&&(this._priority=e0,this._onPriorityChange(e0))}get(){const e0=getAnimated(this);return e0&&e0.getValue()}to(...e0){return globals_exports.to(this,e0)}interpolate(...e0){return deprecateInterpolate(),globals_exports.to(this,e0)}toJSON(){return this.get()}observerAdded(e0){e0==1&&this._attach()}observerRemoved(e0){e0==0&&this._detach()}_attach(){}_detach(){}_onChange(e0,_e=!1){callFluidObservers(this,{type:"change",parent:this,value:e0,idle:_e})}_onPriorityChange(e0){this.idle||frameLoop.sort(this),callFluidObservers(this,{type:"priority",parent:this,priority:e0})}},$P=Symbol.for("SpringPhase"),HAS_ANIMATED=1,IS_ANIMATING=2,IS_PAUSED=4,hasAnimated=e0=>(e0[$P]&HAS_ANIMATED)>0,isAnimating=e0=>(e0[$P]&IS_ANIMATING)>0,isPaused=e0=>(e0[$P]&IS_PAUSED)>0,setActiveBit=(e0,_e)=>_e?e0[$P]|=IS_ANIMATING|HAS_ANIMATED:e0[$P]&=~IS_ANIMATING,setPausedBit=(e0,_e)=>_e?e0[$P]|=IS_PAUSED:e0[$P]&=~IS_PAUSED,SpringValue=class extends FrameValue{constructor(e0,_e){if(super(),this.animation=new Animation,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!is$2.und(e0)||!is$2.und(_e)){const i0=is$2.obj(e0)?{...e0}:{..._e,from:e0};is$2.und(i0.default)&&(i0.default=!0),this.start(i0)}}get idle(){return!(isAnimating(this)||this._state.asyncTo)||isPaused(this)}get goal(){return getFluidValue(this.animation.to)}get velocity(){const e0=getAnimated(this);return e0 instanceof AnimatedValue?e0.lastVelocity||0:e0.getPayload().map(_e=>_e.lastVelocity||0)}get hasAnimated(){return hasAnimated(this)}get isAnimating(){return isAnimating(this)}get isPaused(){return isPaused(this)}get isDelayed(){return this._state.delayed}advance(e0){let _e=!0,i0=!1;const r0=this.animation;let{toValues:t0}=r0;const{config:n0}=r0,s0=getPayload(r0.to);!s0&&hasFluidValue(r0.to)&&(t0=toArray(getFluidValue(r0.to))),r0.values.forEach((f0,l0)=>{if(f0.done)return;const u0=f0.constructor==AnimatedString?1:s0?s0[l0].lastPosition:t0[l0];let A0=r0.immediate,c0=u0;if(!A0){if(c0=f0.lastPosition,n0.tension<=0){f0.done=!0;return}let k0=f0.elapsedTime+=e0;const d0=r0.fromValues[l0],h0=f0.v0!=null?f0.v0:f0.v0=is$2.arr(n0.velocity)?n0.velocity[l0]:n0.velocity;let b0;const p0=n0.precision||(d0==u0?.005:Math.min(1,Math.abs(u0-d0)*.001));if(is$2.und(n0.duration))if(n0.decay){const m0=n0.decay===!0?.998:n0.decay,g0=Math.exp(-(1-m0)*k0);c0=d0+h0/(1-m0)*(1-g0),A0=Math.abs(f0.lastPosition-c0)<=p0,b0=h0*g0}else{b0=f0.lastVelocity==null?h0:f0.lastVelocity;const m0=n0.restVelocity||p0/10,g0=n0.clamp?0:n0.bounce,v0=!is$2.und(g0),w0=d0==u0?f0.v0>0:d0<u0;let x0,_0=!1;const y0=1,S0=Math.ceil(e0/y0);for(let B0=0;B0<S0&&(x0=Math.abs(b0)>m0,!(!x0&&(A0=Math.abs(u0-c0)<=p0,A0)));++B0){v0&&(_0=c0==u0||c0>u0==w0,_0&&(b0=-b0*g0,c0=u0));const I0=-n0.tension*1e-6*(c0-u0),F0=-n0.friction*.001*b0,C0=(I0+F0)/n0.mass;b0=b0+C0*y0,c0=c0+b0*y0}}else{let m0=1;n0.duration>0&&(this._memoizedDuration!==n0.duration&&(this._memoizedDuration=n0.duration,f0.durationProgress>0&&(f0.elapsedTime=n0.duration*f0.durationProgress,k0=f0.elapsedTime+=e0)),m0=(n0.progress||0)+k0/this._memoizedDuration,m0=m0>1?1:m0<0?0:m0,f0.durationProgress=m0),c0=d0+n0.easing(m0)*(u0-d0),b0=(c0-f0.lastPosition)/e0,A0=m0==1}f0.lastVelocity=b0,Number.isNaN(c0)&&(console.warn("Got NaN while animating:",this),A0=!0)}s0&&!s0[l0].done&&(A0=!1),A0?f0.done=!0:_e=!1,f0.setValue(c0,n0.round)&&(i0=!0)});const o0=getAnimated(this),a0=o0.getValue();if(_e){const f0=getFluidValue(r0.to);(a0!==f0||i0)&&!n0.decay?(o0.setValue(f0),this._onChange(f0)):i0&&n0.decay&&this._onChange(a0),this._stop()}else i0&&this._onChange(a0)}set(e0){return raf$1.batchedUpdates(()=>{this._stop(),this._focus(e0),this._set(e0)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(isAnimating(this)){const{to:e0,config:_e}=this.animation;raf$1.batchedUpdates(()=>{this._onStart(),_e.decay||this._set(e0,!1),this._stop()})}return this}update(e0){return(this.queue||(this.queue=[])).push(e0),this}start(e0,_e){let i0;return is$2.und(e0)?(i0=this.queue||[],this.queue=[]):i0=[is$2.obj(e0)?e0:{..._e,to:e0}],Promise.all(i0.map(r0=>this._update(r0))).then(r0=>getCombinedResult(this,r0))}stop(e0){const{to:_e}=this.animation;return this._focus(this.get()),stopAsync(this._state,e0&&this._lastCallId),raf$1.batchedUpdates(()=>this._stop(_e,e0)),this}reset(){this._update({reset:!0})}eventObserved(e0){e0.type=="change"?this._start():e0.type=="priority"&&(this.priority=e0.priority+1)}_prepareNode(e0){const _e=this.key||"";let{to:i0,from:r0}=e0;i0=is$2.obj(i0)?i0[_e]:i0,(i0==null||isAsyncTo(i0))&&(i0=void 0),r0=is$2.obj(r0)?r0[_e]:r0,r0==null&&(r0=void 0);const t0={to:i0,from:r0};return hasAnimated(this)||(e0.reverse&&([i0,r0]=[r0,i0]),r0=getFluidValue(r0),is$2.und(r0)?getAnimated(this)||this._set(i0):this._set(r0)),t0}_update({...e0},_e){const{key:i0,defaultProps:r0}=this;e0.default&&Object.assign(r0,getDefaultProps(e0,(s0,o0)=>/^on/.test(o0)?resolveProp(s0,i0):s0)),mergeActiveFn(this,e0,"onProps"),sendEvent(this,"onProps",e0,this);const t0=this._prepareNode(e0);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const n0=this._state;return scheduleProps(++this._lastCallId,{key:i0,props:e0,defaultProps:r0,state:n0,actions:{pause:()=>{isPaused(this)||(setPausedBit(this,!0),flushCalls(n0.pauseQueue),sendEvent(this,"onPause",getFinishedResult(this,checkFinished(this,this.animation.to)),this))},resume:()=>{isPaused(this)&&(setPausedBit(this,!1),isAnimating(this)&&this._resume(),flushCalls(n0.resumeQueue),sendEvent(this,"onResume",getFinishedResult(this,checkFinished(this,this.animation.to)),this))},start:this._merge.bind(this,t0)}}).then(s0=>{if(e0.loop&&s0.finished&&!(_e&&s0.noop)){const o0=createLoopUpdate(e0);if(o0)return this._update(o0,!0)}return s0})}_merge(e0,_e,i0){if(_e.cancel)return this.stop(!0),i0(getCancelledResult(this));const r0=!is$2.und(e0.to),t0=!is$2.und(e0.from);if(r0||t0)if(_e.callId>this._lastToId)this._lastToId=_e.callId;else return i0(getCancelledResult(this));const{key:n0,defaultProps:s0,animation:o0}=this,{to:a0,from:f0}=o0;let{to:l0=a0,from:u0=f0}=e0;t0&&!r0&&(!_e.default||is$2.und(l0))&&(l0=u0),_e.reverse&&([l0,u0]=[u0,l0]);const A0=!isEqual$2(u0,f0);A0&&(o0.from=u0),u0=getFluidValue(u0);const c0=!isEqual$2(l0,a0);c0&&this._focus(l0);const k0=isAsyncTo(_e.to),{config:d0}=o0,{decay:h0,velocity:b0}=d0;(r0||t0)&&(d0.velocity=0),_e.config&&!k0&&mergeConfig(d0,callProp(_e.config,n0),_e.config!==s0.config?callProp(s0.config,n0):void 0);let p0=getAnimated(this);if(!p0||is$2.und(l0))return i0(getFinishedResult(this,!0));const m0=is$2.und(_e.reset)?t0&&!_e.default:!is$2.und(u0)&&matchProp(_e.reset,n0),g0=m0?u0:this.get(),v0=computeGoal(l0),w0=is$2.num(v0)||is$2.arr(v0)||isAnimatedString(v0),x0=!k0&&(!w0||matchProp(s0.immediate||_e.immediate,n0));if(c0){const B0=getAnimatedType(l0);if(B0!==p0.constructor)if(x0)p0=this._set(v0);else throw Error(`Cannot animate between ${p0.constructor.name} and ${B0.name}, as the "to" prop suggests`)}const _0=p0.constructor;let y0=hasFluidValue(l0),S0=!1;if(!y0){const B0=m0||!hasAnimated(this)&&A0;(c0||B0)&&(S0=isEqual$2(computeGoal(g0),v0),y0=!S0),(!isEqual$2(o0.immediate,x0)&&!x0||!isEqual$2(d0.decay,h0)||!isEqual$2(d0.velocity,b0))&&(y0=!0)}if(S0&&isAnimating(this)&&(o0.changed&&!m0?y0=!0:y0||this._stop(a0)),!k0&&((y0||hasFluidValue(a0))&&(o0.values=p0.getPayload(),o0.toValues=hasFluidValue(l0)?null:_0==AnimatedString?[1]:toArray(v0)),o0.immediate!=x0&&(o0.immediate=x0,!x0&&!m0&&this._set(a0)),y0)){const{onRest:B0}=o0;each(ACTIVE_EVENTS,F0=>mergeActiveFn(this,_e,F0));const I0=getFinishedResult(this,checkFinished(this,a0));flushCalls(this._pendingCalls,I0),this._pendingCalls.add(i0),o0.changed&&raf$1.batchedUpdates(()=>{var F0;o0.changed=!m0,B0==null||B0(I0,this),m0?callProp(s0.onRest,I0):(F0=o0.onStart)==null||F0.call(o0,I0,this)})}m0&&this._set(g0),k0?i0(runAsync(_e.to,_e,this._state,this)):y0?this._start():isAnimating(this)&&!c0?this._pendingCalls.add(i0):i0(getNoopResult(g0))}_focus(e0){const _e=this.animation;e0!==_e.to&&(getFluidObservers(this)&&this._detach(),_e.to=e0,getFluidObservers(this)&&this._attach())}_attach(){let e0=0;const{to:_e}=this.animation;hasFluidValue(_e)&&(addFluidObserver(_e,this),isFrameValue(_e)&&(e0=_e.priority+1)),this.priority=e0}_detach(){const{to:e0}=this.animation;hasFluidValue(e0)&&removeFluidObserver(e0,this)}_set(e0,_e=!0){const i0=getFluidValue(e0);if(!is$2.und(i0)){const r0=getAnimated(this);if(!r0||!isEqual$2(i0,r0.getValue())){const t0=getAnimatedType(i0);!r0||r0.constructor!=t0?setAnimated(this,t0.create(i0)):r0.setValue(i0),r0&&raf$1.batchedUpdates(()=>{this._onChange(i0,_e)})}}return getAnimated(this)}_onStart(){const e0=this.animation;e0.changed||(e0.changed=!0,sendEvent(this,"onStart",getFinishedResult(this,checkFinished(this,e0.to)),this))}_onChange(e0,_e){_e||(this._onStart(),callProp(this.animation.onChange,e0,this)),callProp(this.defaultProps.onChange,e0,this),super._onChange(e0,_e)}_start(){const e0=this.animation;getAnimated(this).reset(getFluidValue(e0.to)),e0.immediate||(e0.fromValues=e0.values.map(_e=>_e.lastPosition)),isAnimating(this)||(setActiveBit(this,!0),isPaused(this)||this._resume())}_resume(){globals_exports.skipAnimation?this.finish():frameLoop.start(this)}_stop(e0,_e){if(isAnimating(this)){setActiveBit(this,!1);const i0=this.animation;each(i0.values,t0=>{t0.done=!0}),i0.toValues&&(i0.onChange=i0.onPause=i0.onResume=void 0),callFluidObservers(this,{type:"idle",parent:this});const r0=_e?getCancelledResult(this.get()):getFinishedResult(this.get(),checkFinished(this,e0??i0.to));flushCalls(this._pendingCalls,r0),i0.changed&&(i0.changed=!1,sendEvent(this,"onRest",r0,this))}}};function checkFinished(e0,_e){const i0=computeGoal(_e),r0=computeGoal(e0.get());return isEqual$2(r0,i0)}function createLoopUpdate(e0,_e=e0.loop,i0=e0.to){const r0=callProp(_e);if(r0){const t0=r0!==!0&&inferTo(r0),n0=(t0||e0).reverse,s0=!t0||t0.reset;return createUpdate({...e0,loop:_e,default:!1,pause:void 0,to:!n0||isAsyncTo(i0)?i0:void 0,from:s0?e0.from:void 0,reset:s0,...t0})}}function createUpdate(e0){const{to:_e,from:i0}=e0=inferTo(e0),r0=new Set;return is$2.obj(_e)&&findDefined(_e,r0),is$2.obj(i0)&&findDefined(i0,r0),e0.keys=r0.size?Array.from(r0):null,e0}function declareUpdate(e0){const _e=createUpdate(e0);return is$2.und(_e.default)&&(_e.default=getDefaultProps(_e)),_e}function findDefined(e0,_e){eachProp(e0,(i0,r0)=>i0!=null&&_e.add(r0))}var ACTIVE_EVENTS=["onStart","onRest","onChange","onPause","onResume"];function mergeActiveFn(e0,_e,i0){e0.animation[i0]=_e[i0]!==getDefaultProp(_e,i0)?resolveProp(_e[i0],e0.key):void 0}function sendEvent(e0,_e,...i0){var r0,t0,n0,s0;(t0=(r0=e0.animation)[_e])==null||t0.call(r0,...i0),(s0=(n0=e0.defaultProps)[_e])==null||s0.call(n0,...i0)}var BATCHED_EVENTS=["onStart","onChange","onRest"],nextId2=1,Controller$1=class{constructor(_e,i0){this.id=nextId2++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),i0&&(this._flush=i0),_e&&this.start({default:!0,..._e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(_e=>_e.idle&&!_e.isDelayed&&!_e.isPaused)}get item(){return this._item}set item(_e){this._item=_e}get(){const _e={};return this.each((i0,r0)=>_e[r0]=i0.get()),_e}set(_e){for(const i0 in _e){const r0=_e[i0];is$2.und(r0)||this.springs[i0].set(r0)}}update(_e){return _e&&this.queue.push(createUpdate(_e)),this}start(_e){let{queue:i0}=this;return _e?i0=toArray(_e).map(createUpdate):this.queue=[],this._flush?this._flush(this,i0):(prepareKeys(this,i0),flushUpdateQueue(this,i0))}stop(_e,i0){if(_e!==!!_e&&(i0=_e),i0){const r0=this.springs;each(toArray(i0),t0=>r0[t0].stop(!!_e))}else stopAsync(this._state,this._lastAsyncId),this.each(r0=>r0.stop(!!_e));return this}pause(_e){if(is$2.und(_e))this.start({pause:!0});else{const i0=this.springs;each(toArray(_e),r0=>i0[r0].pause())}return this}resume(_e){if(is$2.und(_e))this.start({pause:!1});else{const i0=this.springs;each(toArray(_e),r0=>i0[r0].resume())}return this}each(_e){eachProp(this.springs,_e)}_onFrame(){const{onStart:_e,onChange:i0,onRest:r0}=this._events,t0=this._active.size>0,n0=this._changed.size>0;(t0&&!this._started||n0&&!this._started)&&(this._started=!0,flush(_e,([a0,f0])=>{f0.value=this.get(),a0(f0,this,this._item)}));const s0=!t0&&this._started,o0=n0||s0&&r0.size?this.get():null;n0&&i0.size&&flush(i0,([a0,f0])=>{f0.value=o0,a0(f0,this,this._item)}),s0&&(this._started=!1,flush(r0,([a0,f0])=>{f0.value=o0,a0(f0,this,this._item)}))}eventObserved(_e){if(_e.type=="change")this._changed.add(_e.parent),_e.idle||this._active.add(_e.parent);else if(_e.type=="idle")this._active.delete(_e.parent);else return;raf$1.onFrame(this._onFrame)}};function flushUpdateQueue(e0,_e){return Promise.all(_e.map(i0=>flushUpdate(e0,i0))).then(i0=>getCombinedResult(e0,i0))}async function flushUpdate(e0,_e,i0){const{keys:r0,to:t0,from:n0,loop:s0,onRest:o0,onResolve:a0}=_e,f0=is$2.obj(_e.default)&&_e.default;s0&&(_e.loop=!1),t0===!1&&(_e.to=null),n0===!1&&(_e.from=null);const l0=is$2.arr(t0)||is$2.fun(t0)?t0:void 0;l0?(_e.to=void 0,_e.onRest=void 0,f0&&(f0.onRest=void 0)):each(BATCHED_EVENTS,d0=>{const h0=_e[d0];if(is$2.fun(h0)){const b0=e0._events[d0];_e[d0]=({finished:p0,cancelled:m0})=>{const g0=b0.get(h0);g0?(p0||(g0.finished=!1),m0&&(g0.cancelled=!0)):b0.set(h0,{value:null,finished:p0||!1,cancelled:m0||!1})},f0&&(f0[d0]=_e[d0])}});const u0=e0._state;_e.pause===!u0.paused?(u0.paused=_e.pause,flushCalls(_e.pause?u0.pauseQueue:u0.resumeQueue)):u0.paused&&(_e.pause=!0);const A0=(r0||Object.keys(e0.springs)).map(d0=>e0.springs[d0].start(_e)),c0=_e.cancel===!0||getDefaultProp(_e,"cancel")===!0;(l0||c0&&u0.asyncId)&&A0.push(scheduleProps(++e0._lastAsyncId,{props:_e,state:u0,actions:{pause:noop$3,resume:noop$3,start(d0,h0){c0?(stopAsync(u0,e0._lastAsyncId),h0(getCancelledResult(e0))):(d0.onRest=o0,h0(runAsync(l0,d0,u0,e0)))}}})),u0.paused&&await new Promise(d0=>{u0.resumeQueue.add(d0)});const k0=getCombinedResult(e0,await Promise.all(A0));if(s0&&k0.finished&&!(i0&&k0.noop)){const d0=createLoopUpdate(_e,s0,t0);if(d0)return prepareKeys(e0,[d0]),flushUpdate(e0,d0,!0)}return a0&&raf$1.batchedUpdates(()=>a0(k0,e0,e0.item)),k0}function getSprings(e0,_e){const i0={...e0.springs};return _e&&each(toArray(_e),r0=>{is$2.und(r0.keys)&&(r0=createUpdate(r0)),is$2.obj(r0.to)||(r0={...r0,to:void 0}),prepareSprings(i0,r0,t0=>createSpring(t0))}),setSprings(e0,i0),i0}function setSprings(e0,_e){eachProp(_e,(i0,r0)=>{e0.springs[r0]||(e0.springs[r0]=i0,addFluidObserver(i0,e0))})}function createSpring(e0,_e){const i0=new SpringValue;return i0.key=e0,_e&&addFluidObserver(i0,_e),i0}function prepareSprings(e0,_e,i0){_e.keys&&each(_e.keys,r0=>{(e0[r0]||(e0[r0]=i0(r0)))._prepareNode(_e)})}function prepareKeys(e0,_e){each(_e,i0=>{prepareSprings(e0.springs,i0,r0=>createSpring(r0,e0))})}var SpringContext=({children:e0,..._e})=>{const i0=reactExports.useContext(ctx),r0=_e.pause||!!i0.pause,t0=_e.immediate||!!i0.immediate;_e=useMemoOne(()=>({pause:r0,immediate:t0}),[r0,t0]);const{Provider:n0}=ctx;return reactExports.createElement(n0,{value:_e},e0)},ctx=makeContext(SpringContext,{});SpringContext.Provider=ctx.Provider;SpringContext.Consumer=ctx.Consumer;function makeContext(e0,_e){return Object.assign(e0,reactExports.createContext(_e)),e0.Provider._context=e0,e0.Consumer._context=e0,e0}var SpringRef=()=>{const e0=[],_e=function(r0){deprecateDirectCall();const t0=[];return each(e0,(n0,s0)=>{if(is$2.und(r0))t0.push(n0.start());else{const o0=i0(r0,n0,s0);o0&&t0.push(n0.start(o0))}}),t0};_e.current=e0,_e.add=function(r0){e0.includes(r0)||e0.push(r0)},_e.delete=function(r0){const t0=e0.indexOf(r0);~t0&&e0.splice(t0,1)},_e.pause=function(){return each(e0,r0=>r0.pause(...arguments)),this},_e.resume=function(){return each(e0,r0=>r0.resume(...arguments)),this},_e.set=function(r0){each(e0,(t0,n0)=>{const s0=is$2.fun(r0)?r0(n0,t0):r0;s0&&t0.set(s0)})},_e.start=function(r0){const t0=[];return each(e0,(n0,s0)=>{if(is$2.und(r0))t0.push(n0.start());else{const o0=this._getProps(r0,n0,s0);o0&&t0.push(n0.start(o0))}}),t0},_e.stop=function(){return each(e0,r0=>r0.stop(...arguments)),this},_e.update=function(r0){return each(e0,(t0,n0)=>t0.update(this._getProps(r0,t0,n0))),this};const i0=function(r0,t0,n0){return is$2.fun(r0)?r0(n0,t0):r0};return _e._getProps=i0,_e};function useSprings(e0,_e,i0){const r0=is$2.fun(_e)&&_e;r0&&!i0&&(i0=[]);const t0=reactExports.useMemo(()=>r0||arguments.length==3?SpringRef():void 0,[]),n0=reactExports.useRef(0),s0=useForceUpdate(),o0=reactExports.useMemo(()=>({ctrls:[],queue:[],flush(b0,p0){const m0=getSprings(b0,p0);return n0.current>0&&!o0.queue.length&&!Object.keys(m0).some(v0=>!b0.springs[v0])?flushUpdateQueue(b0,p0):new Promise(v0=>{setSprings(b0,m0),o0.queue.push(()=>{v0(flushUpdateQueue(b0,p0))}),s0()})}}),[]),a0=reactExports.useRef([...o0.ctrls]),f0=[],l0=usePrev(e0)||0;reactExports.useMemo(()=>{each(a0.current.slice(e0,l0),b0=>{detachRefs(b0,t0),b0.stop(!0)}),a0.current.length=e0,u0(l0,e0)},[e0]),reactExports.useMemo(()=>{u0(0,Math.min(l0,e0))},i0);function u0(b0,p0){for(let m0=b0;m0<p0;m0++){const g0=a0.current[m0]||(a0.current[m0]=new Controller$1(null,o0.flush)),v0=r0?r0(m0,g0):_e[m0];v0&&(f0[m0]=declareUpdate(v0))}}const A0=a0.current.map((b0,p0)=>getSprings(b0,f0[p0])),c0=reactExports.useContext(SpringContext),k0=usePrev(c0),d0=c0!==k0&&hasProps(c0);useIsomorphicLayoutEffect$6(()=>{n0.current++,o0.ctrls=a0.current;const{queue:b0}=o0;b0.length&&(o0.queue=[],each(b0,p0=>p0())),each(a0.current,(p0,m0)=>{t0==null||t0.add(p0),d0&&p0.start({default:c0});const g0=f0[m0];g0&&(replaceRef(p0,g0.ref),p0.ref?p0.queue.push(g0):p0.start(g0))})}),useOnce(()=>()=>{each(o0.ctrls,b0=>b0.stop(!0))});const h0=A0.map(b0=>({...b0}));return t0?[h0,t0]:h0}function useSpring(e0,_e){const i0=is$2.fun(e0),[[r0],t0]=useSprings(1,i0?e0:[e0],i0?[]:_e);return i0||arguments.length==2?[r0,t0]:r0}function useTransition(e0,_e,i0){const r0=is$2.fun(_e)&&_e,{reset:t0,sort:n0,trail:s0=0,expires:o0=!0,exitBeforeEnter:a0=!1,onDestroyed:f0,ref:l0,config:u0}=r0?r0():_e,A0=reactExports.useMemo(()=>r0||arguments.length==3?SpringRef():void 0,[]),c0=toArray(e0),k0=[],d0=reactExports.useRef(null),h0=t0?null:d0.current;useIsomorphicLayoutEffect$6(()=>{d0.current=k0}),useOnce(()=>(each(k0,C0=>{A0==null||A0.add(C0.ctrl),C0.ctrl.ref=A0}),()=>{each(d0.current,C0=>{C0.expired&&clearTimeout(C0.expirationId),detachRefs(C0.ctrl,A0),C0.ctrl.stop(!0)})}));const b0=getKeys(c0,r0?r0():_e,h0),p0=t0&&d0.current||[];useIsomorphicLayoutEffect$6(()=>each(p0,({ctrl:C0,item:E0,key:R0})=>{detachRefs(C0,A0),callProp(f0,E0,R0)}));const m0=[];if(h0&&each(h0,(C0,E0)=>{C0.expired?(clearTimeout(C0.expirationId),p0.push(C0)):(E0=m0[E0]=b0.indexOf(C0.key),~E0&&(k0[E0]=C0))}),each(c0,(C0,E0)=>{k0[E0]||(k0[E0]={key:b0[E0],item:C0,phase:"mount",ctrl:new Controller$1},k0[E0].ctrl.item=C0)}),m0.length){let C0=-1;const{leave:E0}=r0?r0():_e;each(m0,(R0,M0)=>{const T0=h0[M0];~R0?(C0=k0.indexOf(T0),k0[C0]={...T0,item:c0[R0]}):E0&&k0.splice(++C0,0,T0)})}is$2.fun(n0)&&k0.sort((C0,E0)=>n0(C0.item,E0.item));let g0=-s0;const v0=useForceUpdate(),w0=getDefaultProps(_e),x0=new Map,_0=reactExports.useRef(new Map),y0=reactExports.useRef(!1);each(k0,(C0,E0)=>{const R0=C0.key,M0=C0.phase,T0=r0?r0():_e;let G0,j0;const N0=callProp(T0.delay||0,R0);if(M0=="mount")G0=T0.enter,j0="enter";else{const $0=b0.indexOf(R0)<0;if(M0!="leave")if($0)G0=T0.leave,j0="leave";else if(G0=T0.update)j0="update";else return;else if(!$0)G0=T0.enter,j0="enter";else return}if(G0=callProp(G0,C0.item,E0),G0=is$2.obj(G0)?inferTo(G0):{to:G0},!G0.config){const $0=u0||w0.config;G0.config=callProp($0,C0.item,E0,j0)}g0+=s0;const O0={...w0,delay:N0+g0,ref:l0,immediate:T0.immediate,reset:!1,...G0};if(j0=="enter"&&is$2.und(O0.from)){const $0=r0?r0():_e,z0=is$2.und($0.initial)||h0?$0.from:$0.initial;O0.from=callProp(z0,C0.item,E0)}const{onResolve:Y0}=O0;O0.onResolve=$0=>{callProp(Y0,$0);const z0=d0.current,K0=z0.find(e2=>e2.key===R0);if(K0&&!($0.cancelled&&K0.phase!="update")&&K0.ctrl.idle){const e2=z0.every(J0=>J0.ctrl.idle);if(K0.phase=="leave"){const J0=callProp(o0,K0.item);if(J0!==!1){const _i=J0===!0?0:J0;if(K0.expired=!0,!e2&&_i>0){_i<=2147483647&&(K0.expirationId=setTimeout(v0,_i));return}}}e2&&z0.some(J0=>J0.expired)&&(_0.current.delete(K0),a0&&(y0.current=!0),v0())}};const D0=getSprings(C0.ctrl,O0);j0==="leave"&&a0?_0.current.set(C0,{phase:j0,springs:D0,payload:O0}):x0.set(C0,{phase:j0,springs:D0,payload:O0})});const S0=reactExports.useContext(SpringContext),B0=usePrev(S0),I0=S0!==B0&&hasProps(S0);useIsomorphicLayoutEffect$6(()=>{I0&&each(k0,C0=>{C0.ctrl.start({default:S0})})},[S0]),each(x0,(C0,E0)=>{if(_0.current.size){const R0=k0.findIndex(M0=>M0.key===E0.key);k0.splice(R0,1)}}),useIsomorphicLayoutEffect$6(()=>{each(_0.current.size?_0.current:x0,({phase:C0,payload:E0},R0)=>{const{ctrl:M0}=R0;R0.phase=C0,A0==null||A0.add(M0),I0&&C0=="enter"&&M0.start({default:S0}),E0&&(replaceRef(M0,E0.ref),(M0.ref||A0)&&!y0.current?M0.update(E0):(M0.start(E0),y0.current&&(y0.current=!1)))})},t0?void 0:i0);const F0=C0=>reactExports.createElement(reactExports.Fragment,null,k0.map((E0,R0)=>{const{springs:M0}=x0.get(E0)||E0.ctrl,T0=C0({...M0},E0.item,E0,R0);return T0&&T0.type?reactExports.createElement(T0.type,{...T0.props,key:is$2.str(E0.key)||is$2.num(E0.key)?E0.key:E0.ctrl.id,ref:T0.ref}):T0}));return A0?[F0,A0]:F0}var nextKey=1;function getKeys(e0,{key:_e,keys:i0=_e},r0){if(i0===null){const t0=new Set;return e0.map(n0=>{const s0=r0&&r0.find(o0=>o0.item===n0&&o0.phase!=="leave"&&!t0.has(o0));return s0?(t0.add(s0),s0.key):nextKey++})}return is$2.und(i0)?e0:is$2.fun(i0)?e0.map(i0):toArray(i0)}var Interpolation=class extends FrameValue{constructor(e0,_e){super(),this.source=e0,this.idle=!0,this._active=new Set,this.calc=createInterpolator(..._e);const i0=this._get(),r0=getAnimatedType(i0);setAnimated(this,r0.create(i0))}advance(e0){const _e=this._get(),i0=this.get();isEqual$2(_e,i0)||(getAnimated(this).setValue(_e),this._onChange(_e,this.idle)),!this.idle&&checkIdle(this._active)&&becomeIdle(this)}_get(){const e0=is$2.arr(this.source)?this.source.map(getFluidValue):toArray(getFluidValue(this.source));return this.calc(...e0)}_start(){this.idle&&!checkIdle(this._active)&&(this.idle=!1,each(getPayload(this),e0=>{e0.done=!1}),globals_exports.skipAnimation?(raf$1.batchedUpdates(()=>this.advance()),becomeIdle(this)):frameLoop.start(this))}_attach(){let e0=1;each(toArray(this.source),_e=>{hasFluidValue(_e)&&addFluidObserver(_e,this),isFrameValue(_e)&&(_e.idle||this._active.add(_e),e0=Math.max(e0,_e.priority+1))}),this.priority=e0,this._start()}_detach(){each(toArray(this.source),e0=>{hasFluidValue(e0)&&removeFluidObserver(e0,this)}),this._active.clear(),becomeIdle(this)}eventObserved(e0){e0.type=="change"?e0.idle?this.advance():(this._active.add(e0.parent),this._start()):e0.type=="idle"?this._active.delete(e0.parent):e0.type=="priority"&&(this.priority=toArray(this.source).reduce((_e,i0)=>Math.max(_e,(isFrameValue(i0)?i0.priority:0)+1),0))}};function isIdle(e0){return e0.idle!==!1}function checkIdle(e0){return!e0.size||Array.from(e0).every(isIdle)}function becomeIdle(e0){e0.idle||(e0.idle=!0,each(getPayload(e0),_e=>{_e.done=!0}),callFluidObservers(e0,{type:"idle",parent:e0}))}globals_exports.assign({createStringInterpolator:createStringInterpolator2,to:(e0,_e)=>new Interpolation(e0,_e)});var isCustomPropRE=/^--/;function dangerousStyleValue(e0,_e){return _e==null||typeof _e=="boolean"||_e===""?"":typeof _e=="number"&&_e!==0&&!isCustomPropRE.test(e0)&&!(isUnitlessNumber.hasOwnProperty(e0)&&isUnitlessNumber[e0])?_e+"px":(""+_e).trim()}var attributeCache={};function applyAnimatedValues(e0,_e){if(!e0.nodeType||!e0.setAttribute)return!1;const i0=e0.nodeName==="filter"||e0.parentNode&&e0.parentNode.nodeName==="filter",{className:r0,style:t0,children:n0,scrollTop:s0,scrollLeft:o0,viewBox:a0,...f0}=_e,l0=Object.values(f0),u0=Object.keys(f0).map(A0=>i0||e0.hasAttribute(A0)?A0:attributeCache[A0]||(attributeCache[A0]=A0.replace(/([A-Z])/g,c0=>"-"+c0.toLowerCase())));n0!==void 0&&(e0.textContent=n0);for(const A0 in t0)if(t0.hasOwnProperty(A0)){const c0=dangerousStyleValue(A0,t0[A0]);isCustomPropRE.test(A0)?e0.style.setProperty(A0,c0):e0.style[A0]=c0}u0.forEach((A0,c0)=>{e0.setAttribute(A0,l0[c0])}),r0!==void 0&&(e0.className=r0),s0!==void 0&&(e0.scrollTop=s0),o0!==void 0&&(e0.scrollLeft=o0),a0!==void 0&&e0.setAttribute("viewBox",a0)}var isUnitlessNumber={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},prefixKey=(e0,_e)=>e0+_e.charAt(0).toUpperCase()+_e.substring(1),prefixes=["Webkit","Ms","Moz","O"];isUnitlessNumber=Object.keys(isUnitlessNumber).reduce((e0,_e)=>(prefixes.forEach(i0=>e0[prefixKey(i0,_e)]=e0[_e]),e0),isUnitlessNumber);var domTransforms=/^(matrix|translate|scale|rotate|skew)/,pxTransforms=/^(translate)/,degTransforms=/^(rotate|skew)/,addUnit=(e0,_e)=>is$2.num(e0)&&e0!==0?e0+_e:e0,isValueIdentity=(e0,_e)=>is$2.arr(e0)?e0.every(i0=>isValueIdentity(i0,_e)):is$2.num(e0)?e0===_e:parseFloat(e0)===_e,AnimatedStyle=class extends AnimatedObject{constructor({x:e0,y:_e,z:i0,...r0}){const t0=[],n0=[];(e0||_e||i0)&&(t0.push([e0||0,_e||0,i0||0]),n0.push(s0=>[`translate3d(${s0.map(o0=>addUnit(o0,"px")).join(",")})`,isValueIdentity(s0,0)])),eachProp(r0,(s0,o0)=>{if(o0==="transform")t0.push([s0||""]),n0.push(a0=>[a0,a0===""]);else if(domTransforms.test(o0)){if(delete r0[o0],is$2.und(s0))return;const a0=pxTransforms.test(o0)?"px":degTransforms.test(o0)?"deg":"";t0.push(toArray(s0)),n0.push(o0==="rotate3d"?([f0,l0,u0,A0])=>[`rotate3d(${f0},${l0},${u0},${addUnit(A0,a0)})`,isValueIdentity(A0,0)]:f0=>[`${o0}(${f0.map(l0=>addUnit(l0,a0)).join(",")})`,isValueIdentity(f0,o0.startsWith("scale")?1:0)])}}),t0.length&&(r0.transform=new FluidTransform(t0,n0)),super(r0)}},FluidTransform=class extends FluidValue{constructor(e0,_e){super(),this.inputs=e0,this.transforms=_e,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e0="",_e=!0;return each(this.inputs,(i0,r0)=>{const t0=getFluidValue(i0[0]),[n0,s0]=this.transforms[r0](is$2.arr(t0)?t0:i0.map(getFluidValue));e0+=" "+n0,_e=_e&&s0}),_e?"none":e0}observerAdded(e0){e0==1&&each(this.inputs,_e=>each(_e,i0=>hasFluidValue(i0)&&addFluidObserver(i0,this)))}observerRemoved(e0){e0==0&&each(this.inputs,_e=>each(_e,i0=>hasFluidValue(i0)&&removeFluidObserver(i0,this)))}eventObserved(e0){e0.type=="change"&&(this._value=null),callFluidObservers(this,e0)}},primitives=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];globals_exports.assign({batchedUpdates:reactDomExports.unstable_batchedUpdates,createStringInterpolator:createStringInterpolator2,colors:colors2});var host=createHost(primitives,{applyAnimatedValues,createAnimatedStyle:e0=>new AnimatedStyle(e0),getComponentProps:({scrollTop:e0,scrollLeft:_e,...i0})=>i0}),animated=host.animated,Root$5=reactExports.forwardRef(({id:e0,isOpen:_e,onModalClose:i0,size:r0="md",viewport:t0=!1,scrollable:n0=!1,focusId:s0,children:o0,...a0},f0)=>{let l0=`aria_label_${e0}`,u0=`aria_desc_${e0}`,A0=useClickOutside(i0),c0=useTrapFocus(_e);useKeyPress(i0,["Escape"]),reactExports.useEffect(()=>{var p0;return _e&&(document.body.style.overflow="hidden",s0&&((p0=document.getElementById(s0))==null||p0.focus())),()=>{document.body.style.overflow=""}},[s0,_e]);let k0=clsx("modal fade",{"show d-block":_e,"modal-scrollable":n0,viewport:t0,[`modal-${r0}`]:r0}),d0=clsx("modal-dialog"),h0={ariaLabelId:l0,ariaDescriptionId:u0,focusId:s0},b0=useTransition(_e,{from:{x:-50,opacity:0},enter:{x:0,opacity:1},leave:{x:50,opacity:0}});return jsxRuntimeExports.jsx(ModalContext.Provider,{value:h0,children:b0((p0,m0)=>jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[m0&&jsxRuntimeExports.jsx(animated.div,{id:e0,ref:f0,role:"dialog","aria-modal":"true","aria-labelledby":l0,"aria-describedby":u0,className:k0,style:p0,tabIndex:-1,...a0,children:jsxRuntimeExports.jsx("div",{id:`${e0}_ref`,ref:g0=>{A0.current=g0,m0&&(c0.current=g0)},className:d0,children:jsxRuntimeExports.jsx("div",{className:"modal-content",children:o0})})}),m0&&jsxRuntimeExports.jsx(animated.div,{className:"modal-backdrop fade show",style:{opacity:.65}})]}))})}),Modal=Object.assign(Root$5,{Header:ModalHeader,Subtitle:ModalSubtitle,Body:ModalBody,Footer:ModalFooter});function usePreferences(e0){return{getPreference:async()=>await odeServices.conf().getPreference(e0),savePreference:async _e=>await odeServices.conf().savePreference(e0,JSON.stringify(_e))}}var useOnboardingModal=(e0,_e)=>{let i0=reactExports.useRef(),[r0,t0]=reactExports.useState(!1),[n0,s0]=reactExports.useState(!1),{getPreference:o0,savePreference:a0}=usePreferences(e0);return reactExports.useEffect(()=>{(async()=>{let f0=await o0();if(f0)if(_e){let{display:l0,nextState:u0}=_e(f0.key);t0(l0),s0(l0),i0.current=u0}else f0.key===!0&&t0(!0),s0(!!f0.key),i0.current=void 0;else t0(!0),s0(!0),i0.current=void 0})()},[]),{isOpen:r0,setIsOpen:t0,isOnboarding:n0,handleSavePreference:reactExports.useCallback(async()=>{await a0({key:i0.current}),t0(!1),s0(!1)},[a0,t0,s0])}};function useImage({src:e0,placeholder:_e}){let[i0,r0]=reactExports.useState(e0||_e),t0=reactExports.useCallback(()=>{r0(_e)},[_e]);return reactExports.useEffect(()=>{r0(e0)},[e0]),{imgSrc:i0,onError:t0}}const commonPlaceholder="/assets/js/ode-explorer/image-placeholder.png";var Image$1=reactExports.forwardRef(({src:e0,alt:_e,imgPlaceholder:i0,ratio:r0,objectFit:t0,className:n0,onError:s0,...o0},a0)=>{let{imgSrc:f0,onError:l0}=useImage({src:e0,placeholder:i0??commonPlaceholder}),u0=h0=>{l0(),s0==null||s0(h0)},A0={"ratio ratio-1x1":r0==="1","ratio ratio-4x3":r0==="4","ratio ratio-16x9":r0==="16","ratio ratio-21x9":r0==="21"},c0={"object-fit-contain":t0==="contain","object-fit-cover":t0==="cover","object-fit-fill":t0==="fill","object-fit-scale":t0==="scale","object-fit-none":t0==="none"},k0=clsx({...A0}),d0=jsxRuntimeExports.jsx("img",{alt:_e,onError:u0,ref:a0,src:f0,className:clsx({...c0},n0),...o0});return r0?jsxRuntimeExports.jsx("div",{className:k0,children:d0}):d0});function isObject$4(e0){return e0!==null&&typeof e0=="object"&&"constructor"in e0&&e0.constructor===Object}function extend$2(e0,_e){e0===void 0&&(e0={}),_e===void 0&&(_e={}),Object.keys(_e).forEach(i0=>{typeof e0[i0]>"u"?e0[i0]=_e[i0]:isObject$4(_e[i0])&&isObject$4(e0[i0])&&Object.keys(_e[i0]).length>0&&extend$2(e0[i0],_e[i0])})}const ssrDocument={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function getDocument(){const e0=typeof document<"u"?document:{};return extend$2(e0,ssrDocument),e0}const ssrWindow={document:ssrDocument,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function e0(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e0){return typeof setTimeout>"u"?(e0(),null):setTimeout(e0,0)},cancelAnimationFrame(e0){typeof setTimeout>"u"||clearTimeout(e0)}};function getWindow$2(){const e0=typeof window<"u"?window:{};return extend$2(e0,ssrWindow),e0}function deleteProps(e0){const _e=e0;Object.keys(_e).forEach(i0=>{try{_e[i0]=null}catch{}try{delete _e[i0]}catch{}})}function nextTick(e0,_e){return _e===void 0&&(_e=0),setTimeout(e0,_e)}function now(){return Date.now()}function getComputedStyle$2(e0){const _e=getWindow$2();let i0;return _e.getComputedStyle&&(i0=_e.getComputedStyle(e0,null)),!i0&&e0.currentStyle&&(i0=e0.currentStyle),i0||(i0=e0.style),i0}function getTranslate(e0,_e){_e===void 0&&(_e="x");const i0=getWindow$2();let r0,t0,n0;const s0=getComputedStyle$2(e0);return i0.WebKitCSSMatrix?(t0=s0.transform||s0.webkitTransform,t0.split(",").length>6&&(t0=t0.split(", ").map(o0=>o0.replace(",",".")).join(", ")),n0=new i0.WebKitCSSMatrix(t0==="none"?"":t0)):(n0=s0.MozTransform||s0.OTransform||s0.MsTransform||s0.msTransform||s0.transform||s0.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r0=n0.toString().split(",")),_e==="x"&&(i0.WebKitCSSMatrix?t0=n0.m41:r0.length===16?t0=parseFloat(r0[12]):t0=parseFloat(r0[4])),_e==="y"&&(i0.WebKitCSSMatrix?t0=n0.m42:r0.length===16?t0=parseFloat(r0[13]):t0=parseFloat(r0[5])),t0||0}function isObject$3(e0){return typeof e0=="object"&&e0!==null&&e0.constructor&&Object.prototype.toString.call(e0).slice(8,-1)==="Object"}function isNode$1(e0){return typeof window<"u"&&typeof window.HTMLElement<"u"?e0 instanceof HTMLElement:e0&&(e0.nodeType===1||e0.nodeType===11)}function extend$1(){const e0=Object(arguments.length<=0?void 0:arguments[0]),_e=["__proto__","constructor","prototype"];for(let i0=1;i0<arguments.length;i0+=1){const r0=i0<0||arguments.length<=i0?void 0:arguments[i0];if(r0!=null&&!isNode$1(r0)){const t0=Object.keys(Object(r0)).filter(n0=>_e.indexOf(n0)<0);for(let n0=0,s0=t0.length;n0<s0;n0+=1){const o0=t0[n0],a0=Object.getOwnPropertyDescriptor(r0,o0);a0!==void 0&&a0.enumerable&&(isObject$3(e0[o0])&&isObject$3(r0[o0])?r0[o0].__swiper__?e0[o0]=r0[o0]:extend$1(e0[o0],r0[o0]):!isObject$3(e0[o0])&&isObject$3(r0[o0])?(e0[o0]={},r0[o0].__swiper__?e0[o0]=r0[o0]:extend$1(e0[o0],r0[o0])):e0[o0]=r0[o0])}}}return e0}function setCSSProperty(e0,_e,i0){e0.style.setProperty(_e,i0)}function animateCSSModeScroll(e0){let{swiper:_e,targetPosition:i0,side:r0}=e0;const t0=getWindow$2(),n0=-_e.translate;let s0=null,o0;const a0=_e.params.speed;_e.wrapperEl.style.scrollSnapType="none",t0.cancelAnimationFrame(_e.cssModeFrameID);const f0=i0>n0?"next":"prev",l0=(A0,c0)=>f0==="next"&&A0>=c0||f0==="prev"&&A0<=c0,u0=()=>{o0=new Date().getTime(),s0===null&&(s0=o0);const A0=Math.max(Math.min((o0-s0)/a0,1),0),c0=.5-Math.cos(A0*Math.PI)/2;let k0=n0+c0*(i0-n0);if(l0(k0,i0)&&(k0=i0),_e.wrapperEl.scrollTo({[r0]:k0}),l0(k0,i0)){_e.wrapperEl.style.overflow="hidden",_e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{_e.wrapperEl.style.overflow="",_e.wrapperEl.scrollTo({[r0]:k0})}),t0.cancelAnimationFrame(_e.cssModeFrameID);return}_e.cssModeFrameID=t0.requestAnimationFrame(u0)};u0()}function elementChildren(e0,_e){return _e===void 0&&(_e=""),[...e0.children].filter(i0=>i0.matches(_e))}function createElement(e0,_e){_e===void 0&&(_e=[]);const i0=document.createElement(e0);return i0.classList.add(...Array.isArray(_e)?_e:[_e]),i0}function elementPrevAll(e0,_e){const i0=[];for(;e0.previousElementSibling;){const r0=e0.previousElementSibling;_e?r0.matches(_e)&&i0.push(r0):i0.push(r0),e0=r0}return i0}function elementNextAll(e0,_e){const i0=[];for(;e0.nextElementSibling;){const r0=e0.nextElementSibling;_e?r0.matches(_e)&&i0.push(r0):i0.push(r0),e0=r0}return i0}function elementStyle(e0,_e){return getWindow$2().getComputedStyle(e0,null).getPropertyValue(_e)}function elementIndex(e0){let _e=e0,i0;if(_e){for(i0=0;(_e=_e.previousSibling)!==null;)_e.nodeType===1&&(i0+=1);return i0}}function elementParents(e0,_e){const i0=[];let r0=e0.parentElement;for(;r0;)_e?r0.matches(_e)&&i0.push(r0):i0.push(r0),r0=r0.parentElement;return i0}function elementOuterSize(e0,_e,i0){const r0=getWindow$2();return e0[_e==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r0.getComputedStyle(e0,null).getPropertyValue(_e==="width"?"margin-right":"margin-top"))+parseFloat(r0.getComputedStyle(e0,null).getPropertyValue(_e==="width"?"margin-left":"margin-bottom"))}function createElementIfNotDefined(e0,_e,i0,r0){return e0.params.createElements&&Object.keys(r0).forEach(t0=>{if(!i0[t0]&&i0.auto===!0){let n0=elementChildren(e0.el,`.${r0[t0]}`)[0];n0||(n0=createElement("div",r0[t0]),n0.className=r0[t0],e0.el.append(n0)),i0[t0]=n0,_e[t0]=n0}}),i0}function classesToSelector(e0){return e0===void 0&&(e0=""),`.${e0.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function Pagination(e0){let{swiper:_e,extendParams:i0,on:r0,emit:t0}=e0;const n0="swiper-pagination";i0({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:p0=>p0,formatFractionTotal:p0=>p0,bulletClass:`${n0}-bullet`,bulletActiveClass:`${n0}-bullet-active`,modifierClass:`${n0}-`,currentClass:`${n0}-current`,totalClass:`${n0}-total`,hiddenClass:`${n0}-hidden`,progressbarFillClass:`${n0}-progressbar-fill`,progressbarOppositeClass:`${n0}-progressbar-opposite`,clickableClass:`${n0}-clickable`,lockClass:`${n0}-lock`,horizontalClass:`${n0}-horizontal`,verticalClass:`${n0}-vertical`,paginationDisabledClass:`${n0}-disabled`}}),_e.pagination={el:null,bullets:[]};let s0,o0=0;const a0=p0=>(Array.isArray(p0)?p0:[p0]).filter(m0=>!!m0);function f0(){return!_e.params.pagination.el||!_e.pagination.el||Array.isArray(_e.pagination.el)&&_e.pagination.el.length===0}function l0(p0,m0){const{bulletActiveClass:g0}=_e.params.pagination;p0&&(p0=p0[`${m0==="prev"?"previous":"next"}ElementSibling`],p0&&(p0.classList.add(`${g0}-${m0}`),p0=p0[`${m0==="prev"?"previous":"next"}ElementSibling`],p0&&p0.classList.add(`${g0}-${m0}-${m0}`)))}function u0(p0){const m0=p0.target.closest(classesToSelector(_e.params.pagination.bulletClass));if(!m0)return;p0.preventDefault();const g0=elementIndex(m0)*_e.params.slidesPerGroup;if(_e.params.loop){if(_e.realIndex===g0)return;const v0=_e.getSlideIndexByData(g0),w0=_e.getSlideIndexByData(_e.realIndex);v0>_e.slides.length-_e.loopedSlides&&_e.loopFix({direction:v0>w0?"next":"prev",activeSlideIndex:v0,slideTo:!1}),_e.slideToLoop(g0)}else _e.slideTo(g0)}function A0(){const p0=_e.rtl,m0=_e.params.pagination;if(f0())return;let g0=_e.pagination.el;g0=a0(g0);let v0,w0;const x0=_e.virtual&&_e.params.virtual.enabled?_e.virtual.slides.length:_e.slides.length,_0=_e.params.loop?Math.ceil(x0/_e.params.slidesPerGroup):_e.snapGrid.length;if(_e.params.loop?(w0=_e.previousRealIndex||0,v0=_e.params.slidesPerGroup>1?Math.floor(_e.realIndex/_e.params.slidesPerGroup):_e.realIndex):typeof _e.snapIndex<"u"?(v0=_e.snapIndex,w0=_e.previousSnapIndex):(w0=_e.previousIndex||0,v0=_e.activeIndex||0),m0.type==="bullets"&&_e.pagination.bullets&&_e.pagination.bullets.length>0){const y0=_e.pagination.bullets;let S0,B0,I0;if(m0.dynamicBullets&&(s0=elementOuterSize(y0[0],_e.isHorizontal()?"width":"height"),g0.forEach(F0=>{F0.style[_e.isHorizontal()?"width":"height"]=`${s0*(m0.dynamicMainBullets+4)}px`}),m0.dynamicMainBullets>1&&w0!==void 0&&(o0+=v0-(w0||0),o0>m0.dynamicMainBullets-1?o0=m0.dynamicMainBullets-1:o0<0&&(o0=0)),S0=Math.max(v0-o0,0),B0=S0+(Math.min(y0.length,m0.dynamicMainBullets)-1),I0=(B0+S0)/2),y0.forEach(F0=>{const C0=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(E0=>`${m0.bulletActiveClass}${E0}`)].map(E0=>typeof E0=="string"&&E0.includes(" ")?E0.split(" "):E0).flat();F0.classList.remove(...C0)}),g0.length>1)y0.forEach(F0=>{const C0=elementIndex(F0);C0===v0?F0.classList.add(...m0.bulletActiveClass.split(" ")):_e.isElement&&F0.setAttribute("part","bullet"),m0.dynamicBullets&&(C0>=S0&&C0<=B0&&F0.classList.add(...`${m0.bulletActiveClass}-main`.split(" ")),C0===S0&&l0(F0,"prev"),C0===B0&&l0(F0,"next"))});else{const F0=y0[v0];if(F0&&F0.classList.add(...m0.bulletActiveClass.split(" ")),_e.isElement&&y0.forEach((C0,E0)=>{C0.setAttribute("part",E0===v0?"bullet-active":"bullet")}),m0.dynamicBullets){const C0=y0[S0],E0=y0[B0];for(let R0=S0;R0<=B0;R0+=1)y0[R0]&&y0[R0].classList.add(...`${m0.bulletActiveClass}-main`.split(" "));l0(C0,"prev"),l0(E0,"next")}}if(m0.dynamicBullets){const F0=Math.min(y0.length,m0.dynamicMainBullets+4),C0=(s0*F0-s0)/2-I0*s0,E0=p0?"right":"left";y0.forEach(R0=>{R0.style[_e.isHorizontal()?E0:"top"]=`${C0}px`})}}g0.forEach((y0,S0)=>{if(m0.type==="fraction"&&(y0.querySelectorAll(classesToSelector(m0.currentClass)).forEach(B0=>{B0.textContent=m0.formatFractionCurrent(v0+1)}),y0.querySelectorAll(classesToSelector(m0.totalClass)).forEach(B0=>{B0.textContent=m0.formatFractionTotal(_0)})),m0.type==="progressbar"){let B0;m0.progressbarOpposite?B0=_e.isHorizontal()?"vertical":"horizontal":B0=_e.isHorizontal()?"horizontal":"vertical";const I0=(v0+1)/_0;let F0=1,C0=1;B0==="horizontal"?F0=I0:C0=I0,y0.querySelectorAll(classesToSelector(m0.progressbarFillClass)).forEach(E0=>{E0.style.transform=`translate3d(0,0,0) scaleX(${F0}) scaleY(${C0})`,E0.style.transitionDuration=`${_e.params.speed}ms`})}m0.type==="custom"&&m0.renderCustom?(y0.innerHTML=m0.renderCustom(_e,v0+1,_0),S0===0&&t0("paginationRender",y0)):(S0===0&&t0("paginationRender",y0),t0("paginationUpdate",y0)),_e.params.watchOverflow&&_e.enabled&&y0.classList[_e.isLocked?"add":"remove"](m0.lockClass)})}function c0(){const p0=_e.params.pagination;if(f0())return;const m0=_e.virtual&&_e.params.virtual.enabled?_e.virtual.slides.length:_e.slides.length;let g0=_e.pagination.el;g0=a0(g0);let v0="";if(p0.type==="bullets"){let w0=_e.params.loop?Math.ceil(m0/_e.params.slidesPerGroup):_e.snapGrid.length;_e.params.freeMode&&_e.params.freeMode.enabled&&w0>m0&&(w0=m0);for(let x0=0;x0<w0;x0+=1)p0.renderBullet?v0+=p0.renderBullet.call(_e,x0,p0.bulletClass):v0+=`<${p0.bulletElement} ${_e.isElement?'part="bullet"':""} class="${p0.bulletClass}"></${p0.bulletElement}>`}p0.type==="fraction"&&(p0.renderFraction?v0=p0.renderFraction.call(_e,p0.currentClass,p0.totalClass):v0=`<span class="${p0.currentClass}"></span> / <span class="${p0.totalClass}"></span>`),p0.type==="progressbar"&&(p0.renderProgressbar?v0=p0.renderProgressbar.call(_e,p0.progressbarFillClass):v0=`<span class="${p0.progressbarFillClass}"></span>`),_e.pagination.bullets=[],g0.forEach(w0=>{p0.type!=="custom"&&(w0.innerHTML=v0||""),p0.type==="bullets"&&_e.pagination.bullets.push(...w0.querySelectorAll(classesToSelector(p0.bulletClass)))}),p0.type!=="custom"&&t0("paginationRender",g0[0])}function k0(){_e.params.pagination=createElementIfNotDefined(_e,_e.originalParams.pagination,_e.params.pagination,{el:"swiper-pagination"});const p0=_e.params.pagination;if(!p0.el)return;let m0;typeof p0.el=="string"&&_e.isElement&&(m0=_e.el.querySelector(p0.el)),!m0&&typeof p0.el=="string"&&(m0=[...document.querySelectorAll(p0.el)]),m0||(m0=p0.el),!(!m0||m0.length===0)&&(_e.params.uniqueNavElements&&typeof p0.el=="string"&&Array.isArray(m0)&&m0.length>1&&(m0=[..._e.el.querySelectorAll(p0.el)],m0.length>1&&(m0=m0.filter(g0=>elementParents(g0,".swiper")[0]===_e.el)[0])),Array.isArray(m0)&&m0.length===1&&(m0=m0[0]),Object.assign(_e.pagination,{el:m0}),m0=a0(m0),m0.forEach(g0=>{p0.type==="bullets"&&p0.clickable&&g0.classList.add(p0.clickableClass),g0.classList.add(p0.modifierClass+p0.type),g0.classList.add(_e.isHorizontal()?p0.horizontalClass:p0.verticalClass),p0.type==="bullets"&&p0.dynamicBullets&&(g0.classList.add(`${p0.modifierClass}${p0.type}-dynamic`),o0=0,p0.dynamicMainBullets<1&&(p0.dynamicMainBullets=1)),p0.type==="progressbar"&&p0.progressbarOpposite&&g0.classList.add(p0.progressbarOppositeClass),p0.clickable&&g0.addEventListener("click",u0),_e.enabled||g0.classList.add(p0.lockClass)}))}function d0(){const p0=_e.params.pagination;if(f0())return;let m0=_e.pagination.el;m0&&(m0=a0(m0),m0.forEach(g0=>{g0.classList.remove(p0.hiddenClass),g0.classList.remove(p0.modifierClass+p0.type),g0.classList.remove(_e.isHorizontal()?p0.horizontalClass:p0.verticalClass),p0.clickable&&g0.removeEventListener("click",u0)})),_e.pagination.bullets&&_e.pagination.bullets.forEach(g0=>g0.classList.remove(...p0.bulletActiveClass.split(" ")))}r0("changeDirection",()=>{if(!_e.pagination||!_e.pagination.el)return;const p0=_e.params.pagination;let{el:m0}=_e.pagination;m0=a0(m0),m0.forEach(g0=>{g0.classList.remove(p0.horizontalClass,p0.verticalClass),g0.classList.add(_e.isHorizontal()?p0.horizontalClass:p0.verticalClass)})}),r0("init",()=>{_e.params.pagination.enabled===!1?b0():(k0(),c0(),A0())}),r0("activeIndexChange",()=>{typeof _e.snapIndex>"u"&&A0()}),r0("snapIndexChange",()=>{A0()}),r0("snapGridLengthChange",()=>{c0(),A0()}),r0("destroy",()=>{d0()}),r0("enable disable",()=>{let{el:p0}=_e.pagination;p0&&(p0=a0(p0),p0.forEach(m0=>m0.classList[_e.enabled?"remove":"add"](_e.params.pagination.lockClass)))}),r0("lock unlock",()=>{A0()}),r0("click",(p0,m0)=>{const g0=m0.target,v0=a0(_e.pagination.el);if(_e.params.pagination.el&&_e.params.pagination.hideOnClick&&v0&&v0.length>0&&!g0.classList.contains(_e.params.pagination.bulletClass)){if(_e.navigation&&(_e.navigation.nextEl&&g0===_e.navigation.nextEl||_e.navigation.prevEl&&g0===_e.navigation.prevEl))return;const w0=v0[0].classList.contains(_e.params.pagination.hiddenClass);t0(w0===!0?"paginationShow":"paginationHide"),v0.forEach(x0=>x0.classList.toggle(_e.params.pagination.hiddenClass))}});const h0=()=>{_e.el.classList.remove(_e.params.pagination.paginationDisabledClass);let{el:p0}=_e.pagination;p0&&(p0=a0(p0),p0.forEach(m0=>m0.classList.remove(_e.params.pagination.paginationDisabledClass))),k0(),c0(),A0()},b0=()=>{_e.el.classList.add(_e.params.pagination.paginationDisabledClass);let{el:p0}=_e.pagination;p0&&(p0=a0(p0),p0.forEach(m0=>m0.classList.add(_e.params.pagination.paginationDisabledClass))),d0()};Object.assign(_e.pagination,{enable:h0,disable:b0,render:c0,update:A0,init:k0,destroy:d0})}let support;function calcSupport(){const e0=getWindow$2(),_e=getDocument();return{smoothScroll:_e.documentElement&&_e.documentElement.style&&"scrollBehavior"in _e.documentElement.style,touch:!!("ontouchstart"in e0||e0.DocumentTouch&&_e instanceof e0.DocumentTouch)}}function getSupport(){return support||(support=calcSupport()),support}let deviceCached;function calcDevice(e0){let{userAgent:_e}=e0===void 0?{}:e0;const i0=getSupport(),r0=getWindow$2(),t0=r0.navigator.platform,n0=_e||r0.navigator.userAgent,s0={ios:!1,android:!1},o0=r0.screen.width,a0=r0.screen.height,f0=n0.match(/(Android);?[\s\/]+([\d.]+)?/);let l0=n0.match(/(iPad).*OS\s([\d_]+)/);const u0=n0.match(/(iPod)(.*OS\s([\d_]+))?/),A0=!l0&&n0.match(/(iPhone\sOS|iOS)\s([\d_]+)/),c0=t0==="Win32";let k0=t0==="MacIntel";const d0=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!l0&&k0&&i0.touch&&d0.indexOf(`${o0}x${a0}`)>=0&&(l0=n0.match(/(Version)\/([\d.]+)/),l0||(l0=[0,1,"13_0_0"]),k0=!1),f0&&!c0&&(s0.os="android",s0.android=!0),(l0||A0||u0)&&(s0.os="ios",s0.ios=!0),s0}function getDevice(e0){return e0===void 0&&(e0={}),deviceCached||(deviceCached=calcDevice(e0)),deviceCached}let browser;function calcBrowser(){const e0=getWindow$2();let _e=!1;function i0(){const r0=e0.navigator.userAgent.toLowerCase();return r0.indexOf("safari")>=0&&r0.indexOf("chrome")<0&&r0.indexOf("android")<0}if(i0()){const r0=String(e0.navigator.userAgent);if(r0.includes("Version/")){const[t0,n0]=r0.split("Version/")[1].split(" ")[0].split(".").map(s0=>Number(s0));_e=t0<16||t0===16&&n0<2}}return{isSafari:_e||i0(),needPerspectiveFix:_e,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e0.navigator.userAgent)}}function getBrowser(){return browser||(browser=calcBrowser()),browser}function Resize(e0){let{swiper:_e,on:i0,emit:r0}=e0;const t0=getWindow$2();let n0=null,s0=null;const o0=()=>{!_e||_e.destroyed||!_e.initialized||(r0("beforeResize"),r0("resize"))},a0=()=>{!_e||_e.destroyed||!_e.initialized||(n0=new ResizeObserver(u0=>{s0=t0.requestAnimationFrame(()=>{const{width:A0,height:c0}=_e;let k0=A0,d0=c0;u0.forEach(h0=>{let{contentBoxSize:b0,contentRect:p0,target:m0}=h0;m0&&m0!==_e.el||(k0=p0?p0.width:(b0[0]||b0).inlineSize,d0=p0?p0.height:(b0[0]||b0).blockSize)}),(k0!==A0||d0!==c0)&&o0()})}),n0.observe(_e.el))},f0=()=>{s0&&t0.cancelAnimationFrame(s0),n0&&n0.unobserve&&_e.el&&(n0.unobserve(_e.el),n0=null)},l0=()=>{!_e||_e.destroyed||!_e.initialized||r0("orientationchange")};i0("init",()=>{if(_e.params.resizeObserver&&typeof t0.ResizeObserver<"u"){a0();return}t0.addEventListener("resize",o0),t0.addEventListener("orientationchange",l0)}),i0("destroy",()=>{f0(),t0.removeEventListener("resize",o0),t0.removeEventListener("orientationchange",l0)})}function Observer(e0){let{swiper:_e,extendParams:i0,on:r0,emit:t0}=e0;const n0=[],s0=getWindow$2(),o0=function(l0,u0){u0===void 0&&(u0={});const A0=s0.MutationObserver||s0.WebkitMutationObserver,c0=new A0(k0=>{if(_e.__preventObserver__)return;if(k0.length===1){t0("observerUpdate",k0[0]);return}const d0=function(){t0("observerUpdate",k0[0])};s0.requestAnimationFrame?s0.requestAnimationFrame(d0):s0.setTimeout(d0,0)});c0.observe(l0,{attributes:typeof u0.attributes>"u"?!0:u0.attributes,childList:typeof u0.childList>"u"?!0:u0.childList,characterData:typeof u0.characterData>"u"?!0:u0.characterData}),n0.push(c0)},a0=()=>{if(_e.params.observer){if(_e.params.observeParents){const l0=elementParents(_e.hostEl);for(let u0=0;u0<l0.length;u0+=1)o0(l0[u0])}o0(_e.hostEl,{childList:_e.params.observeSlideChildren}),o0(_e.wrapperEl,{attributes:!1})}},f0=()=>{n0.forEach(l0=>{l0.disconnect()}),n0.splice(0,n0.length)};i0({observer:!1,observeParents:!1,observeSlideChildren:!1}),r0("init",a0),r0("destroy",f0)}var eventsEmitter={on(e0,_e,i0){const r0=this;if(!r0.eventsListeners||r0.destroyed||typeof _e!="function")return r0;const t0=i0?"unshift":"push";return e0.split(" ").forEach(n0=>{r0.eventsListeners[n0]||(r0.eventsListeners[n0]=[]),r0.eventsListeners[n0][t0](_e)}),r0},once(e0,_e,i0){const r0=this;if(!r0.eventsListeners||r0.destroyed||typeof _e!="function")return r0;function t0(){r0.off(e0,t0),t0.__emitterProxy&&delete t0.__emitterProxy;for(var n0=arguments.length,s0=new Array(n0),o0=0;o0<n0;o0++)s0[o0]=arguments[o0];_e.apply(r0,s0)}return t0.__emitterProxy=_e,r0.on(e0,t0,i0)},onAny(e0,_e){const i0=this;if(!i0.eventsListeners||i0.destroyed||typeof e0!="function")return i0;const r0=_e?"unshift":"push";return i0.eventsAnyListeners.indexOf(e0)<0&&i0.eventsAnyListeners[r0](e0),i0},offAny(e0){const _e=this;if(!_e.eventsListeners||_e.destroyed||!_e.eventsAnyListeners)return _e;const i0=_e.eventsAnyListeners.indexOf(e0);return i0>=0&&_e.eventsAnyListeners.splice(i0,1),_e},off(e0,_e){const i0=this;return!i0.eventsListeners||i0.destroyed||!i0.eventsListeners||e0.split(" ").forEach(r0=>{typeof _e>"u"?i0.eventsListeners[r0]=[]:i0.eventsListeners[r0]&&i0.eventsListeners[r0].forEach((t0,n0)=>{(t0===_e||t0.__emitterProxy&&t0.__emitterProxy===_e)&&i0.eventsListeners[r0].splice(n0,1)})}),i0},emit(){const e0=this;if(!e0.eventsListeners||e0.destroyed||!e0.eventsListeners)return e0;let _e,i0,r0;for(var t0=arguments.length,n0=new Array(t0),s0=0;s0<t0;s0++)n0[s0]=arguments[s0];return typeof n0[0]=="string"||Array.isArray(n0[0])?(_e=n0[0],i0=n0.slice(1,n0.length),r0=e0):(_e=n0[0].events,i0=n0[0].data,r0=n0[0].context||e0),i0.unshift(r0),(Array.isArray(_e)?_e:_e.split(" ")).forEach(a0=>{e0.eventsAnyListeners&&e0.eventsAnyListeners.length&&e0.eventsAnyListeners.forEach(f0=>{f0.apply(r0,[a0,...i0])}),e0.eventsListeners&&e0.eventsListeners[a0]&&e0.eventsListeners[a0].forEach(f0=>{f0.apply(r0,i0)})}),e0}};function updateSize(){const e0=this;let _e,i0;const r0=e0.el;typeof e0.params.width<"u"&&e0.params.width!==null?_e=e0.params.width:_e=r0.clientWidth,typeof e0.params.height<"u"&&e0.params.height!==null?i0=e0.params.height:i0=r0.clientHeight,!(_e===0&&e0.isHorizontal()||i0===0&&e0.isVertical())&&(_e=_e-parseInt(elementStyle(r0,"padding-left")||0,10)-parseInt(elementStyle(r0,"padding-right")||0,10),i0=i0-parseInt(elementStyle(r0,"padding-top")||0,10)-parseInt(elementStyle(r0,"padding-bottom")||0,10),Number.isNaN(_e)&&(_e=0),Number.isNaN(i0)&&(i0=0),Object.assign(e0,{width:_e,height:i0,size:e0.isHorizontal()?_e:i0}))}function updateSlides(){const e0=this;function _e(B0){return e0.isHorizontal()?B0:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[B0]}function i0(B0,I0){return parseFloat(B0.getPropertyValue(_e(I0))||0)}const r0=e0.params,{wrapperEl:t0,slidesEl:n0,size:s0,rtlTranslate:o0,wrongRTL:a0}=e0,f0=e0.virtual&&r0.virtual.enabled,l0=f0?e0.virtual.slides.length:e0.slides.length,u0=elementChildren(n0,`.${e0.params.slideClass}, swiper-slide`),A0=f0?e0.virtual.slides.length:u0.length;let c0=[];const k0=[],d0=[];let h0=r0.slidesOffsetBefore;typeof h0=="function"&&(h0=r0.slidesOffsetBefore.call(e0));let b0=r0.slidesOffsetAfter;typeof b0=="function"&&(b0=r0.slidesOffsetAfter.call(e0));const p0=e0.snapGrid.length,m0=e0.slidesGrid.length;let g0=r0.spaceBetween,v0=-h0,w0=0,x0=0;if(typeof s0>"u")return;typeof g0=="string"&&g0.indexOf("%")>=0?g0=parseFloat(g0.replace("%",""))/100*s0:typeof g0=="string"&&(g0=parseFloat(g0)),e0.virtualSize=-g0,u0.forEach(B0=>{o0?B0.style.marginLeft="":B0.style.marginRight="",B0.style.marginBottom="",B0.style.marginTop=""}),r0.centeredSlides&&r0.cssMode&&(setCSSProperty(t0,"--swiper-centered-offset-before",""),setCSSProperty(t0,"--swiper-centered-offset-after",""));const _0=r0.grid&&r0.grid.rows>1&&e0.grid;_0&&e0.grid.initSlides(A0);let y0;const S0=r0.slidesPerView==="auto"&&r0.breakpoints&&Object.keys(r0.breakpoints).filter(B0=>typeof r0.breakpoints[B0].slidesPerView<"u").length>0;for(let B0=0;B0<A0;B0+=1){y0=0;let I0;if(u0[B0]&&(I0=u0[B0]),_0&&e0.grid.updateSlide(B0,I0,A0,_e),!(u0[B0]&&elementStyle(I0,"display")==="none")){if(r0.slidesPerView==="auto"){S0&&(u0[B0].style[_e("width")]="");const F0=getComputedStyle(I0),C0=I0.style.transform,E0=I0.style.webkitTransform;if(C0&&(I0.style.transform="none"),E0&&(I0.style.webkitTransform="none"),r0.roundLengths)y0=e0.isHorizontal()?elementOuterSize(I0,"width"):elementOuterSize(I0,"height");else{const R0=i0(F0,"width"),M0=i0(F0,"padding-left"),T0=i0(F0,"padding-right"),G0=i0(F0,"margin-left"),j0=i0(F0,"margin-right"),N0=F0.getPropertyValue("box-sizing");if(N0&&N0==="border-box")y0=R0+G0+j0;else{const{clientWidth:O0,offsetWidth:Y0}=I0;y0=R0+M0+T0+G0+j0+(Y0-O0)}}C0&&(I0.style.transform=C0),E0&&(I0.style.webkitTransform=E0),r0.roundLengths&&(y0=Math.floor(y0))}else y0=(s0-(r0.slidesPerView-1)*g0)/r0.slidesPerView,r0.roundLengths&&(y0=Math.floor(y0)),u0[B0]&&(u0[B0].style[_e("width")]=`${y0}px`);u0[B0]&&(u0[B0].swiperSlideSize=y0),d0.push(y0),r0.centeredSlides?(v0=v0+y0/2+w0/2+g0,w0===0&&B0!==0&&(v0=v0-s0/2-g0),B0===0&&(v0=v0-s0/2-g0),Math.abs(v0)<1/1e3&&(v0=0),r0.roundLengths&&(v0=Math.floor(v0)),x0%r0.slidesPerGroup===0&&c0.push(v0),k0.push(v0)):(r0.roundLengths&&(v0=Math.floor(v0)),(x0-Math.min(e0.params.slidesPerGroupSkip,x0))%e0.params.slidesPerGroup===0&&c0.push(v0),k0.push(v0),v0=v0+y0+g0),e0.virtualSize+=y0+g0,w0=y0,x0+=1}}if(e0.virtualSize=Math.max(e0.virtualSize,s0)+b0,o0&&a0&&(r0.effect==="slide"||r0.effect==="coverflow")&&(t0.style.width=`${e0.virtualSize+g0}px`),r0.setWrapperSize&&(t0.style[_e("width")]=`${e0.virtualSize+g0}px`),_0&&e0.grid.updateWrapperSize(y0,c0,_e),!r0.centeredSlides){const B0=[];for(let I0=0;I0<c0.length;I0+=1){let F0=c0[I0];r0.roundLengths&&(F0=Math.floor(F0)),c0[I0]<=e0.virtualSize-s0&&B0.push(F0)}c0=B0,Math.floor(e0.virtualSize-s0)-Math.floor(c0[c0.length-1])>1&&c0.push(e0.virtualSize-s0)}if(f0&&r0.loop){const B0=d0[0]+g0;if(r0.slidesPerGroup>1){const I0=Math.ceil((e0.virtual.slidesBefore+e0.virtual.slidesAfter)/r0.slidesPerGroup),F0=B0*r0.slidesPerGroup;for(let C0=0;C0<I0;C0+=1)c0.push(c0[c0.length-1]+F0)}for(let I0=0;I0<e0.virtual.slidesBefore+e0.virtual.slidesAfter;I0+=1)r0.slidesPerGroup===1&&c0.push(c0[c0.length-1]+B0),k0.push(k0[k0.length-1]+B0),e0.virtualSize+=B0}if(c0.length===0&&(c0=[0]),g0!==0){const B0=e0.isHorizontal()&&o0?"marginLeft":_e("marginRight");u0.filter((I0,F0)=>!r0.cssMode||r0.loop?!0:F0!==u0.length-1).forEach(I0=>{I0.style[B0]=`${g0}px`})}if(r0.centeredSlides&&r0.centeredSlidesBounds){let B0=0;d0.forEach(F0=>{B0+=F0+(g0||0)}),B0-=g0;const I0=B0-s0;c0=c0.map(F0=>F0<=0?-h0:F0>I0?I0+b0:F0)}if(r0.centerInsufficientSlides){let B0=0;if(d0.forEach(I0=>{B0+=I0+(g0||0)}),B0-=g0,B0<s0){const I0=(s0-B0)/2;c0.forEach((F0,C0)=>{c0[C0]=F0-I0}),k0.forEach((F0,C0)=>{k0[C0]=F0+I0})}}if(Object.assign(e0,{slides:u0,snapGrid:c0,slidesGrid:k0,slidesSizesGrid:d0}),r0.centeredSlides&&r0.cssMode&&!r0.centeredSlidesBounds){setCSSProperty(t0,"--swiper-centered-offset-before",`${-c0[0]}px`),setCSSProperty(t0,"--swiper-centered-offset-after",`${e0.size/2-d0[d0.length-1]/2}px`);const B0=-e0.snapGrid[0],I0=-e0.slidesGrid[0];e0.snapGrid=e0.snapGrid.map(F0=>F0+B0),e0.slidesGrid=e0.slidesGrid.map(F0=>F0+I0)}if(A0!==l0&&e0.emit("slidesLengthChange"),c0.length!==p0&&(e0.params.watchOverflow&&e0.checkOverflow(),e0.emit("snapGridLengthChange")),k0.length!==m0&&e0.emit("slidesGridLengthChange"),r0.watchSlidesProgress&&e0.updateSlidesOffset(),!f0&&!r0.cssMode&&(r0.effect==="slide"||r0.effect==="fade")){const B0=`${r0.containerModifierClass}backface-hidden`,I0=e0.el.classList.contains(B0);A0<=r0.maxBackfaceHiddenSlides?I0||e0.el.classList.add(B0):I0&&e0.el.classList.remove(B0)}}function updateAutoHeight(e0){const _e=this,i0=[],r0=_e.virtual&&_e.params.virtual.enabled;let t0=0,n0;typeof e0=="number"?_e.setTransition(e0):e0===!0&&_e.setTransition(_e.params.speed);const s0=o0=>r0?_e.slides[_e.getSlideIndexByData(o0)]:_e.slides[o0];if(_e.params.slidesPerView!=="auto"&&_e.params.slidesPerView>1)if(_e.params.centeredSlides)(_e.visibleSlides||[]).forEach(o0=>{i0.push(o0)});else for(n0=0;n0<Math.ceil(_e.params.slidesPerView);n0+=1){const o0=_e.activeIndex+n0;if(o0>_e.slides.length&&!r0)break;i0.push(s0(o0))}else i0.push(s0(_e.activeIndex));for(n0=0;n0<i0.length;n0+=1)if(typeof i0[n0]<"u"){const o0=i0[n0].offsetHeight;t0=o0>t0?o0:t0}(t0||t0===0)&&(_e.wrapperEl.style.height=`${t0}px`)}function updateSlidesOffset(){const e0=this,_e=e0.slides,i0=e0.isElement?e0.isHorizontal()?e0.wrapperEl.offsetLeft:e0.wrapperEl.offsetTop:0;for(let r0=0;r0<_e.length;r0+=1)_e[r0].swiperSlideOffset=(e0.isHorizontal()?_e[r0].offsetLeft:_e[r0].offsetTop)-i0-e0.cssOverflowAdjustment()}function updateSlidesProgress(e0){e0===void 0&&(e0=this&&this.translate||0);const _e=this,i0=_e.params,{slides:r0,rtlTranslate:t0,snapGrid:n0}=_e;if(r0.length===0)return;typeof r0[0].swiperSlideOffset>"u"&&_e.updateSlidesOffset();let s0=-e0;t0&&(s0=e0),r0.forEach(a0=>{a0.classList.remove(i0.slideVisibleClass)}),_e.visibleSlidesIndexes=[],_e.visibleSlides=[];let o0=i0.spaceBetween;typeof o0=="string"&&o0.indexOf("%")>=0?o0=parseFloat(o0.replace("%",""))/100*_e.size:typeof o0=="string"&&(o0=parseFloat(o0));for(let a0=0;a0<r0.length;a0+=1){const f0=r0[a0];let l0=f0.swiperSlideOffset;i0.cssMode&&i0.centeredSlides&&(l0-=r0[0].swiperSlideOffset);const u0=(s0+(i0.centeredSlides?_e.minTranslate():0)-l0)/(f0.swiperSlideSize+o0),A0=(s0-n0[0]+(i0.centeredSlides?_e.minTranslate():0)-l0)/(f0.swiperSlideSize+o0),c0=-(s0-l0),k0=c0+_e.slidesSizesGrid[a0];(c0>=0&&c0<_e.size-1||k0>1&&k0<=_e.size||c0<=0&&k0>=_e.size)&&(_e.visibleSlides.push(f0),_e.visibleSlidesIndexes.push(a0),r0[a0].classList.add(i0.slideVisibleClass)),f0.progress=t0?-u0:u0,f0.originalProgress=t0?-A0:A0}}function updateProgress(e0){const _e=this;if(typeof e0>"u"){const l0=_e.rtlTranslate?-1:1;e0=_e&&_e.translate&&_e.translate*l0||0}const i0=_e.params,r0=_e.maxTranslate()-_e.minTranslate();let{progress:t0,isBeginning:n0,isEnd:s0,progressLoop:o0}=_e;const a0=n0,f0=s0;if(r0===0)t0=0,n0=!0,s0=!0;else{t0=(e0-_e.minTranslate())/r0;const l0=Math.abs(e0-_e.minTranslate())<1,u0=Math.abs(e0-_e.maxTranslate())<1;n0=l0||t0<=0,s0=u0||t0>=1,l0&&(t0=0),u0&&(t0=1)}if(i0.loop){const l0=_e.getSlideIndexByData(0),u0=_e.getSlideIndexByData(_e.slides.length-1),A0=_e.slidesGrid[l0],c0=_e.slidesGrid[u0],k0=_e.slidesGrid[_e.slidesGrid.length-1],d0=Math.abs(e0);d0>=A0?o0=(d0-A0)/k0:o0=(d0+k0-c0)/k0,o0>1&&(o0-=1)}Object.assign(_e,{progress:t0,progressLoop:o0,isBeginning:n0,isEnd:s0}),(i0.watchSlidesProgress||i0.centeredSlides&&i0.autoHeight)&&_e.updateSlidesProgress(e0),n0&&!a0&&_e.emit("reachBeginning toEdge"),s0&&!f0&&_e.emit("reachEnd toEdge"),(a0&&!n0||f0&&!s0)&&_e.emit("fromEdge"),_e.emit("progress",t0)}function updateSlidesClasses(){const e0=this,{slides:_e,params:i0,slidesEl:r0,activeIndex:t0}=e0,n0=e0.virtual&&i0.virtual.enabled,s0=a0=>elementChildren(r0,`.${i0.slideClass}${a0}, swiper-slide${a0}`)[0];_e.forEach(a0=>{a0.classList.remove(i0.slideActiveClass,i0.slideNextClass,i0.slidePrevClass)});let o0;if(n0)if(i0.loop){let a0=t0-e0.virtual.slidesBefore;a0<0&&(a0=e0.virtual.slides.length+a0),a0>=e0.virtual.slides.length&&(a0-=e0.virtual.slides.length),o0=s0(`[data-swiper-slide-index="${a0}"]`)}else o0=s0(`[data-swiper-slide-index="${t0}"]`);else o0=_e[t0];if(o0){o0.classList.add(i0.slideActiveClass);let a0=elementNextAll(o0,`.${i0.slideClass}, swiper-slide`)[0];i0.loop&&!a0&&(a0=_e[0]),a0&&a0.classList.add(i0.slideNextClass);let f0=elementPrevAll(o0,`.${i0.slideClass}, swiper-slide`)[0];i0.loop&&!f0===0&&(f0=_e[_e.length-1]),f0&&f0.classList.add(i0.slidePrevClass)}e0.emitSlidesClasses()}const processLazyPreloader=(e0,_e)=>{if(!e0||e0.destroyed||!e0.params)return;const i0=()=>e0.isElement?"swiper-slide":`.${e0.params.slideClass}`,r0=_e.closest(i0());if(r0){const t0=r0.querySelector(`.${e0.params.lazyPreloaderClass}`);t0&&t0.remove()}},unlazy=(e0,_e)=>{if(!e0.slides[_e])return;const i0=e0.slides[_e].querySelector('[loading="lazy"]');i0&&i0.removeAttribute("loading")},preload=e0=>{if(!e0||e0.destroyed||!e0.params)return;let _e=e0.params.lazyPreloadPrevNext;const i0=e0.slides.length;if(!i0||!_e||_e<0)return;_e=Math.min(_e,i0);const r0=e0.params.slidesPerView==="auto"?e0.slidesPerViewDynamic():Math.ceil(e0.params.slidesPerView),t0=e0.activeIndex;if(e0.params.grid&&e0.params.grid.rows>1){const s0=t0,o0=[s0-_e];o0.push(...Array.from({length:_e}).map((a0,f0)=>s0+r0+f0)),e0.slides.forEach((a0,f0)=>{o0.includes(a0.column)&&unlazy(e0,f0)});return}const n0=t0+r0-1;if(e0.params.rewind||e0.params.loop)for(let s0=t0-_e;s0<=n0+_e;s0+=1){const o0=(s0%i0+i0)%i0;(o0<t0||o0>n0)&&unlazy(e0,o0)}else for(let s0=Math.max(t0-_e,0);s0<=Math.min(n0+_e,i0-1);s0+=1)s0!==t0&&(s0>n0||s0<t0)&&unlazy(e0,s0)};function getActiveIndexByTranslate(e0){const{slidesGrid:_e,params:i0}=e0,r0=e0.rtlTranslate?e0.translate:-e0.translate;let t0;for(let n0=0;n0<_e.length;n0+=1)typeof _e[n0+1]<"u"?r0>=_e[n0]&&r0<_e[n0+1]-(_e[n0+1]-_e[n0])/2?t0=n0:r0>=_e[n0]&&r0<_e[n0+1]&&(t0=n0+1):r0>=_e[n0]&&(t0=n0);return i0.normalizeSlideIndex&&(t0<0||typeof t0>"u")&&(t0=0),t0}function updateActiveIndex(e0){const _e=this,i0=_e.rtlTranslate?_e.translate:-_e.translate,{snapGrid:r0,params:t0,activeIndex:n0,realIndex:s0,snapIndex:o0}=_e;let a0=e0,f0;const l0=A0=>{let c0=A0-_e.virtual.slidesBefore;return c0<0&&(c0=_e.virtual.slides.length+c0),c0>=_e.virtual.slides.length&&(c0-=_e.virtual.slides.length),c0};if(typeof a0>"u"&&(a0=getActiveIndexByTranslate(_e)),r0.indexOf(i0)>=0)f0=r0.indexOf(i0);else{const A0=Math.min(t0.slidesPerGroupSkip,a0);f0=A0+Math.floor((a0-A0)/t0.slidesPerGroup)}if(f0>=r0.length&&(f0=r0.length-1),a0===n0){f0!==o0&&(_e.snapIndex=f0,_e.emit("snapIndexChange")),_e.params.loop&&_e.virtual&&_e.params.virtual.enabled&&(_e.realIndex=l0(a0));return}let u0;_e.virtual&&t0.virtual.enabled&&t0.loop?u0=l0(a0):_e.slides[a0]?u0=parseInt(_e.slides[a0].getAttribute("data-swiper-slide-index")||a0,10):u0=a0,Object.assign(_e,{previousSnapIndex:o0,snapIndex:f0,previousRealIndex:s0,realIndex:u0,previousIndex:n0,activeIndex:a0}),_e.initialized&&preload(_e),_e.emit("activeIndexChange"),_e.emit("snapIndexChange"),s0!==u0&&_e.emit("realIndexChange"),(_e.initialized||_e.params.runCallbacksOnInit)&&_e.emit("slideChange")}function updateClickedSlide(e0){const _e=this,i0=_e.params,r0=e0.closest(`.${i0.slideClass}, swiper-slide`);let t0=!1,n0;if(r0){for(let s0=0;s0<_e.slides.length;s0+=1)if(_e.slides[s0]===r0){t0=!0,n0=s0;break}}if(r0&&t0)_e.clickedSlide=r0,_e.virtual&&_e.params.virtual.enabled?_e.clickedIndex=parseInt(r0.getAttribute("data-swiper-slide-index"),10):_e.clickedIndex=n0;else{_e.clickedSlide=void 0,_e.clickedIndex=void 0;return}i0.slideToClickedSlide&&_e.clickedIndex!==void 0&&_e.clickedIndex!==_e.activeIndex&&_e.slideToClickedSlide()}var update={updateSize,updateSlides,updateAutoHeight,updateSlidesOffset,updateSlidesProgress,updateProgress,updateSlidesClasses,updateActiveIndex,updateClickedSlide};function getSwiperTranslate(e0){e0===void 0&&(e0=this.isHorizontal()?"x":"y");const _e=this,{params:i0,rtlTranslate:r0,translate:t0,wrapperEl:n0}=_e;if(i0.virtualTranslate)return r0?-t0:t0;if(i0.cssMode)return t0;let s0=getTranslate(n0,e0);return s0+=_e.cssOverflowAdjustment(),r0&&(s0=-s0),s0||0}function setTranslate(e0,_e){const i0=this,{rtlTranslate:r0,params:t0,wrapperEl:n0,progress:s0}=i0;let o0=0,a0=0;const f0=0;i0.isHorizontal()?o0=r0?-e0:e0:a0=e0,t0.roundLengths&&(o0=Math.floor(o0),a0=Math.floor(a0)),i0.previousTranslate=i0.translate,i0.translate=i0.isHorizontal()?o0:a0,t0.cssMode?n0[i0.isHorizontal()?"scrollLeft":"scrollTop"]=i0.isHorizontal()?-o0:-a0:t0.virtualTranslate||(i0.isHorizontal()?o0-=i0.cssOverflowAdjustment():a0-=i0.cssOverflowAdjustment(),n0.style.transform=`translate3d(${o0}px, ${a0}px, ${f0}px)`);let l0;const u0=i0.maxTranslate()-i0.minTranslate();u0===0?l0=0:l0=(e0-i0.minTranslate())/u0,l0!==s0&&i0.updateProgress(e0),i0.emit("setTranslate",i0.translate,_e)}function minTranslate(){return-this.snapGrid[0]}function maxTranslate(){return-this.snapGrid[this.snapGrid.length-1]}function translateTo(e0,_e,i0,r0,t0){e0===void 0&&(e0=0),_e===void 0&&(_e=this.params.speed),i0===void 0&&(i0=!0),r0===void 0&&(r0=!0);const n0=this,{params:s0,wrapperEl:o0}=n0;if(n0.animating&&s0.preventInteractionOnTransition)return!1;const a0=n0.minTranslate(),f0=n0.maxTranslate();let l0;if(r0&&e0>a0?l0=a0:r0&&e0<f0?l0=f0:l0=e0,n0.updateProgress(l0),s0.cssMode){const u0=n0.isHorizontal();if(_e===0)o0[u0?"scrollLeft":"scrollTop"]=-l0;else{if(!n0.support.smoothScroll)return animateCSSModeScroll({swiper:n0,targetPosition:-l0,side:u0?"left":"top"}),!0;o0.scrollTo({[u0?"left":"top"]:-l0,behavior:"smooth"})}return!0}return _e===0?(n0.setTransition(0),n0.setTranslate(l0),i0&&(n0.emit("beforeTransitionStart",_e,t0),n0.emit("transitionEnd"))):(n0.setTransition(_e),n0.setTranslate(l0),i0&&(n0.emit("beforeTransitionStart",_e,t0),n0.emit("transitionStart")),n0.animating||(n0.animating=!0,n0.onTranslateToWrapperTransitionEnd||(n0.onTranslateToWrapperTransitionEnd=function(A0){!n0||n0.destroyed||A0.target===this&&(n0.wrapperEl.removeEventListener("transitionend",n0.onTranslateToWrapperTransitionEnd),n0.onTranslateToWrapperTransitionEnd=null,delete n0.onTranslateToWrapperTransitionEnd,i0&&n0.emit("transitionEnd"))}),n0.wrapperEl.addEventListener("transitionend",n0.onTranslateToWrapperTransitionEnd))),!0}var translate={getTranslate:getSwiperTranslate,setTranslate,minTranslate,maxTranslate,translateTo};function setTransition(e0,_e){const i0=this;i0.params.cssMode||(i0.wrapperEl.style.transitionDuration=`${e0}ms`),i0.emit("setTransition",e0,_e)}function transitionEmit(e0){let{swiper:_e,runCallbacks:i0,direction:r0,step:t0}=e0;const{activeIndex:n0,previousIndex:s0}=_e;let o0=r0;if(o0||(n0>s0?o0="next":n0<s0?o0="prev":o0="reset"),_e.emit(`transition${t0}`),i0&&n0!==s0){if(o0==="reset"){_e.emit(`slideResetTransition${t0}`);return}_e.emit(`slideChangeTransition${t0}`),o0==="next"?_e.emit(`slideNextTransition${t0}`):_e.emit(`slidePrevTransition${t0}`)}}function transitionStart(e0,_e){e0===void 0&&(e0=!0);const i0=this,{params:r0}=i0;r0.cssMode||(r0.autoHeight&&i0.updateAutoHeight(),transitionEmit({swiper:i0,runCallbacks:e0,direction:_e,step:"Start"}))}function transitionEnd(e0,_e){e0===void 0&&(e0=!0);const i0=this,{params:r0}=i0;i0.animating=!1,!r0.cssMode&&(i0.setTransition(0),transitionEmit({swiper:i0,runCallbacks:e0,direction:_e,step:"End"}))}var transition={setTransition,transitionStart,transitionEnd};function slideTo(e0,_e,i0,r0,t0){e0===void 0&&(e0=0),_e===void 0&&(_e=this.params.speed),i0===void 0&&(i0=!0),typeof e0=="string"&&(e0=parseInt(e0,10));const n0=this;let s0=e0;s0<0&&(s0=0);const{params:o0,snapGrid:a0,slidesGrid:f0,previousIndex:l0,activeIndex:u0,rtlTranslate:A0,wrapperEl:c0,enabled:k0}=n0;if(n0.animating&&o0.preventInteractionOnTransition||!k0&&!r0&&!t0)return!1;const d0=Math.min(n0.params.slidesPerGroupSkip,s0);let h0=d0+Math.floor((s0-d0)/n0.params.slidesPerGroup);h0>=a0.length&&(h0=a0.length-1);const b0=-a0[h0];if(o0.normalizeSlideIndex)for(let m0=0;m0<f0.length;m0+=1){const g0=-Math.floor(b0*100),v0=Math.floor(f0[m0]*100),w0=Math.floor(f0[m0+1]*100);typeof f0[m0+1]<"u"?g0>=v0&&g0<w0-(w0-v0)/2?s0=m0:g0>=v0&&g0<w0&&(s0=m0+1):g0>=v0&&(s0=m0)}if(n0.initialized&&s0!==u0&&(!n0.allowSlideNext&&(A0?b0>n0.translate&&b0>n0.minTranslate():b0<n0.translate&&b0<n0.minTranslate())||!n0.allowSlidePrev&&b0>n0.translate&&b0>n0.maxTranslate()&&(u0||0)!==s0))return!1;s0!==(l0||0)&&i0&&n0.emit("beforeSlideChangeStart"),n0.updateProgress(b0);let p0;if(s0>u0?p0="next":s0<u0?p0="prev":p0="reset",A0&&-b0===n0.translate||!A0&&b0===n0.translate)return n0.updateActiveIndex(s0),o0.autoHeight&&n0.updateAutoHeight(),n0.updateSlidesClasses(),o0.effect!=="slide"&&n0.setTranslate(b0),p0!=="reset"&&(n0.transitionStart(i0,p0),n0.transitionEnd(i0,p0)),!1;if(o0.cssMode){const m0=n0.isHorizontal(),g0=A0?b0:-b0;if(_e===0){const v0=n0.virtual&&n0.params.virtual.enabled;v0&&(n0.wrapperEl.style.scrollSnapType="none",n0._immediateVirtual=!0),v0&&!n0._cssModeVirtualInitialSet&&n0.params.initialSlide>0?(n0._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{c0[m0?"scrollLeft":"scrollTop"]=g0})):c0[m0?"scrollLeft":"scrollTop"]=g0,v0&&requestAnimationFrame(()=>{n0.wrapperEl.style.scrollSnapType="",n0._immediateVirtual=!1})}else{if(!n0.support.smoothScroll)return animateCSSModeScroll({swiper:n0,targetPosition:g0,side:m0?"left":"top"}),!0;c0.scrollTo({[m0?"left":"top"]:g0,behavior:"smooth"})}return!0}return n0.setTransition(_e),n0.setTranslate(b0),n0.updateActiveIndex(s0),n0.updateSlidesClasses(),n0.emit("beforeTransitionStart",_e,r0),n0.transitionStart(i0,p0),_e===0?n0.transitionEnd(i0,p0):n0.animating||(n0.animating=!0,n0.onSlideToWrapperTransitionEnd||(n0.onSlideToWrapperTransitionEnd=function(g0){!n0||n0.destroyed||g0.target===this&&(n0.wrapperEl.removeEventListener("transitionend",n0.onSlideToWrapperTransitionEnd),n0.onSlideToWrapperTransitionEnd=null,delete n0.onSlideToWrapperTransitionEnd,n0.transitionEnd(i0,p0))}),n0.wrapperEl.addEventListener("transitionend",n0.onSlideToWrapperTransitionEnd)),!0}function slideToLoop(e0,_e,i0,r0){e0===void 0&&(e0=0),_e===void 0&&(_e=this.params.speed),i0===void 0&&(i0=!0),typeof e0=="string"&&(e0=parseInt(e0,10));const t0=this;let n0=e0;return t0.params.loop&&(t0.virtual&&t0.params.virtual.enabled?n0=n0+t0.virtual.slidesBefore:n0=t0.getSlideIndexByData(n0)),t0.slideTo(n0,_e,i0,r0)}function slideNext(e0,_e,i0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0);const r0=this,{enabled:t0,params:n0,animating:s0}=r0;if(!t0)return r0;let o0=n0.slidesPerGroup;n0.slidesPerView==="auto"&&n0.slidesPerGroup===1&&n0.slidesPerGroupAuto&&(o0=Math.max(r0.slidesPerViewDynamic("current",!0),1));const a0=r0.activeIndex<n0.slidesPerGroupSkip?1:o0,f0=r0.virtual&&n0.virtual.enabled;if(n0.loop){if(s0&&!f0&&n0.loopPreventsSliding)return!1;r0.loopFix({direction:"next"}),r0._clientLeft=r0.wrapperEl.clientLeft}return n0.rewind&&r0.isEnd?r0.slideTo(0,e0,_e,i0):r0.slideTo(r0.activeIndex+a0,e0,_e,i0)}function slidePrev(e0,_e,i0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0);const r0=this,{params:t0,snapGrid:n0,slidesGrid:s0,rtlTranslate:o0,enabled:a0,animating:f0}=r0;if(!a0)return r0;const l0=r0.virtual&&t0.virtual.enabled;if(t0.loop){if(f0&&!l0&&t0.loopPreventsSliding)return!1;r0.loopFix({direction:"prev"}),r0._clientLeft=r0.wrapperEl.clientLeft}const u0=o0?r0.translate:-r0.translate;function A0(b0){return b0<0?-Math.floor(Math.abs(b0)):Math.floor(b0)}const c0=A0(u0),k0=n0.map(b0=>A0(b0));let d0=n0[k0.indexOf(c0)-1];if(typeof d0>"u"&&t0.cssMode){let b0;n0.forEach((p0,m0)=>{c0>=p0&&(b0=m0)}),typeof b0<"u"&&(d0=n0[b0>0?b0-1:b0])}let h0=0;if(typeof d0<"u"&&(h0=s0.indexOf(d0),h0<0&&(h0=r0.activeIndex-1),t0.slidesPerView==="auto"&&t0.slidesPerGroup===1&&t0.slidesPerGroupAuto&&(h0=h0-r0.slidesPerViewDynamic("previous",!0)+1,h0=Math.max(h0,0))),t0.rewind&&r0.isBeginning){const b0=r0.params.virtual&&r0.params.virtual.enabled&&r0.virtual?r0.virtual.slides.length-1:r0.slides.length-1;return r0.slideTo(b0,e0,_e,i0)}return r0.slideTo(h0,e0,_e,i0)}function slideReset(e0,_e,i0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0);const r0=this;return r0.slideTo(r0.activeIndex,e0,_e,i0)}function slideToClosest(e0,_e,i0,r0){e0===void 0&&(e0=this.params.speed),_e===void 0&&(_e=!0),r0===void 0&&(r0=.5);const t0=this;let n0=t0.activeIndex;const s0=Math.min(t0.params.slidesPerGroupSkip,n0),o0=s0+Math.floor((n0-s0)/t0.params.slidesPerGroup),a0=t0.rtlTranslate?t0.translate:-t0.translate;if(a0>=t0.snapGrid[o0]){const f0=t0.snapGrid[o0],l0=t0.snapGrid[o0+1];a0-f0>(l0-f0)*r0&&(n0+=t0.params.slidesPerGroup)}else{const f0=t0.snapGrid[o0-1],l0=t0.snapGrid[o0];a0-f0<=(l0-f0)*r0&&(n0-=t0.params.slidesPerGroup)}return n0=Math.max(n0,0),n0=Math.min(n0,t0.slidesGrid.length-1),t0.slideTo(n0,e0,_e,i0)}function slideToClickedSlide(){const e0=this,{params:_e,slidesEl:i0}=e0,r0=_e.slidesPerView==="auto"?e0.slidesPerViewDynamic():_e.slidesPerView;let t0=e0.clickedIndex,n0;const s0=e0.isElement?"swiper-slide":`.${_e.slideClass}`;if(_e.loop){if(e0.animating)return;n0=parseInt(e0.clickedSlide.getAttribute("data-swiper-slide-index"),10),_e.centeredSlides?t0<e0.loopedSlides-r0/2||t0>e0.slides.length-e0.loopedSlides+r0/2?(e0.loopFix(),t0=e0.getSlideIndex(elementChildren(i0,`${s0}[data-swiper-slide-index="${n0}"]`)[0]),nextTick(()=>{e0.slideTo(t0)})):e0.slideTo(t0):t0>e0.slides.length-r0?(e0.loopFix(),t0=e0.getSlideIndex(elementChildren(i0,`${s0}[data-swiper-slide-index="${n0}"]`)[0]),nextTick(()=>{e0.slideTo(t0)})):e0.slideTo(t0)}else e0.slideTo(t0)}var slide={slideTo,slideToLoop,slideNext,slidePrev,slideReset,slideToClosest,slideToClickedSlide};function loopCreate(e0){const _e=this,{params:i0,slidesEl:r0}=_e;if(!i0.loop||_e.virtual&&_e.params.virtual.enabled)return;elementChildren(r0,`.${i0.slideClass}, swiper-slide`).forEach((n0,s0)=>{n0.setAttribute("data-swiper-slide-index",s0)}),_e.loopFix({slideRealIndex:e0,direction:i0.centeredSlides?void 0:"next"})}function loopFix(e0){let{slideRealIndex:_e,slideTo:i0=!0,direction:r0,setTranslate:t0,activeSlideIndex:n0,byController:s0,byMousewheel:o0}=e0===void 0?{}:e0;const a0=this;if(!a0.params.loop)return;a0.emit("beforeLoopFix");const{slides:f0,allowSlidePrev:l0,allowSlideNext:u0,slidesEl:A0,params:c0}=a0;if(a0.allowSlidePrev=!0,a0.allowSlideNext=!0,a0.virtual&&c0.virtual.enabled){i0&&(!c0.centeredSlides&&a0.snapIndex===0?a0.slideTo(a0.virtual.slides.length,0,!1,!0):c0.centeredSlides&&a0.snapIndex<c0.slidesPerView?a0.slideTo(a0.virtual.slides.length+a0.snapIndex,0,!1,!0):a0.snapIndex===a0.snapGrid.length-1&&a0.slideTo(a0.virtual.slidesBefore,0,!1,!0)),a0.allowSlidePrev=l0,a0.allowSlideNext=u0,a0.emit("loopFix");return}const k0=c0.slidesPerView==="auto"?a0.slidesPerViewDynamic():Math.ceil(parseFloat(c0.slidesPerView,10));let d0=c0.loopedSlides||k0;d0%c0.slidesPerGroup!==0&&(d0+=c0.slidesPerGroup-d0%c0.slidesPerGroup),a0.loopedSlides=d0;const h0=[],b0=[];let p0=a0.activeIndex;typeof n0>"u"?n0=a0.getSlideIndex(a0.slides.filter(x0=>x0.classList.contains(c0.slideActiveClass))[0]):p0=n0;const m0=r0==="next"||!r0,g0=r0==="prev"||!r0;let v0=0,w0=0;if(n0<d0){v0=Math.max(d0-n0,c0.slidesPerGroup);for(let x0=0;x0<d0-n0;x0+=1){const _0=x0-Math.floor(x0/f0.length)*f0.length;h0.push(f0.length-_0-1)}}else if(n0>a0.slides.length-d0*2){w0=Math.max(n0-(a0.slides.length-d0*2),c0.slidesPerGroup);for(let x0=0;x0<w0;x0+=1){const _0=x0-Math.floor(x0/f0.length)*f0.length;b0.push(_0)}}if(g0&&h0.forEach(x0=>{a0.slides[x0].swiperLoopMoveDOM=!0,A0.prepend(a0.slides[x0]),a0.slides[x0].swiperLoopMoveDOM=!1}),m0&&b0.forEach(x0=>{a0.slides[x0].swiperLoopMoveDOM=!0,A0.append(a0.slides[x0]),a0.slides[x0].swiperLoopMoveDOM=!1}),a0.recalcSlides(),c0.slidesPerView==="auto"&&a0.updateSlides(),c0.watchSlidesProgress&&a0.updateSlidesOffset(),i0){if(h0.length>0&&g0)if(typeof _e>"u"){const x0=a0.slidesGrid[p0],y0=a0.slidesGrid[p0+v0]-x0;o0?a0.setTranslate(a0.translate-y0):(a0.slideTo(p0+v0,0,!1,!0),t0&&(a0.touches[a0.isHorizontal()?"startX":"startY"]+=y0,a0.touchEventsData.currentTranslate=a0.translate))}else t0&&(a0.slideToLoop(_e,0,!1,!0),a0.touchEventsData.currentTranslate=a0.translate);else if(b0.length>0&&m0)if(typeof _e>"u"){const x0=a0.slidesGrid[p0],y0=a0.slidesGrid[p0-w0]-x0;o0?a0.setTranslate(a0.translate-y0):(a0.slideTo(p0-w0,0,!1,!0),t0&&(a0.touches[a0.isHorizontal()?"startX":"startY"]+=y0,a0.touchEventsData.currentTranslate=a0.translate))}else a0.slideToLoop(_e,0,!1,!0)}if(a0.allowSlidePrev=l0,a0.allowSlideNext=u0,a0.controller&&a0.controller.control&&!s0){const x0={slideRealIndex:_e,slideTo:!1,direction:r0,setTranslate:t0,activeSlideIndex:n0,byController:!0};Array.isArray(a0.controller.control)?a0.controller.control.forEach(_0=>{!_0.destroyed&&_0.params.loop&&_0.loopFix(x0)}):a0.controller.control instanceof a0.constructor&&a0.controller.control.params.loop&&a0.controller.control.loopFix(x0)}a0.emit("loopFix")}function loopDestroy(){const e0=this,{params:_e,slidesEl:i0}=e0;if(!_e.loop||e0.virtual&&e0.params.virtual.enabled)return;e0.recalcSlides();const r0=[];e0.slides.forEach(t0=>{const n0=typeof t0.swiperSlideIndex>"u"?t0.getAttribute("data-swiper-slide-index")*1:t0.swiperSlideIndex;r0[n0]=t0}),e0.slides.forEach(t0=>{t0.removeAttribute("data-swiper-slide-index")}),r0.forEach(t0=>{i0.append(t0)}),e0.recalcSlides(),e0.slideTo(e0.realIndex,0)}var loop={loopCreate,loopFix,loopDestroy};function setGrabCursor(e0){const _e=this;if(!_e.params.simulateTouch||_e.params.watchOverflow&&_e.isLocked||_e.params.cssMode)return;const i0=_e.params.touchEventsTarget==="container"?_e.el:_e.wrapperEl;_e.isElement&&(_e.__preventObserver__=!0),i0.style.cursor="move",i0.style.cursor=e0?"grabbing":"grab",_e.isElement&&requestAnimationFrame(()=>{_e.__preventObserver__=!1})}function unsetGrabCursor(){const e0=this;e0.params.watchOverflow&&e0.isLocked||e0.params.cssMode||(e0.isElement&&(e0.__preventObserver__=!0),e0[e0.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e0.isElement&&requestAnimationFrame(()=>{e0.__preventObserver__=!1}))}var grabCursor={setGrabCursor,unsetGrabCursor};function closestElement(e0,_e){_e===void 0&&(_e=this);function i0(r0){if(!r0||r0===getDocument()||r0===getWindow$2())return null;r0.assignedSlot&&(r0=r0.assignedSlot);const t0=r0.closest(e0);return!t0&&!r0.getRootNode?null:t0||i0(r0.getRootNode().host)}return i0(_e)}function onTouchStart(e0){const _e=this,i0=getDocument(),r0=getWindow$2(),t0=_e.touchEventsData;t0.evCache.push(e0);const{params:n0,touches:s0,enabled:o0}=_e;if(!o0||!n0.simulateTouch&&e0.pointerType==="mouse"||_e.animating&&n0.preventInteractionOnTransition)return;!_e.animating&&n0.cssMode&&n0.loop&&_e.loopFix();let a0=e0;a0.originalEvent&&(a0=a0.originalEvent);let f0=a0.target;if(n0.touchEventsTarget==="wrapper"&&!_e.wrapperEl.contains(f0)||"which"in a0&&a0.which===3||"button"in a0&&a0.button>0||t0.isTouched&&t0.isMoved)return;const l0=!!n0.noSwipingClass&&n0.noSwipingClass!=="",u0=e0.composedPath?e0.composedPath():e0.path;l0&&a0.target&&a0.target.shadowRoot&&u0&&(f0=u0[0]);const A0=n0.noSwipingSelector?n0.noSwipingSelector:`.${n0.noSwipingClass}`,c0=!!(a0.target&&a0.target.shadowRoot);if(n0.noSwiping&&(c0?closestElement(A0,f0):f0.closest(A0))){_e.allowClick=!0;return}if(n0.swipeHandler&&!f0.closest(n0.swipeHandler))return;s0.currentX=a0.pageX,s0.currentY=a0.pageY;const k0=s0.currentX,d0=s0.currentY,h0=n0.edgeSwipeDetection||n0.iOSEdgeSwipeDetection,b0=n0.edgeSwipeThreshold||n0.iOSEdgeSwipeThreshold;if(h0&&(k0<=b0||k0>=r0.innerWidth-b0))if(h0==="prevent")e0.preventDefault();else return;Object.assign(t0,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s0.startX=k0,s0.startY=d0,t0.touchStartTime=now(),_e.allowClick=!0,_e.updateSize(),_e.swipeDirection=void 0,n0.threshold>0&&(t0.allowThresholdMove=!1);let p0=!0;f0.matches(t0.focusableElements)&&(p0=!1,f0.nodeName==="SELECT"&&(t0.isTouched=!1)),i0.activeElement&&i0.activeElement.matches(t0.focusableElements)&&i0.activeElement!==f0&&i0.activeElement.blur();const m0=p0&&_e.allowTouchMove&&n0.touchStartPreventDefault;(n0.touchStartForcePreventDefault||m0)&&!f0.isContentEditable&&a0.preventDefault(),n0.freeMode&&n0.freeMode.enabled&&_e.freeMode&&_e.animating&&!n0.cssMode&&_e.freeMode.onTouchStart(),_e.emit("touchStart",a0)}function onTouchMove(e0){const _e=getDocument(),i0=this,r0=i0.touchEventsData,{params:t0,touches:n0,rtlTranslate:s0,enabled:o0}=i0;if(!o0||!t0.simulateTouch&&e0.pointerType==="mouse")return;let a0=e0;if(a0.originalEvent&&(a0=a0.originalEvent),!r0.isTouched){r0.startMoving&&r0.isScrolling&&i0.emit("touchMoveOpposite",a0);return}const f0=r0.evCache.findIndex(w0=>w0.pointerId===a0.pointerId);f0>=0&&(r0.evCache[f0]=a0);const l0=r0.evCache.length>1?r0.evCache[0]:a0,u0=l0.pageX,A0=l0.pageY;if(a0.preventedByNestedSwiper){n0.startX=u0,n0.startY=A0;return}if(!i0.allowTouchMove){a0.target.matches(r0.focusableElements)||(i0.allowClick=!1),r0.isTouched&&(Object.assign(n0,{startX:u0,startY:A0,prevX:i0.touches.currentX,prevY:i0.touches.currentY,currentX:u0,currentY:A0}),r0.touchStartTime=now());return}if(t0.touchReleaseOnEdges&&!t0.loop){if(i0.isVertical()){if(A0<n0.startY&&i0.translate<=i0.maxTranslate()||A0>n0.startY&&i0.translate>=i0.minTranslate()){r0.isTouched=!1,r0.isMoved=!1;return}}else if(u0<n0.startX&&i0.translate<=i0.maxTranslate()||u0>n0.startX&&i0.translate>=i0.minTranslate())return}if(_e.activeElement&&a0.target===_e.activeElement&&a0.target.matches(r0.focusableElements)){r0.isMoved=!0,i0.allowClick=!1;return}if(r0.allowTouchCallbacks&&i0.emit("touchMove",a0),a0.targetTouches&&a0.targetTouches.length>1)return;n0.currentX=u0,n0.currentY=A0;const c0=n0.currentX-n0.startX,k0=n0.currentY-n0.startY;if(i0.params.threshold&&Math.sqrt(c0**2+k0**2)<i0.params.threshold)return;if(typeof r0.isScrolling>"u"){let w0;i0.isHorizontal()&&n0.currentY===n0.startY||i0.isVertical()&&n0.currentX===n0.startX?r0.isScrolling=!1:c0*c0+k0*k0>=25&&(w0=Math.atan2(Math.abs(k0),Math.abs(c0))*180/Math.PI,r0.isScrolling=i0.isHorizontal()?w0>t0.touchAngle:90-w0>t0.touchAngle)}if(r0.isScrolling&&i0.emit("touchMoveOpposite",a0),typeof r0.startMoving>"u"&&(n0.currentX!==n0.startX||n0.currentY!==n0.startY)&&(r0.startMoving=!0),r0.isScrolling||i0.zoom&&i0.params.zoom&&i0.params.zoom.enabled&&r0.evCache.length>1){r0.isTouched=!1;return}if(!r0.startMoving)return;i0.allowClick=!1,!t0.cssMode&&a0.cancelable&&a0.preventDefault(),t0.touchMoveStopPropagation&&!t0.nested&&a0.stopPropagation();let d0=i0.isHorizontal()?c0:k0,h0=i0.isHorizontal()?n0.currentX-n0.previousX:n0.currentY-n0.previousY;t0.oneWayMovement&&(d0=Math.abs(d0)*(s0?1:-1),h0=Math.abs(h0)*(s0?1:-1)),n0.diff=d0,d0*=t0.touchRatio,s0&&(d0=-d0,h0=-h0);const b0=i0.touchesDirection;i0.swipeDirection=d0>0?"prev":"next",i0.touchesDirection=h0>0?"prev":"next";const p0=i0.params.loop&&!t0.cssMode;if(!r0.isMoved){if(p0&&i0.loopFix({direction:i0.swipeDirection}),r0.startTranslate=i0.getTranslate(),i0.setTransition(0),i0.animating){const w0=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});i0.wrapperEl.dispatchEvent(w0)}r0.allowMomentumBounce=!1,t0.grabCursor&&(i0.allowSlideNext===!0||i0.allowSlidePrev===!0)&&i0.setGrabCursor(!0),i0.emit("sliderFirstMove",a0)}let m0;r0.isMoved&&b0!==i0.touchesDirection&&p0&&Math.abs(d0)>=1&&(i0.loopFix({direction:i0.swipeDirection,setTranslate:!0}),m0=!0),i0.emit("sliderMove",a0),r0.isMoved=!0,r0.currentTranslate=d0+r0.startTranslate;let g0=!0,v0=t0.resistanceRatio;if(t0.touchReleaseOnEdges&&(v0=0),d0>0?(p0&&!m0&&r0.currentTranslate>(t0.centeredSlides?i0.minTranslate()-i0.size/2:i0.minTranslate())&&i0.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r0.currentTranslate>i0.minTranslate()&&(g0=!1,t0.resistance&&(r0.currentTranslate=i0.minTranslate()-1+(-i0.minTranslate()+r0.startTranslate+d0)**v0))):d0<0&&(p0&&!m0&&r0.currentTranslate<(t0.centeredSlides?i0.maxTranslate()+i0.size/2:i0.maxTranslate())&&i0.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:i0.slides.length-(t0.slidesPerView==="auto"?i0.slidesPerViewDynamic():Math.ceil(parseFloat(t0.slidesPerView,10)))}),r0.currentTranslate<i0.maxTranslate()&&(g0=!1,t0.resistance&&(r0.currentTranslate=i0.maxTranslate()+1-(i0.maxTranslate()-r0.startTranslate-d0)**v0))),g0&&(a0.preventedByNestedSwiper=!0),!i0.allowSlideNext&&i0.swipeDirection==="next"&&r0.currentTranslate<r0.startTranslate&&(r0.currentTranslate=r0.startTranslate),!i0.allowSlidePrev&&i0.swipeDirection==="prev"&&r0.currentTranslate>r0.startTranslate&&(r0.currentTranslate=r0.startTranslate),!i0.allowSlidePrev&&!i0.allowSlideNext&&(r0.currentTranslate=r0.startTranslate),t0.threshold>0)if(Math.abs(d0)>t0.threshold||r0.allowThresholdMove){if(!r0.allowThresholdMove){r0.allowThresholdMove=!0,n0.startX=n0.currentX,n0.startY=n0.currentY,r0.currentTranslate=r0.startTranslate,n0.diff=i0.isHorizontal()?n0.currentX-n0.startX:n0.currentY-n0.startY;return}}else{r0.currentTranslate=r0.startTranslate;return}!t0.followFinger||t0.cssMode||((t0.freeMode&&t0.freeMode.enabled&&i0.freeMode||t0.watchSlidesProgress)&&(i0.updateActiveIndex(),i0.updateSlidesClasses()),t0.freeMode&&t0.freeMode.enabled&&i0.freeMode&&i0.freeMode.onTouchMove(),i0.updateProgress(r0.currentTranslate),i0.setTranslate(r0.currentTranslate))}function onTouchEnd(e0){const _e=this,i0=_e.touchEventsData,r0=i0.evCache.findIndex(m0=>m0.pointerId===e0.pointerId);if(r0>=0&&i0.evCache.splice(r0,1),["pointercancel","pointerout","pointerleave"].includes(e0.type)&&!(e0.type==="pointercancel"&&(_e.browser.isSafari||_e.browser.isWebView)))return;const{params:t0,touches:n0,rtlTranslate:s0,slidesGrid:o0,enabled:a0}=_e;if(!a0||!t0.simulateTouch&&e0.pointerType==="mouse")return;let f0=e0;if(f0.originalEvent&&(f0=f0.originalEvent),i0.allowTouchCallbacks&&_e.emit("touchEnd",f0),i0.allowTouchCallbacks=!1,!i0.isTouched){i0.isMoved&&t0.grabCursor&&_e.setGrabCursor(!1),i0.isMoved=!1,i0.startMoving=!1;return}t0.grabCursor&&i0.isMoved&&i0.isTouched&&(_e.allowSlideNext===!0||_e.allowSlidePrev===!0)&&_e.setGrabCursor(!1);const l0=now(),u0=l0-i0.touchStartTime;if(_e.allowClick){const m0=f0.path||f0.composedPath&&f0.composedPath();_e.updateClickedSlide(m0&&m0[0]||f0.target),_e.emit("tap click",f0),u0<300&&l0-i0.lastClickTime<300&&_e.emit("doubleTap doubleClick",f0)}if(i0.lastClickTime=now(),nextTick(()=>{_e.destroyed||(_e.allowClick=!0)}),!i0.isTouched||!i0.isMoved||!_e.swipeDirection||n0.diff===0||i0.currentTranslate===i0.startTranslate){i0.isTouched=!1,i0.isMoved=!1,i0.startMoving=!1;return}i0.isTouched=!1,i0.isMoved=!1,i0.startMoving=!1;let A0;if(t0.followFinger?A0=s0?_e.translate:-_e.translate:A0=-i0.currentTranslate,t0.cssMode)return;if(t0.freeMode&&t0.freeMode.enabled){_e.freeMode.onTouchEnd({currentPos:A0});return}let c0=0,k0=_e.slidesSizesGrid[0];for(let m0=0;m0<o0.length;m0+=m0<t0.slidesPerGroupSkip?1:t0.slidesPerGroup){const g0=m0<t0.slidesPerGroupSkip-1?1:t0.slidesPerGroup;typeof o0[m0+g0]<"u"?A0>=o0[m0]&&A0<o0[m0+g0]&&(c0=m0,k0=o0[m0+g0]-o0[m0]):A0>=o0[m0]&&(c0=m0,k0=o0[o0.length-1]-o0[o0.length-2])}let d0=null,h0=null;t0.rewind&&(_e.isBeginning?h0=t0.virtual&&t0.virtual.enabled&&_e.virtual?_e.virtual.slides.length-1:_e.slides.length-1:_e.isEnd&&(d0=0));const b0=(A0-o0[c0])/k0,p0=c0<t0.slidesPerGroupSkip-1?1:t0.slidesPerGroup;if(u0>t0.longSwipesMs){if(!t0.longSwipes){_e.slideTo(_e.activeIndex);return}_e.swipeDirection==="next"&&(b0>=t0.longSwipesRatio?_e.slideTo(t0.rewind&&_e.isEnd?d0:c0+p0):_e.slideTo(c0)),_e.swipeDirection==="prev"&&(b0>1-t0.longSwipesRatio?_e.slideTo(c0+p0):h0!==null&&b0<0&&Math.abs(b0)>t0.longSwipesRatio?_e.slideTo(h0):_e.slideTo(c0))}else{if(!t0.shortSwipes){_e.slideTo(_e.activeIndex);return}_e.navigation&&(f0.target===_e.navigation.nextEl||f0.target===_e.navigation.prevEl)?f0.target===_e.navigation.nextEl?_e.slideTo(c0+p0):_e.slideTo(c0):(_e.swipeDirection==="next"&&_e.slideTo(d0!==null?d0:c0+p0),_e.swipeDirection==="prev"&&_e.slideTo(h0!==null?h0:c0))}}function onResize(){const e0=this,{params:_e,el:i0}=e0;if(i0&&i0.offsetWidth===0)return;_e.breakpoints&&e0.setBreakpoint();const{allowSlideNext:r0,allowSlidePrev:t0,snapGrid:n0}=e0,s0=e0.virtual&&e0.params.virtual.enabled;e0.allowSlideNext=!0,e0.allowSlidePrev=!0,e0.updateSize(),e0.updateSlides(),e0.updateSlidesClasses();const o0=s0&&_e.loop;(_e.slidesPerView==="auto"||_e.slidesPerView>1)&&e0.isEnd&&!e0.isBeginning&&!e0.params.centeredSlides&&!o0?e0.slideTo(e0.slides.length-1,0,!1,!0):e0.params.loop&&!s0?e0.slideToLoop(e0.realIndex,0,!1,!0):e0.slideTo(e0.activeIndex,0,!1,!0),e0.autoplay&&e0.autoplay.running&&e0.autoplay.paused&&(clearTimeout(e0.autoplay.resizeTimeout),e0.autoplay.resizeTimeout=setTimeout(()=>{e0.autoplay&&e0.autoplay.running&&e0.autoplay.paused&&e0.autoplay.resume()},500)),e0.allowSlidePrev=t0,e0.allowSlideNext=r0,e0.params.watchOverflow&&n0!==e0.snapGrid&&e0.checkOverflow()}function onClick(e0){const _e=this;_e.enabled&&(_e.allowClick||(_e.params.preventClicks&&e0.preventDefault(),_e.params.preventClicksPropagation&&_e.animating&&(e0.stopPropagation(),e0.stopImmediatePropagation())))}function onScroll(){const e0=this,{wrapperEl:_e,rtlTranslate:i0,enabled:r0}=e0;if(!r0)return;e0.previousTranslate=e0.translate,e0.isHorizontal()?e0.translate=-_e.scrollLeft:e0.translate=-_e.scrollTop,e0.translate===0&&(e0.translate=0),e0.updateActiveIndex(),e0.updateSlidesClasses();let t0;const n0=e0.maxTranslate()-e0.minTranslate();n0===0?t0=0:t0=(e0.translate-e0.minTranslate())/n0,t0!==e0.progress&&e0.updateProgress(i0?-e0.translate:e0.translate),e0.emit("setTranslate",e0.translate,!1)}function onLoad(e0){const _e=this;processLazyPreloader(_e,e0.target),!(_e.params.cssMode||_e.params.slidesPerView!=="auto"&&!_e.params.autoHeight)&&_e.update()}let dummyEventAttached=!1;function dummyEventListener(){}const events$3=(e0,_e)=>{const i0=getDocument(),{params:r0,el:t0,wrapperEl:n0,device:s0}=e0,o0=!!r0.nested,a0=_e==="on"?"addEventListener":"removeEventListener",f0=_e;t0[a0]("pointerdown",e0.onTouchStart,{passive:!1}),i0[a0]("pointermove",e0.onTouchMove,{passive:!1,capture:o0}),i0[a0]("pointerup",e0.onTouchEnd,{passive:!0}),i0[a0]("pointercancel",e0.onTouchEnd,{passive:!0}),i0[a0]("pointerout",e0.onTouchEnd,{passive:!0}),i0[a0]("pointerleave",e0.onTouchEnd,{passive:!0}),(r0.preventClicks||r0.preventClicksPropagation)&&t0[a0]("click",e0.onClick,!0),r0.cssMode&&n0[a0]("scroll",e0.onScroll),r0.updateOnWindowResize?e0[f0](s0.ios||s0.android?"resize orientationchange observerUpdate":"resize observerUpdate",onResize,!0):e0[f0]("observerUpdate",onResize,!0),t0[a0]("load",e0.onLoad,{capture:!0})};function attachEvents(){const e0=this,_e=getDocument(),{params:i0}=e0;e0.onTouchStart=onTouchStart.bind(e0),e0.onTouchMove=onTouchMove.bind(e0),e0.onTouchEnd=onTouchEnd.bind(e0),i0.cssMode&&(e0.onScroll=onScroll.bind(e0)),e0.onClick=onClick.bind(e0),e0.onLoad=onLoad.bind(e0),dummyEventAttached||(_e.addEventListener("touchstart",dummyEventListener),dummyEventAttached=!0),events$3(e0,"on")}function detachEvents(){events$3(this,"off")}var events$1$1={attachEvents,detachEvents};const isGridEnabled=(e0,_e)=>e0.grid&&_e.grid&&_e.grid.rows>1;function setBreakpoint(){const e0=this,{realIndex:_e,initialized:i0,params:r0,el:t0}=e0,n0=r0.breakpoints;if(!n0||n0&&Object.keys(n0).length===0)return;const s0=e0.getBreakpoint(n0,e0.params.breakpointsBase,e0.el);if(!s0||e0.currentBreakpoint===s0)return;const a0=(s0 in n0?n0[s0]:void 0)||e0.originalParams,f0=isGridEnabled(e0,r0),l0=isGridEnabled(e0,a0),u0=r0.enabled;f0&&!l0?(t0.classList.remove(`${r0.containerModifierClass}grid`,`${r0.containerModifierClass}grid-column`),e0.emitContainerClasses()):!f0&&l0&&(t0.classList.add(`${r0.containerModifierClass}grid`),(a0.grid.fill&&a0.grid.fill==="column"||!a0.grid.fill&&r0.grid.fill==="column")&&t0.classList.add(`${r0.containerModifierClass}grid-column`),e0.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(d0=>{if(typeof a0[d0]>"u")return;const h0=r0[d0]&&r0[d0].enabled,b0=a0[d0]&&a0[d0].enabled;h0&&!b0&&e0[d0].disable(),!h0&&b0&&e0[d0].enable()});const A0=a0.direction&&a0.direction!==r0.direction,c0=r0.loop&&(a0.slidesPerView!==r0.slidesPerView||A0);A0&&i0&&e0.changeDirection(),extend$1(e0.params,a0);const k0=e0.params.enabled;Object.assign(e0,{allowTouchMove:e0.params.allowTouchMove,allowSlideNext:e0.params.allowSlideNext,allowSlidePrev:e0.params.allowSlidePrev}),u0&&!k0?e0.disable():!u0&&k0&&e0.enable(),e0.currentBreakpoint=s0,e0.emit("_beforeBreakpoint",a0),c0&&i0&&(e0.loopDestroy(),e0.loopCreate(_e),e0.updateSlides()),e0.emit("breakpoint",a0)}function getBreakpoint(e0,_e,i0){if(_e===void 0&&(_e="window"),!e0||_e==="container"&&!i0)return;let r0=!1;const t0=getWindow$2(),n0=_e==="window"?t0.innerHeight:i0.clientHeight,s0=Object.keys(e0).map(o0=>{if(typeof o0=="string"&&o0.indexOf("@")===0){const a0=parseFloat(o0.substr(1));return{value:n0*a0,point:o0}}return{value:o0,point:o0}});s0.sort((o0,a0)=>parseInt(o0.value,10)-parseInt(a0.value,10));for(let o0=0;o0<s0.length;o0+=1){const{point:a0,value:f0}=s0[o0];_e==="window"?t0.matchMedia(`(min-width: ${f0}px)`).matches&&(r0=a0):f0<=i0.clientWidth&&(r0=a0)}return r0||"max"}var breakpoints={setBreakpoint,getBreakpoint};function prepareClasses(e0,_e){const i0=[];return e0.forEach(r0=>{typeof r0=="object"?Object.keys(r0).forEach(t0=>{r0[t0]&&i0.push(_e+t0)}):typeof r0=="string"&&i0.push(_e+r0)}),i0}function addClasses(){const e0=this,{classNames:_e,params:i0,rtl:r0,el:t0,device:n0}=e0,s0=prepareClasses(["initialized",i0.direction,{"free-mode":e0.params.freeMode&&i0.freeMode.enabled},{autoheight:i0.autoHeight},{rtl:r0},{grid:i0.grid&&i0.grid.rows>1},{"grid-column":i0.grid&&i0.grid.rows>1&&i0.grid.fill==="column"},{android:n0.android},{ios:n0.ios},{"css-mode":i0.cssMode},{centered:i0.cssMode&&i0.centeredSlides},{"watch-progress":i0.watchSlidesProgress}],i0.containerModifierClass);_e.push(...s0),t0.classList.add(..._e),e0.emitContainerClasses()}function removeClasses(){const e0=this,{el:_e,classNames:i0}=e0;_e.classList.remove(...i0),e0.emitContainerClasses()}var classes={addClasses,removeClasses};function checkOverflow(){const e0=this,{isLocked:_e,params:i0}=e0,{slidesOffsetBefore:r0}=i0;if(r0){const t0=e0.slides.length-1,n0=e0.slidesGrid[t0]+e0.slidesSizesGrid[t0]+r0*2;e0.isLocked=e0.size>n0}else e0.isLocked=e0.snapGrid.length===1;i0.allowSlideNext===!0&&(e0.allowSlideNext=!e0.isLocked),i0.allowSlidePrev===!0&&(e0.allowSlidePrev=!e0.isLocked),_e&&_e!==e0.isLocked&&(e0.isEnd=!1),_e!==e0.isLocked&&e0.emit(e0.isLocked?"lock":"unlock")}var checkOverflow$1={checkOverflow},defaults$1={init:!0,direction:"horizontal",oneWayMovement:!1,touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function moduleExtendParams(e0,_e){return function(r0){r0===void 0&&(r0={});const t0=Object.keys(r0)[0],n0=r0[t0];if(typeof n0!="object"||n0===null){extend$1(_e,r0);return}if(["navigation","pagination","scrollbar"].indexOf(t0)>=0&&e0[t0]===!0&&(e0[t0]={auto:!0}),!(t0 in e0&&"enabled"in n0)){extend$1(_e,r0);return}e0[t0]===!0&&(e0[t0]={enabled:!0}),typeof e0[t0]=="object"&&!("enabled"in e0[t0])&&(e0[t0].enabled=!0),e0[t0]||(e0[t0]={enabled:!1}),extend$1(_e,r0)}}const prototypes={eventsEmitter,update,translate,transition,slide,loop,grabCursor,events:events$1$1,breakpoints,checkOverflow:checkOverflow$1,classes},extendedDefaults={};let Swiper$1=class or{constructor(){let _e,i0;for(var r0=arguments.length,t0=new Array(r0),n0=0;n0<r0;n0++)t0[n0]=arguments[n0];t0.length===1&&t0[0].constructor&&Object.prototype.toString.call(t0[0]).slice(8,-1)==="Object"?i0=t0[0]:[_e,i0]=t0,i0||(i0={}),i0=extend$1({},i0),_e&&!i0.el&&(i0.el=_e);const s0=getDocument();if(i0.el&&typeof i0.el=="string"&&s0.querySelectorAll(i0.el).length>1){const l0=[];return s0.querySelectorAll(i0.el).forEach(u0=>{const A0=extend$1({},i0,{el:u0});l0.push(new or(A0))}),l0}const o0=this;o0.__swiper__=!0,o0.support=getSupport(),o0.device=getDevice({userAgent:i0.userAgent}),o0.browser=getBrowser(),o0.eventsListeners={},o0.eventsAnyListeners=[],o0.modules=[...o0.__modules__],i0.modules&&Array.isArray(i0.modules)&&o0.modules.push(...i0.modules);const a0={};o0.modules.forEach(l0=>{l0({params:i0,swiper:o0,extendParams:moduleExtendParams(i0,a0),on:o0.on.bind(o0),once:o0.once.bind(o0),off:o0.off.bind(o0),emit:o0.emit.bind(o0)})});const f0=extend$1({},defaults$1,a0);return o0.params=extend$1({},f0,extendedDefaults,i0),o0.originalParams=extend$1({},o0.params),o0.passedParams=extend$1({},i0),o0.params&&o0.params.on&&Object.keys(o0.params.on).forEach(l0=>{o0.on(l0,o0.params.on[l0])}),o0.params&&o0.params.onAny&&o0.onAny(o0.params.onAny),Object.assign(o0,{enabled:o0.params.enabled,el:_e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return o0.params.direction==="horizontal"},isVertical(){return o0.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:o0.params.allowSlideNext,allowSlidePrev:o0.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:o0.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:o0.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o0.emit("_swiper"),o0.params.init&&o0.init(),o0}getSlideIndex(_e){const{slidesEl:i0,params:r0}=this,t0=elementChildren(i0,`.${r0.slideClass}, swiper-slide`),n0=elementIndex(t0[0]);return elementIndex(_e)-n0}getSlideIndexByData(_e){return this.getSlideIndex(this.slides.filter(i0=>i0.getAttribute("data-swiper-slide-index")*1===_e)[0])}recalcSlides(){const _e=this,{slidesEl:i0,params:r0}=_e;_e.slides=elementChildren(i0,`.${r0.slideClass}, swiper-slide`)}enable(){const _e=this;_e.enabled||(_e.enabled=!0,_e.params.grabCursor&&_e.setGrabCursor(),_e.emit("enable"))}disable(){const _e=this;_e.enabled&&(_e.enabled=!1,_e.params.grabCursor&&_e.unsetGrabCursor(),_e.emit("disable"))}setProgress(_e,i0){const r0=this;_e=Math.min(Math.max(_e,0),1);const t0=r0.minTranslate(),s0=(r0.maxTranslate()-t0)*_e+t0;r0.translateTo(s0,typeof i0>"u"?0:i0),r0.updateActiveIndex(),r0.updateSlidesClasses()}emitContainerClasses(){const _e=this;if(!_e.params._emitClasses||!_e.el)return;const i0=_e.el.className.split(" ").filter(r0=>r0.indexOf("swiper")===0||r0.indexOf(_e.params.containerModifierClass)===0);_e.emit("_containerClasses",i0.join(" "))}getSlideClasses(_e){const i0=this;return i0.destroyed?"":_e.className.split(" ").filter(r0=>r0.indexOf("swiper-slide")===0||r0.indexOf(i0.params.slideClass)===0).join(" ")}emitSlidesClasses(){const _e=this;if(!_e.params._emitClasses||!_e.el)return;const i0=[];_e.slides.forEach(r0=>{const t0=_e.getSlideClasses(r0);i0.push({slideEl:r0,classNames:t0}),_e.emit("_slideClass",r0,t0)}),_e.emit("_slideClasses",i0)}slidesPerViewDynamic(_e,i0){_e===void 0&&(_e="current"),i0===void 0&&(i0=!1);const r0=this,{params:t0,slides:n0,slidesGrid:s0,slidesSizesGrid:o0,size:a0,activeIndex:f0}=r0;let l0=1;if(t0.centeredSlides){let u0=n0[f0]?n0[f0].swiperSlideSize:0,A0;for(let c0=f0+1;c0<n0.length;c0+=1)n0[c0]&&!A0&&(u0+=n0[c0].swiperSlideSize,l0+=1,u0>a0&&(A0=!0));for(let c0=f0-1;c0>=0;c0-=1)n0[c0]&&!A0&&(u0+=n0[c0].swiperSlideSize,l0+=1,u0>a0&&(A0=!0))}else if(_e==="current")for(let u0=f0+1;u0<n0.length;u0+=1)(i0?s0[u0]+o0[u0]-s0[f0]<a0:s0[u0]-s0[f0]<a0)&&(l0+=1);else for(let u0=f0-1;u0>=0;u0-=1)s0[f0]-s0[u0]<a0&&(l0+=1);return l0}update(){const _e=this;if(!_e||_e.destroyed)return;const{snapGrid:i0,params:r0}=_e;r0.breakpoints&&_e.setBreakpoint(),[..._e.el.querySelectorAll('[loading="lazy"]')].forEach(s0=>{s0.complete&&processLazyPreloader(_e,s0)}),_e.updateSize(),_e.updateSlides(),_e.updateProgress(),_e.updateSlidesClasses();function t0(){const s0=_e.rtlTranslate?_e.translate*-1:_e.translate,o0=Math.min(Math.max(s0,_e.maxTranslate()),_e.minTranslate());_e.setTranslate(o0),_e.updateActiveIndex(),_e.updateSlidesClasses()}let n0;if(r0.freeMode&&r0.freeMode.enabled&&!r0.cssMode)t0(),r0.autoHeight&&_e.updateAutoHeight();else{if((r0.slidesPerView==="auto"||r0.slidesPerView>1)&&_e.isEnd&&!r0.centeredSlides){const s0=_e.virtual&&r0.virtual.enabled?_e.virtual.slides:_e.slides;n0=_e.slideTo(s0.length-1,0,!1,!0)}else n0=_e.slideTo(_e.activeIndex,0,!1,!0);n0||t0()}r0.watchOverflow&&i0!==_e.snapGrid&&_e.checkOverflow(),_e.emit("update")}changeDirection(_e,i0){i0===void 0&&(i0=!0);const r0=this,t0=r0.params.direction;return _e||(_e=t0==="horizontal"?"vertical":"horizontal"),_e===t0||_e!=="horizontal"&&_e!=="vertical"||(r0.el.classList.remove(`${r0.params.containerModifierClass}${t0}`),r0.el.classList.add(`${r0.params.containerModifierClass}${_e}`),r0.emitContainerClasses(),r0.params.direction=_e,r0.slides.forEach(n0=>{_e==="vertical"?n0.style.width="":n0.style.height=""}),r0.emit("changeDirection"),i0&&r0.update()),r0}changeLanguageDirection(_e){const i0=this;i0.rtl&&_e==="rtl"||!i0.rtl&&_e==="ltr"||(i0.rtl=_e==="rtl",i0.rtlTranslate=i0.params.direction==="horizontal"&&i0.rtl,i0.rtl?(i0.el.classList.add(`${i0.params.containerModifierClass}rtl`),i0.el.dir="rtl"):(i0.el.classList.remove(`${i0.params.containerModifierClass}rtl`),i0.el.dir="ltr"),i0.update())}mount(_e){const i0=this;if(i0.mounted)return!0;let r0=_e||i0.params.el;if(typeof r0=="string"&&(r0=document.querySelector(r0)),!r0)return!1;r0.swiper=i0,r0.parentNode&&r0.parentNode.host&&r0.parentNode.host.nodeName==="SWIPER-CONTAINER"&&(i0.isElement=!0);const t0=()=>`.${(i0.params.wrapperClass||"").trim().split(" ").join(".")}`;let s0=r0&&r0.shadowRoot&&r0.shadowRoot.querySelector?r0.shadowRoot.querySelector(t0()):elementChildren(r0,t0())[0];return!s0&&i0.params.createElements&&(s0=createElement("div",i0.params.wrapperClass),r0.append(s0),elementChildren(r0,`.${i0.params.slideClass}`).forEach(o0=>{s0.append(o0)})),Object.assign(i0,{el:r0,wrapperEl:s0,slidesEl:i0.isElement&&!r0.parentNode.host.slideSlots?r0.parentNode.host:s0,hostEl:i0.isElement?r0.parentNode.host:r0,mounted:!0,rtl:r0.dir.toLowerCase()==="rtl"||elementStyle(r0,"direction")==="rtl",rtlTranslate:i0.params.direction==="horizontal"&&(r0.dir.toLowerCase()==="rtl"||elementStyle(r0,"direction")==="rtl"),wrongRTL:elementStyle(s0,"display")==="-webkit-box"}),!0}init(_e){const i0=this;return i0.initialized||i0.mount(_e)===!1||(i0.emit("beforeInit"),i0.params.breakpoints&&i0.setBreakpoint(),i0.addClasses(),i0.updateSize(),i0.updateSlides(),i0.params.watchOverflow&&i0.checkOverflow(),i0.params.grabCursor&&i0.enabled&&i0.setGrabCursor(),i0.params.loop&&i0.virtual&&i0.params.virtual.enabled?i0.slideTo(i0.params.initialSlide+i0.virtual.slidesBefore,0,i0.params.runCallbacksOnInit,!1,!0):i0.slideTo(i0.params.initialSlide,0,i0.params.runCallbacksOnInit,!1,!0),i0.params.loop&&i0.loopCreate(),i0.attachEvents(),[...i0.el.querySelectorAll('[loading="lazy"]')].forEach(t0=>{t0.complete?processLazyPreloader(i0,t0):t0.addEventListener("load",n0=>{processLazyPreloader(i0,n0.target)})}),preload(i0),i0.initialized=!0,preload(i0),i0.emit("init"),i0.emit("afterInit")),i0}destroy(_e,i0){_e===void 0&&(_e=!0),i0===void 0&&(i0=!0);const r0=this,{params:t0,el:n0,wrapperEl:s0,slides:o0}=r0;return typeof r0.params>"u"||r0.destroyed||(r0.emit("beforeDestroy"),r0.initialized=!1,r0.detachEvents(),t0.loop&&r0.loopDestroy(),i0&&(r0.removeClasses(),n0.removeAttribute("style"),s0.removeAttribute("style"),o0&&o0.length&&o0.forEach(a0=>{a0.classList.remove(t0.slideVisibleClass,t0.slideActiveClass,t0.slideNextClass,t0.slidePrevClass),a0.removeAttribute("style"),a0.removeAttribute("data-swiper-slide-index")})),r0.emit("destroy"),Object.keys(r0.eventsListeners).forEach(a0=>{r0.off(a0)}),_e!==!1&&(r0.el.swiper=null,deleteProps(r0)),r0.destroyed=!0),null}static extendDefaults(_e){extend$1(extendedDefaults,_e)}static get extendedDefaults(){return extendedDefaults}static get defaults(){return defaults$1}static installModule(_e){or.prototype.__modules__||(or.prototype.__modules__=[]);const i0=or.prototype.__modules__;typeof _e=="function"&&i0.indexOf(_e)<0&&i0.push(_e)}static use(_e){return Array.isArray(_e)?(_e.forEach(i0=>or.installModule(i0)),or):(or.installModule(_e),or)}};Object.keys(prototypes).forEach(e0=>{Object.keys(prototypes[e0]).forEach(_e=>{Swiper$1.prototype[_e]=prototypes[e0][_e]})});Swiper$1.use([Resize,Observer]);const paramsList=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopedSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideNextClass","slidePrevClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function isObject$2(e0){return typeof e0=="object"&&e0!==null&&e0.constructor&&Object.prototype.toString.call(e0).slice(8,-1)==="Object"}function extend(e0,_e){const i0=["__proto__","constructor","prototype"];Object.keys(_e).filter(r0=>i0.indexOf(r0)<0).forEach(r0=>{typeof e0[r0]>"u"?e0[r0]=_e[r0]:isObject$2(_e[r0])&&isObject$2(e0[r0])&&Object.keys(_e[r0]).length>0?_e[r0].__swiper__?e0[r0]=_e[r0]:extend(e0[r0],_e[r0]):e0[r0]=_e[r0]})}function needsNavigation(e0){return e0===void 0&&(e0={}),e0.navigation&&typeof e0.navigation.nextEl>"u"&&typeof e0.navigation.prevEl>"u"}function needsPagination(e0){return e0===void 0&&(e0={}),e0.pagination&&typeof e0.pagination.el>"u"}function needsScrollbar(e0){return e0===void 0&&(e0={}),e0.scrollbar&&typeof e0.scrollbar.el>"u"}function uniqueClasses(e0){e0===void 0&&(e0="");const _e=e0.split(" ").map(r0=>r0.trim()).filter(r0=>!!r0),i0=[];return _e.forEach(r0=>{i0.indexOf(r0)<0&&i0.push(r0)}),i0.join(" ")}function wrapperClass(e0){return e0===void 0&&(e0=""),e0?e0.includes("swiper-wrapper")?e0:`swiper-wrapper ${e0}`:"swiper-wrapper"}function updateSwiper(e0){let{swiper:_e,slides:i0,passedParams:r0,changedParams:t0,nextEl:n0,prevEl:s0,scrollbarEl:o0,paginationEl:a0}=e0;const f0=t0.filter(y0=>y0!=="children"&&y0!=="direction"&&y0!=="wrapperClass"),{params:l0,pagination:u0,navigation:A0,scrollbar:c0,virtual:k0,thumbs:d0}=_e;let h0,b0,p0,m0,g0,v0,w0,x0;t0.includes("thumbs")&&r0.thumbs&&r0.thumbs.swiper&&l0.thumbs&&!l0.thumbs.swiper&&(h0=!0),t0.includes("controller")&&r0.controller&&r0.controller.control&&l0.controller&&!l0.controller.control&&(b0=!0),t0.includes("pagination")&&r0.pagination&&(r0.pagination.el||a0)&&(l0.pagination||l0.pagination===!1)&&u0&&!u0.el&&(p0=!0),t0.includes("scrollbar")&&r0.scrollbar&&(r0.scrollbar.el||o0)&&(l0.scrollbar||l0.scrollbar===!1)&&c0&&!c0.el&&(m0=!0),t0.includes("navigation")&&r0.navigation&&(r0.navigation.prevEl||s0)&&(r0.navigation.nextEl||n0)&&(l0.navigation||l0.navigation===!1)&&A0&&!A0.prevEl&&!A0.nextEl&&(g0=!0);const _0=y0=>{_e[y0]&&(_e[y0].destroy(),y0==="navigation"?(_e.isElement&&(_e[y0].prevEl.remove(),_e[y0].nextEl.remove()),l0[y0].prevEl=void 0,l0[y0].nextEl=void 0,_e[y0].prevEl=void 0,_e[y0].nextEl=void 0):(_e.isElement&&_e[y0].el.remove(),l0[y0].el=void 0,_e[y0].el=void 0))};t0.includes("loop")&&_e.isElement&&(l0.loop&&!r0.loop?v0=!0:!l0.loop&&r0.loop?w0=!0:x0=!0),f0.forEach(y0=>{if(isObject$2(l0[y0])&&isObject$2(r0[y0]))extend(l0[y0],r0[y0]),(y0==="navigation"||y0==="pagination"||y0==="scrollbar")&&"enabled"in r0[y0]&&!r0[y0].enabled&&_0(y0);else{const S0=r0[y0];(S0===!0||S0===!1)&&(y0==="navigation"||y0==="pagination"||y0==="scrollbar")?S0===!1&&_0(y0):l0[y0]=r0[y0]}}),f0.includes("controller")&&!b0&&_e.controller&&_e.controller.control&&l0.controller&&l0.controller.control&&(_e.controller.control=l0.controller.control),t0.includes("children")&&i0&&k0&&l0.virtual.enabled&&(k0.slides=i0,k0.update(!0)),t0.includes("children")&&i0&&l0.loop&&(x0=!0),h0&&d0.init()&&d0.update(!0),b0&&(_e.controller.control=l0.controller.control),p0&&(_e.isElement&&(!a0||typeof a0=="string")&&(a0=document.createElement("div"),a0.classList.add("swiper-pagination"),_e.el.appendChild(a0)),a0&&(l0.pagination.el=a0),u0.init(),u0.render(),u0.update()),m0&&(_e.isElement&&(!o0||typeof o0=="string")&&(o0=document.createElement("div"),o0.classList.add("swiper-scrollbar"),_e.el.appendChild(o0)),o0&&(l0.scrollbar.el=o0),c0.init(),c0.updateSize(),c0.setTranslate()),g0&&(_e.isElement&&((!n0||typeof n0=="string")&&(n0=document.createElement("div"),n0.classList.add("swiper-button-next"),n0.innerHTML=_e.hostEl.nextButtonSvg,_e.el.appendChild(n0)),(!s0||typeof s0=="string")&&(s0=document.createElement("div"),s0.classList.add("swiper-button-prev"),n0.innerHTML=_e.hostEl.prevButtonSvg,_e.el.appendChild(s0))),n0&&(l0.navigation.nextEl=n0),s0&&(l0.navigation.prevEl=s0),A0.init(),A0.update()),t0.includes("allowSlideNext")&&(_e.allowSlideNext=r0.allowSlideNext),t0.includes("allowSlidePrev")&&(_e.allowSlidePrev=r0.allowSlidePrev),t0.includes("direction")&&_e.changeDirection(r0.direction,!1),(v0||x0)&&_e.loopDestroy(),(w0||x0)&&_e.loopCreate(),_e.update()}function getParams(e0,_e){e0===void 0&&(e0={}),_e===void 0&&(_e=!0);const i0={on:{}},r0={},t0={};extend(i0,defaults$1),i0._emitClasses=!0,i0.init=!1;const n0={},s0=paramsList.map(a0=>a0.replace(/_/,"")),o0=Object.assign({},e0);return Object.keys(o0).forEach(a0=>{typeof e0[a0]>"u"||(s0.indexOf(a0)>=0?isObject$2(e0[a0])?(i0[a0]={},t0[a0]={},extend(i0[a0],e0[a0]),extend(t0[a0],e0[a0])):(i0[a0]=e0[a0],t0[a0]=e0[a0]):a0.search(/on[A-Z]/)===0&&typeof e0[a0]=="function"?_e?r0[`${a0[2].toLowerCase()}${a0.substr(3)}`]=e0[a0]:i0.on[`${a0[2].toLowerCase()}${a0.substr(3)}`]=e0[a0]:n0[a0]=e0[a0])}),["navigation","pagination","scrollbar"].forEach(a0=>{i0[a0]===!0&&(i0[a0]={}),i0[a0]===!1&&delete i0[a0]}),{params:i0,passedParams:t0,rest:n0,events:r0}}function mountSwiper(e0,_e){let{el:i0,nextEl:r0,prevEl:t0,paginationEl:n0,scrollbarEl:s0,swiper:o0}=e0;needsNavigation(_e)&&r0&&t0&&(o0.params.navigation.nextEl=r0,o0.originalParams.navigation.nextEl=r0,o0.params.navigation.prevEl=t0,o0.originalParams.navigation.prevEl=t0),needsPagination(_e)&&n0&&(o0.params.pagination.el=n0,o0.originalParams.pagination.el=n0),needsScrollbar(_e)&&s0&&(o0.params.scrollbar.el=s0,o0.originalParams.scrollbar.el=s0),o0.init(i0)}function getChangedParams(e0,_e,i0,r0,t0){const n0=[];if(!_e)return n0;const s0=a0=>{n0.indexOf(a0)<0&&n0.push(a0)};if(i0&&r0){const a0=r0.map(t0),f0=i0.map(t0);a0.join("")!==f0.join("")&&s0("children"),r0.length!==i0.length&&s0("children")}return paramsList.filter(a0=>a0[0]==="_").map(a0=>a0.replace(/_/,"")).forEach(a0=>{if(a0 in e0&&a0 in _e)if(isObject$2(e0[a0])&&isObject$2(_e[a0])){const f0=Object.keys(e0[a0]),l0=Object.keys(_e[a0]);f0.length!==l0.length?s0(a0):(f0.forEach(u0=>{e0[a0][u0]!==_e[a0][u0]&&s0(a0)}),l0.forEach(u0=>{e0[a0][u0]!==_e[a0][u0]&&s0(a0)}))}else e0[a0]!==_e[a0]&&s0(a0)}),n0}const updateOnVirtualData=e0=>{!e0||e0.destroyed||!e0.params.virtual||e0.params.virtual&&!e0.params.virtual.enabled||(e0.updateSlides(),e0.updateProgress(),e0.updateSlidesClasses(),e0.parallax&&e0.params.parallax&&e0.params.parallax.enabled&&e0.parallax.setTranslate())};function _extends$1(){return _extends$1=Object.assign?Object.assign.bind():function(e0){for(var _e=1;_e<arguments.length;_e++){var i0=arguments[_e];for(var r0 in i0)Object.prototype.hasOwnProperty.call(i0,r0)&&(e0[r0]=i0[r0])}return e0},_extends$1.apply(this,arguments)}function isChildSwiperSlide(e0){return e0.type&&e0.type.displayName&&e0.type.displayName.includes("SwiperSlide")}function processChildren(e0){const _e=[];return React$4.Children.toArray(e0).forEach(i0=>{isChildSwiperSlide(i0)?_e.push(i0):i0.props&&i0.props.children&&processChildren(i0.props.children).forEach(r0=>_e.push(r0))}),_e}function getChildren(e0){const _e=[],i0={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return React$4.Children.toArray(e0).forEach(r0=>{if(isChildSwiperSlide(r0))_e.push(r0);else if(r0.props&&r0.props.slot&&i0[r0.props.slot])i0[r0.props.slot].push(r0);else if(r0.props&&r0.props.children){const t0=processChildren(r0.props.children);t0.length>0?t0.forEach(n0=>_e.push(n0)):i0["container-end"].push(r0)}else i0["container-end"].push(r0)}),{slides:_e,slots:i0}}function renderVirtual(e0,_e,i0){if(!i0)return null;const r0=l0=>{let u0=l0;return l0<0?u0=_e.length+l0:u0>=_e.length&&(u0=u0-_e.length),u0},t0=e0.isHorizontal()?{[e0.rtlTranslate?"right":"left"]:`${i0.offset}px`}:{top:`${i0.offset}px`},{from:n0,to:s0}=i0,o0=e0.params.loop?-_e.length:0,a0=e0.params.loop?_e.length*2:_e.length,f0=[];for(let l0=o0;l0<a0;l0+=1)l0>=n0&&l0<=s0&&f0.push(_e[r0(l0)]);return f0.map((l0,u0)=>React$4.cloneElement(l0,{swiper:e0,style:t0,key:`slide-${u0}`}))}function useIsomorphicLayoutEffect$5(e0,_e){return typeof window>"u"?reactExports.useEffect(e0,_e):reactExports.useLayoutEffect(e0,_e)}const SwiperSlideContext=reactExports.createContext(null),SwiperContext=reactExports.createContext(null),Swiper=reactExports.forwardRef(function(e0,_e){let{className:i0,tag:r0="div",wrapperTag:t0="div",children:n0,onSwiper:s0,...o0}=e0===void 0?{}:e0,a0=!1;const[f0,l0]=reactExports.useState("swiper"),[u0,A0]=reactExports.useState(null),[c0,k0]=reactExports.useState(!1),d0=reactExports.useRef(!1),h0=reactExports.useRef(null),b0=reactExports.useRef(null),p0=reactExports.useRef(null),m0=reactExports.useRef(null),g0=reactExports.useRef(null),v0=reactExports.useRef(null),w0=reactExports.useRef(null),x0=reactExports.useRef(null),{params:_0,passedParams:y0,rest:S0,events:B0}=getParams(o0),{slides:I0,slots:F0}=getChildren(n0),C0=()=>{k0(!c0)};Object.assign(_0.on,{_containerClasses(G0,j0){l0(j0)}});const E0=()=>{Object.assign(_0.on,B0),a0=!0;const G0={..._0};if(delete G0.wrapperClass,b0.current=new Swiper$1(G0),b0.current.virtual&&b0.current.params.virtual.enabled){b0.current.virtual.slides=I0;const j0={cache:!1,slides:I0,renderExternal:A0,renderExternalUpdate:!1};extend(b0.current.params.virtual,j0),extend(b0.current.originalParams.virtual,j0)}};h0.current||E0(),b0.current&&b0.current.on("_beforeBreakpoint",C0);const R0=()=>{a0||!B0||!b0.current||Object.keys(B0).forEach(G0=>{b0.current.on(G0,B0[G0])})},M0=()=>{!B0||!b0.current||Object.keys(B0).forEach(G0=>{b0.current.off(G0,B0[G0])})};reactExports.useEffect(()=>()=>{b0.current&&b0.current.off("_beforeBreakpoint",C0)}),reactExports.useEffect(()=>{!d0.current&&b0.current&&(b0.current.emitSlidesClasses(),d0.current=!0)}),useIsomorphicLayoutEffect$5(()=>{if(_e&&(_e.current=h0.current),!!h0.current)return b0.current.destroyed&&E0(),mountSwiper({el:h0.current,nextEl:g0.current,prevEl:v0.current,paginationEl:w0.current,scrollbarEl:x0.current,swiper:b0.current},_0),s0&&s0(b0.current),()=>{b0.current&&!b0.current.destroyed&&b0.current.destroy(!0,!1)}},[]),useIsomorphicLayoutEffect$5(()=>{R0();const G0=getChangedParams(y0,p0.current,I0,m0.current,j0=>j0.key);return p0.current=y0,m0.current=I0,G0.length&&b0.current&&!b0.current.destroyed&&updateSwiper({swiper:b0.current,slides:I0,passedParams:y0,changedParams:G0,nextEl:g0.current,prevEl:v0.current,scrollbarEl:x0.current,paginationEl:w0.current}),()=>{M0()}}),useIsomorphicLayoutEffect$5(()=>{updateOnVirtualData(b0.current)},[u0]);function T0(){return _0.virtual?renderVirtual(b0.current,I0,u0):I0.map((G0,j0)=>React$4.cloneElement(G0,{swiper:b0.current,swiperSlideIndex:j0}))}return React$4.createElement(r0,_extends$1({ref:h0,className:uniqueClasses(`${f0}${i0?` ${i0}`:""}`)},S0),React$4.createElement(SwiperContext.Provider,{value:b0.current},F0["container-start"],React$4.createElement(t0,{className:wrapperClass(_0.wrapperClass)},F0["wrapper-start"],T0(),F0["wrapper-end"]),needsNavigation(_0)&&React$4.createElement(React$4.Fragment,null,React$4.createElement("div",{ref:v0,className:"swiper-button-prev"}),React$4.createElement("div",{ref:g0,className:"swiper-button-next"})),needsScrollbar(_0)&&React$4.createElement("div",{ref:x0,className:"swiper-scrollbar"}),needsPagination(_0)&&React$4.createElement("div",{ref:w0,className:"swiper-pagination"}),F0["container-end"]))});Swiper.displayName="Swiper";const SwiperSlide=reactExports.forwardRef(function(e0,_e){let{tag:i0="div",children:r0,className:t0="",swiper:n0,zoom:s0,lazy:o0,virtualIndex:a0,swiperSlideIndex:f0,...l0}=e0===void 0?{}:e0;const u0=reactExports.useRef(null),[A0,c0]=reactExports.useState("swiper-slide"),[k0,d0]=reactExports.useState(!1);function h0(g0,v0,w0){v0===u0.current&&c0(w0)}useIsomorphicLayoutEffect$5(()=>{if(typeof f0<"u"&&(u0.current.swiperSlideIndex=f0),_e&&(_e.current=u0.current),!(!u0.current||!n0)){if(n0.destroyed){A0!=="swiper-slide"&&c0("swiper-slide");return}return n0.on("_slideClass",h0),()=>{n0&&n0.off("_slideClass",h0)}}}),useIsomorphicLayoutEffect$5(()=>{n0&&u0.current&&!n0.destroyed&&c0(n0.getSlideClasses(u0.current))},[n0]);const b0={isActive:A0.indexOf("swiper-slide-active")>=0,isVisible:A0.indexOf("swiper-slide-visible")>=0,isPrev:A0.indexOf("swiper-slide-prev")>=0,isNext:A0.indexOf("swiper-slide-next")>=0},p0=()=>typeof r0=="function"?r0(b0):r0,m0=()=>{d0(!0)};return React$4.createElement(i0,_extends$1({ref:u0,className:uniqueClasses(`${A0}${t0?` ${t0}`:""}`),"data-swiper-slide-index":a0,onLoad:m0},l0),s0&&React$4.createElement(SwiperSlideContext.Provider,{value:b0},React$4.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s0=="number"?s0:void 0},p0(),o0&&!k0&&React$4.createElement("div",{className:"swiper-lazy-preloader"}))),!s0&&React$4.createElement(SwiperSlideContext.Provider,{value:b0},p0(),o0&&!k0&&React$4.createElement("div",{className:"swiper-lazy-preloader"})))});SwiperSlide.displayName="SwiperSlide";var OnboardingModal$2=reactExports.forwardRef(({id:e0,items:_e,modalOptions:i0={},isOnboardingChange:r0,onDisplayRuleCheck:t0=s0=>({display:s0===!0,nextState:!1})},n0)=>{var w0;let[s0,o0]=reactExports.useState(),[a0,f0]=reactExports.useState(0),{isOpen:l0,isOnboarding:u0,setIsOpen:A0,handleSavePreference:c0}=useOnboardingModal(e0,t0);reactExports.useImperativeHandle(n0,()=>({setIsOpen:A0,handleSavePreference:c0})),reactExports.useEffect(()=>{r0==null||r0(u0)},[u0,r0]),reactExports.useEffect(()=>{let x0=document.createElement("link");return x0.href="https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css",x0.rel="stylesheet",x0.type="text/css",document.head.appendChild(x0),()=>{document.head.removeChild(x0)}},[]);let{t:k0}=useTranslation(),{title:d0,prevText:h0,closeText:b0,nextText:p0}=i0,m0=(s0==null?void 0:s0.activeIndex)!=null&&((w0=_e[s0==null?void 0:s0.activeIndex])!=null&&w0.title)?_e[s0.activeIndex].title:d0,g0=()=>{c0(),f0(0)},v0=()=>{A0(!1),f0(0)};return l0?reactDomExports.createPortal(jsxRuntimeExports.jsxs(Modal,{id:"onboarding-modal","data-testid":"modal-onboarding",size:"md",isOpen:l0,focusId:"nextButtonId",onModalClose:v0,children:[jsxRuntimeExports.jsx(Modal.Header,{onModalClose:v0,centered:!0,children:k0(m0||"explorer.modal.onboarding.trash.title")}),jsxRuntimeExports.jsx(Modal.Body,{children:jsxRuntimeExports.jsx(Swiper,{modules:[Pagination],onSwiper:x0=>{o0(x0)},onSlideChange:x0=>{f0(x0.progress)},pagination:{clickable:!0},children:_e.map((x0,_0)=>jsxRuntimeExports.jsxs(SwiperSlide,{children:[jsxRuntimeExports.jsx(Image$1,{width:"270",height:"140",className:"mx-auto my-12 onboarding-modal-image",loading:"lazy",src:x0.src,alt:k0(x0.alt)}),jsxRuntimeExports.jsx("p",{className:"text-center",dangerouslySetInnerHTML:{__html:k0(x0.text)}})]},_0))})}),jsxRuntimeExports.jsxs(Modal.Footer,{children:[jsxRuntimeExports.jsx(Button,{"data-testid":"modal-onboarding-later",type:"button",color:"tertiary",variant:"ghost",onClick:v0,children:k0("explorer.modal.onboarding.trash.later")}),a0>0&&jsxRuntimeExports.jsx(Button,{"data-testid":"modal-onboarding-previous",type:"button",color:"primary",variant:"outline",onClick:()=>s0.slidePrev(),children:k0(h0||"explorer.modal.onboarding.trash.prev")}),_e.length>1&&a0<1&&jsxRuntimeExports.jsx(Button,{id:"nextButtonId","data-testid":"modal-onboarding-next",type:"button",color:"primary",variant:"filled",onClick:()=>s0.slideNext(),children:k0(p0||"explorer.modal.onboarding.trash.next")}),(_e.length===1||a0===1)&&jsxRuntimeExports.jsx(Button,{"data-testid":"modal-onboarding-close",type:"button",color:"primary",variant:"filled",onClick:()=>{u0?g0():v0()},children:k0(b0||"explorer.modal.onboarding.trash.close")})]})]}),document.getElementById("portal")||document.body):null}),SvgIconMic=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 .5a4.07 4.07 0 0 0-2.812 1.115A3.8 3.8 0 0 0 8 4.364V12a3.8 3.8 0 0 0 1.188 2.748A4.07 4.07 0 0 0 12 15.864a4.07 4.07 0 0 0 2.812-1.116A3.8 3.8 0 0 0 16 12V4.364a3.8 3.8 0 0 0-1.188-2.749A4.07 4.07 0 0 0 12 .5m-1.43 2.562A2.07 2.07 0 0 1 12 2.5c.545 0 1.059.207 1.43.562.371.354.57.823.57 1.302V12a1.8 1.8 0 0 1-.57 1.302 2.07 2.07 0 0 1-1.43.562 2.07 2.07 0 0 1-1.43-.562A1.8 1.8 0 0 1 10 12V4.364a1.8 1.8 0 0 1 .57-1.302M6 10.091a1 1 0 0 0-2 0V12c0 2.053.855 4.011 2.36 5.448A8.13 8.13 0 0 0 11 19.622V21.5H8a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2h-3v-1.878a8.13 8.13 0 0 0 4.64-2.174C19.145 16.011 20 14.053 20 12v-1.91a1 1 0 0 0-2 0V12c0 1.491-.62 2.932-1.74 4.001s-2.646 1.678-4.248 1.68h-.024c-1.602-.002-3.128-.611-4.247-1.68C6.62 14.931 6 13.491 6 12z",clipRule:"evenodd"})]}),RECORD_NAME_DATE_FORMAT="YYYY-MM-DD HH[h]mm",SvgIconPause=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5.5 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm0 2h3v16h-3zm10-2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h3a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2zm0 2h3v16h-3z",clipRule:"evenodd"})]}),SvgIconRecord=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("circle",{cx:12,cy:12,r:11,fill:"currentColor"})]}),AudioRecorderTimer=({recordState:e0,playState:_e,recordTime:i0,audioTime:r0,maxDuration:t0})=>jsxRuntimeExports.jsxs("div",{className:"audio-recorder-time",children:[_e==="IDLE"&&jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center",children:[jsxRuntimeExports.jsx(e0==="PAUSED"?SvgIconPause:SvgIconRecord,{width:12,height:12,className:"me-8 text-danger"}),e$5(e0==="IDLE"?0:i0)+" / "+e$5(t0)]}),_e!=="IDLE"&&jsxRuntimeExports.jsxs("div",{className:"d-flex align-items-center mx-auto",children:[jsxRuntimeExports.jsx(SvgIconMic,{width:12,height:12,className:"me-8"}),e$5(r0*1e3)," /",e$5(i0)]})]}),SvgIconPlayFilled=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M5 3.804c0-1.57 1.728-2.528 3.06-1.696l13.113 8.196a2 2 0 0 1 0 3.392L8.06 21.892C6.728 22.724 5 21.767 5 20.196z"})]}),SvgIconRecordPause=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M23 12c0 6.075-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1s11 4.925 11 11M10 6H8a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1m4 0h2a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1",clipRule:"evenodd"})]}),SvgIconRefresh=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("g",{clipPath:"url(#icon-refresh_svg__a)",children:jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12.304 21c3.015 0 5.65-1.924 6.838-4.752a.986.986 0 0 1 1.297-.53c.503.216.738.803.524 1.311C19.498 20.522 16.19 23 12.304 23c-4.644 0-8.444-3.522-9.299-8.113L1.86 17.142a.99.99 0 0 1-1.33.449 1 1 0 0 1-.417-1.348L2.51 11.52c.135-.265.376-.457.66-.527a.96.96 0 0 1 .812.169L8.1 14.297c.433.33.515.958.185 1.404a.98.98 0 0 1-1.382.212L4.93 14.41c.65 3.785 3.744 6.59 7.374 6.59m4.794-12.913a.98.98 0 0 0-1.381.211 1.01 1.01 0 0 0 .184 1.405l4.117 3.135a.96.96 0 0 0 .812.169c.284-.07.525-.262.66-.527l2.398-4.723c.252-.496.065-1.1-.418-1.348a.99.99 0 0 0-1.329.449l-1.145 2.255C20.14 4.522 16.34 1 11.696 1 7.81 1 4.505 3.478 3.037 6.97a1.004 1.004 0 0 0 .525 1.312.986.986 0 0 0 1.297-.53C6.046 4.924 8.681 3 11.697 3c3.63 0 6.724 2.805 7.374 6.59z",clipRule:"evenodd"})}),jsxRuntimeExports.jsx("defs",{children:jsxRuntimeExports.jsx("clipPath",{id:"icon-refresh_svg__a",children:jsxRuntimeExports.jsx("path",{fill:"#fff",d:"M0 0h24v24H0z"})})})]}),SvgIconRestart=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M17.919 3.15c1.33-.856 3.081.1 3.081 1.682v14.336c0 1.583-1.75 2.538-3.081 1.683L7 13.83V19a2 2 0 1 1-4 0V5a2 2 0 1 1 4 0v5.168z"})]}),SvgIconSave=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M5 4a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h1v-7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7h1a1 1 0 0 0 1-1V8.414L15.586 4H8v3h7a1 1 0 1 1 0 2H7a1 1 0 0 1-1-1V4zm2-2H5a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V8a1 1 0 0 0-.293-.707l-5-5A1 1 0 0 0 16 2zm1 12v6h8v-6z",clipRule:"evenodd"})]}),useWorkspaceFile=()=>({createOrUpdate:async({alt:e0,uri:_e,blob:i0,legend:r0,parentId:t0,application:n0,visibility:s0})=>{let o0=(_e??"").match(/\/workspace\/document\/([0-9a-fA-F-]+)/);if(o0&&o0.length===2){let a0=o0[1],f0=await odeServices.workspace().searchDocuments({filter:"all",id:a0,limit:1}),l0=f0.length?f0[0].name:void 0;await odeServices.workspace().updateFile(a0,i0,{alt:e0,legend:r0,name:l0});let u0=(await odeServices.workspace().searchDocuments({filter:"all",id:a0,limit:1}))[0];return{file:u0,src:`/workspace/${u0.public?"pub/":""}document/${a0}`}}else{let a0=await odeServices.workspace().saveFile(i0,{application:n0,parentId:t0,visibility:s0});return`/workspace/${a0.public?"pub/":""}document/${a0._id}`}},create:async(e0,_e)=>await odeServices.workspace().saveFile(e0,_e),remove:async e0=>!e0||Array.isArray(e0)&&e0.length===0?Promise.resolve():await odeServices.workspace().deleteFile(Array.isArray(e0)?e0:[e0])}),AUDIO_ENCODER_URL="/infra/public/js/audioEncoder.js";function createEncoderWorker(){let e0=new URL(AUDIO_ENCODER_URL,window.location.origin).href,_e=URL.createObjectURL(new Blob([`importScripts(${JSON.stringify(e0)});`],{type:"text/javascript"}));return{worker:new Worker(_e),bootstrapUrl:_e}}function useAudioRecorder(e0,_e,i0=!1,r0="protected",t0="media-library"){var _i;function n0(Q0,U0){return{...Q0,...U0.updatedState}}let[{recordState:s0,playState:o0,micStream:a0,micStreamAudioSourceNode:f0,audioWorkletNode:l0,audioContext:u0,encoderWorker:A0,maxDuration:c0,recordTime:k0,isEncoding:d0},h0]=reactExports.useReducer(n0,{recordState:"IDLE",isEncoding:!1,playState:"IDLE",recordTime:0,maxDuration:180}),b0=reactExports.useRef(null),p0=reactExports.useRef(null),m0=reactExports.useRef(),g0=reactExports.useRef(),[v0,w0]=reactExports.useState(),{t:x0}=useTranslation(),{create:_0}=useWorkspaceFile(),y0=48e3;reactExports.useEffect(()=>{let{worker:Q0,bootstrapUrl:U0}=createEncoderWorker();return h0({type:"update",updatedState:{encoderWorker:Q0}}),Q0.postMessage(["init",(u0==null?void 0:u0.sampleRate)||y0]),()=>{B0(),Q0.terminate(),URL.revokeObjectURL(U0)}},[]),reactExports.useEffect(()=>{let Q0=!1;return(async()=>{var U0;try{if(!((U0=navigator.mediaDevices)!=null&&U0.getUserMedia))throw Error("Media devices are not available");(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(i2=>i2.stop())}catch(i2){console.error(i2),Q0||w0(i2)}})(),()=>{Q0=!0}},[]);let S0=Q0=>{var s2,f2;let U0=Q0.data.inputs[0][0],i2=Q0.data.inputs[0][1];(!i2||i2.filter(c2=>c2!==void 0).length===0)&&(i2=U0),(s2=m0.current)==null||s2.push(U0),(f2=g0.current)==null||f2.push(i2)},B0=reactExports.useCallback(()=>{a0==null||a0.getTracks().forEach(Q0=>Q0.stop()),f0==null||f0.disconnect(),l0==null||l0.port.removeEventListener("message",S0),l0==null||l0.port.close(),l0==null||l0.disconnect(),u0==null||u0.close()},[u0,l0,a0,f0]),I0=async()=>{let Q0;try{Q0=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(f2){console.error(f2),w0(f2);return}Q0.getTracks().forEach(f2=>{f2.onended=()=>w0(Error("Track ended"))});let U0=new AudioContext({sampleRate:y0}),i2=U0.createMediaStreamSource(Q0);try{await U0.audioWorklet.addModule("/infra/public/js/audio-recorder-processor.js")}catch(f2){console.error(f2)}let s2=new AudioWorkletNode(U0,"audio-recorder-processor");s2.port.addEventListener("message",S0),h0({type:"update",updatedState:{micStream:Q0,micStreamAudioSourceNode:i2,audioContext:U0,recordTime:0,audioWorkletNode:s2,recordState:"RECORDING",playState:"IDLE"}}),g0.current=[],m0.current=[],s2.port.start(),i2.connect(s2),s2.connect(U0.destination)},F0=reactExports.useCallback(async()=>{p0.current&&(p0.current.currentTime=0,p0.current.pause()),s0==="PAUSED"?(h0({type:"update",updatedState:{recordState:"RECORDING",playState:"IDLE"}}),u0==null||u0.resume(),_e==null||_e(void 0)):I0()},[s0,u0,p0]),C0=reactExports.useCallback(()=>{h0({type:"update",updatedState:{recordState:"PAUSED",playState:"IDLE",isEncoding:!0}}),u0==null||u0.suspend(),A0&&m0.current&&g0.current&&(A0.postMessage(["wav",g0.current,m0.current,g0.current.length*128]),A0.onmessage=Q0=>{let U0=window.URL.createObjectURL(Q0.data);h0({type:"update",updatedState:{isEncoding:!1}}),p0.current&&(p0.current.src=U0),_e&&_e(U0)})},[u0,A0,_e]),E0=reactExports.useCallback(()=>{var Q0;h0({type:"update",updatedState:{playState:"PLAYING"}}),((Q0=p0==null?void 0:p0.current)!=null&&Q0.currentTime||p0.current)&&p0.current.play()},[p0]),R0=reactExports.useCallback(()=>{var Q0;(Q0=p0==null?void 0:p0.current)==null||Q0.pause(),h0({type:"update",updatedState:{playState:"PAUSED"}})},[p0]),M0=reactExports.useCallback(()=>{B0(),h0({type:"update",updatedState:{playState:"IDLE",recordState:"IDLE"}}),g0.current=[],m0.current=[],_e&&_e(void 0)},[B0,_e]),T0=reactExports.useCallback(async()=>{var U0;let Q0=(U0=b0.current)==null?void 0:U0.value;if(!Q0){console.error("Audio name is required");return}return p0.current&&(p0.current.pause(),p0.current.currentTime=0),h0({type:"update",updatedState:{recordState:"SAVING",playState:"IDLE"}}),new Promise((i2,s2)=>{try{if(A0&&m0.current&&g0.current)A0.postMessage(["mp3",g0.current,m0.current,g0.current.length*128]),A0.onmessage=async f2=>{if(f2.data instanceof Blob)try{let c2=await _0(new File([f2.data],Q0,{type:"audio/mp3"}),{application:t0,visibility:r0});c2&&e0&&e0(c2),h0({type:"update",updatedState:{recordState:"SAVED"}}),i2(c2)}catch(c2){h0({type:"update",updatedState:{recordState:"RECORDED"}}),console.error("Error while saving",c2),s2(c2)}};else throw Error("Audio encoder is not ready")}catch(f2){h0({type:"update",updatedState:{playState:"IDLE",recordState:"IDLE"}}),console.error("Error while saving",f2),s2()}})},[s0,e0,B0]),G0=reactExports.useCallback(()=>{p0!=null&&p0.current&&(p0.current.pause(),p0.current.currentTime=0),h0({type:"update",updatedState:{playState:"IDLE"}})},[p0]),j0=reactExports.useCallback(()=>{h0({type:"update",updatedState:{playState:"PAUSED"}}),p0.current&&(p0.current.currentTime=0)},[p0]);reactExports.useEffect(()=>{if(s0==="RECORDING"&&u0){let Q0=window.setInterval(()=>{h0({type:"update",updatedState:{recordTime:u0.currentTime}}),u0.currentTime>=c0&&(C0(),window.clearInterval(Q0))},100);return()=>window.clearInterval(Q0)}},[u0,C0,c0,s0]);let N0=x0(s0==="IDLE"?"bbm.audio.record.start":"bbm.audio.record.resume"),O0=(Q0,U0)=>U0?void 0:jsxRuntimeExports.jsx("span",{className:"audio-recorder-toolbar-label",children:Q0}),Y0=s0!=="IDLE"&&s0!=="PAUSED"||k0>=c0,D0=s0!=="RECORDING",$0=s0!=="RECORDED"&&s0!=="PAUSED"&&s0!=="SAVED",z0=o0!=="PLAYING"&&o0!=="PAUSED",K0=s0!=="RECORDED"&&s0!=="PAUSED"&&o0!=="PLAYING"&&o0!=="PAUSED",e2=K0||s0==="SAVED"||!((_i=b0.current)!=null&&_i.value),J0=[{type:"button",name:"record",visibility:s0==="RECORDING"?"hide":"show",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconRecord,{}),color:"danger",disabled:Y0,onClick:F0,children:O0(N0,Y0)},tooltip:N0},{type:"button",name:"recordPause",visibility:s0==="RECORDING"?"show":"hide",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconRecordPause,{}),color:"danger",disabled:D0,onClick:C0,children:O0(x0("bbm.audio.record.pause"),D0)},tooltip:x0("bbm.audio.record.pause")},{type:"icon",name:"encoding",visibility:d0?"show":"hide",props:{icon:jsxRuntimeExports.jsx(SvgIconLoader,{style:{animation:"loading 1s infinite"}}),disabled:!0}},{type:"button",name:"play",visibility:d0||o0==="PLAYING"?"hide":"show",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconPlayFilled,{}),disabled:$0,onClick:E0,children:O0(x0("bbm.audio.play.start"),$0)},tooltip:x0("bbm.audio.play.start")},{type:"button",name:"playPause",visibility:!d0&&o0==="PLAYING"?"show":"hide",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconPause,{}),onClick:R0,children:O0(x0("bbm.audio.play.pause"),!1)},tooltip:x0("bbm.audio.play.pause")},{type:"button",name:"stop",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconRestart,{}),disabled:z0,onClick:G0,children:O0(x0("bbm.audio.play.stop"),z0)},tooltip:x0("bbm.audio.play.stop")},{type:"divider"},{type:"button",name:"reset",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconRefresh,{}),disabled:K0,onClick:M0,children:O0(x0("bbm.audio.record.reset"),K0)},tooltip:x0("bbm.audio.record.reset")},{type:"button",name:"save",visibility:i0?"hide":"show",props:{leftIcon:jsxRuntimeExports.jsx(SvgIconSave,{}),disabled:e2,onClick:T0,children:O0(x0("bbm.audio.record.save"),e2)},tooltip:x0("bbm.audio.record.save")}];return{recordState:s0,playState:o0,audioContext:u0,recordTime:k0*1e3,maxDuration:c0*1e3,audioRef:p0,audioNameRef:b0,toolbarItems:J0,micError:v0,handlePlayEnded:j0,handleSave:T0}}var Context$1=reactExports.createContext(null),useFormControl=()=>{let e0=reactExports.useContext(Context$1);if(!e0)throw Error("Cannot be rendered outside the FormControl component");return e0},Input=reactExports.forwardRef(({placeholder:e0,size:_e="md",type:i0="text",className:r0,showCounter:t0=!1,autoComplete:n0="off",clearable:s0=!1,noValidationIcon:o0,...a0},f0)=>{var x0;let{id:l0,isRequired:u0,isReadOnly:A0,status:c0}=useFormControl(),{t:k0}=useTranslation(),d0=reactExports.useRef(null),[h0,b0]=reactExports.useState(((x0=a0.defaultValue)==null?void 0:x0.toString().length)||0);reactExports.useLayoutEffect(()=>{d0.current&&b0(d0.current.value.length)},[]);let p0=_0=>{d0.current=_0,typeof f0=="function"?f0(_0):f0&&(f0.current=_0)},m0=clsx("input",{"input--lg":_e==="lg","input--invalid":c0==="invalid","input--valid":c0==="valid","input--plaintext":A0},r0),g0=_0=>{var y0;b0(_0.target.value.length),(y0=a0.onChange)==null||y0.call(a0,_0)},v0=()=>{var y0,S0;let _0=d0.current;_0&&((S0=(y0=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:y0.set)==null||S0.call(_0,""),_0.dispatchEvent(new Event("input",{bubbles:!0})),_0.focus())},w0=a0.maxLength??0;return jsxRuntimeExports.jsxs("div",{className:m0,children:[jsxRuntimeExports.jsx("input",{ref:p0,id:l0,className:"input__field",type:i0,placeholder:e0,required:u0,readOnly:A0,...a0,onChange:g0,autoComplete:n0}),s0&&!A0&&jsxRuntimeExports.jsx("button",{type:"button",className:"input__clear",onClick:v0,"aria-label":k0("clear"),children:jsxRuntimeExports.jsx(SvgIconClose,{})}),t0&&jsxRuntimeExports.jsxs("span",{className:clsx("input__counter",{"input__counter--max":h0===w0}),children:[h0," / ",w0]})]})}),Label=reactExports.forwardRef(({leftIcon:e0,optionalText:_e,requiredText:i0="*",children:r0,className:t0},n0)=>{let{id:s0,isOptional:o0,isRequired:a0}=useFormControl(),{t:f0}=useTranslation(),l0=clsx("input-label",{"input-label--has-icon":e0},t0),u0=o0&&!a0,A0=a0&&!o0;return reactExports.useEffect(()=>{if(o0&&a0)throw Error("Cannot be optional and required at the same time")},[o0,a0]),jsxRuntimeExports.jsxs("label",{ref:n0,htmlFor:s0,className:l0,children:[e0,r0,u0&&jsxRuntimeExports.jsxs("em",{className:"input-label__optional",children:["- ",_e??f0("explorer.optional")]}),A0&&jsxRuntimeExports.jsx("em",{className:"input-label__required",children:i0})]})}),SvgIconError=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M3 12a9 9 0 1 1 18 0 9 9 0 0 1-18 0m9-11C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1M8.293 15.707a1 1 0 0 1 0-1.414L10.586 12 8.293 9.707a1 1 0 0 1 1.414-1.414L12 10.586l2.293-2.293a1 1 0 1 1 1.414 1.414L13.414 12l2.293 2.293a1 1 0 0 1-1.414 1.414L12 13.414l-2.293 2.293a1 1 0 0 1-1.414 0",clipRule:"evenodd"})]}),SvgIconSuccessOutline=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18M1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12",clipRule:"evenodd"}),jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.59 8.192a1 1 0 0 1 .218 1.397l-4.375 6a1 1 0 0 1-1.584.042L8.224 12.4a1 1 0 0 1 1.552-1.261l1.806 2.223 3.61-4.951a1 1 0 0 1 1.397-.219",clipRule:"evenodd"})]}),FormText=({children:e0})=>{let{status:_e}=useFormControl(),i0=clsx("input-message",{"input-message--invalid":_e==="invalid","input-message--valid":_e==="valid"}),r0=_e==="invalid"?SvgIconError:_e==="valid"?SvgIconSuccessOutline:null;return jsxRuntimeExports.jsxs("p",{className:i0,children:[r0&&jsxRuntimeExports.jsx(r0,{className:"input-message__icon","aria-hidden":"true"}),e0]})},Root$4=reactExports.forwardRef(({children:e0,className:_e,id:i0,isOptional:r0,isReadOnly:t0,isRequired:n0,status:s0,...o0},a0)=>{let f0=reactExports.useMemo(()=>({id:i0,isOptional:r0,isRequired:n0,isReadOnly:t0,status:s0}),[i0,r0,t0,n0,s0]);return jsxRuntimeExports.jsx(Context$1.Provider,{value:f0,children:jsxRuntimeExports.jsx("div",{ref:a0,className:_e,...o0,children:e0})})}),FormControl=Object.assign(Root$4,{Label,Input,Text:FormText}),DropdownContext=reactExports.createContext(null),useDropdownContext=()=>{let e0=reactExports.useContext(DropdownContext);if(!e0)throw Error("Cannot be rendered outside the Dropdown Component");return e0},Checkbox=reactExports.forwardRef(({label:e0,disabled:_e=!1,checked:i0=!1,indeterminate:r0=!1,...t0},n0)=>{let s0=reactExports.useRef(null);reactExports.useImperativeHandle(n0,()=>({...s0.current})),reactExports.useEffect(()=>{s0.current.indeterminate=r0},[s0,r0]);let o0=reactExports.useId(),a0={type:"checkbox",checked:i0,disabled:_e,ref:s0,className:clsx(t0.className,"form-check-input"),id:o0},f0={...t0,...a0};return jsxRuntimeExports.jsxs("div",{className:"form-check d-flex align-items-center gap-8",children:[jsxRuntimeExports.jsx("input",{...f0}),e0&&jsxRuntimeExports.jsx("label",{className:"form-check-label",htmlFor:f0.id,children:e0})]})}),normalize=e0=>e0.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase(),useDropdownItemFilter=e0=>{let{searchQuery:_e,reportMatch:i0,unregisterMatch:r0,registerUnfilteredItem:t0}=useDropdownContext(),n0=reactExports.useId(),s0=e0!==void 0&&_e!==""&&!normalize(e0).includes(normalize(_e));return reactExports.useLayoutEffect(()=>e0===void 0?t0==null?void 0:t0(n0):(i0(n0,!s0),()=>r0(n0)),[n0,s0,e0,i0,r0,t0]),{id:n0,isFiltered:s0}},DropdownItemHidden=({children:e0,collapse:_e})=>jsxRuntimeExports.jsx("div",{"aria-hidden":"true",style:_e?{height:0,overflow:"hidden",margin:0,pointerEvents:"none",width:"100%",maxWidth:"max-content"}:{display:"none",width:"100%",maxWidth:"max-content"},children:e0}),DropdownCheckboxItem=({children:e0,value:_e,model:i0,onChange:r0,searchValue:t0})=>{let{itemProps:n0,itemRefs:s0,isFocused:o0}=useDropdownContext(),{id:a0,isFiltered:f0}=useDropdownItemFilter(t0),{onMenuItemKeyDown:l0,onMenuItemMouseEnter:u0}=n0,A0=i0.includes(_e),c0={value:_e,model:i0,checked:A0,readOnly:!0},k0=clsx("dropdown-item c-pointer",{focus:o0===a0}),d0=jsxRuntimeExports.jsxs("div",{className:"d-flex gap-8 align-items-center justify-content-between position-relative",children:[e0,jsxRuntimeExports.jsx(Checkbox,{...c0})]});return f0?jsxRuntimeExports.jsx(DropdownItemHidden,{collapse:!0,children:d0}):jsxRuntimeExports.jsx("div",{id:a0,ref:h0=>s0.current[a0]=h0,role:"menuitemcheckbox","aria-checked":A0,onMouseUp:()=>r0(_e),onKeyDown:h0=>l0(h0,()=>r0(_e)),onMouseEnter:u0,tabIndex:A0?0:-1,className:k0,children:d0})},DropdownItem=({type:e0="action",icon:_e,onClick:i0,children:r0,className:t0,minWidth:n0,disabled:s0,searchValue:o0,...a0})=>{let{itemProps:f0,itemRefs:l0,isFocused:u0}=useDropdownContext(),{id:A0,isFiltered:c0}=useDropdownItemFilter(o0),{onMenuItemKeyDown:k0,onMenuItemMouseEnter:d0,onMenuItemClick:h0}=f0,b0=v0=>{s0||(i0==null||i0(v0),e0==="action"&&(h0(),v0.stopPropagation()))},p0=clsx("dropdown-item",{focus:u0===A0},{"text-gray-600":s0},t0),m0={...n0&&{minWidth:`${n0}px`}},g0=jsxRuntimeExports.jsxs("div",{className:"d-flex gap-8 align-items-center",children:[_e,r0]});return c0?jsxRuntimeExports.jsx(DropdownItemHidden,{children:g0}):jsxRuntimeExports.jsx("div",{id:A0,role:"menuitem",style:m0,ref:v0=>l0.current[A0]=v0,tabIndex:u0===A0?0:-1,className:p0,"aria-current":u0===A0,onClick:b0,onMouseEnter:d0,onKeyDown:v0=>k0(v0,i0,e0==="action"),...a0,children:g0})},DropdownMenu=reactExports.forwardRef(({children:e0,block:_e,unstyled:i0,...r0},t0)=>{let{menuProps:n0,visible:s0}=useDropdownContext(),o0=clsx({"w-100":_e,"bg-white shadow rounded-4 p-8":!i0},n0.className,r0.className),a0={...n0,...r0,className:o0};return s0?jsxRuntimeExports.jsx("div",{ref:t0,...a0,children:e0}):null}),useMatchRegistry=()=>{let[e0,_e]=reactExports.useState(!0),i0=reactExports.useRef(new Map);return{hasMatches:e0,reportMatch:reactExports.useCallback((r0,t0)=>{i0.current.set(r0,t0);let n0=[...i0.current.values()].some(Boolean);_e(s0=>s0===n0?s0:n0)},[]),unregisterMatch:reactExports.useCallback(r0=>{i0.current.delete(r0);let t0=i0.current.size===0||[...i0.current.values()].some(Boolean);_e(n0=>n0===t0?n0:t0)},[])}},DropdownMenuGroup=reactExports.forwardRef(({label:e0,children:_e},i0)=>{let r0=reactExports.useContext(DropdownContext),{hasMatches:t0,reportMatch:n0,unregisterMatch:s0}=useMatchRegistry(),o0=r0==null?void 0:r0.reportMatch,a0=r0==null?void 0:r0.unregisterMatch,f0=reactExports.useCallback((c0,k0)=>{n0(c0,k0),o0==null||o0(c0,k0)},[n0,o0]),l0=reactExports.useCallback(c0=>{s0(c0),a0==null||a0(c0)},[s0,a0]),u0=reactExports.useCallback(c0=>(n0(c0,!0),()=>s0(c0)),[n0,s0]),A0=reactExports.useMemo(()=>r0&&{...r0,reportMatch:f0,unregisterMatch:l0,registerUnfilteredItem:u0},[r0,f0,l0,u0]);return jsxRuntimeExports.jsx(DropdownContext.Provider,{value:A0,children:jsxRuntimeExports.jsxs("div",{ref:i0,role:"group",hidden:!t0,children:[jsxRuntimeExports.jsx("span",{className:"small px-4",children:jsxRuntimeExports.jsx("strong",{children:e0})}),_e]})})}),Radio=reactExports.forwardRef(({model:e0,icon:_e,label:i0=!1,disabled:r0=!1,checked:t0,...n0},s0)=>{let o0=reactExports.useId(),a0={type:"radio",checked:t0,disabled:r0,ref:s0,className:clsx(n0.className,"form-check-input c-pointer",_e&&"d-none"),id:o0},f0={...n0,...a0};return jsxRuntimeExports.jsxs("div",{className:clsx("form-check d-flex align-items-center gap-8",_e&&"ps-0"),children:[jsxRuntimeExports.jsx("input",{...f0}),_e&&jsxRuntimeExports.jsx("label",{htmlFor:f0.id,className:clsx("c-pointer",e0!==n0.value&&"text-muted"),children:_e}),!_e&&i0&&jsxRuntimeExports.jsx("label",{className:"form-check-label",htmlFor:f0.id,children:i0})]})}),DropdownRadioItem=({children:e0,value:_e,model:i0,onChange:r0,searchValue:t0})=>{let{itemProps:n0,itemRefs:s0,isFocused:o0}=useDropdownContext(),{id:a0,isFiltered:f0}=useDropdownItemFilter(t0),{onMenuItemKeyDown:l0,onMenuItemMouseEnter:u0}=n0,A0={value:_e,model:i0,checked:_e===i0,readOnly:!0},c0=clsx("dropdown-item c-pointer",{focus:o0===a0}),k0=jsxRuntimeExports.jsxs("div",{className:"d-flex gap-8 align-items-center justify-content-between position-relative",children:[e0,jsxRuntimeExports.jsx(Radio,{...A0,className:"position-absolute start-0 end-0 top-0 bottom-0 opacity-0"})]});return f0?jsxRuntimeExports.jsx(DropdownItemHidden,{children:k0}):jsxRuntimeExports.jsx("div",{id:a0,ref:d0=>s0.current[a0]=d0,role:"menuitemradio","aria-checked":_e===i0,onMouseUp:()=>r0(_e),onKeyDown:d0=>l0(d0,()=>r0(_e)),onMouseEnter:u0,tabIndex:_e===i0?0:-1,className:c0,children:k0})},SvgIconSearch$1=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4 10a7 7 0 1 1 14 0 7 7 0 0 1-14 0m7-9a9 9 0 1 0 5.7 15.96 1 1 0 0 0 .24.4l4.35 4.35a1 1 0 0 0 1.42-1.42l-4.35-4.35a1 1 0 0 0-.4-.24A9 9 0 0 0 11 1",clipRule:"evenodd"})]}),ButtonBeta=reactExports.forwardRef(({color:e0="default",type:_e="button",size:i0="md",variant:r0="filled",children:t0,isLoading:n0,leftIcon:s0,rightIcon:o0,className:a0,...f0},l0)=>jsxRuntimeExports.jsxs("button",{ref:l0,"data-testid":"button-beta",className:clsx("btn-beta",`btn-beta-${e0}`,{"btn-beta--outline":r0==="outline","btn-beta--ghost":r0==="ghost","btn-beta--small":i0==="sm","btn-beta--icon-only":!t0,"btn-beta--with-left-icon":!!(s0&&t0),"btn-beta--with-right-icon":!!(o0&&t0),"btn-beta--loading":n0},a0),type:_e,...f0,children:[n0&&jsxRuntimeExports.jsx(Loading,{isLoading:!0}),jsxRuntimeExports.jsxs("span",{children:[s0,t0,o0]})]})),SearchBar=({isVariant:e0=!1,size:_e="md",placeholder:i0="search",className:r0,disabled:t0,buttonDisabled:n0,onChange:s0,onClick:o0,value:a0,clearable:f0=!0,...l0})=>{var _0;let{t:u0}=useTranslation(),A0=()=>{o0==null||o0()},c0=y0=>{y0.key==="Enter"&&(y0.preventDefault(),A0())},k0=reactExports.useRef(null),d0=a0!==void 0,[h0,b0]=reactExports.useState(!!((_0=l0.defaultValue)!=null&&_0.toString())),p0=d0?!!a0:h0,[m0,g0]=reactExports.useState(!1),v0=y0=>{y0.currentTarget.contains(y0.relatedTarget)||g0(!1)},w0=y0=>{y0.target.closest("button")&&y0.preventDefault()},x0=m0||p0;return jsxRuntimeExports.jsxs(FormControl,{id:"search-bar",className:clsx("searchbar",`searchbar--${_e}`,{"searchbar--active":x0},r0),onFocus:()=>g0(!0),onBlur:v0,onMouseDown:w0,children:[e0&&jsxRuntimeExports.jsx("div",{className:"searchbar__icon",children:jsxRuntimeExports.jsx(SvgIconSearch$1,{width:20,height:20})}),jsxRuntimeExports.jsx(FormControl.Input,{ref:k0,type:"search",placeholder:u0(i0),size:_e,className:"searchbar__input",onChange:y0=>{d0||b0(!!y0.target.value),s0==null||s0(y0)},value:a0,disabled:t0,onKeyDown:c0,clearable:f0&&!t0,...l0}),!e0&&jsxRuntimeExports.jsx(ButtonBeta,{type:"submit",className:"btn-search","aria-label":u0("search"),leftIcon:jsxRuntimeExports.jsx(SvgIconSearch$1,{}),onClick:A0,disabled:n0||t0})]})},DropdownSearchInput=({placeholder:e0="Rechercher...",noResultsLabel:_e="Pas de résultat",onSearch:i0})=>{let{searchQuery:r0,setSearchQuery:t0,hasMatches:n0,searchInputRef:s0,setHasSearchInput:o0,rootElement:a0,itemProps:f0}=useDropdownContext(),l0=jsxRuntimeExports.jsx("div",{ref:reactExports.useCallback(u0=>{s0.current=(u0==null?void 0:u0.querySelector("input"))??null,o0(!!u0)},[s0,o0]),className:"dropdown-search position-absolute top-0 start-0 w-100 h-100 z-1",children:jsxRuntimeExports.jsx(SearchBar,{isVariant:!0,clearable:!0,size:"md",className:"h-100",placeholder:e0,value:r0,onChange:u0=>{t0(u0.target.value),i0==null||i0(u0.target.value)},onKeyDown:u0=>{(u0.key==="ArrowDown"||u0.key==="Escape"||u0.key==="Tab"&&u0.shiftKey)&&f0.onMenuItemKeyDown(u0),["ArrowUp","ArrowDown","Enter"," "].includes(u0.key)&&u0.stopPropagation()}})});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[a0&&reactDomExports.createPortal(l0,a0),r0&&!n0&&jsxRuntimeExports.jsx("p",{className:"body-2 text-gray-700 text-center my-8",children:_e})]})},DropdownSeparator=()=>jsxRuntimeExports.jsx("div",{role:"separator",className:"px-4",children:jsxRuntimeExports.jsx("hr",{className:"m-0"})}),SvgIconRafterUp=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M19.988 17.129a1.5 1.5 0 0 1-2.117-.141L12 10.278l-5.871 6.71a1.5 1.5 0 0 1-2.258-1.976l7-8a1.5 1.5 0 0 1 2.258 0l7 8a1.5 1.5 0 0 1-.141 2.117",clipRule:"evenodd"})]}),Badge=reactExports.forwardRef(({className:e0,variant:_e={type:"notification",level:"info"},children:i0,...r0},t0)=>{let{getIconClass:n0,getBackgroundLightIconClass:s0,getBorderIconClass:o0}=useEdificeIcons(),a0="";return _e.type==="appVersion"&&_e.app&&(a0=`${n0(_e.app)} ${s0(_e.app)} ${o0(_e.app)}`),jsxRuntimeExports.jsxs("span",{ref:t0,className:clsx("badge rounded-pill",(_e.type==="content"||_e.type==="user")&&"background"in _e?"bg-gray-200":(_e.type==="content"||_e.type==="user")&&!("background"in _e)?"border border-0":"",_e.type==="content"&&`text-${_e.level}`,_e.type==="notification"&&`badge-notification bg-${_e.level} text-light border border-0`,_e.type==="status"&&`badge-status badge-status-${_e.level} caption fw-normal`,_e.type==="user"&&`badge-profile-${_e.profile.toLowerCase()}`,_e.type==="link"&&"badge-link border border-0",_e.type==="chip"&&"bg-gray-200",_e.type==="appVersion"&&a0,e0),...r0,children:[_e.type==="chip"&&jsxRuntimeExports.jsx("div",{className:"d-flex fw-800 align-items-center",children:i0}),_e.type==="appVersion"&&(i0??"BÊTA"),_e.type!=="chip"&&_e.type!=="appVersion"&&i0]})}),DropdownTrigger=reactExports.forwardRef(({label:e0,icon:_e,variant:i0="default",disabled:r0=!1,size:t0,badgeContent:n0,hideCarret:s0=!1,pill:o0=!1,innerBorderColor:a0,innerBorderWidth:f0,outerBorderColor:l0,outerBorderWidth:u0,outerBorderOffset:A0,baseShade:c0,...k0},d0)=>{let{triggerProps:h0,block:b0,visible:p0,hasSearchInput:m0}=useDropdownContext(),g0=clsx("dropdown-toggle ",t0,i0,{"w-100":b0},{"opacity-0":p0&&m0},h0.className,k0.className,{"rounded-pill":o0},{"base-shade":c0}),v0={...l0&&{outline:`${u0}px solid var(--edifice-${l0})`,outlineOffset:A0},...a0&&{border:`${f0}px solid var(--edifice-${a0})`}};return jsxRuntimeExports.jsxs("button",{ref:d0,type:"button",disabled:r0,...h0,...k0,className:g0,style:v0,children:[_e,e0,n0?jsxRuntimeExports.jsx(Badge,{variant:{level:"info",type:"notification"},children:n0}):!s0&&jsxRuntimeExports.jsx(SvgIconRafterUp,{width:16,height:16,className:"dropdown-toggle-caret"})]})});function memo(e0,_e,i0){let r0=i0.initialDeps??[],t0;function n0(){var s0,o0,a0,f0;let l0;i0.key&&((s0=i0.debug)!=null&&s0.call(i0))&&(l0=Date.now());const u0=e0();if(!(u0.length!==r0.length||u0.some((k0,d0)=>r0[d0]!==k0)))return t0;r0=u0;let c0;if(i0.key&&((o0=i0.debug)!=null&&o0.call(i0))&&(c0=Date.now()),t0=_e(...u0),i0.key&&((a0=i0.debug)!=null&&a0.call(i0))){const k0=Math.round((Date.now()-l0)*100)/100,d0=Math.round((Date.now()-c0)*100)/100,h0=d0/16,b0=(p0,m0)=>{for(p0=String(p0);p0.length<m0;)p0=" "+p0;return p0};console.info(`%c⏱ ${b0(d0,5)} /${b0(k0,5)} ms`,`
47
47
  font-size: .6rem;
48
48
  font-weight: bold;
49
49
  color: hsl(${Math.max(0,Math.min(120-120*h0,120))}deg 100% 31%);`,i0==null?void 0:i0.key)}return(f0=i0==null?void 0:i0.onChange)==null||f0.call(i0,t0),t0}return n0.updateDeps=s0=>{r0=s0},n0}function notUndefined(e0,_e){if(e0===void 0)throw new Error("Unexpected undefined");return e0}const approxEqual=(e0,_e)=>Math.abs(e0-_e)<1.01,debounce$1=(e0,_e,i0)=>{let r0;return function(...t0){e0.clearTimeout(r0),r0=e0.setTimeout(()=>_e.apply(this,t0),i0)}},getRect=e0=>{const{offsetWidth:_e,offsetHeight:i0}=e0;return{width:_e,height:i0}},defaultKeyExtractor=e0=>e0,defaultRangeExtractor=e0=>{const _e=Math.max(e0.startIndex-e0.overscan,0),i0=Math.min(e0.endIndex+e0.overscan,e0.count-1),r0=[];for(let t0=_e;t0<=i0;t0++)r0.push(t0);return r0},observeElementRect=(e0,_e)=>{const i0=e0.scrollElement;if(!i0)return;const r0=e0.targetWindow;if(!r0)return;const t0=s0=>{const{width:o0,height:a0}=s0;_e({width:Math.round(o0),height:Math.round(a0)})};if(t0(getRect(i0)),!r0.ResizeObserver)return()=>{};const n0=new r0.ResizeObserver(s0=>{const o0=()=>{const a0=s0[0];if(a0!=null&&a0.borderBoxSize){const f0=a0.borderBoxSize[0];if(f0){t0({width:f0.inlineSize,height:f0.blockSize});return}}t0(getRect(i0))};e0.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o0):o0()});return n0.observe(i0,{box:"border-box"}),()=>{n0.unobserve(i0)}},addEventListenerOptions={passive:!0},supportsScrollend=typeof window>"u"?!0:"onscrollend"in window,observeElementOffset=(e0,_e)=>{const i0=e0.scrollElement;if(!i0)return;const r0=e0.targetWindow;if(!r0)return;let t0=0;const n0=e0.options.useScrollendEvent&&supportsScrollend?()=>{}:debounce$1(r0,()=>{_e(t0,!1)},e0.options.isScrollingResetDelay),s0=l0=>()=>{const{horizontal:u0,isRtl:A0}=e0.options;t0=u0?i0.scrollLeft*(A0&&-1||1):i0.scrollTop,n0(),_e(t0,l0)},o0=s0(!0),a0=s0(!1);a0(),i0.addEventListener("scroll",o0,addEventListenerOptions);const f0=e0.options.useScrollendEvent&&supportsScrollend;return f0&&i0.addEventListener("scrollend",a0,addEventListenerOptions),()=>{i0.removeEventListener("scroll",o0),f0&&i0.removeEventListener("scrollend",a0)}},measureElement=(e0,_e,i0)=>{if(_e!=null&&_e.borderBoxSize){const r0=_e.borderBoxSize[0];if(r0)return Math.round(r0[i0.options.horizontal?"inlineSize":"blockSize"])}return e0[i0.options.horizontal?"offsetWidth":"offsetHeight"]},elementScroll=(e0,{adjustments:_e=0,behavior:i0},r0)=>{var t0,n0;const s0=e0+_e;(n0=(t0=r0.scrollElement)==null?void 0:t0.scrollTo)==null||n0.call(t0,{[r0.options.horizontal?"left":"top"]:s0,behavior:i0})};class Virtualizer{constructor(_e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let i0=null;const r0=()=>i0||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:i0=new this.targetWindow.ResizeObserver(t0=>{t0.forEach(n0=>{const s0=()=>{this._measureElement(n0.target,n0)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(s0):s0()})}));return{disconnect:()=>{var t0;(t0=r0())==null||t0.disconnect(),i0=null},observe:t0=>{var n0;return(n0=r0())==null?void 0:n0.observe(t0,{box:"border-box"})},unobserve:t0=>{var n0;return(n0=r0())==null?void 0:n0.unobserve(t0)}}})(),this.range=null,this.setOptions=i0=>{Object.entries(i0).forEach(([r0,t0])=>{typeof t0>"u"&&delete i0[r0]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:defaultKeyExtractor,rangeExtractor:defaultRangeExtractor,onChange:()=>{},measureElement,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...i0}},this.notify=i0=>{var r0,t0;(t0=(r0=this.options).onChange)==null||t0.call(r0,this,i0)},this.maybeNotify=memo(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),i0=>{this.notify(i0)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(i0=>i0()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var i0;const r0=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r0){if(this.cleanup(),!r0){this.maybeNotify();return}this.scrollElement=r0,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((i0=this.scrollElement)==null?void 0:i0.window)??null,this.elementsCache.forEach(t0=>{this.observer.observe(t0)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,t0=>{this.scrollRect=t0,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(t0,n0)=>{this.scrollAdjustments=0,this.scrollDirection=n0?this.getScrollOffset()<t0?"forward":"backward":null,this.scrollOffset=t0,this.isScrolling=n0,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(i0,r0)=>{const t0=new Map,n0=new Map;for(let s0=r0-1;s0>=0;s0--){const o0=i0[s0];if(t0.has(o0.lane))continue;const a0=n0.get(o0.lane);if(a0==null||o0.end>a0.end?n0.set(o0.lane,o0):o0.end<a0.end&&t0.set(o0.lane,!0),t0.size===this.options.lanes)break}return n0.size===this.options.lanes?Array.from(n0.values()).sort((s0,o0)=>s0.end===o0.end?s0.index-o0.index:s0.end-o0.end)[0]:void 0},this.getMeasurementOptions=memo(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(i0,r0,t0,n0,s0)=>(this.pendingMeasuredCacheIndexes=[],{count:i0,paddingStart:r0,scrollMargin:t0,getItemKey:n0,enabled:s0}),{key:!1}),this.getMeasurements=memo(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:i0,paddingStart:r0,scrollMargin:t0,getItemKey:n0,enabled:s0},o0)=>{if(!s0)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(l0=>{this.itemSizeCache.set(l0.key,l0.size)}));const a0=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const f0=this.measurementsCache.slice(0,a0);for(let l0=a0;l0<i0;l0++){const u0=n0(l0),A0=this.options.lanes===1?f0[l0-1]:this.getFurthestMeasurement(f0,l0),c0=A0?A0.end+this.options.gap:r0+t0,k0=o0.get(u0),d0=typeof k0=="number"?k0:this.options.estimateSize(l0),h0=c0+d0,b0=A0?A0.lane:l0%this.options.lanes;f0[l0]={index:l0,start:c0,size:d0,end:h0,key:u0,lane:b0}}return this.measurementsCache=f0,f0},{key:!1,debug:()=>this.options.debug}),this.calculateRange=memo(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(i0,r0,t0,n0)=>this.range=i0.length>0&&r0>0?calculateRange({measurements:i0,outerSize:r0,scrollOffset:t0,lanes:n0}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=memo(()=>{let i0=null,r0=null;const t0=this.calculateRange();return t0&&(i0=t0.startIndex,r0=t0.endIndex),this.maybeNotify.updateDeps([this.isScrolling,i0,r0]),[this.options.rangeExtractor,this.options.overscan,this.options.count,i0,r0]},(i0,r0,t0,n0,s0)=>n0===null||s0===null?[]:i0({startIndex:n0,endIndex:s0,overscan:r0,count:t0}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=i0=>{const r0=this.options.indexAttribute,t0=i0.getAttribute(r0);return t0?parseInt(t0,10):(console.warn(`Missing attribute name '${r0}={index}' on measured element.`),-1)},this._measureElement=(i0,r0)=>{const t0=this.indexFromElement(i0),n0=this.measurementsCache[t0];if(!n0)return;const s0=n0.key,o0=this.elementsCache.get(s0);o0!==i0&&(o0&&this.observer.unobserve(o0),this.observer.observe(i0),this.elementsCache.set(s0,i0)),i0.isConnected&&this.resizeItem(t0,this.options.measureElement(i0,r0,this))},this.resizeItem=(i0,r0)=>{const t0=this.measurementsCache[i0];if(!t0)return;const n0=this.itemSizeCache.get(t0.key)??t0.size,s0=r0-n0;s0!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t0,s0,this):t0.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=s0,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(t0.index),this.itemSizeCache=new Map(this.itemSizeCache.set(t0.key,r0)),this.notify(!1))},this.measureElement=i0=>{if(!i0){this.elementsCache.forEach((r0,t0)=>{r0.isConnected||(this.observer.unobserve(r0),this.elementsCache.delete(t0))});return}this._measureElement(i0,void 0)},this.getVirtualItems=memo(()=>[this.getVirtualIndexes(),this.getMeasurements()],(i0,r0)=>{const t0=[];for(let n0=0,s0=i0.length;n0<s0;n0++){const o0=i0[n0],a0=r0[o0];t0.push(a0)}return t0},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=i0=>{const r0=this.getMeasurements();if(r0.length!==0)return notUndefined(r0[findNearestBinarySearch(0,r0.length-1,t0=>notUndefined(r0[t0]).start,i0)])},this.getOffsetForAlignment=(i0,r0,t0=0)=>{const n0=this.getSize(),s0=this.getScrollOffset();r0==="auto"&&(r0=i0>=s0+n0?"end":"start"),r0==="center"?i0+=(t0-n0)/2:r0==="end"&&(i0-=n0);const o0=this.getTotalSize()+this.options.scrollMargin-n0;return Math.max(Math.min(o0,i0),0)},this.getOffsetForIndex=(i0,r0="auto")=>{i0=Math.max(0,Math.min(i0,this.options.count-1));const t0=this.measurementsCache[i0];if(!t0)return;const n0=this.getSize(),s0=this.getScrollOffset();if(r0==="auto")if(t0.end>=s0+n0-this.options.scrollPaddingEnd)r0="end";else if(t0.start<=s0+this.options.scrollPaddingStart)r0="start";else return[s0,r0];const o0=r0==="end"?t0.end+this.options.scrollPaddingEnd:t0.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o0,r0,t0.size),r0]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(i0,{align:r0="start",behavior:t0}={})=>{t0==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(i0,r0),{adjustments:void 0,behavior:t0})},this.scrollToIndex=(i0,{align:r0="auto",behavior:t0}={})=>{t0==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),i0=Math.max(0,Math.min(i0,this.options.count-1));let n0=0;const s0=10,o0=f0=>{if(!this.targetWindow)return;const l0=this.getOffsetForIndex(i0,f0);if(!l0){console.warn("Failed to get offset for index:",i0);return}const[u0,A0]=l0;this._scrollToOffset(u0,{adjustments:void 0,behavior:t0}),this.targetWindow.requestAnimationFrame(()=>{const c0=this.getScrollOffset(),k0=this.getOffsetForIndex(i0,A0);if(!k0){console.warn("Failed to get offset for index:",i0);return}approxEqual(k0[0],c0)||a0(A0)})},a0=f0=>{this.targetWindow&&(n0++,n0<s0?this.targetWindow.requestAnimationFrame(()=>o0(f0)):console.warn(`Failed to scroll to index ${i0} after ${s0} attempts.`))};o0(r0)},this.scrollBy=(i0,{behavior:r0}={})=>{r0==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+i0,{adjustments:void 0,behavior:r0})},this.getTotalSize=()=>{var i0;const r0=this.getMeasurements();let t0;if(r0.length===0)t0=this.options.paddingStart;else if(this.options.lanes===1)t0=((i0=r0[r0.length-1])==null?void 0:i0.end)??0;else{const n0=Array(this.options.lanes).fill(null);let s0=r0.length-1;for(;s0>=0&&n0.some(o0=>o0===null);){const o0=r0[s0];n0[o0.lane]===null&&(n0[o0.lane]=o0.end),s0--}t0=Math.max(...n0.filter(o0=>o0!==null))}return Math.max(t0-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(i0,{adjustments:r0,behavior:t0})=>{this.options.scrollToFn(i0,{behavior:t0,adjustments:r0},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(_e)}}const findNearestBinarySearch=(e0,_e,i0,r0)=>{for(;e0<=_e;){const t0=(e0+_e)/2|0,n0=i0(t0);if(n0<r0)e0=t0+1;else if(n0>r0)_e=t0-1;else return t0}return e0>0?e0-1:0};function calculateRange({measurements:e0,outerSize:_e,scrollOffset:i0,lanes:r0}){const t0=e0.length-1,n0=a0=>e0[a0].start;if(e0.length<=r0)return{startIndex:0,endIndex:t0};let s0=findNearestBinarySearch(0,t0,n0,i0),o0=s0;if(r0===1)for(;o0<t0&&e0[o0].end<i0+_e;)o0++;else if(r0>1){const a0=Array(r0).fill(0);for(;o0<t0&&a0.some(l0=>l0<i0+_e);){const l0=e0[o0];a0[l0.lane]=l0.end,o0++}const f0=Array(r0).fill(i0+_e);for(;s0>=0&&f0.some(l0=>l0>=i0);){const l0=e0[s0];f0[l0.lane]=l0.start,s0--}s0=Math.max(0,s0-s0%r0),o0=Math.min(t0,o0+(r0-1-o0%r0))}return{startIndex:s0,endIndex:o0}}const useIsomorphicLayoutEffect$4=typeof document<"u"?reactExports.useLayoutEffect:reactExports.useEffect;function useVirtualizerBase(e0){const _e=reactExports.useReducer(()=>({}),{})[1],i0={...e0,onChange:(t0,n0)=>{var s0;n0?reactDomExports.flushSync(_e):_e(),(s0=e0.onChange)==null||s0.call(e0,t0,n0)}},[r0]=reactExports.useState(()=>new Virtualizer(i0));return r0.setOptions(i0),useIsomorphicLayoutEffect$4(()=>r0._didMount(),[]),useIsomorphicLayoutEffect$4(()=>r0._willUpdate()),r0}function useVirtualizer(e0){return useVirtualizerBase({observeElementRect,observeElementOffset,scrollToFn:elementScroll,...e0})}var SELECT_ALL_INDEX=-1;function DropdownVirtualizedMenu({items:e0,renderItem:_e,onSelect:i0,getItemKey:r0,estimateItemHeight:t0=40,overscan:n0=8,maxHeight:s0=320,closeOnSelect:o0=!0,block:a0,unstyled:f0,className:l0,"aria-label":u0,searchable:A0=!1,getItemText:c0,searchPlaceholder:k0="Rechercher...",noResultsLabel:d0="Pas de résultat",onSearch:h0,selectAll:b0}){let{visible:p0,menuProps:m0,closeDropdown:g0}=useDropdownContext(),v0=reactExports.useId(),w0=`${v0}-listbox`,x0=Q0=>Q0===SELECT_ALL_INDEX?`${v0}-select-all`:`${v0}-option-${Q0}`,[_0,y0]=reactExports.useState(null),[S0,B0]=reactExports.useState(null),[I0,F0]=reactExports.useState(0),[C0,E0]=reactExports.useState(""),R0=reactExports.useMemo(()=>{if(!A0||!C0||!c0)return e0;let Q0=C0.toLowerCase();return e0.filter(U0=>c0(U0).toLowerCase().includes(Q0))},[e0,C0,A0,c0]),M0=!!b0&&R0.length>0,T0=M0?SELECT_ALL_INDEX:0,G0=reactExports.useMemo(()=>M0&&R0.every(Q0=>b0.isSelected(Q0)),[M0,R0,b0]),j0=reactExports.useMemo(()=>M0&&R0.some(Q0=>b0.isSelected(Q0)),[M0,R0,b0]),N0=useVirtualizer({count:R0.length,getScrollElement:()=>_0,estimateSize:()=>t0,overscan:n0});reactExports.useEffect(()=>{p0&&(F0(0),E0(""))},[p0]),reactExports.useEffect(()=>{F0(Q0=>R0.length===0?0:Math.min(Math.max(Q0,T0),R0.length-1))},[R0.length,T0]),reactExports.useEffect(()=>{p0&&!A0&&S0&&S0.focus()},[p0,A0,S0]),reactExports.useEffect(()=>{!p0||R0.length===0||(I0===SELECT_ALL_INDEX?_0&&(_0.scrollTop=0):N0.scrollToIndex(I0,{align:"auto"}))},[I0,p0]);let O0=reactExports.useCallback(()=>{b0&&b0.onToggle(!G0,R0)},[b0,G0,R0]),Y0=reactExports.useCallback(Q0=>{let U0=R0[Q0];U0!==void 0&&(i0==null||i0(U0,Q0),o0&&g0())},[R0,i0,o0,g0]),D0=Q0=>{let U0=R0.length-1,i2=U0>=0,s2=()=>I0===SELECT_ALL_INDEX?O0():Y0(I0);switch(Q0.key){case"ArrowDown":Q0.preventDefault(),i2&&F0(f2=>Math.min(f2+1,U0));break;case"ArrowUp":Q0.preventDefault(),i2&&F0(f2=>Math.max(f2-1,T0));break;case"Home":Q0.preventDefault(),i2&&F0(0);break;case"End":Q0.preventDefault(),i2&&F0(U0);break;case"Enter":Q0.preventDefault(),i2&&s2();break;case" ":A0||(Q0.preventDefault(),i2&&s2());break;case"Escape":case"Tab":g0();break}};if(!p0)return null;let{ref:$0,className:z0,style:K0,...e2}=m0,J0=clsx({"w-100":a0,"bg-white shadow rounded-4 p-8":!f0},z0,l0),_i=R0.length>0?x0(I0):void 0;return jsxRuntimeExports.jsxs("div",{...e2,ref:$0,className:J0,style:{...K0,maxHeight:"none",overflowY:"visible"},children:[A0&&jsxRuntimeExports.jsxs("div",{className:"pb-8",children:[jsxRuntimeExports.jsx(SearchBar,{isVariant:!0,clearable:!0,size:"md",placeholder:k0,value:C0,autoFocus:!0,role:"combobox","aria-expanded":!0,"aria-controls":w0,"aria-activedescendant":_i,onChange:Q0=>{E0(Q0.target.value),h0==null||h0(Q0.target.value)},onKeyDown:D0}),C0&&R0.length===0&&jsxRuntimeExports.jsx("p",{className:"body-2 text-gray-700 text-center mt-8 mb-0",children:d0})]}),jsxRuntimeExports.jsxs("div",{id:w0,ref:B0,role:"listbox",tabIndex:A0?-1:0,"aria-label":u0,"aria-multiselectable":b0?!0:void 0,"aria-activedescendant":A0?void 0:_i,onKeyDown:A0?void 0:D0,children:[M0&&jsxRuntimeExports.jsxs("div",{id:x0(SELECT_ALL_INDEX),role:"option","data-select-all":!0,onClick:O0,onMouseEnter:()=>F0(SELECT_ALL_INDEX),className:clsx("dropdown-item d-flex align-items-center justify-content-between gap-8 border-bottom mb-4",{focus:I0===SELECT_ALL_INDEX}),children:[jsxRuntimeExports.jsx("span",{className:"text-truncate fw-bold",children:b0.label}),jsxRuntimeExports.jsx(Checkbox,{checked:G0,indeterminate:j0&&!G0,onChange:()=>{},tabIndex:-1,"aria-hidden":!0})]}),jsxRuntimeExports.jsx("div",{ref:y0,style:{maxHeight:s0,minHeight:0,overflowY:"auto"},children:jsxRuntimeExports.jsx("div",{style:{height:N0.getTotalSize(),width:"100%",position:"relative"},children:N0.getVirtualItems().map(Q0=>{let U0=Q0.index,i2=R0[U0],s2=U0===I0;return jsxRuntimeExports.jsx("div",{id:x0(U0),role:"option","data-index":U0,ref:N0.measureElement,onClick:()=>Y0(U0),onMouseEnter:()=>F0(U0),style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${Q0.start}px)`},children:_e(i2,{index:U0,active:s2})},r0?r0(i2,U0):U0)})})})]})]})}var Root$3=reactExports.forwardRef(({children:e0,block:_e,overflow:i0=!0,noWrap:r0,placement:t0="bottom-start",extraTriggerKeyDownHandler:n0,onToggle:s0,isTriggerHovered:o0=!1,focusOnVisible:a0=!0,openOnSpace:f0=!0,focusOnMouseEnter:l0=!0},u0)=>{let[A0,c0]=reactExports.useState(""),[k0,d0]=reactExports.useState(!1),{hasMatches:h0,reportMatch:b0,unregisterMatch:p0}=useMatchRegistry(),{visible:m0,isFocused:g0,triggerProps:v0,menuProps:w0,itemProps:x0,itemRefs:_0,setVisible:y0,menuRef:S0,triggerRef:B0,searchInputRef:I0,closeDropdown:F0,openDropdown:C0}=useDropdown(t0,n0,o0,a0,f0,l0);reactExports.useImperativeHandle(u0,()=>({visible:m0,setVisible:y0,isFocused:g0,menuRef:S0,triggerRef:B0,closeDropdown:F0,openDropdown:C0}));let E0=useClickOutside(()=>{y0(!1)}),[R0,M0]=reactExports.useState(null),T0=reactExports.useCallback(N0=>{E0.current=N0,M0(N0)},[E0]),G0=reactExports.useMemo(()=>({visible:m0,isFocused:g0,triggerProps:v0,menuProps:w0,itemProps:x0,itemRefs:_0,searchInputRef:I0,block:_e,setVisible:y0,openDropdown:C0,closeDropdown:F0,searchQuery:A0,setSearchQuery:c0,hasSearchInput:k0,setHasSearchInput:d0,rootElement:R0,hasMatches:h0,reportMatch:b0,unregisterMatch:p0}),[m0,g0,v0,w0,x0,_0,I0,_e,y0,C0,F0,A0,k0,R0,h0,b0,p0]),j0=clsx("dropdown",{"w-100":_e,"dropdown-nowrap":r0,overflow:i0,"dropdown-searching":k0});return reactExports.useEffect(()=>{s0==null||s0(m0),m0||c0("")},[m0]),jsxRuntimeExports.jsx(DropdownContext.Provider,{value:G0,children:jsxRuntimeExports.jsx("div",{ref:T0,className:j0,children:typeof e0=="function"?e0(v0,_0,y0):e0})})}),Dropdown=Object.assign(Root$3,{Trigger:DropdownTrigger,Menu:DropdownMenu,VirtualizedMenu:DropdownVirtualizedMenu,Item:DropdownItem,Separator:DropdownSeparator,CheckboxItem:DropdownCheckboxItem,RadioItem:DropdownRadioItem,MenuGroup:DropdownMenuGroup,SearchInput:DropdownSearchInput}),fromEntries=function e0(_e){return _e.reduce(function(i0,r0){var t0=r0[0],n0=r0[1];return i0[t0]=n0,i0},{})},useIsomorphicLayoutEffect$3=typeof window<"u"&&window.document&&window.document.createElement?reactExports.useLayoutEffect:reactExports.useEffect,top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start$3="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce(function(e0,_e){return e0.concat([_e+"-"+start$3,_e+"-"+end])},[]),placements=[].concat(basePlacements,[auto]).reduce(function(e0,_e){return e0.concat([_e,_e+"-"+start$3,_e+"-"+end])},[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(e0){return e0?(e0.nodeName||"").toLowerCase():null}function getWindow$1(e0){if(e0==null)return window;if(e0.toString()!=="[object Window]"){var _e=e0.ownerDocument;return _e&&_e.defaultView||window}return e0}function isElement(e0){var _e=getWindow$1(e0).Element;return e0 instanceof _e||e0 instanceof Element}function isHTMLElement$2(e0){var _e=getWindow$1(e0).HTMLElement;return e0 instanceof _e||e0 instanceof HTMLElement}function isShadowRoot(e0){if(typeof ShadowRoot>"u")return!1;var _e=getWindow$1(e0).ShadowRoot;return e0 instanceof _e||e0 instanceof ShadowRoot}function applyStyles$1(e0){var _e=e0.state;Object.keys(_e.elements).forEach(function(i0){var r0=_e.styles[i0]||{},t0=_e.attributes[i0]||{},n0=_e.elements[i0];!isHTMLElement$2(n0)||!getNodeName(n0)||(Object.assign(n0.style,r0),Object.keys(t0).forEach(function(s0){var o0=t0[s0];o0===!1?n0.removeAttribute(s0):n0.setAttribute(s0,o0===!0?"":o0)}))})}function effect$2(e0){var _e=e0.state,i0={popper:{position:_e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(_e.elements.popper.style,i0.popper),_e.styles=i0,_e.elements.arrow&&Object.assign(_e.elements.arrow.style,i0.arrow),function(){Object.keys(_e.elements).forEach(function(r0){var t0=_e.elements[r0],n0=_e.attributes[r0]||{},s0=Object.keys(_e.styles.hasOwnProperty(r0)?_e.styles[r0]:i0[r0]),o0=s0.reduce(function(a0,f0){return a0[f0]="",a0},{});!isHTMLElement$2(t0)||!getNodeName(t0)||(Object.assign(t0.style,o0),Object.keys(n0).forEach(function(a0){t0.removeAttribute(a0)}))})}}const applyStyles={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles$1,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(e0){return e0.split("-")[0]}var max=Math.max,min=Math.min,round$2=Math.round;function getUAString(){var e0=navigator.userAgentData;return e0!=null&&e0.brands&&Array.isArray(e0.brands)?e0.brands.map(function(_e){return _e.brand+"/"+_e.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e0,_e,i0){_e===void 0&&(_e=!1),i0===void 0&&(i0=!1);var r0=e0.getBoundingClientRect(),t0=1,n0=1;_e&&isHTMLElement$2(e0)&&(t0=e0.offsetWidth>0&&round$2(r0.width)/e0.offsetWidth||1,n0=e0.offsetHeight>0&&round$2(r0.height)/e0.offsetHeight||1);var s0=isElement(e0)?getWindow$1(e0):window,o0=s0.visualViewport,a0=!isLayoutViewport()&&i0,f0=(r0.left+(a0&&o0?o0.offsetLeft:0))/t0,l0=(r0.top+(a0&&o0?o0.offsetTop:0))/n0,u0=r0.width/t0,A0=r0.height/n0;return{width:u0,height:A0,top:l0,right:f0+u0,bottom:l0+A0,left:f0,x:f0,y:l0}}function getLayoutRect(e0){var _e=getBoundingClientRect(e0),i0=e0.offsetWidth,r0=e0.offsetHeight;return Math.abs(_e.width-i0)<=1&&(i0=_e.width),Math.abs(_e.height-r0)<=1&&(r0=_e.height),{x:e0.offsetLeft,y:e0.offsetTop,width:i0,height:r0}}function contains$1(e0,_e){var i0=_e.getRootNode&&_e.getRootNode();if(e0.contains(_e))return!0;if(i0&&isShadowRoot(i0)){var r0=_e;do{if(r0&&e0.isSameNode(r0))return!0;r0=r0.parentNode||r0.host}while(r0)}return!1}function getComputedStyle$1(e0){return getWindow$1(e0).getComputedStyle(e0)}function isTableElement(e0){return["table","td","th"].indexOf(getNodeName(e0))>=0}function getDocumentElement(e0){return((isElement(e0)?e0.ownerDocument:e0.document)||window.document).documentElement}function getParentNode(e0){return getNodeName(e0)==="html"?e0:e0.assignedSlot||e0.parentNode||(isShadowRoot(e0)?e0.host:null)||getDocumentElement(e0)}function getTrueOffsetParent(e0){return!isHTMLElement$2(e0)||getComputedStyle$1(e0).position==="fixed"?null:e0.offsetParent}function getContainingBlock(e0){var _e=/firefox/i.test(getUAString()),i0=/Trident/i.test(getUAString());if(i0&&isHTMLElement$2(e0)){var r0=getComputedStyle$1(e0);if(r0.position==="fixed")return null}var t0=getParentNode(e0);for(isShadowRoot(t0)&&(t0=t0.host);isHTMLElement$2(t0)&&["html","body"].indexOf(getNodeName(t0))<0;){var n0=getComputedStyle$1(t0);if(n0.transform!=="none"||n0.perspective!=="none"||n0.contain==="paint"||["transform","perspective"].indexOf(n0.willChange)!==-1||_e&&n0.willChange==="filter"||_e&&n0.filter&&n0.filter!=="none")return t0;t0=t0.parentNode}return null}function getOffsetParent(e0){for(var _e=getWindow$1(e0),i0=getTrueOffsetParent(e0);i0&&isTableElement(i0)&&getComputedStyle$1(i0).position==="static";)i0=getTrueOffsetParent(i0);return i0&&(getNodeName(i0)==="html"||getNodeName(i0)==="body"&&getComputedStyle$1(i0).position==="static")?_e:i0||getContainingBlock(e0)||_e}function getMainAxisFromPlacement(e0){return["top","bottom"].indexOf(e0)>=0?"x":"y"}function within(e0,_e,i0){return max(e0,min(_e,i0))}function withinMaxClamp(e0,_e,i0){var r0=within(e0,_e,i0);return r0>i0?i0:r0}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e0){return Object.assign({},getFreshSideObject(),e0)}function expandToHashMap(e0,_e){return _e.reduce(function(i0,r0){return i0[r0]=e0,i0},{})}var toPaddingObject=function e0(_e,i0){return _e=typeof _e=="function"?_e(Object.assign({},i0.rects,{placement:i0.placement})):_e,mergePaddingObject(typeof _e!="number"?_e:expandToHashMap(_e,basePlacements))};function arrow$1(e0){var _e,i0=e0.state,r0=e0.name,t0=e0.options,n0=i0.elements.arrow,s0=i0.modifiersData.popperOffsets,o0=getBasePlacement(i0.placement),a0=getMainAxisFromPlacement(o0),f0=[left,right].indexOf(o0)>=0,l0=f0?"height":"width";if(!(!n0||!s0)){var u0=toPaddingObject(t0.padding,i0),A0=getLayoutRect(n0),c0=a0==="y"?top:left,k0=a0==="y"?bottom:right,d0=i0.rects.reference[l0]+i0.rects.reference[a0]-s0[a0]-i0.rects.popper[l0],h0=s0[a0]-i0.rects.reference[a0],b0=getOffsetParent(n0),p0=b0?a0==="y"?b0.clientHeight||0:b0.clientWidth||0:0,m0=d0/2-h0/2,g0=u0[c0],v0=p0-A0[l0]-u0[k0],w0=p0/2-A0[l0]/2+m0,x0=within(g0,w0,v0),_0=a0;i0.modifiersData[r0]=(_e={},_e[_0]=x0,_e.centerOffset=x0-w0,_e)}}function effect$1(e0){var _e=e0.state,i0=e0.options,r0=i0.element,t0=r0===void 0?"[data-popper-arrow]":r0;t0!=null&&(typeof t0=="string"&&(t0=_e.elements.popper.querySelector(t0),!t0)||contains$1(_e.elements.popper,t0)&&(_e.elements.arrow=t0))}const arrow={name:"arrow",enabled:!0,phase:"main",fn:arrow$1,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(e0){return e0.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(e0,_e){var i0=e0.x,r0=e0.y,t0=_e.devicePixelRatio||1;return{x:round$2(i0*t0)/t0||0,y:round$2(r0*t0)/t0||0}}function mapToStyles(e0){var _e,i0=e0.popper,r0=e0.popperRect,t0=e0.placement,n0=e0.variation,s0=e0.offsets,o0=e0.position,a0=e0.gpuAcceleration,f0=e0.adaptive,l0=e0.roundOffsets,u0=e0.isFixed,A0=s0.x,c0=A0===void 0?0:A0,k0=s0.y,d0=k0===void 0?0:k0,h0=typeof l0=="function"?l0({x:c0,y:d0}):{x:c0,y:d0};c0=h0.x,d0=h0.y;var b0=s0.hasOwnProperty("x"),p0=s0.hasOwnProperty("y"),m0=left,g0=top,v0=window;if(f0){var w0=getOffsetParent(i0),x0="clientHeight",_0="clientWidth";if(w0===getWindow$1(i0)&&(w0=getDocumentElement(i0),getComputedStyle$1(w0).position!=="static"&&o0==="absolute"&&(x0="scrollHeight",_0="scrollWidth")),w0=w0,t0===top||(t0===left||t0===right)&&n0===end){g0=bottom;var y0=u0&&w0===v0&&v0.visualViewport?v0.visualViewport.height:w0[x0];d0-=y0-r0.height,d0*=a0?1:-1}if(t0===left||(t0===top||t0===bottom)&&n0===end){m0=right;var S0=u0&&w0===v0&&v0.visualViewport?v0.visualViewport.width:w0[_0];c0-=S0-r0.width,c0*=a0?1:-1}}var B0=Object.assign({position:o0},f0&&unsetSides),I0=l0===!0?roundOffsetsByDPR({x:c0,y:d0},getWindow$1(i0)):{x:c0,y:d0};if(c0=I0.x,d0=I0.y,a0){var F0;return Object.assign({},B0,(F0={},F0[g0]=p0?"0":"",F0[m0]=b0?"0":"",F0.transform=(v0.devicePixelRatio||1)<=1?"translate("+c0+"px, "+d0+"px)":"translate3d("+c0+"px, "+d0+"px, 0)",F0))}return Object.assign({},B0,(_e={},_e[g0]=p0?d0+"px":"",_e[m0]=b0?c0+"px":"",_e.transform="",_e))}function computeStyles$1(e0){var _e=e0.state,i0=e0.options,r0=i0.gpuAcceleration,t0=r0===void 0?!0:r0,n0=i0.adaptive,s0=n0===void 0?!0:n0,o0=i0.roundOffsets,a0=o0===void 0?!0:o0,f0={placement:getBasePlacement(_e.placement),variation:getVariation(_e.placement),popper:_e.elements.popper,popperRect:_e.rects.popper,gpuAcceleration:t0,isFixed:_e.options.strategy==="fixed"};_e.modifiersData.popperOffsets!=null&&(_e.styles.popper=Object.assign({},_e.styles.popper,mapToStyles(Object.assign({},f0,{offsets:_e.modifiersData.popperOffsets,position:_e.options.strategy,adaptive:s0,roundOffsets:a0})))),_e.modifiersData.arrow!=null&&(_e.styles.arrow=Object.assign({},_e.styles.arrow,mapToStyles(Object.assign({},f0,{offsets:_e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:a0})))),_e.attributes.popper=Object.assign({},_e.attributes.popper,{"data-popper-placement":_e.placement})}const computeStyles={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles$1,data:{}};var passive={passive:!0};function effect(e0){var _e=e0.state,i0=e0.instance,r0=e0.options,t0=r0.scroll,n0=t0===void 0?!0:t0,s0=r0.resize,o0=s0===void 0?!0:s0,a0=getWindow$1(_e.elements.popper),f0=[].concat(_e.scrollParents.reference,_e.scrollParents.popper);return n0&&f0.forEach(function(l0){l0.addEventListener("scroll",i0.update,passive)}),o0&&a0.addEventListener("resize",i0.update,passive),function(){n0&&f0.forEach(function(l0){l0.removeEventListener("scroll",i0.update,passive)}),o0&&a0.removeEventListener("resize",i0.update,passive)}}const eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function e0(){},effect,data:{}};var hash$2={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e0){return e0.replace(/left|right|bottom|top/g,function(_e){return hash$2[_e]})}var hash$1={start:"end",end:"start"};function getOppositeVariationPlacement(e0){return e0.replace(/start|end/g,function(_e){return hash$1[_e]})}function getWindowScroll(e0){var _e=getWindow$1(e0),i0=_e.pageXOffset,r0=_e.pageYOffset;return{scrollLeft:i0,scrollTop:r0}}function getWindowScrollBarX(e0){return getBoundingClientRect(getDocumentElement(e0)).left+getWindowScroll(e0).scrollLeft}function getViewportRect(e0,_e){var i0=getWindow$1(e0),r0=getDocumentElement(e0),t0=i0.visualViewport,n0=r0.clientWidth,s0=r0.clientHeight,o0=0,a0=0;if(t0){n0=t0.width,s0=t0.height;var f0=isLayoutViewport();(f0||!f0&&_e==="fixed")&&(o0=t0.offsetLeft,a0=t0.offsetTop)}return{width:n0,height:s0,x:o0+getWindowScrollBarX(e0),y:a0}}function getDocumentRect(e0){var _e,i0=getDocumentElement(e0),r0=getWindowScroll(e0),t0=(_e=e0.ownerDocument)==null?void 0:_e.body,n0=max(i0.scrollWidth,i0.clientWidth,t0?t0.scrollWidth:0,t0?t0.clientWidth:0),s0=max(i0.scrollHeight,i0.clientHeight,t0?t0.scrollHeight:0,t0?t0.clientHeight:0),o0=-r0.scrollLeft+getWindowScrollBarX(e0),a0=-r0.scrollTop;return getComputedStyle$1(t0||i0).direction==="rtl"&&(o0+=max(i0.clientWidth,t0?t0.clientWidth:0)-n0),{width:n0,height:s0,x:o0,y:a0}}function isScrollParent(e0){var _e=getComputedStyle$1(e0),i0=_e.overflow,r0=_e.overflowX,t0=_e.overflowY;return/auto|scroll|overlay|hidden/.test(i0+t0+r0)}function getScrollParent(e0){return["html","body","#document"].indexOf(getNodeName(e0))>=0?e0.ownerDocument.body:isHTMLElement$2(e0)&&isScrollParent(e0)?e0:getScrollParent(getParentNode(e0))}function listScrollParents(e0,_e){var i0;_e===void 0&&(_e=[]);var r0=getScrollParent(e0),t0=r0===((i0=e0.ownerDocument)==null?void 0:i0.body),n0=getWindow$1(r0),s0=t0?[n0].concat(n0.visualViewport||[],isScrollParent(r0)?r0:[]):r0,o0=_e.concat(s0);return t0?o0:o0.concat(listScrollParents(getParentNode(s0)))}function rectToClientRect(e0){return Object.assign({},e0,{left:e0.x,top:e0.y,right:e0.x+e0.width,bottom:e0.y+e0.height})}function getInnerBoundingClientRect(e0,_e){var i0=getBoundingClientRect(e0,!1,_e==="fixed");return i0.top=i0.top+e0.clientTop,i0.left=i0.left+e0.clientLeft,i0.bottom=i0.top+e0.clientHeight,i0.right=i0.left+e0.clientWidth,i0.width=e0.clientWidth,i0.height=e0.clientHeight,i0.x=i0.left,i0.y=i0.top,i0}function getClientRectFromMixedType(e0,_e,i0){return _e===viewport?rectToClientRect(getViewportRect(e0,i0)):isElement(_e)?getInnerBoundingClientRect(_e,i0):rectToClientRect(getDocumentRect(getDocumentElement(e0)))}function getClippingParents(e0){var _e=listScrollParents(getParentNode(e0)),i0=["absolute","fixed"].indexOf(getComputedStyle$1(e0).position)>=0,r0=i0&&isHTMLElement$2(e0)?getOffsetParent(e0):e0;return isElement(r0)?_e.filter(function(t0){return isElement(t0)&&contains$1(t0,r0)&&getNodeName(t0)!=="body"}):[]}function getClippingRect(e0,_e,i0,r0){var t0=_e==="clippingParents"?getClippingParents(e0):[].concat(_e),n0=[].concat(t0,[i0]),s0=n0[0],o0=n0.reduce(function(a0,f0){var l0=getClientRectFromMixedType(e0,f0,r0);return a0.top=max(l0.top,a0.top),a0.right=min(l0.right,a0.right),a0.bottom=min(l0.bottom,a0.bottom),a0.left=max(l0.left,a0.left),a0},getClientRectFromMixedType(e0,s0,r0));return o0.width=o0.right-o0.left,o0.height=o0.bottom-o0.top,o0.x=o0.left,o0.y=o0.top,o0}function computeOffsets(e0){var _e=e0.reference,i0=e0.element,r0=e0.placement,t0=r0?getBasePlacement(r0):null,n0=r0?getVariation(r0):null,s0=_e.x+_e.width/2-i0.width/2,o0=_e.y+_e.height/2-i0.height/2,a0;switch(t0){case top:a0={x:s0,y:_e.y-i0.height};break;case bottom:a0={x:s0,y:_e.y+_e.height};break;case right:a0={x:_e.x+_e.width,y:o0};break;case left:a0={x:_e.x-i0.width,y:o0};break;default:a0={x:_e.x,y:_e.y}}var f0=t0?getMainAxisFromPlacement(t0):null;if(f0!=null){var l0=f0==="y"?"height":"width";switch(n0){case start$3:a0[f0]=a0[f0]-(_e[l0]/2-i0[l0]/2);break;case end:a0[f0]=a0[f0]+(_e[l0]/2-i0[l0]/2);break}}return a0}function detectOverflow(e0,_e){_e===void 0&&(_e={});var i0=_e,r0=i0.placement,t0=r0===void 0?e0.placement:r0,n0=i0.strategy,s0=n0===void 0?e0.strategy:n0,o0=i0.boundary,a0=o0===void 0?clippingParents:o0,f0=i0.rootBoundary,l0=f0===void 0?viewport:f0,u0=i0.elementContext,A0=u0===void 0?popper:u0,c0=i0.altBoundary,k0=c0===void 0?!1:c0,d0=i0.padding,h0=d0===void 0?0:d0,b0=mergePaddingObject(typeof h0!="number"?h0:expandToHashMap(h0,basePlacements)),p0=A0===popper?reference:popper,m0=e0.rects.popper,g0=e0.elements[k0?p0:A0],v0=getClippingRect(isElement(g0)?g0:g0.contextElement||getDocumentElement(e0.elements.popper),a0,l0,s0),w0=getBoundingClientRect(e0.elements.reference),x0=computeOffsets({reference:w0,element:m0,placement:t0}),_0=rectToClientRect(Object.assign({},m0,x0)),y0=A0===popper?_0:w0,S0={top:v0.top-y0.top+b0.top,bottom:y0.bottom-v0.bottom+b0.bottom,left:v0.left-y0.left+b0.left,right:y0.right-v0.right+b0.right},B0=e0.modifiersData.offset;if(A0===popper&&B0){var I0=B0[t0];Object.keys(S0).forEach(function(F0){var C0=[right,bottom].indexOf(F0)>=0?1:-1,E0=[top,bottom].indexOf(F0)>=0?"y":"x";S0[F0]+=I0[E0]*C0})}return S0}function computeAutoPlacement(e0,_e){_e===void 0&&(_e={});var i0=_e,r0=i0.placement,t0=i0.boundary,n0=i0.rootBoundary,s0=i0.padding,o0=i0.flipVariations,a0=i0.allowedAutoPlacements,f0=a0===void 0?placements:a0,l0=getVariation(r0),u0=l0?o0?variationPlacements:variationPlacements.filter(function(k0){return getVariation(k0)===l0}):basePlacements,A0=u0.filter(function(k0){return f0.indexOf(k0)>=0});A0.length===0&&(A0=u0);var c0=A0.reduce(function(k0,d0){return k0[d0]=detectOverflow(e0,{placement:d0,boundary:t0,rootBoundary:n0,padding:s0})[getBasePlacement(d0)],k0},{});return Object.keys(c0).sort(function(k0,d0){return c0[k0]-c0[d0]})}function getExpandedFallbackPlacements(e0){if(getBasePlacement(e0)===auto)return[];var _e=getOppositePlacement(e0);return[getOppositeVariationPlacement(e0),_e,getOppositeVariationPlacement(_e)]}function flip$1(e0){var _e=e0.state,i0=e0.options,r0=e0.name;if(!_e.modifiersData[r0]._skip){for(var t0=i0.mainAxis,n0=t0===void 0?!0:t0,s0=i0.altAxis,o0=s0===void 0?!0:s0,a0=i0.fallbackPlacements,f0=i0.padding,l0=i0.boundary,u0=i0.rootBoundary,A0=i0.altBoundary,c0=i0.flipVariations,k0=c0===void 0?!0:c0,d0=i0.allowedAutoPlacements,h0=_e.options.placement,b0=getBasePlacement(h0),p0=b0===h0,m0=a0||(p0||!k0?[getOppositePlacement(h0)]:getExpandedFallbackPlacements(h0)),g0=[h0].concat(m0).reduce(function(D0,$0){return D0.concat(getBasePlacement($0)===auto?computeAutoPlacement(_e,{placement:$0,boundary:l0,rootBoundary:u0,padding:f0,flipVariations:k0,allowedAutoPlacements:d0}):$0)},[]),v0=_e.rects.reference,w0=_e.rects.popper,x0=new Map,_0=!0,y0=g0[0],S0=0;S0<g0.length;S0++){var B0=g0[S0],I0=getBasePlacement(B0),F0=getVariation(B0)===start$3,C0=[top,bottom].indexOf(I0)>=0,E0=C0?"width":"height",R0=detectOverflow(_e,{placement:B0,boundary:l0,rootBoundary:u0,altBoundary:A0,padding:f0}),M0=C0?F0?right:left:F0?bottom:top;v0[E0]>w0[E0]&&(M0=getOppositePlacement(M0));var T0=getOppositePlacement(M0),G0=[];if(n0&&G0.push(R0[I0]<=0),o0&&G0.push(R0[M0]<=0,R0[T0]<=0),G0.every(function(D0){return D0})){y0=B0,_0=!1;break}x0.set(B0,G0)}if(_0)for(var j0=k0?3:1,N0=function($0){var z0=g0.find(function(K0){var e2=x0.get(K0);if(e2)return e2.slice(0,$0).every(function(J0){return J0})});if(z0)return y0=z0,"break"},O0=j0;O0>0;O0--){var Y0=N0(O0);if(Y0==="break")break}_e.placement!==y0&&(_e.modifiersData[r0]._skip=!0,_e.placement=y0,_e.reset=!0)}}const flip={name:"flip",enabled:!0,phase:"main",fn:flip$1,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(e0,_e,i0){return i0===void 0&&(i0={x:0,y:0}),{top:e0.top-_e.height-i0.y,right:e0.right-_e.width+i0.x,bottom:e0.bottom-_e.height+i0.y,left:e0.left-_e.width-i0.x}}function isAnySideFullyClipped(e0){return[top,right,bottom,left].some(function(_e){return e0[_e]>=0})}function hide$1(e0){var _e=e0.state,i0=e0.name,r0=_e.rects.reference,t0=_e.rects.popper,n0=_e.modifiersData.preventOverflow,s0=detectOverflow(_e,{elementContext:"reference"}),o0=detectOverflow(_e,{altBoundary:!0}),a0=getSideOffsets(s0,r0),f0=getSideOffsets(o0,t0,n0),l0=isAnySideFullyClipped(a0),u0=isAnySideFullyClipped(f0);_e.modifiersData[i0]={referenceClippingOffsets:a0,popperEscapeOffsets:f0,isReferenceHidden:l0,hasPopperEscaped:u0},_e.attributes.popper=Object.assign({},_e.attributes.popper,{"data-popper-reference-hidden":l0,"data-popper-escaped":u0})}const hide={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide$1};function distanceAndSkiddingToXY(e0,_e,i0){var r0=getBasePlacement(e0),t0=[left,top].indexOf(r0)>=0?-1:1,n0=typeof i0=="function"?i0(Object.assign({},_e,{placement:e0})):i0,s0=n0[0],o0=n0[1];return s0=s0||0,o0=(o0||0)*t0,[left,right].indexOf(r0)>=0?{x:o0,y:s0}:{x:s0,y:o0}}function offset$1(e0){var _e=e0.state,i0=e0.options,r0=e0.name,t0=i0.offset,n0=t0===void 0?[0,0]:t0,s0=placements.reduce(function(l0,u0){return l0[u0]=distanceAndSkiddingToXY(u0,_e.rects,n0),l0},{}),o0=s0[_e.placement],a0=o0.x,f0=o0.y;_e.modifiersData.popperOffsets!=null&&(_e.modifiersData.popperOffsets.x+=a0,_e.modifiersData.popperOffsets.y+=f0),_e.modifiersData[r0]=s0}const offset={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset$1};function popperOffsets$1(e0){var _e=e0.state,i0=e0.name;_e.modifiersData[i0]=computeOffsets({reference:_e.rects.reference,element:_e.rects.popper,placement:_e.placement})}const popperOffsets={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets$1,data:{}};function getAltAxis(e0){return e0==="x"?"y":"x"}function preventOverflow$1(e0){var _e=e0.state,i0=e0.options,r0=e0.name,t0=i0.mainAxis,n0=t0===void 0?!0:t0,s0=i0.altAxis,o0=s0===void 0?!1:s0,a0=i0.boundary,f0=i0.rootBoundary,l0=i0.altBoundary,u0=i0.padding,A0=i0.tether,c0=A0===void 0?!0:A0,k0=i0.tetherOffset,d0=k0===void 0?0:k0,h0=detectOverflow(_e,{boundary:a0,rootBoundary:f0,padding:u0,altBoundary:l0}),b0=getBasePlacement(_e.placement),p0=getVariation(_e.placement),m0=!p0,g0=getMainAxisFromPlacement(b0),v0=getAltAxis(g0),w0=_e.modifiersData.popperOffsets,x0=_e.rects.reference,_0=_e.rects.popper,y0=typeof d0=="function"?d0(Object.assign({},_e.rects,{placement:_e.placement})):d0,S0=typeof y0=="number"?{mainAxis:y0,altAxis:y0}:Object.assign({mainAxis:0,altAxis:0},y0),B0=_e.modifiersData.offset?_e.modifiersData.offset[_e.placement]:null,I0={x:0,y:0};if(w0){if(n0){var F0,C0=g0==="y"?top:left,E0=g0==="y"?bottom:right,R0=g0==="y"?"height":"width",M0=w0[g0],T0=M0+h0[C0],G0=M0-h0[E0],j0=c0?-_0[R0]/2:0,N0=p0===start$3?x0[R0]:_0[R0],O0=p0===start$3?-_0[R0]:-x0[R0],Y0=_e.elements.arrow,D0=c0&&Y0?getLayoutRect(Y0):{width:0,height:0},$0=_e.modifiersData["arrow#persistent"]?_e.modifiersData["arrow#persistent"].padding:getFreshSideObject(),z0=$0[C0],K0=$0[E0],e2=within(0,x0[R0],D0[R0]),J0=m0?x0[R0]/2-j0-e2-z0-S0.mainAxis:N0-e2-z0-S0.mainAxis,_i=m0?-x0[R0]/2+j0+e2+K0+S0.mainAxis:O0+e2+K0+S0.mainAxis,Q0=_e.elements.arrow&&getOffsetParent(_e.elements.arrow),U0=Q0?g0==="y"?Q0.clientTop||0:Q0.clientLeft||0:0,i2=(F0=B0==null?void 0:B0[g0])!=null?F0:0,s2=M0+J0-i2-U0,f2=M0+_i-i2,c2=within(c0?min(T0,s2):T0,M0,c0?max(G0,f2):G0);w0[g0]=c2,I0[g0]=c2-M0}if(o0){var m2,w2=g0==="x"?top:left,_2=g0==="x"?bottom:right,b2=w0[v0],P0=v0==="y"?"height":"width",W0=b2+h0[w2],X0=b2-h0[_2],r2=[top,left].indexOf(b0)!==-1,L0=(m2=B0==null?void 0:B0[v0])!=null?m2:0,H0=r2?W0:b2-x0[P0]-_0[P0]-L0+S0.altAxis,q0=r2?b2+x0[P0]+_0[P0]-L0-S0.altAxis:X0,n2=c0&&r2?withinMaxClamp(H0,b2,q0):within(c0?H0:W0,b2,c0?q0:X0);w0[v0]=n2,I0[v0]=n2-b2}_e.modifiersData[r0]=I0}}const preventOverflow={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow$1,requiresIfExists:["offset"]};function getHTMLElementScroll(e0){return{scrollLeft:e0.scrollLeft,scrollTop:e0.scrollTop}}function getNodeScroll(e0){return e0===getWindow$1(e0)||!isHTMLElement$2(e0)?getWindowScroll(e0):getHTMLElementScroll(e0)}function isElementScaled(e0){var _e=e0.getBoundingClientRect(),i0=round$2(_e.width)/e0.offsetWidth||1,r0=round$2(_e.height)/e0.offsetHeight||1;return i0!==1||r0!==1}function getCompositeRect(e0,_e,i0){i0===void 0&&(i0=!1);var r0=isHTMLElement$2(_e),t0=isHTMLElement$2(_e)&&isElementScaled(_e),n0=getDocumentElement(_e),s0=getBoundingClientRect(e0,t0,i0),o0={scrollLeft:0,scrollTop:0},a0={x:0,y:0};return(r0||!r0&&!i0)&&((getNodeName(_e)!=="body"||isScrollParent(n0))&&(o0=getNodeScroll(_e)),isHTMLElement$2(_e)?(a0=getBoundingClientRect(_e,!0),a0.x+=_e.clientLeft,a0.y+=_e.clientTop):n0&&(a0.x=getWindowScrollBarX(n0))),{x:s0.left+o0.scrollLeft-a0.x,y:s0.top+o0.scrollTop-a0.y,width:s0.width,height:s0.height}}function order(e0){var _e=new Map,i0=new Set,r0=[];e0.forEach(function(n0){_e.set(n0.name,n0)});function t0(n0){i0.add(n0.name);var s0=[].concat(n0.requires||[],n0.requiresIfExists||[]);s0.forEach(function(o0){if(!i0.has(o0)){var a0=_e.get(o0);a0&&t0(a0)}}),r0.push(n0)}return e0.forEach(function(n0){i0.has(n0.name)||t0(n0)}),r0}function orderModifiers(e0){var _e=order(e0);return modifierPhases.reduce(function(i0,r0){return i0.concat(_e.filter(function(t0){return t0.phase===r0}))},[])}function debounce(e0){var _e;return function(){return _e||(_e=new Promise(function(i0){Promise.resolve().then(function(){_e=void 0,i0(e0())})})),_e}}function mergeByName(e0){var _e=e0.reduce(function(i0,r0){var t0=i0[r0.name];return i0[r0.name]=t0?Object.assign({},t0,r0,{options:Object.assign({},t0.options,r0.options),data:Object.assign({},t0.data,r0.data)}):r0,i0},{});return Object.keys(_e).map(function(i0){return _e[i0]})}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e0=arguments.length,_e=new Array(e0),i0=0;i0<e0;i0++)_e[i0]=arguments[i0];return!_e.some(function(r0){return!(r0&&typeof r0.getBoundingClientRect=="function")})}function popperGenerator(e0){e0===void 0&&(e0={});var _e=e0,i0=_e.defaultModifiers,r0=i0===void 0?[]:i0,t0=_e.defaultOptions,n0=t0===void 0?DEFAULT_OPTIONS:t0;return function(o0,a0,f0){f0===void 0&&(f0=n0);var l0={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,n0),modifiersData:{},elements:{reference:o0,popper:a0},attributes:{},styles:{}},u0=[],A0=!1,c0={state:l0,setOptions:function(b0){var p0=typeof b0=="function"?b0(l0.options):b0;d0(),l0.options=Object.assign({},n0,l0.options,p0),l0.scrollParents={reference:isElement(o0)?listScrollParents(o0):o0.contextElement?listScrollParents(o0.contextElement):[],popper:listScrollParents(a0)};var m0=orderModifiers(mergeByName([].concat(r0,l0.options.modifiers)));return l0.orderedModifiers=m0.filter(function(g0){return g0.enabled}),k0(),c0.update()},forceUpdate:function(){if(!A0){var b0=l0.elements,p0=b0.reference,m0=b0.popper;if(areValidElements(p0,m0)){l0.rects={reference:getCompositeRect(p0,getOffsetParent(m0),l0.options.strategy==="fixed"),popper:getLayoutRect(m0)},l0.reset=!1,l0.placement=l0.options.placement,l0.orderedModifiers.forEach(function(S0){return l0.modifiersData[S0.name]=Object.assign({},S0.data)});for(var g0=0;g0<l0.orderedModifiers.length;g0++){if(l0.reset===!0){l0.reset=!1,g0=-1;continue}var v0=l0.orderedModifiers[g0],w0=v0.fn,x0=v0.options,_0=x0===void 0?{}:x0,y0=v0.name;typeof w0=="function"&&(l0=w0({state:l0,options:_0,name:y0,instance:c0})||l0)}}}},update:debounce(function(){return new Promise(function(h0){c0.forceUpdate(),h0(l0)})}),destroy:function(){d0(),A0=!0}};if(!areValidElements(o0,a0))return c0;c0.setOptions(f0).then(function(h0){!A0&&f0.onFirstUpdate&&f0.onFirstUpdate(h0)});function k0(){l0.orderedModifiers.forEach(function(h0){var b0=h0.name,p0=h0.options,m0=p0===void 0?{}:p0,g0=h0.effect;if(typeof g0=="function"){var v0=g0({state:l0,name:b0,instance:c0,options:m0}),w0=function(){};u0.push(v0||w0)}})}function d0(){u0.forEach(function(h0){return h0()}),u0=[]}return c0}}var defaultModifiers=[eventListeners,popperOffsets,computeStyles,applyStyles,offset,flip,preventOverflow,arrow,hide],createPopper=popperGenerator({defaultModifiers}),hasElementType=typeof Element<"u",hasMap=typeof Map=="function",hasSet=typeof Set=="function",hasArrayBuffer=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView,hasDataView=typeof DataView=="function",durationFields=["years","months","weeks","days","hours","minutes","seconds","milliseconds","microseconds","nanoseconds"];function equal(e0,_e){if(e0===_e)return!0;if(e0&&_e&&typeof e0=="object"&&typeof _e=="object"){if(e0.constructor!==_e.constructor)return!1;var i0,r0,t0;if(Array.isArray(e0)){if(i0=e0.length,i0!=_e.length)return!1;for(r0=i0;r0--!==0;)if(!equal(e0[r0],_e[r0]))return!1;return!0}var n0;if(hasMap&&e0 instanceof Map&&_e instanceof Map){if(e0.size!==_e.size)return!1;for(n0=e0.entries();!(r0=n0.next()).done;)if(!_e.has(r0.value[0]))return!1;for(n0=e0.entries();!(r0=n0.next()).done;)if(!equal(r0.value[1],_e.get(r0.value[0])))return!1;return!0}if(hasSet&&e0 instanceof Set&&_e instanceof Set){if(e0.size!==_e.size)return!1;for(n0=e0.entries();!(r0=n0.next()).done;)if(!_e.has(r0.value[0]))return!1;return!0}if(hasDataView&&e0 instanceof DataView&&_e instanceof DataView){if(i0=e0.byteLength,i0!==_e.byteLength)return!1;for(r0=i0;r0--!==0;)if(e0.getUint8(r0)!==_e.getUint8(r0))return!1;return!0}if(hasArrayBuffer&&ArrayBuffer.isView(e0)&&ArrayBuffer.isView(_e)){if(i0=e0.length,i0!=_e.length)return!1;for(r0=i0;r0--!==0;)if(e0[r0]!==_e[r0])return!1;return!0}if(e0.constructor===RegExp)return e0.source===_e.source&&e0.flags===_e.flags;var s0;if(e0.valueOf!==Object.prototype.valueOf&&typeof e0.valueOf=="function"&&typeof _e.valueOf=="function"){if(s0=Object.prototype.toString.call(e0),s0.indexOf("[object Temporal.")!==0)return e0.valueOf()===_e.valueOf();if(typeof e0.equals=="function")return e0.equals(_e);if(s0==="[object Temporal.Duration]"){for(r0=durationFields.length;r0--!==0;)if(e0[durationFields[r0]]!==_e[durationFields[r0]])return!1;return!0}}if(e0.toString!==Object.prototype.toString&&typeof e0.toString=="function"&&typeof _e.toString=="function")return e0.toString()===_e.toString();if(t0=Object.keys(e0),i0=t0.length,i0!==Object.keys(_e).length)return!1;for(r0=i0;r0--!==0;)if(!Object.prototype.hasOwnProperty.call(_e,t0[r0]))return!1;if(hasElementType&&e0 instanceof Element)return!1;for(r0=i0;r0--!==0;)if(!((t0[r0]==="_owner"||t0[r0]==="__v"||t0[r0]==="__o")&&e0.$$typeof)&&!equal(e0[t0[r0]],_e[t0[r0]]))return!1;return!0}return e0!==e0&&_e!==_e}var reactFastCompare=function e0(_e,i0){try{return equal(_e,i0)}catch(r0){if((r0.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r0}};const isEqual$1=getDefaultExportFromCjs(reactFastCompare);var EMPTY_MODIFIERS=[],usePopper=function e0(_e,i0,r0){r0===void 0&&(r0={});var t0=reactExports.useRef(null),n0={onFirstUpdate:r0.onFirstUpdate,placement:r0.placement||"bottom",strategy:r0.strategy||"absolute",modifiers:r0.modifiers||EMPTY_MODIFIERS},s0=reactExports.useState({styles:{popper:{position:n0.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),o0=s0[0],a0=s0[1],f0=reactExports.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(c0){var k0=c0.state,d0=Object.keys(k0.elements);reactDomExports.flushSync(function(){a0({styles:fromEntries(d0.map(function(h0){return[h0,k0.styles[h0]||{}]})),attributes:fromEntries(d0.map(function(h0){return[h0,k0.attributes[h0]]}))})})},requires:["computeStyles"]}},[]),l0=reactExports.useMemo(function(){var A0={onFirstUpdate:n0.onFirstUpdate,placement:n0.placement,strategy:n0.strategy,modifiers:[].concat(n0.modifiers,[f0,{name:"applyStyles",enabled:!1}])};return isEqual$1(t0.current,A0)?t0.current||A0:(t0.current=A0,A0)},[n0.onFirstUpdate,n0.placement,n0.strategy,n0.modifiers,f0]),u0=reactExports.useRef();return useIsomorphicLayoutEffect$3(function(){u0.current&&u0.current.setOptions(l0)},[l0]),useIsomorphicLayoutEffect$3(function(){if(!(_e==null||i0==null)){var A0=r0.createPopper||createPopper,c0=A0(_e,i0,l0);return u0.current=c0,function(){c0.destroy(),u0.current=null}}},[_e,i0,r0.createPopper]),{state:u0.current?u0.current.state:null,styles:o0.styles,attributes:o0.attributes,update:u0.current?u0.current.update:null,forceUpdate:u0.current?u0.current.forceUpdate:null}},Tooltip=({children:e0,message:_e,icon:i0=null,placement:r0="auto",...t0})=>{let[n0,s0]=reactExports.useState(null),[o0,a0]=reactExports.useState(null),[f0,l0]=reactExports.useState(null),{styles:u0,attributes:A0}=usePopper(n0,o0,{placement:r0,modifiers:[{name:"arrow",options:{element:f0}}]}),[c0,k0]=reactExports.useState(!1);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:"d-inline-block position-relative",ref:s0,onMouseEnter:()=>{k0(!0)},onMouseLeave:()=>{k0(!1)},...t0,children:e0}),c0&&_e&&jsxRuntimeExports.jsxs("div",{className:clsx("tooltip d-block show mb-12 z-2","bs-tooltip-auto"),ref:a0,style:u0.popper,...A0.popper,children:[jsxRuntimeExports.jsxs("div",{className:"tooltip-inner shadow-hover d-flex gap-8 align-items-center",children:[i0&&i0,jsxRuntimeExports.jsx("div",{children:_e})]}),jsxRuntimeExports.jsx("div",{className:"tooltip-arrow",ref:l0,style:u0.arrow})]})]})},Toolbar=reactExports.forwardRef(({items:e0,variant:_e="default",align:i0="space",isBlock:r0=!1,ariaControls:t0,className:n0,shouldHideLabelsOnMobile:s0=!1},o0)=>{let[a0,f0]=reactExports.useState(0),[l0,u0]=reactExports.useState([]),[A0,c0]=reactExports.useState(),[k0,d0]=reactExports.useState(),h0=reactExports.useRef(),{lg:b0}=useBreakpoint(),p0=clsx("toolbar z-1000 bg-white",n0,{default:_e==="default","no-shadow":_e==="no-shadow","d-flex":r0,"d-inline-flex":!r0,"overflow-x-auto":r0,"justify-content-start":i0==="left","justify-content-between":i0==="space","justify-content-center":i0==="center","justify-content-end":i0==="right"});reactExports.useEffect(()=>{var B0;let _0=(B0=h0.current)==null?void 0:B0.querySelectorAll("button"),y0=[],S0=!1;_0==null||_0.forEach(I0=>{I0.disabled||(S0||(S0=(c0(I0),!0)),d0(I0),y0.push(I0))}),u0(y0),f0(e0.findIndex(I0=>(I0.type==="button"||I0.type==="icon")&&!I0.props.disabled))},[e0]);let m0=_0=>{_0.target.classList.add("focus")},g0=_0=>{_0.target.classList.remove("focus")},v0=_0=>{var S0,B0;let y0=l0.indexOf(_0.currentTarget);switch(_0.code){case"ArrowLeft":_0.currentTarget===A0?k0==null||k0.focus():(S0=l0[y0-1])==null||S0.focus();break;case"ArrowRight":_0.currentTarget===k0?A0==null||A0.focus():(B0=l0[y0+1])==null||B0.focus();break}},w0=_0=>{var y0;return typeof _0.tooltip=="string"?_0.tooltip:(y0=_0.tooltip)==null?void 0:y0.message},x0=_0=>{var y0;return typeof _0.tooltip=="string"?"top":(y0=_0.tooltip)==null?void 0:y0.position};return jsxRuntimeExports.jsx("div",{ref:mergeRefs(o0,h0),className:p0,role:"toolbar","aria-label":"Text Formatting","aria-controls":t0,onFocus:m0,onBlur:g0,children:e0.map((_0,y0)=>{if(_0.visibility==="hide")return null;let S0=s0&&!b0;switch(_0.type){case"divider":return jsxRuntimeExports.jsx("div",{className:"toolbar-divider"},_0.name??y0);case"button":return jsxRuntimeExports.jsx(Tooltip,{message:S0?w0(_0):void 0,placement:x0(_0),children:reactExports.createElement(Button,{..._0.props,children:!S0&&_0.props.children,"aria-label":_0.name,key:_0.name??y0,color:_0.props.color||"tertiary",variant:"ghost",size:_0.props.size||(S0?"sm":"md"),tabIndex:y0===a0?0:-1,onKeyDown:v0})},_0.name??y0);case"icon":return jsxRuntimeExports.jsx(Tooltip,{message:w0(_0),placement:x0(_0),children:reactExports.createElement(IconButton,{..._0.props,key:_0.name??y0,color:_0.props.color?_0.props.color:"tertiary",variant:_0.props.variant?_0.props.variant:"ghost",tabIndex:y0===a0?0:-1,onKeyDown:v0})},_0.name??y0);case"dropdown":return reactExports.createElement(Dropdown,{..._0.props,key:_0.name??y0,extraTriggerKeyDownHandler:v0,overflow:_0.overflow});case"primary":return jsxRuntimeExports.jsx(Tooltip,{message:w0(_0),placement:x0(_0),children:jsxRuntimeExports.jsx(Button,{..._0.props,variant:"filled",color:"primary",tabIndex:y0===a0?0:-1,onKeyDown:v0})},_0.name??y0)}return null})})}),AudioRecorder=reactExports.forwardRef(({onSaveSuccess:e0,onRecordUpdated:_e,hideSaveAction:i0=!1,visibility:r0="protected",onNameChange:t0},n0)=>{let{recordState:s0,playState:o0,recordTime:a0,audioRef:f0,audioNameRef:l0,toolbarItems:u0,micError:A0,maxDuration:c0,handlePlayEnded:k0,handleSave:d0}=useAudioRecorder(e0,_e,i0,r0,"media-library"),{t:h0}=useTranslation(),{formatDate:b0}=useDate(),[p0]=reactExports.useState(()=>`${h0("bbm.audio.recorder.defaultName")} ${b0(new Date,RECORD_NAME_DATE_FORMAT)}`.trim());reactExports.useImperativeHandle(n0,()=>({save:d0}));let[m0,g0]=reactExports.useState(0),v0=clsx("audio-recorder-icon",{"audio-recorder-icon--recording":s0==="RECORDING","audio-recorder-icon--playing":o0==="PLAYING"});return A0?jsxRuntimeExports.jsxs("div",{className:"audio-recorder-error",children:[jsxRuntimeExports.jsx("div",{className:"audio-recorder-error-illustration","aria-hidden":"true"}),jsxRuntimeExports.jsxs("div",{className:"audio-recorder-error-text",children:[jsxRuntimeExports.jsx("p",{className:"audio-recorder-error-title",children:h0("bbm.audio.recorder.device.error.title")}),jsxRuntimeExports.jsx("p",{className:"audio-recorder-error-description",children:h0("bbm.audio.recorder.device.error.text")})]})]}):jsxRuntimeExports.jsxs("div",{className:"audio-recorder",children:[jsxRuntimeExports.jsxs(FormControl,{id:"recordName",isRequired:!0,isReadOnly:s0==="SAVED"||s0==="SAVING",children:[jsxRuntimeExports.jsx(Label,{leftIcon:jsxRuntimeExports.jsx(SvgIconMic,{width:18,height:18}),children:h0("bbm.audio.recorder.name.label")}),jsxRuntimeExports.jsx(Input,{type:"text",size:"lg",maxLength:80,showCounter:!0,placeholder:h0("bbm.audio.recorder.name"),defaultValue:p0,onChange:w0=>t0==null?void 0:t0(w0.target.value),ref:l0})]}),jsxRuntimeExports.jsxs("div",{className:"audio-recorder-controls",children:[jsxRuntimeExports.jsx("div",{className:v0,children:jsxRuntimeExports.jsx(SvgIconMic,{width:64,height:64})}),jsxRuntimeExports.jsx(AudioRecorderTimer,{recordState:s0,playState:o0,recordTime:a0,audioTime:m0,maxDuration:c0}),jsxRuntimeExports.jsx("audio",{ref:f0,onEnded:k0,onTimeUpdate:w0=>{g0(w0.target.currentTime)},children:jsxRuntimeExports.jsx("track",{default:!0,kind:"captions",srcLang:"fr",src:""})}),jsxRuntimeExports.jsx(Toolbar,{items:u0})]})]})}),SvgIconCode=({title:e0,titleId:_e,...i0})=>jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true","aria-labelledby":_e,...i0,children:[e0?jsxRuntimeExports.jsx("title",{id:_e,children:e0}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M17.327 5.76a1 1 0 0 1 1.413.067l5 5.5a1 1 0 0 1 0 1.346l-5 5.5a1 1 0 1 1-1.48-1.346L21.648 12 17.26 7.173a1 1 0 0 1 .067-1.413M6.673 5.76a1 1 0 0 1 .067 1.413L2.35 12l4.389 4.827a1 1 0 0 1-1.48 1.346l-5-5.5a1 1 0 0 1 0-1.346l5-5.5a1 1 0 0 1 1.413-.067M8.979 21.609a1 1 0 0 1-.658-1.252l5.375-17.29a1 1 0 1 1 1.91.594L10.23 20.95a1 1 0 0 1-1.251.658",clipRule:"evenodd"})]}),Textcounter=({currentLength:e0,maxLength:_e})=>jsxRuntimeExports.jsxs("span",{className:clsx("caption text-end float-end mt-n32 py-2 px-12 ",{"text-danger":e0===_e,"text-gray-700":e0!==_e}),children:[e0," / ",_e]}),TextArea=reactExports.forwardRef(({noValidationIcon:e0,placeholder:_e,size:i0="md",height:r0="md",className:t0,showCounter:n0=!1,...s0},o0)=>{var h0;let{id:a0,isRequired:f0,isReadOnly:l0,status:u0}=useFormControl(),[A0,c0]=reactExports.useState(((h0=s0.defaultValue)==null?void 0:h0.toString().length)||0),k0=clsx({"form-control":!l0,"form-control-lg":i0==="lg","form-control-sm":i0==="sm","textarea-height-lg":r0==="lg","textarea-height-md":r0==="md","textarea-height-sm":r0==="sm","is-invalid":u0==="invalid","is-valid":u0==="valid","form-control-plaintext":l0,"no-validation-icon":e0},t0),d0=b0=>{var p0;c0(b0.target.value.length),(p0=s0.onChange)==null||p0.call(s0,b0)};return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("textarea",{ref:o0,id:a0,className:k0,placeholder:_e,required:f0,readOnly:l0,...s0,onChange:d0}),n0&&!u0&&jsxRuntimeExports.jsx(Textcounter,{currentLength:A0,maxLength:s0.maxLength??0})]})}),Embed=({onSuccess:e0})=>{let{t:_e}=useTranslation(),[i0,r0]=reactExports.useState();function t0(n0){let s0=n0.target.value;r0(s0),s0!=null&&s0.length?e0(s0):e0()}return jsxRuntimeExports.jsxs("div",{className:"d-flex flex-column flex-fill",children:[jsxRuntimeExports.jsx("div",{className:"mb-32",children:_e("bbm.embed.description")}),jsxRuntimeExports.jsxs("div",{className:"mb-8 d-flex",children:[jsxRuntimeExports.jsx(SvgIconCode,{className:"me-8"}),_e("bbm.embed.title")]}),jsxRuntimeExports.jsx(FormControl,{id:"iframeContent",children:jsxRuntimeExports.jsx(TextArea,{size:"md",height:"sm",placeholder:_e("bbm.embed.placeholder"),onChange:t0})}),!!(i0!=null&&i0.length)&&jsxRuntimeExports.jsx("div",{className:"embed-preview mt-12",dangerouslySetInnerHTML:{__html:i0}}),!(i0!=null&&i0.length)&&jsxRuntimeExports.jsx("div",{className:"embed-preview mt-12 d-flex align-items-center justify-content-center bg-gray-300 text-black-50 rounded-3",children:jsxRuntimeExports.jsx("strong",{children:_e("bbm.embed.preview")})})]})},BLUR_LAYER_NAME="BLUR_LAYER",ExtensionType=(e0=>(e0.Application="application",e0.WebGLPipes="webgl-pipes",e0.WebGLPipesAdaptor="webgl-pipes-adaptor",e0.WebGLSystem="webgl-system",e0.WebGPUPipes="webgpu-pipes",e0.WebGPUPipesAdaptor="webgpu-pipes-adaptor",e0.WebGPUSystem="webgpu-system",e0.CanvasSystem="canvas-system",e0.CanvasPipesAdaptor="canvas-pipes-adaptor",e0.CanvasPipes="canvas-pipes",e0.Asset="asset",e0.LoadParser="load-parser",e0.ResolveParser="resolve-parser",e0.CacheParser="cache-parser",e0.DetectionParser="detection-parser",e0.MaskEffect="mask-effect",e0.BlendMode="blend-mode",e0.TextureSource="texture-source",e0.Environment="environment",e0.ShapeBuilder="shape-builder",e0.Batcher="batcher",e0))(ExtensionType||{});const normalizeExtension=e0=>{if(typeof e0=="function"||typeof e0=="object"&&e0.extension){if(!e0.extension)throw new Error("Extension class must have an extension object");e0={...typeof e0.extension!="object"?{type:e0.extension}:e0.extension,ref:e0}}if(typeof e0=="object")e0={...e0};else throw new Error("Invalid extension type");return typeof e0.type=="string"&&(e0.type=[e0.type]),e0},normalizeExtensionPriority=(e0,_e)=>normalizeExtension(e0).priority??_e,extensions={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...e0){return e0.map(normalizeExtension).forEach(_e=>{_e.type.forEach(i0=>{var r0,t0;return(t0=(r0=this._removeHandlers)[i0])==null?void 0:t0.call(r0,_e)})}),this},add(...e0){return e0.map(normalizeExtension).forEach(_e=>{_e.type.forEach(i0=>{var n0,s0;const r0=this._addHandlers,t0=this._queue;r0[i0]?(s0=r0[i0])==null||s0.call(r0,_e):(t0[i0]=t0[i0]||[],(n0=t0[i0])==null||n0.push(_e))})}),this},handle(e0,_e,i0){var s0;const r0=this._addHandlers,t0=this._removeHandlers;if(r0[e0]||t0[e0])throw new Error(`Extension type ${e0} already has a handler`);r0[e0]=_e,t0[e0]=i0;const n0=this._queue;return n0[e0]&&((s0=n0[e0])==null||s0.forEach(o0=>_e(o0)),delete n0[e0]),this},handleByMap(e0,_e){return this.handle(e0,i0=>{i0.name&&(_e[i0.name]=i0.ref)},i0=>{i0.name&&delete _e[i0.name]})},handleByNamedList(e0,_e,i0=-1){return this.handle(e0,r0=>{_e.findIndex(n0=>n0.name===r0.name)>=0||(_e.push({name:r0.name,value:r0.ref}),_e.sort((n0,s0)=>normalizeExtensionPriority(s0.value,i0)-normalizeExtensionPriority(n0.value,i0)))},r0=>{const t0=_e.findIndex(n0=>n0.name===r0.name);t0!==-1&&_e.splice(t0,1)})},handleByList(e0,_e,i0=-1){return this.handle(e0,r0=>{_e.includes(r0.ref)||(_e.push(r0.ref),_e.sort((t0,n0)=>normalizeExtensionPriority(n0,i0)-normalizeExtensionPriority(t0,i0)))},r0=>{const t0=_e.indexOf(r0.ref);t0!==-1&&_e.splice(t0,1)})},mixin(e0,..._e){for(const i0 of _e)Object.defineProperties(e0.prototype,Object.getOwnPropertyDescriptors(i0))}},browserExt={extension:{type:ExtensionType.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await __vitePreload(()=>Promise.resolve().then(()=>browserAll),void 0)}},webworkerExt={extension:{type:ExtensionType.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await __vitePreload(()=>Promise.resolve().then(()=>webworkerAll),void 0)}};class ObservablePoint{constructor(_e,i0,r0){this._x=i0||0,this._y=r0||0,this._observer=_e}clone(_e){return new ObservablePoint(_e??this._observer,this._x,this._y)}set(_e=0,i0=_e){return(this._x!==_e||this._y!==i0)&&(this._x=_e,this._y=i0,this._observer._onUpdate(this)),this}copyFrom(_e){return(this._x!==_e.x||this._y!==_e.y)&&(this._x=_e.x,this._y=_e.y,this._observer._onUpdate(this)),this}copyTo(_e){return _e.set(this._x,this._y),_e}equals(_e){return _e.x===this._x&&_e.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(_e){this._x!==_e&&(this._x=_e,this._observer._onUpdate(this))}get y(){return this._y}set y(_e){this._y!==_e&&(this._y=_e,this._observer._onUpdate(this))}}var eventemitter3={exports:{}};(function(e0){var _e=Object.prototype.hasOwnProperty,i0="~";function r0(){}Object.create&&(r0.prototype=Object.create(null),new r0().__proto__||(i0=!1));function t0(a0,f0,l0){this.fn=a0,this.context=f0,this.once=l0||!1}function n0(a0,f0,l0,u0,A0){if(typeof l0!="function")throw new TypeError("The listener must be a function");var c0=new t0(l0,u0||a0,A0),k0=i0?i0+f0:f0;return a0._events[k0]?a0._events[k0].fn?a0._events[k0]=[a0._events[k0],c0]:a0._events[k0].push(c0):(a0._events[k0]=c0,a0._eventsCount++),a0}function s0(a0,f0){--a0._eventsCount===0?a0._events=new r0:delete a0._events[f0]}function o0(){this._events=new r0,this._eventsCount=0}o0.prototype.eventNames=function(){var f0=[],l0,u0;if(this._eventsCount===0)return f0;for(u0 in l0=this._events)_e.call(l0,u0)&&f0.push(i0?u0.slice(1):u0);return Object.getOwnPropertySymbols?f0.concat(Object.getOwnPropertySymbols(l0)):f0},o0.prototype.listeners=function(f0){var l0=i0?i0+f0:f0,u0=this._events[l0];if(!u0)return[];if(u0.fn)return[u0.fn];for(var A0=0,c0=u0.length,k0=new Array(c0);A0<c0;A0++)k0[A0]=u0[A0].fn;return k0},o0.prototype.listenerCount=function(f0){var l0=i0?i0+f0:f0,u0=this._events[l0];return u0?u0.fn?1:u0.length:0},o0.prototype.emit=function(f0,l0,u0,A0,c0,k0){var d0=i0?i0+f0:f0;if(!this._events[d0])return!1;var h0=this._events[d0],b0=arguments.length,p0,m0;if(h0.fn){switch(h0.once&&this.removeListener(f0,h0.fn,void 0,!0),b0){case 1:return h0.fn.call(h0.context),!0;case 2:return h0.fn.call(h0.context,l0),!0;case 3:return h0.fn.call(h0.context,l0,u0),!0;case 4:return h0.fn.call(h0.context,l0,u0,A0),!0;case 5:return h0.fn.call(h0.context,l0,u0,A0,c0),!0;case 6:return h0.fn.call(h0.context,l0,u0,A0,c0,k0),!0}for(m0=1,p0=new Array(b0-1);m0<b0;m0++)p0[m0-1]=arguments[m0];h0.fn.apply(h0.context,p0)}else{var g0=h0.length,v0;for(m0=0;m0<g0;m0++)switch(h0[m0].once&&this.removeListener(f0,h0[m0].fn,void 0,!0),b0){case 1:h0[m0].fn.call(h0[m0].context);break;case 2:h0[m0].fn.call(h0[m0].context,l0);break;case 3:h0[m0].fn.call(h0[m0].context,l0,u0);break;case 4:h0[m0].fn.call(h0[m0].context,l0,u0,A0);break;default:if(!p0)for(v0=1,p0=new Array(b0-1);v0<b0;v0++)p0[v0-1]=arguments[v0];h0[m0].fn.apply(h0[m0].context,p0)}}return!0},o0.prototype.on=function(f0,l0,u0){return n0(this,f0,l0,u0,!1)},o0.prototype.once=function(f0,l0,u0){return n0(this,f0,l0,u0,!0)},o0.prototype.removeListener=function(f0,l0,u0,A0){var c0=i0?i0+f0:f0;if(!this._events[c0])return this;if(!l0)return s0(this,c0),this;var k0=this._events[c0];if(k0.fn)k0.fn===l0&&(!A0||k0.once)&&(!u0||k0.context===u0)&&s0(this,c0);else{for(var d0=0,h0=[],b0=k0.length;d0<b0;d0++)(k0[d0].fn!==l0||A0&&!k0[d0].once||u0&&k0[d0].context!==u0)&&h0.push(k0[d0]);h0.length?this._events[c0]=h0.length===1?h0[0]:h0:s0(this,c0)}return this},o0.prototype.removeAllListeners=function(f0){var l0;return f0?(l0=i0?i0+f0:f0,this._events[l0]&&s0(this,l0)):(this._events=new r0,this._eventsCount=0),this},o0.prototype.off=o0.prototype.removeListener,o0.prototype.addListener=o0.prototype.on,o0.prefixed=i0,o0.EventEmitter=o0,e0.exports=o0})(eventemitter3);var eventemitter3Exports=eventemitter3.exports;const EventEmitter=getDefaultExportFromCjs(eventemitter3Exports),PI_2=Math.PI*2,RAD_TO_DEG=180/Math.PI,DEG_TO_RAD=Math.PI/180;class Point{constructor(_e=0,i0=0){this.x=0,this.y=0,this.x=_e,this.y=i0}clone(){return new Point(this.x,this.y)}copyFrom(_e){return this.set(_e.x,_e.y),this}copyTo(_e){return _e.set(this.x,this.y),_e}equals(_e){return _e.x===this.x&&_e.y===this.y}set(_e=0,i0=_e){return this.x=_e,this.y=i0,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return tempPoint.x=0,tempPoint.y=0,tempPoint}}const tempPoint=new Point;class Matrix{constructor(_e=1,i0=0,r0=0,t0=1,n0=0,s0=0){this.array=null,this.a=_e,this.b=i0,this.c=r0,this.d=t0,this.tx=n0,this.ty=s0}fromArray(_e){this.a=_e[0],this.b=_e[1],this.c=_e[3],this.d=_e[4],this.tx=_e[2],this.ty=_e[5]}set(_e,i0,r0,t0,n0,s0){return this.a=_e,this.b=i0,this.c=r0,this.d=t0,this.tx=n0,this.ty=s0,this}toArray(_e,i0){this.array||(this.array=new Float32Array(9));const r0=i0||this.array;return _e?(r0[0]=this.a,r0[1]=this.b,r0[2]=0,r0[3]=this.c,r0[4]=this.d,r0[5]=0,r0[6]=this.tx,r0[7]=this.ty,r0[8]=1):(r0[0]=this.a,r0[1]=this.c,r0[2]=this.tx,r0[3]=this.b,r0[4]=this.d,r0[5]=this.ty,r0[6]=0,r0[7]=0,r0[8]=1),r0}apply(_e,i0){i0=i0||new Point;const r0=_e.x,t0=_e.y;return i0.x=this.a*r0+this.c*t0+this.tx,i0.y=this.b*r0+this.d*t0+this.ty,i0}applyInverse(_e,i0){i0=i0||new Point;const r0=this.a,t0=this.b,n0=this.c,s0=this.d,o0=this.tx,a0=this.ty,f0=1/(r0*s0+n0*-t0),l0=_e.x,u0=_e.y;return i0.x=s0*f0*l0+-n0*f0*u0+(a0*n0-o0*s0)*f0,i0.y=r0*f0*u0+-t0*f0*l0+(-a0*r0+o0*t0)*f0,i0}translate(_e,i0){return this.tx+=_e,this.ty+=i0,this}scale(_e,i0){return this.a*=_e,this.d*=i0,this.c*=_e,this.b*=i0,this.tx*=_e,this.ty*=i0,this}rotate(_e){const i0=Math.cos(_e),r0=Math.sin(_e),t0=this.a,n0=this.c,s0=this.tx;return this.a=t0*i0-this.b*r0,this.b=t0*r0+this.b*i0,this.c=n0*i0-this.d*r0,this.d=n0*r0+this.d*i0,this.tx=s0*i0-this.ty*r0,this.ty=s0*r0+this.ty*i0,this}append(_e){const i0=this.a,r0=this.b,t0=this.c,n0=this.d;return this.a=_e.a*i0+_e.b*t0,this.b=_e.a*r0+_e.b*n0,this.c=_e.c*i0+_e.d*t0,this.d=_e.c*r0+_e.d*n0,this.tx=_e.tx*i0+_e.ty*t0+this.tx,this.ty=_e.tx*r0+_e.ty*n0+this.ty,this}appendFrom(_e,i0){const r0=_e.a,t0=_e.b,n0=_e.c,s0=_e.d,o0=_e.tx,a0=_e.ty,f0=i0.a,l0=i0.b,u0=i0.c,A0=i0.d;return this.a=r0*f0+t0*u0,this.b=r0*l0+t0*A0,this.c=n0*f0+s0*u0,this.d=n0*l0+s0*A0,this.tx=o0*f0+a0*u0+i0.tx,this.ty=o0*l0+a0*A0+i0.ty,this}setTransform(_e,i0,r0,t0,n0,s0,o0,a0,f0){return this.a=Math.cos(o0+f0)*n0,this.b=Math.sin(o0+f0)*n0,this.c=-Math.sin(o0-a0)*s0,this.d=Math.cos(o0-a0)*s0,this.tx=_e-(r0*this.a+t0*this.c),this.ty=i0-(r0*this.b+t0*this.d),this}prepend(_e){const i0=this.tx;if(_e.a!==1||_e.b!==0||_e.c!==0||_e.d!==1){const r0=this.a,t0=this.c;this.a=r0*_e.a+this.b*_e.c,this.b=r0*_e.b+this.b*_e.d,this.c=t0*_e.a+this.d*_e.c,this.d=t0*_e.b+this.d*_e.d}return this.tx=i0*_e.a+this.ty*_e.c+_e.tx,this.ty=i0*_e.b+this.ty*_e.d+_e.ty,this}decompose(_e){const i0=this.a,r0=this.b,t0=this.c,n0=this.d,s0=_e.pivot,o0=-Math.atan2(-t0,n0),a0=Math.atan2(r0,i0),f0=Math.abs(o0+a0);return f0<1e-5||Math.abs(PI_2-f0)<1e-5?(_e.rotation=a0,_e.skew.x=_e.skew.y=0):(_e.rotation=0,_e.skew.x=o0,_e.skew.y=a0),_e.scale.x=Math.sqrt(i0*i0+r0*r0),_e.scale.y=Math.sqrt(t0*t0+n0*n0),_e.position.x=this.tx+(s0.x*i0+s0.y*t0),_e.position.y=this.ty+(s0.x*r0+s0.y*n0),_e}invert(){const _e=this.a,i0=this.b,r0=this.c,t0=this.d,n0=this.tx,s0=_e*t0-i0*r0;return this.a=t0/s0,this.b=-i0/s0,this.c=-r0/s0,this.d=_e/s0,this.tx=(r0*this.ty-t0*n0)/s0,this.ty=-(_e*this.ty-i0*n0)/s0,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const _e=new Matrix;return _e.a=this.a,_e.b=this.b,_e.c=this.c,_e.d=this.d,_e.tx=this.tx,_e.ty=this.ty,_e}copyTo(_e){return _e.a=this.a,_e.b=this.b,_e.c=this.c,_e.d=this.d,_e.tx=this.tx,_e.ty=this.ty,_e}copyFrom(_e){return this.a=_e.a,this.b=_e.b,this.c=_e.c,this.d=_e.d,this.tx=_e.tx,this.ty=_e.ty,this}equals(_e){return _e.a===this.a&&_e.b===this.b&&_e.c===this.c&&_e.d===this.d&&_e.tx===this.tx&&_e.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return identityMatrix$1.identity()}static get shared(){return tempMatrix$5.identity()}}const tempMatrix$5=new Matrix,identityMatrix$1=new Matrix,ux=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],uy=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],vx=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],vy=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],rotationCayley=[],rotationMatrices=[],signum=Math.sign;function init(){for(let e0=0;e0<16;e0++){const _e=[];rotationCayley.push(_e);for(let i0=0;i0<16;i0++){const r0=signum(ux[e0]*ux[i0]+vx[e0]*uy[i0]),t0=signum(uy[e0]*ux[i0]+vy[e0]*uy[i0]),n0=signum(ux[e0]*vx[i0]+vx[e0]*vy[i0]),s0=signum(uy[e0]*vx[i0]+vy[e0]*vy[i0]);for(let o0=0;o0<16;o0++)if(ux[o0]===r0&&uy[o0]===t0&&vx[o0]===n0&&vy[o0]===s0){_e.push(o0);break}}}for(let e0=0;e0<16;e0++){const _e=new Matrix;_e.set(ux[e0],uy[e0],vx[e0],vy[e0],0,0),rotationMatrices.push(_e)}}init();const groupD8={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:e0=>ux[e0],uY:e0=>uy[e0],vX:e0=>vx[e0],vY:e0=>vy[e0],inv:e0=>e0&8?e0&15:-e0&7,add:(e0,_e)=>rotationCayley[e0][_e],sub:(e0,_e)=>rotationCayley[e0][groupD8.inv(_e)],rotate180:e0=>e0^4,isVertical:e0=>(e0&3)===2,byDirection:(e0,_e)=>Math.abs(e0)*2<=Math.abs(_e)?_e>=0?groupD8.S:groupD8.N:Math.abs(_e)*2<=Math.abs(e0)?e0>0?groupD8.E:groupD8.W:_e>0?e0>0?groupD8.SE:groupD8.SW:e0>0?groupD8.NE:groupD8.NW,matrixAppendRotationInv:(e0,_e,i0=0,r0=0)=>{const t0=rotationMatrices[groupD8.inv(_e)];t0.tx=i0,t0.ty=r0,e0.append(t0)},transformRectCoords:(e0,_e,i0,r0)=>{const{x:t0,y:n0,width:s0,height:o0}=e0,{x:a0,y:f0,width:l0,height:u0}=_e;return i0===groupD8.E?(r0.set(t0+a0,n0+f0,s0,o0),r0):i0===groupD8.S?r0.set(l0-n0-o0+a0,t0+f0,o0,s0):i0===groupD8.W?r0.set(l0-t0-s0+a0,u0-n0-o0+f0,s0,o0):i0===groupD8.N?r0.set(n0+a0,u0-t0-s0+f0,o0,s0):r0.set(t0+a0,n0+f0,s0,o0)}},tempPoints=[new Point,new Point,new Point,new Point];class Rectangle{constructor(_e=0,i0=0,r0=0,t0=0){this.type="rectangle",this.x=Number(_e),this.y=Number(i0),this.width=Number(r0),this.height=Number(t0)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new Rectangle(0,0,0,0)}clone(){return new Rectangle(this.x,this.y,this.width,this.height)}copyFromBounds(_e){return this.x=_e.minX,this.y=_e.minY,this.width=_e.maxX-_e.minX,this.height=_e.maxY-_e.minY,this}copyFrom(_e){return this.x=_e.x,this.y=_e.y,this.width=_e.width,this.height=_e.height,this}copyTo(_e){return _e.copyFrom(this),_e}contains(_e,i0){return this.width<=0||this.height<=0?!1:_e>=this.x&&_e<this.x+this.width&&i0>=this.y&&i0<this.y+this.height}strokeContains(_e,i0,r0,t0=.5){const{width:n0,height:s0}=this;if(n0<=0||s0<=0)return!1;const o0=this.x,a0=this.y,f0=r0*(1-t0),l0=r0-f0,u0=o0-f0,A0=o0+n0+f0,c0=a0-f0,k0=a0+s0+f0,d0=o0+l0,h0=o0+n0-l0,b0=a0+l0,p0=a0+s0-l0;return _e>=u0&&_e<=A0&&i0>=c0&&i0<=k0&&!(_e>d0&&_e<h0&&i0>b0&&i0<p0)}intersects(_e,i0){if(!i0){const _0=this.x<_e.x?_e.x:this.x;if((this.right>_e.right?_e.right:this.right)<=_0)return!1;const S0=this.y<_e.y?_e.y:this.y;return(this.bottom>_e.bottom?_e.bottom:this.bottom)>S0}const r0=this.left,t0=this.right,n0=this.top,s0=this.bottom;if(t0<=r0||s0<=n0)return!1;const o0=tempPoints[0].set(_e.left,_e.top),a0=tempPoints[1].set(_e.left,_e.bottom),f0=tempPoints[2].set(_e.right,_e.top),l0=tempPoints[3].set(_e.right,_e.bottom);if(f0.x<=o0.x||a0.y<=o0.y)return!1;const u0=Math.sign(i0.a*i0.d-i0.b*i0.c);if(u0===0||(i0.apply(o0,o0),i0.apply(a0,a0),i0.apply(f0,f0),i0.apply(l0,l0),Math.max(o0.x,a0.x,f0.x,l0.x)<=r0||Math.min(o0.x,a0.x,f0.x,l0.x)>=t0||Math.max(o0.y,a0.y,f0.y,l0.y)<=n0||Math.min(o0.y,a0.y,f0.y,l0.y)>=s0))return!1;const A0=u0*(a0.y-o0.y),c0=u0*(o0.x-a0.x),k0=A0*r0+c0*n0,d0=A0*t0+c0*n0,h0=A0*r0+c0*s0,b0=A0*t0+c0*s0;if(Math.max(k0,d0,h0,b0)<=A0*o0.x+c0*o0.y||Math.min(k0,d0,h0,b0)>=A0*l0.x+c0*l0.y)return!1;const p0=u0*(o0.y-f0.y),m0=u0*(f0.x-o0.x),g0=p0*r0+m0*n0,v0=p0*t0+m0*n0,w0=p0*r0+m0*s0,x0=p0*t0+m0*s0;return!(Math.max(g0,v0,w0,x0)<=p0*o0.x+m0*o0.y||Math.min(g0,v0,w0,x0)>=p0*l0.x+m0*l0.y)}pad(_e=0,i0=_e){return this.x-=_e,this.y-=i0,this.width+=_e*2,this.height+=i0*2,this}fit(_e){const i0=Math.max(this.x,_e.x),r0=Math.min(this.x+this.width,_e.x+_e.width),t0=Math.max(this.y,_e.y),n0=Math.min(this.y+this.height,_e.y+_e.height);return this.x=i0,this.width=Math.max(r0-i0,0),this.y=t0,this.height=Math.max(n0-t0,0),this}ceil(_e=1,i0=.001){const r0=Math.ceil((this.x+this.width-i0)*_e)/_e,t0=Math.ceil((this.y+this.height-i0)*_e)/_e;return this.x=Math.floor((this.x+i0)*_e)/_e,this.y=Math.floor((this.y+i0)*_e)/_e,this.width=r0-this.x,this.height=t0-this.y,this}scale(_e,i0=_e){return this.x*=_e,this.y*=i0,this.width*=_e,this.height*=i0,this}enlarge(_e){const i0=Math.min(this.x,_e.x),r0=Math.max(this.x+this.width,_e.x+_e.width),t0=Math.min(this.y,_e.y),n0=Math.max(this.y+this.height,_e.y+_e.height);return this.x=i0,this.width=r0-i0,this.y=t0,this.height=n0-t0,this}getBounds(_e){return _e||(_e=new Rectangle),_e.copyFrom(this),_e}containsRect(_e){if(this.width<=0||this.height<=0)return!1;const i0=_e.x,r0=_e.y,t0=_e.x+_e.width,n0=_e.y+_e.height;return i0>=this.x&&i0<this.x+this.width&&r0>=this.y&&r0<this.y+this.height&&t0>=this.x&&t0<this.x+this.width&&n0>=this.y&&n0<this.y+this.height}set(_e,i0,r0,t0){return this.x=_e,this.y=i0,this.width=r0,this.height=t0,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const uidCache={default:-1};function uid$1(e0="default"){return uidCache[e0]===void 0&&(uidCache[e0]=-1),++uidCache[e0]}const warnings=new Set,v8_0_0="8.0.0",v8_3_4="8.3.4",deprecationState={quiet:!1,noColor:!1},deprecation=(e0,_e,i0=3)=>{if(deprecationState.quiet||warnings.has(_e))return;let r0=new Error().stack;const t0=`${_e}