jamespot-user-api 1.0.126 → 1.0.127

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/documentation/assets/search.js +1 -1
  2. package/documentation/classes/AdminLicenseApi.html +11 -11
  3. package/documentation/classes/AdminStoreApi.html +1 -1
  4. package/documentation/classes/AdminUtilsApi.html +1 -1
  5. package/documentation/classes/JApplicationApi.html +8 -8
  6. package/documentation/classes/JArticleApi.html +1 -1
  7. package/documentation/classes/JAssetReservation.html +1 -1
  8. package/documentation/classes/JAudienceApi.html +1 -1
  9. package/documentation/classes/JBaseApi.html +1 -1
  10. package/documentation/classes/JBookmarkApi.html +1 -1
  11. package/documentation/classes/JCommunityApi.html +1 -1
  12. package/documentation/classes/JDiapazoneApi.html +1 -1
  13. package/documentation/classes/JFaqApi.html +1 -1
  14. package/documentation/classes/JFileApi.html +5 -5
  15. package/documentation/classes/JFilebankApi.html +1 -1
  16. package/documentation/classes/JGroupApi.html +9 -9
  17. package/documentation/classes/JLandApi.html +1 -1
  18. package/documentation/classes/JMessengerApi.html +1 -1
  19. package/documentation/classes/JObjectApi.html +1 -1
  20. package/documentation/classes/JSearchApi.html +6 -6
  21. package/documentation/classes/JShareApi.html +1 -1
  22. package/documentation/classes/JTaxonomyApi.html +2 -2
  23. package/documentation/classes/JUserApi.html +4 -4
  24. package/documentation/classes/JWedocApi.html +1 -1
  25. package/documentation/classes/JamespotUserApi.html +1 -1
  26. package/documentation/classes/Network.html +1 -1
  27. package/documentation/classes/TVDisplayApi.html +1 -1
  28. package/documentation/classes/WindowBrowser.html +1 -1
  29. package/documentation/enums/StudioApplicationStatus.html +1 -1
  30. package/documentation/index.html +1 -1
  31. package/documentation/interfaces/AccessRightObject.html +1 -1
  32. package/documentation/interfaces/AdminLicenseUser.html +1 -1
  33. package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
  34. package/documentation/interfaces/ApiWrapper.html +1 -1
  35. package/documentation/interfaces/BaseAutocomplete.html +1 -1
  36. package/documentation/interfaces/BaseMessage.html +1 -1
  37. package/documentation/interfaces/Category.html +1 -1
  38. package/documentation/interfaces/FileBankProps.html +1 -1
  39. package/documentation/interfaces/FolderProps.html +1 -1
  40. package/documentation/interfaces/ListFilterSpec.html +1 -1
  41. package/documentation/interfaces/OF.html +1 -1
  42. package/documentation/interfaces/ObjectListProps.html +1 -1
  43. package/documentation/interfaces/PagingResults.html +1 -1
  44. package/documentation/interfaces/RootFolderProps.html +1 -1
  45. package/documentation/interfaces/SearchCategoryModel.html +1 -1
  46. package/documentation/interfaces/SearchCategoryValue.html +1 -1
  47. package/documentation/interfaces/SearchConfig.html +1 -1
  48. package/documentation/interfaces/SearchFacetModel.html +1 -1
  49. package/documentation/interfaces/SearchFacetValueModel.html +1 -1
  50. package/documentation/interfaces/SearchQuery.html +1 -1
  51. package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
  52. package/documentation/interfaces/SearchQueryOption.html +1 -1
  53. package/documentation/interfaces/SearchQueryResult.html +1 -1
  54. package/documentation/interfaces/SearchQuerySortModel.html +1 -1
  55. package/documentation/interfaces/SearchResultCatProps.html +1 -1
  56. package/documentation/interfaces/SearchResultPropsApp.html +1 -1
  57. package/documentation/interfaces/SearchResultPropsObject.html +1 -1
  58. package/documentation/interfaces/SpotProps.html +1 -1
  59. package/documentation/interfaces/Taxonomy.html +1 -1
  60. package/documentation/interfaces/TaxonomyCreate.html +1 -1
  61. package/documentation/interfaces/WindowInterface.html +1 -1
  62. package/documentation/modules.html +11 -11
  63. package/lib/jamespot-user-api.js +1 -1
  64. package/lib/jamespot-user-api.js.map +1 -1
  65. package/lib/src/apis/drive/drive.d.ts +8 -5
  66. package/lib/src/apis/drive/drive.mock.d.ts +3 -3
  67. package/lib/src/apis/drive/drive.test.d.ts +1 -0
  68. package/lib/src/types/drive.d.ts +21 -11
  69. package/lib/src/util/file.d.ts +1 -1
  70. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- (()=>{"use strict";var t,e={d:(t,s)=>{for(var i in s)e.o(s,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:s[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},s={};e.r(s),e.d(s,{ACCESS_REQUEST_ACCEPT:()=>E,ACCESS_REQUEST_DENY:()=>$,AdminLicenseApi:()=>r,AdminStoreApi:()=>o,AdminUtilsApi:()=>n,JApplicationApi:()=>a,JArticleApi:()=>c,JAssetReservation:()=>u,JAudienceApi:()=>l,JBaseApi:()=>i,JBookmarkApi:()=>f,JCommunityApi:()=>d,JDiapazoneApi:()=>m,JFaqApi:()=>w,JFileApi:()=>g,JFilebankApi:()=>y,JGroupApi:()=>k,JLandApi:()=>O,JMessengerApi:()=>A,JObjectApi:()=>_,JSearchApi:()=>S,JShareApi:()=>R,JTaxonomyApi:()=>x,JUserApi:()=>F,JWedocApi:()=>C,JamespotUserApi:()=>T,JamespotUserApiInstance:()=>At,Network:()=>U,StudioApplicationStatus:()=>t,TVDisplayApi:()=>L,UserLevel:()=>q,WindowBrowser:()=>M,api:()=>xt,deepEqual:()=>gt,default:()=>St,extensions:()=>N,extractTaxonomiesFromObject:()=>kt,extractTaxonomiesFromObjectAndMapProperty:()=>bt,extractTaxonomiesFromObjectAndMapUri:()=>vt,formatImgUrl:()=>ft,getArgs:()=>ct,getExtensionFromName:()=>H,getFileExtensionFromMimetype:()=>Q,getFileFamily:()=>K,getFileFamilyFromName:()=>X,getFormat:()=>ut,getFrom:()=>nt,getMimetypeFromExtension:()=>z,getMimetypeFromName:()=>G,getSize:()=>pt,getTimestamp:()=>at,getUri:()=>ot,getUrl:()=>lt,jEnsure:()=>I,mimetypeToExt:()=>W,mimetypes:()=>J,network:()=>Ot,padStartTwoDigits:()=>rt,prepareGroupForUpdate:()=>jt,removeIfStartsWith:()=>it,replacePropertiesWithTypes:()=>wt,resolveFileFamily:()=>et,resolveFileMimetype:()=>tt,resolveFilePath:()=>V,resolveFileUrl:()=>Z,suffixIfDoesNotExist:()=>st});class i{constructor(t){this.jApi=t,this.network=t.network}}class r extends i{getLicenseUserStatistics(){return this.network.post({o:"licenseManager",f:"userStatistics"})}assignLicense(t){return this.network.postCSRF({o:"licenseManager",f:"assignLicense",uri:t})}unAssignLicense(t){return this.network.postCSRF({o:"licenseManager",f:"unassignLicense",uri:t})}getAssignmentMode(t){return this.network.post({o:"licenseManager",f:"getAssignmentMode",type:t})}setAssignmentMode(t,e){return this.network.postCSRF({o:"licenseManager",f:"setAssignmentMode",value:e,type:t})}assignPossiblesLicenses(t){return this.network.postCSRF({o:"licenseManager",f:"assignPossiblesLicenses",type:t})}unAssignUnusedLicenses(t){return this.network.postCSRF({o:"licenseManager",f:"unassignUnusedLicenses",type:t})}optimizeLicenses(t){return this.network.postCSRF({o:"licenseManager",f:"optimizeLicenses",type:t})}getObjectsWithoutLicense(t,e){return this.network.post({o:"licenseManager",f:"countObjectsWithoutLicense",type:t,filter:e})}getLicensesNotAssigned(t){return this.network.post({o:"licenseManager",f:"countLicensesNotAssigned",type:t})}getLicensesAssigned(t){return this.network.post({o:"licenseManager",f:"getLicensesAssigned",type:t})}}class o extends i{getItem(t){return this.network.post({o:"adminStore",f:"getItem",uri:t})}checkoutBilling(t){return this.network.postCSRF({o:"adminStore",f:"checkoutBilling",uri:t})}checkoutFinalize(t){return this.network.postCSRF({o:"adminStore",f:"checkoutFinalize",uri:t})}}class n extends i{getApps(){return this.network.post({o:"admin",f:"apps"})}}!function(t){t.local="local",t.installed="installed",t.autosaved="autosaved",t.saved="saved"}(t||(t={}));class a extends i{list(){return this.network.post({o:"studio",f:"list"})}get(t,e){return this.network.post({o:"studio",f:"get",idApp:t,status:e})}install(t){return this.network.postCSRF({o:"studio",f:"install",value:t})}suspend(t){return this.network.postCSRF({o:"studio",f:"suspend",idApp:t})}restart(t){return this.network.postCSRF({o:"studio",f:"restart",idApp:t})}save(e,s,i){if(i===t.saved||i===t.autosaved)return this.network.postCSRF({o:"studio",f:"save",idApp:e,value:s,status:i});throw"Invalid status value"}delete(t,e){return s=this,i=void 0,o=function*(){return this.network.postCSRF({o:"studio",f:"delete",idApp:t,status:e}).then((t=>{if(0===t.error)return t.messages;throw t.messages}))},new((r=void 0)||(r=Promise))((function(t,e){function n(t){try{c(o.next(t))}catch(t){e(t)}}function a(t){try{c(o.throw(t))}catch(t){e(t)}}function c(e){var s;e.done?t(e.value):(s=e.value,s instanceof r?s:new r((function(t){t(s)}))).then(n,a)}c((o=o.apply(s,i||[])).next())}));var s,i,r,o}cssClassList(){return this.network.post({o:"studio",f:"icons"})}}class c extends i{list(t){return this.network.post(Object.assign({o:"objectList",f:"jamespotArticleQueryList"},t))}get(t){return this.network.post(Object.assign({o:"article",f:"get"},t))}create(t,e){return this.network.maybePostToken(Object.assign({o:"article",f:"create",format:null!=e?e:"raw-list"},t))}update(t){return this.network.post(Object.assign(Object.assign({format:"raw-list"},t),{o:"article",f:"update"}))}delete(t){return this.network.postCSRF({o:"article",f:"delete",idArticle:t})}count(t){return this.network.post({o:"article",f:"count",type:t})}getAttachments(t,e,s){return this.network.post({o:"article",f:"getAttachment",idArticle:t,type:e,format:s})}}var p=function(t,e){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(s[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(s[i[r]]=t[i[r]])}return s};class u extends i{configuration(){return this.network.post({o:"assetReservation",f:"configuration"})}createReservation(t){return this.network.postCSRF(Object.assign({o:"assetReservation",f:"createReservation",format:"raw-list"},t))}getReservations(t){var{format:e="raw-list"}=t,s=p(t,["format"]);return this.network.post(Object.assign({o:"assetReservation",f:"getReservations",format:e},s))}cancelReservation(t){return this.network.post({o:"assetReservation",f:"cancelReservation",format:"raw-list",idArticle:t})}bookByDate(t){var{format:e="raw-list"}=t,s=p(t,["format"]);return this.network.post(Object.assign({o:"assetReservation",f:"BookByDate",format:e},s))}getList(t){var{format:e="raw-list"}=t,s=p(t,["format"]);return this.network.post(Object.assign({o:"objectList",f:"assetReservationList",format:e},s))}}class l extends i{autocomplete(t){return this.network.post({o:"autocomplete",f:"audience",q:t}).then((t=>{if(Array.isArray(t.result))return t.result;throw"Bad response from backend"}))}}class f extends i{getFormattedList(t,e){return this.network.post(Object.assign({o:"objectList",f:"bookmarksList",format:e},t))}addFormattedLink(t,e,s){const i=null!=s?s:"list";return this.network.post({o:"custom",f:"actionAdd",type:"bookmarkLink",targetId:t,targetType:e,format:i})}addBookmark(t,e){return this.network.postCSRF(Object.assign({o:"bookmarks",f:"add"},t))}delete(t){return this.network.postCSRF({o:"bookmarks",f:"delete",bookmarkID:t})}rename(t,e,s){return this.network.postCSRF({o:"bookmarks",f:"rename",bookmarkID:t,bookmarkLabel:e,bookmarkUrl:s})}move(t,e,s){return this.network.postCSRF({o:"bookmarks",f:"move",bookmarkID:t,bookmarkReference:e,bookmarkPosition:s})}}class d extends i{get(t,e){return this.network.post({o:"community",f:"getCommunity",idCommunity:t,format:e||"raw-little"})}sendRequest(t,e){return this.network.post({o:"community",f:"sendRequest",message:t,idUserTo:e})}autocomplete(t){return this.network.post({o:"autocomplete",f:"community",q:t}).then((t=>t.result))}}class m extends i{create(t,e,s,i,r){return this.network.post({o:"article",f:"create",type:t,token:e,title:s,dateStart:i,publishTo:r})}getList(t="",e=[],s=[],i=1,r="raw-list"){return this.network.post({o:"objectList",f:"diapazoneQueryList",query:t,filters:e,orders:s,page:i,format:r})}}var h=function(t,e,s,i){return new(s||(s=Promise))((function(r,o){function n(t){try{c(i.next(t))}catch(t){o(t)}}function a(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,a)}c((i=i.apply(t,e||[])).next())}))};class g extends i{upload(t){const e=new FormData;return e.append("attrName",t.attrName),t.file?e.append(t.attrName,t.file):t.url&&e.append("url",t.url),e.append("token",t.token),this.network.postFile(e)}uploadMany(t){return h(this,void 0,void 0,(function*(){return Promise.all(t.map((t=>this.upload(t))))}))}get(t,e){return h(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"get",idFile:t,format:e})}))}getParent(t,e){return h(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"getParent",idFile:t,format:e})}))}getWithHash(t,e,s){return h(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"getWithHash",idFile:t,hash:e,format:s})}))}duplicate(t,e,s){return h(this,void 0,void 0,(function*(){return this.network.postCSRF({o:"file",f:"duplicateFile",idFile:t,title:e,publishTo:s})}))}updateFile(t,e){return h(this,void 0,void 0,(function*(){return this.network.postCSRF({o:"file",f:"updateFile",idFile:t,title:e})}))}update(t,e,s){return h(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"update",idFile:t,type:e,cropDatas:Object.assign(Object.assign({},s),{rotateBeforeCrop:!0}),killSize:s.killSize,format:"raw-little"})}))}deleteFile(t,e,s,i){return h(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"delete",idFile:t,attrName:e,token:s},i)}))}deleteImage(t,e){return h(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"deleteImage",id:t,type:e})}))}}class w extends i{getCategoriesList(t,e){return this.network.post({o:"objectList",f:"faqQueryList",format:null!=t?t:"raw-list",orders:null!=e?e:[{name:"dateCreation",sort:"ASC"}]})}createCategory(t,e){return this.jApi.article.create(Object.assign(Object.assign({},t),{type:"faq"}),null!=e?e:"raw-view")}updateCategory(t,e){return this.jApi.article.update(Object.assign(Object.assign({},t),{type:"faq",format:null!=e?e:"raw-view"}))}getCategory(t,e){return this.jApi.article.get({idArticle:t,format:null!=e?e:"raw-view"})}deleteCategory(t){return this.jApi.article.delete(t)}checkItem(t,e,s){return this.network.post({o:"faq",f:"checkItem",query:t,page:null!=e?e:1,format:null!=s?s:"raw-list"})}getTaxonomy(){return this.network.post({o:"faq",f:"getFaqTaxonomy"})}getHookProperties(t){return this.network.post({o:"faq",f:"getHookProperties",properties:null!=t?t:["_web"]})}getAccess(){return this.network.post({o:"faq",f:"access"})}createTheme(t,e){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"add-theme"},t),{format:null!=e?e:"raw-view"}))}deleteTheme(t,e){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"delete-theme"},t),{format:null!=e?e:"raw-view"}))}updateTheme(t,e){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"set-theme"},t),{format:null!=e?e:"raw-view"}))}getEntry(t,e){return this.network.post({o:"faq",f:"get-entry",uri:t,format:null!=e?e:"raw-view"})}deleteEntry(t){return this.jApi.article.delete(t)}createEntry(t,e){return this.jApi.article.create(Object.assign(Object.assign({},t),{idSpot:["content"],type:"faqItem"}),null!=e?e:"raw-view")}addEntry(t,e){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"add-entry"},t),{format:null!=e?e:"raw-view"}))}updateEntry(t,e){return this.jApi.article.update(Object.assign(Object.assign({},t),{type:"faqItem",format:null!=e?e:"raw-view"}))}moveEntry(t,e){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"move-entry"},t),{format:null!=e?e:"raw-view"}))}}class y extends i{getBanks(t="list"){return this.network.post({o:"fileBank",f:"getBanks",format:t}).then((t=>t.result))}getFolders(t){return this.network.post({o:"fileBank",f:"getFolders",parentURI:t})}getDocuments(t){return this.network.post({o:"fileBank",f:"getDocuments",parentURI:t})}}class k extends i{autocomplete(t){return this.network.post({o:"autocomplete",f:"spot",q:t,idToUri:!1}).then((t=>t.result))}create(t,e){return this.network.post(Object.assign(Object.assign({o:"spot",f:"create"},t),{format:e}))}update(t,e){const{spotBanner:s}=t,i=function(t,e){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(s[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(s[i[r]]=t[i[r]])}return s}(t,["spotBanner"]);return this.network.postCSRF(Object.assign(Object.assign({o:"spot",f:"update"},i),{format:e}))}getSpot(t,e){return this.network.post({o:"spot",f:"getSpot",idSpot:t,format:e})}getProperties(t){return this.network.post({o:"spot",f:"getProperties",idSpot:t})}getApplications(){return this.network.post({o:"spot",f:"get-available-widget"})}getCategories(){return this.network.post({o:"spot",f:"get-categories"})}getObjectListJamespotSpotMembers(t,e,s,i=1){return this.network.post({o:"objectListJamespot",f:"SpotMembers",idSpot:t,limit:s,page:i,format:"raw-little",query:e})}resetNotifications(t){return this.network.post(Object.assign({o:"spot",f:"resetNotifications"},t))}}class b extends i{list(t,e,s,i=[{name:"dateCreation",sort:"DESC"}]){return this.jApi.article.list({type:"aseiClearanceTicket",format:"raw-view",limit:e,page:t,orders:i,filters:s})}requestStatus(t,e,s){return this.network.post({o:"asei",f:"setStatus",uri:t,requestedStatus:e,audience:s}).then((t=>{if(t&&t.result)return t.result;throw"Bad response from backend"}))}getDedicatedGroups(){return this.network.post({o:"asei",f:"getDedicatedGroups"}).then((t=>{if(t&&t.result)return t.result;throw"Bad response from backend"}))}getConfiguration(){return this.network.post({o:"asei",f:"configuration"}).then((t=>{if(t&&t.result)return t.result.right;throw"Bad response from backend"}))}}class v extends i{tenants(){return this.network.post({o:"drive",f:"getTenants"})}groups(){return this.network.post({o:"drive",f:"getGroups"})}sites(){return this.network.post({o:"drive",f:"getSites"})}documents(t,e){return this.network.post({o:"drive",f:"getDocuments",service:t,documentParams:e})}}class j extends i{GetUnclassifiedFiles(t="raw-list"){return this.network.post({o:"objectListMediaLibrary",f:"GetUnclassifiedFiles",format:t})}}class O extends i{getLogs({dateEnd:t,idLogMax:e}){return this.network.post({o:"jLand",f:"adminLogs",dateEnd:t,idLogMax:e})}getStats({map:t,dateStart:e,dateEnd:s}){return this.network.post({o:"jLand",f:"adminStats",map:t,dateStart:e,dateEnd:s})}getAllMapsAsAdmin(t="raw-list,licenses"){return this.network.post({o:"objectListJLand",f:"jLandList",format:t})}createMap(t,e="raw-list"){return this.network.maybePostToken(Object.assign(Object.assign({},t),{o:"article",f:"create",format:e,type:"jlandmap"}))}}class A extends i{sendMessage(t,e){return this.network.post({o:"messenger",f:"newMessage",idDiscussion:e,msg:{description:t}})}getOrCreateDiscussion(t,e){const s=t<e?`${t}.${e}`:`${e}.${t}`;return this.network.post({o:"messenger",f:"getDiscussion",idDiscussion:s,type:"messengerUser",idUserTo:e})}}class S extends i{getConfig(){return this.network.post({o:"search",f:"getConfig"})}proposition({query:t,format:e},s){return this.network.post({o:"search",f:"proposition",query:t,format:e||"little"},s)}searchQuery(t,e){const{keywords:s,category:i,facetCategories:r,filters:o,page:n,limit:a,sort:c,options:p}=t;return this.network.post({o:"search",f:"query",keywords:s,category:i,facetCategories:r,filters:o,page:n,limit:a,sort:c,options:p},e)}getLastQueries(){return this.network.post({o:"search",f:"getLastQueries"})}getAdminConfig(){return this.network.post({o:"search",f:"getAdminConfig"})}setAdminConfig(t){return this.network.post({o:"search",f:"setAdminConfig",config:t})}}class x extends i{list(){return this.network.post({o:"taxonomy",f:"list"}).then((t=>{if(Array.isArray(t.result))return t.result;throw"Bad response from backend"}))}create(t){return this.network.post(Object.assign({o:"taxonomy",f:"create"},t))}autocomplete(t,e){return this.network.post({o:"autocomplete",f:"taxonomy",q:e,idTaxonomy:t,idToUri:!1})}autocompleteList(t){return this.network.post(Object.assign({o:"objectListTaxonomy",f:"concept"},t))}autocompleteHierarchy(t){return this.network.post(Object.assign({o:"objectListTaxonomyHierarchy",f:"concept"},t))}}class F extends i{autocomplete(t){return this.network.post({o:"autocomplete",f:"user",q:t,idToUri:!1}).then((t=>t.result))}get(t,e="little",s){return this.network.post({o:"user",f:"get",uri:t,format:e},s)}configuration(){return this.network.post({o:"userDirectory",f:"configuration"})}userList(t,e){return this.network.post(Object.assign({o:"objectList",f:"JamespotUserList"},t),e)}userQueryList(t){return this.network.post(Object.assign({o:"objectList",f:"JamespotUserQueryList"},t))}userMap(t){return this.network.post(Object.assign({o:"objectListJamespot",f:"userMap"},t))}userBusinessContactQueryList(t){return this.network.post(Object.assign({o:"businessContact",f:"queryList"},t))}userCreateBusinessContact(t){const e=Object.assign(Object.assign({},t),{pseudo:t.title,firstName:t.firstname,lastName:t.lastname,champ1:t.field1,champ2:t.field2,champ3:t.field3,champ4:t.field4,champ5:t.field5}),s=Object.assign(Object.assign({},e),{type:"businessContactCard",publishTo:"networkPublic/1"});return this.jApi.article.create(s)}userUpdateBusinessContact(t){const e=Object.assign(Object.assign({},t),{pseudo:t.title,firstName:t.firstname,lastName:t.lastname,champ1:t.field1,champ2:t.field2,champ3:t.field3,champ4:t.field4,champ5:t.field5}),s=Object.assign(Object.assign({},e),{uri:t.uri,publishTo:"networkPublic/1"});return this.jApi.article.update(s)}userDeleteBusinessContact(t){return this.jApi.article.delete(t)}userAddContact(t){return this.network.post({o:"user",f:"addContact",idUser:t})}userRemoveContact(t){return this.network.post({o:"user",f:"removeContact",idUser:t})}signIn(t,e){return this.network.post({o:"user",f:"signIn",mail:t,password:e})}}class C extends i{getFiles(t){return this.network.post(Object.assign({o:"onlyOffice",f:"getFiles"},t))}getFile(t,e){return this.network.post({o:"onlyOffice",f:"getFile",idFile:t,hash:e})}getTemplates(t){return this.network.post({o:"onlyOffice",f:"getTemplates"},t)}deleteFile(t,e){return this.network.postCSRF({o:"onlyOffice",f:"deleteFile",idFile:t,withParent:e})}createFile(t,e,s){return this.network.postCSRF({o:"onlyOffice",f:"createFile",title:t,type:e,publishTo:s})}updateFile(t,e){return this.network.postCSRF({o:"onlyOffice",f:"updateFile",idFile:t,title:e})}createVersion(t){return this.network.post({o:"onlyOffice",f:"createVersion",idFile:t})}setAccessRequest(t,e,s,i){return this.network.postCSRF({o:"onlyOffice",f:"setAccessRequest",uri:t,idUser:e,requestAccessValue:s,requestResponseMessage:i})}getAccessRequest(t,e){return this.network.post({o:"onlyOffice",f:"getAccessRequest",format:"raw-little",uri:t,idUser:e})}askAccess(t,e,s){return this.network.postCSRF({o:"onlyOffice",f:"askAccess",uri:t,askAccess:e,askMessage:s})}}class L extends i{createChannel(t,e="raw-list"){return this.network.maybePostToken(Object.assign(Object.assign({},t),{o:"article",f:"create",format:e,type:"tvDisplayChannel"}))}getChannel(t){return this.network.post(Object.assign(Object.assign({},t),{o:"tvDisplay",f:"getChannel"}))}getConfigureChannel(t){return this.network.post(Object.assign(Object.assign({},t),{o:"tvDisplay",f:"getConfigureChannel"}))}}class R extends i{contentObjectLinks(t){return this.network.post({o:"shared",f:"contentObjectLinks",format:"raw-little",uri:t})}contentSetObjectAccessRule(t,e,s){return this.network.postCSRF({o:"shared",f:"contentSetObjectAccessRule",format:"raw-little",uri:t,rule:e,hash:s})}}class _ extends i{getObject(t){return this.network.post({o:"object",f:"getObject",uri:t})}setAccess(t,e,s,i){return this.network.post({o:"object",f:"setAccess",uri:t,access:e,message:s,generalAccessRule:i})}getAccess(t){return this.network.post({o:"object",f:"getAccess",uri:t})}getAccessHash(t){return this.network.post({o:"object",f:"getAccessHash",uri:t})}}class T{constructor(t){this.version="1.0",this.network=t,this.admin={license:new r(this),store:new o(this),utils:new n(this)},this.application=new a(this),this.article=new c(this),this.asei=new b(this),this.assetReservation=new u(this),this.audience=new l(this),this.bookmark=new f(this),this.community=new d(this),this.diapazone=new m(this),this.drive=new v(this),this.faq=new w(this),this.file=new g(this),this.filebank=new y(this),this.group=new k(this),this.jland=new O(this),this.mediaLibrary=new j(this),this.messenger=new A(this),this.object=new _(this),this.search=new S(this),this.share=new R(this),this.taxonomy=new x(this),this.tvDisplay=new L(this),this.user=new F(this),this.wedoc=new C(this)}}var P=function(t,e,s,i){return new(s||(s=Promise))((function(r,o){function n(t){try{c(i.next(t))}catch(t){o(t)}}function a(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,a)}c((i=i.apply(t,e||[])).next())}))};class U{constructor(t,e="api-front"){this.window=t,this.action=e}static _formatPostOptions(t){const e=t?{body:JSON.stringify(t)}:void 0;return Object.assign({method:"POST",credentials:"same-origin"},e)}getUrl(t,e){return P(this,void 0,void 0,(function*(){const s=yield this.window.getBackendUrl();let i;try{i=new URL(`/${this.action}/${t}/${e}`,s).href}catch(r){i=`${s}/${this.action}/${t}/${e}`}return i}))}getHostname(){return P(this,void 0,void 0,(function*(){const t=(yield this.window.getBackendUrl()).split("//");return t.length>1?t[1]:t[0]}))}fetch(t,e){var{o:s,f:i}=t,r=function(t,e){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(s[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(s[i[r]]=t[i[r]])}return s}(t,["o","f"]);return P(this,void 0,void 0,(function*(){void 0===e&&(e=null);const t=yield this.getUrl(s,i);return this.window.fetch(t,Object.assign(Object.assign({},U._formatPostOptions(r)),{signal:e}))}))}post(t,e){return this.fetch(t,e).then((t=>t.json())).then((t=>{if(0===t.error)return t;throw{error:t.error,errorMsg:t.errorMsg,messages:t.messages}})).catch((t=>{if(e&&e.aborted)throw{error:-1,aborted:!0};throw t}))}postFile(t){return P(this,void 0,void 0,(function*(){const e=yield this.getUrl("file","create");if(t.append("format","raw-little"),!t.has("token")){const{result:e}=yield this.token();t.append("token",e)}const s=t.get("token");return s&&"string"==typeof s?this.window.fetch(e,{method:"POST",credentials:"same-origin",body:t}).then((t=>t.json())).then((t=>({response:t,token:s}))):Promise.reject("Missing token")}))}postCSRF(t){return this.tokenCSRF().then((e=>this.post(Object.assign(t,{tokenCSRF:e.result}))))}postToken(t){return this.token().then((e=>this.post(Object.assign(t,{token:e.result}))))}maybePostToken(t){return"token"in t&&t.token?this.post(t):this.postToken(t)}token(){return this.post({o:"misc",f:"token"})}tokenCSRF(){return this.post({o:"misc",f:"tokenCSRF"})}}class M{getBackendUrl(){return t=this,e=void 0,i=function*(){const t=window.location;return`${t.protocol}//${t.host}`},new((s=void 0)||(s=Promise))((function(r,o){function n(t){try{c(i.next(t))}catch(t){o(t)}}function a(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,a)}c((i=i.apply(t,e||[])).next())}));var t,e,s,i}fetch(t,e){return window.fetch(t,e)}}const q={ADMIN:9,USER:5,EXTERNAL:3,GUEST:0},E="accept",$="deny";function B(t){const e=t;return e&&"number"==typeof e.id&&"number"==typeof e.targetId}const D={bookmarkLink:B},I={isBookmarkLink:function(t){return"targetId"in t&&!!t.targetId},isBookmarkCustom:function(t){const e=t;return void 0!==e.bookmarkLabel||void 0!==e.bookmarkMeta||void 0!==e.bookmarkUrl},isBookmarkRawList:B,isTVChannelType:function(t,e){return"tvChannelType"in t&&t.tvChannelType===e},objectIsType:function(t,e){return null!=e&&D[t](e)},isStandardApiError:t=>"object"==typeof t&&null!==t&&"error"in t&&"errorMsg"in t&&"messages"in t&&"number"==typeof t.error&&"string"==typeof t.errorMsg&&Array.isArray(t.messages),isAbortApiError:t=>null!==t&&"object"==typeof t&&"error"in t&&"aborted"in t&&-1===t.error&&!0===t.aborted},J=["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pdf","application/zip","application/illustrator","application/postscript","application/vnd.ms-opentype","application/x-font-ttf","application/octet-stream","audio/mp3","audio/mpeg","font/ttf","font/otf","image/jpeg","image/jpg","image/png","image/gif","image/vnd.adobe.photoshop","image/svg+xml","text/plain","text/csv","video/mp4","video/webm"],N=["docx","xlsx","csv","pptx","pdf","zip","ai","mp3","mpeg","ttf","otf","jpg","jpeg","png","gif","psd","svg","txt","mp4","odt","webm"],W={"application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/vnd.oasis.opendocument.text":"odt","application/pdf":"pdf","application/zip":"zip","application/x-zip-compressed":"zip","application/illustrator":"ai","application/postscript":"ai","audio/mp3":"mp3","audio/mpeg":"mpeg","font/ttf":"ttf","font/otf":"otf","image/jpeg":"jpeg","image/jpg":"jpg","image/png":"png","image/gif":"gif","application/x-font-ttf":"ttf","application/vnd.ms-opentype":"otf","image/vnd.adobe.photoshop":"psd","image/svg+xml":"svg","text/plain":"txt","text/csv":"xlsx","video/mp4":"mp4","video/webm":"mp4"},z=t=>Object.keys(W).find((e=>W[e]===t)),Q=t=>{var e;return null!==(e=W[t])&&void 0!==e?e:void 0};function H(t){const e=String(t).split(".").pop();return N.find((t=>t===e))}const G=t=>{var e;const s=H(t);return null!==(e=z(s))&&void 0!==e?e:"application/octet-stream"},V=(t,e="fitx80")=>{switch(et(t)){default:return;case"video":return`/media/${t.id}.mp4?stream=true`;case"audio":return`/media/${t.id}.mp3`;case"gif":return`/imagecache/${e}/fileArticle/${t.id}.gif`;case"image":return`/imagecache/${e}/fileArticle/${t.id}.png`}},X=t=>{const e=H(t);return void 0!==e?K(z(e)):"application"},Y=t=>-1!==["image/vnd","image/svg","image/heic"].findIndex((e=>t.startsWith(e)));function K(t){return null==t||Y(t)?"application":t.startsWith("image/gif")?"gif":t.startsWith("image/")?"image":t.startsWith("video/")?"video":t.startsWith("audio/")?"audio":t.startsWith("font/")||t.startsWith("application/x-font-ttf")||t.startsWith("application/vnd.ms-opentype")?"font":t.startsWith("text/")?"text":"application"}const Z=(t,e,s="rr")=>"ng"===s?`/ng/file/${t}/${e}`:`/ng/rr/file/${t}/${e}`,tt=t=>void 0===t.mimetype||"application/octet-stream"===t.mimetype?G(t.title):t.mimetype,et=t=>void 0===t.mimetype||"application/octet-stream"===t.mimetype?X(t.title):K(t.mimetype);function st(t,e){return t&&!t.endsWith(e)?`${t}${e}`:t}function it(t,e){return t&&t.startsWith(e)?t.split("").slice(e.length).join(""):t}function rt(t){return t.toString().padStart(2,"0")}function ot(t){return"uri"in t&&t.uri?t.uri:`${t.type}/${t.recordId}`}function nt(t){return it(st(t.from,"/"),"/")||""}function at(t){return t.timestamp?`?_=${t.timestamp}`:""}function ct(t){const e=[];return"timestamp"in t&&t.timestamp&&e.push(`_=${t.timestamp}`),"iconColor"in t&&t.iconColor&&e.push(`color=${t.iconColor}`),e.length?"?"+e.join("&"):""}function pt(t,e=2){return"size"in t&&t.size?t.size:"width"in t&&t.width&&"height"in t&&t.height?`${t.width*e}x${t.height*e}`:""}function ut(t){return t.format||"png"}function lt(t){try{return new URL(t)}catch(t){}try{return new URL(window.location.origin+"/"+it(t,"/"))}catch(t){}}function ft(t,e=2){if("url"in t&&t.url){const e=lt(t.url);if(e)return"timestamp"in t&&t.timestamp&&!e.searchParams.has("_")&&e.searchParams.append("_",t.timestamp.toString()),e.toString()}return`/${nt(t)}${pt(t,e)}/${ot(t)}.${ut(t)}${ct(t)}`}const dt=Array.isArray,mt=Object.keys,ht=Object.prototype.hasOwnProperty;function gt(t,e,s){const i=null==s?void 0:s.map((t=>t.split(".")));if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){const r=dt(t),o=dt(e);let n,a,c;if(r&&o){if(a=t.length,a!==e.length)return!1;for(n=a;0!=n--;)if(!gt(t[n],e[n],s))return!1;return!0}if(r!==o)return!1;const p=t instanceof Date,u=e instanceof Date;if(p!==u)return!1;if(p&&u)return t.getTime()===e.getTime();const l=t instanceof RegExp,f=e instanceof RegExp;if(l!==f)return!1;if(l&&f)return t.toString()===e.toString();const d=mt(t).filter((t=>!(null==i?void 0:i.some((e=>1===e.length&&e[0]===t)))));if(a=d.length,a!==mt(e).filter((t=>!(null==i?void 0:i.some((e=>1===e.length&&e[0]===t))))).length)return!1;for(n=a;0!=n--;)if(!ht.call(e,d[n]))return!1;for(n=a;0!=n--;)if(c=d[n],!("_owner"===c&&t.$$typeof||gt(t[c],e[c],null==i?void 0:i.filter((t=>t.length>1&&t[0]===c)).map((t=>t.splice(1).join("."))))))return!1;return!0}return t!=t&&e!=e}function wt(t,e){if(Array.isArray(t))return t.map((t=>wt(t,e)));if("object"==typeof t&&null!==t){let s={};return Object.keys(t).forEach((i=>{s=Object.assign(Object.assign({},s),{[i]:i&&e.includes(i)?typeof t[i]:wt(t[i],e)})})),s}return t}function yt(t){return t.startsWith("tag_")||"tags"===t}function kt(t){return Object.fromEntries(Object.entries(t).filter((([t])=>yt(t))))}function bt(t,e,s){return Object.fromEntries(Object.entries(t).filter((([t])=>yt(t))).map((([t,i])=>{const r=Array.isArray(i)?i.map((t=>"object"==typeof t&&t&&e in t?t[e]:t)):i;return[t,s?s(r):r]})))}function vt(t){return bt(t,"uri")}const jt=t=>{var e;const s={};return"_errors"in t&&(s._errors=t._errors),"_options"in t&&(s._options=t._options),"title"in t&&(s.title=t.title),"description"in t&&(s.description=t.description),"activity"in t&&(s.activity=t.activity),"image"in t&&(s.image=t.image),"uri"in t&&(s.uri=t.uri),"type"in t&&(s.type=t.type),"edito"in t&&(s.edito=t.edito),"category"in t&&(s.category=t.category),"commentLevel"in t&&(s.commentLevel=t.commentLevel),"_options"in t&&(null===(e=t._options)||void 0===e?void 0:e.custom_widgets)&&(s.custom_widgets=Array.isArray(t._options.custom_widgets)?{}:t._options.custom_widgets),"displayType"in t&&(s.displayType=t.displayType),"language"in t&&(s.language=t.language),"edit_access"in t&&(s.edit_access=t.edit_access),"lock_mail"in t&&(s.lock_mail=t.lock_mail),"fileSyncVersioningType"in t&&(s.fileSyncVersioningType=t.fileSyncVersioningType),"idCommunity"in t&&(s.idCommunity=t.idCommunity),"lastRssExecution"in t&&(s.lastRssExecution=t.lastRssExecution),"mail_comment"in t&&(s.mail_comment=t.mail_comment),"mail_frequency"in t&&(s.mail_frequency=t.mail_frequency),"mail_spotit"in t&&(s.mail_spotit=t.mail_spotit),"mail_subscriber"in t&&(s.mail_subscriber=t.mail_subscriber),"notifyFolder"in t&&(s.notifyFolder=t.notifyFolder),"nounsubscribe"in t&&(s.nounsubscribe=t.nounsubscribe),"privacy"in t&&(s.privacy=t.privacy),"publishFolder"in t&&(s.publishFolder=t.publishFolder),"rss_access"in t&&(s.rss_access=t.rss_access),"rss_feed"in t&&(s.rss_feed=t.rss_feed&&Array.isArray(t.rss_feed)?JSON.stringify(t.rss_feed.map((t=>{var{_user:e}=t,s=function(t,e){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(s[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(s[i[r]]=t[i[r]])}return s}(t,["_user"]);return Object.assign(Object.assign({},s),{idUser:null==e?void 0:e.id})}))):"[]"),"rss_key"in t&&(s.rss_key=t.rss_key),"spot_right_user"in t&&(s.spot_right_user=t.spot_right_user),"spotBanner"in t&&(s.spotBanner=t.spotBanner),"spotDefaultPublishType"in t&&(s.spotDefaultPublishType=t.spotDefaultPublishType),"user_level_signup"in t&&(s.user_level_signup=t.user_level_signup),"useTeaser"in t&&(s.useTeaser=t.useTeaser),"widgets"in t&&(s.widgets=t.widgets),s},Ot=new U(new M),At=new T(Ot);window.JamespotUserApi=At;const St=At,xt=T;module.exports=s})();
