diff --git a/app/notes.ca74795163b25db3dc32.js b/app/notes.cfaaf1eb46f4a79d3d90.js similarity index 70% rename from app/notes.ca74795163b25db3dc32.js rename to app/notes.cfaaf1eb46f4a79d3d90.js index 1e0ef6f9..92ee1d3c 100644 --- a/app/notes.ca74795163b25db3dc32.js +++ b/app/notes.cfaaf1eb46f4a79d3d90.js @@ -1 +1 @@ -!function(e){function t(t){for(var r,o,s=t[0],c=t[1],l=t[2],d=0,f=[];dback and try again later."},"manifest":{"short_description":"Cozy Notes is your personal and collaborative note-taking application.","long_description":"Notes is an online text editor that can already offer you to:\\n\\n* Create your own notes with the essential features (bold, underlined, links, tables...)\\n* Fill and find your notes with you other documents in files of your personal Drive\\n* Edit easily your notes from all your devices\\n* Access your notes offline\\n* For the fans, use shortcuts and input in markdown format ... and even write with contacts together on the same note (coming soon)!","screenshots":["screenshots/en/screenshot01.png","screenshots/en/screenshot02.png"]}}')},"9pOX":function(e){e.exports=JSON.parse('{"Notes":{"Add":{"add_note":"Ajouter une note"},"EditorView":{"main_placeholder":"Écrivez ce que vous souhaitez…"},"Editor":{"title_placeholder":"Ici votre titre"},"List":{"my_notes":"Mes Notes","name":"Nom","updated_at":"Mise à jour","location":"Emplacement","sharings":"Partage"},"Empty":{"welcome":"Bienvenue sur Cozy Notes","after_created":"Une fois votre note créée, il vous est possible de la retrouver dans "}},"Error":{"unshared_title":"Le partage n\'est plus actif","unshared_text":"Le propriétaire a peut-être révoqué ce partage. Vous ne pouvez plus éditer de note à cette adresse.","loading_error_title":"La note n\'a pas pu être chargée","loading_error_text_noReturnUrl":"Cette note n\'existe peut-être plus, ou nos serveurs ont peut-être un moment d\'égarrement. Merci de retenter plus tard.","loading_error_text_returnUrl":"Cette note n\'existe peut-être plus, ou nos serveurs ont peut-être un moment d\'égarrement. Merci revenir en arrière et de retenter plus tard."},"manifest":{"short_description":"Cozy Notes est votre application de prise de notes personnelles et collaboratives.","long_description":"Notes est un éditeur de texte en ligne destiné à :\\n\\n* Créer vos propres notes avec les fonctionnalités essentielles (gras, souligné, liens, tableaux...)\\n* Classer et retrouver vos notes avec vos autres documents, dans les répertoires de votre Drive personnel\\n* Éditer facilement vos notes depuis tous vos appareils\\n* Accéder à vos notes, même sans internet, stockées sur votre PC\\n* Pour les aficionados, utiliser les raccourcis et la saisie au format markdown\\n* ... et même écrire à plusieurs simultanément sur la même note (à venir) ! ","screenshots":["screenshots/fr/screenshot01.png","screenshots/fr/screenshot02.png"]}}')},G2JP:function(e,t,n){"use strict";var r=n("q1tI"),a=n.n(r).a.createContext(!1);t.a=a},LiWt:function(e,t,n){"use strict";n.r(t);n("llna"),n("/8/d"),n("3FT0"),n("VxdY");var r,a=n("q1tI"),i=n.n(a),o=n("JRPe"),s=n("SH7X"),c=n.n(s),l=n("i8i4"),u=n("buk/"),d=n("Le8U"),f=n("G2JP"),p=n("X3v2"),h=n("pZg0"),v={en:{react:n("PTt1"),atlaskit:n("eFxx").default},fr:{react:n("Z6Ro"),atlaskit:n("XCed").default}};Object(o.d)(v.en.react),Object(o.d)(v.fr.react);document.addEventListener("DOMContentLoaded",function(){var e=Object(p.b)(),t=Object(p.a)(e.cozyIconPath,n("ZAKO")),a=Object(p.a)(e.cozyAppNamePrefix||h.name_prefix,""),m=Object(p.a)(e.cozyAppName,h.name),b=Object(p.a)(e.cozyAppSlug,h.slug),y=Object(p.a)(e.cozyAppVersion,h.version);r=Object(p.a)(e.cozyLocale,"en");var g=window.location?window.location.protocol:"https:",_=Object(p.c)(),w=_||e.cozyToken,x=_||!w||""==w,j=new c.a({uri:"".concat(g,"//").concat(e.cozyDomain),token:w,appMetadata:{slug:b,version:y}});d.Document.cozyClient||d.Document.registerClient(j),x||cozy.bar.init({appName:m,appNamePrefix:a,iconPath:t,lang:r,replaceTitleOnMobile:!0,cozyClient:j,isPublic:x}),function(e,t){var a=n("pL5B").default;Object(l.render)(i.a.createElement(u.b,{lang:r,dictRequire:function(e){return n("/KVF")("./".concat(e))}},i.a.createElement(o.c,{locale:r,messages:v[r].atlaskit},i.a.createElement(s.CozyProvider,{client:e},i.a.createElement(f.a.Provider,{value:t},i.a.createElement(a,{isPublic:t}))))),document.querySelector("[role=application]"))}(j,x)})},Q2Eh:function(e,t,n){e.exports={"note-article":"note-article--2yQdC"}},RMII:function(e,t,n){e.exports={empty:"empty--FqnXy",appHeader:"appHeader--2ilS0",tableSpecialRow:"tableSpecialRow--4oekp",tableCellEmpty:"tableCellEmpty--21fZ1",tableCellName:"tableCellName--2Jak9",tableCell:"tableCell--3-jDP",tableRow:"tableRow--3SicR"}},VxdY:function(e,t,n){},X3v2:function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return a}),n.d(t,"c",function(){return i});n("dasq");var r=function(){return document.querySelector("[role=application]").dataset},a=function(e,t){return/^\{\{\.[a-zA-Z]*\}\}$/.test(e)?t:e},i=function(){return new URLSearchParams(window.location.search).get("sharecode")}},ZAKO:function(e,t){e.exports="/img/icon.f72378381a11b6129372a35089fea845.svg"},Zlyp:function(e,t,n){"use strict";var r=n("q1tI"),a=n.n(r),i=n("X+Uv"),o=n("ufaa"),s=n("SH7X"),c=n("kyGY"),l=n("buk/"),u=Object(o.a)()(Object(l.c)()(function(e){var t=e.t;return!e.breakpoints.isMobile&&a.a.createElement(c.b,null,t("Notes.List.my_notes"))})),d=n("7YkG"),f=n("V2U0"),p=n("GoJ1"),h=n("o0o1"),v=n.n(h),m=n("KXWi"),b=n("780l"),y=n("snnE");function g(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function _(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var i=e.apply(t,n);function o(e){g(i,r,a,o,s,"next",e)}function s(e){g(i,r,a,o,s,"throw",e)}o(void 0)})}}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(c){a=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var x=Object(s.withClient)(function(e){var t=e.client;return a.a.createElement(b.a,{onClick:_(v.a.mark(function e(){var n,r;return v.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)(t);case 2:n=e.sent,r=n.data,window.location.href=Object(y.b)(r);case 5:case"end":return e.stop()}},e,this)})),icon:"plus",className:"u-c-pointer"})}),j=Object(l.c)()(Object(s.withClient)(function(e){var t=e.t,n=e.className,i=e.client,o=w(Object(r.useState)(!1),2),s=o[0],c=o[1],l=Object(r.useCallback)(_(v.a.mark(function e(){var t,n;return v.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),e.next=3,Object(y.a)(i);case 3:t=e.sent,n=t.data,window.location.href=Object(y.b)(n);case 6:case"end":return e.stop()}},e,this)})),[]);return a.a.createElement(m.c,{onClick:l,type:"submit",busy:s,icon:"plus",label:t("Notes.Add.add_note"),extension:"narrow",className:n})})),k=n("4BeY"),O=n.n(k),E=n("IaFt"),C=n.n(E),S=new O.a({id:"icon_note_empty_77efa79dd615f19897a8ed6ec9097298",use:"icon_note_empty_77efa79dd615f19897a8ed6ec9097298-usage",viewBox:"0 0 171 168",content:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'}),M=(C.a.add(S),S),z=n("Le8U");function P(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(c){a=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var I={_type:"io.cozy.apps",_id:"io.cozy.apps/notes"},D=function(e){var t=N(Object(r.useState)(null),2),n=t[0],a=t[1];return Object(r.useEffect)(function(){var t,n;(t=v.a.mark(function t(){var n,r,i;return v.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(y.d)(e),t.prev=1,a(n),t.next=5,z.CozyFolder.getReferencedFolders(I);case 5:r=t.sent,i=Object(y.d)(e,r[0]._id),a(i),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),a(n);case 13:case"end":return t.stop()}},t,this,[[1,10]])}),n=function(){var e=this,n=arguments;return new Promise(function(r,a){var i=t.apply(e,n);function o(e){P(i,r,a,o,s,"next",e)}function s(e){P(i,r,a,o,s,"throw",e)}o(void 0)})},function(){return n.apply(this,arguments)})()},[]),{notesFolder:n}},T=n("sCMN"),A=Object(l.c)()(Object(s.withClient)(function(e){var t=e.t,n=e.client,r=D(n).notesFolder;return a.a.createElement("div",{className:"empty"},a.a.createElement(p.a,{id:"empty",icon:M,title:t("Notes.Empty.welcome"),text:a.a.createElement(T.a,{href:r,slug:"drive"},function(e){var n=e.href,r=e.onClick;return a.a.createElement("span",{className:"u-mb-half"},t("Notes.Empty.after_created")," ",a.a.createElement("a",{href:n,onClick:r},"Cozy Drive"),".")})},a.a.createElement(j,{className:"u-mt-1"})))})),F=n("y6ex"),q=n("RMII"),U=n.n(q),B=new O.a({id:"icon-note-32_0b87f187ce7a65cb93dbf28b37a73b8d",use:"icon-note-32_0b87f187ce7a65cb93dbf28b37a73b8d-usage",viewBox:"0 0 32 32",content:'\n\n\n\t\n\t\n\n\n\t\n\t\n\t\n\t\n\n\n\t\n\t\n\n'}),L=(C.a.add(B),B),R=Object(o.a)()(Object(l.c)()(function(e){var t=e.note,n=e.f,r=e.breakpoints.isMobile,i=z.CozyFile.splitFilename(t),o=i.filename,s=i.extension;return a.a.createElement(d.f,{className:"u-c-pointer ".concat(U.a.tableRow),onClick:function(){return window.location.href=Object(y.b)(t)}},a.a.createElement(d.c,{className:"".concat(U.a.tableCellName," u-flex u-flex-items-center u-ellipsis u-fz-medium")},a.a.createElement(F.a,{icon:L,size:32,className:"u-mr-1 u-flex-shrink-0"}),a.a.createElement("span",{className:"u-charcoalGrey"},o),a.a.createElement("span",null,s)),!r&&a.a.createElement(a.a.Fragment,null,a.a.createElement(d.c,{className:U.a.tableCell},n(t.updated_at,"DD MMMM")),a.a.createElement(d.c,{className:U.a.tableCell},"—"),a.a.createElement(d.c,{className:U.a.tableCell},"—")))})),Q=function(){return a.a.createElement(d.f,{className:U.a.tableSpecialRow},a.a.createElement(d.c,{className:U.a.tableCellEmpty},a.a.createElement(A,null)))},V=function(){return a.a.createElement(d.f,{className:U.a.tableSpecialRow},a.a.createElement(d.c,{className:"".concat(U.a.tableCellEmpty," u-ta-center")},a.a.createElement(f.a,{size:"xxlarge"})))},J=Object(l.c)()(function(e){var t=e.t,n=e.notes,r=e.fetchStatus;return a.a.createElement(d.a,null,a.a.createElement(d.d,null,a.a.createElement(d.f,null,a.a.createElement(d.e,{className:U.a.tableCellName},t("Notes.List.name")),a.a.createElement(d.e,{className:U.a.tableCell},t("Notes.List.updated_at")),a.a.createElement(d.e,{className:U.a.tableCell},t("Notes.List.location")),a.a.createElement(d.e,{className:U.a.tableCell},t("Notes.List.sharings")))),a.a.createElement(d.b,null,"loading"===r?a.a.createElement(V,null):0===n.length?a.a.createElement(Q,null):n.map(function(e){return a.a.createElement(R,{note:e,key:e._id})})))}),H=n("BkRI"),Z=n.n(H),G=n("mwIZ"),X=n.n(G);function W(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(c){a=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Y=function(e){var t=K(Object(r.useState)([]),2),n=t[0],a=t[1],i=K(Object(r.useState)("loading"),2),o=i[0],s=i[1];return Object(r.useEffect)(function(){var t,n;(t=v.a.mark(function t(){var n,r,i,o,c;return v.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.query(e.all("io.cozy.files").where({cozyMetadata:{createdByApp:"notes"},trashed:!1,updated_at:{$gt:null}}).sortBy([{"cozyMetadata.createdByApp":"desc"},{updated_at:"desc"}]).indexFields(["cozyMetadata.createdByApp","updated_at"]));case 3:return n=t.sent,r=n.data,i=r.map(function(t){return e.getStackClient().fetchJSON("GET","/notes/".concat(t._id))}),t.next=8,Promise.all(i);case 8:o=t.sent,(c=Z()(r)).forEach(function(e,t){e.name=X()(o[t],"data.attributes.name",e.name)}),a(c),s("loaded"),t.next=19;break;case 15:t.prev=15,t.t0=t.catch(0),s("errored"),console.log({error:t.t0});case 19:case"end":return t.stop()}},t,this,[[0,15]])}),n=function(){var e=this,n=arguments;return new Promise(function(r,a){var i=t.apply(e,n);function o(e){W(i,r,a,o,s,"next",e)}function s(e){W(i,r,a,o,s,"throw",e)}o(void 0)})},function(){return n.apply(this,arguments)})()},[]),{fetchStatus:o,data:{notes:n}}},$=function(e,t){return"loaded"===e&&t.length>0},ee=Object(o.a)()(Object(s.withClient)(function(e){var t=e.breakpoints.isMobile,n=e.client,r=cozy.bar.BarRight,o=Y(n),s=o.data.notes,c=o.fetchStatus;return a.a.createElement(a.a.Fragment,null,a.a.createElement(i.a,{className:"u-mt-1 u-mt-0-m"},a.a.createElement("div",{className:"".concat(U.a.appHeader," u-flex u-flex-justify-between u-flex-items-center")},a.a.createElement(u,null),!t&&$(c,s)&&a.a.createElement(j,null)),a.a.createElement(J,{notes:s,fetchStatus:c})),t&&$(c,s)&&a.a.createElement(r,null,a.a.createElement(x,null)))})),te=n("k4o+"),ne=n("9jEr"),re=n("jWvl"),ae={allowTables:!0,allowRule:!0,allowLists:!0,allowTextColor:!0,allowPanel:!0},ie=function(e){return a.a.createElement("header",{className:"page-header-menu "+(e.className||"")},a.a.createElement("div",{className:"page-header-menu--left"},e.left),e.children,a.a.createElement("div",{className:"page-header-menu--right"},e.right))},oe=n("Q2Eh"),se=n.n(oe);function ce(){return(ce=Object.assign||function(e){for(var t=1;t0&&this.emit("data",s),e.next=30;break;case 25:e.prev=25,e.t0=e.catch(14),this.hasQueuedSteps()?this.rebaseStepsInQueue():this.enqueueSteps({getState:n}),this.increaseBackoff(),this.isSending=!1;case 30:return e.next=32,this.processQueue();case 32:case"end":return e.stop()}},e,this,[[14,25]])})),function(){return s.apply(this,arguments)})},{key:"connect",value:(o=Se(v.a.mark(function e(t,n){var r,a=this;return v.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=this.config.docId,this.service.join(r),this.service.onStepsCreated(r,function(e){a.emit("data",{version:e.version,steps:[e]})}),this.service.onTelepointerUpdated(r,function(e){a.emit("telepointer",e)}),this.emit("connected",{doc:n,version:t});case 5:case"end":return e.stop()}},e,this)})),function(e,t){return o.apply(this,arguments)})},{key:"getSteps",value:(i=Se(v.a.mark(function e(t){var n;return v.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.config.docId,e.next=3,this.service.getSteps(n,t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"sendTelepointer",value:(a=Se(v.a.mark(function e(t){var n;return v.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.config.docId,e.next=3,this.service.pushTelepointer(n,t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)})),function(e){return a.apply(this,arguments)})},{key:"on",value:function(e,t){return this.eventEmitter.on(e,t),this}},{key:"off",value:function(e,t){return this.eventEmitter.off(e,t),this}},{key:"emit",value:function(e,t){return this.eventEmitter.emit(e,t),this}}])&&Me(t.prototype,n),r&&Me(t,r),e}();function Ne(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function Ie(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);te.timestamp||(r.updateParticipant(t,e.timestamp),r.emit("telepointer",e))}}),this.config=De({},t),this.config.sessionId=n.getSessionId(),this.config.userId=n.getUserId(),this.serviceClient=n,this.channel=t.channel||new Pe(this.config,n),this.eventEmitter=new ke.EventEmitter2,this.queue=[],this.getState=function(){},this.participants=new Map,this.pauseQueue=!1,this.initialVersion=t.version,this.pauseQueue=!1}var t,n,r,a,i;return t=e,(n=[{key:"initialize",value:function(e){var t=this;this.getState=e,this.channel.on("connected",function(e){var n=e.doc,r=e.version,a=t.config.sessionId;t.emit("init",{sid:a,doc:n,version:r}),t.emit("connected",{sid:a})}),this.channel.on("data",this.onReceiveData),this.channel.on("telepointer",this.onReceiveTelepointer),this.channel.on("needcatchup",function(){return t.catchup()});var n=e(),r=Fe.encode(n.doc),a=void 0!==this.initialVersion?this.initialVersion:r.version,i=De({},r,{version:a});return this.channel.connect(a,i),this}},{key:"send",value:function(e,t,n){e.steps&&e.steps.length&&this.channel.sendSteps(this.getState,n)}},{key:"sendMessage",value:function(e){if(e)switch(e.type){case"telepointer":this.channel.sendTelepointer(De({},e,{timestamp:(new Date).getTime()}))}}},{key:"queueData",value:function(e){var t=[].concat(Ie(this.queue),[e]).sort(function(e,t){var n=e.version-e.steps.length,r=t.version-t.steps.length;return n>r?1:nt.version?-1:e.version0&&this.onReceiveData({steps:i,version:a},!0),this.queueTimeout=void 0,this.pauseQueue=!1,this.processQueue(),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(2),this.pauseQueue=!1,this.programCatchup();case 19:case"end":return e.stop()}},e,this,[[2,15]])}),i=function(){var e=this,t=arguments;return new Promise(function(n,r){var i=a.apply(e,t);function o(e){Ne(i,n,r,o,s,"next",e)}function s(e){Ne(i,n,r,o,s,"throw",e)}o(void 0)})},function(){return i.apply(this,arguments)})},{key:"programCatchup",value:function(){var e=this;this.queueTimeout||(this.queueTimeout=window.setTimeout(function(){e.catchup()},1e3))}},{key:"cancelCatchup",value:function(){this.queueTimeout&&(window.clearTimeout(this.queueTimeout),this.queueTimeout=void 0)}},{key:"processQueue",value:function(){if(this.queue.length>0&&!this.pauseQueue)for(var e=Object(Oe.getVersion)(this.getState());this.queue.length>0;){var t=this.queue[0],n=t.version,r=t.steps.length+e;if(n==r)this.cancelCatchup(),this.queue.shift(),this.processRemoteData(t),e=n;else if(n<=r&&this.queue.shift(),n>r){this.programCatchup();break}}}},{key:"updateParticipant",value:function(e,t){var n=this,r=this.serviceClient.getUserId(e),a=function(e){var t=e.userId,n=e.sessionId;return{userId:n,sessionId:n||t,name:t,avatar:"https://api.adorable.io/avatars/80/".concat(t.replace(/[^a-zA-Z0-9]/g,""),".png"),email:"".concat(t.replace(/\s+/g,".").replace(/[^a-zA-Z0-9.]/g,""),".toLocaleLowerCase()}@mycozy.cloud")}}({userId:r,sessionId:e});this.participants.set(r,De({name:"",email:"",avatar:"",sessionId:e,userId:r},a,{lastActive:t}));var i=[this.participants.get(r)],o=(new Date).getTime(),s=Array.from(this.participants.values()).filter(function(e){return(o-e.lastActive)/1e3>300});s.forEach(function(e){return n.participants.delete(e.userId)}),this.emit("presence",{joined:i,left:s})}},{key:"emit",value:function(e,t){return this.eventEmitter.emit(e,t),this}},{key:"on",value:function(e,t){return this.eventEmitter.on(e,t),this}},{key:"off",value:function(e,t){return this.eventEmitter.off(e,t),this}},{key:"unsubscribeAll",value:function(e){this.eventEmitter.removeAllListeners(e)}}])&&Te(t.prototype,n),r&&Te(t,r),e}(),Ue=n("oBqo"),Be=n.n(Ue),Le=n("hmtS");function Re(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function Qe(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var i=e.apply(t,n);function o(e){Re(i,r,a,o,s,"next",e)}function s(e){Re(i,r,a,o,s,"throw",e)}o(void 0)})}}function Ve(e){for(var t=1;t0?w:void 0,leftComponent:a.a.createElement(je,{returnUrl:M,file:b.file}),rightComponent:!c&&a.a.createElement(_e,{file:b.file})}):a.a.createElement(fe,{returnUrl:M})})),nt=Object(l.c)()(function(e){var t=e.t;return a.a.createElement(p.a,{icon:"unlink",title:t("Error.unshared_title"),text:t("Error.unshared_text")})});n.d(t,"b",function(){return ee}),n.d(t,"a",function(){return tt}),n.d(t,"c",function(){return nt})},hmtS:function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n("byeC"),a=[["doc",{content:"(block)+",marks:"link"}],["paragraph",{content:"inline*",group:"block",marks:"strong code em link strike subsup textColor typeAheadQuery underline",parseDOM:[{tag:"p"}]}],["text",{group:"inline"}],["bulletList",{group:"block",content:"listItem+",parseDOM:[{tag:"ul"}]}],["orderedList",{group:"block",content:"listItem+",parseDOM:[{tag:"ol"}]}],["listItem",{content:"(paragraph ) (paragraph | bulletList | orderedList )*",defining:!0,parseDOM:[{tag:"li"}]}],["heading",{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}]}],["blockquote",{content:"paragraph+",group:"block",defining:!0,selectable:!1,parseDOM:[{tag:"blockquote"}]}],["rule",{group:"block",parseDOM:[{tag:"hr"}]}],["panel",{group:"block",content:"(paragraph | heading | bulletList | orderedList)+",attrs:{panelType:{default:"info"}},parseDOM:[{tag:"div[data-panel-type]"}]}],["confluenceUnsupportedBlock",{group:"block",attrs:{cxhtml:{default:null}},parseDOM:[{tag:'div[data-node-type="confluenceUnsupportedBlock"]'}]}],["confluenceUnsupportedInline",{group:"inline",inline:!0,atom:!0,attrs:{cxhtml:{default:null}},parseDOM:[{tag:'div[data-node-type="confluenceUnsupportedInline"]'}]}],["unsupportedBlock",{inline:!1,group:"block",atom:!0,selectable:!0,attrs:{originalValue:{default:{}}},parseDOM:[{tag:'[data-node-type="unsupportedBlock"]'}]}],["unsupportedInline",{inline:!0,group:"inline",selectable:!0,attrs:{originalValue:{default:{}}},parseDOM:[{tag:'[data-node-type="unsupportedInline"]'}]}],["hardBreak",{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}]}],["table",{content:"tableRow+",attrs:{isNumberColumnEnabled:{default:!1},layout:{default:"default"},__autoSize:{default:!1}},tableRole:"table",isolating:!0,selectable:!1,group:"block",parseDOM:[{tag:"table"}]}],["tableHeader",{content:"(paragraph | panel | blockquote | orderedList | bulletList | rule | heading )+",attrs:{colspan:{default:1},rowspan:{default:1},colwidth:{default:null},background:{default:null}},tableRole:"header_cell",isolating:!0,marks:"",parseDOM:[{tag:"th"}]}],["tableRow",{content:"(tableCell | tableHeader)+",tableRole:"row",parseDOM:[{tag:"tr"}]}],["tableCell",{content:"(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | unsupportedBlock)+",attrs:{colspan:{default:1},rowspan:{default:1},colwidth:{default:null},background:{default:null}},tableRole:"cell",marks:"",isolating:!0,parseDOM:[{tag:".ak-renderer-table-number-column",ignore:!0},{tag:"td"}]}]],i=[["link",{excludes:"color",group:"link",attrs:{href:{},__confluenceMetadata:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]"}]}],["em",{inclusive:!0,group:"fontStyle",parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}]}],["strong",{inclusive:!0,group:"fontStyle",parseDOM:[{tag:"strong"},{tag:"b"},{style:"font-weight"}]}],["textColor",{attrs:{color:{}},inclusive:!0,group:"color",parseDOM:[{style:"color"}]}],["strike",{inclusive:!0,group:"fontStyle",parseDOM:[{tag:"strike"},{tag:"s"},{tag:"del"},{style:"text-decoration"}]}],["subsup",{inclusive:!0,group:"fontStyle",attrs:{type:{default:"sub"}},parseDOM:[{tag:"sub",attrs:{type:"sub"}},{tag:"sup",attrs:{type:"sup"}}]}],["underline",{inclusive:!0,group:"fontStyle",parseDOM:[{tag:"u"},{style:"text-decoration"}]}],["code",{excludes:"fontStyle link searchQuery color",inclusive:!0,parseDOM:[{tag:"span.code",preserveWhitespace:!0},{tag:"code",preserveWhitespace:!0},{tag:"tt",preserveWhitespace:!0},{tag:"span",preserveWhitespace:!0}]}],["typeAheadQuery",{excludes:"searchQuery",inclusive:!0,group:"searchQuery",parseDOM:[{tag:"span[data-type-ahead-query]"}],attrs:{trigger:{default:""}}}]];function o(e){return e.reduce(function(e,t){return e[t[0]]=t[1],e},{})}var s={nodes:a,marks:i},c={nodes:o(a),marks:o(i)};new r.Schema(c)},nw0P:function(e,t,n){var r={"./_lib/build_formatting_tokens_reg_exp/index.js":"kOWh","./ar/build_distance_in_words_locale/index.js":"XxX6","./ar/build_format_locale/index.js":"alis","./ar/index.js":"EDRf","./be/build_distance_in_words_locale/index.js":"LQ09","./be/build_format_locale/index.js":"kj7F","./be/index.js":"YEhR","./bg/build_distance_in_words_locale/index.js":"7K3h","./bg/build_format_locale/index.js":"RrdL","./bg/index.js":"isx8","./ca/build_distance_in_words_locale/index.js":"wqqj","./ca/build_format_locale/index.js":"qcV0","./ca/index.js":"Vwa+","./cs/build_distance_in_words_locale/index.js":"ZKDM","./cs/build_format_locale/index.js":"ipyF","./cs/index.js":"dvhP","./da/build_distance_in_words_locale/index.js":"2Mgc","./da/build_format_locale/index.js":"Gned","./da/index.js":"7ur/","./de/build_distance_in_words_locale/index.js":"5IWf","./de/build_format_locale/index.js":"THCn","./de/index.js":"bgw5","./el/build_distance_in_words_locale/index.js":"o/GB","./el/build_format_locale/index.js":"8T9h","./el/index.js":"dH0v","./en/build_distance_in_words_locale/index.js":"LZbM","./en/build_format_locale/index.js":"6DAA","./en/index.js":"Us+F","./eo/build_distance_in_words_locale/index.js":"qrnn","./eo/build_format_locale/index.js":"Bl15","./eo/index.js":"UB7v","./es/build_distance_in_words_locale/index.js":"GEfZ","./es/build_format_locale/index.js":"O+zC","./es/index.js":"/S0t","./fi/build_distance_in_words_locale/index.js":"VHtQ","./fi/build_format_locale/index.js":"Oydx","./fi/index.js":"ndVD","./fil/build_distance_in_words_locale/index.js":"uq4p","./fil/build_format_locale/index.js":"d7hw","./fil/index.js":"pNfm","./fr/build_distance_in_words_locale/index.js":"IzMR","./fr/build_format_locale/index.js":"I3Zg","./fr/index.js":"LKA2","./hr/build_distance_in_words_locale/index.js":"DPvn","./hr/build_format_locale/index.js":"puw3","./hr/index.js":"L9Jq","./hu/build_distance_in_words_locale/index.js":"w2RQ","./hu/build_format_locale/index.js":"/0iD","./hu/index.js":"Nm+E","./id/build_distance_in_words_locale/index.js":"JbvB","./id/build_format_locale/index.js":"0wlw","./id/index.js":"A6C3","./is/build_distance_in_words_locale/index.js":"qzMC","./is/build_format_locale/index.js":"S3yD","./is/index.js":"N4bE","./it/build_distance_in_words_locale/index.js":"MDEp","./it/build_format_locale/index.js":"aUJd","./it/index.js":"hmb4","./ja/build_distance_in_words_locale/index.js":"nNvt","./ja/build_format_locale/index.js":"buui","./ja/index.js":"uAXs","./ko/build_distance_in_words_locale/index.js":"oEw+","./ko/build_format_locale/index.js":"9SQf","./ko/index.js":"iW8+","./mk/build_distance_in_words_locale/index.js":"nmwZ","./mk/build_format_locale/index.js":"htxJ","./mk/index.js":"GzBU","./nb/build_distance_in_words_locale/index.js":"SL1f","./nb/build_format_locale/index.js":"CJ5F","./nb/index.js":"73vv","./nl/build_distance_in_words_locale/index.js":"Uyu0","./nl/build_format_locale/index.js":"doCD","./nl/index.js":"hCQt","./pl/build_distance_in_words_locale/index.js":"FUBD","./pl/build_format_locale/index.js":"nOYf","./pl/index.js":"B6yL","./pt/build_distance_in_words_locale/index.js":"aTPA","./pt/build_format_locale/index.js":"TTT0","./pt/index.js":"gdks","./ro/build_distance_in_words_locale/index.js":"gI+A","./ro/build_format_locale/index.js":"njjO","./ro/index.js":"r2yp","./ru/build_distance_in_words_locale/index.js":"KmPx","./ru/build_format_locale/index.js":"UUBw","./ru/index.js":"nz/o","./sk/build_distance_in_words_locale/index.js":"q2Bs","./sk/build_format_locale/index.js":"9sxn","./sk/index.js":"Wqan","./sl/build_distance_in_words_locale/index.js":"mlv2","./sl/build_format_locale/index.js":"vHkZ","./sl/index.js":"KYSo","./sr/build_distance_in_words_locale/index.js":"LlkS","./sr/build_format_locale/index.js":"RhjJ","./sr/index.js":"7mU3","./sv/build_distance_in_words_locale/index.js":"UNBN","./sv/build_format_locale/index.js":"zTNB","./sv/index.js":"hxgj","./th/build_distance_in_words_locale/index.js":"XAGa","./th/build_format_locale/index.js":"We2s","./th/index.js":"Pk+z","./tr/build_distance_in_words_locale/index.js":"aFZF","./tr/build_format_locale/index.js":"jh7A","./tr/index.js":"3ZWG","./zh_cn/build_distance_in_words_locale/index.js":"KdB7","./zh_cn/build_format_locale/index.js":"l4EP","./zh_cn/index.js":"8tMq","./zh_tw/build_distance_in_words_locale/index.js":"vyyr","./zh_tw/build_format_locale/index.js":"uYH7","./zh_tw/index.js":"QPlQ"};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id="nw0P"},pL5B:function(e,t,n){"use strict";n.r(t),function(e){var r=n("o0o1"),a=n.n(r),i=n("q1tI"),o=n.n(i),s=n("0cfB"),c=n("Ty5D"),l=n("55Ip"),u=n("SH7X"),d=n("67rm"),f=n("ufaa"),p=n("jDpt"),h=n("le8I"),v=n("V2U0"),m=n("vYzF"),b=n("Zlyp"),y=n("snnE"),g=n("X3v2");function _(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(c){a=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var x=n("pZg0"),j=Object(c.f)(function(e){var t=Object(y.h)();return o.a.createElement(b.a,{noteId:e.match.params.id,returnUrl:t})}),k=function(){return o.a.createElement(c.c,null,o.a.createElement(c.a,{path:"/n/:id",component:j}),o.a.createElement(c.a,{path:"/",component:b.b}))},O=Object(u.withClient)(function(e){var t=e.client,n=w(Object(i.useState)(null),2),r=n[0],s=n[1],c=Object(i.useMemo)(function(){return Object(y.h)()},[]);return Object(i.useEffect)(function(){(function(){var e,n=(e=a.a.mark(function e(){var n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(y.i)(t);case 3:n=e.sent,s(n),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),s(!1);case 10:case"end":return e.stop()}},e,this,[[0,7]])}),function(){var t=this,n=arguments;return new Promise(function(r,a){var i=e.apply(t,n);function o(e){_(i,r,a,o,s,"next",e)}function s(e){_(i,r,a,o,s,"throw",e)}o(void 0)})});return function(){return n.apply(this,arguments)}})()()},[]),r?o.a.createElement(b.a,{noteId:r,returnUrl:c||!1}):null!==r?o.a.createElement(b.c,null):o.a.createElement(v.a,{size:"xxlarge",middle:!0})});t.default=Object(s.hot)(e)(Object(f.a)()(Object(u.withClient)(function(e){var t=e.isPublic,n=e.breakpoints.isMobile,r=e.client,a="";if(n){var i=r.getInstanceOptions();a=Object(g.a)(i.cozyAppName,x.name)}var s=cozy.bar.BarCenter;return o.a.createElement(l.a,null,o.a.createElement(p.b,{monoColumn:!0},!t&&n&&o.a.createElement(s,null,o.a.createElement(m.a,null,a)),o.a.createElement(p.c,null,o.a.createElement(p.a,null,t?o.a.createElement(O,null):o.a.createElement(k,null))),o.a.createElement(h.a,null),o.a.createElement(d.a,null)))})))}.call(this,n("3UD+")(e))},pZg0:function(e,t){e.exports={name:"Notes",name_prefix:"Cozy",slug:"notes",icon:"icon.svg",categories:["cozy"],version:"1.5.0",licence:"AGPL-3.0",editor:"Cozy",source:"https://github.com/cozy/cozy-notes.git@build",developer:{name:"Cozy Cloud",url:"https://cozy.io"},screenshots:["screenshots/fr/screenshot01.png","screenshots/fr/screenshot02.png"],langs:["en","fr"],routes:{"/":{folder:"/",index:"index.html",public:!1},"/public":{folder:"/",index:"index.html",public:!0}},permissions:{apps:{description:"Required by the cozy-bar to display the icons of the apps",type:"io.cozy.apps",verbs:["GET"]},files:{description:"Notes as files",type:"io.cozy.files"},settings:{description:"Required by the cozy-bar to display Claudy and know which applications are coming soon",type:"io.cozy.settings",verbs:["GET"]}}}},snnE:function(e,t,n){"use strict";n.d(t,"j",function(){return h}),n.d(t,"h",function(){return m}),n.d(t,"b",function(){return b}),n.d(t,"i",function(){return y}),n.d(t,"f",function(){return _}),n.d(t,"e",function(){return w}),n.d(t,"d",function(){return x}),n.d(t,"g",function(){return j}),n.d(t,"c",function(){return k}),n.d(t,"a",function(){return O});var r=n("o0o1"),a=n.n(r),i=n("mwIZ"),o=n.n(i),s=n("AHTZ"),c=n("X3v2"),l=n("hmtS"),u=n("pZg0"),d=n.n(u);function f(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(c){a=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function h(e){return new URL(e.getStackClient().uri).hostname+Math.floor(100*Math.random())}var v="returnUrl";function m(){var e=new URLSearchParams(window.location.search),t=!0,n=!1,r=void 0;try{for(var a,i=e[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=p(a.value,2),s=o[0],c=o[1];if(s===v)return c}}catch(l){n=!0,r=l}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}var b=function(e){var t=new URL(window.location);return t.searchParams.set(v,"#/"),t.hash="#/n/".concat(e.id),t};function y(e){return g.apply(this,arguments)}function g(){var e;return e=a.a.mark(function e(t){var n,r,i,s;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.collection("io.cozy.permissions").getOwnPermissions();case 2:return n=e.sent,r=n.data,i=r.attributes.permissions,s=o()(Object.values(i),"0.values.0"),e.abrupt("return",s);case 7:case"end":return e.stop()}},e,this)}),(g=function(){var t=this,n=arguments;return new Promise(function(r,a){var i=e.apply(t,n);function o(e){f(i,r,a,o,s,"next",e)}function s(e){f(i,r,a,o,s,"throw",e)}o(void 0)})}).apply(this,arguments)}function _(e){return e.relationships.parent.data.id}function w(e){return"/folder/".concat(e.replace(/-/g,""))}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=new URL(e.getStackClient().uri),r=e.getInstanceOptions().cozySubdomainType,a=null!==t?w(t):"";return Object(s.b)({cozyUrl:n.origin,slug:"drive",subDomainType:r,nativePath:a})}function j(e,t){return x(e,_(t))}function k(){var e=Object(c.b)(),t=Object(c.a)(e.cozyAppNamePrefix||d.a.name_prefix,""),n=Object(c.a)(e.cozyAppName,d.a.name);return""!=t?"".concat(t," ").concat(n):n}function O(e){return e.getStackClient().fetchJSON("POST","/notes",{data:{type:"io.cozy.notes.documents",attributes:{title:"",schema:l.a}}})}}}); \ No newline at end of file +!function(e){function t(t){for(var r,o,s=t[0],c=t[1],l=t[2],d=0,f=[];dback and try again later."},"manifest":{"short_description":"Cozy Notes is your personal and collaborative note-taking application.","long_description":"Notes is an online text editor that can already offer you to:\\n\\n* Create your own notes with the essential features (bold, underlined, links, tables...)\\n* Fill and find your notes with you other documents in files of your personal Drive\\n* Edit easily your notes from all your devices\\n* Access your notes offline\\n* For the fans, use shortcuts and input in markdown format ... and even write with contacts together on the same note (coming soon)!","screenshots":["screenshots/en/screenshot01.png","screenshots/en/screenshot02.png"]}}')},"9pOX":function(e){e.exports=JSON.parse('{"Notes":{"Add":{"add_note":"Ajouter une note"},"EditorView":{"main_placeholder":"Écrivez ce que vous souhaitez…"},"Editor":{"title_placeholder":"Ici votre titre"},"List":{"my_notes":"Mes Notes","name":"Nom","updated_at":"Mise à jour","location":"Emplacement","sharings":"Partage"},"Empty":{"welcome":"Bienvenue sur Cozy Notes","after_created":"Une fois votre note créée, il vous est possible de la retrouver dans "}},"Error":{"unshared_title":"Le partage n\'est plus actif","unshared_text":"Le propriétaire a peut-être révoqué ce partage. Vous ne pouvez plus éditer de note à cette adresse.","loading_error_title":"La note n\'a pas pu être chargée","loading_error_text_noReturnUrl":"Cette note n\'existe peut-être plus, ou nos serveurs ont peut-être un moment d\'égarrement. Merci de retenter plus tard.","loading_error_text_returnUrl":"Cette note n\'existe peut-être plus, ou nos serveurs ont peut-être un moment d\'égarrement. Merci revenir en arrière et de retenter plus tard."},"manifest":{"short_description":"Cozy Notes est votre application de prise de notes personnelles et collaboratives.","long_description":"Notes est un éditeur de texte en ligne destiné à :\\n\\n* Créer vos propres notes avec les fonctionnalités essentielles (gras, souligné, liens, tableaux...)\\n* Classer et retrouver vos notes avec vos autres documents, dans les répertoires de votre Drive personnel\\n* Éditer facilement vos notes depuis tous vos appareils\\n* Accéder à vos notes, même sans internet, stockées sur votre PC\\n* Pour les aficionados, utiliser les raccourcis et la saisie au format markdown\\n* ... et même écrire à plusieurs simultanément sur la même note (à venir) ! ","screenshots":["screenshots/fr/screenshot01.png","screenshots/fr/screenshot02.png"]}}')},G2JP:function(e,t,n){"use strict";var r=n("q1tI"),a=n.n(r).a.createContext(!1);t.a=a},LiWt:function(e,t,n){"use strict";n.r(t);n("llna"),n("/8/d"),n("3FT0"),n("VxdY");var r,a=n("q1tI"),i=n.n(a),o=n("JRPe"),s=n("SH7X"),c=n.n(s),l=n("i8i4"),u=n("buk/"),d=n("Le8U"),f=n("G2JP"),p=n("X3v2"),h=n("pZg0"),v={en:{react:n("PTt1"),atlaskit:n("eFxx").default},fr:{react:n("Z6Ro"),atlaskit:n("XCed").default}};Object(o.d)(v.en.react),Object(o.d)(v.fr.react);document.addEventListener("DOMContentLoaded",function(){var e=Object(p.b)(),t=Object(p.a)(e.cozyIconPath,n("ZAKO")),a=Object(p.a)(e.cozyAppNamePrefix||h.name_prefix,""),m=Object(p.a)(e.cozyAppName,h.name),b=Object(p.a)(e.cozyAppSlug,h.slug),y=Object(p.a)(e.cozyAppVersion,h.version);r=Object(p.a)(e.cozyLocale,"en");var g=window.location?window.location.protocol:"https:",_=Object(p.c)(),w=_||e.cozyToken,x=_||!w||""==w,j=new c.a({uri:"".concat(g,"//").concat(e.cozyDomain),token:w,appMetadata:{slug:b,version:y}});d.Document.cozyClient||d.Document.registerClient(j),x||cozy.bar.init({appName:m,appNamePrefix:a,iconPath:t,lang:r,replaceTitleOnMobile:!0,cozyClient:j,isPublic:x}),function(e,t){var a=n("pL5B").default;Object(l.render)(i.a.createElement(u.b,{lang:r,dictRequire:function(e){return n("/KVF")("./".concat(e))}},i.a.createElement(o.c,{locale:r,messages:v[r].atlaskit},i.a.createElement(s.CozyProvider,{client:e},i.a.createElement(f.a.Provider,{value:t},i.a.createElement(a,{isPublic:t}))))),document.querySelector("[role=application]"))}(j,x)})},Q2Eh:function(e,t,n){e.exports={"note-article":"note-article--2yQdC"}},RMII:function(e,t,n){e.exports={empty:"empty--FqnXy",appHeader:"appHeader--2ilS0",tableSpecialRow:"tableSpecialRow--4oekp",tableCellEmpty:"tableCellEmpty--21fZ1",tableCellName:"tableCellName--2Jak9",tableCell:"tableCell--3-jDP",tableRow:"tableRow--3SicR"}},VxdY:function(e,t,n){},X3v2:function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"a",function(){return a}),n.d(t,"c",function(){return i});n("dasq");var r=function(){return document.querySelector("[role=application]").dataset},a=function(e,t){return/^\{\{\.[a-zA-Z]*\}\}$/.test(e)?t:e},i=function(){return new URLSearchParams(window.location.search).get("sharecode")}},ZAKO:function(e,t){e.exports="/img/icon.f72378381a11b6129372a35089fea845.svg"},Zlyp:function(e,t,n){"use strict";var r=n("q1tI"),a=n.n(r),i=n("X+Uv"),o=n("ufaa"),s=n("SH7X"),c=n("kyGY"),l=n("buk/"),u=Object(o.a)()(Object(l.c)()(function(e){var t=e.t;return!e.breakpoints.isMobile&&a.a.createElement(c.b,null,t("Notes.List.my_notes"))})),d=n("7YkG"),f=n("V2U0"),p=n("GoJ1"),h=n("o0o1"),v=n.n(h),m=n("KXWi"),b=n("780l"),y=n("snnE");function g(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function _(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var i=e.apply(t,n);function o(e){g(i,r,a,o,s,"next",e)}function s(e){g(i,r,a,o,s,"throw",e)}o(void 0)})}}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(c){a=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var x=Object(s.withClient)(function(e){var t=e.client;return a.a.createElement(b.a,{onClick:_(v.a.mark(function e(){var n,r;return v.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)(t);case 2:n=e.sent,r=n.data,window.location.href=Object(y.b)(r);case 5:case"end":return e.stop()}},e,this)})),icon:"plus",className:"u-c-pointer"})}),j=Object(l.c)()(Object(s.withClient)(function(e){var t=e.t,n=e.className,i=e.client,o=w(Object(r.useState)(!1),2),s=o[0],c=o[1],l=Object(r.useCallback)(_(v.a.mark(function e(){var t,n;return v.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),e.next=3,Object(y.a)(i);case 3:t=e.sent,n=t.data,window.location.href=Object(y.b)(n);case 6:case"end":return e.stop()}},e,this)})),[]);return a.a.createElement(m.c,{onClick:l,type:"submit",busy:s,icon:"plus",label:t("Notes.Add.add_note"),extension:"narrow",className:n})})),k=n("4BeY"),O=n.n(k),E=n("IaFt"),C=n.n(E),S=new O.a({id:"icon_note_empty_77efa79dd615f19897a8ed6ec9097298",use:"icon_note_empty_77efa79dd615f19897a8ed6ec9097298-usage",viewBox:"0 0 171 168",content:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n'}),M=(C.a.add(S),S),z=n("Le8U");function P(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(c){a=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var I={_type:"io.cozy.apps",_id:"io.cozy.apps/notes"},D=function(e){var t=N(Object(r.useState)(null),2),n=t[0],a=t[1];return Object(r.useEffect)(function(){var t,n;(t=v.a.mark(function t(){var n,r,i;return v.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=Object(y.d)(e),t.prev=1,a(n),t.next=5,z.CozyFolder.getReferencedFolders(I);case 5:r=t.sent,i=Object(y.d)(e,r[0]._id),a(i),t.next=13;break;case 10:t.prev=10,t.t0=t.catch(1),a(n);case 13:case"end":return t.stop()}},t,this,[[1,10]])}),n=function(){var e=this,n=arguments;return new Promise(function(r,a){var i=t.apply(e,n);function o(e){P(i,r,a,o,s,"next",e)}function s(e){P(i,r,a,o,s,"throw",e)}o(void 0)})},function(){return n.apply(this,arguments)})()},[]),{notesFolder:n}},T=n("sCMN"),A=Object(l.c)()(Object(s.withClient)(function(e){var t=e.t,n=e.client,r=D(n).notesFolder;return a.a.createElement("div",{className:"empty"},a.a.createElement(p.a,{id:"empty",icon:M,title:t("Notes.Empty.welcome"),text:a.a.createElement(T.a,{href:r,slug:"drive"},function(e){var n=e.href,r=e.onClick;return a.a.createElement("span",{className:"u-mb-half"},t("Notes.Empty.after_created")," ",a.a.createElement("a",{href:n,onClick:r},"Cozy Drive"),".")})},a.a.createElement(j,{className:"u-mt-1"})))})),F=n("y6ex"),q=n("RMII"),U=n.n(q),B=new O.a({id:"icon-note-32_0b87f187ce7a65cb93dbf28b37a73b8d",use:"icon-note-32_0b87f187ce7a65cb93dbf28b37a73b8d-usage",viewBox:"0 0 32 32",content:'\n\n\n\t\n\t\n\n\n\t\n\t\n\t\n\t\n\n\n\t\n\t\n\n'}),L=(C.a.add(B),B),R=Object(o.a)()(Object(l.c)()(function(e){var t=e.note,n=e.f,r=e.breakpoints.isMobile,i=z.CozyFile.splitFilename(t),o=i.filename,s=i.extension;return a.a.createElement(d.f,{className:"u-c-pointer ".concat(U.a.tableRow),onClick:function(){return window.location.href=Object(y.b)(t)}},a.a.createElement(d.c,{className:"".concat(U.a.tableCellName," u-flex u-flex-items-center u-ellipsis u-fz-medium")},a.a.createElement(F.a,{icon:L,size:32,className:"u-mr-1 u-flex-shrink-0"}),a.a.createElement("span",{className:"u-charcoalGrey"},o),a.a.createElement("span",null,s)),!r&&a.a.createElement(a.a.Fragment,null,a.a.createElement(d.c,{className:U.a.tableCell},n(t.updated_at,"DD MMMM")),a.a.createElement(d.c,{className:U.a.tableCell},"—"),a.a.createElement(d.c,{className:U.a.tableCell},"—")))})),Q=function(){return a.a.createElement(d.f,{className:U.a.tableSpecialRow},a.a.createElement(d.c,{className:U.a.tableCellEmpty},a.a.createElement(A,null)))},V=function(){return a.a.createElement(d.f,{className:U.a.tableSpecialRow},a.a.createElement(d.c,{className:"".concat(U.a.tableCellEmpty," u-ta-center")},a.a.createElement(f.a,{size:"xxlarge"})))},J=Object(l.c)()(function(e){var t=e.t,n=e.notes,r=e.fetchStatus;return a.a.createElement(d.a,null,a.a.createElement(d.d,null,a.a.createElement(d.f,null,a.a.createElement(d.e,{className:U.a.tableCellName},t("Notes.List.name")),a.a.createElement(d.e,{className:U.a.tableCell},t("Notes.List.updated_at")),a.a.createElement(d.e,{className:U.a.tableCell},t("Notes.List.location")),a.a.createElement(d.e,{className:U.a.tableCell},t("Notes.List.sharings")))),a.a.createElement(d.b,null,"loading"===r?a.a.createElement(V,null):0===n.length?a.a.createElement(Q,null):n.map(function(e){return a.a.createElement(R,{note:e,key:e._id})})))}),H=n("BkRI"),Z=n.n(H),G=n("mwIZ"),X=n.n(G);function W(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(c){a=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Y=function(e){var t=K(Object(r.useState)([]),2),n=t[0],a=t[1],i=K(Object(r.useState)("loading"),2),o=i[0],s=i[1];return Object(r.useEffect)(function(){var t,n;(t=v.a.mark(function t(){var n,r,i,o,c;return v.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,e.query(e.all("io.cozy.files").where({cozyMetadata:{createdByApp:"notes"},trashed:!1,updated_at:{$gt:null}}).sortBy([{"cozyMetadata.createdByApp":"desc"},{updated_at:"desc"}]).indexFields(["cozyMetadata.createdByApp","updated_at"]));case 3:return n=t.sent,r=n.data,i=r.map(function(t){return e.getStackClient().fetchJSON("GET","/notes/".concat(t._id))}),t.next=8,Promise.all(i);case 8:o=t.sent,(c=Z()(r)).forEach(function(e,t){e.name=X()(o[t],"data.attributes.name",e.name)}),a(c),s("loaded"),t.next=19;break;case 15:t.prev=15,t.t0=t.catch(0),s("errored"),console.log({error:t.t0});case 19:case"end":return t.stop()}},t,this,[[0,15]])}),n=function(){var e=this,n=arguments;return new Promise(function(r,a){var i=t.apply(e,n);function o(e){W(i,r,a,o,s,"next",e)}function s(e){W(i,r,a,o,s,"throw",e)}o(void 0)})},function(){return n.apply(this,arguments)})()},[]),{fetchStatus:o,data:{notes:n}}},$=function(e,t){return"loaded"===e&&t.length>0},ee=Object(o.a)()(Object(s.withClient)(function(e){var t=e.breakpoints.isMobile,n=e.client,r=cozy.bar.BarRight,o=Y(n),s=o.data.notes,c=o.fetchStatus;return a.a.createElement(a.a.Fragment,null,a.a.createElement(i.a,{className:"u-mt-1 u-mt-0-m"},a.a.createElement("div",{className:"".concat(U.a.appHeader," u-flex u-flex-justify-between u-flex-items-center")},a.a.createElement(u,null),!t&&$(c,s)&&a.a.createElement(j,null)),a.a.createElement(J,{notes:s,fetchStatus:c})),t&&$(c,s)&&a.a.createElement(r,null,a.a.createElement(x,null)))})),te=n("k4o+"),ne=n("9jEr"),re=n("jWvl"),ae={allowTables:!0,allowRule:!0,allowLists:!0,allowTextColor:!0,allowPanel:!0},ie=function(e){return a.a.createElement("header",{className:"page-header-menu "+(e.className||"")},a.a.createElement("div",{className:"page-header-menu--left"},e.left),e.children,a.a.createElement("div",{className:"page-header-menu--right"},e.right))},oe=n("Q2Eh"),se=n.n(oe);function ce(){return(ce=Object.assign||function(e){for(var t=1;t0&&this.emit("data",s),e.next=30;break;case 25:e.prev=25,e.t0=e.catch(14),this.hasQueuedSteps()?this.rebaseStepsInQueue():this.enqueueSteps({getState:n}),this.increaseBackoff(),this.isSending=!1;case 30:return e.next=32,this.processQueue();case 32:case"end":return e.stop()}},e,this,[[14,25]])})),function(){return s.apply(this,arguments)})},{key:"connect",value:(o=Se(v.a.mark(function e(t,n){var r,a=this;return v.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r=this.config.docId,this.service.join(r),this.service.onStepsCreated(r,function(e){a.emit("data",{version:e.version,steps:[e]})}),this.service.onTelepointerUpdated(r,function(e){a.emit("telepointer",e)}),this.emit("connected",{doc:n,version:t});case 5:case"end":return e.stop()}},e,this)})),function(e,t){return o.apply(this,arguments)})},{key:"getSteps",value:(i=Se(v.a.mark(function e(t){var n;return v.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.config.docId,e.next=3,this.service.getSteps(n,t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"sendTelepointer",value:(a=Se(v.a.mark(function e(t){var n;return v.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.config.docId,e.next=3,this.service.pushTelepointer(n,t);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e,this)})),function(e){return a.apply(this,arguments)})},{key:"on",value:function(e,t){return this.eventEmitter.on(e,t),this}},{key:"off",value:function(e,t){return this.eventEmitter.off(e,t),this}},{key:"emit",value:function(e,t){return this.eventEmitter.emit(e,t),this}}])&&Me(t.prototype,n),r&&Me(t,r),e}();function Ne(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function Ie(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);te.timestamp||(r.updateParticipant(t,e.timestamp),r.emit("telepointer",e))}}),this.config=De({},t),this.config.sessionId=n.getSessionId(),this.config.userId=n.getUserId(),this.serviceClient=n,this.channel=t.channel||new Pe(this.config,n),this.eventEmitter=new ke.EventEmitter2,this.queue=[],this.getState=function(){},this.participants=new Map,this.pauseQueue=!1,this.initialVersion=t.version,this.pauseQueue=!1}var t,n,r,a,i;return t=e,(n=[{key:"initialize",value:function(e){var t=this;this.getState=e,this.channel.on("connected",function(e){var n=e.doc,r=e.version,a=t.config.sessionId;t.emit("init",{sid:a,doc:n,version:r}),t.emit("connected",{sid:a})}),this.channel.on("data",this.onReceiveData),this.channel.on("telepointer",this.onReceiveTelepointer),this.channel.on("needcatchup",function(){return t.catchup()});var n=e(),r=Fe.encode(n.doc),a=void 0!==this.initialVersion?this.initialVersion:r.version,i=De({},r,{version:a});return this.channel.connect(a,i),this}},{key:"send",value:function(e,t,n){e.steps&&e.steps.length&&this.channel.sendSteps(this.getState,n)}},{key:"sendMessage",value:function(e){if(e)switch(e.type){case"telepointer":this.channel.sendTelepointer(De({},e,{timestamp:(new Date).getTime()}))}}},{key:"queueData",value:function(e){var t=[].concat(Ie(this.queue),[e]).sort(function(e,t){var n=e.version-e.steps.length,r=t.version-t.steps.length;return n>r?1:nt.version?-1:e.version0&&this.onReceiveData({steps:i,version:a},!0),this.queueTimeout=void 0,this.pauseQueue=!1,this.processQueue(),e.next=19;break;case 15:e.prev=15,e.t0=e.catch(2),this.pauseQueue=!1,this.programCatchup();case 19:case"end":return e.stop()}},e,this,[[2,15]])}),i=function(){var e=this,t=arguments;return new Promise(function(n,r){var i=a.apply(e,t);function o(e){Ne(i,n,r,o,s,"next",e)}function s(e){Ne(i,n,r,o,s,"throw",e)}o(void 0)})},function(){return i.apply(this,arguments)})},{key:"programCatchup",value:function(){var e=this;this.queueTimeout||(this.queueTimeout=window.setTimeout(function(){e.catchup()},1e3))}},{key:"cancelCatchup",value:function(){this.queueTimeout&&(window.clearTimeout(this.queueTimeout),this.queueTimeout=void 0)}},{key:"processQueue",value:function(){if(this.queue.length>0&&!this.pauseQueue)for(var e=Object(Oe.getVersion)(this.getState());this.queue.length>0;){var t=this.queue[0],n=t.version,r=t.steps.length+e;if(n==r)this.cancelCatchup(),this.queue.shift(),this.processRemoteData(t),e=n;else if(n<=r&&this.queue.shift(),n>r){this.programCatchup();break}}}},{key:"updateParticipant",value:function(e,t){var n=this,r=this.serviceClient.getUserId(e),a=function(e){var t=e.userId,n=e.sessionId;return{userId:n,sessionId:n||t,name:t,avatar:"https://api.adorable.io/avatars/80/".concat(t.replace(/[^a-zA-Z0-9]/g,""),".png"),email:"".concat(t.replace(/\s+/g,".").replace(/[^a-zA-Z0-9.]/g,""),".toLocaleLowerCase()}@mycozy.cloud")}}({userId:r,sessionId:e});this.participants.set(r,De({name:"",email:"",avatar:"",sessionId:e,userId:r},a,{lastActive:t}));var i=[this.participants.get(r)],o=(new Date).getTime(),s=Array.from(this.participants.values()).filter(function(e){return(o-e.lastActive)/1e3>300});s.forEach(function(e){return n.participants.delete(e.userId)}),this.emit("presence",{joined:i,left:s})}},{key:"emit",value:function(e,t){return this.eventEmitter.emit(e,t),this}},{key:"on",value:function(e,t){return this.eventEmitter.on(e,t),this}},{key:"off",value:function(e,t){return this.eventEmitter.off(e,t),this}},{key:"unsubscribeAll",value:function(e){this.eventEmitter.removeAllListeners(e)}}])&&Te(t.prototype,n),r&&Te(t,r),e}(),Ue=n("oBqo"),Be=n.n(Ue),Le=n("hmtS");function Re(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function Qe(e){return function(){var t=this,n=arguments;return new Promise(function(r,a){var i=e.apply(t,n);function o(e){Re(i,r,a,o,s,"next",e)}function s(e){Re(i,r,a,o,s,"throw",e)}o(void 0)})}}function Ve(e){for(var t=1;t0?w:void 0,leftComponent:a.a.createElement(je,{returnUrl:M,file:b.file}),rightComponent:!c&&a.a.createElement(_e,{file:b.file})}):a.a.createElement(fe,{returnUrl:M})})),nt=Object(l.c)()(function(e){var t=e.t;return a.a.createElement(p.a,{icon:"unlink",title:t("Error.unshared_title"),text:t("Error.unshared_text")})});n.d(t,"b",function(){return ee}),n.d(t,"a",function(){return tt}),n.d(t,"c",function(){return nt})},hmtS:function(e,t,n){"use strict";n.d(t,"a",function(){return s});var r=n("byeC"),a=[["doc",{content:"(block)+",marks:"link"}],["paragraph",{content:"inline*",group:"block",marks:"strong code em link strike subsup textColor typeAheadQuery underline",parseDOM:[{tag:"p"}]}],["text",{group:"inline"}],["bulletList",{group:"block",content:"listItem+",parseDOM:[{tag:"ul"}]}],["orderedList",{group:"block",content:"listItem+",parseDOM:[{tag:"ol"}]}],["listItem",{content:"(paragraph ) (paragraph | bulletList | orderedList )*",defining:!0,parseDOM:[{tag:"li"}]}],["heading",{attrs:{level:{default:1}},content:"inline*",group:"block",defining:!0,parseDOM:[{tag:"h1",attrs:{level:1}},{tag:"h2",attrs:{level:2}},{tag:"h3",attrs:{level:3}},{tag:"h4",attrs:{level:4}},{tag:"h5",attrs:{level:5}},{tag:"h6",attrs:{level:6}}]}],["blockquote",{content:"paragraph+",group:"block",defining:!0,selectable:!1,parseDOM:[{tag:"blockquote"}]}],["rule",{group:"block",parseDOM:[{tag:"hr"}]}],["panel",{group:"block",content:"(paragraph | heading | bulletList | orderedList)+",attrs:{panelType:{default:"info"}},parseDOM:[{tag:"div[data-panel-type]"}]}],["confluenceUnsupportedBlock",{group:"block",attrs:{cxhtml:{default:null}},parseDOM:[{tag:'div[data-node-type="confluenceUnsupportedBlock"]'}]}],["confluenceUnsupportedInline",{group:"inline",inline:!0,atom:!0,attrs:{cxhtml:{default:null}},parseDOM:[{tag:'div[data-node-type="confluenceUnsupportedInline"]'}]}],["unsupportedBlock",{inline:!1,group:"block",atom:!0,selectable:!0,attrs:{originalValue:{default:{}}},parseDOM:[{tag:'[data-node-type="unsupportedBlock"]'}]}],["unsupportedInline",{inline:!0,group:"inline",selectable:!0,attrs:{originalValue:{default:{}}},parseDOM:[{tag:'[data-node-type="unsupportedInline"]'}]}],["hardBreak",{inline:!0,group:"inline",selectable:!1,parseDOM:[{tag:"br"}]}],["table",{content:"tableRow+",attrs:{isNumberColumnEnabled:{default:!1},layout:{default:"default"},__autoSize:{default:!1}},tableRole:"table",isolating:!0,selectable:!1,group:"block",parseDOM:[{tag:"table"}]}],["tableHeader",{content:"(paragraph | panel | blockquote | orderedList | bulletList | rule | heading )+",attrs:{colspan:{default:1},rowspan:{default:1},colwidth:{default:null},background:{default:null}},tableRole:"header_cell",isolating:!0,marks:"",parseDOM:[{tag:"th"}]}],["tableRow",{content:"(tableCell | tableHeader)+",tableRole:"row",parseDOM:[{tag:"tr"}]}],["tableCell",{content:"(paragraph | panel | blockquote | orderedList | bulletList | rule | heading | unsupportedBlock)+",attrs:{colspan:{default:1},rowspan:{default:1},colwidth:{default:null},background:{default:null}},tableRole:"cell",marks:"",isolating:!0,parseDOM:[{tag:".ak-renderer-table-number-column",ignore:!0},{tag:"td"}]}]],i=[["link",{excludes:"color",group:"link",attrs:{href:{},__confluenceMetadata:{default:null}},inclusive:!1,parseDOM:[{tag:"a[href]"}]}],["em",{inclusive:!0,group:"fontStyle",parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style=italic"}]}],["strong",{inclusive:!0,group:"fontStyle",parseDOM:[{tag:"strong"},{tag:"b"},{style:"font-weight"}]}],["textColor",{attrs:{color:{}},inclusive:!0,group:"color",parseDOM:[{style:"color"}]}],["strike",{inclusive:!0,group:"fontStyle",parseDOM:[{tag:"strike"},{tag:"s"},{tag:"del"},{style:"text-decoration"}]}],["subsup",{inclusive:!0,group:"fontStyle",attrs:{type:{default:"sub"}},parseDOM:[{tag:"sub",attrs:{type:"sub"}},{tag:"sup",attrs:{type:"sup"}}]}],["underline",{inclusive:!0,group:"fontStyle",parseDOM:[{tag:"u"},{style:"text-decoration"}]}],["code",{excludes:"fontStyle link searchQuery color",inclusive:!0,parseDOM:[{tag:"span.code",preserveWhitespace:!0},{tag:"code",preserveWhitespace:!0},{tag:"tt",preserveWhitespace:!0},{tag:"span",preserveWhitespace:!0}]}],["typeAheadQuery",{excludes:"searchQuery",inclusive:!0,group:"searchQuery",parseDOM:[{tag:"span[data-type-ahead-query]"}],attrs:{trigger:{default:""}}}]];function o(e){return e.reduce(function(e,t){return e[t[0]]=t[1],e},{})}var s={nodes:a,marks:i},c={nodes:o(a),marks:o(i)};new r.Schema(c)},nw0P:function(e,t,n){var r={"./_lib/build_formatting_tokens_reg_exp/index.js":"kOWh","./ar/build_distance_in_words_locale/index.js":"XxX6","./ar/build_format_locale/index.js":"alis","./ar/index.js":"EDRf","./be/build_distance_in_words_locale/index.js":"LQ09","./be/build_format_locale/index.js":"kj7F","./be/index.js":"YEhR","./bg/build_distance_in_words_locale/index.js":"7K3h","./bg/build_format_locale/index.js":"RrdL","./bg/index.js":"isx8","./ca/build_distance_in_words_locale/index.js":"wqqj","./ca/build_format_locale/index.js":"qcV0","./ca/index.js":"Vwa+","./cs/build_distance_in_words_locale/index.js":"ZKDM","./cs/build_format_locale/index.js":"ipyF","./cs/index.js":"dvhP","./da/build_distance_in_words_locale/index.js":"2Mgc","./da/build_format_locale/index.js":"Gned","./da/index.js":"7ur/","./de/build_distance_in_words_locale/index.js":"5IWf","./de/build_format_locale/index.js":"THCn","./de/index.js":"bgw5","./el/build_distance_in_words_locale/index.js":"o/GB","./el/build_format_locale/index.js":"8T9h","./el/index.js":"dH0v","./en/build_distance_in_words_locale/index.js":"LZbM","./en/build_format_locale/index.js":"6DAA","./en/index.js":"Us+F","./eo/build_distance_in_words_locale/index.js":"qrnn","./eo/build_format_locale/index.js":"Bl15","./eo/index.js":"UB7v","./es/build_distance_in_words_locale/index.js":"GEfZ","./es/build_format_locale/index.js":"O+zC","./es/index.js":"/S0t","./fi/build_distance_in_words_locale/index.js":"VHtQ","./fi/build_format_locale/index.js":"Oydx","./fi/index.js":"ndVD","./fil/build_distance_in_words_locale/index.js":"uq4p","./fil/build_format_locale/index.js":"d7hw","./fil/index.js":"pNfm","./fr/build_distance_in_words_locale/index.js":"IzMR","./fr/build_format_locale/index.js":"I3Zg","./fr/index.js":"LKA2","./hr/build_distance_in_words_locale/index.js":"DPvn","./hr/build_format_locale/index.js":"puw3","./hr/index.js":"L9Jq","./hu/build_distance_in_words_locale/index.js":"w2RQ","./hu/build_format_locale/index.js":"/0iD","./hu/index.js":"Nm+E","./id/build_distance_in_words_locale/index.js":"JbvB","./id/build_format_locale/index.js":"0wlw","./id/index.js":"A6C3","./is/build_distance_in_words_locale/index.js":"qzMC","./is/build_format_locale/index.js":"S3yD","./is/index.js":"N4bE","./it/build_distance_in_words_locale/index.js":"MDEp","./it/build_format_locale/index.js":"aUJd","./it/index.js":"hmb4","./ja/build_distance_in_words_locale/index.js":"nNvt","./ja/build_format_locale/index.js":"buui","./ja/index.js":"uAXs","./ko/build_distance_in_words_locale/index.js":"oEw+","./ko/build_format_locale/index.js":"9SQf","./ko/index.js":"iW8+","./mk/build_distance_in_words_locale/index.js":"nmwZ","./mk/build_format_locale/index.js":"htxJ","./mk/index.js":"GzBU","./nb/build_distance_in_words_locale/index.js":"SL1f","./nb/build_format_locale/index.js":"CJ5F","./nb/index.js":"73vv","./nl/build_distance_in_words_locale/index.js":"Uyu0","./nl/build_format_locale/index.js":"doCD","./nl/index.js":"hCQt","./pl/build_distance_in_words_locale/index.js":"FUBD","./pl/build_format_locale/index.js":"nOYf","./pl/index.js":"B6yL","./pt/build_distance_in_words_locale/index.js":"aTPA","./pt/build_format_locale/index.js":"TTT0","./pt/index.js":"gdks","./ro/build_distance_in_words_locale/index.js":"gI+A","./ro/build_format_locale/index.js":"njjO","./ro/index.js":"r2yp","./ru/build_distance_in_words_locale/index.js":"KmPx","./ru/build_format_locale/index.js":"UUBw","./ru/index.js":"nz/o","./sk/build_distance_in_words_locale/index.js":"q2Bs","./sk/build_format_locale/index.js":"9sxn","./sk/index.js":"Wqan","./sl/build_distance_in_words_locale/index.js":"mlv2","./sl/build_format_locale/index.js":"vHkZ","./sl/index.js":"KYSo","./sr/build_distance_in_words_locale/index.js":"LlkS","./sr/build_format_locale/index.js":"RhjJ","./sr/index.js":"7mU3","./sv/build_distance_in_words_locale/index.js":"UNBN","./sv/build_format_locale/index.js":"zTNB","./sv/index.js":"hxgj","./th/build_distance_in_words_locale/index.js":"XAGa","./th/build_format_locale/index.js":"We2s","./th/index.js":"Pk+z","./tr/build_distance_in_words_locale/index.js":"aFZF","./tr/build_format_locale/index.js":"jh7A","./tr/index.js":"3ZWG","./zh_cn/build_distance_in_words_locale/index.js":"KdB7","./zh_cn/build_format_locale/index.js":"l4EP","./zh_cn/index.js":"8tMq","./zh_tw/build_distance_in_words_locale/index.js":"vyyr","./zh_tw/build_format_locale/index.js":"uYH7","./zh_tw/index.js":"QPlQ"};function a(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=i,e.exports=a,a.id="nw0P"},pL5B:function(e,t,n){"use strict";n.r(t),function(e){var r=n("o0o1"),a=n.n(r),i=n("q1tI"),o=n.n(i),s=n("0cfB"),c=n("Ty5D"),l=n("55Ip"),u=n("SH7X"),d=n("67rm"),f=n("ufaa"),p=n("jDpt"),h=n("le8I"),v=n("V2U0"),m=n("vYzF"),b=n("Zlyp"),y=n("snnE"),g=n("X3v2");function _(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(c){a=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var x=n("pZg0"),j=Object(c.f)(function(e){var t=Object(y.h)();return o.a.createElement(b.a,{noteId:e.match.params.id,returnUrl:t})}),k=function(){return o.a.createElement(c.c,null,o.a.createElement(c.a,{path:"/n/:id",component:j}),o.a.createElement(c.a,{path:"/",component:b.b}))},O=Object(u.withClient)(function(e){var t=e.client,n=w(Object(i.useState)(null),2),r=n[0],s=n[1],c=Object(i.useMemo)(function(){return Object(y.h)()},[]);return Object(i.useEffect)(function(){(function(){var e,n=(e=a.a.mark(function e(){var n;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Object(y.i)(t);case 3:n=e.sent,s(n),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),s(!1);case 10:case"end":return e.stop()}},e,this,[[0,7]])}),function(){var t=this,n=arguments;return new Promise(function(r,a){var i=e.apply(t,n);function o(e){_(i,r,a,o,s,"next",e)}function s(e){_(i,r,a,o,s,"throw",e)}o(void 0)})});return function(){return n.apply(this,arguments)}})()()},[]),r?o.a.createElement(b.a,{noteId:r,returnUrl:c||!1}):null!==r?o.a.createElement(b.c,null):o.a.createElement(v.a,{size:"xxlarge",middle:!0})});t.default=Object(s.hot)(e)(Object(f.a)()(Object(u.withClient)(function(e){var t=e.isPublic,n=e.breakpoints.isMobile,r=e.client,a="";if(n){var i=r.getInstanceOptions();a=Object(g.a)(i.cozyAppName,x.name)}var s=cozy.bar.BarCenter;return o.a.createElement(l.a,null,o.a.createElement(p.b,{monoColumn:!0},!t&&n&&o.a.createElement(s,null,o.a.createElement(m.a,null,a)),o.a.createElement(p.c,null,o.a.createElement(p.a,null,t?o.a.createElement(O,null):o.a.createElement(k,null))),o.a.createElement(h.a,null),o.a.createElement(d.a,null)))})))}.call(this,n("3UD+")(e))},pZg0:function(e,t){e.exports={name:"Notes",name_prefix:"Cozy",slug:"notes",icon:"icon.svg",categories:["cozy"],version:"1.5.0",licence:"AGPL-3.0",editor:"Cozy",source:"https://github.com/cozy/cozy-notes.git@build",developer:{name:"Cozy Cloud",url:"https://cozy.io"},screenshots:["screenshots/fr/screenshot01.png","screenshots/fr/screenshot02.png"],langs:["en","fr"],routes:{"/":{folder:"/",index:"index.html",public:!1},"/public":{folder:"/",index:"index.html",public:!0}},permissions:{apps:{description:"Required by the cozy-bar to display the icons of the apps",type:"io.cozy.apps",verbs:["GET"]},files:{description:"Notes as files",type:"io.cozy.files"},settings:{description:"Required by the cozy-bar to display Claudy and know which applications are coming soon",type:"io.cozy.settings",verbs:["GET"]}}}},snnE:function(e,t,n){"use strict";n.d(t,"j",function(){return h}),n.d(t,"h",function(){return m}),n.d(t,"b",function(){return b}),n.d(t,"i",function(){return y}),n.d(t,"f",function(){return _}),n.d(t,"e",function(){return w}),n.d(t,"d",function(){return x}),n.d(t,"g",function(){return j}),n.d(t,"c",function(){return k}),n.d(t,"a",function(){return O});var r=n("o0o1"),a=n.n(r),i=n("mwIZ"),o=n.n(i),s=n("AHTZ"),c=n("X3v2"),l=n("hmtS"),u=n("pZg0"),d=n.n(u);function f(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],r=!0,a=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(c){a=!0,i=c}finally{try{r||null==s.return||s.return()}finally{if(a)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function h(e){return new URL(e.getStackClient().uri).hostname+Math.floor(100*Math.random())}var v="returnUrl";function m(){var e=new URLSearchParams(window.location.search),t=!0,n=!1,r=void 0;try{for(var a,i=e[Symbol.iterator]();!(t=(a=i.next()).done);t=!0){var o=p(a.value,2),s=o[0],c=o[1];if(s===v)return c}}catch(l){n=!0,r=l}finally{try{t||null==i.return||i.return()}finally{if(n)throw r}}}var b=function(e){var t=new URL(window.location);return t.searchParams.set(v,"#/"),t.hash="#/n/".concat(e.id),t};function y(e){return g.apply(this,arguments)}function g(){var e;return e=a.a.mark(function e(t){var n,r,i,s;return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.collection("io.cozy.permissions").getOwnPermissions();case 2:return n=e.sent,r=n.data,i=r.attributes.permissions,s=o()(Object.values(i),"0.values.0"),e.abrupt("return",s);case 7:case"end":return e.stop()}},e,this)}),(g=function(){var t=this,n=arguments;return new Promise(function(r,a){var i=e.apply(t,n);function o(e){f(i,r,a,o,s,"next",e)}function s(e){f(i,r,a,o,s,"throw",e)}o(void 0)})}).apply(this,arguments)}function _(e){return e.relationships.parent.data.id}function w(e){return"/folder/".concat(e.replace(/-/g,""))}function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=new URL(e.getStackClient().uri),r=e.getInstanceOptions().cozySubdomainType,a=null!==t?w(t):"";return Object(s.b)({cozyUrl:n.origin,slug:"drive",subDomainType:r,nativePath:a})}function j(e,t){return x(e,_(t))}function k(){var e=Object(c.b)(),t=Object(c.a)(e.cozyAppNamePrefix||d.a.name_prefix,""),n=Object(c.a)(e.cozyAppName,d.a.name);return""!=t?"".concat(t," ").concat(n):n}function O(e){return e.getStackClient().fetchJSON("POST","/notes",{data:{type:"io.cozy.notes.documents",attributes:{title:"",schema:l.a}}})}}}); \ No newline at end of file diff --git a/icon.svg b/icon.svg index 57433f53..09008f42 100644 --- a/icon.svg +++ b/icon.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/index.html b/index.html index c5e22d04..f52a5646 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -Cozy Notes{{.CozyBar}}
\ No newline at end of file +Cozy Notes{{.CozyBar}}
\ No newline at end of file