@eo-sdk/client 9.0.3 → 9.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/eo-framework/actions/action.module.d.ts +1 -2
- package/assets/_default/config/main.json +1 -1
- package/assets/_default/i18n/de.json +7 -12
- package/assets/_default/i18n/en.json +7 -12
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js +1 -1
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js.map +1 -1
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js +1 -1
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js.map +1 -1
- package/bundles/eo-sdk-client.umd.js +76 -42
- package/bundles/eo-sdk-client.umd.js.map +1 -1
- package/bundles/eo-sdk-client.umd.min.js +1 -1
- package/bundles/eo-sdk-client.umd.min.js.map +1 -1
- package/eo-sdk-client.d.ts +23 -23
- package/eo-sdk-client.metadata.json +1 -1
- package/esm2015/app/eo-client/about-state/about-state.component.js +3 -3
- package/esm2015/app/eo-client/dashboard/dashboard.component.js +2 -2
- package/esm2015/app/eo-client/stored-queries-state/stored-queries-state.component.js +2 -2
- package/esm2015/app/eo-framework/actions/action.module.js +1 -2
- package/esm2015/app/eo-framework/app-shell/app-bar/side-bar/side-bar.component.js +2 -2
- package/esm2015/app/eo-framework/frame/frame.component.js +35 -11
- package/esm2015/app/eo-framework/object-details/object-details.component.js +12 -1
- package/esm2015/app/eo-framework/stored-query/stored-query-details/stored-query-details.component.js +2 -2
- package/esm2015/app/eo-framework/ui/eo-dialog/eo-dialog.component.js +3 -3
- package/esm2015/eo-sdk-client.js +24 -24
- package/esm2015/projects/eo-sdk/core/lib/service/user/user.service.js +2 -2
- package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js +1 -1
- package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js.map +1 -1
- package/fesm2015/eo-sdk-client.js +54 -20
- package/fesm2015/eo-sdk-client.js.map +1 -1
- package/package.json +2 -2
- package/projects/eo-sdk/core/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@ngx-translate/core"),require("@angular/core"),require("@angular/common/http"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@angular/common/locales/de-CH"),require("@angular/common/locales/extra/de-CH"),require("@angular/common/locales/de"),require("@angular/common/locales/extra/de"),require("@angular/common/locales/ar"),require("@angular/common/locales/extra/ar"),require("@angular/common/locales/es"),require("@angular/common/locales/extra/es"),require("@angular/common/locales/pt"),require("@angular/common/locales/extra/pt"),require("@angular/common/locales/fr"),require("@angular/common/locales/extra/fr"),require("@angular/common/locales/zh"),require("@angular/common/locales/extra/zh"),require("@angular/common/locales/zh-Hant"),require("@angular/common/locales/extra/zh-Hant"),require("@angular/common/locales/lv"),require("@angular/common/locales/extra/lv"),require("@angular/common/locales/ru"),require("@angular/common/locales/extra/ru"),require("@angular/common/locales/it"),require("@angular/common/locales/extra/it"),require("@angular/common/locales/nl"),require("@angular/common/locales/extra/nl"),require("@angular/common/locales/sk"),require("@angular/common/locales/extra/sk"),require("@angular/common/locales/pl"),require("@angular/common/locales/extra/pl"),require("@angular/common/locales/uk"),require("@angular/common/locales/extra/uk"),require("@angular/common/locales/ja"),require("@angular/common/locales/extra/ja"),require("@angular/common/locales/ko"),require("@angular/common/locales/extra/ko"),require("@angular/common/locales/hi"),require("@angular/common/locales/extra/hi"),require("@angular/common/locales/bn"),require("@angular/common/locales/extra/bn"),require("@angular/common/locales/vi"),require("@angular/common/locales/extra/vi"),require("@angular/common/locales/th"),require("@angular/common/locales/extra/th"),require("@angular/common/locales/en-GB"),require("@angular/common/locales/extra/en-GB"),require("@angular/common/locales/he"),require("@angular/common/locales/extra/he"),require("moment"),require("@ngx-pwa/local-storage"),require("file-saver"),require("lodash"),require("ngx-toastr")):"function"==typeof define&&define.amd?define("@eo-sdk/client/projects/eo-sdk/core",["exports","@ngx-translate/core","@angular/core","@angular/common/http","rxjs","rxjs/operators","@angular/common","@angular/common/locales/de-CH","@angular/common/locales/extra/de-CH","@angular/common/locales/de","@angular/common/locales/extra/de","@angular/common/locales/ar","@angular/common/locales/extra/ar","@angular/common/locales/es","@angular/common/locales/extra/es","@angular/common/locales/pt","@angular/common/locales/extra/pt","@angular/common/locales/fr","@angular/common/locales/extra/fr","@angular/common/locales/zh","@angular/common/locales/extra/zh","@angular/common/locales/zh-Hant","@angular/common/locales/extra/zh-Hant","@angular/common/locales/lv","@angular/common/locales/extra/lv","@angular/common/locales/ru","@angular/common/locales/extra/ru","@angular/common/locales/it","@angular/common/locales/extra/it","@angular/common/locales/nl","@angular/common/locales/extra/nl","@angular/common/locales/sk","@angular/common/locales/extra/sk","@angular/common/locales/pl","@angular/common/locales/extra/pl","@angular/common/locales/uk","@angular/common/locales/extra/uk","@angular/common/locales/ja","@angular/common/locales/extra/ja","@angular/common/locales/ko","@angular/common/locales/extra/ko","@angular/common/locales/hi","@angular/common/locales/extra/hi","@angular/common/locales/bn","@angular/common/locales/extra/bn","@angular/common/locales/vi","@angular/common/locales/extra/vi","@angular/common/locales/th","@angular/common/locales/extra/th","@angular/common/locales/en-GB","@angular/common/locales/extra/en-GB","@angular/common/locales/he","@angular/common/locales/extra/he","moment","@ngx-pwa/local-storage","file-saver","lodash","ngx-toastr"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["eo-sdk"]=e["eo-sdk"]||{},e["eo-sdk"].client=e["eo-sdk"].client||{},e["eo-sdk"].client.projects=e["eo-sdk"].client.projects||{},e["eo-sdk"].client.projects["eo-sdk"]=e["eo-sdk"].client.projects["eo-sdk"]||{},e["eo-sdk"].client.projects["eo-sdk"].core={}),e.core,e.ng.core,e.ng.common.http,e.rxjs,e.rxjs.operators,e.ng.common,e.ng.common.locales.deCH,e.ng.common.locales.extra.deCH,e.ng.common.locales.de,e.ng.common.locales.extra.de,e.ng.common.locales.ar,e.ng.common.locales.extra.ar,e.ng.common.locales.es,e.ng.common.locales.extra.es,e.ng.common.locales.pt,e.ng.common.locales.extra.pt,e.ng.common.locales.fr,e.ng.common.locales.extra.fr,e.ng.common.locales.zh,e.ng.common.locales.extra.zh,e.ng.common.locales.zhHant,e.ng.common.locales.extra.zhHant,e.ng.common.locales.lv,e.ng.common.locales.extra.lv,e.ng.common.locales.ru,e.ng.common.locales.extra.ru,e.ng.common.locales.it,e.ng.common.locales.extra.it,e.ng.common.locales.nl,e.ng.common.locales.extra.nl,e.ng.common.locales.sk,e.ng.common.locales.extra.sk,e.ng.common.locales.pl,e.ng.common.locales.extra.pl,e.ng.common.locales.uk,e.ng.common.locales.extra.uk,e.ng.common.locales.ja,e.ng.common.locales.extra.ja,e.ng.common.locales.ko,e.ng.common.locales.extra.ko,e.ng.common.locales.hi,e.ng.common.locales.extra.hi,e.ng.common.locales.bn,e.ng.common.locales.extra.bn,e.ng.common.locales.vi,e.ng.common.locales.extra.vi,e.ng.common.locales.th,e.ng.common.locales.extra.th,e.ng.common.locales.enGB,e.ng.common.locales.extra.enGB,e.ng.common.locales.he,e.ng.common.locales.extra.he,e.momentImported,e.localStorage,e.FileSaver,e._,e.ngxToastr)}(this,(function(e,t,r,n,o,i,s,a,c,u,p,l,h,f,d,m,g,y,b,v,S,E,T,O,C,I,x,k,_,A,w,R,P,D,j,N,F,U,L,M,B,H,q,Q,G,V,J,z,Y,K,W,$,Z,X,ee,te,re,ne){"use strict";function oe(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function ie(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var se=oe(a),ae=oe(c),ce=oe(u),ue=oe(p),pe=oe(l),le=oe(h),he=oe(f),fe=oe(d),de=oe(m),me=oe(g),ge=oe(y),ye=oe(b),be=oe(v),ve=oe(S),Se=oe(E),Ee=oe(T),Te=oe(O),Oe=oe(C),Ce=oe(I),Ie=oe(x),xe=oe(k),ke=oe(_),_e=oe(A),Ae=oe(w),we=oe(R),Re=oe(P),Pe=oe(D),De=oe(j),je=oe(N),Ne=oe(F),Fe=oe(U),Ue=oe(L),Le=oe(M),Me=oe(B),Be=oe(H),He=oe(q),qe=oe(Q),Qe=oe(G),Ge=oe(V),Ve=oe(J),Je=oe(z),ze=oe(Y),Ye=oe(K),Ke=oe(W),We=oe($),$e=oe(Z),Ze=ie(X),Xe=new r.InjectionToken("CUSTOM_CONFIG"),et=new r.InjectionToken("CORE_CONFIG"),tt=function(e){this.main=["assets/_default/config/main.json","assets/_default/config/extend.json"],this.translations=["assets/_default/i18n/"],this.environment={production:!0},this.withCredentials=!1,Object.assign(this,e)};function rt(e){return function(){return e.initialize()}}tt.ctorParameters=function(){return[{type:tt,decorators:[{type:r.Inject,args:[Xe]}]}]};var nt=function(){function e(){}return e.prototype.handle=function(e){return"!missing key: "+e.key},e}(),ot=function(){function e(e,t){this.http=e,this.config=t,s.registerLocaleData(ce.default,"de",ue.default),s.registerLocaleData(pe.default,"ar",le.default),s.registerLocaleData(he.default,"es",fe.default),s.registerLocaleData(de.default,"pt",me.default),s.registerLocaleData(ge.default,"fr",ye.default),s.registerLocaleData(be.default,"zh",ve.default),s.registerLocaleData(Te.default,"lv",Oe.default),s.registerLocaleData(Ce.default,"ru",Ie.default),s.registerLocaleData(xe.default,"it",ke.default),s.registerLocaleData(_e.default,"nl",Ae.default),s.registerLocaleData(we.default,"sk",Re.default),s.registerLocaleData(Pe.default,"pl",De.default),s.registerLocaleData(je.default,"uk",Ne.default),s.registerLocaleData(Fe.default,"ja",Ue.default),s.registerLocaleData(Le.default,"ko",Me.default),s.registerLocaleData(Be.default,"hi",He.default),s.registerLocaleData(qe.default,"bn",Qe.default),s.registerLocaleData(se.default,"de-CH",ae.default),s.registerLocaleData(Se.default,"zh-Hant",Ee.default),s.registerLocaleData(Je.default,"th",ze.default),s.registerLocaleData(Ge.default,"vi",Ve.default),s.registerLocaleData(Ye.default,"en-GB",Ke.default),s.registerLocaleData(We.default,"he",$e.default)}return e.prototype.getTranslation=function(e){var t=this;return o.forkJoin(this.config.translations.map((function(r){return t.loadTranslationFile(r,e)}))).pipe(i.map((function(e){return e.reduce((function(e,t){return Object.assign(e,t)}),{})})))},e.prototype.loadTranslationFile=function(e,t){var r=this;return this.http.get(""+e+t+".json").pipe(i.catchError((function(n){return t.length>2?r.loadTranslationFile(e,t.substring(0,2)):o.of({})})))},e}();ot.ctorParameters=function(){return[{type:n.HttpClient},{type:tt,decorators:[{type:r.Inject,args:[et]}]}]};var it,st=function(){function e(e,t,r,n){this.originalError=e,this._name=t,this._message=r,this._skipNotification=n}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name||this.originalError.name||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){return this._message||this.originalError.message||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stack",{get:function(){return this.originalError.stack},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.originalError.status},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.originalError.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skipNotification",{get:function(){return void 0===this._skipNotification?!!this.originalError.skipNotification:this._skipNotification},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isHttpErrorResponse",{get:function(){return this.originalError.isHttpErrorResponse||this.originalError instanceof n.HttpErrorResponse},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return this.originalError.toString()},e}();(it=e.QueryScope||(e.QueryScope={})).ALL="all",it.CONTENT="content",it.INDEX_DATA="indexdata";var at=function(){function e(){this.types=[],this.contextFolderTypes=[],this.filters=[],this.expertMode=!1,this.searchMode=e.DEFAULT_SEARCH_MODE,this.sortOptions=[],this.resolveReference=!0,this.state=new pt,this.highlighting=!1,this.withContext=!1}return e.prototype.addType=function(e){this.types.find((function(t){return t.id===e.id}))||this.types.push(e)},e.prototype.removeType=function(e){this.types=this.types.filter((function(t){return t.id!==e.id}))},e.prototype.toggleType=function(e){this.types.find((function(t){return t.id===e.id}))?this.removeType(e):this.types.push(e)},e.prototype.addFilter=function(e){e&&(this.getFilter(e.property)?(this.removeFilter(e.property),this.filters.push(e)):this.filters.push(e))},e.prototype.removeFilter=function(e){this.filters=this.filters.filter((function(t){return t.property!==e}))},e.prototype.toggleFilter=function(e,t){this.getFilter(e.property)?(this.removeFilter(e.property),t&&this.filters.push(e)):this.filters.push(e)},e.prototype.getFilter=function(e){return this.filters.find((function(t){return t.property===e}))},e.prototype.getTableFilters=function(e){return this.filters.filter((function(t){return t.property.startsWith(e+".")}))},e.prototype.addSortOption=function(e,t,r){this.sortOptions.find((function(t){return t.field===e}))||this.sortOptions.push(new ct(e,t,r))},e.prototype.removeSortOption=function(e){this.sortOptions=this.sortOptions.filter((function(t){return t.field!==e}))},e.prototype.getQueryJson=function(t){var r={};return this.types.length>0&&(r.types=this.types.map((function(e){return"string"==typeof e?e:e.name}))),this.contextFolderTypes.length>0&&(r.contextfoldertypes=this.contextFolderTypes.map((function(e){return e.name}))),this.filters.length>0&&(r.filters={},this.filters.forEach((function(e){r.filters[e.property]=e.toQuery()}))),this.term&&(r.term=this.term),this.fields&&(r.fields=this.fields),this.name&&(r.name=this.name),this.applyOptions()&&(r.options={},r.options.scope=this.scope,this.suggest&&(r.options.suggest=!0),this.expertMode&&(r.options.expertmode=!0),r.options.resolvereference=void 0===t||t,this.searchMode!==e.DEFAULT_SEARCH_MODE&&(r.options.searchmode=this.searchMode),this.sortOptions&&this.sortOptions.length&&(r.options.sort={},this.sortOptions.forEach((function(e){r.options.sort[e.field]={order:e.order}}))),this.highlighting&&(r.options.highlighting=this.highlighting),this.withContext&&(r.options.withcontext=this.withContext)),r},e.prototype.applyOptions=function(){return this.expertMode||!!this.scope||this.suggest||this.highlighting||this.resolveReference||this.withContext||this.searchMode!==e.DEFAULT_SEARCH_MODE||this.sortOptions.length>0},e}();at.BASE_PARAMS={TYPE:"type",CREATOR:"creator",CREATED:"created",MODIFIER:"modifier",MODIFIED:"modified",FILESIZE:"filesize",FILENAME:"filename",MIMETYPEGROUP:"mimetypegroup"},at.TIME_PERIOD_BUCKETS={TODAY:"today",YESTERDAY:"yesterday",THIS_WEEK:"thisweek",LAST_WEEK:"lastweek",THIS_MONTH:"thismonth",LAST_MONTH:"lastmonth",THIS_YEAR:"thisyear",LAST_YEAR:"lastyear"},at.MIMETYPEGROUP_BUCKETS={PDF:"pdf",MAIL:"mail",WORD:"word",IMAGE:"image",OCTET_STREAM:"octet-stream",TXT:"txt",EXCEL:"excel",POWERPOINT:"powerpoint",VIDEO:"video",HTML:"html",AUDIO:"audio",ZIP:"zip"},at.FILE_SIZE_BUCKETS={LT1MB:"lt1MB",LT10MB:"lt10MB",LT100MB:"lt100MB",GT100MB:"gt100MB"},at.UPDATE_CAUSE={TOGGLED_TYPE:"cause.type.toggled",TOGGLED_EXPERTMODE:"cause.expertmode.toggled",TERM_SET:"cause.term.set",TYPES_SET:"cause.types.set",CONTEXT_FOLDER_SET:"cause.contextfolder.set",TOGGLED_FILTER:"cause.filter.toggled",ADDED_FILTER:"cause.filter.added",REMOVED_FILTER:"cause.filter.removed"},at.DEFAULT_SEARCH_MODE="idxs",at.FULLTEXT_SEARCH_MODE="fts";var ct=function(e,t,r){this.field=e,this.order=t,this.missing=r},ut=function(e,t,r,n,o,i){void 0===e&&(e=[]),void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n=[]),void 0===o&&(o=[]),this.elements=e,this.sortorder=t,this.grouporder=r,this.pinned=n,this.alignmentx=o,this.mode=i},pt=function(){function e(){this.aggregations={type:new Map,contextType:new Map,created:[],modified:[],mimetypegroup:[],filesize:[]}}return Object.defineProperty(e.prototype,"totalCount",{get:function(){return Array.from(this.aggregations.type.values()).reduce((function(e,t){return e+t}),0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return!(this.count&&this.count.value)},enumerable:!1,configurable:!0}),e.prototype.addAggregations=function(e,t,r,n){switch(e){case"contexttype":this.aggregations.contextType.set(t,r);break;case at.BASE_PARAMS.TYPE:this.aggregations.type.set(t,r);break;case at.BASE_PARAMS.CREATED:this.aggregations.created.push({key:t,value:r});break;case at.BASE_PARAMS.MODIFIED:this.aggregations.modified.push({key:t,value:r});break;case at.BASE_PARAMS.MIMETYPEGROUP:this.aggregations.mimetypegroup.push({key:t,value:r});break;case at.BASE_PARAMS.FILESIZE:this.aggregations.filesize.push({key:t,value:r,from:n.from,to:n.to||1/0,label:t.replace("gt","> ").replace("lt","< ")})}},e}(),lt=function(){},ht=function(){function e(e,t,r,n,o){this.property=e,this.operator=t,this.firstValue=r,this.secondValue=n,this.transformDate=o}return e.prototype.formatDate=function(e){return this.transformDate&&e?this.transformDate.timezone?new s.DatePipe("en").transform(e,"yyyy-MM-ddTZ"):this.transformDate.time?new Date(e).toISOString().slice(0,16)+"Z":new s.DatePipe("en").transform(e,"yyyy-MM-dd"):e},e.prototype.toQuery=function(){return Object.assign({o:this.operator,v1:this.formatDate(this.firstValue)},this.secondValue&&{v2:this.formatDate(this.secondValue)})},e.prototype.toDateTimeQuery=function(){if(this.transformDate&&this.transformDate.timezone&&this.firstValue){var t=this.firstValue,r=this.secondValue,n=new Date(r||t);if(n.setHours(23,59,59,999),this.operator===e.OPERATOR.LESS_OR_EQUAL)t=n.toISOString();else{var o=new Date(t);this.operator===e.OPERATOR.GREATER_THAN||this.operator===e.OPERATOR.INTERVAL?o.setHours(23,59,59,999):o.setHours(0,0,0,0),t=o.toISOString()}return this.operator!==e.OPERATOR.INTERVAL_INCLUDE_BOTH&&this.operator!==e.OPERATOR.EQUAL||(r=n.toISOString()),Object.assign({o:this.operator===e.OPERATOR.EQUAL?e.OPERATOR.INTERVAL_INCLUDE_BOTH:this.operator,v1:t},r&&{v2:r})}return this.toQuery()},e.prototype.match=function(e,t,r,n){return this.property===e&&this.operator===t&&this.secondValue===n&&(this.firstValue instanceof Array?!!this.firstValue.find((function(e){return e===r})):this.firstValue===r)},e}();ht.OPERATOR={EQUAL:"eq",MATCH:"match",IN:"in",GREATER_THAN:"gt",GREATER_OR_EQUAL:"gte",LESS_THAN:"lt",LESS_OR_EQUAL:"lte",INTERVAL:"gtlt",INTERVAL_INCLUDE_BOTH:"gtelte",INTERVAL_INCLUDE_TO:"gtlte",INTERVAL_INCLUDE_FROM:"gtelt",RANGE:"rg"};var ft=function(){function e(e,t,r){this.operator=e,this.firstValue=t,this.secondValue=r}return e.getOperatorLabel=function(e){var t="?";switch(e){case ht.OPERATOR.EQUAL:t="=";break;case ht.OPERATOR.GREATER_OR_EQUAL:t=">=";break;case ht.OPERATOR.LESS_OR_EQUAL:t="<=";break;case ht.OPERATOR.INTERVAL_INCLUDE_BOTH:t="-"}return t},e}(),dt=Ze,mt=function(){function e(){}return e.buildUri=function(e,t){var r=Object.keys(t).filter((function(e){return t[e]||0===t[e]||!1===t[e]})).map((function(e){return e+"="+encodeURIComponent(t[e])})).join("&");return e+(r?"?"+r:"")},e.uuid=function(){return e._p8()+e._p8(!0)+e._p8(!0)+e._p8()},e.encodeFileName=function(t){return"=?UTF-8?Q?"+e.encodeToQuotedPrintable(e.encodeToUtf8(t)).replace(/_/g,"=5F")+"?="},e._p8=function(e){var t=(Math.random().toString(16)+"000000000").substr(2,8);return e?"-"+t.substr(0,4)+"-"+t.substr(4,4):t},e.encodeToUtf8=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t},e.quotedPrintable=function(e){if(e>"ÿ")throw RangeError("`encodeToQuotedPrintable` expects extended ASCII input only. Missing prior UTF-8 encoding?");return"="+("0"+e.charCodeAt(0).toString(16).toUpperCase()).slice(-2)},e.encodeToQuotedPrintable=function(e){return e.replace(/[\0-\b\n-\x1F=\x7F-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF]/g,this.quotedPrintable)},e.sortValues=function(t,r,n,o){void 0===t&&(t=""),void 0===r&&(r="asc");return function(i,s){var a,c=e.getProperty(i,t),u=e.getProperty(s,t);if("number"==typeof c&&"number"==typeof u)a=c-u;else{var p=c||0===c?c.toString():"",l=u||0===u?u.toString():"";a=p.localeCompare(l,n,o)}return"desc"===r?-1*a:a}},e.getProperty=function(e,t){return void 0===t&&(t=""),t?t.split(".").reduce((function(e,t){return(e||{})[t]}),e):e},e.empty=function(e){return function(e){return o.EMPTY}},e.catchSkip=function(e,t,r,n){return function(i){var s=t&&t(i),a=e&&e(i);return o.throwError(new st(s instanceof Error?s:i,r,n,a))}},e.catch=function(e,t,r,n){return function(i){var s=e&&e(i);return o.throwError(new st(s instanceof Error?s:i,t,r,n))}},e.throw=function(e,t,r,n){return function(o){var i=e&&e(o);throw new st(i instanceof Error?i:o,t,r,n)}},e.logError=function(t,r,n,o){return void 0===o&&(o=!0),e.throw(t,r,n,o)},e.isVisible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},e.getBaseHref=function(){return document.getElementsByTagName("base")[0].getAttribute("href")},e.truncateString=function(e,t,r){return void 0===r&&(r="..."),e.length>t&&(t>3&&(t-=3),e=""+e.substring(0,t)+r),e},e.getTimezoneOffset=function(){return dt().format("Z")},e.formatMailTo=function(e,t){return t&&e?Array.isArray(e)?e.join().replace(/,/g,"; "):e.replace(/,/g,"; "):e},e.arrayToObject=function(e,t,r){void 0===e&&(e=[]);var n="string"==typeof t?function(e){return e[t]}:t,o="string"==typeof r?function(e){return e[r]}:r;return e.reduce((function(e,t,r){return e[n?n(t):r]=o?o(t):t,e}),{})},e.formDataStringify=function(t){return JSON.stringify(t,(function(t,r){return r instanceof ft?"/"+e.PREF_RANGEVALUE+"("+JSON.stringify(r)+")/":r}))},e.formDataParse=function(t){return JSON.parse(t,(function(t,r){if("string"==typeof r&&r.startsWith("/"+e.PREF_RANGEVALUE+"(")&&r.endsWith(")/")){r=r.substring(e.PREF_RANGEVALUE.length+2,r.length-2);var n=JSON.parse(r);return new ft(n.operator,n.firstValue,n.secondValue)}return r}))},e}();mt.PREF_RANGEVALUE="RangeValue";var gt=function(){function e(){this.eventSource=new o.Subject,this.event$=this.eventSource.asObservable()}return e.prototype.trigger=function(e,t){this.eventSource.next({type:e,data:t})},e.prototype.on=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.event$.pipe(i.filter((function(t){return t&&!!e.find((function(e){return e===t.type}))})))},e}();gt.decorators=[{type:r.Injectable}],gt.ctorParameters=function(){return[]};var yt={LOGOUT:"eo.user.logout",CLIENT_LOCALE_CHANGED:"eo.user.locale.client.changed",SCHEMA_LOCALE_CHANGED:"eo.user.locale.schema.changed",DMS_OBJECT_LOADED:"eo.dms.object.loaded",DMS_OBJECT_DELETED:"eo.dms.object.deleted",DMS_OBJECT_VERSION_RESTORED:"eo.dms.object.version.restored",DMS_OBJECT_FAVORITE_ON:"eo.dms.object.favorite.on",DMS_OBJECT_FAVORITE_OFF:"eo.dms.object.favorite.off",DMS_OBJECT_UPDATED:"eo.dms.object.updated",DMS_OBJECT_PASTED:"eo.dms.object.pasted",INBOX_ITEM_CONFIRMED:"eo.inbox.item.confirmed",PROCESS_FILE_CHANGED:"eo.process.file.changed",EO_DIALOG_STACK_CHANGED:"eo.dialog.stack.changed",SYSTEM_STATUS_SCHEMA_CHANGED:"eo.status.schema",SYSTEM_STATUS_ORG_CHANGED:"eo.status.org",SYSTEM_STATUS_SEC_CHANGED:"eo.status.sec",SYSTEM_STATUS_ACL_CHANGED:"eo.status.acl",SYSTEM_STATUS_INBOX_CHANGED:"eo.status.inbox",EO_LICENSE_GRID:"eo_license_grid",SYSTEM_STATUS_IMAGE_CHANGE:"eo.status.image"},bt=function(){function e(e,t){this.translate=e,this.event=t,this.cfg=null,this.fixServiceUris=null}return e.prototype.initializeGrid=function(){this.event.trigger(yt.EO_LICENSE_GRID)},e.prototype.set=function(e){this.cfg=e,this.fixServiceUris=new Map([["serviceBase","/rest-ws/service"],["searchBase","/search"],["contextBase","/structure"],["inboxBase","/inboxservice"],["bpmBase","/bpm"],["agentBase","/agent"],["statusBase","/status"]]);var t=this.getClientLocales().map((function(e){return e.iso}));this.translate.addLangs(t),this.translate.setDefaultLang(this.getDefaultClientLocale()),this.initializeGrid()},e.prototype.getLoginBase=function(){return this.getContextPath()},e.prototype.getContextPath=function(){var e=this.getUri("contextPath")||this.getUri("loginBase");return e&&"/"!==e?e:""},e.prototype.getRaw=function(e){return e?mt.getProperty(this.cfg,e):this.cfg},e.prototype.getUri=function(e){return this.cfg.uri&&this.cfg.uri[e]||this.fixServiceUris.get(e)},e.prototype.getClientLocales=function(){return this.cfg.languages},e.prototype.getSupportedClientLocales=function(){return["en","de","ar","es","pt","fr","zh","lv","ru","it","nl","sk","pl","uk","ja","ko","hi","bn","de-CH","zh-Hant","th","vi","en-GB","he"]},e.prototype.getDashboardBackgroundImage=function(){return this.cfg.dashboardBackgroundImage},e.prototype.getSideBarHeaderImage=function(){return this.cfg.sideBarHeaderImage},e.prototype.getNavigationBarImage=function(){var e=this.cfg.navBarLogo;return e=e.endsWith(".svg")?e:"<svg></svg>"},e.prototype.getDefaultClientLocale=function(){var e=this.getClientLocales().find((function(e){return e.fallback}));return e?e.iso:"en"},e.prototype.getAgentConfig=function(){return this.cfg.agent},e}();bt.decorators=[{type:r.Injectable}],bt.ctorParameters=function(){return[{type:t.TranslateService},{type:gt}]};var vt=function(){function e(e,t){var r=this;this.storage=e,this.storageMap=t,this.SYSTEM_DEFINITION="eo.framework.cache.systemdefinition",this.HOSTS="eo.framework.cache.hosts",this.LOCATION_HISTORY="eo.framework.cache.locations.history",this.itemsMap=new Map,window._ngStorageRefresh=function(){return r.getStorage().subscribe((function(e){return r.setStorage(e).subscribe()&&console.log(e)}))}}return e.prototype.setItem=function(e,t,r){var n=this;if(void 0===r&&(r=500),r){if(!this.itemsMap.has(e)){var s=new o.Subject;s.pipe(i.debounceTime(r),i.switchMap((function(t){return n.storage.setItem(e,t)}))).subscribe(),this.itemsMap.set(e,s)}return this.itemsMap.get(e).next(t),o.of(!0)}return this.storage.setItem(e,t)},e.prototype.getItem=function(e){return this.storage.getItem(e).pipe(i.map((function(e){return"value"===Object.keys(e||{}).join()?e.value:e})))},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.clear=function(e){var t=this;return e?this.getStorageKeys().pipe(i.switchMap((function(r){var n=r.filter((function(t){return e(t)})).map((function(e){return t.removeItem(e)}));return n.length?o.forkJoin(n).pipe(i.map((function(){return!0}))):o.of(!0)}))):this.storage.clear()},e.prototype.getStorageKeys=function(){var e=this;return new o.Observable((function(t){var r=[];e.storageMap.keys().subscribe({next:function(e){return r.push(e)},complete:function(){return t.next(r)}})})).pipe(i.first())},e.prototype.getStorage=function(){var e=this;return this.getStorageKeys().pipe(i.switchMap((function(t){return t.length?o.forkJoin(mt.arrayToObject(t,(function(e){return e}),(function(t){return e.getItem(t)}))):o.of({})})))},e.prototype.setStorage=function(e){var t=this;return o.forkJoin(Object.keys(e||{}).map((function(r){return t.setItem(r,e[r])})))},e}();vt.decorators=[{type:r.Injectable}],vt.ctorParameters=function(){return[{type:ee.LocalStorage},{type:ee.StorageMap}]};var St=function(){function e(e){var t=e.user,r=e.schema;this.id=t.id,this.name=t.name,this.firstname=t.firstname,this.lastname=t.lastname,this.title=t.title,this.email=t.email,this.present=t.present,!0===t.hasimage&&(this.imageUri="/organization/image/"+this.id),this.userSettings="object"==typeof e.usersettings?e.usersettings:{},this.schema={version:r.version,supportedLocales:r.supportedlocales},this.privileges=t.privileges,this.roles=t.effectiveroles,this.deputies=t.deputies||[],this.substitutesOf=t.substitutesOf||[],this.schemaLocale=t.locale||this.getClientLocale()}return e.prototype.hasPrivilege=function(e){var t=!1;if(this.privileges)for(var r=0;!t&&r<this.privileges.length;)t=this.privileges[r].name===e,r++;return t},e.prototype.hasRole=function(e){var t=!1;if(this.roles)for(var r=0;!t&&r<this.roles.length;)t=this.roles[r].name===e,r++;return t},e.prototype.setImageBase=function(e){this.imageUri&&(this.imageUri=e+this.imageUri)},e.prototype.getClientLocale=function(){return this.userSettings.clientlocale||"en"},e.prototype.getSchemaLocale=function(){return this.schemaLocale},e}(),Et=function(){function e(){}return e.prototype.assert=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.group=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.groupEnd=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e}();Et.decorators=[{type:r.Injectable}];var Tt=function(){function e(e,t,r,n){this.http=e,this.coreConfig=t,this.logger=r,this.config=n,this.gridDataFilter=i.map((function(e){return null==e?void 0:e.filter((function(e){return!e.__removed}))})),this.cache=new Map,this.temp=new Map,this.headers=this.setDefaultHeaders(),this.authProfile={host:"",ntlm:!0}}return e.prototype.setAuthProfile=function(e){e&&(this.headers=this.setDefaultHeaders(),this.authProfile=e,this.authProfile.auth,this.headers.delete("Authorization"))},e.prototype.setHeader=function(e,t){t&&t.length&&(this.headers=this.headers.set(e,t))},e.prototype.getHeaders=function(){return this.headers},e.prototype.getHttpOptions=function(e){return Object.assign({headers:this.getHeaders(),withCredentials:this.coreConfig.withCredentials},e)},e.prototype.getServiceBase=function(){return this.config.getUri("serviceBase")},e.prototype.getSearchBase=function(){return this.config.getUri("searchBase")},e.prototype.getContextBase=function(){return this.config.getUri("contextBase")},e.prototype.getInboxBase=function(){return this.config.getUri("inboxBase")},e.prototype.getBpmBase=function(){return this.config.getUri("bpmBase")},e.prototype.getAgentBase=function(){return this.config.getUri("agentBase")},e.prototype.getStatusBase=function(){return this.config.getUri("statusBase")},e.prototype.getIconBase=function(e){return void 0===e&&(e=""),this.getServiceBase()+"/ui/icon/"+e},e.prototype.getHost=function(){return this.authProfile.host||""},e.prototype.getBaseWithContext=function(e){return(null==e?void 0:e.startsWith("/"))?this.config.getContextPath()+e:e},e.prototype.getContextPath=function(e){return this.getHost()+this.getBaseWithContext(e||this.getServiceBase())},e.prototype.get=function(e,t,r){return this.http.get(this.getContextPath(t)+e,this.getHttpOptions(r))},e.prototype.put=function(e,t,r,n){return this.http.put(this.getContextPath(r)+e,t,this.getHttpOptions(n))},e.prototype.getJson=function(e,t){return this.http.get(this.getContextPath(t)+e,this.getHttpOptions({responseType:"json"}))},e.prototype.post=function(e,t,r,n){var o=this.getContextPath(r),i=t?JSON.stringify(t):"";return this.http.post(""+o+e,i,this.getHttpOptions(n))},e.prototype.postMultiPart=function(e,t,r,n){var o=this.getContextPath(r),i=this.getHeaders();i.delete("Content-Type");var s=Object.assign({headers:i,withCredentials:this.coreConfig.withCredentials},n);return this.http.post(""+o+e,t,s)},e.prototype.del=function(e,t,r){return this.http.delete(this.getContextPath(t)+e,this.getHttpOptions(r))},e.prototype.update=function(e,t){return t.forEach((function(t){var r=t.id,n=t.item;if(r){var o=e.find((function(e){return e.id===r}));Object.assign(o,n,n?{__updated:!0}:{__removed:!0})}else n&&e.unshift(Object.assign(n,{__added:!0}))})),e},e.prototype.getViaCache=function(e){var t=this;return this.cache.has(e)?o.of(this.cache.get(e)):this.getViaTempCache(e,(function(){return t.http.get(e,{withCredentials:t.coreConfig.withCredentials,responseType:"text"}).pipe(i.tap((function(r){return t.cache.set(e,r)})))}))},e.prototype.getViaTempCache=function(e,t){var r=this;if(this.temp.has(e))return this.temp.get(e);var n=(t?t():this.get(e)).pipe(i.finalize((function(){return r.temp.delete(e)})),i.shareReplay(1));return this.temp.set(e,n),n},e.prototype.downloadContent=function(e,t,r){var n=this;e.forEach((function(e){if(e.content){var o=n.getServiceBase()+"/dms/"+e.content.id+"/content?type="+e.content.type+"&asdownload=true";o+=t?"&rendition="+t+"&_intent=DOWNLOAD_"+t:"&_intent=DOWNLOAD",e.content.id===e.id&&(o+="&version="+e.version),n.download(o,r?e.version:null)}else n.logger.error("The provided dms object has no content",e)}))},e.prototype.download=function(e,t){var r=this;this.http.get(e,{observe:"response",responseType:"blob",withCredentials:this.coreConfig.withCredentials}).subscribe((function(e){te.saveAs(e.body,r.getFileNameFromHttpResponse(e,t))}))},e.prototype.getFileNameFromHttpResponse=function(e,t){var r=e.headers.get("Content-Disposition")||"",n=r.match("filename\\*=UTF-8''(.*)")||r.match('filename="(.*)"'),o=n?n[1]:null,i=o?decodeURIComponent(o):"unknown",s=~i.lastIndexOf(".")?i.lastIndexOf("."):i.length;return t?i.slice(0,s)+"_v"+t+i.slice(s):i},e.prototype.setDefaultHeaders=function(){return new n.HttpHeaders({"Content-Type":"application/json","X-os-include-links":"false","X-os-include-actions":"false","X-os-sync-index":"true"})},e}();Tt.decorators=[{type:r.Injectable}],Tt.ctorParameters=function(){return[{type:n.HttpClient},{type:tt,decorators:[{type:r.Inject,args:[et]}]},{type:Et},{type:bt}]};var Ot,Ct=function(){function e(e){this.id=e.id,this.implements=e.implements?e.implements:[],this.isFolder=e.folder,this.isContextFolder=e.iscontextfolder,this.isAbstract=e.abstract,this.iconId=e.icon?e.icon.id:null,this.maxFiles=e.maxfiles,this.minFiles=e.minfiles,this.name=e.name,this.qname=e.qname,this.label=e.label,this.description=e.description,this.group=e.group?e.group.label:"",this.elements=e.elements,this.allowedcontexttypes=e.allowedcontexttypes?e.allowedcontexttypes:[],this.supertypes=e.supertypes?e.supertypes.map((function(e){return e.name})):[],this.shareable=e.shareable,this.parenttypes=this.getParentTypes(e.allowedlocations)}return e.prototype.getParentTypes=function(e){return e?e.parenttypes.map((function(e){return e.name})):[]},e}(),It=Ze,xt=function(){function e(e,t,r,n){var i=this;this.backend=e,this.logger=t,this.eventService=r,this.appCache=n,this.systemSource=new o.ReplaySubject,this.system$=this.systemSource.asObservable(),this.objectTypeForms=[],this.cachedRoles=[],this.eventService.on(yt.SYSTEM_STATUS_SCHEMA_CHANGED).subscribe((function(){i.fetchSystemDefinition(i.user)}))}return Object.defineProperty(e.prototype,"system",{get:function(){return JSON.parse(JSON.stringify(this._system))},set:function(e){this._system=e},enumerable:!1,configurable:!0}),e.prototype.getObjectTypes=function(){return this.system.types},e.prototype.getObjectType=function(e){return this.system.types.find((function(t){return t.name===e}))},e.prototype.getFormElementsFromFormModel=function(e,t,r){var n=this;return this.getObjectTypeForm(e,t,r?"CONTEXT":null).pipe(i.switchMap((function(e){var t=[];return n.processFormModelElements(e,t),o.of(t)})))},e.prototype.processFormModelElements=function(e,t){var r=this;e.elements.forEach((function(e){"o2mGroup"!==e.type&&"o2mGroupStack"!==e.type?t.push(e):e.elements&&e.elements.length&&r.processFormModelElements(e,t)}))},e.prototype.implementsType=function(e,t){return e.name===t||e.implements&&-1!==e.implements.indexOf(t)},e.prototype.getCodesystem=function(e){return this.system.codesystems.find((function(t){return t.id===e||t.name===e}))},e.prototype.getObjectTypeForm=function(e,t,r){for(var n,s=this,a=0;!n&&a<this.objectTypeForms.length;)this.objectTypeForms[a].name===e&&this.objectTypeForms[a].mode===r&&this.objectTypeForms[a].situation===t&&(n=this.objectTypeForms[a]),a++;if(n)return o.of(re.cloneDeep(n));var c="/ui/form/"+e+"?situation="+t;return c+=r?"&formmode="+r:"",this.backend.getViaTempCache(c,(function(){return s.backend.getJson(c).pipe(i.tap((function(e){return s.objectTypeForms.push(re.cloneDeep(e))})))}))},e.prototype.getSystemDefinition=function(e){return this.user=e,this.fetchSystemDefinition(e)},e.prototype.getDefaultValue=function(e){var t;switch(e){case"CURRENT_USER":t=this.user.name;break;case"CURRENT_USER_NAME":t=this.user.title;break;case"CURRENT_DATETIME":t=new Date;break;case"CURRENT_DATE":t=It().startOf("day").toDate();break;case"YEAR":t=It().year();break;case"MONTH":t=It().month()+1;break;case"DAY":t=It().date();break;case"HOUR":t=It().hour();break;case"MINUTE":t=It().minute();break;case"SECOND":t=It().second();break;case"WEEK_OF_YEAR":t=It().isoWeek();break;case"FIRST_DAY_OF_WEEK":t=It().startOf("isoWeek").toDate();break;case"FIRST_DAY_OF_MONTH":t=It().startOf("month").toDate();break;case"FIRST_DAY_OF_YEAR":t=It().startOf("year").toDate()}return t},e.prototype.fetchSystemDefinition=function(e){var t=this,r=[this.backend.getJson("/system/type/list?elements=true&basetypes=true"),this.backend.getJson("/system/cs/list?elements=true")];return o.forkJoin(r).pipe(i.catchError(mt.catch((function(e){t.logger.error("Error fetching recent version of system definition from server.",e),t.systemSource.error("Error fetching recent version of system definition from server.")}))),i.map((function(r){t.objectTypeForms=[];var n={info:{user:e.id,locale:e.getSchemaLocale(),version:e.schema.version},locales:e.schema.supportedLocales,types:[],codesystems:[]},o=r[0];return n.types=o.map((function(e){return new Ct(e)})),n.codesystems=r[1],t.system=n,t.systemSource.next(n),t.logger.debug("Fetched new version of system definition (user: "+e.id+", version: "+e.schema.version+")."),t.appCache.setItem(t.appCache.SYSTEM_DEFINITION,n).subscribe((function(){t.logger.debug("Cached recent version")}),mt.logError(null,"Error caching recent version of system definition.")),!0})))},e.prototype.getOrganizationObjectById=function(e){return this.backend.getJson("/organization/id/"+e)},e.prototype.getOrganizationObject=function(e){return this.getOrganizationObjects([e]).pipe(i.map((function(e){return e[0]})))},e.prototype.getOrganizationObjects=function(e){var t=this,r=e.map((function(e){return t.backend.getJson("/organization/name/"+e).pipe(i.catchError((function(t){return o.of({id:e,active:!1})})))}));return o.forkJoin(r)},e.prototype.getRoles=function(){var e=this;return this.cachedRoles.length?o.of(this.cachedRoles):this.backend.get("/organization/role").pipe(i.map((function(e){return e})),i.tap((function(t){return e.cachedRoles=t})))},e}();xt.decorators=[{type:r.Injectable}],xt.ctorParameters=function(){return[{type:Tt},{type:Et},{type:gt},{type:vt}]},(Ot=e.Direction||(e.Direction={})).LTR="ltr",Ot.RTL="rtl";var kt=function(){function t(e,t,r,n,s,a,c){this.backend=e,this.translate=t,this.logger=r,this.eventService=n,this.system=s,this.http=a,this.config=c,this.USER_FETCH_URI="/user?favorites=true&privileges=true&roles=true&deputies=true&substitutesOf=true",this.user=null,this.userSource=new o.BehaviorSubject(this.user),this.user$=this.userSource.asObservable(),this.favorites=null,this.favoritesSource=new o.BehaviorSubject(this.favorites),this.favoritesGridData$=this.favoritesSource.asObservable().pipe(i.debounceTime(100),i.filter((function(e){return e}))),this.favorites$=this.favoritesGridData$.pipe(this.backend.gridDataFilter),this.notifications=null,this.notificationsSource=new o.BehaviorSubject(this.notifications),this.notificationsGridData$=this.notificationsSource.asObservable().pipe(i.debounceTime(100),i.filter((function(e){return e}))),this.notifications$=this.notificationsGridData$.pipe(this.backend.gridDataFilter)}return t.prototype.getCurrentUser=function(){return this.user},t.prototype.setPresence=function(e){var t=this;return e!==this.user.present?this.backend.put("/user?presence="+e).pipe(i.tap((function(r){t.user.present=e,t.userSource.next(t.user)}))):o.of(null)},t.prototype.delUserImage=function(e){return this.http.put(e,null)},t.prototype.setUserImage=function(e){return this.backend.put("/user/image",e)},t.prototype.setDeputies=function(e){var t=this;return this.backend.put("/user/deputy?user="+e.join("&user=")).pipe(i.tap((function(){return t.refreshCurrentUser().subscribe()})))},t.prototype.changeClientLocale=function(t){var r=this;this.user.userSettings.clientlocale=t,this.backend.put("/user/config/web",this.user.userSettings).subscribe((function(){r.logger.debug("Changed client locale to '"+t+"'"),r.translate.use(t),r.user.uiDirection=(r.config.getClientLocales().find((function(e){return e.iso===t}))||{}).dir||e.Direction.LTR,r.userSource.next(r.user),r.eventService.trigger(yt.CLIENT_LOCALE_CHANGED,t)}))},t.prototype.changeSchemaLocale=function(e){var t=this;return this.user.schemaLocale=e,this.backend.put("/user/locale/"+this.user.schemaLocale).pipe(i.tap((function(){t.logger.debug("Changed schema locale to '"+e+"'"),t.userSource.next(t.user),t.backend.setHeader("Accept-Language",t.user.getSchemaLocale()),t.logger.debug("Loading system definition for new locale."),t.system.getSystemDefinition(t.user).subscribe(),t.eventService.trigger(yt.SCHEMA_LOCALE_CHANGED,e)})))},t.prototype.setCurrentUser=function(t){this.user=new St(t),this.passwordValidationSettings=t.passwortvalidation,this.user.setImageBase(this.backend.getServiceBase()),this.backend.setHeader("Accept-Language",this.user.getSchemaLocale());var r=this.config.getClientLocales().map((function(e){return e.iso})),n=this.user.getClientLocale();-1===r.indexOf(n)&&(n=this.config.getDefaultClientLocale()),this.logger.debug("Setting client locale to '"+n+"'"),this.translate.use(n),this.user.uiDirection=(this.config.getClientLocales().find((function(e){return e.iso===n}))||{}).dir||e.Direction.LTR,this.userSource.next(this.user),this.favorites=null,this.favoritesSource.next(this.favorites),this.notifications=null,this.notificationsSource.next(this.notifications)},t.prototype.getFavorites=function(){var e=this;return this.backend.getJson("/user/favorites").pipe(i.map((function(e){return e&&e.filter((function(e){return"DMS_OBJECT"===e.favoritetype}))})),i.tap((function(t){e.favorites=t,e.favoritesSource.next(e.favorites)})))},t.prototype.updateFavorites=function(e,t,r){this.backend.update(this.favorites,r||[{id:e,item:t}])&&this.favoritesSource.next(this.favorites)},t.prototype.getNotifications=function(){var e=[this.getSubscription(),this.getResubmission()];return o.forkJoin(e)},t.prototype.getResubmission=function(){var e=this;return this.backend.getJson("/messageprovider/resubmission/list").pipe(i.tap((function(t){e.notifications=t,e.notificationsSource.next(e.notifications)})))},t.prototype.getSubscription=function(){var e=this;return this.backend.getJson("/messageprovider/subscription/list").pipe(i.tap((function(t){e.notifications=t,e.notificationsSource.next(e.notifications)})))},t.prototype.removeNotifications=function(e,t){var r,n=this;switch(t){case"SUBSCRIPTION":r="subscription";break;case"RESUBMISSION":r="resubmission";break;default:return}return this.backend.del("/messageprovider/"+r+"/"+e).pipe(i.tap((function(e){return n.updateNotifications("")})))},t.prototype.updateNotifications=function(e,t,r){this.backend.update(this.notifications,r||[{id:e,item:t}])&&this.notificationsSource.next(this.notifications)},t.prototype.getUserImageUri=function(e){return this.backend.getServiceBase()+"/organization/image/"+e+"?usedefault=false"},t.prototype.removeFavorite=function(e){var t=this;return this.backend.del("/user/favorite/"+e).pipe(i.tap((function(r){return t.updateFavorites(e)})))},t.prototype.createFavorite=function(e,t,r){var n=this,o=mt.buildUri("/dms/favorite/"+e,{type:t,title:r});return this.backend.post(o,{}).pipe(i.tap((function(e){return n.getFavorites().subscribe()})))},t.prototype.removeFavoritesForTarget=function(e){var t=this;return this.backend.del("/dms/favorite/"+e).pipe(i.tap((function(r){var n=t.favorites.filter((function(t){return t.target.id===e})).map((function(e){return Object.assign({id:e.id})}));t.updateFavorites(null,null,n)})))},t.prototype.changeLockSetting=function(e){var t=this;return this.user.userSettings.alwayslock=e,this.backend.put("/user/config/web",this.user.userSettings).pipe(i.map((function(){t.refreshCurrentUser().subscribe()})))},t.prototype.hasPrivilege=function(e){return!!this.user.privileges.find((function(t){return t.name===e}))},t.prototype.changePassword=function(e){return this.backend.put("/user/password",e)},t.prototype.refreshCurrentUser=function(){var e=this;return this.backend.get(this.USER_FETCH_URI).pipe(i.map((function(t){return e.setCurrentUser(t)})))},t.prototype.validatePassword=function(e){return e.length<this.passwordValidationSettings.minlength?{type:"short",amount:this.passwordValidationSettings.minlength}:e.replace(/[^0-9]/g,"").length<this.passwordValidationSettings.minnumber?{type:"number",amount:this.passwordValidationSettings.minnumber}:e.replace(/[a-zA-Z0-9ß ]/g,"").length<this.passwordValidationSettings.minspecialchars?{type:"specialchars",amount:this.passwordValidationSettings.minspecialchars}:{type:"valid",amount:null}},t}();kt.decorators=[{type:r.Injectable}],kt.ctorParameters=function(){return[{type:Tt},{type:t.TranslateService},{type:Et},{type:gt},{type:xt},{type:n.HttpClient},{type:bt}]};var _t=function(){function e(e){Object.assign(this,e)}return Object.defineProperty(e.prototype,"title",{get:function(){return this.selectedtype?this.selectedtype.label:""},enumerable:!1,configurable:!0}),e.prototype.hasContent=function(){return!!this.template||this.contentcount>0},e.prototype.getSelectedTypeObject=function(){return this.types.find((function(e){return e.selected}))},e}(),At=function(){function e(e,t,r){this.coreConfig=e,this.http=t,this.userService=r}return e.prototype.upload=function(e,t){var r=new FormData,o=new n.HttpHeaders({"Accept-Language":this.userService.getCurrentUser().getClientLocale()});return t.forEach((function(e){return r.append("files[]",e,mt.encodeFileName(e.name))})),this.http.post(e,r,{headers:o,withCredentials:this.coreConfig.withCredentials})},e}();At.decorators=[{type:r.Injectable}],At.ctorParameters=function(){return[{type:tt,decorators:[{type:r.Inject,args:[et]}]},{type:n.HttpClient},{type:kt}]};var wt=function(){function e(e,t){this.id=e,this.type=t}return e.prototype.onUploadSuccess=function(e){return e},e.prototype.onUploadFail=function(){return{}},e}();wt.ROOT="root",wt.CONTEXT="context",wt.CONTEXT_TREE="contexttree",wt.OBJECT="object",wt.CUSTOM="custom";var Rt=function(){function e(e,t){this.backend=e,this.uploadService=t,this.preparedItemsSource=new o.ReplaySubject(1),this.preparedItems$=this.preparedItemsSource.asObservable(),this.preparedItemCountSource=new o.ReplaySubject(1),this.preparedItemCount$=this.preparedItemCountSource.asObservable()}return e.prototype.refreshPreparedItemsCount=function(){this.fetchPreparedItemsCount()},e.prototype.fetchPreparedItemsCount=function(){var e=this;this.backend.getJson("/prepare/state").pipe(i.map((function(e){return e.count}))).subscribe((function(t){e.preparedItemCount=t,e.preparedItemCountSource.next(e.preparedItemCount)}))},e.prototype.createPreparedItem=function(e,t){var r=this;return this.backend.post(this.createPreparedItemPostUrl({parentId:e,childType:t||null}),{}).pipe(i.tap((function(){return r.getPreparedItems$()})))},e.prototype.updatePreparedItemIndexData=function(e,t){var r=this;return this.backend.put("/prepare/"+e,t).pipe(i.tap((function(){return r.getPreparedItems$()})))},e.prototype.createPreparedItemPostUrl=function(e){var t=e.createMany?"/prepare/createmany":"/prepare/create";return e&&(t=mt.buildUri(t,e)),t},e.prototype.getPreparedItems$=function(e){return this.fetchPreparedItems(e).subscribe(),this.preparedItems$},e.prototype.fetchPreparedItems=function(e){var t=this,r=e?"/prepare":"/prepare?form=true";return this.backend.getJson(r).pipe(i.map((function(e){return e.map((function(e){return new _t(e)}))})),i.tap((function(){return t.fetchPreparedItemsCount()})),i.tap((function(e){return t.preparedItemsSource.next(e.sort(mt.sortValues("created","desc")))})))},e.prototype.deletePreparedItem=function(e){var t=this;return this.backend.del("/prepare/"+e).pipe(i.tap((function(){return t.getPreparedItems$()})))},e.prototype.getPrepareRootTypes=function(){return this.backend.getViaTempCache("/prepare/types").pipe(i.map((function(e){return e.types.map((function(e){return new Ct(e)}))})))},e.prototype.getPrepareChildTypes=function(e,t){var r=e?{parentId:e,withcontent:t}:{withcontent:t},n=mt.buildUri("/prepare/types",r);return this.backend.getViaTempCache(n).pipe(i.map((function(e){return{parent:e.parent,types:e.types.map((function(e){return new Ct(e)}))}})))},e.prototype.getPreviewUri=function(e,t,r){return mt.buildUri(this.backend.getServiceBase()+"/prepare/"+e+"/content",{rendition:r,index:t})},e.prototype.updateChildType=function(e,t){return this.backend.put("/prepare/"+t+"/"+e+"?form=true&contentmeta=true").pipe(i.map((function(e){return new _t(e)})))},e.prototype.addTemplate=function(e,t){return this.backend.put("/prepare/"+e+"/template?templateid="+t).pipe(i.map((function(e){return new _t(e)})))},e.prototype.getTemplates=function(e){return this.backend.getJson("/template/list?type="+e).pipe(i.map((function(e){return e})))},e.prototype.getTemplatePreviewUri=function(e,t){return mt.buildUri(this.backend.getServiceBase()+"/template/"+e+"/content",{rendition:t})},e.prototype.commitPreparedItem=function(e,t,r){var n=this;return this.backend.put("/prepare/"+e+"/"+t).pipe(i.mergeMap((function(){return n.backend.post("/prepare/commit/"+e,r)})),i.tap((function(){return n.getPreparedItems$()})),i.map((function(e){return e.id})))},e.prototype.uploadContent=function(e,t){var r=this.backend.getServiceBase()+"/prepare/"+e+"/content.json?form=true&contentmeta=true";return this.uploadService.upload(r,[t]).pipe()},e.prototype.uploadToTarget=function(e,t,r){var n=this,o=t.map((function(e){return e._file}));return this.uploadService.upload(this.getUploadTarget(e,r),o).pipe(i.tap((function(){return n.getPreparedItems$()})))},e.prototype.getUploadTarget=function(e,t){var r;if(e.type===wt.ROOT)r=this.backend.getServiceBase()+this.createPreparedItemPostUrl({parentId:null,createMany:!t});else if(e.type===wt.OBJECT){var n=e.referenceObject;r=this.backend.getServiceBase()+"/dms/"+n.id+"/contents?type="+n.type.name}else e.type!==wt.CONTEXT&&e.type!==wt.CONTEXT_TREE||(r=this.backend.getServiceBase()+this.createPreparedItemPostUrl({parentId:e.referenceObject.id,createMany:!t,childType:e.subFolder&&e.subFolder.data.type?e.subFolder.data.type:null}));return r},e.prototype.deletePreparedItemContent=function(e,t){var r="/prepare/"+e+"/content"+(void 0!==t?"?index="+t:"");return this.backend.del(r).pipe(i.map((function(e){return new _t(e)})))},e}();Rt.decorators=[{type:r.Injectable}],Rt.ctorParameters=function(){return[{type:Tt},{type:At}]};
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@ngx-translate/core"),require("@angular/core"),require("@angular/common/http"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@angular/common/locales/de-CH"),require("@angular/common/locales/extra/de-CH"),require("@angular/common/locales/de"),require("@angular/common/locales/extra/de"),require("@angular/common/locales/ar"),require("@angular/common/locales/extra/ar"),require("@angular/common/locales/es"),require("@angular/common/locales/extra/es"),require("@angular/common/locales/pt"),require("@angular/common/locales/extra/pt"),require("@angular/common/locales/fr"),require("@angular/common/locales/extra/fr"),require("@angular/common/locales/zh"),require("@angular/common/locales/extra/zh"),require("@angular/common/locales/zh-Hant"),require("@angular/common/locales/extra/zh-Hant"),require("@angular/common/locales/lv"),require("@angular/common/locales/extra/lv"),require("@angular/common/locales/ru"),require("@angular/common/locales/extra/ru"),require("@angular/common/locales/it"),require("@angular/common/locales/extra/it"),require("@angular/common/locales/nl"),require("@angular/common/locales/extra/nl"),require("@angular/common/locales/sk"),require("@angular/common/locales/extra/sk"),require("@angular/common/locales/pl"),require("@angular/common/locales/extra/pl"),require("@angular/common/locales/uk"),require("@angular/common/locales/extra/uk"),require("@angular/common/locales/ja"),require("@angular/common/locales/extra/ja"),require("@angular/common/locales/ko"),require("@angular/common/locales/extra/ko"),require("@angular/common/locales/hi"),require("@angular/common/locales/extra/hi"),require("@angular/common/locales/bn"),require("@angular/common/locales/extra/bn"),require("@angular/common/locales/vi"),require("@angular/common/locales/extra/vi"),require("@angular/common/locales/th"),require("@angular/common/locales/extra/th"),require("@angular/common/locales/en-GB"),require("@angular/common/locales/extra/en-GB"),require("@angular/common/locales/he"),require("@angular/common/locales/extra/he"),require("moment"),require("@ngx-pwa/local-storage"),require("file-saver"),require("lodash"),require("ngx-toastr")):"function"==typeof define&&define.amd?define("@eo-sdk/client/projects/eo-sdk/core",["exports","@ngx-translate/core","@angular/core","@angular/common/http","rxjs","rxjs/operators","@angular/common","@angular/common/locales/de-CH","@angular/common/locales/extra/de-CH","@angular/common/locales/de","@angular/common/locales/extra/de","@angular/common/locales/ar","@angular/common/locales/extra/ar","@angular/common/locales/es","@angular/common/locales/extra/es","@angular/common/locales/pt","@angular/common/locales/extra/pt","@angular/common/locales/fr","@angular/common/locales/extra/fr","@angular/common/locales/zh","@angular/common/locales/extra/zh","@angular/common/locales/zh-Hant","@angular/common/locales/extra/zh-Hant","@angular/common/locales/lv","@angular/common/locales/extra/lv","@angular/common/locales/ru","@angular/common/locales/extra/ru","@angular/common/locales/it","@angular/common/locales/extra/it","@angular/common/locales/nl","@angular/common/locales/extra/nl","@angular/common/locales/sk","@angular/common/locales/extra/sk","@angular/common/locales/pl","@angular/common/locales/extra/pl","@angular/common/locales/uk","@angular/common/locales/extra/uk","@angular/common/locales/ja","@angular/common/locales/extra/ja","@angular/common/locales/ko","@angular/common/locales/extra/ko","@angular/common/locales/hi","@angular/common/locales/extra/hi","@angular/common/locales/bn","@angular/common/locales/extra/bn","@angular/common/locales/vi","@angular/common/locales/extra/vi","@angular/common/locales/th","@angular/common/locales/extra/th","@angular/common/locales/en-GB","@angular/common/locales/extra/en-GB","@angular/common/locales/he","@angular/common/locales/extra/he","moment","@ngx-pwa/local-storage","file-saver","lodash","ngx-toastr"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self)["eo-sdk"]=e["eo-sdk"]||{},e["eo-sdk"].client=e["eo-sdk"].client||{},e["eo-sdk"].client.projects=e["eo-sdk"].client.projects||{},e["eo-sdk"].client.projects["eo-sdk"]=e["eo-sdk"].client.projects["eo-sdk"]||{},e["eo-sdk"].client.projects["eo-sdk"].core={}),e.core,e.ng.core,e.ng.common.http,e.rxjs,e.rxjs.operators,e.ng.common,e.ng.common.locales.deCH,e.ng.common.locales.extra.deCH,e.ng.common.locales.de,e.ng.common.locales.extra.de,e.ng.common.locales.ar,e.ng.common.locales.extra.ar,e.ng.common.locales.es,e.ng.common.locales.extra.es,e.ng.common.locales.pt,e.ng.common.locales.extra.pt,e.ng.common.locales.fr,e.ng.common.locales.extra.fr,e.ng.common.locales.zh,e.ng.common.locales.extra.zh,e.ng.common.locales.zhHant,e.ng.common.locales.extra.zhHant,e.ng.common.locales.lv,e.ng.common.locales.extra.lv,e.ng.common.locales.ru,e.ng.common.locales.extra.ru,e.ng.common.locales.it,e.ng.common.locales.extra.it,e.ng.common.locales.nl,e.ng.common.locales.extra.nl,e.ng.common.locales.sk,e.ng.common.locales.extra.sk,e.ng.common.locales.pl,e.ng.common.locales.extra.pl,e.ng.common.locales.uk,e.ng.common.locales.extra.uk,e.ng.common.locales.ja,e.ng.common.locales.extra.ja,e.ng.common.locales.ko,e.ng.common.locales.extra.ko,e.ng.common.locales.hi,e.ng.common.locales.extra.hi,e.ng.common.locales.bn,e.ng.common.locales.extra.bn,e.ng.common.locales.vi,e.ng.common.locales.extra.vi,e.ng.common.locales.th,e.ng.common.locales.extra.th,e.ng.common.locales.enGB,e.ng.common.locales.extra.enGB,e.ng.common.locales.he,e.ng.common.locales.extra.he,e.momentImported,e.localStorage,e.FileSaver,e._,e.ngxToastr)}(this,(function(e,t,r,n,o,i,s,a,c,u,p,l,h,f,d,m,g,y,b,v,S,E,T,O,C,I,x,k,_,A,w,R,P,D,j,N,F,U,L,M,B,H,q,Q,G,V,J,z,Y,K,W,$,Z,X,ee,te,re,ne){"use strict";function oe(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function ie(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var se=oe(a),ae=oe(c),ce=oe(u),ue=oe(p),pe=oe(l),le=oe(h),he=oe(f),fe=oe(d),de=oe(m),me=oe(g),ge=oe(y),ye=oe(b),be=oe(v),ve=oe(S),Se=oe(E),Ee=oe(T),Te=oe(O),Oe=oe(C),Ce=oe(I),Ie=oe(x),xe=oe(k),ke=oe(_),_e=oe(A),Ae=oe(w),we=oe(R),Re=oe(P),Pe=oe(D),De=oe(j),je=oe(N),Ne=oe(F),Fe=oe(U),Ue=oe(L),Le=oe(M),Me=oe(B),Be=oe(H),He=oe(q),qe=oe(Q),Qe=oe(G),Ge=oe(V),Ve=oe(J),Je=oe(z),ze=oe(Y),Ye=oe(K),Ke=oe(W),We=oe($),$e=oe(Z),Ze=ie(X),Xe=new r.InjectionToken("CUSTOM_CONFIG"),et=new r.InjectionToken("CORE_CONFIG"),tt=function(e){this.main=["assets/_default/config/main.json","assets/_default/config/extend.json"],this.translations=["assets/_default/i18n/"],this.environment={production:!0},this.withCredentials=!1,Object.assign(this,e)};function rt(e){return function(){return e.initialize()}}tt.ctorParameters=function(){return[{type:tt,decorators:[{type:r.Inject,args:[Xe]}]}]};var nt=function(){function e(){}return e.prototype.handle=function(e){return"!missing key: "+e.key},e}(),ot=function(){function e(e,t){this.http=e,this.config=t,s.registerLocaleData(ce.default,"de",ue.default),s.registerLocaleData(pe.default,"ar",le.default),s.registerLocaleData(he.default,"es",fe.default),s.registerLocaleData(de.default,"pt",me.default),s.registerLocaleData(ge.default,"fr",ye.default),s.registerLocaleData(be.default,"zh",ve.default),s.registerLocaleData(Te.default,"lv",Oe.default),s.registerLocaleData(Ce.default,"ru",Ie.default),s.registerLocaleData(xe.default,"it",ke.default),s.registerLocaleData(_e.default,"nl",Ae.default),s.registerLocaleData(we.default,"sk",Re.default),s.registerLocaleData(Pe.default,"pl",De.default),s.registerLocaleData(je.default,"uk",Ne.default),s.registerLocaleData(Fe.default,"ja",Ue.default),s.registerLocaleData(Le.default,"ko",Me.default),s.registerLocaleData(Be.default,"hi",He.default),s.registerLocaleData(qe.default,"bn",Qe.default),s.registerLocaleData(se.default,"de-CH",ae.default),s.registerLocaleData(Se.default,"zh-Hant",Ee.default),s.registerLocaleData(Je.default,"th",ze.default),s.registerLocaleData(Ge.default,"vi",Ve.default),s.registerLocaleData(Ye.default,"en-GB",Ke.default),s.registerLocaleData(We.default,"he",$e.default)}return e.prototype.getTranslation=function(e){var t=this;return o.forkJoin(this.config.translations.map((function(r){return t.loadTranslationFile(r,e)}))).pipe(i.map((function(e){return e.reduce((function(e,t){return Object.assign(e,t)}),{})})))},e.prototype.loadTranslationFile=function(e,t){var r=this;return this.http.get(""+e+t+".json").pipe(i.catchError((function(n){return t.length>2?r.loadTranslationFile(e,t.substring(0,2)):o.of({})})))},e}();ot.ctorParameters=function(){return[{type:n.HttpClient},{type:tt,decorators:[{type:r.Inject,args:[et]}]}]};var it,st=function(){function e(e,t,r,n){this.originalError=e,this._name=t,this._message=r,this._skipNotification=n}return Object.defineProperty(e.prototype,"name",{get:function(){return this._name||this.originalError.name||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){return this._message||this.originalError.message||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stack",{get:function(){return this.originalError.stack},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.originalError.status},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this.originalError.url},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skipNotification",{get:function(){return void 0===this._skipNotification?!!this.originalError.skipNotification:this._skipNotification},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isHttpErrorResponse",{get:function(){return this.originalError.isHttpErrorResponse||this.originalError instanceof n.HttpErrorResponse},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return this.originalError.toString()},e}();(it=e.QueryScope||(e.QueryScope={})).ALL="all",it.CONTENT="content",it.INDEX_DATA="indexdata";var at=function(){function e(){this.types=[],this.contextFolderTypes=[],this.filters=[],this.expertMode=!1,this.searchMode=e.DEFAULT_SEARCH_MODE,this.sortOptions=[],this.resolveReference=!0,this.state=new pt,this.highlighting=!1,this.withContext=!1}return e.prototype.addType=function(e){this.types.find((function(t){return t.id===e.id}))||this.types.push(e)},e.prototype.removeType=function(e){this.types=this.types.filter((function(t){return t.id!==e.id}))},e.prototype.toggleType=function(e){this.types.find((function(t){return t.id===e.id}))?this.removeType(e):this.types.push(e)},e.prototype.addFilter=function(e){e&&(this.getFilter(e.property)?(this.removeFilter(e.property),this.filters.push(e)):this.filters.push(e))},e.prototype.removeFilter=function(e){this.filters=this.filters.filter((function(t){return t.property!==e}))},e.prototype.toggleFilter=function(e,t){this.getFilter(e.property)?(this.removeFilter(e.property),t&&this.filters.push(e)):this.filters.push(e)},e.prototype.getFilter=function(e){return this.filters.find((function(t){return t.property===e}))},e.prototype.getTableFilters=function(e){return this.filters.filter((function(t){return t.property.startsWith(e+".")}))},e.prototype.addSortOption=function(e,t,r){this.sortOptions.find((function(t){return t.field===e}))||this.sortOptions.push(new ct(e,t,r))},e.prototype.removeSortOption=function(e){this.sortOptions=this.sortOptions.filter((function(t){return t.field!==e}))},e.prototype.getQueryJson=function(t){var r={};return this.types.length>0&&(r.types=this.types.map((function(e){return"string"==typeof e?e:e.name}))),this.contextFolderTypes.length>0&&(r.contextfoldertypes=this.contextFolderTypes.map((function(e){return e.name}))),this.filters.length>0&&(r.filters={},this.filters.forEach((function(e){r.filters[e.property]=e.toQuery()}))),this.term&&(r.term=this.term),this.fields&&(r.fields=this.fields),this.name&&(r.name=this.name),this.applyOptions()&&(r.options={},r.options.scope=this.scope,this.suggest&&(r.options.suggest=!0),this.expertMode&&(r.options.expertmode=!0),r.options.resolvereference=void 0===t||t,this.searchMode!==e.DEFAULT_SEARCH_MODE&&(r.options.searchmode=this.searchMode),this.sortOptions&&this.sortOptions.length&&(r.options.sort={},this.sortOptions.forEach((function(e){r.options.sort[e.field]={order:e.order}}))),this.highlighting&&(r.options.highlighting=this.highlighting),this.withContext&&(r.options.withcontext=this.withContext)),r},e.prototype.applyOptions=function(){return this.expertMode||!!this.scope||this.suggest||this.highlighting||this.resolveReference||this.withContext||this.searchMode!==e.DEFAULT_SEARCH_MODE||this.sortOptions.length>0},e}();at.BASE_PARAMS={TYPE:"type",CREATOR:"creator",CREATED:"created",MODIFIER:"modifier",MODIFIED:"modified",FILESIZE:"filesize",FILENAME:"filename",MIMETYPEGROUP:"mimetypegroup"},at.TIME_PERIOD_BUCKETS={TODAY:"today",YESTERDAY:"yesterday",THIS_WEEK:"thisweek",LAST_WEEK:"lastweek",THIS_MONTH:"thismonth",LAST_MONTH:"lastmonth",THIS_YEAR:"thisyear",LAST_YEAR:"lastyear"},at.MIMETYPEGROUP_BUCKETS={PDF:"pdf",MAIL:"mail",WORD:"word",IMAGE:"image",OCTET_STREAM:"octet-stream",TXT:"txt",EXCEL:"excel",POWERPOINT:"powerpoint",VIDEO:"video",HTML:"html",AUDIO:"audio",ZIP:"zip"},at.FILE_SIZE_BUCKETS={LT1MB:"lt1MB",LT10MB:"lt10MB",LT100MB:"lt100MB",GT100MB:"gt100MB"},at.UPDATE_CAUSE={TOGGLED_TYPE:"cause.type.toggled",TOGGLED_EXPERTMODE:"cause.expertmode.toggled",TERM_SET:"cause.term.set",TYPES_SET:"cause.types.set",CONTEXT_FOLDER_SET:"cause.contextfolder.set",TOGGLED_FILTER:"cause.filter.toggled",ADDED_FILTER:"cause.filter.added",REMOVED_FILTER:"cause.filter.removed"},at.DEFAULT_SEARCH_MODE="idxs",at.FULLTEXT_SEARCH_MODE="fts";var ct=function(e,t,r){this.field=e,this.order=t,this.missing=r},ut=function(e,t,r,n,o,i){void 0===e&&(e=[]),void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n=[]),void 0===o&&(o=[]),this.elements=e,this.sortorder=t,this.grouporder=r,this.pinned=n,this.alignmentx=o,this.mode=i},pt=function(){function e(){this.aggregations={type:new Map,contextType:new Map,created:[],modified:[],mimetypegroup:[],filesize:[]}}return Object.defineProperty(e.prototype,"totalCount",{get:function(){return Array.from(this.aggregations.type.values()).reduce((function(e,t){return e+t}),0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEmpty",{get:function(){return!(this.count&&this.count.value)},enumerable:!1,configurable:!0}),e.prototype.addAggregations=function(e,t,r,n){switch(e){case"contexttype":this.aggregations.contextType.set(t,r);break;case at.BASE_PARAMS.TYPE:this.aggregations.type.set(t,r);break;case at.BASE_PARAMS.CREATED:this.aggregations.created.push({key:t,value:r});break;case at.BASE_PARAMS.MODIFIED:this.aggregations.modified.push({key:t,value:r});break;case at.BASE_PARAMS.MIMETYPEGROUP:this.aggregations.mimetypegroup.push({key:t,value:r});break;case at.BASE_PARAMS.FILESIZE:this.aggregations.filesize.push({key:t,value:r,from:n.from,to:n.to||1/0,label:t.replace("gt","> ").replace("lt","< ")})}},e}(),lt=function(){},ht=function(){function e(e,t,r,n,o){this.property=e,this.operator=t,this.firstValue=r,this.secondValue=n,this.transformDate=o}return e.prototype.formatDate=function(e){return this.transformDate&&e?this.transformDate.timezone?new s.DatePipe("en").transform(e,"yyyy-MM-ddTZ"):this.transformDate.time?new Date(e).toISOString().slice(0,16)+"Z":new s.DatePipe("en").transform(e,"yyyy-MM-dd"):e},e.prototype.toQuery=function(){return Object.assign({o:this.operator,v1:this.formatDate(this.firstValue)},this.secondValue&&{v2:this.formatDate(this.secondValue)})},e.prototype.toDateTimeQuery=function(){if(this.transformDate&&this.transformDate.timezone&&this.firstValue){var t=this.firstValue,r=this.secondValue,n=new Date(r||t);if(n.setHours(23,59,59,999),this.operator===e.OPERATOR.LESS_OR_EQUAL)t=n.toISOString();else{var o=new Date(t);this.operator===e.OPERATOR.GREATER_THAN||this.operator===e.OPERATOR.INTERVAL?o.setHours(23,59,59,999):o.setHours(0,0,0,0),t=o.toISOString()}return this.operator!==e.OPERATOR.INTERVAL_INCLUDE_BOTH&&this.operator!==e.OPERATOR.EQUAL||(r=n.toISOString()),Object.assign({o:this.operator===e.OPERATOR.EQUAL?e.OPERATOR.INTERVAL_INCLUDE_BOTH:this.operator,v1:t},r&&{v2:r})}return this.toQuery()},e.prototype.match=function(e,t,r,n){return this.property===e&&this.operator===t&&this.secondValue===n&&(this.firstValue instanceof Array?!!this.firstValue.find((function(e){return e===r})):this.firstValue===r)},e}();ht.OPERATOR={EQUAL:"eq",MATCH:"match",IN:"in",GREATER_THAN:"gt",GREATER_OR_EQUAL:"gte",LESS_THAN:"lt",LESS_OR_EQUAL:"lte",INTERVAL:"gtlt",INTERVAL_INCLUDE_BOTH:"gtelte",INTERVAL_INCLUDE_TO:"gtlte",INTERVAL_INCLUDE_FROM:"gtelt",RANGE:"rg"};var ft=function(){function e(e,t,r){this.operator=e,this.firstValue=t,this.secondValue=r}return e.getOperatorLabel=function(e){var t="?";switch(e){case ht.OPERATOR.EQUAL:t="=";break;case ht.OPERATOR.GREATER_OR_EQUAL:t=">=";break;case ht.OPERATOR.LESS_OR_EQUAL:t="<=";break;case ht.OPERATOR.INTERVAL_INCLUDE_BOTH:t="-"}return t},e}(),dt=Ze,mt=function(){function e(){}return e.buildUri=function(e,t){var r=Object.keys(t).filter((function(e){return t[e]||0===t[e]||!1===t[e]})).map((function(e){return e+"="+encodeURIComponent(t[e])})).join("&");return e+(r?"?"+r:"")},e.uuid=function(){return e._p8()+e._p8(!0)+e._p8(!0)+e._p8()},e.encodeFileName=function(t){return"=?UTF-8?Q?"+e.encodeToQuotedPrintable(e.encodeToUtf8(t)).replace(/_/g,"=5F")+"?="},e._p8=function(e){var t=(Math.random().toString(16)+"000000000").substr(2,8);return e?"-"+t.substr(0,4)+"-"+t.substr(4,4):t},e.encodeToUtf8=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);n<128?t+=String.fromCharCode(n):n>127&&n<2048?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t},e.quotedPrintable=function(e){if(e>"ÿ")throw RangeError("`encodeToQuotedPrintable` expects extended ASCII input only. Missing prior UTF-8 encoding?");return"="+("0"+e.charCodeAt(0).toString(16).toUpperCase()).slice(-2)},e.encodeToQuotedPrintable=function(e){return e.replace(/[\0-\b\n-\x1F=\x7F-\uD7FF\uDC00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF]/g,this.quotedPrintable)},e.sortValues=function(t,r,n,o){void 0===t&&(t=""),void 0===r&&(r="asc");return function(i,s){var a,c=e.getProperty(i,t),u=e.getProperty(s,t);if("number"==typeof c&&"number"==typeof u)a=c-u;else{var p=c||0===c?c.toString():"",l=u||0===u?u.toString():"";a=p.localeCompare(l,n,o)}return"desc"===r?-1*a:a}},e.getProperty=function(e,t){return void 0===t&&(t=""),t?t.split(".").reduce((function(e,t){return(e||{})[t]}),e):e},e.empty=function(e){return function(e){return o.EMPTY}},e.catchSkip=function(e,t,r,n){return function(i){var s=t&&t(i),a=e&&e(i);return o.throwError(new st(s instanceof Error?s:i,r,n,a))}},e.catch=function(e,t,r,n){return function(i){var s=e&&e(i);return o.throwError(new st(s instanceof Error?s:i,t,r,n))}},e.throw=function(e,t,r,n){return function(o){var i=e&&e(o);throw new st(i instanceof Error?i:o,t,r,n)}},e.logError=function(t,r,n,o){return void 0===o&&(o=!0),e.throw(t,r,n,o)},e.isVisible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},e.getBaseHref=function(){return document.getElementsByTagName("base")[0].getAttribute("href")},e.truncateString=function(e,t,r){return void 0===r&&(r="..."),e.length>t&&(t>3&&(t-=3),e=""+e.substring(0,t)+r),e},e.getTimezoneOffset=function(){return dt().format("Z")},e.formatMailTo=function(e,t){return t&&e?Array.isArray(e)?e.join().replace(/,/g,"; "):e.replace(/,/g,"; "):e},e.arrayToObject=function(e,t,r){void 0===e&&(e=[]);var n="string"==typeof t?function(e){return e[t]}:t,o="string"==typeof r?function(e){return e[r]}:r;return e.reduce((function(e,t,r){return e[n?n(t):r]=o?o(t):t,e}),{})},e.formDataStringify=function(t){return JSON.stringify(t,(function(t,r){return r instanceof ft?"/"+e.PREF_RANGEVALUE+"("+JSON.stringify(r)+")/":r}))},e.formDataParse=function(t){return JSON.parse(t,(function(t,r){if("string"==typeof r&&r.startsWith("/"+e.PREF_RANGEVALUE+"(")&&r.endsWith(")/")){r=r.substring(e.PREF_RANGEVALUE.length+2,r.length-2);var n=JSON.parse(r);return new ft(n.operator,n.firstValue,n.secondValue)}return r}))},e}();mt.PREF_RANGEVALUE="RangeValue";var gt=function(){function e(){this.eventSource=new o.Subject,this.event$=this.eventSource.asObservable()}return e.prototype.trigger=function(e,t){this.eventSource.next({type:e,data:t})},e.prototype.on=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.event$.pipe(i.filter((function(t){return t&&!!e.find((function(e){return e===t.type}))})))},e}();gt.decorators=[{type:r.Injectable}],gt.ctorParameters=function(){return[]};var yt={LOGOUT:"eo.user.logout",CLIENT_LOCALE_CHANGED:"eo.user.locale.client.changed",SCHEMA_LOCALE_CHANGED:"eo.user.locale.schema.changed",DMS_OBJECT_LOADED:"eo.dms.object.loaded",DMS_OBJECT_DELETED:"eo.dms.object.deleted",DMS_OBJECT_VERSION_RESTORED:"eo.dms.object.version.restored",DMS_OBJECT_FAVORITE_ON:"eo.dms.object.favorite.on",DMS_OBJECT_FAVORITE_OFF:"eo.dms.object.favorite.off",DMS_OBJECT_UPDATED:"eo.dms.object.updated",DMS_OBJECT_PASTED:"eo.dms.object.pasted",INBOX_ITEM_CONFIRMED:"eo.inbox.item.confirmed",PROCESS_FILE_CHANGED:"eo.process.file.changed",EO_DIALOG_STACK_CHANGED:"eo.dialog.stack.changed",SYSTEM_STATUS_SCHEMA_CHANGED:"eo.status.schema",SYSTEM_STATUS_ORG_CHANGED:"eo.status.org",SYSTEM_STATUS_SEC_CHANGED:"eo.status.sec",SYSTEM_STATUS_ACL_CHANGED:"eo.status.acl",SYSTEM_STATUS_INBOX_CHANGED:"eo.status.inbox",EO_LICENSE_GRID:"eo_license_grid",SYSTEM_STATUS_IMAGE_CHANGE:"eo.status.image"},bt=function(){function e(e,t){this.translate=e,this.event=t,this.cfg=null,this.fixServiceUris=null}return e.prototype.initializeGrid=function(){this.event.trigger(yt.EO_LICENSE_GRID)},e.prototype.set=function(e){this.cfg=e,this.fixServiceUris=new Map([["serviceBase","/rest-ws/service"],["searchBase","/search"],["contextBase","/structure"],["inboxBase","/inboxservice"],["bpmBase","/bpm"],["agentBase","/agent"],["statusBase","/status"]]);var t=this.getClientLocales().map((function(e){return e.iso}));this.translate.addLangs(t),this.translate.setDefaultLang(this.getDefaultClientLocale()),this.initializeGrid()},e.prototype.getLoginBase=function(){return this.getContextPath()},e.prototype.getContextPath=function(){var e=this.getUri("contextPath")||this.getUri("loginBase");return e&&"/"!==e?e:""},e.prototype.getRaw=function(e){return e?mt.getProperty(this.cfg,e):this.cfg},e.prototype.getUri=function(e){return this.cfg.uri&&this.cfg.uri[e]||this.fixServiceUris.get(e)},e.prototype.getClientLocales=function(){return this.cfg.languages},e.prototype.getSupportedClientLocales=function(){return["en","de","ar","es","pt","fr","zh","lv","ru","it","nl","sk","pl","uk","ja","ko","hi","bn","de-CH","zh-Hant","th","vi","en-GB","he"]},e.prototype.getDashboardBackgroundImage=function(){return this.cfg.dashboardBackgroundImage},e.prototype.getSideBarHeaderImage=function(){return this.cfg.sideBarHeaderImage},e.prototype.getNavigationBarImage=function(){var e=this.cfg.navBarLogo;return e=e.endsWith(".svg")?e:"<svg></svg>"},e.prototype.getDefaultClientLocale=function(){var e=this.getClientLocales().find((function(e){return e.fallback}));return e?e.iso:"en"},e.prototype.getAgentConfig=function(){return this.cfg.agent},e}();bt.decorators=[{type:r.Injectable}],bt.ctorParameters=function(){return[{type:t.TranslateService},{type:gt}]};var vt=function(){function e(e,t){var r=this;this.storage=e,this.storageMap=t,this.SYSTEM_DEFINITION="eo.framework.cache.systemdefinition",this.HOSTS="eo.framework.cache.hosts",this.LOCATION_HISTORY="eo.framework.cache.locations.history",this.itemsMap=new Map,window._ngStorageRefresh=function(){return r.getStorage().subscribe((function(e){return r.setStorage(e).subscribe()&&console.log(e)}))}}return e.prototype.setItem=function(e,t,r){var n=this;if(void 0===r&&(r=500),r){if(!this.itemsMap.has(e)){var s=new o.Subject;s.pipe(i.debounceTime(r),i.switchMap((function(t){return n.storage.setItem(e,t)}))).subscribe(),this.itemsMap.set(e,s)}return this.itemsMap.get(e).next(t),o.of(!0)}return this.storage.setItem(e,t)},e.prototype.getItem=function(e){return this.storage.getItem(e).pipe(i.map((function(e){return"value"===Object.keys(e||{}).join()?e.value:e})))},e.prototype.removeItem=function(e){return this.storage.removeItem(e)},e.prototype.clear=function(e){var t=this;return e?this.getStorageKeys().pipe(i.switchMap((function(r){var n=r.filter((function(t){return e(t)})).map((function(e){return t.removeItem(e)}));return n.length?o.forkJoin(n).pipe(i.map((function(){return!0}))):o.of(!0)}))):this.storage.clear()},e.prototype.getStorageKeys=function(){var e=this;return new o.Observable((function(t){var r=[];e.storageMap.keys().subscribe({next:function(e){return r.push(e)},complete:function(){return t.next(r)}})})).pipe(i.first())},e.prototype.getStorage=function(){var e=this;return this.getStorageKeys().pipe(i.switchMap((function(t){return t.length?o.forkJoin(mt.arrayToObject(t,(function(e){return e}),(function(t){return e.getItem(t)}))):o.of({})})))},e.prototype.setStorage=function(e){var t=this;return o.forkJoin(Object.keys(e||{}).map((function(r){return t.setItem(r,e[r])})))},e}();vt.decorators=[{type:r.Injectable}],vt.ctorParameters=function(){return[{type:ee.LocalStorage},{type:ee.StorageMap}]};var St=function(){function e(e){var t=e.user,r=e.schema;this.id=t.id,this.name=t.name,this.firstname=t.firstname,this.lastname=t.lastname,this.title=t.title,this.email=t.email,this.present=t.present,!0===t.hasimage&&(this.imageUri="/organization/image/"+this.id),this.userSettings="object"==typeof e.usersettings?e.usersettings:{},this.schema={version:r.version,supportedLocales:r.supportedlocales},this.privileges=t.privileges,this.roles=t.effectiveroles,this.deputies=t.deputies||[],this.substitutesOf=t.substitutesOf||[],this.schemaLocale=t.locale||this.getClientLocale()}return e.prototype.hasPrivilege=function(e){var t=!1;if(this.privileges)for(var r=0;!t&&r<this.privileges.length;)t=this.privileges[r].name===e,r++;return t},e.prototype.hasRole=function(e){var t=!1;if(this.roles)for(var r=0;!t&&r<this.roles.length;)t=this.roles[r].name===e,r++;return t},e.prototype.setImageBase=function(e){this.imageUri&&(this.imageUri=e+this.imageUri)},e.prototype.getClientLocale=function(){return this.userSettings.clientlocale||"en"},e.prototype.getSchemaLocale=function(){return this.schemaLocale},e}(),Et=function(){function e(){}return e.prototype.assert=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.group=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.groupEnd=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e}();Et.decorators=[{type:r.Injectable}];var Tt=function(){function e(e,t,r,n){this.http=e,this.coreConfig=t,this.logger=r,this.config=n,this.gridDataFilter=i.map((function(e){return null==e?void 0:e.filter((function(e){return!e.__removed}))})),this.cache=new Map,this.temp=new Map,this.headers=this.setDefaultHeaders(),this.authProfile={host:"",ntlm:!0}}return e.prototype.setAuthProfile=function(e){e&&(this.headers=this.setDefaultHeaders(),this.authProfile=e,this.authProfile.auth,this.headers.delete("Authorization"))},e.prototype.setHeader=function(e,t){t&&t.length&&(this.headers=this.headers.set(e,t))},e.prototype.getHeaders=function(){return this.headers},e.prototype.getHttpOptions=function(e){return Object.assign({headers:this.getHeaders(),withCredentials:this.coreConfig.withCredentials},e)},e.prototype.getServiceBase=function(){return this.config.getUri("serviceBase")},e.prototype.getSearchBase=function(){return this.config.getUri("searchBase")},e.prototype.getContextBase=function(){return this.config.getUri("contextBase")},e.prototype.getInboxBase=function(){return this.config.getUri("inboxBase")},e.prototype.getBpmBase=function(){return this.config.getUri("bpmBase")},e.prototype.getAgentBase=function(){return this.config.getUri("agentBase")},e.prototype.getStatusBase=function(){return this.config.getUri("statusBase")},e.prototype.getIconBase=function(e){return void 0===e&&(e=""),this.getServiceBase()+"/ui/icon/"+e},e.prototype.getHost=function(){return this.authProfile.host||""},e.prototype.getBaseWithContext=function(e){return(null==e?void 0:e.startsWith("/"))?this.config.getContextPath()+e:e},e.prototype.getContextPath=function(e){return this.getHost()+this.getBaseWithContext(e||this.getServiceBase())},e.prototype.get=function(e,t,r){return this.http.get(this.getContextPath(t)+e,this.getHttpOptions(r))},e.prototype.put=function(e,t,r,n){return this.http.put(this.getContextPath(r)+e,t,this.getHttpOptions(n))},e.prototype.getJson=function(e,t){return this.http.get(this.getContextPath(t)+e,this.getHttpOptions({responseType:"json"}))},e.prototype.post=function(e,t,r,n){var o=this.getContextPath(r),i=t?JSON.stringify(t):"";return this.http.post(""+o+e,i,this.getHttpOptions(n))},e.prototype.postMultiPart=function(e,t,r,n){var o=this.getContextPath(r),i=this.getHeaders();i.delete("Content-Type");var s=Object.assign({headers:i,withCredentials:this.coreConfig.withCredentials},n);return this.http.post(""+o+e,t,s)},e.prototype.del=function(e,t,r){return this.http.delete(this.getContextPath(t)+e,this.getHttpOptions(r))},e.prototype.update=function(e,t){return t.forEach((function(t){var r=t.id,n=t.item;if(r){var o=e.find((function(e){return e.id===r}));Object.assign(o,n,n?{__updated:!0}:{__removed:!0})}else n&&e.unshift(Object.assign(n,{__added:!0}))})),e},e.prototype.getViaCache=function(e){var t=this;return this.cache.has(e)?o.of(this.cache.get(e)):this.getViaTempCache(e,(function(){return t.http.get(e,{withCredentials:t.coreConfig.withCredentials,responseType:"text"}).pipe(i.tap((function(r){return t.cache.set(e,r)})))}))},e.prototype.getViaTempCache=function(e,t){var r=this;if(this.temp.has(e))return this.temp.get(e);var n=(t?t():this.get(e)).pipe(i.finalize((function(){return r.temp.delete(e)})),i.shareReplay(1));return this.temp.set(e,n),n},e.prototype.downloadContent=function(e,t,r){var n=this;e.forEach((function(e){if(e.content){var o=n.getServiceBase()+"/dms/"+e.content.id+"/content?type="+e.content.type+"&asdownload=true";o+=t?"&rendition="+t+"&_intent=DOWNLOAD_"+t:"&_intent=DOWNLOAD",e.content.id===e.id&&(o+="&version="+e.version),n.download(o,r?e.version:null)}else n.logger.error("The provided dms object has no content",e)}))},e.prototype.download=function(e,t){var r=this;this.http.get(e,{observe:"response",responseType:"blob",withCredentials:this.coreConfig.withCredentials}).subscribe((function(e){te.saveAs(e.body,r.getFileNameFromHttpResponse(e,t))}))},e.prototype.getFileNameFromHttpResponse=function(e,t){var r=e.headers.get("Content-Disposition")||"",n=r.match("filename\\*=UTF-8''(.*)")||r.match('filename="(.*)"'),o=n?n[1]:null,i=o?decodeURIComponent(o):"unknown",s=~i.lastIndexOf(".")?i.lastIndexOf("."):i.length;return t?i.slice(0,s)+"_v"+t+i.slice(s):i},e.prototype.setDefaultHeaders=function(){return new n.HttpHeaders({"Content-Type":"application/json","X-os-include-links":"false","X-os-include-actions":"false","X-os-sync-index":"true"})},e}();Tt.decorators=[{type:r.Injectable}],Tt.ctorParameters=function(){return[{type:n.HttpClient},{type:tt,decorators:[{type:r.Inject,args:[et]}]},{type:Et},{type:bt}]};var Ot,Ct=function(){function e(e){this.id=e.id,this.implements=e.implements?e.implements:[],this.isFolder=e.folder,this.isContextFolder=e.iscontextfolder,this.isAbstract=e.abstract,this.iconId=e.icon?e.icon.id:null,this.maxFiles=e.maxfiles,this.minFiles=e.minfiles,this.name=e.name,this.qname=e.qname,this.label=e.label,this.description=e.description,this.group=e.group?e.group.label:"",this.elements=e.elements,this.allowedcontexttypes=e.allowedcontexttypes?e.allowedcontexttypes:[],this.supertypes=e.supertypes?e.supertypes.map((function(e){return e.name})):[],this.shareable=e.shareable,this.parenttypes=this.getParentTypes(e.allowedlocations)}return e.prototype.getParentTypes=function(e){return e?e.parenttypes.map((function(e){return e.name})):[]},e}(),It=Ze,xt=function(){function e(e,t,r,n){var i=this;this.backend=e,this.logger=t,this.eventService=r,this.appCache=n,this.systemSource=new o.ReplaySubject,this.system$=this.systemSource.asObservable(),this.objectTypeForms=[],this.cachedRoles=[],this.eventService.on(yt.SYSTEM_STATUS_SCHEMA_CHANGED).subscribe((function(){i.fetchSystemDefinition(i.user)}))}return Object.defineProperty(e.prototype,"system",{get:function(){return JSON.parse(JSON.stringify(this._system))},set:function(e){this._system=e},enumerable:!1,configurable:!0}),e.prototype.getObjectTypes=function(){return this.system.types},e.prototype.getObjectType=function(e){return this.system.types.find((function(t){return t.name===e}))},e.prototype.getFormElementsFromFormModel=function(e,t,r){var n=this;return this.getObjectTypeForm(e,t,r?"CONTEXT":null).pipe(i.switchMap((function(e){var t=[];return n.processFormModelElements(e,t),o.of(t)})))},e.prototype.processFormModelElements=function(e,t){var r=this;e.elements.forEach((function(e){"o2mGroup"!==e.type&&"o2mGroupStack"!==e.type?t.push(e):e.elements&&e.elements.length&&r.processFormModelElements(e,t)}))},e.prototype.implementsType=function(e,t){return e.name===t||e.implements&&-1!==e.implements.indexOf(t)},e.prototype.getCodesystem=function(e){return this.system.codesystems.find((function(t){return t.id===e||t.name===e}))},e.prototype.getObjectTypeForm=function(e,t,r){for(var n,s=this,a=0;!n&&a<this.objectTypeForms.length;)this.objectTypeForms[a].name===e&&this.objectTypeForms[a].mode===r&&this.objectTypeForms[a].situation===t&&(n=this.objectTypeForms[a]),a++;if(n)return o.of(re.cloneDeep(n));var c="/ui/form/"+e+"?situation="+t;return c+=r?"&formmode="+r:"",this.backend.getViaTempCache(c,(function(){return s.backend.getJson(c).pipe(i.tap((function(e){return s.objectTypeForms.push(re.cloneDeep(e))})))}))},e.prototype.getSystemDefinition=function(e){return this.user=e,this.fetchSystemDefinition(e)},e.prototype.getDefaultValue=function(e){var t;switch(e){case"CURRENT_USER":t=this.user.name;break;case"CURRENT_USER_NAME":t=this.user.title;break;case"CURRENT_DATETIME":t=new Date;break;case"CURRENT_DATE":t=It().startOf("day").toDate();break;case"YEAR":t=It().year();break;case"MONTH":t=It().month()+1;break;case"DAY":t=It().date();break;case"HOUR":t=It().hour();break;case"MINUTE":t=It().minute();break;case"SECOND":t=It().second();break;case"WEEK_OF_YEAR":t=It().isoWeek();break;case"FIRST_DAY_OF_WEEK":t=It().startOf("isoWeek").toDate();break;case"FIRST_DAY_OF_MONTH":t=It().startOf("month").toDate();break;case"FIRST_DAY_OF_YEAR":t=It().startOf("year").toDate()}return t},e.prototype.fetchSystemDefinition=function(e){var t=this,r=[this.backend.getJson("/system/type/list?elements=true&basetypes=true"),this.backend.getJson("/system/cs/list?elements=true")];return o.forkJoin(r).pipe(i.catchError(mt.catch((function(e){t.logger.error("Error fetching recent version of system definition from server.",e),t.systemSource.error("Error fetching recent version of system definition from server.")}))),i.map((function(r){t.objectTypeForms=[];var n={info:{user:e.id,locale:e.getSchemaLocale(),version:e.schema.version},locales:e.schema.supportedLocales,types:[],codesystems:[]},o=r[0];return n.types=o.map((function(e){return new Ct(e)})),n.codesystems=r[1],t.system=n,t.systemSource.next(n),t.logger.debug("Fetched new version of system definition (user: "+e.id+", version: "+e.schema.version+")."),t.appCache.setItem(t.appCache.SYSTEM_DEFINITION,n).subscribe((function(){t.logger.debug("Cached recent version")}),mt.logError(null,"Error caching recent version of system definition.")),!0})))},e.prototype.getOrganizationObjectById=function(e){return this.backend.getJson("/organization/id/"+e)},e.prototype.getOrganizationObject=function(e){return this.getOrganizationObjects([e]).pipe(i.map((function(e){return e[0]})))},e.prototype.getOrganizationObjects=function(e){var t=this,r=e.map((function(e){return t.backend.getJson("/organization/name/"+e).pipe(i.catchError((function(t){return o.of({id:e,active:!1})})))}));return o.forkJoin(r)},e.prototype.getRoles=function(){var e=this;return this.cachedRoles.length?o.of(this.cachedRoles):this.backend.get("/organization/role").pipe(i.map((function(e){return e})),i.tap((function(t){return e.cachedRoles=t})))},e}();xt.decorators=[{type:r.Injectable}],xt.ctorParameters=function(){return[{type:Tt},{type:Et},{type:gt},{type:vt}]},(Ot=e.Direction||(e.Direction={})).LTR="ltr",Ot.RTL="rtl";var kt=function(){function t(e,t,r,n,s,a,c){this.backend=e,this.translate=t,this.logger=r,this.eventService=n,this.system=s,this.http=a,this.config=c,this.USER_FETCH_URI="/user?favorites=true&privileges=true&roles=true&deputies=true&substitutesOf=true",this.user=null,this.userSource=new o.BehaviorSubject(this.user),this.user$=this.userSource.asObservable(),this.favorites=null,this.favoritesSource=new o.BehaviorSubject(this.favorites),this.favoritesGridData$=this.favoritesSource.asObservable().pipe(i.debounceTime(100),i.filter((function(e){return e}))),this.favorites$=this.favoritesGridData$.pipe(this.backend.gridDataFilter),this.notifications=null,this.notificationsSource=new o.BehaviorSubject(this.notifications),this.notificationsGridData$=this.notificationsSource.asObservable().pipe(i.debounceTime(100),i.filter((function(e){return e}))),this.notifications$=this.notificationsGridData$.pipe(this.backend.gridDataFilter)}return t.prototype.getCurrentUser=function(){return this.user},t.prototype.setPresence=function(e){var t=this;return e!==this.user.present?this.backend.put("/user?presence="+e).pipe(i.tap((function(r){t.user.present=e,t.userSource.next(t.user)}))):o.of(null)},t.prototype.delUserImage=function(e){return this.http.put(e,null)},t.prototype.setUserImage=function(e){return this.backend.put("/user/image",e)},t.prototype.setDeputies=function(e){var t=this;return this.backend.put("/user/deputy?user="+e.join("&user=")).pipe(i.tap((function(){return t.refreshCurrentUser().subscribe()})))},t.prototype.changeClientLocale=function(t){var r=this;this.user.userSettings.clientlocale=t,this.backend.put("/user/config/web",this.user.userSettings).subscribe((function(){r.logger.debug("Changed client locale to '"+t+"'"),r.translate.use(t),r.user.uiDirection=(r.config.getClientLocales().find((function(e){return e.iso===t}))||{}).dir||e.Direction.LTR,r.userSource.next(r.user),r.eventService.trigger(yt.CLIENT_LOCALE_CHANGED,t)}))},t.prototype.changeSchemaLocale=function(e){var t=this;return this.user.schemaLocale=e,this.backend.put("/user/locale/"+this.user.schemaLocale).pipe(i.tap((function(){t.logger.debug("Changed schema locale to '"+e+"'"),t.userSource.next(t.user),t.backend.setHeader("Accept-Language",t.user.getSchemaLocale()),t.logger.debug("Loading system definition for new locale."),t.system.getSystemDefinition(t.user).subscribe(),t.eventService.trigger(yt.SCHEMA_LOCALE_CHANGED,e)})))},t.prototype.setCurrentUser=function(t){this.user=new St(t),this.passwordValidationSettings=t.passwortvalidation,this.user.setImageBase(this.backend.getServiceBase()),this.backend.setHeader("Accept-Language",this.user.getSchemaLocale());var r=this.config.getClientLocales().map((function(e){return e.iso})),n=this.user.getClientLocale();-1===r.indexOf(n)&&(n=this.config.getDefaultClientLocale()),this.logger.debug("Setting client locale to '"+n+"'"),this.translate.use(n),this.user.uiDirection=(this.config.getClientLocales().find((function(e){return e.iso===n}))||{}).dir||e.Direction.LTR,this.userSource.next(this.user),this.favorites=null,this.favoritesSource.next(this.favorites),this.notifications=null,this.notificationsSource.next(this.notifications)},t.prototype.getFavorites=function(){var e=this;return this.backend.getJson("/user/favorites").pipe(i.map((function(e){return e&&e.filter((function(e){return"DMS_OBJECT"===e.favoritetype}))})),i.tap((function(t){e.favorites=t,e.favoritesSource.next(e.favorites)})))},t.prototype.updateFavorites=function(e,t,r){this.backend.update(this.favorites,r||[{id:e,item:t}])&&this.favoritesSource.next(this.favorites)},t.prototype.getNotifications=function(){var e=[this.getSubscription(),this.getResubmission()];return o.forkJoin(e)},t.prototype.getResubmission=function(){var e=this;return this.backend.getJson("/messageprovider/resubmission/list").pipe(i.tap((function(t){e.notifications=t,e.notificationsSource.next(e.notifications)})))},t.prototype.getSubscription=function(){var e=this;return this.backend.getJson("/messageprovider/subscription/list").pipe(i.tap((function(t){e.notifications=t,e.notificationsSource.next(e.notifications)})))},t.prototype.removeNotifications=function(e,t){var r,n=this;switch(t){case"SUBSCRIPTION":r="subscription";break;case"RESUBMISSION":r="resubmission";break;default:return}return this.backend.del("/messageprovider/"+r+"/"+e).pipe(i.tap((function(e){return n.updateNotifications("")})))},t.prototype.updateNotifications=function(e,t,r){this.backend.update(this.notifications,r||[{id:e,item:t}])&&this.notificationsSource.next(this.notifications)},t.prototype.getUserImageUri=function(e){return this.backend.getServiceBase()+"/organization/image/"+e+"?usedefault=true"},t.prototype.removeFavorite=function(e){var t=this;return this.backend.del("/user/favorite/"+e).pipe(i.tap((function(r){return t.updateFavorites(e)})))},t.prototype.createFavorite=function(e,t,r){var n=this,o=mt.buildUri("/dms/favorite/"+e,{type:t,title:r});return this.backend.post(o,{}).pipe(i.tap((function(e){return n.getFavorites().subscribe()})))},t.prototype.removeFavoritesForTarget=function(e){var t=this;return this.backend.del("/dms/favorite/"+e).pipe(i.tap((function(r){var n=t.favorites.filter((function(t){return t.target.id===e})).map((function(e){return Object.assign({id:e.id})}));t.updateFavorites(null,null,n)})))},t.prototype.changeLockSetting=function(e){var t=this;return this.user.userSettings.alwayslock=e,this.backend.put("/user/config/web",this.user.userSettings).pipe(i.map((function(){t.refreshCurrentUser().subscribe()})))},t.prototype.hasPrivilege=function(e){return!!this.user.privileges.find((function(t){return t.name===e}))},t.prototype.changePassword=function(e){return this.backend.put("/user/password",e)},t.prototype.refreshCurrentUser=function(){var e=this;return this.backend.get(this.USER_FETCH_URI).pipe(i.map((function(t){return e.setCurrentUser(t)})))},t.prototype.validatePassword=function(e){return e.length<this.passwordValidationSettings.minlength?{type:"short",amount:this.passwordValidationSettings.minlength}:e.replace(/[^0-9]/g,"").length<this.passwordValidationSettings.minnumber?{type:"number",amount:this.passwordValidationSettings.minnumber}:e.replace(/[a-zA-Z0-9ß ]/g,"").length<this.passwordValidationSettings.minspecialchars?{type:"specialchars",amount:this.passwordValidationSettings.minspecialchars}:{type:"valid",amount:null}},t}();kt.decorators=[{type:r.Injectable}],kt.ctorParameters=function(){return[{type:Tt},{type:t.TranslateService},{type:Et},{type:gt},{type:xt},{type:n.HttpClient},{type:bt}]};var _t=function(){function e(e){Object.assign(this,e)}return Object.defineProperty(e.prototype,"title",{get:function(){return this.selectedtype?this.selectedtype.label:""},enumerable:!1,configurable:!0}),e.prototype.hasContent=function(){return!!this.template||this.contentcount>0},e.prototype.getSelectedTypeObject=function(){return this.types.find((function(e){return e.selected}))},e}(),At=function(){function e(e,t,r){this.coreConfig=e,this.http=t,this.userService=r}return e.prototype.upload=function(e,t){var r=new FormData,o=new n.HttpHeaders({"Accept-Language":this.userService.getCurrentUser().getClientLocale()});return t.forEach((function(e){return r.append("files[]",e,mt.encodeFileName(e.name))})),this.http.post(e,r,{headers:o,withCredentials:this.coreConfig.withCredentials})},e}();At.decorators=[{type:r.Injectable}],At.ctorParameters=function(){return[{type:tt,decorators:[{type:r.Inject,args:[et]}]},{type:n.HttpClient},{type:kt}]};var wt=function(){function e(e,t){this.id=e,this.type=t}return e.prototype.onUploadSuccess=function(e){return e},e.prototype.onUploadFail=function(){return{}},e}();wt.ROOT="root",wt.CONTEXT="context",wt.CONTEXT_TREE="contexttree",wt.OBJECT="object",wt.CUSTOM="custom";var Rt=function(){function e(e,t){this.backend=e,this.uploadService=t,this.preparedItemsSource=new o.ReplaySubject(1),this.preparedItems$=this.preparedItemsSource.asObservable(),this.preparedItemCountSource=new o.ReplaySubject(1),this.preparedItemCount$=this.preparedItemCountSource.asObservable()}return e.prototype.refreshPreparedItemsCount=function(){this.fetchPreparedItemsCount()},e.prototype.fetchPreparedItemsCount=function(){var e=this;this.backend.getJson("/prepare/state").pipe(i.map((function(e){return e.count}))).subscribe((function(t){e.preparedItemCount=t,e.preparedItemCountSource.next(e.preparedItemCount)}))},e.prototype.createPreparedItem=function(e,t){var r=this;return this.backend.post(this.createPreparedItemPostUrl({parentId:e,childType:t||null}),{}).pipe(i.tap((function(){return r.getPreparedItems$()})))},e.prototype.updatePreparedItemIndexData=function(e,t){var r=this;return this.backend.put("/prepare/"+e,t).pipe(i.tap((function(){return r.getPreparedItems$()})))},e.prototype.createPreparedItemPostUrl=function(e){var t=e.createMany?"/prepare/createmany":"/prepare/create";return e&&(t=mt.buildUri(t,e)),t},e.prototype.getPreparedItems$=function(e){return this.fetchPreparedItems(e).subscribe(),this.preparedItems$},e.prototype.fetchPreparedItems=function(e){var t=this,r=e?"/prepare":"/prepare?form=true";return this.backend.getJson(r).pipe(i.map((function(e){return e.map((function(e){return new _t(e)}))})),i.tap((function(){return t.fetchPreparedItemsCount()})),i.tap((function(e){return t.preparedItemsSource.next(e.sort(mt.sortValues("created","desc")))})))},e.prototype.deletePreparedItem=function(e){var t=this;return this.backend.del("/prepare/"+e).pipe(i.tap((function(){return t.getPreparedItems$()})))},e.prototype.getPrepareRootTypes=function(){return this.backend.getViaTempCache("/prepare/types").pipe(i.map((function(e){return e.types.map((function(e){return new Ct(e)}))})))},e.prototype.getPrepareChildTypes=function(e,t){var r=e?{parentId:e,withcontent:t}:{withcontent:t},n=mt.buildUri("/prepare/types",r);return this.backend.getViaTempCache(n).pipe(i.map((function(e){return{parent:e.parent,types:e.types.map((function(e){return new Ct(e)}))}})))},e.prototype.getPreviewUri=function(e,t,r){return mt.buildUri(this.backend.getServiceBase()+"/prepare/"+e+"/content",{rendition:r,index:t})},e.prototype.updateChildType=function(e,t){return this.backend.put("/prepare/"+t+"/"+e+"?form=true&contentmeta=true").pipe(i.map((function(e){return new _t(e)})))},e.prototype.addTemplate=function(e,t){return this.backend.put("/prepare/"+e+"/template?templateid="+t).pipe(i.map((function(e){return new _t(e)})))},e.prototype.getTemplates=function(e){return this.backend.getJson("/template/list?type="+e).pipe(i.map((function(e){return e})))},e.prototype.getTemplatePreviewUri=function(e,t){return mt.buildUri(this.backend.getServiceBase()+"/template/"+e+"/content",{rendition:t})},e.prototype.commitPreparedItem=function(e,t,r){var n=this;return this.backend.put("/prepare/"+e+"/"+t).pipe(i.mergeMap((function(){return n.backend.post("/prepare/commit/"+e,r)})),i.tap((function(){return n.getPreparedItems$()})),i.map((function(e){return e.id})))},e.prototype.uploadContent=function(e,t){var r=this.backend.getServiceBase()+"/prepare/"+e+"/content.json?form=true&contentmeta=true";return this.uploadService.upload(r,[t]).pipe()},e.prototype.uploadToTarget=function(e,t,r){var n=this,o=t.map((function(e){return e._file}));return this.uploadService.upload(this.getUploadTarget(e,r),o).pipe(i.tap((function(){return n.getPreparedItems$()})))},e.prototype.getUploadTarget=function(e,t){var r;if(e.type===wt.ROOT)r=this.backend.getServiceBase()+this.createPreparedItemPostUrl({parentId:null,createMany:!t});else if(e.type===wt.OBJECT){var n=e.referenceObject;r=this.backend.getServiceBase()+"/dms/"+n.id+"/contents?type="+n.type.name}else e.type!==wt.CONTEXT&&e.type!==wt.CONTEXT_TREE||(r=this.backend.getServiceBase()+this.createPreparedItemPostUrl({parentId:e.referenceObject.id,createMany:!t,childType:e.subFolder&&e.subFolder.data.type?e.subFolder.data.type:null}));return r},e.prototype.deletePreparedItemContent=function(e,t){var r="/prepare/"+e+"/content"+(void 0!==t?"?index="+t:"");return this.backend.del(r).pipe(i.map((function(e){return new _t(e)})))},e}();Rt.decorators=[{type:r.Injectable}],Rt.ctorParameters=function(){return[{type:Tt},{type:At}]};
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation.
|
|
4
4
|
|