ode-explorer 2.2.0-develop.202503031128 → 2.2.0-objectstorage.202503111530

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
@@ -46,7 +46,7 @@ Error generating stack: `+ot.message+`
46
46
  `).forEach(function(at){nt=at.indexOf(":"),rt=at.substring(0,nt).trim().toLowerCase(),st=at.substring(nt+1).trim(),!(!rt||et[rt]&&ignoreDuplicateOf[rt])&&(rt==="set-cookie"?et[rt]?et[rt].push(st):et[rt]=[st]:et[rt]=et[rt]?et[rt]+", "+st:st)}),et},$internals=Symbol("internals");function normalizeHeader(tt){return tt&&String(tt).trim().toLowerCase()}function normalizeValue(tt){return tt===!1||tt==null?tt:utils$4.isArray(tt)?tt.map(normalizeValue):String(tt)}function parseTokens(tt){const et=Object.create(null),rt=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let st;for(;st=rt.exec(tt);)et[st[1]]=st[2];return et}const isValidHeaderName=tt=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(tt.trim());function matchHeaderValue(tt,et,rt,st,nt){if(utils$4.isFunction(st))return st.call(this,et,rt);if(nt&&(et=rt),!!utils$4.isString(et)){if(utils$4.isString(st))return et.indexOf(st)!==-1;if(utils$4.isRegExp(st))return st.test(et)}}function formatHeader(tt){return tt.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(et,rt,st)=>rt.toUpperCase()+st)}function buildAccessors(tt,et){const rt=utils$4.toCamelCase(" "+et);["get","set","has"].forEach(st=>{Object.defineProperty(tt,st+rt,{value:function(nt,ot,at){return this[st].call(this,et,nt,ot,at)},configurable:!0})})}let AxiosHeaders$1=class{constructor(et){et&&this.set(et)}set(et,rt,st){const nt=this;function ot(lt,ut,ct){const dt=normalizeHeader(ut);if(!dt)throw new Error("header name must be a non-empty string");const ht=utils$4.findKey(nt,dt);(!ht||nt[ht]===void 0||ct===!0||ct===void 0&&nt[ht]!==!1)&&(nt[ht||ut]=normalizeValue(lt))}const at=(lt,ut)=>utils$4.forEach(lt,(ct,dt)=>ot(ct,dt,ut));if(utils$4.isPlainObject(et)||et instanceof this.constructor)at(et,rt);else if(utils$4.isString(et)&&(et=et.trim())&&!isValidHeaderName(et))at(parseHeaders(et),rt);else if(utils$4.isHeaders(et))for(const[lt,ut]of et.entries())ot(ut,lt,st);else et!=null&&ot(rt,et,st);return this}get(et,rt){if(et=normalizeHeader(et),et){const st=utils$4.findKey(this,et);if(st){const nt=this[st];if(!rt)return nt;if(rt===!0)return parseTokens(nt);if(utils$4.isFunction(rt))return rt.call(this,nt,st);if(utils$4.isRegExp(rt))return rt.exec(nt);throw new TypeError("parser must be boolean|regexp|function")}}}has(et,rt){if(et=normalizeHeader(et),et){const st=utils$4.findKey(this,et);return!!(st&&this[st]!==void 0&&(!rt||matchHeaderValue(this,this[st],st,rt)))}return!1}delete(et,rt){const st=this;let nt=!1;function ot(at){if(at=normalizeHeader(at),at){const lt=utils$4.findKey(st,at);lt&&(!rt||matchHeaderValue(st,st[lt],lt,rt))&&(delete st[lt],nt=!0)}}return utils$4.isArray(et)?et.forEach(ot):ot(et),nt}clear(et){const rt=Object.keys(this);let st=rt.length,nt=!1;for(;st--;){const ot=rt[st];(!et||matchHeaderValue(this,this[ot],ot,et,!0))&&(delete this[ot],nt=!0)}return nt}normalize(et){const rt=this,st={};return utils$4.forEach(this,(nt,ot)=>{const at=utils$4.findKey(st,ot);if(at){rt[at]=normalizeValue(nt),delete rt[ot];return}const lt=et?formatHeader(ot):String(ot).trim();lt!==ot&&delete rt[ot],rt[lt]=normalizeValue(nt),st[lt]=!0}),this}concat(...et){return this.constructor.concat(this,...et)}toJSON(et){const rt=Object.create(null);return utils$4.forEach(this,(st,nt)=>{st!=null&&st!==!1&&(rt[nt]=et&&utils$4.isArray(st)?st.join(", "):st)}),rt}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([et,rt])=>et+": "+rt).join(`
