ode-ts-client 1.1.3 → 1.1.4-dev.202306051713

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 (102) hide show
  1. package/dist/agents/blog.agent.d.ts +2 -0
  2. package/dist/agents/folder.agent.d.ts +2 -0
  3. package/dist/agents/index.d.ts +4 -0
  4. package/dist/{ts/apps → apps}/timeline/Framework.d.ts +0 -1
  5. package/dist/{ts/apps → apps}/timeline/Notification.model.d.ts +0 -1
  6. package/dist/{ts/apps → apps}/timeline/interfaces.d.ts +0 -1
  7. package/dist/cache/Service.d.ts +14 -0
  8. package/dist/{ts/configure → configure}/Analytics.d.ts +0 -1
  9. package/dist/{ts/configure → configure}/AppConf.d.ts +3 -1
  10. package/dist/{ts/configure → configure}/Framework.d.ts +1 -2
  11. package/dist/configure/Service.d.ts +17 -0
  12. package/dist/{ts/configure → configure}/Theme.d.ts +0 -1
  13. package/dist/{ts/configure → configure}/User.d.ts +0 -1
  14. package/dist/{ts/configure → configure}/interfaces.d.ts +24 -5
  15. package/dist/directory/Service.d.ts +17 -0
  16. package/dist/directory/interface.d.ts +53 -0
  17. package/dist/{ts/explore → explore}/Agent.d.ts +0 -1
  18. package/dist/{ts/explore → explore}/AgentLoader.d.ts +0 -2
  19. package/dist/{ts/explore → explore}/Bus.d.ts +0 -1
  20. package/dist/{ts/explore → explore}/Context.d.ts +3 -2
  21. package/dist/{ts/explore → explore}/Framework.d.ts +2 -2
  22. package/dist/{ts/explore → explore}/interfaces.d.ts +105 -28
  23. package/dist/{ts/globals.d.ts → globals.d.ts} +3 -3
  24. package/dist/{ts/configure → idiom}/Idiom.d.ts +6 -3
  25. package/dist/idiom/Service.d.ts +24 -0
  26. package/dist/idiom/interfaces.d.ts +22 -0
  27. package/dist/index.cjs.d.ts +1 -0
  28. package/dist/index.d.ts +10 -0
  29. package/dist/legacy/Behaviours.d.ts +35 -0
  30. package/dist/legacy/entcore.d.ts +7 -0
  31. package/dist/legacy/http.d.ts +24 -0
  32. package/dist/legacy/me.d.ts +12 -0
  33. package/dist/legacy/rights.d.ts +55 -0
  34. package/dist/{ts/notify → notify}/Framework.d.ts +0 -1
  35. package/dist/{ts/notify → notify}/interfaces.d.ts +2 -3
  36. package/dist/ode-ts-client.js +16 -15
  37. package/dist/ode-ts-client.js.map +1 -1
  38. package/dist/ode-ts-client.mjs +7701 -0
  39. package/dist/ode-ts-client.mjs.map +1 -0
  40. package/dist/resources/BlogResourceService.d.ts +11 -0
  41. package/dist/resources/ResourceService.d.ts +55 -0
  42. package/dist/resources/interface.d.ts +26 -0
  43. package/dist/rights/Service.d.ts +78 -0
  44. package/dist/rights/interface.d.ts +16 -0
  45. package/dist/services/OdeServices.d.ts +44 -0
  46. package/dist/services/index.d.ts +7 -0
  47. package/dist/{ts/session → session}/Framework.d.ts +2 -1
  48. package/dist/session/Service.d.ts +32 -0
  49. package/dist/{ts/session → session}/Session.d.ts +10 -3
  50. package/dist/{ts/session → session}/interfaces.d.ts +81 -4
  51. package/dist/share/Service.d.ts +18 -0
  52. package/dist/share/interface.d.ts +99 -0
  53. package/dist/{ts/transport → transport}/Framework.d.ts +0 -1
  54. package/dist/{ts/transport → transport}/Http.d.ts +0 -1
  55. package/dist/transport/Service.d.ts +25 -0
  56. package/dist/{ts/transport → transport}/interfaces.d.ts +3 -1
  57. package/dist/utils/FileTypeUtils.d.ts +6 -0
  58. package/dist/utils/MimeTypeUtils.d.ts +20 -0
  59. package/dist/utils/StringUtils.d.ts +3 -0
  60. package/dist/version.txt +1 -1
  61. package/dist/{ts/widget → widget}/Framework.d.ts +0 -1
  62. package/dist/{ts/widget → widget}/LastInfos.widget.d.ts +0 -1
  63. package/dist/{ts/widget → widget}/interfaces.d.ts +1 -2
  64. package/dist/workspace/Service.d.ts +12 -0
  65. package/dist/workspace/interface.d.ts +48 -0
  66. package/package.json +40 -30
  67. package/dist/test/Foundation.spec.d.ts +0 -2
  68. package/dist/test/Foundation.spec.d.ts.map +0 -1
  69. package/dist/test/mocks/agents/MockedAgentLoader.d.ts +0 -9
  70. package/dist/test/mocks/agents/MockedAgentLoader.d.ts.map +0 -1
  71. package/dist/test/mocks/agents/MockedFolderAgent.d.ts +0 -15
  72. package/dist/test/mocks/agents/MockedFolderAgent.d.ts.map +0 -1
  73. package/dist/ts/apps/timeline/Framework.d.ts.map +0 -1
  74. package/dist/ts/apps/timeline/Notification.model.d.ts.map +0 -1
  75. package/dist/ts/apps/timeline/interfaces.d.ts.map +0 -1
  76. package/dist/ts/configure/Analytics.d.ts.map +0 -1
  77. package/dist/ts/configure/AppConf.d.ts.map +0 -1
  78. package/dist/ts/configure/Framework.d.ts.map +0 -1
  79. package/dist/ts/configure/Idiom.d.ts.map +0 -1
  80. package/dist/ts/configure/Theme.d.ts.map +0 -1
  81. package/dist/ts/configure/User.d.ts.map +0 -1
  82. package/dist/ts/configure/interfaces.d.ts.map +0 -1
  83. package/dist/ts/explore/Agent.d.ts.map +0 -1
  84. package/dist/ts/explore/AgentLoader.d.ts.map +0 -1
  85. package/dist/ts/explore/Bus.d.ts.map +0 -1
  86. package/dist/ts/explore/Context.d.ts.map +0 -1
  87. package/dist/ts/explore/Framework.d.ts.map +0 -1
  88. package/dist/ts/explore/interfaces.d.ts.map +0 -1
  89. package/dist/ts/globals.d.ts.map +0 -1
  90. package/dist/ts/index.d.ts +0 -12
  91. package/dist/ts/index.d.ts.map +0 -1
  92. package/dist/ts/notify/Framework.d.ts.map +0 -1
  93. package/dist/ts/notify/interfaces.d.ts.map +0 -1
  94. package/dist/ts/session/Framework.d.ts.map +0 -1
  95. package/dist/ts/session/Session.d.ts.map +0 -1
  96. package/dist/ts/session/interfaces.d.ts.map +0 -1
  97. package/dist/ts/transport/Framework.d.ts.map +0 -1
  98. package/dist/ts/transport/Http.d.ts.map +0 -1
  99. package/dist/ts/transport/interfaces.d.ts.map +0 -1
  100. package/dist/ts/widget/Framework.d.ts.map +0 -1
  101. package/dist/ts/widget/LastInfos.widget.d.ts.map +0 -1
  102. package/dist/ts/widget/interfaces.d.ts.map +0 -1