1
+ (()=>{"use strict";var t,e={d:(t,s)=>{for(var r in s)e.o(s,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:s[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},s={};e.r(s),e.d(s,{ACCESS_REQUEST_ACCEPT:()=>E,ACCESS_REQUEST_DENY:()=>$,AdminLicenseApi:()=>i,AdminStoreApi:()=>o,AdminUtilsApi:()=>n,JApplicationApi:()=>a,JArticleApi:()=>c,JAssetReservation:()=>u,JAudienceApi:()=>l,JBaseApi:()=>r,JBookmarkApi:()=>f,JCommunityApi:()=>d,JDiapazoneApi:()=>m,JFaqApi:()=>w,JFileApi:()=>g,JFilebankApi:()=>k,JGroupApi:()=>y,JLandApi:()=>O,JMessengerApi:()=>A,JObjectApi:()=>_,JSearchApi:()=>S,JShareApi:()=>R,JTaxonomyApi:()=>x,JUserApi:()=>F,JWedocApi:()=>C,JamespotUserApi:()=>T,JamespotUserApiInstance:()=>At,Network:()=>U,StudioApplicationStatus:()=>t,TVDisplayApi:()=>L,UserLevel:()=>q,WindowBrowser:()=>M,api:()=>xt,deepEqual:()=>gt,default:()=>St,extensions:()=>N,extractTaxonomiesFromObject:()=>yt,extractTaxonomiesFromObjectAndMapProperty:()=>bt,extractTaxonomiesFromObjectAndMapUri:()=>vt,formatImgUrl:()=>ft,getArgs:()=>ct,getExtensionFromName:()=>H,getFileExtensionFromMimetype:()=>Q,getFileFamily:()=>K,getFileFamilyFromName:()=>X,getFormat:()=>ut,getFrom:()=>nt,getMimetypeFromExtension:()=>z,getMimetypeFromName:()=>G,getSize:()=>pt,getTimestamp:()=>at,getUri:()=>ot,getUrl:()=>lt,jEnsure:()=>I,mimetypeToExt:()=>W,mimetypes:()=>J,network:()=>Ot,padStartTwoDigits:()=>it,prepareGroupForUpdate:()=>jt,removeIfStartsWith:()=>rt,replacePropertiesWithTypes:()=>wt,resolveFileFamily:()=>et,resolveFileMimetype:()=>tt,resolveFilePath:()=>V,resolveFileUrl:()=>Z,suffixIfDoesNotExist:()=>st});class r{constructor(t){this.jApi=t,this.network=t.network}}class i extends r{getLicenseUserStatistics(){return this.network.post({o:"licenseManager",f:"userStatistics"})}assignLicense(t){return this.network.postCSRF({o:"licenseManager",f:"assignLicense",uri:t})}unAssignLicense(t){return this.network.postCSRF({o:"licenseManager",f:"unassignLicense",uri:t})}getAssignmentMode(t){return this.network.post({o:"licenseManager",f:"getAssignmentMode",type:t})}setAssignmentMode(t,e){return this.network.postCSRF({o:"licenseManager",f:"setAssignmentMode",value:e,type:t})}assignPossiblesLicenses(t){return this.network.postCSRF({o:"licenseManager",f:"assignPossiblesLicenses",type:t})}unAssignUnusedLicenses(t){return this.network.postCSRF({o:"licenseManager",f:"unassignUnusedLicenses",type:t})}optimizeLicenses(t){return this.network.postCSRF({o:"licenseManager",f:"optimizeLicenses",type:t})}getObjectsWithoutLicense(t,e){return this.network.post({o:"licenseManager",f:"countObjectsWithoutLicense",type:t,filter:e})}getLicensesNotAssigned(t){return this.network.post({o:"licenseManager",f:"countLicensesNotAssigned",type:t})}getLicensesAssigned(t){return this.network.post({o:"licenseManager",f:"getLicensesAssigned",type:t})}}class o extends r{getItem(t){return this.network.post({o:"adminStore",f:"getItem",uri:t})}checkoutBilling(t){return this.network.postCSRF({o:"adminStore",f:"checkoutBilling",uri:t})}checkoutFinalize(t){return this.network.postCSRF({o:"adminStore",f:"checkoutFinalize",uri:t})}}class n extends r{getApps(){return this.network.post({o:"admin",f:"apps"})}}!function(t){t.local="local",t.installed="installed",t.autosaved="autosaved",t.saved="saved"}(t||(t={}));class a extends r{list(){return this.network.post({o:"studio",f:"list"})}get(t,e){return this.network.post({o:"studio",f:"get",idApp:t,status:e})}install(t){return this.network.postCSRF({o:"studio",f:"install",value:t})}suspend(t){return this.network.postCSRF({o:"studio",f:"suspend",idApp:t})}restart(t){return this.network.postCSRF({o:"studio",f:"restart",idApp:t})}save(e,s,r){if(r===t.saved||r===t.autosaved)return this.network.postCSRF({o:"studio",f:"save",idApp:e,value:s,status:r});throw"Invalid status value"}delete(t,e){return s=this,r=void 0,o=function*(){return this.network.postCSRF({o:"studio",f:"delete",idApp:t,status:e}).then((t=>{if(0===t.error)return t.messages;throw t.messages}))},new((i=void 0)||(i=Promise))((function(t,e){function n(t){try{c(o.next(t))}catch(t){e(t)}}function a(t){try{c(o.throw(t))}catch(t){e(t)}}function c(e){var s;e.done?t(e.value):(s=e.value,s instanceof i?s:new i((function(t){t(s)}))).then(n,a)}c((o=o.apply(s,r||[])).next())}));var s,r,i,o}cssClassList(){return this.network.post({o:"studio",f:"icons"})}}class c extends r{list(t){return this.network.post(Object.assign({o:"objectList",f:"jamespotArticleQueryList"},t))}get(t){return this.network.post(Object.assign({o:"article",f:"get"},t))}create(t,e){return this.network.maybePostToken(Object.assign({o:"article",f:"create",format:null!=e?e:"raw-list"},t))}update(t){return this.network.post(Object.assign(Object.assign({format:"raw-list"},t),{o:"article",f:"update"}))}delete(t){return this.network.postCSRF({o:"article",f:"delete",idArticle:t})}count(t){return this.network.post({o:"article",f:"count",type:t})}getAttachments(t,e,s){return this.network.post({o:"article",f:"getAttachment",idArticle:t,type:e,format:s})}}var p=function(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(s[r[i]]=t[r[i]])}return s};class u extends r{configuration(){return this.network.post({o:"assetReservation",f:"configuration"})}createReservation(t){return this.network.postCSRF(Object.assign({o:"assetReservation",f:"createReservation",format:"raw-list"},t))}getReservations(t){var{format:e="raw-list"}=t,s=p(t,["format"]);return this.network.post(Object.assign({o:"assetReservation",f:"getReservations",format:e},s))}cancelReservation(t){return this.network.post({o:"assetReservation",f:"cancelReservation",format:"raw-list",idArticle:t})}bookByDate(t){var{format:e="raw-list"}=t,s=p(t,["format"]);return this.network.post(Object.assign({o:"assetReservation",f:"BookByDate",format:e},s))}getList(t){var{format:e="raw-list"}=t,s=p(t,["format"]);return this.network.post(Object.assign({o:"objectList",f:"assetReservationList",format:e},s))}}class l extends r{autocomplete(t){return this.network.post({o:"autocomplete",f:"audience",q:t}).then((t=>{if(Array.isArray(t.result))return t.result;throw"Bad response from backend"}))}}class f extends r{getFormattedList(t,e){return this.network.post(Object.assign({o:"objectList",f:"bookmarksList",format:e},t))}addFormattedLink(t,e,s){const r=null!=s?s:"list";return this.network.post({o:"custom",f:"actionAdd",type:"bookmarkLink",targetId:t,targetType:e,format:r})}addBookmark(t,e){return this.network.postCSRF(Object.assign({o:"bookmarks",f:"add"},t))}delete(t){return this.network.postCSRF({o:"bookmarks",f:"delete",bookmarkID:t})}rename(t,e,s){return this.network.postCSRF({o:"bookmarks",f:"rename",bookmarkID:t,bookmarkLabel:e,bookmarkUrl:s})}move(t,e,s){return this.network.postCSRF({o:"bookmarks",f:"move",bookmarkID:t,bookmarkReference:e,bookmarkPosition:s})}}class d extends r{get(t,e){return this.network.post({o:"community",f:"getCommunity",idCommunity:t,format:e||"raw-little"})}sendRequest(t,e){return this.network.post({o:"community",f:"sendRequest",message:t,idUserTo:e})}autocomplete(t){return this.network.post({o:"autocomplete",f:"community",q:t}).then((t=>t.result))}}class m extends r{create(t,e,s,r,i){return this.network.post({o:"article",f:"create",type:t,token:e,title:s,dateStart:r,publishTo:i})}getList(t="",e=[],s=[],r=1,i="raw-list"){return this.network.post({o:"objectList",f:"diapazoneQueryList",query:t,filters:e,orders:s,page:r,format:i})}}var h=function(t,e,s,r){return new(s||(s=Promise))((function(i,o){function n(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,a)}c((r=r.apply(t,e||[])).next())}))};class g extends r{upload(t){const e=new FormData;return e.append("attrName",t.attrName),t.file?e.append(t.attrName,t.file):t.url&&e.append("url",t.url),e.append("token",t.token),this.network.postFile(e)}uploadMany(t){return h(this,void 0,void 0,(function*(){return Promise.all(t.map((t=>this.upload(t))))}))}get(t,e){return h(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"get",idFile:t,format:e})}))}getParent(t,e){return h(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"getParent",idFile:t,format:e})}))}getWithHash(t,e,s){return h(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"getWithHash",idFile:t,hash:e,format:s})}))}duplicate(t,e,s){return h(this,void 0,void 0,(function*(){return this.network.postCSRF({o:"file",f:"duplicateFile",idFile:t,title:e,publishTo:s})}))}updateFile(t,e){return h(this,void 0,void 0,(function*(){return this.network.postCSRF({o:"file",f:"updateFile",idFile:t,title:e})}))}update(t,e,s){return h(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"update",idFile:t,type:e,cropDatas:Object.assign(Object.assign({},s),{rotateBeforeCrop:!0}),killSize:s.killSize,format:"raw-little"})}))}deleteFile(t,e,s,r){return h(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"delete",idFile:t,attrName:e,token:s},r)}))}deleteImage(t,e){return h(this,void 0,void 0,(function*(){return this.network.post({o:"file",f:"deleteImage",id:t,type:e})}))}}class w extends r{getCategoriesList(t,e){return this.network.post({o:"objectList",f:"faqQueryList",format:null!=t?t:"raw-list",orders:null!=e?e:[{name:"dateCreation",sort:"ASC"}]})}createCategory(t,e){return this.jApi.article.create(Object.assign(Object.assign({},t),{type:"faq"}),null!=e?e:"raw-view")}updateCategory(t,e){return this.jApi.article.update(Object.assign(Object.assign({},t),{type:"faq",format:null!=e?e:"raw-view"}))}getCategory(t,e){return this.jApi.article.get({idArticle:t,format:null!=e?e:"raw-view"})}deleteCategory(t){return this.jApi.article.delete(t)}checkItem(t,e,s){return this.network.post({o:"faq",f:"checkItem",query:t,page:null!=e?e:1,format:null!=s?s:"raw-list"})}getTaxonomy(){return this.network.post({o:"faq",f:"getFaqTaxonomy"})}getHookProperties(t){return this.network.post({o:"faq",f:"getHookProperties",properties:null!=t?t:["_web"]})}getAccess(){return this.network.post({o:"faq",f:"access"})}createTheme(t,e){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"add-theme"},t),{format:null!=e?e:"raw-view"}))}deleteTheme(t,e){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"delete-theme"},t),{format:null!=e?e:"raw-view"}))}updateTheme(t,e){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"set-theme"},t),{format:null!=e?e:"raw-view"}))}getEntry(t,e){return this.network.post({o:"faq",f:"get-entry",uri:t,format:null!=e?e:"raw-view"})}deleteEntry(t){return this.jApi.article.delete(t)}createEntry(t,e){return this.jApi.article.create(Object.assign(Object.assign({},t),{idSpot:["content"],type:"faqItem"}),null!=e?e:"raw-view")}addEntry(t,e){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"add-entry"},t),{format:null!=e?e:"raw-view"}))}updateEntry(t,e){return this.jApi.article.update(Object.assign(Object.assign({},t),{type:"faqItem",format:null!=e?e:"raw-view"}))}moveEntry(t,e){return this.network.postCSRF(Object.assign(Object.assign({o:"faq",f:"move-entry"},t),{format:null!=e?e:"raw-view"}))}}class k extends r{getBanks(t="list"){return this.network.post({o:"fileBank",f:"getBanks",format:t}).then((t=>t.result))}getFolders(t){return this.network.post({o:"fileBank",f:"getFolders",parentURI:t})}getDocuments(t){return this.network.post({o:"fileBank",f:"getDocuments",parentURI:t})}}class y extends r{autocomplete(t){return this.network.post({o:"autocomplete",f:"spot",q:t,idToUri:!1}).then((t=>t.result))}create(t,e){return this.network.post(Object.assign(Object.assign({o:"spot",f:"create"},t),{format:e}))}update(t,e){const{spotBanner:s}=t,r=function(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(s[r[i]]=t[r[i]])}return s}(t,["spotBanner"]);return this.network.postCSRF(Object.assign(Object.assign({o:"spot",f:"update"},r),{format:e}))}getSpot(t,e){return this.network.post({o:"spot",f:"getSpot",idSpot:t,format:e})}getProperties(t){return this.network.post({o:"spot",f:"getProperties",idSpot:t})}getApplications(){return this.network.post({o:"spot",f:"get-available-widget"})}getCategories(){return this.network.post({o:"spot",f:"get-categories"})}getObjectListJamespotSpotMembers(t,e,s,r=1){return this.network.post({o:"objectListJamespot",f:"SpotMembers",idSpot:t,limit:s,page:r,format:"raw-little",query:e})}resetNotifications(t){return this.network.post(Object.assign({o:"spot",f:"resetNotifications"},t))}}class b extends r{list(t,e,s,r=[{name:"dateCreation",sort:"DESC"}]){return this.jApi.article.list({type:"aseiClearanceTicket",format:"raw-view",limit:e,page:t,orders:r,filters:s})}requestStatus(t,e,s){return this.network.post({o:"asei",f:"setStatus",uri:t,requestedStatus:e,audience:s}).then((t=>{if(t&&t.result)return t.result;throw"Bad response from backend"}))}getDedicatedGroups(){return this.network.post({o:"asei",f:"getDedicatedGroups"}).then((t=>{if(t&&t.result)return t.result;throw"Bad response from backend"}))}getConfiguration(){return this.network.post({o:"asei",f:"configuration"}).then((t=>{if(t&&t.result)return t.result.right;throw"Bad response from backend"}))}}class v extends r{tenants(){return this.network.post({o:"drive",f:"getTenants"})}groups(){return this.network.post({o:"drive",f:"getGroups"})}sites(){return this.network.post({o:"drive",f:"getSites"})}listAccount(t){return this.network.post({o:"drive",f:"listAccount",service:t})}isAccountLogged(t,e){return this.network.post({o:"drive",f:"isAccountLogged",service:t,id:e})}checkAccountToken(t){return this.network.post({o:"drive",f:"checkAccountToken",service:t})}documents(t,e){return this.network.post({o:"drive",f:"getDocuments",service:t,documentParams:e})}}class j extends r{GetUnclassifiedFiles(t="raw-list"){return this.network.post({o:"objectListMediaLibrary",f:"GetUnclassifiedFiles",format:t})}}class O extends r{getLogs({dateEnd:t,idLogMax:e}){return this.network.post({o:"jLand",f:"adminLogs",dateEnd:t,idLogMax:e})}getStats({map:t,dateStart:e,dateEnd:s}){return this.network.post({o:"jLand",f:"adminStats",map:t,dateStart:e,dateEnd:s})}getAllMapsAsAdmin(t="raw-list,licenses"){return this.network.post({o:"objectListJLand",f:"jLandList",format:t})}createMap(t,e="raw-list"){return this.network.maybePostToken(Object.assign(Object.assign({},t),{o:"article",f:"create",format:e,type:"jlandmap"}))}}class A extends r{sendMessage(t,e){return this.network.post({o:"messenger",f:"newMessage",idDiscussion:e,msg:{description:t}})}getOrCreateDiscussion(t,e){const s=t<e?`${t}.${e}`:`${e}.${t}`;return this.network.post({o:"messenger",f:"getDiscussion",idDiscussion:s,type:"messengerUser",idUserTo:e})}}class S extends r{getConfig(){return this.network.post({o:"search",f:"getConfig"})}proposition({query:t,format:e},s){return this.network.post({o:"search",f:"proposition",query:t,format:e||"little"},s)}searchQuery(t,e){const{keywords:s,category:r,facetCategories:i,filters:o,page:n,limit:a,sort:c,options:p}=t;return this.network.post({o:"search",f:"query",keywords:s,category:r,facetCategories:i,filters:o,page:n,limit:a,sort:c,options:p},e)}getLastQueries(){return this.network.post({o:"search",f:"getLastQueries"})}getAdminConfig(){return this.network.post({o:"search",f:"getAdminConfig"})}setAdminConfig(t){return this.network.post({o:"search",f:"setAdminConfig",config:t})}}class x extends r{list(){return this.network.post({o:"taxonomy",f:"list"}).then((t=>{if(Array.isArray(t.result))return t.result;throw"Bad response from backend"}))}create(t){return this.network.post(Object.assign({o:"taxonomy",f:"create"},t))}autocomplete(t,e){return this.network.post({o:"autocomplete",f:"taxonomy",q:e,idTaxonomy:t,idToUri:!1})}autocompleteList(t){return this.network.post(Object.assign({o:"objectListTaxonomy",f:"concept"},t))}autocompleteHierarchy(t){return this.network.post(Object.assign({o:"objectListTaxonomyHierarchy",f:"concept"},t))}}class F extends r{autocomplete(t){return this.network.post({o:"autocomplete",f:"user",q:t,idToUri:!1}).then((t=>t.result))}get(t,e="little",s){return this.network.post({o:"user",f:"get",uri:t,format:e},s)}configuration(){return this.network.post({o:"userDirectory",f:"configuration"})}userList(t,e){return this.network.post(Object.assign({o:"objectList",f:"JamespotUserList"},t),e)}userQueryList(t){return this.network.post(Object.assign({o:"objectList",f:"JamespotUserQueryList"},t))}userMap(t){return this.network.post(Object.assign({o:"objectListJamespot",f:"userMap"},t))}userBusinessContactQueryList(t){return this.network.post(Object.assign({o:"businessContact",f:"queryList"},t))}userCreateBusinessContact(t){const e=Object.assign(Object.assign({},t),{pseudo:t.title,firstName:t.firstname,lastName:t.lastname,champ1:t.field1,champ2:t.field2,champ3:t.field3,champ4:t.field4,champ5:t.field5}),s=Object.assign(Object.assign({},e),{type:"businessContactCard",publishTo:"networkPublic/1"});return this.jApi.article.create(s)}userUpdateBusinessContact(t){const e=Object.assign(Object.assign({},t),{pseudo:t.title,firstName:t.firstname,lastName:t.lastname,champ1:t.field1,champ2:t.field2,champ3:t.field3,champ4:t.field4,champ5:t.field5}),s=Object.assign(Object.assign({},e),{uri:t.uri,publishTo:"networkPublic/1"});return this.jApi.article.update(s)}userDeleteBusinessContact(t){return this.jApi.article.delete(t)}userAddContact(t){return this.network.post({o:"user",f:"addContact",idUser:t})}userRemoveContact(t){return this.network.post({o:"user",f:"removeContact",idUser:t})}signIn(t,e){return this.network.post({o:"user",f:"signIn",mail:t,password:e})}}class C extends r{getFiles(t){return this.network.post(Object.assign({o:"onlyOffice",f:"getFiles"},t))}getFile(t,e){return this.network.post({o:"onlyOffice",f:"getFile",idFile:t,hash:e})}getTemplates(t){return this.network.post({o:"onlyOffice",f:"getTemplates"},t)}deleteFile(t,e){return this.network.postCSRF({o:"onlyOffice",f:"deleteFile",idFile:t,withParent:e})}createFile(t,e,s){return this.network.postCSRF({o:"onlyOffice",f:"createFile",title:t,type:e,publishTo:s})}updateFile(t,e){return this.network.postCSRF({o:"onlyOffice",f:"updateFile",idFile:t,title:e})}createVersion(t){return this.network.post({o:"onlyOffice",f:"createVersion",idFile:t})}setAccessRequest(t,e,s,r){return this.network.postCSRF({o:"onlyOffice",f:"setAccessRequest",uri:t,idUser:e,requestAccessValue:s,requestResponseMessage:r})}getAccessRequest(t,e){return this.network.post({o:"onlyOffice",f:"getAccessRequest",format:"raw-little",uri:t,idUser:e})}askAccess(t,e,s){return this.network.postCSRF({o:"onlyOffice",f:"askAccess",uri:t,askAccess:e,askMessage:s})}}class L extends r{createChannel(t,e="raw-list"){return this.network.maybePostToken(Object.assign(Object.assign({},t),{o:"article",f:"create",format:e,type:"tvDisplayChannel"}))}getChannel(t){return this.network.post(Object.assign(Object.assign({},t),{o:"tvDisplay",f:"getChannel"}))}getConfigureChannel(t){return this.network.post(Object.assign(Object.assign({},t),{o:"tvDisplay",f:"getConfigureChannel"}))}}class R extends r{contentObjectLinks(t){return this.network.post({o:"shared",f:"contentObjectLinks",format:"raw-little",uri:t})}contentSetObjectAccessRule(t,e,s){return this.network.postCSRF({o:"shared",f:"contentSetObjectAccessRule",format:"raw-little",uri:t,rule:e,hash:s})}}class _ extends r{getObject(t){return this.network.post({o:"object",f:"getObject",uri:t})}setAccess(t,e,s,r){return this.network.post({o:"object",f:"setAccess",uri:t,access:e,message:s,generalAccessRule:r})}getAccess(t){return this.network.post({o:"object",f:"getAccess",uri:t})}getAccessHash(t){return this.network.post({o:"object",f:"getAccessHash",uri:t})}}class T{constructor(t){this.version="1.0",this.network=t,this.admin={license:new i(this),store:new o(this),utils:new n(this)},this.application=new a(this),this.article=new c(this),this.asei=new b(this),this.assetReservation=new u(this),this.audience=new l(this),this.bookmark=new f(this),this.community=new d(this),this.diapazone=new m(this),this.drive=new v(this),this.faq=new w(this),this.file=new g(this),this.filebank=new k(this),this.group=new y(this),this.jland=new O(this),this.mediaLibrary=new j(this),this.messenger=new A(this),this.object=new _(this),this.search=new S(this),this.share=new R(this),this.taxonomy=new x(this),this.tvDisplay=new L(this),this.user=new F(this),this.wedoc=new C(this)}}var P=function(t,e,s,r){return new(s||(s=Promise))((function(i,o){function n(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,a)}c((r=r.apply(t,e||[])).next())}))};class U{constructor(t,e="api-front"){this.window=t,this.action=e}static _formatPostOptions(t){const e=t?{body:JSON.stringify(t)}:void 0;return Object.assign({method:"POST",credentials:"same-origin"},e)}getUrl(t,e){return P(this,void 0,void 0,(function*(){const s=yield this.window.getBackendUrl();let r;try{r=new URL(`/${this.action}/${t}/${e}`,s).href}catch(i){r=`${s}/${this.action}/${t}/${e}`}return r}))}getHostname(){return P(this,void 0,void 0,(function*(){const t=(yield this.window.getBackendUrl()).split("//");return t.length>1?t[1]:t[0]}))}fetch(t,e){var{o:s,f:r}=t,i=function(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(s[r[i]]=t[r[i]])}return s}(t,["o","f"]);return P(this,void 0,void 0,(function*(){void 0===e&&(e=null);const t=yield this.getUrl(s,r);return this.window.fetch(t,Object.assign(Object.assign({},U._formatPostOptions(i)),{signal:e}))}))}post(t,e){return this.fetch(t,e).then((t=>t.json())).then((t=>{if(0===t.error)return t;throw{error:t.error,errorMsg:t.errorMsg,messages:t.messages}})).catch((t=>{if(e&&e.aborted)throw{error:-1,aborted:!0};throw t}))}postFile(t){return P(this,void 0,void 0,(function*(){const e=yield this.getUrl("file","create");if(t.append("format","raw-little"),!t.has("token")){const{result:e}=yield this.token();t.append("token",e)}const s=t.get("token");return s&&"string"==typeof s?this.window.fetch(e,{method:"POST",credentials:"same-origin",body:t}).then((t=>t.json())).then((t=>({response:t,token:s}))):Promise.reject("Missing token")}))}postCSRF(t){return this.tokenCSRF().then((e=>this.post(Object.assign(t,{tokenCSRF:e.result}))))}postToken(t){return this.token().then((e=>this.post(Object.assign(t,{token:e.result}))))}maybePostToken(t){return"token"in t&&t.token?this.post(t):this.postToken(t)}token(){return this.post({o:"misc",f:"token"})}tokenCSRF(){return this.post({o:"misc",f:"tokenCSRF"})}}class M{getBackendUrl(){return t=this,e=void 0,r=function*(){const t=window.location;return`${t.protocol}//${t.host}`},new((s=void 0)||(s=Promise))((function(i,o){function n(t){try{c(r.next(t))}catch(t){o(t)}}function a(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(n,a)}c((r=r.apply(t,e||[])).next())}));var t,e,s,r}fetch(t,e){return window.fetch(t,e)}}const q={ADMIN:9,USER:5,EXTERNAL:3,GUEST:0},E="accept",$="deny";function B(t){const e=t;return e&&"number"==typeof e.id&&"number"==typeof e.targetId}const D={bookmarkLink:B},I={isBookmarkLink:function(t){return"targetId"in t&&!!t.targetId},isBookmarkCustom:function(t){const e=t;return void 0!==e.bookmarkLabel||void 0!==e.bookmarkMeta||void 0!==e.bookmarkUrl},isBookmarkRawList:B,isTVChannelType:function(t,e){return"tvChannelType"in t&&t.tvChannelType===e},objectIsType:function(t,e){return null!=e&&D[t](e)},isStandardApiError:t=>"object"==typeof t&&null!==t&&"error"in t&&"errorMsg"in t&&"messages"in t&&"number"==typeof t.error&&"string"==typeof t.errorMsg&&Array.isArray(t.messages),isAbortApiError:t=>null!==t&&"object"==typeof t&&"error"in t&&"aborted"in t&&-1===t.error&&!0===t.aborted},J=["application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/pdf","application/zip","application/illustrator","application/postscript","application/vnd.ms-opentype","application/x-font-ttf","application/octet-stream","audio/mp3","audio/mpeg","font/ttf","font/otf","image/jpeg","image/jpg","image/png","image/gif","image/vnd.adobe.photoshop","image/svg+xml","text/plain","text/csv","video/mp4","video/webm"],N=["docx","xlsx","csv","pptx","pdf","zip","ai","mp3","mpeg","ttf","otf","jpg","jpeg","png","gif","psd","svg","txt","mp4","odt","webm"],W={"application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/vnd.oasis.opendocument.text":"odt","application/pdf":"pdf","application/zip":"zip","application/x-zip-compressed":"zip","application/illustrator":"ai","application/postscript":"ai","audio/mp3":"mp3","audio/mpeg":"mpeg","font/ttf":"ttf","font/otf":"otf","image/jpeg":"jpeg","image/jpg":"jpg","image/png":"png","image/gif":"gif","application/x-font-ttf":"ttf","application/vnd.ms-opentype":"otf","image/vnd.adobe.photoshop":"psd","image/svg+xml":"svg","text/plain":"txt","text/csv":"xlsx","video/mp4":"mp4","video/webm":"mp4"},z=t=>Object.keys(W).find((e=>W[e]===t)),Q=t=>{var e;return null!==(e=W[t])&&void 0!==e?e:void 0};function H(t){const e=String(t).split(".").pop();return N.find((t=>t===e))}const G=t=>{var e;const s=H(t);return null!==(e=z(s))&&void 0!==e?e:"application/octet-stream"},V=(t,e="fitx80")=>{switch(et(t)){default:return;case"video":return`/media/${t.id}.mp4?stream=true`;case"audio":return`/media/${t.id}.mp3`;case"gif":return`/imagecache/${e}/fileArticle/${t.id}.gif`;case"image":return`/imagecache/${e}/fileArticle/${t.id}.png`}},X=t=>{const e=H(t);return void 0!==e?K(z(e)):"application"},Y=t=>-1!==["image/vnd","image/svg","image/heic"].findIndex((e=>t.startsWith(e)));function K(t){return t&&t.startsWith("folder/")?"folder":null==t||Y(t)?"application":t.startsWith("image/gif")?"gif":t.startsWith("image/")?"image":t.startsWith("video/")?"video":t.startsWith("audio/")?"audio":t.startsWith("font/")||t.startsWith("application/x-font-ttf")||t.startsWith("application/vnd.ms-opentype")?"font":t.startsWith("text/")?"text":"application"}const Z=(t,e,s="rr")=>"ng"===s?`/ng/file/${t}/${e}`:`/ng/rr/file/${t}/${e}`,tt=t=>void 0===t.mimetype||"application/octet-stream"===t.mimetype?G(t.title):t.mimetype,et=t=>void 0===t.mimetype||"application/octet-stream"===t.mimetype?X(t.title):K(t.mimetype);function st(t,e){return t&&!t.endsWith(e)?`${t}${e}`:t}function rt(t,e){return t&&t.startsWith(e)?t.split("").slice(e.length).join(""):t}function it(t){return t.toString().padStart(2,"0")}function ot(t){return"uri"in t&&t.uri?t.uri:`${t.type}/${t.recordId}`}function nt(t){return rt(st(t.from,"/"),"/")||""}function at(t){return t.timestamp?`?_=${t.timestamp}`:""}function ct(t){const e=[];return"timestamp"in t&&t.timestamp&&e.push(`_=${t.timestamp}`),"iconColor"in t&&t.iconColor&&e.push(`color=${t.iconColor}`),e.length?"?"+e.join("&"):""}function pt(t,e=2){return"size"in t&&t.size?t.size:"width"in t&&t.width&&"height"in t&&t.height?`${t.width*e}x${t.height*e}`:""}function ut(t){return t.format||"png"}function lt(t){try{return new URL(t)}catch(t){}try{return new URL(window.location.origin+"/"+rt(t,"/"))}catch(t){}}function ft(t,e=2){if("url"in t&&t.url){const e=lt(t.url);if(e)return"timestamp"in t&&t.timestamp&&!e.searchParams.has("_")&&e.searchParams.append("_",t.timestamp.toString()),e.toString()}return`/${nt(t)}${pt(t,e)}/${ot(t)}.${ut(t)}${ct(t)}`}const dt=Array.isArray,mt=Object.keys,ht=Object.prototype.hasOwnProperty;function gt(t,e,s){const r=null==s?void 0:s.map((t=>t.split(".")));if(t===e)return!0;if(t&&e&&"object"==typeof t&&"object"==typeof e){const i=dt(t),o=dt(e);let n,a,c;if(i&&o){if(a=t.length,a!==e.length)return!1;for(n=a;0!=n--;)if(!gt(t[n],e[n],s))return!1;return!0}if(i!==o)return!1;const p=t instanceof Date,u=e instanceof Date;if(p!==u)return!1;if(p&&u)return t.getTime()===e.getTime();const l=t instanceof RegExp,f=e instanceof RegExp;if(l!==f)return!1;if(l&&f)return t.toString()===e.toString();const d=mt(t).filter((t=>!(null==r?void 0:r.some((e=>1===e.length&&e[0]===t)))));if(a=d.length,a!==mt(e).filter((t=>!(null==r?void 0:r.some((e=>1===e.length&&e[0]===t))))).length)return!1;for(n=a;0!=n--;)if(!ht.call(e,d[n]))return!1;for(n=a;0!=n--;)if(c=d[n],!("_owner"===c&&t.$$typeof||gt(t[c],e[c],null==r?void 0:r.filter((t=>t.length>1&&t[0]===c)).map((t=>t.splice(1).join("."))))))return!1;return!0}return t!=t&&e!=e}function wt(t,e){if(Array.isArray(t))return t.map((t=>wt(t,e)));if("object"==typeof t&&null!==t){let s={};return Object.keys(t).forEach((r=>{s=Object.assign(Object.assign({},s),{[r]:r&&e.includes(r)?typeof t[r]:wt(t[r],e)})})),s}return t}function kt(t){return t.startsWith("tag_")||"tags"===t}function yt(t){return Object.fromEntries(Object.entries(t).filter((([t])=>kt(t))))}function bt(t,e,s){return Object.fromEntries(Object.entries(t).filter((([t])=>kt(t))).map((([t,r])=>{const i=Array.isArray(r)?r.map((t=>"object"==typeof t&&t&&e in t?t[e]:t)):r;return[t,s?s(i):i]})))}function vt(t){return bt(t,"uri")}const jt=t=>{var e;const s={};return"_errors"in t&&(s._errors=t._errors),"_options"in t&&(s._options=t._options),"title"in t&&(s.title=t.title),"description"in t&&(s.description=t.description),"activity"in t&&(s.activity=t.activity),"image"in t&&(s.image=t.image),"uri"in t&&(s.uri=t.uri),"type"in t&&(s.type=t.type),"edito"in t&&(s.edito=t.edito),"category"in t&&(s.category=t.category),"commentLevel"in t&&(s.commentLevel=t.commentLevel),"_options"in t&&(null===(e=t._options)||void 0===e?void 0:e.custom_widgets)&&(s.custom_widgets=Array.isArray(t._options.custom_widgets)?{}:t._options.custom_widgets),"displayType"in t&&(s.displayType=t.displayType),"language"in t&&(s.language=t.language),"edit_access"in t&&(s.edit_access=t.edit_access),"lock_mail"in t&&(s.lock_mail=t.lock_mail),"fileSyncVersioningType"in t&&(s.fileSyncVersioningType=t.fileSyncVersioningType),"idCommunity"in t&&(s.idCommunity=t.idCommunity),"lastRssExecution"in t&&(s.lastRssExecution=t.lastRssExecution),"mail_comment"in t&&(s.mail_comment=t.mail_comment),"mail_frequency"in t&&(s.mail_frequency=t.mail_frequency),"mail_spotit"in t&&(s.mail_spotit=t.mail_spotit),"mail_subscriber"in t&&(s.mail_subscriber=t.mail_subscriber),"notifyFolder"in t&&(s.notifyFolder=t.notifyFolder),"nounsubscribe"in t&&(s.nounsubscribe=t.nounsubscribe),"privacy"in t&&(s.privacy=t.privacy),"publishFolder"in t&&(s.publishFolder=t.publishFolder),"rss_access"in t&&(s.rss_access=t.rss_access),"rss_feed"in t&&(s.rss_feed=t.rss_feed&&Array.isArray(t.rss_feed)?JSON.stringify(t.rss_feed.map((t=>{var{_user:e}=t,s=function(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(s[r[i]]=t[r[i]])}return s}(t,["_user"]);return Object.assign(Object.assign({},s),{idUser:null==e?void 0:e.id})}))):"[]"),"rss_key"in t&&(s.rss_key=t.rss_key),"spot_right_user"in t&&(s.spot_right_user=t.spot_right_user),"spotBanner"in t&&(s.spotBanner=t.spotBanner),"spotDefaultPublishType"in t&&(s.spotDefaultPublishType=t.spotDefaultPublishType),"user_level_signup"in t&&(s.user_level_signup=t.user_level_signup),"useTeaser"in t&&(s.useTeaser=t.useTeaser),"widgets"in t&&(s.widgets=t.widgets),s},Ot=new U(new M),At=new T(Ot);window.JamespotUserApi=At;const St=At,xt=T;module.exports=s})();
2
2
  //# sourceMappingURL=jamespot-user-api.js.map