47
47
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(et){return et instanceof this?et:new this(et)}static concat(et,...rt){const st=new this(et);return rt.forEach(nt=>st.set(nt)),st}static accessor(et){const st=(this[$internals]=this[$internals]={accessors:{}}).accessors,nt=this.prototype;function ot(at){const lt=normalizeHeader(at);st[lt]||(buildAccessors(nt,at),st[lt]=!0)}return utils$4.isArray(et)?et.forEach(ot):ot(et),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$4.reduceDescriptors(AxiosHeaders$1.prototype,({value:tt},et)=>{let rt=et[0].toUpperCase()+et.slice(1);return{get:()=>tt,set(st){this[rt]=st}}});utils$4.freezeMethods(AxiosHeaders$1);function transformData(tt,et){const rt=this||defaults$4,st=et||rt,nt=AxiosHeaders$1.from(st.headers);let ot=st.data;return utils$4.forEach(tt,function(lt){ot=lt.call(rt,ot,nt.normalize(),et?et.status:void 0)}),nt.normalize(),ot}function isCancel$1(tt){return!!(tt&&tt.__CANCEL__)}function CanceledError$1(tt,et,rt){AxiosError$1.call(this,tt??"canceled",AxiosError$1.ERR_CANCELED,et,rt),this.name="CanceledError"}utils$4.inherits(CanceledError$1,AxiosError$1,{__CANCEL__:!0});function settle(tt,et,rt){const st=rt.config.validateStatus;!rt.status||!st||st(rt.status)?tt(rt):et(new AxiosError$1("Request failed with status code "+rt.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(rt.status/100)-4],rt.config,rt.request,rt))}function parseProtocol(tt){const et=/^([-+\w]{1,25})(:?\/\/|:)/.exec(tt);return et&&et[1]||""}function speedometer(tt,et){tt=tt||10;const rt=new Array(tt),st=new Array(tt);let nt=0,ot=0,at;return et=et!==void 0?et:1e3,function(ut){const ct=Date.now(),dt=st[ot];at||(at=ct),rt[nt]=ut,st[nt]=ct;let ht=ot,ft=0;for(;ht!==nt;)ft+=rt[ht++],ht=ht%tt;if(nt=(nt+1)%tt,nt===ot&&(ot=(ot+1)%tt),ct-at<et)return;const xt=dt&&ct-dt;return xt?Math.round(ft*1e3/xt):void 0}}function throttle(tt,et){let rt=0,st=1e3/et,nt,ot;const at=(ct,dt=Date.now())=>{rt=dt,nt=null,ot&&(clearTimeout(ot),ot=null),tt.apply(null,ct)};return[(...ct)=>{const dt=Date.now(),ht=dt-rt;ht>=st?at(ct,dt):(nt=ct,ot||(ot=setTimeout(()=>{ot=null,at(nt)},st-ht)))},()=>nt&&at(nt)]}const progressEventReducer=(tt,et,rt=3)=>{let st=0;const nt=speedometer(50,250);return throttle(ot=>{const at=ot.loaded,lt=ot.lengthComputable?ot.total:void 0,ut=at-st,ct=nt(ut),dt=at<=lt;st=at;const ht={loaded:at,total:lt,progress:lt?at/lt:void 0,bytes:ut,rate:ct||void 0,estimated:ct&&lt&&dt?(lt-at)/ct:void 0,event:ot,lengthComputable:lt!=null,[et?"download":"upload"]:!0};tt(ht)},rt)},progressEventDecorator=(tt,et)=>{const rt=tt!=null;return[st=>et[0]({lengthComputable:rt,total:tt,loaded:st}),et[1]]},asyncDecorator=tt=>(...et)=>utils$4.asap(()=>tt(...et)),isURLSameOrigin=platform.hasStandardBrowserEnv?((tt,et)=>rt=>(rt=new URL(rt,platform.origin),tt.protocol===rt.protocol&&tt.host===rt.host&&(et||tt.port===rt.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(tt,et,rt,st,nt,ot){const at=[tt+"="+encodeURIComponent(et)];utils$4.isNumber(rt)&&at.push("expires="+new Date(rt).toGMTString()),utils$4.isString(st)&&at.push("path="+st),utils$4.isString(nt)&&at.push("domain="+nt),ot===!0&&at.push("secure"),document.cookie=at.join("; ")},read(tt){const et=document.cookie.match(new RegExp("(^|;\\s*)("+tt+")=([^;]*)"));return et?decodeURIComponent(et[3]):null},remove(tt){this.write(tt,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(tt){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(tt)}function combineURLs(tt,et){return et?tt.replace(/\/?\/$/,"")+"/"+et.replace(/^\/+/,""):tt}function buildFullPath(tt,et,rt){let st=!isAbsoluteURL(et);return tt&&st||rt==!1?combineURLs(tt,et):et}const headersToObject=tt=>tt instanceof AxiosHeaders$1?{...tt}:tt;function mergeConfig$1(tt,et){et=et||{};const rt={};function st(ct,dt,ht,ft){return utils$4.isPlainObject(ct)&&utils$4.isPlainObject(dt)?utils$4.merge.call({caseless:ft},ct,dt):utils$4.isPlainObject(dt)?utils$4.merge({},dt):utils$4.isArray(dt)?dt.slice():dt}function nt(ct,dt,ht,ft){if(utils$4.isUndefined(dt)){if(!utils$4.isUndefined(ct))return st(void 0,ct,ht,ft)}else return st(ct,dt,ht,ft)}function ot(ct,dt){if(!utils$4.isUndefined(dt))return st(void 0,dt)}function at(ct,dt){if(utils$4.isUndefined(dt)){if(!utils$4.isUndefined(ct))return st(void 0,ct)}else return st(void 0,dt)}function lt(ct,dt,ht){if(ht in et)return st(ct,dt);if(ht in tt)return st(void 0,ct)}const ut={url:ot,method:ot,data:ot,baseURL:at,transformRequest:at,transformResponse:at,paramsSerializer:at,timeout:at,timeoutMessage:at,withCredentials:at,withXSRFToken:at,adapter:at,responseType:at,xsrfCookieName:at,xsrfHeaderName:at,onUploadProgress:at,onDownloadProgress:at,decompress:at,maxContentLength:at,maxBodyLength:at,beforeRedirect:at,transport:at,httpAgent:at,httpsAgent:at,cancelToken:at,socketPath:at,responseEncoding:at,validateStatus:lt,headers:(ct,dt,ht)=>nt(headersToObject(ct),headersToObject(dt),ht,!0)};return utils$4.forEach(Object.keys(Object.assign({},tt,et)),function(dt){const ht=ut[dt]||nt,ft=ht(tt[dt],et[dt],dt);utils$4.isUndefined(ft)&&ht!==lt||(rt[dt]=ft)}),rt}const resolveConfig=tt=>{const et=mergeConfig$1({},tt);let{data:rt,withXSRFToken:st,xsrfHeaderName:nt,xsrfCookieName:ot,headers:at,auth:lt}=et;et.headers=at=AxiosHeaders$1.from(at),et.url=buildURL(buildFullPath(et.baseURL,et.url),tt.params,tt.paramsSerializer),lt&&at.set("Authorization","Basic "+btoa((lt.username||"")+":"+(lt.password?unescape(encodeURIComponent(lt.password)):"")));let ut;if(utils$4.isFormData(rt)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)at.setContentType(void 0);else if((ut=at.getContentType())!==!1){const[ct,...dt]=ut?ut.split(";").map(ht=>ht.trim()).filter(Boolean):[];at.setContentType([ct||"multipart/form-data",...dt].join("; "))}}if(platform.hasStandardBrowserEnv&&(st&&utils$4.isFunction(st)&&(st=st(et)),st||st!==!1&&isURLSameOrigin(et.url))){const ct=nt&&ot&&cookies.read(ot);ct&&at.set(nt,ct)}return et},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(tt){return new Promise(function(rt,st){const nt=resolveConfig(tt);let ot=nt.data;const at=AxiosHeaders$1.from(nt.headers).normalize();let{responseType:lt,onUploadProgress:ut,onDownloadProgress:ct}=nt,dt,ht,ft,xt,yt;function vt(){xt&&xt(),yt&&yt(),nt.cancelToken&&nt.cancelToken.unsubscribe(dt),nt.signal&&nt.signal.removeEventListener("abort",dt)}let Et=new XMLHttpRequest;Et.open(nt.method.toUpperCase(),nt.url,!0),Et.timeout=nt.timeout;function bt(){if(!Et)return;const wt=AxiosHeaders$1.from("getAllResponseHeaders"in Et&&Et.getAllResponseHeaders()),Ct={data:!lt||lt==="text"||lt==="json"?Et.responseText:Et.response,status:Et.status,statusText:Et.statusText,headers:wt,config:tt,request:Et};settle(function(It){rt(It),vt()},function(It){st(It),vt()},Ct),Et=null}"onloadend"in Et?Et.onloadend=bt:Et.onreadystatechange=function(){!Et||Et.readyState!==4||Et.status===0&&!(Et.responseURL&&Et.responseURL.indexOf("file:")===0)||setTimeout(bt)},Et.onabort=function(){Et&&(st(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,tt,Et)),Et=null)},Et.onerror=function(){st(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,tt,Et)),Et=null},Et.ontimeout=function(){let Rt=nt.timeout?"timeout of "+nt.timeout+"ms exceeded":"timeout exceeded";const Ct=nt.transitional||transitionalDefaults;nt.timeoutErrorMessage&&(Rt=nt.timeoutErrorMessage),st(new AxiosError$1(Rt,Ct.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,tt,Et)),Et=null},ot===void 0&&at.setContentType(null),"setRequestHeader"in Et&&utils$4.forEach(at.toJSON(),function(Rt,Ct){Et.setRequestHeader(Ct,Rt)}),utils$4.isUndefined(nt.withCredentials)||(Et.withCredentials=!!nt.withCredentials),lt&&lt!=="json"&&(Et.responseType=nt.responseType),ct&&([ft,yt]=progressEventReducer(ct,!0),Et.addEventListener("progress",ft)),ut&&Et.upload&&([ht,xt]=progressEventReducer(ut),Et.upload.addEventListener("progress",ht),Et.upload.addEventListener("loadend",xt)),(nt.cancelToken||nt.signal)&&(dt=wt=>{Et&&(st(!wt||wt.type?new CanceledError$1(null,tt,Et):wt),Et.abort(),Et=null)},nt.cancelToken&&nt.cancelToken.subscribe(dt),nt.signal&&(nt.signal.aborted?dt():nt.signal.addEventListener("abort",dt)));const St=parseProtocol(nt.url);if(St&&platform.protocols.indexOf(St)===-1){st(new AxiosError$1("Unsupported protocol "+St+":",AxiosError$1.ERR_BAD_REQUEST,tt));return}Et.send(ot||null)})},composeSignals=(tt,et)=>{const{length:rt}=tt=tt?tt.filter(Boolean):[];if(et||rt){let st=new AbortController,nt;const ot=function(ct){if(!nt){nt=!0,lt();const dt=ct instanceof Error?ct:this.reason;st.abort(dt instanceof AxiosError$1?dt:new CanceledError$1(dt instanceof Error?dt.message:dt))}};let at=et&&setTimeout(()=>{at=null,ot(new AxiosError$1(`timeout ${et} of ms exceeded`,AxiosError$1.ETIMEDOUT))},et);const lt=()=>{tt&&(at&&clearTimeout(at),at=null,tt.forEach(ct=>{ct.unsubscribe?ct.unsubscribe(ot):ct.removeEventListener("abort",ot)}),tt=null)};tt.forEach(ct=>ct.addEventListener("abort",ot));const{signal:ut}=st;return ut.unsubscribe=()=>utils$4.asap(lt),ut}},streamChunk=function*(tt,et){let rt=tt.byteLength;if(rt<et){yield tt;return}let st=0,nt;for(;st<rt;)nt=st+et,yield tt.slice(st,nt),st=nt},readBytes=async function*(tt,et){for await(const rt of readStream(tt))yield*streamChunk(rt,et)},readStream=async function*(tt){if(tt[Symbol.asyncIterator]){yield*tt;return}const et=tt.getReader();try{for(;;){const{done:rt,value:st}=await et.read();if(rt)break;yield st}}finally{await et.cancel()}},trackStream=(tt,et,rt,st)=>{const nt=readBytes(tt,et);let ot=0,at,lt=ut=>{at||(at=!0,st&&st(ut))};return new ReadableStream({async pull(ut){try{const{done:ct,value:dt}=await nt.next();if(ct){lt(),ut.close();return}let ht=dt.byteLength;if(rt){let ft=ot+=ht;rt(ft)}ut.enqueue(new Uint8Array(dt))}catch(ct){throw lt(ct),ct}},cancel(ut){return lt(ut),nt.return()}},{highWaterMark:2})},isFetchSupported=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",isReadableStreamSupported=isFetchSupported&&typeof ReadableStream=="function",encodeText=isFetchSupported&&(typeof TextEncoder=="function"?(tt=>et=>tt.encode(et))(new TextEncoder):async tt=>new Uint8Array(await new Response(tt).arrayBuffer())),test=(tt,...et)=>{try{return!!tt(...et)}catch{return!1}},supportsRequestStream=isReadableStreamSupported&&test(()=>{let tt=!1;const et=new Request(platform.origin,{body:new ReadableStream,method:"POST",get duplex(){return tt=!0,"half"}}).headers.has("Content-Type");return tt&&!et}),DEFAULT_CHUNK_SIZE=64*1024,supportsResponseStream=isReadableStreamSupported&&test(()=>utils$4.isReadableStream(new Response("").body)),resolvers={stream:supportsResponseStream&&(tt=>tt.body)};isFetchSupported&&(tt=>{["text","arrayBuffer","blob","formData","stream"].forEach(et=>{!resolvers[et]&&(resolvers[et]=utils$4.isFunction(tt[et])?rt=>rt[et]():(rt,st)=>{throw new AxiosError$1(`Response type '${et}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,st)})})})(new Response);const getBodyLength=async tt=>{if(tt==null)return 0;if(utils$4.isBlob(tt))return tt.size;if(utils$4.isSpecCompliantForm(tt))return(await new Request(platform.origin,{method:"POST",body:tt}).arrayBuffer()).byteLength;if(utils$4.isArrayBufferView(tt)||utils$4.isArrayBuffer(tt))return tt.byteLength;if(utils$4.isURLSearchParams(tt)&&(tt=tt+""),utils$4.isString(tt))return(await encodeText(tt)).byteLength},resolveBodyLength=async(tt,et)=>{const rt=utils$4.toFiniteNumber(tt.getContentLength());return rt??getBodyLength(et)},fetchAdapter=isFetchSupported&&(async tt=>{let{url:et,method:rt,data:st,signal:nt,cancelToken:ot,timeout:at,onDownloadProgress:lt,onUploadProgress:ut,responseType:ct,headers:dt,withCredentials:ht="same-origin",fetchOptions:ft}=resolveConfig(tt);ct=ct?(ct+"").toLowerCase():"text";let xt=composeSignals([nt,ot&&ot.toAbortSignal()],at),yt;const vt=xt&&xt.unsubscribe&&(()=>{xt.unsubscribe()});let Et;try{if(ut&&supportsRequestStream&&rt!=="get"&&rt!=="head"&&(Et=await resolveBodyLength(dt,st))!==0){let Ct=new Request(et,{method:"POST",body:st,duplex:"half"}),Pt;if(utils$4.isFormData(st)&&(Pt=Ct.headers.get("content-type"))&&dt.setContentType(Pt),Ct.body){const[It,jt]=progressEventDecorator(Et,progressEventReducer(asyncDecorator(ut)));st=trackStream(Ct.body,DEFAULT_CHUNK_SIZE,It,jt)}}utils$4.isString(ht)||(ht=ht?"include":"omit");const bt="credentials"in Request.prototype;yt=new Request(et,{...ft,signal:xt,method:rt.toUpperCase(),headers:dt.normalize().toJSON(),body:st,duplex:"half",credentials:bt?ht:void 0});let St=await fetch(yt);const wt=supportsResponseStream&&(ct==="stream"||ct==="response");if(supportsResponseStream&&(lt||wt&&vt)){const Ct={};["status","statusText","headers"].forEach(Dt=>{Ct[Dt]=St[Dt]});const Pt=utils$4.toFiniteNumber(St.headers.get("content-length")),[It,jt]=lt&&progressEventDecorator(Pt,progressEventReducer(asyncDecorator(lt),!0))||[];St=new Response(trackStream(St.body,DEFAULT_CHUNK_SIZE,It,()=>{jt&&jt(),vt&&vt()}),Ct)}ct=ct||"text";let Rt=await resolvers[utils$4.findKey(resolvers,ct)||"text"](St,tt);return!wt&&vt&&vt(),await new Promise((Ct,Pt)=>{settle(Ct,Pt,{data:Rt,headers:AxiosHeaders$1.from(St.headers),status:St.status,statusText:St.statusText,config:tt,request:yt})})}catch(bt){throw vt&&vt(),bt&&bt.name==="TypeError"&&/fetch/i.test(bt.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,tt,yt),{cause:bt.cause||bt}):AxiosError$1.from(bt,bt&&bt.code,tt,yt)}}),knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:fetchAdapter};utils$4.forEach(knownAdapters,(tt,et)=>{if(tt){try{Object.defineProperty(tt,"name",{value:et})}catch{}Object.defineProperty(tt,"adapterName",{value:et})}});const renderReason=tt=>`- ${tt}`,isResolvedHandle=tt=>utils$4.isFunction(tt)||tt===null||tt===!1,adapters={getAdapter:tt=>{tt=utils$4.isArray(tt)?tt:[tt];const{length:et}=tt;let rt,st;const nt={};for(let ot=0;ot<et;ot++){rt=tt[ot];let at;if(st=rt,!isResolvedHandle(rt)&&(st=knownAdapters[(at=String(rt)).toLowerCase()],st===void 0))throw new AxiosError$1(`Unknown adapter '${at}'`);if(st)break;nt[at||"#"+ot]=st}if(!st){const ot=Object.entries(nt).map(([lt,ut])=>`adapter ${lt} `+(ut===!1?"is not supported by the environment":"is not available in the build"));let at=et?ot.length>1?`since :
48
48
  `+ot.map(renderReason).join(`
49
- `):" "+renderReason(ot[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+at,"ERR_NOT_SUPPORT")}return st},adapters:knownAdapters};function throwIfCancellationRequested(tt){if(tt.cancelToken&&tt.cancelToken.throwIfRequested(),tt.signal&&tt.signal.aborted)throw new CanceledError$1(null,tt)}function dispatchRequest(tt){return throwIfCancellationRequested(tt),tt.headers=AxiosHeaders$1.from(tt.headers),tt.data=transformData.call(tt,tt.transformRequest),["post","put","patch"].indexOf(tt.method)!==-1&&tt.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(tt.adapter||defaults$4.adapter)(tt).then(function(st){return throwIfCancellationRequested(tt),st.data=transformData.call(tt,tt.transformResponse,st),st.headers=AxiosHeaders$1.from(st.headers),st},function(st){return isCancel$1(st)||(throwIfCancellationRequested(tt),st&&st.response&&(st.response.data=transformData.call(tt,tt.transformResponse,st.response),st.response.headers=AxiosHeaders$1.from(st.response.headers))),Promise.reject(st)})}const VERSION$1="1.8.1",validators$1={};["object","boolean","number","function","string","symbol"].forEach((tt,et)=>{validators$1[tt]=function(st){return typeof st===tt||"a"+(et<1?"n ":" ")+tt}});const deprecatedWarnings={};validators$1.transitional=function(et,rt,st){function nt(ot,at){return"[Axios v"+VERSION$1+"] Transitional option '"+ot+"'"+at+(st?". "+st:"")}return(ot,at,lt)=>{if(et===!1)throw new AxiosError$1(nt(at," has been removed"+(rt?" in "+rt:"")),AxiosError$1.ERR_DEPRECATED);return rt&&!deprecatedWarnings[at]&&(deprecatedWarnings[at]=!0,console.warn(nt(at," has been deprecated since v"+rt+" and will be removed in the near future"))),et?et(ot,at,lt):!0}};validators$1.spelling=function(et){return(rt,st)=>(console.warn(`${st} is likely a misspelling of ${et}`),!0)};function assertOptions(tt,et,rt){if(typeof tt!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const st=Object.keys(tt);let nt=st.length;for(;nt-- >0;){const ot=st[nt],at=et[ot];if(at){const lt=tt[ot],ut=lt===void 0||at(lt,ot,tt);if(ut!==!0)throw new AxiosError$1("option "+ot+" must be "+ut,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(rt!==!0)throw new AxiosError$1("Unknown option "+ot,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(et){this.defaults=et,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(et,rt){try{return await this._request(et,rt)}catch(st){if(st instanceof Error){let nt={};Error.captureStackTrace?Error.captureStackTrace(nt):nt=new Error;const ot=nt.stack?nt.stack.replace(/^.+\n/,""):"";try{st.stack?ot&&!String(st.stack).endsWith(ot.replace(/^.+\n.+\n/,""))&&(st.stack+=`
49
+ `):" "+renderReason(ot[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+at,"ERR_NOT_SUPPORT")}return st},adapters:knownAdapters};function throwIfCancellationRequested(tt){if(tt.cancelToken&&tt.cancelToken.throwIfRequested(),tt.signal&&tt.signal.aborted)throw new CanceledError$1(null,tt)}function dispatchRequest(tt){return throwIfCancellationRequested(tt),tt.headers=AxiosHeaders$1.from(tt.headers),tt.data=transformData.call(tt,tt.transformRequest),["post","put","patch"].indexOf(tt.method)!==-1&&tt.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(tt.adapter||defaults$4.adapter)(tt).then(function(st){return throwIfCancellationRequested(tt),st.data=transformData.call(tt,tt.transformResponse,st),st.headers=AxiosHeaders$1.from(st.headers),st},function(st){return isCancel$1(st)||(throwIfCancellationRequested(tt),st&&st.response&&(st.response.data=transformData.call(tt,tt.transformResponse,st.response),st.response.headers=AxiosHeaders$1.from(st.response.headers))),Promise.reject(st)})}const VERSION$1="1.8.2",validators$1={};["object","boolean","number","function","string","symbol"].forEach((tt,et)=>{validators$1[tt]=function(st){return typeof st===tt||"a"+(et<1?"n ":" ")+tt}});const deprecatedWarnings={};validators$1.transitional=function(et,rt,st){function nt(ot,at){return"[Axios v"+VERSION$1+"] Transitional option '"+ot+"'"+at+(st?". "+st:"")}return(ot,at,lt)=>{if(et===!1)throw new AxiosError$1(nt(at," has been removed"+(rt?" in "+rt:"")),AxiosError$1.ERR_DEPRECATED);return rt&&!deprecatedWarnings[at]&&(deprecatedWarnings[at]=!0,console.warn(nt(at," has been deprecated since v"+rt+" and will be removed in the near future"))),et?et(ot,at,lt):!0}};validators$1.spelling=function(et){return(rt,st)=>(console.warn(`${st} is likely a misspelling of ${et}`),!0)};function assertOptions(tt,et,rt){if(typeof tt!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const st=Object.keys(tt);let nt=st.length;for(;nt-- >0;){const ot=st[nt],at=et[ot];if(at){const lt=tt[ot],ut=lt===void 0||at(lt,ot,tt);if(ut!==!0)throw new AxiosError$1("option "+ot+" must be "+ut,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(rt!==!0)throw new AxiosError$1("Unknown option "+ot,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(et){this.defaults=et,this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(et,rt){try{return await this._request(et,rt)}catch(st){if(st instanceof Error){let nt={};Error.captureStackTrace?Error.captureStackTrace(nt):nt=new Error;const ot=nt.stack?nt.stack.replace(/^.+\n/,""):"";try{st.stack?ot&&!String(st.stack).endsWith(ot.replace(/^.+\n.+\n/,""))&&(st.stack+=`
50
50
  `+ot):st.stack=ot}catch{}}throw st}}_request(et,rt){typeof et=="string"?(rt=rt||{},rt.url=et):rt=et||{},rt=mergeConfig$1(this.defaults,rt);const{transitional:st,paramsSerializer:nt,headers:ot}=rt;st!==void 0&&validator.assertOptions(st,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),nt!=null&&(utils$4.isFunction(nt)?rt.paramsSerializer={serialize:nt}:validator.assertOptions(nt,{encode:validators.function,serialize:validators.function},!0)),rt.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?rt.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:rt.allowAbsoluteUrls=!0),validator.assertOptions(rt,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),rt.method=(rt.method||this.defaults.method||"get").toLowerCase();let at=ot&&utils$4.merge(ot.common,ot[rt.method]);ot&&utils$4.forEach(["delete","get","head","post","put","patch","common"],yt=>{delete ot[yt]}),rt.headers=AxiosHeaders$1.concat(at,ot);const lt=[];let ut=!0;this.interceptors.request.forEach(function(vt){typeof vt.runWhen=="function"&&vt.runWhen(rt)===!1||(ut=ut&&vt.synchronous,lt.unshift(vt.fulfilled,vt.rejected))});const ct=[];this.interceptors.response.forEach(function(vt){ct.push(vt.fulfilled,vt.rejected)});let dt,ht=0,ft;if(!ut){const yt=[dispatchRequest.bind(this),void 0];for(yt.unshift.apply(yt,lt),yt.push.apply(yt,ct),ft=yt.length,dt=Promise.resolve(rt);ht<ft;)dt=dt.then(yt[ht++],yt[ht++]);return dt}ft=lt.length;let xt=rt;for(ht=0;ht<ft;){const yt=lt[ht++],vt=lt[ht++];try{xt=yt(xt)}catch(Et){vt.call(this,Et);break}}try{dt=dispatchRequest.call(this,xt)}catch(yt){return Promise.reject(yt)}for(ht=0,ft=ct.length;ht<ft;)dt=dt.then(ct[ht++],ct[ht++]);return dt}getUri(et){et=mergeConfig$1(this.defaults,et);const rt=buildFullPath(et.baseURL,et.url,et.allowAbsoluteUrls);return buildURL(rt,et.params,et.paramsSerializer)}};utils$4.forEach(["delete","get","head","options"],function(et){Axios$1.prototype[et]=function(rt,st){return this.request(mergeConfig$1(st||{},{method:et,url:rt,data:(st||{}).data}))}});utils$4.forEach(["post","put","patch"],function(et){function rt(st){return function(ot,at,lt){return this.request(mergeConfig$1(lt||{},{method:et,headers:st?{"Content-Type":"multipart/form-data"}:{},url:ot,data:at}))}}Axios$1.prototype[et]=rt(),Axios$1.prototype[et+"Form"]=rt(!0)});let CancelToken$1=class rm{constructor(et){if(typeof et!="function")throw new TypeError("executor must be a function.");let rt;this.promise=new Promise(function(ot){rt=ot});const st=this;this.promise.then(nt=>{if(!st._listeners)return;let ot=st._listeners.length;for(;ot-- >0;)st._listeners[ot](nt);st._listeners=null}),this.promise.then=nt=>{let ot;const at=new Promise(lt=>{st.subscribe(lt),ot=lt}).then(nt);return at.cancel=function(){st.unsubscribe(ot)},at},et(function(ot,at,lt){st.reason||(st.reason=new CanceledError$1(ot,at,lt),rt(st.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(et){if(this.reason){et(this.reason);return}this._listeners?this._listeners.push(et):this._listeners=[et]}unsubscribe(et){if(!this._listeners)return;const rt=this._listeners.indexOf(et);rt!==-1&&this._listeners.splice(rt,1)}toAbortSignal(){const et=new AbortController,rt=st=>{et.abort(st)};return this.subscribe(rt),et.signal.unsubscribe=()=>this.unsubscribe(rt),et.signal}static source(){let et;return{token:new rm(function(nt){et=nt}),cancel:et}}};function spread$1(tt){return function(rt){return tt.apply(null,rt)}}function isAxiosError$1(tt){return utils$4.isObject(tt)&&tt.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};Object.entries(HttpStatusCode$1).forEach(([tt,et])=>{HttpStatusCode$1[et]=tt});function createInstance(tt){const et=new Axios$1(tt),rt=bind$3(Axios$1.prototype.request,et);return utils$4.extend(rt,Axios$1.prototype,et,{allOwnKeys:!0}),utils$4.extend(rt,et,null,{allOwnKeys:!0}),rt.create=function(nt){return createInstance(mergeConfig$1(tt,nt))},rt}const axios=createInstance(defaults$4);axios.Axios=Axios$1;axios.CanceledError=CanceledError$1;axios.CancelToken=CancelToken$1;axios.isCancel=isCancel$1;axios.VERSION=VERSION$1;axios.toFormData=toFormData$1;axios.AxiosError=AxiosError$1;axios.Cancel=axios.CanceledError;axios.all=function(et){return Promise.all(et)};axios.spread=spread$1;axios.isAxiosError=isAxiosError$1;axios.mergeConfig=mergeConfig$1;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=tt=>formDataToJSON(utils$4.isHTMLForm(tt)?new FormData(tt):tt);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios;function m$2(tt){const et=new Date().getTime(),rt=tt.includes("?")?"&":"?";return`${tt}${rt}timestamp=${et}`}const c$3=(tt,et)=>{if(tt==0)return"0 octets";const rt=1e3,st=et,nt=["octets","Ko","Mo","Go"],ot=Math.floor(Math.log(tt)/Math.log(rt));return parseFloat((tt/Math.pow(rt,ot)).toFixed(st))+" "+nt[ot]};let s$3=class{static isLocalURL(et){return et.length>0&&et.charAt(0)==="/"}static startWithHttp(et){return/^https?:\/\//gi.test(et)}static toCounter(et){return et>999?`${Number(et/1e3).toFixed(1)} k`:""+et}static generateVirtualId(){return"xxxx-xxxx-xxx-xxxx".replace(/[x]/g,()=>Math.floor(Math.random()*16).toString(16))}};const s$2=(tt,et)=>{const rt="virtualID";if(!Object.hasOwnProperty.apply(tt,[rt])){const st=et??`${s$3.generateVirtualId()}#${tt.size}`;Object.defineProperty(tt,rt,{value:st,writable:!1})}return tt[rt]};let p$3=class{static changeDimension(et,rt,st,nt){return st>nt&&(et=Math.round(et*nt/st),st=nt),et>rt&&(st=Math.round(st*rt/et),et=rt),{height:et,width:st}}static renameFileNameExtension(et,rt){const st=et.split(".");return st.pop(),st.join(".")+"."+rt}static resizeImage(et,rt,st,nt,ot="jpeg",at=80){const lt=at/100,ut=document.createElement("canvas"),ct=`image/${ot}`;let dt=et.width,ht=et.height;const ft=this.changeDimension(ht,nt,dt,st);dt=ft.width,ht=ft.height;const xt=ut.getContext("2d");return xt&&(ut.width=dt,ut.height=ht,xt.fillStyle="white",xt.fillRect(0,0,ut.width,ut.height),xt.imageSmoothingEnabled&&xt.imageSmoothingQuality&&(xt.imageSmoothingQuality="high"),xt.drawImage(et,0,0,dt,ht)),new Promise((yt,vt)=>{ut.toBlob(Et=>{Et?yt(new File([Et],rt,{type:ct,lastModified:new Date().getTime()})):vt()},ct,lt)})}static async resizeImageFile(et,rt=1440,st=1440,nt=80){if(!et)throw Error("Image resizer: file not found!");if(!et.type||!et.type.startsWith("image/"))throw Error("Image resizer: the file given is not an image.");const ot="jpeg";return new Promise(at=>{const lt=new Image;lt.setAttribute("style","max-width: none;"),lt.src=URL.createObjectURL(et),lt.onload=async()=>{const ut=await this.resizeImage(lt,this.renameFileNameExtension(et.name,ot),rt,st,ot,nt);at(ut)},lt.onerror=ut=>{throw Error("Image Loading Error: "+ut)}})}};const e$3={blog:"Blog",mindmap:"MindMap",scrapbook:"ScrapBook",collaborativewall:"CollaborativeWall",timelinegenerator:"TimelineGenerator",wiki:"Wiki",exercizer:"Exercizer"};var p$2=Object.defineProperty,d$2=(tt,et,rt)=>et in tt?p$2(tt,et,{enumerable:!0,configurable:!0,writable:!0,value:rt}):tt[et]=rt,n$4=(tt,et,rt)=>d$2(tt,typeof et!="symbol"?et+"":et,rt);const o$3=class{constructor(){n$4(this,"wordExtensions",new Set),n$4(this,"excelExtensions",new Set),n$4(this,"pptExtensions",new Set),n$4(this,"fileExtensionMap",new Map),n$4(this,"csvContentType",new Set),n$4(this,"csvExtensions",new Set),n$4(this,"txtExtensions",new Set),n$4(this,"mdExtensions",new Set),n$4(this,"PDF","application/pdf"),n$4(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(et){return this.fileExtensionMap.has(et)?this.fileExtensionMap.get(et)??null:null}getExtensionForContentType(et){for(const rt of Array.from(this.fileExtensionMap.keys()))if((this.fileExtensionMap.get(rt)||"").toLowerCase()==(et||"").toLowerCase())return rt;return null}isWordLike(et,rt){const st=this.getExtensionForContentType(et);return st?this.wordExtensions.has(st):et==this.OCTET_STREAM&&rt?this.wordExtensions.has(rt):!1}isExcelLike(et,rt){const st=this.getExtensionForContentType(et);return st?this.excelExtensions.has(st):et==this.OCTET_STREAM&&rt?this.excelExtensions.has(rt):!1}isCsvLike(et,rt){return this.csvContentType.has(et)?!0:et==this.OCTET_STREAM&&rt?this.csvExtensions.has(rt):!1}isPowerpointLike(et,rt){const st=this.getExtensionForContentType(et);return st?this.pptExtensions.has(st):et==this.OCTET_STREAM&&rt?this.pptExtensions.has(rt):!1}isTxtLike(et,rt){const st=this.getExtensionForContentType(et);return st?this.txtExtensions.has(st):et==this.OCTET_STREAM&&rt?this.txtExtensions.has(rt):!1}isMdLike(et,rt){const st=this.getExtensionForContentType(et);return st?this.mdExtensions.has(st):et==this.OCTET_STREAM&&rt?this.mdExtensions.has(rt):!1}};n$4(o$3,"INSTANCE",new o$3);let a$2=o$3;const n$3=tt=>{if(tt>0){let et=Math.floor(tt/1e3),rt=Math.floor(et/60);return et=et%60,rt=rt%60,e$2(rt)+":"+e$2(et)}return"00:00"},e$2=tt=>tt.toString().padStart(2,"0"),o$2=()=>MediaRecorder.isTypeSupported?["video/webm;codecs=vp9",'video/mp4; codecs="avc1.424028, mp4a.40.2"',"video/webm;codecs=vp8,opus","video/webm"].find(tt=>MediaRecorder.isTypeSupported(tt)?!0:(console.error(`${tt} is not Supported`),!1))||"video/ogg":"video/webm;codecs=vp8,opus";var D$2=Object.defineProperty,T$1=(tt,et,rt)=>et in tt?D$2(tt,et,{enumerable:!0,configurable:!0,writable:!0,value:rt}):tt[et]=rt,n$2=(tt,et,rt)=>T$1(tt,typeof et!="symbol"?et+"":et,rt);const 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$4={VIDEO:"video"};class Subscription{constructor(et,rt){n$2(this,"revoke"),this._channel=et,this.revoke=this.setReceiver(st=>rt==null?void 0:rt(st.data))}setReceiver(et){var rt;return(rt=this._channel)==null||rt.addEventListener("message",et),()=>{this._channel&&(this._channel.removeEventListener("message",et),this._channel.close(),delete this._channel)}}}class Subject{constructor(){n$2(this,"publishChannels",new Map)}getChannelName(et){return"Subject:"+et}getPublishChannel(et){const rt=this.getChannelName(et);let st=this.publishChannels.get(rt);return st||(st=this.newChannel(et),this.publishChannels.set(rt,st)),st}newChannel(et){const rt=this.getChannelName(et),st=new BroadcastChannel(rt);return st.addEventListener("messageerror",nt=>console.log(nt.data)),st}publish(et,rt){typeof et=="string"&&this.getPublishChannel(et).postMessage(rt)}subscribe(et,rt){if(typeof et=="string"){const st=this.newChannel(et);return new Subscription(st,rt)}else return new Subscription}}const ASYNC_DATA_NAME={SESSION_READY:"sessionReady",LANG_READY:"langReady",SKIN_READY:"skinReady",OVERRIDE_READY:"overrideReady",APPCONF_READY:"appConfReady"};class Promisified{constructor(){n$2(this,"_resolution"),n$2(this,"_rejection"),n$2(this,"_promise",new Promise((et,rt)=>{this._resolution=et,this._rejection=rt}))}get promise(){return this._promise}resolve(et){this._resolution&&this._resolution(et)}reject(et){this._rejection&&this._rejection(et)}}class NotifyFramework{constructor(){n$2(this,"promises",{}),n$2(this,"subject",new Subject)}asyncData(et){return typeof this.promises[et]>"u"&&(this.promises[et]=new Promisified),this.promises[et]}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}}const notify=new NotifyFramework,loadedScripts$1={};class Http{constructor(et){n$2(this,"axios"),n$2(this,"_latestResponse"),this.axios=axios.create(et)}setCdn(et){et&&XMLHttpRequest&&!XMLHttpRequest.prototype.cdnUrl&&(XMLHttpRequest.prototype.cdnUrl=et,XMLHttpRequest.prototype.baseOpen=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(){const rt=arguments[1];return rt.startsWith("/infra/public")&&(arguments[1]=et+rt),/^\/([^\/]*)\/public/.test(rt)&&(arguments[1]=et+rt),rt.startsWith("/assets")&&(arguments[1]=et+rt),rt=="/conf/public"&&(arguments[1]=rt),rt.startsWith("http")&&(arguments[1]=rt),this.baseOpen.apply(this,arguments)})}toAxiosConfig(et){if(et){const rt=Object.assign({},this.axios.defaults);return et.headers&&(rt.headers&&(rt.headers=Object.assign({},this.axios.defaults.headers)),Object.assign(rt.headers,et.headers)),et.responseType&&(rt.responseType=et.responseType),et.queryParams&&(rt.params=Object.assign({},et.queryParams)),rt}else return this.axios.defaults}toCdnUrl(et){const rt=ConfigurationFrameworkFactory.instance().Platform.cdnDomain;if((rt==null?void 0:rt.length)>0&&et!=="/conf/public"){const st=""+et;(st.startsWith("/infra/public")||st.startsWith("/assets")||/^\/([^\/]*)\/public/.test(st))&&(et=rt+st)}return et}mapAxiosError(et,rt){return et.response?this._latestResponse=et.response:et.request?this._latestResponse={status:408,statusText:ERROR_CODE.TIME_OUT}:this._latestResponse={status:500,statusText:ERROR_CODE.UNKNOWN},!rt||rt.disableNotifications,this._latestResponse}mapAxiosResponse(et,rt){return this._latestResponse=et,et.data}get latestResponse(){return this._latestResponse}isResponseError(){return this.latestResponse.status<200||this.latestResponse.status>=300}get(et,rt){return this.axios.get(this.toCdnUrl(et),this.toAxiosConfig(rt)).then(st=>this.mapAxiosResponse(st,rt)).catch(st=>this.mapAxiosError(st,rt))}post(et,rt,st){return this.axios.post(et,rt,this.toAxiosConfig(st)).then(nt=>this.mapAxiosResponse(nt,st)).catch(nt=>this.mapAxiosError(nt,st))}postFile(et,rt,st){const nt=this.toAxiosConfig(st);return nt.headers&&nt.headers["Content-Type"]&&delete nt.headers["Content-Type"],this.axios.post(et,rt,nt).then(ot=>this.mapAxiosResponse(ot,st)).catch(ot=>this.mapAxiosError(ot,st))}postJson(et,rt,st){const nt=this.toAxiosConfig();return nt.headers&&(nt.headers["Content-Type"]="application/json"),this.axios.post(et,rt,this.toAxiosConfig(st)).then(ot=>this.mapAxiosResponse(ot,st)).catch(ot=>this.mapAxiosError(ot,st))}put(et,rt,st){return this.axios.put(et,rt,this.toAxiosConfig(st)).then(nt=>this.mapAxiosResponse(nt,st)).catch(nt=>this.mapAxiosError(nt,st))}putJson(et,rt,st){const nt=this.toAxiosConfig(st);return nt.headers&&(nt.headers["Content-Type"]="application/json"),this.axios.put(et,rt,nt).then(ot=>this.mapAxiosResponse(ot,st)).catch(ot=>this.mapAxiosError(ot,st))}delete(et,rt){return this.axios.delete(et,this.toAxiosConfig(rt)).then(st=>this.mapAxiosResponse(st,rt)).catch(st=>this.mapAxiosError(st,rt))}deleteJson(et,rt){return this.axios.delete(et,{data:rt}).then(st=>this.mapAxiosResponse(st)).catch(st=>this.mapAxiosError(st))}getScript(et,rt,st){const nt=st??"exports",ot=this.toAxiosConfig(rt);return ot.headers&&(ot.headers.Accept="application/javascript"),this.axios.get(this.toCdnUrl(et),ot).then(at=>this.mapAxiosResponse(at,rt)).then(at=>{try{const lt=`"use strict";var ${nt.split(".")[0]}={};${at};return ${nt};`;return Function(lt)()}catch{return at}}).catch(at=>{throw this.mapAxiosError(at,rt),at})}loadScript(et,rt){return loadedScripts$1[et]?Promise.resolve():this.getScript(et,rt).then(st=>{loadedScripts$1[et]=!0})}}class TransportFramework{constructor(){n$2(this,"_http",new Http)}get http(){return this._http}newHttpInstance(et){return new Http(et)}}const transport=new TransportFramework;class ConfigurationFrameworkFactory{static instance(){return configure}}const http$2=transport.http;class Session{constructor(){n$2(this,"_me",null),n$2(this,"_currentLanguage",""),n$2(this,"_notLoggedIn",!0),n$2(this,"_description"),n$2(this,"_profile")}get currentLanguage(){return this._currentLanguage}get notLoggedIn(){return this._notLoggedIn}get description(){return this._description}get avatarUrl(){let et=this.description.photo;return(!et||et==="no-avatar.jpg"||et==="no-avatar.svg")&&(et=ConfigurationFrameworkFactory.instance().Platform.theme.basePath+"/img/illustrations/no-avatar.svg"),et}get user(){return this._me}get currentApp(){return configure.Platform.apps.currentApp}async initialize(){return http$2.get("/auth/oauth2/userinfo").then(et=>{if(http$2.isResponseError()||typeof et=="string")throw ERROR_CODE.NOT_LOGGED_IN;return this.setCurrentModel(et),this._notLoggedIn?this.loadDefaultLanguage():this.loadUserLanguage()}).then(et=>(this.setCurrentLanguage(et),this.loadDescription())).then(()=>this.getUserProfile()).then(()=>{notify.onSessionReady().resolve(this._me)}).catch(et=>{if(et===ERROR_CODE.NOT_LOGGED_IN)return Promise.resolve();notify.onSessionReady().reject(et)})}setCurrentModel(et){this._me=et,this._notLoggedIn=!(et&&et.sessionMetadata&&et.sessionMetadata.userId)}hasWorkflow(et){var rt;return et===void 0||((rt=this._me)==null?void 0:rt.authorizedActions.findIndex(st=>st.name===et))!==-1}hasRight(et,rt){if(rt==="owner")return et.owner&&et.owner.userId===this._me.userId;const st=rt.right||rt,nt=et.shared.filter(at=>(this._me.groupsIds||[]).indexOf(at.groupId)!==-1||at.userId===this._me.userId).find(at=>at[st]||at.manager)!==void 0,ot=rt.workflow?this.hasWorkflow(rt.workflow):!0;return nt&&ot}get latestQuotaAndUsage(){return http$2.get(`/workspace/quota/user/${this._me.userId}`).then(et=>(this._description&&(this._description.quota=et.quota,this._description.storage=et.storage),et)).catch(()=>({quota:0,storage:0}))}setCurrentLanguage(et){this._currentLanguage=et,notify.onLangReady().resolve(et)}loadDefaultLanguage(){return http$2.get("/locale").then(et=>et.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(et=>(et[0].status==="ok"&&et[0].result&&et[0].result.length>0?this._description=et[0].result[0]:this._description={},this._description.type&&!this._description.profiles&&(this._description.profiles=this._description.type),Object.assign(this._description,et[1]),this._description))}get profile(){return this._profile}getUserProfile(){return http$2.get("/userbook/api/person").then(et=>et.result).then(et=>this._profile=et[0].type)}loadUserLanguage(){return http$2.get("/userbook/preference/language").then(et=>{try{return JSON.parse(et.preference)["default-domain"]}catch{return this.loadDefaultLanguage()}}).catch(()=>this.loadDefaultLanguage())}getEmailValidationInfos(){return http$2.get("/directory/user/mailstate")}checkEmail(et){return http$2.put("/directory/user/mailstate",{email:et})}tryEmailValidation(et){return http$2.post("/directory/user/mailstate",{key:et})}getMobileValidationInfos(){return http$2.get("/directory/user/mobilestate")}checkMobile(et){return http$2.put("/directory/user/mobilestate",{mobile:et})}tryMobileValidation(et){return http$2.post("/directory/user/mobilestate",{key:et})}getMfaInfos(){return http$2.get("/auth/user/mfa/code")}tryMfaCode(et){return http$2.post("/auth/user/mfa/code",{key:et})}}class SessionFramework{constructor(){n$2(this,"session",new Session)}initialize(){return this.session.initialize()}login(et,rt,st,nt){const ot=new FormData;return ot.append("email",et),ot.append("password",rt),typeof st<"u"&&ot.append("rememberMe",""+st),typeof nt<"u"&&ot.append("secureLocation",""+nt),transport.http.post("/auth/login",ot,{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(()=>{})}}const session=new SessionFramework;class Theme{constructor(){n$2(this,"_conf"),n$2(this,"_loaded"),n$2(this,"skinName",""),n$2(this,"themeName",""),n$2(this,"skin","raw"),n$2(this,"themeUrl","/assets/themes/raw/default/"),n$2(this,"templateOverrides",{}),n$2(this,"portalTemplate","/assets/themes/raw/portal.html"),n$2(this,"basePath",""),n$2(this,"logoutCallback","/"),n$2(this,"skins",[]),n$2(this,"is1D",!1),n$2(this,"is2D",!1),n$2(this,"_onSkinReady",notify.onSkinReady()),n$2(this,"_onOverrideReady",notify.onOverridesReady())}initialize(et){return notify.onSessionReady().promise.then(()=>this.load(et))}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(et){return this._conf=this._conf??await transport.http.getScript("/assets/theme-conf.js",{queryParams:{v:et??this.version}},"exports.conf"),this._conf}load(et){return et=et??this.version,this._loaded||(this._loaded=(session.session.notLoggedIn?this.loadDisconnected(et):this.loadConnected(et)).then(async()=>{var rt,st;const nt=await this.listSkins();this.is1D=((rt=nt.find(ot=>ot.child===this.skin))==null?void 0:rt.parent)==="panda",this.is2D=((st=nt.find(ot=>ot.child===this.skin))==null?void 0:st.parent)==="theme-open-ent"})),this._loaded}loadDisconnected(et){return new Promise((rt,st)=>{transport.http.get("/skin",{queryParams:{v:this.version}}).then(nt=>{this.skin=nt.skin,this.themeUrl=`${this.cdnDomain}/assets/themes/${nt.skin}/skins/default/`,this.basePath=this.themeUrl+"../../",this._onSkinReady.resolve(this),transport.http.get(`/assets/themes/${nt.skin}/template/override.json`,{disableNotifications:!0,queryParams:{v:et}}).then(ot=>{this.templateOverrides=ot,this._onOverrideReady.resolve(ot),rt()}).catch(ot=>{if(transport.http.latestResponse.status===404)rt();else throw ot})}).catch(nt=>{this._onSkinReady.reject(nt),this._onOverrideReady.reject(nt),st()})})}loadConnected(et){return new Promise((rt,st)=>{this.loadDefaultTheme(et).then(()=>{this._onSkinReady.resolve(this),transport.http.get(`/assets/themes/${this.skin}/template/override.json`,{disableNotifications:!0,queryParams:{v:et}}).then(nt=>{this.templateOverrides=nt,this._onOverrideReady.resolve(nt),rt()}).catch(nt=>{if(transport.http.latestResponse.status===404)rt(),this._onSkinReady.reject(nt),this._onOverrideReady.reject(nt);else throw nt})})})}async loadDefaultTheme(et){return session.session.notLoggedIn?Promise.reject():transport.http.get("/theme",{queryParams:{_:et}}).then(rt=>{this.skinName=rt.skinName,this.themeName=rt.themeName,this.themeUrl=rt.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=rt.logoutCallback})}listThemes(){return transport.http.get("/themes")}async setDefaultTheme(et){await transport.http.get("/userbook/api/edit-userbook-info?prop=theme-"+this.skin+"&value="+et._id),await this.loadDefaultTheme(this.version)}listSkins(){return this.skins.length>0?Promise.resolve(this.skins):this.getConf().then(et=>{const rt=et.overriding.find(st=>st.child===this.skin);return rt!=null&&rt.group?this.skins=this.skins.concat(et.overriding.filter(st=>st.group===rt.group)):this.skins=this.skins.concat(et.overriding),this.skins})}async getHelpPath(){const et=(await this.listSkins()).find(rt=>rt.child===this.skin);return(et==null?void 0:et.help)??"/help"}}const 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}];class Idiom{translate(et,rt){et=et??"";let st=bundle$1[et]===void 0?et:bundle$1[et];if(rt&&typeof rt=="object")for(const nt in rt)typeof rt[nt]<"u"&&(st=st.replace(new RegExp("\\${"+nt+"}","g"),""+rt[nt]));return st}addBundlePromise(et){return this.loadBundlePromise(session.session.currentLanguage,et)}addBundle(et,rt){this.loadBundle(session.session.currentLanguage,et,rt)}loadBundlePromise(et,rt){return this.loadBundle(et,rt),promises$1[rt]}loadBundle(et,rt,st){const nt=promises$1[rt];if(nt)st&&nt.then(st).catch(st);else{const ot=new Promisified;promises$1[rt]=ot.promise;const at={};et&&(at["Accept-Language"]=et),transport.http.get(rt,{headers:at}).then(lt=>{Object.assign(bundle$1,lt),typeof st=="function"&&st(),ot.resolve()}).catch(lt=>{typeof st=="function"&&st(),ot.reject()})}}addTranslations(et,rt){notify.onLangReady().promise.then(st=>{this.loadBundle(st,et+"/"+st+".json",rt)})}addAllTranslations(et){return et&&et.length>0?notify.onLangReady().promise.then(rt=>Promise.all(et.map(st=>this.loadBundlePromise(rt,st+"/"+rt+".json")))).then(()=>{}):Promise.reject()}addKeys(et){for(const rt in et)typeof bundle$1[rt]!="string"&&(bundle$1[rt]=et[rt])}removeAccents(et){for(let rt=0;rt<defaultDiacriticsRemovalMap$1.length;rt++)et=et.replace(defaultDiacriticsRemovalMap$1[rt].letters,defaultDiacriticsRemovalMap$1[rt].base);return et}}class UserPreferences{constructor(){n$2(this,"data",{})}get(et){return this.data[et]}load(et,rt){return transport.http.get("/userbook/preference/"+et).then(st=>{try{return JSON.parse(st.preference)}catch{return rt??{}}}).then(st=>(this.data[et]=st??{},st))}update(et,rt){return rt!==void 0&&(this.data[et]=rt),this}save(et){return transport.http.putJson("/userbook/preference/"+et,this.data[et])}}class User{constructor(){n$2(this,"_me",null),n$2(this,"_keepOpenOnLogout",!1),n$2(this,"_preferences",new UserPreferences),n$2(this,"_bookmarkedApps",[])}get keepOpenOnLogout(){return this._keepOpenOnLogout}get preferences(){return this._preferences}get bookmarkedApps(){return this._bookmarkedApps}initialize(et){return this.loadPublicConf(),notify.onSessionReady().promise.then(rt=>{rt&&this.setCurrentModel(rt)})}setCurrentModel(et){this._me=et,this._preferences=new UserPreferences,this.loadBookmarks()}loadPublicConf(){return transport.http.get("/conf/public").then(et=>(this._keepOpenOnLogout=(et==null?void 0:et.keepOpenOnLogout)||!1,et))}async loadBookmarks(){await transport.http.get("/userbook/preference/apps").then(et=>{et.preference||(et.preference=null);const rt=JSON.parse(et.preference);let st;if(rt&&rt.length&&typeof rt.concat=="function"){this._bookmarkedApps=rt,st={bookmarks:rt.map(at=>at.name),applications:[]},transport.http.putJson("/userbook/preference/apps",st);return}else st=rt;st||(st={bookmarks:[],applications:[]});let nt=!0;const ot=[];st.bookmarks.forEach((at,lt)=>{const ut=this._me.apps.find(ct=>ct.name===at);if(ut){const ct=Object.assign({},ut);this._bookmarkedApps.push(ct)}else ot.push(at),nt=!1}),ot.forEach(at=>{const lt=st.bookmarks.indexOf(at);lt!==-1&&st.bookmarks.splice(lt,1)}),nt||transport.http.putJson("/userbook/preference/apps",st)})}loadAppPrefs(et){return this.preferences.load(et,{})}saveAppPrefs(et){return this.preferences.save(et)}loadLanguage(){return this.preferences.load("language",{"default-domain":session.session.currentLanguage}).then(et=>et["default-domain"])}saveLanguage(et){return this.preferences.update("language",{"default-domain":et}).save("language")}}const http$1=transport==null?void 0:transport.http;class AppConf{constructor(){n$2(this,"_publicConf",{}),n$2(this,"_currentApp"),n$2(this,"_appConf",{})}get currentApp(){return this._currentApp??null}setCurrentApp(et){return this._currentApp=et,this}async initialize(et,rt=!1){rt||this.setCurrentApp(et),await Promise.all([this.getPublicConf(et),this.loadI18n(et)])}async getPublicConf(et){return this._publicConf[et]||(this._publicConf[et]=await http$1.get(`/${et}/conf/public`,{queryParams:{_:configure.Platform.deploymentTag}})),this._publicConf[et]}async getWebAppConf(et){let rt;return this._appConf[et]||(await http$1.get("/applications-list")).apps.forEach(st=>{if(st!=null&&st.prefix){const nt=st.prefix.replace("/","");this._appConf[nt]=st}else st!=null&&st.name&&st.name.toLowerCase()==et&&(rt=st)}),this._appConf[et]??rt}async loadI18n(et){return await notify.onLangReady().promise,configure.Platform.idiom.addBundlePromise(`/${et}/i18n`)}}class Analytics{constructor(){n$2(this,"_status","void"),n$2(this,"_params")}get status(){return this._status}xiti(){return this.parametersWithCheck("xiti",!1)}parameters(et){return this.parametersWithCheck(et,!0)}async parametersWithCheck(et,rt){return this.initialize().promise.then(st=>!rt||st.type===et||st.type==="multiple"?st[et]: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 et=>{var rt;if(!et||!et[0]||!et[0].type)throw ERROR_CODE.MALFORMED_DATA;et[1]&&et[1].active&&(et[0].xiti=await this.initializeXiti(et[1])),(rt=this._params)==null||rt.resolve(et[0]),this._status="ready"}).catch(et=>{var rt;throw this._status="failed",(rt=this._params)==null||rt.reject(),et})),this._params}async initializeXiti(et){if(!et.structureMap||!configure.Platform.apps.currentApp)return;const rt=await notify.onSessionReady().promise,st=session.session.description;let nt;for(const ct of rt.structures){const dt=et.structureMap[ct];if(dt&&dt.collectiviteId&&dt.UAI){nt=dt;break}}if(!nt||!nt.active)return;const ot=await configure.Platform.apps.getPublicConf(configure.Platform.apps.currentApp);if(!ot)return;const at=ot.xiti;if(!at||!at.LIBELLE_SERVICE||!nt.UAI)return;function lt(ct){let dt="";for(let ht=0;ht<ct.length;ht++)dt+=ct.charCodeAt(ht);return dt}const ut={Student:"ELEVE",Teacher:"ENSEIGNANT",Relative:"PARENT",Personnel:"ADMIN_VIE_SCOL_TECH",Guest:"AUTRE"};return{LIBELLE_SERVICE:at.LIBELLE_SERVICE,TYPE:at.OUTIL?"TIERS":"NATIF",OUTIL:at.OUTIL?at.OUTIL:"",STRUCT_ID:nt.collectiviteId,STRUCT_UAI:nt.UAI,PROJET:nt.projetId?nt.projetId:et.ID_PROJET,EXPLOITANT:et.ID_EXPLOITANT,PLATFORME:nt.plateformeId?nt.plateformeId:et.ID_PLATEFORME,ID_PERSO:lt(rt.userId),PROFILE:st.profiles&&st.profiles.length>0?ut[st.profiles[0]]??"":""}}}class ConfigurationFramework{constructor(){n$2(this,"Platform",{deploymentTag:"",cdnDomain:"",apps:new AppConf,theme:new Theme,analytics:new Analytics,idiom:new Idiom,listLanguages:()=>transport.http.get("/languages")}),n$2(this,"School",{}),n$2(this,"User",new User)}async initialize(et,rt){if(!et){const nt=ct=>(ct<10?"0":"")+ct.toFixed(0),ot=new Date,at=ot.getFullYear(),lt=ot.getMonth()+1,ut=ot.getDate();et=`${at}${nt(lt)}${nt(ut)}`}const st=et;this.Platform.deploymentTag=et,typeof rt=="string"&&rt.length>0&&(this.Platform.cdnDomain=rt),transport.http.setCdn(this.Platform.cdnDomain),await Promise.all([this.Platform.theme.initialize(st),notify.onSessionReady().promise.then(nt=>this.Platform.idiom.addBundlePromise("/i18n")),this.User.initialize(st)])}}const configure=new ConfigurationFramework;transport==null||transport.http;var _$2;(_$2=session==null?void 0:session.session)==null||_$2.user;class NotifyFrameworkFactory{static instance(){return notify}}const LAYER_NAME={WIDGETS:"widgets",TRANSPORT:"transport",WEB_DATA:"webDataPipeline"},EVENT_NAME={USERPREF_CHANGED:"userprefChanged",ERROR_OCCURED:"error",DATA_TRACKED:"track"};class ServiceRegistry extends Map{register({application:et,resourceType:rt},st){this.set(`${et}:main`,st),this.set(`${et}:${rt}`,st)}findService(et,rt){return this.lookupService(et,rt)}findMainService({application:et},rt){return this.lookupService({application:et,resourceType:"main"},rt)}isRegistered({application:et,resourceType:rt}){return this.get(`${et}:${rt}`)!==void 0}lookupService({application:et,resourceType:rt},st){const nt=this.get(`${et}:${rt}`);if(nt===void 0)throw`Service not found: ${et}:${rt}`;return nt(st)}}const f$3=class{constructor(et){n$2(this,"checkHttpResponse",rt=>{if(this.http.latestResponse.status>=300)throw this.http.latestResponse.statusText;return rt}),this.context=et}get http(){return this.context.http()}async copy(et){const rt=await this.http.post("/archive/duplicate",{application:et.application,resourceId:et.resourceId});return this.checkHttpResponse(rt)}async publish(et){const rt=new FormData;return rt.append("title",et.title),rt.append("cover",et.cover),rt.append("coverName",et.cover.name),rt.append("coverType",et.cover.type),rt.append("teacherAvatar",et.teacherAvatar),rt.append("teacherAvatarName",et.teacherAvatar.name||`teacherAvatar_${et.userId}`),rt.append("teacherAvatarType",et.teacherAvatar.type),rt.append("language",et.language),et.activityType.forEach(st=>{rt.append("activityType[]",st)}),et.subjectArea.forEach(st=>{rt.append("subjectArea[]",st)}),et.age.forEach(st=>{rt.append("age[]",st.toString())}),rt.append("description",et.description),et.keyWords.split(",").forEach(st=>{rt.append("keyWords[]",st.trim())}),rt.append("licence",et.licence),rt.append("pdfUri",`${window.location.origin}${this.getPrintUrl(et.resourceEntId)}`),rt.append("application",et.application?et.application:""),rt.append("resourceId",et.resourceId),rt.append("teacherSchool",et.userStructureName),await this.http.post("/appregistry/library/resource",rt,{headers:{"Content-Type":"multipart/form-data"}})}async createContext(et){const rt=await this.http.get("/explorer/context",{queryParams:this.toQueryParams(et)});return this.checkHttpResponse(rt)}async searchContext(et){const rt=await this.http.get("/explorer/resources",{queryParams:this.toQueryParams(et)});return this.checkHttpResponse(rt)}async searchResource(et){const rt=await this.http.get(`/explorer/resources/${et.id}`,{queryParams:this.getResourceParams(et)});return this.checkHttpResponse(rt)}async createFolder(et){const rt=await this.http.post("/explorer/folders",this.createFolderToBodyParams(et));return this.checkHttpResponse(rt)}async updateFolder(et){const rt=await this.http.put(`/explorer/folders/${et.folderId}`,this.createFolderToBodyParams(et));return this.checkHttpResponse(rt)}async moveToFolder(et,rt=!1){et.resourceIds=rt?await this.mapAssetIdToIds({application:et.application,assetIds:et.resourceIds}):et.resourceIds;const st=await this.http.post(`/explorer/folders/${et.folderId}/move`,this.moveToBodyParams(et));return this.checkHttpResponse(st)}async listSubfolders(et){const rt=await this.http.get(`/explorer/folders/${et}`);return this.checkHttpResponse(rt)}async deleteAll(et,rt=!1){et.resourceIds=rt?await this.mapAssetIdToIds({application:et.application,assetIds:et.resourceIds}):et.resourceIds;const st=await this.http.deleteJson("/explorer",et);return this.checkHttpResponse(st)}async trashAll({resourceType:et,...rt},st=!1){rt.resourceIds=st?await this.mapAssetIdToIds({application:rt.application,assetIds:rt.resourceIds}):rt.resourceIds;const nt=await this.http.putJson("/explorer/trash",rt);return this.checkHttpResponse(nt)}async restoreAll({resourceType:et,...rt},st=!1){rt.resourceIds=st?await this.mapAssetIdToIds({application:rt.application,assetIds:rt.resourceIds}):rt.resourceIds;const nt=await this.http.putJson("/explorer/restore",rt);return this.checkHttpResponse(nt)}async mapAssetIdToIds({application:et,assetIds:rt}){const st=await this.searchContext({application:et,pagination:{startIdx:0,pageSize:rt.length+1},types:[],filters:{},asset_id:rt});return rt.map(nt=>{const ot=st.resources.find(at=>at.assetId===nt);if(ot===void 0)throw"explorer.assetid.notfound";return ot.id})}async getThumbnailPath(et){if(typeof et>"u")return et;if(typeof et=="string")if(et.startsWith("blob:")){const rt=await fetch(et).then(st=>st.blob());return`/workspace/document/${(await this.context.workspace().saveFile(rt,{visibility:"protected",application:this.getApplication()}))._id}`}else return et;else return`/workspace/document/${(await this.context.workspace().saveFile(et,{visibility:"protected",application:this.getApplication()}))._id}`}toQueryParams(et){const rt={application:et.application,start_idx:et.pagination.startIdx,page_size:et.pagination.pageSize,trashed:et.trashed};if(et.types.length>0&&(rt.resource_type=et.types[0]),et.orders&&Object.entries(et.orders).length){const[[st,nt]]=Object.entries(et.orders);rt.order_by=`${st}:${nt}`}return et.filters&&Object.assign(rt,et.filters),typeof et.search=="string"&&(rt.search=et.search),typeof et.asset_id<"u"&&(rt.asset_id=[...et.asset_id]),typeof et.id<"u"&&(rt.id=et.id),rt}getResourceParams(et){return{application:et.application}}createFolderToBodyParams(et){return{application:et.application,resourceType:et.type,parentId:et.parentId,name:et.name}}moveToBodyParams(et){return{application:et.application,resourceType:this.getResourceType(),resourceIds:et.resourceIds,folderIds:et.folderIds}}};n$2(f$3,"registry",new ServiceRegistry),n$2(f$3,"register",f$3.registry.register.bind(f$3.registry)),n$2(f$3,"findService",f$3.registry.findService.bind(f$3.registry)),n$2(f$3,"findMainService",f$3.registry.findMainService.bind(f$3.registry)),n$2(f$3,"isRegistered",f$3.registry.isRegistered.bind(f$3.registry));let ResourceService=f$3;const APP$3="scrapbook",RESOURCE$3="scrapbook";class ScrapbookResourceService extends ResourceService{create(et){throw new Error("Method not implemented.")}async update(et){const rt=await this.getThumbnailPath(et.thumbnail),st=await this.http.put(`/scrapbook/${et.entId}`,{trashed:et.trashed?1:0,title:et.name,icon:rt,subTitle:et.description});return this.checkHttpResponse(st),{thumbnail:rt,entId:et.entId}}getResourceType(){return RESOURCE$3}getApplication(){return APP$3}getFormUrl(et){return et?`/scrapbook?folderid=${et}#/create-scrapbook/`:"/scrapbook#/create-scrapbook/"}getViewUrl(et){return`/scrapbook#/view-scrapbook/${et}`}getPrintUrl(et){return`/scrapbook/print#/print-scrapbook/${et}`}getEditUrl(et){return`/scrapbook#/edit-scrapbook/${et}`}getExportUrl(et){return`/scrapbook/exportHtml/${et}`}}ResourceService.register({application:RESOURCE$3,resourceType:RESOURCE$3},tt=>new ScrapbookResourceService(tt));const APP$2="homeworks",RESOURCE$2="homeworks";class HomeworksResourceService extends ResourceService{async create(et){const rt=await this.getThumbnailPath(et.thumbnail),st=await this.http.post("/homeworks",{title:et.name,thumbnail:rt,description:et.description,repeats:et.repeats});return this.checkHttpResponse(st),{thumbnail:rt,entId:st._id}}async update(et){const rt=await this.getThumbnailPath(et.thumbnail),st=await this.http.put(`/homeworks/${et.entId}`,{title:et.name,thumbnail:rt,repeats:et.repeats});return this.checkHttpResponse(st),{thumbnail:rt,entId:et.entId}}getResourceType(){return RESOURCE$2}getApplication(){return APP$2}getFormUrl(et){return et?`/homeworks?folderid=${et}#/create-homeworks/`:"/homeworks#/create-homeworks/"}getViewUrl(et){return`/homeworks#/view-homeworks/${et}`}getPrintUrl(et){return`/homeworks/print#/print-homeworks/${et}`}getEditUrl(et){return`/homeworks#/edit-homeworks/${et}`}getExportUrl(){throw new Error("Export not implemented.")}}ResourceService.register({application:RESOURCE$2,resourceType:RESOURCE$2},tt=>new HomeworksResourceService(tt));const APP$1="timelinegenerator",RESOURCE$1="timelinegenerator";class TimelineGeneratorResourceService extends ResourceService{async create(et){const rt=et.thumbnail?await this.getThumbnailPath(et.thumbnail):"",st=await this.http.post("/timelinegenerator/timelines",{headline:et.name,text:et.description,icon:rt,type:"default",folder:et.folder});return this.checkHttpResponse(st),st}async update(et){const rt=await this.getThumbnailPath(et.thumbnail),st=await this.http.put(`/timelinegenerator/timeline/${et.entId}`,{headline:et.name,text:et.description,icon:rt,trashed:!!et.trashed,_id:et.entId,type:"default"});return this.checkHttpResponse(st),{thumbnail:rt,entId:et.entId}}getResourceType(){return RESOURCE$1}getApplication(){return APP$1}getFormUrl(){throw new Error("Method not implemented.")}getViewUrl(et){return`/timelinegenerator#/view/${et}`}getPrintUrl(et){return`/timelinegenerator/print#/print/${et}`}getEditUrl(){throw new Error("Method not implemented.")}getExportUrl(){throw new Error("Method not implemented.")}}ResourceService.register({application:RESOURCE$1,resourceType:RESOURCE$1},tt=>new TimelineGeneratorResourceService(tt));const APP$5="collaborativeeditor",RESOURCE$4="collaborativeeditor";class CollaborativeEditorResourceService extends ResourceService{async create(et){const{name:rt,description:st,thumbnail:nt,folder:ot}=et,at=nt?await this.getThumbnailPath(nt):"",lt=await this.http.post("/collaborativeeditor",{name:rt,description:st,thumbnail:at,folder:ot});return this.checkHttpResponse(lt),lt}async update(et){const{name:rt,description:st,thumbnail:nt,entId:ot}=et,at=await this.getThumbnailPath(nt),lt=await this.http.put(`/collaborativeeditor/${ot}`,{name:rt,description:st,thumbnail:at});return this.checkHttpResponse(lt),{thumbnail:at,entId:ot}}getResourceType(){return RESOURCE$4}getApplication(){return APP$5}getFormUrl(){throw new Error("Method not implemented.")}getViewUrl(et){return`/collaborativeeditor#/view/${et}`}getPrintUrl(){throw new Error("Method not implemented.")}getEditUrl(){throw new Error("Method not implemented.")}getExportUrl(){throw new Error("Method not implemented.")}}ResourceService.register({application:RESOURCE$4,resourceType:RESOURCE$4},tt=>new CollaborativeEditorResourceService(tt));const globalCache={},mutexPromise={};class CacheService{constructor(et){this.context=et}get http(){return this.context.http()}async fromCacheIfPossible(et,rt,st){if(mutexPromise[et]!==void 0&&await mutexPromise[et],globalCache[et])return globalCache[et];try{const nt=rt();mutexPromise[et]=nt;const ot=await nt;return st(ot)&&(globalCache[et]=ot),ot}catch(nt){throw console.error(`Failed to retrieve value for: ${et}`,nt),nt}}clearCache(et){if(et)delete globalCache[et];else for(const rt in globalCache)globalCache.hasOwnProperty(rt)&&delete globalCache[rt]}async httpGet(et,rt){return this.fromCacheIfPossible(et,async()=>{const st=await this.http.get(et,rt),nt={...this.http.latestResponse};return{value:st,response:nt}},({response:st})=>!(st.status<200||st.status>=300))}async httpGetJson(et,rt){const{response:st,value:nt}=await this.httpGet(et,rt);if(st.status<200||st.status>=300)throw`Bad http status (${st.status}) for url: ${et}`;return nt}}class ConfService{constructor(et){this.context=et}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(et){const[rt,st]=await Promise.all([this.getThemeConf(),this.getApplicationsList()]),[nt,ot]=await Promise.all([this.getTheme({conf:rt,publicTheme:st===void 0}),this.getWebAppConf({app:et,applications:st??[]})]),at={app:et,applications:st??[],conf:rt,currentApp:ot,theme:nt};return this.notify.onAppConfReady().resolve(at),at}async getPublicConf(et){const{response:rt,value:st}=await this.cache.httpGet(`/${et}/conf/public`,{queryParams:{_:configure.Platform.deploymentTag}});if(rt.status<200||rt.status>=300)throw ERROR_CODE.APP_NOT_FOUND;return st}getCdnUrl(){}async savePreference(et,rt){this.http.putJson(`/userbook/preference/${et}`,rt)}async getPreference(et){const rt=await this.http.get(`/userbook/preference/${et}`);return this.http.isResponseError()||typeof rt=="string"?{}:JSON.parse(rt.preference)}async getThemeConf(et){return await this.http.getScript("/assets/theme-conf.js",{queryParams:{v:et}},"exports.conf")}async getApplicationsList(){const et=await this.http.get("/applications-list");if(!(this.http.isResponseError()||typeof et=="string"))return et.apps}async getWebAppConf({app:et,applications:rt}){return rt.find(st=>{if(st!=null&&st.prefix)return(st==null?void 0:st.prefix.replace("/",""))===et})}async getTheme({version:et,conf:rt,publicTheme:st}){const nt=await this.http.get("/theme"),ot=st?null:nt,at=rt==null?void 0:rt.overriding.find(ft=>ot===null||ft.child===ot.themeName),lt=(ot==null?void 0:ot.skinName)||at.skins[0],ut=(ot==null?void 0:ot.skin)||`/assets/themes/${at.child}/skins/${lt}/`,ct=at.skins,dt=at.bootstrapVersion.split("-").slice(-1)[0],ht=at.parent==="panda";return{basePath:`${this.cdnDomain}${ut}../../`,bootstrapVersion:dt,is1d:ht,logoutCallback:(ot==null?void 0:ot.logoutCallback)||"/",skin:at.child,skinName:lt,skins:ct,themeName:at.child,themeUrl:ut,npmTheme:at.npmTheme??void 0}}async getLogoutCallback(et){const{response:rt,value:st}=await this.cache.httpGet("/theme",{queryParams:{_:et}});if(rt.status<200||rt.status>=300)throw ERROR_CODE.NOT_LOGGED_IN;return st.logoutCallback}}class DirectoryService{constructor(et){this.odeServices=et}get http(){return this.odeServices.http()}get cache(){return this.odeServices.cache()}getAvatarUrl(et,rt,st="100x100"){return rt==="user"?`/userbook/avatar/${et}?thumbnail=${st}`:"/assets/img/illustrations/group-avatar.svg"}getDirectoryUrl(et,rt){return rt==="user"?`/userbook/annuaire#/${et}`:`/userbook/annuaire#/group-view/${et}`}async getBookMarks(){return(await this.cache.httpGetJson("/directory/sharebookmark/all")).map(({id:et,name:rt})=>({id:et,displayName:rt,members:[]}))}async getBookMarkById(et){const{groups:rt,id:st,name:nt,users:ot}=await this.http.get(`/directory/sharebookmark/${et}`);return{id:st,displayName:nt,groups:rt.map(({name:at,id:lt})=>({displayName:at,id:lt})),users:ot.map(({displayName:at,id:lt,profile:ut})=>({profile:ut,displayName:at,firstName:"",lastName:"",login:"",id:lt}))}}async saveBookmarks(et,{bookmarks:rt,groups:st,users:nt}){this.cache.clearCache("/directory/sharebookmark/all");const ot=nt.map(ht=>typeof ht=="string"?ht:ht.id),at=st.map(ht=>typeof ht=="string"?ht:ht.id),lt=rt.map(async ht=>{if(typeof ht=="string"){const{displayName:ft,groups:xt,id:yt,users:vt}=await this.getBookMarkById(ht),Et=vt.map(St=>St.id),bt=xt.map(St=>St.id);return{displayName:ft,id:yt,members:[...bt,...Et]}}else return Promise.resolve(ht)}),ut=(await Promise.all(lt)).map(ht=>ht.members).reduce((ht,ft)=>[...ht,...ft],[]),ct={name:et,members:[...ot,...at,...ut]},{id:dt}=await this.http.postJson("/directory/sharebookmark",ct);return{id:dt,displayName:et,members:ct.members}}}const loadedScripts={};class HttpService{constructor(et,rt){n$2(this,"axios"),n$2(this,"baseUrl"),n$2(this,"headers",{}),n$2(this,"_latestResponse"),this.context=et,this.axios=axios.create(rt)}fixBaseUrl(et){return et.startsWith("http://")||et.startsWith("https://")?et:this.baseUrl?this.baseUrl.endsWith("/")||et.startsWith("/")?`${this.baseUrl}${et}`:`${this.baseUrl}/${et}`:et}useBaseUrl(et){return this.baseUrl=et,this}useHeaders(et){return this.headers=et,this}setCdn(et){et&&XMLHttpRequest&&!XMLHttpRequest.prototype.cdnUrl&&(XMLHttpRequest.prototype.cdnUrl=et,XMLHttpRequest.prototype.baseOpen=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(){const rt=arguments[1];return rt.startsWith("/infra/public")&&(arguments[1]=et+rt),/^\/([^\/]*)\/public/.test(rt)&&(arguments[1]=et+rt),rt.startsWith("/assets")&&(arguments[1]=et+rt),rt=="/conf/public"&&(arguments[1]=rt),rt.startsWith("http")&&(arguments[1]=rt),this.baseOpen.apply(this,arguments)})}toAxiosConfig(et){if(et){const rt=Object.assign({},this.axios.defaults);et.headers&&(rt.headers=Object.assign({},this.axios.defaults.headers),Object.assign(rt.headers,et.headers)),et.responseType&&(rt.responseType=et.responseType),et.queryParams&&(rt.params=Object.assign({},et.queryParams));const st=rt.headers??{};return rt.headers={...st,...this.headers},rt}else return this.axios.defaults}toCdnUrl(et){et=this.fixBaseUrl(et);const rt=this.context.conf().getCdnUrl()||"";if(rt.length>0&&et!=="/conf/public"){const st=""+et;(st.startsWith("/infra/public")||st.startsWith("/assets")||/^\/([^\/]*)\/public/.test(st))&&(et=rt+st)}return et}mapAxiosError(et,rt){et.response?this._latestResponse=et.response:et.request?this._latestResponse={status:408,statusText:ERROR_CODE.TIME_OUT}:this._latestResponse={status:500,statusText:ERROR_CODE.UNKNOWN};const{status:st,statusText:nt,headers:ot,data:at}=this._latestResponse;return rt!=null&&rt.disableNotifications||notify.events().publish(LAYER_NAME.TRANSPORT,{name:EVENT_NAME.ERROR_OCCURED,data:{params:rt,response:{status:st,statusText:nt,headers:ot},payload:at}}),at}mapAxiosResponse(et,rt){return this._latestResponse=et,et.data}get latestResponse(){return this._latestResponse}isResponseError(){return this.latestResponse.status<200||this.latestResponse.status>=300}async get(et,rt){try{const st=await this.axios.get(this.toCdnUrl(et),this.toAxiosConfig(rt));return this.mapAxiosResponse(st,rt)}catch(st){throw this.mapAxiosError(st,rt)}}async post(et,rt,st){try{const nt=await this.axios.post(this.fixBaseUrl(et),rt,this.toAxiosConfig(st));return this.mapAxiosResponse(nt,st)}catch(nt){throw this.mapAxiosError(nt,st)}}async postFile(et,rt,st){const nt=this.toAxiosConfig(st);nt.headers&&nt.headers["Content-Type"]&&delete nt.headers["Content-Type"];try{const ot=await this.axios.post(this.fixBaseUrl(et),rt,{...nt,headers:{"Content-Type":"multipart/form-data"}});return this.mapAxiosResponse(ot,st)}catch(ot){throw this.mapAxiosError(ot,st)}}async postJson(et,rt,st){const nt=this.toAxiosConfig();nt.headers&&(nt.headers["Content-Type"]="application/json");try{const ot=await this.axios.post(this.fixBaseUrl(et),rt,this.toAxiosConfig(st));return this.mapAxiosResponse(ot,st)}catch(ot){throw this.mapAxiosError(ot,st)}}async put(et,rt,st){try{const nt=await this.axios.put(this.fixBaseUrl(et),rt,this.toAxiosConfig(st));return this.mapAxiosResponse(nt,st)}catch(nt){throw this.mapAxiosError(nt,st)}}async putFile(et,rt,st){try{const nt=this.toAxiosConfig(st);nt.headers&&nt.headers["Content-Type"]&&delete nt.headers["Content-Type"];const ot=await this.axios.put(this.fixBaseUrl(et),rt,{...nt,headers:{"Content-Type":"multipart/form-data"}});return this.mapAxiosResponse(ot,st)}catch(nt){throw this.mapAxiosError(nt,st)}}async putJson(et,rt,st){const nt=this.toAxiosConfig(st);nt.headers&&(nt.headers["Content-Type"]="application/json");try{const ot=await this.axios.put(this.fixBaseUrl(et),rt,nt);return this.mapAxiosResponse(ot,st)}catch(ot){throw this.mapAxiosError(ot,st)}}async delete(et,rt){try{const st=await this.axios.delete(this.fixBaseUrl(et),this.toAxiosConfig(rt));return this.mapAxiosResponse(st,rt)}catch(st){throw this.mapAxiosError(st,rt)}}async deleteJson(et,rt){try{const st=await this.axios.delete(this.fixBaseUrl(et),{data:rt});return this.mapAxiosResponse(st)}catch(st){throw this.mapAxiosError(st)}}getScript(et,rt,st){const nt=st??"exports",ot=this.toAxiosConfig(rt);return ot.headers&&(ot.headers.Accept="application/javascript"),this.axios.get(this.toCdnUrl(et),ot).then(at=>this.mapAxiosResponse(at,rt)).then(at=>{try{const lt=`"use strict";var ${nt.split(".")[0]}={};${at};return ${nt};`;return Function(lt)()}catch{return at}}).catch(at=>{throw this.mapAxiosError(at,rt),at})}loadScript(et,rt){return loadedScripts[et]?Promise.resolve():this.getScript(et,rt).then(st=>{loadedScripts[et]=!0})}}class RightService{constructor(et){this.context=et}get session(){return this.context.session()}parseResourceRight(et){const rt=et.split(":");if(rt.length===2){if(rt[0]==="creator")return{id:rt[1],right:"creator",type:"creator"}}else return rt.length===3?{id:rt[1],right:rt[2],type:rt[0]}:void 0}parseResourceRights(et){return et.map(rt=>this.parseResourceRight(rt)).filter(rt=>rt!==void 0)}hasResourceRight({id:et,groupIds:rt},st,nt){const ot=nt.map(at=>typeof at=="string"?this.parseResourceRight(at):at).filter(at=>at!==void 0);for(const at of ot)if(at.id===et&&at.type==="creator"||at.id===et&&at.type==="user"&&at.right===st||rt.includes(at.id)&&at.type==="group"&&at.right===st)return!0;return!1}async sessionHasResourceRight(et,rt){try{const st=await this.session.getUser();return!!st&&this.hasResourceRight({groupIds:st.groupsIds,id:st.userId},et,rt)}catch(st){return console.error(`Unexpected error ${st} in sessionHasResourceRight()`),!1}}async sessionHasAtLeastOneResourceRight(et,rt){for(const st of et)if(await this.sessionHasResourceRight(st,rt))return!0;return!1}async sessionHasResourceRightForEachList(et,rt){let st=0;for(const nt of rt)await this.sessionHasResourceRight(et,nt)&&st++;return st===rt.length}async sessionHasAtLeastOneResourceRightForEachList(et,rt){for(const st of et){let nt=0;for(const ot of rt)await this.sessionHasResourceRight(st,ot)&&nt++;if(nt===rt.length)return!0}return!1}hasWorkflowRight(et,rt){return rt.findIndex(st=>st===et)!==-1}async sessionHasWorkflowRight(et){try{const rt=await this.session.getUser();return!!rt&&this.hasWorkflowRight(et,rt.authorizedActions.map(st=>st.name))}catch(rt){return console.error(`Unexpected error ${rt} in sessionHasWorkflowRight()`),!1}}async sessionHasWorkflowRights(et){const rt={};try{const st=await this.session.getUser();for(const nt of et)rt[nt]=!!st&&this.hasWorkflowRight(nt,st.authorizedActions.map(ot=>ot.name))}catch(st){console.error(`Unexpected error ${st} in sessionHasWorkflowRights()`);for(const nt of et)rt[nt]=!1}return rt}}class SessionService{constructor(et){this.context=et}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(){const et=await this.getUser(),[rt,st,nt,ot,at]=await Promise.all([this.getCurrentLanguage(et),this.latestQuotaAndUsage(et),this.loadDescription(et),this.getUserProfile(),this.getBookmarks(et)]);return{user:et,quotaAndUsage:st,currentLanguage:rt,userDescription:nt,userProfile:ot,bookmarkedApps:at}}login(et,rt,st,nt){const ot=new FormData;return ot.append("email",et),ot.append("password",rt),typeof st<"u"&&ot.append("rememberMe",""+st),typeof nt<"u"&&ot.append("secureLocation",""+nt),this.http.post("/auth/login",ot,{headers:{"content-type":"application/x-www-form-urlencoded"}}).finally(()=>{switch(this.http.latestResponse.status){case 200:throw ERROR_CODE.MALFORMED_DATA}})}async logout(){const et=await this.conf.getLogoutCallback();return this.http.get("/auth/logout?callback="+et).finally(()=>{})}async latestQuotaAndUsage(et){const rt={quota:0,storage:0};if(!et)return rt;try{return await this.http.get(`/workspace/quota/user/${et==null?void 0:et.userId}`)}catch(st){return console.error(st),rt}}async getCurrentLanguage(et){const rt=(et==null?void 0:et.sessionMetadata)&&(et==null?void 0:et.sessionMetadata.userId);try{let st;return rt?st=await this.loadUserLanguage():st=await this.loadDefaultLanguage(),st}catch(st){console.error(st)}}async loadUserLanguage(){try{const et=await this.http.get("/userbook/preference/language");return JSON.parse(et.preference)["default-domain"]}catch{return await this.loadDefaultLanguage()}}async loadDefaultLanguage(){return(await this.cache.httpGetJson("/locale")).locale}async getUser(){const{response:et,value:rt}=await this.cache.httpGet("/auth/oauth2/userinfo");if(!(et.status<200||et.status>=300)&&typeof rt=="object")return rt;throw ERROR_CODE.NOT_LOGGED_IN}hasWorkflow({workflowName:et,user:rt}){return et===void 0||(rt==null?void 0:rt.authorizedActions.findIndex(st=>st.name===et))!==-1}async loadDescription(et){if(!et)return{};try{const[rt,st]=await Promise.all([this.getUserProfile({options:{requestName:"refreshAvatar"}}),this.http.get("/directory/userbook/"+(et==null?void 0:et.userId))]);return{...st,profiles:rt}}catch(rt){return console.error(rt),{}}}async getBookmarks(et){if(!et)return[];const rt=await this.http.get("/userbook/preference/apps");rt.preference||(rt.preference=null);const st=JSON.parse(rt.preference);let nt;nt=st,nt||(nt={bookmarks:[],applications:[]});const ot=[];return nt.bookmarks.forEach((at,lt)=>{const ut=((et==null?void 0:et.apps)||[]).find(ct=>ct.name===at);if(ut){const ct=Object.assign({},ut);ot.push(ct)}}),ot}async getUserProfile(et={}){var rt,st;const{options:nt={},params:ot={}}=et,at=new URLSearchParams(ot).toString(),lt=`/userbook/api/person${at?`?${at}`:""}`,{response:ut,value:ct}=await this.cache.httpGet(lt,nt);return ut.status<200||ut.status>=300||typeof ct=="string"?["Guest"]:((st=(rt=ct==null?void 0:ct.result)==null?void 0:rt[0])==null?void 0:st.type)||["Guest"]}async isAdml(){const et=await this.getUser();return(et==null?void 0:et.functions.ADMIN_LOCAL)!==void 0}async getWebApp(et){const rt=await this.getUser();return rt==null?void 0:rt.apps.find(st=>{var nt;return st!=null&&st.prefix?(st==null?void 0:st.prefix.replace("/",""))===et||!1:st!=null&&st.address&&((nt=st.address)==null?void 0:nt.split("/")[1])===et||!1})}}const 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}];class IdiomService{constructor(et){this.context=et}get http(){return this.context.http()}async getIdiom(et,rt){await Promise.all([this.addBundlePromise(et,"/i18n"),this.addBundlePromise(et,`/${rt}/i18n`)])}translate(et,rt){et=et??"";let st=bundle[et]===void 0?et:bundle[et];if(rt&&typeof rt=="object")for(const nt in rt)typeof rt[nt]<"u"&&(st=st.replace(new RegExp("\\${"+nt+"}","g"),""+rt[nt]));return st}addBundlePromise(et,rt){return this.loadBundlePromise(et,rt)}addBundle(et,rt,st){this.loadBundle(et,rt,st)}loadBundlePromise(et,rt){return this.loadBundle(et,rt),promises[rt]}loadBundle(et,rt,st){const nt=promises[rt];if(nt)st&&nt.then(st).catch(st);else{const ot=new Promisified;promises[rt]=ot.promise;const at={};et&&(at["Accept-Language"]=et),this.http.get(rt,{headers:at}).then(lt=>{Object.assign(bundle,lt),typeof st=="function"&&st(),ot.resolve()}).catch(lt=>{typeof st=="function"&&st(),ot.reject()})}}addTranslations(et,rt){notify.onLangReady().promise.then(st=>{this.loadBundle(st,et+"/"+st+".json",rt)})}addAllTranslations(et){return et&&et.length>0?notify.onLangReady().promise.then(rt=>Promise.all(et.map(st=>this.loadBundlePromise(rt,st+"/"+rt+".json")))).then(()=>{}):Promise.reject()}addKeys(et){for(const rt in et)typeof bundle[rt]!="string"&&(bundle[rt]=et[rt])}removeAccents(et){for(let rt=0;rt<defaultDiacriticsRemovalMap.length;rt++)et=et.replace(defaultDiacriticsRemovalMap[rt].letters,defaultDiacriticsRemovalMap[rt].base);return et}}class StringUtils{static removeAccents(et){for(let rt=0;rt<defaultDiacriticsRemovalMap.length;rt++)et=et.replace(defaultDiacriticsRemovalMap[rt].letters,defaultDiacriticsRemovalMap[rt].base);return et}}class ShareService{constructor(et){this.context=et}get directory(){return this.context.directory()}get http(){return this.context.http()}get cache(){return this.context.cache()}async searchShareSubjects(et,rt,st){const nt=StringUtils.removeAccents(st).toLowerCase(),ot=await this.cache.httpGetJson(`/${et}/share/json/${rt}?search=${st}`),at=ot.users.visibles.filter(({username:ut,firstName:ct,lastName:dt,login:ht})=>{const ft=StringUtils.removeAccents(dt||"").toLowerCase(),xt=StringUtils.removeAccents(ct||"").toLowerCase(),yt=StringUtils.removeAccents(ut||"").toLowerCase(),vt=StringUtils.removeAccents(ht||"").toLowerCase();return yt.includes(nt)||xt.includes(nt)||ft.includes(nt)||vt.includes(nt)}).map(ut=>({avatarUrl:this.directory.getAvatarUrl(ut.id,"user"),directoryUrl:this.directory.getDirectoryUrl(ut.id,"user"),displayName:ut.username,id:ut.id,profile:ut.profile,type:"user"})),lt=ot.groups.visibles.filter(({name:ut})=>StringUtils.removeAccents(ut||"").toLowerCase().includes(nt)).map(ut=>({avatarUrl:this.directory.getAvatarUrl(ut.id,"group"),directoryUrl:this.directory.getDirectoryUrl(ut.id,"group"),displayName:ut.name,id:ut.id,type:"group",structureName:ut.structureName}));return[...(await this.directory.getBookMarks()).filter(({displayName:ut})=>StringUtils.removeAccents(ut||"").toLowerCase().includes(nt)).map(ut=>({avatarUrl:"",directoryUrl:"",profile:"",displayName:ut.displayName,id:ut.id,type:"sharebookmark"})),...at,...lt]}async getShareMapping(et){const rt=await this.cache.httpGetJson(`/${et}/rights/sharing`);for(const st of Object.keys(rt))if(st.includes(".")){const nt=st.split(".")[1],ot=rt[st];delete rt[st],rt[nt]=ot}return rt}getActionsAvailableFor({id:et,type:rt},st,nt){const ot=(rt==="user"?st.users.checked[et]:st.groups.checked[et])||[],at=Object.keys(nt),lt=[];for(const ut of at)nt[ut].filter(ct=>ot.includes(ct)).length>0&&lt.push(ut);return lt}async getRightsForResource(et,rt){const st=await this.directory.getBookMarks(),nt=`/${et}/share/json/${rt}?search=`,ot=await this.cache.httpGetJson(nt),at=await this.getShareMapping(et),lt=await this.cache.httpGetJson("/infra/public/json/sharing-rights.json"),ut=Object.keys(ot.users.checked).map(xt=>ot.users.visibles.find(yt=>yt.id===xt)).filter(xt=>xt!==void 0).map(xt=>{const yt=this.getActionsAvailableFor({id:xt.id,type:"user"},ot,at);return{id:xt.id,type:"user",displayName:xt.username,profile:xt.profile,avatarUrl:this.directory.getAvatarUrl(xt.id,"user"),directoryUrl:this.directory.getDirectoryUrl(xt.id,"user"),actions:yt.map(vt=>{const Et=lt[vt];return{displayName:vt,id:vt,priority:Et.priority}})}}).sort((xt,yt)=>(xt.displayName||"").localeCompare(yt.displayName)),ct=Object.keys(ot.groups.checked).map(xt=>ot.groups.visibles.find(yt=>yt.id===xt)).filter(xt=>xt!==void 0).map(xt=>{const yt=this.getActionsAvailableFor({id:xt.id,type:"group"},ot,at);return{id:xt.id,type:"group",displayName:xt.name,profile:void 0,avatarUrl:this.directory.getAvatarUrl(xt.id,"group"),directoryUrl:this.directory.getDirectoryUrl(xt.id,"group"),actions:yt.map(vt=>{const Et=lt[vt];return{displayName:vt,id:vt,priority:Et.priority}})}}).sort((xt,yt)=>(xt.displayName||"").localeCompare(yt.displayName)),dt=[...ut,...ct],ht=ot.groups.visibles.map(({groupDisplayName:xt,id:yt,name:vt})=>({displayName:xt||vt,id:yt})),ft=ot.users.visibles.map(({id:xt,profile:yt,username:vt,firstName:Et,lastName:bt,login:St})=>({displayName:vt,firstName:Et,lastName:bt,login:St,profile:yt,id:xt}));return{rights:dt,visibleBookmarks:st,visibleGroups:ht,visibleUsers:ft}}async saveRights(et,rt,st){const nt=await this.getShareMapping(et),ot={bookmarks:{},groups:{},users:{}};for(const lt of st){const ut=lt.actions.map(dt=>nt[dt.id]).reduce((dt,ht)=>Array.isArray(ht)?[...dt,...ht]:dt,[]),ct=[...new Set(ut)];ct.length>0&&(lt.type==="user"?ot.users[lt.id]=ct:lt.type==="group"?ot.groups[lt.id]=ct:ot.bookmarks[lt.id]=ct)}const at=`/${et}/share/resource/${rt}`;return this.cache.clearCache(`/${et}/share/json/${rt}?search=`),await this.http.putJson(at,ot)}async getActionsForApp(et){const rt=await this.cache.httpGetJson("/infra/public/json/sharing-rights.json"),st=await this.getShareMapping(et);return Object.keys(rt).map(nt=>{const ot=rt[nt];return{displayName:nt,id:nt,priority:ot.priority,requires:ot.requires}}).filter(nt=>{var ot;return((ot=st[nt.id])==null?void 0:ot.length)>0}).sort((nt,ot)=>nt.priority-ot.priority)}}const defaultMappers={csv:function({type:tt,extension:et}){return a$2.INSTANCE.isCsvLike(tt,et)},doc:function({type:tt,extension:et}){return a$2.INSTANCE.isWordLike(tt,et)?!0:tt.indexOf("document")!==-1&&tt.indexOf("wordprocessing")!==-1},xls:function({type:tt,extension:et}){return a$2.INSTANCE.isExcelLike(tt,et)?!0:tt.indexOf("document")!==-1&&tt.indexOf("spreadsheet")!==-1||tt.indexOf("ms-excel")!==-1},img:function({type:tt}){return tt.indexOf("image")!==-1},pdf:function({type:tt}){return tt.indexOf("pdf")!==-1||tt==="application/x-download"},ppt:function({type:tt,extension:et}){return a$2.INSTANCE.isPowerpointLike(tt,et)?!0:tt.indexOf("document")!==-1&&tt.indexOf("presentation")!==-1||tt.indexOf("powerpoint")!==-1},txt:function({type:tt,extension:et}){return a$2.INSTANCE.isTxtLike(tt,et)},md:function({type:tt,extension:et}){return a$2.INSTANCE.isMdLike(tt,et)},video:function({type:tt}){return tt.indexOf("video")!==-1},audio:function({type:tt}){return tt.indexOf("audio")!==-1},zip:function({type:tt}){return tt.indexOf("zip")!==-1||tt.indexOf("rar")!==-1||tt.indexOf("tar")!==-1||tt.indexOf("7z")!==-1}},R$2=class sm{static getRole(et){var rt,st;return sm.role((rt=et.metadata)==null?void 0:rt["content-type"],!1,(st=et.metadata)==null?void 0:st.extension)}static role(et,rt=!1,st){if(st&&(st=st.trim()),!et)return"unknown";this.roleMappers||console.warn("[DocumentHelper.role] should not have empty roles",this);const nt={type:et,previewRole:rt,extension:st};for(const ot of this.roleMappers){const at=ot(nt);if(at)return at}return"unknown"}};n$2(R$2,"roleMappers",[tt=>Object.keys(defaultMappers).find(et=>defaultMappers[et](tt))]);let DocumentHelper=R$2;class WorkspaceService{constructor(et){this.context=et}get http(){return this.context.http()}extractMetadata(et){const rt=et.name||"",st=rt.split("."),nt=et.type||"application/octet-stream",ot=st.length>1?st[st.length-1]:"",at={"content-type":nt,filename:rt,size:et.size,extension:ot,role:DocumentHelper.role(nt,!1,ot)},lt=rt.replace("."+at.extension,""),ut=at.extension?lt+"."+at.extension:lt;return{basename:lt,fullname:ut,metadata:at}}async saveFile(et,rt){const{fullname:st,metadata:nt}=this.extractMetadata(et),ot=new FormData;ot.append("file",et,st);const at=[];((rt==null?void 0:rt.visibility)==="public"||(rt==null?void 0:rt.visibility)==="protected")&&at.push(`${rt.visibility}=true`),rt!=null&&rt.application&&at.push(`application=${rt.application}`),nt.role==="img"&&at.push("quality=1"),rt!=null&&rt.parentId&&at.push(`parentId=${rt.parentId}`);const lt=await this.http.postFile(`/workspace/document?${at.join("&")}`,ot);if(this.http.isResponseError())throw this.http.latestResponse.statusText;return lt}async updateFile(et,rt,st){const{fullname:nt,metadata:ot}=this.extractMetadata(rt),at=new FormData;at.append("file",rt,nt);const lt=[];ot.role==="img"&&lt.push("quality=1"),st!=null&&st.alt&&lt.push(`alt=${st.alt}`),st!=null&&st.legend&&lt.push(`legend=${st.legend}`),st!=null&&st.name&&lt.push(`name=${st.name}`);const ut=await this.http.putFile(`/workspace/document/${et}?${lt.join("&")}`,at);if(this.http.isResponseError())throw this.http.latestResponse.statusText;return ut}async deleteFile(et){const rt=et.map(st=>st._id);if(rt.length==0)Promise.resolve(null);else if(await this.http.deleteJson("/workspace/documents",{ids:rt}),this.http.isResponseError())throw this.http.latestResponse.statusText}async acceptDocuments(et){const rt=await this.context.session().getUser();return st=>st.deleted&&st.trasher?(rt==null?void 0:rt.userId)==st.trasher:!0}async searchDocuments(et){const rt=et.filter!=="external"||et.parentId?await this.http.get("/workspace/documents",{queryParams:{...et,_:new Date().getTime()}}):[],st=await this.acceptDocuments(et);return rt.filter(st)}async listDocuments(et,rt){return this.searchDocuments({filter:et,parentId:rt,includeall:!0})}async transferDocuments(et,rt,st="protected"){const nt=[];if(et.forEach(ot=>{(st==="public"&&!ot.public||!ot.public&&!ot.protected)&&nt.push(ot)}),nt.length>0){const ot=await this.http.post("/workspace/documents/transfer",{application:rt,visibility:st,ids:nt.map(at=>at._id)});if(this.http.isResponseError())throw this.http.latestResponse.statusText;return nt.forEach((at,lt)=>{const ut=et.findIndex(ct=>ct._id===at._id);0<=ut&&ut<et.length&&(et[ut]=ot[lt])}),et.filter(at=>!!at)}return et}getThumbnailUrl(et,rt=0,st=0){var nt,ot;const at=rt>0||st>0?`${rt}x${st}`:"120x120";if(typeof et=="string")return et.includes("data:image")||et.includes("thumbnail")?et:`${et}${et.includes("?")?"&":"?"}thumbnail=${at}`;{const lt=`/workspace/${et.public?"pub/":""}document/${et._id}?thumbnail=`,ut=et.thumbnails;if((ot=(nt=et.metadata)==null?void 0:nt["content-type"])!=null&&ot.includes("video")){const ct=ut&&Object.keys(ut).length>0?Object.keys(ut)[0]:null;return ct?lt+ct:null}else return lt+at}}}let ATTag;class AnalyticsService{constructor(tt){this.context=tt}get http(){return this.context.http()}get session(){return this.context.session()}async trackPageLoad(tt,et){const[rt]=await Promise.all([this.getXitiConfig(et.name.toLowerCase()),this.loadXitiScript()]);if(!rt||!ATInternet)return;let st=rt.LIBELLE_SERVICE.default||null;for(const nt in rt.LIBELLE_SERVICE)if(nt!=="default"&&tt.indexOf(nt)>=0){st=rt.LIBELLE_SERVICE[nt];break}ATTag=new ATInternet.Tracker.Tag({site:rt.STRUCT_ID}),ATTag.setProps({SERVICE:st,TYPE:rt.TYPE,OUTIL:rt.OUTIL,UAI:rt.STRUCT_UAI,PROJET:rt.PROJET,EXPLOITANT:rt.EXPLOITANT,PLATEFORME:rt.PLATFORME,PROFIL:rt.PROFILE},!0),ATTag.identifiedVisitor.set({id:rt.ID_PERSO,category:rt.PROFILE}),ATTag.page.set({name:(et==null?void 0:et.prefix)==="userbook"?"directory":et==null?void 0:et.prefix,chapter1:"",chapter2:"",chapter3:"",level2:rt.STRUCT_UAI}),ATTag.dispatch()}async getXitiConfig(tt){const[et,rt]=await Promise.all([this.http.get("/analyticsConf"),this.http.get("/xiti/config")]);if(!(et!=null&&et.type))throw ERROR_CODE.MALFORMED_DATA;return rt!=null&&rt.active&&(et.xiti=await this.getXitiTrackingParams(rt,tt)),et.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(tt,et){if(!tt.structureMap||!et)return;const rt=await this.session.getUser(),st=await this.session.getUserProfile();let nt;if(!(rt!=null&&rt.structures))return;for(const ct of rt.structures){const dt=tt.structureMap[ct];if(dt&&dt.collectiviteId&&dt.UAI){nt=dt;break}}if(!nt||!nt.active)return;const ot=await configure.Platform.apps.getPublicConf(et);if(!ot)return;const at=ot.xiti;if(!at||!at.LIBELLE_SERVICE||!nt.UAI)return;function lt(ct){let dt="";for(let ht=0;ht<ct.length;ht++)dt+=ct.charCodeAt(ht);return dt}const ut={Student:"ELEVE",Teacher:"ENSEIGNANT",Relative:"PARENT",Personnel:"ADMIN_VIE_SCOL_TECH",Guest:"AUTRE"};return{LIBELLE_SERVICE:at.LIBELLE_SERVICE,TYPE:at.OUTIL?"TIERS":"NATIF",OUTIL:at.OUTIL?at.OUTIL:"",STRUCT_ID:nt.collectiviteId,STRUCT_UAI:nt.UAI,PROJET:nt.projetId?nt.projetId:tt.ID_PROJET,EXPLOITANT:tt.ID_EXPLOITANT,PLATFORME:nt.plateformeId?nt.plateformeId:tt.ID_PLATEFORME,ID_PERSO:lt(rt.userId),PROFILE:st&&st.length>0?ut[st[0]]??"":""}}}const w$1=class X0{constructor(et){this.context=et}get http(){return this.context.http()}get conf(){return this.context.conf()}async getVideoConf(){var et;const rt=await this.conf.getPublicConf(APP$4.VIDEO);return{maxWeight:(rt==null?void 0:rt["max-videosize-mbytes"])??X0.MAX_WEIGHT,maxDuration:(rt==null?void 0:rt["max-videoduration-minutes"])??X0.MAX_DURATION,acceptVideoUploadExtensions:((et=rt==null?void 0:rt["accept-videoupload-extensions"])==null?void 0:et.map(st=>st.toUpperCase()))??[]}}async upload({data:et,appCode:rt,captation:st,duration:nt}){if(!et.file)throw new Error("Invalid video file.");if(!et.filename)throw new Error("Invalid video filename");const ot=`${et.browser.name} ${et.browser.version}`,at=new FormData;at.append("device",et.device||""),at.append("browser",ot),at.append("url",et.url),at.append("app",rt),at.append("file",et.file,et.filename),at.append("weight",""+et.file.size),at.append("captation",""+st);let lt=`/video/encode?captation=${st}`;nt&&(lt+=`&duration=${nt}`);const ut=await this.http.post(lt,at,{headers:{"Content-Type":"multipart/form-data"}});if(ut.state=="running"){let ct=0,dt=1;do{const ht=dt+ct;await new Promise(xt=>setTimeout(xt,ht*1e3)),ct=dt,dt=Math.min(8,ht);const ft=await this.http.get(`/video/status/${ut.processid}`);if(ft.state=="succeed")return ft.videoworkspaceid&&ft.videosize&&this.context.data().trackVideoSave(ft.videoworkspaceid,Math.round(nt),ft.videosize,st,et.url,ot,et.device),ft;if(ft.state=="error")break}while(!0)}throw new Error("Video cannot be uploaded.")}};n$2(w$1,"MAX_WEIGHT",50),n$2(w$1,"MAX_DURATION",3);let VideoService=w$1;class EmbedderService{constructor(et){this.context=et}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(et,rt){for(const st of et)if(this.isUrlFromProvider(rt,st))return st}urlIsFromPattern(et,rt){const st=new RegExp("[^{}]+(?=(?:[^{}]*{[^}]*})*[^}]*$)","g"),nt=new RegExp("{[^}]*}","g");let ot=!0;const at=rt.match(st)||[],lt=[];return(rt.match(nt)||[]).forEach((ut,ct)=>{ut.includes("ignore")||lt.push(at[ct])}),lt.forEach(ut=>{if(!et.includes(ut)){ot=!1;return}}),ot}isUrlFromProvider(et,rt){typeof rt.url=="string"&&(rt.url=[rt.url]);for(const st of rt.url)if(this.urlIsFromPattern(et,st))return!0;return!1}getEmbedCodeForProvider(et,rt){for(const st of et.url)if(this.urlIsFromPattern(rt,st)){const nt=new RegExp("{[a-zA-Z0-9_.]+}","g"),ot=st.match(nt)||[];let at=et.embed;for(const lt of ot){let ut=st.split(lt)[0];const ct=ut.split("}");ct.length>1&&(ut=ct[ct.length-1]);let dt=rt.split(ut)[1];if(!dt)continue;const ht=st.split(lt)[1].split("{")[0];ht&&(dt=dt.split(ht)[0]);const ft=new RegExp("\\"+lt.replace(/}/,"\\}"),"g");at=at.replace(ft,dt)}return at}return""}}class AbstractBehaviourService{constructor(et){n$2(this,"_cache"),this.context=et,this._cache=new CacheService(this.context)}getApplication(){return this.APP}getResourceType(){return this.RESOURCE}httpGet(et,rt){return this._cache.httpGetJson(et,rt)}dataToResource({modified:et,...rt}){const st=typeof et=="string"?et:et!=null&&et.$date?""+et.$date:"";return{application:this.RESOURCE,name:rt.title,creatorId:rt.owner,creatorName:rt.ownerName,thumbnail:rt.icon,assetId:rt._id,modifiedAt:st,shared:rt.shared,path:rt.path}}}class ActualitesBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","actualites"),n$2(this,"RESOURCE","actualites")}async loadResources(){return(await this.httpGet("/actualites/linker/infos")).map(et=>{let rt;return et.thread_icon?rt=et.thread_icon+"?thumbnail=48x48":rt="/img/icons/glyphicons_036_file.png",this.dataToResource({title:et.title+" ["+et.thread_title+"]",ownerName:et.username,owner:et.owner,icon:rt,path:"/actualites#/view/thread/"+et.thread_id+"/info/"+et._id,_id:`${et.thread_id}#${et._id}`,shared:!!(et.shared&&et.shared.length>=0),modified:et.modified})})}}class BlogBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","blog"),n$2(this,"RESOURCE","blog")}loadResources(){return new Promise(async(et,rt)=>{try{const st=await this.httpGet("/blog/linker"),nt=[];st.forEach(ot=>{ot.thumbnail?ot.thumbnail=ot.thumbnail+"?thumbnail=48x48":ot.thumbnail="/img/illustrations/blog.svg";const at=ot.fetchPosts.map(lt=>this.dataToResource({owner:ot.author.userId,ownerName:ot.author.username,title:lt.title+" ["+ot.title+"]",_id:`${ot._id}#${lt._id}`,icon:ot.thumbnail,path:`/blog/id/${ot._id}/post/${lt._id}`,shared:!!(ot.shared&&ot.shared.length>=0),modified:ot.modified}));nt.push(...at)}),et(nt)}catch(st){rt(st)}})}}class CollaborativewallBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","collaborativewall"),n$2(this,"RESOURCE","collaborativewall")}async loadResources(){return(await this.httpGet("/collaborativewall/list/all")).map(et=>this.dataToResource({title:et.name,ownerName:et.owner.displayName,owner:et.owner.userId,icon:et.icon?et.icon:"/img/illustrations/collaborative-wall-default.png",path:"/collaborativewall#/view/"+et._id,_id:et._id,shared:!!(et.shared&&et.shared.length>=0),modified:et.modified}))}}class CommunityBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","community"),n$2(this,"RESOURCE","community")}async loadResources(){return(await this.httpGet("/community/listallpages")).map(et=>{let rt;return typeof et.thumbnail>"u"||et.thumbnail===""?rt="/img/icons/glyphicons_036_file.png":rt=et.thumbnail+"?thumbnail=48x48",this.dataToResource({title:et.name,icon:rt,path:"/community#/view/"+et.id,_id:et.id,owner:"",ownerName:"",shared:!!(et.shared&&et.shared.length>=0),modified:et.name})})}}class ExercizerBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","exercizer"),n$2(this,"RESOURCE","exercizer")}async loadResources(){return(await this.httpGet("/exercizer/subjects-scheduled")).map(et=>{const rt=et.picture?et.picture+"?thumbnail=48x48":"/img/illustrations/exercizer.svg";let st,nt=!1;const ot=JSON.parse(et.scheduled_at);return ot.groupList.length>0?(nt=!0,st=ot.groupList[0].name):ot.userList.length>0?(nt=!0,st=ot.userList[0].name):st="",ot.groupList.length+ot.userList.length>1&&(st+="..."),this.dataToResource({title:et.title,owner:et.owner,ownerName:st,icon:rt,path:"/exercizer#/linker/"+et.id,_id:""+et.id,shared:nt,modified:et.modified})})}}class FormulaireBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","formulaire"),n$2(this,"RESOURCE","formulaire")}async loadResources(){return(await this.httpGet("/formulaire/forms/linker")).map(et=>(et.picture||(et.picture="/formulaire/public/img/logo.svg"),this.dataToResource({_id:""+et.id,icon:et.picture,title:et.title,ownerName:et.owner_name,owner:et.owner_id,path:et.is_public?`${window.location.origin}/formulaire-public#/form/${et.public_key}`:`${window.location.origin}/formulaire#/form/${et.id}/${et.rgpd?"rgpd":"new"}`,shared:!!(et.shared&&et.shared.length>=0),modified:""+et.date_modification})))}}class ForumBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","forum"),n$2(this,"RESOURCE","forum")}async loadResources(){return(await this.httpGet("/forum/categories")).map(et=>this.dataToResource({_id:et._id,title:et.name,icon:et.icon||"/img/illustrations/forum.svg",path:"/forum#/view/"+et._id,ownerName:et.owner.displayName,owner:et.owner.userId,shared:!!(et.shared&&et.shared.length>=0),modified:et.modified}))}}class HomeworksBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","homeworks"),n$2(this,"RESOURCE","homeworks")}async loadResources(){return(await this.httpGet("/homeworks/list")).filter(et=>et.owner&&et.trashed===0).map(et=>this.dataToResource({title:et.title,ownerName:et.owner.displayName,owner:et.owner.userId,icon:et.thumbnail||"/img/illustrations/homeworks.svg",path:"/homeworks#/view-homeworks/"+et._id,_id:""+et._id,shared:typeof et.shared<"u",modified:et.modified}))}}class MagnetoBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","magneto"),n$2(this,"RESOURCE","magneto")}async loadResources(){const{all:et}=await this.httpGet("/magneto/boards/editable");return et.map(rt=>this.dataToResource({_id:rt._id,title:rt.title,icon:rt.imageUrl,owner:rt.ownerId,ownerName:rt.ownerName,path:`/magneto#/board/${rt._id}/view`,shared:!!(rt.shared&&rt.shared.length>=0),modified:""+rt.modificationDate}))}}class MindmapBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","mindmap"),n$2(this,"RESOURCE","mindmap")}async loadResources(){return(await this.httpGet("/mindmap/list/all")).map(et=>this.dataToResource({title:et.name,ownerName:et.owner.displayName,owner:et.owner.userId,icon:et.thumbnail||"/img/illustrations/mindmap-default.png",path:"/mindmap#/view/"+et._id,_id:et._id,shared:!!(et.shared&&et.shared.length>=0),modified:et.modified}))}}class PagesBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","pages"),n$2(this,"RESOURCE","pages")}async loadResources(){const et=await this.httpGet("/pages/list/all"),rt=[];return et.forEach(st=>{var nt;const ot=st.thumbnail?st.thumbnail+"?thumbnail=48x48":"/img/illustrations/pages.svg";rt.push(this.dataToResource({title:st.title,owner:st.owner.userId,ownerName:st.owner.displayName,icon:ot,path:"/pages#/website/"+st._id,_id:st._id,shared:typeof st.shared<"u",modified:st.modified})),(nt=st.pages)==null||nt.forEach(at=>{rt.push(this.dataToResource({title:at.title,owner:st.owner.userId,ownerName:st.owner.displayName,icon:ot,path:"/pages#/website/"+st._id+"/"+at.titleLink,_id:st._id+"/"+at.titleLink,shared:typeof st.shared<"u",modified:st.modified}))})}),rt}}class PollBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","poll"),n$2(this,"RESOURCE","poll")}async loadResources(){return(await this.httpGet("/poll/list/all")).map(et=>{const rt=et.icon?et.icon+"?thumbnail=48x48":"/img/icons/glyphicons_036_file.png";return this.dataToResource({title:et.question,ownerName:et.owner.displayName,icon:rt,path:"/poll#/view/"+et._id,_id:et._id,owner:et.owner.userId,shared:!!(et.shared&&et.shared.length>=0),modified:et.modified})})}}class ScrapbookBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","scrapbook"),n$2(this,"RESOURCE","scrapbook")}async loadResources(){return(await this.httpGet("/scrapbook/list/all")).map(et=>{const rt=et.icon||"/img/illustrations/scrapbook.svg";return this.dataToResource({title:et.name,owner:et.owner.userId,ownerName:et.owner.displayName,icon:rt,path:"/scrapbook#/view-scrapbook/"+et._id,_id:et._id,shared:!!(et.shared&&et.shared.length>=0),modified:et.modified})})}}class TimelinegeneratorBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","timelinegenerator"),n$2(this,"RESOURCE","timelinegenerator")}loadResources(){return new Promise(async(et,rt)=>{try{const st=(await this.httpGet("/timelinegenerator/timelines")).map(nt=>{const ot=nt.icon||"/img/illustrations/timeline-default.png";return this.dataToResource({title:nt.headline,ownerName:nt.owner.displayName,owner:nt.owner.userId,icon:ot,path:"/timelinegenerator#/view/"+nt._id,_id:nt._id,shared:typeof nt.shared<"u",modified:nt.modified})});et(st)}catch(st){rt(st)}})}}class WikiBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","wiki"),n$2(this,"RESOURCE","wiki")}async loadResources(){return(await this.httpGet("/wiki/listallpages?visible=true")).map(et=>et.pages.map(rt=>{let st;return typeof et.thumbnail>"u"||et.thumbnail===""?st="/img/icons/glyphicons_036_file.png":st=et.thumbnail+"?thumbnail=48x48",this.dataToResource({title:rt.title+" ["+et.title+"]",ownerName:et.owner.displayName,owner:et.owner.userId,icon:st,path:"/wiki#/view/"+et._id+"/"+rt._id,_id:`${et._id}#${rt._id}`,shared:typeof et.shared<"u",modified:rt.modified})})).flat()}}class WorkspaceBehaviour extends AbstractBehaviourService{constructor(){super(...arguments),n$2(this,"APP","workspace"),n$2(this,"RESOURCE","workspace")}loadResources({search:et,asset_id:rt}){return new Promise(async(st,nt)=>{try{let ot="/workspace/documents?filter=all&hierarchical=true";rt&&rt.length?ot+=`&search=${et}`:et&&et.length&&(ot+=`&search=${et}`);const at=(await this.httpGet(ot)).filter(lt=>!lt.deleted).map(lt=>{const ut=lt.metadata["content-type"]&&lt.metadata["content-type"].indexOf("image")!==-1?`/workspace/document/${lt._id}?thumbnail=120x120`:"/img/icons/unknown-large.png";return this.dataToResource({title:lt.name,ownerName:lt.ownerName,owner:lt.owner,icon:ut,path:`/workspace/document/${lt._id}`,_id:lt._id,shared:!!(lt.shared&&lt.shared.length>=0),modified:lt.modified})});st(at)}catch(ot){nt(ot)}})}}const y$2=class{static async initialize(et,rt){const st=et.http();if(!this.resourceProducingApps.length){this.resourceProducingApps=[rt,"workspace"];try{const[nt,ot]=await Promise.all([st.get("/resources-applications"),et.session().getUser()]);ot!=null&&ot.apps&&nt!=null&&nt.length&&(this.resourceProducingApps=nt.filter(at=>ot.apps.some(lt=>lt.address.includes(at))))}catch(nt){console.warn("Failed to load resource-producing apps:",nt)}}return this.resourceProducingApps}static async registerBehaviours(et){this.resourceProducingApps.forEach(rt=>{const st={application:et,resourceType:rt};this.registry.register(st,nt=>this.serviceFor(nt,et,rt))})}static serviceFor(et,rt,st){let nt;switch(st){case"timelinegenerator":nt=new TimelinegeneratorBehaviour(et);break;case"workspace":nt=new WorkspaceBehaviour(et);break;case"blog":nt=new BlogBehaviour(et);break;case"actualites":nt=new ActualitesBehaviour(et);break;case"wiki":nt=new WikiBehaviour(et);break;case"pages":nt=new PagesBehaviour(et);break;case"poll":nt=new PollBehaviour(et);break;case"community":nt=new CommunityBehaviour(et);break;case"mindmap":nt=new MindmapBehaviour(et);break;case"forum":nt=new ForumBehaviour(et);break;case"homeworks":nt=new HomeworksBehaviour(et);break;case"scrapbook":nt=new ScrapbookBehaviour(et);break;case"collaborativewall":nt=new CollaborativewallBehaviour(et);break;case"exercizer":nt=new ExercizerBehaviour(et);break;case"formulaire":nt=new FormulaireBehaviour(et);break;case"magneto":nt=new MagnetoBehaviour(et);break;default:throw ERROR_CODE.NOT_SUPPORTED}return nt.APP=rt,nt}};n$2(y$2,"registry",new ServiceRegistry),n$2(y$2,"findBehaviour",y$2.registry.findService.bind(y$2.registry)),n$2(y$2,"hasBehaviour",y$2.registry.isRegistered.bind(y$2.registry)),n$2(y$2,"resourceProducingApps",[]);let SnipletsService=y$2;const SEND_ALL="*";class WebBroker{constructor(et){n$2(this,"subscription"),this.odeServices=et}get http(){return this.odeServices.http()}get events(){return this.odeServices.notify().events()}dispatchEvent(et,rt){rt.findIndex(st=>SEND_ALL===st||et.data["event-type"]===st)>=0&&this.http.post("/infra/event/web/store",et.data,{disableNotifications:!0})}initialize(et){if(et===void 0||et.send===void 0||et.send.length>0){const rt=(et==null?void 0:et.send)??[SEND_ALL];this.subscription=this.events.subscribe(LAYER_NAME.WEB_DATA,st=>this.dispatchEvent(st,rt))}return this}destroy(){this.subscription&&(this.subscription.revoke(),delete this.subscription)}}class DataService{constructor(et){n$2(this,"_webBroker"),n$2(this,"app"),n$2(this,"user"),n$2(this,"profile"),this.odeServices=et}get conf(){return this.odeServices.conf()}get notify(){return this.odeServices.notify()}async initialize(){try{const{app:et}=await this.notify.onAppConfReady().promise;this.app=et,this.user=await this.odeServices.session().getUser(),this.profile=await this.odeServices.session().getUserProfile();const{["data-service"]:rt}=await this.conf.getPublicConf(et);this._webBroker=new WebBroker(this.odeServices).initialize(rt==null?void 0:rt.web)}catch{console.log("DataService not initialized, usage data unavailable.")}}predestroy(){this._webBroker&&(this._webBroker.destroy(),delete this._webBroker)}trackWebEvent(et){this.notify.events().publish(LAYER_NAME.WEB_DATA,{name:EVENT_NAME.DATA_TRACKED,data:et})}addUserInfos(et){return this.user&&(et.userId=this.user.userId,et.structure=this.user.structureNames[0]),this.profile&&(et.profil=this.profile[0]),et}trackVideoSave(et,rt,st,nt,ot,at,lt){const ut=this.addUserInfos({"event-type":"VIDEO_SAVE",module:"video",video_id:et,browser:at,duration:Math.round(rt),weight:st,source:nt?"CAPTURED":"UPLOADED",url:ot});this.app&&(ut["override-module"]=this.app),lt&&(ut.device_type=lt),this.trackWebEvent(ut)}trackVideoRead(et,rt,st,nt,ot){const at=this.addUserInfos({"event-type":"VIDEO_READ",module:"video",video_id:et,browser:nt,source:rt?"CAPTURED":"UPLOADED",url:st});this.app&&(at["override-module"]=this.app),ot&&(at.device_type=ot),this.trackWebEvent(at)}trackSpeechAndText(et){const rt=this.addUserInfos({"event-type":"SPEECH_AND_TEXT",function:et});this.app&&(rt.module=this.app),this.trackWebEvent(rt)}trackAccessLibraryFromExplorer(){const et=this.addUserInfos({"event-type":"ACCESS_LIBRARY_FROM_EXPLORER"});this.app&&(et.module=this.app),this.trackWebEvent(et)}}class ReactionsService{constructor(et,rt,st){this.context=et,this.module=rt,this.resourceType=st}get http(){return this.context.http()}async loadAvailableReactions(){try{const{"reaction-types":et}=await this.context.conf().getPublicConf("audience");return Array.isArray(et)?et:void 0}catch{console.error("Audience configuration not found");return}}async loadReactionSummaries(et){const rt=await this.http.get(`/audience/reactions/${this.module}/${this.resourceType}?resourceIds=${et.join(",")}`);return this.http.isResponseError()?{}:rt.reactionsByResource}async loadReactionDetails(et,rt,st){const nt=await this.http.get(`/audience/reactions/${this.module}/${this.resourceType}/${et}?page=${rt}&size=${st}`);return this.http.isResponseError()?void 0:nt}async deleteReaction(et){await this.http.delete(`/audience/reactions/${this.module}/${this.resourceType}/${et}`)}async updateReaction(et,rt){await this.http.putJson(`/audience/reactions/${this.module}/${this.resourceType}`,{resourceId:et,reactionType:rt})}async createReaction(et,rt){await this.http.postJson(`/audience/reactions/${this.module}/${this.resourceType}`,{resourceId:et,reactionType:rt})}}class ViewsService{constructor(et,rt,st){this.context=et,this.module=rt,this.resourceType=st}get http(){return this.context.http()}async getCounters(et){const rt=await this.http.get(`/audience/views/count/${this.module}/${this.resourceType}?resourceIds=${et.join(",")}`);return this.http.isResponseError()?{}:rt}async getDetails(et){const rt=await this.http.get(`/audience/views/details/${this.module}/${this.resourceType}/${et}`);return this.http.isResponseError()?void 0:rt}trigger(et){return this.http.post(`/audience/views/${this.module}/${this.resourceType}/${et}`)}}class AudienceService{constructor(et,rt,st){this.context=et,this.module=rt,this.resourceType=st}get views(){return new ViewsService(this.context,this.module,this.resourceType)}get reactions(){return new ReactionsService(this.context,this.module,this.resourceType)}}class OdeServices{constructor(){n$2(this,"_analytics"),n$2(this,"_cache"),n$2(this,"_conf"),n$2(this,"_data"),n$2(this,"_directory"),n$2(this,"_http"),n$2(this,"_idiom"),n$2(this,"_notify"),n$2(this,"_rights"),n$2(this,"_session"),n$2(this,"_share"),n$2(this,"_video"),n$2(this,"_workspace"),n$2(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._notify=NotifyFrameworkFactory.instance(),this._rights=new RightService(this),this._session=new SessionService(this),this._share=new ShareService(this),this._video=new VideoService(this),this._workspace=new WorkspaceService(this),this._embedder=new EmbedderService(this)}initialize(){return this._data.initialize(),this}analytics(){return this._analytics}audience(et,rt){return new AudienceService(this,et,rt)}cache(){return this._cache}conf(){return this._conf}data(){return this._data}directory(){return this._directory}http(){return this._http}idiom(){return this._idiom}notify(){return this._notify}resource(et,rt){return rt?ResourceService.findService({application:et,resourceType:rt},this):ResourceService.findMainService({application:et},this)}behaviour(et,rt){return SnipletsService.findBehaviour({application:et,resourceType:rt},this)}rights(){return this._rights}session(){return this._session}share(){return this._share}video(){return this._video}workspace(){return this._workspace}embedder(){return this._embedder}}const 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(),WIDGET_POSITION={LEFT:"left",RIGHT:"right"},isActionAvailable=(tt,et)=>{const rt=et==null?void 0:et.filter(st=>st.id===tt&&st.available);return rt&&rt.length>0},firstLevelWidgets=["birthday","mood","calendar-widget","notes"],secondLevelWidgets=["agenda-widget","carnet-de-bord","my-apps","rss-widget","bookmark-widget","cursus-widget","maxicours-widget","school-widget"],defaultWidgetPosition={"last-infos-widget":WIDGET_POSITION.LEFT,birthday:WIDGET_POSITION.LEFT,"calendar-widget":WIDGET_POSITION.RIGHT,"carnet-de-bord":WIDGET_POSITION.LEFT,"record-me":WIDGET_POSITION.RIGHT,mood:WIDGET_POSITION.LEFT,"my-apps":WIDGET_POSITION.RIGHT,notes:WIDGET_POSITION.RIGHT,"rss-widget":WIDGET_POSITION.LEFT,"bookmark-widget":WIDGET_POSITION.RIGHT,qwant:WIDGET_POSITION.RIGHT,"qwant-junior":WIDGET_POSITION.LEFT,"agenda-widget":WIDGET_POSITION.LEFT,"cursus-widget":WIDGET_POSITION.LEFT,"maxicours-widget":WIDGET_POSITION.RIGHT,"universalis-widget":WIDGET_POSITION.RIGHT,"briefme-widget":WIDGET_POSITION.LEFT,"school-widget":WIDGET_POSITION.LEFT},defaultWidgetOrder={"school-widget":0,"my-apps":10,"record-me":15,"last-infos-widget":20,qwant:30,"qwant-junior":30,"universalis-widget":35,"agenda-widget":40,"bookmark-widget":50,"carnet-de-bord":60,"maxicours-widget":70,"cursus-widget":80,"briefme-widget":90,"rss-widget":100,mood:110,birthday:120,"calendar-widget":130,notes:140};class WidgetFramework{constructor(){n$2(this,"_initialized"),n$2(this,"_widgets",[]),n$2(this,"_userPrefs",{})}initialize(et,rt){return this._initialized||(this._initialized=new Promisified,notify.onSessionReady().promise.then(st=>{var nt;st&&st.widgets?(st.widgets.forEach(ot=>{this._widgets.push(new Widget(ot))}),this.loadUserPrefs().then(()=>{var ot;(ot=this._initialized)==null||ot.resolve()}).catch(ot=>{var at;(at=this._initialized)==null||at.reject()})):(nt=this._initialized)==null||nt.reject()})),this._initialized.promise}get list(){return this._widgets}lookup(et){return this._widgets.find(rt=>rt.platformConf.name===et)}lookupDefaultPosition(et){return defaultWidgetPosition[et]}get userPrefs(){return this._userPrefs}async loadUserPrefs(){await configure.User.preferences.load("widgets",{}).then(et=>this.applyUserPrefs(et))}saveUserPrefs(){return configure.User.preferences.update("widgets",this._userPrefs).save("widgets").then(()=>{notify.events().publish(LAYER_NAME.WIDGETS,{name:EVENT_NAME.USERPREF_CHANGED})})}async applyUserPrefs(et){this._userPrefs=et??this._userPrefs;const rt=configure.Platform.theme,st=[];rt.listSkins().then(nt=>{var ot;const at=((ot=nt.find(ut=>ut.child===rt.skin))==null?void 0:ot.parent)==="panda"?secondLevelWidgets:firstLevelWidgets;this._widgets=this._widgets.filter((ut,ct)=>{const dt=ut.platformConf.name;return at.indexOf(dt)!==-1?!1:(this._userPrefs[dt]||(this._userPrefs[dt]={index:defaultWidgetOrder[dt]??999,show:!0,position:ut.platformConf.position}),ut.platformConf.mandatory&&(this._userPrefs[dt].show=!0,this._userPrefs[dt].index=defaultWidgetOrder[dt]??999),ut.platformConf.i18n&&st.push(ut.platformConf.i18n),ut.applyUserPref(this._userPrefs[dt]),!0)});const lt=new Idiom;this._widgets=this._widgets.sort((ut,ct)=>{const dt=lt.translate(`timeline.settings.${ut.platformConf.name}`).toLowerCase(),ht=lt.translate(`timeline.settings.${ct.platformConf.name}`).toLowerCase();return dt<ht?-1:dt>ht?1:0})})}}class Widget{constructor(et){n$2(this,"_schoolConf",{}),n$2(this,"_userPref"),this._platformConf=et,this._userPref=null}get platformConf(){return this._platformConf}get schoolConf(){return this._schoolConf}get userPref(){return this._userPref}applyUserPref(et){this._userPref=et,this._userPref.position=this._userPref.position??widgets.lookupDefaultPosition(this._platformConf.name)??"left"}}const widgets=new WidgetFramework,SvgIconFolder=({title:tt,titleId:et,...rt})=>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":et,...rt,children:[tt?jsxRuntimeExports.jsx("title",{id:et,children:tt}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M3.057 5.5A.057.057 0 0 0 3 5.557v13.03h18V7.875h-8.697a1 1 0 0 1-1-1c0-.759-.615-1.374-1.374-1.374zM1 5.557C1 4.42 1.92 3.5 3.057 3.5h6.872c1.515 0 2.797.999 3.223 2.374H21a2 2 0 0 1 2 2v10.714a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2z",clipRule:"evenodd"})]}),SvgIconRafterDown=({title:tt,titleId:et,...rt})=>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":et,...rt,children:[tt?jsxRuntimeExports.jsx("title",{id:et,children:tt}):null,jsxRuntimeExports.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M4.012 7.871a1.5 1.5 0 0 1 2.117.141L12 14.722l5.871-6.71a1.5 1.5 0 1 1 2.258 1.976l-7 8a1.5 1.5 0 0 1-2.258 0l-7-8a1.5 1.5 0 0 1 .141-2.117",clipRule:"evenodd"})]}),TreeNode=({node:tt,showIcon:et,selectedNodeId:rt,expandedNodes:st,siblingsNodes:nt,draggedNodeId:ot,handleItemClick:at,handleToggleNode:lt,handleItemAction:ut})=>{const ct=st.has(tt.id),dt=nt==null?void 0:nt.current.has(tt.id),ht=rt===tt.id,ft=ot===tt.id,xt={action:clsx("action-container d-flex align-items-center gap-8 px-2",{"drag-focus":ft,"py-4":!tt.section}),arrow:clsx({"py-4":!tt.section,"py-8":tt.section,invisible:!Array.isArray(tt.children)||tt.children.length===0}),button:clsx("flex-fill d-flex align-items-center text-truncate gap-8",{"py-8":tt.section})},yt=tt.section?16:12,{t:vt}=useTranslation(),{setNodeRef:Et}=useDroppable({id:reactExports.useId(),data:{id:tt.id,name:tt.name,isTreeview:!0,accepts:["folder","resource"]}}),bt=jt=>at==null?void 0:at(jt),St=jt=>lt==null?void 0:lt(jt),wt=jt=>ut==null?void 0:ut(jt),Rt=jt=>{(jt.code==="Enter"||jt.code==="Space")&&(jt.preventDefault(),jt.stopPropagation(),at==null||at(tt.id))},Ct=jt=>{(jt.code==="Enter"||jt.code==="Space")&&(jt.preventDefault(),jt.stopPropagation(),lt==null||lt(tt.id))},Pt=jt=>jsxRuntimeExports.jsx(jt?SvgIconRafterDown:SvgIconRafterRight,{title:vt("foldUnfold"),width:yt,height:yt}),It=()=>{var jt;const Dt=!((jt=nt==null?void 0:nt.current)!=null&&jt.has(tt.id)),Ht=Array.isArray(tt.children)&&tt.children.length>0;return dt||Dt&&Ht};return jsxRuntimeExports.jsx("li",{ref:Et,id:`treeitem-${tt.id}`,role:"treeitem","aria-selected":ht&&ht,"aria-expanded":ct&&ct,children:jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsxs("div",{className:xt.action,children:[jsxRuntimeExports.jsx("div",{className:xt.arrow,tabIndex:0,role:"button",onClick:()=>St(tt.id),onKeyDown:Ct,"aria-label":vt("foldUnfold"),children:It()&&Pt(ct)}),jsxRuntimeExports.jsxs("div",{tabIndex:0,role:"button",className:xt.button,onClick:()=>bt(tt.id),onKeyDown:Rt,children:[tt.section&&et&&jsxRuntimeExports.jsx(SvgIconFolder,{title:vt("folder"),width:20,height:20}),jsxRuntimeExports.jsx("span",{className:"text-truncate",children:tt.name})]}),tt.section&&ut&&jsxRuntimeExports.jsx("button",{className:"tree-btn mx-8",onClick:()=>wt(tt.id),children:jsxRuntimeExports.jsx(SvgIconPlus,{height:16,width:16})})]}),Array.isArray(tt.children)&&!!tt.children.length&&ct&&jsxRuntimeExports.jsx("ul",{role:"group",children:tt.children.map(jt=>jsxRuntimeExports.jsx(TreeNode,{node:jt,selectedNodeId:rt,expandedNodes:st,siblingsNodes:nt,draggedNodeId:ot,handleItemClick:at,handleToggleNode:lt},jt.id))})]})},tt.id)};var __defProp=Object.defineProperty,__defNormalProp=(tt,et,rt)=>et in tt?__defProp(tt,et,{enumerable:!0,configurable:!0,writable:!0,value:rt}):tt[et]=rt,__publicField=(tt,et,rt)=>__defNormalProp(tt,typeof et!="symbol"?et+"":et,rt);function findTreeNode(tt,et){if(et(tt))return tt;if(Array.isArray(tt.children))for(const rt of tt.children){const st=findTreeNode(rt,et);if(st)return st}}function findNodeById(tt,et){if(Array.isArray(tt))for(const rt of tt){const st=findNodeById(rt,et);if(st)return st}else{if(tt.id===et)return tt;if(tt.children)for(const rt of tt.children){const st=findNodeById(rt,et);if(st)return st}}}function addNode(tt,{parentId:et,newFolder:rt}){return modifyNode(tt,st=>{var nt;if(st.id===et){const ot=[...((nt=st.folder)==null?void 0:nt.ancestors)||[]],at=arrayUnique([...ot,st.id]);return{...st,children:[...st.children||[],new TreeNodeFolderWrapper({...rt,ancestors:at})]}}else return st})}function arrayUnique(tt){return tt.filter((et,rt)=>tt.indexOf(et)===rt)}function deleteNode(tt,{folders:et}){return modifyNode(tt,rt=>{if(!et.includes(rt.id))return rt})}const findParentNode=(tt,et)=>{if(tt.children)for(const rt of tt.children){if(rt.id===et)return tt;const st=findParentNode(rt,et);if(st)return st}};function getAncestors(tt,et){var rt;const st=findNodeById(tt,et);return(rt=st==null?void 0:st.folder)!=null&&rt.ancestors?[...(st==null?void 0:st.folder.ancestors)||[],et]:et===FOLDER.BIN?[FOLDER.BIN]:[FOLDER.DEFAULT]}function modifyNode(tt,et){return doModify(tt,et)||tt}function doModify(tt,et,rt){var st;const nt=et(tt,rt);if((st=nt==null?void 0:nt.children)!=null&&st.length){const ot=[];for(const at of(nt==null?void 0:nt.children)||[]){const lt=doModify(at,et,nt);lt&&ot.push(lt)}return{...nt,children:ot}}return nt}function moveNode(tt,{destinationId:et,folders:rt}){return modifyNode(tt,(st,nt)=>{var ot,at;if(et===st.id){const lt=[...((ot=st.folder)==null?void 0:ot.ancestors)||[]],ut=arrayUnique([...lt,st.id]),ct=[...st.children||[]],dt=((at=st.children)==null?void 0:at.map(ht=>ht.id))||[];for(const ht of rt)if(!dt.includes(ht)){const ft=findNodeById(st,ht);ft&&ct.push({...ft,folder:{...ft==null?void 0:ft.folder,ancestors:ut}})}return{...st,children:ct}}else return rt.includes(st.id)&&et!==(nt==null?void 0:nt.id)?void 0:st})}const wrapTreeNode=(tt,et,rt)=>modifyNode(tt,st=>(st.id===rt&&(st.children=et==null?void 0:et.map(nt=>new TreeNodeFolderWrapper(nt))),st));function updateNode(tt,{folderId:et,newFolder:rt}){return modifyNode(tt,st=>st.id===et?new TreeNodeFolderWrapper(rt):st)}function findPathById(tt,et){let rt=[];function st(ot,at){if(ot.id===et)return rt=at.concat(ot.id),!0;if(ot.children){for(const lt of ot.children)if(st(lt,at.concat(ot.id)))return!0}return!1}function nt(ot){if(Array.isArray(ot)){for(const at of ot)if(st(at,[]))break}else st(ot,[])}return nt(tt),rt}class TreeNodeFolderWrapper{constructor(et){__publicField(this,"id"),__publicField(this,"name"),__publicField(this,"childNumber"),__publicField(this,"section",!1),__publicField(this,"children",[]),this.folder=et,this.id=et.id,this.name=et.name,this.childNumber=et.childNumber}}const useTreeView=({data:tt,ref:et,externalSelectedNodeId:rt,draggedNode:st,allExpandedNodes:nt,onTreeItemUnfold:ot,onTreeItemFold:at,onTreeItemClick:lt})=>{const[ut,ct]=reactExports.useState(void 0),[dt,ht]=reactExports.useState(new Set),ft=reactExports.useRef(new Set),[xt,yt]=reactExports.useState(void 0),vt=ut??rt;function Et(Nt){var Ut;Array.isArray(Nt)?Nt.forEach(Lt=>{const kt=new Set(ft.current);Nt.filter(({id:Mt})=>Mt!==Lt.id).some(Mt=>Mt.children&&Mt.children.length>0)&&kt.add(Lt.id),Lt.children&&Lt.children.length>0&&Lt.children.forEach(Mt=>{var Bt;const Gt=(Bt=Lt.children)==null?void 0:Bt.filter(({id:Ot})=>Ot!==Mt.id);Gt!=null&&Gt.some(Ot=>Ot.children&&Ot.children.length>0)&&kt.add(Mt.id),Et(Mt)})}):(Ut=Nt.children)==null||Ut.forEach(Lt=>{var kt;const Mt=new Set(ft.current),Bt=(kt=Nt.children)==null?void 0:kt.filter(Gt=>Gt.id!==Lt.id);Bt!=null&&Bt.some(Gt=>Gt.children&&Gt.children.length>0)&&(Mt.add(Lt.id),ft.current=Mt),Et(Lt)})}const bt=Nt=>{const Ut=new Set("");tt&&Array.isArray(tt)&&Nt&&(tt.forEach(Lt=>{Ut.add(Lt.id)}),ht(Ut))};reactExports.useEffect(()=>{tt&&Et(tt)},[tt]),reactExports.useEffect(()=>{st!=null&&st.isOver&&st.isTreeview?(st.overId&&Ht(st.overId),yt(st.overId)):yt(void 0)},[st]);const St=reactExports.useMemo(()=>({unselectAll(){ct(void 0)},select(Nt){jt(Nt)},allExpandedNodes(){bt(nt)}}),[]);reactExports.useImperativeHandle(et,()=>St,[St]),reactExports.useEffect(()=>{bt(nt)},[]),reactExports.useEffect(()=>{rt&&!nt?(wt(rt),ct(rt)):ct(void 0)},[rt]);const wt=Nt=>{if(!findNodeById(tt,vt)){ct(void 0);return}if(rt==="default"){dt.forEach(Ut=>ot==null?void 0:ot(Ut));return}Rt(Nt)},Rt=Nt=>{const Ut=new Set(dt),Lt=findPathById(tt,Nt),kt=Array.from(Ut);Lt.forEach(Mt=>{const Bt=kt.indexOf(Mt);Bt>-1&&kt.splice(Bt,1),kt.push(Mt)}),Ut.clear(),kt.forEach(Mt=>Ut.add(Mt)),Ut.forEach(Mt=>ot==null?void 0:ot(Mt)),ht(Ut)},Ct=Nt=>{const Ut=new Set(dt);Ut.delete(Nt),Ut.forEach(Lt=>at==null?void 0:at(Lt)),ht(Ut)},Pt=Nt=>{dt.has(Nt)?Ct(Nt):Rt(Nt)},It=Nt=>{vt!==Nt&&ct(Nt)},jt=Nt=>{It(Nt),Rt(Nt),lt==null||lt(Nt)},Dt=Nt=>{Pt(Nt)},Ht=Nt=>{findNodeById(tt,rt)&&Rt(Nt)};return{selectedNodeId:vt,expandedNodes:dt,siblingsNodes:ft,draggedNodeId:xt,handleItemClick:jt,handleFoldUnfold:Dt}},TreeView=reactExports.forwardRef((tt,et)=>{const{data:rt,onTreeItemClick:st,onTreeItemUnfold:nt,onTreeItemFold:ot,onTreeItemAction:at,draggedNode:lt,showIcon:ut=!0,allExpandedNodes:ct=!1,selectedNodeId:dt}=tt,{selectedNodeId:ht,expandedNodes:ft,siblingsNodes:xt,draggedNodeId:yt,handleItemClick:vt,handleFoldUnfold:Et}=useTreeView({data:rt,ref:et,externalSelectedNodeId:dt,draggedNode:lt,allExpandedNodes:ct,onTreeItemClick:st,onTreeItemFold:ot,onTreeItemUnfold:nt});return jsxRuntimeExports.jsx("div",{className:"treeview",children:jsxRuntimeExports.jsx("ul",{role:"tree",className:"m-0 p-0",children:Array.isArray(rt)?rt.map(bt=>jsxRuntimeExports.jsx(TreeNode,{node:bt,showIcon:ut,selectedNodeId:ht,expandedNodes:ft,siblingsNodes:xt,draggedNodeId:yt,handleItemClick:vt,handleToggleNode:Et,handleItemAction:at},bt.id)):jsxRuntimeExports.jsx(TreeNode,{node:rt,selectedNodeId:ht,expandedNodes:ft,siblingsNodes:xt,showIcon:ut,draggedNodeId:yt,handleItemClick:vt,handleToggleNode:Et})})})}),VisuallyHidden=reactExports.forwardRef(({children:tt},et)=>jsxRuntimeExports.jsx("span",{className:"visually-hidden",ref:et,children:tt})),EdificeClientContext=reactExports.createContext(null);function useEdificeClient(){const tt=reactExports.useContext(EdificeClientContext);if(!tt)throw new Error("Cannot be used outside of EdificeClientProvider");return tt}function useBookmark(){var tt;const{sessionQuery:et}=useEdificeClient(),rt=new Set;return(tt=et==null?void 0:et.data)==null?void 0:tt.bookmarkedApps.filter(st=>{const nt=rt.has(st.displayName);return rt.add(st.displayName),!nt})}function useDebounce(tt,et){const[rt,st]=reactExports.useState(tt);return reactExports.useEffect(()=>{const nt=setTimeout(()=>{st(tt)},et);return()=>{clearTimeout(nt)}},[tt,et]),rt}function useHover$1(){const[tt,et]=reactExports.useState(!1),rt=reactExports.useRef(null),st=reactExports.useCallback(()=>{et(!0)},[]),nt=reactExports.useCallback(()=>{et(!1)},[]);return[reactExports.useCallback(at=>{var lt;((lt=rt.current)==null?void 0:lt.nodeType)===Node.ELEMENT_NODE&&(rt.current.removeEventListener("mouseenter",st),rt.current.removeEventListener("mouseleave",nt)),(at==null?void 0:at.nodeType)===Node.ELEMENT_NODE&&(at.addEventListener("mouseenter",st),at.addEventListener("mouseleave",nt)),rt.current=at},[st,nt]),tt]}function useMediaQuery(tt){const et=reactExports.useCallback(nt=>{const ot=window.matchMedia(tt);return ot.addEventListener("change",nt),()=>{ot.removeEventListener("change",nt)}},[tt]),rt=()=>window.matchMedia(tt).matches,st=()=>{throw Error("useMediaQuery is a client-only hook")};return reactExports.useSyncExternalStore(et,rt,st)}function useToggle$1(tt){const[et,rt]=reactExports.useState(()=>tt),st=reactExports.useCallback(nt=>rt(typeof nt=="boolean"?nt:ot=>!ot),[]);return[et,st]}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(tt,et){(function(rt,st){var nt="1.0.40",ot="",at="?",lt="function",ut="undefined",ct="object",dt="string",ht="major",ft="model",xt="name",yt="type",vt="vendor",Et="version",bt="architecture",St="console",wt="mobile",Rt="tablet",Ct="smarttv",Pt="wearable",It="embedded",jt=500,Dt="Amazon",Ht="Apple",Nt="ASUS",Ut="BlackBerry",Lt="Browser",kt="Chrome",Mt="Edge",Bt="Firefox",Gt="Google",Ot="Huawei",zt="LG",Ft="Microsoft",Yt="Motorola",Zt="Opera",Xt="Samsung",rr="Sharp",cr="Sony",ur="Xiaomi",mr="Zebra",vr="Facebook",Er="Chromium OS",br="Mac OS",hr=" Browser",Ar=function(jr,Ir){var Pr={};for(var Vr in jr)Ir[Vr]&&Ir[Vr].length%2===0?Pr[Vr]=Ir[Vr].concat(jr[Vr]):Pr[Vr]=jr[Vr];return Pr},Cr=function(jr){for(var Ir={},Pr=0;Pr<jr.length;Pr++)Ir[jr[Pr].toUpperCase()]=jr[Pr];return Ir},Ur=function(jr,Ir){return typeof jr===dt?Sr(Ir).indexOf(Sr(jr))!==-1:!1},Sr=function(jr){return jr.toLowerCase()},kr=function(jr){return typeof jr===dt?jr.replace(/[^\d\.]/g,ot).split(".")[0]:st},Zr=function(jr,Ir){if(typeof jr===dt)return jr=jr.replace(/^\s\s*/,ot),typeof Ir===ut?jr:jr.substring(0,jt)},qt=function(jr,Ir){for(var Pr=0,Vr,ps,rs,Hr,Lr,Ss;Pr<Ir.length&&!Lr;){var Ys=Ir[Pr],Xo=Ir[Pr+1];for(Vr=ps=0;Vr<Ys.length&&!Lr&&Ys[Vr];)if(Lr=Ys[Vr++].exec(jr),Lr)for(rs=0;rs<Xo.length;rs++)Ss=Lr[++ps],Hr=Xo[rs],typeof Hr===ct&&Hr.length>0?Hr.length===2?typeof Hr[1]==lt?this[Hr[0]]=Hr[1].call(this,Ss):this[Hr[0]]=Hr[1]:Hr.length===3?typeof Hr[1]===lt&&!(Hr[1].exec&&Hr[1].test)?this[Hr[0]]=Ss?Hr[1].call(this,Ss,Hr[2]):st:this[Hr[0]]=Ss?Ss.replace(Hr[1],Hr[2]):st:Hr.length===4&&(this[Hr[0]]=Ss?Hr[3].call(this,Ss.replace(Hr[1],Hr[2])):st):this[Hr]=Ss||st;Pr+=2}},er=function(jr,Ir){for(var Pr in Ir)if(typeof Ir[Pr]===ct&&Ir[Pr].length>0){for(var Vr=0;Vr<Ir[Pr].length;Vr++)if(Ur(Ir[Pr][Vr],jr))return Pr===at?st:Pr}else if(Ur(Ir[Pr],jr))return Pr===at?st:Pr;return Ir.hasOwnProperty("*")?Ir["*"]:jr},sr={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},yr={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"},xr={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[Et,[xt,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[Et,[xt,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[xt,Et],[/opios[\/ ]+([\w\.]+)/i],[Et,[xt,Zt+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[Et,[xt,Zt+" GX"]],[/\bopr\/([\w\.]+)/i],[Et,[xt,Zt]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[Et,[xt,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[Et,[xt,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[xt,Et],[/quark(?:pc)?\/([-\w\.]+)/i],[Et,[xt,"Quark"]],[/\bddg\/([\w\.]+)/i],[Et,[xt,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[Et,[xt,"UC"+Lt]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[Et,[xt,"WeChat"]],[/konqueror\/([\w\.]+)/i],[Et,[xt,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[Et,[xt,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[Et,[xt,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[Et,[xt,"Smart Lenovo "+Lt]],[/(avast|avg)\/([\w\.]+)/i],[[xt,/(.+)/,"$1 Secure "+Lt],Et],[/\bfocus\/([\w\.]+)/i],[Et,[xt,Bt+" Focus"]],[/\bopt\/([\w\.]+)/i],[Et,[xt,Zt+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[Et,[xt,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[Et,[xt,"Dolphin"]],[/coast\/([\w\.]+)/i],[Et,[xt,Zt+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[Et,[xt,"MIUI"+hr]],[/fxios\/([\w\.-]+)/i],[Et,[xt,Bt]],[/\bqihoobrowser\/?([\w\.]*)/i],[Et,[xt,"360"]],[/\b(qq)\/([\w\.]+)/i],[[xt,/(.+)/,"$1Browser"],Et],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[xt,/(.+)/,"$1"+hr],Et],[/samsungbrowser\/([\w\.]+)/i],[Et,[xt,Xt+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[Et,[xt,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[xt,"Sogou Mobile"],Et],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[xt,Et],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[xt],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[Et,xt],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[xt,vr],Et],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[xt,Et],[/\bgsa\/([\w\.]+) .*safari\//i],[Et,[xt,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[Et,[xt,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[Et,[xt,kt+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[xt,kt+" WebView"],Et],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[Et,[xt,"Android "+Lt]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[xt,Et],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[Et,[xt,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[Et,xt],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[xt,[Et,er,sr]],[/(webkit|khtml)\/([\w\.]+)/i],[xt,Et],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[xt,"Netscape"],Et],[/(wolvic|librewolf)\/([\w\.]+)/i],[xt,Et],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[Et,[xt,Bt+" 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|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[xt,[Et,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[xt,[Et,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[bt,"amd64"]],[/(ia32(?=;))/i],[[bt,Sr]],[/((?:i[346]|x)86)[;\)]/i],[[bt,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[bt,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[bt,"armhf"]],[/windows (ce|mobile); ppc;/i],[[bt,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[bt,/ower/,ot,Sr]],[/(sun4\w)[;\)]/i],[[bt,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[bt,Sr]]],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],[ft,[vt,Xt],[yt,Rt]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[ft,[vt,Xt],[yt,wt]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[ft,[vt,Ht],[yt,wt]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[ft,[vt,Ht],[yt,Rt]],[/(macintosh);/i],[ft,[vt,Ht]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[ft,[vt,rr],[yt,wt]],[/(?:honor)([-\w ]+)[;\)]/i],[ft,[vt,"Honor"],[yt,wt]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[ft,[vt,Ot],[yt,Rt]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[ft,[vt,Ot],[yt,wt]],[/\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,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[ft,/_/g," "],[vt,ur],[yt,wt]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[ft,/_/g," "],[vt,ur],[yt,Rt]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[ft,[vt,"OPPO"],[yt,wt]],[/\b(opd2\d{3}a?) bui/i],[ft,[vt,"OPPO"],[yt,Rt]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[ft,[vt,"Vivo"],[yt,wt]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[ft,[vt,"Realme"],[yt,wt]],[/\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],[ft,[vt,Yt],[yt,wt]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[ft,[vt,Yt],[yt,Rt]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[ft,[vt,zt],[yt,Rt]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[ft,[vt,zt],[yt,wt]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[ft,[vt,"Lenovo"],[yt,Rt]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[ft,/_/g," "],[vt,"Nokia"],[yt,wt]],[/(pixel c)\b/i],[ft,[vt,Gt],[yt,Rt]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[ft,[vt,Gt],[yt,wt]],[/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],[ft,[vt,cr],[yt,wt]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[ft,"Xperia Tablet"],[vt,cr],[yt,Rt]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[ft,[vt,"OnePlus"],[yt,wt]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[ft,[vt,Dt],[yt,Rt]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[ft,/(.+)/g,"Fire Phone $1"],[vt,Dt],[yt,wt]],[/(playbook);[-\w\),; ]+(rim)/i],[ft,vt,[yt,Rt]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[ft,[vt,Ut],[yt,wt]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[ft,[vt,Nt],[yt,Rt]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[ft,[vt,Nt],[yt,wt]],[/(nexus 9)/i],[ft,[vt,"HTC"],[yt,Rt]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[vt,[ft,/_/g," "],[yt,wt]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[ft,[vt,"TCL"],[yt,Rt]],[/(itel) ((\w+))/i],[[vt,Sr],ft,[yt,er,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[ft,[vt,"Acer"],[yt,Rt]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[ft,[vt,"Meizu"],[yt,wt]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[ft,[vt,"Ulefone"],[yt,wt]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[ft,[vt,"Energizer"],[yt,wt]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[ft,[vt,"Cat"],[yt,wt]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[ft,[vt,"Smartfren"],[yt,wt]],[/droid.+; (a(?:015|06[35]|142p?))/i],[ft,[vt,"Nothing"],[yt,wt]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[vt,ft,[yt,wt]],[/(imo) (tab \w+)/i,/(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],[vt,ft,[yt,Rt]],[/(surface duo)/i],[ft,[vt,Ft],[yt,Rt]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[ft,[vt,"Fairphone"],[yt,wt]],[/(u304aa)/i],[ft,[vt,"AT&T"],[yt,wt]],[/\bsie-(\w*)/i],[ft,[vt,"Siemens"],[yt,wt]],[/\b(rct\w+) b/i],[ft,[vt,"RCA"],[yt,Rt]],[/\b(venue[\d ]{2,7}) b/i],[ft,[vt,"Dell"],[yt,Rt]],[/\b(q(?:mv|ta)\w+) b/i],[ft,[vt,"Verizon"],[yt,Rt]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[ft,[vt,"Barnes & Noble"],[yt,Rt]],[/\b(tm\d{3}\w+) b/i],[ft,[vt,"NuVision"],[yt,Rt]],[/\b(k88) b/i],[ft,[vt,"ZTE"],[yt,Rt]],[/\b(nx\d{3}j) b/i],[ft,[vt,"ZTE"],[yt,wt]],[/\b(gen\d{3}) b.+49h/i],[ft,[vt,"Swiss"],[yt,wt]],[/\b(zur\d{3}) b/i],[ft,[vt,"Swiss"],[yt,Rt]],[/\b((zeki)?tb.*\b) b/i],[ft,[vt,"Zeki"],[yt,Rt]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[vt,"Dragon Touch"],ft,[yt,Rt]],[/\b(ns-?\w{0,9}) b/i],[ft,[vt,"Insignia"],[yt,Rt]],[/\b((nxa|next)-?\w{0,9}) b/i],[ft,[vt,"NextBook"],[yt,Rt]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[vt,"Voice"],ft,[yt,wt]],[/\b(lvtel\-)?(v1[12]) b/i],[[vt,"LvTel"],ft,[yt,wt]],[/\b(ph-1) /i],[ft,[vt,"Essential"],[yt,wt]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[ft,[vt,"Envizen"],[yt,Rt]],[/\b(trio[-\w\. ]+) b/i],[ft,[vt,"MachSpeed"],[yt,Rt]],[/\btu_(1491) b/i],[ft,[vt,"Rotor"],[yt,Rt]],[/(shield[\w ]+) b/i],[ft,[vt,"Nvidia"],[yt,Rt]],[/(sprint) (\w+)/i],[vt,ft,[yt,wt]],[/(kin\.[onetw]{3})/i],[[ft,/\./g," "],[vt,Ft],[yt,wt]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[ft,[vt,mr],[yt,Rt]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[ft,[vt,mr],[yt,wt]],[/smart-tv.+(samsung)/i],[vt,[yt,Ct]],[/hbbtv.+maple;(\d+)/i],[[ft,/^/,"SmartTV"],[vt,Xt],[yt,Ct]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[vt,zt],[yt,Ct]],[/(apple) ?tv/i],[vt,[ft,Ht+" TV"],[yt,Ct]],[/crkey/i],[[ft,kt+"cast"],[vt,Gt],[yt,Ct]],[/droid.+aft(\w+)( bui|\))/i],[ft,[vt,Dt],[yt,Ct]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[ft,[vt,rr],[yt,Ct]],[/(bravia[\w ]+)( bui|\))/i],[ft,[vt,cr],[yt,Ct]],[/(mitv-\w{5}) bui/i],[ft,[vt,ur],[yt,Ct]],[/Hbbtv.*(technisat) (.*);/i],[vt,ft,[yt,Ct]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[vt,Zr],[ft,Zr],[yt,Ct]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[yt,Ct]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[vt,ft,[yt,St]],[/droid.+; (shield) bui/i],[ft,[vt,"Nvidia"],[yt,St]],[/(playstation [345portablevi]+)/i],[ft,[vt,cr],[yt,St]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[ft,[vt,Ft],[yt,St]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[ft,[vt,Xt],[yt,Pt]],[/((pebble))app/i],[vt,ft,[yt,Pt]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[ft,[vt,Ht],[yt,Pt]],[/droid.+; (glass) \d/i],[ft,[vt,Gt],[yt,Pt]],[/droid.+; (wt63?0{2,3})\)/i],[ft,[vt,mr],[yt,Pt]],[/droid.+; (glass) \d/i],[ft,[vt,Gt],[yt,Pt]],[/(pico) (4|neo3(?: link|pro)?)/i],[vt,ft,[yt,Pt]],[/; (quest( \d| pro)?)/i],[ft,[vt,vr],[yt,Pt]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[vt,[yt,It]],[/(aeobc)\b/i],[ft,[vt,Dt],[yt,It]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[ft,[yt,wt]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[ft,[yt,Rt]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[yt,Rt]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[yt,wt]],[/(android[-\w\. ]{0,9});.+buil/i],[ft,[vt,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[Et,[xt,Mt+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[xt,Et],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[Et,[xt,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[xt,Et],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[Et,xt]],os:[[/microsoft (windows) (vista|xp)/i],[xt,Et],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[xt,[Et,er,yr]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[Et,er,yr],[xt,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[Et,/_/g,"."],[xt,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[xt,br],[Et,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[Et,xt],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[xt,Et],[/\(bb(10);/i],[Et,[xt,Ut]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[Et,[xt,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[Et,[xt,Bt+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[Et,[xt,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[Et,[xt,"watchOS"]],[/crkey\/([\d\.]+)/i],[Et,[xt,kt+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[xt,Er],Et],[/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],[xt,Et],[/(sunos) ?([\w\.\d]*)/i],[[xt,"Solaris"],Et],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[xt,Et]]},dr=function(jr,Ir){if(typeof jr===ct&&(Ir=jr,jr=st),!(this instanceof dr))return new dr(jr,Ir).getResult();var Pr=typeof rt!==ut&&rt.navigator?rt.navigator:st,Vr=jr||(Pr&&Pr.userAgent?Pr.userAgent:ot),ps=Pr&&Pr.userAgentData?Pr.userAgentData:st,rs=Ir?Ar(xr,Ir):xr,Hr=Pr&&Pr.userAgent==Vr;return this.getBrowser=function(){var Lr={};return Lr[xt]=st,Lr[Et]=st,qt.call(Lr,Vr,rs.browser),Lr[ht]=kr(Lr[Et]),Hr&&Pr&&Pr.brave&&typeof Pr.brave.isBrave==lt&&(Lr[xt]="Brave"),Lr},this.getCPU=function(){var Lr={};return Lr[bt]=st,qt.call(Lr,Vr,rs.cpu),Lr},this.getDevice=function(){var Lr={};return Lr[vt]=st,Lr[ft]=st,Lr[yt]=st,qt.call(Lr,Vr,rs.device),Hr&&!Lr[yt]&&ps&&ps.mobile&&(Lr[yt]=wt),Hr&&Lr[ft]=="Macintosh"&&Pr&&typeof Pr.standalone!==ut&&Pr.maxTouchPoints&&Pr.maxTouchPoints>2&&(Lr[ft]="iPad",Lr[yt]=Rt),Lr},this.getEngine=function(){var Lr={};return Lr[xt]=st,Lr[Et]=st,qt.call(Lr,Vr,rs.engine),Lr},this.getOS=function(){var Lr={};return Lr[xt]=st,Lr[Et]=st,qt.call(Lr,Vr,rs.os),Hr&&!Lr[xt]&&ps&&ps.platform&&ps.platform!="Unknown"&&(Lr[xt]=ps.platform.replace(/chrome os/i,Er).replace(/macos/i,br)),Lr},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 Vr},this.setUA=function(Lr){return Vr=typeof Lr===dt&&Lr.length>jt?Zr(Lr,jt):Lr,this},this.setUA(Vr),this};dr.VERSION=nt,dr.BROWSER=Cr([xt,Et,ht]),dr.CPU=Cr([bt]),dr.DEVICE=Cr([ft,vt,yt,St,wt,Ct,Rt,Pt,It]),dr.ENGINE=dr.OS=Cr([xt,Et]),tt.exports&&(et=tt.exports=dr),et.UAParser=dr;var _r=typeof rt!==ut&&(rt.jQuery||rt.Zepto);if(_r&&!_r.ua){var Fr=new dr;_r.ua=Fr.getResult(),_r.ua.get=function(){return Fr.getUA()},_r.ua.set=function(jr){Fr.setUA(jr);var Ir=Fr.getResult();for(var Pr in Ir)_r.ua[Pr]=Ir[Pr]}}})(typeof window=="object"?window:commonjsGlobal)})(uaParser,uaParser.exports);var uaParserExports=uaParser.exports;const UAParser=getDefaultExportFromCjs(uaParserExports);function useBrowserInfo(tt){var et,rt,st;const nt=new UAParser(tt),ot=nt.getOS(),at=nt.getDevice(),lt=nt.getBrowser(),ut=((et=at.model)==null?void 0:et.indexOf("iPhone"))!=-1,ct=((rt=at.model)==null?void 0:rt.indexOf("iPod"))!=-1,dt=((st=at.model)==null?void 0:st.indexOf("iPad"))!=-1;return{os:ot,device:at,browser:lt,isIphone:ut,isIpod:ct,isIpad:dt}}function useHasWorkflow(tt){const[et,rt]=reactExports.useState();return reactExports.useEffect(()=>{(async()=>{let st;typeof tt=="string"?st=await odeServices.rights().sessionHasWorkflowRight(tt):st=await odeServices.rights().sessionHasWorkflowRights(tt),rt(st)})()},[tt]),et}function useCantoo(){const tt=useHasWorkflow("org.entcore.portal.controllers.PortalController|optionalFeatureCantoo");return reactExports.useEffect(()=>{tt&&!document.getElementById("cantoo-edifice-script")&&(async()=>{const et=await odeServices.http().get("/optionalFeature/cantoo");if(et&&et.scriptPath){const rt=document.createElement("script");rt.id="cantoo-edifice-script",rt.src=et.scriptPath,rt.async=!0,document.body.appendChild(rt)}})()},[tt]),null}const useConversation=()=>{const tt=useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|view"),et=useHasWorkflow("fr.openent.zimbra.controllers.ZimbraController|preauth"),[rt,st]=reactExports.useState(0),[nt,ot]=reactExports.useState(""),at={unread:!0,_:new Date().getTime()},lt=async()=>{const ct=tt?"/zimbra/count/INBOX":"/conversation/count/INBOX";try{const{count:dt}=await odeServices.http().get(ct,{queryParams:at});st(dt??0)}catch(dt){console.error(dt),st(0)}},ut=async()=>{const ct="/zimbra/zimbra";try{const{preference:dt}=await odeServices.http().get("/userbook/preference/zimbra"),ht=dt?JSON.parse(dt).modeExpert:!1;ot(ht&&et?"/zimbra/preauth":window.location.origin+ct)}catch(dt){console.error(dt),ot(window.location.origin+ct)}};return reactExports.useEffect(()=>{lt()},[]),reactExports.useEffect(()=>{ut()},[]),{messages:rt,msgLink:nt,zimbraWorkflow:tt}};var dayjs_min={exports:{}};(function(tt,et){(function(rt,st){tt.exports=st()})(commonjsGlobal,function(){var rt=1e3,st=6e4,nt=36e5,ot="millisecond",at="second",lt="minute",ut="hour",ct="day",dt="week",ht="month",ft="quarter",xt="year",yt="date",vt="Invalid Date",Et=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,bt=/\[([^\]]+)]|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,St={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(kt){var Mt=["th","st","nd","rd"],Bt=kt%100;return"["+kt+(Mt[(Bt-20)%10]||Mt[Bt]||Mt[0])+"]"}},wt=function(kt,Mt,Bt){var Gt=String(kt);return!Gt||Gt.length>=Mt?kt:""+Array(Mt+1-Gt.length).join(Bt)+kt},Rt={s:wt,z:function(kt){var Mt=-kt.utcOffset(),Bt=Math.abs(Mt),Gt=Math.floor(Bt/60),Ot=Bt%60;return(Mt<=0?"+":"-")+wt(Gt,2,"0")+":"+wt(Ot,2,"0")},m:function kt(Mt,Bt){if(Mt.date()<Bt.date())return-kt(Bt,Mt);var Gt=12*(Bt.year()-Mt.year())+(Bt.month()-Mt.month()),Ot=Mt.clone().add(Gt,ht),zt=Bt-Ot<0,Ft=Mt.clone().add(Gt+(zt?-1:1),ht);return+(-(Gt+(Bt-Ot)/(zt?Ot-Ft:Ft-Ot))||0)},a:function(kt){return kt<0?Math.ceil(kt)||0:Math.floor(kt)},p:function(kt){return{M:ht,y:xt,w:dt,d:ct,D:yt,h:ut,m:lt,s:at,ms:ot,Q:ft}[kt]||String(kt||"").toLowerCase().replace(/s$/,"")},u:function(kt){return kt===void 0}},Ct="en",Pt={};Pt[Ct]=St;var It="$isDayjsObject",jt=function(kt){return kt instanceof Ut||!(!kt||!kt[It])},Dt=function kt(Mt,Bt,Gt){var Ot;if(!Mt)return Ct;if(typeof Mt=="string"){var zt=Mt.toLowerCase();Pt[zt]&&(Ot=zt),Bt&&(Pt[zt]=Bt,Ot=zt);var Ft=Mt.split("-");if(!Ot&&Ft.length>1)return kt(Ft[0])}else{var Yt=Mt.name;Pt[Yt]=Mt,Ot=Yt}return!Gt&&Ot&&(Ct=Ot),Ot||!Gt&&Ct},Ht=function(kt,Mt){if(jt(kt))return kt.clone();var Bt=typeof Mt=="object"?Mt:{};return Bt.date=kt,Bt.args=arguments,new Ut(Bt)},Nt=Rt;Nt.l=Dt,Nt.i=jt,Nt.w=function(kt,Mt){return Ht(kt,{locale:Mt.$L,utc:Mt.$u,x:Mt.$x,$offset:Mt.$offset})};var Ut=function(){function kt(Bt){this.$L=Dt(Bt.locale,null,!0),this.parse(Bt),this.$x=this.$x||Bt.x||{},this[It]=!0}var Mt=kt.prototype;return Mt.parse=function(Bt){this.$d=function(Gt){var Ot=Gt.date,zt=Gt.utc;if(Ot===null)return new Date(NaN);if(Nt.u(Ot))return new Date;if(Ot instanceof Date)return new Date(Ot);if(typeof Ot=="string"&&!/Z$/i.test(Ot)){var Ft=Ot.match(Et);if(Ft){var Yt=Ft[2]-1||0,Zt=(Ft[7]||"0").substring(0,3);return zt?new Date(Date.UTC(Ft[1],Yt,Ft[3]||1,Ft[4]||0,Ft[5]||0,Ft[6]||0,Zt)):new Date(Ft[1],Yt,Ft[3]||1,Ft[4]||0,Ft[5]||0,Ft[6]||0,Zt)}}return new Date(Ot)}(Bt),this.init()},Mt.init=function(){var Bt=this.$d;this.$y=Bt.getFullYear(),this.$M=Bt.getMonth(),this.$D=Bt.getDate(),this.$W=Bt.getDay(),this.$H=Bt.getHours(),this.$m=Bt.getMinutes(),this.$s=Bt.getSeconds(),this.$ms=Bt.getMilliseconds()},Mt.$utils=function(){return Nt},Mt.isValid=function(){return this.$d.toString()!==vt},Mt.isSame=function(Bt,Gt){var Ot=Ht(Bt);return this.startOf(Gt)<=Ot&&Ot<=this.endOf(Gt)},Mt.isAfter=function(Bt,Gt){return Ht(Bt)<this.startOf(Gt)},Mt.isBefore=function(Bt,Gt){return this.endOf(Gt)<Ht(Bt)},Mt.$g=function(Bt,Gt,Ot){return Nt.u(Bt)?this[Gt]:this.set(Ot,Bt)},Mt.unix=function(){return Math.floor(this.valueOf()/1e3)},Mt.valueOf=function(){return this.$d.getTime()},Mt.startOf=function(Bt,Gt){var Ot=this,zt=!!Nt.u(Gt)||Gt,Ft=Nt.p(Bt),Yt=function(Er,br){var hr=Nt.w(Ot.$u?Date.UTC(Ot.$y,br,Er):new Date(Ot.$y,br,Er),Ot);return zt?hr:hr.endOf(ct)},Zt=function(Er,br){return Nt.w(Ot.toDate()[Er].apply(Ot.toDate("s"),(zt?[0,0,0,0]:[23,59,59,999]).slice(br)),Ot)},Xt=this.$W,rr=this.$M,cr=this.$D,ur="set"+(this.$u?"UTC":"");switch(Ft){case xt:return zt?Yt(1,0):Yt(31,11);case ht:return zt?Yt(1,rr):Yt(0,rr+1);case dt:var mr=this.$locale().weekStart||0,vr=(Xt<mr?Xt+7:Xt)-mr;return Yt(zt?cr-vr:cr+(6-vr),rr);case ct:case yt:return Zt(ur+"Hours",0);case ut:return Zt(ur+"Minutes",1);case lt:return Zt(ur+"Seconds",2);case at:return Zt(ur+"Milliseconds",3);default:return this.clone()}},Mt.endOf=function(Bt){return this.startOf(Bt,!1)},Mt.$set=function(Bt,Gt){var Ot,zt=Nt.p(Bt),Ft="set"+(this.$u?"UTC":""),Yt=(Ot={},Ot[ct]=Ft+"Date",Ot[yt]=Ft+"Date",Ot[ht]=Ft+"Month",Ot[xt]=Ft+"FullYear",Ot[ut]=Ft+"Hours",Ot[lt]=Ft+"Minutes",Ot[at]=Ft+"Seconds",Ot[ot]=Ft+"Milliseconds",Ot)[zt],Zt=zt===ct?this.$D+(Gt-this.$W):Gt;if(zt===ht||zt===xt){var Xt=this.clone().set(yt,1);Xt.$d[Yt](Zt),Xt.init(),this.$d=Xt.set(yt,Math.min(this.$D,Xt.daysInMonth())).$d}else Yt&&this.$d[Yt](Zt);return this.init(),this},Mt.set=function(Bt,Gt){return this.clone().$set(Bt,Gt)},Mt.get=function(Bt){return this[Nt.p(Bt)]()},Mt.add=function(Bt,Gt){var Ot,zt=this;Bt=Number(Bt);var Ft=Nt.p(Gt),Yt=function(rr){var cr=Ht(zt);return Nt.w(cr.date(cr.date()+Math.round(rr*Bt)),zt)};if(Ft===ht)return this.set(ht,this.$M+Bt);if(Ft===xt)return this.set(xt,this.$y+Bt);if(Ft===ct)return Yt(1);if(Ft===dt)return Yt(7);var Zt=(Ot={},Ot[lt]=st,Ot[ut]=nt,Ot[at]=rt,Ot)[Ft]||1,Xt=this.$d.getTime()+Bt*Zt;return Nt.w(Xt,this)},Mt.subtract=function(Bt,Gt){return this.add(-1*Bt,Gt)},Mt.format=function(Bt){var Gt=this,Ot=this.$locale();if(!this.isValid())return Ot.invalidDate||vt;var zt=Bt||"YYYY-MM-DDTHH:mm:ssZ",Ft=Nt.z(this),Yt=this.$H,Zt=this.$m,Xt=this.$M,rr=Ot.weekdays,cr=Ot.months,ur=Ot.meridiem,mr=function(br,hr,Ar,Cr){return br&&(br[hr]||br(Gt,zt))||Ar[hr].slice(0,Cr)},vr=function(br){return Nt.s(Yt%12||12,br,"0")},Er=ur||function(br,hr,Ar){var Cr=br<12?"AM":"PM";return Ar?Cr.toLowerCase():Cr};return zt.replace(bt,function(br,hr){return hr||function(Ar){switch(Ar){case"YY":return String(Gt.$y).slice(-2);case"YYYY":return Nt.s(Gt.$y,4,"0");case"M":return Xt+1;case"MM":return Nt.s(Xt+1,2,"0");case"MMM":return mr(Ot.monthsShort,Xt,cr,3);case"MMMM":return mr(cr,Xt);case"D":return Gt.$D;case"DD":return Nt.s(Gt.$D,2,"0");case"d":return String(Gt.$W);case"dd":return mr(Ot.weekdaysMin,Gt.$W,rr,2);case"ddd":return mr(Ot.weekdaysShort,Gt.$W,rr,3);case"dddd":return rr[Gt.$W];case"H":return String(Yt);case"HH":return Nt.s(Yt,2,"0");case"h":return vr(1);case"hh":return vr(2);case"a":return Er(Yt,Zt,!0);case"A":return Er(Yt,Zt,!1);case"m":return String(Zt);case"mm":return Nt.s(Zt,2,"0");case"s":return String(Gt.$s);case"ss":return Nt.s(Gt.$s,2,"0");case"SSS":return Nt.s(Gt.$ms,3,"0");case"Z":return Ft}return null}(br)||Ft.replace(":","")})},Mt.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},Mt.diff=function(Bt,Gt,Ot){var zt,Ft=this,Yt=Nt.p(Gt),Zt=Ht(Bt),Xt=(Zt.utcOffset()-this.utcOffset())*st,rr=this-Zt,cr=function(){return Nt.m(Ft,Zt)};switch(Yt){case xt:zt=cr()/12;break;case ht:zt=cr();break;case ft:zt=cr()/3;break;case dt:zt=(rr-Xt)/6048e5;break;case ct:zt=(rr-Xt)/864e5;break;case ut:zt=rr/nt;break;case lt:zt=rr/st;break;case at:zt=rr/rt;break;default:zt=rr}return Ot?zt:Nt.a(zt)},Mt.daysInMonth=function(){return this.endOf(ht).$D},Mt.$locale=function(){return Pt[this.$L]},Mt.locale=function(Bt,Gt){if(!Bt)return this.$L;var Ot=this.clone(),zt=Dt(Bt,Gt,!0);return zt&&(Ot.$L=zt),Ot},Mt.clone=function(){return Nt.w(this.$d,this)},Mt.toDate=function(){return new Date(this.valueOf())},Mt.toJSON=function(){return this.isValid()?this.toISOString():null},Mt.toISOString=function(){return this.$d.toISOString()},Mt.toString=function(){return this.$d.toUTCString()},kt}(),Lt=Ut.prototype;return Ht.prototype=Lt,[["$ms",ot],["$s",at],["$m",lt],["$H",ut],["$W",ct],["$M",ht],["$y",xt],["$D",yt]].forEach(function(kt){Lt[kt[1]]=function(Mt){return this.$g(Mt,kt[0],kt[1])}}),Ht.extend=function(kt,Mt){return kt.$i||(kt(Mt,Ut,Ht),kt.$i=!0),Ht},Ht.locale=Dt,Ht.isDayjs=jt,Ht.unix=function(kt){return Ht(1e3*kt)},Ht.en=Pt[Ct],Ht.Ls=Pt,Ht.p={},Ht})})(dayjs_min);var dayjs_minExports=dayjs_min.exports;const dayjs=getDefaultExportFromCjs(dayjs_minExports);var customParseFormat$1={exports:{}};(function(tt,et){(function(rt,st){tt.exports=st()})(commonjsGlobal,function(){var rt={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"},st=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,nt=/\d\d/,ot=/\d\d?/,at=/\d*[^-_:/,()\s\d]+/,lt={},ut=function(vt){return(vt=+vt)+(vt>68?1900:2e3)},ct=function(vt){return function(Et){this[vt]=+Et}},dt=[/[+-]\d\d:?(\d\d)?|Z/,function(vt){(this.zone||(this.zone={})).offset=function(Et){if(!Et||Et==="Z")return 0;var bt=Et.match(/([+-]|\d\d)/g),St=60*bt[1]+(+bt[2]||0);return St===0?0:bt[0]==="+"?-St:St}(vt)}],ht=function(vt){var Et=lt[vt];return Et&&(Et.indexOf?Et:Et.s.concat(Et.f))},ft=function(vt,Et){var bt,St=lt.meridiem;if(St){for(var wt=1;wt<=24;wt+=1)if(vt.indexOf(St(wt,0,Et))>-1){bt=wt>12;break}}else bt=vt===(Et?"pm":"PM");return bt},xt={A:[at,function(vt){this.afternoon=ft(vt,!1)}],a:[at,function(vt){this.afternoon=ft(vt,!0)}],S:[/\d/,function(vt){this.milliseconds=100*+vt}],SS:[nt,function(vt){this.milliseconds=10*+vt}],SSS:[/\d{3}/,function(vt){this.milliseconds=+vt}],s:[ot,ct("seconds")],ss:[ot,ct("seconds")],m:[ot,ct("minutes")],mm:[ot,ct("minutes")],H:[ot,ct("hours")],h:[ot,ct("hours")],HH:[ot,ct("hours")],hh:[ot,ct("hours")],D:[ot,ct("day")],DD:[nt,ct("day")],Do:[at,function(vt){var Et=lt.ordinal,bt=vt.match(/\d+/);if(this.day=bt[0],Et)for(var St=1;St<=31;St+=1)Et(St).replace(/\[|\]/g,"")===vt&&(this.day=St)}],M:[ot,ct("month")],MM:[nt,ct("month")],MMM:[at,function(vt){var Et=ht("months"),bt=(ht("monthsShort")||Et.map(function(St){return St.slice(0,3)})).indexOf(vt)+1;if(bt<1)throw new Error;this.month=bt%12||bt}],MMMM:[at,function(vt){var Et=ht("months").indexOf(vt)+1;if(Et<1)throw new Error;this.month=Et%12||Et}],Y:[/[+-]?\d+/,ct("year")],YY:[nt,function(vt){this.year=ut(vt)}],YYYY:[/\d{4}/,ct("year")],Z:dt,ZZ:dt};function yt(vt){var Et,bt;Et=vt,bt=lt&&lt.formats;for(var St=(vt=Et.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Dt,Ht,Nt){var Ut=Nt&&Nt.toUpperCase();return Ht||bt[Nt]||rt[Nt]||bt[Ut].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Lt,kt,Mt){return kt||Mt.slice(1)})})).match(st),wt=St.length,Rt=0;Rt<wt;Rt+=1){var Ct=St[Rt],Pt=xt[Ct],It=Pt&&Pt[0],jt=Pt&&Pt[1];St[Rt]=jt?{regex:It,parser:jt}:Ct.replace(/^\[|\]$/g,"")}return function(Dt){for(var Ht={},Nt=0,Ut=0;Nt<wt;Nt+=1){var Lt=St[Nt];if(typeof Lt=="string")Ut+=Lt.length;else{var kt=Lt.regex,Mt=Lt.parser,Bt=Dt.slice(Ut),Gt=kt.exec(Bt)[0];Mt.call(Ht,Gt),Dt=Dt.replace(Gt,"")}}return function(Ot){var zt=Ot.afternoon;if(zt!==void 0){var Ft=Ot.hours;zt?Ft<12&&(Ot.hours+=12):Ft===12&&(Ot.hours=0),delete Ot.afternoon}}(Ht),Ht}}return function(vt,Et,bt){bt.p.customParseFormat=!0,vt&&vt.parseTwoDigitYear&&(ut=vt.parseTwoDigitYear);var St=Et.prototype,wt=St.parse;St.parse=function(Rt){var Ct=Rt.date,Pt=Rt.utc,It=Rt.args;this.$u=Pt;var jt=It[1];if(typeof jt=="string"){var Dt=It[2]===!0,Ht=It[3]===!0,Nt=Dt||Ht,Ut=It[2];Ht&&(Ut=It[2]),lt=this.$locale(),!Dt&&Ut&&(lt=bt.Ls[Ut]),this.$d=function(Bt,Gt,Ot){try{if(["x","X"].indexOf(Gt)>-1)return new Date((Gt==="X"?1e3:1)*Bt);var zt=yt(Gt)(Bt),Ft=zt.year,Yt=zt.month,Zt=zt.day,Xt=zt.hours,rr=zt.minutes,cr=zt.seconds,ur=zt.milliseconds,mr=zt.zone,vr=new Date,Er=Zt||(Ft||Yt?1:vr.getDate()),br=Ft||vr.getFullYear(),hr=0;Ft&&!Yt||(hr=Yt>0?Yt-1:vr.getMonth());var Ar=Xt||0,Cr=rr||0,Ur=cr||0,Sr=ur||0;return mr?new Date(Date.UTC(br,hr,Er,Ar,Cr,Ur,Sr+60*mr.offset*1e3)):Ot?new Date(Date.UTC(br,hr,Er,Ar,Cr,Ur,Sr)):new Date(br,hr,Er,Ar,Cr,Ur,Sr)}catch{return new Date("")}}(Ct,jt,Pt),this.init(),Ut&&Ut!==!0&&(this.$L=this.locale(Ut).$L),Nt&&Ct!=this.format(jt)&&(this.$d=new Date("")),lt={}}else if(jt instanceof Array)for(var Lt=jt.length,kt=1;kt<=Lt;kt+=1){It[1]=jt[kt-1];var Mt=bt.apply(this,It);if(Mt.isValid()){this.$d=Mt.$d,this.$L=Mt.$L,this.init();break}kt===Lt&&(this.$d=new Date(""))}else wt.call(this,Rt)}}})})(customParseFormat$1);var customParseFormatExports=customParseFormat$1.exports;const customParseFormat=getDefaultExportFromCjs(customParseFormatExports);var localizedFormat$1={exports:{}};(function(tt,et){(function(rt,st){tt.exports=st()})(commonjsGlobal,function(){var rt={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(st,nt,ot){var at=nt.prototype,lt=at.format;ot.en.formats=rt,at.format=function(ut){ut===void 0&&(ut="YYYY-MM-DDTHH:mm:ssZ");var ct=this.$locale().formats,dt=function(ht,ft){return ht.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(xt,yt,vt){var Et=vt&&vt.toUpperCase();return yt||ft[vt]||rt[vt]||ft[Et].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(bt,St,wt){return St||wt.slice(1)})})}(ut,ct===void 0?{}:ct);return lt.call(this,dt)}}})})(localizedFormat$1);var localizedFormatExports=localizedFormat$1.exports;const localizedFormat=getDefaultExportFromCjs(localizedFormatExports);var relativeTime$1={exports:{}};(function(tt,et){(function(rt,st){tt.exports=st()})(commonjsGlobal,function(){return function(rt,st,nt){rt=rt||{};var ot=st.prototype,at={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 lt(ct,dt,ht,ft){return ot.fromToBase(ct,dt,ht,ft)}nt.en.relativeTime=at,ot.fromToBase=function(ct,dt,ht,ft,xt){for(var yt,vt,Et,bt=ht.$locale().relativeTime||at,St=rt.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"}],wt=St.length,Rt=0;Rt<wt;Rt+=1){var Ct=St[Rt];Ct.d&&(yt=ft?nt(ct).diff(ht,Ct.d,!0):ht.diff(ct,Ct.d,!0));var Pt=(rt.rounding||Math.round)(Math.abs(yt));if(Et=yt>0,Pt<=Ct.r||!Ct.r){Pt<=1&&Rt>0&&(Ct=St[Rt-1]);var It=bt[Ct.l];xt&&(Pt=xt(""+Pt)),vt=typeof It=="string"?It.replace("%d",Pt):It(Pt,dt,Ct.l,Et);break}}if(dt)return vt;var jt=Et?bt.future:bt.past;return typeof jt=="function"?jt(vt):jt.replace("%s",vt)},ot.to=function(ct,dt){return lt(ct,dt,this,!0)},ot.from=function(ct,dt){return lt(ct,dt,this)};var ut=function(ct){return ct.$u?nt.utc():nt()};ot.toNow=function(ct){return this.to(ut(this),ct)},ot.fromNow=function(ct){return this.from(ut(this),ct)}}})})(relativeTime$1);var relativeTimeExports=relativeTime$1.exports;const relativeTime=getDefaultExportFromCjs(relativeTimeExports);var de$2={exports:{}};(function(tt,et){(function(rt,st){tt.exports=st(dayjs_minExports)})(commonjsGlobal,function(rt){function st(ut){return ut&&typeof ut=="object"&&"default"in ut?ut:{default:ut}}var nt=st(rt),ot={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 at(ut,ct,dt){var ht=ot[dt];return Array.isArray(ht)&&(ht=ht[ct?0:1]),ht.replace("%d",ut)}var lt={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(ut){return ut+"."},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:at,m:at,mm:at,h:at,hh:at,d:at,dd:at,M:at,MM:at,y:at,yy:at}};return nt.default.locale(lt,null,!0),lt})})(de$2);var es={exports:{}};(function(tt,et){(function(rt,st){tt.exports=st(dayjs_minExports)})(commonjsGlobal,function(rt){function st(at){return at&&typeof at=="object"&&"default"in at?at:{default:at}}var nt=st(rt),ot={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(at){return at+"º"}};return nt.default.locale(ot,null,!0),ot})})(es);var fr={exports:{}};(function(tt,et){(function(rt,st){tt.exports=st(dayjs_minExports)})(commonjsGlobal,function(rt){function st(at){return at&&typeof at=="object"&&"default"in at?at:{default:at}}var nt=st(rt),ot={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(at){return""+at+(at===1?"er":"")}};return nt.default.locale(ot,null,!0),ot})})(fr);var it={exports:{}};(function(tt,et){(function(rt,st){tt.exports=st(dayjs_minExports)})(commonjsGlobal,function(rt){function st(at){return at&&typeof at=="object"&&"default"in at?at:{default:at}}var nt=st(rt),ot={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(at){return at+"º"}};return nt.default.locale(ot,null,!0),ot})})(it);var pt={exports:{}};(function(tt,et){(function(rt,st){tt.exports=st(dayjs_minExports)})(commonjsGlobal,function(rt){function st(at){return at&&typeof at=="object"&&"default"in at?at:{default:at}}var nt=st(rt),ot={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(at){return at+"º"},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 nt.default.locale(ot,null,!0),ot})})(pt);dayjs.extend(relativeTime);dayjs.extend(customParseFormat);dayjs.extend(localizedFormat);function useDate(){const{currentLanguage:tt}=useEdificeClient(),et=reactExports.useCallback((nt,ot)=>{if(nt.length<11)return dayjs(nt,["YYYY-MM-DD"],ot);if(nt.split("").findIndex(at=>"0">at||at>"9")<0)return dayjs(Number.parseInt(nt)).locale(tt);{let at=dayjs(nt).locale(tt);return at.isValid()||(at=dayjs(nt,["YYYY-MM-DD HH:mm:ss.SSS"]).locale(tt)),at}},[tt]),rt=reactExports.useCallback(nt=>{let ot=dayjs();try{return typeof nt>"u"?"":(typeof nt=="string"?ot=et(nt):typeof nt=="number"?ot=dayjs(nt).locale(tt):typeof nt.$date=="number"?ot=dayjs(new Date(nt.$date)).locale(tt):typeof nt.$date=="string"&&(ot=et(nt.$date)),ot.isValid()?ot.fromNow():"")}catch(at){return console.error(at),""}},[tt,et]),st=reactExports.useCallback((nt,ot="short")=>{let at=dayjs();try{if(typeof nt>"u")return"";typeof nt=="string"?at=et(nt):typeof nt=="number"?at=dayjs(nt).locale(tt):typeof nt.$date=="number"?at=dayjs(new Date(nt.$date)).locale(tt):typeof nt.$date=="string"&&(at=et(nt.$date));let lt="";switch(ot){case"short":lt="L";break;case"long":lt="LL";break;case"abbr":lt="ll";break;default:lt=ot}return at.isValid()?at.locale(tt).format(lt):""}catch(lt){return console.error(lt),""}},[tt,et]);return{fromNow:rt,formatDate:st}}function useHover(){const[tt,et]=reactExports.useState(!1),rt=reactExports.useRef(null),st=()=>{et(!0)},nt=()=>{et(!1)};return reactExports.useEffect(()=>{const ot=rt.current;if(ot)return ot.addEventListener("mouseover",st),ot.addEventListener("mouseout",nt),()=>{ot.removeEventListener("mouseover",st),ot.removeEventListener("mouseout",nt)}},[rt]),[rt,tt]}let e$1={data:""},t$1=tt=>typeof window=="object"?((tt?tt.querySelector("#_goober"):window._goober)||Object.assign((tt||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:tt||e$1,l$1=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a$1=/\/\*[^]*?\*\/| +/g,n$1=/\n+/g,o$1=(tt,et)=>{let rt="",st="",nt="";for(let ot in tt){let at=tt[ot];ot[0]=="@"?ot[1]=="i"?rt=ot+" "+at+";":st+=ot[1]=="f"?o$1(at,ot):ot+"{"+o$1(at,ot[1]=="k"?"":et)+"}":typeof at=="object"?st+=o$1(at,et?et.replace(/([^,])+/g,lt=>ot.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,ut=>/&/.test(ut)?ut.replace(/&/g,lt):lt?lt+" "+ut:ut)):ot):at!=null&&(ot=/^--/.test(ot)?ot:ot.replace(/[A-Z]/g,"-$&").toLowerCase(),nt+=o$1.p?o$1.p(ot,at):ot+":"+at+";")}return rt+(et&&nt?et+"{"+nt+"}":nt)+st},c$2={},s$1=tt=>{if(typeof tt=="object"){let et="";for(let rt in tt)et+=rt+s$1(tt[rt]);return et}return tt},i$2=(tt,et,rt,st,nt)=>{let ot=s$1(tt),at=c$2[ot]||(c$2[ot]=(ut=>{let ct=0,dt=11;for(;ct<ut.length;)dt=101*dt+ut.charCodeAt(ct++)>>>0;return"go"+dt})(ot));if(!c$2[at]){let ut=ot!==tt?tt:(ct=>{let dt,ht,ft=[{}];for(;dt=l$1.exec(ct.replace(a$1,""));)dt[4]?ft.shift():dt[3]?(ht=dt[3].replace(n$1," ").trim(),ft.unshift(ft[0][ht]=ft[0][ht]||{})):ft[0][dt[1]]=dt[2].replace(n$1," ").trim();return ft[0]})(tt);c$2[at]=o$1(nt?{["@keyframes "+at]:ut}:ut,rt?"":"."+at)}let lt=rt&&c$2.g?c$2.g:null;return rt&&(c$2.g=c$2[at]),((ut,ct,dt,ht)=>{ht?ct.data=ct.data.replace(ht,ut):ct.data.indexOf(ut)===-1&&(ct.data=dt?ut+ct.data:ct.data+ut)})(c$2[at],et,st,lt),at},p$1=(tt,et,rt)=>tt.reduce((st,nt,ot)=>{let at=et[ot];if(at&&at.call){let lt=at(rt),ut=lt&&lt.props&&lt.props.className||/^go/.test(lt)&&lt;at=ut?"."+ut:lt&&typeof lt=="object"?lt.props?"":o$1(lt,""):lt===!1?"":lt}return st+nt+(at??"")},"");function u$2(tt){let et=this||{},rt=tt.call?tt(et.p):tt;return i$2(rt.unshift?rt.raw?p$1(rt,[].slice.call(arguments,1),et.p):rt.reduce((st,nt)=>Object.assign(st,nt&&nt.call?nt(et.p):nt),{}):rt,t$1(et.target),et.g,et.o,et.k)}let d$1,f$2,g$1;u$2.bind({g:1});let h$1=u$2.bind({k:1});function m$1(tt,et,rt,st){o$1.p=et,d$1=tt,f$2=rt,g$1=st}function j$2(tt,et){let rt=this||{};return function(){let st=arguments;function nt(ot,at){let lt=Object.assign({},ot),ut=lt.className||nt.className;rt.p=Object.assign({theme:f$2&&f$2()},lt),rt.o=/ *go\d+/.test(ut),lt.className=u$2.apply(rt,st)+(ut?" "+ut:"");let ct=tt;return tt[0]&&(ct=lt.as||tt,delete lt.as),g$1&&ct[0]&&g$1(lt),d$1(ct,lt)}return et?et(nt):nt}}var W$2=tt=>typeof tt=="function",f$1=(tt,et)=>W$2(tt)?tt(et):tt,F$1=(()=>{let tt=0;return()=>(++tt).toString()})(),A$1=(()=>{let tt;return()=>{if(tt===void 0&&typeof window<"u"){let et=matchMedia("(prefers-reduced-motion: reduce)");tt=!et||et.matches}return tt}})(),Y$1=20,U$1=(tt,et)=>{switch(et.type){case 0:return{...tt,toasts:[et.toast,...tt.toasts].slice(0,Y$1)};case 1:return{...tt,toasts:tt.toasts.map(ot=>ot.id===et.toast.id?{...ot,...et.toast}:ot)};case 2:let{toast:rt}=et;return U$1(tt,{type:tt.toasts.find(ot=>ot.id===rt.id)?1:0,toast:rt});case 3:let{toastId:st}=et;return{...tt,toasts:tt.toasts.map(ot=>ot.id===st||st===void 0?{...ot,dismissed:!0,visible:!1}:ot)};case 4:return et.toastId===void 0?{...tt,toasts:[]}:{...tt,toasts:tt.toasts.filter(ot=>ot.id!==et.toastId)};case 5:return{...tt,pausedAt:et.time};case 6:let nt=et.time-(tt.pausedAt||0);return{...tt,pausedAt:void 0,toasts:tt.toasts.map(ot=>({...ot,pauseDuration:ot.pauseDuration+nt}))}}},P$1=[],y$1={toasts:[],pausedAt:void 0},u$1=tt=>{y$1=U$1(y$1,tt),P$1.forEach(et=>{et(y$1)})},q$1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},D$1=(tt={})=>{let[et,rt]=reactExports.useState(y$1),st=reactExports.useRef(y$1);reactExports.useEffect(()=>(st.current!==y$1&&rt(y$1),P$1.push(rt),()=>{let ot=P$1.indexOf(rt);ot>-1&&P$1.splice(ot,1)}),[]);let nt=et.toasts.map(ot=>{var at,lt,ut;return{...tt,...tt[ot.type],...ot,removeDelay:ot.removeDelay||((at=tt[ot.type])==null?void 0:at.removeDelay)||(tt==null?void 0:tt.removeDelay),duration:ot.duration||((lt=tt[ot.type])==null?void 0:lt.duration)||(tt==null?void 0:tt.duration)||q$1[ot.type],style:{...tt.style,...(ut=tt[ot.type])==null?void 0:ut.style,...ot.style}}});return{...et,toasts:nt}},J$1=(tt,et="blank",rt)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:et,ariaProps:{role:"status","aria-live":"polite"},message:tt,pauseDuration:0,...rt,id:(rt==null?void 0:rt.id)||F$1()}),x$1=tt=>(et,rt)=>{let st=J$1(et,tt,rt);return u$1({type:2,toast:st}),st.id},c$1=(tt,et)=>x$1("blank")(tt,et);c$1.error=x$1("error");c$1.success=x$1("success");c$1.loading=x$1("loading");c$1.custom=x$1("custom");c$1.dismiss=tt=>{u$1({type:3,toastId:tt})};c$1.remove=tt=>u$1({type:4,toastId:tt});c$1.promise=(tt,et,rt)=>{let st=c$1.loading(et.loading,{...rt,...rt==null?void 0:rt.loading});return typeof tt=="function"&&(tt=tt()),tt.then(nt=>{let ot=et.success?f$1(et.success,nt):void 0;return ot?c$1.success(ot,{id:st,...rt,...rt==null?void 0:rt.success}):c$1.dismiss(st),nt}).catch(nt=>{let ot=et.error?f$1(et.error,nt):void 0;ot?c$1.error(ot,{id:st,...rt,...rt==null?void 0:rt.error}):c$1.dismiss(st)}),tt};var K$2=(tt,et)=>{u$1({type:1,toast:{id:tt,height:et}})},X$1=()=>{u$1({type:5,time:Date.now()})},b$1=new Map,Z$1=1e3,ee$1=(tt,et=Z$1)=>{if(b$1.has(tt))return;let rt=setTimeout(()=>{b$1.delete(tt),u$1({type:4,toastId:tt})},et);b$1.set(tt,rt)},O$1=tt=>{let{toasts:et,pausedAt:rt}=D$1(tt);reactExports.useEffect(()=>{if(rt)return;let ot=Date.now(),at=et.map(lt=>{if(lt.duration===1/0)return;let ut=(lt.duration||0)+lt.pauseDuration-(ot-lt.createdAt);if(ut<0){lt.visible&&c$1.dismiss(lt.id);return}return setTimeout(()=>c$1.dismiss(lt.id),ut)});return()=>{at.forEach(lt=>lt&&clearTimeout(lt))}},[et,rt]);let st=reactExports.useCallback(()=>{rt&&u$1({type:6,time:Date.now()})},[rt]),nt=reactExports.useCallback((ot,at)=>{let{reverseOrder:lt=!1,gutter:ut=8,defaultPosition:ct}=at||{},dt=et.filter(xt=>(xt.position||ct)===(ot.position||ct)&&xt.height),ht=dt.findIndex(xt=>xt.id===ot.id),ft=dt.filter((xt,yt)=>yt<ht&&xt.visible).length;return dt.filter(xt=>xt.visible).slice(...lt?[ft+1]:[0,ft]).reduce((xt,yt)=>xt+(yt.height||0)+ut,0)},[et]);return reactExports.useEffect(()=>{et.forEach(ot=>{if(ot.dismissed)ee$1(ot.id,ot.removeDelay);else{let at=b$1.get(ot.id);at&&(clearTimeout(at),b$1.delete(ot.id))}})},[et]),{toasts:et,handlers:{updateHeight:K$2,startPause:X$1,endPause:st,calculateOffset:nt}}},oe$1=h$1`
51
51
  from {
52
52
  transform: scale(0) rotate(45deg);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ode-explorer",
3
- "version": "2.2.0-develop.202503031128",
3
+ "version": "2.2.0-objectstorage.202503111530",
4
4
  "description": "Edifice Explorer",
5
5
  "homepage": "https://github.com/edificeio/explorer#readme",
6
6
  "bugs": {