@@ -1,17 +1,18 @@
1
- (()=>{var __webpack_modules__={9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),o=n(6026),u=n(4372),i=n(5327),s=n(4097),a=n(4109),c=n(7985),l=n(5061);e.exports=function(e){return new Promise((function(t,n){var f=e.data,p=e.headers,d=e.responseType;r.isFormData(f)&&delete p["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var v=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";p.Authorization="Basic "+btoa(v+":"+b)}var y=s(e.baseURL,e.url);function m(){if(h){var r="getAllResponseHeaders"in h?a(h.getAllResponseHeaders()):null,u={data:d&&"text"!==d&&"json"!==d?h.response:h.responseText,status:h.status,statusText:h.statusText,headers:r,config:e,request:h};o(t,n,u),h=null}}if(h.open(e.method.toUpperCase(),i(y,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=m:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(m)},h.onabort=function(){h&&(n(l("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){n(l("Network Error",e,null,h)),h=null},h.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},r.isStandardBrowserEnv()){var g=(e.withCredentials||c(y))&&e.xsrfCookieName?u.read(e.xsrfCookieName):void 0;g&&(p[e.xsrfHeaderName]=g)}"setRequestHeader"in h&&r.forEach(p,(function(e,t){void 0===f&&"content-type"===t.toLowerCase()?delete p[t]:h.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),d&&"json"!==d&&(h.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&h.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function(e){h&&(h.abort(),n(e),h=null)})),f||(f=null),h.send(f)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),o=n(1849),u=n(321),i=n(7185);function s(e){var t=new u(e),n=o(u.prototype.request,t);return r.extend(n,u.prototype,t),r.extend(n,t),n}var a=s(n(5655));a.Axios=u,a.create=function(e){return s(i(a.defaults,e))},a.Cancel=n(5263),a.CancelToken=n(4972),a.isCancel=n(6502),a.all=function(e){return Promise.all(e)},a.spread=n(8713),a.isAxiosError=n(6268),e.exports=a,e.exports.default=a},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}o.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},o.source=function(){var e;return{token:new o((function(t){e=t})),cancel:e}},e.exports=o},6502:e=>{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),o=n(5327),u=n(782),i=n(3572),s=n(7185),a=n(4875),c=a.validators;function l(e){this.defaults=e,this.interceptors={request:new u,response:new u}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&a.assertOptions(t,{silentJSONParsing:c.transitional(c.boolean,"1.0.0"),forcedJSONParsing:c.transitional(c.boolean,"1.0.0"),clarifyTimeoutError:c.transitional(c.boolean,"1.0.0")},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,u=[];if(this.interceptors.response.forEach((function(e){u.push(e.fulfilled,e.rejected)})),!r){var l=[i,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(u),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var f=e;n.length;){var p=n.shift(),d=n.shift();try{f=p(f)}catch(e){d(e);break}}try{o=i(f)}catch(e){return Promise.reject(e)}for(;u.length;)o=o.then(u.shift(),u.shift());return o},l.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(4867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},4097:(e,t,n)=>{"use strict";var r=n(1793),o=n(7303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,o,u){var i=new Error(e);return r(i,t,n,o,u)}},3572:(e,t,n)=>{"use strict";var r=n(4867),o=n(8527),u=n(6502),i=n(5655);function s(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function(e){return s(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return s(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return u(t)||(s(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={},o=["url","method","data"],u=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function a(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function c(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=a(void 0,e[o])):n[o]=a(e[o],t[o])}r.forEach(o,(function(e){r.isUndefined(t[e])||(n[e]=a(void 0,t[e]))})),r.forEach(u,c),r.forEach(i,(function(o){r.isUndefined(t[o])?r.isUndefined(e[o])||(n[o]=a(void 0,e[o])):n[o]=a(void 0,t[o])})),r.forEach(s,(function(r){r in t?n[r]=a(e[r],t[r]):r in e&&(n[r]=a(void 0,e[r]))}));var l=o.concat(u).concat(i).concat(s),f=Object.keys(e).concat(Object.keys(t)).filter((function(e){return-1===l.indexOf(e)}));return r.forEach(f,c),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),o=n(5655);e.exports=function(e,t,n){var u=this||o;return r.forEach(n,(function(n){e=n.call(u,e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4867),o=n(6016),u=n(481),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(a=n(5448)),a),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw u(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(i)})),e.exports=c},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},5327:(e,t,n)=>{"use strict";var r=n(4867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var u;if(n)u=n(t);else if(r.isURLSearchParams(t))u=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),u=i.join("&")}if(u){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+u}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,u,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(u)&&s.push("domain="+u),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,u,i={};return e?(r.forEach(e.split("\n"),(function(e){if(u=e.indexOf(":"),t=r.trim(e.substr(0,u)).toLowerCase(),n=r.trim(e.substr(u+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(696),o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var u={},i=r.version.split(".");function s(e,t){for(var n=t?t.split("."):i,r=e.split("."),o=0;o<3;o++){if(n[o]>r[o])return!0;if(n[o]<r[o])return!1}return!1}o.transitional=function(e,t,n){var o=t&&s(t);function i(e,t){return"[Axios v"+r.version+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,s){if(!1===e)throw new Error(i(r," has been removed in "+t));return o&&!u[r]&&(u[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,s)}},e.exports={isOlderVersion:s,assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var u=r[o],i=t[u];if(i){var s=e[u],a=void 0===s||i(s,u,e);if(!0!==a)throw new TypeError("option "+u+" must be "+a)}else if(!0!==n)throw Error("Unknown option "+u)}},validators:o}},4867:(e,t,n)=>{"use strict";var r=n(1849),o=Object.prototype.toString;function u(e){return"[object Array]"===o.call(e)}function i(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function a(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),u(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:u,isArrayBuffer:function(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:a,isUndefined:i,isDate:function(e){return"[object Date]"===o.call(e)},isFile:function(e){return"[object File]"===o.call(e)},isBlob:function(e){return"[object Blob]"===o.call(e)},isFunction:c,isStream:function(e){return s(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){a(t[r])&&a(n)?t[r]=e(t[r],n):a(n)?t[r]=e({},n):u(n)?t[r]=n.slice():t[r]=n}for(var r=0,o=arguments.length;r<o;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,o){e[o]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},696:e=>{"use strict";e.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},7472:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ArgumentOutOfRangeError:()=>dt,AsyncSubject:()=>ue,BehaviorSubject:()=>ne,ConnectableObservable:()=>V,EMPTY:()=>Ie,EmptyError:()=>lt,NEVER:()=>rn,NotFoundError:()=>ht,Notification:()=>st,NotificationKind:()=>Le,ObjectUnsubscribedError:()=>Q,Observable:()=>M,ReplaySubject:()=>oe,Scheduler:()=>be,SequenceError:()=>vt,Subject:()=>ee,Subscriber:()=>T,Subscription:()=>y,TimeoutError:()=>yt,UnsubscriptionError:()=>v,VirtualAction:()=>Se,VirtualTimeScheduler:()=>Te,animationFrame:()=>Re,animationFrameScheduler:()=>Fe,animationFrames:()=>X,asap:()=>Ee,asapScheduler:()=>ge,async:()=>_e,asyncScheduler:()=>we,audit:()=>gn,auditTime:()=>En,bindCallback:()=>Ct,bindNodeCallback:()=>Pt,buffer:()=>wn,bufferCount:()=>_n,bufferTime:()=>An,bufferToggle:()=>xn,bufferWhen:()=>On,catchError:()=>Cn,combineAll:()=>kn,combineLatest:()=>Dt,combineLatestAll:()=>In,combineLatestWith:()=>Nn,concat:()=>Ht,concatAll:()=>Mt,concatMap:()=>jn,concatMapTo:()=>Ln,concatWith:()=>Un,config:()=>w,connect:()=>Hn,connectable:()=>Gt,count:()=>qn,debounce:()=>Wn,debounceTime:()=>Gn,defaultIfEmpty:()=>zn,defer:()=>qt,delay:()=>Kn,delayWhen:()=>Xn,dematerialize:()=>Zn,distinct:()=>$n,distinctUntilChanged:()=>Qn,distinctUntilKeyChanged:()=>tr,elementAt:()=>or,empty:()=>ke,endWith:()=>ur,every:()=>ir,exhaust:()=>ar,exhaustAll:()=>sr,exhaustMap:()=>cr,expand:()=>lr,filter:()=>pn,finalize:()=>fr,find:()=>pr,findIndex:()=>hr,first:()=>vr,firstValueFrom:()=>pt,flatMap:()=>Ar,forkJoin:()=>zt,from:()=>Xe,fromEvent:()=>Xt,fromEventPattern:()=>Zt,generate:()=>$t,groupBy:()=>br,identity:()=>L,ignoreElements:()=>Jn,iif:()=>Qt,interval:()=>tn,isEmpty:()=>mr,isObservable:()=>ct,last:()=>Er,lastValueFrom:()=>ft,map:()=>wt,mapTo:()=>Yn,materialize:()=>wr,max:()=>_r,merge:()=>nn,mergeAll:()=>Ut,mergeMap:()=>Bt,mergeMapTo:()=>xr,mergeScan:()=>Or,mergeWith:()=>Pr,min:()=>Fr,multicast:()=>Rr,never:()=>on,noop:()=>x,observable:()=>j,observeOn:()=>xt,of:()=>ut,onErrorResumeNext:()=>cn,pairs:()=>ln,pairwise:()=>Tr,partition:()=>dn,pipe:()=>B,pluck:()=>Sr,publish:()=>Ir,publishBehavior:()=>kr,publishLast:()=>Dr,publishReplay:()=>Nr,queue:()=>Oe,queueScheduler:()=>xe,race:()=>hn,raceWith:()=>jr,range:()=>bn,reduce:()=>Fn,refCount:()=>z,repeat:()=>Lr,repeatWhen:()=>Br,retry:()=>Ur,retryWhen:()=>Mr,sample:()=>Hr,sampleTime:()=>qr,scan:()=>Wr,scheduled:()=>Ye,sequenceEqual:()=>Gr,share:()=>zr,shareReplay:()=>Jr,single:()=>Yr,skip:()=>Xr,skipLast:()=>Kr,skipUntil:()=>Zr,skipWhile:()=>$r,startWith:()=>Qr,subscribeOn:()=>Et,switchAll:()=>to,switchMap:()=>eo,switchMapTo:()=>no,switchScan:()=>ro,take:()=>Vn,takeLast:()=>gr,takeUntil:()=>oo,takeWhile:()=>uo,tap:()=>io,throttle:()=>ao,throttleTime:()=>co,throwError:()=>it,throwIfEmpty:()=>nr,timeInterval:()=>lo,timeout:()=>mt,timeoutWith:()=>po,timer:()=>en,timestamp:()=>ho,toArray:()=>Tn,using:()=>yn,window:()=>vo,windowCount:()=>bo,windowTime:()=>yo,windowToggle:()=>mo,windowWhen:()=>go,withLatestFrom:()=>Eo,zip:()=>mn,zipAll:()=>wo,zipWith:()=>Ao});
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
1
+ var Ec=Object.defineProperty;var gc=(b,C,H)=>C in b?Ec(b,C,{enumerable:!0,configurable:!0,writable:!0,value:H}):b[C]=H;var v=(b,C,H)=>(gc(b,typeof C!="symbol"?C+"":C,H),H);(function(b,C){typeof exports=="object"&&typeof module<"u"?C(exports):typeof define=="function"&&define.amd?define(["exports"],C):(b=typeof globalThis<"u"?globalThis:b||self,C(b["ode-ts-client"]={}))})(this,function(b){var Ti,Si,Ii,Pi;"use strict";const C={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"},H={EXPLORER:"explorer",PORTAL:"portal",BLOG:"blog",EXERCIZER:"exercizer",TIMELINE:"timeline",CAS:"cas",VIDEO:"video"},Oi={APPS:"apps",WIDGETS:"widgets",LANGUAGE:"language",AUTH_CONNECTOR_ACCESSED:"authenticatedConnectorsAccessed",CURSUS:"cursus",INFOTIP:"infotip",RGPD_COOKIES:"rgpdCookies"};/*! *****************************************************************************
2
+ Copyright (c) Microsoft Corporation.
4
3
 
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
4
+ Permission to use, copy, modify, and/or distribute this software for any
5
+ purpose with or without fee is hereby granted.
7
6
 
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */
16
- var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function u(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{a(r.next(e))}catch(e){u(e)}}function s(e){try{a(r.throw(e))}catch(e){u(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}a((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}Object.create;function s(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,u=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=u.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=u.return)&&n.call(u)}finally{if(o)throw o.error}}return i}function c(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e}function l(e){return this instanceof l?(this.v=e,this):new l(e)}function f(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),u=[];return r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r;function i(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){u.push([e,t,n,r])>1||s(e,t)}))})}function s(e,t){try{(n=o[e](t)).value instanceof l?Promise.resolve(n.value.v).then(a,c):f(u[0][2],n)}catch(e){f(u[0][3],e)}var n}function a(e){s("next",e)}function c(e){s("throw",e)}function f(e,t){e(t),u.shift(),u.length&&s(u[0][0],u[0][1])}}function p(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=s(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}Object.create;function d(e){return"function"==typeof e}function h(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var v=h((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}));function b(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var y=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._teardowns=null}return e.prototype.unsubscribe=function(){var e,t,n,r,o;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var i=s(u),l=i.next();!l.done;l=i.next()){l.value.remove(this)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}else u.remove(this);var f=this.initialTeardown;if(d(f))try{f()}catch(e){o=e instanceof v?e.errors:[e]}var p=this._teardowns;if(p){this._teardowns=null;try{for(var h=s(p),b=h.next();!b.done;b=h.next()){var y=b.value;try{E(y)}catch(e){o=null!=o?o:[],e instanceof v?o=c(c([],a(o)),a(e.errors)):o.push(e)}}}catch(e){n={error:e}}finally{try{b&&!b.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}}if(o)throw new v(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)E(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._teardowns=null!==(n=this._teardowns)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&b(t,e)},e.prototype.remove=function(t){var n=this._teardowns;n&&b(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),m=y.EMPTY;function g(e){return e instanceof y||e&&"closed"in e&&d(e.remove)&&d(e.add)&&d(e.unsubscribe)}function E(e){d(e)?e():e.unsubscribe()}var w={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},_={setTimeout:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=_.delegate;return((null==n?void 0:n.setTimeout)||setTimeout).apply(void 0,c([],a(e)))},clearTimeout:function(e){var t=_.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function A(e){_.setTimeout((function(){var t=w.onUnhandledError;if(!t)throw e;t(e)}))}function x(){}var O=C("C",void 0,void 0);function C(e,t,n){return{kind:e,value:t,error:n}}var P=null;function F(e){if(w.useDeprecatedSynchronousErrorHandling){var t=!P;if(t&&(P={errorThrown:!1,error:null}),e(),t){var n=P,r=n.errorThrown,o=n.error;if(P=null,r)throw o}}else e()}function R(e){w.useDeprecatedSynchronousErrorHandling&&P&&(P.errorThrown=!0,P.error=e)}var T=function(e){function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,g(t)&&t.add(n)):n.destination=N,n}return o(t,e),t.create=function(e,t,n){return new S(e,t,n)},t.prototype.next=function(e){this.isStopped?D(function(e){return C("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?D(C("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?D(O,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(y),S=function(e){function t(t,n,r){var o,u=e.call(this)||this;if(d(t))o=t;else if(t){var i;o=t.next,n=t.error,r=t.complete,u&&w.useDeprecatedNextContext?(i=Object.create(t)).unsubscribe=function(){return u.unsubscribe()}:i=t,o=null==o?void 0:o.bind(i),n=null==n?void 0:n.bind(i),r=null==r?void 0:r.bind(i)}return u.destination={next:o?I(o,u):x,error:I(null!=n?n:k,u),complete:r?I(r,u):x},u}return o(t,e),t}(T);function I(e,t){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{e.apply(void 0,c([],a(t)))}catch(e){w.useDeprecatedSynchronousErrorHandling?R(e):A(e)}}}function k(e){throw e}function D(e,t){var n=w.onStoppedNotification;n&&_.setTimeout((function(){return n(e,t)}))}var N={closed:!0,next:x,error:k,complete:x},j="function"==typeof Symbol&&Symbol.observable||"@@observable";function L(e){return e}function B(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return U(e)}function U(e){return 0===e.length?L:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var M=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r,o=this,u=(r=e)&&r instanceof T||function(e){return e&&d(e.next)&&d(e.error)&&d(e.complete)}(r)&&g(r)?e:new S(e,t,n);return F((function(){var e=o,t=e.operator,n=e.source;u.add(t?t.call(u,n):n?o._subscribe(u):o._trySubscribe(u))})),u},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=H(t))((function(t,r){var o;o=n.subscribe((function(t){try{e(t)}catch(e){r(e),null==o||o.unsubscribe()}}),r,t)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[j]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return U(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=H(e))((function(e,n){var r;t.subscribe((function(e){return r=e}),(function(e){return n(e)}),(function(){return e(r)}))}))},e.create=function(t){return new e(t)},e}();function H(e){var t;return null!==(t=null!=e?e:w.Promise)&&void 0!==t?t:Promise}function q(e){return d(null==e?void 0:e.lift)}function W(e){return function(t){if(q(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}var G=function(e){function t(t,n,r,o,u){var i=e.call(this,t)||this;return i.onFinalize=u,i._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,i._error=o?function(e){try{o(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,i._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,i}return o(t,e),t.prototype.unsubscribe=function(){var t,n=this.closed;e.prototype.unsubscribe.call(this),!n&&(null===(t=this.onFinalize)||void 0===t||t.call(this))},t}(T);function z(){return W((function(e,t){var n=null;e._refCount++;var r=new G(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)n=null;else{var r=e._connection,o=n;n=null,!r||o&&r!==o||r.unsubscribe(),t.unsubscribe()}}));e.subscribe(r),r.closed||(n=e.connect())}))}var V=function(e){function t(t,n){var r=e.call(this)||this;return r.source=t,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,q(t)&&(r.lift=t.lift),r}return o(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new y;var n=this.getSubject();t.add(this.source.subscribe(new G(n,void 0,(function(){e._teardown(),n.complete()}),(function(t){e._teardown(),n.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=y.EMPTY)}return t},t.prototype.refCount=function(){return z()(this)},t}(M),J={now:function(){return(J.delegate||performance).now()},delegate:void 0},Y={schedule:function(e){var t=requestAnimationFrame,n=cancelAnimationFrame,r=Y.delegate;r&&(t=r.requestAnimationFrame,n=r.cancelAnimationFrame);var o=t((function(t){n=void 0,e(t)}));return new y((function(){return null==n?void 0:n(o)}))},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Y.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,c([],a(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Y.delegate;return((null==n?void 0:n.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,c([],a(e)))},delegate:void 0};function X(e){return e?K(e):$}function K(e){var t=Y.schedule;return new M((function(n){var r=new y,o=e||J,u=o.now(),i=function(s){var a=o.now();n.next({timestamp:e?a:s,elapsed:a-u}),n.closed||r.add(t(i))};return r.add(t(i)),r}))}var Z,$=K(),Q=h((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),ee=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return o(t,e),t.prototype.lift=function(e){var t=new te(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Q},t.prototype.next=function(e){var t=this;F((function(){var n,r;if(t._throwIfClosed(),!t.isStopped){var o=t.observers.slice();try{for(var u=s(o),i=u.next();!i.done;i=u.next()){i.value.next(e)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}))},t.prototype.error=function(e){var t=this;F((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}}))},t.prototype.complete=function(){var e=this;F((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=t.hasError,r=t.isStopped,o=t.observers;return n||r?m:(o.push(e),new y((function(){return b(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,o=t.isStopped;n?e.error(r):o&&e.complete()},t.prototype.asObservable=function(){var e=new M;return e.source=this,e},t.create=function(e,t){return new te(e,t)},t}(M),te=function(e){function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return o(t,e),t.prototype.next=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===n||n.call(t,e)},t.prototype.error=function(e){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===n||n.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,n;return null!==(n=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==n?n:m},t}(ee),ne=function(e){function t(t){var n=e.call(this)||this;return n._value=t,n}return o(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var n=e.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},t.prototype.getValue=function(){var e=this,t=e.hasError,n=e.thrownError,r=e._value;if(t)throw n;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(ee),re={now:function(){return(re.delegate||Date).now()},delegate:void 0},oe=function(e){function t(t,n,r){void 0===t&&(t=1/0),void 0===n&&(n=1/0),void 0===r&&(r=re);var o=e.call(this)||this;return o._bufferSize=t,o._windowTime=n,o._timestampProvider=r,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=n===1/0,o._bufferSize=Math.max(1,t),o._windowTime=Math.max(1,n),o}return o(t,e),t.prototype.next=function(t){var n=this,r=n.isStopped,o=n._buffer,u=n._infiniteTimeWindow,i=n._timestampProvider,s=n._windowTime;r||(o.push(t),!u&&o.push(i.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this._infiniteTimeWindow,r=this._buffer.slice(),o=0;o<r.length&&!e.closed;o+=n?1:2)e.next(r[o]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,n=e._timestampProvider,r=e._buffer,o=e._infiniteTimeWindow,u=(o?1:2)*t;if(t<1/0&&u<r.length&&r.splice(0,r.length-u),!o){for(var i=n.now(),s=0,a=1;a<r.length&&r[a]<=i;a+=2)s=a;s&&r.splice(0,s+1)}},t}(ee),ue=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return o(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t._hasValue,o=t._value,u=t.thrownError,i=t.isStopped,s=t._isComplete;n?e.error(u):(i||s)&&(r&&e.next(o),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,n=t._hasValue,r=t._value;t._isComplete||(this._isComplete=!0,n&&e.prototype.next.call(this,r),e.prototype.complete.call(this))},t}(ee),ie=function(e){function t(t,n){return e.call(this)||this}return o(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(y),se={setInterval:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=se.delegate;return((null==n?void 0:n.setInterval)||setInterval).apply(void 0,c([],a(e)))},clearInterval:function(e){var t=se.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},ae=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return o(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),se.setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return t;se.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n,r=!1;try{this.work(e)}catch(e){r=!0,n=!!e&&e||new Error(e)}if(r)return this.unsubscribe(),n},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,b(r,this),null!=t&&(this.id=this.recycleAsyncId(n,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(ie),ce=1,le={};function fe(e){return e in le&&(delete le[e],!0)}var pe=function(e){var t=ce++;return le[t]=!0,Z||(Z=Promise.resolve()),Z.then((function(){return fe(t)&&e()})),t},de=function(e){fe(e)},he={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=he.delegate;return((null==n?void 0:n.setImmediate)||pe).apply(void 0,c([],a(e)))},clearImmediate:function(e){var t=he.delegate;return((null==t?void 0:t.clearImmediate)||de)(e)},delegate:void 0},ve=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=he.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(he.clearImmediate(n),t._scheduled=void 0)},t}(ae),be=function(){function e(t,n){void 0===n&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(e,t,n){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},e.now=re.now,e}(),ye=function(e){function t(t,n){void 0===n&&(n=be.now);var r=e.call(this,t,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return o(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var n;this._active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}},t}(be),me=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this._active=!0,this._scheduled=void 0;var t,n=this.actions,r=-1;e=e||n.shift();var o=n.length;do{if(t=e.execute(e.state,e.delay))break}while(++r<o&&(e=n.shift()));if(this._active=!1,t){for(;++r<o&&(e=n.shift());)e.unsubscribe();throw t}},t}(ye),ge=new me(ve),Ee=ge,we=new ye(ae),_e=we,Ae=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.schedule=function(t,n){return void 0===n&&(n=0),n>0?e.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,n){return n>0||this.closed?e.prototype.execute.call(this,t,n):this._execute(t,n)},t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?e.prototype.requestAsyncId.call(this,t,n,r):t.flush(this)},t}(ae),xe=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(ye))(Ae),Oe=xe,Ce=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r}return o(t,e),t.prototype.requestAsyncId=function(t,n,r){return void 0===r&&(r=0),null!==r&&r>0?e.prototype.requestAsyncId.call(this,t,n,r):(t.actions.push(this),t._scheduled||(t._scheduled=Y.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,n,r);0===t.actions.length&&(Y.cancelAnimationFrame(n),t._scheduled=void 0)},t}(ae),Pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.flush=function(e){this._active=!0,this._scheduled=void 0;var t,n=this.actions,r=-1;e=e||n.shift();var o=n.length;do{if(t=e.execute(e.state,e.delay))break}while(++r<o&&(e=n.shift()));if(this._active=!1,t){for(;++r<o&&(e=n.shift());)e.unsubscribe();throw t}},t}(ye),Fe=new Pe(Ce),Re=Fe,Te=function(e){function t(t,n){void 0===t&&(t=Se),void 0===n&&(n=1/0);var r=e.call(this,t,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return o(t,e),t.prototype.flush=function(){for(var e,t,n=this.actions,r=this.maxFrames;(t=n[0])&&t.delay<=r&&(n.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=n.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(ye),Se=function(e){function t(t,n,r){void 0===r&&(r=t.index+=1);var o=e.call(this,t,n)||this;return o.scheduler=t,o.work=n,o.index=r,o.active=!0,o.index=t.index=r,o}return o(t,e),t.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return e.prototype.schedule.call(this,n,r);this.active=!1;var o=new t(this.scheduler,this.work);return this.add(o),o.schedule(n,r)}return y.EMPTY},t.prototype.requestAsyncId=function(e,n,r){void 0===r&&(r=0),this.delay=e.frame+r;var o=e.actions;return o.push(this),o.sort(t.sortActions),!0},t.prototype.recycleAsyncId=function(e,t,n){void 0===n&&(n=0)},t.prototype._execute=function(t,n){if(!0===this.active)return e.prototype._execute.call(this,t,n)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(ae),Ie=new M((function(e){return e.complete()}));function ke(e){return e?function(e){return new M((function(t){return e.schedule((function(){return t.complete()}))}))}(e):Ie}function De(e,t){return new M((function(n){var r=0;return t.schedule((function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())}))}))}var Ne=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e};function je(e){return d(null==e?void 0:e.then)}var Le,Be="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Ue(e,t,n,r){void 0===r&&(r=0);var o=t.schedule((function(){try{n.call(this)}catch(t){e.error(t)}}),r);return e.add(o),o}function Me(e,t){return new M((function(n){var r;return n.add(t.schedule((function(){r=e[Be](),Ue(n,t,(function(){var e=r.next(),t=e.value;e.done?n.complete():(n.next(t),this.schedule())}))}))),function(){return d(null==r?void 0:r.return)&&r.return()}}))}function He(e,t){if(!e)throw new Error("Iterable cannot be null");return new M((function(n){var r=new y;return r.add(t.schedule((function(){var o=e[Symbol.asyncIterator]();r.add(t.schedule((function(){var e=this;o.next().then((function(t){t.done?n.complete():(n.next(t.value),e.schedule())}))})))}))),r}))}function qe(e){return d(e[j])}function We(e){return d(null==e?void 0:e[Be])}function Ge(e){return Symbol.asyncIterator&&d(null==e?void 0:e[Symbol.asyncIterator])}function ze(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function Ve(e){return f(this,arguments,(function(){var t,n,r;return i(this,(function(o){switch(o.label){case 0:t=e.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,l(t.read())];case 3:return n=o.sent(),r=n.value,n.done?[4,l(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,l(r)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))}function Je(e){return d(null==e?void 0:e.getReader)}function Ye(e,t){if(null!=e){if(qe(e))return function(e,t){return new M((function(n){var r=new y;return r.add(t.schedule((function(){var o=e[j]();r.add(o.subscribe({next:function(e){r.add(t.schedule((function(){return n.next(e)})))},error:function(e){r.add(t.schedule((function(){return n.error(e)})))},complete:function(){r.add(t.schedule((function(){return n.complete()})))}}))}))),r}))}(e,t);if(Ne(e))return De(e,t);if(je(e))return function(e,t){return new M((function(n){return t.schedule((function(){return e.then((function(e){n.add(t.schedule((function(){n.next(e),n.add(t.schedule((function(){return n.complete()})))})))}),(function(e){n.add(t.schedule((function(){return n.error(e)})))}))}))}))}(e,t);if(Ge(e))return He(e,t);if(We(e))return Me(e,t);if(Je(e))return function(e,t){return He(Ve(e),t)}(e,t)}throw ze(e)}function Xe(e,t){return t?Ye(e,t):Ke(e)}function Ke(e){if(e instanceof M)return e;if(null!=e){if(qe(e))return r=e,new M((function(e){var t=r[j]();if(d(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Ne(e))return Ze(e);if(je(e))return n=e,new M((function(e){n.then((function(t){e.closed||(e.next(t),e.complete())}),(function(t){return e.error(t)})).then(null,A)}));if(Ge(e))return $e(e);if(We(e))return t=e,new M((function(e){var n,r;try{for(var o=s(t),u=o.next();!u.done;u=o.next()){var i=u.value;if(e.next(i),e.closed)return}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}e.complete()}));if(Je(e))return $e(Ve(e))}var t,n,r;throw ze(e)}function Ze(e){return new M((function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()}))}function $e(e){return new M((function(t){(function(e,t){var n,r,o,s;return u(this,void 0,void 0,(function(){var u,a;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),n=p(e),i.label=1;case 1:return[4,n.next()];case 2:if((r=i.sent()).done)return[3,4];if(u=r.value,t.next(u),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=i.sent(),o={error:a},[3,11];case 6:return i.trys.push([6,,9,10]),r&&!r.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function Qe(e,t){return t?De(e,t):Ze(e)}function et(e){return e&&d(e.schedule)}function tt(e){return e[e.length-1]}function nt(e){return d(tt(e))?e.pop():void 0}function rt(e){return et(tt(e))?e.pop():void 0}function ot(e,t){return"number"==typeof tt(e)?e.pop():t}function ut(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=rt(e);return n?De(e,n):Qe(e)}function it(e,t){var n=d(e)?e:function(){return e},r=function(e){return e.error(n())};return new M(t?function(e){return t.schedule(r,0,e)}:r)}!function(e){e.NEXT="N",e.ERROR="E",e.COMPLETE="C"}(Le||(Le={}));var st=function(){function e(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue="N"===e}return e.prototype.observe=function(e){return at(this,e)},e.prototype.do=function(e,t,n){var r=this,o=r.kind,u=r.value,i=r.error;return"N"===o?null==e?void 0:e(u):"E"===o?null==t?void 0:t(i):null==n?void 0:n()},e.prototype.accept=function(e,t,n){var r;return d(null===(r=e)||void 0===r?void 0:r.next)?this.observe(e):this.do(e,t,n)},e.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,r=e.error,o="N"===t?ut(n):"E"===t?it((function(){return r})):"C"===t?Ie:0;if(!o)throw new TypeError("Unexpected notification kind "+t);return o},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function at(e,t){var n,r,o,u=e,i=u.kind,s=u.value,a=u.error;if("string"!=typeof i)throw new TypeError('Invalid notification, missing "kind"');"N"===i?null===(n=t.next)||void 0===n||n.call(t,s):"E"===i?null===(r=t.error)||void 0===r||r.call(t,a):null===(o=t.complete)||void 0===o||o.call(t)}function ct(e){return!!e&&(e instanceof M||d(e.lift)&&d(e.subscribe))}var lt=h((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}));function ft(e,t){var n="object"==typeof t;return new Promise((function(r,o){var u,i=!1;e.subscribe({next:function(e){u=e,i=!0},error:o,complete:function(){i?r(u):n?r(t.defaultValue):o(new lt)}})}))}function pt(e,t){var n="object"==typeof t;return new Promise((function(r,o){var u=new S({next:function(e){r(e),u.unsubscribe()},error:o,complete:function(){n?r(t.defaultValue):o(new lt)}});e.subscribe(u)}))}var dt=h((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),ht=h((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}})),vt=h((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}));function bt(e){return e instanceof Date&&!isNaN(e)}var yt=h((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}}));function mt(e,t){var n=bt(e)?{first:e}:"number"==typeof e?{each:e}:e,r=n.first,o=n.each,u=n.with,i=void 0===u?gt:u,s=n.scheduler,a=void 0===s?null!=t?t:we:s,c=n.meta,l=void 0===c?null:c;if(null==r&&null==o)throw new TypeError("No timeout provided.");return W((function(e,t){var n,u,s=null,c=0,f=function(e){u=Ue(t,a,(function(){n.unsubscribe(),Ke(i({meta:l,lastValue:s,seen:c})).subscribe(t)}),e)};n=e.subscribe(new G(t,(function(e){null==u||u.unsubscribe(),c++,t.next(s=e),o>0&&f(o)}),void 0,void 0,(function(){(null==u?void 0:u.closed)||null==u||u.unsubscribe(),s=null}))),f(null!=r?"number"==typeof r?r:+r-a.now():o)}))}function gt(e){throw new yt(e)}function Et(e,t){return void 0===t&&(t=0),W((function(n,r){r.add(e.schedule((function(){return n.subscribe(r)}),t))}))}function wt(e,t){return W((function(n,r){var o=0;n.subscribe(new G(r,(function(n){r.next(e.call(t,n,o++))})))}))}var _t=Array.isArray;function At(e){return wt((function(t){return function(e,t){return _t(t)?e.apply(void 0,c([],a(t))):e(t)}(e,t)}))}function xt(e,t){return void 0===t&&(t=0),W((function(n,r){n.subscribe(new G(r,(function(n){return r.add(e.schedule((function(){return r.next(n)}),t))}),(function(){return r.add(e.schedule((function(){return r.complete()}),t))}),(function(n){return r.add(e.schedule((function(){return r.error(n)}),t))})))}))}function Ot(e,t,n,r){if(n){if(!et(n))return function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return Ot(e,t,r).apply(this,o).pipe(At(n))};r=n}return r?function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return Ot(e,t).apply(this,n).pipe(Et(r),xt(r))}:function(){for(var n=this,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var u=new ue,i=!0;return new M((function(o){var s=u.subscribe(o);if(i){i=!1;var l=!1,f=!1;t.apply(n,c(c([],a(r)),[function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(e){var r=t.shift();if(null!=r)return void u.error(r)}u.next(1<t.length?t:t[0]),f=!0,l&&u.complete()}])),f&&u.complete(),l=!0}return s}))}}function Ct(e,t,n){return Ot(!1,e,t,n)}function Pt(e,t,n){return Ot(!0,e,t,n)}var Ft=Array.isArray,Rt=Object.getPrototypeOf,Tt=Object.prototype,St=Object.keys;function It(e){if(1===e.length){var t=e[0];if(Ft(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&Rt(r)===Tt){var n=St(t);return{args:n.map((function(e){return t[e]})),keys:n}}}var r;return{args:e,keys:null}}function kt(e,t){return e.reduce((function(e,n,r){return e[n]=t[r],e}),{})}function Dt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=rt(e),r=nt(e),o=It(e),u=o.args,i=o.keys;if(0===u.length)return Xe([],n);var s=new M(Nt(u,n,i?function(e){return kt(i,e)}:L));return r?s.pipe(At(r)):s}function Nt(e,t,n){return void 0===n&&(n=L),function(r){jt(t,(function(){for(var o=e.length,u=new Array(o),i=o,s=o,a=function(o){jt(t,(function(){var a=Xe(e[o],t),c=!1;a.subscribe(new G(r,(function(e){u[o]=e,c||(c=!0,s--),s||r.next(n(u.slice()))}),(function(){--i||r.complete()})))}),r)},c=0;c<o;c++)a(c)}),r)}}function jt(e,t,n){e?n.add(e.schedule(t)):t()}function Lt(e,t,n,r,o,u,i,s){var a=[],c=0,l=0,f=!1,p=function(){!f||a.length||c||t.complete()},d=function(e){return c<r?h(e):a.push(e)},h=function(e){u&&t.next(e),c++;var s=!1;Ke(n(e,l++)).subscribe(new G(t,(function(e){null==o||o(e),u?d(e):t.next(e)}),(function(){s=!0}),void 0,(function(){if(s)try{c--;for(var e=function(){var e=a.shift();i?t.add(i.schedule((function(){return h(e)}))):h(e)};a.length&&c<r;)e();p()}catch(e){t.error(e)}})))};return e.subscribe(new G(t,d,(function(){f=!0,p()}))),function(){null==s||s()}}function Bt(e,t,n){return void 0===n&&(n=1/0),d(t)?Bt((function(n,r){return wt((function(e,o){return t(n,e,r,o)}))(Ke(e(n,r)))}),n):("number"==typeof t&&(n=t),W((function(t,r){return Lt(t,r,e,n)})))}function Ut(e){return void 0===e&&(e=1/0),Bt(L,e)}function Mt(){return Ut(1)}function Ht(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Mt()(Qe(e,rt(e)))}function qt(e){return new M((function(t){Ke(e()).subscribe(t)}))}var Wt={connector:function(){return new ee},resetOnDisconnect:!0};function Gt(e,t){void 0===t&&(t=Wt);var n=null,r=t.connector,o=t.resetOnDisconnect,u=void 0===o||o,i=r(),s=new M((function(e){return i.subscribe(e)}));return s.connect=function(){return n&&!n.closed||(n=qt((function(){return e})).subscribe(i),u&&n.add((function(){return i=r()}))),n},s}function zt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=nt(e),r=It(e),o=r.args,u=r.keys,i=new M((function(e){var t=o.length;if(t)for(var n=new Array(t),r=t,i=t,s=function(t){var s=!1;Ke(o[t]).subscribe(new G(e,(function(e){s||(s=!0,i--),n[t]=e}),(function(){--r&&s||(i||e.next(u?kt(u,n):n),e.complete())})))},a=0;a<t;a++)s(a);else e.complete()}));return n?i.pipe(At(n)):i}var Vt=["addListener","removeListener"],Jt=["addEventListener","removeEventListener"],Yt=["on","off"];function Xt(e,t,n,r){if(d(n)&&(r=n,n=void 0),r)return Xt(e,t,n).pipe(At(r));var o=a(function(e){return d(e.addEventListener)&&d(e.removeEventListener)}(e)?Jt.map((function(r){return function(o){return e[r](t,o,n)}})):function(e){return d(e.addListener)&&d(e.removeListener)}(e)?Vt.map(Kt(e,t)):function(e){return d(e.on)&&d(e.off)}(e)?Yt.map(Kt(e,t)):[],2),u=o[0],i=o[1];if(!u&&Ne(e))return Bt((function(e){return Xt(e,t,n)}))(Qe(e));if(!u)throw new TypeError("Invalid event target");return new M((function(e){var t=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.next(1<t.length?t:t[0])};return u(t),function(){return i(t)}}))}function Kt(e,t){return function(n){return function(r){return e[n](t,r)}}}function Zt(e,t,n){return n?Zt(e,t).pipe(At(n)):new M((function(n){var r=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.next(1===e.length?e[0]:e)},o=e(r);return d(t)?function(){return t(r,o)}:void 0}))}function $t(e,t,n,r,o){var u,s,a,c;function l(){var e;return i(this,(function(r){switch(r.label){case 0:e=c,r.label=1;case 1:return t&&!t(e)?[3,4]:[4,a(e)];case 2:r.sent(),r.label=3;case 3:return e=n(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(c=(u=e).initialState,t=u.condition,n=u.iterate,s=u.resultSelector,a=void 0===s?L:s,o=u.scheduler):(c=e,!r||et(r)?(a=L,o=r):a=r),qt(o?function(){return Me(l(),o)}:l)}function Qt(e,t,n){return qt((function(){return e()?t:n}))}function en(e,t,n){void 0===e&&(e=0),void 0===n&&(n=_e);var r=-1;return null!=t&&(et(t)?n=t:r=t),new M((function(t){var o=bt(e)?+e-n.now():e;o<0&&(o=0);var u=0;return n.schedule((function(){t.closed||(t.next(u++),0<=r?this.schedule(void 0,r):t.complete())}),o)}))}function tn(e,t){return void 0===e&&(e=0),void 0===t&&(t=we),e<0&&(e=0),en(e,e,t)}function nn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=rt(e),r=ot(e,1/0),o=e;return o.length?1===o.length?Ke(o[0]):Ut(r)(Qe(o,n)):Ie}var rn=new M(x);function on(){return rn}var un=Array.isArray;function sn(e){return 1===e.length&&un(e[0])?e[0]:e}function an(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=sn(e);return W((function(e,t){var r=c([e],a(n)),o=function(){if(!t.closed)if(r.length>0){var e=void 0;try{e=Ke(r.shift())}catch(e){return void o()}var n=new G(t,void 0,x,x);t.add(e.subscribe(n)),n.add(o)}else t.complete()};o()}))}function cn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return an(sn(e))(Ie)}function ln(e,t){return Xe(Object.entries(e),t)}function fn(e,t){return function(n,r){return!e.call(t,n,r)}}function pn(e,t){return W((function(n,r){var o=0;n.subscribe(new G(r,(function(n){return e.call(t,n,o++)&&r.next(n)})))}))}function dn(e,t,n){return[pn(t,n)(Ke(e)),pn(fn(t,n))(Ke(e))]}function hn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=sn(e)).length?Ke(e[0]):new M(vn(e))}function vn(e){return function(t){for(var n=[],r=function(r){n.push(Ke(e[r]).subscribe(new G(t,(function(e){if(n){for(var o=0;o<n.length;o++)o!==r&&n[o].unsubscribe();n=null}t.next(e)}))))},o=0;n&&!t.closed&&o<e.length;o++)r(o)}}function bn(e,t,n){if(null==t&&(t=e,e=0),t<=0)return Ie;var r=t+e;return new M(n?function(t){var o=e;return n.schedule((function(){o<r?(t.next(o++),this.schedule()):t.complete()}))}:function(t){for(var n=e;n<r&&!t.closed;)t.next(n++);t.complete()})}function yn(e,t){return new M((function(n){var r=e(),o=t(r);return(o?Ke(o):Ie).subscribe(n),function(){r&&r.unsubscribe()}}))}function mn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=nt(e),r=sn(e);return r.length?new M((function(e){var t=r.map((function(){return[]})),o=r.map((function(){return!1}));e.add((function(){t=o=null}));for(var u=function(u){Ke(r[u]).subscribe(new G(e,(function(r){if(t[u].push(r),t.every((function(e){return e.length}))){var i=t.map((function(e){return e.shift()}));e.next(n?n.apply(void 0,c([],a(i))):i),t.some((function(e,t){return!e.length&&o[t]}))&&e.complete()}}),(function(){o[u]=!0,!t[u].length&&e.complete()})))},i=0;!e.closed&&i<r.length;i++)u(i);return function(){t=o=null}})):Ie}function gn(e){return W((function(t,n){var r=!1,o=null,u=null,i=!1,s=function(){if(null==u||u.unsubscribe(),u=null,r){r=!1;var e=o;o=null,n.next(e)}i&&n.complete()},a=function(){u=null,i&&n.complete()};t.subscribe(new G(n,(function(t){r=!0,o=t,u||Ke(e(t)).subscribe(u=new G(n,s,a))}),(function(){i=!0,(!r||!u||u.closed)&&n.complete()})))}))}function En(e,t){return void 0===t&&(t=_e),gn((function(){return en(e,t)}))}function wn(e){return W((function(t,n){var r=[];return t.subscribe(new G(n,(function(e){return r.push(e)}),(function(){n.next(r),n.complete()}))),e.subscribe(new G(n,(function(){var e=r;r=[],n.next(e)}),x)),function(){r=null}}))}function _n(e,t){return void 0===t&&(t=null),t=null!=t?t:e,W((function(n,r){var o=[],u=0;n.subscribe(new G(r,(function(n){var i,a,c,l,f=null;u++%t==0&&o.push([]);try{for(var p=s(o),d=p.next();!d.done;d=p.next()){(y=d.value).push(n),e<=y.length&&(f=null!=f?f:[]).push(y)}}catch(e){i={error:e}}finally{try{d&&!d.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}if(f)try{for(var h=s(f),v=h.next();!v.done;v=h.next()){var y=v.value;b(o,y),r.next(y)}}catch(e){c={error:e}}finally{try{v&&!v.done&&(l=h.return)&&l.call(h)}finally{if(c)throw c.error}}}),(function(){var e,t;try{for(var n=s(o),u=n.next();!u.done;u=n.next()){var i=u.value;r.next(i)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){o=null})))}))}function An(e){for(var t,n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var u=null!==(t=rt(r))&&void 0!==t?t:we,i=null!==(n=r[0])&&void 0!==n?n:null,a=r[1]||1/0;return W((function(t,n){var r=[],o=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),b(r,e),n.next(t),o&&l()},l=function(){if(r){var t=new y;n.add(t);var o={buffer:[],subs:t};r.push(o),t.add(u.schedule((function(){return c(o)}),e))}};null!==i&&i>=0?n.add(u.schedule((function(){l(),!this.closed&&n.add(this.schedule(null,i))}),i)):o=!0,l();var f=new G(n,(function(e){var t,n,o=r.slice();try{for(var u=s(o),i=u.next();!i.done;i=u.next()){var l=i.value,f=l.buffer;f.push(e),a<=f.length&&c(l)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}),(function(){for(;null==r?void 0:r.length;)n.next(r.shift().buffer);null==f||f.unsubscribe(),n.complete(),n.unsubscribe()}),void 0,(function(){return r=null}));t.subscribe(f)}))}function xn(e,t){return W((function(n,r){var o=[];Ke(e).subscribe(new G(r,(function(e){var n=[];o.push(n);var u=new y;u.add(Ke(t(e)).subscribe(new G(r,(function(){b(o,n),r.next(n),u.unsubscribe()}),x)))}),x)),n.subscribe(new G(r,(function(e){var t,n;try{for(var r=s(o),u=r.next();!u.done;u=r.next()){u.value.push(e)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}}),(function(){for(;o.length>0;)r.next(o.shift());r.complete()})))}))}function On(e){return W((function(t,n){var r=null,o=null,u=function(){null==o||o.unsubscribe();var t=r;r=[],t&&n.next(t),Ke(e()).subscribe(o=new G(n,u,x))};u(),t.subscribe(new G(n,(function(e){return null==r?void 0:r.push(e)}),(function(){r&&n.next(r),n.complete()}),void 0,(function(){return r=o=null})))}))}function Cn(e){return W((function(t,n){var r,o=null,u=!1;o=t.subscribe(new G(n,void 0,void 0,(function(i){r=Ke(e(i,Cn(e)(t))),o?(o.unsubscribe(),o=null,r.subscribe(n)):u=!0}))),u&&(o.unsubscribe(),o=null,r.subscribe(n))}))}function Pn(e,t,n,r,o){return function(u,i){var s=n,a=t,c=0;u.subscribe(new G(i,(function(t){var n=c++;a=s?e(a,t,n):(s=!0,t),r&&i.next(a)}),o&&function(){s&&i.next(a),i.complete()}))}}function Fn(e,t){return W(Pn(e,t,arguments.length>=2,!1,!0))}var Rn=function(e,t){return e.push(t),e};function Tn(){return W((function(e,t){Fn(Rn,[])(e).subscribe(t)}))}function Sn(e,t){return B(Tn(),Bt((function(t){return e(t)})),t?At(t):L)}function In(e){return Sn(Dt,e)}var kn=In;function Dn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=nt(e);return n?B(Dn.apply(void 0,c([],a(e))),At(n)):W((function(t,n){Nt(c([t],a(sn(e))))(n)}))}function Nn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Dn.apply(void 0,c([],a(e)))}function jn(e,t){return d(t)?Bt(e,t,1):Bt(e,1)}function Ln(e,t){return d(t)?jn((function(){return e}),t):jn((function(){return e}))}function Bn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=rt(e);return W((function(t,r){Mt()(Qe(c([t],a(e)),n)).subscribe(r)}))}function Un(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Bn.apply(void 0,c([],a(e)))}var Mn={connector:function(){return new ee}};function Hn(e,t){void 0===t&&(t=Mn);var n=t.connector;return W((function(t,r){var o,u=n();Xe(e((o=u,new M((function(e){return o.subscribe(e)}))))).subscribe(r),r.add(t.subscribe(u))}))}function qn(e){return Fn((function(t,n,r){return!e||e(n,r)?t+1:t}),0)}function Wn(e){return W((function(t,n){var r=!1,o=null,u=null,i=function(){if(null==u||u.unsubscribe(),u=null,r){r=!1;var e=o;o=null,n.next(e)}};t.subscribe(new G(n,(function(t){null==u||u.unsubscribe(),r=!0,o=t,u=new G(n,i,x),Ke(e(t)).subscribe(u)}),(function(){i(),n.complete()}),void 0,(function(){o=u=null})))}))}function Gn(e,t){return void 0===t&&(t=we),W((function(n,r){var o=null,u=null,i=null,s=function(){if(o){o.unsubscribe(),o=null;var e=u;u=null,r.next(e)}};function a(){var n=i+e,u=t.now();if(u<n)return o=this.schedule(void 0,n-u),void r.add(o);s()}n.subscribe(new G(r,(function(n){u=n,i=t.now(),o||(o=t.schedule(a,e),r.add(o))}),(function(){s(),r.complete()}),void 0,(function(){u=o=null})))}))}function zn(e){return W((function(t,n){var r=!1;t.subscribe(new G(n,(function(e){r=!0,n.next(e)}),(function(){r||n.next(e),n.complete()})))}))}function Vn(e){return e<=0?function(){return Ie}:W((function(t,n){var r=0;t.subscribe(new G(n,(function(t){++r<=e&&(n.next(t),e<=r&&n.complete())})))}))}function Jn(){return W((function(e,t){e.subscribe(new G(t,x))}))}function Yn(e){return wt((function(){return e}))}function Xn(e,t){return t?function(n){return Ht(t.pipe(Vn(1),Jn()),n.pipe(Xn(e)))}:Bt((function(t,n){return e(t,n).pipe(Vn(1),Yn(t))}))}function Kn(e,t){void 0===t&&(t=we);var n=en(e,t);return Xn((function(){return n}))}function Zn(){return W((function(e,t){e.subscribe(new G(t,(function(e){return at(e,t)})))}))}function $n(e,t){return W((function(n,r){var o=new Set;n.subscribe(new G(r,(function(t){var n=e?e(t):t;o.has(n)||(o.add(n),r.next(t))}))),null==t||t.subscribe(new G(r,(function(){return o.clear()}),x))}))}function Qn(e,t){return void 0===t&&(t=L),e=null!=e?e:er,W((function(n,r){var o,u=!0;n.subscribe(new G(r,(function(n){var i=t(n);!u&&e(o,i)||(u=!1,o=i,r.next(n))})))}))}function er(e,t){return e===t}function tr(e,t){return Qn((function(n,r){return t?t(n[e],r[e]):n[e]===r[e]}))}function nr(e){return void 0===e&&(e=rr),W((function(t,n){var r=!1;t.subscribe(new G(n,(function(e){r=!0,n.next(e)}),(function(){return r?n.complete():n.error(e())})))}))}function rr(){return new lt}function or(e,t){if(e<0)throw new dt;var n=arguments.length>=2;return function(r){return r.pipe(pn((function(t,n){return n===e})),Vn(1),n?zn(t):nr((function(){return new dt})))}}function ur(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return Ht(t,ut.apply(void 0,c([],a(e))))}}function ir(e,t){return W((function(n,r){var o=0;n.subscribe(new G(r,(function(u){e.call(t,u,o++,n)||(r.next(!1),r.complete())}),(function(){r.next(!0),r.complete()})))}))}function sr(){return W((function(e,t){var n=!1,r=null;e.subscribe(new G(t,(function(e){r||(r=Ke(e).subscribe(new G(t,void 0,(function(){r=null,n&&t.complete()}))))}),(function(){n=!0,!r&&t.complete()})))}))}var ar=sr;function cr(e,t){return t?function(n){return n.pipe(cr((function(n,r){return Ke(e(n,r)).pipe(wt((function(e,o){return t(n,e,r,o)})))})))}:W((function(t,n){var r=0,o=null,u=!1;t.subscribe(new G(n,(function(t){o||(o=new G(n,void 0,(function(){o=null,u&&n.complete()})),Ke(e(t,r++)).subscribe(o))}),(function(){u=!0,!o&&n.complete()})))}))}function lr(e,t,n){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,W((function(r,o){return Lt(r,o,e,t,void 0,!0,n)}))}function fr(e){return W((function(t,n){try{t.subscribe(n)}finally{n.add(e)}}))}function pr(e,t){return W(dr(e,t,"value"))}function dr(e,t,n){var r="index"===n;return function(n,o){var u=0;n.subscribe(new G(o,(function(i){var s=u++;e.call(t,i,s,n)&&(o.next(r?s:i),o.complete())}),(function(){o.next(r?-1:void 0),o.complete()})))}}function hr(e,t){return W(dr(e,t,"index"))}function vr(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?pn((function(t,n){return e(t,n,r)})):L,Vn(1),n?zn(t):nr((function(){return new lt})))}}function br(e,t,n,r){return W((function(o,u){var i;t&&"function"!=typeof t?(n=t.duration,i=t.element,r=t.connector):i=t;var s=new Map,a=function(e){s.forEach(e),e(u)},c=function(e){return a((function(t){return t.error(e)}))},l=new yr(u,(function(t){try{var o=e(t),a=s.get(o);if(!a){s.set(o,a=r?r():new ee);var f=(d=o,h=a,(v=new M((function(e){l.activeGroups++;var t=h.subscribe(e);return function(){t.unsubscribe(),0==--l.activeGroups&&l.teardownAttempted&&l.unsubscribe()}}))).key=d,v);if(u.next(f),n){var p=new G(a,(function(){a.complete(),null==p||p.unsubscribe()}),void 0,void 0,(function(){return s.delete(o)}));l.add(Ke(n(f)).subscribe(p))}}a.next(i?i(t):t)}catch(e){c(e)}var d,h,v}),(function(){return a((function(e){return e.complete()}))}),c,(function(){return s.clear()}));o.subscribe(l)}))}var yr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.activeGroups=0,t.teardownAttempted=!1,t}return o(t,e),t.prototype.unsubscribe=function(){this.teardownAttempted=!0,0===this.activeGroups&&e.prototype.unsubscribe.call(this)},t}(G);function mr(){return W((function(e,t){e.subscribe(new G(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}function gr(e){return e<=0?function(){return Ie}:W((function(t,n){var r=[];t.subscribe(new G(n,(function(t){r.push(t),e<r.length&&r.shift()}),(function(){var e,t;try{for(var o=s(r),u=o.next();!u.done;u=o.next()){var i=u.value;n.next(i)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}n.complete()}),void 0,(function(){r=null})))}))}function Er(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?pn((function(t,n){return e(t,n,r)})):L,gr(1),n?zn(t):nr((function(){return new lt})))}}function wr(){return W((function(e,t){e.subscribe(new G(t,(function(e){t.next(st.createNext(e))}),(function(){t.next(st.createComplete()),t.complete()}),(function(e){t.next(st.createError(e)),t.complete()})))}))}function _r(e){return Fn(d(e)?function(t,n){return e(t,n)>0?t:n}:function(e,t){return e>t?e:t})}var Ar=Bt;function xr(e,t,n){return void 0===n&&(n=1/0),d(t)?Bt((function(){return e}),t,n):("number"==typeof t&&(n=t),Bt((function(){return e}),n))}function Or(e,t,n){return void 0===n&&(n=1/0),W((function(r,o){var u=t;return Lt(r,o,(function(t,n){return e(u,t,n)}),n,(function(e){u=e}),!1,void 0,(function(){return u=null}))}))}function Cr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=rt(e),r=ot(e,1/0);return e=sn(e),W((function(t,o){Ut(r)(Qe(c([t],a(e)),n)).subscribe(o)}))}function Pr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Cr.apply(void 0,c([],a(e)))}function Fr(e){return Fn(d(e)?function(t,n){return e(t,n)<0?t:n}:function(e,t){return e<t?e:t})}function Rr(e,t){var n=d(e)?e:function(){return e};return d(t)?Hn(t,{connector:n}):function(e){return new V(e,n)}}function Tr(){return W((function(e,t){var n,r=!1;e.subscribe(new G(t,(function(e){var o=n;n=e,r&&t.next([o,e]),r=!0})))}))}function Sr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.length;if(0===n)throw new Error("list of properties cannot be empty.");return wt((function(t){for(var r=t,o=0;o<n;o++){var u=null==r?void 0:r[e[o]];if(void 0===u)return;r=u}return r}))}function Ir(e){return e?function(t){return Hn(e)(t)}:function(e){return Rr(new ee)(e)}}function kr(e){return function(t){var n=new ne(e);return new V(t,(function(){return n}))}}function Dr(){return function(e){var t=new ue;return new V(e,(function(){return t}))}}function Nr(e,t,n,r){n&&!d(n)&&(r=n);var o=d(n)?n:void 0;return function(n){return Rr(new oe(e,t,r),o)(n)}}function jr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?W((function(t,n){vn(c([t],a(e)))(n)})):L}function Lr(e){return void 0===e&&(e=1/0),e<=0?function(){return Ie}:W((function(t,n){var r,o=0,u=function(){var i=!1;r=t.subscribe(new G(n,void 0,(function(){++o<e?r?(r.unsubscribe(),r=null,u()):i=!0:n.complete()}))),i&&(r.unsubscribe(),r=null,u())};u()}))}function Br(e){return W((function(t,n){var r,o,u=!1,i=!1,s=!1,a=function(){return s&&i&&(n.complete(),!0)},c=function(){s=!1,r=t.subscribe(new G(n,void 0,(function(){s=!0,!a()&&(o||(o=new ee,e(o).subscribe(new G(n,(function(){r?c():u=!0}),(function(){i=!0,a()})))),o).next()}))),u&&(r.unsubscribe(),r=null,u=!1,c())};c()}))}function Ur(e){var t;void 0===e&&(e=1/0);var n=(t=e&&"object"==typeof e?e:{count:e}).count,r=void 0===n?1/0:n,o=t.delay,u=t.resetOnSuccess,i=void 0!==u&&u;return r<=0?L:W((function(e,t){var n,u=0,s=function(){var a=!1;n=e.subscribe(new G(t,(function(e){i&&(u=0),t.next(e)}),void 0,(function(e){if(u++<r){var i=function(){n?(n.unsubscribe(),n=null,s()):a=!0};if(null!=o){var c="number"==typeof o?en(o):Ke(o(e,u)),l=new G(t,(function(){l.unsubscribe(),i()}),(function(){t.complete()}));c.subscribe(l)}else i()}else t.error(e)}))),a&&(n.unsubscribe(),n=null,s())};s()}))}function Mr(e){return W((function(t,n){var r,o,u=!1,i=function(){r=t.subscribe(new G(n,void 0,void 0,(function(t){o||(o=new ee,e(o).subscribe(new G(n,(function(){return r?i():u=!0})))),o&&o.next(t)}))),u&&(r.unsubscribe(),r=null,u=!1,i())};i()}))}function Hr(e){return W((function(t,n){var r=!1,o=null;t.subscribe(new G(n,(function(e){r=!0,o=e})));e.subscribe(new G(n,(function(){if(r){r=!1;var e=o;o=null,n.next(e)}}),x))}))}function qr(e,t){return void 0===t&&(t=we),Hr(tn(e,t))}function Wr(e,t){return W(Pn(e,t,arguments.length>=2,!0))}function Gr(e,t){return void 0===t&&(t=function(e,t){return e===t}),W((function(n,r){var o={buffer:[],complete:!1},u={buffer:[],complete:!1},i=function(e){r.next(e),r.complete()},s=function(e,n){var o=new G(r,(function(r){var o=n.buffer,u=n.complete;0===o.length?u?i(!1):e.buffer.push(r):!t(r,o.shift())&&i(!1)}),(function(){e.complete=!0;var t=n.complete,r=n.buffer;t&&i(0===r.length),null==o||o.unsubscribe()}));return o};n.subscribe(s(o,u)),e.subscribe(s(u,o))}))}function zr(e){void 0===e&&(e={});var t=e.connector,n=void 0===t?function(){return new ee}:t,r=e.resetOnError,o=void 0===r||r,u=e.resetOnComplete,i=void 0===u||u,s=e.resetOnRefCountZero,a=void 0===s||s;return function(e){var t=null,r=null,u=null,s=0,c=!1,l=!1,f=function(){null==r||r.unsubscribe(),r=null},p=function(){f(),t=u=null,c=l=!1},d=function(){var e=t;p(),null==e||e.unsubscribe()};return W((function(e,h){s++,l||c||f();var v=u=null!=u?u:n();h.add((function(){0!==--s||l||c||(r=Vr(d,a))})),v.subscribe(h),t||(t=new S({next:function(e){return v.next(e)},error:function(e){l=!0,f(),r=Vr(p,o,e),v.error(e)},complete:function(){c=!0,f(),r=Vr(p,i),v.complete()}}),Xe(e).subscribe(t))}))(e)}}function Vr(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return!0===t?(e(),null):!1===t?null:t.apply(void 0,c([],a(n))).pipe(Vn(1)).subscribe((function(){return e()}))}function Jr(e,t,n){var r,o,u,i=!1;return e&&"object"==typeof e?(u=null!==(r=e.bufferSize)&&void 0!==r?r:1/0,t=null!==(o=e.windowTime)&&void 0!==o?o:1/0,i=!!e.refCount,n=e.scheduler):u=null!=e?e:1/0,zr({connector:function(){return new oe(u,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})}function Yr(e){return W((function(t,n){var r,o=!1,u=!1,i=0;t.subscribe(new G(n,(function(s){u=!0,e&&!e(s,i++,t)||(o&&n.error(new vt("Too many matching values")),o=!0,r=s)}),(function(){o?(n.next(r),n.complete()):n.error(u?new ht("No matching values"):new lt)})))}))}function Xr(e){return pn((function(t,n){return e<=n}))}function Kr(e){return e<=0?L:W((function(t,n){var r=new Array(e),o=0;return t.subscribe(new G(n,(function(t){var u=o++;if(u<e)r[u]=t;else{var i=u%e,s=r[i];r[i]=t,n.next(s)}}))),function(){r=null}}))}function Zr(e){return W((function(t,n){var r=!1,o=new G(n,(function(){null==o||o.unsubscribe(),r=!0}),x);Ke(e).subscribe(o),t.subscribe(new G(n,(function(e){return r&&n.next(e)})))}))}function $r(e){return W((function(t,n){var r=!1,o=0;t.subscribe(new G(n,(function(t){return(r||(r=!e(t,o++)))&&n.next(t)})))}))}function Qr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=rt(e);return W((function(t,r){(n?Ht(e,t,n):Ht(e,t)).subscribe(r)}))}function eo(e,t){return W((function(n,r){var o=null,u=0,i=!1,s=function(){return i&&!o&&r.complete()};n.subscribe(new G(r,(function(n){null==o||o.unsubscribe();var i=0,a=u++;Ke(e(n,a)).subscribe(o=new G(r,(function(e){return r.next(t?t(n,e,a,i++):e)}),(function(){o=null,s()})))}),(function(){i=!0,s()})))}))}function to(){return eo(L)}function no(e,t){return d(t)?eo((function(){return e}),t):eo((function(){return e}))}function ro(e,t){return W((function(n,r){var o=t;return eo((function(t,n){return e(o,t,n)}),(function(e,t){return o=t,t}))(n).subscribe(r),function(){o=null}}))}function oo(e){return W((function(t,n){Ke(e).subscribe(new G(n,(function(){return n.complete()}),x)),!n.closed&&t.subscribe(n)}))}function uo(e,t){return void 0===t&&(t=!1),W((function(n,r){var o=0;n.subscribe(new G(r,(function(n){var u=e(n,o++);(u||t)&&r.next(n),!u&&r.complete()})))}))}function io(e,t,n){var r=d(e)||t||n?{next:e,error:t,complete:n}:e;return r?W((function(e,t){var n;null===(n=r.subscribe)||void 0===n||n.call(r);var o=!0;e.subscribe(new G(t,(function(e){var n;null===(n=r.next)||void 0===n||n.call(r,e),t.next(e)}),(function(){var e;o=!1,null===(e=r.complete)||void 0===e||e.call(r),t.complete()}),(function(e){var n;o=!1,null===(n=r.error)||void 0===n||n.call(r,e),t.error(e)}),(function(){var e,t;o&&(null===(e=r.unsubscribe)||void 0===e||e.call(r)),null===(t=r.finalize)||void 0===t||t.call(r)})))})):L}var so={leading:!0,trailing:!1};function ao(e,t){var n=void 0===t?so:t,r=n.leading,o=n.trailing;return W((function(t,n){var u=!1,i=null,s=null,a=!1,c=function(){null==s||s.unsubscribe(),s=null,o&&(p(),a&&n.complete())},l=function(){s=null,a&&n.complete()},f=function(t){return s=Ke(e(t)).subscribe(new G(n,c,l))},p=function(){if(u){u=!1;var e=i;i=null,n.next(e),!a&&f(e)}};t.subscribe(new G(n,(function(e){u=!0,i=e,(!s||s.closed)&&(r?p():f(e))}),(function(){a=!0,(!(o&&u&&s)||s.closed)&&n.complete()})))}))}function co(e,t,n){void 0===t&&(t=we),void 0===n&&(n=so);var r=en(e,t);return ao((function(){return r}),n)}function lo(e){return void 0===e&&(e=_e),function(t){return qt((function(){return t.pipe(Wr((function(t,n){var r=t.current;return{value:n,current:e.now(),last:r}}),{current:e.now(),value:void 0,last:void 0}),wt((function(e){var t=e.current,n=e.last,r=e.value;return new fo(r,t-n)})))}))}}var fo=function(e,t){this.value=e,this.interval=t};function po(e,t,n){var r,o,u;if(n=null!=n?n:_e,bt(e)?r=e:"number"==typeof e&&(o=e),!t)throw new TypeError("No observable provided to switch to");if(u=function(){return t},null==r&&null==o)throw new TypeError("No timeout provided.");return mt({first:r,each:o,scheduler:n,with:u})}function ho(e){return void 0===e&&(e=re),wt((function(t){return{value:t,timestamp:e.now()}}))}function vo(e){return W((function(t,n){var r=new ee;n.next(r.asObservable());var o=function(e){r.error(e),n.error(e)};return t.subscribe(new G(n,(function(e){return null==r?void 0:r.next(e)}),(function(){r.complete(),n.complete()}),o)),e.subscribe(new G(n,(function(){r.complete(),n.next(r=new ee)}),x,o)),function(){null==r||r.unsubscribe(),r=null}}))}function bo(e,t){void 0===t&&(t=0);var n=t>0?t:e;return W((function(t,r){var o=[new ee],u=0;r.next(o[0].asObservable()),t.subscribe(new G(r,(function(t){var i,a;try{for(var c=s(o),l=c.next();!l.done;l=c.next()){l.value.next(t)}}catch(e){i={error:e}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(i)throw i.error}}var f=u-e+1;if(f>=0&&f%n==0&&o.shift().complete(),++u%n==0){var p=new ee;o.push(p),r.next(p.asObservable())}}),(function(){for(;o.length>0;)o.shift().complete();r.complete()}),(function(e){for(;o.length>0;)o.shift().error(e);r.error(e)}),(function(){null,o=null})))}))}function yo(e){for(var t,n,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var u=null!==(t=rt(r))&&void 0!==t?t:we,i=null!==(n=r[0])&&void 0!==n?n:null,s=r[1]||1/0;return W((function(t,n){var r=[],o=!1,a=function(e){var t=e.window,n=e.subs;t.complete(),n.unsubscribe(),b(r,e),o&&c()},c=function(){if(r){var t=new y;n.add(t);var o=new ee,i={window:o,subs:t,seen:0};r.push(i),n.next(o.asObservable()),t.add(u.schedule((function(){return a(i)}),e))}};null!==i&&i>=0?n.add(u.schedule((function(){c(),!this.closed&&n.add(this.schedule(null,i))}),i)):o=!0,c();var l=function(e){return r.slice().forEach(e)},f=function(e){l((function(t){var n=t.window;return e(n)})),e(n),n.unsubscribe()};return t.subscribe(new G(n,(function(e){l((function(t){t.window.next(e),s<=++t.seen&&a(t)}))}),(function(){return f((function(e){return e.complete()}))}),(function(e){return f((function(t){return t.error(e)}))}))),function(){r=null}}))}function mo(e,t){return W((function(n,r){var o=[],u=function(e){for(;0<o.length;)o.shift().error(e);r.error(e)};Ke(e).subscribe(new G(r,(function(e){var n=new ee;o.push(n);var i,s=new y;try{i=Ke(t(e))}catch(e){return void u(e)}r.next(n.asObservable()),s.add(i.subscribe(new G(r,(function(){b(o,n),n.complete(),s.unsubscribe()}),x,u)))}),x)),n.subscribe(new G(r,(function(e){var t,n,r=o.slice();try{for(var u=s(r),i=u.next();!i.done;i=u.next()){i.value.next(e)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}),(function(){for(;0<o.length;)o.shift().complete();r.complete()}),u,(function(){for(;0<o.length;)o.shift().unsubscribe()})))}))}function go(e){return W((function(t,n){var r,o,u=function(e){r.error(e),n.error(e)},i=function(){var t;null==o||o.unsubscribe(),null==r||r.complete(),r=new ee,n.next(r.asObservable());try{t=Ke(e())}catch(e){return void u(e)}t.subscribe(o=new G(n,i,i,u))};i(),t.subscribe(new G(n,(function(e){return r.next(e)}),(function(){r.complete(),n.complete()}),u,(function(){null==o||o.unsubscribe(),r=null})))}))}function Eo(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=nt(e);return W((function(t,r){for(var o=e.length,u=new Array(o),i=e.map((function(){return!1})),s=!1,l=function(t){Ke(e[t]).subscribe(new G(r,(function(e){u[t]=e,s||i[t]||(i[t]=!0,(s=i.every(L))&&(i=null))}),x))},f=0;f<o;f++)l(f);t.subscribe(new G(r,(function(e){if(s){var t=c([e],a(u));r.next(n?n.apply(void 0,c([],a(t))):t)}})))}))}function wo(e){return Sn(mn,e)}function _o(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return W((function(t,n){mn.apply(void 0,c([t],a(e))).subscribe(n)}))}function Ao(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _o.apply(void 0,c([],a(e)))}},3596:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimelineApp=void 0;var r=n(4744),o=n(2033),u=n(2431),i=n(4307),s=function(){function e(){this._notifications=[],this._notificationTypes=[],this._flashMessages=[],this._pageNumber=0,this._lastPage=!1,this._loading=!1,this.showMine=!1}return Object.defineProperty(e.prototype,"notifications",{get:function(){return this._notifications},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isLoading",{get:function(){return this._loading},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){return this._pageNumber},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasMorePage",{get:function(){return!this._lastPage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"notificationTypes",{get:function(){return this._notificationTypes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedNotificationTypes",{get:function(){return this.preferences.type=this.preferences.type||[],this.preferences.type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"preferences",{get:function(){return o.configure.User.preferences.get(r.APP.TIMELINE)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"flashMessages",{get:function(){return this._flashMessages},enumerable:!1,configurable:!0}),e.prototype.savePreferences=function(){return o.configure.User.saveAppPrefs(r.APP.TIMELINE)},e.prototype.resetPagination=function(){this._pageNumber=0,this._lastPage=!1,this._loading=!1},e.prototype.initialize=function(){var e=this;return Promise.all([o.configure.User.loadAppPrefs(r.APP.TIMELINE),u.transport.http.get("/timeline/types")]).then((function(t){e._notificationTypes=t[1]}))},e.prototype.loadNotifications=function(e){var t=this;if(this._loading||this._lastPage)return Promise.resolve();e&&(this._pageNumber++,this._lastPage=!1);var n=this.selectedNotificationTypes;if(0===n.length)return this._lastPage=!0,Promise.resolve();var r={page:this.page,mine:1};return this.showMine||delete r.mine,this._loading=!0,u.transport.http.get("/timeline/lastNotifications?type="+n.join("&type="),{queryParams:r}).then((function(e){if(t._loading=!1,"ok"===e.status)if(e.number&&e.results){var n=e.results.filter((function(e){return-1===t._notifications.findIndex((function(t){return t._id===e._id}))})).map((function(e){return new i.Notification(e)}));t._notifications=t._notifications.concat(n),t._pageNumber++}else t._lastPage=!0})).catch((function(e){t._loading=!1}))},e.prototype.loadFlashMessages=function(){var e=this;return u.transport.http.get("/timeline/flashmsg/listuser").then((function(t){e._flashMessages=t}))},e.prototype.markAsRead=function(e){return u.transport.http.put("/timeline/flashmsg/"+e.id+"/markasread")},e}();t.TimelineApp=s},4307:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Notification=void 0;var r=n(5807),o=n(6485).TransportFrameworkFactory.instance().http,u=r.SessionFrameworkFactory.instance().session.user,i=function(){function e(e){e.reported=e.reporters&&e.reporters.length>0,this._id=e._id,this.model=e}return e.prototype.isUnread=function(){var e;return void 0!==(null===(e=this.model.recipients)||void 0===e?void 0:e.find((function(e){return e.userId===u.userId})))},e.prototype.delete=function(){return o.delete("/timeline/"+this._id)},e.prototype.discard=function(){return o.put("/timeline/"+this._id)},e.prototype.report=function(){return o.put("/timeline/"+this._id+"/report")},e}();t.Notification=i},6325:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITimelineFactory=void 0;var r=n(3596),o=function(){function e(){}return e.createInstance=function(){return new r.TimelineApp},e}();t.ITimelineFactory=o},1090:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{a(r.next(e))}catch(e){u(e)}}function s(e){try{a(r.throw(e))}catch(e){u(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}a((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Analytics=void 0;var u=n(2431),i=n(9294),s=n(5445),a=n(1381),c=n(2033),l=function(){function e(){this._status="void"}return Object.defineProperty(e.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),e.prototype.xiti=function(){return this.parametersWithCheck("xiti",!1)},e.prototype.parameters=function(e){return this.parametersWithCheck(e,!0)},e.prototype.parametersWithCheck=function(e,t){return r(this,void 0,void 0,(function(){return o(this,(function(n){return[2,this.initialize().promise.then((function(n){return t&&n.type!==e&&"multiple"!==n.type?void 0:n[e]}))]}))}))},e.prototype.initialize=function(){var e=this;return this._params||(this._params=a.notify.promisify(),this._status="pending",Promise.all([u.transport.http.get("/analyticsConf"),u.transport.http.get("/xiti/config")]).then((function(t){return r(e,void 0,void 0,(function(){var e,n;return o(this,(function(r){switch(r.label){case 0:if(!t||!t[0]||!t[0].type)throw i.ERROR_CODE.MALFORMED_DATA;return t[1]&&t[1].active?(e=t[0],[4,this.initializeXiti(t[1])]):[3,2];case 1:e.xiti=r.sent(),r.label=2;case 2:return null===(n=this._params)||void 0===n||n.resolve(t[0]),this._status="ready",[2]}}))}))})).catch((function(t){var n;throw e._status="failed",null===(n=e._params)||void 0===n||n.reject(),t}))),this._params},e.prototype.initializeXiti=function(e){var t;return r(this,void 0,void 0,(function(){function n(e){for(var t="",n=0;n<e.length;n++)t+=e.charCodeAt(n);return t}var r,u,i,l,f,p,d,h,v,b;return o(this,(function(o){switch(o.label){case 0:return e.structureMap&&c.configure.Platform.apps.currentApp?[4,a.notify.onSessionReady().promise]:[2];case 1:for(r=o.sent(),u=s.session.session.description,l=0,f=r.structures;l<f.length;l++)if(p=f[l],(d=e.structureMap[p])&&d.collectiviteId&&d.UAI){i=d;break}return i&&i.active?[4,c.configure.Platform.apps.getPublicConf(c.configure.Platform.apps.currentApp)]:[2];case 2:return(h=o.sent())&&((v=h.xiti)&&v.LIBELLE_SERVICE&&i.UAI)?(b={Student:"ELEVE",Teacher:"ENSEIGNANT",Relative:"PARENT",Personnel:"ADMIN_VIE_SCOL_TECH",Guest:"AUTRE"},[2,{LIBELLE_SERVICE:v.LIBELLE_SERVICE,TYPE:v.OUTIL?"TIERS":"NATIF",OUTIL:v.OUTIL?v.OUTIL:"",STRUCT_ID:i.collectiviteId,STRUCT_UAI:i.UAI,PROJET:i.projetId?i.projetId:e.ID_PROJET,EXPLOITANT:e.ID_EXPLOITANT,PLATFORME:i.plateformeId?i.plateformeId:e.ID_PLATEFORME,ID_PERSO:n(r.userId),PROFILE:u.profiles&&u.profiles.length>0&&null!==(t=b[u.profiles[0]])&&void 0!==t?t:""}]):[2]}}))}))},e}();t.Analytics=l},2827:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{a(r.next(e))}catch(e){u(e)}}function s(e){try{a(r.throw(e))}catch(e){u(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}a((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.AppConf=void 0;var u=n(2431),i=n(2033),s=n(1381),a=u.transport.http,c=function(){function e(){this._publicConf={}}return Object.defineProperty(e.prototype,"currentApp",{get:function(){var e;return null!==(e=this._currentApp)&&void 0!==e?e:null},enumerable:!1,configurable:!0}),e.prototype.setCurrentApp=function(e){return this._currentApp=e,this},e.prototype.initialize=function(e,t){return void 0===t&&(t=!1),r(this,void 0,void 0,(function(){return o(this,(function(n){switch(n.label){case 0:return t||this.setCurrentApp(e),[4,Promise.all([this.getPublicConf(e),this.loadI18n(e)])];case 1:return n.sent(),[2]}}))}))},e.prototype.getPublicConf=function(e){return r(this,void 0,void 0,(function(){var t,n;return o(this,(function(r){switch(r.label){case 0:return this._publicConf[e]?[3,2]:(t=this._publicConf,n=e,[4,a.get("/"+e+"/conf/public",{queryParams:{_:i.configure.Platform.deploymentTag}})]);case 1:t[n]=r.sent(),r.label=2;case 2:return[2,this._publicConf[e]]}}))}))},e.prototype.loadI18n=function(e){return s.notify.onLangReady().promise.then((function(t){return i.configure.Platform.idiom.addBundlePromise("/"+e+"/i18n")}))},e}();t.AppConf=c},2033:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{a(r.next(e))}catch(e){u(e)}}function s(e){try{a(r.throw(e))}catch(e){u(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}a((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.configure=t.ConfigurationFramework=void 0;var u=n(270),i=n(6934),s=n(7144),a=n(2827),c=n(2431),l=n(1090),f=n(1381),p=function(){function e(){this.Platform={deploymentTag:"",cdnDomain:"",apps:new a.AppConf,theme:new u.Theme,analytics:new l.Analytics,idiom:new i.Idiom,listLanguages:function(){return c.transport.http.get("/languages")}},this.School={},this.User=new s.User}return e.prototype.initialize=function(e,t){return r(this,void 0,void 0,(function(){var n,r,u,i,s,a,l=this;return o(this,(function(o){switch(o.label){case 0:return e||(n=function(e){return(e<10?"0":"")+e.toFixed(0)},r=new Date,u=r.getFullYear(),i=r.getMonth()+1,s=r.getDate(),r.getMinutes()/10,e=""+u+n(i)+n(s)),a=e,this.Platform.deploymentTag=e,"string"==typeof t&&t.length>0&&(this.Platform.cdnDomain=t),c.transport.http.setCdn(this.Platform.cdnDomain),[4,Promise.all([this.Platform.theme.initialize(a),f.notify.onSessionReady().promise.then((function(e){return l.Platform.idiom.addBundlePromise("/i18n")})),this.User.initialize(a)])];case 1:return o.sent(),[2]}}))}))},e}();t.ConfigurationFramework=p,t.configure=new p},6934:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Idiom=void 0;var r=n(2431),o=n(1381),u=n(5445),i={},s={},a=[{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}],c=function(){function e(){}return e.prototype.translate=function(e,t){var n=void 0===i[e=null!=e?e:""]?e:i[e];if(t&&"object"==typeof t)for(var r in t)void 0!==t[r]&&(n=n.replace(new RegExp("\\${"+r+"}","g"),""+t[r]));return n},e.prototype.addBundlePromise=function(e){return this.loadBundlePromise(u.session.session.currentLanguage,e)},e.prototype.addBundle=function(e,t){this.loadBundle(u.session.session.currentLanguage,e,t)},e.prototype.loadBundlePromise=function(e,t){return this.loadBundle(e,t),s[t]},e.prototype.loadBundle=function(e,t,n){var u=s[t];if(u)n&&u.then(n).catch(n);else{var a=new o.Promisified;s[t]=a.promise;var c={};e&&(c["Accept-Language"]=e),r.transport.http.get(t,{headers:c}).then((function(e){Object.assign(i,e),"function"==typeof n&&n(),a.resolve()})).catch((function(e){"function"==typeof n&&n(),a.reject()}))}},e.prototype.addTranslations=function(e,t){var n=this;o.notify.onLangReady().promise.then((function(r){n.loadBundle(r,e+"/"+r+".json",t)}))},e.prototype.addAllTranslations=function(e){var t=this;return e&&e.length>0?o.notify.onLangReady().promise.then((function(n){return Promise.all(e.map((function(e){return t.loadBundlePromise(n,e+"/"+n+".json")})))})).then((function(){})):Promise.reject()},e.prototype.addKeys=function(e){for(var t in e)"string"!=typeof i[t]&&(i[t]=e[t])},e.prototype.removeAccents=function(e){for(var t=0;t<a.length;t++)e=e.replace(a[t].letters,a[t].base);return e},e}();t.Idiom=c},270:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{a(r.next(e))}catch(e){u(e)}}function s(e){try{a(r.throw(e))}catch(e){u(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}a((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Theme=void 0;var u=n(1381),i=n(5445),s=n(2431),a=n(2033),c=function(){function e(){this.skinName="",this.themeName="",this.skin="raw",this.themeUrl="/assets/themes/raw/default/",this.templateOverrides={},this.portalTemplate="/assets/themes/raw/portal.html",this.basePath="",this.logoutCallback="/",this.skins=[],this.is1D=!1,this.is2D=!1,this._onSkinReady=u.notify.onSkinReady(),this._onOverrideReady=u.notify.onOverridesReady()}return e.prototype.initialize=function(e){var t=this;return u.notify.onSessionReady().promise.then((function(){return t.load(e)}))},Object.defineProperty(e.prototype,"version",{get:function(){return a.configure.Platform.deploymentTag},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cdnDomain",{get:function(){return a.configure.Platform.cdnDomain},enumerable:!1,configurable:!0}),e.prototype.onFullyReady=function(){return r(this,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return[4,this._loaded];case 1:return e.sent(),[2,this]}}))}))},e.prototype.onSkinReady=function(){return this._onSkinReady.promise},e.prototype.onOverrideReady=function(){return this._onOverrideReady.promise},e.prototype.getConf=function(e){var t;return r(this,void 0,void 0,(function(){var n,r;return o(this,(function(o){switch(o.label){case 0:return n=this,null===(t=this._conf)||void 0===t?[3,1]:(r=t,[3,3]);case 1:return[4,s.transport.http.getScript("/assets/theme-conf.js",{queryParams:{v:null!=e?e:this.version}},"exports.conf")];case 2:r=o.sent(),o.label=3;case 3:return n._conf=r,[2,this._conf]}}))}))},e.prototype.load=function(e){var t=this;return e=null!=e?e:this.version,this._loaded||(this._loaded=(i.session.session.notLoggedIn?this.loadDisconnected(e):this.loadConnected(e)).then((function(){return r(t,void 0,void 0,(function(){var e,t,n,r=this;return o(this,(function(o){switch(o.label){case 0:return[4,this.listSkins()];case 1:return e=o.sent(),this.is1D="panda"===(null===(t=e.find((function(e){return e.child===r.skin})))||void 0===t?void 0:t.parent),this.is2D="theme-open-ent"===(null===(n=e.find((function(e){return e.child===r.skin})))||void 0===n?void 0:n.parent),[2]}}))}))}))),this._loaded},e.prototype.loadDisconnected=function(e){var t=this;return new Promise((function(n,r){s.transport.http.get("/skin",{queryParams:{v:t.version}}).then((function(r){t.skin=r.skin,t.themeUrl=t.cdnDomain+"/assets/themes/"+r.skin+"/skins/default/",t.basePath=t.themeUrl+"../../",t._onSkinReady.resolve(t),s.transport.http.get("/assets/themes/"+r.skin+"/template/override.json",{disableNotifications:!0,queryParams:{v:e}}).then((function(e){t.templateOverrides=e,t._onOverrideReady.resolve(e),n()})).catch((function(e){if(404!==s.transport.http.latestResponse.status)throw e;n()}))})).catch((function(e){t._onSkinReady.reject(e),t._onOverrideReady.reject(e),r()}))}))},e.prototype.loadConnected=function(e){var t=this;return new Promise((function(n,r){t.loadDefaultTheme(e).then((function(){t._onSkinReady.resolve(t),s.transport.http.get("/assets/themes/"+t.skin+"/template/override.json",{disableNotifications:!0,queryParams:{v:e}}).then((function(e){t.templateOverrides=e,t._onOverrideReady.resolve(e),n()})).catch((function(e){if(404!==s.transport.http.latestResponse.status)throw e;n(),t._onSkinReady.reject(e),t._onOverrideReady.reject(e)}))}))}))},e.prototype.loadDefaultTheme=function(e){return r(this,void 0,void 0,(function(){var t=this;return o(this,(function(n){return i.session.session.notLoggedIn?[2,Promise.reject()]:[2,s.transport.http.get("/theme",{queryParams:{_:e}}).then((function(e){t.skinName=e.skinName,t.themeName=e.themeName,t.themeUrl=e.skin,t.basePath=""+t.cdnDomain+t.themeUrl+"../../",t.skin=t.themeUrl.split("/assets/themes/")[1].split("/")[0],t.portalTemplate=t.cdnDomain+"/assets/themes/"+t.skin+"/portal.html",t.logoutCallback=e.logoutCallback}))]}))}))},e.prototype.listThemes=function(){return s.transport.http.get("/themes")},e.prototype.setDefaultTheme=function(e){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,s.transport.http.get("/userbook/api/edit-userbook-info?prop=theme-"+this.skin+"&value="+e._id)];case 1:return t.sent(),[4,this.loadDefaultTheme(this.version)];case 2:return t.sent(),[2]}}))}))},e.prototype.listSkins=function(){var e=this;return this.skins.length>0?Promise.resolve(this.skins):this.getConf().then((function(t){var n=t.overriding.find((function(t){return t.child===e.skin}));return(null==n?void 0:n.group)?e.skins=e.skins.concat(t.overriding.filter((function(e){return e.group===n.group}))):e.skins=e.skins.concat(t.overriding),e.skins}))},e.prototype.getHelpPath=function(){var e;return r(this,void 0,void 0,(function(){var t,n,r=this;return o(this,(function(o){switch(o.label){case 0:return[4,this.listSkins()];case 1:return t=o.sent(),n=t.find((function(e){return e.child===r.skin})),[2,null!==(e=null==n?void 0:n.help)&&void 0!==e?e:"/help"]}}))}))},e}();t.Theme=c},7144:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{a(r.next(e))}catch(e){u(e)}}function s(e){try{a(r.throw(e))}catch(e){u(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}a((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.User=void 0;var u=n(2431),i=n(1381),s=n(5445),a=function(){function e(){this.data={}}return e.prototype.get=function(e){return this.data[e]},e.prototype.load=function(e,t){var n=this;return u.transport.http.get("/userbook/preference/"+e).then((function(e){try{return JSON.parse(e.preference)}catch(e){return null!=t?t:{}}})).then((function(t){return n.data[e]=null!=t?t:{},t}))},e.prototype.update=function(e,t){return void 0!==t&&(this.data[e]=t),this},e.prototype.save=function(e){return u.transport.http.putJson("/userbook/preference/"+e,this.data[e])},e}(),c=function(){function e(){this._me=null,this._keepOpenOnLogout=!1,this._preferences=new a,this._bookmarkedApps=[]}return Object.defineProperty(e.prototype,"keepOpenOnLogout",{get:function(){return this._keepOpenOnLogout},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"preferences",{get:function(){return this._preferences},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bookmarkedApps",{get:function(){return this._bookmarkedApps},enumerable:!1,configurable:!0}),e.prototype.initialize=function(e){var t=this;return this.loadPublicConf(),i.notify.onSessionReady().promise.then((function(e){e&&t.setCurrentModel(e)}))},e.prototype.setCurrentModel=function(e){this._me=e,this._preferences=new a,this.loadBookmarks()},e.prototype.loadPublicConf=function(){var e=this;return u.transport.http.get("/conf/public").then((function(t){return e._keepOpenOnLogout=(null==t?void 0:t.keepOpenOnLogout)||!1,t}))},e.prototype.loadBookmarks=function(){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(t){switch(t.label){case 0:return[4,u.transport.http.get("/userbook/preference/apps").then((function(t){t.preference||(t.preference=null);var n,r=JSON.parse(t.preference);if(r&&r.length&&"function"==typeof r.concat)return e._bookmarkedApps=r,n={bookmarks:r.map((function(e){return e.name})),applications:[]},void u.transport.http.putJson("/userbook/preference/apps",n);(n=r)||(n={bookmarks:[],applications:[]});var o=!0,i=[];n.bookmarks.forEach((function(t,n){var r=e._me.apps.find((function(e){return e.name===t}));if(r){var u=Object.assign({},r);e._bookmarkedApps.push(u)}else i.push(t),o=!1})),i.forEach((function(e){var t=n.bookmarks.indexOf(e);-1!==t&&n.bookmarks.splice(t,1)})),o||u.transport.http.putJson("/userbook/preference/apps",n)}))];case 1:return t.sent(),[2]}}))}))},e.prototype.loadAppPrefs=function(e){return this.preferences.load(e,{})},e.prototype.saveAppPrefs=function(e){return this.preferences.save(e)},e.prototype.loadLanguage=function(){return this.preferences.load("language",{"default-domain":s.session.session.currentLanguage}).then((function(e){return e["default-domain"]}))},e.prototype.saveLanguage=function(e){return this.preferences.update("language",{"default-domain":e}).save("language")},e}();t.User=c},4506:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFrameworkFactory=void 0;var r=n(2033),o=function(){function e(){}return e.instance=function(){return r.configure},e}();t.ConfigurationFrameworkFactory=o},5046:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractBusAgent=void 0;var r=n(4744),o=n(9255),u=n(609),i=function(){function e(t){this.handlerFor={comment:e.defaultHandler,copy:e.defaultHandler,create:e.defaultHandler,delete:e.defaultHandler,export:e.defaultHandler,initialize:e.defaultHandler,manage:e.defaultHandler,properties:e.defaultHandler,move:e.defaultHandler,open:e.defaultHandler,print:e.defaultHandler,publish:e.defaultHandler,search:e.defaultHandler,share:e.defaultHandler},this.managedResource=t,this.initialize()}return e.prototype.initialize=function(){for(var t in Object.values(u.ACTION))this.handlerFor[t]=e.defaultHandler;this.registerHandlers()},e.prototype.setHandler=function(e,t){o.BusFactory.instance.setAgentFor(this.managedResource,e,this),this.handlerFor[e]=t},e.prototype.getHandler=function(e){return this.handlerFor[e]},e.prototype.activate=function(e,t,n){var r=this;return Promise.resolve().then((function(){return r.getHandler(t).bind(r)(n)}))},e.defaultHandler=function(e){throw new Error(r.ERROR_CODE.NOT_SUPPORTED)},e}();t.AbstractBusAgent=i},9506:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AgentLoader=void 0;var r=n(609),o=n(6389),u=function(){function e(){this.http=new o.Http}return e.prototype.load=function(e){var t=r.appNameForResource[e];if("string"!=typeof t)throw new Error("The resource type "+e+" is not supported yet.");return this.http.loadScript(t+"/public/js/explorer.agent.js")},e}();t.AgentLoader=u},9255:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BusFactory=void 0;var r=n(609),o=n(424),u=n(7472),i=function(){function e(){this.agents={},this.comm=new u.Subject}return e.prototype.setAgentFor=function(e,t,n){this.getActionMapping(e)[t]=n},e.prototype.getAgentFor=function(e,t){return this.getActionMapping(e)[t]},e.prototype.publish=function(e,t,n){var r=this;return Promise.resolve().then((function(){var n;return null!==(n=r.getAgentFor(e,t))&&void 0!==n?n:o.explorer.requestAgentFor(e,t)})).then((function(o){var u=o.activate(e,t,n);return r.comm.next({res:e,action:t,input:n,output:u}),u}))},e.prototype.subscribe=function(e,t){return this.comm.asObservable().pipe(u.filter((function(n){return n.res===e&&n.action===t})))},e.prototype.getActionMapping=function(e){var t=this.agents[e];if(void 0===t){t={};for(var n=0,o=Object.values(r.ACTION);n<o.length;n++){t[o[n]]=null}this.agents[e]=t}return t},e}(),s=function(){function e(){}return Object.defineProperty(e,"instance",{get:function(){return this._instance=this._instance||new i},enumerable:!1,configurable:!0}),e}();t.BusFactory=s},8390:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExplorerContext=void 0;var r=n(7472),o=n(4744),u=n(609),i=function(){function e(e,t){this.latestResults=new r.Subject,this.context=null,this.bus=u.ExplorerFrameworkFactory.instance().getBus(),this.searchParameters={types:e,app:t,filters:{},pagination:{startIdx:0,pageSize:20}}}return e.prototype.clear=function(){this.searchParameters.filters={owner:!0,shared:!0,public:!0},this.searchParameters.pagination.startIdx=0,this.searchParameters.pagination.pageSize=20,this.context=null},e.prototype.isInitialized=function(){return null!==this.context},e.prototype.getContext=function(){if(null!==this.context)return this.context},e.prototype.getSearchParameters=function(){return this.searchParameters},e.prototype.duplicateSearchParameters=function(){return JSON.parse(JSON.stringify(this.searchParameters))},e.prototype.latestResources=function(){return this.latestResults.asObservable()},e.prototype.initialize=function(){var e=this,t=this.duplicateSearchParameters();return Promise.resolve().then((function(){return e.bus.publish(u.RESOURCE.FOLDER,u.ACTION.INITIALIZE,t)})).then((function(n){if(e.context=n,!e.context)throw new Error(o.ERROR_CODE.UNKNOWN);return e.latestResults.next({input:t,output:e.context}),e.context}))},e.prototype.getResources=function(){var e=this,t=this.duplicateSearchParameters();return this.bus.publish(u.RESOURCE.FOLDER,u.ACTION.SEARCH,t).then((function(n){var r=n;if(!r)throw new Error(o.ERROR_CODE.UNKNOWN);return e.latestResults.next({input:t,output:r}),r}))},e.prototype.getSubFolders=function(e){throw new Error("Method not implemented.")},e.prototype.createFolder=function(e,t,n){var r={app:this.searchParameters.app,name:n,parentId:t,type:e};return this.bus.publish(u.RESOURCE.FOLDER,u.ACTION.CREATE,r).then((function(e){var t=e;if(!t)throw new Error(o.ERROR_CODE.UNKNOWN);return t}))},e.prototype.updateFolder=function(e,t,n,r){var i={folderId:e,app:this.searchParameters.app,name:r,parentId:n,type:t};return this.bus.publish(u.RESOURCE.FOLDER,u.ACTION.UPD_PROPS,i).then((function(e){var t=e;if(!t)throw new Error(o.ERROR_CODE.UNKNOWN);return t}))},e.prototype.copy=function(e,t,n){var r={folderId:e,resourceIds:t,folderIds:n};return this.bus.publish(u.RESOURCE.FOLDER,u.ACTION.COPY,r).then((function(e){}))},e.prototype.move=function(e,t,n){var r={folderId:e,resourceIds:t,folderIds:n};return this.bus.publish(u.RESOURCE.FOLDER,u.ACTION.MOVE,r).then((function(e){}))},e.prototype.delete=function(e,t){var n={resourceIds:e,folderIds:t};return this.bus.publish(u.RESOURCE.FOLDER,u.ACTION.DELETE,n).then((function(e){}))},e.prototype.manageProperties=function(e,t){var n={resources:t};return this.bus.publish(e,u.ACTION.MANAGE,n).then((function(e){var t=e;if(!t)throw new Error(o.ERROR_CODE.UNKNOWN);return t}))},e.prototype.updateProperties=function(e,t,n){var r={resources:t,props:n};return this.bus.publish(e,u.ACTION.UPD_PROPS,r).then((function(e){var t=e;if(!t)throw new Error(o.ERROR_CODE.UNKNOWN);return t}))},e}();t.ExplorerContext=i},424:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.explorer=t.ExplorerFramework=void 0;var r=n(4744),o=n(9506),u=n(9255),i=n(8390),s=function(){function e(){this.agentLoader=new o.AgentLoader}return e.prototype.setAgentLoader=function(e){e&&(this.agentLoader=e)},e.prototype.requestAgentFor=function(e,t){var n=this;return this.agentLoader.load(e).then((function(){var o=n.getBus().getAgentFor(e,t);if(!o)throw new Error(r.ERROR_CODE.AGENT_NOT_FOUND);return o}))},e.prototype.createContext=function(e,t){return new i.ExplorerContext(e,t)},e.prototype.getBus=function(){return u.BusFactory.instance},e}();t.ExplorerFramework=s,t.explorer=new s},609:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROP_FORMAT=t.PROP_TYPE=t.PROP_MODE=t.PROP_KEY=t.SORT_BY=t.SORT_ORDER=t.STRING_FILTER=t.BOOLEAN_FILTER=t.FOLDER=t.ACTION=t.appNameForResource=t.RESOURCE=t.ExplorerFrameworkFactory=void 0;var r=n(4744),o=n(424),u=function(){function e(){}return e.instance=function(){return o.explorer},e}();t.ExplorerFrameworkFactory=u,t.RESOURCE={FOLDER:"folder",BLOG:"blog",EXERCISE:"exercise"},t.appNameForResource={folder:r.APP.EXPLORER,blog:r.APP.BLOG,exercise:r.APP.EXERCIZER},t.ACTION={INITIALIZE:"initialize",SEARCH:"search",CREATE:"create",OPEN:"open",MANAGE:"manage",UPD_PROPS:"properties",COMMENT:"comment",DELETE:"delete",MOVE:"move",COPY:"copy",EXPORT:"export",SHARE:"share",PUBLISH:"publish",PRINT:"print"},t.FOLDER={BIN:"bin",DEFAULT:"default"},t.BOOLEAN_FILTER={OWNER:"owner",SHARED:"shared",PUBLIC:"public",FAVORITE:"favorite"},t.STRING_FILTER={},t.SORT_ORDER={ASC:"asc",DESC:"desc"},t.SORT_BY={NAME:"name",MODIFY_DATE:"modifiedAt",VIEWS:"views"},t.PROP_KEY={TITLE:"title",IMAGE:"image",COLOR:"color",DESCRIPTION:"description",URL:"url"},t.PROP_MODE={READONLY:"RO",READWRITE:"RW"},t.PROP_TYPE={TEXT:"text",NUMBER:"number",DATE:"date",IMAGE:"image"},t.PROP_FORMAT={PLAIN:"plain"}},4744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.USER_PREFS=t.APP=t.ERROR_CODE=void 0,t.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"},t.APP={EXPLORER:"explorer",PORTAL:"portal",BLOG:"blog",EXERCIZER:"exercizer",TIMELINE:"timeline",CAS:"cas",VIDEO:"video"},t.USER_PREFS={APPS:"apps",WIDGETS:"widgets",LANGUAGE:"language",AUTH_CONNECTOR_ACCESSED:"authenticatedConnectorsAccessed",CURSUS:"cursus",INFOTIP:"infotip",RGPD_COOKIES:"rgpdCookies"}},9294:function(e,t,n){"use strict";var r,o,u=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||u(t,e,n)},a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&u(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.RxJS=t.AbstractBusAgent=t.explorer=void 0,s(n(4744),t),s(n(609),t);var c=n(424);Object.defineProperty(t,"explorer",{enumerable:!0,get:function(){return c.explorer}});var l=n(5046);Object.defineProperty(t,"AbstractBusAgent",{enumerable:!0,get:function(){return l.AbstractBusAgent}}),s(n(1056),t),t.RxJS=a(n(7472)),s(n(6485),t),s(n(4506),t),s(n(5807),t),s(n(2869),t),s(n(6325),t),"undefined"!=typeof window&&(window.entcore=null!==(r=window.entcore)&&void 0!==r?r:{},window.entcore["ode-ts-client"]=null!==(o=window.entcore["ode-ts-client"])&&void 0!==o?o:e.exports)},1381:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notify=t.Promisified=void 0;var r=n(7472),o="sessionReady",u="langReady",i="skinReady",s="overrideReady",a=function(){function e(){var e=this;this._promise=new Promise((function(t,n){e._resolution=t,e._rejection=n}))}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this._resolution&&this._resolution(e)},e.prototype.reject=function(e){this._rejection&&this._rejection(e)},e}();t.Promisified=a;var c=function(){function e(){this.promises={},this.subject=new r.Subject}return e.prototype.asyncData=function(e){return void 0===this.promises[e]&&(this.promises[e]=new a),this.promises[e]},e.prototype.onSessionReady=function(){return this.asyncData(o)},e.prototype.onLangReady=function(){return this.asyncData(u)},e.prototype.onSkinReady=function(){return this.asyncData(i)},e.prototype.onOverridesReady=function(){return this.asyncData(s)},e.prototype.promisify=function(){return new a},e.prototype.events=function(){return this.subject},e}();t.notify=new c},1056:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EVENT_NAME=t.LAYER_NAME=t.NotifyFrameworkFactory=void 0;var r=n(1381),o=function(){function e(){}return e.instance=function(){return r.notify},e}();t.NotifyFrameworkFactory=o,t.LAYER_NAME={WIDGETS:"widgets",EXPLORER:"explorer"},t.EVENT_NAME={USERPREF_CHANGED:"userprefChanged",SEARCH_RESULTED:"searchResulted"}},5445:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.session=t.SessionFramework=void 0;var r=n(5817),o=function(){function e(){this.session=new r.Session}return e.prototype.initialize=function(){return this.session.initialize()},e}();t.SessionFramework=o,t.session=new o},5817:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Session=void 0;var r=n(2431),o=n(1381),u=n(2033),i=n(4506),s=r.transport.http,a=function(){function e(){this._me=null,this._currentLanguage="",this._notLoggedIn=!0}return Object.defineProperty(e.prototype,"currentLanguage",{get:function(){return this._currentLanguage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"notLoggedIn",{get:function(){return this._notLoggedIn},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"avatarUrl",{get:function(){var e=this.description.photo;e&&"no-avatar.jpg"!==e&&"no-avatar.svg"!==e||(e=i.ConfigurationFrameworkFactory.instance().Platform.theme.basePath+"/img/illustrations/no-avatar.svg");return e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"user",{get:function(){return this._me},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentApp",{get:function(){return u.configure.Platform.apps.currentApp},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){var e=this;return s.get("/auth/oauth2/userinfo").then((function(t){return e.setCurrentModel(t),e._notLoggedIn?e.loadDefaultLanguage():e.loadUserLanguage()})).then((function(t){return e.setCurrentLanguage(t),e.loadDescription()})).then((function(){o.notify.onSessionReady().resolve(e._me)})).catch((function(e){o.notify.onSessionReady().reject(e)}))},e.prototype.setCurrentModel=function(e){this._me=e,this._notLoggedIn=!(e&&e.sessionMetadata&&e.sessionMetadata.userId)},e.prototype.hasWorkflow=function(e){var t;return void 0===e||-1!==(null===(t=this._me)||void 0===t?void 0:t.authorizedActions.findIndex((function(t){return t.name===e})))},e.prototype.hasRight=function(e,t){var n=this;if("owner"===t)return e.owner&&e.owner.userId===this._me.userId;var r=t.right||t,o=void 0!==e.shared.filter((function(e){return-1!==(n._me.groupsIds||[]).indexOf(e.groupId)||e.userId===n._me.userId})).find((function(e){return e[r]||e.manager})),u=!t.workflow||this.hasWorkflow(t.workflow);return o&&u},Object.defineProperty(e.prototype,"latestQuotaAndUsage",{get:function(){var e=this;return s.get("/workspace/quota/user/"+this._me.userId).then((function(t){return e._description&&(e._description.quota=t.quota,e._description.storage=t.storage),t})).catch((function(){return{quota:0,storage:0}}))},enumerable:!1,configurable:!0}),e.prototype.setCurrentLanguage=function(e){this._currentLanguage=e,o.notify.onLangReady().resolve(e)},e.prototype.loadDefaultLanguage=function(){var e=this;return s.get("/locale").then((function(e){return e.locale})).catch((function(){return e._currentLanguage}))},e.prototype.loadUserLanguage=function(){var e=this;return s.get("/userbook/preference/language").then((function(t){try{return JSON.parse(t.preference)["default-domain"]}catch(t){return e.loadDefaultLanguage()}})).catch((function(){return e.loadDefaultLanguage()}))},e.prototype.loadDescription=function(){var e=this;return Promise.all([s.get("/userbook/api/person",{requestName:"refreshAvatar"}),s.get("/directory/userbook/"+this._me.userId)]).then((function(t){return"ok"===t[0].status&&t[0].result&&t[0].result.length>0?e._description=t[0].result[0]:e._description={},e._description.type&&!e._description.profiles&&(e._description.profiles=e._description.type),Object.assign(e._description,t[1]),e._description}))},e.prototype.getEmailValidationInfos=function(){return s.get("/directory/user/mailstate")},e.prototype.checkEmail=function(e){return s.put("/directory/user/mailstate",{email:e})},e.prototype.tryEmailValidation=function(e){return s.post("/directory/user/mailstate",{key:e})},e}();t.Session=a},5807:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WIDGET_POSITION=t.SessionFrameworkFactory=void 0;var r=n(5445),o=function(){function e(){}return e.instance=function(){return r.session},e}();t.SessionFrameworkFactory=o,t.WIDGET_POSITION={LEFT:"left",RIGHT:"right"}},2431:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transport=void 0;var r=n(6389),o=function(){function e(){this._http=new r.Http}return Object.defineProperty(e.prototype,"http",{get:function(){return this._http},enumerable:!1,configurable:!0}),e.prototype.newHttpInstance=function(e){return new r.Http(e)},e}();t.transport=new o},6389:function(__unused_webpack_module,exports,__webpack_require__){"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.Http=void 0;var axios_1=__importDefault(__webpack_require__(9669)),__1=__webpack_require__(9294),globals_1=__webpack_require__(4744),loadedScripts={},Http=function(){function Http(e){this.axios=axios_1.default.create(e)}return Http.prototype.setCdn=function(e){e&&XMLHttpRequest&&!XMLHttpRequest.prototype.cdnUrl&&(XMLHttpRequest.prototype.cdnUrl=e,XMLHttpRequest.prototype.baseOpen=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(){var t=arguments[1];t.startsWith("/infra/public")&&(arguments[1]=e+t);var n=/^\/([^\/]*)\/public/.test(t);return n&&(arguments[1]=e+t),t.startsWith("/assets")&&(arguments[1]=e+t),"/conf/public"==t&&(arguments[1]=t),t.startsWith("http")&&(arguments[1]=t),this.baseOpen.apply(this,arguments)})},Http.prototype.toAxiosConfig=function(e){if(e){var t=Object.assign({},this.axios.defaults);return e.headers&&(t.headers=Object.assign({},this.axios.defaults.headers),Object.assign(t.headers,e.headers)),e.queryParams&&(t.params=Object.assign({},e.queryParams)),t}return this.axios.defaults},Http.prototype.toCdnUrl=function(e){var t=__1.ConfigurationFrameworkFactory.instance().Platform.cdnDomain;if((null==t?void 0:t.length)>0&&"/conf/public"!==e){var n=""+e;if(n.startsWith("/infra/public")||n.startsWith("/assets"))e=t+n;else/^\/([^\/]*)\/public/.test(n)&&(e=t+n)}return e},Http.prototype.mapAxiosError=function(e,t){return e.response?this._latestResponse=e.response:e.request?this._latestResponse={status:408,statusText:globals_1.ERROR_CODE.TIME_OUT}:this._latestResponse={status:500,statusText:globals_1.ERROR_CODE.UNKNOWN},!t||t.disableNotifications,this._latestResponse},Http.prototype.mapAxiosResponse=function(e,t){return this._latestResponse=e,e.data},Object.defineProperty(Http.prototype,"latestResponse",{get:function(){return this._latestResponse},enumerable:!1,configurable:!0}),Http.prototype.get=function(e,t){var n=this;return this.axios.get(this.toCdnUrl(e),this.toAxiosConfig(t)).then((function(e){return n.mapAxiosResponse(e,t)})).catch((function(e){return n.mapAxiosError(e,t)}))},Http.prototype.post=function(e,t,n){var r=this;return this.axios.post(e,t,this.toAxiosConfig(n)).then((function(e){return r.mapAxiosResponse(e,n)})).catch((function(e){return r.mapAxiosError(e,n)}))},Http.prototype.postFile=function(e,t,n){var r=this,o=this.toAxiosConfig(n);return o.headers["Content-Type"]&&delete o.headers["Content-Type"],this.axios.post(e,t,o).then((function(e){return r.mapAxiosResponse(e,n)})).catch((function(e){return r.mapAxiosError(e,n)}))},Http.prototype.postJson=function(e,t,n){var r=this;return this.toAxiosConfig().headers["Content-Type"]="application/json",this.axios.post(e,t,this.toAxiosConfig(n)).then((function(e){return r.mapAxiosResponse(e,n)})).catch((function(e){return r.mapAxiosError(e,n)}))},Http.prototype.put=function(e,t,n){var r=this;return this.axios.put(e,t,this.toAxiosConfig(n)).then((function(e){return r.mapAxiosResponse(e,n)})).catch((function(e){return r.mapAxiosError(e,n)}))},Http.prototype.putJson=function(e,t,n){var r=this,o=this.toAxiosConfig(n);return o.headers["Content-Type"]="application/json",this.axios.put(e,t,o).then((function(e){return r.mapAxiosResponse(e,n)})).catch((function(e){return r.mapAxiosError(e,n)}))},Http.prototype.delete=function(e,t){var n=this;return this.axios.delete(e,this.toAxiosConfig(t)).then((function(e){return n.mapAxiosResponse(e,t)})).catch((function(e){return n.mapAxiosError(e,t)}))},Http.prototype.deleteJson=function(e,t){var n=this;return this.axios.delete(e,t).then((function(e){return n.mapAxiosResponse(e)})).catch((function(e){return n.mapAxiosError(e)}))},Http.prototype.getScript=function(url,params,variableName){var _this=this,resultName=null!=variableName?variableName:"exports",p=this.toAxiosConfig(params);return p.headers.Accept="application/javascript",this.axios.get(this.toCdnUrl(url),p).then((function(e){return _this.mapAxiosResponse(e,params)})).then((function(r){try{var securedScript='"use strict";var '+resultName+";"+r+";return "+resultName+";",result=Function(securedScript)();return result}catch(e){var result=eval(r);return result}})).catch((function(e){throw _this.mapAxiosError(e,params),e}))},Http.prototype.loadScript=function(e,t){return loadedScripts[e]?Promise.resolve():this.getScript(e,t).then((function(t){loadedScripts[e]=!0}))},Http}();exports.Http=Http},6485:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransportFrameworkFactory=void 0;var r=n(2431),o=function(){function e(){}return e.instance=function(){return r.transport},e}();t.TransportFrameworkFactory=o},5748:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,u){function i(e){try{a(r.next(e))}catch(e){u(e)}}function s(e){try{a(r.throw(e))}catch(e){u(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}a((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,u,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return u={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(u){return function(s){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;i;)try{if(n=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e],r=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.widgets=t.WidgetFramework=void 0;var u=n(5807),i=n(1381),s=n(1056),a=n(2033),c=n(6934),l=["birthday","mood","calendar-widget","notes"],f=["agenda-widget","carnet-de-bord","my-apps","rss-widget","bookmark-widget","cursus-widget","maxicours-widget","school-widget"],p={"last-infos-widget":u.WIDGET_POSITION.LEFT,birthday:u.WIDGET_POSITION.LEFT,"calendar-widget":u.WIDGET_POSITION.RIGHT,"carnet-de-bord":u.WIDGET_POSITION.LEFT,"record-me":u.WIDGET_POSITION.RIGHT,mood:u.WIDGET_POSITION.LEFT,"my-apps":u.WIDGET_POSITION.RIGHT,notes:u.WIDGET_POSITION.RIGHT,"rss-widget":u.WIDGET_POSITION.LEFT,"bookmark-widget":u.WIDGET_POSITION.RIGHT,qwant:u.WIDGET_POSITION.RIGHT,"qwant-junior":u.WIDGET_POSITION.LEFT,"agenda-widget":u.WIDGET_POSITION.LEFT,"cursus-widget":u.WIDGET_POSITION.LEFT,"maxicours-widget":u.WIDGET_POSITION.RIGHT,"universalis-widget":u.WIDGET_POSITION.RIGHT,"briefme-widget":u.WIDGET_POSITION.LEFT,"school-widget":u.WIDGET_POSITION.LEFT},d={"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},h=function(){function e(){this._widgets=[],this._userPrefs={}}return e.prototype.initialize=function(e,t){var n=this;return this._initialized||(this._initialized=new i.Promisified,i.notify.onSessionReady().promise.then((function(e){var t;e&&e.widgets?(e.widgets.forEach((function(e){n._widgets.push(new v(e))})),n.loadUserPrefs().then((function(){var e;null===(e=n._initialized)||void 0===e||e.resolve()})).catch((function(e){var t;null===(t=n._initialized)||void 0===t||t.reject()}))):null===(t=n._initialized)||void 0===t||t.reject()}))),this._initialized.promise},Object.defineProperty(e.prototype,"list",{get:function(){return this._widgets},enumerable:!1,configurable:!0}),e.prototype.lookup=function(e){return this._widgets.find((function(t){return t.platformConf.name===e}))},e.prototype.lookupDefaultPosition=function(e){return p[e]},Object.defineProperty(e.prototype,"userPrefs",{get:function(){return this._userPrefs},enumerable:!1,configurable:!0}),e.prototype.loadUserPrefs=function(){return r(this,void 0,void 0,(function(){var e=this;return o(this,(function(t){switch(t.label){case 0:return[4,a.configure.User.preferences.load("widgets",{}).then((function(t){return e.applyUserPrefs(t)}))];case 1:return t.sent(),[2]}}))}))},e.prototype.saveUserPrefs=function(){return a.configure.User.preferences.update("widgets",this._userPrefs).save("widgets").then((function(){i.notify.events().next({name:s.EVENT_NAME.USERPREF_CHANGED,layer:s.LAYER_NAME.WIDGETS})}))},e.prototype.applyUserPrefs=function(e){return r(this,void 0,void 0,(function(){var t,n,r=this;return o(this,(function(o){return this._userPrefs=null!=e?e:this._userPrefs,t=a.configure.Platform.theme,n=[],t.listSkins().then((function(e){var o,u="panda"===(null===(o=e.find((function(e){return e.child===t.skin})))||void 0===o?void 0:o.parent)?f:l;r._widgets=r._widgets.filter((function(e,t){var o,i,s=e.platformConf.name;return-1===u.indexOf(s)&&(r._userPrefs[s]||(r._userPrefs[s]={index:null!==(o=d[s])&&void 0!==o?o:999,show:!0,position:e.platformConf.position}),e.platformConf.mandatory&&(r._userPrefs[s].show=!0,r._userPrefs[s].index=null!==(i=d[s])&&void 0!==i?i:999),e.platformConf.i18n&&n.push(e.platformConf.i18n),e.applyUserPref(r._userPrefs[s]),!0)}));var i=new c.Idiom;r._widgets=r._widgets.sort((function(e,t){var n=i.translate("timeline.settings."+e.platformConf.name).toLowerCase(),r=i.translate("timeline.settings."+t.platformConf.name).toLowerCase();return n<r?-1:n>r?1:0}))})),[2]}))}))},e}();t.WidgetFramework=h;var v=function(){function e(e){this._platformConf=e,this._schoolConf={},this._userPref=null}return Object.defineProperty(e.prototype,"platformConf",{get:function(){return this._platformConf},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schoolConf",{get:function(){return this._schoolConf},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userPref",{get:function(){return this._userPref},enumerable:!1,configurable:!0}),e.prototype.applyUserPref=function(e){var n,r;this._userPref=e,this._userPref.position=null!==(r=null!==(n=this._userPref.position)&&void 0!==n?n:t.widgets.lookupDefaultPosition(this._platformConf.name))&&void 0!==r?r:"left"},e}();t.widgets=new h},4962:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LastInfosWidget=void 0;var r=n(2431),o=function(){function e(){}return e.prototype.loadInfos=function(e){return r.transport.http.get("/actualites/infos/last/"+e)},e.prototype.getMaxResults=function(){return r.transport.http.get("/userbook/preference/maxInfos").then((function(e){return e.preference?parseInt(e.preference):4}))},e.prototype.setMaxResults=function(e){return r.transport.http.putJson("/userbook/preference/maxInfos",'"'+e+'"')},e}();t.LastInfosWidget=o},2869:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetFrameworkFactory=t.WIDGET_NAME=void 0;var u=n(5748);t.WIDGET_NAME={LAST_INFOS:"last-infos-widget",BIRTHDAY:"birthday",CALENDAR:"calendar-widget",CARNET:"carnet-de-bord",RECORD:"record-me",MOOD:"mood",MY_APPS:"my-apps",NOTES:"notes",RSS:"rss-widget",BOOKMARK:"bookmark-widget",QWANT:"qwant",QWANT_JUNIOR:"qwant-junior",AGENDA:"agenda-widget",CURSUS:"cursus-widget",MAXICOURS:"maxicours-widget",UNIVERSALIS:"universalis-widget",BRIEFME:"briefme-widget",SCHOOL:"school-widget"};var i=function(){function e(){}return e.instance=function(){return u.widgets},e}();t.WidgetFrameworkFactory=i,o(n(4962),t)}},__webpack_module_cache__={};function __webpack_require__(e){if(__webpack_module_cache__[e])return __webpack_module_cache__[e].exports;var t=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(t.exports,t,t.exports,__webpack_require__),t.exports}__webpack_require__.d=(e,t)=>{for(var n in t)__webpack_require__.o(t,n)&&!__webpack_require__.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__=__webpack_require__(9294)})();
17
- //# sourceMappingURL=ode-ts-client.js.map
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
+ PERFORMANCE OF THIS SOFTWARE.
14
+ ***************************************************************************** */var at=function(r,e){return at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},at(r,e)};function k(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");at(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function _i(r,e,t,n){function i(s){return s instanceof t?s:new t(function(u){u(s)})}return new(t||(t=Promise))(function(s,u){function o(l){try{a(n.next(l))}catch(d){u(d)}}function c(l){try{a(n.throw(l))}catch(d){u(d)}}function a(l){l.done?s(l.value):i(l.value).then(o,c)}a((n=n.apply(r,e||[])).next())})}function ct(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,u;return u={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function o(a){return function(l){return c([a,l])}}function c(a){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return t.label++,{value:a[1],done:!1};case 5:t.label++,i=a[1],a=[0];continue;case 7:a=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1],s=a;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(a);break}s[2]&&t.ops.pop(),t.trys.pop();continue}a=e.call(r,t)}catch(l){a=[6,l],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}}function V(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function T(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],u;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(o){u={error:o}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(u)throw u.error}}return s}function S(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r}function Ee(r){return this instanceof Ee?(this.v=r,this):new Ee(r)}function ki(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(r,e||[]),i,s=[];return i={},u("next"),u("throw"),u("return"),i[Symbol.asyncIterator]=function(){return this},i;function u(f){n[f]&&(i[f]=function(h){return new Promise(function(m,p){s.push([f,h,m,p])>1||o(f,h)})})}function o(f,h){try{c(n[f](h))}catch(m){d(s[0][3],m)}}function c(f){f.value instanceof Ee?Promise.resolve(f.value.v).then(a,l):d(s[0][2],f)}function a(f){o("next",f)}function l(f){o("throw",f)}function d(f,h){f(h),s.shift(),s.length&&o(s[0][0],s[0][1])}}function Bi(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof V=="function"?V(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=r[s]&&function(u){return new Promise(function(o,c){u=r[s](u),i(o,c,u.done,u.value)})}}function i(s,u,o,c){Promise.resolve(c).then(function(a){s({value:a,done:o})},u)}}function w(r){return typeof r=="function"}function ae(r){var e=function(n){Error.call(n),n.stack=new Error().stack},t=r(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var He=ae(function(r){return function(t){r(this),this.message=t?t.length+` errors occurred during unsubscription:
15
+ `+t.map(function(n,i){return i+1+") "+n.toString()}).join(`
16
+ `):"",this.name="UnsubscriptionError",this.errors=t}});function ne(r,e){if(r){var t=r.indexOf(e);0<=t&&r.splice(t,1)}}var U=function(){function r(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._teardowns=null}return r.prototype.unsubscribe=function(){var e,t,n,i,s;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var o=V(u),c=o.next();!c.done;c=o.next()){var a=c.value;a.remove(this)}}catch(p){e={error:p}}finally{try{c&&!c.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else u.remove(this);var l=this.initialTeardown;if(w(l))try{l()}catch(p){s=p instanceof He?p.errors:[p]}var d=this._teardowns;if(d){this._teardowns=null;try{for(var f=V(d),h=f.next();!h.done;h=f.next()){var m=h.value;try{mn(m)}catch(p){s=s!=null?s:[],p instanceof He?s=S(S([],T(s)),T(p.errors)):s.push(p)}}}catch(p){n={error:p}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}if(s)throw new He(s)}},r.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)mn(e);else{if(e instanceof r){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._teardowns=(t=this._teardowns)!==null&&t!==void 0?t:[]).push(e)}},r.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},r.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},r.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&ne(t,e)},r.prototype.remove=function(e){var t=this._teardowns;t&&ne(t,e),e instanceof r&&e._removeParent(this)},r.EMPTY=function(){var e=new r;return e.closed=!0,e}(),r}(),pn=U.EMPTY;function vn(r){return r instanceof U||r&&"closed"in r&&w(r.remove)&&w(r.add)&&w(r.unsubscribe)}function mn(r){w(r)?r():r.unsubscribe()}var ie={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},$e={setTimeout:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=$e.delegate;return((t==null?void 0:t.setTimeout)||setTimeout).apply(void 0,S([],T(r)))},clearTimeout:function(r){var e=$e.delegate;return((e==null?void 0:e.clearTimeout)||clearTimeout)(r)},delegate:void 0};function En(r){$e.setTimeout(function(){var e=ie.onUnhandledError;if(e)e(r);else throw r})}function O(){}var Li=function(){return lt("C",void 0,void 0)}();function Ni(r){return lt("E",void 0,r)}function Ui(r){return lt("N",r,void 0)}function lt(r,e,t){return{kind:r,value:e,error:t}}var ce=null;function qe(r){if(ie.useDeprecatedSynchronousErrorHandling){var e=!ce;if(e&&(ce={errorThrown:!1,error:null}),r(),e){var t=ce,n=t.errorThrown,i=t.error;if(ce=null,n)throw i}}else r()}function Mi(r){ie.useDeprecatedSynchronousErrorHandling&&ce&&(ce.errorThrown=!0,ce.error=r)}var We=function(r){k(e,r);function e(t){var n=r.call(this)||this;return n.isStopped=!1,t?(n.destination=t,vn(t)&&t.add(n)):n.destination=ji,n}return e.create=function(t,n,i){return new Ge(t,n,i)},e.prototype.next=function(t){this.isStopped?ht(Ui(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?ht(Ni(t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?ht(Li,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(U),Ge=function(r){k(e,r);function e(t,n,i){var s=r.call(this)||this,u;if(w(t))u=t;else if(t){u=t.next,n=t.error,i=t.complete;var o;s&&ie.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return s.unsubscribe()}):o=t,u=u==null?void 0:u.bind(o),n=n==null?void 0:n.bind(o),i=i==null?void 0:i.bind(o)}return s.destination={next:u?ft(u):O,error:ft(n!=null?n:gn),complete:i?ft(i):O},s}return e}(We);function ft(r,e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{r.apply(void 0,S([],T(t)))}catch(i){ie.useDeprecatedSynchronousErrorHandling?Mi(i):En(i)}}}function gn(r){throw r}function ht(r,e){var t=ie.onStoppedNotification;t&&$e.setTimeout(function(){return t(r,e)})}var ji={closed:!0,next:O,error:gn,complete:O},De=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function M(r){return r}function dt(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return yn(r)}function yn(r){return r.length===0?M:r.length===1?r[0]:function(t){return r.reduce(function(n,i){return i(n)},t)}}var F=function(){function r(e){e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,n){var i=this,s=$i(e)?e:new Ge(e,t,n);return qe(function(){var u=i,o=u.operator,c=u.source;s.add(o?o.call(s,c):c?i._subscribe(s):i._trySubscribe(s))}),s},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},r.prototype.forEach=function(e,t){var n=this;return t=An(t),new t(function(i,s){var u;u=n.subscribe(function(o){try{e(o)}catch(c){s(c),u==null||u.unsubscribe()}},s,i)})},r.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},r.prototype[De]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return yn(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=An(e),new e(function(n,i){var s;t.subscribe(function(u){return s=u},function(u){return i(u)},function(){return n(s)})})},r.create=function(e){return new r(e)},r}();function An(r){var e;return(e=r!=null?r:ie.Promise)!==null&&e!==void 0?e:Promise}function Hi(r){return r&&w(r.next)&&w(r.error)&&w(r.complete)}function $i(r){return r&&r instanceof We||Hi(r)&&vn(r)}function wn(r){return w(r==null?void 0:r.lift)}function y(r){return function(e){if(wn(e))return e.lift(function(t){try{return r(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}var E=function(r){k(e,r);function e(t,n,i,s,u){var o=r.call(this,t)||this;return o.onFinalize=u,o._next=n?function(c){try{n(c)}catch(a){t.error(a)}}:r.prototype._next,o._error=s?function(c){try{s(c)}catch(a){t.error(a)}finally{this.unsubscribe()}}:r.prototype._error,o._complete=i?function(){try{i()}catch(c){t.error(c)}finally{this.unsubscribe()}}:r.prototype._complete,o}return e.prototype.unsubscribe=function(){var t,n=this.closed;r.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))},e}(We);function bn(){return y(function(r,e){var t=null;r._refCount++;var n=new E(e,void 0,void 0,void 0,function(){if(!r||r._refCount<=0||0<--r._refCount){t=null;return}var i=r._connection,s=t;t=null,i&&(!s||i===s)&&i.unsubscribe(),e.unsubscribe()});r.subscribe(n),n.closed||(t=r.connect())})}var Ve=function(r){k(e,r);function e(t,n){var i=r.call(this)||this;return i.source=t,i.subjectFactory=n,i._subject=null,i._refCount=0,i._connection=null,wn(t)&&(i.lift=t.lift),i}return e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,t==null||t.unsubscribe()},e.prototype.connect=function(){var t=this,n=this._connection;if(!n){n=this._connection=new U;var i=this.getSubject();n.add(this.source.subscribe(new E(i,void 0,function(){t._teardown(),i.complete()},function(s){t._teardown(),i.error(s)},function(){return t._teardown()}))),n.closed&&(this._connection=null,n=U.EMPTY)}return n},e.prototype.refCount=function(){return bn()(this)},e}(F),xn={now:function(){return(xn.delegate||performance).now()},delegate:void 0},ge={schedule:function(r){var e=requestAnimationFrame,t=cancelAnimationFrame,n=ge.delegate;n&&(e=n.requestAnimationFrame,t=n.cancelAnimationFrame);var i=e(function(s){t=void 0,r(s)});return new U(function(){return t==null?void 0:t(i)})},requestAnimationFrame:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=ge.delegate;return((t==null?void 0:t.requestAnimationFrame)||requestAnimationFrame).apply(void 0,S([],T(r)))},cancelAnimationFrame:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=ge.delegate;return((t==null?void 0:t.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,S([],T(r)))},delegate:void 0};function qi(r){return r?Fn(r):Wi}function Fn(r){var e=ge.schedule;return new F(function(t){var n=new U,i=r||xn,s=i.now(),u=function(o){var c=i.now();t.next({timestamp:r?c:o,elapsed:c-s}),t.closed||n.add(e(u))};return n.add(e(u)),n})}var Wi=Fn(),Cn=ae(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),_=function(r){k(e,r);function e(){var t=r.call(this)||this;return t.closed=!1,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var n=new Rn(this,this);return n.operator=t,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new Cn},e.prototype.next=function(t){var n=this;qe(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){var u=n.observers.slice();try{for(var o=V(u),c=o.next();!c.done;c=o.next()){var a=c.value;a.next(t)}}catch(l){i={error:l}}finally{try{c&&!c.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}}})},e.prototype.error=function(t){var n=this;qe(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var i=n.observers;i.length;)i.shift().error(t)}})},e.prototype.complete=function(){var t=this;qe(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var n=this,i=n.hasError,s=n.isStopped,u=n.observers;return i||s?pn:(u.push(t),new U(function(){return ne(u,t)}))},e.prototype._checkFinalizedStatuses=function(t){var n=this,i=n.hasError,s=n.thrownError,u=n.isStopped;i?t.error(s):u&&t.complete()},e.prototype.asObservable=function(){var t=new F;return t.source=this,t},e.create=function(t,n){return new Rn(t,n)},e}(F),Rn=function(r){k(e,r);function e(t,n){var i=r.call(this)||this;return i.destination=t,i.source=n,i}return e.prototype.next=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,t)},e.prototype.error=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,t)},e.prototype.complete=function(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)},e.prototype._subscribe=function(t){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&i!==void 0?i:pn},e}(_),Dn=function(r){k(e,r);function e(t){var n=r.call(this)||this;return n._value=t,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var n=r.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},e.prototype.getValue=function(){var t=this,n=t.hasError,i=t.thrownError,s=t._value;if(n)throw i;return this._throwIfClosed(),s},e.prototype.next=function(t){r.prototype.next.call(this,this._value=t)},e}(_),ze={now:function(){return(ze.delegate||Date).now()},delegate:void 0},pt=function(r){k(e,r);function e(t,n,i){t===void 0&&(t=1/0),n===void 0&&(n=1/0),i===void 0&&(i=ze);var s=r.call(this)||this;return s._bufferSize=t,s._windowTime=n,s._timestampProvider=i,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=n===1/0,s._bufferSize=Math.max(1,t),s._windowTime=Math.max(1,n),s}return e.prototype.next=function(t){var n=this,i=n.isStopped,s=n._buffer,u=n._infiniteTimeWindow,o=n._timestampProvider,c=n._windowTime;i||(s.push(t),!u&&s.push(o.now()+c)),this._trimBuffer(),r.prototype.next.call(this,t)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(t),i=this,s=i._infiniteTimeWindow,u=i._buffer,o=u.slice(),c=0;c<o.length&&!t.closed;c+=s?1:2)t.next(o[c]);return this._checkFinalizedStatuses(t),n},e.prototype._trimBuffer=function(){var t=this,n=t._bufferSize,i=t._timestampProvider,s=t._buffer,u=t._infiniteTimeWindow,o=(u?1:2)*n;if(n<1/0&&o<s.length&&s.splice(0,s.length-o),!u){for(var c=i.now(),a=0,l=1;l<s.length&&s[l]<=c;l+=2)a=l;a&&s.splice(0,a+1)}},e}(_),vt=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return e.prototype._checkFinalizedStatuses=function(t){var n=this,i=n.hasError,s=n._hasValue,u=n._value,o=n.thrownError,c=n.isStopped,a=n._isComplete;i?t.error(o):(c||a)&&(s&&t.next(u),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var t=this,n=t._hasValue,i=t._value,s=t._isComplete;s||(this._isComplete=!0,n&&r.prototype.next.call(this,i),r.prototype.complete.call(this))},e}(_),Gi=function(r){k(e,r);function e(t,n){return r.call(this)||this}return e.prototype.schedule=function(t,n){return this},e}(U),Je={setInterval:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Je.delegate;return((t==null?void 0:t.setInterval)||setInterval).apply(void 0,S([],T(r)))},clearInterval:function(r){var e=Je.delegate;return((e==null?void 0:e.clearInterval)||clearInterval)(r)},delegate:void 0},Te=function(r){k(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.pending=!1,i}return e.prototype.schedule=function(t,n){if(n===void 0&&(n=0),this.closed)return this;this.state=t;var i=this.id,s=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(s,i,n)),this.pending=!0,this.delay=n,this.id=this.id||this.requestAsyncId(s,this.id,n),this},e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),Je.setInterval(t.flush.bind(t,this),i)},e.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;Je.clearInterval(n)},e.prototype.execute=function(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(t,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,n){var i=!1,s;try{this.work(t)}catch(u){i=!0,s=!!u&&u||new Error(u)}if(i)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,i=t.scheduler,s=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ne(s,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,r.prototype.unsubscribe.call(this)}},e}(Gi),Vi=1,mt,Et={};function Tn(r){return r in Et?(delete Et[r],!0):!1}var Sn={setImmediate:function(r){var e=Vi++;return Et[e]=!0,mt||(mt=Promise.resolve()),mt.then(function(){return Tn(e)&&r()}),e},clearImmediate:function(r){Tn(r)}},zi=Sn.setImmediate,Ji=Sn.clearImmediate,Ye={setImmediate:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Ye.delegate;return((t==null?void 0:t.setImmediate)||zi).apply(void 0,S([],T(r)))},clearImmediate:function(r){var e=Ye.delegate;return((e==null?void 0:e.clearImmediate)||Ji)(r)},delegate:void 0},Yi=function(r){k(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i}return e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!==null&&i>0?r.prototype.requestAsyncId.call(this,t,n,i):(t.actions.push(this),t._scheduled||(t._scheduled=Ye.setImmediate(t.flush.bind(t,void 0))))},e.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i!=null&&i>0||i==null&&this.delay>0)return r.prototype.recycleAsyncId.call(this,t,n,i);t.actions.length===0&&(Ye.clearImmediate(n),t._scheduled=void 0)},e}(Te),gt=function(){function r(e,t){t===void 0&&(t=r.now),this.schedulerActionCtor=e,this.now=t}return r.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},r.now=ze.now,r}(),Se=function(r){k(e,r);function e(t,n){n===void 0&&(n=gt.now);var i=r.call(this,t,n)||this;return i.actions=[],i._active=!1,i._scheduled=void 0,i}return e.prototype.flush=function(t){var n=this.actions;if(this._active){n.push(t);return}var i;this._active=!0;do if(i=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,i){for(;t=n.shift();)t.unsubscribe();throw i}},e}(gt),Xi=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.flush=function(t){this._active=!0,this._scheduled=void 0;var n=this.actions,i,s=-1;t=t||n.shift();var u=n.length;do if(i=t.execute(t.state,t.delay))break;while(++s<u&&(t=n.shift()));if(this._active=!1,i){for(;++s<u&&(t=n.shift());)t.unsubscribe();throw i}},e}(Se),In=new Xi(Yi),Ki=In,ee=new Se(Te),Ie=ee,Qi=function(r){k(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i}return e.prototype.schedule=function(t,n){return n===void 0&&(n=0),n>0?r.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},e.prototype.execute=function(t,n){return n>0||this.closed?r.prototype.execute.call(this,t,n):this._execute(t,n)},e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!=null&&i>0||i==null&&this.delay>0?r.prototype.requestAsyncId.call(this,t,n,i):t.flush(this)},e}(Te),Zi=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(Se),Pn=new Zi(Qi),es=Pn,ts=function(r){k(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i}return e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!==null&&i>0?r.prototype.requestAsyncId.call(this,t,n,i):(t.actions.push(this),t._scheduled||(t._scheduled=ge.requestAnimationFrame(function(){return t.flush(void 0)})))},e.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i!=null&&i>0||i==null&&this.delay>0)return r.prototype.recycleAsyncId.call(this,t,n,i);t.actions.length===0&&(ge.cancelAnimationFrame(n),t._scheduled=void 0)},e}(Te),ns=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.flush=function(t){this._active=!0,this._scheduled=void 0;var n=this.actions,i,s=-1;t=t||n.shift();var u=n.length;do if(i=t.execute(t.state,t.delay))break;while(++s<u&&(t=n.shift()));if(this._active=!1,i){for(;++s<u&&(t=n.shift());)t.unsubscribe();throw i}},e}(Se),On=new ns(ts),rs=On,is=function(r){k(e,r);function e(t,n){t===void 0&&(t=_n),n===void 0&&(n=1/0);var i=r.call(this,t,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return e.prototype.flush=function(){for(var t=this,n=t.actions,i=t.maxFrames,s,u;(u=n[0])&&u.delay<=i&&(n.shift(),this.frame=u.delay,!(s=u.execute(u.state,u.delay))););if(s){for(;u=n.shift();)u.unsubscribe();throw s}},e.frameTimeFactor=10,e}(Se),_n=function(r){k(e,r);function e(t,n,i){i===void 0&&(i=t.index+=1);var s=r.call(this,t,n)||this;return s.scheduler=t,s.work=n,s.index=i,s.active=!0,s.index=t.index=i,s}return e.prototype.schedule=function(t,n){if(n===void 0&&(n=0),Number.isFinite(n)){if(!this.id)return r.prototype.schedule.call(this,t,n);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(t,n)}else return U.EMPTY},e.prototype.requestAsyncId=function(t,n,i){i===void 0&&(i=0),this.delay=t.frame+i;var s=t.actions;return s.push(this),s.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,n,i){},e.prototype._execute=function(t,n){if(this.active===!0)return r.prototype._execute.call(this,t,n)},e.sortActions=function(t,n){return t.delay===n.delay?t.index===n.index?0:t.index>n.index?1:-1:t.delay>n.delay?1:-1},e}(Te),K=new F(function(r){return r.complete()});function ss(r){return r?us(r):K}function us(r){return new F(function(e){return r.schedule(function(){return e.complete()})})}function yt(r,e){return new F(function(t){var n=0;return e.schedule(function(){n===r.length?t.complete():(t.next(r[n++]),t.closed||this.schedule())})})}var At=function(r){return r&&typeof r.length=="number"&&typeof r!="function"};function kn(r){return w(r==null?void 0:r.then)}function os(r,e){return new F(function(t){var n=new U;return n.add(e.schedule(function(){var i=r[De]();n.add(i.subscribe({next:function(s){n.add(e.schedule(function(){return t.next(s)}))},error:function(s){n.add(e.schedule(function(){return t.error(s)}))},complete:function(){n.add(e.schedule(function(){return t.complete()}))}}))})),n})}function as(r,e){return new F(function(t){return e.schedule(function(){return r.then(function(n){t.add(e.schedule(function(){t.next(n),t.add(e.schedule(function(){return t.complete()}))}))},function(n){t.add(e.schedule(function(){return t.error(n)}))})})})}function cs(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var Bn=cs();function Ln(r,e,t,n){n===void 0&&(n=0);var i=e.schedule(function(){try{t.call(this)}catch(s){r.error(s)}},n);return r.add(i),i}function Nn(r,e){return new F(function(t){var n;return t.add(e.schedule(function(){n=r[Bn](),Ln(t,e,function(){var i=n.next(),s=i.value,u=i.done;u?t.complete():(t.next(s),this.schedule())})})),function(){return w(n==null?void 0:n.return)&&n.return()}})}function Un(r,e){if(!r)throw new Error("Iterable cannot be null");return new F(function(t){var n=new U;return n.add(e.schedule(function(){var i=r[Symbol.asyncIterator]();n.add(e.schedule(function(){var s=this;i.next().then(function(u){u.done?t.complete():(t.next(u.value),s.schedule())})}))})),n})}function Mn(r){return w(r[De])}function jn(r){return w(r==null?void 0:r[Bn])}function Hn(r){return Symbol.asyncIterator&&w(r==null?void 0:r[Symbol.asyncIterator])}function $n(r){return new TypeError("You provided "+(r!==null&&typeof r=="object"?"an invalid object":"'"+r+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function qn(r){return ki(this,arguments,function(){var t,n,i,s;return ct(this,function(u){switch(u.label){case 0:t=r.getReader(),u.label=1;case 1:u.trys.push([1,,9,10]),u.label=2;case 2:return[4,Ee(t.read())];case 3:return n=u.sent(),i=n.value,s=n.done,s?[4,Ee(void 0)]:[3,5];case 4:return[2,u.sent()];case 5:return[4,Ee(i)];case 6:return[4,u.sent()];case 7:return u.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function Wn(r){return w(r==null?void 0:r.getReader)}function ls(r,e){return Un(qn(r),e)}function Gn(r,e){if(r!=null){if(Mn(r))return os(r,e);if(At(r))return yt(r,e);if(kn(r))return as(r,e);if(Hn(r))return Un(r,e);if(jn(r))return Nn(r,e);if(Wn(r))return ls(r,e)}throw $n(r)}function ye(r,e){return e?Gn(r,e):R(r)}function R(r){if(r instanceof F)return r;if(r!=null){if(Mn(r))return fs(r);if(At(r))return Vn(r);if(kn(r))return hs(r);if(Hn(r))return zn(r);if(jn(r))return ds(r);if(Wn(r))return ps(r)}throw $n(r)}function fs(r){return new F(function(e){var t=r[De]();if(w(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Vn(r){return new F(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function hs(r){return new F(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,En)})}function ds(r){return new F(function(e){var t,n;try{for(var i=V(r),s=i.next();!s.done;s=i.next()){var u=s.value;if(e.next(u),e.closed)return}}catch(o){t={error:o}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.complete()})}function zn(r){return new F(function(e){vs(r,e).catch(function(t){return e.error(t)})})}function ps(r){return zn(qn(r))}function vs(r,e){var t,n,i,s;return _i(this,void 0,void 0,function(){var u,o;return ct(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),t=Bi(r),c.label=1;case 1:return[4,t.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(u=n.value,e.next(u),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o=c.sent(),i={error:o},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(s=t.return)?[4,s.call(t)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}function Ae(r,e){return e?yt(r,e):Vn(r)}function Xe(r){return r&&w(r.schedule)}function wt(r){return r[r.length-1]}function Pe(r){return w(wt(r))?r.pop():void 0}function re(r){return Xe(wt(r))?r.pop():void 0}function Jn(r,e){return typeof wt(r)=="number"?r.pop():e}function bt(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=re(r);return t?yt(r,t):Ae(r)}function Yn(r,e){var t=w(r)?r:function(){return r},n=function(i){return i.error(t())};return new F(e?function(i){return e.schedule(n,0,i)}:n)}var xt;(function(r){r.NEXT="N",r.ERROR="E",r.COMPLETE="C"})(xt||(xt={}));var Ke=function(){function r(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue=e==="N"}return r.prototype.observe=function(e){return Xn(this,e)},r.prototype.do=function(e,t,n){var i=this,s=i.kind,u=i.value,o=i.error;return s==="N"?e==null?void 0:e(u):s==="E"?t==null?void 0:t(o):n==null?void 0:n()},r.prototype.accept=function(e,t,n){var i;return w((i=e)===null||i===void 0?void 0:i.next)?this.observe(e):this.do(e,t,n)},r.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,i=e.error,s=t==="N"?bt(n):t==="E"?Yn(function(){return i}):t==="C"?K:0;if(!s)throw new TypeError("Unexpected notification kind "+t);return s},r.createNext=function(e){return new r("N",e)},r.createError=function(e){return new r("E",void 0,e)},r.createComplete=function(){return r.completeNotification},r.completeNotification=new r("C"),r}();function Xn(r,e){var t,n,i,s=r,u=s.kind,o=s.value,c=s.error;if(typeof u!="string")throw new TypeError('Invalid notification, missing "kind"');u==="N"?(t=e.next)===null||t===void 0||t.call(e,o):u==="E"?(n=e.error)===null||n===void 0||n.call(e,c):(i=e.complete)===null||i===void 0||i.call(e)}function ms(r){return!!r&&(r instanceof F||w(r.lift)&&w(r.subscribe))}var le=ae(function(r){return function(){r(this),this.name="EmptyError",this.message="no elements in sequence"}});function Es(r,e){var t=typeof e=="object";return new Promise(function(n,i){var s=!1,u;r.subscribe({next:function(o){u=o,s=!0},error:i,complete:function(){s?n(u):t?n(e.defaultValue):i(new le)}})})}function gs(r,e){var t=typeof e=="object";return new Promise(function(n,i){var s=new Ge({next:function(u){n(u),s.unsubscribe()},error:i,complete:function(){t?n(e.defaultValue):i(new le)}});r.subscribe(s)})}var Ft=ae(function(r){return function(){r(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),Kn=ae(function(r){return function(t){r(this),this.name="NotFoundError",this.message=t}}),Qn=ae(function(r){return function(t){r(this),this.name="SequenceError",this.message=t}});function Ct(r){return r instanceof Date&&!isNaN(r)}var Zn=ae(function(r){return function(t){t===void 0&&(t=null),r(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function er(r,e){var t=Ct(r)?{first:r}:typeof r=="number"?{each:r}:r,n=t.first,i=t.each,s=t.with,u=s===void 0?ys:s,o=t.scheduler,c=o===void 0?e!=null?e:ee:o,a=t.meta,l=a===void 0?null:a;if(n==null&&i==null)throw new TypeError("No timeout provided.");return y(function(d,f){var h,m,p=null,g=0,A=function(I){m=Ln(f,c,function(){h.unsubscribe(),R(u({meta:l,lastValue:p,seen:g})).subscribe(f)},I)};h=d.subscribe(new E(f,function(I){m==null||m.unsubscribe(),g++,f.next(p=I),i>0&&A(i)},void 0,void 0,function(){m!=null&&m.closed||m==null||m.unsubscribe(),p=null})),A(n!=null?typeof n=="number"?n:+n-c.now():i)})}function ys(r){throw new Zn(r)}function tr(r,e){return e===void 0&&(e=0),y(function(t,n){n.add(r.schedule(function(){return t.subscribe(n)},e))})}function se(r,e){return y(function(t,n){var i=0;t.subscribe(new E(n,function(s){n.next(r.call(e,s,i++))}))})}var As=Array.isArray;function ws(r,e){return As(e)?r.apply(void 0,S([],T(e))):r(e)}function fe(r){return se(function(e){return ws(r,e)})}function nr(r,e){return e===void 0&&(e=0),y(function(t,n){t.subscribe(new E(n,function(i){return n.add(r.schedule(function(){return n.next(i)},e))},function(){return n.add(r.schedule(function(){return n.complete()},e))},function(i){return n.add(r.schedule(function(){return n.error(i)},e))}))})}function Qe(r,e,t,n){if(t)if(Xe(t))n=t;else return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return Qe(r,e,n).apply(this,i).pipe(fe(t))};return n?function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return Qe(r,e).apply(this,i).pipe(tr(n),nr(n))}:function(){for(var i=this,s=[],u=0;u<arguments.length;u++)s[u]=arguments[u];var o=new vt,c=!0;return new F(function(a){var l=o.subscribe(a);if(c){c=!1;var d=!1,f=!1;e.apply(i,S(S([],T(s)),[function(){for(var h=[],m=0;m<arguments.length;m++)h[m]=arguments[m];if(r){var p=h.shift();if(p!=null){o.error(p);return}}o.next(1<h.length?h:h[0]),f=!0,d&&o.complete()}])),f&&o.complete(),d=!0}return l})}}function bs(r,e,t){return Qe(!1,r,e,t)}function xs(r,e,t){return Qe(!0,r,e,t)}var Fs=Array.isArray,Cs=Object.getPrototypeOf,Rs=Object.prototype,Ds=Object.keys;function rr(r){if(r.length===1){var e=r[0];if(Fs(e))return{args:e,keys:null};if(Ts(e)){var t=Ds(e);return{args:t.map(function(n){return e[n]}),keys:t}}}return{args:r,keys:null}}function Ts(r){return r&&typeof r=="object"&&Cs(r)===Rs}function ir(r,e){return r.reduce(function(t,n,i){return t[n]=e[i],t},{})}function sr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=re(r),n=Pe(r),i=rr(r),s=i.args,u=i.keys;if(s.length===0)return ye([],t);var o=new F(ur(s,t,u?function(c){return ir(u,c)}:M));return n?o.pipe(fe(n)):o}function ur(r,e,t){return t===void 0&&(t=M),function(n){or(e,function(){for(var i=r.length,s=new Array(i),u=i,o=i,c=function(l){or(e,function(){var d=ye(r[l],e),f=!1;d.subscribe(new E(n,function(h){s[l]=h,f||(f=!0,o--),o||n.next(t(s.slice()))},function(){--u||n.complete()}))},n)},a=0;a<i;a++)c(a)},n)}}function or(r,e,t){r?t.add(r.schedule(e)):e()}function Rt(r,e,t,n,i,s,u,o){var c=[],a=0,l=0,d=!1,f=function(){d&&!c.length&&!a&&e.complete()},h=function(p){return a<n?m(p):c.push(p)},m=function(p){s&&e.next(p),a++;var g=!1;R(t(p,l++)).subscribe(new E(e,function(A){i==null||i(A),s?h(A):e.next(A)},function(){g=!0},void 0,function(){if(g)try{a--;for(var A=function(){var I=c.shift();u?e.add(u.schedule(function(){return m(I)})):m(I)};c.length&&a<n;)A();f()}catch(I){e.error(I)}}))};return r.subscribe(new E(e,h,function(){d=!0,f()})),function(){o==null||o()}}function Q(r,e,t){return t===void 0&&(t=1/0),w(e)?Q(function(n,i){return se(function(s,u){return e(n,s,i,u)})(R(r(n,i)))},t):(typeof e=="number"&&(t=e),y(function(n,i){return Rt(n,i,r,t)}))}function Ze(r){return r===void 0&&(r=1/0),Q(M,r)}function Dt(){return Ze(1)}function Oe(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Dt()(Ae(r,re(r)))}function _e(r){return new F(function(e){R(r()).subscribe(e)})}var Ss={connector:function(){return new _},resetOnDisconnect:!0};function Is(r,e){e===void 0&&(e=Ss);var t=null,n=e.connector,i=e.resetOnDisconnect,s=i===void 0?!0:i,u=n(),o=new F(function(c){return u.subscribe(c)});return o.connect=function(){return(!t||t.closed)&&(t=_e(function(){return r}).subscribe(u),s&&t.add(function(){return u=n()})),t},o}function Ps(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Pe(r),n=rr(r),i=n.args,s=n.keys,u=new F(function(o){var c=i.length;if(!c){o.complete();return}for(var a=new Array(c),l=c,d=c,f=function(m){var p=!1;R(i[m]).subscribe(new E(o,function(g){p||(p=!0,d--),a[m]=g},function(){(!--l||!p)&&(d||o.next(s?ir(s,a):a),o.complete())}))},h=0;h<c;h++)f(h)});return t?u.pipe(fe(t)):u}var Os=["addListener","removeListener"],_s=["addEventListener","removeEventListener"],ks=["on","off"];function Tt(r,e,t,n){if(w(t)&&(n=t,t=void 0),n)return Tt(r,e,t).pipe(fe(n));var i=T(Ns(r)?_s.map(function(o){return function(c){return r[o](e,c,t)}}):Bs(r)?Os.map(ar(r,e)):Ls(r)?ks.map(ar(r,e)):[],2),s=i[0],u=i[1];if(!s&&At(r))return Q(function(o){return Tt(o,e,t)})(Ae(r));if(!s)throw new TypeError("Invalid event target");return new F(function(o){var c=function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return o.next(1<a.length?a:a[0])};return s(c),function(){return u(c)}})}function ar(r,e){return function(t){return function(n){return r[t](e,n)}}}function Bs(r){return w(r.addListener)&&w(r.removeListener)}function Ls(r){return w(r.on)&&w(r.off)}function Ns(r){return w(r.addEventListener)&&w(r.removeEventListener)}function cr(r,e,t){return t?cr(r,e).pipe(fe(t)):new F(function(n){var i=function(){for(var u=[],o=0;o<arguments.length;o++)u[o]=arguments[o];return n.next(u.length===1?u[0]:u)},s=r(i);return w(e)?function(){return e(i,s)}:void 0})}function Us(r,e,t,n,i){var s,u,o,c;arguments.length===1?(s=r,c=s.initialState,e=s.condition,t=s.iterate,u=s.resultSelector,o=u===void 0?M:u,i=s.scheduler):(c=r,!n||Xe(n)?(o=M,i=n):o=n);function a(){var l;return ct(this,function(d){switch(d.label){case 0:l=c,d.label=1;case 1:return!e||e(l)?[4,o(l)]:[3,4];case 2:d.sent(),d.label=3;case 3:return l=t(l),[3,1];case 4:return[2]}})}return _e(i?function(){return Nn(a(),i)}:a)}function Ms(r,e,t){return _e(function(){return r()?e:t})}function we(r,e,t){r===void 0&&(r=0),t===void 0&&(t=Ie);var n=-1;return e!=null&&(Xe(e)?t=e:n=e),new F(function(i){var s=Ct(r)?+r-t.now():r;s<0&&(s=0);var u=0;return t.schedule(function(){i.closed||(i.next(u++),0<=n?this.schedule(void 0,n):i.complete())},s)})}function lr(r,e){return r===void 0&&(r=0),e===void 0&&(e=ee),r<0&&(r=0),we(r,r,e)}function js(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=re(r),n=Jn(r,1/0),i=r;return i.length?i.length===1?R(i[0]):Ze(n)(Ae(i,t)):K}var fr=new F(O);function Hs(){return fr}var $s=Array.isArray;function be(r){return r.length===1&&$s(r[0])?r[0]:r}function qs(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=be(r);return y(function(n,i){var s=S([n],T(t)),u=function(){if(!i.closed)if(s.length>0){var o=void 0;try{o=R(s.shift())}catch{u();return}var c=new E(i,void 0,O,O);i.add(o.subscribe(c)),c.add(u)}else i.complete()};u()})}function Ws(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return qs(be(r))(K)}function Gs(r,e){return ye(Object.entries(r),e)}function Vs(r,e){return function(t,n){return!r.call(e,t,n)}}function ue(r,e){return y(function(t,n){var i=0;t.subscribe(new E(n,function(s){return r.call(e,s,i++)&&n.next(s)}))})}function zs(r,e,t){return[ue(e,t)(R(r)),ue(Vs(e,t))(R(r))]}function Js(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r=be(r),r.length===1?R(r[0]):new F(hr(r))}function hr(r){return function(e){for(var t=[],n=function(s){t.push(R(r[s]).subscribe(new E(e,function(u){if(t){for(var o=0;o<t.length;o++)o!==s&&t[o].unsubscribe();t=null}e.next(u)})))},i=0;t&&!e.closed&&i<r.length;i++)n(i)}}function Ys(r,e,t){if(e==null&&(e=r,r=0),e<=0)return K;var n=e+r;return new F(t?function(i){var s=r;return t.schedule(function(){s<n?(i.next(s++),this.schedule()):i.complete()})}:function(i){for(var s=r;s<n&&!i.closed;)i.next(s++);i.complete()})}function Xs(r,e){return new F(function(t){var n=r(),i=e(n),s=i?R(i):K;return s.subscribe(t),function(){n&&n.unsubscribe()}})}function St(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Pe(r),n=be(r);return n.length?new F(function(i){var s=n.map(function(){return[]}),u=n.map(function(){return!1});i.add(function(){s=u=null});for(var o=function(a){R(n[a]).subscribe(new E(i,function(l){if(s[a].push(l),s.every(function(f){return f.length})){var d=s.map(function(f){return f.shift()});i.next(t?t.apply(void 0,S([],T(d))):d),s.some(function(f,h){return!f.length&&u[h]})&&i.complete()}},function(){u[a]=!0,!s[a].length&&i.complete()}))},c=0;!i.closed&&c<n.length;c++)o(c);return function(){s=u=null}}):K}function dr(r){return y(function(e,t){var n=!1,i=null,s=null,u=!1,o=function(){if(s==null||s.unsubscribe(),s=null,n){n=!1;var a=i;i=null,t.next(a)}u&&t.complete()},c=function(){s=null,u&&t.complete()};e.subscribe(new E(t,function(a){n=!0,i=a,s||R(r(a)).subscribe(s=new E(t,o,c))},function(){u=!0,(!n||!s||s.closed)&&t.complete()}))})}function Ks(r,e){return e===void 0&&(e=Ie),dr(function(){return we(r,e)})}function Qs(r){return y(function(e,t){var n=[];return e.subscribe(new E(t,function(i){return n.push(i)},function(){t.next(n),t.complete()})),r.subscribe(new E(t,function(){var i=n;n=[],t.next(i)},O)),function(){n=null}})}function Zs(r,e){return e===void 0&&(e=null),e=e!=null?e:r,y(function(t,n){var i=[],s=0;t.subscribe(new E(n,function(u){var o,c,a,l,d=null;s++%e===0&&i.push([]);try{for(var f=V(i),h=f.next();!h.done;h=f.next()){var m=h.value;m.push(u),r<=m.length&&(d=d!=null?d:[],d.push(m))}}catch(A){o={error:A}}finally{try{h&&!h.done&&(c=f.return)&&c.call(f)}finally{if(o)throw o.error}}if(d)try{for(var p=V(d),g=p.next();!g.done;g=p.next()){var m=g.value;ne(i,m),n.next(m)}}catch(A){a={error:A}}finally{try{g&&!g.done&&(l=p.return)&&l.call(p)}finally{if(a)throw a.error}}},function(){var u,o;try{for(var c=V(i),a=c.next();!a.done;a=c.next()){var l=a.value;n.next(l)}}catch(d){u={error:d}}finally{try{a&&!a.done&&(o=c.return)&&o.call(c)}finally{if(u)throw u.error}}n.complete()},void 0,function(){i=null}))})}function eu(r){for(var e,t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(e=re(n))!==null&&e!==void 0?e:ee,u=(t=n[0])!==null&&t!==void 0?t:null,o=n[1]||1/0;return y(function(c,a){var l=[],d=!1,f=function(p){var g=p.buffer,A=p.subs;A.unsubscribe(),ne(l,p),a.next(g),d&&h()},h=function(){if(l){var p=new U;a.add(p);var g=[],A={buffer:g,subs:p};l.push(A),p.add(s.schedule(function(){return f(A)},r))}};u!==null&&u>=0?a.add(s.schedule(function(){h(),!this.closed&&a.add(this.schedule(null,u))},u)):d=!0,h();var m=new E(a,function(p){var g,A,I=l.slice();try{for(var G=V(I),B=G.next();!B.done;B=G.next()){var W=B.value,X=W.buffer;X.push(p),o<=X.length&&f(W)}}catch(dn){g={error:dn}}finally{try{B&&!B.done&&(A=G.return)&&A.call(G)}finally{if(g)throw g.error}}},function(){for(;l!=null&&l.length;)a.next(l.shift().buffer);m==null||m.unsubscribe(),a.complete(),a.unsubscribe()},void 0,function(){return l=null});c.subscribe(m)})}function tu(r,e){return y(function(t,n){var i=[];R(r).subscribe(new E(n,function(s){var u=[];i.push(u);var o=new U,c=function(){ne(i,u),n.next(u),o.unsubscribe()};o.add(R(e(s)).subscribe(new E(n,c,O)))},O)),t.subscribe(new E(n,function(s){var u,o;try{for(var c=V(i),a=c.next();!a.done;a=c.next()){var l=a.value;l.push(s)}}catch(d){u={error:d}}finally{try{a&&!a.done&&(o=c.return)&&o.call(c)}finally{if(u)throw u.error}}},function(){for(;i.length>0;)n.next(i.shift());n.complete()}))})}function nu(r){return y(function(e,t){var n=null,i=null,s=function(){i==null||i.unsubscribe();var u=n;n=[],u&&t.next(u),R(r()).subscribe(i=new E(t,s,O))};s(),e.subscribe(new E(t,function(u){return n==null?void 0:n.push(u)},function(){n&&t.next(n),t.complete()},void 0,function(){return n=i=null}))})}function pr(r){return y(function(e,t){var n=null,i=!1,s;n=e.subscribe(new E(t,void 0,void 0,function(u){s=R(r(u,pr(r)(e))),n?(n.unsubscribe(),n=null,s.subscribe(t)):i=!0})),i&&(n.unsubscribe(),n=null,s.subscribe(t))})}function vr(r,e,t,n,i){return function(s,u){var o=t,c=e,a=0;s.subscribe(new E(u,function(l){var d=a++;c=o?r(c,l,d):(o=!0,l),n&&u.next(c)},i&&function(){o&&u.next(c),u.complete()}))}}function ke(r,e){return y(vr(r,e,arguments.length>=2,!1,!0))}var ru=function(r,e){return r.push(e),r};function mr(){return y(function(r,e){ke(ru,[])(r).subscribe(e)})}function Er(r,e){return dt(mr(),Q(function(t){return r(t)}),e?fe(e):M)}function gr(r){return Er(sr,r)}var iu=gr;function yr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Pe(r);return t?dt(yr.apply(void 0,S([],T(r))),fe(t)):y(function(n,i){ur(S([n],T(be(r))))(i)})}function su(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return yr.apply(void 0,S([],T(r)))}function It(r,e){return w(e)?Q(r,e,1):Q(r,1)}function uu(r,e){return w(e)?It(function(){return r},e):It(function(){return r})}function ou(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=re(r);return y(function(n,i){Dt()(Ae(S([n],T(r)),t)).subscribe(i)})}function au(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return ou.apply(void 0,S([],T(r)))}function cu(r){return new F(function(e){return r.subscribe(e)})}var lu={connector:function(){return new _}};function Pt(r,e){e===void 0&&(e=lu);var t=e.connector;return y(function(n,i){var s=t();ye(r(cu(s))).subscribe(i),i.add(n.subscribe(s))})}function fu(r){return ke(function(e,t,n){return!r||r(t,n)?e+1:e},0)}function hu(r){return y(function(e,t){var n=!1,i=null,s=null,u=function(){if(s==null||s.unsubscribe(),s=null,n){n=!1;var o=i;i=null,t.next(o)}};e.subscribe(new E(t,function(o){s==null||s.unsubscribe(),n=!0,i=o,s=new E(t,u,O),R(r(o)).subscribe(s)},function(){u(),t.complete()},void 0,function(){i=s=null}))})}function du(r,e){return e===void 0&&(e=ee),y(function(t,n){var i=null,s=null,u=null,o=function(){if(i){i.unsubscribe(),i=null;var a=s;s=null,n.next(a)}};function c(){var a=u+r,l=e.now();if(l<a){i=this.schedule(void 0,a-l),n.add(i);return}o()}t.subscribe(new E(n,function(a){s=a,u=e.now(),i||(i=e.schedule(c,r),n.add(i))},function(){o(),n.complete()},void 0,function(){s=i=null}))})}function et(r){return y(function(e,t){var n=!1;e.subscribe(new E(t,function(i){n=!0,t.next(i)},function(){n||t.next(r),t.complete()}))})}function xe(r){return r<=0?function(){return K}:y(function(e,t){var n=0;e.subscribe(new E(t,function(i){++n<=r&&(t.next(i),r<=n&&t.complete())}))})}function Ar(){return y(function(r,e){r.subscribe(new E(e,O))})}function wr(r){return se(function(){return r})}function Ot(r,e){return e?function(t){return Oe(e.pipe(xe(1),Ar()),t.pipe(Ot(r)))}:Q(function(t,n){return r(t,n).pipe(xe(1),wr(t))})}function pu(r,e){e===void 0&&(e=ee);var t=we(r,e);return Ot(function(){return t})}function vu(){return y(function(r,e){r.subscribe(new E(e,function(t){return Xn(t,e)}))})}function mu(r,e){return y(function(t,n){var i=new Set;t.subscribe(new E(n,function(s){var u=r?r(s):s;i.has(u)||(i.add(u),n.next(s))})),e==null||e.subscribe(new E(n,function(){return i.clear()},O))})}function br(r,e){return e===void 0&&(e=M),r=r!=null?r:Eu,y(function(t,n){var i,s=!0;t.subscribe(new E(n,function(u){var o=e(u);(s||!r(i,o))&&(s=!1,i=o,n.next(u))}))})}function Eu(r,e){return r===e}function gu(r,e){return br(function(t,n){return e?e(t[r],n[r]):t[r]===n[r]})}function tt(r){return r===void 0&&(r=yu),y(function(e,t){var n=!1;e.subscribe(new E(t,function(i){n=!0,t.next(i)},function(){return n?t.complete():t.error(r())}))})}function yu(){return new le}function Au(r,e){if(r<0)throw new Ft;var t=arguments.length>=2;return function(n){return n.pipe(ue(function(i,s){return s===r}),xe(1),t?et(e):tt(function(){return new Ft}))}}function wu(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return function(t){return Oe(t,bt.apply(void 0,S([],T(r))))}}function bu(r,e){return y(function(t,n){var i=0;t.subscribe(new E(n,function(s){r.call(e,s,i++,t)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}function xr(){return y(function(r,e){var t=!1,n=null;r.subscribe(new E(e,function(i){n||(n=R(i).subscribe(new E(e,void 0,function(){n=null,t&&e.complete()})))},function(){t=!0,!n&&e.complete()}))})}var xu=xr;function Fr(r,e){return e?function(t){return t.pipe(Fr(function(n,i){return R(r(n,i)).pipe(se(function(s,u){return e(n,s,i,u)}))}))}:y(function(t,n){var i=0,s=null,u=!1;t.subscribe(new E(n,function(o){s||(s=new E(n,void 0,function(){s=null,u&&n.complete()}),R(r(o,i++)).subscribe(s))},function(){u=!0,!s&&n.complete()}))})}function Fu(r,e,t){return e===void 0&&(e=1/0),e=(e||0)<1?1/0:e,y(function(n,i){return Rt(n,i,r,e,void 0,!0,t)})}function Cu(r){return y(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})}function Ru(r,e){return y(Cr(r,e,"value"))}function Cr(r,e,t){var n=t==="index";return function(i,s){var u=0;i.subscribe(new E(s,function(o){var c=u++;r.call(e,o,c,i)&&(s.next(n?c:o),s.complete())},function(){s.next(n?-1:void 0),s.complete()}))}}function Du(r,e){return y(Cr(r,e,"index"))}function Tu(r,e){var t=arguments.length>=2;return function(n){return n.pipe(r?ue(function(i,s){return r(i,s,n)}):M,xe(1),t?et(e):tt(function(){return new le}))}}function Su(r,e,t,n){return y(function(i,s){var u;!e||typeof e=="function"?u=e:(t=e.duration,u=e.element,n=e.connector);var o=new Map,c=function(f){o.forEach(f),f(s)},a=function(f){return c(function(h){return h.error(f)})},l=new Iu(s,function(f){try{var h=r(f),m=o.get(h);if(!m){o.set(h,m=n?n():new _);var p=d(h,m);if(s.next(p),t){var g=new E(m,function(){m.complete(),g==null||g.unsubscribe()},void 0,void 0,function(){return o.delete(h)});l.add(R(t(p)).subscribe(g))}}m.next(u?u(f):f)}catch(A){a(A)}},function(){return c(function(f){return f.complete()})},a,function(){return o.clear()});i.subscribe(l);function d(f,h){var m=new F(function(p){l.activeGroups++;var g=h.subscribe(p);return function(){g.unsubscribe(),--l.activeGroups===0&&l.teardownAttempted&&l.unsubscribe()}});return m.key=f,m}})}var Iu=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.activeGroups=0,t.teardownAttempted=!1,t}return e.prototype.unsubscribe=function(){this.teardownAttempted=!0,this.activeGroups===0&&r.prototype.unsubscribe.call(this)},e}(E);function Pu(){return y(function(r,e){r.subscribe(new E(e,function(){e.next(!1),e.complete()},function(){e.next(!0),e.complete()}))})}function Rr(r){return r<=0?function(){return K}:y(function(e,t){var n=[];e.subscribe(new E(t,function(i){n.push(i),r<n.length&&n.shift()},function(){var i,s;try{for(var u=V(n),o=u.next();!o.done;o=u.next()){var c=o.value;t.next(c)}}catch(a){i={error:a}}finally{try{o&&!o.done&&(s=u.return)&&s.call(u)}finally{if(i)throw i.error}}t.complete()},void 0,function(){n=null}))})}function Ou(r,e){var t=arguments.length>=2;return function(n){return n.pipe(r?ue(function(i,s){return r(i,s,n)}):M,Rr(1),t?et(e):tt(function(){return new le}))}}function _u(){return y(function(r,e){r.subscribe(new E(e,function(t){e.next(Ke.createNext(t))},function(){e.next(Ke.createComplete()),e.complete()},function(t){e.next(Ke.createError(t)),e.complete()}))})}function ku(r){return ke(w(r)?function(e,t){return r(e,t)>0?e:t}:function(e,t){return e>t?e:t})}var Bu=Q;function Lu(r,e,t){return t===void 0&&(t=1/0),w(e)?Q(function(){return r},e,t):(typeof e=="number"&&(t=e),Q(function(){return r},t))}function Nu(r,e,t){return t===void 0&&(t=1/0),y(function(n,i){var s=e;return Rt(n,i,function(u,o){return r(s,u,o)},t,function(u){s=u},!1,void 0,function(){return s=null})})}function Uu(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=re(r),n=Jn(r,1/0);return r=be(r),y(function(i,s){Ze(n)(Ae(S([i],T(r)),t)).subscribe(s)})}function Mu(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Uu.apply(void 0,S([],T(r)))}function ju(r){return ke(w(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})}function _t(r,e){var t=w(r)?r:function(){return r};return w(e)?Pt(e,{connector:t}):function(n){return new Ve(n,t)}}function Hu(){return y(function(r,e){var t,n=!1;r.subscribe(new E(e,function(i){var s=t;t=i,n&&e.next([s,i]),n=!0}))})}function $u(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=r.length;if(t===0)throw new Error("list of properties cannot be empty.");return se(function(n){for(var i=n,s=0;s<t;s++){var u=i==null?void 0:i[r[s]];if(typeof u<"u")i=u;else return}return i})}function qu(r){return r?function(e){return Pt(r)(e)}:function(e){return _t(new _)(e)}}function Wu(r){return function(e){var t=new Dn(r);return new Ve(e,function(){return t})}}function Gu(){return function(r){var e=new vt;return new Ve(r,function(){return e})}}function Vu(r,e,t,n){t&&!w(t)&&(n=t);var i=w(t)?t:void 0;return function(s){return _t(new pt(r,e,n),i)(s)}}function zu(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?y(function(t,n){hr(S([t],T(r)))(n)}):M}function Ju(r){return r===void 0&&(r=1/0),r<=0?function(){return K}:y(function(e,t){var n=0,i,s=function(){var u=!1;i=e.subscribe(new E(t,void 0,function(){++n<r?i?(i.unsubscribe(),i=null,s()):u=!0:t.complete()})),u&&(i.unsubscribe(),i=null,s())};s()})}function Yu(r){return y(function(e,t){var n,i=!1,s,u=!1,o=!1,c=function(){return o&&u&&(t.complete(),!0)},a=function(){return s||(s=new _,r(s).subscribe(new E(t,function(){n?l():i=!0},function(){u=!0,c()}))),s},l=function(){o=!1,n=e.subscribe(new E(t,void 0,function(){o=!0,!c()&&a().next()})),i&&(n.unsubscribe(),n=null,i=!1,l())};l()})}function Xu(r){r===void 0&&(r=1/0);var e;r&&typeof r=="object"?e=r:e={count:r};var t=e.count,n=t===void 0?1/0:t,i=e.delay,s=e.resetOnSuccess,u=s===void 0?!1:s;return n<=0?M:y(function(o,c){var a=0,l,d=function(){var f=!1;l=o.subscribe(new E(c,function(h){u&&(a=0),c.next(h)},void 0,function(h){if(a++<n){var m=function(){l?(l.unsubscribe(),l=null,d()):f=!0};if(i!=null){var p=typeof i=="number"?we(i):R(i(h,a)),g=new E(c,function(){g.unsubscribe(),m()},function(){c.complete()});p.subscribe(g)}else m()}else c.error(h)})),f&&(l.unsubscribe(),l=null,d())};d()})}function Ku(r){return y(function(e,t){var n,i=!1,s,u=function(){n=e.subscribe(new E(t,void 0,void 0,function(o){s||(s=new _,r(s).subscribe(new E(t,function(){return n?u():i=!0}))),s&&s.next(o)})),i&&(n.unsubscribe(),n=null,i=!1,u())};u()})}function Dr(r){return y(function(e,t){var n=!1,i=null;e.subscribe(new E(t,function(u){n=!0,i=u}));var s=function(){if(n){n=!1;var u=i;i=null,t.next(u)}};r.subscribe(new E(t,s,O))})}function Qu(r,e){return e===void 0&&(e=ee),Dr(lr(r,e))}function Tr(r,e){return y(vr(r,e,arguments.length>=2,!0))}function Zu(r,e){return e===void 0&&(e=function(t,n){return t===n}),y(function(t,n){var i=Sr(),s=Sr(),u=function(c){n.next(c),n.complete()},o=function(c,a){var l=new E(n,function(d){var f=a.buffer,h=a.complete;f.length===0?h?u(!1):c.buffer.push(d):!e(d,f.shift())&&u(!1)},function(){c.complete=!0;var d=a.complete,f=a.buffer;d&&u(f.length===0),l==null||l.unsubscribe()});return l};t.subscribe(o(i,s)),r.subscribe(o(s,i))})}function Sr(){return{buffer:[],complete:!1}}function Ir(r){r===void 0&&(r={});var e=r.connector,t=e===void 0?function(){return new _}:e,n=r.resetOnError,i=n===void 0?!0:n,s=r.resetOnComplete,u=s===void 0?!0:s,o=r.resetOnRefCountZero,c=o===void 0?!0:o;return function(a){var l=null,d=null,f=null,h=0,m=!1,p=!1,g=function(){d==null||d.unsubscribe(),d=null},A=function(){g(),l=f=null,m=p=!1},I=function(){var G=l;A(),G==null||G.unsubscribe()};return y(function(G,B){h++,!p&&!m&&g();var W=f=f!=null?f:t();B.add(function(){h--,h===0&&!p&&!m&&(d=kt(I,c))}),W.subscribe(B),l||(l=new Ge({next:function(X){return W.next(X)},error:function(X){p=!0,g(),d=kt(A,i,X),W.error(X)},complete:function(){m=!0,g(),d=kt(A,u),W.complete()}}),ye(G).subscribe(l))})(a)}}function kt(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return e===!0?(r(),null):e===!1?null:e.apply(void 0,S([],T(t))).pipe(xe(1)).subscribe(function(){return r()})}function eo(r,e,t){var n,i,s,u=!1;return r&&typeof r=="object"?(s=(n=r.bufferSize)!==null&&n!==void 0?n:1/0,e=(i=r.windowTime)!==null&&i!==void 0?i:1/0,u=!!r.refCount,t=r.scheduler):s=r!=null?r:1/0,Ir({connector:function(){return new pt(s,e,t)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:u})}function to(r){return y(function(e,t){var n=!1,i,s=!1,u=0;e.subscribe(new E(t,function(o){s=!0,(!r||r(o,u++,e))&&(n&&t.error(new Qn("Too many matching values")),n=!0,i=o)},function(){n?(t.next(i),t.complete()):t.error(s?new Kn("No matching values"):new le)}))})}function no(r){return ue(function(e,t){return r<=t})}function ro(r){return r<=0?M:y(function(e,t){var n=new Array(r),i=0;return e.subscribe(new E(t,function(s){var u=i++;if(u<r)n[u]=s;else{var o=u%r,c=n[o];n[o]=s,t.next(c)}})),function(){n=null}})}function io(r){return y(function(e,t){var n=!1,i=new E(t,function(){i==null||i.unsubscribe(),n=!0},O);R(r).subscribe(i),e.subscribe(new E(t,function(s){return n&&t.next(s)}))})}function so(r){return y(function(e,t){var n=!1,i=0;e.subscribe(new E(t,function(s){return(n||(n=!r(s,i++)))&&t.next(s)}))})}function uo(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=re(r);return y(function(n,i){(t?Oe(r,n,t):Oe(r,n)).subscribe(i)})}function Be(r,e){return y(function(t,n){var i=null,s=0,u=!1,o=function(){return u&&!i&&n.complete()};t.subscribe(new E(n,function(c){i==null||i.unsubscribe();var a=0,l=s++;R(r(c,l)).subscribe(i=new E(n,function(d){return n.next(e?e(c,d,l,a++):d)},function(){i=null,o()}))},function(){u=!0,o()}))})}function oo(){return Be(M)}function ao(r,e){return w(e)?Be(function(){return r},e):Be(function(){return r})}function co(r,e){return y(function(t,n){var i=e;return Be(function(s,u){return r(i,s,u)},function(s,u){return i=u,u})(t).subscribe(n),function(){i=null}})}function lo(r){return y(function(e,t){R(r).subscribe(new E(t,function(){return t.complete()},O)),!t.closed&&e.subscribe(t)})}function fo(r,e){return e===void 0&&(e=!1),y(function(t,n){var i=0;t.subscribe(new E(n,function(s){var u=r(s,i++);(u||e)&&n.next(s),!u&&n.complete()}))})}function ho(r,e,t){var n=w(r)||e||t?{next:r,error:e,complete:t}:r;return n?y(function(i,s){var u;(u=n.subscribe)===null||u===void 0||u.call(n);var o=!0;i.subscribe(new E(s,function(c){var a;(a=n.next)===null||a===void 0||a.call(n,c),s.next(c)},function(){var c;o=!1,(c=n.complete)===null||c===void 0||c.call(n),s.complete()},function(c){var a;o=!1,(a=n.error)===null||a===void 0||a.call(n,c),s.error(c)},function(){var c,a;o&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(a=n.finalize)===null||a===void 0||a.call(n)}))}):M}var Pr={leading:!0,trailing:!1};function Or(r,e){var t=e===void 0?Pr:e,n=t.leading,i=t.trailing;return y(function(s,u){var o=!1,c=null,a=null,l=!1,d=function(){a==null||a.unsubscribe(),a=null,i&&(m(),l&&u.complete())},f=function(){a=null,l&&u.complete()},h=function(p){return a=R(r(p)).subscribe(new E(u,d,f))},m=function(){if(o){o=!1;var p=c;c=null,u.next(p),!l&&h(p)}};s.subscribe(new E(u,function(p){o=!0,c=p,!(a&&!a.closed)&&(n?m():h(p))},function(){l=!0,!(i&&o&&a&&!a.closed)&&u.complete()}))})}function po(r,e,t){e===void 0&&(e=ee),t===void 0&&(t=Pr);var n=we(r,e);return Or(function(){return n},t)}function vo(r){return r===void 0&&(r=Ie),function(e){return _e(function(){return e.pipe(Tr(function(t,n){var i=t.current;return{value:n,current:r.now(),last:i}},{current:r.now(),value:void 0,last:void 0}),se(function(t){var n=t.current,i=t.last,s=t.value;return new mo(s,n-i)}))})}}var mo=function(){function r(e,t){this.value=e,this.interval=t}return r}();function Eo(r,e,t){var n,i,s;if(t=t!=null?t:Ie,Ct(r)?n=r:typeof r=="number"&&(i=r),e)s=function(){return e};else throw new TypeError("No observable provided to switch to");if(n==null&&i==null)throw new TypeError("No timeout provided.");return er({first:n,each:i,scheduler:t,with:s})}function go(r){return r===void 0&&(r=ze),se(function(e){return{value:e,timestamp:r.now()}})}function yo(r){return y(function(e,t){var n=new _;t.next(n.asObservable());var i=function(s){n.error(s),t.error(s)};return e.subscribe(new E(t,function(s){return n==null?void 0:n.next(s)},function(){n.complete(),t.complete()},i)),r.subscribe(new E(t,function(){n.complete(),t.next(n=new _)},O,i)),function(){n==null||n.unsubscribe(),n=null}})}function Ao(r,e){e===void 0&&(e=0);var t=e>0?e:r;return y(function(n,i){var s=[new _],u=[],o=0;i.next(s[0].asObservable()),n.subscribe(new E(i,function(c){var a,l;try{for(var d=V(s),f=d.next();!f.done;f=d.next()){var h=f.value;h.next(c)}}catch(g){a={error:g}}finally{try{f&&!f.done&&(l=d.return)&&l.call(d)}finally{if(a)throw a.error}}var m=o-r+1;if(m>=0&&m%t===0&&s.shift().complete(),++o%t===0){var p=new _;s.push(p),i.next(p.asObservable())}},function(){for(;s.length>0;)s.shift().complete();i.complete()},function(c){for(;s.length>0;)s.shift().error(c);i.error(c)},function(){u=null,s=null}))})}function wo(r){for(var e,t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(e=re(n))!==null&&e!==void 0?e:ee,u=(t=n[0])!==null&&t!==void 0?t:null,o=n[1]||1/0;return y(function(c,a){var l=[],d=!1,f=function(g){var A=g.window,I=g.subs;A.complete(),I.unsubscribe(),ne(l,g),d&&h()},h=function(){if(l){var g=new U;a.add(g);var A=new _,I={window:A,subs:g,seen:0};l.push(I),a.next(A.asObservable()),g.add(s.schedule(function(){return f(I)},r))}};u!==null&&u>=0?a.add(s.schedule(function(){h(),!this.closed&&a.add(this.schedule(null,u))},u)):d=!0,h();var m=function(g){return l.slice().forEach(g)},p=function(g){m(function(A){var I=A.window;return g(I)}),g(a),a.unsubscribe()};return c.subscribe(new E(a,function(g){m(function(A){A.window.next(g),o<=++A.seen&&f(A)})},function(){return p(function(g){return g.complete()})},function(g){return p(function(A){return A.error(g)})})),function(){l=null}})}function bo(r,e){return y(function(t,n){var i=[],s=function(u){for(;0<i.length;)i.shift().error(u);n.error(u)};R(r).subscribe(new E(n,function(u){var o=new _;i.push(o);var c=new U,a=function(){ne(i,o),o.complete(),c.unsubscribe()},l;try{l=R(e(u))}catch(d){s(d);return}n.next(o.asObservable()),c.add(l.subscribe(new E(n,a,O,s)))},O)),t.subscribe(new E(n,function(u){var o,c,a=i.slice();try{for(var l=V(a),d=l.next();!d.done;d=l.next()){var f=d.value;f.next(u)}}catch(h){o={error:h}}finally{try{d&&!d.done&&(c=l.return)&&c.call(l)}finally{if(o)throw o.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},s,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}function xo(r){return y(function(e,t){var n,i,s=function(o){n.error(o),t.error(o)},u=function(){i==null||i.unsubscribe(),n==null||n.complete(),n=new _,t.next(n.asObservable());var o;try{o=R(r())}catch(c){s(c);return}o.subscribe(i=new E(t,u,u,s))};u(),e.subscribe(new E(t,function(o){return n.next(o)},function(){n.complete(),t.complete()},s,function(){i==null||i.unsubscribe(),n=null}))})}function Fo(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Pe(r);return y(function(n,i){for(var s=r.length,u=new Array(s),o=r.map(function(){return!1}),c=!1,a=function(d){R(r[d]).subscribe(new E(i,function(f){u[d]=f,!c&&!o[d]&&(o[d]=!0,(c=o.every(M))&&(o=null))},O))},l=0;l<s;l++)a(l);n.subscribe(new E(i,function(d){if(c){var f=S([d],T(u));i.next(t?t.apply(void 0,S([],T(f))):f)}}))})}function Co(r){return Er(St,r)}function Ro(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return y(function(t,n){St.apply(void 0,S([t],T(r))).subscribe(n)})}function Do(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Ro.apply(void 0,S([],T(r)))}const To=Object.freeze(Object.defineProperty({__proto__:null,Observable:F,ConnectableObservable:Ve,observable:De,animationFrames:qi,Subject:_,BehaviorSubject:Dn,ReplaySubject:pt,AsyncSubject:vt,asap:Ki,asapScheduler:In,async:Ie,asyncScheduler:ee,queue:es,queueScheduler:Pn,animationFrame:rs,animationFrameScheduler:On,VirtualTimeScheduler:is,VirtualAction:_n,Scheduler:gt,Subscription:U,Subscriber:We,Notification:Ke,get NotificationKind(){return xt},pipe:dt,noop:O,identity:M,isObservable:ms,lastValueFrom:Es,firstValueFrom:gs,ArgumentOutOfRangeError:Ft,EmptyError:le,NotFoundError:Kn,ObjectUnsubscribedError:Cn,SequenceError:Qn,TimeoutError:Zn,UnsubscriptionError:He,bindCallback:bs,bindNodeCallback:xs,combineLatest:sr,concat:Oe,connectable:Is,defer:_e,empty:ss,forkJoin:Ps,from:ye,fromEvent:Tt,fromEventPattern:cr,generate:Us,iif:Ms,interval:lr,merge:js,never:Hs,of:bt,onErrorResumeNext:Ws,pairs:Gs,partition:zs,race:Js,range:Ys,throwError:Yn,timer:we,using:Xs,zip:St,scheduled:Gn,EMPTY:K,NEVER:fr,config:ie,audit:dr,auditTime:Ks,buffer:Qs,bufferCount:Zs,bufferTime:eu,bufferToggle:tu,bufferWhen:nu,catchError:pr,combineAll:iu,combineLatestAll:gr,combineLatestWith:su,concatAll:Dt,concatMap:It,concatMapTo:uu,concatWith:au,connect:Pt,count:fu,debounce:hu,debounceTime:du,defaultIfEmpty:et,delay:pu,delayWhen:Ot,dematerialize:vu,distinct:mu,distinctUntilChanged:br,distinctUntilKeyChanged:gu,elementAt:Au,endWith:wu,every:bu,exhaust:xu,exhaustAll:xr,exhaustMap:Fr,expand:Fu,filter:ue,finalize:Cu,find:Ru,findIndex:Du,first:Tu,groupBy:Su,ignoreElements:Ar,isEmpty:Pu,last:Ou,map:se,mapTo:wr,materialize:_u,max:ku,mergeAll:Ze,flatMap:Bu,mergeMap:Q,mergeMapTo:Lu,mergeScan:Nu,mergeWith:Mu,min:ju,multicast:_t,observeOn:nr,pairwise:Hu,pluck:$u,publish:qu,publishBehavior:Wu,publishLast:Gu,publishReplay:Vu,raceWith:zu,reduce:ke,repeat:Ju,repeatWhen:Yu,retry:Xu,retryWhen:Ku,refCount:bn,sample:Dr,sampleTime:Qu,scan:Tr,sequenceEqual:Zu,share:Ir,shareReplay:eo,single:to,skip:no,skipLast:ro,skipUntil:io,skipWhile:so,startWith:uo,subscribeOn:tr,switchAll:oo,switchMap:Be,switchMapTo:ao,switchScan:co,take:xe,takeLast:Rr,takeUntil:lo,takeWhile:fo,tap:ho,throttle:Or,throttleTime:po,throwIfEmpty:tt,timeInterval:vo,timeout:er,timeoutWith:Eo,timestamp:go,toArray:mr,window:yo,windowCount:Ao,windowTime:wo,windowToggle:bo,windowWhen:xo,withLatestFrom:Fo,zipAll:Co,zipWith:Do},Symbol.toStringTag,{value:"Module"}));class So{constructor(){v(this,"agents",{});v(this,"comm",new _)}setAgentFor(e,t,n){let i=this.getActionMapping(e);i[t]=n}getAgentFor(e,t){return this.getActionMapping(e)[t]}publish(e,t,n){return Promise.resolve().then(()=>{var i;return(i=this.getAgentFor(e,t))!=null?i:_r.requestAgentFor(e,t)}).then(i=>{const s=i.activate(e,t,n);return this.comm.next({res:e,action:t,input:n,output:s}),s})}subscribe(e,t){return this.comm.asObservable().pipe(ue(n=>n.res===e&&n.action===t))}getActionMapping(e){let t=this.agents[e];if(typeof t>"u"){t={};for(let n of Object.values(D))t[n]=null;this.agents[e]=t}return t}}class Bt{static get instance(){return this._instance=this._instance||new So}}v(Bt,"_instance");const P=class{constructor(e){v(this,"managedResource");v(this,"handlerFor",{comment:P.defaultHandler,copy:P.defaultHandler,create:P.defaultHandler,delete:P.defaultHandler,export:P.defaultHandler,initialize:P.defaultHandler,manage:P.defaultHandler,properties:P.defaultHandler,move:P.defaultHandler,open:P.defaultHandler,print:P.defaultHandler,publish:P.defaultHandler,search:P.defaultHandler,share:P.defaultHandler,distribute:P.defaultHandler,pages_list:P.defaultHandler,register:P.defaultHandler,trash:P.defaultHandler,publish_moodle:P.defaultHandler,restore:P.defaultHandler});this.managedResource=e,this.initialize()}initialize(){for(let e in Object.values(D))this.handlerFor[e]=P.defaultHandler;this.registerHandlers()}setHandler(e,t){Bt.instance.setAgentFor(this.managedResource,e,this),this.handlerFor[e]=t}getHandler(e){return this.handlerFor[e]}activate(e,t,n){return Promise.resolve().then(()=>this.getHandler(t).bind(this)(n))}};let Le=P;v(Le,"defaultHandler",function(e){throw new Error(C.NOT_SUPPORTED)}),console.log("Blog agent loading....");class Io extends Le{constructor(){super(z.BLOG);v(this,"ctx",null);v(this,"http",sn.instance().newHttpInstance());v(this,"checkHttpResponse",t=>{if(this.http.latestResponse.status>=300)throw this.http.latestResponse.statusText;return t});this.registerHandlers(),console.log("Blog agent initialized!")}registerHandlers(){this.setHandler(D.OPEN,this.openBlog),this.setHandler(D.CREATE,this.createBlog),this.setHandler(D.MANAGE,this.onManage),this.setHandler(D.UPD_PROPS,this.onUpdateProps),this.setHandler(D.PRINT,this.onPrint),this.setHandler(D.PUBLISH,this.onPublish)}onPrint(t){window.open(`/blog/print/blog#/print/${t.resourceId}?comments=${t.withComments||!0}`,"_blank")}openBlog(t){window.open(`/blog#/view/${t.resourceId}`,"_self")}createBlog(t){window.open("/blog#/edit/new","_self")}onManage(t){const n={genericProps:[{key:he.TITLE},{key:he.IMAGE},{key:he.URL}]};return Promise.resolve().then(()=>n)}onUpdateProps(t){const n={resources:t.resources};return alert("TODO: update properties"),Promise.resolve().then(()=>n)}async onPublish(t){const n=new FormData;return n.append("title",t.title),n.append("cover",t.cover),n.append("coverName",t.cover.name),n.append("coverType",t.cover.type),n.append("teacherAvatar",t.teacherAvatar),n.append("teacherAvatarName",t.teacherAvatar.name||`teacherAvatar_${t.userId}`),n.append("teacherAvatarType",t.teacherAvatar.type),n.append("language",t.language),t.activityType.forEach(s=>{n.append("activityType[]",s)}),t.subjectArea.forEach(s=>{n.append("subjectArea[]",s)}),t.age.forEach(s=>{n.append("age[]",s.toString())}),n.append("description",t.description),t.keyWords.split(",").forEach(s=>{n.append("keyWords[]",s.trim())}),n.append("licence",t.licence),n.append("pdfUri",`${window.location.origin}/blog/print/blog#/print/${t.resourceId}`),n.append("application",t.application?t.application:""),n.append("resourceId",t.resourceId),n.append("teacherSchool",t.userStructureName),this.http.post("/appregistry/library/resource",n,{headers:{"Content-Type":"multipart/form-data"}}).then(this.checkHttpResponse)}}const Po=()=>new Io;class Oo extends Le{constructor(){super(z.FOLDER);v(this,"ctx",null);v(this,"http",sn.instance().newHttpInstance({paramsSerializer:function(t){return Object.entries(t).map(n=>n[1]instanceof Array?n[1].map(i=>`${n[0]}=${encodeURIComponent(i)}`).join("&"):["string","number","boolean"].indexOf(typeof n[1])>=0?`${n[0]}=${encodeURIComponent(n[1])}`:"").join("&")}}));v(this,"checkHttpResponse",t=>{if(this.http.latestResponse.status>=300)throw this.http.latestResponse.statusText;return t});this.registerHandlers()}registerHandlers(){this.setHandler(D.INITIALIZE,this.createContext),this.setHandler(D.SEARCH,this.searchContext),this.setHandler(D.CREATE,this.createFolder),this.setHandler(D.OPEN,this.listSubfolders),this.setHandler(D.MOVE,this.moveToFolder),this.setHandler(D.DELETE,this.deleteFolders),this.setHandler(D.TRASH,this.trashFolders),this.setHandler(D.MANAGE,this.onManage),this.setHandler(D.UPD_PROPS,this.updateFolder)}createContext(t){return this.http.get("/explorer/context",{queryParams:this.toQueryParams(t)}).then(this.checkHttpResponse)}searchContext(t){return this.http.get("/explorer/resources",{queryParams:this.toQueryParams(t)}).then(this.checkHttpResponse)}createFolder(t){return this.http.post("/explorer/folders",this.createFolderToBodyParams(t)).then(this.checkHttpResponse)}updateFolder(t){return this.http.put(`/explorer/folders/${t.folderId}`,this.createFolderToBodyParams(t)).then(this.checkHttpResponse)}moveToFolder(t){return this.http.post(`/explorer/folders/${t.folderId}/move`,this.moveToBodyParams(t)).then(this.checkHttpResponse)}listSubfolders(t){return this.http.get(`/explorer/folders/${t}/move`).then(this.checkHttpResponse)}deleteFolders(t){return this.http.deleteJson("/explorer",t).then(this.checkHttpResponse)}trashFolders({trash:t,resourceType:n,...i}){return this.http.putJson(`/explorer/${t?"trash":"restore"}`,i).then(this.checkHttpResponse)}onManage(t){const n={genericProps:[{key:he.TITLE},{key:he.IMAGE},{key:he.URL}]};return Promise.resolve().then(()=>n)}toQueryParams(t){let n={application:t.app,start_idx:t.pagination.startIdx,page_size:t.pagination.pageSize,resource_type:t.types};return t.orders&&(n.order_by=Object.entries(t.orders).map(i=>`${i[0]}:${i[1]}`)),t.filters&&Object.assign(n,t.filters),typeof t.search=="string"&&(n.search=t.search),n}createFolderToBodyParams(t){return{application:t.app,resourceType:t.type,parentId:t.parentId,name:t.name}}moveToBodyParams(t){return{application:t.application,resourceType:this.managedResource,resourceIds:t.resourceIds,folderIds:t.folderIds}}}const _o=()=>new Oo;class ko{load(e){let t=Br[e];if(typeof t!="string")throw new Error(`The resource type ${e} is not supported yet.`);switch(t){case H.EXPLORER:_o();break;case H.BLOG:Po();break;default:throw new Error(`The resource type ${e} is not supported yet.`)}return Promise.resolve()}}class Bo{constructor(e,t){v(this,"searchParameters");v(this,"context");v(this,"bus");v(this,"latestResults",new _);this.context=null,this.bus=kr.instance().getBus(),this.searchParameters={types:e,app:t,filters:{},pagination:{startIdx:0,pageSize:20}}}clear(){this.searchParameters.filters={owner:!0,shared:!0,public:!0},this.searchParameters.pagination.startIdx=0,this.searchParameters.pagination.pageSize=20,this.context=null}isInitialized(){return this.context!==null}getContext(){if(this.context!==null)return this.context}getSearchParameters(){return this.searchParameters}duplicateSearchParameters(){return JSON.parse(JSON.stringify(this.searchParameters))}latestResources(){return this.latestResults.asObservable()}initialize(){const e=this.duplicateSearchParameters();return Promise.resolve().then(()=>this.bus.publish(z.FOLDER,D.INITIALIZE,e)).then(t=>{if(this.context=t,!this.context)throw new Error(C.UNKNOWN);return this.latestResults.next({input:e,output:this.context}),this.context})}getResources(){const e=this.duplicateSearchParameters();return this.bus.publish(z.FOLDER,D.SEARCH,e).then(t=>{let n=t;if(!n)throw new Error(C.UNKNOWN);return this.latestResults.next({input:e,output:n}),n})}getSubFolders(e){throw new Error("Method not implemented.")}createFolder(e,t,n){const i={app:this.searchParameters.app,name:n,parentId:t,type:e};return this.bus.publish(z.FOLDER,D.CREATE,i).then(s=>{let u=s;if(!u)throw new Error(C.UNKNOWN);return u})}updateFolder(e,t,n,i){const s={folderId:e,app:this.searchParameters.app,name:i,parentId:n,type:t};return this.bus.publish(z.FOLDER,D.UPD_PROPS,s).then(u=>{let o=u;if(!o)throw new Error(C.UNKNOWN);return o})}copy(e,t,n){const i={application:this.searchParameters.app,folderId:e,resourceIds:t,folderIds:n};return this.bus.publish(z.FOLDER,D.COPY,i).then(s=>{})}move(e,t,n){const i={application:this.searchParameters.app,folderId:e,resourceIds:t,folderIds:n};return this.bus.publish(z.FOLDER,D.MOVE,i).then(s=>{})}delete(e,t){const n={application:this.searchParameters.app,resourceType:this.searchParameters.types[0],resourceIds:e,folderIds:t};return this.bus.publish(z.FOLDER,D.DELETE,n).then(i=>{})}trash(e,t,n){const i={trash:e,application:this.searchParameters.app,resourceType:this.searchParameters.types[0],resourceIds:t,folderIds:n};return this.bus.publish(z.FOLDER,D.TRASH,i).then(s=>{})}manageProperties(e,t){const n={resources:t};return this.bus.publish(e,D.MANAGE,n).then(i=>{let s=i;if(!s)throw new Error(C.UNKNOWN);return s})}updateProperties(e,t,n){const i={resources:t,props:n};return this.bus.publish(e,D.UPD_PROPS,i).then(s=>{let u=s;if(!u)throw new Error(C.UNKNOWN);return u})}publish(e,t){return this.bus.publish(e,D.PUBLISH,t).then(n=>{let i=n;if(!i)throw new Error(C.UNKNOWN);return i})}}class Lo{constructor(){v(this,"_agentLoader")}get agentLoader(){return this._agentLoader||(this._agentLoader=new ko),this._agentLoader}setAgentLoader(e){e&&(this._agentLoader=e)}requestAgentFor(e,t){return this.agentLoader.load(e).then(()=>{let n=this.getBus().getAgentFor(e,t);if(!n)throw new Error(C.AGENT_NOT_FOUND);return n})}createContext(e,t){return new Bo(e,t)}getBus(){return Bt.instance}}const _r=new Lo;class kr{static instance(){return _r}}const z={FOLDER:"folder",BLOG:"blog",EXERCISE:"exercise"},Br={folder:H.EXPLORER,blog:H.BLOG,exercise:H.EXERCIZER},D={INITIALIZE:"initialize",SEARCH:"search",CREATE:"create",OPEN:"open",MANAGE:"manage",UPD_PROPS:"properties",COMMENT:"comment",DELETE:"delete",TRASH:"trash",RESTORE:"restore",MOVE:"move",COPY:"copy",EXPORT:"export",SHARE:"share",PRINT:"print",PAGES_LIST:"pages_list",DISTRIBUTE:"distribute",REGISTER:"register",PUBLISH:"publish",PUBLISH_MOODLE:"publish_moodle"},No={BIN:"bin",DEFAULT:"default"},Uo={OWNER:"owner",SHARED:"shared",PUBLIC:"public",FAVORITE:"favorite"},Mo={},jo={ASC:"asc",DESC:"desc"},Ho={NAME:"name",MODIFY_DATE:"updatedAt",CREATEDAT:"createdAt",APPLICATION:"application",RESOURCE_TYPE:"resourceType"},he={TITLE:"title",IMAGE:"image",COLOR:"color",DESCRIPTION:"description",URL:"url"},$o={READONLY:"RO",READWRITE:"RW"},qo={TEXT:"text",NUMBER:"number",DATE:"date",IMAGE:"image"},Wo={PLAIN:"plain"},nt={SESSION_READY:"sessionReady",LANG_READY:"langReady",SKIN_READY:"skinReady",OVERRIDE_READY:"overrideReady"};class Ne{constructor(){v(this,"_resolution");v(this,"_rejection");v(this,"_promise",new Promise((e,t)=>{this._resolution=e,this._rejection=t}))}get promise(){return this._promise}resolve(e){this._resolution&&this._resolution(e)}reject(e){this._rejection&&this._rejection(e)}}class Go{constructor(){v(this,"promises",{});v(this,"subject",new _)}asyncData(e){return typeof this.promises[e]>"u"&&(this.promises[e]=new Ne),this.promises[e]}onSessionReady(){return this.asyncData(nt.SESSION_READY)}onLangReady(){return this.asyncData(nt.LANG_READY)}onSkinReady(){return this.asyncData(nt.SKIN_READY)}onOverridesReady(){return this.asyncData(nt.OVERRIDE_READY)}promisify(){return new Ne}events(){return this.subject}}const N=new Go;class Vo{static instance(){return N}}const Lr={WIDGETS:"widgets",EXPLORER:"explorer"},Nr={USERPREF_CHANGED:"userprefChanged",SEARCH_RESULTED:"searchResulted"};function zo(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Ur={exports:{}},Lt={exports:{}},Mr=function(e,t){return function(){for(var i=new Array(arguments.length),s=0;s<i.length;s++)i[s]=arguments[s];return e.apply(t,i)}},Jo=Mr,de=Object.prototype.toString;function Nt(r){return de.call(r)==="[object Array]"}function Ut(r){return typeof r>"u"}function Yo(r){return r!==null&&!Ut(r)&&r.constructor!==null&&!Ut(r.constructor)&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function Xo(r){return de.call(r)==="[object ArrayBuffer]"}function Ko(r){return typeof FormData<"u"&&r instanceof FormData}function Qo(r){var e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(r):e=r&&r.buffer&&r.buffer instanceof ArrayBuffer,e}function Zo(r){return typeof r=="string"}function ea(r){return typeof r=="number"}function jr(r){return r!==null&&typeof r=="object"}function rt(r){if(de.call(r)!=="[object Object]")return!1;var e=Object.getPrototypeOf(r);return e===null||e===Object.prototype}function ta(r){return de.call(r)==="[object Date]"}function na(r){return de.call(r)==="[object File]"}function ra(r){return de.call(r)==="[object Blob]"}function Hr(r){return de.call(r)==="[object Function]"}function ia(r){return jr(r)&&Hr(r.pipe)}function sa(r){return typeof URLSearchParams<"u"&&r instanceof URLSearchParams}function ua(r){return r.replace(/^\s*/,"").replace(/\s*$/,"")}function oa(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Mt(r,e){if(!(r===null||typeof r>"u"))if(typeof r!="object"&&(r=[r]),Nt(r))for(var t=0,n=r.length;t<n;t++)e.call(null,r[t],t,r);else for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.call(null,r[i],i,r)}function jt(){var r={};function e(i,s){rt(r[s])&&rt(i)?r[s]=jt(r[s],i):rt(i)?r[s]=jt({},i):Nt(i)?r[s]=i.slice():r[s]=i}for(var t=0,n=arguments.length;t<n;t++)Mt(arguments[t],e);return r}function aa(r,e,t){return Mt(e,function(i,s){t&&typeof i=="function"?r[s]=Jo(i,t):r[s]=i}),r}function ca(r){return r.charCodeAt(0)===65279&&(r=r.slice(1)),r}var Y={isArray:Nt,isArrayBuffer:Xo,isBuffer:Yo,isFormData:Ko,isArrayBufferView:Qo,isString:Zo,isNumber:ea,isObject:jr,isPlainObject:rt,isUndefined:Ut,isDate:ta,isFile:na,isBlob:ra,isFunction:Hr,isStream:ia,isURLSearchParams:sa,isStandardBrowserEnv:oa,forEach:Mt,merge:jt,extend:aa,trim:ua,stripBOM:ca},Fe=Y;function $r(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var qr=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(Fe.isURLSearchParams(t))i=t.toString();else{var s=[];Fe.forEach(t,function(c,a){c===null||typeof c>"u"||(Fe.isArray(c)?a=a+"[]":c=[c],Fe.forEach(c,function(d){Fe.isDate(d)?d=d.toISOString():Fe.isObject(d)&&(d=JSON.stringify(d)),s.push($r(a)+"="+$r(d))}))}),i=s.join("&")}if(i){var u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e},la=Y;function it(){this.handlers=[]}it.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},it.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},it.prototype.forEach=function(e){la.forEach(this.handlers,function(n){n!==null&&e(n)})};var fa=it,ha=Y,da=function(e,t,n){return ha.forEach(n,function(s){e=s(e,t)}),e},Ht,Wr;function Gr(){return Wr||(Wr=1,Ht=function(e){return!!(e&&e.__CANCEL__)}),Ht}var pa=Y,va=function(e,t){pa.forEach(e,function(i,s){s!==t&&s.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[s])})},$t,Vr;function ma(){return Vr||(Vr=1,$t=function(e,t,n,i,s){return e.config=t,n&&(e.code=n),e.request=i,e.response=s,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}),$t}var qt,zr;function Jr(){if(zr)return qt;zr=1;var r=ma();return qt=function(t,n,i,s,u){var o=new Error(t);return r(o,n,i,s,u)},qt}var Wt,Yr;function Ea(){if(Yr)return Wt;Yr=1;var r=Jr();return Wt=function(t,n,i){var s=i.config.validateStatus;!i.status||!s||s(i.status)?t(i):n(r("Request failed with status code "+i.status,i.config,null,i.request,i))},Wt}var Gt,Xr;function ga(){if(Xr)return Gt;Xr=1;var r=Y;return Gt=r.isStandardBrowserEnv()?function(){return{write:function(n,i,s,u,o,c){var a=[];a.push(n+"="+encodeURIComponent(i)),r.isNumber(s)&&a.push("expires="+new Date(s).toGMTString()),r.isString(u)&&a.push("path="+u),r.isString(o)&&a.push("domain="+o),c===!0&&a.push("secure"),document.cookie=a.join("; ")},read:function(n){var i=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Gt}var Vt,Kr;function ya(){return Kr||(Kr=1,Vt=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}),Vt}var zt,Qr;function Aa(){return Qr||(Qr=1,zt=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}),zt}var Jt,Zr;function wa(){if(Zr)return Jt;Zr=1;var r=ya(),e=Aa();return Jt=function(n,i){return n&&!r(i)?e(n,i):i},Jt}var Yt,ei;function ba(){if(ei)return Yt;ei=1;var r=Y,e=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Yt=function(n){var i={},s,u,o;return n&&r.forEach(n.split(`
17
+ `),function(a){if(o=a.indexOf(":"),s=r.trim(a.substr(0,o)).toLowerCase(),u=r.trim(a.substr(o+1)),s){if(i[s]&&e.indexOf(s)>=0)return;s==="set-cookie"?i[s]=(i[s]?i[s]:[]).concat([u]):i[s]=i[s]?i[s]+", "+u:u}}),i},Yt}var Xt,ti;function xa(){if(ti)return Xt;ti=1;var r=Y;return Xt=r.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),i;function s(u){var o=u;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=s(window.location.href),function(o){var c=r.isString(o)?s(o):o;return c.protocol===i.protocol&&c.host===i.host}}():function(){return function(){return!0}}(),Xt}var Kt,ni;function ri(){if(ni)return Kt;ni=1;var r=Y,e=Ea(),t=ga(),n=qr,i=wa(),s=ba(),u=xa(),o=Jr();return Kt=function(a){return new Promise(function(d,f){var h=a.data,m=a.headers;r.isFormData(h)&&delete m["Content-Type"];var p=new XMLHttpRequest;if(a.auth){var g=a.auth.username||"",A=a.auth.password?unescape(encodeURIComponent(a.auth.password)):"";m.Authorization="Basic "+btoa(g+":"+A)}var I=i(a.baseURL,a.url);if(p.open(a.method.toUpperCase(),n(I,a.params,a.paramsSerializer),!0),p.timeout=a.timeout,p.onreadystatechange=function(){if(!(!p||p.readyState!==4)&&!(p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0))){var W="getAllResponseHeaders"in p?s(p.getAllResponseHeaders()):null,X=!a.responseType||a.responseType==="text"?p.responseText:p.response,dn={data:X,status:p.status,statusText:p.statusText,headers:W,config:a,request:p};e(d,f,dn),p=null}},p.onabort=function(){!p||(f(o("Request aborted",a,"ECONNABORTED",p)),p=null)},p.onerror=function(){f(o("Network Error",a,null,p)),p=null},p.ontimeout=function(){var W="timeout of "+a.timeout+"ms exceeded";a.timeoutErrorMessage&&(W=a.timeoutErrorMessage),f(o(W,a,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var G=(a.withCredentials||u(I))&&a.xsrfCookieName?t.read(a.xsrfCookieName):void 0;G&&(m[a.xsrfHeaderName]=G)}if("setRequestHeader"in p&&r.forEach(m,function(W,X){typeof h>"u"&&X.toLowerCase()==="content-type"?delete m[X]:p.setRequestHeader(X,W)}),r.isUndefined(a.withCredentials)||(p.withCredentials=!!a.withCredentials),a.responseType)try{p.responseType=a.responseType}catch(B){if(a.responseType!=="json")throw B}typeof a.onDownloadProgress=="function"&&p.addEventListener("progress",a.onDownloadProgress),typeof a.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",a.onUploadProgress),a.cancelToken&&a.cancelToken.promise.then(function(W){!p||(p.abort(),f(W),p=null)}),h||(h=null),p.send(h)})},Kt}var J=Y,ii=va,Fa={"Content-Type":"application/x-www-form-urlencoded"};function si(r,e){!J.isUndefined(r)&&J.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e)}function Ca(){var r;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(r=ri()),r}var st={adapter:Ca(),transformRequest:[function(e,t){return ii(t,"Accept"),ii(t,"Content-Type"),J.isFormData(e)||J.isArrayBuffer(e)||J.isBuffer(e)||J.isStream(e)||J.isFile(e)||J.isBlob(e)?e:J.isArrayBufferView(e)?e.buffer:J.isURLSearchParams(e)?(si(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):J.isObject(e)?(si(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if(typeof e=="string")try{e=JSON.parse(e)}catch{}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300}};st.headers={common:{Accept:"application/json, text/plain, */*"}},J.forEach(["delete","get","head"],function(e){st.headers[e]={}}),J.forEach(["post","put","patch"],function(e){st.headers[e]=J.merge(Fa)});var ui=st,oi=Y,Qt=da,Ra=Gr(),Da=ui;function Zt(r){r.cancelToken&&r.cancelToken.throwIfRequested()}var Ta=function(e){Zt(e),e.headers=e.headers||{},e.data=Qt(e.data,e.headers,e.transformRequest),e.headers=oi.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),oi.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var t=e.adapter||Da.adapter;return t(e).then(function(i){return Zt(e),i.data=Qt(i.data,i.headers,e.transformResponse),i},function(i){return Ra(i)||(Zt(e),i&&i.response&&(i.response.data=Qt(i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})},$=Y,ai=function(e,t){t=t||{};var n={},i=["url","method","data"],s=["headers","auth","proxy","params"],u=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],o=["validateStatus"];function c(f,h){return $.isPlainObject(f)&&$.isPlainObject(h)?$.merge(f,h):$.isPlainObject(h)?$.merge({},h):$.isArray(h)?h.slice():h}function a(f){$.isUndefined(t[f])?$.isUndefined(e[f])||(n[f]=c(void 0,e[f])):n[f]=c(e[f],t[f])}$.forEach(i,function(h){$.isUndefined(t[h])||(n[h]=c(void 0,t[h]))}),$.forEach(s,a),$.forEach(u,function(h){$.isUndefined(t[h])?$.isUndefined(e[h])||(n[h]=c(void 0,e[h])):n[h]=c(void 0,t[h])}),$.forEach(o,function(h){h in t?n[h]=c(e[h],t[h]):h in e&&(n[h]=c(void 0,e[h]))});var l=i.concat(s).concat(u).concat(o),d=Object.keys(e).concat(Object.keys(t)).filter(function(h){return l.indexOf(h)===-1});return $.forEach(d,a),n},ci=Y,Sa=qr,li=fa,Ia=Ta,ut=ai;function Ue(r){this.defaults=r,this.interceptors={request:new li,response:new li}}Ue.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=ut(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[Ia,void 0],n=Promise.resolve(e);for(this.interceptors.request.forEach(function(s){t.unshift(s.fulfilled,s.rejected)}),this.interceptors.response.forEach(function(s){t.push(s.fulfilled,s.rejected)});t.length;)n=n.then(t.shift(),t.shift());return n},Ue.prototype.getUri=function(e){return e=ut(this.defaults,e),Sa(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},ci.forEach(["delete","get","head","options"],function(e){Ue.prototype[e]=function(t,n){return this.request(ut(n||{},{method:e,url:t,data:(n||{}).data}))}}),ci.forEach(["post","put","patch"],function(e){Ue.prototype[e]=function(t,n,i){return this.request(ut(i||{},{method:e,url:t,data:n}))}});var Pa=Ue,en,fi;function hi(){if(fi)return en;fi=1;function r(e){this.message=e}return r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,en=r,en}var tn,di;function Oa(){if(di)return tn;di=1;var r=hi();function e(t){if(typeof t!="function")throw new TypeError("executor must be a function.");var n;this.promise=new Promise(function(u){n=u});var i=this;t(function(u){i.reason||(i.reason=new r(u),n(i.reason))})}return e.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},e.source=function(){var n,i=new e(function(u){n=u});return{token:i,cancel:n}},tn=e,tn}var nn,pi;function _a(){return pi||(pi=1,nn=function(e){return function(n){return e.apply(null,n)}}),nn}var rn,vi;function ka(){return vi||(vi=1,rn=function(e){return typeof e=="object"&&e.isAxiosError===!0}),rn}var mi=Y,Ba=Mr,ot=Pa,La=ai,Na=ui;function Ei(r){var e=new ot(r),t=Ba(ot.prototype.request,e);return mi.extend(t,ot.prototype,e),mi.extend(t,e),t}var Z=Ei(Na);Z.Axios=ot,Z.create=function(e){return Ei(La(Z.defaults,e))},Z.Cancel=hi(),Z.CancelToken=Oa(),Z.isCancel=Gr(),Z.all=function(e){return Promise.all(e)},Z.spread=_a(),Z.isAxiosError=ka(),Lt.exports=Z,Lt.exports.default=Z,function(r){r.exports=Lt.exports}(Ur);const gi=zo(Ur.exports),yi={};class Ai{constructor(e){v(this,"axios");v(this,"_latestResponse");this.axios=gi.create(e)}setCdn(e){e&&XMLHttpRequest&&!XMLHttpRequest.prototype.cdnUrl&&(XMLHttpRequest.prototype.cdnUrl=e,XMLHttpRequest.prototype.baseOpen=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(){const t=arguments[1];return t.startsWith("/infra/public")&&(arguments[1]=e+t),/^\/([^\/]*)\/public/.test(t)&&(arguments[1]=e+t),t.startsWith("/assets")&&(arguments[1]=e+t),t=="/conf/public"&&(arguments[1]=t),t.startsWith("http")&&(arguments[1]=t),this.baseOpen.apply(this,arguments)})}toAxiosConfig(e){if(e){const t=Object.assign({},this.axios.defaults);return e.headers&&(t.headers&&(t.headers=Object.assign({},this.axios.defaults.headers)),Object.assign(t.headers,e.headers)),e.responseType&&(t.responseType=e.responseType),e.queryParams&&(t.params=Object.assign({},e.queryParams)),t}else return this.axios.defaults}toCdnUrl(e){const t=on.instance().Platform.cdnDomain;if((t==null?void 0:t.length)>0&&e!=="/conf/public"){const n=""+e;(n.startsWith("/infra/public")||n.startsWith("/assets")||/^\/([^\/]*)\/public/.test(n))&&(e=t+n)}return e}mapAxiosError(e,t){return e.response?this._latestResponse=e.response:e.request?this._latestResponse={status:408,statusText:C.TIME_OUT}:this._latestResponse={status:500,statusText:C.UNKNOWN},!t||t.disableNotifications,this._latestResponse}mapAxiosResponse(e,t){return this._latestResponse=e,e.data}get latestResponse(){return this._latestResponse}get(e,t){return this.axios.get(this.toCdnUrl(e),this.toAxiosConfig(t)).then(n=>this.mapAxiosResponse(n,t)).catch(n=>this.mapAxiosError(n,t))}post(e,t,n){return this.axios.post(e,t,this.toAxiosConfig(n)).then(i=>this.mapAxiosResponse(i,n)).catch(i=>this.mapAxiosError(i,n))}postFile(e,t,n){const i=this.toAxiosConfig(n);return i.headers&&i.headers["Content-Type"]&&delete i.headers["Content-Type"],this.axios.post(e,t,i).then(s=>this.mapAxiosResponse(s,n)).catch(s=>this.mapAxiosError(s,n))}postJson(e,t,n){const i=this.toAxiosConfig();return i.headers&&(i.headers["Content-Type"]="application/json"),this.axios.post(e,t,this.toAxiosConfig(n)).then(s=>this.mapAxiosResponse(s,n)).catch(s=>this.mapAxiosError(s,n))}put(e,t,n){return this.axios.put(e,t,this.toAxiosConfig(n)).then(i=>this.mapAxiosResponse(i,n)).catch(i=>this.mapAxiosError(i,n))}putJson(e,t,n){const i=this.toAxiosConfig(n);return i.headers&&(i.headers["Content-Type"]="application/json"),this.axios.put(e,t,i).then(s=>this.mapAxiosResponse(s,n)).catch(s=>this.mapAxiosError(s,n))}delete(e,t){return this.axios.delete(e,this.toAxiosConfig(t)).then(n=>this.mapAxiosResponse(n,t)).catch(n=>this.mapAxiosError(n,t))}deleteJson(e,t){return this.axios.delete(e,{data:t}).then(n=>this.mapAxiosResponse(n)).catch(n=>this.mapAxiosError(n))}getScript(e,t,n){const i=n!=null?n:"exports",s=this.toAxiosConfig(t);return s.headers&&(s.headers.Accept="application/javascript"),this.axios.get(this.toCdnUrl(e),s).then(u=>this.mapAxiosResponse(u,t)).then(u=>{try{const o=`"use strict";var ${i.split(".")[0]}={};${u};return ${i};`;return Function(o)()}catch{return u}}).catch(u=>{throw this.mapAxiosError(u,t),u})}loadScript(e,t){return yi[e]?Promise.resolve():this.getScript(e,t).then(n=>{yi[e]=!0})}}class Ua{constructor(){v(this,"_http",new Ai)}get http(){return this._http}newHttpInstance(e){return new Ai(e)}}const x=new Ua;class sn{static instance(){return x}}const j=x.http;class Ma{constructor(){v(this,"_me",null);v(this,"_currentLanguage","");v(this,"_notLoggedIn",!0);v(this,"_description");v(this,"_profile")}get currentLanguage(){return this._currentLanguage}get notLoggedIn(){return this._notLoggedIn}get description(){return this._description}get avatarUrl(){let e=this.description.photo;return(!e||e==="no-avatar.jpg"||e==="no-avatar.svg")&&(e=on.instance().Platform.theme.basePath+"/img/illustrations/no-avatar.svg"),e}get user(){return this._me}get currentApp(){return q.Platform.apps.currentApp}async initialize(){return j.get("/auth/oauth2/userinfo").then(e=>{if(j.latestResponse.status<200||j.latestResponse.status>=300)throw C.NOT_LOGGED_IN;return this.setCurrentModel(e),this._notLoggedIn?this.loadDefaultLanguage():this.loadUserLanguage()}).then(e=>(this.setCurrentLanguage(e),this.loadDescription())).then(()=>this.getUserProfile()).then(()=>{N.onSessionReady().resolve(this._me)}).catch(e=>{if(e===C.NOT_LOGGED_IN)return Promise.resolve();N.onSessionReady().reject(e)})}setCurrentModel(e){this._me=e,this._notLoggedIn=!(e&&e.sessionMetadata&&e.sessionMetadata.userId)}hasWorkflow(e){var t;return e===void 0||((t=this._me)==null?void 0:t.authorizedActions.findIndex(n=>n.name===e))!==-1}hasRight(e,t){if(t==="owner")return e.owner&&e.owner.userId===this._me.userId;const n=t.right||t,s=e.shared.filter(o=>(this._me.groupsIds||[]).indexOf(o.groupId)!==-1||o.userId===this._me.userId).find(o=>o[n]||o.manager)!==void 0,u=t.workflow?this.hasWorkflow(t.workflow):!0;return s&&u}get latestQuotaAndUsage(){return j.get(`/workspace/quota/user/${this._me.userId}`).then(e=>(this._description&&(this._description.quota=e.quota,this._description.storage=e.storage),e)).catch(()=>({quota:0,storage:0}))}setCurrentLanguage(e){this._currentLanguage=e,N.onLangReady().resolve(e)}loadDefaultLanguage(){return j.get("/locale").then(e=>e.locale).catch(()=>this._currentLanguage)}loadDescription(){return Promise.all([j.get("/userbook/api/person",{requestName:"refreshAvatar"}),j.get("/directory/userbook/"+this._me.userId)]).then(e=>(e[0].status==="ok"&&e[0].result&&e[0].result.length>0?this._description=e[0].result[0]:this._description={},this._description.type&&!this._description.profiles&&(this._description.profiles=this._description.type),Object.assign(this._description,e[1]),this._description))}get profile(){return this._profile}getUserProfile(){return j.get("/userbook/api/person").then(e=>e.result).then(e=>this._profile=e[0].type)}loadUserLanguage(){return j.get("/userbook/preference/language").then(e=>{try{return JSON.parse(e.preference)["default-domain"]}catch{return this.loadDefaultLanguage()}}).catch(()=>this.loadDefaultLanguage())}getEmailValidationInfos(){return j.get("/directory/user/mailstate")}checkEmail(e){return j.put("/directory/user/mailstate",{email:e})}tryEmailValidation(e){return j.post("/directory/user/mailstate",{key:e})}getMobileValidationInfos(){return j.get("/directory/user/mobilestate")}checkMobile(e){return j.put("/directory/user/mobilestate",{mobile:e})}tryMobileValidation(e){return j.post("/directory/user/mobilestate",{key:e})}getMfaInfos(){return j.get("/auth/user/mfa/code")}tryMfaCode(e){return j.post("/auth/user/mfa/code",{key:e})}}class ja{constructor(){v(this,"session",new Ma)}initialize(){return this.session.initialize()}login(e,t,n,i){const s=new FormData;return s.append("email",e),s.append("password",t),typeof n<"u"&&s.append("rememberMe",""+n),typeof i<"u"&&s.append("secureLocation",""+i),x.http.post("/auth/login",s,{headers:{"content-type":"application/x-www-form-urlencoded"}}).finally(()=>{switch(x.http.latestResponse.status){case 200:throw C.MALFORMED_DATA}})}logout(){return x.http.get("/auth/logout").finally(()=>{})}}const te=new ja;class Ha{constructor(){v(this,"_conf");v(this,"_loaded");v(this,"skinName","");v(this,"themeName","");v(this,"skin","raw");v(this,"themeUrl","/assets/themes/raw/default/");v(this,"templateOverrides",{});v(this,"portalTemplate","/assets/themes/raw/portal.html");v(this,"basePath","");v(this,"logoutCallback","/");v(this,"skins",[]);v(this,"is1D",!1);v(this,"is2D",!1);v(this,"_onSkinReady",N.onSkinReady());v(this,"_onOverrideReady",N.onOverridesReady())}initialize(e){return N.onSessionReady().promise.then(()=>this.load(e))}get version(){return q.Platform.deploymentTag}get cdnDomain(){return q.Platform.cdnDomain}async onFullyReady(){return await this._loaded,this}onSkinReady(){return this._onSkinReady.promise}onOverrideReady(){return this._onOverrideReady.promise}async getConf(e){var t;return this._conf=(t=this._conf)!=null?t:await x.http.getScript("/assets/theme-conf.js",{queryParams:{v:e!=null?e:this.version}},"exports.conf"),this._conf}load(e){return e=e!=null?e:this.version,this._loaded||(this._loaded=(te.session.notLoggedIn?this.loadDisconnected(e):this.loadConnected(e)).then(async()=>{var n,i;const t=await this.listSkins();this.is1D=((n=t.find(s=>s.child===this.skin))==null?void 0:n.parent)==="panda",this.is2D=((i=t.find(s=>s.child===this.skin))==null?void 0:i.parent)==="theme-open-ent"})),this._loaded}loadDisconnected(e){return new Promise((t,n)=>{x.http.get("/skin",{queryParams:{v:this.version}}).then(i=>{this.skin=i.skin,this.themeUrl=`${this.cdnDomain}/assets/themes/${i.skin}/skins/default/`,this.basePath=this.themeUrl+"../../",this._onSkinReady.resolve(this),x.http.get(`/assets/themes/${i.skin}/template/override.json`,{disableNotifications:!0,queryParams:{v:e}}).then(s=>{this.templateOverrides=s,this._onOverrideReady.resolve(s),t()}).catch(s=>{if(x.http.latestResponse.status===404)t();else throw s})}).catch(i=>{this._onSkinReady.reject(i),this._onOverrideReady.reject(i),n()})})}loadConnected(e){return new Promise((t,n)=>{this.loadDefaultTheme(e).then(()=>{this._onSkinReady.resolve(this),x.http.get(`/assets/themes/${this.skin}/template/override.json`,{disableNotifications:!0,queryParams:{v:e}}).then(i=>{this.templateOverrides=i,this._onOverrideReady.resolve(i),t()}).catch(i=>{if(x.http.latestResponse.status===404)t(),this._onSkinReady.reject(i),this._onOverrideReady.reject(i);else throw i})})})}async loadDefaultTheme(e){return te.session.notLoggedIn?Promise.reject():x.http.get("/theme",{queryParams:{_:e}}).then(t=>{this.skinName=t.skinName,this.themeName=t.themeName,this.themeUrl=t.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=t.logoutCallback})}listThemes(){return x.http.get("/themes")}async setDefaultTheme(e){await x.http.get("/userbook/api/edit-userbook-info?prop=theme-"+this.skin+"&value="+e._id),await this.loadDefaultTheme(this.version)}listSkins(){return this.skins.length>0?Promise.resolve(this.skins):this.getConf().then(e=>{const t=e.overriding.find(n=>n.child===this.skin);return t!=null&&t.group?this.skins=this.skins.concat(e.overriding.filter(n=>n.group===t.group)):this.skins=this.skins.concat(e.overriding),this.skins})}async getHelpPath(){var n;const t=(await this.listSkins()).find(i=>i.child===this.skin);return(n=t==null?void 0:t.help)!=null?n:"/help"}}const Me={},un={},Ce=[{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 wi{translate(e,t){e=e!=null?e:"";let n=Me[e]===void 0?e:Me[e];if(t&&typeof t=="object")for(let i in t)typeof t[i]<"u"&&(n=n.replace(new RegExp("\\${"+i+"}","g"),""+t[i]));return n}addBundlePromise(e){return this.loadBundlePromise(te.session.currentLanguage,e)}addBundle(e,t){this.loadBundle(te.session.currentLanguage,e,t)}loadBundlePromise(e,t){return this.loadBundle(e,t),un[t]}loadBundle(e,t,n){const i=un[t];if(i)n&&i.then(n).catch(n);else{const s=new Ne;un[t]=s.promise;const u={};e&&(u["Accept-Language"]=e),x.http.get(t,{headers:u}).then(o=>{Object.assign(Me,o),typeof n=="function"&&n(),s.resolve()}).catch(o=>{typeof n=="function"&&n(),s.reject()})}}addTranslations(e,t){N.onLangReady().promise.then(n=>{this.loadBundle(n,e+"/"+n+".json",t)})}addAllTranslations(e){return e&&e.length>0?N.onLangReady().promise.then(t=>Promise.all(e.map(n=>this.loadBundlePromise(t,n+"/"+t+".json")))).then(()=>{}):Promise.reject()}addKeys(e){for(var t in e)typeof Me[t]!="string"&&(Me[t]=e[t])}removeAccents(e){for(var t=0;t<Ce.length;t++)e=e.replace(Ce[t].letters,Ce[t].base);return e}}class bi{constructor(){v(this,"data",{})}get(e){return this.data[e]}load(e,t){return x.http.get("/userbook/preference/"+e).then(n=>{try{return JSON.parse(n.preference)}catch{return t!=null?t:{}}}).then(n=>(this.data[e]=n!=null?n:{},n))}update(e,t){return t!==void 0&&(this.data[e]=t),this}save(e){return x.http.putJson("/userbook/preference/"+e,this.data[e])}}class $a{constructor(){v(this,"_me",null);v(this,"_keepOpenOnLogout",!1);v(this,"_preferences",new bi);v(this,"_bookmarkedApps",[])}get keepOpenOnLogout(){return this._keepOpenOnLogout}get preferences(){return this._preferences}get bookmarkedApps(){return this._bookmarkedApps}initialize(e){return this.loadPublicConf(),N.onSessionReady().promise.then(t=>{t&&this.setCurrentModel(t)})}setCurrentModel(e){this._me=e,this._preferences=new bi,this.loadBookmarks()}loadPublicConf(){return x.http.get("/conf/public").then(e=>(this._keepOpenOnLogout=(e==null?void 0:e.keepOpenOnLogout)||!1,e))}async loadBookmarks(){await x.http.get("/userbook/preference/apps").then(e=>{e.preference||(e.preference=null);const t=JSON.parse(e.preference);let n;if(t&&t.length&&typeof t.concat=="function"){this._bookmarkedApps=t,n={bookmarks:t.map(u=>u.name),applications:[]},x.http.putJson("/userbook/preference/apps",n);return}else n=t;n||(n={bookmarks:[],applications:[]});let i=!0;const s=[];n.bookmarks.forEach((u,o)=>{const c=this._me.apps.find(a=>a.name===u);if(c){let a=Object.assign({},c);this._bookmarkedApps.push(a)}else s.push(u),i=!1}),s.forEach(u=>{let o=n.bookmarks.indexOf(u);o!==-1&&n.bookmarks.splice(o,1)}),i||x.http.putJson("/userbook/preference/apps",n)})}loadAppPrefs(e){return this.preferences.load(e,{})}saveAppPrefs(e){return this.preferences.save(e)}loadLanguage(){return this.preferences.load("language",{"default-domain":te.session.currentLanguage}).then(e=>e["default-domain"])}saveLanguage(e){return this.preferences.update("language",{"default-domain":e}).save("language")}}const xi=x==null?void 0:x.http;class qa{constructor(){v(this,"_publicConf",{});v(this,"_currentApp");v(this,"_appConf",{})}get currentApp(){var e;return(e=this._currentApp)!=null?e:null}setCurrentApp(e){return this._currentApp=e,this}async initialize(e,t=!1){t||this.setCurrentApp(e),await Promise.all([this.getPublicConf(e),this.loadI18n(e)])}async getPublicConf(e){return this._publicConf[e]||(this._publicConf[e]=await xi.get(`/${e}/conf/public`,{queryParams:{_:q.Platform.deploymentTag}})),this._publicConf[e]}async getWebAppConf(e){var n;let t;return this._appConf[e]||(await xi.get("/applications-list")).apps.forEach(s=>{if(s!=null&&s.prefix){const u=s.prefix.replace("/","");this._appConf[u]=s}else s!=null&&s.name&&s.name.toLowerCase()==e&&(t=s)}),(n=this._appConf[e])!=null?n:t}async loadI18n(e){return await N.onLangReady().promise,q.Platform.idiom.addBundlePromise(`/${e}/i18n`)}}class Wa{constructor(){v(this,"_status","void");v(this,"_params")}get status(){return this._status}xiti(){return this.parametersWithCheck("xiti",!1)}parameters(e){return this.parametersWithCheck(e,!0)}async parametersWithCheck(e,t){return this.initialize().promise.then(n=>!t||n.type===e||n.type==="multiple"?n[e]:void 0)}initialize(){return this._params||(this._params=N.promisify(),this._status="pending",Promise.all([x.http.get("/analyticsConf"),x.http.get("/xiti/config")]).then(async e=>{var t;if(!e||!e[0]||!e[0].type)throw C.MALFORMED_DATA;e[1]&&e[1].active&&(e[0].xiti=await this.initializeXiti(e[1])),(t=this._params)==null||t.resolve(e[0]),this._status="ready"}).catch(e=>{var t;throw this._status="failed",(t=this._params)==null||t.reject(),e})),this._params}async initializeXiti(e){var a;if(!e.structureMap||!q.Platform.apps.currentApp)return;const t=await N.onSessionReady().promise,n=te.session.description;let i;for(let l of t.structures){const d=e.structureMap[l];if(d&&d.collectiviteId&&d.UAI){i=d;break}}if(!i||!i.active)return;const s=await q.Platform.apps.getPublicConf(q.Platform.apps.currentApp);if(!s)return;const u=s.xiti;if(!u||!u.LIBELLE_SERVICE||!i.UAI)return;function o(l){let d="";for(let f=0;f<l.length;f++)d+=l.charCodeAt(f);return d}const c={Student:"ELEVE",Teacher:"ENSEIGNANT",Relative:"PARENT",Personnel:"ADMIN_VIE_SCOL_TECH",Guest:"AUTRE"};return{LIBELLE_SERVICE:u.LIBELLE_SERVICE,TYPE:u.OUTIL?"TIERS":"NATIF",OUTIL:u.OUTIL?u.OUTIL:"",STRUCT_ID:i.collectiviteId,STRUCT_UAI:i.UAI,PROJET:i.projetId?i.projetId:e.ID_PROJET,EXPLOITANT:e.ID_EXPLOITANT,PLATFORME:i.plateformeId?i.plateformeId:e.ID_PLATEFORME,ID_PERSO:o(t.userId),PROFILE:n.profiles&&n.profiles.length>0&&(a=c[n.profiles[0]])!=null?a:""}}}class Ga{constructor(){v(this,"Platform",{deploymentTag:"",cdnDomain:"",apps:new qa,theme:new Ha,analytics:new Wa,idiom:new wi,listLanguages:()=>x.http.get("/languages")});v(this,"School",{});v(this,"User",new $a)}async initialize(e,t){if(!e){const i=a=>(a<10?"0":"")+a.toFixed(0),s=new Date,u=s.getFullYear(),o=s.getMonth()+1,c=s.getDate();e=`${u}${i(o)}${i(c)}`}const n=e;this.Platform.deploymentTag=e,typeof t=="string"&&t.length>0&&(this.Platform.cdnDomain=t),x.http.setCdn(this.Platform.cdnDomain),await Promise.all([this.Platform.theme.initialize(n),N.onSessionReady().promise.then(i=>this.Platform.idiom.addBundlePromise("/i18n")),this.User.initialize(n)])}}const q=new Ga;class on{static instance(){return q}}class Va{static instance(){return te}}const L={LEFT:"left",RIGHT:"right"},za=["birthday","mood","calendar-widget","notes"],Ja=["agenda-widget","carnet-de-bord","my-apps","rss-widget","bookmark-widget","cursus-widget","maxicours-widget","school-widget"],Ya={"last-infos-widget":L.LEFT,birthday:L.LEFT,"calendar-widget":L.RIGHT,"carnet-de-bord":L.LEFT,"record-me":L.RIGHT,mood:L.LEFT,"my-apps":L.RIGHT,notes:L.RIGHT,"rss-widget":L.LEFT,"bookmark-widget":L.RIGHT,qwant:L.RIGHT,"qwant-junior":L.LEFT,"agenda-widget":L.LEFT,"cursus-widget":L.LEFT,"maxicours-widget":L.RIGHT,"universalis-widget":L.RIGHT,"briefme-widget":L.LEFT,"school-widget":L.LEFT},Fi={"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 Xa{constructor(){v(this,"_initialized");v(this,"_widgets",[]);v(this,"_userPrefs",{})}initialize(e,t){return this._initialized||(this._initialized=new Ne,N.onSessionReady().promise.then(n=>{var i;n&&n.widgets?(n.widgets.forEach(s=>{this._widgets.push(new Ka(s))}),this.loadUserPrefs().then(()=>{var s;(s=this._initialized)==null||s.resolve()}).catch(s=>{var u;(u=this._initialized)==null||u.reject()})):(i=this._initialized)==null||i.reject()})),this._initialized.promise}get list(){return this._widgets}lookup(e){return this._widgets.find(t=>t.platformConf.name===e)}lookupDefaultPosition(e){return Ya[e]}get userPrefs(){return this._userPrefs}async loadUserPrefs(){await q.User.preferences.load("widgets",{}).then(e=>this.applyUserPrefs(e))}saveUserPrefs(){return q.User.preferences.update("widgets",this._userPrefs).save("widgets").then(()=>{N.events().next({name:Nr.USERPREF_CHANGED,layer:Lr.WIDGETS})})}async applyUserPrefs(e){this._userPrefs=e!=null?e:this._userPrefs;const t=q.Platform.theme,n=[];t.listSkins().then(i=>{var o;const s=((o=i.find(c=>c.child===t.skin))==null?void 0:o.parent)==="panda"?Ja:za;this._widgets=this._widgets.filter((c,a)=>{var f,h;const l=c.platformConf.name;return s.indexOf(l)!==-1?!1:(this._userPrefs[l]||(this._userPrefs[l]={index:(f=Fi[l])!=null?f:999,show:!0,position:c.platformConf.position}),c.platformConf.mandatory&&(this._userPrefs[l].show=!0,this._userPrefs[l].index=(h=Fi[l])!=null?h:999),c.platformConf.i18n&&n.push(c.platformConf.i18n),c.applyUserPref(this._userPrefs[l]),!0)});const u=new wi;this._widgets=this._widgets.sort((c,a)=>{const l=u.translate(`timeline.settings.${c.platformConf.name}`).toLowerCase(),d=u.translate(`timeline.settings.${a.platformConf.name}`).toLowerCase();return l<d?-1:l>d?1:0})})}}class Ka{constructor(e){v(this,"_schoolConf",{});v(this,"_userPref");this._platformConf=e,this._userPref=null}get platformConf(){return this._platformConf}get schoolConf(){return this._schoolConf}get userPref(){return this._userPref}applyUserPref(e){var t,n;this._userPref=e,this._userPref.position=(n=(t=this._userPref.position)!=null?t:Ci.lookupDefaultPosition(this._platformConf.name))!=null?n:"left"}}const Ci=new Xa;class Qa{loadInfos(e){return x.http.get("/actualites/infos/last/"+e)}getMaxResults(){return x.http.get("/userbook/preference/maxInfos").then(e=>e.preference?parseInt(e.preference):4)}setMaxResults(e){return x.http.putJson("/userbook/preference/maxInfos",`"${e}"`)}}const Za={LAST_INFOS:"last-infos-widget",BIRTHDAY:"birthday",CALENDAR:"calendar-widget",CARNET:"carnet-de-bord",RECORD:"record-me",MOOD:"mood",MY_APPS:"my-apps",NOTES:"notes",RSS:"rss-widget",BOOKMARK:"bookmark-widget",QWANT:"qwant",QWANT_JUNIOR:"qwant-junior",AGENDA:"agenda-widget",CURSUS:"cursus-widget",MAXICOURS:"maxicours-widget",UNIVERSALIS:"universalis-widget",BRIEFME:"briefme-widget",SCHOOL:"school-widget"};class ec{static instance(){return Ci}}const an=x==null?void 0:x.http,tc=(Ti=te==null?void 0:te.session)==null?void 0:Ti.user;class nc{constructor(e){v(this,"_id");v(this,"model");e.reported=e.reporters&&e.reporters.length>0,this._id=e._id,this.model=e}isUnread(){var e;return((e=this.model.recipients)==null?void 0:e.find(t=>t.userId===tc.userId))!==void 0}delete(){return an.delete("/timeline/"+this._id)}discard(){return an.put("/timeline/"+this._id)}report(){return an.put("/timeline/"+this._id+"/report")}}class rc{constructor(){v(this,"_notifications",[]);v(this,"_notificationTypes",[]);v(this,"_flashMessages",[]);v(this,"_pageNumber",0);v(this,"_lastPage",!1);v(this,"_loading",!1);v(this,"showMine",!1)}get notifications(){return this._notifications}get isLoading(){return this._loading}get page(){return this._pageNumber}get hasMorePage(){return!this._lastPage}get notificationTypes(){return this._notificationTypes}get selectedNotificationTypes(){return this.preferences.type=this.preferences.type||[],this.preferences.type}get preferences(){return q.User.preferences.get(H.TIMELINE)}get flashMessages(){return this._flashMessages}savePreferences(){return q.User.saveAppPrefs(H.TIMELINE)}resetPagination(){this._pageNumber=0,this._lastPage=!1,this._loading=!1}initialize(){return Promise.all([q.User.loadAppPrefs(H.TIMELINE),x.http.get("/timeline/types")]).then(e=>{this._notificationTypes=e[1]})}loadNotifications(e){if(this._loading||this._lastPage)return Promise.resolve();e&&(this._pageNumber++,this._lastPage=!1);let t=this.selectedNotificationTypes;if(t.length===0)return this._lastPage=!0,Promise.resolve();let n={page:this.page,mine:1};return this.showMine||delete n.mine,this._loading=!0,x.http.get(`/timeline/lastNotifications?type=${t.join("&type=")}`,{queryParams:n}).then(i=>{if(this._loading=!1,i.status==="ok")if(i.number&&i.results){const s=i.results.filter(u=>this._notifications.findIndex(o=>o._id===u._id)===-1).map(u=>new nc(u));this._notifications=this._notifications.concat(s),this._pageNumber++}else this._lastPage=!0}).catch(i=>{this._loading=!1})}loadFlashMessages(){return x.http.get("/timeline/flashmsg/listuser").then(e=>{this._flashMessages=e})}markAsRead(e){return x.http.put("/timeline/flashmsg/"+e.id+"/markasread")}}class ic{static createInstance(){return new rc}}const Re=class{constructor(e){v(this,"checkHttpResponse",e=>{if(this.http.latestResponse.status>=300)throw this.http.latestResponse.statusText;return e});this.context=e}static register({application:e,resourceType:t},n){Re.registry.set(`${e}:main`,n),Re.registry.set(`${e}:${t}`,n)}static findService({application:e,resourceType:t},n){const i=Re.registry.get(`${e}:${t}`);if(i===void 0)throw`Service not found: ${e}:${t}`;return i(n)}static findMainService({application:e},t){const n=Re.registry.get(`${e}:main`);if(n===void 0)throw`Service not found: ${e}`;return n(t)}get http(){return this.context.http()}getShareReadUrl(e){return`/${this.getApplication()}/share/json/${e}?search=`}getSaveShareUrl(e){return`/${this.getApplication()}/share/resource/${e}`}gotoPrint(e,t){window.open(this.getPrintUrl(e,t),"_blank")}gotoView(e){window.open(this.getViewUrl(e),"_self")}gotoForm(e){window.open(this.getFormUrl(e),"_self")}async publish(e){const t=new FormData;t.append("title",e.title),t.append("cover",e.cover),t.append("coverName",e.cover.name),t.append("coverType",e.cover.type),t.append("teacherAvatar",e.teacherAvatar),t.append("teacherAvatarName",e.teacherAvatar.name||`teacherAvatar_${e.userId}`),t.append("teacherAvatarType",e.teacherAvatar.type),t.append("language",e.language),e.activityType.forEach(s=>{t.append("activityType[]",s)}),e.subjectArea.forEach(s=>{t.append("subjectArea[]",s)}),e.age.forEach(s=>{t.append("age[]",s.toString())}),t.append("description",e.description),e.keyWords.split(",").forEach(s=>{t.append("keyWords[]",s.trim())}),t.append("licence",e.licence),t.append("pdfUri",`${window.location.origin}${this.getPrintUrl(e.resourceId)}`),t.append("application",e.application?e.application:""),t.append("resourceId",e.resourceId),t.append("teacherSchool",e.userStructureName);const i=await this.http.post("/appregistry/library/resource",t,{headers:{"Content-Type":"multipart/form-data"}});return this.checkHttpResponse(i)}async createContext(e){const t=await this.http.get("/explorer/context",{queryParams:this.toQueryParams(e)});return this.checkHttpResponse(t)}async searchContext(e){const t=await this.http.get("/explorer/resources",{queryParams:this.toQueryParams(e)});return this.checkHttpResponse(t)}async createFolder(e){const t=await this.http.post("/explorer/folders",this.createFolderToBodyParams(e));return this.checkHttpResponse(t)}async updateFolder(e){const t=await this.http.put(`/explorer/folders/${e.folderId}`,this.createFolderToBodyParams(e));return this.checkHttpResponse(t)}async moveToFolder(e){const t=await this.http.post(`/explorer/folders/${e.folderId}/move`,this.moveToBodyParams(e));return this.checkHttpResponse(t)}async listSubfolders(e){const t=await this.http.get(`/explorer/folders/${e}`);return this.checkHttpResponse(t)}async deleteAll(e){const t=await this.http.deleteJson("/explorer",e);return this.checkHttpResponse(t)}async trashAll({resourceType:e,...t}){const n=await this.http.putJson("/explorer/trash",t);return this.checkHttpResponse(n)}async restoreAll({resourceType:e,...t}){const n=await this.http.putJson("/explorer/restore",t);return this.checkHttpResponse(n)}async getThumbnailPath(e){if(typeof e>"u")return e;if(typeof e=="string")if(e.startsWith("blob:")){const t=await fetch(e).then(i=>i.blob());return`/workspace/document/${(await this.context.workspace().saveFile(t,{visibility:"protected",application:this.getApplication()}))._id}`}else return e;else return`/workspace/document/${(await this.context.workspace().saveFile(e,{visibility:"protected",application:this.getApplication()}))._id}`}toQueryParams(e){let t={application:e.app,start_idx:e.pagination.startIdx,page_size:e.pagination.pageSize,resource_type:e.types[0],trashed:e.trashed};if(e.orders&&Object.entries(e.orders).length){const[[n,i]]=Object.entries(e.orders);t.order_by=`${n}:${i}`}return e.filters&&Object.assign(t,e.filters),typeof e.search=="string"&&(t.search=e.search),t}createFolderToBodyParams(e){return{application:e.app,resourceType:e.type,parentId:e.parentId,name:e.name}}moveToBodyParams(e){return{application:e.application,resourceType:this.getResourceType(),resourceIds:e.resourceIds,folderIds:e.folderIds}}};let pe=Re;v(pe,"registry",new Map);class sc extends pe{async update(e){const t=await this.getThumbnailPath(e.thumbnail),n=await this.http.put(`/blog/${e.entId}`,{trashed:e.trashed,_id:e.entId,title:e.name,thumbnail:t,description:e.description,visibility:e.public?"PUBLIC":"OWNER",slug:e.public?e.slug:"","publish-type":e["publish-type"]||"RESTRAINT","comment-type":"IMMEDIATE"});return this.checkHttpResponse(n),{thumbnail:t,entId:e.entId}}getResourceType(){return z.BLOG}getApplication(){return H.BLOG}getFormUrl(e){return e?`/blog?folderid=${e}#/edit/new`:"/blog#/edit/new"}getViewUrl(e){return`/blog#/view/${e}`}getPrintUrl(e,t){return`/blog/print/blog#/print/${e}?comments=${t||!0}`}}pe.register({application:z.BLOG,resourceType:z.BLOG},r=>new sc(r));const ve={},cn={};class uc{constructor(e){this.context=e}get http(){return this.context.http()}async fromCacheIfPossible(e,t,n){if(cn[e]&&await cn[e],ve[e])return ve[e];try{const i=t();cn[e]=i;const s=await i;return n(s)&&(ve[e]=s),s}catch(i){throw console.error(`Failed to retrieve value for: ${e}`,i),i}}clearCache(e){if(e)delete ve[e];else for(const t in ve)ve.hasOwnProperty(t)&&delete ve[t]}async httpGet(e,t){return this.fromCacheIfPossible(e,async()=>{const n=await this.http.get(e,t),i={...this.http.latestResponse};return{value:n,response:i}},({response:n})=>!(n.status<200||n.status>=300))}async httpGetJson(e,t){const{response:n,value:i}=await this.httpGet(e,t);if(n.status<200||n.status>=300)throw`Bad http status (${n.status}) for url: ${e}`;return i}}class oc{constructor(e){this.context=e}get http(){return this.context.http()}get cdnDomain(){return q.Platform.cdnDomain}async getConf(e){const[t,n]=await Promise.all([this.getThemeConf(),this.getApplicationsList()]),[i,s]=await Promise.all([this.getTheme({conf:t}),this.getWebAppConf({app:e,applications:n})]);return{applications:n,conf:t,currentApp:s,theme:i}}getCdnUrl(){console.warn("[getCdnUrl] Not implemented yet")}async savePreference(e,t){this.http.putJson(`/userbook/preference/${e}`,t)}async getPreference(e){const t=await this.http.get(`/userbook/preference/${e}`);return JSON.parse(t.preference)}async getThemeConf(e){return await this.http.getScript("/assets/theme-conf.js",{queryParams:{v:e}},"exports.conf")}async getApplicationsList(){return(await this.http.get("/applications-list")).apps}async getWebAppConf({app:e,applications:t}){return t.find(i=>{if(i!=null&&i.prefix)return(i==null?void 0:i.prefix.replace("/",""))===e})}async getTheme({version:e,conf:t}){const n=await this.http.get("/theme",{queryParams:{_:e}}),i=n.themeName,s=t==null?void 0:t.overriding.find(d=>d.child===i).skins,u="/assets/themes/ode-bootstrap",o=t==null?void 0:t.overriding.find(d=>d.child===i).bootstrapVersion,c=`${this.cdnDomain}/assets/themes/${o}`,a=`${c}/skins/${n.skinName}`,l=(t==null?void 0:t.overriding.find(d=>d.child===i).parent)==="panda";return{basePath:`${this.cdnDomain}${n.skin}../../`,bootstrap:u,bootstrapPath:c,bootstrapUrl:a,bootstrapVersion:o,is1d:l,logoutCallback:n.logoutCallback,skin:n.skin.split("/assets/themes/")[1].split("/")[0],skinName:n.skinName,skins:s,themeName:n.themeName,themeUrl:n.skin}}}class ac{constructor(e){this.odeServices=e}get http(){return this.odeServices.http()}get cache(){return this.odeServices.cache()}getAvatarUrl(e,t,n="100x100"){return t==="user"?`/userbook/avatar/${e}?thumbnail=${n}`:"/assets/img/illustrations/group-avatar.svg"}getDirectoryUrl(e,t){return t==="user"?`/userbook/annuaire#/${e}`:`/userbook/annuaire#/group-view/${e}`}async getBookMarks(){return(await this.cache.httpGetJson("/directory/sharebookmark/all")).map(({id:t,name:n})=>({id:t,displayName:n,members:[]}))}async getBookMarkById(e){const{groups:t,id:n,name:i,users:s}=await this.http.get(`/directory/sharebookmark/${e}`);return{id:n,displayName:i,groups:t.map(({name:u,id:o})=>({displayName:u,id:o})),users:s.map(({displayName:u,id:o,profile:c})=>({profile:c,displayName:u,firstName:"",lastName:"",login:"",id:o}))}}async saveBookmarks(e,{bookmarks:t,groups:n,users:i}){this.cache.clearCache("/directory/sharebookmark/all");const s=i.map(f=>typeof f=="string"?f:f.id),u=n.map(f=>typeof f=="string"?f:f.id),o=t.map(async f=>{if(typeof f=="string"){const{displayName:h,groups:m,id:p,users:g}=await this.getBookMarkById(f),A=g.map(B=>B.id),I=m.map(B=>B.id);return{displayName:h,id:p,members:[...I,...A]}}else return Promise.resolve(f)}),a=(await Promise.all(o)).map(f=>f.members).reduce((f,h)=>[...f,...h],[]),l={name:e,members:[...s,...u,...a]},{id:d}=await this.http.postJson("/directory/sharebookmark",l);return{id:d,displayName:e,members:l.members}}}const Ri={};class cc{constructor(e,t){v(this,"axios");v(this,"_latestResponse");this.context=e,this.axios=gi.create(t)}setCdn(e){e&&XMLHttpRequest&&!XMLHttpRequest.prototype.cdnUrl&&(XMLHttpRequest.prototype.cdnUrl=e,XMLHttpRequest.prototype.baseOpen=XMLHttpRequest.prototype.open,XMLHttpRequest.prototype.open=function(){const t=arguments[1];return t.startsWith("/infra/public")&&(arguments[1]=e+t),/^\/([^\/]*)\/public/.test(t)&&(arguments[1]=e+t),t.startsWith("/assets")&&(arguments[1]=e+t),t=="/conf/public"&&(arguments[1]=t),t.startsWith("http")&&(arguments[1]=t),this.baseOpen.apply(this,arguments)})}toAxiosConfig(e){if(e){const t=Object.assign({},this.axios.defaults);return e.headers&&(t.headers=Object.assign({},this.axios.defaults.headers),Object.assign(t.headers,e.headers)),e.responseType&&(t.responseType=e.responseType),e.queryParams&&(t.params=Object.assign({},e.queryParams)),t}else return this.axios.defaults}toCdnUrl(e){const t=this.context.conf().getCdnUrl()||"";if(t.length>0&&e!=="/conf/public"){const n=""+e;(n.startsWith("/infra/public")||n.startsWith("/assets")||/^\/([^\/]*)\/public/.test(n))&&(e=t+n)}return e}mapAxiosError(e,t){return console.error("[HttpService]",e),e.response?this._latestResponse=e.response:e.request?this._latestResponse={status:408,statusText:C.TIME_OUT}:this._latestResponse={status:500,statusText:C.UNKNOWN},!t||t.disableNotifications,this._latestResponse}mapAxiosResponse(e,t){return this._latestResponse=e,e.data}get latestResponse(){return this._latestResponse}async get(e,t){try{const n=await this.axios.get(this.toCdnUrl(e),this.toAxiosConfig(t));return this.mapAxiosResponse(n,t)}catch(n){return this.mapAxiosError(n,t)}}async post(e,t,n){try{const i=await this.axios.post(e,t,this.toAxiosConfig(n));return this.mapAxiosResponse(i,n)}catch(i){return this.mapAxiosError(i,n)}}async postFile(e,t,n){const i=this.toAxiosConfig(n);i.headers&&i.headers["Content-Type"]&&delete i.headers["Content-Type"];try{const s=await this.axios.post(e,t,{...i,headers:{"Content-Type":"multipart/form-data"}});return this.mapAxiosResponse(s,n)}catch(s){return this.mapAxiosError(s,n)}}async postJson(e,t,n){const i=this.toAxiosConfig();i.headers&&(i.headers["Content-Type"]="application/json");try{const s=await this.axios.post(e,t,this.toAxiosConfig(n));return this.mapAxiosResponse(s,n)}catch(s){return this.mapAxiosError(s,n)}}async put(e,t,n){try{const i=await this.axios.put(e,t,this.toAxiosConfig(n));return this.mapAxiosResponse(i,n)}catch(i){return this.mapAxiosError(i,n)}}async putFile(e,t,n){try{const i=this.toAxiosConfig(n);i.headers&&i.headers["Content-Type"]&&delete i.headers["Content-Type"];const s=await this.axios.put(e,t,{...i,headers:{"Content-Type":"multipart/form-data"}});return this.mapAxiosResponse(s,n)}catch(i){return this.mapAxiosError(i,n)}}async putJson(e,t,n){const i=this.toAxiosConfig(n);i.headers&&(i.headers["Content-Type"]="application/json");try{const s=await this.axios.put(e,t,i);return this.mapAxiosResponse(s,n)}catch(s){return this.mapAxiosError(s,n)}}async delete(e,t){try{const n=await this.axios.delete(e,this.toAxiosConfig(t));return this.mapAxiosResponse(n,t)}catch(n){return this.mapAxiosError(n,t)}}async deleteJson(e,t){try{const n=await this.axios.delete(e,{data:t});return this.mapAxiosResponse(n)}catch(n){return this.mapAxiosError(n)}}getScript(e,t,n){const i=n!=null?n:"exports",s=this.toAxiosConfig(t);return s.headers&&(s.headers.Accept="application/javascript"),this.axios.get(this.toCdnUrl(e),s).then(u=>this.mapAxiosResponse(u,t)).then(u=>{try{const o=`"use strict";var ${i.split(".")[0]}={};${u};return ${i};`;return Function(o)()}catch{return u}}).catch(u=>{throw this.mapAxiosError(u,t),u})}loadScript(e,t){return Ri[e]?Promise.resolve():this.getScript(e,t).then(n=>{Ri[e]=!0})}}class lc{constructor(e){this.context=e}get session(){return this.context.session()}parseResourceRight(e){const t=e.split(":");if(t.length===2){if(t[0]==="creator")return{id:t[1],right:"creator",type:"creator"}}else return t.length===3?{id:t[1],right:t[2],type:t[0]}:void 0}parseResourceRights(e){return e.map(n=>this.parseResourceRight(n)).filter(n=>n!==void 0)}hasResourceRight({id:e,groupIds:t},n,i){const s=i.map(u=>typeof u=="string"?this.parseResourceRight(u):u).filter(u=>u!==void 0);for(const u of s){if(u.id===e&&u.type==="creator")return!0;if(u.id===e&&u.type==="user"&&u.right===n)return!0;if(t.includes(u.id)&&u.type==="group"&&u.right===n)return!0}return!1}async sessionHasResourceRight(e,t){try{const n=await this.session.getUser();return!!n&&this.hasResourceRight({groupIds:n.groupsIds,id:n.userId},e,t)}catch(n){return console.error(n),!1}}async sessionHasAtLeastOneResourceRight(e,t){for(const n of e)if(await this.sessionHasResourceRight(n,t))return!0;return!1}async sessionHasResourceRightForEachList(e,t){let n=0;for(const i of t)await this.sessionHasResourceRight(e,i)&&n++;return n===t.length}async sessionHasAtLeastOneResourceRightForEachList(e,t){for(const n of e){let i=0;for(const s of t)await this.sessionHasResourceRight(n,s)&&i++;if(i===t.length)return!0}return!1}hasWorkflowRight(e,t){return t.findIndex(n=>n===e)!==-1}async sessionHasWorkflowRight(e){try{const t=await this.session.getUser();return!!t&&this.hasWorkflowRight(e,t.authorizedActions.map(n=>n.name))}catch(t){return console.error(t),!1}}async sessionHasWorkflowRights(e){const t={};try{const n=await this.session.getUser();for(const i of e)t[i]=!!n&&this.hasWorkflowRight(i,n.authorizedActions.map(s=>s.name))}catch(n){console.error(n);for(const i of e)t[i]=!1}return t}}class fc{constructor(e){this.context=e}get http(){return this.context.http()}get cache(){return this.context.cache()}onLogout(){this.cache.clearCache()}onRefreshSession(){this.cache.clearCache()}async getSession(){const e=await this.getUser(),[t,n,i,s,u]=await Promise.all([this.getCurrentLanguage(e),this.latestQuotaAndUsage(e),this.loadDescription(e),this.getUserProfile(),this.getBookmarks(e)]);return{user:e,quotaAndUsage:n,currentLanguage:t,userDescription:i,userProfile:s,bookmarkedApps:u}}login(e,t,n,i){const s=new FormData;return s.append("email",e),s.append("password",t),typeof n<"u"&&s.append("rememberMe",""+n),typeof i<"u"&&s.append("secureLocation",""+i),this.http.post("/auth/login",s,{headers:{"content-type":"application/x-www-form-urlencoded"}}).finally(()=>{switch(this.http.latestResponse.status){case 200:throw C.MALFORMED_DATA}})}logout(){return this.http.get("/auth/logout").finally(()=>{})}async latestQuotaAndUsage(e){try{return await this.http.get(`/workspace/quota/user/${e==null?void 0:e.userId}`)}catch(t){return console.error(t),{quota:0,storage:0}}}async getCurrentLanguage(e){const t=(e==null?void 0:e.sessionMetadata)&&(e==null?void 0:e.sessionMetadata.userId);try{let n;return t?n=await this.loadUserLanguage():n=await this.loadDefaultLanguage(),n}catch(n){console.error(n)}}async loadUserLanguage(){try{const e=await this.http.get("/userbook/preference/language");return JSON.parse(e.preference)["default-domain"]}catch{return await this.loadDefaultLanguage()}}async loadDefaultLanguage(){return(await this.cache.httpGetJson("/locale")).locale}async getUser(){const{response:e,value:t}=await this.cache.httpGet("/auth/oauth2/userinfo");if(e.status<200||e.status>=300)throw C.NOT_LOGGED_IN;return t}hasWorkflow({workflowName:e,user:t}){return e===void 0||(t==null?void 0:t.authorizedActions.findIndex(n=>n.name===e))!==-1}async loadDescription(e){try{const[t,n]=await Promise.all([this.getUserProfile({requestName:"refreshAvatar"}),this.http.get("/directory/userbook/"+(e==null?void 0:e.userId))]);return{...t,...n}}catch(t){return console.error(t),{}}}async getBookmarks(e){const t=await this.http.get("/userbook/preference/apps");t.preference||(t.preference=null);const n=JSON.parse(t.preference);let i;i=n,i||(i={bookmarks:[],applications:[]});let s=[];return i.bookmarks.forEach((u,o)=>{const c=e==null?void 0:e.apps.find(a=>a.name===u);if(c){let a=Object.assign({},c);s.push(a)}}),s}async getUserProfile(e){const{response:t,value:n}=await this.cache.httpGet("/userbook/api/person",e);if(t.status<200||t.status>=300)throw C.NOT_LOGGED_IN;return n.result[0].type}async isAdml(){const e=await this.getUser();return(e==null?void 0:e.functions.ADMIN_LOCAL)!==void 0}}class me{static removeAccents(e){for(var t=0;t<Ce.length;t++)e=e.replace(Ce[t].letters,Ce[t].base);return e}}class hc{constructor(e){this.context=e}get directory(){return this.context.directory()}get http(){return this.context.http()}get cache(){return this.context.cache()}async searchShareSubjects(e,t,n){const i=me.removeAccents(n).toLowerCase(),s=await this.cache.httpGetJson(`/${e}/share/json/${t}?search=${n}`),u=s.users.visibles.filter(({username:l,firstName:d,lastName:f,login:h})=>{const m=me.removeAccents(f||"").toLowerCase(),p=me.removeAccents(d||"").toLowerCase(),g=me.removeAccents(l||"").toLowerCase(),A=me.removeAccents(h||"").toLowerCase();return g.includes(i)||p.includes(i)||m.includes(i)||A.includes(i)}).map(l=>({avatarUrl:this.directory.getAvatarUrl(l.id,"user"),directoryUrl:this.directory.getDirectoryUrl(l.id,"user"),displayName:l.username,id:l.id,profile:l.profile,type:"user"})),o=s.groups.visibles.filter(({name:l})=>me.removeAccents(l||"").toLowerCase().includes(i)).map(l=>({avatarUrl:this.directory.getAvatarUrl(l.id,"group"),directoryUrl:this.directory.getDirectoryUrl(l.id,"group"),displayName:l.name,id:l.id,type:"group"}));return[...(await this.directory.getBookMarks()).filter(({displayName:l})=>me.removeAccents(l||"").toLowerCase().includes(i)).map(l=>({avatarUrl:"",directoryUrl:"",profile:"",displayName:l.displayName,id:l.id,type:"sharebookmark"})),...u,...o]}async getShareMapping(e){const t=await this.cache.httpGetJson(`/${e}/rights/sharing`);for(const n of Object.keys(t))if(n.includes(".")){const i=n.split(".")[1],s=t[n];delete t[n],t[i]=s}return t}getActionsAvailableFor({id:e,type:t},n,i){const u=(t==="user"?n.users.checked[e]:n.groups.checked[e])||[],o=Object.keys(i),c=[];for(const a of o)i[a].filter(f=>u.includes(f)).length>0&&c.push(a);return c}async getRightsForResource(e,t){const n=await this.directory.getBookMarks(),i=this.context.resource(e,e).getShareReadUrl(t),s=await this.cache.httpGetJson(i),u=await this.getShareMapping(e),o=await this.cache.httpGetJson("/infra/public/json/sharing-rights.json"),c=Object.keys(s.users.checked).map(h=>s.users.visibles.find(p=>p.id===h)).filter(h=>h!==void 0).map(h=>{const m=this.getActionsAvailableFor({id:h.id,type:"user"},s,u);return{id:h.id,type:"user",displayName:h.username,profile:h.profile,avatarUrl:this.directory.getAvatarUrl(h.id,"user"),directoryUrl:this.directory.getDirectoryUrl(h.id,"user"),actions:m.map(g=>{const A=o[g];return{displayName:g,id:g,priority:A.priority}})}}).sort((h,m)=>(h.displayName||"").localeCompare(m.displayName)),a=Object.keys(s.groups.checked).map(h=>s.groups.visibles.find(p=>p.id===h)).filter(h=>h!==void 0).map(h=>{const m=this.getActionsAvailableFor({id:h.id,type:"group"},s,u);return{id:h.id,type:"group",displayName:h.name,profile:void 0,avatarUrl:this.directory.getAvatarUrl(h.id,"group"),directoryUrl:this.directory.getDirectoryUrl(h.id,"group"),actions:m.map(g=>{const A=o[g];return{displayName:g,id:g,priority:A.priority}})}}).sort((h,m)=>(h.displayName||"").localeCompare(m.displayName)),l=[...c,...a],d=s.groups.visibles.map(({groupDisplayName:h,id:m,name:p})=>({displayName:h||p,id:m})),f=s.users.visibles.map(({id:h,profile:m,username:p,firstName:g,lastName:A,login:I})=>({displayName:p,firstName:g,lastName:A,login:I,profile:m,id:h}));return{rights:l,visibleBookmarks:n,visibleGroups:d,visibleUsers:f}}async saveRights(e,t,n){const i=await this.getShareMapping(e),s={bookmarks:{},groups:{},users:{}};for(const a of n){const l=a.actions.map(f=>i[f.id]).reduce((f,h)=>[...f,...h],[]),d=[...new Set(l)];d.length>0&&(a.type==="user"?s.users[a.id]=d:a.type==="group"?s.groups[a.id]=d:s.bookmarks[a.id]=d)}const u=this.context.resource(e,e),o=u.getSaveShareUrl(t);return this.cache.clearCache(u.getShareReadUrl(t)),await this.http.putJson(o,s)}async getActionsForApp(e){const t=await this.cache.httpGetJson("/infra/public/json/sharing-rights.json"),n=await this.getShareMapping(e);return Object.keys(t).map(s=>{const u=t[s];return{displayName:s,id:s,priority:u.priority,requires:u.requires}}).filter(s=>{var u;return((u=n[s.id])==null?void 0:u.length)>0}).sort((s,u)=>s.priority-u.priority)}}const hn=class{constructor(){v(this,"wordExtensions",new Set);v(this,"excelExtensions",new Set);v(this,"pptExtensions",new Set);v(this,"fileExtensionMap",new Map);v(this,"csvContentType",new Set);v(this,"csvExtensions",new Set);v(this,"txtExtensions",new Set);v(this,"PDF","application/pdf");v(this,"OCTET_STREAM","application/octet-stream");this.txtExtensions.add("txt"),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.csvContentType.add("text/comma-separated-values"),this.csvContentType.add("text/csv"),this.csvContentType.add("application/csv")}getContentTypeForExtension(e){if(this.fileExtensionMap.has(e))return this.fileExtensionMap.get(e)}getExtensionForContentType(e){for(const t of Array.from(this.fileExtensionMap.keys()))if((this.fileExtensionMap.get(t)||"").toLowerCase()==(e||"").toLowerCase())return t;return null}isWordLike(e,t){const n=this.getExtensionForContentType(e);return n?this.wordExtensions.has(n):e==this.OCTET_STREAM&&t?this.wordExtensions.has(t):!1}isExcelLike(e,t){const n=this.getExtensionForContentType(e);return n?this.excelExtensions.has(n):e==this.OCTET_STREAM&&t?this.excelExtensions.has(t):!1}isCsvLike(e,t){return this.csvContentType.has(e)?!0:e==this.OCTET_STREAM&&t?this.csvExtensions.has(t):!1}isPowerpointLike(e,t){const n=this.getExtensionForContentType(e);return n?this.pptExtensions.has(n):e==this.OCTET_STREAM&&t?this.pptExtensions.has(t):!1}isTxtLike(e,t){const n=this.getExtensionForContentType(e);return n?this.txtExtensions.has(n):e==this.OCTET_STREAM&&t?this.txtExtensions.has(t):!1}};let oe=hn;v(oe,"INSTANCE",new hn);class Di{static registerContentTypeToFileType(e){this.fileTypes.push(e)}static getFileType(e,t=!1,n){if(n&&(n=n.trim()),!e)return"unknown";this.fileTypes||console.warn("[Element.role] should not have emptyRoles",this);for(let s of this.fileTypes||[]){const u=s(e,t);if(u)return u}const i={csv:function(s){return!!oe.INSTANCE.isCsvLike(s,n)},doc:function(s){return oe.INSTANCE.isWordLike(s,n)?!0:s.indexOf("document")!==-1&&s.indexOf("wordprocessing")!==-1},xls:function(s){return oe.INSTANCE.isExcelLike(s,n)?!0:s.indexOf("document")!==-1&&s.indexOf("spreadsheet")!==-1||s.indexOf("ms-excel")!==-1},img:function(s){return s.indexOf("image")!==-1},pdf:function(s){return s.indexOf("pdf")!==-1||s==="application/x-download"},ppt:function(s){return oe.INSTANCE.isPowerpointLike(s,n)?!0:s.indexOf("document")!==-1&&s.indexOf("presentation")!==-1||s.indexOf("powerpoint")!==-1},txt:function(s){return oe.INSTANCE.isTxtLike(s,n)},video:function(s){return s.indexOf("video")!==-1},audio:function(s){return s.indexOf("audio")!==-1},zip:function(s){return s.indexOf("zip")!==-1||s.indexOf("rar")!==-1||s.indexOf("tar")!==-1||s.indexOf("7z")!==-1}};for(let s in i)if(i[s](e))return s;return"unknown"}}v(Di,"fileTypes",[]);class dc{constructor(e){this.context=e}get http(){return this.context.http()}async saveFile(e,t){const n=e.name||"",i=n.split("."),s=e.type||"application/octet-stream",u=i.length>1?i[i.length-1]:"",o={"content-type":s,filename:n,size:e.size,extension:u,role:Di.getFileType(s,!1,u)},c=n.replace("."+o.extension,""),a=o.extension?c+"."+o.extension:c,l=new FormData;l.append("file",e,a);const d=[];return((t==null?void 0:t.visibility)==="public"||(t==null?void 0:t.visibility)==="protected")&&d.push(`${t.visibility}=true`),t!=null&&t.application&&d.push(`application=${t.application}`),o.role==="img"&&d.push("quality=1"),t!=null&&t.parentId&&d.push(`parentId=${t.parentId}`),await this.http.postFile(`/workspace/document?${d.join("&")}`,l)}}const je={},ln={},fn=[{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 pc{constructor(e){this.context=e}get http(){return this.context.http()}async getIdiom(e,t){await Promise.all([this.addBundlePromise(e,"/i18n"),this.addBundlePromise(e,`/${t}/i18n`)])}translate(e,t){e=e!=null?e:"";let n=je[e]===void 0?e:je[e];if(t&&typeof t=="object")for(let i in t)typeof t[i]<"u"&&(n=n.replace(new RegExp("\\${"+i+"}","g"),""+t[i]));return n}addBundlePromise(e,t){return this.loadBundlePromise(e,t)}addBundle(e,t,n){this.loadBundle(e,t,n)}loadBundlePromise(e,t){return this.loadBundle(e,t),ln[t]}loadBundle(e,t,n){const i=ln[t];if(i)n&&i.then(n).catch(n);else{const s=new Ne;ln[t]=s.promise;const u={};e&&(u["Accept-Language"]=e),this.http.get(t,{headers:u}).then(o=>{Object.assign(je,o),typeof n=="function"&&n(),s.resolve()}).catch(o=>{typeof n=="function"&&n(),s.reject()})}}addTranslations(e,t){N.onLangReady().promise.then(n=>{this.loadBundle(n,e+"/"+n+".json",t)})}addAllTranslations(e){return e&&e.length>0?N.onLangReady().promise.then(t=>Promise.all(e.map(n=>this.loadBundlePromise(t,n+"/"+t+".json")))).then(()=>{}):Promise.reject()}addKeys(e){for(var t in e)typeof je[t]!="string"&&(je[t]=e[t])}removeAccents(e){for(var t=0;t<fn.length;t++)e=e.replace(fn[t].letters,fn[t].base);return e}}class vc{constructor(){v(this,"_cache");v(this,"_conf");v(this,"_directory");v(this,"_http");v(this,"_idiom");v(this,"_rights");v(this,"_session");v(this,"_share");v(this,"_workspace");this._cache=new uc(this),this._conf=new oc(this),this._directory=new ac(this),this._http=new cc(this),this._idiom=new pc(this),this._rights=new lc(this),this._session=new fc(this),this._share=new hc(this),this._workspace=new dc(this)}cache(){return this._cache}conf(){return this._conf}directory(){return this._directory}http(){return this._http}idiom(){return this._idiom}resource(e,t){return t?pe.findService({application:e,resourceType:t},this):pe.findMainService({application:e},this)}rights(){return this._rights}session(){return this._session}share(){return this._share}workspace(){return this._workspace}}const mc=new vc;typeof window<"u"&&(window.entcore=(Si=window.entcore)!=null?Si:{},window.entcore["ode-ts-client"]=(Pi=(Ii=window.entcore["ode-ts-client"])!=null?Ii:b)!=null?Pi:module==null?void 0:module.exports),b.ACTION=D,b.APP=H,b.BOOLEAN_FILTER=Uo,b.ConfigurationFrameworkFactory=on,b.ERROR_CODE=C,b.EVENT_NAME=Nr,b.ExplorerFrameworkFactory=kr,b.FOLDER=No,b.ITimelineFactory=ic,b.LAYER_NAME=Lr,b.LastInfosWidget=Qa,b.NotifyFrameworkFactory=Vo,b.PROP_FORMAT=Wo,b.PROP_KEY=he,b.PROP_MODE=$o,b.PROP_TYPE=qo,b.RESOURCE=z,b.RxJS=To,b.SORT_BY=Ho,b.SORT_ORDER=jo,b.STRING_FILTER=Mo,b.SessionFrameworkFactory=Va,b.TransportFrameworkFactory=sn,b.USER_PREFS=Oi,b.WIDGET_NAME=Za,b.WIDGET_POSITION=L,b.WidgetFrameworkFactory=ec,b.appNameForResource=Br,b.odeServices=mc,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
18
+ //# sourceMappingURL=ode-ts-client.js.map