tiro-notes 0.30.98-48 → 0.30.98-49

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.
@@ -1 +1 @@
1
- (this["webpackJsonptiro-notes-client"]=this["webpackJsonptiro-notes-client"]||[]).push([[10],{10:function(t,n,e){"use strict";e.d(n,"a",(function(){return w}));e(322),e(323),e(324),e(325);var o=e.p+"static/media/deco-bg-map.7ca9103b.png",c=e.p+"static/media/file-solid.6415173e.svg",i=e.p+"static/media/compact-disc-solid.55b6e50c.svg",a=e.p+"static/media/file-pdf-solid.0a9d75fe.svg",r=e.p+"static/media/file-word-solid.9228e1ff.svg",l=e.p+"static/media/file-code-solid.62b467ac.svg",s=e.p+"static/media/book-solid.87f5b737.svg",u=e.p+"static/media/file-excel-solid.217d73db.svg",p=e.p+"static/media/file-video-solid.312288cf.svg",d=e.p+"static/media/file-audio-solid.a76f99f0.svg",f=e.p+"static/media/file-zipper-solid.7db57917.svg",b=e.p+"static/media/file-powerpoint-solid.4d969453.svg",g=e.p+"static/media/link-solid.7b689dbd.svg",h=e.p+"static/media/globe-africa-solid.0ad34146.svg",m=e.p+"static/media/search-solid.cc51b702.svg",v={main:"#E86666",bgPopup:"#FFF",bgPopup2:"#f9f9f9",bgPopup3:"#f5efef",bgTabs:"#D8D8D8",bgTab:"#D0D0D0",fontTab:"#797979",bgTabActive:"#EFEFEF",bgInterface:"#efefef",fontInterface:"#323232",bgInterface2:"#e1e1e1",fontInterface2:"#585757",bgEditor:"#FFFFFF",bgPreview:"#F7F7F7",fontEditor:"#323232",dev:["#C3668B","#A766A7","#CE66E8","#E4E866"],compl:["#11abf8","#3fd7a4"],pal1:["#5c1a70","#ffa67c","#ffda77"],grey1:"#797979",grey2:"red",green:"green",l1:{bg:"#e1e1e1",font:"#615f5f"},l2:{bg:"#eeecec",title:"#797979",text:"#615f5f",date:"#b3b2b2"},editor:{bg:"#ffffff",font:"#525252",interfaceGrey:"#d4d1d1",mobileToolbar:{bg:"#e1e1e1",font:"#747474"}},bg:{l1:"#e1e1e1",dark:"rgb(39, 39, 39)",grey:"rgb(221, 221, 221)",light:"#FFFFFF",black:"#000000"},font:{light:"#FFFFFF",black:"#000000"}},w={els:function(){return{button:"\n\t\tbackground: none;\n border: none;\n ",images:"\n\t\tborder-radius: 7px;\n box-shadow: 0px 0px 10px rgb(0 0 0 / 10%);\n max-width: 100%;\n ",imageInfos:"\n ",redButton:"\n\t\t\tborder: none;\n\t\t\tbackground: ".concat(v.main,";\n &:hover {\n\t\t\topacity: 0.9;\n\n }\n color: white;\n border-radius: 5px;\n cursor: pointer;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 1px;\n ")}},colors:v,font:{main:"'Open sans', sans-serif",editor:"Consolas, monaco, monospace"},sizes:{desktop:{l:37,l1:37,l2:63,r:63},search:{h:94,padding:10},gallery:{topH:100},block:15,scrollbar:17,l2:{fileLi:{height:77,padding:5,margin:5,img:67}},editor:{padding:45},mobile:{bottomBarHeight:50,editorBar:40,editorTopWrapper:100}},assets:{decoBgMap:o,linkIcon:g,worldIcon:h,fileIcon:c,diskIcon:i,pdfIcon:a,presIcon:b,audioIcon:d,videoIcon:p,excelIcon:u,wordIcon:r,codeIcon:l,bookIcon:s,archiveIcon:f,searchIcon:m},anim:{time:"100ms"}}},101:function(t,n,e){"use strict";e.d(n,"b",(function(){return c})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return a}));var o=e(3),c=(e(8),e(36),e(14),function(){var t,n=[],e={},c=window.location.search,i=new URLSearchParams(c).entries(),a=Object(o.a)(i);try{for(a.s();!(t=a.n()).done;){var r=t.value;n.push({name:r[0],value:r[1]}),e[r[0]]={name:r[0],value:r[1]}}}catch(l){a.e(l)}finally{a.f()}return{array:n,dic:e}}),i=function(t){var n="",e=0;for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&t[o]&&(n+="".concat(0===e?"":"&").concat(o.toLowerCase(),"=").concat(t[o]),e++);return n},a=function(t){try{var n=new XMLHttpRequest;return n.open("HEAD",t.url,!1),n.send(),404!==n.status?t.onSuccess():t.onFail()}catch(e){t.onFail(e)}}},102:function(t,n,e){"use strict";e.d(n,"c",(function(){return p})),e.d(n,"b",(function(){return d})),e.d(n,"a",(function(){return b}));var o=e(8),c=e(19),i=null,a=null,r=!1,l="[LATEX]",s=c.a.client.log.verbose,u=function(t,n){var e=document.createElement("script");e.src=t,e.crossorigin="anonymous",document.body.appendChild(e),e.onload=function(){n()}};r||(u("https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.js",(function(){u("https://cdn.jsdelivr.net/npm/katex@0.16.2/dist/contrib/auto-render.min.js",(function(){r=!0,i=window.katex,a=window.renderMathInElement}))})),function(t){var n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=t,document.body.appendChild(n)}("https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.css"));var p=function(t){var n=t=t.replaceAll("$","");if(!i)return n;try{window.ka=i,n=i.renderToString(t)}catch(e){s&&console.log("LATEX ERR:",e)}return n},d=Object(o.debounce)((function(){s&&console.log(l,"REFRESH"),f(".render-latex")}),100),f=function(t){if(a){var n=document.querySelectorAll(t);if(!n)return console.warn(l,"no el found :",t);s&&console.log(l,n),Object(o.each)(n,(function(t){a(t,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!0},{left:"[[l]]",right:"[[l]]",display:!0},{left:"\\[",right:"\\]",display:!0}],throwOnError:!1})}))}},b=function(){return"\n.katex-display {\n\t\tdisplay: inline;\n\t\t.katex {\n\t\t\t\tdisplay: inline;\n\t\t\t\t.katex-html {\n\t\t\t\t\t\tdisplay: inline;\n\t\t\t\t}\n\t\t}\n}\n"}},103:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(9),c=e(8),i=e(0),a=function(){var t=Object(i.useState)([]),n=Object(o.a)(t,2),e=n[0],a=n[1],l=Object(i.useState)(0),s=Object(o.a)(l,2),u=s[0],p=s[1];return{lightboxApi:{open:function(t,n){var e=[];Object(c.each)(n,(function(t){if(Object(c.isString)(t)){var n={file:r(),title:"",url:t};e.push(n)}else e.push(t)})),a(e),p(t)},close:function(){a([]),p(0)}},lightboxImages:e,lightboxIndex:u}},r=function(){return{nature:"file",name:"",realname:"",path:"",folder:""}}},104:function(t,n,e){"use strict";e.d(n,"a",(function(){return f})),e.d(n,"c",(function(){return b})),e.d(n,"b",(function(){return g}));var o=e(17),c=e(9),i=e(12),a=e(43),r=e(8),l=e(146),s=e(70),u=e(84),p=e(13),d=e(14),f=function(t){var n=Object(i.a)({},t),e=n.w,o=n.h,c=n.x,r=n.y,l=n.file;o||(o=u.c.rows),e||(e=u.c.cols),c||(c=0),r||(r=0);var s=Object(a.a)();return{layout:{i:s,x:c,y:r,w:e,h:o,minH:1,maxH:2,forceRender:0},content:{i:s,active:!1,file:l,view:"both"}}},b=function(){var t=Object(s.a)("tabs",[]),n=Object(c.a)(t,3),e=n[0],i=n[1],a=n[2],l=function(t){i(t)},u=function(t){var n=O({fullWindowFile:t});if(n){var c=[].concat(Object(o.a)(e),[n]),i=w(n.id,c);l(i)}},f=function(t){var n=[],o=Object(r.cloneDeep)(e);Object(r.each)(o,(function(e,o){e.id!==t&&n.push(e)})),l(n)},b=function(t){if(!t){var n=Object(r.cloneDeep)(e),o=v(n);if(!Object(r.isNumber)(o))return;t=n[o]}if(t.grid.layout[0]){var c,i=t.grid;return Object(r.each)(i.content,(function(t,n){t.active&&(c={layout:i.layout[n],content:i.content[n]})})),c}};return{tabs:e,updateTab:function(t,n,o){if("add"===t)Object(p.e)().then((function(t){u(t.ui.browser.files.active.get)}));else if("close"===t){if(!n)return;f(n.id)}else if("rename"===t){if(!n)return;if(o.length>15)return;var c=Object(r.cloneDeep)(e);Object(r.each)(c,(function(t){t.id===n.id&&(t.name=o,t.manualName=!0)})),l(c)}else if("activate"===t){if(!n)return;var i=w(n.id,e),a=h(i);if(l(a),"desktop"!==Object(d.a)()){var s,g=null===(s=b(n))||void 0===s?void 0:s.content.file;if(!g)return;Object(p.d)((function(t){t.ui.browser.goTo(g.folder,g.name)}))}}},refreshTabsFromBackend:a,updateActiveTabGrid:function(t){var n=Object(r.cloneDeep)(e),o=v(n);Object(r.isNumber)(o)&&(n[o].grid=t,l(n))},refreshWindowGrid:function(){var t=h(e);l(t)},tabsApi:{get:function(){return e},close:f,openInNewTab:u,reorder:function(t,n){var o=Object(r.cloneDeep)(e),c=o[t];o.splice(t,1),o.splice(n,0,c),l(o)},active:{get:function(){var t=null;return Object(r.each)(e,(function(n){n.active&&(t=n)})),t}}},windowsApi:{close:function(t){var n=Object(r.cloneDeep)(e);Object(r.each)(t,(function(t){Object(r.each)(n,(function(n,e){for(var o=0;o<n.grid.content.length;o++){var c=n.grid.content[o],i=n.grid.layout[o];c.i===t&&n.grid.content.splice(o,1),i.i===t&&n.grid.layout.splice(o,1)}}))}));var o=h(n);l(o)},active:{get:b,setContent:function(t){if(t){var n=Object(r.cloneDeep)(e),o=v(n);if(Object(r.isNumber)(o)){var c=n[o],i=c.grid.content;if(!(i.length<1)){var a=0;Object(r.each)(i,(function(t,n){!0===t.active&&(a=n)})),i[a].file=Object(r.cloneDeep)(t),c.manualName||(c.name=m(t.name));var s=h(n);l(s)}}}}},updateWindows:function(t,n){var o=Object(r.cloneDeep)(e);Object(r.each)(t,(function(t){Object(r.each)(o,(function(e,o){Object(r.each)(e.grid.content,(function(e){e.i===t&&(e.file=n)}))}))}));var c=h(o);l(c)},getIdsFromFile:function(t){var n=[];return Object(r.each)(e,(function(e){Object(r.each)(e.grid.content,(function(e){e.file&&e.file.path===t&&n.push(e.i)}))})),n}}}},g=function(t){var n=void 0;return Object(r.each)(t.grid.content,(function(t){t.active&&(n=t)})),n||(n=t.grid.content[0]),n},h=function(t){var n=Object(r.cloneDeep)(t);return Object(r.each)(n,(function(t){t.refresh=Object(l.a)(t.refresh)})),n},m=function(t){return t.length>15?"".concat(t.substring(0,13),".."):t},v=function(t){var n=void 0;return Object(r.each)(t,(function(t,e){t.active&&(n=e)})),n},w=function(t,n){var e=Object(r.cloneDeep)(n);return Object(r.each)(e,(function(n){n.refresh=Object(r.isNumber)(n.refresh)?n.refresh++:1,n.id===t?n.active=!0:n.active=!1})),e},O=function(t){if(t.copiedTab){var n=Object(r.cloneDeep)(t.copiedTab);return n.id=Object(a.a)(),n.name=j(t.copiedTab.name),n}if(t.fullWindowFile){var e=f({file:t.fullWindowFile});return{id:Object(a.a)(),name:m(t.fullWindowFile.name),active:!0,grid:{layout:[e.layout],content:[e.content]}}}},j=function(t){var n=t,e=n[n.length-1];return isNaN(parseInt(e))?n+=" 1":(n=n.slice(0,-1),n+="".concat(parseInt(e)+1)),n}},105:function(t,n,e){"use strict";e.d(n,"a",(function(){return f})),e.d(n,"c",(function(){return b})),e.d(n,"b",(function(){return h}));var o=e(17),c=e(8),i=e(26),a=e(13),r=e(14),l=e(33),s=e(10),u=e(55),p=e(106),d=e(49),f=Object(p.a)((function(t){return g(t)})),b=function(t){return Object(u.a)({file:t,pattern:i.a.externalLink3,replacement:function(t){var n=document.createElement("span");return n.innerHTML=f(t),n}})},g=function(t){var n=[];n=Object(c.isArray)(t)?t:Object(o.a)(t.matchAll(i.a.externalLink3))[0];var e=document.createElement("span"),s=n[0].slice(0,-1),u=n[1].replace("www.",""),p=n[3],f=n[4];e.classList.add("link-mdpreview-wrapper"),e.classList.add("link-wrapper");var b=17;u.length>b&&(u=u.substring(u.length-b));var g=p;""!==g&&g||(g=f),g.length>b&&(g=g.substring(0,b)+""),g=0!==g.length?"".concat(g):"";var h="".concat(u).concat(g);h.length>b&&(h=h.substring(0,b));var m=function(t){return t.parentNode.parentNode.parentNode.querySelector(".link-iframe-wrapper")},v=function(t,cb){var n=t.dataset.link;Object(a.d)((function(e){e.ressource.fetchUrlArticle(n,(function(n){Object(d.b)(m(t),Object(d.a)("iframe",encodeURIComponent(n.html))),cb(n)}))}))},w=l.d,O='<span title="Open link in detached window"\nonclick="'.concat(Object(l.c)("open-win-link",(function(t){if(t){var n=t.dataset.link;window.open(n,"popup-preview-link","width=800,height=1000")}})),'"\nclass="link-action link-openwindow" data-link="').concat(s,'">').concat(w("up-right-from-square"),"</span>"),j='<span\nonclick="'.concat(Object(l.c)("preview-link",(function(t){if(t){var n=t.dataset.link;Object(d.b)(m(t),Object(d.a)("iframe",n))}})),'"\ntitle="Preview link" class="link-openpreview link-action" data-link="').concat(s,'">').concat(w("eye"),"</span>"),x='<span\nonclick="'.concat(Object(l.c)("fetch-link",(function(t){t&&v(t,(function(){}))})),'"\ntitle="Display url content" class="link-fetcharticle link-action" data-link="').concat(s,'">').concat(w("file-lines"),"</span>"),k='<span\nonclick="'.concat(Object(l.c)("audio-link",(function(t){t&&v(t,(function(t){t.text&&Object(a.d)((function(n){n.ui.textToSpeechPopup.open(t.text)}))}))})),'"\ntitle="Text to speech url content" class="link-audio link-action" data-link="').concat(s,'">').concat(w("volume-high"),"</span>"),y='<span class="link-action-more"><span class="icon-more">'.concat(w("ellipsis"),'</span><span class="link-action-wrapper">').concat(x," ").concat(k," ").concat(O," ").concat(j,"</span></span>"),C='<span class="'.concat(Object(r.d)()?"mobile-version":"",' link-mdpreview-wrapper"><a href="').concat(s,'" class="link-mdpreview" title="').concat(s,'" target="_blank" rel="noreferrer">').concat(w("link")).concat(h,"</a>").concat(y).concat('<span class="link-iframe-wrapper"></span>',"</span>");return e.innerHTML="".concat(C),e.outerHTML},h=function(){return"\n.link-fetch-preview-wrapper {\n\t\tbackground: grey;\n}\n.link-mdpreview-wrapper {\n\t\tposition: relative;\n}\n.link-mdpreview-wrapper .link-action {\n}\n.link-deco {\n\t\tpadding-right:2px;\n}\n.link-action-more {\n\t\tposition: relative;\n}\n.link-action-wrapper {\n\t\tdisplay:flex;\n\t\tposition: absolute;\n\t\tright: -30px;\n\t\ttop: -10px;\n\t\topacity: 0;\n\t\ttransition: 0.2s all;\n\t\tpointer-events: none;\n\t\tbackground: white;\n\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.1);\n\t\tpadding: 7px;\n\t\tz-index: 10000;\n}\n.link-action-wrapper span {\n\tmargin: 0px 2px;\n}\n\n// mobile version\n.mobile-version .link-action-wrapper {\n\t\tright: 10px ;\n}\n.mobile-version .link-action {\n\t\ttransform: scale(1.3);\n\t\tpadding: 7px; \n}\n.link-action-wrapper .link-action {\n\t\tpadding-left:4px;\n}\n\n.link-action-more {\n\t\tmargin-right: 6px;\n\t\topacity: 0.3;\n}\n.link-action-more .icon-more {\n\t\tposition:relative;\n\t\ttop:1px;\n}\n.link-action-more .icon-more svg {\n\t\ttransform: scale(0.7);\n}\n.link-action-more:hover {\n\t\topacity: 1;\n}\n.link-action-more:hover .link-action-wrapper {\n\t\topacity: 1;\n\t\tpointer-events:all;\n}\n\n.link-action \t\tsvg,\n.link-action span,\n.link-action div {\n\t\tpointer-events:none;\n}\n\n.link-action {\n\t\topacity: 0.5;\n\t\tcursor: pointer;\n}\n.link-iframe-wrapper {\n}\n.link-iframe-wrapper .resource-link-ctag {\n\t\tborder-radius: 7px;\n\t\toverflow:hidden;\n\t\tbox-shadow: 0 0 4px rgba(0,0,0,0.3);\n}\n\n\n.link-iframe-wrapper .resource-link-ctag iframe {\n\t\twidth: 150%!important;\n\t\theight: 590px!important;\n\t\ttransform-origin:top left;\n\t\t\ttransform: scale(0.65);\n\t\t\tmargin-left: 15px;\n}\n\n.link-mdpreview-wrapper {\n\n}\n.link-mdpreview {\n\t\topacity: 0.6;\n\t\ttransition: 0.2s all;\n\t\t&:hover {\n\t\t\t\topacity: 1;\n\t\t}\n\t\tline-height: 20px;\n\t\ttext-decoration: none;\n\t\tcolor: ".concat(s.a.colors.main,";\n\t\t// border: solid 2px ").concat(s.a.colors.main,";\n\t\tpadding: 0px 2px 0px 0px;\n\t\tcursor: pointer;\n\t\tborder-radius: 5px;\n\t\tsvg {\n\t\t\t\tcolor: ").concat(s.a.colors.main,";\n\t\t}\n}\n")}},106:function(t,n,e){"use strict";e.d(n,"c",(function(){return r})),e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return s}));var o=e(17),c=e(281),i=(e(107),e(43)),a=e(8),r=function(t,n){var e="render-react-wrapper-".concat(Object(i.a)()),o=function(){var n=l(t),o=setInterval((function(){var t=document.getElementById(e);t&&(t.innerHTML="",t.appendChild(n),clearInterval(o))}),10)};return n&&n.delay?setTimeout(o,n.delay):o(),e},l=function(t,n){return n||(n=document.createElement("div")),Object(c.createRoot)(n).render(t),n},s=function(t){return Object(a.memoize)((function(){return t.apply(void 0,arguments)}),(function(t){return JSON.stringify(Object(o.a)(t))}))}},108:function(t,n,e){"use strict";e.d(n,"b",(function(){return Y})),e.d(n,"c",(function(){return $})),e.d(n,"a",(function(){return Z}));var o=e(22),c=e(17),i=e(12),a=e(9),r=e(0),l=e.n(r),s=e(14),u=e(155),p=e(58),d=e(8),f=function(t){for(var n=!0,e=0;e<t.length;e++)32!==t[e].charCodeAt(0)&&45!==t[e].charCodeAt(0)&&91!==t[e].charCodeAt(0)&&93!==t[e].charCodeAt(0)&&(n=!1);return n},b="[TEXT MANIP ACTION]",g=function(t){var n=Object(r.useRef)(0),e=t.editorRef,o=t.editorRef,i=t.editorRef,a=function(){var c;if("codemirror"===t.editorType){var a=p.a.getCurrentLineInfos(e.current);c=a,n.current=a.currentPosition}else if("monaco-textarea"===t.editorType){var r;if("desktop"===t.deviceType)c=null===(r=o.current)||void 0===r?void 0:r.getCurrentLineInfos(),n.current=c&&c.monacoPosition?c.monacoPosition:0;else c=i.current?function(t){for(var n=t.value.split("\n"),e=t.selectionStart,o=0,c=0;o<e+1;)o+=n[c].length+1,c++;return{currentPosition:e,lines:n,activeLine:n[--c],lineIndex:c}}(i.current):null,n.current=c&&c.currentPosition?c.currentPosition:0}return c},l=function(c){var a=n.current+c;if("codemirror"===t.editorType)p.a.updateCursor(e.current,a,!0);else if(Object(s.b)("desktop")){var r;null===(r=o.current)||void 0===r||r.editor.setPosition(a)}else{var l=i.current;if(!l)return;l.focus(),setTimeout((function(){l&&(l.selectionStart=a,l.selectionEnd=a)}))}};return{getLineTextInfos:a,resetCursorPosition:l,applyTextModifAction:function(t,n){var e=a();if(!e)return null;console.log(b,"applying =>",t,n);var o=function(t,n,cb,e){var o=n.lines;if("^"===t){var i=o[n.lineIndex-1],a=o[n.lineIndex];o[n.lineIndex]=i,o[n.lineIndex-1]=a,cb(-i.length-1)}if("v"===t){var r=o[n.lineIndex+1],l=o[n.lineIndex];o[n.lineIndex]=r,o[n.lineIndex+1]=l,cb(+r.length+1)}if("X"===t){o[n.lineIndex].length;var s=Object(c.a)(o).splice(0,n.lineIndex).join("\n").length+1-n.currentPosition;o[n.lineIndex]="",cb(s)}if("C"===t){var u=o[n.lineIndex].length,p=o[n.lineIndex];o.splice(n.lineIndex,0,p),cb(u+1)}"->"===t&&(o[n.lineIndex]=" "+o[n.lineIndex],cb(2)),"<-"===t&&(n.activeLine.startsWith(" ")?(o[n.lineIndex]=o[n.lineIndex].substr(2,o[n.lineIndex].length),cb(-2)):cb(0));var f=n.activeLine.trim();if("[x]"===t&&(f.startsWith("- [ ]")||f.startsWith("- [x]")?f.startsWith("- [ ]")?(o[n.lineIndex]=o[n.lineIndex].replace("[ ]","[x]"),cb(0)):f.startsWith("- [x]")?(o[n.lineIndex]=o[n.lineIndex].replace("[x]","[ ]"),cb(0)):cb(0):(o[n.lineIndex]=o[n.lineIndex].replace(f,"- [ ] "+f.replace("-","")),cb(6))),"insertAt"===t&&e&&e.textToInsert&&(Object(d.isNumber)(e.insertPosition)||Object(d.isString)(e.insertPosition))){var b="currentPos"===e.insertPosition?n.currentPosition+1:e.insertPosition,g=o.join("\n");o=[g.slice(0,b),e.textToInsert,g.slice(b)].join("").split("\n")}return o.join("\n")}(t,e,(function(t){console.log(b,"applying a decal of cursor of :",t),l(t)}),n);return o}}},h=function(t,n){var e=g({editorType:"monaco-textarea",deviceType:"mobile",editorRef:n.mobileTextarea}),o=e.getLineTextInfos,c=e.resetCursorPosition,i=function(t){var n=Object(r.useState)(0),e=Object(a.a)(n,2),o=e[0],c=e[1];return{saveYTextarea:function(n){var e=t.current?t.current.scrollTop:0;c(n||e)},resetYTextarea:function(){t.current&&(console.log("resetYTextarea",o),t.current.scrollTop=o)}}}(n.mobileTextarea),l=i.saveYTextarea,s=i.resetYTextarea,u=Object(r.useState)(!1),p=Object(a.a)(u,2),b=p[0],h=p[1];Object(d.debounce)((function(){h(!1)}),500);return{onTextareaChange:function(e){console.log("onTextareaChange");var i=e.target.value,a=i[e.target.selectionStart-1]&&i[e.target.selectionStart-1].charCodeAt(0);if(i.length>t.length){var r=o();if(!r)return;i=function(t,n,cb){if(10===n){console.log("updateTextFromLetterInput => ENTER PRESSED");var e=t.lines[t.lineIndex-1],o=e.indexOf("- ["),c=e.indexOf("-"),i="";-1!==o&&"- [ ] "!==e?(i=e.substr(0,o+3)+" ] ",f(i)&&(t.lines[t.lineIndex]=i+t.activeLine,cb(i.length))):-1!==c&&"- "!==e&&"- [ ] "!==e&&(i=e.substr(0,c+1)+" ",f(i)&&(t.lines[t.lineIndex]=i+t.activeLine,cb(i.length)))}return t.lines.join("\n")}(r,a,(function(t){setTimeout((function(){c(t),s()}))}))}n.onMobileNoteEdition(i)},onTextareaScroll:function(t){if(!b){var n=t.target.scrollTop;l(n),console.log("onTextareaScroll")}}}},m="",v=e(81),w=e(51),O=e(18),j=e(10),x=e(53),k=e(1),y=function(t){var n=Object(r.useState)(""),e=Object(a.a)(n,2),o=e[0],c=e[1],i=function(){t.onSubmit(o)};return Object(k.c)(C,null,Object(k.c)(w.a,{title:O.a.passwordForm.explanation,onClose:function(){t.onClose()}},Object(k.c)("div",null,Object(k.c)(x.a,{value:o,label:O.a.setupForm.password,type:"password",shouldFocus:!0,onChange:function(t){c(t)},onEnterPressed:function(){i()}}),Object(k.c)("button",{className:"submit-button",onClick:function(t){i()}},O.a.passwordForm.submit))))},C=Object(v.a)("div",{target:"eozyeru0"})(".submit-button{margin-top:10px;",j.a.els().redButton,";padding:10px 20px;}"),_=e(83),E=e(16),T=e(52),S=e(13),I=e(23),N=e(103),F=e(123),R=e(28),A=function(t){var n=Object(r.useState)([]),e=Object(a.a)(n,2),o=e[0],i=e[1],l=Object(r.useState)(!1),s=Object(a.a)(l,2),u=s[0],p=s[1],f=function(){var n=b();i([].concat(n)),p(!0),E.b.emit("askFileHistory",{filepath:t.file.path,token:Object(I.b)()});var e=E.b.on("getFileHistory",(function(t){var o=Object(d.orderBy)(t.files,["created"],["desc"]);i([].concat(n,Object(c.a)(o))),p(!1),E.b.off(e)}))},b=function(){var n=[],e=Object(F.b)(t.file.path);return Object(d.each)(e,(function(t,e){var o=e+1,c=Object(N.a)();c.created=t.timestamp,c.path=t.path+o;var i="Temporary local save ".concat(o," from ").concat(Object(T.a)(new Date(c.created||0)));c.name=i,c.realname=i,c.localContent=t.content,c.isLocal=!0,n.push(c)})),console.log("getLSHistoryList",e,t.file.path),n};Object(r.useEffect)((function(){f()}),[]);var g=Object(r.useContext)(S.a),h=Object(r.useState)(""),m=Object(a.a)(h,2),v=m[0],j=m[1],x=Object(r.useState)(null),y=Object(a.a)(x,2),C=y[0],_=y[1];return Object(k.c)(D,null,Object(k.c)("div",{className:"history-popup-wrapper"},Object(k.c)(w.a,{title:"".concat(O.a.historyPopup.title,'"').concat(t.file.realname,'"'),onClose:function(){t.onClose()}},Object(k.c)("div",{className:"count"},o.length," backups found :"),u&&Object(k.c)("div",{className:"count"}," (Loading backend history files...)"),Object(k.c)("div",{className:"table-wrapper"},Object(k.c)("table",null,Object(k.c)("thead",null,Object(k.c)("tr",null,Object(k.c)("th",null,O.a.historyPopup.thead.name),Object(k.c)("th",null,O.a.historyPopup.thead.date))),Object(k.c)("tbody",null,o.map((function(t){return Object(k.c)("tr",{className:"".concat((null===C||void 0===C?void 0:C.path)===t.path?"active":""),onClick:function(){!function(t){t.isLocal&&t.localContent?(j(t.localContent),_(t)):g&&g.file.getContent(t.path,(function(n){j(n),_(t)}))}(t)}},Object(k.c)("td",null," ",t.realname," "),Object(k.c)("td",null," ",Object(T.a)(new Date(t.created||0))," "),Object(k.c)("td",null," ",!t.isLocal&&Object(k.c)("div",{className:"trash",onClick:function(){!function(t){Object(S.d)((function(n){n.file.delete(t,(function(t){f(),_(null),j("")}))}))}(t)}}," ",Object(k.c)(R.a,{name:"faTrash",color:"grey"})," ")))}))))),v&&Object(k.c)("div",{className:"note-preview"},Object(k.c)("textarea",{className:"note-preview-textarea",value:v})),Object(k.c)("div",{className:"advice"},' To disable history backup for a note, add "--disable-history--"in it'))))},D=Object(v.a)("div",{target:"ew7e5uv0"})(".filemain-wrapper .history-popup-wrapper .popup-wrapper-component .popup-wrapper{width:90%;}.popup-wrapper .popupContent{max-height:70vh;padding:0px;}.table-wrapper{max-height:30vh;overflow-y:auto;padding:0px 0px 20px 0px;table{border-spacing:0px;thead{tr{th{padding:8px;}}}tbody{text-align:left;tr{cursor:pointer;background:#f1f0f0;&:nth-child(2n){background:none;}&.active{font-weight:bold;}&:hover{background:r",j.a.colors.main,";}td{padding:8px;}}}}}.note-preview{.note-preview-textarea{padding:6px;margin:10px 0px 0px 0px;width:calc(100% - 10px);height:34vh;border:none;background:gainsboro;}}.advice{color:#a4a4a4;font-size:10px;padding:3px 3px;}.trash{margin-right:15px;}"),L=e(42),P=e(143),M=e(144),z=e(125),B=e(145),H=e(154),U=e(150),W=e(153),q=e(32),V=e(62),G=function(){return"\n@page {\nmargin: 0;\n}\n@media print {\n.hide-print {\ndisplay: none;\n\n}\n}\n\n* {\n\t-webkit-print-color-adjust: exact; \n\tprint-color-adjust: exact; \n}\n\n.file-path-wrapper {\n\tdisplay: none;\n}\n.file-infos-wrapper {\n\tbackground: #eeeeee;\n\tpadding: 10px;\n\tmargin: 10px;\n}\n\t\t.simple-css-print-wrapper {\n\t\t\tmargin: 20px;\n\t\t\twidth: 70%;\n\n\t\t}\n\t\timg {\n\t\t\t\tmax-width: 300px!important;\n\t\t\t\tmax-height: 500px!important;\n\t\t}\n\t\t.block-tag {\n\t\t\t\tdisplay: none;\n\t\t}\n\t\t"},J=e(148),K=function(t){var n=Object(r.useState)(""),e=Object(a.a)(n,2),o=e[0],f=e[1],b=Object(r.useRef)(null),v=!0;!1===t.canEdit&&(v=!1),!1===t.isConnected&&(v=!1),Object(r.useEffect)((function(){f("")}),[t.file.path]);var w=function(t){var n=Object(r.useState)(!1),e=Object(a.a)(n,2),o=e[0],c=e[1],i=Object(r.useRef)(!1);Object(r.useEffect)((function(){i.current=t.canEdit}),[t.canEdit]),Object(r.useEffect)((function(){return c(!1),t.onEditorDidMount&&t.onEditorDidMount(),function(){t.onEditorWillUnmount&&(l(),t.onEditorWillUnmount())}}),[t.file.path]),Object(r.useEffect)((function(){l()}),[t.file.path]),Object(r.useEffect)((function(){t.onNoteContentDidLoad&&t.onNoteContentDidLoad()}),[t.fileContent,t.file.path]);var l=function(){""!==m&&t.onNoteLeaving&&t.onNoteLeaving(o,m),m=t.file.path};return{triggerNoteEdition:function(n){o?t.onNoteEdition&&t.onNoteEdition(n,!1):t.onNoteEdition&&t.onNoteEdition(n,!0),c(!0)}}}({file:t.file,fileContent:t.fileContent,canEdit:v,onEditorDidMount:function(){},onEditorWillUnmount:function(){},onNoteContentDidLoad:function(){E.a&&f(t.fileContent)},onNoteEdition:function(n,e){f(n),t.onFileEdited(t.file.path,n),e&&Object(S.d)((function(n){n.history.save(t.file.path,t.fileContent,"enter")}))},onNoteLeaving:function(t,n){}}),j=w.triggerNoteEdition,x=Object(r.useRef)(null),C=h(o,{mobileTextarea:x,onMobileNoteEdition:j}),I=(C.onTextareaChange,C.onTextareaScroll,Object(r.useRef)(null)),N="desktop"!==Object(s.a)()?x:b;"codemirror"===t.editorType&&(N=I);var F=g({editorType:t.editorType,deviceType:Object(s.a)(),editorRef:N}).applyTextModifAction,R=function(t){var n=Object(r.useState)(null),e=Object(a.a)(n,2),o=e[0],c=e[1],i=Object(r.useState)(!1),l=Object(a.a)(i,2),s=l[0],u=l[1],p=Object(r.useState)(!1),d=Object(a.a)(p,2),f=d[0],b=d[1],g=Object(r.useState)(null),h=Object(a.a)(g,2),m=h[0],v=h[1],w=function(n){var e=t.fileContent,o=Object(_.c)(e,n);if("failure"===o.status)v(null);else{console.log("encryption done",o),u(!1);var c=o.cipher;t.onTextEncrypted(c)}},O=function(n){var e=t.fileContent,o=Object(_.a)(e,n);if("failure"===o.status)v(null),alert("wrong password");else{b(!0),u(!0),console.log("decryption done",o);var c=o.plaintext;t.onTextDecrypted(c)}};return{APasswordPopup:Object(k.c)(y,{onClose:function(){c(null)},onSubmit:function(t){var n=o;c(null),v(t),"toEncrypt"===n&&w(t),"toDecrypt"===n&&O(t)}}),askForPassword:o,decryptButtonConfig:{title:"decrypt text",icon:"faUnlock",action:function(){m?O(m):c("toDecrypt")}},encryptButtonConfig:{title:"encrypt text",icon:"faLock",action:function(){m?w(m):c("toEncrypt")}},ifEncryptOnLeave:function(cb){if(s&&m){console.log("[EVENTS EDITOR] shouldEncryptOnLeave");var n=Object(_.c)(t.fileContent,m);n.cipher&&cb(n.cipher)}v(null),b(!1)},noHistoryBackupWhenDecrypted:f}}({fileContent:o,onTextEncrypted:function(n){j(n),jt(),Object(S.d)((function(e){e.history.save(t.file.path,n,"int")}))},onTextDecrypted:function(t){j(t),jt()}}),D=R.APasswordPopup,K=R.askForPassword,Y=R.decryptButtonConfig,$=R.encryptButtonConfig,Z=(R.ifEncryptOnLeave,R.noHistoryBackupWhenDecrypted,Object(r.useContext)(H.a)),X=Object(r.useState)(-1),Q=Object(a.a)(X,2),tt=Q[0],nt=Q[1];Object(r.useEffect)((function(){if(Z.upload.progress&&t.isActive&&nt(Z.upload.progress),Z.upload.file&&t.isActive){var n=Object(i.a)({},Z.upload.file),e=n.name,o=n.path;Z.upload.reinit(),et(e,o)}}),[Z.upload]);var et=function(t,n){ot.current+="![".concat(t,"](").concat(n,")\n"),ct()},ot=Object(r.useRef)(""),ct=Object(q.a)((function(){var t=I.current,n=p.a.getCurrentLineInfos(t).currentPosition;!function(t,n){var e=F("insertAt",{textToInsert:t,insertPosition:n});e&&(j(e),jt())}(ot.current,"currentPos"),ot.current="",p.a.updateCursor(t,n,!0)}),500),it="[link|".concat(t.file.realname," ").concat(t.file.folder,"]\n"),at=function(n,e){return{title:"",class:"upload-button-wrapper",action:function(){},customHtml:Object(k.c)(z.a,{file:t.file,type:n,label:e,onProgress:function(t){return nt(t)},onSuccess:function(t){et(t.name,t.path)}})}},rt=[].concat(Object(c.a)(function(){var t=[at("all","Upload files")];return"desktop"!==Object(s.a)()&&(t.push(at("image","Upload Gallery")),t.push(at("camera","Capture")),t.push(at("microphone","Record"))),t}()),[Object(_.d)(o)?Y:$,{title:"Export/Print",icon:"faFileDownload",action:function(){!function(t,n){var e=".window-id-".concat(t," .preview-area-wrapper"),o=document.querySelector(e),c="print-wrapper";if(o){!function(){var t=document.querySelectorAll(".".concat(c));Object(d.each)(t,(function(t){t.classList.remove(c)}))}();var i=Object(T.a)(new Date(n.modified||0)),a=Object(T.a)(new Date(n.modified||0)),r="\n<head>\n\t<title>".concat(n.name,' </title>\n\n\n</head>\n<html>\n\t<body>\n\t\t\t\t<div class="simple-css-print-wrapper">\n<div class="hide-print">\n\t<bm> Export options </bm>\n\t<button onclick="window.print()">print</button>\n\t<button onclick="window.print()">export to pdf</button>\n<button onclick="window.alert(\'CTRL+ S then select *complete webpage* if available\')">export to html</button>\n</div>\n\t\t\t\t\t<div class="file-infos-wrapper">\n\t\t\t\t\tNote Name : ').concat(n.name,"<br>\n\t\t\t\t\tNote Path : ").concat(n.path,"<br>\n\t\t\t\t\tCreated : ").concat(i,"<br>\n\t\t\t\t\tEdited : ").concat(a,"<br>\n\t\t\t\t\t</div>\n\t\t\t\t").concat(o.innerHTML,"\n\t\t\t\t</div>\n\n\t\t\t\t<style>").concat(Object(V.c)({w:".simple-css-print-wrapper",pl:".preview-link",r:".resource-link-icon"}),"</style>\n\t\t\t\t<style>").concat(G(),"</style>\n\n<script>\n<\/script>\n\n\n\n\t</body>\n</html>\n\t\t\t\t"),l=window.open("","print-popup","width=800,height=1000");null===l||void 0===l||l.document.write(r)}}(t.windowId,t.file)}},{title:O.a.editorBar.explanation.history,icon:"faHistory",action:function(){pt(!ut)}},{title:O.a.editorBar.tts,icon:"faCommentDots",action:function(){Object(S.d)((function(n){n.ui.textToSpeechPopup.open(o,{id:t.file.name})}))}},{title:"Delete note",class:"delete",icon:"faTrash",action:function(){Z.file.onFileDelete(t.file)}}]),lt=Object(r.useState)(!1),st=Object(a.a)(lt,2),ut=st[0],pt=st[1],dt=Object(r.useRef)(null),ft=dt.current,bt=700;ft&&(bt=ft.clientHeight/1.3),"mobile"===Object(s.a)()&&(bt=window.innerHeight);var gt=Object(r.useRef)(null);Object(r.useEffect)((function(){jt()}),[t.fileContent,t.file.path]);var ht=Object(r.useRef)(0),mt=Object(r.useState)(0),vt=Object(a.a)(mt,2),wt=vt[0],Ot=vt[1],jt=function(){ht.current=ht.current+1,Ot(ht.current)},xt=Object(r.useState)(!1),kt=Object(a.a)(xt,2),yt=kt[0],Ct=kt[1],_t=Object(r.useState)(!1),Et=Object(a.a)(_t,2),Tt=Et[0],St=Et[1];Object(r.useEffect)((function(){var t=o.length>3e4&&"desktop"!==Object(s.a)();Ct(t)}),[o,t.viewType,t.mobileView]),Object(r.useEffect)((function(){var n=o.length>3e4&&"desktop"!==Object(s.a)();Ct(n),jt();var e="desktop"===Object(s.a)()&&"preview"===t.viewType||"desktop"!==Object(s.a)()&&"preview"===t.mobileView;St(e);var c=t.file.path;setTimeout((function(){c===t.file.path&&jt()}),100)}),[t.viewType,t.mobileView]);var It=function(n){Object(J.b)(t.file.path,n),t.onViewToggle(n)};return Object(k.c)("div",{className:"editor-area",ref:dt},Object(k.c)("div",{className:"infos-editor-wrapper"},Object(k.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(k.c)(u.a,{title:t.file.name.replace(".md",""),onEdited:function(n,e){var o="".concat(t.file.folder).concat(n,".md"),c="".concat(t.file.folder).concat(e,".md");Z.file.onTitleUpdate(o,c),jt()}}),Object(k.c)("div",{className:"toolbar-and-dates-wrapper"},Object(k.c)("div",{className:"editor-toolbar-dropdown"},Object(k.c)(M.a,{hover:!0,dir:"right",maxHeight:bt},Object(k.c)(l.a.Fragment,null,Object(k.c)("div",{className:"view-toggler-wrapper"},"mobile"!==Object(s.a)()&&Object(k.c)(L.a,{class:"editor-view-toolbar",size:.8,buttons:[{title:"Editor",icon:"custom_icons/view-3.svg",action:function(){It("editor")}},{title:"Editor with minimap",icon:"custom_icons/view-4.svg",action:function(){It("editor-with-map")}},{title:"Dual view",icon:"custom_icons/view-1.svg",action:function(){It("both")}},{title:"Render view",icon:"custom_icons/view-2.svg",action:function(){It("preview")}}]})),Object(k.c)("div",{className:"toolbar-wrapper"},Object(k.c)(L.a,{class:"editor-main-toolbar",design:"vertical",size:.8,buttons:rt})),Object(k.c)("div",{className:"separation-bar"}),Object(k.c)("div",{className:"dates-wrapper"},Object(k.c)("div",{className:"date modified"},Object(k.c)("h4",null,"Modified"),Object(T.a)(new Date(t.file.modified||0))),Object(k.c)("div",{className:"date created"},Object(k.c)("h4",null,"Created"),Object(T.a)(new Date(t.file.created||0)))),Object(k.c)("div",{className:"path-wrapper"},Object(k.c)("div",{className:"path"},Object(k.c)("h4",null,"Path"),Object(k.c)("span",{className:"path-link",onClick:function(){Object(S.d)((function(n){n.ui.browser.goTo(t.file.folder,t.file.name)}))}}," ",t.file.folder," "))),Object(k.c)("div",{className:"note-id-wrapper"},Object(k.c)("h4",null,"Node Id"),Object(k.c)("div",{className:"note-id-form"},Object(k.c)("input",{type:"text",ref:gt,onClick:function(t){var n=t.target;n.setSelectionRange(0,n.value.length)},value:it,readOnly:!0}),Object(k.c)(L.a,{class:"note-id-toolbar",size:1,buttons:[{title:"Copy note ID",icon:"faClipboard",action:function(){var t=gt.current;t&&Object(U.a)(t)}}]})))))))),Object(k.c)(B.a,{progress:tt}),Object(k.c)("div",{className:"main-editor-wrapper"},!Tt&&!yt&&"codemirror"===t.editorType&&Object(k.c)(W.a,{windowId:t.windowId,ref:I,value:o,onChange:j,posY:t.posY,jumpToLine:t.jumpToLine||0,forceRender:wt,onScroll:t.onScroll,onTitleClick:t.onTitleClick,file:t.file}),!Tt&&yt&&Object(k.c)("div",{className:"codemirror-mobile-fallback"},Object(k.c)("p",null," note is too long for mobile, we disabled the advanced edition system "),Object(k.c)("textarea",{defaultValue:o,onChange:function(t){j(t.target.value)}}))),"desktop"!==Object(s.a)()&&Object(k.c)(P.a,{onButtonClicked:function(t){var n=F(t);n&&(j(n),jt())}}),K&&D,ut&&Object(k.c)(A,{file:t.file,onClose:function(){pt(!1)}}))},Y=function(){return"\n.mobile-text-manip-toolbar {\n\t\t.toolbar-button {\n\t\t\t\tpadding: 13px 20px;\n\t\t}\n}\n\n.file-path-wrapper {\n\t\tpadding-top: ".concat(Object(s.b)("desktop")?j.a.sizes.block:j.a.sizes.block/2,"px;\n\t\tfont-size: 13px;\n\t\tfont-weight: 700;\n\t\tcolor: #b6b5b5;\n\t\tcursor: pointer;\n\t\ttext-transform: capitalize;\n}\n.big-title {\n\t\tcolor: ").concat(j.a.colors.main,";\n\t\tfont-size: 30px;\n\t\tfont-weight: 800;\n\t\twidth: 100%;\n\t\ttext-transform: uppercase;\n}\n\n.separation-bar {\n\t\twidth: 86%;\n height: 1px;\n background: #e6e6e6;\n margin: 10px 6%;\n}\n\n.dates-wrapper {\n\t\tposition: relative;\n\t\tmargin: 0px 0px 5px 0px;\n\t\tdisplay: block!important;\n .modified {\n\t\t\t\tcolor: grey;\n\t\t\t\ttext-align: left;\n }\n\t\t.created {\n\t\t\t\ttext-align: right;\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0px;\n\t\t\t\tright: 0px;\n\t\t\t\tcolor: ").concat(j.a.colors.editor.interfaceGrey,";\n\t\t}\n}\n\n.path-wrapper {\n\t\tcolor: grey;\n text-align: left;\n\t\tpadding: 0px 0px 5px 0px;\n .path-link {\n\t\t\t\tcolor: ").concat(j.a.colors.main,";\n\t\t\t\tfont-weight: bold;\n\t\t\t\tcursor: pointer;\n }\n}\n\n.note-id-wrapper {\n\t\tcolor: grey;\n text-align: left;\n\t\t.note-id-form {\n\t\t\t\tdisplay:flex;\n\t\t\t\tinput {\n\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\tbackground: #ebebeb;\n\t\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t}\n\t\t}\n}\n.toolbar-and-dates-wrapper {\n\t\th4 {\n\t\t\t\tmargin: 0px;\n\n\t\t}\n}\n\n\n")},$=function(t){return"\n\n.editor-area {\n\t\twidth: ".concat(Object(s.b)("desktop")?"50%":"editor"===t?"100vw":"0vw",";\n\t\tdisplay: block;\n\n\t\tposition: ").concat(Object(s.b)("desktop")||"editor"===t?"relative":"absolute!important",";\n\t\ttop: ").concat("editor"!==t||Object(s.b)("desktop")?"-9999px":"0px",";\n\n\n\t\t.mobile-text-manip-toolbar {\n\t\t\t\tdisplay: ").concat("editor"!==t||Object(s.b)("desktop")?"none":"flex",";\n\t\t}\n\n\t\t.infos-editor-wrapper {\n\t\t\t\t").concat(Object(s.b)("desktop")?"":"height: ".concat(j.a.sizes.mobile.editorTopWrapper,"px;"),"\n\t\t\t\t").concat(Object(s.b)("desktop")?"width: calc(200% - ".concat(3*j.a.sizes.block*2,"px);"):"","\n\t\t\t\tpadding: 0px ").concat(Object(s.b)("desktop")?3*j.a.sizes.block:2*j.a.sizes.block,"px;\n\t\t\t\tposition: relative;\n\n\t\t\t\t").concat(Y(),"\n\n\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\tmargin-top: ").concat(Object(s.b)("desktop")?6:0,"px;\n\t\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 39px;\n\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\tcolor: ").concat(j.a.colors.main,";\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\t.toolbar-and-dates-wrapper {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t}\n\n\t\t\t\t.dates-wrapper {\n\t\t\t\t\t\tdisplay: ").concat(Object(s.b)("desktop")?"block":"none",";\n\t\t\t\t\t\t.date {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t").concat(z.b,"\n }\n}\n\n\n\n\n.main-editor-wrapper {\n ").concat(Object(s.b)("desktop")?"":"padding: 0px ".concat(2*j.a.sizes.block,"px 0px ").concat(2*j.a.sizes.block,"px;"),"\n ").concat(Object(s.b)("desktop")?"":"margin: 0px 0px ".concat(j.a.sizes.mobile.bottomBarHeight,"px 0px;"),"\n .monaco-editor {\n\t\t\t\tmargin: 0px;\n }\n .textarea-editor {\n\t\t\t\tborder: none;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: calc(100vh - ").concat(j.a.sizes.mobile.editorTopWrapper+j.a.sizes.mobile.editorBar+2*j.a.sizes.mobile.bottomBarHeight,"px);\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px;\n\t\t\t\tbackground: rgba(255,255,255,0.7);\n }\n}\n")},Z=function(t){var n=Object(r.useContext)(S.a),e=(null===n||void 0===n?void 0:n.status.isConnected)||!1;return Object(r.useMemo)((function(){return Object(k.c)(K,Object(o.a)({},t,{isConnected:e}))}),[t.viewType,e,t.canEdit,t.editorType,t.file.path,t.file,t.fileContent,t.isActive,t.jumpToLine])}},109:function(t,n,e){"use strict";e.d(n,"a",(function(){return H})),e.d(n,"b",(function(){return W}));var o=e(12),c=e(22),i=e(9),a=e(0),r=e.n(a),l=e(43),s=e(72),u=function(t){var n=t.headerLog,e={},o=function(t){e[t]&&delete e[t]};return{notify:function(t){for(var c in e){var i=e[c],a=!1;if(c.endsWith("-once")&&(c=c.replace("-once",""),a=!0),c===t.subId)try{i(t.data),a&&o("".concat(c,"-once"))}catch(r){n&&console.log("".concat(n," error with function"),r)}}},subscribe:function(t,cb){e[t]=cb},subscribeOnce:function(t,cb){var n="".concat(t,"-once");e[n]=cb},unsubscribe:o}},p=e(73),d=e(35),f=e(23),b=e(16),g=e(19),h="[IFRAME PARENT] 00563",m=g.a.client.log.iframe,v=u({headerLog:h}),w=v.notify,O=v.subscribe,j=v.unsubscribe;window.addEventListener("message",(function(t){t.data.subId&&(m&&console.log(h,"parent <== iframe",t.data.data),w(t.data))}));var x={subscribe:O,unsubscribe:j,send:function(t,n){t&&t.contentWindow&&(m&&console.log(h,"parent ==> iframe",n),t.contentWindow.postMessage(n,"*"))}},k=function(t){var n,e="[IFRAME child] 00564",o={file:null,frameId:"",reloadCounter:0,windowId:"",innerTag:"",tagName:"",tagContent:"",loginToken:t.loginToken,backendUrl:t.backendUrl},c=function(t){if(""===o.frameId)return console.warn(e,"NO FRAME ID, CANNOT SEND TO PARENT");var n={subId:o.frameId,data:t};window.parent.postMessage(n,"*")},i=function(t){var n={error:"CUSTOM TAG/SCRIPT ERROR: ".concat(t)};c({action:"iframeError",data:n})},a=function(t){var n=document.getElementById("content-wrapper");if(!t){if(!n||0===n.clientHeight)return;t=n.clientHeight+20}c({action:"resize",data:{height:t}})},r=function(){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;n&&n.call(t)},l=t.createEventBus({headerLog:"[FRAME API] 00567"}),s=l.subscribeOnce,u=l.notify,p=function(t,n){var o;t.includes(".js")?(o=document.createElement("script")).src=t:t.includes(".css")&&((o=document.createElement("link")).href=t,o.rel="stylesheet",o.type="text/css"),o.onload=function(){n()};var c=document.getElementById("external-ressources-wrapper");if(!c)return console.error(e,"could not load ".concat(t," because ressource wrapper was not detected"));c.appendChild(o)},d=function(n){var e="?token=".concat(t.loginToken);return"".concat(t.backendUrl,"/static").concat("/.tiro/cache/ctag-ressources/").concat(t.getRessourceIdFromUrl(n)).concat(e)},f=function(t,cb){for(var n=0,o=function(){if(++n===t.length)try{cb&&cb()}catch(o){console.error(e,"ERROR LoadScript Callback : ".concat(o))}},c=function(){var n=t[i],c=d(n),a=!0===window.disableCache,r=function(){b("ressource.download",[n,"/.tiro/cache/ctag-ressources/"],(function(){p(c,(function(){o()}))}))};a?(console.warn(e,"CACHE DISABLED, DOWNLOADING RESSOURCES EVERYTIME!"),r()):function(t,n,e){try{var o=new XMLHttpRequest;return o.open("HEAD",t,!1),o.send(),404!==o.status?n():e()}catch(c){e(c)}}(c,(function(){p(c,(function(){o()}))}),(function(){r()}))},i=0;i<t.length;i++)c()},b=function(n,e,cb){if(!e||!n||e.constructor!==Array||"string"!==typeof n)return i("Call Api : ".concat(n," => wrong arguments type / number(").concat(JSON.stringify({apiName:n,apiArguments:e,cb:cb}),")"));var o="iframe-api-call-".concat(t.generateUUID()," ");s(o,(function(t){cb&&cb(t)})),c({action:"apiCall",data:{reqId:o,apiName:n,apiArguments:e}})},g={version:1.2,call:b,utils:{getInfos:function(){return o},loadCachedRessources:f,getCachedRessourceUrl:d,getRessourceIdFromUrl:t.getRessourceIdFromUrl,loadScripts:function(t,cb){f(t,cb)},loadRessources:function(t,cb){f(t,cb)},loadScriptsNoCache:function(t,cb){for(var n=0,o=0;o<t.length;o++){var c=t[o],i=document.createElement("script");i.src=c,i.onload=function(){if(++n===t.length)try{cb&&cb()}catch(o){console.error(e,"ERROR LoadScript Callback : ".concat(o))}};var a=document.getElementById("external-ressources-wrapper");a&&a.appendChild(i)}},resizeIframe:a,fullscreenIframe:r,canScrollIframe:function(t){c({action:"canScrollIframe",data:{status:t}})},loadCustomTag:function(t,n,e){var o=g.utils.createDiv(),c=o.div,i=o.updateContent;e||(e={}),e.base_url=t.split("/").slice(0,-1).join("/");var a=!0;return!1===e.padding&&(a=e.padding),g.utils.loadScripts([t],(function(){var t=window.initCustomTag("".concat(n),e);a&&(t='<div class="with-padding" style="padding: 0px 15px;">'.concat(t,"</div>")),i(t)})),c},uuid:t.generateUUID,createDiv:function(){var n="ctag-content-wrapper-".concat(t.generateUUID()," ");return{div:'<div id="'.concat(n,'"></div>'),updateContent:function t(e){var o=document.getElementById(n);o?o.innerHTML=e:setTimeout((function(){t(e)}),100)}}}}};return window.api=g,n={init:function(n){o.frameId=n.frameId,o.innerTag=n.innerTag,o.tagContent=n.tagContent,o.tagName=n.tagName,o.file=n.file,o.reloadCounter=n.reloadCounter,o.windowId=n.windowId;var c,r=document.getElementById("content-wrapper");if(r){var l=t.unescapeHtml(r.innerHTML),s=(c=l,t.replaceCustomMdTags(c,"[[script]]",(function(t){var n="".concat(t);try{return new Function(n)()}catch(o){console.warn(e,"[SCRIPT] error: ".concat(o),n),i("".concat(o,' in Code "').concat(n,'"'))}})));r.innerHTML=s,setTimeout((function(){a()}),100),t.bindToElClass("title-search-link",(function(t){var n=t.dataset.file,e=t.dataset.folder,o=t.dataset.windowid;g.call("ui.browser.goTo",[e,n,{openIn:o}])}))}},askFullscreen:r,apiAnswer:function(t){var n={subId:t.reqId,data:t.data};u(n)}},window.onmessage=function(t){var e=t.data;if(e)for(var o in n)n&&n[o]&&o===e.action&&n[o](t.data.data)},g},y=e(13),C=e(62),_=e(32),E=e(8),T=e(47),S=e(28);g.a.client.log.verbose;var I=["epub","pdf"],N=function(t,cb){var n={iframe:F};n[t]?cb(n[t]):Object(y.d)((function(n){n.file.getContent("/.tiro/tags/".concat(t,".md"),(function(t){cb(t)}),{onError:function(){I.includes(t)?function(t,cb){var n="https://raw.githubusercontent.com/dotgreg/tiro-notes/dev/custom-tags/".concat(t,"/").concat(t,".js"),e="";"epub"===t&&(e='open:true, size: "80%"'),"pdf"===t&&(e="open:true");var o='\n [[script]]\n return api.utils.loadCustomTag("'.concat(n,'",`{{innerTag}}`,{').concat(e,"})\n [[script]]\n ");console.log("".concat("[CTAG MANAGER]",' : ctag "').concat(t,'" not present in tiro/tags but part of the base, return base config'),{baseCtagTxt:o}),cb(o)}(t,(function(t){cb(t)})):cb(null)}})}))},F=function(){return'\n[[script]]\nconst style = `<style>\n.ctag-iframe-wrapper {\n width: 100vw;\n height: 100vh;\n overflow: hidden;\n}\n#ctag-iframe {\n border: none;\n transform: scale(0.67);\n width: 150%!important;\n height: 150vh!important;\n transform-origin:top left;\n}\n</style>`\nconst contentStyle = `\n<style>\nimg {\n\t\tmax-width: 100%!important;\n\t\theight: auto!important;\n}\nbody, html {\n\t\tfont-family: sans-serif;\n}\n</style>\n`\n\nlet content = `{{innerTag}}`\nlet htmlHead = `<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>`\nlet htmlFooter = `</body></html>`\n\nvar meta = document.createElement(\'meta\');\nmeta.charset = "utf-8";\nwindow.document.head.appendChild(meta);\ndocument.head.innerHTML += \'<meta charset="utf-8">\'\n\nlet iframeContent = ""\nif (content.startsWith("http")) {\n iframeContent=`src="${content}"`\n} else {\n window.document.body.innerHTML = contentStyle + decodeURIComponent(content) \n}\n\n// api.utils.resizeIframe("100%");\nsetTimeout(() => {\n api.utils.resizeIframe("100%");\n}, 1000)\nreturn `${style}<div class="ctag-iframe-wrapper"><iframe ${iframeContent} id="ctag-iframe"></iframe></div>`\n\n[[script]]\n'},R=e(14),A=e(1),D="[IFRAME COMPONENT]",L=g.a.client.log.verbose,P={},M={},z=["latex","l"],B=function(t){var n="tag"===t.block.type&&!z.includes(t.block.tagName||""),e=Object(a.useState)(null),o=Object(i.a)(e,2),r=o[0],l=o[1],u=Object(a.useState)(null),p=Object(i.a)(u,2),d=p[0],f=p[1],b=Object(a.useState)("null"),g=Object(i.a)(b,2),h=g[0],m=g[1];Object(a.useEffect)((function(){n&&(m("loading"),"script"===t.block.tagName?(l("\n[[script]]".concat(t.block.content,"[[script]]")),setTimeout((function(){m("loaded")}),100),t.block.content=""):t.block.tagName&&N(t.block.tagName,(function(t){t?(l(t),setTimeout((function(){m("loaded")}),100)):l(null)})))}),[t.windowId,t.block.content]);var v="l"===t.block.tagName||"latex"===t.block.tagName;return Object(a.useEffect)((function(){if(!n){var e=s.b.render({raw:t.block.content,file:t.file,windowId:t.windowId});v&&(e="[[l]]".concat(t.block.content,"[[l]]")),f(e)}}),[t.windowId,t.file,t.block]),Object(A.c)("span",{className:"content-block ".concat(n?"block-tag":"block-text"," ")},"loaded"===h&&n&&r&&Object(A.c)(U,Object(c.a)({},t,{noteTagContent:r})),!n&&d&&Object(A.c)("span",{className:"content-block-text",dangerouslySetInnerHTML:{__html:d}}))},H=r.a.memo(B,(function(t,n){var e=!0;return JSON.stringify(t.block)!==JSON.stringify(n.block)&&(e=!1),t.block.content!==n.block.content&&(e=!1),t.file.path!==n.file.path&&(e=!1),e})),U=function(t){var n=Object(o.a)({},t).noteTagContent,e=Object(a.useState)(""),c=Object(i.a)(e,2),g=c[0],h=c[1],m=Object(a.useRef)(null),v=Object(a.useState)(""),w=Object(i.a)(v,2),O=w[0],j=w[1],I=Object(a.useState)(!1),N=Object(i.a)(I,2),F=N[0],z=N[1],B=Object(a.useState)(0),H=Object(i.a)(B,2),U=H[0],W=H[1],q=Object(a.useState)(null),V=Object(i.a)(q,2),G=V[0],J=V[1],K=Object(a.useState)(!1),Y=Object(i.a)(K,2),$=Y[0],Z=Y[1],X=function(){var n,e,o=function(n){$&&t.onIframeMouseWheel(n)};return null===(n=m.current)||void 0===n||null===(e=n.contentDocument)||void 0===e||e.addEventListener("mousewheel",o),function(){var t,n;return null===(t=m.current)||void 0===t||null===(n=t.contentDocument)||void 0===n?void 0:n.removeEventListener("mousewheel",o)}};Object(a.useEffect)(X,[t.yCnt,$]);var Q=Object(_.a)((function(e){X(),j(e),J(null),x.subscribe(e,(function(n){if("resize"===n.action){var e=n.data.height,o=(t.windowHeight||200)-35;if(Object(E.isString)(e)&&e.endsWith("%")){var c=parseInt(e.replace("%",""))/100;e=o*c}L&&console.log(D,"resizing to",e),console.log(D,"resizing to",e),W(e),z(!0)}if("canScrollIframe"===n.action){var i=n.data;Z(i.status)}if("apiCall"===n.action){var a=n.data;Object(y.b)(a,(function(t,e){if("nok"===t)return J(e.error);var o={reqId:n.data.reqId,data:e};x.send(m.current,{action:"apiAnswer",data:o})}))}if("iframeError"===n.action){var r=n.data.error;J(r)}})),setTimeout((function(){var o={file:t.file,innerTag:t.block.content,windowId:t.windowId,frameId:e,reloadCounter:ot,tagContent:n,tagName:t.block.tagName||"",loginToken:Object(f.b)(),backendUrl:Object(b.c)()};x.send(m.current,{action:"init",data:o})}),100)}),500),tt=function(){var e=s.b.render({raw:n,windowId:t.windowId,file:t.file}),o='\n<html>\n\t\t<div id="content-wrapper">\n\t\t\t\t'.concat(e,'\n\t\t</div>\n\t\t<div id="external-ressources-wrapper"></div>\n\t\t<script>\n\t\t\t\tconst IMPORTED_backend_url = "').concat(Object(b.c)(),'"\n\t\t\t\tconst IMPORTED_login_token = "').concat(Object(f.b)(),'"\n\t\t\t\tconst IMPORTED_replaceCustomMdTags = ').concat(p.c.toString(),"\n\t\t\t\tconst IMPORTED_unescapeHtml = ").concat(d.h.toString(),"\n\t\t\t\tconst IMPORTED_createEventBus = ").concat(u.toString(),"\n\t\t\t\tconst IMPORTED_generateUUID = ").concat(l.a.toString(),"\n\t\t\t\tconst IMPORTED_getRessourceIdFromUrl = ").concat(l.b.toString(),"\n\t\t\t\tconst IMPORTED_bindToElClass = ").concat(s.a.toString(),"\n\t\t\t\tconst main = ").concat(k.toString(),";\n\t\t\t\tmain({\n\t\t\t\t\tbackendUrl: IMPORTED_backend_url,\n\t\t\t\t\tloginToken: IMPORTED_login_token,\n\t\t\t\t\treplaceCustomMdTags: IMPORTED_replaceCustomMdTags,\n\t\t\t\t\tunescapeHtml: IMPORTED_unescapeHtml,\n\t\t\t\t\tcreateEventBus: IMPORTED_createEventBus,\n\t\t\t\t\tgenerateUUID: IMPORTED_generateUUID,\n\t\t\t\t\tgetRessourceIdFromUrl: IMPORTED_getRessourceIdFromUrl,\n\t\t\t\t\tbindToElClass: IMPORTED_bindToElClass\n\t\t\t\t})\n\t\t<\/script>\n<style>\n\t\tbody::backdrop {\n\t\t\tbackground: #F7F7F7;\n\t\t}\n</style>\n</html>\n"),c='\n\t\t\t\t<div class="simple-css-wrapper">\n\t\t\t\t'.concat(o,"\n\t\t\t\t</div>\n\t\t\t\t<style>\n\t\t\t\t").concat(Object(C.c)(),"\n\t\t\t\t</style>\n\t\t\t\t");c=Object(T.a)(c,[["{{innerTag}}",t.block.content.trim()]]),h(c)},nt=Object(a.useState)(0),et=Object(i.a)(nt,2),ot=et[0],ct=et[1],it=Object(a.useState)(!1),at=Object(i.a)(it,2),rt=at[0],lt=at[1];Object(a.useEffect)((function(){z(!1),tt();var t="iframe-".concat(Object(l.a)());return Q(t),function(){x.unsubscribe(t)}}),[t.windowId,t.block.content,t.block.tagName,t.noteTagContent,ot]);var st=t.index||0,ut="".concat(t.windowId,"-").concat(st,"-").concat(t.block.tagName);Object(a.useEffect)((function(){P[ut]?bt(!0):P={},M[ut]?vt(!0):P={}}),[]);var pt=Object(a.useState)(!1),dt=Object(i.a)(pt,2),ft=dt[0],bt=dt[1],gt=Object(a.useState)(!1),ht=Object(i.a)(gt,2),mt=ht[0],vt=ht[1],wt=function(t){t||(t=!mt),M[ut]=t,vt(t),bt(!1)};Object(a.useEffect)((function(){t.ctagFullscreen&&wt(!0)}),[t.ctagFullscreen]);var Ot=Object(l.a)();return Object(A.c)(r.a.Fragment,null,mt&&Object(A.c)("div",{className:"fullscreen-pin-bg",onClick:function(n){wt(!1),t.ctagOnFullscreenClose&&t.ctagOnFullscreenClose()}}),Object(A.c)("div",{className:"iframe-view-wrapper ".concat(F?"can-show":"hide"," iframe-tag-").concat(t.block.tagName," ").concat(ft?"pinned":""," ").concat(mt?"pinned fullscreen":""," ").concat(Object(R.d)()?"mobile":"")},Object(A.c)("div",{className:"ctag-menu"},Object(A.c)("div",{className:"ctag-ellipsis"},Object(A.c)(S.a,{name:"faEllipsisH",color:"#b2b2b2"})),Object(A.c)("div",{className:"ctag-menu-button ctag-reload",onClick:function(){ct(ot+1),lt(!0),setTimeout((function(){lt(!1)}),100)}},Object(A.c)(S.a,{name:"faRetweet",color:"#b2b2b2"})),Object(A.c)("div",{className:"ctag-menu-button ctag-fullscreen",onClick:function(){x.send(m.current,{action:"askFullscreen",data:{}})}},Object(A.c)(S.a,{name:"faExpand",color:"#b2b2b2"})),Object(A.c)("div",{className:"ctag-menu-button ctag-pin",onClick:function(t){var n;n||(n=!ft),P[ut]=n,bt(n),vt(!1)}},Object(A.c)(S.a,{name:"faThumbtack",color:"#b2b2b2"})),Object(A.c)("div",{className:"ctag-menu-button ctag-pin",onClick:function(t){wt()}},Object(A.c)(S.a,{name:"faExpandArrowsAlt",color:"#b2b2b2"}))),!rt&&Object(A.c)("iframe",{onMouseLeave:function(t){!function(t,n){var e=document.getElementById(n);e&&e.focus({preventScroll:!0})}(0,Ot)},ref:m,id:O,"data-testid":"iframe",title:O,srcDoc:g,className:"tag-iframe",style:{height:U},sandbox:t.ctagSandboxed?"allow-scripts allow-same-origin allow-popups":void 0}),G&&Object(A.c)("div",{className:"iframe-error"},Object(A.c)("code",null,Object(A.c)("pre",null,G))),Object(A.c)("input",{className:"refocus-input",id:Ot,type:"text"})))},W=function(){return"\n.refocus-input {\n\tposition: fixed;\n\tz-index: -10000;\n}\n.content-blocks-wrapper {\n\t\tpadding: 0px 15px;\n}\n.simple-css-wrapper {\n}\n\n.content-blocks-wrapper,\n.simple-css-wrapper,\n.simple-css-wrapper > div,\n.content-block,\n.iframe-view-wrapper\n{\n}\n\n.fullscreen-pin-bg {\n\t\tposition: fixed;\n\t\ttop:0px;\n\t\tright: 0px;\n\t\twidth: 100vw;\n\t\theight: 100vh;\n\t\tbackground: rgba(0,0,0,0.5);\n\t\tz-index:101;\n}\n.iframe-view-wrapper {\n\t\t&.pinned {\n\t\t\t\tposition: fixed;\n\t\t\t\ttransform: rotate(360deg);\n\t\t\t\ttop: 10px;\n\t\t\t\tright: 10px;\n\t\t\t\tz-index: 1000;\n\t\t\t\toverflow:hidden;\n\t\t\t\tborder: 2px;\n\t\t\t\tbackground: white;\n\t\t\t\tborder-radius: 12px;\n\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\tiframe {\n\t\t\t\t\t\tmax-height: 90vh;\n\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t}\n\t\t}\n\t\t&.pinned.fullscreen.mobile {\n\t\t\theight: calc(100vh - 80px);\n\t\t\tright: 10px;\n\t\t\twidth: calc(100vw - 20px);\n\t\t}\n\t\t&.pinned.fullscreen {\n\t\t\t\ttop: 20px;\n\t\t\t\tright: 20px;\n\t\t\t\tz-index:102;\n\t\t\t\twidth: calc(100vw - 40px);\n\t\t\t\theight: calc(100vh - 40px);\n\t\t\t\tiframe {\n\t\t\t\t\t\theight: calc(100% - 1px)!important;\n\t\t\t\t\t\tmax-height: calc(100% - 1px)!important;\n\t\t\t\t}\n\t\t}\n\t\tposition: relative;\n\t\t.ctag-menu {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 3px;\n\t\t\t\tz-index: 10;\n\t\t\t\tleft: 15px;\n\t\t\t\tcursor: pointer;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition: 0.2s all; \n\t\t\t\tdisplay: flex;\n\t\t\t\tpadding: 3px;\n\t\t\t\tpadding-left: 8px;\n\n\t\t\t\tmargin-left: 8px;\n\t\t\t\tmargin-right: 8px;\n\n\t\t\t\t.ctag-ellipsis {\n\t\t\t\t\t\tmargin-right: 15px;\n\t\t\t\t}\n\t\t}\n\t\t.ctag-menu .ctag-menu-button {\n\t\t\t\tdisplay: none;\n\t\t}\n\t\t&:hover {\n\t\t\t\t.ctag-menu {\n\t\t\t\t\t\topacity:0.5;\n\t\t\t\t}\n\t\t\t\t.ctag-menu:hover {\n\t\t\t\t\t\topacity:1;\n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tbox-shadow: 0px 0px 3px rgba(0,0,0,.1);\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t.ctag-menu-button {\n\t\t\t\t\t\t\t\tmargin-right: 15px;\n\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t&.hide iframe {\n\t\t\t\topacity: 0;\n\t\t}\n\t\tiframe::backdrop {\n\t\t\t\tbackground-color: rgba(255,255,255,1);\n\t\t}\n\n\t\tiframe {\n\t\t\t\t// transition: 0.3s all;\n\t\t\t\twidth: calc(100% );\n\t\t\t\tborder: none;\n\t\t\t\tborder-radius: 5px;\n\t\t}\n\t\t.iframe-error {\n\t\t\t\tbackground: #ffddba;\n\t\t\t\tfont-size: 8px;\n\t\t\t\tpadding: 14px;\n\t\t\t\tborder: 2px #ffc080 solid;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tline-height: 14px;\n\t\t}\n}\n\n.content-block.block-text {\n\t\tpadding-bottom: 0px;\n}\n\n/* .content-block-text > * { */\n/* \t\tpadding: 0px 15px; */\n/* } */\n\n.content-block.block-tag {\n\t\tpadding: 0px 0px 0px 0px;\n position: relative;\n left: -15px;\n top: 0;\n width: calc(100% + 20px);\n height: calc(100% );\n display: block;\n}\n\n"}},111:function(t,n,e){"use strict";e.d(n,"c",(function(){return d})),e.d(n,"a",(function(){return f})),e.d(n,"b",(function(){return b}));var o=e(26),c=e(35),i=e(55),a=e(23),r=e(8),l=e(13),s=e(33),u=e(38),p=function(t){if(t){var n=t.dataset.filePath,e=t.dataset.src;Object(l.d)((function(t){t.file.getContent(n,(function(i){var a=function(t,n){var e=t.match(o.a.image),i=[];return Object(r.each)(e,(function(t){var e=t.match(o.a.firstPartImg),a=e&&e[0]?e[0].replace("![","").replace("]","").replace("(",""):"",r=t.replace(o.a.firstPartImg,"").replace(")",""),l={url:Object(c.a)(n.folder)+"/"+r,title:a,file:n};i.push(l)})),i}(i,Object(u.d)(n));if(console.log(a),!(a.length<1)){var l=[],s=0;Object(r.each)(a,(function(t,n){t.url===e&&(s=n),l.push(t.url)})),t.ui.lightbox.open(s,l)}}))}))}},d=function(t){return Object(i.a)({file:t,pattern:o.a.image,replacement:function(n){var e=document.createElement("div");return e.innerHTML=f(n[0],n[1],t,!0),e}})},f=function(t,n,e){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?'<div class="mdpreview-source">'.concat(t,"</div>"):"",i="".concat(Object(c.a)(e.folder),"/").concat(n);return'<div class="cm-mdpreview-wrapper image-wrapper"><div class="cm-mdpreview-image" data-file-path="'.concat(e.path,'" data-src="').concat(i,'" onclick="').concat(Object(s.c)("image-open-lightbox",p),'"> <img onerror="this.style.display=\'none\'" src="').concat(i+Object(a.c)(),'" /></div></div>').concat(o)},b=function(){return"\n.cm-mdpreview-wrapper.image-wrapper {\n\t\t.cm-mdpreview-image {\n\t\t\tcursor:pointer;\n\t\t}\n\t\t.mdpreview-source {\n\t\t\t\tline-height: initial;\n\t\t}\n}\n\n"}},112:function(t,n,e){"use strict";e.d(n,"b",(function(){return f})),e.d(n,"a",(function(){return g})),e.d(n,"c",(function(){return v})),e.d(n,"d",(function(){return w}));var o=e(3),c=e(5),i=e(6),a=e(20),r=e(21),l=e(11),s=e(7),u=e(4),p=e(102),d=e(111),f={LatexMdEl:u.a.define()},b={resolve:"LatexMdEl"},g={defineNodes:["LatexMdEl"],parseInline:[{name:"MdCustomTagsParser",parse:function(t,n,e){return 36===n?t.addDelimiter(b,e,e+1,!0,!0):-1},after:"Emphasis"}],props:[Object(u.c)({LatexMdEl:f.LatexMdEl})]},h=function(t){Object(a.a)(e,t);var n=Object(r.a)(e);function e(t){var o;return Object(c.a)(this,e),(o=n.call(this)).str=t,o}return Object(i.a)(e,[{key:"ignoreEvent",value:function(){return!1}},{key:"toDOM",value:function(){var t=document.createElement("div");t.classList.add("cm-mdpreview-wrapper"),t.classList.add("latex-wrapper");var n=Object(p.c)(this.str);return t.innerHTML=' <div class="latex-height" >'.concat(n,"</div> "),t}}]),e}(l.g);function m(t,n){var e,c=[],i=Object(o.a)(t.visibleRanges);try{for(i.s();!(e=i.n()).done;){var a=e.value,r=a.from,u=a.to;Object(s.E)(t.state).iterate({from:r,to:u,enter:function(n){if("LatexMdEl"===n.name){var e=t.state.doc.sliceString(n.from,n.to),o=l.a.widget({widget:new h(e),side:1});c.push(o.range(n.from))}}})}}catch(p){i.e(p)}finally{i.f()}return l.a.set(c)}var v=function(t){return l.f.fromClass(function(){function n(e){Object(c.a)(this,n),this.decorations=void 0,this.decorations=m(e,t.file)}return Object(i.a)(n,[{key:"update",value:function(n){(n.docChanged||n.viewportChanged)&&(this.decorations=m(n.view,t.file))}}]),n}(),{decorations:function(t){return t.decorations},eventHandlers:{mousedown:function(n,e){var o=n.target;if(o.classList.contains("actionable-title")){var c=o.innerHTML.replace(/^#{1,6} /,"");t.onTitleClick(c)}}}})},w=function(){return"\n.latex-height {\n\t\theight: 20px;\n\t\toverflow: auto;\n\t\tline-height: initial;\n\t\tbackground: rgb(247,247,247);\n\t\tpadding: 10px;\n\t\tborder-radius: 5px;\n\t\tcolor: rgba(0,0,0,0);\n\t\ttransition: all 0.2s;\n\t\t.katex, .katex span {\n\t\t\t\tcolor: black;\n\t\t}\n}\n\n.mdpreview-source {\n\t\tfont-weight: bold;\n\t\tcolor: #b4b4b4;\n\t\tfont-size: 9px;\n\t\tdisplay: block;\n}\n\n.cm-mdpreview-wrapper {\n\t\tline-height: 0px;\n\n\t\t&.latex-wrapper {\n\t\t\t\tposition: relative;\n\t\t\t\tleft: -10px;\n\t\t\t\tdisplay: inline-block;\n\t\t}\n\t\t&.image-wrapper {\n\t\t\t\t/* max-height: 160px; */\n\t\t}\n\n\t\t.cm-mdpreview-image {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-block;\n\n\t\t\t\timg {\n\t\t\t\t\t\tmargin: 5px 0px;\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\tmax-width: calc(100% - 20px);\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tmax-height: 220px;\n\t\t\t\t}\n\t\t\t\t.enlarge {\n\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\ttransition: 0.2s all;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 8px;\n\t\t\t\t\t\tright: 23px;\n\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\tpadding: 6px;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tbackground: rgba(0,0,0,0.6);\n\t\t\t\t\t\tborder-radius: 19px;\n\t\t\t\t}\n\t\t\t\tsvg, span {\n\t\t\t\t\t\tpointer-events: none;\n\t\t\t\t}\n\t\t\t\tsvg {\n\t\t\t\t\t\tbox-shadow: 0 0 0 rgba(0,0,0,0.4);\n\t\t\t\t}\n\n\t\t}\n\t\t&:hover .enlarge {\n\t\t\t\topacity: 0.3;\n\t\t\t\t/* pointer-events: all; */\n\t\t}\n}\n}\n\n ".concat(Object(d.b)(),"\n ")}},113:function(t,n,e){"use strict";e.d(n,"a",(function(){return s})),e.d(n,"b",(function(){return p}));var o=e(12),c=e(52),i=e(13),a=e(8),r="tiro-analytics",l=function(cb){Object(i.d)((function(t){t.cache.get(r,(function(t){var n={};t&&(n=t),cb(n)}))}))},s=function(t){var n=Object(c.c)();l((function(e){var c,l=Object(o.a)({},e);l[n[0]]||(l[n[0]]={}),l[n[0]][n[1]]||(l[n[0]][n[1]]={}),l[n[0]][n[1]][n[2]]||(l[n[0]][n[1]][n[2]]={}),Object(a.isNumber)(l[n[0]][n[1]][n[2]][t])?l[n[0]][n[1]][n[2]][t]++:l[n[0]][n[1]][n[2]][t]=1,c=l,Object(i.d)((function(t){t.cache.set(r,c,-1)}))}))},u=function(cb,t){t||(t={});t.start?t.start:Object(c.c)(Object(c.b)("lastMonth")),t.end?t.end:Object(c.c)();l((function(t){cb(t)}))},p=function(t){return{log:s,report:u}}},123:function(t,n,e){"use strict";e.d(n,"b",(function(){return p})),e.d(n,"a",(function(){return d}));var o=e(17),c=e(8),i=e(64),a="tiro-ls-id-",r=function(t,n){var e=JSON.stringify(n);localStorage.setItem(a+t,e)},l="local_node_history",s="[".concat(l.toUpperCase(),"]"),u="notes-history-ls",p=function(t){var n=[],e=Object(c.cloneDeep)(function(t){var n,e=window.localStorage.getItem(a+t);return e&&(n=JSON.parse(e)),n||null}(u));e&&(n=t?e.filter((function(n){return n.path===t})):e);return n},d=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,e=arguments.length>2?arguments[2]:void 0,c=t,i=p(),a=p(c.path);e&&console.log(s,"adding el to ls : ",{itAdd:c}),i=i.filter((function(t){return t.path!==c.path})),a.unshift(c),a.length>n&&(a=a.slice(0,n)),i=[].concat(Object(o.a)(a),Object(o.a)(i));var l=f(i,3);r(u,l)},f=function t(n,e){var o=n,c=JSON.stringify(o);return b(c)>e&&o.length>1?(o.pop(),console.log(s,"recursivelyReduceArrTillSmallerThan REDUCE ARR > new length=",o.length),t(o,e)):o},b=function(t){return new Blob([t]).size/1048576};Object(i.a)(l,"addLocalNoteHistory",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/woopy/doopy",e={timestamp:Date.now(),path:n,content:"".concat(Object(c.random)(0,1e7)," helllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllo")};d(e,10,t)})),Object(i.a)(l,"addLocalNoteHistorySeveral",(function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/woopy/doopy",o=0;o<t;o++)Object(i.b)(l,"addLocalNoteHistory")(n,e)})),Object(i.a)(l,"getLocalNoteHistory",(function(t){console.log(p(t),"size: ".concat(b(JSON.stringify(p(t))),"MB"))})),Object(i.a)(l,"cleanLocalNoteHistory",(function(){r(u,[]),console.log(p(),"size: ".concat(b(JSON.stringify(p())),"MB"))}))},125:function(t,n,e){"use strict";e.d(n,"a",(function(){return l})),e.d(n,"b",(function(){return s}));var o=e(8),c=(e(0),e(13)),i=e(10),a=e(28),r=e(1),l=function(t){var n="faPaperclip";"image"===t.type&&(n="faImage"),"camera"===t.type&&(n="faCamera"),"microphone"===t.type&&(n="faMicrophone");var e="*";"image"===t.type&&(e="image/*"),"camera"===t.type&&(e="image/*"),"microphone"===t.type&&(e="audio/*");var i=Object(o.uniqueId)();return Object(r.c)("div",{className:"upload-button-component"},Object(r.c)("input",{className:"input-file-hidden",id:"file-".concat(i),multiple:!0,name:"file-".concat(i),type:"file",capture:"camera"===t.type||"microphone"===t.type,accept:e,onChange:function(n){var e=n.target.files;0!==e.length&&Object(o.each)(e,(function(n){Object(c.d)((function(e){e.upload.uploadFile({file:n,folderPath:t.file.folder,onProgress:t.onProgress,onSuccess:t.onSuccess})}))}))}}),Object(r.c)("label",{htmlFor:"file-".concat(i)},Object(r.c)(a.a,{name:n}),Object(r.c)("span",{className:"label-text"},t.label)))},s=function(){return"\n.upload-button-wrapper {\n\t\twidth: 100%;\n\t\tcursor: pointer;\n\t\t.inside-html-wrapper {\n\t\t\t\twidth: 100%;\n\t\t}\n\t\t&:hover {\n\t\t\t\t.label-text { color :".concat(i.a.colors.main,"; }\n\t\t}\n\t\t.upload-button-component {\n\t\t\t\tcursor: pointer;\n\t\t\t\tdisplay: flex;\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\t.input-file-hidden {\n\t\t\t\t\t\twidth: 0.1px;\n\t\t\t\t\t\theight: 0.1px;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tz-index: -1;\n\t\t\t\t}\n\t\t\t\t.label-text {\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t\tfont-size: 11px;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t}\n\t\t}\n}\n")}},13:function(t,n,e){"use strict";e.d(n,"e",(function(){return U})),e.d(n,"d",(function(){return W})),e.d(n,"a",(function(){return q})),e.d(n,"f",(function(){return V})),e.d(n,"c",(function(){return G})),e.d(n,"b",(function(){return J}));var o=e(17),c=e(8),i=e(0),a=e.n(i),r=e(43),l=e(77),s=e(38),u=e(26),p=e(19),d=!1,f=function(t){if(!t)return null;if(t.startsWith(p.a.metas.headerStart)&&(d=!0),t.startsWith(p.a.metas.headerEnd)&&(d=!1),""===t)return null;if(!d)return null;var n=t.split(": ");if(2!==n.length)return null;var e=n.shift();if(!e)return null;var o,c=n.join(":").trim();if("created"===e||"modified"===e){o=c,c=parseInt(o).toString()===o?function(t){var n="".concat(t).substr(0,10);return parseInt(n)}(c):c;var i=new Date(c).getTime();isNaN(i)||(c=i)}return{name:e,value:c}},b=e(47),g=e(16),h=e(23),m=function(t){Object(i.useEffect)((function(){g.b.on("moveFolderAnswer",(function(n){t.eventBus.notify(n.idReq,n.idReq)}))}),[]);return{file:function(n,e,cb){var o=G("move-file-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFILE] ".concat(n," -> ").concat(e)),g.b.emit("moveFile",{initPath:n,endPath:e,idReq:o,token:Object(h.b)()})},folder:function(n,e,cb){var o=G("move-folder-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFOLDER] ".concat(n," -> ").concat(e)),g.b.emit("moveFolder",{initPath:n,endPath:e,idReq:o,token:Object(h.b)()})}}},v=function(t){var n="[FILE API] 005363 ";Object(i.useEffect)((function(){g.b.on("getFileContent",(function(n){if(n.error)t.eventBus.notify(n.idReq,{error:n.error});else{var e=function(t){var n=t.match(u.a.metas),e={};if(n&&n[0])for(var o=n[0].split("\n"),c=0;c<o.length;c++){var i=f(o[c]);i&&(e[i.name]=i.value)}var a=t,r=u.a.metas;return{metas:e,content:a=Object(b.a)(a,[[r,""]])}}(n.fileContent);t.eventBus.notify(n.idReq,{content:e.content})}}))}),[]);var e=Object(i.useRef)("");return{getContent:function(n,cb,e){var o=w(n),c=G("get-file-content");t.eventBus.subscribe(c,(function(t){t.error&&e&&e.onError?e.onError(t.error):!t.error||e&&e.onError?t.error||cb(t.content):cb(t.error)})),g.b.emit("askForFileContent",{filePath:o,token:Object(h.b)(),idReq:c})},saveContent:function(n,o,c){var i=!(!c||!c.history)&&c.history,a=(!c||!c.withMetas||c.withMetas,w(n));g.b.emit("saveFileContent",{filePath:a,newFileContent:o,token:Object(h.b)()}),i&&(n!==e.current&&U().then((function(t){var e=t.ui.browser.folders.current.get;if(e===Object(s.c)(n)){var o,c="",i=t.ui.windows.active.get();if(i)c=(null===(o=i.content.file)||void 0===o?void 0:o.name)||"";t.ui.browser.goTo(e,c)}})),t.historyApi.intervalSave(n,o),e.current=n)},delete:function(e,cb){var o=G("delete-file");console.log("".concat(n," delete file ").concat(e.path)),t.eventBus.subscribe(o,cb),g.b.emit("onFileDelete",{filepath:e.path,idReq:o,token:Object(h.b)()})},move:m({eventBus:t.eventBus}).file,create:function(e,cb){var o=G("create-file");console.log("".concat(n," create file in ").concat(e)),t.eventBus.subscribe(o,cb),g.b.emit("createNote",{folderPath:e,idReq:o,token:Object(h.b)()})}}},w=function(t){return t.replace(u.a.linklink,"$2/$1")},O=e(12),j=e(9),x=e(29),k=e(46),y=function(){var t=Object(k.a)(Object(x.a)().mark((function t(n){return Object(x.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){var o={},i=[];U().then((function(e){e.search.word("#",n,(function(n){var e=[],a={};console.log(n),Object(c.each)(n,(function(t,n){var i={file:t.file,titleName:""};Object(c.each)(t.results,(function(t,n){var r=[],l=t.match(u.a.titleMd);if(l&&l[0]){var s=l[0].split("#").join("").trim();i.titleName=s}var p=t.match(u.a.hashtag3);Object(c.each)(p,(function(t){t=t.substring(1),o[t]||(o[t]={id:Object.keys(o).length+1,name:t,lines:[],noteParts:[]}),o[t].noteParts.push(Object(c.cloneDeep)(i)),o[t].lines.push(n),o[t].lines=Object(c.uniq)(o[t].lines);var e=i.file.name+"-"+i.titleName;a[e]||(a[e]=[]),a[e].push(o[t].id),r.push(o[t])})),Object(c.each)(r,(function(t,n){Object(c.each)(r,(function(o,c){if(n!==c){var i=t.id,a=o.id,r="".concat(i,"-").concat(a),l="".concat(a,"-").concat(i);-1===e.indexOf(r)&&-1===e.indexOf(l)&&e.push(r)}}))}))}))})),Object(c.each)(o,(function(t){i.push(t)})),t({nodesObj:o,nodesArr:i,edges:e})}))}))})));case 1:case"end":return t.stop()}}),t)})));return function(n){return t.apply(this,arguments)}}(),C=function(t){var n="[SEARCH API] 00563 ",e=Object(i.useState)(""),o=Object(j.a)(e,2),c=o[0],a=o[1];Object(i.useEffect)((function(){g.b.on("getWordSearch",(function(n){t.eventBus.notify(n.idReq,n.result)}))}),[]);var r=function(e,cb){!function(e,cb,o){var c=G("search-".concat(o,"-"));console.log("".concat(n," searching ").concat(e," with type ").concat(o)),t.statusApi.searching.set(!0),t.eventBus.subscribe(c,(function(n){t.statusApi.searching.set(!1),cb(n)})),g.b.emit("searchFor",{term:e,token:Object(h.b)(),type:o,idReq:c})}(e,cb,"text")};return{files:{search:r},word:function(e,o,cb){var c=G("search-word-");console.log("".concat(n," searching WORD ").concat(e)),t.eventBus.subscribe(c,(function(t){cb(t)})),g.b.emit("searchWord",{word:e,folder:o,token:Object(h.b)(),idReq:c})},hashtags:function(t,cb){y(t).then((function(t){cb(t)}))},ui:{search:function(t){U().then((function(n){n.ui.browser.files.set([]),a(t),r(t,(function(t){n.ui.browser.files.set(t)}))}))},term:{set:a,get:c}}}},_=e(328),E=function(t){var n=Object(O.a)({},t).eventBus;Object(i.useEffect)((function(){g.b.on("getUploadedFile",(function(t){n.notify(t.idReq,t)}))}),[]);var e={uploadFile:function(t){var e=G("upload-file");n.subscribe(e,(function(n){delete n.idReq,t.onSuccess(n)})),function(t){var n=Object(O.a)({},t),e=n.file,o=n.path,c=n.idReq,i=n.onProgress,a=new _(g.a);a.addEventListener("start",(function(t){t.file.meta.idReq=c,t.file.meta.path=o,t.file.meta.token=Object(h.b)()})),a.addEventListener("progress",(function(t){var n=Math.round(t.bytesLoaded/t.file.size*100);i(n)})),a.submitFiles([e])}({file:t.file,path:t.folderPath,idReq:e,onProgress:function(n){t.onProgress&&t.onProgress(n)}})}};return e},T=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,S=/([^\s,]+)/g,I=e(72),N=e(283),F="/".concat(p.a.path.configFolder,"/").concat(p.a.path.cacheFolder,"/cache-api"),R="[CACHE API]",A=p.a.client.log.verbose,D=p.a.client.log.verbose,L=function(){return(new Date).getTime()},P=function(t){var n=t-L()<0;return A&&console.log(R,"isExpired? : ",n,(t-L())/6e4,"mins"),n},M=function(t){var n=function(t){return"".concat(F,"/cache-api-storage-").concat(Object(b.b)(t),".md")},e=Object(i.useRef)({}),o=function(t,n,o){var c;e.current[t]={content:n,until:(c=o,L()+60*c*1e3)}},c=5e5,a="__CHUNKED__CACHED__OBJ__SIZE:",r="[CACHE CHUNK]",l=function(t,e){var o=JSON.stringify(e),i=function(t,e){D&&console.log(r,n(t),{str:e}),W((function(o){o.file.saveContent(n(t),"".concat(e))}))};if(!(o.length>c))return i(t,o);var l,s=(l=c,o.match(new RegExp(".{1,"+l+"}","g")));D&&console.log(r,"SAVE >> TOO LARGE, split in ".concat(s.length," parts"),{cacheId:t,contentArr:s}),i(t,"".concat(a).concat(s.length));for(var u=function(n){setTimeout((function(){i("c".concat(n,"_").concat(t),s[n])}),200*n)},p=0;p<s.length;p++)u(p)},s=function(t,cb,e){var o=function(t,e,o){W((function(c){c.file.getContent(n(t),e,{onError:o})}))},c="___ERROR___CHUNK___LOADING___FAILURE";o(t,(function(n){try{if(n.startsWith(a)){var i=parseInt(n.replaceAll(a,""));D&&console.log(R,"GET >> remerging a ".concat(i," part"),{cacheId:t}),function(n,e,i,a){for(var l=[],s=function(){if(l.length===e){var n=l.join(""),o=n.includes(c);D&&console.log("GET >> RESULT remerging",{hasFailed:o,cacheId:t,nbChunks:e,resMerge:n}),o?a():i(n)}},u=function(n){o("c".concat(n,"_").concat(t),(function(o){l[n]=o,D&&console.log(r,"c".concat(n,"_").concat(t),{nb:l.length,nbChunks:e,r:o}),s()}),(function(t){l[n]=c,s()}))},p=0;p<e;p++)u(p)}(0,i,(function(t){cb(t)}),(function(t){e()}))}else cb(n)}catch(l){e(l)}}),(function(t){e(t)}))};return{get:function(t,cb){if(t in e.current){var n=e.current[t],c=P(n.until);c&&(n.content=void 0),A&&console.log(R,"FROM RAM",t," expired:",c),cb(n.content)}else s(t,(function(n){try{var o=JSON.parse(n);e.current[t]=Object(O.a)({},o);var c=e.current[t],i=P(c.until);i&&(c.content=void 0),A&&console.log(R,"FROM FILE",t," expired:",i),cb(c.content)}catch(a){}}),(function(n){"NO_FILE"===n&&(A&&console.log(R,"FROM FILE: NO_FILE",t),o(t,void 0,60),cb(e.current[t].content))}))},set:function(t,n,c){c||(c=60),-1===c&&(c=1e32),o(t,n,c);var i=e.current[t];A&&console.log(R,"SETTING",t," with cachedTime in min",c),l(t,i)}}},z=e(113),B=e(83),H=null,U=function(){return new Promise((function(t,n){if(H)return t(H);var e=setInterval((function(){if(H)return clearInterval(e),t(H)}),200)}))},W=function(cb){U().then((function(t){cb(t)}))},q=a.a.createContext(null),V=function(t){var n=Object(i.useRef)({}),e=function(t){delete n.current[t]},o={subscribe:function(t,cb,e){e||(e={}),n.current[t]||(n.current[t]=[]),n.current[t].push({cb:cb,options:e})},unsubscribe:e,notify:function(t,o){Object(c.each)(n.current,(function(n,i){i===t&&Object(c.each)(n,(function(n){try{n.cb(o)}catch(c){console.log("[CLIENT API] error with function",c)}n.options.persistent||e(t)}))}))}};Object(i.useEffect)((function(){p.a.client.log.verbose&&console.log("[CLIENT API ]INIT ")}),[]);var a=function(t){Object(i.useEffect)((function(){g.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),g.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),g.b.on("disconnect",(function(){t.eventBus.notify(n,{isConnected:!1})}))}),[]);var n="watch-api-unique-id-request";return Object(i.useEffect)((function(){g.b.on("onNoteWatchUpdate",(function(e){t.eventBus.notify(n,e)}))}),[]),{file:function(e,cb){t.eventBus.subscribe(n,(function(t){e===t.filePath&&cb(t)}),{persistent:!0})},appStatus:function(cb){t.eventBus.subscribe(n,(function(t){cb(t)}),{persistent:!0})},dev:{toggleIsConnected:function(e){t.eventBus.notify(n,{isConnected:e})}}}}({eventBus:o}),r=C({eventBus:o,statusApi:t.statusApi}),s=v({eventBus:o,historyApi:t.historyApi}),u=function(t){return Object(i.useEffect)((function(){g.b.on("getFiles",(function(n){t.eventBus.notify(n.idReq,n.files)})),g.b.on("getFilesPreview",(function(n){t.eventBus.notify(n.idReq,n.filesPreview)}))}),[]),{get:function(n,cb){p.a.client.log.socket&&console.log("[CLIENT API] get files ".concat(n));var e=G("get-files-");t.statusApi.searching.set(!0),t.eventBus.subscribe(e,(function(e){t.statusApi.searching.set(!1),cb(e,n)})),g.b.emit("askForFiles",{folderPath:n,token:Object(h.b)(),idReq:e})},getPreviews:function(n,cb){var e=G("get-files-");t.eventBus.subscribe(e,cb),g.b.emit("askFilesPreview",{filesPath:n,idReq:e,token:Object(h.b)()})},search:t.searchApi.files.search}}({eventBus:o,searchApi:r,statusApi:t.statusApi}),d=E({eventBus:o}),f=Object(N.a)({eventBus:o}),b=function(t){return Object(i.useEffect)((function(){g.b.on("getFoldersScan",(function(n){t.eventBus.notify(n.idReq,{folders:n.folders,pathBase:n.pathBase})}))}),[]),{get:function(n,cb){p.a.client.log.socket&&console.log("[FOLDERS API] get folders ");var e=G("get-folders-");t.eventBus.subscribe(e,(function(t){var e=Object(O.a)({},t);e.folderPaths=n,cb(e)})),g.b.emit("askFoldersScan",{foldersPaths:n,token:Object(h.b)(),idReq:e})},move:m({eventBus:t.eventBus}).folder,create:l.a,delete:l.b}}({eventBus:o}),w=function(t){return Object(i.useEffect)((function(){g.b.on("getCommandExec",(function(n){t.eventBus.notify(n.idReq,n.resultCommand)}))}),[]),{exec:function(n,cb){var e=G("command-exec-");t.eventBus.subscribe(e,(function(t){Object(c.isString)(t)||(t=JSON.stringify(t)),cb(t)})),g.b.emit("askCommandExec",{commandString:n,token:Object(h.b)(),idReq:e})}}}({eventBus:o}),x=M(),k=Object(l.d)({searchUiApi:r.ui,statusApi:t.statusApi,filesApi:u,foldersApi:b,windowApi:t.windowsApi,tabsApi:t.tabsApi,userSettingsApi:t.userSettingsApi}),y=function(t){var n=Object(i.useState)(),e=Object(j.a)(n,2),o=e[0],c=e[1];return Object(O.a)(Object(O.a)({},I.b),{},{ui:{lineJump:{jump:c,get:o}}})}(),_=Object(z.b)({}),T={cache:x,file:s,encryption:B.b,files:u,popup:t.popupApi,upload:d,ressource:f,tabs:t.tabsApi,folders:b,userSettings:t.userSettingsApi,history:t.historyApi,status:t.statusApi,note:y,analytics:_,search:r,command:w,watch:a,ui:{browser:k,windows:t.windowsApi,lightbox:t.lightboxApi,textToSpeechPopup:t.ttsApi,search:r.ui,note:y.ui}};return H=T,T},G=function(t){return"client-api-".concat(t,"-req-").concat(Object(r.a)())},J=function(t,cb){U().then((function(n){var e=t.apiName.split("."),i=n;if(Object(c.each)(e,(function(t){i=i[t]?i[t]:null})),null===i)return cb("nok",{error:'"'.concat(t.apiName,'" does not exists in current api \n\nAvailable Api properties :\n\n').concat(Y("",n))});try{var a=K(i);if(!Object(c.isNumber)(a)){var r=i.apply(void 0,Object(o.a)(t.apiArguments));return cb("ok",r)}var l=Object(c.cloneDeep)(t.apiArguments);l.splice(a,0,(function(t){cb("ok",t)})),i.apply(void 0,Object(o.a)(l))}catch(s){return cb("nok",{error:'error "'.concat(JSON.stringify(s),'" when executing "').concat(t.apiName,'" with props ').concat(t.apiArguments)})}}))},K=function(t){var n=function(t){var n=t.toString().replace(T,""),e=null;return null===(e=n.startsWith("cb =>")?["cb"]:n.slice(n.indexOf("(")+1,n.indexOf(")")).match(S))&&(e=[]),e}(t),e=n.indexOf("cb");return-1===e?null:e},Y=function t(n,e){var o="";for(var i in e)if("object"===typeof e[i]&&e[i].constructor!==Array){if(i.length>1&&"get"!==i){var a=""!==n?"".concat(n,"."):"";o+=t("".concat(a).concat(i),e[i])}}else o="".concat(o).concat(n,".").concat(i,"\n");var r=o.split("\n"),l=[];return U().then((function(t){Object(c.each)(r,(function(n){var e=n.split("."),o=t;Object(c.each)(e,(function(t,n){o[t]&&(o=o[t])}));var i="var",a="";Object(c.isFunction)(o)&&(i="Function",a=o.toString()),l.push({name:n,type:i,description:a})}))})),o}},14:function(t,n,e){"use strict";e.d(n,"d",(function(){return o})),e.d(n,"e",(function(){return c})),e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return r}));var o=function(){var t,n=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n},c=function(t){return"navigator"===t||"editor"===t||"preview"===t},i=function(t){return r()===t};function a(){return!!/iPad/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}var r=function(){var t=window.innerWidth,n="desktop";return l()||t<1e3&&(n="tablet"),t<500&&(n="mobile"),n},l=function(){return!s()},s=function(){var t,n=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n}},142:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(277),c=e(4),i=e(10),a=e(112),r=function(){return Object(o.a)({theme:"light",settings:{background:"#ffffff",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",selectionMatch:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C",gutterBorder:"#ddd",lineHighlight:"#fff"},styles:[{tag:c.e.comment,color:"#787b80"},{tag:c.e.definition(c.e.typeName),color:"#194a7b"},{tag:c.e.typeName,color:"#194a7b"},{tag:c.e.tagName,color:"#008a02"},{tag:c.e.variableName,color:"#1a00db"},{tag:c.e.heading,color:i.a.colors.main},{tag:s.Image,color:"red",class:"tiro-image"},{tag:a.b.LatexMdEl,class:"cm-mdpreview-latex-code mdpreview-source"},{tag:c.e.heading1,class:"actionable-title h1"},{tag:c.e.heading2,class:"actionable-title h2"},{tag:c.e.heading3,class:"actionable-title h3"},{tag:c.e.heading4,class:"actionable-title h4"},{tag:c.e.heading5,class:"actionable-title h5"},{tag:c.e.heading6,class:"actionable-title h6"},{tag:c.e.content,fontSize:"10px"}]})},l={ImageTwo:c.a.define()},s=(Object(c.c)({ImageTwo:l.ImageTwo,"Strikethrough/...":l.ImageTwo}),{ListItem:c.a.define(),headingMark:c.a.define(),LinkReference:c.a.define(),Image:c.a.define(),LinkTitle:c.a.define(),LinkLabel:c.a.define(),Link:c.a.define(),LinkMark:c.a.define(),BulletList:c.a.define()});Object(c.c)({LinkReference:s.LinkReference,ListItem:s.ListItem,Link:s.Link,Image:s.Image,LinkTitle:s.LinkTitle,LinkLabel:s.LinkLabel,LinkMark:s.LinkMark,BulletList:s.BulletList})},143:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));e(0);var o=e(10),c=e(42),i=e(1),a=function(t){return Object(i.c)("div",null,Object(i.c)(c.a,{class:"mobile-text-manip-toolbar",colors:[o.a.colors.editor.mobileToolbar.font,o.a.colors.editor.mobileToolbar.font],buttons:[{icon:"faAngleLeft",action:function(){return t.onButtonClicked("<-")}},{icon:"faAngleRight",action:function(){return t.onButtonClicked("->")}},{icon:"faCheckSquare",action:function(){return t.onButtonClicked("[x]")}},{icon:"faAngleUp",action:function(){return t.onButtonClicked("^")}},{icon:"faAngleDown",action:function(){return t.onButtonClicked("v")}},{icon:"faEraser",action:function(){return t.onButtonClicked("X")}},{icon:"faClone",action:function(){return t.onButtonClicked("C")}}]}))},r=function(){return"\n .mobile-text-manip-toolbar {\n position: fixed;\n bottom: ".concat(o.a.sizes.mobile.editorBar+10,"px;\n display: flex;\n list-style: none;\n width: 100%;\n padding: 0px;\n align-content: center;\n justify-content: center;\n align-items: center;\n height: ").concat(o.a.sizes.mobile.editorBar,"px;\n background: ").concat(o.a.colors.editor.mobileToolbar.bg,";\n li {\n flex: 1 1 auto;\n justify-content: center;\n display: flex;\n }\n }\n")}},144:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));e(0);var o=e(10),c=e(28),i=e(1),a=function(t){var n=t.dir?t.dir:"left",e=t.maxHeight?t.maxHeight:50;return Object(i.c)("div",{className:"dropdown-wrapper ".concat(n," ").concat(t.hover?"hover-active":"")},Object(i.c)("span",{onMouseEnter:function(){},onClick:function(){},className:"context-menu-wrapper"},Object(i.c)("div",{className:"dropdown-icon"},Object(i.c)(c.a,{name:"faEllipsisH",color:o.a.colors.l1.font})),Object(i.c)("div",{className:"context-menu",style:{maxHeight:e}},t.children)))},r=function(){return"\n.dropdown-wrapper {\n\t\t\n\t\tposition: relative;\n\t\t&.hover-active:hover {\n\t\t\t\t.context-menu {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\tpointer-events: all;\n\t\t\t\t}\n\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\tcolor: ".concat(o.a.colors.main,";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t.dropdown-icon {\n\t\t\t\tposition: absolute;\n\t\t\t\tpadding: 10px;\n\t\t\t\ttop: -10px;\n\t\t\t\tsvg {\n\t\t\t\t\t\tcolor: #d4d1d1;\n\t\t\t\t}\n\t\t}\n\n\t\t.context-menu {\n\t\t\t\toverflow-y: scroll;\n\t\t\t\tz-index: 100;\n\t\t\t\tright: 10px;\n\t\t\t\ttop: 20px;\n\t\t\t\tpointer-events: none;\n\n\n\t\t\t\ttransition: 0.2s all;\n\t\t\t\ttransition-delay: 0.2s, 0s;\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 0;\n\n\t\t\t\tmin-width: 140px;\n\t\t\t\tpadding: 10px;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tbackground: white;\n\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t}\t\n\n\t\t&.right {\n\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t}\n\t\t}\n}\n")}},145:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));var o=e(0),c=e.n(o),i=e(1),a=function(t){var n=t.progress,e=n>=0&&n<100;return Object(i.c)(c.a.Fragment,null,e&&Object(i.c)("div",{className:"upload-progress-bar-wrapper"},Object(i.c)("div",{className:"bg-fill",style:{width:"".concat(n,"%")}}),Object(i.c)("div",{className:"label"},n,"% uploaded... ")))},r=function(){return"\n.device-mobile {\n\t\t.upload-progress-bar-wrapper {\n\t\t\t\tbottom: 176px;\n\t\t}\n}\n.upload-progress-bar-wrapper {\n\t\t.label {\n\t\t\t\tposition: relative;\n\t\t}\n\t\t.bg-fill {\n\t\t\t\ttransition: 0.1s all;\n\t\t\t\tposition:absolute;\n\t\t\t\tbackground: #077e00;\n\t\t\t\theight: 100%;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: 0px;\n\t\t}\n\t\tposition:absolute;\n\t\tbottom: 0px;\n\t\twidth: 100%;\n\t\tleft: 0px;\n\t\t/* background: green; */\n\t\tbackground: #a0a0a0;\n\t\tcolor: white;\n\t\ttext-align: center;\n\t\tz-index:3;\n\t\tfont-size: 9px;\n\t\tpadding: 5px;\n}\n"}},146:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var o=e(278),c=function(t){return t||(t=0),Object(o.isNumber)(t)?t+1:0}},147:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(9),c=e(8),i=e(0),a=function(){var t=Object(i.useState)(!1),n=Object(o.a)(t,2),e=n[0],a=n[1],r=Object(i.useRef)(0);return Object(i.useEffect)((function(){var t=Object(c.debounce)((function(){r.current=r.current+1,a(!0),setTimeout((function(){a(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{resizeState:e,resizeCount:r}},r=function(t){var n=Object(i.useState)(!1),e=Object(o.a)(n,2),a=e[0],r=e[1];return Object(i.useEffect)((function(){var n=Object(c.debounce)((function(){r(!0),setTimeout((function(){r(!1)}),200)}),200),e=document.querySelector(t);if(e){var o=new ResizeObserver((function(t){n()}));return o.observe(e),function(){o.disconnect()}}}),[]),{resizeState:a}}},148:function(t,n,e){"use strict";e.d(n,"a",(function(){return i})),e.d(n,"b",(function(){return a}));e(8);var o=e(13),c="notes-view-type",i=function(t){return new Promise((function(n,e){Object(o.d)((function(e){e.cache.get(c,(function(e){if(e){var o=e[t];n(o||!1)}}))}))}))},a=function(t,n){Object(o.d)((function(e){e.cache.get(c,(function(o){o||(o={}),o[t]=n,e.cache.set(c,o,1e17)}))}))}},149:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(3),c=e(9),i=e(0),a=e(120),r=e.n(a),l=e(54),s=e(1),u=function(t){var n=Object(i.useState)(0),e=Object(c.a)(n,2),a=e[0],u=e[1],p=Object(i.useRef)(null),d=Object(i.useRef)(null),f=function(){var t={maxY:0,y:0,percent:0},n=d.current?d.current:null,e=p.current?p.current:null;if(!e||!n)return t;var o=e.getBoundingClientRect().height,c=n.getBoundingClientRect().y;return t.maxY=n.getBoundingClientRect().height-o,t.y=e.getBoundingClientRect().y-c,t.percent=t.y/t.maxY*100,t};Object(i.useEffect)((function(){var n=d.current?d.current:null;if(n){var e=new MutationObserver((function(n,e){var c,i=Object(o.a)(n);try{for(i.s();!(c=i.n()).done;){if("data-scroll-refresh"===c.value.attributeName){var a=l.a.getScrollObj(t.windowId),r=a.dims.scroller.viewport;r<20&&(r=20),m(r);var s=(a.dims.scroller.full-a.dims.scroller.viewport)/100,p=a.posPercent*s;u(p)}}}catch(d){i.e(d)}finally{i.f()}}));return e.observe(n,{attributes:!0}),function(){e.disconnect()}}}),[]);var b=Object(i.useState)(0),g=Object(c.a)(b,2),h=g[0],m=g[1];return Object(s.c)("div",{className:"scrolling-bar-wrapper",ref:d},Object(s.c)(r.a,{onDrag:function(n){l.a.onScrollerScroll(t.windowId,f().percent)},onStop:function(){u(f().y)},position:{x:0,y:a},axis:"y",bounds:"parent"},Object(s.c)("div",{ref:p,style:{height:"".concat(h,"px")},className:"scrolling-bar"})))},p=function(){return"\n.view-editor .scrolling-bar-wrapper {\n}\n\n.scrolling-bar-wrapper {\n\t\toverflow: hidden;\n\t\tposition: absolute;\n\t\ttop: 33px;\n\t\theight: calc(100% - 53px);\n\t\tbackground: rgb(226,226,226);\n\t\twidth: 10px;\n\t\tright: 0px;\n\t\tposition: absolute;\n\n\t\t.scrolling-bar {\n\t\t\t\tcursor: ns-resize;\n\t\t\t\tbackground: #cdcccc;\n\t\t\t\theight: 20px;\n\n\t\t}\n}\n"}},150:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return c}));var o=function(t){var n=function(n){i(n,(function(n){n&&t.onImagePasted(n)}))};window.addEventListener("paste",n,!1);return function(){window.removeEventListener("paste",n,!1)}},c=function(t){var n=t.value;navigator&&navigator.clipboard&&navigator.clipboard.writeText(n).then((function(){console.log("Text copied to clipboard...")})).catch((function(t){console.log("Something went wrong",t)}))},i=function(t,n){0==t.clipboardData&&"function"==typeof n&&n(void 0);var e=t.clipboardData.items;void 0==e&&"function"==typeof n&&n(void 0);for(var o=0;o<e.length;o++)if(-1!=e[o].type.indexOf("image")){console.log("[PASTE] informations on files pasted : ",t,e,e.length);var c=e[o].getAsFile();"function"==typeof n&&n(c)}}},151:function(t,n,e){"use strict";e.d(n,"a",(function(){return h}));var o=e(9),c=e(8),i=e(0),a=e(43),r=e(19),l=e(16),s=e(10),u=e(23),p=e(32),d=e(70),f={ui_sidebar:!0,ui_filesList_sortMode:2,ui_layout_colors_main:"#E86666",ui_editor_markdown_preview:!0,ui_editor_links_as_button:!0,ui_editor_markdown_table_preview:!0},b="[USER SETTINGS] :",g=r.a.client.log.verbose,h=function(){var t=Object(d.a)("user-settings",{}),n=Object(o.a)(t,3),e=n[0],r=n[1],h=n[2],m=Object(i.useState)(0),v=Object(o.a)(m,2),w=v[0],O=v[1],j=Object(i.useRef)([]);Object(i.useEffect)((function(){x()}),[e]);var x=Object(p.a)((function(){g&&console.log(b,"UPDATE!",e,w),function(t,n,o){j.current[t]||(j.current[t]=n[o]);var i=e[t];Object(c.isNull)(i)||Object(c.isUndefined)(i)||(""===i&&j.current[t]&&(i=j.current[t]),n[o]=i)}("ui_layout_colors_main",s.a.colors,"main"),O(w+1)}),1e3),k=function(t,n){l.b.emit("updateSetupJson",{paramName:t,paramValue:n,token:Object(u.b)(),idReq:"updateSetupJson-".concat(Object(a.a)())})};return{userSettings:e,userSettingsApi:{updateSetupJson:k,set:function(t,n,o){o||(o={}),o.writeInSetupJson||(o.writeInSetupJson=!1),o.writeInSetupJson&&k(t,"".concat(n)),g&&console.log(b,"updateUserSettings ".concat(t," to ").concat(n));var i=Object(c.cloneDeep)(e);i[t]=n,r(i)},get:function(t){var n=f[t],o=n;return t in e&&(o=e[t]),""===o&&(o=n),o},list:function(){var t=[];return Object(c.each)(e,(function(n,e){var o=e;t.push({key:o,val:n})})),t},refresh:{css:{get:w}}},refreshUserSettingsFromBackend:h}}},152:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(38),c=e(26),i=e(33),a=e(49),r=e(47),l=e(10),s=e(55),u=function(t,n){return Object(s.a)({file:t,pattern:c.a.userCustomTagFull2,replacement:function(e){var c=document.createElement("span");return c.innerHTML=function(t,n,e){var c=t[2].replaceAll("[[","").replaceAll("]]",""),l=t[0].replaceAll("[[".concat(c,"]]"),""),s="".concat(Object(r.b)(c),"-").concat(Object(r.b)(l)),u="ress-".concat(s);Object(i.a)(n,s,(function(){var t=document.querySelector(".".concat(u," .iframe-wrapper-cm-ctag"));if(t){var o=Object(a.a)(c,l,{file:n,windowId:e});Object(a.b)(t,o)}}));var p='\n\t<div class="button-ctag-cm-toggle" \n\t\tonclick="'.concat(Object(i.c)("toggle-ctag-link",(function(t){if(t){var n=t.dataset.filepath,e=decodeURIComponent(t.dataset.tagcontent),c=t.dataset.tagname,l=t.dataset.windowid,s="".concat(Object(r.b)(c),"-").concat(Object(r.b)(e)),u=Object(o.d)(n),p=t.parentNode.parentNode.querySelector(".iframe-wrapper-cm-ctag"),d=p.querySelector("iframe")?"closed":"open";Object(i.b)(u,s,d);var f=Object(a.a)(c,e,{file:u,windowId:l});Object(a.b)(p,f)}})),'"\n\t\tdata-filepath="').concat(n.path,'"\n\t\tdata-windowid="').concat(e,'"\n\t\tdata-tagname="').concat(c,'"\n\t\tdata-tagcontent="').concat(encodeURIComponent(l),'"\n\t>').concat(Object(i.d)("eye"),"</div>"),d='<div class="cm-ctag-name">[[ '.concat(c," ]]</div>"),f='<div class="cm-ctag-overview">'.concat(d).concat(p,"</div>");return'<div class="cm-ctag-wrapper '.concat(u,'">').concat(f).concat('<div class="iframe-wrapper-cm-ctag"></div>',"</div>")}(e,t,n),c}})},p=function(){return"\n\t.cm-ctag-wrapper {\n\t\tposition:relative;\n\t\tbackground: #f2f2f2;\n\t\tpadding: 8px;\n\t\tborder-radius: 5px;\n\t\t.cm-ctag-overview {\n\t\t\tdisplay: flex;\n\t\t\t.cm-ctag-name {\n\t\t\t\tfont-weight: bold;\n\t\t\t\tcolor: ".concat(l.a.colors.main,";\n\t\t\t}\n\t\t\t.button-ctag-cm-toggle {\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0px;\n\t\t\t\ttop: -1px;\n\t\t\t\topacity: 0.5;\n\t\t\t\tcursor: pointer;\n\t\t\t\tpadding: 10px;\n\t\t\t\t&:hover {\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t.iframe-wrapper-cm-ctag {\n\n\t\t}\n\t}\n\t\n\n\t")}},153:function(t,n,e){"use strict";e.d(n,"a",(function(){return U})),e.d(n,"b",(function(){return W}));var o=e(0),c=e.n(o),i=e(157),a=e(282),r=e(39),l=e(11),s=e(286),u=e(10),p=e(54),d=e(14),f=e(147),b=e(58),g=e(142),h=e(8),m=e(19),v=e(13),w=e(65),O=(m.a.client.log.verbose,function(t,n,e,o,c){return{label:t,apply:n||t,info:e,detail:c,type:"tag",boost:o||0}}),j=function(t){var n=k(t);return[y,n,x]},x=function(t){var n=t.matchBefore(/\-\-/);if(!t.explicit&&!n)return null;var e="".concat(m.a.path.configFolder,"/snippets.md");return new Promise((function(o,c){Object(v.d)((function(c){c.file.getContent(e,(function(e){var c=[],i=e.split("\n");Object(h.each)(i,(function(t){var n,e=(t=t.split("\\n").join("\n")).split("|"),o=null===(n=e.shift())||void 0===n?void 0:n.trim(),i=e.join("|").trim();if(i&&o){if(o="--"+o,i.includes("${")){var a=i;try{i=new Function("return `"+a+"`")()}catch(l){console.warn("[Code Mirror]","snippets error: ",l,a)}}var r=i.length>20?"".concat(i.substring(0,20),"..."):i;c.push(O(o,i,void 0,void 0,r))}}));var a={from:n?n.from:t.pos,options:c,validFor:/.*/};o(a)}))}))}))},k=function(t){return function(n){var e=n.matchBefore(/\#/);return n.explicit||e?new Promise((function(o,c){Object(v.d)((function(c){var i=Object(w.b)(Object(w.b)(t.folder));c.search.hashtags(i,(function(t){var c=[];Object(h.each)(t.nodesArr,(function(t){c.push(O(t.name,t.name))}));var i={from:e?e.from:n.pos,options:c,validFor:/.*/};o(i)}))}))})):null}},y=function(t){var n=t.matchBefore(/\[\[/);return t.explicit||n?new Promise((function(e,o){Object(v.d)((function(o){o.files.get("/.tiro/tags",(function(t){var n=[],e=0;Object(h.each)(t,(function(i){var a=i.name.replace(".md",""),r="[[".concat(a,"]]"),l="".concat(r," ").concat(r),s="Insert installed custom tag ".concat(r),u=0;o.file.getContent(i.path,(function(o){var i=o.split("\n"),a="// --insert:",p="// --comment:",d="// --boost:";Object(h.each)(i,(function(t){(t=t.split("\\n").join("\n")).startsWith(a)&&(l=t.replace(a,"")),t.startsWith(p)&&(s=t.replace(p,"")),t.startsWith(d)&&(u=parseInt(t.replace(d,"")))})),n.push(O(r,l,s,u)),++e===t.length&&c(n)}))}))}));var c=function(o){var c={from:n?n.from:t.pos,options:o,validFor:/.*/};e(c)}}))})):null},C=e(112),_=e(151),E=e(80),T=e(105),S=e(88),I=e(111),N=e(107),F=e(26),R=e(55),A=e(1),D=function(t){return Object(R.a)({file:t,pattern:F.a.ressource,replacement:function(n){var e=document.createElement("span");return e.innerHTML=function(t,n){var e=t[0],o='<div class="mdpreview-source">'.concat(e,"</div>"),c=Object(N.renderToString)(Object(A.c)(E.a,{markdownTag:e,file:n}));return"".concat(c," ").concat(o)}(n,t),e}})},L={val:!1},P=L,M=e(152),z="[Code Mirror]",B=m.a.client.log.verbose,H=Object(o.forwardRef)((function(t,n){var e=function(){var t=n.current;return t&&t.state?t:null},c=Object(o.useRef)(null);Object(o.useEffect)((function(){!function(){var n=e();if(window.cmobj=n,!n)return!1;if(t.value===c.current)return!1;if("loading..."===t.value)return!1;if(n.view.state.doc.toString()===t.value)return!1;var o=b.a.getCurrentLineInfos(n).currentPosition;b.a.updateText(n,t.value,o),c.current=t.value}()}),[t.value,t.forceRender]);Object(o.useEffect)((function(){if(B&&console.log(z,"JUMP to line :",t.jumpToLine),-1!==t.jumpToLine){var n=e();n&&(t.posY<=-10||b.a.scrollToLine(n,t.jumpToLine))}}),[t.jumpToLine]);Object(o.useEffect)((function(){m()}),[t.value]),Object(o.useEffect)((function(){m()}),[]);var u=Object(f.a)(".window-id-".concat(t.windowId)).resizeState;Object(o.useEffect)((function(){m()}),[u]);var h,m=function(){var n=e();if(n){var o=b.a.getEditorInfos(n.view);p.a.updateEditorDims(t.windowId,{viewport:o.viewportHeight,full:o.contentHeight}),p.a.updateScrollerDims(t.windowId)}},v=Object(C.c)({file:t.file,onTitleClick:function(n){!function(n){var o=e();if(o){var c=b.a.getCurrentLineInfos(o);B&&console.log(z,"CLICK ON TITLE DETECTED",n,c),t.onTitleClick(c.lineIndex)}}(n)}}),w=[Object(r.a)({override:j(t.file)}),l.c.domEventHandlers({scroll:function(t,n){},wheel:function(n,e){var o=b.a.getEditorInfos(e);p.a.onEditorScroll(t.windowId,o.currentPercentScrolled),t.onScroll()}})],O={base:i.markdownLanguage,codeLanguages:a.a,extensions:[]},x=!t.value.includes("--no-editor-table")&&!t.value.includes("--nt"),k=!t.value.includes("--no-latex")&&!t.value.includes("--nl"),y=Object(_.a)().userSettingsApi,E="desktop"!==Object(d.a)();y.get("ui_editor_links_as_button")&&(w.push(Object(T.c)(t.file)),w.push(Object(S.c)(t.file,t.windowId))),y.get("ui_editor_markdown_table_preview")&&x&&(w.push((h=t.file,Object(R.a)({file:h,pattern:/\|/gim,classWrap:function(t){return"md-table-limiter"}}))),w.push(function(t){return Object(R.a)({file:t,pattern:F.a.mdTableCell,classWrap:function(t){var n=t[0];return n&&"-"===n||n&&"-|"===n?"":"md-table-cell"}})}(t.file)),w.push(function(t){return Object(R.a)({file:t,pattern:F.a.mdTableLine,classWrap:function(t){var n=t[0].trim();n.startsWith("|")&&(n=n.substring(1)),n.endsWith("|")&&(n=n.substring(0,n.length-1));var e=n.split("|").length;return P.val=!P.val,"md-table-line md-table-".concat(e," ").concat(P.val?"even":"")}})}(t.file))),y.get("ui_editor_markdown_preview")&&k&&O.extensions.push(C.a),y.get("ui_editor_markdown_preview")&&(w.push(v),w.push(Object(I.c)(t.file)),w.push(D(t.file)),w.push(Object(M.a)(t.file,t.windowId))),E||w.push(Object(i.markdown)(O));var N="";return y.get("ui_editor_markdown_table_preview")&&(N+="md-table-preview-enabled"),Object(A.c)("div",{className:"codemirror-editor-wrapper ".concat(N)},Object(A.c)(s.a,{value:"",ref:n,theme:Object(g.a)(),onChange:function(n,e){n!==t.value&&(c.current=n,t.onChange(n),L.val=!1,m())},basicSetup:{foldGutter:!1,dropCursor:!1,allowMultipleSelections:!1,indentOnInput:!1,closeBrackets:!1,bracketMatching:!1,lineNumbers:!1},extensions:w}))})),U=c.a.memo(H,(function(t,n){var e=!0;return t.forceRender!==n.forceRender&&(e=!1),t.jumpToLine!==n.jumpToLine&&(e=!1),t.file.path!==n.file.path&&(e=!1),e})),W=function(){return"\n.teststorage {\n position: absolute;\n top: 120px;\n z-index: 10;\n}\n.cm-selectionLayer {\n pointer-events: none;\n\t\tz-index:0!important;\n}\n.cm-selectionBackground {\n\t\tbackground: rgba(0,0,0,0.1);\n}\n\n\n.actionable-title {\n\t\tcolor: ".concat(u.a.colors.main,";\n\t\tposition: relative;\n\t\t&:before {\n\t\t\t\tcontent: \"\u279d\";\n\t\t\t\tposition: absolute;\n\t\t\t\tright: -20px;\n\t\t\t\tcolor: #c6c6c6;\n\t\t\t\tfont-size: 18px;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition: 0.2s all;\n\t\t\t\tbottom: -3px;\n\t\t}\n\t\t&:hover {\n\t\t\t\t&:before {\n\t\t\t\t\t\topacity: 1\n\t\t\t\t}\n\t\t}\n\t\t&.h1 {\n\t\t\t\tfont-size: 15px;\n\t\t\t\tfont-weight: bold;\n\t\t\t\ttext-decoration: underline;\n\n\t\t}\n\t\t&.h2 {\n\t\t\t\tfont-size: 13px;\n\t\t\t\ttext-decoration: underline;\n\n\t\t}\n\t\t&.h3 {\n\t\t\t\tfont-size: 12px;\n\t\t}\n\n}\n\n\n.cm-matchingBracket {\n\t\tbackground-color: rgba(0,0,0,0)!important;\n}\n\n\n.cm-content {\n\t\t// font-family: 'Open sans', sans-serif;\n\t\tfont-family: Consolas, monaco, monospace;\n\t\tfont-size: 11px;\n}\n\n.cm-focused {\n\t\toutline: none!important;\n}\n.main-editor-wrapper {\n\t\twidth: calc(100% + 18px);\n\t\tmargin: 32px 0px 0px 0px;\n\t\tpadding: 0px;\n\t\twidth:100%;\n\t\theight: ").concat(Object(d.b)("desktop")?"calc(100% - 32px);":"calc(100% - 180px);",'; \n}\n\n.codemirror-editor-wrapper {\n\t\tmargin-right: 18px;\n\t\twidth: calc(100% - 10px);\n}\n.codemirror-editor-wrapper, \t.cm-editor, .cm-theme {\n\t\theight: calc(100% - 30px);\n}\n.codemirror-editor-wrapper, \t.cm-editor, .cm-theme {\n\t\theight: 100% ;\n\t\toverflow:hidden;\n\t\tpadding: 0px;\n}\n.cm-editor {\n\t\tword-break: break-word;\n}\n.cm-search {\n\t\tpadding: 6px 10px 11px;\n}\n.cm-content {\n\t\twidth: 100%;\n\t\toverflow:hidden;\n\t\twhite-space: pre-wrap;\n}\n.cm-scroller {\n\t\tz-index: auto!important;\n\t\tleft: 15px;\n\t\tpadding-right: 25px;\n}\n.cm-line {\n}\n.cm-cursor {\n}\n\n.cm-tooltip-autocomplete {\n\t\tpadding: 10px 5px;\n\t\tbackground: white;\n\t\tborder-radius: 5px;\n\t\tborder: none;\n\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\t\t[aria-selected="true"]{\n\t\t\t\tbackground: ').concat(u.a.colors.main,';\n\t\t\t\tborder-radius: 2px;\n\t\t}\n\n}\n\n.codemirror-mobile-fallback {\n\t\tmargin: 10px;\n\t\ttextarea {\n\t\t\t\twidth: calc(100% - 20px);\n\t\t\t\theight: calc(100vh - 350px);\n\t\t}\n}\n\n.test-success {\n\t\t// background: orange;\n\t\tcolor: red;\n\t\tdisplay: block;\n\t\tpadding-top: 50px;\n}\n.tiro-image {\n\t\tcolor: red;\n\t\tdisplay: block;\n\t\tpadding: 20px;\n}\n.tiro-image-wrapper{\n\t\tposition: relative;\n\n\t\t&:before {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: 50%;\n\t\t\t\tcontent: "x";\n\t\t\t\twidth: 50%;\n\t\t\t\theight: 100px;\n\t\t\t\tdisplay:block;\n\t\t\t\t// background: orange;\n\n\t\t}\n}\n\n').concat(Object(C.d)(),"\n\n// FILE RESSOURCE PREVIEW\n").concat(Object(E.b)(),"\n\n// PREVIEW LINK\n").concat(Object(S.b)(),"\n\n\n").concat(function(){for(var t="",n=0;n<30;n++){var e=Math.floor(100/n);t+="\n\t\t\t\t&.md-table-".concat(n," span.md-table-cell{\n\t\t\t\t\t\twidth: calc(").concat(e,"% - 15px);\n\t\t\t\t}")}return"\n.md-table-preview-enabled {\n\t\t.md-table-line {\n\t\t\t\t&.even {\n\t\t\t\t\t\tbackground: #e3e3e3;\n\t\t\t\t}\n\t\t\t\tdisplay: inline-flex;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tbackground: #f4f4f4;\n\t\t\t\tpadding: 5px;\n\t\t\t\t".concat(t,"\n\t\t\t\tspan.md-table-cell {\n\t\t\t\t\t\tpadding-right:13px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tvertical-align: top;\n\t\t\t\t}\n\t\t\t\tspan.md-table-cell span.md-table-limiter {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\tright:0px;\n\t\t\t\t\t\tcolor: #c8c3c3;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t\tspan.md-table-cell>span:first-child {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n }\n\t\t.cm-activeLine {\n\t\t\t\t.md-table-line {\n\t\t\t\t\t\tbackground: #d9d9d9;\n\t\t\t\t\t\tspan.md-table-cell span.md-table-limiter {\n\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\t.cm-line .md-table-limiter {\n\t\t\t\tdisplay: inline;\n\t\t}\n\n}\n\t\t")}(),"\n")}},154:function(t,n,e){"use strict";e.d(n,"a",(function(){return m})),e.d(n,"b",(function(){return v}));var o=e(9),c=e(12),i=e(81),a=e(8),r=e(0),l=e.n(r),s=e(13),u=e(104),p=e(150),d=e(36),f=e(18),b=e(84),g=e(1);var h={upload:{uploadCounter:0,reinit:function(){}},file:{onTitleUpdate:function(t,n){},onFileDelete:function(t){}}},m=l.a.createContext(h),v=function(t){var n=Object(c.a)({},t).tab,e=Object(r.useContext)(s.a),i=Object(r.useState)(h),l=Object(o.a)(i,2),v=l[0],O=l[1],j=function(){var t=Object(r.useContext)(s.a),n=Object(r.useState)({name:"",data:{}}),e=Object(o.a)(n,2),c=e[0],i=e[1],a=Object(r.useRef)({});return Object(r.useEffect)((function(){if(t){var cb=a.current[c.name];cb&&cb(t,c.data)}}),[c]),{onNextStateTrigger:function(t){i(t)},addNextStateAction:function(t,cb){a.current[t]=cb}}}(),x=j.onNextStateTrigger,k=j.addNextStateAction;k("refreshFolderList",(function(t,n){var e=t.ui.browser.folders.current.get;e===n.folder&&(t.ui.browser.goTo(e,n.name,{openIn:"activeWindow"}),x({name:"checkIfNoWindows"}))})),k("checkIfNoWindows",(function(t){0===n.grid.content.length&&t.tabs.close(n.id)}));var y=Object(a.cloneDeep)(v);return y.file.onFileDelete=function(t){e&&e.popup.confirm("".concat(f.a.trashNote),(function(){var n;null===(n=e.lastNotesApi)||void 0===n||n.removeFile(t.path),e.file.delete(t,(function(n){e.ui.windows.getIdsFromFile(t.path),n[n.length-1];var o=n[0];Object(a.each)(n,(function(t){t.modified&&o.modified&&t.modified>o.modified&&(o=t)})),x({name:"refreshFolderList",data:o})}))}))},y.file.onTitleUpdate=function(t,n){e&&e.file.move(t,n,(function(o){var c,i=null;if(Object(a.each)(o,(function(t){t.path===n&&(i=t)})),i){var r=e.ui.windows.getIdsFromFile(t);e.ui.windows.updateWindows(r,i),null===(c=e.lastNotesApi)||void 0===c||c.removeFile(t),x({name:"refreshFolderList",data:i})}}))},y.upload.reinit=function(){var t=Object(a.cloneDeep)(v);delete t.upload.file,O(t)},Object(r.useEffect)((function(){var t=function(t){var o,c=null===(o=Object(u.b)(n))||void 0===o?void 0:o.file;c&&e&&e.upload.uploadFile({file:t,folderPath:c.folder,onSuccess:function(t){var n=Object(a.cloneDeep)(v);n.upload.uploadCounter=n.upload.uploadCounter+1,n.upload.file=t,delete n.upload.progress,O(n)},onProgress:function(t){var n=Object(a.cloneDeep)(v);delete n.upload.file,n.upload.progress=t,O(n)}})},o=function(t){var n=function(n){if(n.preventDefault(),n.dataTransfer&&n.dataTransfer.items){var e=n.dataTransfer.items;if(!e[0])return;for(var o=0;o<e.length;o++)t.onDropped(e[o].getAsFile())}},e=function(t){t.preventDefault(),o()},o=Object(a.debounce)((function(){t.onDragEnd()}),100);return d.a.log.upload&&console.log("[UPLOAD] reinit drag/drop events"),window.addEventListener("drop",n),window.addEventListener("dragover",e),function(){window.removeEventListener("drop",n),window.removeEventListener("dragover",e)}}({onDropped:t,onDragEnd:function(){console.log("003442 onDragEnd")}}),c=Object(p.b)({onImagePasted:t});return function(){c(),o()}}),[t.tab]),Object(g.c)(w,null,Object(g.c)("div",{className:"window-grid-wrapper"},Object(g.c)(m.Provider,{value:y},Object(g.c)(b.a,{refresh:n.refresh||0,grid:n.grid,onGridUpdate:t.onGridUpdate,mobileView:t.mobileView}))))},w=Object(i.a)("div",{target:"ejnwhwz0"})({name:"zk0z9r",styles:"height:100%;.window-grid-wrapper{height:100%;}"})},155:function(t,n,e){"use strict";e.d(n,"b",(function(){return p})),e.d(n,"a",(function(){return d}));var o=e(9),c=e(0),i=e.n(c),a=e(14),r=e(10),l=e(28),s=e(1),u=function(t){var n=Object(c.useState)(""),e=Object(o.a)(n,2),i=e[0],u=e[1],p=Object(c.useState)(!1),d=Object(o.a)(p,2),f=d[0],b=d[1];Object(c.useEffect)((function(){u(t.title),b(!1)}),[t.title]);return Object(s.c)("div",{className:"title-input-wrapper"},Object(s.c)("input",{className:"big-title",type:"text",value:i,onChange:function(t){var n=function(t){var n=t;return n.replace(/[^\w\s\_\-]/gi,"")}(t.target.value);u(n),b(!0)},onKeyDown:function(n){if("Enter"===n.key){if(i.length<3)return;t.onEdited(t.title,i),b(!1)}}}),f&&Object(s.c)("div",{className:"press-to-save"},Object(s.c)(l.a,{name:"faCircle",color:r.a.colors.main,size:.7})),f&&"mobile"===Object(a.a)()&&Object(s.c)("button",{className:"buttonSaveTitleMobile",onClick:function(){0!==i.length&&(b(!1),t.onEdited(t.title,i))}}," Save "))},p=function(){return"\n.buttonSaveTitleMobile {\n\t\tposition: relative;\n\t\tright: 20px;\n\n\n}\n"},d=i.a.memo(u,(function(t,n){var e=!1;return t.title!==n.title&&(e=!1),e}))},16:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return c})),e.d(n,"c",(function(){return d})),e.d(n,"d",(function(){return f}));var o,c,i=e(12),a=e(17),r=e(8),l=e(274),s=e(76),u=e(36),p=e(18),d=function(){var t=u.a.global.protocol,n=Object(s.b)("backend-port")?":".concat(Object(s.b)("backend-port")):"".concat(u.a.global.port),e="".concat(t).concat(u.a.global.url).concat(n);return Object(s.b)("backend-port").includes(".")&&(e="".concat(t).concat(Object(s.b)("backend-port"))),e},f=function(){return new Promise((function(t,n){o||(o=l(d()),u.a.log.socket&&console.log("[SOCKET] try connecting to ".concat(d(),"...")),(c=g(o)).on("connectionSuccess",(function(n){u.a.log.socket&&console.log("[SOCKET] connection successful!, socket.connected :".concat(o.connected),n),n.isRgGood||alert(p.a.rgNotWorking),t({socket:o,ipsServer:n.ipsServer,socketManager:c})})))}))},b=function(t,n){return["%c [CLIENT SOCKET 2] ".concat(t),"background: #ccc; color: red",n||null]},g=function(t){var n={};return{on:function(e,o){var c=function(t,n){return function(e){var o;u.a.log.socket&&(o=console).log.apply(o,Object(a.a)(b("<== ON ".concat(t," "),Object(i.a)({},e)))),n(e)}}(e,o),l=Object(r.random)(1,1e8);return n[l]={endpoint:e,apiFn:c},t.on(e,c),l},off:function(e){n[e]&&(t.off(n[e].endpoint,n[e].apiFn),delete n[e])},emit:function(n,e){var o;u.a.log.socket&&(o=console).log.apply(o,Object(a.a)(b("==> EMIT ".concat(n," "),Object(i.a)({},e)))),t.emit(n,e)}}}},18:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=e(19).a.strings},19:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o={tokenRefreshInHours:96,path:{staticResources:"static",defaultDataFolder:"markdown-notes",configFolder:".tiro",backendStateFolder:".states",cacheFolder:"cache",historyFolder:".history",archiveFolder:".history_archive",uploadFolder:".resources",relativeUploadFolderName:".resources"},metas:{headerStart:"=== HEADER ===",headerEnd:"=== END HEADER ==="},strings:{folders:"Folders",files:"files",images:"images",trashNote:"Are you sure to trash that note?",clickHereDisconnected:"(click here if persist)",searchingLabel:"searching...",lastNotes:"Last Notes",newNote:"New Note",dateModified:"Modified :",dateCreated:"Created :",searchPlaceholder:"Search Note",hoursAgo:" hours ago",daysAgo:" days ago",minsAgo:" mins ago",months:["January","February","March","April","May","June","July","August","September","October","November","December"],createFolder:"Create folder",createFolderPrompt:"New Folder name to create in",renameFolder:"Rename folder",renameFolderPrompt:"Rename folder to :",deleteFolder:"Delete folder",deleteFolderPrompt:"Are you sure you want to delete the folder and all its notes (no recovery possible) : ",deleteTabPrompt:"Are you sure you want to delete that tab? : ",moveToTrash:"Move to trash",moveToTrashPrompt:"Are you sure you want move folder in .tiro/.trash : ",loadingFolder:"loading...",moveFolderPrompt:"move folder",setupForm:{title:"Login to Tiro",saveToLs:"Autologin/Save for 30 days on that device",introText:"Welcome to Tiro, please fill these informations to get started",user:"user",password:"password",dataFolder:"folder path",userExplanation:"should have > 3 chars",passwordExplanation:"should have > 3 chars",folderExplanation:"relative from Tiro folder installation (../data for example)",successReload:"Configuration file successfully written, reloading application...",submit:"login",noFolder1:"folder path",noFolder2:"doesn't exists, please create it or choose another folder (no data will be deleted)."},appviews:{image:"Switch to Gallery View",text:"Switch to Files View"},loginForm:{wrongUserPassword:"Wrong login/password",wrongToken:"Authentication expired, please log again"},passwordForm:{explanation:"please enter your password",submit:"submit"},editorBar:{tts:"Text to speech",explanation:{history:"File history"},lightbox:"Show Images"},ttsPopup:{title:"Text to speech",voice:"Voice"},settingsPopup:{title:"Tiro Settings",backend:{title:"Server settings",explanation:"Only fill if server is on another port/protocol than the client (usually in development)",protocol:"Https",protocolExpl:"https or http",port:"Backend Port or URL",portExpl:'Port/Url used by backend (ex: "3023" or "backend.myurl.com" or "backend.url.com:3023")'}},historyPopup:{title:"Versions for ",thead:{date:"date",name:"version"}},rgNotWorking:"ERROR: Tiro requires Ripgrep to be working, it seems that ripgrep (rg command) is either not installed or not functionning correctly on you computer. To install it, follow these instructions : https://github.com/BurntSushi/ripgrep#installation",promptPopup:{defaultTitle:"User Prompt",confirmTitle:"Confirm",accept:"Ok",refuse:"Cancel"},tabs:{newTab:"New Tab"}},server:{log:{socket:!1,verbose:!1,fs:!1,ripgrep:!1}},client:{log:{verbose:!1,socket:!1,upload:!1,iframe:!1,eventManager:!1},version:"0.30.97",params:{previewArea:{scrollSpeed:1.3}}},dev:{disableLogin:!1}}},23:function(t,n,e){"use strict";e.d(n,"b",(function(){return h})),e.d(n,"c",(function(){return m})),e.d(n,"a",(function(){return w})),e.d(n,"d",(function(){return O}));var o=e(9),c=e(8),i=e(0),a=e.n(i),r=e(19),l=e(53),s=e(51),u=e(16),p=e(18),d=e(101),f=e(13),b=e(56),g=e(1),h=function(){var t=function(t){var n,e="; ".concat(document.cookie).split("; ".concat(t,"="));return 2===e.length?null===(n=e.pop())||void 0===n?void 0:n.split(";").shift():void 0}("tiro-login-token");return t||""},m=function(){return"?token=".concat(h())},v=function(t){!function(t,n,e){var o=new Date;o.setTime(o.getTime()+60*e*60*1e3);var c="expires="+o.toUTCString();document.cookie=t+"="+n+";"+c+";path=/"}("tiro-login-token",t,r.a.tokenRefreshInHours)},w=function(){v("")},O=function(t){var n=Object(i.useState)(!1),e=Object(o.a)(n,2),r=e[0],m=e[1],w=Object(i.useState)(""),O=Object(o.a)(w,2),j=O[0],x=O[1],k=Object(i.useState)(""),y=Object(o.a)(k,2),C=y[0],_=y[1],E=Object(i.useState)(),T=Object(o.a)(E,2),S=T[0],I=T[1],N=Object(i.useRef)(0);Object(i.useEffect)((function(){return N.current=u.b.on("getLoginInfos",(function(n){switch(n.code){case"SUCCESS":if(!n.token)return;v(n.token),m(!1),t.onLoginSuccess();break;case"WRONG_TOKEN":m(!0),I(["error",p.a.loginForm.wrongToken]);var e=n.loginInfos;null!==e&&void 0!==e&&e.demo_mode&&(x("viewer"),_(e.viewer_password)),t.onLoginAsked();break;case"WRONG_USER_PASSWORD":I(["error",p.a.loginForm.wrongUserPassword]),m(!0)}})),function(){u.b.off(N.current)}}),[]);var F=Object(b.a)("user-password-cache-ls",{}),R=Object(o.a)(F,2),A=R[0],D=R[1];Object(i.useEffect)((function(){if(r){var t=Object(d.b)().dic,n="__HARDCODED_LOGIN_LS_PASSWORD_0129dsfaf1029__";t.l1&&t.l2&&t.l1.value&&t.l2.value&&Object(f.d)((function(e){var o,i,a=t.l1.value+t.l2.value;if(A[a])o=A[a].usr,i=A[a].pass;else if(o=e.encryption.decryptUrlParam(t.l1.value,n).plaintext,i=e.encryption.decryptUrlParam(t.l2.value,n).plaintext,o&&i){var r=Object(c.cloneDeep)(A);r[a]={usr:o,pass:i},D(r)}o&&i&&(x(o),_(i),setTimeout((function(){console.log("success login url, submitting it",{usr:o,pass:i}),u.b.emit("sendLoginInfos",{user:o,password:i,token:h()})}),1e3))}))}}),[r]);var L=function(){I(void 0),u.b.emit("sendLoginInfos",{user:j,password:C,token:h()})},P=Object(i.useState)(1),M=Object(o.a)(P,2),z=M[0],B=M[1],H=Object(b.a)("login-to-ls",!1),U=Object(o.a)(H,2);U[0],U[1];return{displayLoginPopup:r,LoginPopupComponent:function(t){return Object(g.c)(a.a.Fragment,null,r&&Object(g.c)("div",{className:"setup-popup-component"},Object(g.c)(s.a,{title:p.a.setupForm.title,onClose:function(){}},Object(g.c)("div",null,Object(g.c)(l.a,{shouldFocus:1===z,value:j,onEnterPressed:function(){B(2)},label:p.a.setupForm.user,onChange:function(t){x(t)}}),Object(g.c)(l.a,{shouldFocus:2===z,value:C,label:p.a.setupForm.password,type:"password",onEnterPressed:function(){L()},onChange:function(t){_(t)}}),Object(g.c)("button",{value:"submit",className:"submit-button",onClick:function(t){L()}},p.a.setupForm.submit),S&&Object(g.c)("div",{className:S[0]},S[1])))))}}}},26:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(30),c=e.n(o),i=e(19),a={img:c()().find(".").then("jpg").or("jpeg").or("png").or("gif").or("webm").or("svg").or("webp"),imgMdConfig:c()().anythingBut("[]|").maybe("|").beginCapture().anythingBut("[]|").endCapture().maybe("|").beginCapture().anythingBut("[]|").endCapture(),customTag:/\[\[[a-zA-Z0-9-\ _\/]*\]\]/},r={strings:{charWithAccents:"[a-zA-Z\xc0-\u024f\u1e00-\u1eff]{1}",tableLine:"([a-z\xc0-\xfaA-Z0-9@:%,-*._+~#= ]+|)"},metas:c()().find(i.a.metas.headerStart).beginCapture().anythingBut("").endCapture().then(i.a.metas.headerEnd),titleHtml:/<(title)[^>]*>([^<]*)<\/\1>/gi,metasHtml:/<meta[^>]*(name|property)="([^"]*)"[^>]*content="([^"]*)"[^>]*>/gi,externalLink3:/https?:\/\/((www\.)?[a-z\xc0-\xfaA-Z0-9@:%._\+~#=]{1,256})\b(\/[-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*\/)?([-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*)\/(\n| |$)/gim,externalLink3Int:/https?:\/\/((www\.)?[a-z\xc0-\xfaA-Z0-9@:%._\+~#=]{1,256})\b(\/[-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*\/)?([-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*)\//gim,mdTableLine:/\|?(([^\|]+\|)+([^\|]+))\|?/gim,mdTableCell:/((([^|\n])+\|)|(([^|\n])+))/gim,matchingHtmlTags:/<([^>]*)>([^<]*)<\/\1>/,baliseHtml:c()().find("<").anythingBut("<>").then(">"),ressource:c()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").endCapture().then(")"),ref:c()().find("[").anythingBut("[]").then("](").anythingBut("()").then(")"),extimage:c()().find("![").anythingBut("[]").then("](").beginCapture().then("http").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),image:c()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),fullImageMd:c()().beginCapture().find("![").anythingBut("[]").then("](").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageMdSrc:c()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture:c()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture2:/\!\[([^\[\]]+)\]\(([^\(\)]+\.(jpg|jpeg|png|gif|webm|svg|webp))\)/gi,imageAndConfig:c()().find("![").then(a.imgMdConfig).then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),searchlink:c()().find("[search|").beginCapture().anythingBut("[]").endCapture().then("]"),linklink:c()().find("[link|").beginCapture().anythingBut("[]").endCapture().then(" ").beginCapture().then("/").anythingBut("[]").endCapture().then("]"),latexTag:c()().find("[[latex]]").beginCapture().anythingBut("").endCapture().then("[[latex]]"),scriptTag:c()().find("[[script]]").beginCapture().anythingBut("").endCapture().then("[[script]]"),userCustomTagFull:c()().find(a.customTag).beginCapture().anythingBut("").endCapture().then(a.customTag),userCustomTagFull2:c()().beginCapture().beginCapture().find(a.customTag).endCapture().anythingBut("").beginCapture().then(a.customTag).endCapture().endCapture(),userCustomTagFull3:c()().beginCapture().find(a.customTag).endCapture(),userCustomTag3:c()().beginCapture().then(a.customTag).endCapture(),userCustomTagManual:a.customTag,externalLink:c()().find("http").maybe("s").then("://").beginCapture().anythingBut("/ ").endCapture().beginCapture().anythingBut(" ").then("/").beginCapture().anythingBut("? ").endCapture().anythingBut(" \n").then("\\n").endCapture(),url2transform:c()().find("!").beginCapture().find("http").maybe("s").then("://").beginCapture().anything().endCapture().endCapture(),searchFolder:c()().find(" /").anything().endOfLine(),searchFolderNoSpace:c()().find("/").anything().endOfLine(),firstPartImg:c()().find("![").anythingBut("[]").then("]("),hashtag3:c()().find(/[-| |\n]{1}\#([A-z\xc0-\xfa1-9_\-]+)/gi),titleMd:c()().startOfLine().find("#").oneOrMore().then(" ").beginCapture().anythingBut("").endCapture(),scriptHtml:c()().find("<script>").beginCapture().anythingBut("").endCapture().then("<\/script>")}},28:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(5),c=e(6),i=e(20),a=e(21),r=e(0),l=e.n(r),s=e(275),u=e(276),p=e(1),d=function(t){Object(i.a)(e,t);var n=Object(a.a)(e);function e(){var t;Object(o.a)(this,e);for(var c=arguments.length,i=new Array(c),a=0;a<c;a++)i[a]=arguments[a];return(t=n.call.apply(n,[this].concat(i))).size=t.props.size?t.props.size:1,t.isLocal=!t.props.name.startsWith("fa"),t}return Object(c.a)(e,[{key:"render",value:function(){return Object(p.c)("span",{style:{transform:"scale(".concat(this.size,")"),display:"inline-block"}},!this.isLocal&&Object(p.c)(s.a,{icon:u[this.props.name],color:this.props.color||"black",size:"1x"}),this.isLocal&&Object(p.c)("span",{style:{transform:"scale(".concat(this.size,")"),display:"inline-block",width:"20px",height:"20px",background:"url('".concat(this.props.name,"')"),backgroundSize:"contain",backgroundRepeat:"no-repeat"}}))}}]),e}(l.a.Component),f=l.a.memo(d,(function(t,n){return JSON.stringify(t)===JSON.stringify(n)}))},283:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return useRessourceApi}));var _home_ubuntu_Desktop_Dev_tiro_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(12),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__),_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(43),_shared_shared_config__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(19),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(16),_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(23),_api_hook__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(13),_managers_url_manager__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(101),_shared_helpers_filename_helper__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(38),h="[RESSOURCE API] ",useRessourceApi=function useRessourceApi(p){var _p=Object(_home_ubuntu_Desktop_Dev_tiro_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)({},p),eventBus=_p.eventBus;Object(react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((function(){_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__.b.on("getRessourceApiAnswer",(function(t){eventBus.notify(t.idReq,t)}))}),[]);var deleteRessource=function(t,cb){var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_6__.c)("delete-ressource");console.log("".concat(h," delete ressource ").concat(t)),p.eventBus.subscribe(n,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__.b.emit("askRessourceDelete",{path:t,idReq:n,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_5__.b)()})},downloadRessource=function(t,n,cb){var e=Object(_api_hook__WEBPACK_IMPORTED_MODULE_6__.c)("download-ressource");p.eventBus.subscribe(e,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__.b.emit("askRessourceDownload",{url:t,folder:n,idReq:e,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_5__.b)()})},fetchRessource=function(t,cb,n){n||(n={}),n.disableCache||(n.disableCache=!1);var e="/.tiro/cache/fetch/",o="/".concat(_shared_shared_config__WEBPACK_IMPORTED_MODULE_3__.a.path.staticResources,"/").concat(e).concat(Object(_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_2__.b)(t),"?token=").concat(Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_5__.b)());o=Object(_shared_helpers_filename_helper__WEBPACK_IMPORTED_MODULE_8__.b)("".concat(Object(_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__.c)()).concat(o)),console.log("".concat(h," FETCHING ressource url ").concat(t," "),{url:t,options:n,staticPath:o});var c=function(){fetch(o).then((function(t){return t.text()})).then((function(t){cb(t)}))},i=function(){downloadRessource(t,e,(function(t){t.message&&c()}))};!0===n.disableCache?i():Object(_managers_url_manager__WEBPACK_IMPORTED_MODULE_7__.a)({url:o,onSuccess:function(){console.log("".concat(h," FETCHING => getting CACHED file"),{url:t,options:n}),c()},onFail:function(){i()}})},fetchUrlArticle=function fetchUrlArticle(url,cb,options){var readabilityUrl="https://cdn.jsdelivr.net/npm/moz-readability@0.2.1/Readability.js";fetchRessource(readabilityUrl,(function(readabilityTxt){var r1=eval(readabilityTxt);fetchRessource(url,(function(t){var n=document.implementation.createHTMLDocument("");n.open(),n.write(t),n.close();var e=new r1(n).parse(),o=(null===e||void 0===e?void 0:e.textContent.replaceAll(" ","\n"))||"";o=(o=(o=(o=o.replaceAll(" ","\n")).replaceAll(" ","\n")).replaceAll(" ","\n")).replaceAll(" ","\n");var c=(null===e||void 0===e?void 0:e.content)||"",i=(null===e||void 0===e?void 0:e.title)||"";cb({title:i,text:o,html:c,raw:t})}))}))},ressourceApi={delete:deleteRessource,download:downloadRessource,fetch:fetchRessource,fetchUrlArticle:fetchUrlArticle};return ressourceApi}},319:function(t,n){},32:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(8),c=e.n(o),i=e(0);function a(cb,t){var n=Object(i.useRef)(cb);return Object(i.useEffect)((function(){n.current=cb})),Object(i.useCallback)(c.a.throttle((function(){return n.current.apply(n,arguments)}),t,{leading:!0,trailing:!1}),[t])}function r(cb,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e={leading:!1,trailing:!0};n&&(e.leading=n);var o=Object(i.useRef)(cb),a=function(){var t=Object(i.useRef)(!0);return Object(i.useEffect)((function(){return function(){t.current=!1}}),[]),function(){return t.current}}();return Object(i.useEffect)((function(){o.current={cb:cb,delay:t}})),Object(i.useCallback)(c.a.debounce((function(){var n;o.current.delay===t&&a()&&(n=o.current).cb.apply(n,arguments)}),t,e),[t,c.a.debounce])}},33:function(t,n,e){"use strict";e.d(n,"d",(function(){return c})),e.d(n,"c",(function(){return i})),e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));e(330);var o=e(13),c=function(t){return'<i class="ssr-icon fa-solid fa-'.concat(t,'"></i>')};window.ssrActionsDic={};var i=function(t,n){var e="window.ssrActionsDic['".concat(t,"'](this)"),o=window.ssrActionsDic;return o[t]||(o[t]=function(t){n(t)}),e},a=function(t,n,e){var c="ressource-preview-status-".concat(t.path),i="".concat(t.path,"-").concat(n);Object(o.d)((function(t){t.cache.get(c,(function(n){n||(n={}),n[i]=e,t.cache.set(c,n,-1)}))}))},r=function(t,n,e){!function(t,n,cb){var e="ressource-preview-status-".concat(t.path),c="".concat(t.path,"-").concat(n);Object(o.d)((function(t){t.cache.get(e,(function(t){if(t){var n=t[c]?t[c]:"closed";cb(n)}}))}))}(t,n,(function(t){"open"===t&&setTimeout((function(){e()}),500)}))}},337:function(t,n){},339:function(t,n){},35:function(t,n,e){"use strict";e.d(n,"g",(function(){return b})),e.d(n,"f",(function(){return g})),e.d(n,"e",(function(){return h})),e.d(n,"a",(function(){return m})),e.d(n,"d",(function(){return v})),e.d(n,"c",(function(){return w})),e.d(n,"b",(function(){return O})),e.d(n,"h",(function(){return j}));e(0);var o=e(19),c=e(26),i=e(47),a=e(16),r=e(73),l=e(80),s=e(107),u=e(88),p=(e(8),e(105)),d=e(111),f=e(1),b=function(t){return Object(r.d)(t,c.a.externalLink3,(function(t){return Object(p.a)(t)}))},g=function(t,n){var e=Object(u.a)("$1","$2",t);return n.replace(c.a.linklink,e)},h=function(t){var n=t.replace(c.a.searchlink,'<a class="search-link preview-link" href="javascript:window.tiroCli.triggerSearch.func(\'$1$2\');">$1</a>');return n=Object(i.a)(n,[[">[__id_",">["],[">[__tags_",">["],[">[__tag_",">["],[" ]</a>","]</a>"]])},m=function(t){var n=t.replace("".concat(Object(a.c)(),"/").concat(o.a.path.staticResources,"/"),""),e="".concat(Object(a.c)(),"/").concat(o.a.path.staticResources,"/").concat(n);return t.startsWith("http")?t:e},v=function(t,n){var e=0,o=Object(r.d)(n,c.a.ressource,(function(n){e++;"".concat(n,"-").concat(e);var o="".concat(function(t,n){return Object(s.renderToString)(Object(f.c)(l.a,{markdownTag:t,file:n}))}(n,t)," ");return o}));return o},w=function(t,n){return Object(r.d)(n,c.a.image,(function(n){var e=n.split("](")[1].slice(0,-1);return Object(d.a)(n,e,t)}))},O=function(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},j=function(t){return t.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'")}},350:function(t,n){},352:function(t,n){},36:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(12),c=e(19),i=Object(o.a)(Object(o.a)({},c.a.client),{},{global:{protocol:"".concat(window.location.protocol,"//"),url:"".concat(window.location.hostname),port:"80"===window.location.port?"":":".concat(window.location.port)}})},377:function(t,n){},379:function(t,n){},38:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"d",(function(){return c})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return a}));var o=function(t){return t=(t=(t=(t=(t=t.split("://").join("__HTTP__SEP")).split("//").join("/")).split("\\").join("/")).split("//").join("/")).split("__HTTP__SEP").join("://")},c=function(t){var n=function(t){var n=t.split("/"),e=t.split("\\"),o=n.length>e.length?n:e,c=o[o.length-1],i=c.split("."),a=t.replace(c,""),r="";i.length>1&&(r=i[i.length-1]);var l=c.replace(".".concat(r),"");return{filename:c,extension:r,path:t,folder:a,filenameWithoutExt:l}}(t),e=n.extension?"file":"folder";return{path:t,realname:n.filename,nature:e,name:n.filename,extension:n.extension,folder:n.folder}},i=function(t){var n=t.match(/(.*)[\/\\]/),e=n?n[1]+"/":"";return o(e)},a=function(t,n){return o(t+"/")===o(n+"/")}},380:function(t,n){},385:function(t,n){},387:function(t,n){},393:function(t,n){},395:function(t,n){},414:function(t,n){},42:function(t,n,e){"use strict";e.d(n,"a",(function(){return p})),e.d(n,"b",(function(){return f}));var o=e(12),c=e(0),i=e.n(c),a=e(110),r=e(10),l=e(28),s=e(1),u=function(t){var n=Object(o.a)({},t),e=n.design,i=n.colors,l=n.size;e||(e="horizontal");var u=!("popup"in t)||t.popup,p=Object(a.a)("button.toolbar-button{position:relative;&.active{svg{color:",i?i[1]:r.a.colors.main,";}}svg{transform:scale(",l||1.3,");color:",i?i[0]:r.a.colors.editor.interfaceGrey,";&:hover{color:",i?i[1]:r.a.colors.main,";}}}","");return Object(c.useMemo)((function(){return Object(s.c)("div",{className:p},Object(s.c)("ul",{className:"buttons-toolbar-component ".concat(t.class," ").concat(e," ").concat(u?"with-popup":"no-popup")},t.buttons.map((function(t,n){var e;return t.action&&Object(s.c)("li",{className:"".concat(t.class," btn-").concat(null===(e=t.title)||void 0===e?void 0:e.toLowerCase()),title:t.title,key:n},Object(s.c)(d,t))}))))}),[t.buttons])},p=i.a.memo(u,(function(t,n){return!1})),d=function(t){var n=Object(s.c)(i.a.Fragment,null);t.title&&(n=Object(s.c)(i.a.Fragment,null,t.title)),t.icon&&(n=Object(s.c)(l.a,{name:t.icon})),t.customHtml&&(n=t.customHtml);var e="toolbar-button ".concat(t.class&&t.class," ").concat(t.active&&"active");return Object(s.c)("button",{className:e,onMouseEnter:function(n){t.onHover&&t.onHover()},onClick:function(n){t.action&&t.action(n)}},Object(s.c)("div",{className:"inside-html-wrapper"},n),Object(s.c)("div",{className:"button-hover-popup "},t.title))},f=function(){return"\n ul.buttons-toolbar-component {\n list-style: none;\n padding: 0px;\n margin: 0px;\n button.toolbar-button {\n ".concat(r.a.els().button,";\n cursor: pointer;\n }\n\t\t\t\t&.vertical {\n\t\t\t\t\t\t.toolbar-button {\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(r.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.button-hover-popup {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(r.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\t\t\t\twidth: 15px;\n\t\t\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.button-hover-popup {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 15px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t\t\t\t\tfont-size: 11px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&.horizontal.with-popup {\n\t\t\t\t\t\t\t\tli button:hover .button-hover-popup {\n\t\t\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&.horizontal {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tli {\n\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t.button-hover-popup {\n\t\t\t\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t\t\t\t\topacity: 0.2;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tbottom: 22px;\n\t\t\t\t\t\t\t\t\t\tbackground: ").concat(r.a.colors.editor.interfaceGrey,";\n\t\t\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\t\t\tleft: 50%;\n\t\t\t\t\t\t\t\t\t\twidth: max-content;\n\t\t\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\t\t\ttransform: translateX(-50%);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n }\n}\n")}},426:function(t,n){},429:function(t,n){},43:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return c}));var o=function(){var t=(new Date).getTime(),n="undefined"!==typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var o=16*Math.random();return t>0?(o=(t+o)%16|0,t=Math.floor(t/16)):(o=(n+o)%16|0,n=Math.floor(n/16)),("x"===e?o:3&o|8).toString(16)}))},c=function(t){var n=t.split("?")[1]||"",e=t.split("?")[0],o=e.replace(/[^\w\s]/gi,"_"),c=n.replace(/[^\w\s]/gi,"_"),i=e.split(".").pop()||"";return((i="."+i.replace(/[^\w\s]/gi,"_")).length>6||i.length<=1)&&(i=""),"".concat(o,"_").concat(c).concat(i)}},47:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return c}));var o=function(t){return(t=c(t,[["-","_"],["_","_"],[" ","_"],["/","_"]])).replace(/[^\w\s]/gi,"")},c=function(t,n){for(var e=0;e<n.length;e++){var o=n[e];t=t.split(o[0]).join(o[1])}return t}},471:function(t,n,e){"use strict";e.r(n);var o=e(0),c=e.n(o),i=e(9),a=e(1),r=e(14),l=e(16),s=e(12),u=e(110),p=e(10),d=e(108),f=e(62),b=e(42),g=e(8),h=e(56),m={};window.tiroCli=m;var v=function(t,n){var e,r,l=Object(h.a)("showRenderId",!1),s=Object(i.a)(l,2),u=s[0],p=s[1];e="toggleRenderId",(r={description:"toggle display of renderId for each block",func:function(){console.log("[toggleRenderId]"),p(!u),setTimeout((function(){window.location.reload()}),1e3)}}).f=r.func,m[e]=r;var d=Object(g.random)(0,1e3);return Object(o.useMemo)((function(){var n=(new Date).getTime(),e=(new Error).stack,o=(null===e||void 0===e||e.split("\n")[6].replace("at ","").replace(/\(.*\)/gi,"").trim(),Object(a.c)(c.a.Fragment,null,u&&Object(a.c)("p",{style:{position:"absolute",fontSize:"10px",color:"rgba(255,0,0,0.8)"}},d),t));(new Date).getTime();return o}),n)},w=e(19),O=e(36),j=e(13),x=function(t,n){var e=Object(o.useRef)();Object(o.useEffect)((function(){e.current=t}),[t]),Object(o.useEffect)((function(){if(null!==n){var t=setInterval((function(){e.current()}),n);return function(){return clearInterval(t)}}}),[n])},k=function(){return"Tiro (".concat(O.a.version,")")},y=e(28),C=e(18),_=function(t){return Object(a.c)("button",{className:"new-file-button",onClick:function(n){t.onNewFile()}},Object(a.c)(y.a,{name:"faPlusCircle",color:"white"}),Object(a.c)("span",null,C.a.newNote))},E=c.a.memo(_,(function(t,n){return!0})),T=e(5),S=e(6),I=e(20),N=e(21),F=e(52),R=e(35),A=e(287),D=e(284),L=e(23),P={ctrl:!1,shift:!1,alt:!1,opt:!1},M={38:"up",40:"down",17:"ctrl",16:"shift",18:"alt",93:"opt",13:"enter"},z=function(t){return t=t||window.event,M[t.keyCode]?M[t.keyCode]:t.key},B={},H=e(71),U=function(t){Object(I.a)(e,t);var n=Object(N.a)(e);function e(t){var o;return Object(T.a)(this,e),(o=n.call(this,t)).oldFiles=[],o.liRefs=[],o.scrollerWrapperRef=c.a.createRef(),o.scrollerListRef=c.a.createRef(),o.canAutoScroll=!1,o.getVisibleItemsDebounced=Object(g.debounce)((function(){var t=o.scrollerWrapperRef.current;if(t){for(var n=t.getBoundingClientRect().height,e=-1,c=[],i=0;i<o.liRefs.length;i++){var a=o.liRefs[i].current;if(a){var r,l=a.getBoundingClientRect().top;if(l>-50&&l<n+100)-1===e&&(e=i),o.props.files[i]&&c.push(null===(r=o.props.files[i])||void 0===r?void 0:r.path)}}o.props.onVisibleItemsChange(c)}}),500),o.onListScroll=function(){o.canAutoScroll=!1,o.getVisibleItemsDebounced()},o.isMultiSelected=function(t){var n=!1;return o.state.selectionEdges[0]<=t&&o.state.selectionEdges[1]>=t&&(n=!0),n},o.itemToScroll=0,o.autoScrollToItem=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];o.itemToScroll=n?t:o.itemToScroll+t,o.itemToScroll<0&&(o.itemToScroll=0),o.itemToScroll>o.props.files.length&&(o.itemToScroll=o.props.files.length),o.scrollerListRef.current.scrollToItem(o.itemToScroll)},o.getUrlLoginToken=function(){return"?token=".concat(Object(L.b)())},o.state={hoverMode:!1,selectionEdges:[-1,-1]},o}return Object(S.a)(e,[{key:"shouldComponentUpdate",value:function(t,n){if(JSON.stringify(t.files)!==JSON.stringify(this.oldFiles)){this.oldFiles=Object(g.cloneDeep)(t.files),this.liRefs=[];for(var e=0;e<t.files.length;e++)this.liRefs.push(c.a.createRef());this.getVisibleItemsDebounced(),this.setState({selectionEdges:[-1,-1]}),this.canAutoScroll=!0}return this.props.activeFileIndex>0&&this.canAutoScroll&&(this.canAutoScroll=!1,this.autoScrollToItem(this.props.activeFileIndex)),!0}},{key:"render",value:function(){var t=this,n=H.a[this.props.sortMode],e=p.a.sizes.l2.fileLi.height+2*p.a.sizes.l2.fileLi.padding+p.a.sizes.l2.fileLi.margin,o=window.innerHeight-(p.a.sizes.search.h+p.a.sizes.search.padding),i=Object(r.b)("desktop")?o:o-p.a.sizes.mobile.bottomBarHeight;return Object(a.c)(c.a.Fragment,null,Object(a.c)("div",{className:"list-wrapper-scroller",style:{height:i},onScroll:this.onListScroll,ref:this.scrollerWrapperRef},Object(a.c)(D.a,null,(function(o){o.height;var r=o.width;return Object(a.c)(A.a,{itemData:t.props.files,className:"List",ref:t.scrollerListRef,height:i,itemCount:t.props.files.length,itemSize:e,width:r||0,onScroll:t.onListScroll},(function(e){var o=e.index,i=e.style,l=t.props.files[o],s=t.props.filesPreview[l.path];return Object(a.c)("div",{style:i},Object(a.c)("li",{ref:t.liRefs[o],style:{width:r||0-2*G.l2.fileLi.padding-2*G.l2.fileLi.margin-35},className:["file-element-list","element-".concat(o),"".concat(t.isMultiSelected(o)?"active":""),"".concat(o===t.props.activeFileIndex?"active":""),"".concat(s&&s.picture?"with-image":"")].join(" "),key:o,draggable:!0,onDragStart:function(){var n=[],e=t.state.selectionEdges;n=-1!==e[0]||-1!==e[1]?t.props.files.slice(e[0],e[1]+1):[l],t.props.onFileDragStart(n)},onDragEnd:function(){t.props.onFileDragEnd()},onClick:function(n){if(P["shift"]){var e=[t.props.activeFileIndex,o];e.sort(),t.setState({selectionEdges:e})}else t.props.onFileClicked(o),t.setState({selectionEdges:[-1,-1]});t.props.onFileClicked(o)}},Object(a.c)("div",{className:"background-item"}),Object(a.c)("div",{className:"background-item-border"}),Object(a.c)("div",{className:"left"},Object(a.c)("h3",{className:"label ".concat(l.name.length<=35?"oneliner":"more"),onMouseEnter:function(n){t.props.hoverMode&&t.props.onFileClicked(o)}},l.name),Object(a.c)("div",{className:"content"},s&&s.content&&Object(a.c)(c.a.Fragment,null,s.content)),Object(a.c)("div",{className:"date ".concat(n)},Object(F.a)(new Date(("modified"===n?l.modified:l.created)||0)))),Object(a.c)("div",{className:"right"},s&&s.picture&&Object(a.c)("div",{className:"picture",style:{backgroundColor:"white",backgroundImage:"url('".concat(s.picture.startsWith("http")?s.picture+t.getUrlLoginToken():"".concat(Object(R.a)(t.props.files[0].folder),"/").concat(s.picture).concat(t.getUrlLoginToken()),"')")}}))))}))}))))}}]),e}(c.a.Component),W=c.a.memo(U,(function(t,n){return!1})),q=Object(s.a)({},p.a),V=(q.els,q.colors),G=(q.font,q.sizes),J=e(143),K=e(38),Y=function(t){return Object(a.c)("div",{className:"folder-tree-view-component"},Object(a.c)("h3",{className:"subtitle"},C.a.folders),Object(a.c)($,{openFolders:t.openFolders,folder:t.folder,current:t.current,onFolderClicked:t.onFolderClicked,onFolderMenuAction:t.onFolderMenuAction,onFolderOpen:function(n){Object(j.d)((function(e){e.ui.browser.folders.open.add(n),t.onFolderOpen(n)}))},onFolderClose:function(n){Object(j.d)((function(e){e.ui.browser.folders.open.remove([n]),t.onFolderClose(n)}))},onFolderDragStart:t.onFolderDragStart,onFolderDragEnd:t.onFolderDragEnd,onFolderDrop:t.onFolderDrop}))},$=function t(n){var e=n.openFolders.includes(n.folder.path)&&n.folder.hasFolderChildren,c=Object(o.useState)(!1),r=Object(i.a)(c,2),l=r[0],s=r[1],u=Object(o.useState)(""),d=Object(i.a)(u,2),f=d[0],b=d[1],g=Object(K.a)(n.current,n.folder.key);return Object(a.c)("li",{className:"folder-wrapper ".concat(g?"current":""," "),draggable:!0,onDrop:function(t){n.folder.key&&(n.onFolderDrop(n.folder),t.stopPropagation())},onDragStart:function(t){n.folder.key&&(n.onFolderDragStart(n.folder),t.stopPropagation())},onDragEnd:function(){n.folder.key&&n.onFolderDragEnd()},onMouseLeave:function(){l&&s(!1)}},Object(a.c)("div",{className:"folder-title ".concat(f),onDragEnter:function(t){b("drag")},onDrop:function(t){b("")},onDragLeave:function(t){b("")}},Object(a.c)("span",{className:"icon",onClick:function(t){e?n.onFolderClose(n.folder.key):n.onFolderOpen(n.folder.key)}},n.folder.hasFolderChildren&&Object(a.c)(y.a,{name:e?"faCaretDown":"faCaretRight",color:p.a.colors.main})),Object(a.c)("span",{className:"title",onClick:function(t){n.onFolderClicked(n.folder.key)}},Object(a.c)("div",{className:"title-drag-bg"}),Object(a.c)("div",{className:"title-label"}," ",n.folder.title)),Object(a.c)("span",{onClick:function(){s(!l)},className:"context-menu-wrapper"},Object(a.c)(y.a,{name:"faEllipsisH",color:p.a.colors.l1.font}),l&&Object(a.c)("div",{className:"context-menu context-menu-folders"},Object(a.c)("ul",null,Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);var t=prompt("".concat(C.a.renameFolderPrompt," "),n.folder.title);t&&""!==t&&t!==n.folder.title&&n.onFolderMenuAction("rename",n.folder,t),s(!1)}},C.a.renameFolder),Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);Object(j.e)().then((function(t){t.popup.prompt({text:"".concat(C.a.createFolderPrompt,' "').concat(n.folder.path,'"?'),userInput:!0,onAccept:function(t){t&&""!==t&&n.onFolderMenuAction("create",n.folder,t)},onRefuse:function(){}})})),s(!1)}},C.a.createFolder),-1===n.folder.path.indexOf(".tiro/.trash")&&Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);s(!1),n.onFolderMenuAction("moveToTrash",n.folder)}},C.a.moveToTrash),-1!==n.folder.path.indexOf(".tiro/.trash")&&Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);s(!1),Object(j.e)().then((function(t){t.popup.confirm("".concat(C.a.deleteFolderPrompt,' "').concat(n.folder.path,'"?'),(function(){n.onFolderMenuAction("delete",n.folder)}))}))}},C.a.deleteFolder))))),e&&Object(a.c)("ul",{className:"folder-children"},n.folder.children&&n.folder.children.map((function(e,o){return Object(a.c)(t,{openFolders:n.openFolders,key:o,folder:e,current:n.current,onFolderOpen:n.onFolderOpen,onFolderMenuAction:n.onFolderMenuAction,onFolderClose:n.onFolderClose,onFolderClicked:n.onFolderClicked,onFolderDragStart:n.onFolderDragStart,onFolderDragEnd:n.onFolderDragEnd,onFolderDrop:n.onFolderDrop})}))))},Z=function(t){var n=Object(s.a)({},t).files.slice(0,20);return Object(a.c)(c.a.Fragment,null,n.length>0&&Object(a.c)("div",{className:"last-notes-component"},Object(a.c)("h3",{className:"subtitle"},C.a.lastNotes),Object(a.c)("ul",null,n.map((function(n,e){var o=n.name.replace(".md","");return o=o.length>20?"".concat(o.substr(0,20)):o,Object(a.c)("li",{key:e,title:o,onClick:function(e){t.onClick(n)},className:"note"},Object(a.c)(y.a,{name:"faFile"}),o)})))))},X=c.a.memo(Z,(function(t,n){return t.files===n.files})),Q=e(53),tt=e(51),nt=function(t){var n=Object(o.useContext)(j.a),e=!!n&&n.status.searching.get;return Object(a.c)(c.a.Fragment,null,Object(a.c)("div",{className:"search-bar-component"},Object(a.c)("input",{type:"text",placeholder:C.a.searchPlaceholder,value:t.term,onKeyDown:function(e){if("Enter"===e.key){if(t.term.length<3)return;n&&n.ui.search.search(t.term)}},onChange:function(e){!function(e,o){if(n){var c=n.ui.browser.folders.current.get;""===t.term&&""!==c&&(e=e+" "+c,o&&setTimeout((function(){var t=(o.selectionStart||0)-c.length-1;o.selectionStart=t,o.selectionEnd=t}),10)),n.ui.search.term.set(e)}}(e.target.value,e.target)}}),Object(a.c)("div",{className:"search-status"},e&&C.a.searchingLabel)))},et=e(101),ot=function(t){var n={title:t.realname,folder:t.folder,mobileview:"editor"},e="".concat(O.a.global.protocol).concat(O.a.global.url).concat(O.a.global.port,"?").concat(Object(et.c)(n));window.open(e,"popupDetached","width=600,height=600")},ct=function(t){var n=Object(o.useState)(0),e=Object(i.a)(n,2),c=e[0],r=e[1];Object(o.useEffect)((function(){r(t.startingIndex)}),[t.startingIndex]);var l=function(n){var e=c;e=-1===n&&0===c?t.images.length-1:1===n&&c===t.images.length-1?0:c+n,r(e),d(10)},s=Object(o.useState)(10),u=Object(i.a)(s,2),p=u[0],d=u[1],f=function(t){var n=t+p;n<0&&(n=0),n>20&&(n=20),d(n)},g=Object(o.useRef)(null),h=function(){var t=50*(p-10)+99;p<10&&(t=10*-(10-p)+99);var n="".concat(t,"%"),e={height:n};g.current&&(g.current.naturalWidth>g.current.naturalHeight&&(e={width:n}));return m.current,e},m=Object(o.useRef)(null),v=function(){var t="0px";if(m.current){var n=m.current.clientHeight;t="".concat(n,"px")}return t}();return Object(a.c)("div",{className:"lightbox-component"},Object(a.c)("div",{className:"lightbox-bg",onClick:function(){t.onClose()}}),Object(a.c)("div",{className:"lightbox-content images-nb-".concat(t.images.length),ref:m},t.images.map((function(n,e){return Object(a.c)("div",{key:e,className:"lightbox-image",style:{display:e===c?"flex":"none"}},Object(a.c)("div",{className:"image-zoom-wrapper",style:{lineHeight:v}},Object(a.c)("img",{ref:g,style:h(),src:Object(R.a)(n.url)+Object(L.c)()})),Object(a.c)("div",{className:"image-infos"},Object(a.c)("div",{className:"image-name",onClick:function(t){return ot(n.file)}},n.file.name," - ",n.title),Object(a.c)(b.a,{popup:!1,buttons:[{class:"left",title:"left",icon:"faChevronLeft",action:function(){l(-1)}},{class:"zoom",title:"zoom",icon:"faPlus",action:function(){f(1)}},{class:"dezoom",title:"dezoom",icon:"faMinus",action:function(){f(-1)}},{class:"close",title:"close",icon:"faTimes",action:function(){t.onClose()}},{class:"right",title:"right",icon:"faChevronRight",action:function(){l(1)}}]})))}))))},it={onAccept:function(){},onRefuse:function(){}},at=function(t){var n=Object(o.useState)(!1),e=Object(i.a)(n,2),r=e[0],l=e[1],s=Object(o.useState)(""),u=Object(i.a)(s,2),p=u[0],d=u[1],f=Object(o.useState)(null),b=Object(i.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(C.a.promptPopup.defaultTitle),v=Object(i.a)(m,2),w=v[0],O=v[1],j=Object(o.useState)(!1),x=Object(i.a)(j,2),k=x[0],y=x[1],_=function(t){l(!0),d(t.text),t.title&&O(t.title),t.userInput&&h(""),t.onAccept&&(it.onAccept=t.onAccept),t.onRefuse?(it.onRefuse=t.onRefuse,y(!0)):y(!1)},E=function(){l(!1),h(null),O(""),d(""),y(!1)},T={confirm:function(t,cb,n){_({title:"",text:t,onAccept:cb,onRefuse:function(t){function n(){return t.apply(this,arguments)}return n.toString=function(){return t.toString()},n}((function(){n&&n()}))})},show:function(t,n,cb){_({title:n,text:t,onAccept:cb,onRefuse:function(){}})},prompt:_};return{popupApi:T,PromptPopupComponent:function(){return Object(a.c)(c.a.Fragment,null,r&&Object(a.c)("div",{className:"prompt-popup-component"},Object(a.c)(tt.a,{title:w,onClose:E,canBgClose:!1},Object(a.c)("div",null,Object(a.c)("div",{className:"content",dangerouslySetInnerHTML:{__html:p}}),Object(a.c)("br",null),null!==g&&Object(a.c)("div",null,Object(a.c)("input",{type:"text",value:g,onChange:function(t){h(t.target.value)}}),Object(a.c)("br",null)),Object(a.c)("button",{value:"submit",className:"accept submit-button",onClick:function(t){it.onAccept(g),E()}},C.a.promptPopup.accept),k&&Object(a.c)("button",{value:"submit",className:"refuse submit-button",onClick:function(t){it.onRefuse(g),E()}},C.a.promptPopup.refuse)))))}}},rt=e(149),lt=e(84),st=function(t){var n=Object(o.useContext)(j.a),e=Object(o.useState)(-1),c=Object(i.a)(e,2),r=c[0],l=c[1];return Object(a.c)("div",{className:"tab-list-scroll-wrapper"},Object(a.c)("div",{className:"tab-list-invisible-scroll"},Object(a.c)("div",{className:"tab-list-wrapper"},t.tabs.map((function(e,o){return Object(a.c)(pt,{key:o,tab:e,onDrop:function(t){l(t)},onDragEnter:function(t){l(t)},onDragEnd:function(t){n&&n.tabs.reorder(t,r),l(-1)},dragIndic:r,pos:o,onUpdate:t.onUpdate})})),(null===n||void 0===n?void 0:n.ui.browser.files.active.get)&&Object(a.c)("div",{className:"tab-wrapper tab-more",onClick:function(n){t.onUpdate("add")}},"+"))))},ut=function(t){var n=Object(s.a)({},t),e=n.tab,o=n.pos,i="Six",l=e.grid.layout.length;return 2===l&&(i="Two"),3===l&&(i="Three"),4===l&&(i="Four"),5===l&&(i="Five"),i="faDice".concat(i),Object(a.c)("div",{className:"tab-and-drag-wrapper"},t.dragIndic===o&&Object(a.c)("div",{className:"drag-indic"},"\u25bc"),Object(a.c)("div",{className:"tab-wrapper ".concat(e.active?"active":""),draggable:!0,onDragEnter:function(){t.onDragEnter(o)},onDrop:function(){t.onDrop(o)},onDragEnd:function(){t.onDragEnd(o)}},Object(a.c)("div",{className:"active-ribbon"}),Object(a.c)("div",{className:"tab-name",onClick:function(){t.onUpdate("activate",e)}},"mobile"!==Object(r.a)()&&Object(a.c)("input",{type:"text",className:"tab-input-text",value:e.name,style:{width:10*e.name.length+"px"},onChange:function(n){t.onUpdate("rename",e,n.target.value)}}),"mobile"===Object(r.a)()&&Object(a.c)(c.a.Fragment,null,e.name)),e.grid.layout.length>1&&Object(a.c)("div",{className:"tab-nb-windows",onClick:function(){t.onUpdate("activate",e)}},Object(a.c)(y.a,{name:i,color:"#b2b2b2"})),Object(a.c)("div",{className:"tab-close",onClick:function(){Object(j.d)((function(n){n.popup.confirm("".concat(C.a.deleteTabPrompt,' "').concat(e.name,'"?'),(function(){t.onUpdate("close",e)}))}))}},Object(a.c)(y.a,{name:"faPlus",color:"#b2b2b2"}))))},pt=c.a.memo(ut,(function(t,n){var e=!0,o=Object(g.cloneDeep)({n:t.tab,p:n.tab});return o.n.grid=o.p.grid={},o.n.refresh=o.p.refresh="",JSON.stringify(o.p)!==JSON.stringify(o.n)&&(e=!1),n.pos!==t.pos&&(e=!1),n.dragIndic!==t.dragIndic&&(e=!1),n.tab.active!==t.tab.active&&(e=!1),n.onUpdate!==t.onUpdate&&(e=!1),e})),dt=e(144),ft=e(125),bt=e(145),gt=e(109),ht=e(76),mt=e(153),vt=e(102),wt=e(17),Ot=e(285),jt=e(32),xt=function(t){var n=Object(o.useState)(""),e=Object(i.a)(n,2),c=e[0],r=e[1],l=Object(jt.a)((function(){Object(j.d)((function(n){n.file.getContent(t.file.path,(function(e){if(t.searchedString){var o=t.searchedString;e=e.replaceAll(o,"<span class='found-word'>".concat(t.searchedString,"</span>"))}e=n.note.render({raw:e,file:t.file,windowId:""}),setTimeout((function(){var t;null===(t=document.querySelector(".note-preview-wrapper .found-word"))||void 0===t||t.scrollIntoView()}),100);var c="<div class='file-content render-latex'>".concat(e," </div>");r(c)}))}))}),200);return Object(o.useEffect)((function(){l()}),[t.file,t.searchedString]),Object(a.c)("div",{className:"note-preview-wrapper"},Object(a.c)("div",{className:"simple-css-wrapper",dangerouslySetInnerHTML:{__html:c}}))},kt=e(113),yt="[Search Mode]",Ct="[Explorer Mode]",_t="[Plugin Mode]",Et={dict:{},config:{enabled:!0}},Tt=function(){Et.config.enabled=!1,Et.dict={}},St=function(t){var n=Object(o.useState)([]),e=Object(i.a)(n,2),c=e[0],l=e[1],u=Object(o.useRef)([]),d=function(t){Object(g.isArray)(t)&&(l(t),u.current=t)},f=Object(o.useState)([]),b=Object(i.a)(f,2),h=b[0],m=b[1],v=function(t){pt(t),m(t)},O=Object(o.useState)("No Options"),x=Object(i.a)(O,2),k=x[0],C=(x[1],{indicatorsContainer:function(t,n){return Object(s.a)(Object(s.a)({},t),{},{display:"none"})},menu:function(t,n){var e="mobile"===Object(r.a)()?"all":"none";return Object(s.a)(Object(s.a)({},t),{},{position:"relative",pointerEvents:e})},control:function(t,n){return Object(s.a)(Object(s.a)({},t),{},{outline:"none",boxShadow:"none",border:0})},multiValue:function(t,n){return n.data.editable?t:Object(s.a)(Object(s.a)({},t),{},{backgroundColor:p.a.colors.main})},multiValueRemove:function(t,n){return n.data.editable?t:Object(s.a)(Object(s.a)({},t),{},{display:"none"})}}),_=Object(o.useRef)(),E=h[0]||{label:"",value:""},T=function(n){var e=Object(K.d)(n);Object(j.d)((function(n){n.ui.browser.goTo(e.folder,e.name,{openIn:"activeWindow"}),t.onClose()}))},S=Object(o.useState)(""),I=Object(i.a)(S,2),N=I[0],F=I[1],R=Object(o.useRef)(null);Object(o.useEffect)((function(){R.current=N}),[N]);var A=Object(o.useRef)("");Object(o.useEffect)((function(){!function(){var t=u.current,n=N.trim();if(0===t.length)"/"===n&&(Object(kt.a)("suggest_explorer"),Object(j.d)((function(t){F("");var n=t.ui.browser.files.active.get.folder;U(n)}))),""===n&&G(),"?"===n&&(Object(kt.a)("suggest_search"),W()),":"===n&&J();else if(t[0].label===yt)if(t[1]){if(2===t.length)V(n,t[1].label);else if(3===t.length&&q.current===t[2].value)console.log("STEP 3-1 (optional) : filter found results",q.current);else if(3===t.length||4===t.length){console.log("STEP 3-2 : jump to page",{w:q.current,stags:t});var e=t.length-1,o=t[e].payload.file;T(o.path)}}else"?"===n&&Object(j.d)((function(t){var n=t.ui.browser.files.active.get.folder;F(n)})),z('Path to search (ex:"/path/to/folder") + ENTER'),v([{label:n,value:n}]);else if(t[0].label===Ct){var c=function(){var n=Object(wt.a)(t);n.shift();var e="";return Object(g.each)(n,(function(t){e+="/"+t.value})),e}();c.endsWith(".md")?(c=c.replace(t[0].label,""),T(c)):A.current!==c&&(A.current=c,U(c))}else t[0].label===_t&&Y(n,t)}(),$.current&&$.current()}),[c,N]);var D='"?" for search mode, "/" for explorer mode, ":" for plugin mode',L=Object(o.useState)(D),P=Object(i.a)(L,2),M=P[0],z=P[1],B=Object(o.useRef)(0),H=Object(o.useRef)(""),U=function(t){if(""!==t&&(t.endsWith("/")||(t+="/"),t!==H.current)){H.current=t,console.log("== EXPLORER",t),v([{label:"loading..."}]),tt(null),B.current++;var n=B.current;Object(j.d)((function(e){var o=[t];e.folders.get(o,(function(c){if(n===B.current&&(c.folderPaths.join("")===o.join("")&&c.folders[0])){var i=c.folders[0].children;e.files.get(t,(function(n,e){if(e===t){var o=t.split("/"),c=[];c.push({value:Ct,label:Ct}),c.push({value:"/",label:"/"}),Object(g.each)(o,(function(t){""!==t&&c.push({value:t,label:t+"/"})}));var r=[];Object(a.c)("div",{style:{backgroundImage:"url('".concat("http://localhost:3023/static//ctags//.resources/screenshot%2020230127%20at%20135701.jpg?token=KL3XFJdTJ7MWPtIu50OyUKlBhIszxRMdDwpd3EnSMJ1HGjLCAHaPDGjw9UcZ","')")},className:"barimage"});Object(g.each)(i,(function(t){var n=t.path.split("/"),e=n[n.length-1]+"/";r.push({value:e,label:e})})),Object(g.each)(n,(function(t){var n=t.path.split("/"),e=n[n.length-1],o={file:t},c=Object(a.c)("div",{className:"path-option-wrapper"},Object(a.c)("div",{className:"file"},t.name),Object(a.c)("div",{className:"folder"},t.folder));r.push({value:e,label:c,payload:o})})),d(c),v(r)}}))}}))}))}},W=function(){d([{value:yt,label:yt}])},q=Object(o.useRef)(null),V=Object(jt.a)((function(t,n){var e=n,o=t;if(o&&e&&o.length>2&&e.length>0){z('Searching "'.concat(o,'" in "').concat(e,'" ...')),v([{label:"loading..."}]);var c=o.includes("*"),i=[];v(i),q.current=o,Object(j.d)((function(t){t.search.word(o,e,(function(t){Object(g.each)(t,(function(t){Object(g.each)(t.results,(function(n){var e=c?"(".concat(o,")"):"",r="".concat(t.file.path," ").concat(e),l=n.indexOf(o),s=100,u=n,p=l>50?l-50:0,d=l+50<u.length?l+50:u.length;u.length>s&&(u=u.substring(p,d)),n=u;var f=u.replaceAll(o,"<b>".concat(o,"</b>")),b=Object(a.c)("div",{className:"path-option-wrapper"},Object(a.c)("div",{className:"search-location"},r),Object(a.c)("div",{className:"occur-wrapper",dangerouslySetInnerHTML:{__html:f}}));i.push({label:b,value:q.current+t.file+n+r,payload:{file:t.file,line:n}})}))})),0===i.length&&tt(null),i.unshift({label:"\ud83d\udd0e Filter the ".concat(i.length,' results for "').concat(q.current,'"'),value:q.current}),z("".concat(i.length-1,' results found for "').concat(o,'" in "').concat(e,'" ')),v(i)}))}))}else z("Type the word searched"),v([]),tt(null),q.current=""}),500),G=function(){z(D);var n=function(t){var n=[];return Object(g.each)(t,(function(t){var e=Object(a.c)("div",{className:"path-option-wrapper"},Object(a.c)("div",{className:"file"},t.name),Object(a.c)("div",{className:"folder"},t.folder)),o={value:t.path,label:e,payload:{file:t}};n.push(o)})),n}(t.lastNotes),e=n.shift(),o=n.shift();n.unshift(e),n.unshift(o),v(n)},J=function(){d([{value:_t,label:_t}])},Y=function(n,e){if(tt(null),1===e.length){var o="/".concat(w.a.path.configFolder,"/bar_plugins/");Object(j.d)((function(t){var e=[];t.files.get(o,(function(t){Object(g.each)(t,(function(t){e.push({label:t.name.replace(".md",""),value:t})})),e=Object(g.orderBy)(e,["label"]),v(e),":"===n&&F(""),z("".concat(t.length,' plugins found in "').concat(o,'"'))}))}))}else if(2===e.length){var c=e[1].value;Object(j.d)((function(e){var o=function(o){var c=Et.dict[o],i={input:n,setInputTxt:F,inputTxt:N,inputTxtRef:R,options:h,setOptions:v,onChange:$,onClose:t.onClose,onHide:t.onHide,selectedOptionRef:u,setSelectedOption:d,lodash:g,setNotePreview:tt,notePreview:Q,setHtmlPreview:ct,htmlPreview:ot,loadBarPlugin:function(t,n,o){var c=!Et.config.enabled;e.ressource.fetch(t,(function(t){try{new Function("barApi","tiroApi",t)(n,o)}catch(c){var e="[ERROR LOADING PLUGIN BAR]: ".concat(JSON.stringify(c),'"');console.log(e)}}),{disableCache:c})},disableCache:Tt};try{new Function("barApi","tiroApi",c)(i,e)}catch(r){var a="[ERROR PLUGIN BAR]: ".concat(JSON.stringify(r),'"');console.log(a)}};Object(kt.a)("suggest_plugin_".concat(c.name)),Et.dict[c.name]?o(c.name):e.file.getContent(c.path,(function(t){Et.dict[c.name]=t,o(c.name)}))}))}},$=Object(o.useRef)(null),Z=Object(o.useState)(null),X=Object(i.a)(Z,2),Q=X[0],tt=X[1],nt=Object(o.useState)(null),et=Object(i.a)(nt,2),ot=et[0],ct=et[1],it=Object(o.useState)(void 0),at=Object(i.a)(it,2),rt=at[0],lt=at[1],st=Object(o.useRef)([]),ut=function(t){Object(g.each)(st.current,(function(t){t.disconnect()})),st.current=[];var n=document.querySelectorAll("div[id*='-option']");Object(g.each)(n,(function(t,n){var e=new MutationObserver((function(n){var e=parseInt(t.id.split("-").pop());if("rgba(0, 0, 0, 0)"!==getComputedStyle(t)["background-color"]&&h[e]&&h[e].payload){var o=h[e].payload;!function(t,n){var e=u.current;e[0]&&e[0].label===Ct?tt(t):e[0]&&e[0].label===yt?(tt(t),lt(n),console.log("SEARCH JUMP TO",n,t.path)):e[0]?tt(null):tt(t)}(o.file,o.line||void 0)}}));e.observe(t,{childList:!0,attributes:!0,subtree:!1}),st.current.push(e)}))},pt=Object(jt.a)((function(t){ut()}),100);Object(o.useEffect)((function(){pt(h)}),[h,N]);var dt=Object(o.useState)(300),ft=Object(i.a)(dt,2),bt=ft[0],gt=ft[1],ht=Object(o.useRef)(null);return Object(jt.a)((function(){if(ht&&ht.current){var t=ht.current.clientHeight+30,n=window.innerHeight-t-50;bt!==n&&gt(n)}}),10)(),Object(a.c)("div",{className:"suggest-popup-bg ".concat(t.show?"":"hide"),onClick:function(n){t.onClose()}},Object(a.c)("div",{className:"suggest-popup-wrapper"},Object(a.c)("div",{className:"flex-wrapper",onClick:function(t){t.stopPropagation()}},Object(a.c)("div",{ref:ht},Object(a.c)("div",{className:"help"},M),Object(a.c)("div",{className:"help-right",onClick:function(n){t.onHide()}},Object(a.c)(y.a,{name:"faEyeSlash",color:"#b2b2b2"})),Object(a.c)(Ot.a,{isMulti:!0,ref:_,menuIsOpen:!0,defaultValue:E,value:c,autoFocus:!0,onChange:function(t,n){var e=t[0];if(e&&e.payload&&e.payload.file){var o=e.payload.file;T(o.path),t=[]}d(t)},openMenuOnClick:!1,inputValue:N,onInputChange:function(t,n){"input-blur"===n.action||"menu-close"===n.action||F(t)},onFocus:function(t){},options:h,styles:C,noOptionsMessage:function(){return tt(null),k}})),Object(a.c)("div",{className:"preview-wrapper ".concat(Q?"note-preview":"html-preview-wrapper"),style:{height:bt}},Q&&"mobile"!==Object(r.a)()&&Object(a.c)(xt,{file:Q,searchedString:rt,height:bt}),ot&&Object(a.c)("div",{className:"html-preview",dangerouslySetInnerHTML:{__html:ot},style:{height:bt}})))))},It=function(t){var n=Object(o.useState)(""),e=Object(i.a)(n,2),r=e[0],l=e[1];return Object(o.useEffect)((function(){Object(j.d)((function(n){n.file.getContent(t.filePath,(function(e){var o=Object(K.d)(t.filePath),c=n.note.render({raw:e,file:o});l(c)}))}))}),[t.filePath]),Object(a.c)(c.a.Fragment,null,Object(a.c)("div",{className:"rendered-note-component"},Object(a.c)("span",{className:"rendered-note-content-wrapper",dangerouslySetInnerHTML:{__html:r}})))},Nt=function(t){return Object(a.c)(c.a.Fragment,null,Object(a.c)("div",{className:"shortcut-component"},Object(a.c)("h3",{className:"subtitle"},"shortcuts"),Object(a.c)(It,{filePath:t.filePath})))},Ft=e(105),Rt=e(155),At=e(152),Dt=(Object(r.a)(),Object(s.a)({},p.a)),Lt=Dt.els,Pt=Dt.colors,Mt=(Dt.font,Dt.sizes),zt=function(t,n){var e="//css\n\t\t.content-image {\n\t\t\t\twidth: 90%;\n\t\t}\n\t\t.full {\n\t\t\t\t.content-image {\n\t\t\t\t}\n\t\t}\n\n\t\t".concat("\n .main-wrapper.view-image {\n .mobile-view-toggler {\n display: none;\n }\n \n .left-wrapper {\n width: ".concat("desktop"===Object(r.a)()?15:40,"vw ;\n .left-wrapper-1 {\n width: 100%\n }\n .left-wrapper-2 {\n display: none;\n }\n }\n\n\n .right-wrapper.dual-viewer-view {\n display: none;\n }\n .right-wrapper {\n height: 100vh;\n }\n .right-wrapper.image-gallery-view {\n width: ").concat(100-("desktop"===Object(r.a)()?15:40),"vw;\n }\n }\n \n .main-wrapper.view-text {\n .right-wrapper.dual-viewer-view {\n \n }\n .right-wrapper.image-gallery-view {\n display: none;\n }\n }\n"),"\n\t\t").concat(Object(vt.a)(),"\n\t\t").concat("\n.lightbox-component {\n position: fixed;\n\t\tz-index: 1002;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n \n .lightbox-bg {\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n position: absolute;\n\t\t\t\tbackground: rgb(0 0 0 / 82%);\n }\n\n .lightbox-content {\n\t\t\t\t&.images-nb-1 {\n\t\t\t\t\t\t.left, .right {\n\t\t\t\t\t\t\t\tdisplay: none!important;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tborder-radius: 9px;\n\t\t\t\toverflow: hidden;\n position: absolute;\n width: 95vw;\n height: 95vh;\n background: black;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%); \n\t\t\t\t.zoom, .dezoom {\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\theight: 43px;\n\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\tsvg path {\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsvg {\n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tpadding: 3px;\n\t\t\t\t\t\tborder-radius: 22px;\n\t\t\t\t\t\twidth: 13px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px #00000040;\n\n\t\t\t\t}\n\n .lightbox-image {\n position: relative;\n justify-content: space-around;\n align-items: center;\n width: 100%;\n height: 100%;\n\n &:hover {\n .image-infos {\n display: block;\n }\n }\n .image-infos {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\theight: 55px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tbackground: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);\n\t\t\t\t\t\t\t\tul {\n\t\t\t\t\t\t\t\t\t\tmargin-top: 5px;\n\t\t\t\t\t\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t\t\t\t\t\t\theight: 95vh;\n\t\t\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tli {\n\t\t\t\t\t\t\t\t\t\t\t\t&.left,\n\t\t\t\t\t\t\t\t\t\t\t\t&.right {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 20%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjustify-content: space-evenly;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t&.left {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index:3;\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.right {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index:3;\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.close {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index:4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n // position: relative;\n &:hover {\n .image-name {\n display: block;\n }\n }\n .image-name {\n display: none;\n cursor: pointer;\n color: grey;\n padding: 5px;\n font-size: 10px;\n position: absolute;\n top: 5px;\n left: 5px;\n }\n }\n\t\t\t\t\t\t.image-zoom-wrapper {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t\toverflow: auto;\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\t\t\timg {\n\t\tvertical-align: middle;\n\t\t\t\t\t\t\t\t\t\t/* max-width: 95vw; */\n\t\t\t\t\t\t\t\t\t\tz-index:2;\n\t\t\t\t\t\t\t\t\t\t/* position: relative; */\n\t\t\t\t\t\t\t\t\t\t/* max-height: 95vh; */\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n }\n }\n\n}\n","\n\t\t").concat("\n .prompt-popup-component {\n\t\t\t\t.popup-wrapper {\n\t\t\t\t\t\tmin-width: 200px;\n\t\t\t\t\t\tmin-height: 100px;\n\t\t\t\t\t\ttext-align:center;\n\t\t\t\t}\n }\n","\n\t\t").concat("\n\t\t\t\t\t\t&.device-view-mobile {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.suggest-popup-bg.hide {\n\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.suggest-popup-bg {\n\t\t\t\t\t\t\t\tbackground: rgba(0,0,0,0.5);\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\twidth: 100vw;\n\t\t\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\t\t\tz-index: 1000;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.suggest-popup-wrapper {\n\t\t\t\t\t\t\t\twidth: 88%;\n\t\t\t\t\t\t\t\tmargin: 0 auto;\n\t\t\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tleft: 50%;\n\t\t\t\t\t\t\t\ttransform: translate(-50%);\n\t\t\t\t\t\t\t\ttop: 22px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.help-right {\n\t\t\t\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 3px;\n\t\t\t\t\t\t\t\ttop: 3px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.help {\n\t\t\t\t\t\t\t\tcolor:white;\n\t\t\t\t\t\t\t\tmargin-bottom: 10px;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.preview-wrapper {\n\t\t\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.barimage {\n\t\t\t\t\t\t\t\theight: 60px; \n\t\t\t\t\t\t\t\twidth: 100px;\n\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tdiv[class$='-menu']>div {\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tflex-wrap: wrap;\n\t\t\t\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdiv[class$='-option'] {\n\t\t\t\t\t\t\t\twidth: ".concat("mobile"===Object(r.a)()?"100":"20","%;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.path-option-wrapper {\n\n\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t\t.search-location {\n\t\t\t\t\t\t\t\t\t\tcolor: #b3b1b1;\n\t\t\t\t\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.folder {\n\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.file {\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.html-preview-wrapper {\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t.html-preview {\n\t\t\t\t\t\t\t\t\t\tiframe {\n\t\t\t\t\t\t\t\t\t\t\t\t// transform: scale(0.65);\n\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(0.8);\n\t\t\t\t\t\t\t\t\t\t\t\ttransform-origin:top left;\n\t\t\t\t\t\t\t\t\t\t\t\tborder:none;\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 125%;\n\t\t\t\t\t\t\t\t\t\t\t\theight: 125%;\n\t\t\t\t\t\t\t\t\t\t\t\t// width: 155%;\n\t\t\t\t\t\t\t\t\t\t\t\t// height: 155%;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t"),"\n\n\t\t").concat("\n .app-view-switcher-component {\n margin: 0px 10px 10px 10px;\n ul.buttons-toolbar-component {\n li {\n margin-left: 5px;\n margin-right: 5px;\n }\n }\n }\n","\n\t\t").concat(Object(b.b)(),"\n\n\n\t\t").concat("\n .image-gallery-component-wrapper {\n margin: 0px 17px;\n overflow-y: scroll;\n // height: calc(100vh - ".concat(p.a.sizes.search.padding+p.a.sizes.gallery.topH+("desktop"===Object(r.a)()?0:190),"px);\n height: calc(100vh - ").concat(p.a.sizes.search.padding+p.a.sizes.gallery.topH,"px);\n // height: 100%;\n width: 100%;\n\n .masonry-gallery {\n display: flex;\n list-style: none;\n flex-direction: row;\n flex-wrap: wrap;\n\n .masonry-col {\n width: ").concat("desktop"===Object(r.a)()?32:90,"%;\n margin-right: 1%;\n\n .masonry-col-item {\n position: relative;\n &:hover {\n .image-infos {\n display: block;\n }\n }\n .image-infos {\n display: none;\n ").concat(p.a.els().imageInfos,"\n }\n img {\n ").concat(p.a.els().images,"\n }\n margin-bottom: 10px;\n }\n }\n }\n }\n"),"\n\n\t\t").concat(Object(dt.b)(),"\n\n\t\t").concat("\n.search-bar-component {\n input {\n\t\t\t\tborder-radius: 5px;\n width: calc(100% - ".concat(2*p.a.sizes.block+20,"px);\n border: none;\n background: white;\n\t\t\t\tpadding: 18px 9px;\n\t\t\t\tmargin: 0px 15px 15px 15px;\n\t\t\t\tbox-shadow: 0px 0px 6px rgb(0 0 0 / 5%);\n\t\t\t\tfont-size: 11px;\n margin: 0px ").concat(p.a.sizes.block,"px ").concat(p.a.sizes.block,"px ").concat(p.a.sizes.block,"px; \n &::placeholder {\n color: #afadad;\n }\n }\n .search-status {\n text-align: center;\n font-size: 8px;\n\t\t\t\tposition: relative;\n\t\t\t\tbottom:9px;\n\t\t\t\tcolor: grey;\n }\n}\n"),"\n\n\t\t").concat("\n.mobile-view-toggler {\n position: fixed;\n bottom: 0px;\n left: 0px;\n z-index: 10;\n display:flex;\n width: 100%;\n list-style: none;\n margin: 0px;\n padding: 0px;\n background: ".concat(p.a.colors.main,";\n li {\n flex: 1 1 auto;\n button {\n ").concat(p.a.els().button,";\n padding: 8px;\n width: 100%;\n svg {\n color: white;\n transform: scale(1.1);\n background: rgba(255,255,255,0);\n padding: 10px 27px;\n border-radius: 6px;\n }\n &:hover {\n svg {\n color: white;\n }\n }\n &.active {\n svg {\n color: white;\n background: rgba(255,255,255,0.2);\n }\n }\n }\n }\n}\n"),"\n\n\t\t").concat("\n.connection-status {\n font-size: 9px;\n z-index: 11;\n a {\n margin-left: 10px;\n color: white;\n }\n .back-online, .disconnected {\n position: absolute;\n text-align:center;\n color:white;\n top: 0px;\n left: 0px;\n width: 100vw;\n padding: 1px;\n }\n .back-online{\n background: green;\n }\n .disconnected{\n background: ".concat(p.a.colors.main,";\n }\n .connected {\n display:none;\n position: absolute;\n bottom: 5px;\n right: 5px;\n color: ").concat(p.a.colors.green,";\n }\n}\n"),"\n\n\t\t").concat("\n .setup-popup-component {\n .submit-button {\n margin-top: 10px;\n ".concat(p.a.els().redButton,";\n padding: 10px 20px;\n }\n .error {\n color: ").concat(p.a.colors.main,";\n }\n .success {\n color: ").concat(p.a.colors.green,";\n }\n }\n"),"\n\n\t\t").concat(Object(Q.b)(),"\n\n\t\t").concat(Object(gt.b)(),"\n\n\t\t").concat(Object(ht.c)(),"\n\n\t\t").concat("\n.last-notes-component {\n padding: 0px ".concat(p.a.sizes.block,"px;\n \n h3 {\n\n }\n ul {\n height: ").concat(110,"px;\n overflow: hidden;\n &:hover {\n min-height: ").concat(110,"px;\n height: auto;\n }\n\n padding: 0px;\n margin: 0px;\n li {\n cursor: pointer;\n margin-bottom: 7px;\n overflow: hidden;\n height: ").concat(15,"px;\n list-style: none;\n font-size: 11px;\n font-weight: 400;\n svg {\n color: ").concat(p.a.colors.main,";\n margin-right: 10px;\n }\n }\n }\n}\n"),"\n\t\t").concat("\n.shortcut-component {\n\t\tmargin: 0px ".concat(p.a.sizes.block,"px;\n\t\tmargin-bottom: 10px;\n\t\toverflow: hidden;\n\t\t.rendered-note-component {\n\t\t\t\twidth: 800px;\n\t\t\t\t.preview-link {\n\t\t\t\t\t\tcolor: #585757!important;\n\t\t\t\t}\n\t\t\t\t.preview-link {\n\t\t\t\t\t\tfont-weight: 400!important;\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n}\n"),"\n\t\t").concat("\n.rendered-note-component {\n\t\th3 {\n\n\t\t}\n\t\t.rendered-note-content-wrapper {\n\t\t\t".concat(Object(f.c)(),"\n\t\t\t\t&>p {\n\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\tpadding:0px;\n\t\t\t\t}\n\n\t\t}\n\n}\n"),"\n\n\t\t").concat("\n\n.note-preview-wrapper {\n\t\tpadding: 15px ;\n\t\t".concat(Object(f.c)(),"\n\t\t.simple-css-wrapper {\n\n\t\t\t\t.resource-link-content-wrapper ul {\n\t\t\t\t\t\topacity:1!important;\n\t\t\t\t\t\tpointer-events:all!important;\n\t\t\t\t}\n\t\t\t\tiframe {\n\t\t\t\t\t\theight: 400px!important;\n\t\t\t\t}\n\t\t\t\t.resource-link-iframe-wrapper {\n\t\t\t\t\t\tmargin-bottom: 5px;\n\t\t\t\t}\n\t\t}\n\n\t\t.found-word {\n\t\t\t\tfont-weight: bold;\n\t\t\t\tbackground: #fff876;\n\t\t\t\tpadding: 2px;\n\t\t}\n\n\t\t// .note-preview-wrapper .content-preview h3.note-title {\n\t\t\t\t// \t\tmargin-bottom: 10px;\n\t\t\t\t// \t\tmargin-top: 0px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview p {\n\t\t\t\t// \t\tmargin: 0px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview ul,\n\t\t// .note-preview-wrapper .content-preview li {\n\t\t\t\t// \t\tmargin: 0px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview img {\n\t\t\t\t// \t\tmax-width: 300px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview .file-content {\n\t\t\t\t// \t\tpadding: 10px 30px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview {\n\t\t\t\t// \t\t/* max-height: 50vh; */\n\t\t\t\t// }\n\n}\n"),"\n\t\t").concat(Object(Rt.b)(),"\n\n\t\t").concat(Object(tt.b)(),"\n\t\t").concat(Object(Ft.b)(),"\n\t\t").concat(Object(At.b)(),"\n\n\t\t.main-wrapper {\n\t\t\t\t").concat("\n&.device-view-mobile {\n\t\t.folder-tree-view-component {\n\t\t\t\tli.folder-wrapper {\n\t\t\t\t\t\t.context-menu-wrapper {\n\t\t\t\t\t\t\t\tright: -10px;\n\t\t\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\t\t\tright: 5px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n\n.folder-tree-view-component {\n\t\tpadding: ".concat(p.a.sizes.block,"px;\n\t\tpadding-right: 0px;\n\t\tmargin: 0px 0px 100px 0px;\n\t\twidth: calc(100% - ").concat(p.a.sizes.block*(Object(r.b)("desktop")&&!Object(r.c)()?1:2),"px);\n\n\t\tul.folder-children {\n\t\t\t\tmargin: 0px 0px 0px 0px;\n\t\t\t\tpadding: 0px 0px 0px 10px;\n\t\t}\n\n\t\tli.folder-wrapper {\n\n\t\t\t\tposition: relative;\n\t\t\t\tlist-style: none;\n\t\t\t\tfont-size: 13px;\n\t\t\t\tfont-weight: 600;\n\t\t\t\tcursor: pointer;\n\n\t\t\t\t.context-menu-wrapper {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\ttop: -10px;\n\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\ttop: 15px;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 4px rgb(0 0 0 / 10%);\n\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t\t\tpadding: 0px 0px;\n\t\t\t\t\t\t\t\twidth: 100px;\n\t\t\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\tul {\n\t\t\t\t\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tli {\n\t\t\t\t\t\t\t\t\t\t\t\tpadding: 4px 11px;\n\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t.folder-title:hover > .context-menu-wrapper {\n\t\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t\tdisplay:block;\n\t\t\t\t}\n\t\t\t\t&.current > .folder-title {\n\t\t\t\t\t\tcolor: ").concat(p.a.colors.main,";\n\t\t\t\t\t\ttext-decoration: underline;\n\t\t\t\t}\n\t\t\t\t.folder-title {\n\t\t\t\t\t\tposition: relative;\n\n\t\t\t\t\t\t.title-label {\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\tz-index: 0;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.title-drag-bg {\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\twidth: calc(100% - 8px);\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\ttop: -4px;\n\t\t\t\t\t\t\t\tz-index: -1;\n\t\t\t\t\t\t\t\tleft: -5px;\n\t\t\t\t\t\t\t\ttransition: 50ms;\n\t\t\t\t\t\t\t\tbackground: rgba(255,255,255,0);\n\t\t\t\t\t\t\t\tz-index:0;\n\t\t\t\t\t\t\t\tpointer-events: none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t&.drag .title-drag-bg {\n\t\t\t\t\t\t\t\tbackground: rgba(255,255,255,0.6);\n\t\t\t\t\t\t\t\tpointer-events: all;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpadding: 1px;\n\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\t\t.icon {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tleft: 2px;\n\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\tpadding: 1px;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\t\t\n}\n"),"\n\t\t\t\tdisplay: flex;\n\t\t\t\t.no-file {\n\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\tmargin-top: 49vh;\n\t\t\t\t}\n\n\n\n\n\n\n\n\n\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t// LEFT 1\n\t\t\t\t////////////////////////////////////////////v\n\t\t\t\t\n\t\t\t\t").concat("\n .new-file-button {\n ".concat(p.a.els().redButton,"\n ").concat(p.a.font.main,";\n padding: ").concat(Object(r.b)("desktop")?"14px 5px":"13px 7px",";\n margin: 13px 15px 15px 15px;\n\t\t\t\twidth: calc(100% - 30px); \n font-size: ").concat((Object(r.b)("desktop"),11),"px;\n svg {\n margin-right: ").concat(Object(r.b)("desktop")?"10px":"5px",";\n }\n \n }\n"),"\n\n\t\t\t\t&.device-view-mobile {\n\t\t\t\t\t\t.settings-button {\n\t\t\t\t\t\t\t\tbottom: 60px;\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t.settings-button {\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tposition: fixed;\n\t\t\t\t\t\tbottom: 10px;\n\t\t\t\t\t\tleft: 10px;\n\t\t\t\t\t\tz-index: 11;\n\t\t\t\t}\n\n\n\n\t\t\t\t&.without-sidebar.device-view-desktop {\n\t\t\t\t\t\t.left-sidebar-indicator {\n\t\t\t\t\t\t\t\ttransition: 0.5s all;\t\n\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0%;\n\t\t\t\t\t\t\t\tz-index:100;\n\t\t\t\t\t\t\t\twidth: 18px;\n\t\t\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\t\t\tbackground: rgb(236, 236, 236);\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\t\tmargin: 0% 0px;\n\t\t\t\t\t\t\t\tborder-radius: 0px 5px;\n\t\t\t\t\t\t\t\t.left-wrapper {\n\t\t\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\t\t\t\ttransition: 0.2s all;\n\t\t\t\t\t\t\t\t\t\ttransition-delay: 500ms, 0ms;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tleft: -").concat(Mt.desktop.l,"vw;\n\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.left-sidebar-indicator:hover {\n\t\t\t\t\t\t\t\t.left-wrapper {\n\t\t\t\t\t\t\t\t\t\tleft: 0vw;\n\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.invisible-scrollbars {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tpadding-right: 18px;\n\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t\t\theight: ").concat("desktop"===Object(r.a)()?"100vh":"calc(100vh - 48px)","; \n\t\t\t\t}\n\n\t\t\t\t.left-wrapper {\n\t\t\t\t\t\tbackground: ").concat(Pt.l2.bg,"; \n\t\t\t\t\t\twidth: ").concat("desktop"===Object(r.a)()?Mt.desktop.l:"navigator"!==t?0:100,"vw;\n\n\t\t\t\t\t\tdisplay: ").concat("desktop"===Object(r.a)()?"flex":"navigator"!==t?"none":"flex",";\n\n\n\t\t\t\t\t\t.left-wrapper-1 {\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\tbackground-image: url('").concat(p.a.assets.decoBgMap,"');\n\t\t\t\t\t\t\t\tbackground-color: ").concat(p.a.colors.bgInterface2,";\n\t\t\t\t\t\t\t\tbackground-blend-mode: color-burn;\n\t\t\t\t\t\t\t\tcolor: ").concat(p.a.colors.fontInterface2,";\n\t\t\t\t\t\t\t\twidth: ").concat(Mt.desktop.l1,'%;\n\t\t\t\t\t\t\t\theight:100vh;\n\t\t\t\t\t\t\t\tposition: relative;\n\n\n\t\t\t\t\t\t\t\th3.subtitle {\n\t\t\t\t\t\t\t\t\t\tmargin: 0px 0px 15px;\n\t\t\t\t\t\t\t\t\t\tfont-family: "Open sans", sans-serif;\n\t\t\t\t\t\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 800;\n\t\t\t\t\t\t\t\t\t\tfont-style: italic;\n\t\t\t\t\t\t\t\t\t\tcolor: ').concat(Pt.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t\t\t// TEXT VIEW : LEFT 2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t////////////////////////////////////////////v2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.left-wrapper-2 {\n\t\t\t\t\t\t\t\twidth: ").concat(Mt.desktop.l2,"%;\n\t\t\t\t\t\t\t\theight:100vh;\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgInterface,";\n\n\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t.top-files-list-wrapper {\n\t\t\t\t\t\t\t\t\t\tpadding-top: ").concat(Mt.search.padding,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(Mt.search.h,"px;\n\t\t\t\t\t\t\t\t\t\t.subtitle-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t\t\t\t\t.folder-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 2px 16px 10px 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* margin-top: 4px; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: #aeadad;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.toggle-sidebar-btn {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\th3.subtitle {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin: 0px ").concat(Mt.block,"px ").concat(Mt.block,"px ").concat(Mt.block,"px; \n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.counter {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 2px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Pt.l2.text,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: 800;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t.files-list-component {\n\t\t\t\t\t\t\t\tposition: relative\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.list-toolbar {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: -93px;\n\t\t\t\t\t\t\t\tright: 23px;\n\t\t\t\t\t\t\t\tcolor: ").concat(Pt.l2.text,";\n\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Pt.l2.text,";\n\t\t\t\t\t\t\t\t\t\t").concat(Lt().button,"\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tmargin-right: ").concat(Mt.block,"px; \n\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.items-list-count {\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\ttop: 5px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t").concat("\n.list-wrapper {\n .list-wrapper-scroller{\n height: 100%;\n width: calc(100% + 20px);\n overflow-y:scroll;\n overflow: hidden;\n }\n\n .mobile-buttons-up-down {\n position: fixed;\n right: 0px;\n z-index: 10;\n top: 50%;\n div {\n background: #d6d6d6;\n padding: 10px;\n color:white;\n cursor: pointer;\n }\n }\n\n div.List {\n list-style: none;\n margin-right:20px;\n padding: 0px 0px 0px 0px;\n &.multiselect-mode {\n\t\t\t\t\t\tli .label {\n\t\t\t\t\t\t\t\tmargin-left: 4px;\n\t\t\t\t\t\t}\n }\n\n // NORMAL\n li {\n\t\t\tmax-width:calc(100% - 47px);\n padding: ".concat(G.l2.fileLi.padding,"px ").concat(G.block-G.l2.fileLi.margin,"px;\n margin: ").concat(G.l2.fileLi.margin,"px ").concat(G.l2.fileLi.margin+5,"px ").concat(G.l2.fileLi.margin,"px ").concat(G.l2.fileLi.margin,"px ;\n display: block;\n cursor: pointer;\n position: relative;\n height: ").concat(G.l2.fileLi.height,"px;\n overflow: hidden;\n border: 2px rgba(0,0,0,0) solid;\n \n // ACTIVE\n &:hover,\n &.multiselected,\n &.active {\n }\n\n display: flex;\n justify-content: center;\n\t\t\t\t\t\t&.active .background-item-border,\n\t\t\t\t\t\t&.active .background-item {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tz-index: -1;\n\t\t\t\t\t\t\t\topacity: 0.2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t&.active .background-item-border {\n\t\t\t\t\t\t\t\twidth: calc(100% - 4px);\n\t\t\t\t\t\t\t\theight: calc(100% - 4px);\n\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t\t\tborder: 2px ").concat(p.a.colors.main," solid;\n\t\t\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t\t\t}\n \n\t\t\t\t\t\th3 {\n\t\t\t\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\t\t}\n .left {\n\t\t\t\t\t\t\t\t// width: calc(100% - ").concat(G.l2.fileLi.img,"px - 10px);\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tpadding-right: 10px;\n\n\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\tflex-direction:column;\n\n\t\t\t\t\t\t\t\t.label {\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tmax-height: 35px;\n\t\t\t\t\t\t\t\t\t\t//height: 46px;\n\t\t\t\t\t\t\t\t\t\t// display: flex;\n\t\t\t\t\t\t\t\t\t\t// align-items: center;\n\t\t\t\t\t\t\t\t\t\tmargin-bottom: 2px;\n\t\t\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(V.l2.title,";\n\t\t\t\t\t\t\t\t\t\tline-break: anywhere;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t.content {\n\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t\tmargin-bottom: 3px;\n\t\t\t\t\t\t\t\t\t\theight: 25px;\n\t\t\t\t\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t\t\tline-break: anywhere;\n\t\t\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t\t\t\t").concat(Object(r.b)("desktop")?"":"max-height: 25px;","\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.date {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(V.l2.date,";\n\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\t\t\t\t}\n }\n\n .right {\n\t\t\t\t\t\t\t\t.picture {\n\t\t\t\t\t\t\t\t\t\twidth: ").concat(G.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(G.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\tbackground-size: cover;\n\t\t\t\t\t\t\t\t\t\tz-index: 1;\n\t\t\t\t\t\t\t\t\t\tmargin-top: 3px;\n\t\t\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\t\t\tborder: 2px white solid;\n\t\t\t\t\t\t\t\t}\n }\n }\n }\n}\n"),"\n\n\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\n\n\n\n\n\n\n\n\n\n\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t// IMAGE GALLERY VIEW\n\t\t\t\t////////////////////////////////////////////v\n\t\t\t\t.right-wrapper.image-gallery-view {\n\t\t\t\t\t\tbackground: ").concat(Pt.l2.bg,"; \n\t\t\t\t\t\t.image-gallery-header {\n\t\t\t\t\t\t\t\tpadding-top: ").concat(Mt.search.padding,"px;\n\t\t\t\t\t\t\t\theight: ").concat(Mt.gallery.topH,"px;\n\n\t\t\t\t\t\t\t\t.search-bar-component {\n\t\t\t\t\t\t\t\t\t\t// padding: 10px 0px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.image-gallery-component-wrapper {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t// TEXT VIEW : RIGHT\n\t\t\t\t\t\t\t\t\t\t\t\t\t ////////////////////////////////////////////v \n\t\t\t\t\t\t\t\t\t\t\t\t\t ").concat("\n.tab-list-scroll-wrapper {\n\t\theight: 44px;\n\t\tbackground: ".concat(p.a.colors.bgTabs,";\n border-radius: 0px 0px 0px 5px;\n\t\toverflow: hidden;\n\t\t.tab-list-invisible-scroll {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow-x: scroll;\n\t\t\t\tpadding-bottom: 18px;\n\t\t\t\t.tab-list-wrapper {\n\t\t\t\t\t\tpadding: 7px 0px 0px 13px;\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgTabs,";\n\t\t\t\t\t\tborder-radius: 0px 0px 0px 5px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t&>div:last-child {\n\t\t\t\t\t\t\t\tmargin-right: 30px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.tab-and-drag-wrapper {\n\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t.drag-indic {\n\t\t\t\t\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\ttop: -8px;\n\t\t\t\t\t\t\t\t\t\tleft: -6px;\n\t\t\t\t\t\t\t\t\t\twidth: 20px;\n\t\t\t\t\t\t\t\t\t\theight: 20px;\n\t\t\t\t\t\t\t\t\t\tcolor: #aaaaaa;\n\t\t\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.tab-wrapper {\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgTab,";\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tcolor: ").concat(p.a.colors.fontTab,";\n\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.editor,";\n\t\t\t\t\t\t\t\theight: 35px;\n\t\t\t\t\t\t\t\tbox-shadow:rgb(0 0 0 / 20%) 0px -1px 2px ;\n\t\t\t\t\t\t\t\tborder-radius: 5px 5px 0px 0px;\n\t\t\t\t\t\t\t\tjustify-content: space-between;\n\t\t\t\t\t\t\t\tmax-height: 27px;\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t\t.tab-nb-windows {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 10px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.active-ribbon {\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\theight: 2px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t\t\t.active-ribbon {\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgTabActive,";\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.tab-more {\n\t\t\t\t\t\t\t\t\t\tmin-width: 30px;\n\t\t\t\t\t\t\t\t\t\twidth: 30px;\n\t\t\t\t\t\t\t\t\t\tmax-width: 30px;\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.main,";\n\t\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\tfont-size:14px;\n\t\t\t\t\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-name {\n\t\t\t\t\t\t\t\t\t\tpadding: 10px 0px 10px 10px;\n\n\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(p.a.colors.fontTab," ;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 11px;\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\t\t\t\t\tmin-width: 30px;\n\t\t\t\t\t\t\t\t\t\t\t\tmax-width: 100px;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.editor,";\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-nb-windows {\n\t\t\t\t\t\t\t\t\t\tpadding: 10px 0px 10px 0px;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-close {\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tmargin-left: 5px;\n\t\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tmargin-left: 5px;\n\t\t\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n"),"\n\t\t\t\t").concat(Object(lt.d)(),"\n\t\t\t\t").concat(Object(lt.b)(),"\n\n\t\t\t\t").concat(Object(J.b)(),"\n\t\t\t\t").concat(Object(rt.b)(),"\n\n\t\t\t\t&.without-sidebar.device-view-desktop {\n\t\t\t\t\t\t.right-wrapper.dual-viewer-view {\n\t\t\t\t\t\t\t\twidth: calc(100vw - 18px);\n\t\t\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.right-wrapper.dual-viewer-view {\n\n\t\t\t\t\t\twidth: ").concat("desktop"===Object(r.a)()?Mt.desktop.r:"navigator"!==t?100:0,"vw;\n\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\tdisplay: ").concat("desktop"===Object(r.a)()||"navigator"!==t?"block":"none",";\n\t\t\t\t\t\tpadding-top: 0px;\n\t\t\t\t\t\t.note-wrapper {\n\t\t\t\t\t\t\t\t.dual-view-wrapper.device-tablet, \n\t\t\t\t\t\t\t\t.dual-view-wrapper.device-mobile {\n\t\t\t\t\t\t\t\t\t\t.editor-area,\n\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t\t\t&.view-both.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t.__EDITOR_DESIGN HERE__ {}\n\t\t\t\t\t\t\t\t\t\t&.view-editor.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* display:none; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: -9999px;\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t&.view-editor-with-map.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 80%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t.__MINIMAP_DESIGN HERE__ {}\n\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% - 30px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: -50%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbox-shadow: -4px 5px 10px rgba(0, 0, 0, 0.10);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-transitions {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransition-delay: ").concat(p.a.anim.time,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(0.2) translateZ(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransform-origin: 0px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: calc(-80%);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// height: 500vh;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% * 5);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-transitions {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay:").concat(p.a.anim.time,"; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: padding; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransition-delay:").concat(p.a.anim.time,"; \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: all; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 73%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 80px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-right: 140px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 40px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t&.view-preview.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t\t\tdisplay: ").concat("desktop"===Object(r.a)()?"flex":"block",";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t").concat(Object(d.c)(t),"\n\t\t\t\t\t\t\t\t\t\t").concat(Object(mt.b)(),"\n\n\n\t\t\t\t\t\t\t\t\t\t").concat(Object(f.b)(),"\n\n\t\t\t\t\t\t\t\t\t\t").concat(Object(ft.b)(),"\n\t\t\t\t\t\t\t\t\t\t").concat(Object(bt.b)(),'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\th3 {\n\t\t\t\t\t\t\t\tmargin-bottom: 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpre {\n\t\t\t\t\t\t\t\twhite-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */\n\t\t\t\t\t\t\t\twhite-space: -pre-wrap; /* Opera */\n\t\t\t\t\t\t\t\twhite-space: -o-pre-wrap; /* Opera */\n\t\t\t\t\t\t\t\twhite-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */\n\t\t\t\t\t\t\t\tword-wrap: break-word; /* IE 5.5+ */\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n\n\n.preview-content {\n\t\tcounter-reset: h2counter;\n h1 {\n counter-reset: h2counter;\n }\n h2:before {\n content: counter(h2counter) ".\\0000a0\\0000a0";\n counter-increment: h2counter;\n counter-reset: h3counter;\n }\n h3:before {\n content: counter(h2counter) "." counter(h3counter) ".\\0000a0\\0000a0";\n counter-increment: h3counter;\n }\n}\n\n\n');return Object(u.a)(e,";","")},Bt=e(65),Ht="\n<style>\n.popupContent p {\n\t\tbackground: #dadada;\n padding: 3px 5px;\n\t\tmargin: 0px 4px;\n\t\tdisplay: inline-block;\n}\n</style>\n",Ut=function(t,n,e,o){var c=function(t,n){console.log("[MOVEFILE] ".concat(t," -> ").concat(n)),Object(j.e)().then((function(e){e.file.move(t,n,(function(){e&&e.ui.browser.goTo(e.ui.browser.folders.current.get)}))}))};return{askForMoveFile:c,promptAndBatchMoveFiles:function(n){var e=n.files,o=n.folderToDropInto,i="Move <p>".concat(null===e||void 0===e?void 0:e.length,'</p> file(s) to <p>"').concat(o.key,'"</p>?\n<br>\n<br>\nRessources links will be automatically updated<br>\n').concat(Ht,"\n");Object(j.d)((function(n){n.popup.confirm(i,(function(){!function(){for(var n=0;n<e.length;n++){var i=e[n],a="".concat(i.path),r="".concat(o.key,"/").concat(i.name);c(a,r),t()}}()}))}))},promptAndMoveFolder:function(e){var o=Object(s.a)({},e),c=o.folder,i=o.folderToDropInto,a=o.folderBasePath,r=o.newTitle,l=o.renameOnly,u=[c.path,"".concat(l?Object(Bt.a)(i):i.path,"/").concat(r||c.title)],p="".concat(a,"/").concat(u[0]),d="".concat(a,"/").concat(u[1]),f="\n".concat(C.a.moveFolderPrompt," <p>").concat(u[0],"</p> to <p>").concat(u[1],"</p>?\n").concat(Ht,"\n"),b=function(){!function(t,n,cb){console.log("[MOVEFOLDER] ".concat(t," -> ").concat(n)),Object(j.d)((function(e){e.folders.move(t,n,(function(){e&&e.ui.browser.goTo(e.ui.browser.folders.current.get),cb&&cb()}))}))}(p,d,(function(){t(),n(),e.onMoveFn&&e.onMoveFn()}))};e.disablePrompt?b():Object(j.e)().then((function(t){t.popup.confirm(f,(function(){b()}))}))}}},Wt=e(70),qt="[LAST FILE]",Vt=w.a.client.log.verbose,Gt=e(104),Jt=e(154),Kt=e(151),Yt=e(103),$t=function(t){var n=Object(o.useState)({}),e=Object(i.a)(n,2),c=e[0],r=e[1];Object(o.useEffect)((function(){}),[t.files]);var l=Object(o.useReducer)((function(t){return t+1}),0),s=Object(i.a)(l,2)[1],u=Object(o.useState)(2),d=Object(i.a)(u,2),f=d[0],b=d[1];Object(o.useEffect)((function(){Object(j.d)((function(t){b(t.userSettings.get("ui_filesList_sortMode"))}))}),[]);return Object(a.c)("div",{className:"files-list-component"},Object(a.c)("div",{className:"list-toolbar"},Object(a.c)("button",{type:"button",title:"sort",onClick:function(){var n=f+1>=H.a.length?0:f+1;Object(j.d)((function(e){e.userSettings.set("ui_filesList_sortMode",n),b(n),t.onSortFiles(Object(H.d)(t.files,n))}))}},Object(a.c)("span",null,t.files.length>0&&Object(a.c)("span",{className:"list-count"},"(",t.files.length,")"),H.b[f]),Object(a.c)(y.a,{name:"faSort",color:p.a.colors.l2.text}))),Object(a.c)("div",{className:"list-wrapper"},Object(a.c)(W,{files:t.files,filesPreview:c,hoverMode:!1,activeFileIndex:t.activeFileIndex,sortMode:f,onFileClicked:function(n){t.onFileClicked(n)},onFileDragStart:t.onFileDragStart,onFileDragEnd:t.onFileDragEnd,onVisibleItemsChange:function(t){!function(t){for(var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=[],o=0;o<t.length;o++){var i=t[o];c[i]&&!n||e.push(i)}e.length>1&&Object(j.d)((function(t){t.files.getPreviews(e,(function(t){Object(g.each)(t,(function(t){c[t.path]=t})),r(c),s()}))}))}(t,!0)}})))},Zt=e(77),Xt="[PWA]",Qt=w.a.client.log.verbose,tn=e(158),nn=e(81),en=e(26),on=function(){var t=[];return window.speechSynthesis.getVoices().forEach((function(n,e){var o=n.lang?" (".concat(n.lang,")"):"",c="".concat(n.name).concat(o);t.push({key:e,label:c,obj:n})})),t},cn=Object(S.a)((function t(n){var e=this;Object(T.a)(this,t),this.rawText=void 0,this.voice=void 0,this.text2read=void 0,this.chunkedText=void 0,this.chunkLength=1e3,this.currChunkId=0,this.currSpeechObj=void 0,this.speed=1,this.isLoaded=!1,this.shouldStop=!1,this.chunkText=function(t){for(var n=(t=t.replace(/(\r\n\r\n|\n\n|\r\r|\n)/gm,".")).split(/[.!?]+/),o=[],c=0;c<n.length;c++){var i=n[c];if(i.length>e.chunkLength)for(var a=i.split(" "),r="",l=0;l<a.length;l++)((r+=a[l]+" ").length>e.chunkLength||l===a.length-1)&&(o.push(r),r="");else o.push(i)}return o},this.loadVoice=function(t){e.voice=t},this.updateSpeed=function(t){e.speed=t},this.play=function(){if(e.isLoaded)window.speechSynthesis.resume();else{if(e.currChunkId>e.chunkedText.length-1)return console.log("[TTS] finished played");e.isLoaded=!0,e.currSpeechObj=new SpeechSynthesisUtterance,e.currSpeechObj.text=e.chunkedText[e.currChunkId],e.currSpeechObj.rate=e.speed,e.voice&&(e.currSpeechObj.voice=e.voice),setTimeout((function(){window.speechSynthesis.speak(e.currSpeechObj)}),0),e.currSpeechObj.addEventListener("end",(function(){e.isLoaded=!1,e.shouldStop?e.shouldStop=!1:(e.currChunkId+=1,e.play())}))}},this.isPlaying=function(){var t=window.speechSynthesis.speaking;return t&&(t=!window.speechSynthesis.paused),t},this.pause=function(){e.stop()},this.stop=function(){e.shouldStop=!0,e.isLoaded=!1,e.debounceReinitStop(),window.speechSynthesis.cancel()},this.debounceReinitStop=Object(g.debounce)((function(){e.shouldStop=!1}),1e3),this.goToChunk=function(t){t<=0||t>e.chunkedText.length-1||(e.currChunkId=t,e.isPlaying()&&e.debounceRestart())},this.extractToChunkPos=function(t){var n=e.chunkText(t),o=null;if(Object(g.each)(n,(function(t){if(t.length>50)return o=t,!1})),!o)return-1;var c=-1;return Object(g.each)(e.chunkedText,(function(t,n){if(-1!==t.indexOf(o))return c=n,!1})),c},this.getCurrentChunkText=function(){return e.chunkedText[e.currChunkId]},this.debounceRestart=Object(g.debounce)((function(){e.stop(),e.play()}),500),this.goBack=function(){e.goToChunk(e.currChunkId-1)},this.goForward=function(){e.goToChunk(e.currChunkId+1)},this.rawText=n.text,this.text2read=n.text.replace(en.a.ressource,"").replace(en.a.ref,"").replace(en.a.baliseHtml,""),this.chunkedText=this.chunkText(this.text2read),console.log("[TTS] init new manager ",{p:n,text:this.chunkedText,length:this.chunkedText.length})})),an=e(29),rn=e(46),ln="[SCREEN WAKE LOCK]",sn=null,un=function(){var t=Object(rn.a)(Object(an.a)().mark((function t(){return Object(an.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,navigator.wakeLock.request("screen");case 3:sn=t.sent,console.log(ln,"ACTIVE"),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(ln,"Error : ".concat(t.t0.name,", ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();var pn=function(t){var n=Object(o.useState)(!1),e=Object(i.a)(n,2),c=e[0],l=e[1],s=Object(h.a)("tts-selected-voice",0),u=Object(i.a)(s,2),p=u[0],d=u[1],f=Object(o.useState)(!1),b=Object(i.a)(f,2),g=b[0],m=b[1],v=function(t){!0===t?un():sn&&sn.release().then((function(){sn=null,console.log(ln,"DISABLED")})),m(t)},w=Object(h.a)("tts-pos-".concat(t.id),0),O=Object(i.a)(w,2),j=O[0],k=O[1],_=Object(h.a)("tts-rate",1),E=Object(i.a)(_,2),T=E[0],S=E[1],I=Object(o.useState)(0),N=Object(i.a)(I,2),F=N[0],R=N[1],A=Object(o.useState)(""),D=Object(i.a)(A,2),L=D[0],P=D[1];Object(o.useEffect)((function(){var t=function(t){var n=0,e="".concat(Math.ceil(t),"m");if(t>60){n=Math.floor(t/60);Math.ceil(t%60);e="".concat(n,"h")}return e},n=t(6*(F-j)/(60*T)),e=t(6*F/(60*T)),o=" ".concat(n," left of ").concat(e);P(o)}),[F,T,j]);var M=Object(o.useRef)();window.tts=M,Object(o.useEffect)((function(){setTimeout((function(){on()[p]&&M.current.loadVoice(on()[p].obj)})),M.current=new cn({text:t.fileContent}),M.current.goToChunk(j)}),[]),Object(o.useEffect)((function(){on()[p]&&M.current.loadVoice(on()[p].obj)}),[p]),Object(o.useEffect)((function(){M.current.updateSpeed(T)}),[T]);var z=Object(o.useRef)(!1);return x((function(){l(M.current.isPlaying());var n=-1;(n=0!==M.current.currChunkId?M.current.currChunkId:M.current.currChunkId=1,t.startString&&!z.current)&&(n=M.current.extractToChunkPos(t.startString),M.current.goToChunk(n),z.current=!0);-1!==n&&k(n),R(M.current.chunkedText.length)}),500),Object(o.useEffect)((function(){var n=M.current.getCurrentChunkText();t.onUpdate({totalChunks:F,currentChunk:j,isPlaying:c,currentText:n})}),[F,j,c]),Object(a.c)(dn,null,Object(a.c)(tt.a,{title:"".concat(C.a.ttsPopup.title),onClose:function(){M.current.stop(),t.onUpdate({totalChunks:F,currentChunk:j,isPlaying:!1}),t.onClose()}},Object(a.c)(Q.a,{value:p,type:"select",list:on(),label:C.a.ttsPopup.voice,onSelectChange:function(t){d(parseInt(t))}}),Object(a.c)("span",null," SPEED : "),Object(a.c)("input",{className:"speed-range",type:"range",value:T,min:"0",max:"3",step:"0.1",onChange:function(t){var n=t.target.value;S(n)}})," (",T,")",Object(a.c)("br",null),Object(a.c)("br",null),Object(a.c)("b",null," SENTENCES : "),Object(a.c)("input",{type:"number",className:"text-pos",value:j,min:"0",max:F,onChange:function(t){var n=parseInt(t.target.value);M.current.goToChunk(n),k(n)}})," / ",F,Object(a.c)("br",null),Object(a.c)("input",{type:"range",value:j,className:"range-pos",min:"0",max:F,onChange:function(t){var n=parseInt(t.target.value);M.current.goToChunk(n),k(n)}}),Object(a.c)("div",{className:"estimated-time"},Object(a.c)("b",null,"Reading Time")," :",L),Object(a.c)("div",{className:"buttons"},Object(a.c)("button",{onClick:function(t){M.current.goBack()}},Object(a.c)(y.a,{name:"faFastBackward",color:"black"})),Object(a.c)("button",{onClick:function(t){c||M.current.goToChunk(j),c?M.current.stop():M.current.play()}},Object(a.c)(y.a,{name:c?"faPause":"faPlay",color:"black"})),Object(a.c)("button",{onClick:function(t){M.current.goForward()}},Object(a.c)(y.a,{name:"faFastForward",color:"black"})),"desktop"!==Object(r.a)()&&Object(a.c)("button",{onClick:function(t){v(!0)}},Object(a.c)(y.a,{name:"faLock",color:"black"})))),g&&Object(a.c)("div",{className:"bg-lock"},Object(a.c)("button",{onContextMenu:function(t){v(!1)}},Object(a.c)(y.a,{name:"faUnlock",color:"black"}))))},dn=Object(nn.a)("div",{target:"e1kwupat0"})({name:"1ybx9fr",styles:".bg-lock{position:fixed;top:0px;left:0px;width:100vw;height:100vh;z-index:1005;background:rgba(0,0,0,0.3);display:flex;justify-content:center;align-items:center;button{}}.popup-wrapper .popupContent{padding:20px;.input-component span,span{display:inline-block;width:30%;font-size:12px;font-weight:bold;}.speed-range{position:relative;top:8px;}.range-pos{width:100%;margin-bottom:10px;}.text-pos{width:50px;margin-bottom:10px;}}.buttons{display:flex;padding:20px 0px 0px 0px;button{width:30%;padding:10px;}}"}),fn=(e(123),e(64)),bn=e(106);Object(bn.b)(Object(a.c)((function(){Object(o.useEffect)((function(){return Qt&&console.log(Xt," init"),"serviceWorker"in navigator&&navigator.serviceWorker.register("/service-worker.js"),window.addEventListener("beforeinstallprompt",(function(t){t.preventDefault(),Qt&&console.log(Xt," beforeinstallprompt WORKING=>",t),window.deferredPrompt=t})),console.log("========= [APP] MOUNTED on a ".concat(Object(r.a)())),Object(l.d)().then((function(t){J(!0),Tt&&Tt.status.ipsServer.set(t.ipsServer),Object(j.d)((function(t){t.ui.browser.folders.refreshFromBackend()}))})),window.onkeydown=function(t){var n=z(t);Object(g.isNull)(P[n])||(P[n]=!0);var e="".concat(n,"-down");B[e]&&B[e]()},window.onkeyup=function(t){var n=z(t);Object(g.isNull)(P[n])||(P[n]=!1);var e="".concat(n,"-up");B[e]&&B[e]()},Object(fn.a)("init","init",(function(){})),function(){console.log("app will unmount")}}),[]);var t=function(){It.active.set(-1)},n=function(){Et.ui.browser.files.set([])},e=function(t){var n=Object(o.useState)(!1),e=Object(i.a)(n,2),r=e[0],s=e[1],u=Object(o.useState)(""),p=Object(i.a)(u,2),d=p[0],f=p[1],b=Object(o.useState)(""),g=Object(i.a)(b,2),h=g[0],m=g[1],v=Object(o.useState)(""),O=Object(i.a)(v,2),j=O[0],x=O[1],k=Object(o.useState)(),y=Object(i.a)(k,2),_=y[0],E=y[1],T="[SETUP CONFIG]",S=w.a.client.log.verbose,I=Object(o.useRef)(0);return Object(o.useEffect)((function(){return S&&console.log(T," init socket listener"),I.current=l.b.on("getSetupInfos",(function(n){"SUCCESS_CONFIG_CREATION"===n.code?(E(["success","".concat(C.a.setupForm.successReload)]),setTimeout((function(){window.location.reload()}),3e3)):"ASK_SETUP"===n.code?(t.cleanAllApp(),s(!0),n.defaultFolder&&x(n.defaultFolder)):E(["error","".concat(n.code,": ").concat(n.message)])})),function(){S&&console.log(T," clean socket listener"),l.b.off(I.current)}}),[]),{displayWelcomePopup:r,SetupPopupComponent:function(t){return Object(a.c)(c.a.Fragment,null,r&&Object(a.c)("div",{className:"setup-popup-component"},Object(a.c)(tt.a,{title:"Welcome to Tiro",onClose:function(){}},Object(a.c)("p",null,C.a.setupForm.introText)," ",Object(a.c)("br",null),Object(a.c)("div",null,Object(a.c)(Q.a,{value:d,label:C.a.setupForm.user,explanation:C.a.setupForm.userExplanation,onChange:function(t){f(t)},shouldNotSelectOnClick:!0}),Object(a.c)(Q.a,{value:h,label:C.a.setupForm.password,type:"password",explanation:C.a.setupForm.passwordExplanation,onChange:function(t){m(t)},shouldNotSelectOnClick:!0}),Object(a.c)(Q.a,{value:j,label:C.a.setupForm.dataFolder,explanation:C.a.setupForm.folderExplanation,onChange:function(t){x(t)},shouldNotSelectOnClick:!0}),Object(a.c)("input",{type:"button",value:"submit",className:"submit-button",onClick:function(t){E(void 0),l.b.emit("sendSetupInfos",{form:{user:d,password:h,dataFolder:j},token:Object(L.b)()})}}),_&&Object(a.c)("div",{className:_[0]},_[1])))))}}}({cleanAllApp:function(){console.log("[cleanAllApp]"),Mt(),At(),t(),n()}}),u=e.SetupPopupComponent,d=Object(L.d)({onLoginAsked:function(){console.log("[cleanListAndFileContent]"),t(),n()},onLoginSuccess:function(){I(),O(),Ht(),Object(j.d)((function(t){t.ui.browser.folders.refreshFromBackend()})),Rt(["/"])}}),f=d.LoginPopupComponent,h=Object(Kt.a)(),m=h.userSettingsApi,O=h.refreshUserSettingsFromBackend,_=Object(Gt.c)(),T=_.tabs,S=_.updateTab,I=_.refreshTabsFromBackend,N=_.updateActiveTabGrid,F=_.refreshWindowGrid,R=_.tabsApi,A=_.windowsApi,D=R.active.get(),M=at(),U=M.PromptPopupComponent,W=M.popupApi,q=function(){Object(o.useRef)([]);var t=Object(o.useState)(!1),n=Object(i.a)(t,2),e=n[0],c=n[1],r=Object(o.useState)(!1),l=Object(i.a)(r,2),s=l[0],u=l[1],p="(DISCONNECTED)",d=Object(o.useRef)(p);x((function(){d.current=d.current===p?"(/!\\ DISCONNECTED /!\\)":p;var t=e?"".concat(k()," (Connected)"):"".concat(k()," ").concat(d.current);document.title=t}),1e3),Object(o.useEffect)((function(){Object(j.d)((function(t){t.watch.appStatus((function(t){!1===t.isConnected?f(!1):!0===t.isConnected&&(f(!0),u(!0),setTimeout((function(){u(!1)}),1e3))}))}))}),[]);var f=function(t){w.a.client.log.verbose&&console.log("[SOCKET CONNECTION TOGGLE] to ".concat(t)),c(t)};return{isConnected:e,connectionStatusComponent:function(){var t=["connected","connected"];return s&&(t=["back-online","back online"]),e||(t=["disconnected","disconnected"]),Object(a.c)("div",{className:"connection-status"},Object(a.c)("div",{className:t[0]},t[1]))},toggleSocketConnection:f}}(),V=q.isConnected,G=q.connectionStatusComponent,J=q.toggleSocketConnection,K=function(){var t=Object(o.useState)(!1),n=Object(i.a)(t,2),e=n[0],c=n[1],a=Object(o.useState)(0),r=Object(i.a)(a,2),l=r[0],s=r[1],u=Object(o.useRef)(0);return Object(o.useEffect)((function(){var t=Object(g.debounce)((function(){u.current=u.current+1,s(l+1),c(!0),setTimeout((function(){c(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{forceResponsiveRender:e,frr:u,responsiveRefreshCounter:l,setResponsiveRefresh:s}}(),$=K.forceResponsiveRender,Z=K.responsiveRefreshCounter,et=K.setResponsiveRefresh,ot=Object(o.useRef)([]),it=Object(o.useState)(!1),rt=Object(i.a)(it,2),lt=rt[0],ut=rt[1],pt=Object(Yt.b)(),dt=pt.lightboxApi,ft=pt.lightboxImages,bt=pt.lightboxIndex,gt=function(){var t=Object(o.useState)(!1),n=Object(i.a)(t,2),e=n[0],c=n[1],a=Object(o.useState)(null),r=Object(i.a)(a,2),l=r[0],s=r[1],u=Object(o.useState)(null),p=Object(i.a)(u,2),d=p[0],f=p[1],b=Object(o.useState)(""),g=Object(i.a)(b,2),h=g[0],m=g[1],v=Object(o.useRef)(null);return{ttsApi:{open:function(t,n){var e=(n=n||{}).id?n.id:null,o=n.startString?n.startString:null;console.log("[TTS API]","open",{id:e,content:t,startString:o}),s(e),o&&f(o),m(t),c(!0)},close:function(){c(!1)},getStatus:function(cb){v.current&&cb(v.current)}},ttsPopupContent:h,ttsPopupId:l,ttsPos:d,setTtsPopup:c,ttsPopup:e,syncTtsStatus:function(t){v.current=t}}}(),mt=gt.ttsApi,vt=gt.ttsPos,wt=gt.ttsPopup,Ot=gt.setTtsPopup,xt=gt.ttsPopupContent,kt=gt.ttsPopupId,yt=gt.syncTtsStatus,Ct=function(t){var n=Object(o.useState)(!1),e=Object(i.a)(n,2),c=e[0],a=e[1],r=Object(o.useState)([]),l=Object(i.a)(r,2),u=l[0],p=l[1];return{isConnected:t.isConnected,searching:{get:c,set:a},ipsServer:{get:u,set:p,getLocal:function(){var t=u[0];return Object(g.each)(u,(function(n){n.startsWith("192.168")&&(t=n)})),t}},refresh:Object(s.a)(Object(s.a)({},t.refresh),{},{increment:function(){t.refresh.set(t.refresh.get+1)}})}}({isConnected:V,refresh:{get:Z,set:et}}),_t=function(){var t="[NOTE HISTORY] ",n=w.a.client.log.verbose,e=Object(o.useRef)({}),c=function(){return(new Date).getTime()},i=function(e,o,c){n&&console.log("".concat(t," saveNoteHistory ").concat(e)),l.b.emit("createHistoryFile",{filePath:e,content:o,historyFileType:c,token:Object(L.b)()})};return{save:i,intervalSave:function(o,a){var r=e.current[o];(!r||r&&r+6e4<c())&&(n&&console.log("".concat(t," ").concat(o,", time ").concat(1," expired/inexistand, PROCEED BACKUP")),i(o,a,"int"),e.current[o]=c())}}}(),Et=Object(j.f)({popupApi:W,tabsApi:R,userSettingsApi:m,windowsApi:A,statusApi:Ct,historyApi:_t,lightboxApi:dt,ttsApi:mt}),Tt=Et,It=Tt.ui.browser.files,Ft=Tt.ui.browser.folders,Rt=Ft.scan,At=Ft.clean,Dt=Ft.base,Lt=function(t){var n=Object(Wt.a)("files-history",[]),e=Object(i.a)(n,3),c=e[0],a=e[1],r=e[2];Object(o.useEffect)((function(){Vt&&console.log(qt," activeFile changed!",t),t&&l(t)}),[t]);var l=function(t){Vt&&console.log(qt,"Add to history",t.name);for(var n=!0,e=-1,o=c,i=0;i<c.length;i++)c[i].name===t.name&&(n=!1,e=i);n||o.splice(e,1),(o=o.slice(0,400)).unshift(t),a(o)};return Object(jt.a)(l,1e3),{filesHistory:c,cleanLastFilesHistory:function(){a([])},refreshFilesHistoryFromBackend:r,lastFilesHistoryApi:{getAll:function(){return c},removeFile:function(t){console.log("".concat(qt," removing ").concat(t," from last notes"));var n=Object(g.cloneDeep)(c);n=n.filter((function(n){return n.path!==t})),a(n)}}}}(It.active.get),Pt=Lt.filesHistory,Mt=Lt.cleanLastFilesHistory,Ht=Lt.refreshFilesHistoryFromBackend,nn=Lt.lastFilesHistoryApi;Tt.lastNotesApi=nn;var en=Ut(t,n),on=(en.askForMoveFile,en.promptAndMoveFolder),cn=en.promptAndBatchMoveFiles,an=function(){var t=Object(o.useState)("navigator"),n=Object(i.a)(t,2),e=n[0],l=n[1];return{mobileView:e,setMobileView:l,MobileToolbarComponent:function(t){return v(Object(a.c)(c.a.Fragment,null,"desktop"!==Object(r.a)()&&Object(a.c)(b.a,{class:"mobile-view-toggler",buttons:[{icon:"faStream",class:"".concat("navigator"===e?"active":""),action:function(){l("navigator")}},{icon:"faPenNib",class:"".concat("editor"===e?"active":""),action:function(){l("editor")}},{icon:"faEye",class:"".concat("preview"===e?"active":""),action:function(){l("preview")}},{icon:"faSearch",class:"",action:function(){t.onButtons[0]&&t.onButtons[0]()}}]})),[e,t.forceRerender])}}}(),rn=an.mobileView,ln=an.MobileToolbarComponent;window.api=Tt;var sn=Object(o.useState)(!1),un=Object(i.a)(sn,2),dn=un[0],bn=un[1],gn=Object(o.useState)(!1),hn=Object(i.a)(gn,2),mn=hn[0],vn=hn[1];Object(o.useEffect)((function(){return tn.bind("alt + spacebar",(function(){bn(!0),vn(!0)})),tn.bind("esc",(function(){bn(!1)})),function(){tn.releaseAllKeys()}}),[Pt]);var wn=$?0:1;Tt.userSettings.refresh.css.get;return Object(a.c)("div",{className:zt(rn)},Object(a.c)("div",{className:" ".concat("mobile"===Object(r.a)()?"mobile-view-".concat(rn):"")},Object(a.c)(j.a.Provider,{value:Et},dn&&Object(a.c)(St,{show:mn,lastNotes:Pt,onClose:function(t){bn(!1)},onHide:function(t){vn(!1)}}),Object(a.c)(a.a,{styles:Object(a.b)("*{-webkit-print-color-adjust:exact!important;color-adjust:exact!important;}*:focus{outline:none;}body{margin:0;padding:0px;background:",p.a.colors.bg.light,";font-size:11px;font-family:",p.a.font.main,";}html,body{height:100vh;overflow:hidden;background:",p.a.colors.bgInterface,";}button,input{font-family:",p.a.font.main,";font-weight:700;color:",p.a.colors.l2.title,";}","\n@page {\n margin: 0;\n padding: 0;\n}\n\n.main-wrapper,\n#root,\n.print-body {\n\t// position: absolute;\n// top: 22px;\n\t\t// height: 1000vh;\n\t\t// overflow: auto;\n}\n\n.print-wrapper {\n\t\tz-index: 10000000000000;\n\t\tbackground-color: white;\n\t\toverflow: hidden;\n width: 100%!important;\n\t\theight: 1000vh!important;\n position: fixed;\n top: 0;\n left: 0;\n margin: 0;\n padding: 15px;\n font-size: 14px;\n line-height: 18px;\n\t\tmargin-top: 0px!important;\n\t\tdisplay: block!important;\n}\n/* .print-wrapper { */\n/* \t\tz-index: 10000000000000; */\n/* \t\ttop: 0px; */\n/* \t\tleft: 0px; */\n/* \t\tposition: fixed; */\n/* \t\twidth: 100%!important; */\n/* \t\t/* height: 100vh; */ */\n/* } */\n\n"," body{position:relative;}","")}),Object(a.c)("div",{role:"dialog",className:"\n\t\t\t\t\t\t\t\tmain-wrapper\n\t\t\t\t\t\t\t\t".concat(Tt.userSettings.get("ui_sidebar")?"with-sidebar":"without-sidebar","\n\t\t\t\t\t\t\t\tdevice-view-").concat(Object(r.a)())},U(),f({}),u({}),G(),ln({forceRerender:$,onButtons:[function(){vn(!0),bn(!0)}]}),Object(a.c)("div",{className:"left-sidebar-indicator"},Object(a.c)("div",{className:"left-wrapper"},Object(a.c)("div",{className:"left-wrapper-1"},Object(a.c)("div",{className:"invisible-scrollbars"},Object(a.c)(E,{onNewFile:function(){Object(j.d)((function(t){var n=t.ui.browser.folders.current.get;t.file.create(n,(function(e){var o=Object(H.c)(e);o&&t.ui.browser.goTo(n,o.name,{openIn:"activeWindow"})}))}))}}),Tt.userSettings.get("ui_layout_shortcuts_panel")&&Object(a.c)(Nt,{filePath:".tiro/shortcuts.md",onClick:function(){}}),Object(a.c)(X,{files:Pt,onClick:function(t){Et.ui.browser.goTo(t.folder,t.name,{openIn:"active"})}}),Object(a.c)(Y,{openFolders:Ft.open.get(),folder:Ft.get(),current:Ft.current.get,onFolderClicked:function(t){Et.ui.browser.goTo(t,null)},onFolderMenuAction:function(t,n,e){"rename"===t&&e?on({folder:n,folderToDropInto:n,folderBasePath:Dt,newTitle:e,renameOnly:!0,disablePrompt:!0,onMoveFn:function(){Rt([Object(Bt.b)(n.path)],{cache:!1,cb:function(){Ft.open.remove([Object(Bt.b)(n.path)]),Ft.open.add(Object(Bt.b)(n.path))}})}}):"create"===t&&e?(Object(Zt.a)(e,n),setTimeout((function(){Rt([n.path],{cache:!1})}))):"moveToTrash"===t?on({folder:n,folderToDropInto:Zt.c,folderBasePath:Dt,newTitle:e,onMoveFn:function(){Rt([Object(Bt.b)(n.path)],{cache:!1,cb:function(){Ft.open.add(n.path)}})}}):"delete"===t&&(Object(Zt.b)("trash"),setTimeout((function(){Rt([n.path],{cache:!1})})))},onFolderOpen:function(t){Rt([t],{cache:!1})},onFolderClose:function(t){},onFolderDragStart:function(t){console.log("[DRAG MOVE] onFolderDragStart",t),ot.current=[{type:"folder",folder:t}]},onFolderDragEnd:function(){console.log("[DRAG MOVE] onFolderDragEnd"),ot.current=[]},onFolderDrop:function(t){!function(t){console.log("[DRAG MOVE] processDragDropAction ->",ot.current,t);var n=ot.current[0];"file"===n.type&&n.files?cn({files:n.files,folderToDropInto:t}):"folder"===n.type&&n.folder&&on({folder:n.folder,folderToDropInto:t,folderBasePath:Dt,disablePrompt:!0,onMoveFn:function(){if(n.folder){var e=n.folder.path,o=t.path;Rt([Object(Bt.b)(e),Object(Bt.b)(o),o,e],{cache:!1,cb:function(){Ft.open.add(e)}})}}})}(t)}})),Object(a.c)("div",{className:"settings-button",onClick:function(){ut(!lt)}},Object(a.c)(y.a,{name:"faCog",color:"grey"})),lt&&Object(a.c)(ht.a,{onClose:function(){ut(!1)}})),Object(a.c)("div",{className:"left-wrapper-2"},Object(a.c)("div",{className:"top-files-list-wrapper"},Object(a.c)("div",{className:"subtitle-wrapper"},Object(a.c)("div",{className:"folder-wrapper"},Tt&&Tt.ui.browser.folders.current.get,!Tt.ui.browser.folders.current.get&&"/"),"mobile"!==Object(r.a)()&&Object(a.c)("div",{className:"toggle-sidebar-btn"},Object(a.c)(b.a,{popup:!1,buttons:[{icon:"faThumbtack",title:"Toggle Sidebar",action:function(t){m.set("ui_sidebar",!m.get("ui_sidebar")),F()},active:!0===Et.userSettings.get("ui_sidebar")}],colors:["#d4d1d1","#615f5f"],size:.8}))),Object(a.c)(nt,{term:Et.ui.search.term.get})),Object(a.c)("div",{className:"files-list-wrapper"},Object(a.c)($t,{files:It.get,activeFileIndex:It.active.getIndex,onSortFiles:function(t){Et.ui.browser.files.set(t)},onFileClicked:function(t){It.active.set(t);var n=It.get[t];Tt.tabs.active.get()?A.active.setContent(n):Tt.tabs.openInNewTab(n)},onFileDragStart:function(t){console.log("[DRAG MOVE] onFileDragStart",t),ot.current=[{type:"file",files:t}]},onFileDragEnd:function(){console.log("[DRAG MOVE] onFileDragEnd"),ot.current=[]}}))))),Object(a.c)("div",{className:"right-wrapper dual-viewer-view"},Object(a.c)(st,{tabs:T,onUpdate:S}),D&&Object(a.c)(Jt.b,{tab:D,onGridUpdate:N,mobileView:rn}))))),ft.length>0&&Object(a.c)(ct,{images:ft,startingIndex:bt,onClose:Et.ui.lightbox.close}),wt&&Object(a.c)(pn,{id:kt,fileContent:xt,startString:vt,onUpdate:function(t){yt(t)},onClose:function(){Ot(!1)}}))}),null),document.getElementById("root"))},49:function(t,n,e){"use strict";e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return s}));e(0);var o=e(109),c=e(103),i=e(106),a=e(1),r=400,l=function(t,n,e){if(!t)return"";var o=t.querySelector("iframe"),c=Object(i.c)(n,{delay:100}),a='<div id="'.concat(c,'" class="resource-link-ctag"><div class="loading-string">loading...</div></div>'),r=!o||!0===e;t.innerHTML=r?a:""},s=function(t,n,e){return e||(e={}),e.file||(e.file=Object(c.a)()),Object(a.c)(o.a,{file:e.file,block:{type:"tag",tagName:t,content:n,start:0,end:0},windowHeight:r+75,windowId:e.windowId||"null",yCnt:0,onIframeMouseWheel:function(){},ctagSandboxed:e.sandboxed,ctagFullscreen:e.fullscreen,ctagOnFullscreenClose:e.onFullscreenClose})}},51:function(t,n,e){"use strict";e.d(n,"a",(function(){return d})),e.d(n,"b",(function(){return f}));var o=e(5),c=e(6),i=e(20),a=e(21),r=e(0),l=e.n(r),s=e(10),u=e(14),p=e(1),d=function(t){Object(i.a)(e,t);var n=Object(a.a)(e);function e(){var t;Object(o.a)(this,e);for(var c=arguments.length,i=new Array(c),a=0;a<c;a++)i[a]=arguments[a];return(t=n.call.apply(n,[this].concat(i))).canBgClose=!t.props.canBgClose||t.props.canBgClose,t}return Object(c.a)(e,[{key:"render",value:function(){var t=this;return Object(p.c)("div",{className:"popup-wrapper-component"},Object(p.c)("div",{className:"overlay-click-popup",onClick:function(n){t.canBgClose&&t.props.onClose()}}),Object(p.c)("div",{className:"popup-wrapper ".concat(Object(u.c)()?"ipad":"")},Object(p.c)("div",{className:"popupTitle"}," ",this.props.title),Object(p.c)("div",{className:"popupContent"},this.props.children)))}}]),e}(l.a.Component),f=function(){return"\n.popup-wrapper-component {\n\t\t\t\tposition: absolute;\n top: 0px;\n left: 0px;\n .overlay-click-popup {\n position: fixed;\n z-index:1000;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n background: rgba(0,0,0,0.1);\n }\n .popup-wrapper {\n position: fixed;\n z-index:1001;\n left: 50%;\n top:50%;\n &.ipad {\n top:20%;\n }\n width : auto;\n max-width: 90%;\n transform:translate(-50%,-50%);\n\t\t\t\tbackground: ".concat(s.a.colors.bgPopup,";\n border-radius:6px;\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n .popupTitle {\n margin: 0px 0px 20px 0px;\n text-align: left;\n background: ").concat(s.a.colors.main,";\n color: white;\n font-weight: 700;\n text-transform: uppercase;\n font-size: 14px;\n padding: 5px 0px 5px 20px;\n border-radius:6px 6px 0px 0px;\n }\n .popupContent {\n padding: 0px 20px 20px 20px;\n // min-width : 350px;\n }\n img{\n padding: 0px 5px 0px 0px;\n margin: 5px 5px 0px 0px;\n }\n }\n}\n")}},52:function(t,n,e){"use strict";e.d(n,"a",(function(){return c})),e.d(n,"c",(function(){return i})),e.d(n,"b",(function(){return a}));var o=e(18),c=function(t){var n=((new Date).getTime()-t.getTime())/1e3,e=604800,c="";if(n<=3600)c="".concat(Math.ceil(n/60)," ").concat(o.a.minsAgo);else if(n>3600&&n<=86400)c="".concat(Math.ceil(n/3600)," ").concat(o.a.hoursAgo);else if(n>86400&&n<=e)c="".concat(Math.ceil(n/86400)," ").concat(o.a.daysAgo);else if(n>e){var i=("0"+t.getDate()).slice(-2),a=o.a.months[t.getMonth()],r=t.getFullYear().toString();c="".concat(i," ").concat(a," ").concat(r)}return c},i=function(t){t||(t=(new Date).getTime());var n=new Date(t);return[n.getFullYear(),n.getMonth()+1,n.getDate()]},a=function(t){var n=(new Date).getTime();return"lastMonth"===t&&(n=n-432e5),n}},53:function(t,n,e){"use strict";e.d(n,"a",(function(){return r})),e.d(n,"b",(function(){return l}));var o=e(110),c=e(8),i=e(0),a=e(1),r=function(t){var n,e=Object(i.useRef)(),r=function(){t.shouldFocus&&e.current.focus()};Object(i.useEffect)((function(){r()}),[t.shouldFocus]),Object(i.useEffect)((function(){r()}),[]);var l="checkbox"===t.type&&(!0===t.value||"true"===t.value),s=t.value;Object(c.isBoolean)(s)&&(s="");return Object(a.c)("div",{className:"input-component-wrapper ".concat(t.style?Object(o.a)(t.style,";",""):"")},Object(a.c)("div",{className:"input-component ".concat(t.id?t.id:""," ").concat(t.type)},t.label&&Object(a.c)("span",{onClick:function(n){"checkbox"===t.type&&(e.current.checked=!e.current.checked,t.onChange&&t.onChange(e.current.checked))}},t.label," "),Object(a.c)("div",{className:"input-wrapper"},"select"!==t.type&&Object(a.c)("input",{ref:e,type:t.type?t.type:"text",value:s,checked:l,readOnly:t.readonly,onFocus:function(){t.onFocus&&t.onFocus()},onClick:function(){!t.shouldNotSelectOnClick&&e.current.select()},onKeyPress:function(n){"Enter"==(n.code||n.key)&&t.onEnterPressed&&t.onEnterPressed()},onChange:function(n){t.onCheckedChange&&t.onCheckedChange(n.target.checked),t.onChange&&t.onChange(n.target.value)}}),"select"===t.type&&Object(a.c)("select",{value:s,onChange:function(n){t.onSelectChange&&t.onSelectChange(n.target.value)}},null===(n=t.list)||void 0===n?void 0:n.map((function(t,n){return Object(a.c)("option",{value:t.key},t.label," ")}))),t.explanation&&Object(a.c)("div",{className:"explanation"}," ",t.explanation," "))))},l=function(){return"\n .input-component {\n display: flex;\n align-items: center;\n padding-bottom: 10px;\n input, select {\n max-width: 100%;\n }\n &.select {\n span {\n width: 20%;\n }\n }\n span {\n width: 30%;\n font-weight: 700;\n text-transform: uppercase;\n }\n .input-wrapper {\n width: 70%;\n input {\n padding: 7px;\n border: none;\n background: #ececec;\n border-radius: 5px;\n }\n .explanation {\n font-size: 11px;\n color: grey;\n }\n }\n }\n"}},54:function(t,n,e){"use strict";e.d(n,"a",(function(){return u}));var o=e(19),c={};window.dbscroll=c;o.a.client.log.verbose;var i=function(t){var n=document.querySelector(".window-id-".concat(t," .preview-area")),e=document.querySelector(".window-id-".concat(t," .cm-scroller")),o=document.querySelector(".window-id-".concat(t," .scrolling-bar-wrapper"));return c[t]||(c[t]={els:{preview:n,editor:e,scroller:o},dims:{editor:{viewport:0,full:0},preview:{viewport:0,full:0},scroller:{viewport:0,full:0}},posPercent:0,previewOffsetY:0}),c[t].els.preview=n,c[t].els.editor=e,c[t].els.scroller=o,c[t]},a=function(t,n){var e=i(t);if(e.els.editor){n||(n=e.posPercent);var o=e.els.scroller.dataset;o.scrollRefresh||(o.scrollRefresh=1),o.scrollRefresh=parseInt(o.scrollRefresh)+1}},r=function(t,n){var e=i(t);if(e.els.editor){var o=e.dims.editor;n||(n=e.posPercent);var c=(o.full-o.viewport)/100;e.els.editor.scrollTop=c*n}},l=function(t,n){var e=i(t);if(e.els.editor&&e.els.preview){var o=e.dims.preview;n||(n=e.posPercent);var c=o.full/100,a=Math.round(c*n);e.els.preview.scrollTop=a+e.previewOffsetY}},s=function(t,n){var e=i(t);if(e.els.editor){var o=e.dims.preview.full/100,c=n-Math.round(o*e.posPercent);e.previewOffsetY=c}},u={getScrollObj:i,updateEditorDims:function(t,n){var e=i(t);e.els.editor&&e.els.preview&&(e.dims.editor=n)},updatePreviewDims:function(t){var n=i(t);if(n.els.editor&&n.els.preview){var e=n.els.preview.querySelector(".simple-css-wrapper").clientHeight,o=n.els.preview.clientHeight;n.dims.preview={viewport:o,full:e}}},updateScrollerDims:function(t){var n=i(t);if(n.els.editor&&n.els.preview){var e=n.dims.editor.viewport/n.dims.editor.full||1e7,o=n.dims.preview.viewport/n.dims.preview.full||1e7,c=e<o?e:o,a=n.els.scroller.clientHeight,r=c*a,l={viewport:r=r>a?a:r,full:a};n.dims.scroller=l;var s=n.els.scroller.dataset;s.scrollRefresh||(s.scrollRefresh=1),s.scrollRefresh=parseInt(s.scrollRefresh)+1}},updatePreviewOffset:s,onEditorScroll:function(t,n){var e=i(t);e.els.editor&&(e.posPercent=n,a(t,n),l(t,n))},onScrollerScroll:function(t,n){var e=i(t);e.els.editor&&(e.posPercent=n,r(t,n),l(t,n))},onPreviewScroll:function(t){var n=i(t);if(n.els.editor){var e=n.els.preview.scrollTop;s(t,e)}},onWindowLoad:function(t){if(c[t]){var n=i(t);if(!n.els.editor)return;var e=n.posPercent;a(t,e),r(t,e),l(t,e)}},scrollEditor:r,scrollPreview:l,scrollScroller:a}},55:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(5),c=e(6),i=e(20),a=e(21),r=e(11),l=e(64),s=function(t){Object(i.a)(e,t);var n=Object(a.a)(e);function e(t,c){var i;return Object(o.a)(this,e),(i=n.call(this)).match=t,i.replacement=c,i}return Object(c.a)(e,[{key:"toDOM",value:function(){return this.replacement(this.match)}}]),e}(r.g),u={};Object(l.a)("code_mirror","cache_get",(function(){return u}));var p=function(t,n,e){return new r.e({regexp:t,decoration:function(t){var o=t.input,c=e.path;if(u[c]||(u[c]={}),!u[c][o]){var i=new s(t,n),a=r.a.widget({widget:i});u[c][o]=a}return u[c][o]}})},d=function(t,n){return new r.e({regexp:t,decoration:function(t){return r.a.mark({class:n(t)})}})},f=function(t){return r.f.fromClass(function(){function n(e){Object(o.a)(this,n),this.decorations=void 0,t.replacement?this.decorations=p(t.pattern,t.replacement,t.file).createDeco(e):this.decorations=d(t.pattern,t.classWrap).createDeco(e)}return Object(c.a)(n,[{key:"update",value:function(n){try{t.replacement&&(n.docChanged||n.viewportChanged)?this.decorations=p(t.pattern,t.replacement,t.file).updateDeco(n,this.decorations):this.decorations=d(t.pattern,t.classWrap).updateDeco(n,this.decorations)}catch(e){console.warn("[ERROR VIEWPLUGIN CM]",e,n)}}}]),n}(),{decorations:function(t){return t.decorations},provide:function(n){return r.c.atomicRanges.of((function(e){var o,c,i=(null===(o=e.plugin(n))||void 0===o?void 0:o.decorations)||r.a.none;return null!==(c=t.options)&&void 0!==c&&c.isAtomic||(i=r.a.none),i}))}})}},56:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(9),c=e(0);function i(t,n){var e=Object(c.useState)((function(){try{var e=window.localStorage.getItem(t);return e?JSON.parse(e):n}catch(o){return console.log(o),n}})),i=Object(o.a)(e,2),a=i[0],r=i[1];return[a,function(n){try{var e=n instanceof Function?n(a):n;r(e),window.localStorage.setItem(t,JSON.stringify(e))}catch(o){console.log(o)}}]}},58:function(t,n,e){"use strict";e.d(n,"a",(function(){return u}));var o=e(19),c=e(142),i="[Code Mirror]",a=o.a.client.log.verbose,r=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];a&&console.log(i," update cursor",n,t);try{e&&t.view.dispatch({selection:{anchor:n,head:n},scrollIntoView:!0})}catch(o){console.warn(i,"update Cursor error",o)}},l=0,s=function(t){if(console.log("GET SCROLLING LINE -> NOT USED, SHOULD BE UPDATED"),!t.view)return-1;for(var n=t.view.state.doc.toString(),e=t.view.elementAtHeight(t.view.scrollDOM.scrollTop).from,o=n.split("\n"),c=0,i=0,a=0;a<o.length&&(c+=o[a].length)<e;a++)i=a;l=i},u={getEditorInfos:function(t){var n=t,e=Math.round(n.viewState.pixelViewport.top),o=n.lineBlockAtHeight(e),c=n.state.doc.lineAt(o.from).number,i=n.contentHeight,a=n.viewState.editorHeight,r=(i-a)/100;return{viewportHeight:a,contentHeight:i,visibleFirstLine:c,percentPx:r,currentPercentScrolled:n.viewState.pixelViewport.top/r}},getCurrentLineInfos:function(t){var n=t.view.state.doc.lineAt(t.view.state.selection.main.head).number-1,e=function(t){return t.view.state.selection.ranges[0].from}(t),o=t.view.state.doc.toString().split("\n");return{lines:o,currentPosition:e,activeLine:o[n]||"",lineIndex:n}},getScrolledLine:function(t){return s(t),l},updateCursor:r,updateText:function(t,n,e){var o=t.view.state.doc.toString().length,c=t.view.state.selection.ranges[0].from;t.view.dispatch(t.view.state.update({changes:{from:0,to:o,insert:n}})),r(t,c,!0)},scrollTo:function(t,n){if(!t.view)return-1;r(t,n,!0)},scrollToLine:function(t,n){var e=t.view.state.doc.line(n);r(t,e.from,!0)},getCustomTheme:c.a}},62:function(t,n,e){"use strict";e.d(n,"a",(function(){return g})),e.d(n,"c",(function(){return h})),e.d(n,"b",(function(){return m}));var o=e(9),c=e(8),i=e(0),a=e(14),r=e(72),l=e(10),s=e(108),u=e(109),p=e(54),d=e(80),f=e(88),b=e(1),g=function(t){var n={wrapper:Object(i.useRef)(null),main:Object(i.useRef)(null)},e=t.file.path.split("/");e.pop();e.join("/");Object(i.useEffect)((function(){setTimeout((function(){t.onMaxYUpdate(l())}),1e3)}),[t.fileContent]);var l=function(){var t=n.main.current;return 2*((null===t||void 0===t?void 0:t.clientHeight)||3e3)},s=Object(i.useState)([]),d=Object(o.a)(s,2),f=d[0],g=d[1];Object(i.useEffect)((function(){var n=r.b.chunks.chunk(t.fileContent);g(n),setTimeout((function(){r.b.injectLogic({fileContent:t.fileContent,file:t.file})}),100),setTimeout((function(){p.a.updatePreviewDims(t.windowId),p.a.updateScrollerDims(t.windowId)}),100)}),[t.fileContent]);var h=function(){var n=0,e=document.querySelector(".window-id-".concat(t.windowId));return e&&(n=e.clientHeight),"mobile"===Object(a.a)()&&0===n&&(n=document.body.clientHeight-120),n};return Object(b.c)("div",{className:"preview-area-wrapper render-latex",onWheelCapture:function(n){p.a.onPreviewScroll(t.windowId)}},Object(b.c)("div",{className:"preview-area",ref:n.wrapper,style:{bottom:function(){var n=l(),e=t.posY+0;return Object(c.clamp)(e,0,n)}()}},Object(b.c)("div",{className:"preview-area-transitions"},Object(b.c)("div",{className:"infos-preview-wrapper"},Object(b.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(b.c)("h1",{className:"title big-title"},t.file.name.replace(".md",""))),Object(b.c)("div",{className:"content-blocks-wrapper"},Object(b.c)("div",{className:"simple-css-wrapper"},f.map((function(n,e){return Object(b.c)(u.a,{key:e,index:e,block:n,windowId:t.windowId,file:t.file,windowHeight:h(),yCnt:t.yCnt,onIframeMouseWheel:t.onIframeMouseWheel})})))))))},h=function(t){return t||(t={w:".simple-css-wrapper",pl:".preview-link",r:".resource-link-icon"}),"\n\n\t\thtml, body {\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px;\n\t\t}\n\n\t\t".concat(t.w," {\n\t\t\t\tcolor: ").concat(l.a.colors.editor.font,";\n\t\t\t\tline-height: 19px;\n\t\t\t\tfont-size: 11px;\n\t\t\t\tfont-family:").concat(l.a.font.main,";\n\t\t}\n\n\t\tbutton,\n\t\tinput {\n\t\t\t\tfont-family:").concat(l.a.font.main,";\n\t\t\t\tfont-weight: 700;\n\t\t\t\tcolor: ").concat(l.a.colors.l2.title,";\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t// COUNTER TITLES\n\n*********************************************************/\n\n\t\t").concat(t.w,' {\n\t\t\t\toverflow-wrap: break-word;\n\t\t\t\tcounter-reset: sh1 ;\n\t\t}\n\n\n\t\th1:before {\n\t\t\t\tcontent: ""counter(sh1)" \u2219 ";\n\t\t\t\tcounter-increment: sh1;\n\t\t}\n\t\th1 {\n\t\t\t\tcounter-reset: sh2;\n\t\t}\n\n\t\th2:before {\n\t\t\t\tcontent: ""counter(sh1)"." counter(sh2)" \u2219 ";\n\t\t\t\tcounter-increment: sh2;\n\t\t}\n\t\th2 {\n\t\t\t\tcounter-reset: sh3;\n\t\t}\n\n\t\th3:before {\n\t\t\t\tcontent: ""counter(sh1)"." counter(sh2)"."counter(sh3)" \u2219 ";\n\t\t\t\tcounter-increment: sh3;\n\t\t}\n\t\th3 {\n\t\t}\n\n\n\n\t\t/**********************************************************\n\n\t\t// BASIC STYLE\n\n**********************************************************/\n\n\t\ta {\n\t\t\t\tcolor: ').concat(l.a.colors.main,";\n\t\t}\n\n\t\t.main-color, .main-color:before, .main-color:after {\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t}\n\t\t.title {\n\t\t\t\tmargin: 0px 0px;\n\t\t}\n\n\t\th1:before, h2:before, h3:before, h4:before, h5:before, h6:before {\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t}\n\t\th1, h2, h3, h4, h5, h6 {\n\t\t\t\tposition:relative;\n\t\t\t\tcolor: ").concat(l.a.colors.main,';\n\t\t\t\tmargin-top: 0px;\n\t\t\t\tline-height: normal;\n\t\t\t\tmargin-right: 10px;\n\t\t}\n\t\th1:after,\n\t\th2:after {\n\t\t\t\tcontent: "-";\n\t\t\t\tbackground: ').concat(l.a.colors.main,";\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 2px;\n\t\t\t\tposition: absolute;\n\t\t\t\tbottom: 0px;\n\t\t\t\tleft: 0px;\n\t\t\t\tfont-size: 0px;\n\t\t\t\t/* opacity: 0.4; */\n\t\t}\n\t\th2:after {\n\t\t\t\t/* width: 70%; */\n\t\t\t\theight: 1px;\n\t\t}\n\t\th1 {\n\t\t\t\tpadding: 5px;\n\t\t\t\t/* border-bottom: 2px solid; */\n\t\t\t\tmargin-top: 30px;\n\t\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\th2 {\n\t\t\t\tpadding: 5px;\n\t\t\t\t/* border-bottom: 1px solid; */\n\t\t}\n\t\th2, h3, h4, h5, h6 {\n\t\t\t\tmargin-bottom: 10px;\n\t\t\t\tmargin-top: 25px;\n\t\t}\n\n img,\n .content-image {\n\t\t\t\tcursor: pointer;\n }\n\t\t\t.content-image-img {\n\t\t\t\t\t").concat(l.a.els().images,"\n\t\t\t\t\tcursor: pointer;\n\t\t\t}\n\n p {\n\t\t\t\tdisplay: inline;\n }\n\n\n\t\t/**********************************************************\n\n\t\t// LIST\n\n**********************************************************/\n\t\t.no-css ul li {\n\t\t\t\tbackground: none!important;\n\t\t\t\tpadding: 0px;\n\t\t}\n\n\t\tul {\n\t\t\t\tpadding: 0px;\n\t\t\t\tlist-style-image: \"./custom_icons/view-1.svg\"; \n\t\t\t\tlist-style: none; \n\t\t}\n\n\t\tul li {\n\t\t\t\tpadding-left: 12px;\n\t\t}\n\t\tul li:before {\n\t\t\t\tcontent: '-';\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t\t\twidth: 10px;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tfont-size: 15px;\n\n\t\t\t\t/* background-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-position: -3px 4px; */\n\t\t\t\t/* background-size: 11px; */\n\n\t\t\t\t/* background-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-color: ").concat(l.a.colors.main,'; */\n\t\t\t\t/* -webkit-mask-position: -3px 4px; */\n\t\t\t\t/* -webkit-mask-size: 11px; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* -webkit-mask-repeat: no-repeat; */\n\t\t}\n\t\tul li p {\n\t\t\t\tmargin: 0px;\n\t\t}\n\n\t\tul input[type=checkbox] {\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 0px;\n\t\t\t\theight: 10px;\n\t\t\t\tmargin-right: 9px\n\t\t}\n\t\tul input[type=checkbox]:before {\n\t\t\t\tcontent: "";\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 15px;\n\t\t\t\theight: 15px;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: -4px;\n\n\t\t\t\tbackground-color: ').concat(l.a.colors.main,";\n\t\t\t\t/* background-image: url(./custom_icons/check.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-size: contain; */\n\t\t\t\tmask-position: -2px -1px;\n\t\t\t\tmask-image: url(./custom_icons/check.svg);\n\t\t\t\tmask-size: contain;\n\t\t\t\tmask-repeat: no-repeat;\n\n\t\t\t\t-webkit-mask-position: -2px -1px;\n\t\t\t\t-webkit-mask-image: url(./custom_icons/check.svg);\n\t\t\t\t-webkit-mask-size: contain;\n\t\t\t\t-webkit-mask-repeat: no-repeat;\n\t\t}\n\t\tul input[type=checkbox]:checked:before {\n\t\t\t\t/* background-color: red; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* background-image: url(./custom_icons/uncheck.svg); */\n\n\t\t\t\t/* background-color: red; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\tmask-image: url(./custom_icons/uncheck.svg);\n\t\t\t\t-webkit-mask-image: url(./custom_icons/uncheck.svg);\n\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t PREVIEW LINK\n\n**********************************************************/\n\n\n\t\t").concat(Object(f.b)(t.pl),"\n\n\t\t/**********************************************************\n\n\t\t// TABLE\n\n**********************************************************/\n\n\t\ttable {\n\t\t\t\tmargin: 10px 0px;\n\t\t\t\tpadding 15px;\n\t\t\t\tborder-spacing: 0;\n\t\t\t\tborder-collapse: collapse;\n\t\t}\n\n\n\t\tth {\n\t\t\t\ttext-align: left;\n\t\t\t\tpadding: 10px 10px;\n\t\t}\n\t\ttd {\n\t\t\t\tpadding: 5px 10px;\n\t\t}\n\t\tthead tr {\n\t\t\t\tbackground: #e4e3e3;\n\t\t}\n\t\tth, td {\n\t\t\t\tborder: 1px solid #ccc;\n\t\t}\n\t\ttbody {\n\t\t}\n\t\t// tbody tr:nth-child(even) {background: #CCC}\n\t\t// tbody tr:nth-child(odd) {background: #EEE}\n\n\t\t/**********************************************************\n\n\t\t// RESSOURCE LINK\n\n**********************************************************/\n\t\t").concat(Object(d.b)(),"\n\n\t\tpre {\n\t\t}\n\n\t\tpre code {\n\t\t\t\tdisplay: block;\n\t\t\t\tborder-radius: 8px;\n\t\t\t\tbackground: #d2d2d2;\n\t\t\t\tpadding: 11px 23px;\n\t\t}\n\t\t")},m=function(){return"\n.preview-area {\n\t\tmargin-top: 0px;\n .infos-preview-wrapper {\n\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n display: ".concat(Object(a.b)("desktop")?"none":"block",";\n\t\t\t\tpadding: 5px 0px 12px 0px;\n\t\t}\n}\n.preview-area {\n position: relative;\n display: block;\n\toverflow: auto; \n\twidth: calc(100% );\n padding-right: 30px;\n\n ").concat(s.b,"\n\n .infos-preview-wrapper {\n }\n\t\t.infos-preview-wrapper h1.big-title {\n\t\t\t\twidth: calc(100% - 65px);\n\t\t\t\tfont-family: ").concat(l.a.font.editor,";\n\t\t\t\tcolor: grey;\n\t\t\t\tfont-size: 15px;\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px 14px;\n\t\t}\n}\n.content-blocks-wrapper {\n\t\t").concat(h(),"\n}\n.view-both .preview-area {\n\t\t// margin-top: 20px;\n\t\tmargin-top: 0px;\n}\n\n.preview-area-wrapper {\n\t\theight: calc(100% - 35px);\n margin-top: ").concat(Object(a.b)("desktop")?"140":"0","px;\n\n}\n\n")}},64:function(t,n,e){"use strict";e.d(n,"a",(function(){return c})),e.d(n,"b",(function(){return i}));var o="tiroDevCli",c=function(t,n,e){console.log("[TIRO DEV CLI] adding ",t,n),window[o]||(window[o]={}),window[o][t]||(window[o][t]={}),window[o][t][n]=e},i=function(t,n){return window[o]&&window[o][t]&&window[o][t][n]?window[o][t][n]:function(){console.log("DEV FN",t,n,"does not exists")}}},65:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return c}));var o=function(t){return t.path.substr(0,t.path.length-(t.title.length+1))},c=function(t){var n=t.split("/");(n=n.filter((function(t){return""!==t}))).pop();var e="/"+n.join("/")+"/";return e=e.replaceAll("//","/")}},70:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(9),c=e(0),i=e(19),a=e(13);function r(t,n){var e=Object(c.useState)(n),r=Object(o.a)(e,2),l=r[0],s=r[1],u="/".concat(i.a.path.configFolder,"/").concat(i.a.path.backendStateFolder,"/").concat(t,".md");'[BACKEND STATE] "'.concat(t,'" clientApi not loaded! Persistance system will not work correctly');Object(c.useEffect)((function(){p()}),[]);var p=function(cb){Object(a.d)((function(t){t.file.getContent(u,(function(t){var n=JSON.parse(t);s(n),cb&&cb(n)}))}))};return[l,function(t){s(t),Object(a.d)((function(n){n.file.saveContent(u,JSON.stringify(t))}))},p]}},71:function(t,n,e){"use strict";e.d(n,"b",(function(){return c})),e.d(n,"a",(function(){return i})),e.d(n,"d",(function(){return a})),e.d(n,"c",(function(){return r}));var o=e(8),c=["Az","Crea","Modif"],i=["alphabetical","created","modified"],a=function(t,n){var e;switch(i[n]){case"alphabetical":default:e=Object(o.sortBy)(t,[function(t){return t.realname.toLocaleLowerCase()}]);break;case"created":e=Object(o.sortBy)(t,["created"]).reverse();break;case"modified":e=Object(o.sortBy)(t,["modified"]).reverse()}return e},r=function(t){var n=t[0];return n?(Object(o.each)(t,(function(t){t.created&&n.created&&t.created>n.created&&(n=t)})),n):null}},72:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return f}));var o=e(12),c=e(8),i=e(26),a=e(102),r=e(73),l=e(35),s=function(t){var n=Object(o.a)({},t),e=n.raw,c=n.file,i=n.windowId;i||(i="");var s=Object(r.b)(Object(l.d)(c,Object(l.c)(c,Object(l.e)(Object(l.f)(i,Object(l.g)(e))))));return Object(a.b)(),s},u=function(t,cb){for(var n=document.getElementsByClassName(t),e=function(){var t=n[o];t.onclick=function(){cb(t)}},o=0;o<n.length;o++)e()},p=function(t){var n=t.split(i.a.userCustomTagManual),e=[],o=[],a=i.a.userCustomTag3,r=t.match(a)||"",l=[];Object(c.each)(r,(function(t){l.push(t)}));var s=null,u=-1,p=[],d=[],f={};if(Object(c.each)(l,(function(t){f[t]?f[t]=f[t]+1:f[t]=1})),Object(c.each)(f,(function(t,n){t>=2&&d.push(n)})),Object(c.each)(l,(function(t,e){if(d.includes(t))if(s){if(s===t){var c=[u+1,e+1];p.push.apply(p,c);for(var i=n.slice(c[0],c[1]),a=l.slice(u+1,e+1),r="",f=0;f<i.length;f++){var b=f===i.length-1?"":a[f];r+="".concat(i[f]).concat(b)}o.push({type:"tag",tagName:s.replace("[[","").replace("]]",""),content:r,start:u,end:e}),u=-1,s=null}}else s=t,u=e})),0===p.length)e.push({type:"text",content:t,start:0,end:1});else{p.unshift(0);for(var b=0;b<p.length;b+=2){var g=p[b];n[g]&&e.push({type:"text",content:n[g],start:g,end:g+1})}}for(var h=0===t.indexOf(l[0]),m=[],v=o.length>e.length?o.length:e.length,w=0;w<v;w++)h?(o[w]&&m.push(o[w]),e[w]&&m.push(e[w])):(e[w]&&m.push(e[w]),o[w]&&m.push(o[w]));return m},d=function(t){var n="";return Object(c.each)(t,(function(t){"text"===t.type?n+=t.content:"tag"===t.type&&(n+="[[".concat(t.tagName,"]]").concat(t.content,"[[").concat(t.tagName,"]]"))})),n},f={render:function(t){var n=Object(o.a)({},t),e=n.raw,i=n.file,a=n.windowId;a||(a="");var r=p(e);return Object(c.each)(r,(function(t){"text"===t.type&&(t.content=s({raw:t.content,file:i,windowId:a})),"tag"===t.type&&(t.content=Object(l.b)(t.content))})),d(r)},injectLogic:function(t){},chunks:{chunk:p,merge:d}}},73:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"d",(function(){return r})),e.d(n,"c",(function(){return l})),e.d(n,"a",(function(){return u}));var o=e(17),c=e(8),i=e(329);i.setOptions({gfm:!0,breaks:!0,headerPrefix:"t-"});var a=function(t){var n=t;return n=i.parse(n)},r=function(t,n,e){var o=t,i=o.match(n)||"";return Object(c.each)(i,(function(t){o=o.replace(t,e(t))})),o},l=function(t,n,e){var o=t,c=n.replace("[[","").replace("]]",""),i="(?:\\[\\[".concat(c,"\\]\\])((?:[^]*))(?:\\[\\[").concat(c,"\\]\\])"),a=new RegExp(i,"gm"),r=o.match(a)||"";if(r[0]){for(var l=r[0].split(n),s=[],u=0;u<l.length;u++){var p=l[u];""!==p&&s.push(p)}for(var d=0;d<s.length;d++){s[d];if(d%2===0)try{s[d]=e(s[d])}catch(b){console.warn("[REPLACE CUSTOM MD TAGS] error: ".concat(b),s[d])}}var f=s.join("");o=o.replace(a,f)}return o},s=function t(n,e){var o=!1;if(Object(c.each)(n,(function(t){t.id===e&&(o=!0)})),o){var i=!1,a=[e[e.length-2],e[e.length-1]],r=e.slice(0,-2),l=parseInt(a[1]);return"-"!==a[0]||isNaN(l)||(i=!0),i?e="".concat(r,"-").concat(l+1):e+="-1",t(n,e)}return e},u=function(t){for(var n=[],e=t.split("\n"),c=[],i=0;i<e.length;i++){var a=e[i],r=Object(o.a)(a.matchAll(/([#]{1,9})\ (.+)/gi));if(r.length>0){var l=r[0],u=l[2].toLowerCase(),p=i,d=u.trim().split(" ").join("-").replace(/[^a-zA-Z0-9-_\xc0-\xfa]/gi,"");d=s(c,d),c.push({raw:a,matches:l,id:d,line:p,title:u,ranking:l[1].length}),n.push({id:d,title:u,line:p})}}return n}},76:function(t,n,e){"use strict";e.d(n,"b",(function(){return m})),e.d(n,"a",(function(){return v})),e.d(n,"c",(function(){return w}));var o=e(9),c=e(0),i=e(56),a=e(18),r=e(51),l=e(53),s=e(13),u=e(70),p=e(8),d=e(36),f=e(10),b=e(47),g=e(23),h=e(1),m=function(t){var n=localStorage.getItem("settings-".concat(t))||"";return Object(b.a)(n,[['"',""]])},v=function(t){var n=Object(i.a)("settings-backend-port",-1),e=Object(o.a)(n,2),f=e[0],b=e[1],m=Object(i.a)("settings-backend-protocol","same"),v=Object(o.a)(m,2),w=(v[0],v[1],Object(c.useContext)(s.a)),O=a.a.settingsPopup,j=[];if(w){var x=w.userSettings,k="".concat(window.location.protocol,"//"),y="".concat(k).concat(w.status.ipsServer.getLocal()).concat(d.a.global.port),C="https://api.qrserver.com/v1/create-qr-code/?size=400x400&margin=50&data=".concat(y);j=[{title:"Devices",fields:[{type:"text",var:y,customHtml:'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class="qrcode-wrapper">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// <img src="'.concat(C,'"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>'),title:"Tiro Url",readOnly:!0,expl:"Access Tiro on another device on the <b>same wifi/local network</b> either by :\n\t\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\t - Entering that url in a browser\n\t\t\t\t\t\t\t\t\t\t\t\t <br>\n\t\t\t\t\t\t\t\t\t\t\t\t - Scanning that qrcode (on desktop, go to a website like <a href='https://webqr.com/'>webqr.com </a>)",modifier:function(){},onCustomHtmlClick:function(){w.ui.lightbox.open(0,[C])}},{type:"none",var:"",customHtml:"<button> Open Tiro Window </button>",title:"Open Tiro Window",readOnly:!0,expl:"Open Tiro in a separate window (Desktop only)",modifier:function(){},onCustomHtmlClick:function(){window.open(window.location.href,"popup-tiro","width=800,height=1000"),window.open("","_self").close()}}]},{title:"layout",fields:[{type:"text",title:"Main color",expl:"A color string like 'orange' or 'blue' or an Hex string like '#E86666' (tiro red) or '#729fc4'",var:x.get("ui_layout_colors_main"),modifier:function(t){x.set("ui_layout_colors_main",t)}},{type:"checkbox",title:"Sidebar Shortcut Panel",expl:"Adds a shortcuts/scratchpad space in the sidebar. To edit it, create a note in '.tiro/shortcuts.md'",var:x.get("ui_layout_shortcuts_panel"),modifier:function(t){x.set("ui_layout_shortcuts_panel",t)}}]},{title:"editor",fields:[{type:"checkbox",title:"Markdown Preview",expl:"Preview Images and Latex in the editor",var:x.get("ui_editor_markdown_preview"),modifier:function(t){R(!0),x.set("ui_editor_markdown_preview",t)}},{type:"checkbox",title:"Links button",expl:"Replace http links into buttons in the editor by adding a '/' at the end of it.",var:x.get("ui_editor_links_as_button"),modifier:function(t){R(!0),x.set("ui_editor_links_as_button",t)}},{type:"checkbox",title:"Improved Markdown Table",expl:"Improves the display of markdown table. Can be disabled inside a note if it includes '--no-editor-table'. ",var:x.get("ui_editor_markdown_table_preview"),modifier:function(t){R(!0),x.set("ui_editor_markdown_table_preview",t)}}]},{title:"Users and Rights",fields:[{type:"checkbox",title:"Enable read-only viewer",expl:'Create a "viewer" user that can read but not edit the content',var:x.get("users_viewer_user_enable"),modifier:function(t){x.set("users_viewer_user_enable",t,{writeInSetupJson:!0})}},{type:"text",title:"Viewer user password",expl:'Define the "viewer" user password',var:x.get("users_viewer_user_password"),modifier:function(t){x.set("users_viewer_user_password",t,{writeInSetupJson:!0})}},{type:"checkbox",title:"Demo Mode",expl:"Autofill the 'viewer' user and password on login popup for easier access during a demo mode",var:x.get("demo_mode_enable"),modifier:function(t){x.set("demo_mode_enable",t,{writeInSetupJson:!0})}},{type:"none",var:"",customHtml:"<button> Logout </button>",title:"Logout current User",readOnly:!0,expl:"Logout Current User",modifier:function(){},onCustomHtmlClick:function(){Object(g.a)(),t.onClose(),Object(s.d)((function(t){t.folders.get(["/"],(function(){}))}))}}]},{title:"Advanced",fields:[{type:"text",var:f,title:O.backend.port,expl:O.backend.portExpl,modifier:b}]}]}var _=Object(u.a)("config-panels-opened",[]),E=Object(o.a)(_,3),T=E[0],S=E[1],I=(E[2],Object(c.useState)(!1)),N=Object(o.a)(I,2),F=N[0],R=N[1];return Object(h.c)("div",{className:"settings-popup-wrapper"},Object(h.c)(r.a,{title:"".concat(O.title),onClose:function(){t.onClose()}},j.map((function(t,n){return Object(h.c)("div",{className:"settings-panel"},Object(h.c)("h3",{onClick:function(){!function(t){var n=Object(p.cloneDeep)(T);n[t]=!n[t],S(n)}(n)}},Object(h.c)("div",{className:"arrow"},T[n]?"\u25bc":"\u25ba"),t.title),Object(h.c)("div",{className:"fields-wrapper ".concat(T[n]?"active":"")},t.fields.map((function(t){return Object(h.c)("div",{className:"field-wrapper"},Object(h.c)("div",{className:"input-and-html-wrapper"},"none"===t.type&&Object(h.c)("span",null,t.title),"none"!==t.type&&Object(h.c)(l.a,{value:t.var,label:t.title,type:t.type,readonly:t.readOnly,onChange:function(n){"checkbox"!==t.type&&t.modifier(n)},onCheckedChange:function(n){"checkbox"===t.type&&t.modifier(n)}}),t.customHtml&&Object(h.c)("div",{className:"custom-html-wrapper",onClick:function(n){t.onCustomHtmlClick&&t.onCustomHtmlClick()},dangerouslySetInnerHTML:{__html:t.customHtml}})),Object(h.c)("div",{className:"explanation",dangerouslySetInnerHTML:{__html:t.expl||""}}))}))))})),F&&Object(h.c)("button",{onClick:function(t){window.location.reload()}},"Reload App")))},w=function(){return"\n.device-view-mobile {\n\t.settings-popup-wrapper .popup-wrapper .popupContent {\n\t\t\t\twidth: 80vw;\n\t\t\t\t.field-wrapper {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tpadding: 5px 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t}\n}\n\n.settings-popup-wrapper .popup-wrapper .popupContent {\n padding: 0px 20px;\n\t\twidth: 50vw;\n\t\tmin-height: 50vh;\n\t\tmax-height: 70vh;\n\t\toverflow-y: scroll;\n\n}\n\n.settings-panel {\n\n\t\th3 {\n\t\t\t\tcursor: pointer;\n\t\t\t\ttext-transform: uppercase;\n\t\t\t\t.arrow {\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tfont-size: 7px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tbottom: 2px;\n\t\t\t\t\t\tmargin-right: 10px;\n\t\t\t\t}\n\t\t}\n\t\t.fields-wrapper {\n\t\t\t\tdisplay: none;\n\t\t\t\t&.active {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tpadding: 12px 12px 0px 12px;\n\t\t\t\t\t\tbackground: ".concat(f.a.colors.bgPopup2,";\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tborder: 1px ").concat(f.a.colors.bgPopup3," solid;\n\t\t\t\t\t\tmargin-top: 10px;\n\t\t\t\t}\n\t\t\t\t.field-wrapper {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tpadding-bottom: 11px;\n\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\t.input-and-html-wrapper {\n\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t.input-component {\n\t\t\t\t\t\t\t\t\t\tflex: 1;\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.custom-html-wrapper {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 20px;\n\t\t\t\t\t\t\t\t\t\t.qrcode-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\timg {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin: 5px 25px 0px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\twidth: 150px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n}\n\n\n\n\n.buttons {\n display: flex;\n padding: 20px 0px 0px 0px;\n button {\n width: 30%;\n padding: 10px;\n }\n}\n")}},77:function(t,n,e){"use strict";e.d(n,"d",(function(){return h})),e.d(n,"c",(function(){return O})),e.d(n,"a",(function(){return j})),e.d(n,"b",(function(){return x}));var o=e(17),c=e(9),i=e(8),a=e(0),r=e(38),l=e(19),s=e(64),u=e(16),p=e(71),d=e(23),f=e(70),b=e(56),g=e(13),h=function(t){var n=Object(a.useState)([]),e=Object(c.a)(n,2),s=e[0],u=e[1],d=Object(a.useState)(-1),h=Object(c.a)(d,2),O=h[0],j=h[1],x=Object(b.a)("selected-folder",""),k=Object(c.a)(x,2),y=k[0],C=k[1],_=Object(a.useState)(m),E=Object(c.a)(_,2),T=E[0],S=E[1],I=Object(a.useState)(""),N=Object(c.a)(I,2),F=N[0],R=N[1],A=Object(f.a)("folders-open",["/"]),D=Object(c.a)(A,3),L=D[0],P=D[1],M=D[2],z=Object(a.useRef)([]),B=function(t){t=Object(i.uniq)(t),P(t)};Object(a.useEffect)((function(){H(L)}),[L]);var H=function(t,n){n||(n={}),Object(i.isBoolean)(n.cache)||(n.cache=!0);var e=!!Object(i.isBoolean)(n.background)&&n.background,o=0;Object(g.d)((function(c){Object(i.each)(t,(function(i){var a="folder-scan-".concat(i),r=function(){c.folders.get([i],(function(i){var r;(!e&&W(i.pathBase,i.folders),c.cache.set(a,i,-1),++o>=t.length)&&((null===(r=n)||void 0===r?void 0:r.cb)&&n.cb())}))};n&&n.cache?c.cache.get(a,(function(c){var i;c?e||(W(c.pathBase,c.folders),++o>=t.length&&(null===(i=n)||void 0===i?void 0:i.cb)&&n.cb()):r()})):r()}))}))},U=Object(a.useRef)([]),W=function(t,n){var e=Object(i.cloneDeep)(U.current),o={current:e};Object(i.each)(n,(function(t){t&&(o.current=o.current.filter((function(n){return t.path!==n.path})))})),Object(i.each)(n,(function(t){t&&(o.current=w(t,o.current))})),e=o.current,U.current=e;var c=v("/",e);c&&S(c),R(t)};return{goTo:function(n,e,o){if(""!==n){n=Object(r.b)("".concat(n,"/"));l.a.client.log.verbose&&console.log("".concat("[BROWSER GO TO] "," ").concat(n," ").concat(e," ").concat(JSON.stringify(o))),t.searchUiApi.term.set(""),t.statusApi.searching.set(!0),C(n),t.filesApi.get(n,(function(n){t.statusApi.searching.set(!1);var c=t.userSettingsApi.get("ui_filesList_sortMode"),a=Object(p.d)(n,c),r=-1;if(e&&Object(i.each)(a,(function(t,n){t.name===e&&(r=n)})),j(r),u(a),o&&o.openIn){var l=a[r];"active"===o.openIn||"activeWindow"===o.openIn?t.tabsApi.active.get()?t.windowApi.active.setContent(l):t.tabsApi.openInNewTab(l):t.windowApi.updateWindows([o.openIn],l)}}))}},files:{active:{get:s[O],getIndex:O,set:j},set:u,get:s},folders:{refreshFromBackend:function(){M((function(t){z.current=t}))},base:F,get:function(){return T},clean:function(){S(m)},scan:H,open:{get:function(){return z.current},add:function(t){z.current=[].concat(Object(o.a)(z.current),[t]),B(z.current)},remove:function(t){Object(i.each)(t,(function(t){z.current=z.current.filter((function(n){return!n.startsWith(t)}))})),B(z.current)}},current:{get:y,set:C}}}},m={title:"",key:"",path:""},v=function t(n,e){for(var o,c=0;c<e.length;c++)if(Object(r.a)(e[c].path,n)){o=Object(i.cloneDeep)(e[c]);var a=e[c].children;if(Object(i.isArray)(a))for(var l=0;l<a.length;l++){var s=t(a[l].path,e);s&&(o.children[l]=s)}}return o},w=function(t,n){for(var e="add",o=0;o<n.length;o++)Object(r.a)(t.path,n[o].path)&&(n[o]=t,e="update");return"add"===e&&n.push(t),n},O={title:".trash",key:"/.tiro/.trash",path:"/.tiro/.trash"},j=function(t,n){console.log("[askFolderCreate]",t,n),u.b.emit("askFolderCreate",{newFolderName:t,parent:n,token:Object(d.b)()})},x=function(t,n){console.log("[askFolderDelete]",t,n),u.b.emit("askFolderDelete",{typeFolder:t,cacheFolderName:n,token:Object(d.b)()})};Object(s.a)("cache","clean_ctag_cache",(function(){Object(g.d)((function(t){t.folders.delete("cache","ctag-ressources")}))}))},80:function(t,n,e){"use strict";e.d(n,"a",(function(){return f})),e.d(n,"b",(function(){return g}));e(8),e(0);var o=e(38),c=e(23),i=e(14),a=e(33),r=e(49),l=e(47),s=e(10),u=e(35),p=e(1),d=400,f=function(t){var n=function(t){var n="",e=t.split(".");return"7z"===(n=e[e.length-1].split("?")[0])&&(n="d7z"),n},e=t.markdownTag.split("](")[1].slice(0,-1),s=t.markdownTag.split("](")[0].replace("![",""),d="".concat(Object(u.a)(t.file.folder),"/").concat(e).concat(Object(c.c)()),f="".concat(s,".").concat(n(e)),b=Object(o.b)(d),g="ress-".concat(Object(l.b)(b));Object(a.a)(t.file,b,(function(){var n=document.querySelector(".".concat(g," .iframe-wrapper"));n&&v(b,n,t.file.path)}));var m=a.d,v=function(t,e,c,i){var l=(null===i||void 0===i?void 0:i.fullscreen)||!1;null===i||void 0===i||i.fullscreen;if(e){var s=Object(o.d)(c);if(null!==i&&void 0!==i&&i.persist){var u=e.querySelector("iframe")?"closed":"open";Object(a.b)(s,t,u)}var p=function(){e.innerHTML=""};"epub"===n(t).toLocaleLowerCase()?Object(r.b)(e,Object(r.a)("epub",t,{file:s,fullscreen:l,onFullscreenClose:p}),null===i||void 0===i?void 0:i.openOnly):"pdf"===n(t).toLocaleLowerCase()?Object(r.b)(e,Object(r.a)("pdf",t,{file:s,fullscreen:l,onFullscreenClose:p}),null===i||void 0===i?void 0:i.openOnly):Object(r.b)(e,Object(r.a)("iframe",t,{fullscreen:l,onFullscreenClose:p}))}},w='<li title="Open link in detached window"\n\t\tonclick="'.concat(Object(a.c)("open-win-ress",(function(t){if(t){var n=t.dataset.link;window.open(n,"popup-preview-link","width=800,height=1000")}})),'"\n\t\tdata-link="').concat(b,'">').concat(m("up-right-from-square"),"</li>"),O=function(t,n){if(t){var e=t.dataset.link,o=t.dataset.filepath,c=function(t){return t.parentNode.parentNode.parentNode.parentNode.parentNode.querySelector(".iframe-wrapper")}(t);v(e,c,o,n)}},j='<li\n\t\tonclick="'.concat(Object(a.c)("preview-link-ress",(function(t){return O(t,{persist:!0})})),'"\n\t\ttitle="Toggle a pinned preview" \n\t\tdata-filepath="').concat(t.file.path,'" \n\t\tdata-link="').concat(b,'">').concat(m("thumbtack"),"</li>"),x='<li\n\t\tonclick="'.concat(Object(a.c)("download-link-ress",(function(t){h(f,d)})),'"\n\t\ttitle="Preview link" data-filepath="').concat(t.file.path,'" data-link="').concat(b,'">').concat(m("download"),"</li>"),k="<ul>".concat(j," ").concat(w," ").concat(x,"</ul>"),y='<div class="ressource-link-label" data-filepath="'.concat(t.file.path,'" data-link="').concat(b,'" onclick="').concat(Object(a.c)("preview-link-ress-main",(function(t){return O(t,{fullscreen:!0})})),'">').concat(s," (").concat(n(b),")</div>");return Object(p.c)("div",{className:"".concat(g," resource-link-iframe-wrapper")},Object(p.c)("div",{className:" resource-link-wrapper device-".concat(Object(i.a)())},Object(p.c)("div",{className:"resource-link-icon ".concat(n(b))}),Object(p.c)("div",{className:"resource-link-content-wrapper"},Object(p.c)("div",{dangerouslySetInnerHTML:{__html:y}}),Object(p.c)("div",{dangerouslySetInnerHTML:{__html:k},className:"buttons-wrapper"}))),Object(p.c)("div",{className:"iframe-wrapper"}))},b=".resource-link-icon",g=function(){return"\n.loading-string {\n text-align: center;\n padding: 50px;\n}\n.ressource-link-label {\n\t\tfont-weight: bold;\n\t\tcursor: pointer;\n}\n.resource-link-ctag {\n\t\t// height: ".concat(d-21,"px;\n\t\tmin-height: 120px;\n\t\toverflow:hidden;\n\t\twidth: 100%;\n\t\tborder:none;\n}\n.resource-link-iframe {\n\t\tborder: none;\n\t\twidth: 100%;\n}\n\n.resource-link-wrapper,\n.resource-link-wrapper a {\n\t\tcolor: ").concat(s.a.colors.main,";\n}\n.resource-link-iframe-wrapper {\n\t\tbackground: #f7f6f6;\n\t\tborder-radius: 5px;\n\t\toverflow:hidden;\n}\n.preview-area-wrapper .resource-link-iframe-wrapper {\n\t\tmargin-top: 3px;\n\t\tbackground:#eee!important;\n}\n\n.resource-link-wrapper {\n\t\tpadding: 7px;\n\t\tborder-radius: 10px;\n\t\tposition: relative;\n\t\tmargin: 5px 0px;\n}\n\n.buttons-wrapper {\n\t\tposition: relative;\n\t\ttop: -10px;\n\t\theight: 10px;\n}\n.resource-link-content-wrapper .ssr-icon {\n\t\tpadding: 3px;\n\t\tfont-size: 13px;\n\t\tmargin: 0px 5px 0px 0px;\n\t\tcolor: #b9b9b9;\n\t\tcursor: pointer;\n}\n.resource-link-content-wrapper .ssr-icon:hover {\n\t\tcolor:grey;\n}\n\n.mdpreview-source {\n\t\tdisplay:none!important;\n}\n\n.resource-link-icon {\n\t\ttop: 10px;\n\t\tleft: 19px;\n\t\twidth: 12px;\n\t\theight: 27px;\n\t\tdisplay: inline-block;\n\t\tbackground-image: url(/static/media/file-solid.6415173e.svg);\n\t\topacity: 0.08;\n\t\tposition: absolute;\n\t\tbackground-repeat: no-repeat;\n\t\ttransform: scale(1.5);\n\t\tbackground-image: url(").concat(s.a.assets.fileIcon,");\n}\n\n").concat(b,".epub, ").concat(b,".cbr, ").concat(b,".cbz,").concat(b,".mobi, ").concat(b,".azw, ").concat(b,".azw3, ").concat(b,".iba {background-image: url(").concat(s.a.assets.bookIcon,"); }\n").concat(b,".pdf\n{background-image: url(").concat(s.a.assets.pdfIcon,"); }\n\n").concat(b,".xls, ").concat(b,".xlsm, ").concat(b,".xlsx, ").concat(b,".ods\n{background-image: url(").concat(s.a.assets.excelIcon,"); }\n\n").concat(b,".avi, ").concat(b,".flv, ").concat(b,".h264, ").concat(b,".m4v, ").concat(b,".mov, ").concat(b,".mp4, ").concat(b,".mpg, ").concat(b,".mpeg, ").concat(b,".rm, ").concat(b,".swf, ").concat(b,".vob, ").concat(b,".wmv, ").concat(b,".mkv\n{background-image: url(").concat(s.a.assets.videoIcon,"); }\n\n").concat(b,".d7z, ").concat(b,".arj, ").concat(b,".deb, ").concat(b,".rar, ").concat(b,".gz, ").concat(b,".zip, ").concat(b,".rpm, ").concat(b,".pkg\n{background-image: url(").concat(s.a.assets.archiveIcon,");}\n\n").concat(b,".aif, ").concat(b,".mp3, ").concat(b,".cda, ").concat(b,".mid, ").concat(b,".mpa, ").concat(b,".ogg, ").concat(b,".wav, ").concat(b,".wpl, ").concat(b,".wma, ").concat(b,".midi\n{background-image: url(").concat(s.a.assets.audioIcon,"); }\n\n").concat(b,".doc, ").concat(b,".docx, ").concat(b,".odt, ").concat(b,".txt\n{background-image: url(").concat(s.a.assets.wordIcon,"); }\n\n").concat(b,".html, ").concat(b,".css, ").concat(b,".js, ").concat(b,".json, ").concat(b,".ts, ").concat(b,".jsx, ").concat(b,".tsx\n{background-image: url(").concat(s.a.assets.codeIcon,"); }\n\n").concat(b,".bin, ").concat(b,".dmg, ").concat(b,".iso, ").concat(b,".toast, ").concat(b,".vcd\n{\n\t\ttop: 19px;\n\t\ttransform: scale(1.8);\n\t\tbackground-image: url(").concat(s.a.assets.diskIcon,");\n}\n\n").concat(b,".ppt, ").concat(b,".pptx, ").concat(b,".odp, ").concat(b,".key, ").concat(b,".pps\n{background-image: url(").concat(s.a.assets.presIcon,"); }\n\n\n.resource-link-content-wrapper {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n}\n\n.resource-link-content-wrapper {\n}\n\n.resource-link-content-wrapper ul {\n\t\tpadding-left: 7px;\n\t\tdisplay: flex;\n}\n.resource-link-content-wrapper ul li {\n\t\tlist-style: none;\n\t\tpadding-left: 0px;\n}\n.resource-link-content-wrapper ul li:before {\n\t\tdisplay: none;\n}\n\n\n// HIDING IT ON DESKTOP \n.device-desktop .resource-link-wrapper:hover .resource-link-content-wrapper ul {\n\t\topacity:1;\n\t\twidth: 90px;\n\t\t// margin-top: 15px;\n\t\tpointer-events: all;\n}\n.device-desktop .resource-link-content-wrapper ul {\n\t\topacity: 0;\n\t\twidth: 0px;\n\t\ttransition: 0.2s all;\n\t\ttransition-delay: 0.2s, 0s;\n\t\tpointer-events: none;\n}\n\n\n")},h=function(t,n){var e=document.createElement("a");e.style.display="none",document.body.appendChild(e),e.href=n,e.target="_blank",e.setAttribute("download",t),e.click(),window.URL.revokeObjectURL(e.href),document.body.removeChild(e)}},83:function(t,n,e){"use strict";e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r})),e.d(n,"d",(function(){return u}));var o=e(114),c=e.n(o),i=function(t,n){var e=c.a.generateRSAKey(n,1024),o=c.a.publicKeyString(e);return c.a.encrypt(t,o)},a=function(t,n){var e=c.a.generateRSAKey(n,1024);return c.a.decrypt(t,e)},r={encryptText:i,decryptText:a,encryptUrlParam:function(t,n){var e=i(t,n);return e.cipher&&(e.cipher=encodeURIComponent(e.cipher)),e},decryptUrlParam:function(t,n){return t=decodeURIComponent(t),a(t,n)}},l=function(t,n){var e=n.replace(t,"").length,o=n.length;return Math.round(e/o*100)/100},s=function(t){return t>0&&t<=.9},u=function(t){var n=!1,e={nb:l(/[^0-9]/g,t),up:l(/[^A-Z]/g,t),low:l(/[^a-z]/g,t),spe:l(/[^\/\=\?\+]/g,t)},o=s(e.nb)&&s(e.up)&&s(e.low)&&e.spe>0,c=(t.trim().endsWith("==")||t.trim().endsWith("="),/^[a-zA-Z0-9\/\=\?\+]+$/.test(t)),i=t.length>100;return c&&o&&i&&(n=!0),n}},84:function(t,n,e){"use strict";e.d(n,"c",(function(){return N})),e.d(n,"a",(function(){return R})),e.d(n,"b",(function(){return A})),e.d(n,"d",(function(){return D}));var o=e(9),c=e(0),i=e.n(c),a=e(8),r=e(279),l=e.n(r),s=(e(445),e(446),e(146)),u=e(104),p=e(147),d=e(12),f=e(13),b=e(32),g=e(123),h=e(148),m=e(22),v=e(62),w=e(108),O=e(54),j=e(14),x=e(149),k=e(73),y=e(1),C=function(t){var n=Object(c.useState)(""),e=Object(o.a)(n,2),i=e[0],r=e[1],l=Object(c.useState)(0),s=Object(o.a)(l,2),u=(s[0],s[1]),p=Object(c.useRef)(0),d=function(t){t>p.current&&(p.current=t),u(p.current)};Object(c.useEffect)((function(){u(0)}),[t.fileContent]);Object(b.a)((function(t){r(t)}),Object(j.d)()?3e3:1e3),Object(b.b)((function(t){r(t)}),1e3);var f=function(t){r(t)};Object(c.useEffect)((function(){f(t.fileContent)}),[t.fileContent,t.file.path]),Object(c.useEffect)((function(){setTimeout((function(){O.a.onWindowLoad(t.windowId)}),500)}),[t.file.path]);var g=Object(c.useState)(-1),h=Object(o.a)(g,2),m=h[0],C=h[1];Object(c.useEffect)((function(){t.lineJumpEvent&&("active"!==t.lineJumpEvent.windowId||t.isActive)&&("active"!==t.lineJumpEvent.windowId&&t.lineJumpEvent.windowId!==t.windowId||(C(t.lineJumpEvent.line),setTimeout((function(){C(-1)}),100)))}),[t.lineJumpEvent]);var _={id:"",line:0,title:""},E=function(n){var e=Object(k.a)(i),o=_;if(Object(a.each)(e,(function(t){n>=t.line&&(o=t)})),""!==o.id){var c=".window-id-".concat(t.windowId," #t-").concat(o.id);try{var r,l=null===(r=document.querySelector(c))||void 0===r?void 0:r.offsetTop;Object(a.isNumber)(l)&&(O.a.updatePreviewOffset(t.windowId,l),O.a.scrollPreview(t.windowId))}catch(s){console.error(s)}}},T=Object(b.b)(E,200),S=Object(b.a)(E,500),I="desktop"===Object(j.a)()&&"editor"===t.viewType||"desktop"!==Object(j.a)()&&"editor"===t.mobileView;return Object(y.c)("div",{className:"dual-view-wrapper view-".concat(t.viewType," device-").concat(Object(j.a)()," window-id-").concat(t.windowId)},Object(y.c)(w.a,{viewType:t.viewType,mobileView:t.mobileView,windowId:t.windowId,editorType:"codemirror",file:t.file,canEdit:t.canEdit,fileContent:t.fileContent,isActive:t.isActive,jumpToLine:m,posY:0,onTitleClick:function(t){!function(t){T(t),S(t)}(t)},onScroll:function(t){},onUpdateY:function(t){},onMaxYUpdate:d,onFileEdited:function(n,e){t.onFileEdited(n,e),f(e)},onScrollModeChange:function(t){},onViewToggle:function(n){t.onViewChange&&t.onViewChange(n)}}),!I&&Object(y.c)(v.a,{windowId:t.windowId,file:t.file,posY:0,fileContent:i,onMaxYUpdate:d,yCnt:0,onIframeMouseWheel:function(t){}}),Object(y.c)(x.a,{windowId:t.windowId}))},_=function(t){var n=Object(c.useContext)(f.a),e=null===n||void 0===n?void 0:n.ui.note.lineJump.get;return Object(y.c)(C,Object(m.a)({},t,{lineJumpEvent:e}))},E=function(t){var n=Object(d.a)({},t.content),e=n.file,r=n.view,l=n.active,s=n.i,u=Object(c.useState)(""),p=Object(o.a)(u,2),m=p[0],v=p[1],w=Object(c.useState)(),O=Object(o.a)(w,2),j=O[0],x=O[1];Object(c.useEffect)((function(){x(r),Object(h.a)(null===e||void 0===e?void 0:e.path).then((function(t){t&&x(t)}))}),[r,null===e||void 0===e?void 0:e.path]);var k=Object(c.useRef)((null===e||void 0===e?void 0:e.path)||"");Object(c.useEffect)((function(){console.log(444,null===e||void 0===e?void 0:e.path),v("loading...")}),[null===e||void 0===e?void 0:e.path]),Object(c.useEffect)((function(){k.current=(null===e||void 0===e?void 0:e.path)||"",S(!1),e&&Object(f.d)((function(t){t.file.getContent(e.path,(function(t){v(t),S(!0)})),t.watch.file(e.path,(function(t){return N.current?console.log("FILE WATCH DISABLED FOR 10s after reconnection"):k.current===t.filePath?!0===L.current?D.current=t.fileContent:void v(t.fileContent):void 0}))}))}),[null===e||void 0===e?void 0:e.path,m]);var C=Object(c.useState)(!1),E=Object(o.a)(C,2),T=E[0],S=E[1],I=Object(b.a)((function(t){Object(g.a)(t,20,!0)}),3e3),N=Object(c.useRef)(!1),F=Object(b.a)((function(){N.current=!1,console.log("reenable watch file")}),1e4),R=Object(c.useRef)({}),A=Object(c.useRef)(0);Object(c.useEffect)((function(){var t=R.current;Object(f.d)((function(n){n.watch.appStatus((function(n){if(!1===n.isConnected)A.current=A.current+1,console.log("disabling watch update as disconnected"),N.current=!0;else if(!0===n.isConnected){A.current>=1&&n.isConnected&&(F(),Object(f.d)((function(n){var o=null===e||void 0===e?void 0:e.path;if(t=R.current,console.log("2 RECONNECTION",o,t,R),o&&t&&t.path&&o===t.path&&t.content){var c=t.content;console.log("3 UPDATE OFFLINE CONTENT",{filepath:o,content:c}),n.file.saveContent(o,c,{history:!0})}})))}}))}))}),[null===e||void 0===e?void 0:e.path]);var D=Object(c.useRef)(!1),L=Object(c.useRef)(!1),P=Object(b.a)((function(){L.current=!1,Object(a.isBoolean)(D.current)||(D.current=!1)}),2e3);return Object(c.useEffect)((function(){e&&l&&Object(f.d)((function(t){t.ui.browser.goTo(e.folder,e.name)}))}),[l]),Object(y.c)(i.a.Fragment,null,e&&Object(y.c)("div",{className:"window-editor-wrapper"},Object(y.c)(_,{windowId:s,file:e,fileContent:m,isActive:l,canEdit:T,viewType:j,onViewChange:t.onViewChange,mobileView:t.mobileView,onFileEdited:function(t,n){!function(t,n){Object(f.d)((function(e){e.file.saveContent(t,n,{history:!0})})),L.current=!0,P(),R.current={content:n,path:null===e||void 0===e?void 0:e.path},I({path:t,content:n,timestamp:Date.now()})}(t,n)}})))},T=i.a.memo(E,(function(t,n){return!1})),S=e(10),I=e(42),N={rows:2,cols:4},F={m:10,rows:N.rows,cols:N.cols,decalBottom:10},R=function(t){var n=Object(c.useState)([]),e=Object(o.a)(n,2),r=e[0],d=e[1],b=Object(c.useState)([]),g=Object(o.a)(b,2),h=g[0],m=g[1],v=Object(c.useRef)();Object(c.useEffect)((function(){t.grid&&t.grid.layout&&(m(t.grid.layout),d(t.grid.content))}),[t.refresh]),Object(c.useEffect)((function(){P(),E()}),[h]);var w=function(n,e){t.onGridUpdate({layout:n,content:e})},O=function(){var t=r[0].file;if(t){var n=function(t){for(var n=[],e=N,o=function(o){for(var c=[],i=function(n){var e=0;Object(a.each)(t,(function(t){for(var c=0;c<t.w;c++)for(var i=0;i<t.h;i++){var a=t.x+c,r=t.y+i;a===n&&r===o&&(e=1)}})),c.push(e)},r=0;r<e.cols;r++)i(r);n.push(c)},c=0;c<e.rows;c++)o(c);for(var i=[-1,-1],r=[-1,-1],l=0;l<e.rows;l++)for(var s=0;s<e.cols;s++)0===n[l][s]&&-1===i[0]&&-1===i[1]&&(i[0]=s,i[1]=l),0===n[l][s]&&(r[0]=s,r[1]=l);var u=r[0]-i[0]+1,p=r[1]-i[1]+1;return{x:i[0],y:i[1],w:u,h:p}}(h),e=Object(u.a)({file:t,w:n.w,h:n.h,x:n.x,y:n.y}),o=Object(a.cloneDeep)(h);o.push(e.layout),H(o)&&(m(o),setTimeout((function(){var t=Object(a.cloneDeep)(r);t.push(e.content);var n=M(e.content.i,t);d(n),w(o,n)})),w(o,r))}},x=Object(c.useState)(!1),k=Object(o.a)(x,2),C=k[0],_=k[1],E=function(){_(h.length>1)},S=function(t){var n=Object(a.filter)(Object(a.cloneDeep)(h),(function(n){return n.i!==t})),e=function(t){var n=N;return 1===t.length&&(t[0].x=0,t[0].y=0,t[0].h=n.rows,t[0].w=n.cols),t}(n);m(e),setTimeout((function(){var e=Object(a.filter)(Object(a.cloneDeep)(r),(function(n){return n.i!==t}));d(e),w(n,e)})),w(n,r)},R=Object(c.useState)(!1),A=Object(o.a)(R,2),D=A[0],L=A[1],P=function(){var t=0,n=F.cols*F.rows;Object(a.each)(h,(function(n){t+=n.w*n.h})),L(t!==n)},M=function(t,n){var e=Object(a.cloneDeep)(n);return Object(a.each)(e,(function(n){n.active=n.i===t})),e},z=function(t,n){var e=M(t,r);d(e),w(h,e),n&&(null===V||void 0===V||V.ui.browser.goTo(n.folder,n.name))},B=function(t){v.current=Object(a.cloneDeep)(t)},H=function(t){for(var n=!0,e=0;e<t.length;e++){var o=t[e];o.y>1&&(n=!1),o.h>1&&o.y>0&&(n=!1)}return n};Object(p.b)(),Object(c.useEffect)((function(){var t=U.current;if(t)return t.addEventListener("resize",(function(){})),function(){t.removeEventListener("resize",(function(){}))}}),[]);var U=Object(c.useRef)(null),W={width:300,height:300};U.current&&(W.width=U.current.clientWidth,W.height=U.current.clientHeight-F.decalBottom);var q=function(t,n){var e=Object(a.cloneDeep)(r);e[n].view=t,d(e),w(h,e)},V=Object(c.useContext)(f.a),G=Object(c.useState)(null),J=Object(o.a)(G,2),K=J[0],Y=J[1];Object(c.useEffect)((function(){if("mobile"===Object(j.a)()){var t=null===V||void 0===V?void 0:V.ui.windows.active.get();if(t)Y(t);else{var n={layout:h[0],content:r[0]};n.layout&&n.content&&n.layout.i===n.content.i&&(Y(n),z(n.content.i))}}}),[t.refresh]);return Object(y.c)("div",{className:"draggable-grid-wrapper"},Object(y.c)("div",{className:"draggable-grid-wrapper-in",ref:U},"mobile"!==Object(j.a)()&&Object(y.c)(l.a,{className:"draggable-grid",autoSize:!1,layout:h,onLayoutChange:function(t){var n=Object(a.cloneDeep)(t);if(H(n)){var e=function(t){var n=t,e=N;return n.length,2===n.length&&(n[0].w===e.cols/2-1&&n[1].w===e.cols/2||n[1].w===e.cols/2-1&&n[0].w===e.cols/2)&&(n[0].w=e.cols/2,n[1].w=e.cols/2),n}(n);B(e),m(e),w(e,r)}else{if(!v.current)return;var o=function(t){var n=t,e=N,o=null;console.log("0035",n),(2===n.length&&(n[0].w===e.cols-1&&n[0].h===e.rows&&n[1].w===e.cols/2&&n[1].h===e.rows||n[1].w===e.cols-1&&n[1].h===e.rows&&n[0].w===e.cols/2&&n[0].h===e.rows)||2===n.length&&(n[0].w===e.cols-1&&n[0].h===e.rows&&n[1].w===e.cols/2&&n[1].h===e.rows||n[1].w===e.cols-1&&n[1].h===e.rows&&n[0].w===e.cols/2&&n[0].h===e.rows))&&(console.log("[ALT LAYOUT] 0035 found i|iii to ii|ii"),o=Object(a.cloneDeep)(t),Object(a.each)(o,(function(t,n){t.w=e.cols/2,t.y=0,1===n&&(t.x=e.cols/2)})));return o}(t);o&&B(o);var c=o||v.current,i=Object(a.cloneDeep)(c);Object(a.each)(i,(function(t){t.refresh=Object(s.a)(t.refresh)})),m(i),w(i,r)}},cols:F.cols,compactType:"horizontal",useCSSTransforms:!1,rowHeight:W.height/F.rows-F.m*(F.rows+1),draggableHandle:".drag-handle",width:W.width,margin:[F.m,F.m]},h.map((function(n,e){return Object(y.c)("div",{key:n.i,className:" ".concat(r[e]&&r[e].active?"active":""," window-wrapper "),onClick:function(){r[e]&&!r[e].active&&z(r[e].i,r[e].file)},onMouseEnter:function(){}},function(t,n){return Object(y.c)(i.a.Fragment,null,Object(y.c)("div",{className:"note-active-ribbon"}),Object(y.c)("div",{className:"window-buttons-bar ".concat(D?"can-add":""," ").concat(C?"can-remove":"")},Object(y.c)(I.a,{design:"horizontal",popup:!1,buttons:[{icon:"faGripVertical",title:"Move Window",class:"drag-handle",action:function(){},onHover:function(){t&&!t.active&&z(t.i,t.file)}},{icon:"faPlus",title:"Add Window",class:"add-button",action:function(){O()}},{icon:"faPlus",title:"Delete Window",class:"delete-button",action:function(){S(t.i)}}],colors:["#d4d1d1","#615f5f"],size:.8})))}(n),Object(y.c)("div",{className:"note-wrapper"},Object(y.c)(T,{content:t.grid.content[e]&&t.grid.content[e],onViewChange:function(t){q(t,e)},mobileView:t.mobileView})))}))),"mobile"===Object(j.a)()&&Object(y.c)("div",{className:"mobile-grid-view"},Object(y.c)("div",{className:" window-wrapper"},Object(y.c)("div",{className:"note-wrapper"},K&&Object(y.c)(T,{content:K.content,onViewChange:function(t){q(t,0)},mobileView:t.mobileView}))))))},A=function(){return"\n.draggable-grid-wrapper \n.draggable-grid-wrapper-in \n.mobile-grid-view {\n\t\t.window-wrapper {\n\n\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\t.note-wrapper {\n\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\tmargin-top: 47px;\n\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\ttop: -43px;\n\t\t\t\t\t\t\t\t\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: ".concat(S.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: -15px;\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t.textarea-editor {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% - 300px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 20px 20px 70px 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 40px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tresize: none;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\theight: calc(100% - 165px);\n\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px!important;\n\t\t\t\t\t\t\t\t\t\t\t\tbottom: 0px!important;\n\t\t\t\t\t\t\t\t\t\t\t\t.dates-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-content {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px 0px 50px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n")},D=function(){return"\n\n.draggable-grid-wrapper {\n\t\t// remove transition\n\t\theight: 100%;\n\n\t\t.react-grid-item {\n\t\t\t\ttransition: all 0ms ease;\n\t\t\t\ttransition-property: left, top;\n\t\t\t\t.react-resizable-handle {\n\t\t\t\t\t\tbottom: 0px;\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\tcursor: se-resize;\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\theight: 18px;\n\t\t\t\t\t\tbackground: rgb(247,247,247);\n\t\t\t\t}\n\t\t\t\t.react-resizable-handle:after {\n\t\t\t\t\t\ttop: 5px;\n\t\t\t\t\t\tleft: 1px;\n\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t}\n\t\t}\n\n\t\t.draggable-grid-wrapper-in {\n\t\t\t\theight: 100%;\n\t\t\t\tposition: relative;\n\n\t\t\t\t.draggable-grid, .mobile-grid-view {\n\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t.window-wrapper {\n\t\t\t\t\t\t\t\t//overflow: hidden;\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tcolor: ".concat(S.a.colors.fontEditor,";\n\t\t\t\t\t\t\t\tbackground: ").concat(S.a.colors.bgEditor,";\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.1);\n\t\t\t\t\t\t\t\toverflow-y: hidden;\n\t\t\t\t\t\t\t\toverflow-x: hidden;\n\t\t\t\t\t\t\t\theight:100%;\n\n\t\t\t\t\t\t\t\t// height 100% everywhere\n\t\t\t\t\t\t\t\t.note-wrapper,\n\t\t\t\t\t\t\t\t.window-editor-wrapper,\n\t\t\t\t\t\t\t\t.dual-view-wrapper,\n\t\t\t\t\t\t\t\t.editor-area,\n\t\t\t\t\t\t\t\t.preview-area-wrapper,\n\t\t\t\t\t\t\t\t.preview-area,\n\t\t\t\t\t\t\t\t.main-editor-wrapper{\n\t\t\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.content-wrapper {\n\t\t\t\t\t\t\t\t\t\theight:100%;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.note-active-ribbon {\n\t\t\t\t\t\t\t\t\t\theight: 2px;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t\t\t.note-active-ribbon {\n\t\t\t\t\t\t\t\t\t\t\t\t//background:").concat(S.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.dual-view-wrapper\n\t\t\t\t\t\t\t\t\t\t.editor-area\n\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper\n\t\t\t\t\t\t\t\t\t\t.title-input-wrapper\n\t\t\t\t\t\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: ").concat(S.a.colors.main,";\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.note-wrapper {\n\t\t\t\t\t\t\t\t\t\t.editor-toolbar-dropdown {\n\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\n\n\n\n\t\t\t\t\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tz-index:2;\n\t\t\t\t\t\t\t\t\t\tright: 30px;\n\t\t\t\t\t\t\t\t\t\ttop: 10px;\n\t\t\t\t\t\t\t\t\t\t.delete-button {display: none;}\n\t\t\t\t\t\t\t\t\t\t.add-button {display: none;}\n\t\t\t\t\t\t\t\t\t\t.drag-handle {\n\t\t\t\t\t\t\t\t\t\t\t\tcursor: grab;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.delete-button svg {\n\t\t\t\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t&.can-add {\n\t\t\t\t\t\t\t\t\t\t\t\t.add-button {display: block;}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t&.can-remove {\n\t\t\t\t\t\t\t\t\t\t\t\t.delete-button {display: block;}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t// content css modification\n\t\t\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t\t\t.file-path-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\tposition:initial;\n\t\t\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index: 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition:absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 32px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-rigth: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 33px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 3px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-rigth: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 10px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: -6px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: initial;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 0.5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 65px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(S.a.font.editor,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 15px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// ALL\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t&.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 33px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//padding: 5px 5px 5px 5px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(S.a.colors.bgPreview,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//padding: 10px 10px 10px 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// FULL PREVIEW\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t&.device-desktop.view-preview {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// FULL EDITOR\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t&.device-desktop.view-editor {\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 33px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t\n}\n")}},88:function(t,n,e){"use strict";e.d(n,"c",(function(){return l})),e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(26),c=e(13),i=e(33),a=e(10),r=e(55),l=function(t,n){return Object(r.a)({file:t,pattern:o.a.linklink,replacement:function(t){var e=document.createElement("span");e.classList.add("note-link-mdpreview-wrapper"),e.classList.add("note-link-wrapper");var o=t[1],c=t[2],i=u(o,c,n);return e.innerHTML="".concat(i),e}})},s=function(t){if(t){var n=t.dataset.file,e=t.dataset.folder,o=""===t.dataset.windowid?"active":t.dataset.windowid;n&&e&&Object(c.e)().then((function(t){t.ui.browser.goTo(e,n,{openIn:o})}))}},u=function(t,n,e){return'<a\n\t\tonclick="'.concat(Object(i.c)("open-link-page",s),'"\nclass="title-search-link preview-link" data-file="').concat(t,'" data-folder="').concat(n,'" data-windowid="').concat(e,'">').concat(t,"</a>")},p=function(t){return t||(t=""),"\n\t\t\t.preview-link {\t\t\t\t\t\t\t\n\t\t\t\tfont-weight: 800;\n\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\tbackground-position: 4px 2px;\n\t\t\t\tpadding-left: 20px;\n\t\t\t\tbackground-size: 10px;\n\t\t}\n\n\t\t".concat(t,".external-link {\n\t\t\t\tbackground-image: url(").concat(a.a.assets.worldIcon,");\n\t\t}\n\t\t").concat(t,".search-link {\n\t\t\t\tcolor: ").concat(a.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(a.a.assets.searchIcon,");\n\t\t}\n\t\t").concat(t,".title-search-link {\n\t\t\t\tcolor: ").concat(a.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(a.a.assets.linkIcon,");\n\t\t\t\tcursor: pointer;\n\t\t}\n\t\t").concat(t,".resource-link {\n\t\t\t\tcolor: ").concat(a.a.colors.main,";\n\t\t} ")}}},[[471,11,12]]]);
1
+ (this["webpackJsonptiro-notes-client"]=this["webpackJsonptiro-notes-client"]||[]).push([[10],{10:function(t,n,e){"use strict";e.d(n,"a",(function(){return w}));e(322),e(323),e(324),e(325);var o=e.p+"static/media/deco-bg-map.7ca9103b.png",c=e.p+"static/media/file-solid.6415173e.svg",i=e.p+"static/media/compact-disc-solid.55b6e50c.svg",a=e.p+"static/media/file-pdf-solid.0a9d75fe.svg",r=e.p+"static/media/file-word-solid.9228e1ff.svg",l=e.p+"static/media/file-code-solid.62b467ac.svg",s=e.p+"static/media/book-solid.87f5b737.svg",u=e.p+"static/media/file-excel-solid.217d73db.svg",p=e.p+"static/media/file-video-solid.312288cf.svg",d=e.p+"static/media/file-audio-solid.a76f99f0.svg",f=e.p+"static/media/file-zipper-solid.7db57917.svg",b=e.p+"static/media/file-powerpoint-solid.4d969453.svg",g=e.p+"static/media/link-solid.7b689dbd.svg",h=e.p+"static/media/globe-africa-solid.0ad34146.svg",m=e.p+"static/media/search-solid.cc51b702.svg",v={main:"#E86666",bgPopup:"#FFF",bgPopup2:"#f9f9f9",bgPopup3:"#f5efef",bgTabs:"#D8D8D8",bgTab:"#D0D0D0",fontTab:"#797979",bgTabActive:"#EFEFEF",bgInterface:"#efefef",fontInterface:"#323232",bgInterface2:"#e1e1e1",fontInterface2:"#585757",bgEditor:"#FFFFFF",bgPreview:"#F7F7F7",fontEditor:"#323232",dev:["#C3668B","#A766A7","#CE66E8","#E4E866"],compl:["#11abf8","#3fd7a4"],pal1:["#5c1a70","#ffa67c","#ffda77"],grey1:"#797979",grey2:"red",green:"green",l1:{bg:"#e1e1e1",font:"#615f5f"},l2:{bg:"#eeecec",title:"#797979",text:"#615f5f",date:"#b3b2b2"},editor:{bg:"#ffffff",font:"#525252",interfaceGrey:"#d4d1d1",mobileToolbar:{bg:"#e1e1e1",font:"#747474"}},bg:{l1:"#e1e1e1",dark:"rgb(39, 39, 39)",grey:"rgb(221, 221, 221)",light:"#FFFFFF",black:"#000000"},font:{light:"#FFFFFF",black:"#000000"}},w={els:function(){return{button:"\n\t\tbackground: none;\n border: none;\n ",images:"\n\t\tborder-radius: 7px;\n box-shadow: 0px 0px 10px rgb(0 0 0 / 10%);\n max-width: 100%;\n ",imageInfos:"\n ",redButton:"\n\t\t\tborder: none;\n\t\t\tbackground: ".concat(v.main,";\n &:hover {\n\t\t\topacity: 0.9;\n\n }\n color: white;\n border-radius: 5px;\n cursor: pointer;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 1px;\n ")}},colors:v,font:{main:"'Open sans', sans-serif",editor:"Consolas, monaco, monospace"},sizes:{desktop:{l:37,l1:37,l2:63,r:63},search:{h:94,padding:10},gallery:{topH:100},block:15,scrollbar:17,l2:{fileLi:{height:77,padding:5,margin:5,img:67}},editor:{padding:45},mobile:{bottomBarHeight:50,editorBar:40,editorTopWrapper:100}},assets:{decoBgMap:o,linkIcon:g,worldIcon:h,fileIcon:c,diskIcon:i,pdfIcon:a,presIcon:b,audioIcon:d,videoIcon:p,excelIcon:u,wordIcon:r,codeIcon:l,bookIcon:s,archiveIcon:f,searchIcon:m},anim:{time:"100ms"}}},101:function(t,n,e){"use strict";e.d(n,"b",(function(){return c})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return a}));var o=e(3),c=(e(8),e(36),e(14),function(){var t,n=[],e={},c=window.location.search,i=new URLSearchParams(c).entries(),a=Object(o.a)(i);try{for(a.s();!(t=a.n()).done;){var r=t.value;n.push({name:r[0],value:r[1]}),e[r[0]]={name:r[0],value:r[1]}}}catch(l){a.e(l)}finally{a.f()}return{array:n,dic:e}}),i=function(t){var n="",e=0;for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&t[o]&&(n+="".concat(0===e?"":"&").concat(o.toLowerCase(),"=").concat(t[o]),e++);return n},a=function(t){try{var n=new XMLHttpRequest;return n.open("HEAD",t.url,!1),n.send(),404!==n.status?t.onSuccess():t.onFail()}catch(e){t.onFail(e)}}},102:function(t,n,e){"use strict";e.d(n,"c",(function(){return p})),e.d(n,"b",(function(){return d})),e.d(n,"a",(function(){return b}));var o=e(8),c=e(19),i=null,a=null,r=!1,l="[LATEX]",s=c.a.client.log.verbose,u=function(t,n){var e=document.createElement("script");e.src=t,e.crossorigin="anonymous",document.body.appendChild(e),e.onload=function(){n()}};r||(u("https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.js",(function(){u("https://cdn.jsdelivr.net/npm/katex@0.16.2/dist/contrib/auto-render.min.js",(function(){r=!0,i=window.katex,a=window.renderMathInElement}))})),function(t){var n=document.createElement("link");n.type="text/css",n.rel="stylesheet",n.href=t,document.body.appendChild(n)}("https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.css"));var p=function(t){var n=t=t.replaceAll("$","");if(!i)return n;try{window.ka=i,n=i.renderToString(t)}catch(e){s&&console.log("LATEX ERR:",e)}return n},d=Object(o.debounce)((function(){s&&console.log(l,"REFRESH"),f(".render-latex")}),100),f=function(t){if(a){var n=document.querySelectorAll(t);if(!n)return console.warn(l,"no el found :",t);s&&console.log(l,n),Object(o.each)(n,(function(t){a(t,{delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!0},{left:"[[l]]",right:"[[l]]",display:!0},{left:"\\[",right:"\\]",display:!0}],throwOnError:!1})}))}},b=function(){return"\n.katex-display {\n\t\tdisplay: inline;\n\t\t.katex {\n\t\t\t\tdisplay: inline;\n\t\t\t\t.katex-html {\n\t\t\t\t\t\tdisplay: inline;\n\t\t\t\t}\n\t\t}\n}\n"}},103:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(9),c=e(8),i=e(0),a=function(){var t=Object(i.useState)([]),n=Object(o.a)(t,2),e=n[0],a=n[1],l=Object(i.useState)(0),s=Object(o.a)(l,2),u=s[0],p=s[1];return{lightboxApi:{open:function(t,n){var e=[];Object(c.each)(n,(function(t){if(Object(c.isString)(t)){var n={file:r(),title:"",url:t};e.push(n)}else e.push(t)})),a(e),p(t)},close:function(){a([]),p(0)}},lightboxImages:e,lightboxIndex:u}},r=function(){return{nature:"file",name:"",realname:"",path:"",folder:""}}},104:function(t,n,e){"use strict";e.d(n,"a",(function(){return f})),e.d(n,"c",(function(){return b})),e.d(n,"b",(function(){return g}));var o=e(17),c=e(9),i=e(12),a=e(43),r=e(8),l=e(146),s=e(70),u=e(84),p=e(13),d=e(14),f=function(t){var n=Object(i.a)({},t),e=n.w,o=n.h,c=n.x,r=n.y,l=n.file;o||(o=u.c.rows),e||(e=u.c.cols),c||(c=0),r||(r=0);var s=Object(a.a)();return{layout:{i:s,x:c,y:r,w:e,h:o,minH:1,maxH:2,forceRender:0},content:{i:s,active:!1,file:l,view:"both"}}},b=function(){var t=Object(s.a)("tabs",[]),n=Object(c.a)(t,3),e=n[0],i=n[1],a=n[2],l=function(t){i(t)},u=function(t){var n=O({fullWindowFile:t});if(n){var c=[].concat(Object(o.a)(e),[n]),i=w(n.id,c);l(i)}},f=function(t){var n=[],o=Object(r.cloneDeep)(e);Object(r.each)(o,(function(e,o){e.id!==t&&n.push(e)})),l(n)},b=function(t){if(!t){var n=Object(r.cloneDeep)(e),o=v(n);if(!Object(r.isNumber)(o))return;t=n[o]}if(t.grid.layout[0]){var c,i=t.grid;return Object(r.each)(i.content,(function(t,n){t.active&&(c={layout:i.layout[n],content:i.content[n]})})),c}};return{tabs:e,updateTab:function(t,n,o){if("add"===t)Object(p.e)().then((function(t){u(t.ui.browser.files.active.get)}));else if("close"===t){if(!n)return;f(n.id)}else if("rename"===t){if(!n)return;if(o.length>15)return;var c=Object(r.cloneDeep)(e);Object(r.each)(c,(function(t){t.id===n.id&&(t.name=o,t.manualName=!0)})),l(c)}else if("activate"===t){if(!n)return;var i=w(n.id,e),a=h(i);if(l(a),"desktop"!==Object(d.a)()){var s,g=null===(s=b(n))||void 0===s?void 0:s.content.file;if(!g)return;Object(p.d)((function(t){t.ui.browser.goTo(g.folder,g.name)}))}}},refreshTabsFromBackend:a,updateActiveTabGrid:function(t){var n=Object(r.cloneDeep)(e),o=v(n);Object(r.isNumber)(o)&&(n[o].grid=t,l(n))},refreshWindowGrid:function(){var t=h(e);l(t)},tabsApi:{get:function(){return e},close:f,openInNewTab:u,reorder:function(t,n){var o=Object(r.cloneDeep)(e),c=o[t];o.splice(t,1),o.splice(n,0,c),l(o)},active:{get:function(){var t=null;return Object(r.each)(e,(function(n){n.active&&(t=n)})),t}}},windowsApi:{close:function(t){var n=Object(r.cloneDeep)(e);Object(r.each)(t,(function(t){Object(r.each)(n,(function(n,e){for(var o=0;o<n.grid.content.length;o++){var c=n.grid.content[o],i=n.grid.layout[o];c.i===t&&n.grid.content.splice(o,1),i.i===t&&n.grid.layout.splice(o,1)}}))}));var o=h(n);l(o)},active:{get:b,setContent:function(t){if(t){var n=Object(r.cloneDeep)(e),o=v(n);if(Object(r.isNumber)(o)){var c=n[o],i=c.grid.content;if(!(i.length<1)){var a=0;Object(r.each)(i,(function(t,n){!0===t.active&&(a=n)})),i[a].file=Object(r.cloneDeep)(t),c.manualName||(c.name=m(t.name));var s=h(n);l(s)}}}}},updateWindows:function(t,n){var o=Object(r.cloneDeep)(e);Object(r.each)(t,(function(t){Object(r.each)(o,(function(e,o){Object(r.each)(e.grid.content,(function(e){e.i===t&&(e.file=n)}))}))}));var c=h(o);l(c)},getIdsFromFile:function(t){var n=[];return Object(r.each)(e,(function(e){Object(r.each)(e.grid.content,(function(e){e.file&&e.file.path===t&&n.push(e.i)}))})),n}}}},g=function(t){var n=void 0;return Object(r.each)(t.grid.content,(function(t){t.active&&(n=t)})),n||(n=t.grid.content[0]),n},h=function(t){var n=Object(r.cloneDeep)(t);return Object(r.each)(n,(function(t){t.refresh=Object(l.a)(t.refresh)})),n},m=function(t){return t.length>15?"".concat(t.substring(0,13),".."):t},v=function(t){var n=void 0;return Object(r.each)(t,(function(t,e){t.active&&(n=e)})),n},w=function(t,n){var e=Object(r.cloneDeep)(n);return Object(r.each)(e,(function(n){n.refresh=Object(r.isNumber)(n.refresh)?n.refresh++:1,n.id===t?n.active=!0:n.active=!1})),e},O=function(t){if(t.copiedTab){var n=Object(r.cloneDeep)(t.copiedTab);return n.id=Object(a.a)(),n.name=j(t.copiedTab.name),n}if(t.fullWindowFile){var e=f({file:t.fullWindowFile});return{id:Object(a.a)(),name:m(t.fullWindowFile.name),active:!0,grid:{layout:[e.layout],content:[e.content]}}}},j=function(t){var n=t,e=n[n.length-1];return isNaN(parseInt(e))?n+=" 1":(n=n.slice(0,-1),n+="".concat(parseInt(e)+1)),n}},105:function(t,n,e){"use strict";e.d(n,"a",(function(){return f})),e.d(n,"c",(function(){return b})),e.d(n,"b",(function(){return h}));var o=e(17),c=e(8),i=e(26),a=e(13),r=e(14),l=e(33),s=e(10),u=e(55),p=e(106),d=e(49),f=Object(p.a)((function(t){return g(t)})),b=function(t){return Object(u.a)({file:t,pattern:i.a.externalLink3,replacement:function(t){var n=document.createElement("span");return n.innerHTML=f(t),n}})},g=function(t){var n=[];n=Object(c.isArray)(t)?t:Object(o.a)(t.matchAll(i.a.externalLink3))[0];var e=document.createElement("span"),s=n[0].slice(0,-1),u=n[1].replace("www.",""),p=n[3],f=n[4];e.classList.add("link-mdpreview-wrapper"),e.classList.add("link-wrapper");var b=17;u.length>b&&(u=u.substring(u.length-b));var g=p;""!==g&&g||(g=f),g.length>b&&(g=g.substring(0,b)+""),g=0!==g.length?"".concat(g):"";var h="".concat(u).concat(g);h.length>b&&(h=h.substring(0,b));var m=function(t){return t.parentNode.parentNode.parentNode.querySelector(".link-iframe-wrapper")},v=function(t,cb){var n=t.dataset.link;Object(a.d)((function(e){e.ressource.fetchUrlArticle(n,(function(n){Object(d.b)(m(t),Object(d.a)("iframe",encodeURIComponent(n.html))),cb(n)}))}))},w=l.d,O='<span title="Open link in detached window"\nonclick="'.concat(Object(l.c)("open-win-link",(function(t){if(t){var n=t.dataset.link;window.open(n,"popup-preview-link","width=800,height=1000")}})),'"\nclass="link-action link-openwindow" data-link="').concat(s,'">').concat(w("up-right-from-square"),"</span>"),j='<span\nonclick="'.concat(Object(l.c)("preview-link",(function(t){if(t){var n=t.dataset.link;Object(d.b)(m(t),Object(d.a)("iframe",n))}})),'"\ntitle="Preview link" class="link-openpreview link-action" data-link="').concat(s,'">').concat(w("eye"),"</span>"),x='<span\nonclick="'.concat(Object(l.c)("fetch-link",(function(t){t&&v(t,(function(){}))})),'"\ntitle="Display url content" class="link-fetcharticle link-action" data-link="').concat(s,'">').concat(w("file-lines"),"</span>"),k='<span\nonclick="'.concat(Object(l.c)("audio-link",(function(t){t&&v(t,(function(t){t.text&&Object(a.d)((function(n){n.ui.textToSpeechPopup.open(t.text)}))}))})),'"\ntitle="Text to speech url content" class="link-audio link-action" data-link="').concat(s,'">').concat(w("volume-high"),"</span>"),y='<span class="link-action-more"><span class="icon-more">'.concat(w("ellipsis"),'</span><span class="link-action-wrapper">').concat(x," ").concat(k," ").concat(O," ").concat(j,"</span></span>"),C='<span class="'.concat(Object(r.d)()?"mobile-version":"",' link-mdpreview-wrapper"><a href="').concat(s,'" class="link-mdpreview" title="').concat(s,'" target="_blank" rel="noreferrer">').concat(w("link")).concat(h,"</a>").concat(y).concat('<span class="link-iframe-wrapper"></span>',"</span>");return e.innerHTML="".concat(C),e.outerHTML},h=function(){return"\n.link-fetch-preview-wrapper {\n\t\tbackground: grey;\n}\n.link-mdpreview-wrapper {\n\t\tposition: relative;\n}\n.link-mdpreview-wrapper .link-action {\n}\n.link-deco {\n\t\tpadding-right:2px;\n}\n.link-action-more {\n\t\tposition: relative;\n}\n.link-action-wrapper {\n\t\tdisplay:flex;\n\t\tposition: absolute;\n\t\tright: -30px;\n\t\ttop: -10px;\n\t\topacity: 0;\n\t\ttransition: 0.2s all;\n\t\tpointer-events: none;\n\t\tbackground: white;\n\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.1);\n\t\tpadding: 7px;\n\t\tz-index: 10000;\n}\n.link-action-wrapper span {\n\tmargin: 0px 2px;\n}\n\n// mobile version\n.mobile-version .link-action-wrapper {\n\t\tright: 10px ;\n}\n.mobile-version .link-action {\n\t\ttransform: scale(1.3);\n\t\tpadding: 7px; \n}\n.link-action-wrapper .link-action {\n\t\tpadding-left:4px;\n}\n\n.link-action-more {\n\t\tmargin-right: 6px;\n\t\topacity: 0.3;\n}\n.link-action-more .icon-more {\n\t\tposition:relative;\n\t\ttop:1px;\n}\n.link-action-more .icon-more svg {\n\t\ttransform: scale(0.7);\n}\n.link-action-more:hover {\n\t\topacity: 1;\n}\n.link-action-more:hover .link-action-wrapper {\n\t\topacity: 1;\n\t\tpointer-events:all;\n}\n\n.link-action \t\tsvg,\n.link-action span,\n.link-action div {\n\t\tpointer-events:none;\n}\n\n.link-action {\n\t\topacity: 0.5;\n\t\tcursor: pointer;\n}\n.link-iframe-wrapper {\n}\n.link-iframe-wrapper .resource-link-ctag {\n\t\tborder-radius: 7px;\n\t\toverflow:hidden;\n\t\tbox-shadow: 0 0 4px rgba(0,0,0,0.3);\n}\n\n\n.link-iframe-wrapper .resource-link-ctag iframe {\n\t\twidth: 150%!important;\n\t\theight: 590px!important;\n\t\ttransform-origin:top left;\n\t\t\ttransform: scale(0.65);\n\t\t\tmargin-left: 15px;\n}\n\n.link-mdpreview-wrapper {\n\n}\n.link-mdpreview {\n\t\topacity: 0.6;\n\t\ttransition: 0.2s all;\n\t\t&:hover {\n\t\t\t\topacity: 1;\n\t\t}\n\t\tline-height: 20px;\n\t\ttext-decoration: none;\n\t\tcolor: ".concat(s.a.colors.main,";\n\t\t// border: solid 2px ").concat(s.a.colors.main,";\n\t\tpadding: 0px 2px 0px 0px;\n\t\tcursor: pointer;\n\t\tborder-radius: 5px;\n\t\tsvg {\n\t\t\t\tcolor: ").concat(s.a.colors.main,";\n\t\t}\n}\n")}},106:function(t,n,e){"use strict";e.d(n,"c",(function(){return r})),e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return s}));var o=e(17),c=e(281),i=(e(107),e(43)),a=e(8),r=function(t,n){var e="render-react-wrapper-".concat(Object(i.a)()),o=function(){var n=l(t),o=setInterval((function(){var t=document.getElementById(e);t&&(t.innerHTML="",t.appendChild(n),clearInterval(o))}),10)};return n&&n.delay?setTimeout(o,n.delay):o(),e},l=function(t,n){return n||(n=document.createElement("div")),Object(c.createRoot)(n).render(t),n},s=function(t){return Object(a.memoize)((function(){return t.apply(void 0,arguments)}),(function(t){return JSON.stringify(Object(o.a)(t))}))}},108:function(t,n,e){"use strict";e.d(n,"b",(function(){return Y})),e.d(n,"c",(function(){return $})),e.d(n,"a",(function(){return Z}));var o=e(22),c=e(17),i=e(12),a=e(9),r=e(0),l=e.n(r),s=e(14),u=e(155),p=e(58),d=e(8),f=function(t){for(var n=!0,e=0;e<t.length;e++)32!==t[e].charCodeAt(0)&&45!==t[e].charCodeAt(0)&&91!==t[e].charCodeAt(0)&&93!==t[e].charCodeAt(0)&&(n=!1);return n},b="[TEXT MANIP ACTION]",g=function(t){var n=Object(r.useRef)(0),e=t.editorRef,o=t.editorRef,i=t.editorRef,a=function(){var c;if("codemirror"===t.editorType){var a=p.a.getCurrentLineInfos(e.current);c=a,n.current=a.currentPosition}else if("monaco-textarea"===t.editorType){var r;if("desktop"===t.deviceType)c=null===(r=o.current)||void 0===r?void 0:r.getCurrentLineInfos(),n.current=c&&c.monacoPosition?c.monacoPosition:0;else c=i.current?function(t){for(var n=t.value.split("\n"),e=t.selectionStart,o=0,c=0;o<e+1;)o+=n[c].length+1,c++;return{currentPosition:e,lines:n,activeLine:n[--c],lineIndex:c}}(i.current):null,n.current=c&&c.currentPosition?c.currentPosition:0}return c},l=function(c){var a=n.current+c;if("codemirror"===t.editorType)p.a.updateCursor(e.current,a,!0);else if(Object(s.b)("desktop")){var r;null===(r=o.current)||void 0===r||r.editor.setPosition(a)}else{var l=i.current;if(!l)return;l.focus(),setTimeout((function(){l&&(l.selectionStart=a,l.selectionEnd=a)}))}};return{getLineTextInfos:a,resetCursorPosition:l,applyTextModifAction:function(t,n){var e=a();if(!e)return null;console.log(b,"applying =>",t,n);var o=function(t,n,cb,e){var o=n.lines;if("^"===t){var i=o[n.lineIndex-1],a=o[n.lineIndex];o[n.lineIndex]=i,o[n.lineIndex-1]=a,cb(-i.length-1)}if("v"===t){var r=o[n.lineIndex+1],l=o[n.lineIndex];o[n.lineIndex]=r,o[n.lineIndex+1]=l,cb(+r.length+1)}if("X"===t){o[n.lineIndex].length;var s=Object(c.a)(o).splice(0,n.lineIndex).join("\n").length+1-n.currentPosition;o[n.lineIndex]="",cb(s)}if("C"===t){var u=o[n.lineIndex].length,p=o[n.lineIndex];o.splice(n.lineIndex,0,p),cb(u+1)}"->"===t&&(o[n.lineIndex]=" "+o[n.lineIndex],cb(2)),"<-"===t&&(n.activeLine.startsWith(" ")?(o[n.lineIndex]=o[n.lineIndex].substr(2,o[n.lineIndex].length),cb(-2)):cb(0));var f=n.activeLine.trim();if("[x]"===t&&(f.startsWith("- [ ]")||f.startsWith("- [x]")?f.startsWith("- [ ]")?(o[n.lineIndex]=o[n.lineIndex].replace("[ ]","[x]"),cb(0)):f.startsWith("- [x]")?(o[n.lineIndex]=o[n.lineIndex].replace("[x]","[ ]"),cb(0)):cb(0):(o[n.lineIndex]=o[n.lineIndex].replace(f,"- [ ] "+f.replace("-","")),cb(6))),"insertAt"===t&&e&&e.textToInsert&&(Object(d.isNumber)(e.insertPosition)||Object(d.isString)(e.insertPosition))){var b="currentPos"===e.insertPosition?n.currentPosition+1:e.insertPosition,g=o.join("\n");o=[g.slice(0,b),e.textToInsert,g.slice(b)].join("").split("\n")}return o.join("\n")}(t,e,(function(t){console.log(b,"applying a decal of cursor of :",t),l(t)}),n);return o}}},h=function(t,n){var e=g({editorType:"monaco-textarea",deviceType:"mobile",editorRef:n.mobileTextarea}),o=e.getLineTextInfos,c=e.resetCursorPosition,i=function(t){var n=Object(r.useState)(0),e=Object(a.a)(n,2),o=e[0],c=e[1];return{saveYTextarea:function(n){var e=t.current?t.current.scrollTop:0;c(n||e)},resetYTextarea:function(){t.current&&(console.log("resetYTextarea",o),t.current.scrollTop=o)}}}(n.mobileTextarea),l=i.saveYTextarea,s=i.resetYTextarea,u=Object(r.useState)(!1),p=Object(a.a)(u,2),b=p[0],h=p[1];Object(d.debounce)((function(){h(!1)}),500);return{onTextareaChange:function(e){console.log("onTextareaChange");var i=e.target.value,a=i[e.target.selectionStart-1]&&i[e.target.selectionStart-1].charCodeAt(0);if(i.length>t.length){var r=o();if(!r)return;i=function(t,n,cb){if(10===n){console.log("updateTextFromLetterInput => ENTER PRESSED");var e=t.lines[t.lineIndex-1],o=e.indexOf("- ["),c=e.indexOf("-"),i="";-1!==o&&"- [ ] "!==e?(i=e.substr(0,o+3)+" ] ",f(i)&&(t.lines[t.lineIndex]=i+t.activeLine,cb(i.length))):-1!==c&&"- "!==e&&"- [ ] "!==e&&(i=e.substr(0,c+1)+" ",f(i)&&(t.lines[t.lineIndex]=i+t.activeLine,cb(i.length)))}return t.lines.join("\n")}(r,a,(function(t){setTimeout((function(){c(t),s()}))}))}n.onMobileNoteEdition(i)},onTextareaScroll:function(t){if(!b){var n=t.target.scrollTop;l(n),console.log("onTextareaScroll")}}}},m="",v=e(81),w=e(51),O=e(18),j=e(10),x=e(53),k=e(1),y=function(t){var n=Object(r.useState)(""),e=Object(a.a)(n,2),o=e[0],c=e[1],i=function(){t.onSubmit(o)};return Object(k.c)(C,null,Object(k.c)(w.a,{title:O.a.passwordForm.explanation,onClose:function(){t.onClose()}},Object(k.c)("div",null,Object(k.c)(x.a,{value:o,label:O.a.setupForm.password,type:"password",shouldFocus:!0,onChange:function(t){c(t)},onEnterPressed:function(){i()}}),Object(k.c)("button",{className:"submit-button",onClick:function(t){i()}},O.a.passwordForm.submit))))},C=Object(v.a)("div",{target:"eozyeru0"})(".submit-button{margin-top:10px;",j.a.els().redButton,";padding:10px 20px;}"),_=e(83),E=e(16),T=e(52),S=e(13),I=e(23),N=e(103),F=e(123),R=e(28),A=function(t){var n=Object(r.useState)([]),e=Object(a.a)(n,2),o=e[0],i=e[1],l=Object(r.useState)(!1),s=Object(a.a)(l,2),u=s[0],p=s[1],f=function(){var n=b();i([].concat(n)),p(!0),E.b.emit("askFileHistory",{filepath:t.file.path,token:Object(I.b)()});var e=E.b.on("getFileHistory",(function(t){var o=Object(d.orderBy)(t.files,["created"],["desc"]);i([].concat(n,Object(c.a)(o))),p(!1),E.b.off(e)}))},b=function(){var n=[],e=Object(F.b)(t.file.path);return Object(d.each)(e,(function(t,e){var o=e+1,c=Object(N.a)();c.created=t.timestamp,c.path=t.path+o;var i="Temporary local save ".concat(o," from ").concat(Object(T.a)(new Date(c.created||0)));c.name=i,c.realname=i,c.localContent=t.content,c.isLocal=!0,n.push(c)})),console.log("getLSHistoryList",e,t.file.path),n};Object(r.useEffect)((function(){f()}),[]);var g=Object(r.useContext)(S.a),h=Object(r.useState)(""),m=Object(a.a)(h,2),v=m[0],j=m[1],x=Object(r.useState)(null),y=Object(a.a)(x,2),C=y[0],_=y[1];return Object(k.c)(D,null,Object(k.c)("div",{className:"history-popup-wrapper"},Object(k.c)(w.a,{title:"".concat(O.a.historyPopup.title,'"').concat(t.file.realname,'"'),onClose:function(){t.onClose()}},Object(k.c)("div",{className:"count"},o.length," backups found :"),u&&Object(k.c)("div",{className:"count"}," (Loading backend history files...)"),Object(k.c)("div",{className:"table-wrapper"},Object(k.c)("table",null,Object(k.c)("thead",null,Object(k.c)("tr",null,Object(k.c)("th",null,O.a.historyPopup.thead.name),Object(k.c)("th",null,O.a.historyPopup.thead.date))),Object(k.c)("tbody",null,o.map((function(t){return Object(k.c)("tr",{className:"".concat((null===C||void 0===C?void 0:C.path)===t.path?"active":""),onClick:function(){!function(t){t.isLocal&&t.localContent?(j(t.localContent),_(t)):g&&g.file.getContent(t.path,(function(n){j(n),_(t)}))}(t)}},Object(k.c)("td",null," ",t.realname," "),Object(k.c)("td",null," ",Object(T.a)(new Date(t.created||0))," "),Object(k.c)("td",null," ",!t.isLocal&&Object(k.c)("div",{className:"trash",onClick:function(){!function(t){Object(S.d)((function(n){n.file.delete(t,(function(t){f(),_(null),j("")}))}))}(t)}}," ",Object(k.c)(R.a,{name:"faTrash",color:"grey"})," ")))}))))),v&&Object(k.c)("div",{className:"note-preview"},Object(k.c)("textarea",{className:"note-preview-textarea",value:v})),Object(k.c)("div",{className:"advice"},' To disable history backup for a note, add "--disable-history--"in it'))))},D=Object(v.a)("div",{target:"ew7e5uv0"})(".filemain-wrapper .history-popup-wrapper .popup-wrapper-component .popup-wrapper{width:90%;}.popup-wrapper .popupContent{max-height:70vh;padding:0px;}.table-wrapper{max-height:30vh;overflow-y:auto;padding:0px 0px 20px 0px;table{border-spacing:0px;thead{tr{th{padding:8px;}}}tbody{text-align:left;tr{cursor:pointer;background:#f1f0f0;&:nth-child(2n){background:none;}&.active{font-weight:bold;}&:hover{background:r",j.a.colors.main,";}td{padding:8px;}}}}}.note-preview{.note-preview-textarea{padding:6px;margin:10px 0px 0px 0px;width:calc(100% - 10px);height:34vh;border:none;background:gainsboro;}}.advice{color:#a4a4a4;font-size:10px;padding:3px 3px;}.trash{margin-right:15px;}"),L=e(42),P=e(143),M=e(144),z=e(125),B=e(145),H=e(154),U=e(150),W=e(153),q=e(32),V=e(62),G=function(){return"\n@page {\nmargin: 0;\n}\n@media print {\n.hide-print {\ndisplay: none;\n\n}\n}\n\n* {\n\t-webkit-print-color-adjust: exact; \n\tprint-color-adjust: exact; \n}\n\n.file-path-wrapper {\n\tdisplay: none;\n}\n.file-infos-wrapper {\n\tbackground: #eeeeee;\n\tpadding: 10px;\n\tmargin: 10px;\n}\n\t\t.simple-css-print-wrapper {\n\t\t\tmargin: 20px;\n\t\t\twidth: 70%;\n\n\t\t}\n\t\timg {\n\t\t\t\tmax-width: 300px!important;\n\t\t\t\tmax-height: 500px!important;\n\t\t}\n\t\t.block-tag {\n\t\t\t\tdisplay: none;\n\t\t}\n\t\t"},J=e(148),K=function(t){var n=Object(r.useState)(""),e=Object(a.a)(n,2),o=e[0],f=e[1],b=Object(r.useRef)(null),v=!0;!1===t.canEdit&&(v=!1),!1===t.isConnected&&(v=!1),Object(r.useEffect)((function(){f("")}),[t.file.path]);var w=function(t){var n=Object(r.useState)(!1),e=Object(a.a)(n,2),o=e[0],c=e[1],i=Object(r.useRef)(!1);Object(r.useEffect)((function(){i.current=t.canEdit}),[t.canEdit]),Object(r.useEffect)((function(){return c(!1),t.onEditorDidMount&&t.onEditorDidMount(),function(){t.onEditorWillUnmount&&(l(),t.onEditorWillUnmount())}}),[t.file.path]),Object(r.useEffect)((function(){l()}),[t.file.path]),Object(r.useEffect)((function(){t.onNoteContentDidLoad&&t.onNoteContentDidLoad()}),[t.fileContent,t.file.path]);var l=function(){""!==m&&t.onNoteLeaving&&t.onNoteLeaving(o,m),m=t.file.path};return{triggerNoteEdition:function(n){o?t.onNoteEdition&&t.onNoteEdition(n,!1):t.onNoteEdition&&t.onNoteEdition(n,!0),c(!0)}}}({file:t.file,fileContent:t.fileContent,canEdit:v,onEditorDidMount:function(){},onEditorWillUnmount:function(){},onNoteContentDidLoad:function(){E.a&&f(t.fileContent)},onNoteEdition:function(n,e){f(n),t.onFileEdited(t.file.path,n),e&&Object(S.d)((function(n){n.history.save(t.file.path,t.fileContent,"enter")}))},onNoteLeaving:function(t,n){}}),j=w.triggerNoteEdition,x=Object(r.useRef)(null),C=h(o,{mobileTextarea:x,onMobileNoteEdition:j}),I=(C.onTextareaChange,C.onTextareaScroll,Object(r.useRef)(null)),N="desktop"!==Object(s.a)()?x:b;"codemirror"===t.editorType&&(N=I);var F=g({editorType:t.editorType,deviceType:Object(s.a)(),editorRef:N}).applyTextModifAction,R=function(t){var n=Object(r.useState)(null),e=Object(a.a)(n,2),o=e[0],c=e[1],i=Object(r.useState)(!1),l=Object(a.a)(i,2),s=l[0],u=l[1],p=Object(r.useState)(!1),d=Object(a.a)(p,2),f=d[0],b=d[1],g=Object(r.useState)(null),h=Object(a.a)(g,2),m=h[0],v=h[1],w=function(n){var e=t.fileContent,o=Object(_.c)(e,n);if("failure"===o.status)v(null);else{console.log("encryption done",o),u(!1);var c=o.cipher;t.onTextEncrypted(c)}},O=function(n){var e=t.fileContent,o=Object(_.a)(e,n);if("failure"===o.status)v(null),alert("wrong password");else{b(!0),u(!0),console.log("decryption done",o);var c=o.plaintext;t.onTextDecrypted(c)}};return{APasswordPopup:Object(k.c)(y,{onClose:function(){c(null)},onSubmit:function(t){var n=o;c(null),v(t),"toEncrypt"===n&&w(t),"toDecrypt"===n&&O(t)}}),askForPassword:o,decryptButtonConfig:{title:"decrypt text",icon:"faUnlock",action:function(){m?O(m):c("toDecrypt")}},encryptButtonConfig:{title:"encrypt text",icon:"faLock",action:function(){m?w(m):c("toEncrypt")}},ifEncryptOnLeave:function(cb){if(s&&m){console.log("[EVENTS EDITOR] shouldEncryptOnLeave");var n=Object(_.c)(t.fileContent,m);n.cipher&&cb(n.cipher)}v(null),b(!1)},noHistoryBackupWhenDecrypted:f}}({fileContent:o,onTextEncrypted:function(n){j(n),jt(),Object(S.d)((function(e){e.history.save(t.file.path,n,"int")}))},onTextDecrypted:function(t){j(t),jt()}}),D=R.APasswordPopup,K=R.askForPassword,Y=R.decryptButtonConfig,$=R.encryptButtonConfig,Z=(R.ifEncryptOnLeave,R.noHistoryBackupWhenDecrypted,Object(r.useContext)(H.a)),X=Object(r.useState)(-1),Q=Object(a.a)(X,2),tt=Q[0],nt=Q[1];Object(r.useEffect)((function(){if(Z.upload.progress&&t.isActive&&nt(Z.upload.progress),Z.upload.file&&t.isActive){var n=Object(i.a)({},Z.upload.file),e=n.name,o=n.path;Z.upload.reinit(),et(e,o)}}),[Z.upload]);var et=function(t,n){ot.current+="![".concat(t,"](").concat(n,")\n"),ct()},ot=Object(r.useRef)(""),ct=Object(q.a)((function(){var t=I.current,n=p.a.getCurrentLineInfos(t).currentPosition;!function(t,n){var e=F("insertAt",{textToInsert:t,insertPosition:n});e&&(j(e),jt())}(ot.current,"currentPos"),ot.current="",p.a.updateCursor(t,n,!0)}),500),it="[link|".concat(t.file.realname," ").concat(t.file.folder,"]\n"),at=function(n,e){return{title:"",class:"upload-button-wrapper",action:function(){},customHtml:Object(k.c)(z.a,{file:t.file,type:n,label:e,onProgress:function(t){return nt(t)},onSuccess:function(t){et(t.name,t.path)}})}},rt=[].concat(Object(c.a)(function(){var t=[at("all","Upload files")];return"desktop"!==Object(s.a)()&&(t.push(at("image","Upload Gallery")),t.push(at("camera","Capture")),t.push(at("microphone","Record"))),t}()),[Object(_.d)(o)?Y:$,{title:"Export/Print",icon:"faFileDownload",action:function(){!function(t,n){var e=".window-id-".concat(t," .preview-area-wrapper"),o=document.querySelector(e),c="print-wrapper";if(o){!function(){var t=document.querySelectorAll(".".concat(c));Object(d.each)(t,(function(t){t.classList.remove(c)}))}();var i=Object(T.a)(new Date(n.modified||0)),a=Object(T.a)(new Date(n.modified||0)),r="\n<head>\n\t<title>".concat(n.name,' </title>\n\n\n</head>\n<html>\n\t<body>\n\t\t\t\t<div class="simple-css-print-wrapper">\n<div class="hide-print">\n\t<bm> Export options </bm>\n\t<button onclick="window.print()">print</button>\n\t<button onclick="window.print()">export to pdf</button>\n<button onclick="window.alert(\'CTRL+ S then select *complete webpage* if available\')">export to html</button>\n</div>\n\t\t\t\t\t<div class="file-infos-wrapper">\n\t\t\t\t\tNote Name : ').concat(n.name,"<br>\n\t\t\t\t\tNote Path : ").concat(n.path,"<br>\n\t\t\t\t\tCreated : ").concat(i,"<br>\n\t\t\t\t\tEdited : ").concat(a,"<br>\n\t\t\t\t\t</div>\n\t\t\t\t").concat(o.innerHTML,"\n\t\t\t\t</div>\n\n\t\t\t\t<style>").concat(Object(V.c)({w:".simple-css-print-wrapper",pl:".preview-link",r:".resource-link-icon"}),"</style>\n\t\t\t\t<style>").concat(G(),"</style>\n\n<script>\n<\/script>\n\n\n\n\t</body>\n</html>\n\t\t\t\t"),l=window.open("","print-popup","width=800,height=1000");null===l||void 0===l||l.document.write(r)}}(t.windowId,t.file)}},{title:O.a.editorBar.explanation.history,icon:"faHistory",action:function(){pt(!ut)}},{title:O.a.editorBar.tts,icon:"faCommentDots",action:function(){Object(S.d)((function(n){n.ui.textToSpeechPopup.open(o,{id:t.file.name})}))}},{title:"Delete note",class:"delete",icon:"faTrash",action:function(){Z.file.onFileDelete(t.file)}}]),lt=Object(r.useState)(!1),st=Object(a.a)(lt,2),ut=st[0],pt=st[1],dt=Object(r.useRef)(null),ft=dt.current,bt=700;ft&&(bt=ft.clientHeight/1.3),"mobile"===Object(s.a)()&&(bt=window.innerHeight);var gt=Object(r.useRef)(null);Object(r.useEffect)((function(){jt()}),[t.fileContent,t.file.path]);var ht=Object(r.useRef)(0),mt=Object(r.useState)(0),vt=Object(a.a)(mt,2),wt=vt[0],Ot=vt[1],jt=function(){ht.current=ht.current+1,Ot(ht.current)},xt=Object(r.useState)(!1),kt=Object(a.a)(xt,2),yt=kt[0],Ct=kt[1],_t=Object(r.useState)(!1),Et=Object(a.a)(_t,2),Tt=Et[0],St=Et[1];Object(r.useEffect)((function(){var t=o.length>3e4&&"desktop"!==Object(s.a)();Ct(t)}),[o,t.viewType,t.mobileView]),Object(r.useEffect)((function(){var n=o.length>3e4&&"desktop"!==Object(s.a)();Ct(n),jt();var e="desktop"===Object(s.a)()&&"preview"===t.viewType||"desktop"!==Object(s.a)()&&"preview"===t.mobileView;St(e);var c=t.file.path;setTimeout((function(){c===t.file.path&&jt()}),100)}),[t.viewType,t.mobileView]);var It=function(n){Object(J.b)(t.file.path,n),t.onViewToggle(n)};return Object(k.c)("div",{className:"editor-area",ref:dt},Object(k.c)("div",{className:"infos-editor-wrapper"},Object(k.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(k.c)(u.a,{title:t.file.name.replace(".md",""),onEdited:function(n,e){var o="".concat(t.file.folder).concat(n,".md"),c="".concat(t.file.folder).concat(e,".md");Z.file.onTitleUpdate(o,c),jt()}}),Object(k.c)("div",{className:"toolbar-and-dates-wrapper"},Object(k.c)("div",{className:"editor-toolbar-dropdown"},Object(k.c)(M.a,{hover:!0,dir:"right",maxHeight:bt},Object(k.c)(l.a.Fragment,null,Object(k.c)("div",{className:"view-toggler-wrapper"},"mobile"!==Object(s.a)()&&Object(k.c)(L.a,{class:"editor-view-toolbar",size:.8,buttons:[{title:"Editor",icon:"custom_icons/view-3.svg",action:function(){It("editor")}},{title:"Editor with minimap",icon:"custom_icons/view-4.svg",action:function(){It("editor-with-map")}},{title:"Dual view",icon:"custom_icons/view-1.svg",action:function(){It("both")}},{title:"Render view",icon:"custom_icons/view-2.svg",action:function(){It("preview")}}]})),Object(k.c)("div",{className:"toolbar-wrapper"},Object(k.c)(L.a,{class:"editor-main-toolbar",design:"vertical",size:.8,buttons:rt})),Object(k.c)("div",{className:"separation-bar"}),Object(k.c)("div",{className:"dates-wrapper"},Object(k.c)("div",{className:"date modified"},Object(k.c)("h4",null,"Modified"),Object(T.a)(new Date(t.file.modified||0))),Object(k.c)("div",{className:"date created"},Object(k.c)("h4",null,"Created"),Object(T.a)(new Date(t.file.created||0)))),Object(k.c)("div",{className:"path-wrapper"},Object(k.c)("div",{className:"path"},Object(k.c)("h4",null,"Path"),Object(k.c)("span",{className:"path-link",onClick:function(){Object(S.d)((function(n){n.ui.browser.goTo(t.file.folder,t.file.name)}))}}," ",t.file.folder," "))),Object(k.c)("div",{className:"note-id-wrapper"},Object(k.c)("h4",null,"Node Id"),Object(k.c)("div",{className:"note-id-form"},Object(k.c)("input",{type:"text",ref:gt,onClick:function(t){var n=t.target;n.setSelectionRange(0,n.value.length)},value:it,readOnly:!0}),Object(k.c)(L.a,{class:"note-id-toolbar",size:1,buttons:[{title:"Copy note ID",icon:"faClipboard",action:function(){var t=gt.current;t&&Object(U.a)(t)}}]})))))))),Object(k.c)(B.a,{progress:tt}),Object(k.c)("div",{className:"main-editor-wrapper"},!Tt&&!yt&&"codemirror"===t.editorType&&Object(k.c)(W.a,{windowId:t.windowId,ref:I,value:o,onChange:j,posY:t.posY,jumpToLine:t.jumpToLine||0,forceRender:wt,onScroll:t.onScroll,onTitleClick:t.onTitleClick,file:t.file}),!Tt&&yt&&Object(k.c)("div",{className:"codemirror-mobile-fallback"},Object(k.c)("p",null," note is too long for mobile, we disabled the advanced edition system "),Object(k.c)("textarea",{defaultValue:o,onChange:function(t){j(t.target.value)}}))),"desktop"!==Object(s.a)()&&Object(k.c)(P.a,{onButtonClicked:function(t){var n=F(t);n&&(j(n),jt())}}),K&&D,ut&&Object(k.c)(A,{file:t.file,onClose:function(){pt(!1)}}))},Y=function(){return"\n.mobile-text-manip-toolbar {\n\t\t.toolbar-button {\n\t\t\t\tpadding: 13px 20px;\n\t\t}\n}\n\n.file-path-wrapper {\n\t\tpadding-top: ".concat(Object(s.b)("desktop")?j.a.sizes.block:j.a.sizes.block/2,"px;\n\t\tfont-size: 13px;\n\t\tfont-weight: 700;\n\t\tcolor: #b6b5b5;\n\t\tcursor: pointer;\n\t\ttext-transform: capitalize;\n}\n.big-title {\n\t\tcolor: ").concat(j.a.colors.main,";\n\t\tfont-size: 30px;\n\t\tfont-weight: 800;\n\t\twidth: 100%;\n\t\ttext-transform: uppercase;\n}\n\n.separation-bar {\n\t\twidth: 86%;\n height: 1px;\n background: #e6e6e6;\n margin: 10px 6%;\n}\n\n.dates-wrapper {\n\t\tposition: relative;\n\t\tmargin: 0px 0px 5px 0px;\n\t\tdisplay: block!important;\n .modified {\n\t\t\t\tcolor: grey;\n\t\t\t\ttext-align: left;\n }\n\t\t.created {\n\t\t\t\ttext-align: right;\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0px;\n\t\t\t\tright: 0px;\n\t\t\t\tcolor: ").concat(j.a.colors.editor.interfaceGrey,";\n\t\t}\n}\n\n.path-wrapper {\n\t\tcolor: grey;\n text-align: left;\n\t\tpadding: 0px 0px 5px 0px;\n .path-link {\n\t\t\t\tcolor: ").concat(j.a.colors.main,";\n\t\t\t\tfont-weight: bold;\n\t\t\t\tcursor: pointer;\n }\n}\n\n.note-id-wrapper {\n\t\tcolor: grey;\n text-align: left;\n\t\t.note-id-form {\n\t\t\t\tdisplay:flex;\n\t\t\t\tinput {\n\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\tbackground: #ebebeb;\n\t\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t}\n\t\t}\n}\n.toolbar-and-dates-wrapper {\n\t\th4 {\n\t\t\t\tmargin: 0px;\n\n\t\t}\n}\n\n\n")},$=function(t){return"\n\n.editor-area {\n\t\twidth: ".concat(Object(s.b)("desktop")?"50%":"editor"===t?"100vw":"0vw",";\n\t\tdisplay: block;\n\n\t\tposition: ").concat(Object(s.b)("desktop")||"editor"===t?"relative":"absolute!important",";\n\t\ttop: ").concat("editor"!==t||Object(s.b)("desktop")?"-9999px":"0px",";\n\n\n\t\t.mobile-text-manip-toolbar {\n\t\t\t\tdisplay: ").concat("editor"!==t||Object(s.b)("desktop")?"none":"flex",";\n\t\t}\n\n\t\t.infos-editor-wrapper {\n\t\t\t\t").concat(Object(s.b)("desktop")?"":"height: ".concat(j.a.sizes.mobile.editorTopWrapper,"px;"),"\n\t\t\t\t").concat(Object(s.b)("desktop")?"width: calc(200% - ".concat(3*j.a.sizes.block*2,"px);"):"","\n\t\t\t\tpadding: 0px ").concat(Object(s.b)("desktop")?3*j.a.sizes.block:2*j.a.sizes.block,"px;\n\t\t\t\tposition: relative;\n\n\t\t\t\t").concat(Y(),"\n\n\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\tmargin-top: ").concat(Object(s.b)("desktop")?6:0,"px;\n\t\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 39px;\n\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\tcolor: ").concat(j.a.colors.main,";\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\n\n\t\t\t\t.toolbar-and-dates-wrapper {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t}\n\n\t\t\t\t.dates-wrapper {\n\t\t\t\t\t\tdisplay: ").concat(Object(s.b)("desktop")?"block":"none",";\n\t\t\t\t\t\t.date {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t").concat(z.b,"\n }\n}\n\n\n\n\n.main-editor-wrapper {\n ").concat(Object(s.b)("desktop")?"":"padding: 0px ".concat(2*j.a.sizes.block,"px 0px ").concat(2*j.a.sizes.block,"px;"),"\n ").concat(Object(s.b)("desktop")?"":"margin: 0px 0px ".concat(j.a.sizes.mobile.bottomBarHeight,"px 0px;"),"\n .monaco-editor {\n\t\t\t\tmargin: 0px;\n }\n .textarea-editor {\n\t\t\t\tborder: none;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: calc(100vh - ").concat(j.a.sizes.mobile.editorTopWrapper+j.a.sizes.mobile.editorBar+2*j.a.sizes.mobile.bottomBarHeight,"px);\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px;\n\t\t\t\tbackground: rgba(255,255,255,0.7);\n }\n}\n")},Z=function(t){var n=Object(r.useContext)(S.a),e=(null===n||void 0===n?void 0:n.status.isConnected)||!1;return Object(r.useMemo)((function(){return Object(k.c)(K,Object(o.a)({},t,{isConnected:e}))}),[t.viewType,e,t.canEdit,t.editorType,t.file.path,t.file,t.fileContent,t.isActive,t.jumpToLine])}},109:function(t,n,e){"use strict";e.d(n,"a",(function(){return H})),e.d(n,"b",(function(){return W}));var o=e(12),c=e(22),i=e(9),a=e(0),r=e.n(a),l=e(43),s=e(72),u=function(t){var n=t.headerLog,e={},o=function(t){e[t]&&delete e[t]};return{notify:function(t){for(var c in e){var i=e[c],a=!1;if(c.endsWith("-once")&&(c=c.replace("-once",""),a=!0),c===t.subId)try{i(t.data),a&&o("".concat(c,"-once"))}catch(r){n&&console.log("".concat(n," error with function"),r)}}},subscribe:function(t,cb){e[t]=cb},subscribeOnce:function(t,cb){var n="".concat(t,"-once");e[n]=cb},unsubscribe:o}},p=e(73),d=e(35),f=e(23),b=e(16),g=e(19),h="[IFRAME PARENT] 00563",m=g.a.client.log.iframe,v=u({headerLog:h}),w=v.notify,O=v.subscribe,j=v.unsubscribe;window.addEventListener("message",(function(t){t.data.subId&&(m&&console.log(h,"parent <== iframe",t.data.data),w(t.data))}));var x={subscribe:O,unsubscribe:j,send:function(t,n){t&&t.contentWindow&&(m&&console.log(h,"parent ==> iframe",n),t.contentWindow.postMessage(n,"*"))}},k=function(t){var n,e="[IFRAME child] 00564",o={file:null,frameId:"",reloadCounter:0,windowId:"",innerTag:"",tagName:"",tagContent:"",loginToken:t.loginToken,backendUrl:t.backendUrl},c=function(t){if(""===o.frameId)return console.warn(e,"NO FRAME ID, CANNOT SEND TO PARENT");var n={subId:o.frameId,data:t};window.parent.postMessage(n,"*")},i=function(t){var n={error:"CUSTOM TAG/SCRIPT ERROR: ".concat(t)};c({action:"iframeError",data:n})},a=function(t){var n=document.getElementById("content-wrapper");if(!t){if(!n||0===n.clientHeight)return;t=n.clientHeight+20}c({action:"resize",data:{height:t}})},r=function(){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;n&&n.call(t)},l=t.createEventBus({headerLog:"[FRAME API] 00567"}),s=l.subscribeOnce,u=l.notify,p=function(t,n){var o;t.includes(".js")?(o=document.createElement("script")).src=t:t.includes(".css")&&((o=document.createElement("link")).href=t,o.rel="stylesheet",o.type="text/css"),o.onload=function(){n()};var c=document.getElementById("external-ressources-wrapper");if(!c)return console.error(e,"could not load ".concat(t," because ressource wrapper was not detected"));c.appendChild(o)},d=function(n){var e="?token=".concat(t.loginToken);return"".concat(t.backendUrl,"/static").concat("/.tiro/cache/ctag-ressources/").concat(t.getRessourceIdFromUrl(n)).concat(e)},f=function(t,cb){for(var n=0,o=function(){if(++n===t.length)try{cb&&cb()}catch(o){console.error(e,"ERROR LoadScript Callback : ".concat(o))}},c=function(){var n=t[i],c=d(n),a=!0===window.disableCache,r=function(){b("ressource.download",[n,"/.tiro/cache/ctag-ressources/"],(function(){p(c,(function(){o()}))}))};a?(console.warn(e,"CACHE DISABLED, DOWNLOADING RESSOURCES EVERYTIME!"),r()):function(t,n,e){try{var o=new XMLHttpRequest;return o.open("HEAD",t,!1),o.send(),404!==o.status?n():e()}catch(c){e(c)}}(c,(function(){p(c,(function(){o()}))}),(function(){r()}))},i=0;i<t.length;i++)c()},b=function(n,e,cb){if(!e||!n||e.constructor!==Array||"string"!==typeof n)return i("Call Api : ".concat(n," => wrong arguments type / number(").concat(JSON.stringify({apiName:n,apiArguments:e,cb:cb}),")"));var o="iframe-api-call-".concat(t.generateUUID()," ");s(o,(function(t){cb&&cb(t)})),c({action:"apiCall",data:{reqId:o,apiName:n,apiArguments:e}})},g={version:1.2,call:b,utils:{getInfos:function(){return o},loadCachedRessources:f,getCachedRessourceUrl:d,getRessourceIdFromUrl:t.getRessourceIdFromUrl,loadScripts:function(t,cb){f(t,cb)},loadRessources:function(t,cb){f(t,cb)},loadScriptsNoCache:function(t,cb){for(var n=0,o=0;o<t.length;o++){var c=t[o],i=document.createElement("script");i.src=c,i.onload=function(){if(++n===t.length)try{cb&&cb()}catch(o){console.error(e,"ERROR LoadScript Callback : ".concat(o))}};var a=document.getElementById("external-ressources-wrapper");a&&a.appendChild(i)}},resizeIframe:a,fullscreenIframe:r,canScrollIframe:function(t){c({action:"canScrollIframe",data:{status:t}})},loadCustomTag:function(t,n,e){var o=g.utils.createDiv(),c=o.div,i=o.updateContent;e||(e={}),e.base_url=t.split("/").slice(0,-1).join("/");var a=!0;return!1===e.padding&&(a=e.padding),g.utils.loadScripts([t],(function(){var t=window.initCustomTag("".concat(n),e);a&&(t='<div class="with-padding" style="padding: 0px 15px;">'.concat(t,"</div>")),i(t)})),c},uuid:t.generateUUID,createDiv:function(){var n="ctag-content-wrapper-".concat(t.generateUUID()," ");return{div:'<div id="'.concat(n,'"></div>'),updateContent:function t(e){var o=document.getElementById(n);o?o.innerHTML=e:setTimeout((function(){t(e)}),100)}}}}};return window.api=g,n={init:function(n){o.frameId=n.frameId,o.innerTag=n.innerTag,o.tagContent=n.tagContent,o.tagName=n.tagName,o.file=n.file,o.reloadCounter=n.reloadCounter,o.windowId=n.windowId;var c,r=document.getElementById("content-wrapper");if(r){var l=t.unescapeHtml(r.innerHTML),s=(c=l,t.replaceCustomMdTags(c,"[[script]]",(function(t){var n="".concat(t);try{return new Function(n)()}catch(o){console.warn(e,"[SCRIPT] error: ".concat(o),n),i("".concat(o,' in Code "').concat(n,'"'))}})));r.innerHTML=s,setTimeout((function(){a()}),100),t.bindToElClass("title-search-link",(function(t){var n=t.dataset.file,e=t.dataset.folder,o=t.dataset.windowid;g.call("ui.browser.goTo",[e,n,{openIn:o}])}))}},askFullscreen:r,apiAnswer:function(t){var n={subId:t.reqId,data:t.data};u(n)}},window.onmessage=function(t){var e=t.data;if(e)for(var o in n)n&&n[o]&&o===e.action&&n[o](t.data.data)},g},y=e(13),C=e(62),_=e(32),E=e(8),T=e(47),S=e(28);g.a.client.log.verbose;var I=["epub","pdf"],N=function(t,cb){var n={iframe:F};n[t]?cb(n[t]):Object(y.d)((function(n){n.file.getContent("/.tiro/tags/".concat(t,".md"),(function(t){cb(t)}),{onError:function(){I.includes(t)?function(t,cb){var n="https://raw.githubusercontent.com/dotgreg/tiro-notes/dev/custom-tags/".concat(t,"/").concat(t,".js"),e="";"epub"===t&&(e='open:true, size: "80%"'),"pdf"===t&&(e="open:true");var o='\n [[script]]\n return api.utils.loadCustomTag("'.concat(n,'",`{{innerTag}}`,{').concat(e,"})\n [[script]]\n ");console.log("".concat("[CTAG MANAGER]",' : ctag "').concat(t,'" not present in tiro/tags but part of the base, return base config'),{baseCtagTxt:o}),cb(o)}(t,(function(t){cb(t)})):cb(null)}})}))},F=function(){return'\n[[script]]\nconst style = `<style>\n.ctag-iframe-wrapper {\n width: 100vw;\n height: 100vh;\n overflow: hidden;\n}\n#ctag-iframe {\n border: none;\n transform: scale(0.67);\n width: 150%!important;\n height: 150vh!important;\n transform-origin:top left;\n}\n</style>`\nconst contentStyle = `\n<style>\nimg {\n\t\tmax-width: 100%!important;\n\t\theight: auto!important;\n}\nbody, html {\n\t\tfont-family: sans-serif;\n}\n</style>\n`\n\nlet content = `{{innerTag}}`\nlet htmlHead = `<!DOCTYPE html><html><head><meta charset="utf-8"></head><body>`\nlet htmlFooter = `</body></html>`\n\nvar meta = document.createElement(\'meta\');\nmeta.charset = "utf-8";\nwindow.document.head.appendChild(meta);\ndocument.head.innerHTML += \'<meta charset="utf-8">\'\n\nlet iframeContent = ""\nif (content.startsWith("http")) {\n iframeContent=`src="${content}"`\n} else {\n window.document.body.innerHTML = contentStyle + decodeURIComponent(content) \n}\n\n// api.utils.resizeIframe("100%");\nsetTimeout(() => {\n api.utils.resizeIframe("100%");\n}, 1000)\nreturn `${style}<div class="ctag-iframe-wrapper"><iframe ${iframeContent} id="ctag-iframe"></iframe></div>`\n\n[[script]]\n'},R=e(14),A=e(1),D="[IFRAME COMPONENT]",L=g.a.client.log.verbose,P={},M={},z=["latex","l"],B=function(t){var n="tag"===t.block.type&&!z.includes(t.block.tagName||""),e=Object(a.useState)(null),o=Object(i.a)(e,2),r=o[0],l=o[1],u=Object(a.useState)(null),p=Object(i.a)(u,2),d=p[0],f=p[1],b=Object(a.useState)("null"),g=Object(i.a)(b,2),h=g[0],m=g[1];Object(a.useEffect)((function(){n&&(m("loading"),"script"===t.block.tagName?(l("\n[[script]]".concat(t.block.content,"[[script]]")),setTimeout((function(){m("loaded")}),100),t.block.content=""):t.block.tagName&&N(t.block.tagName,(function(t){t?(l(t),setTimeout((function(){m("loaded")}),100)):l(null)})))}),[t.windowId,t.block.content]);var v="l"===t.block.tagName||"latex"===t.block.tagName;return Object(a.useEffect)((function(){if(!n){var e=s.b.render({raw:t.block.content,file:t.file,windowId:t.windowId});v&&(e="[[l]]".concat(t.block.content,"[[l]]")),f(e)}}),[t.windowId,t.file,t.block]),Object(A.c)("span",{className:"content-block ".concat(n?"block-tag":"block-text"," ")},"loaded"===h&&n&&r&&Object(A.c)(U,Object(c.a)({},t,{noteTagContent:r})),!n&&d&&Object(A.c)("span",{className:"content-block-text",dangerouslySetInnerHTML:{__html:d}}))},H=r.a.memo(B,(function(t,n){var e=!0;return JSON.stringify(t.block)!==JSON.stringify(n.block)&&(e=!1),t.block.content!==n.block.content&&(e=!1),t.file.path!==n.file.path&&(e=!1),e})),U=function(t){var n=Object(o.a)({},t).noteTagContent,e=Object(a.useState)(""),c=Object(i.a)(e,2),g=c[0],h=c[1],m=Object(a.useRef)(null),v=Object(a.useState)(""),w=Object(i.a)(v,2),O=w[0],j=w[1],I=Object(a.useState)(!1),N=Object(i.a)(I,2),F=N[0],z=N[1],B=Object(a.useState)(0),H=Object(i.a)(B,2),U=H[0],W=H[1],q=Object(a.useState)(null),V=Object(i.a)(q,2),G=V[0],J=V[1],K=Object(a.useState)(!1),Y=Object(i.a)(K,2),$=Y[0],Z=Y[1],X=function(){var n,e,o=function(n){$&&t.onIframeMouseWheel(n)};return null===(n=m.current)||void 0===n||null===(e=n.contentDocument)||void 0===e||e.addEventListener("mousewheel",o),function(){var t,n;return null===(t=m.current)||void 0===t||null===(n=t.contentDocument)||void 0===n?void 0:n.removeEventListener("mousewheel",o)}};Object(a.useEffect)(X,[t.yCnt,$]);var Q=Object(_.a)((function(e){X(),j(e),J(null),x.subscribe(e,(function(n){if("resize"===n.action){var e=n.data.height,o=(t.windowHeight||200)-35;if(Object(E.isString)(e)&&e.endsWith("%")){var c=parseInt(e.replace("%",""))/100;e=o*c}L&&console.log(D,"resizing to",e),console.log(D,"resizing to",e),W(e),z(!0)}if("canScrollIframe"===n.action){var i=n.data;Z(i.status)}if("apiCall"===n.action){var a=n.data;Object(y.b)(a,(function(t,e){if("nok"===t)return J(e.error);var o={reqId:n.data.reqId,data:e};x.send(m.current,{action:"apiAnswer",data:o})}))}if("iframeError"===n.action){var r=n.data.error;J(r)}})),setTimeout((function(){var o={file:t.file,innerTag:t.block.content,windowId:t.windowId,frameId:e,reloadCounter:ot,tagContent:n,tagName:t.block.tagName||"",loginToken:Object(f.b)(),backendUrl:Object(b.c)()};x.send(m.current,{action:"init",data:o})}),100)}),500),tt=function(){var e=s.b.render({raw:n,windowId:t.windowId,file:t.file}),o='\n<html>\n\t\t<div id="content-wrapper">\n\t\t\t\t'.concat(e,'\n\t\t</div>\n\t\t<div id="external-ressources-wrapper"></div>\n\t\t<script>\n\t\t\t\tconst IMPORTED_backend_url = "').concat(Object(b.c)(),'"\n\t\t\t\tconst IMPORTED_login_token = "').concat(Object(f.b)(),'"\n\t\t\t\tconst IMPORTED_replaceCustomMdTags = ').concat(p.c.toString(),"\n\t\t\t\tconst IMPORTED_unescapeHtml = ").concat(d.h.toString(),"\n\t\t\t\tconst IMPORTED_createEventBus = ").concat(u.toString(),"\n\t\t\t\tconst IMPORTED_generateUUID = ").concat(l.a.toString(),"\n\t\t\t\tconst IMPORTED_getRessourceIdFromUrl = ").concat(l.b.toString(),"\n\t\t\t\tconst IMPORTED_bindToElClass = ").concat(s.a.toString(),"\n\t\t\t\tconst main = ").concat(k.toString(),";\n\t\t\t\tmain({\n\t\t\t\t\tbackendUrl: IMPORTED_backend_url,\n\t\t\t\t\tloginToken: IMPORTED_login_token,\n\t\t\t\t\treplaceCustomMdTags: IMPORTED_replaceCustomMdTags,\n\t\t\t\t\tunescapeHtml: IMPORTED_unescapeHtml,\n\t\t\t\t\tcreateEventBus: IMPORTED_createEventBus,\n\t\t\t\t\tgenerateUUID: IMPORTED_generateUUID,\n\t\t\t\t\tgetRessourceIdFromUrl: IMPORTED_getRessourceIdFromUrl,\n\t\t\t\t\tbindToElClass: IMPORTED_bindToElClass\n\t\t\t\t})\n\t\t<\/script>\n<style>\n\t\tbody::backdrop {\n\t\t\tbackground: #F7F7F7;\n\t\t}\n</style>\n</html>\n"),c='\n\t\t\t\t<div class="simple-css-wrapper">\n\t\t\t\t'.concat(o,"\n\t\t\t\t</div>\n\t\t\t\t<style>\n\t\t\t\t").concat(Object(C.c)(),"\n\t\t\t\t</style>\n\t\t\t\t");c=Object(T.a)(c,[["{{innerTag}}",t.block.content.trim()]]),h(c)},nt=Object(a.useState)(0),et=Object(i.a)(nt,2),ot=et[0],ct=et[1],it=Object(a.useState)(!1),at=Object(i.a)(it,2),rt=at[0],lt=at[1];Object(a.useEffect)((function(){z(!1),tt();var t="iframe-".concat(Object(l.a)());return Q(t),function(){x.unsubscribe(t)}}),[t.windowId,t.block.content,t.block.tagName,t.noteTagContent,ot]);var st=t.index||0,ut="".concat(t.windowId,"-").concat(st,"-").concat(t.block.tagName);Object(a.useEffect)((function(){P[ut]?bt(!0):P={},M[ut]?vt(!0):P={}}),[]);var pt=Object(a.useState)(!1),dt=Object(i.a)(pt,2),ft=dt[0],bt=dt[1],gt=Object(a.useState)(!1),ht=Object(i.a)(gt,2),mt=ht[0],vt=ht[1],wt=function(t){t||(t=!mt),M[ut]=t,vt(t),bt(!1)};Object(a.useEffect)((function(){t.ctagFullscreen&&wt(!0)}),[t.ctagFullscreen]);var Ot=Object(l.a)();return Object(A.c)(r.a.Fragment,null,mt&&Object(A.c)("div",{className:"fullscreen-pin-bg",onClick:function(n){wt(!1),t.ctagOnFullscreenClose&&t.ctagOnFullscreenClose()}}),Object(A.c)("div",{className:"iframe-view-wrapper ".concat(F?"can-show":"hide"," iframe-tag-").concat(t.block.tagName," ").concat(ft?"pinned":""," ").concat(mt?"pinned fullscreen":""," ").concat(Object(R.d)()?"mobile":"")},Object(A.c)("div",{className:"ctag-menu"},Object(A.c)("div",{className:"ctag-ellipsis"},Object(A.c)(S.a,{name:"faEllipsisH",color:"#b2b2b2"})),Object(A.c)("div",{className:"ctag-menu-button ctag-reload",onClick:function(){ct(ot+1),lt(!0),setTimeout((function(){lt(!1)}),100)}},Object(A.c)(S.a,{name:"faRetweet",color:"#b2b2b2"})),Object(A.c)("div",{className:"ctag-menu-button ctag-fullscreen",onClick:function(){x.send(m.current,{action:"askFullscreen",data:{}})}},Object(A.c)(S.a,{name:"faExpand",color:"#b2b2b2"})),Object(A.c)("div",{className:"ctag-menu-button ctag-pin",onClick:function(t){var n;n||(n=!ft),P[ut]=n,bt(n),vt(!1)}},Object(A.c)(S.a,{name:"faThumbtack",color:"#b2b2b2"})),Object(A.c)("div",{className:"ctag-menu-button ctag-pin",onClick:function(t){wt()}},Object(A.c)(S.a,{name:"faExpandArrowsAlt",color:"#b2b2b2"}))),!rt&&Object(A.c)("iframe",{onMouseLeave:function(t){!function(t,n){var e=document.getElementById(n);e&&e.focus({preventScroll:!0})}(0,Ot)},ref:m,id:O,"data-testid":"iframe",title:O,srcDoc:g,className:"tag-iframe",style:{height:U},sandbox:t.ctagSandboxed?"allow-scripts allow-same-origin allow-popups":void 0}),G&&Object(A.c)("div",{className:"iframe-error"},Object(A.c)("code",null,Object(A.c)("pre",null,G))),Object(A.c)("input",{className:"refocus-input",id:Ot,type:"text"})))},W=function(){return"\n.refocus-input {\n\tposition: fixed;\n\tz-index: -10000;\n}\n.content-blocks-wrapper {\n\t\tpadding: 0px 15px;\n}\n.simple-css-wrapper {\n}\n\n.content-blocks-wrapper,\n.simple-css-wrapper,\n.simple-css-wrapper > div,\n.content-block,\n.iframe-view-wrapper\n{\n}\n\n.fullscreen-pin-bg {\n\t\tposition: fixed;\n\t\ttop:0px;\n\t\tright: 0px;\n\t\twidth: 100vw;\n\t\theight: 100vh;\n\t\tbackground: rgba(0,0,0,0.5);\n\t\tz-index:101;\n}\n.iframe-view-wrapper {\n\t\t&.pinned {\n\t\t\t\tposition: fixed;\n\t\t\t\ttransform: rotate(360deg);\n\t\t\t\ttop: 10px;\n\t\t\t\tright: 10px;\n\t\t\t\tz-index: 1000;\n\t\t\t\toverflow:hidden;\n\t\t\t\tborder: 2px;\n\t\t\t\tbackground: white;\n\t\t\t\tborder-radius: 12px;\n\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\tiframe {\n\t\t\t\t\t\tmax-height: 90vh;\n\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t}\n\t\t}\n\t\t&.pinned.fullscreen.mobile {\n\t\t\theight: calc(100vh - 80px);\n\t\t\tright: 10px;\n\t\t\twidth: calc(100vw - 20px);\n\t\t}\n\t\t&.pinned.fullscreen {\n\t\t\t\ttop: 20px;\n\t\t\t\tright: 20px;\n\t\t\t\tz-index:102;\n\t\t\t\twidth: calc(100vw - 40px);\n\t\t\t\theight: calc(100vh - 40px);\n\t\t\t\tiframe {\n\t\t\t\t\t\theight: calc(100% - 1px)!important;\n\t\t\t\t\t\tmax-height: calc(100% - 1px)!important;\n\t\t\t\t}\n\t\t}\n\t\tposition: relative;\n\t\t.ctag-menu {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 3px;\n\t\t\t\tz-index: 10;\n\t\t\t\tleft: 15px;\n\t\t\t\tcursor: pointer;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition: 0.2s all; \n\t\t\t\tdisplay: flex;\n\t\t\t\tpadding: 3px;\n\t\t\t\tpadding-left: 8px;\n\n\t\t\t\tmargin-left: 8px;\n\t\t\t\tmargin-right: 8px;\n\n\t\t\t\t.ctag-ellipsis {\n\t\t\t\t\t\tmargin-right: 15px;\n\t\t\t\t}\n\t\t}\n\t\t.ctag-menu .ctag-menu-button {\n\t\t\t\tdisplay: none;\n\t\t}\n\t\t&:hover {\n\t\t\t\t.ctag-menu {\n\t\t\t\t\t\topacity:0.5;\n\t\t\t\t}\n\t\t\t\t.ctag-menu:hover {\n\t\t\t\t\t\topacity:1;\n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tbox-shadow: 0px 0px 3px rgba(0,0,0,.1);\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t.ctag-menu-button {\n\t\t\t\t\t\t\t\tmargin-right: 15px;\n\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t&.hide iframe {\n\t\t\t\topacity: 0;\n\t\t}\n\t\tiframe::backdrop {\n\t\t\t\tbackground-color: rgba(255,255,255,1);\n\t\t}\n\n\t\tiframe {\n\t\t\t\t// transition: 0.3s all;\n\t\t\t\twidth: calc(100% );\n\t\t\t\tborder: none;\n\t\t\t\tborder-radius: 5px;\n\t\t}\n\t\t.iframe-error {\n\t\t\t\tbackground: #ffddba;\n\t\t\t\tfont-size: 8px;\n\t\t\t\tpadding: 14px;\n\t\t\t\tborder: 2px #ffc080 solid;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tline-height: 14px;\n\t\t}\n}\n\n.content-block.block-text {\n\t\tpadding-bottom: 0px;\n}\n\n/* .content-block-text > * { */\n/* \t\tpadding: 0px 15px; */\n/* } */\n\n.content-block.block-tag {\n\t\tpadding: 0px 0px 0px 0px;\n position: relative;\n left: -15px;\n top: 0;\n width: calc(100% + 20px);\n height: calc(100% );\n display: block;\n}\n\n"}},111:function(t,n,e){"use strict";e.d(n,"c",(function(){return d})),e.d(n,"a",(function(){return f})),e.d(n,"b",(function(){return b}));var o=e(26),c=e(35),i=e(55),a=e(23),r=e(8),l=e(13),s=e(33),u=e(38),p=function(t){if(t){var n=t.dataset.filePath,e=t.dataset.src;Object(l.d)((function(t){t.file.getContent(n,(function(i){var a=function(t,n){var e=t.match(o.a.image),i=[];return Object(r.each)(e,(function(t){var e=t.match(o.a.firstPartImg),a=e&&e[0]?e[0].replace("![","").replace("]","").replace("(",""):"",r=t.replace(o.a.firstPartImg,"").replace(")",""),l={url:Object(c.a)(n.folder)+"/"+r,title:a,file:n};i.push(l)})),i}(i,Object(u.d)(n));if(console.log(a),!(a.length<1)){var l=[],s=0;Object(r.each)(a,(function(t,n){t.url===e&&(s=n),l.push(t.url)})),t.ui.lightbox.open(s,l)}}))}))}},d=function(t){return Object(i.a)({file:t,pattern:o.a.image,replacement:function(n){var e=document.createElement("div");return e.innerHTML=f(n[0],n[1],t,!0),e}})},f=function(t,n,e){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3]?'<div class="mdpreview-source">'.concat(t,"</div>"):"",i="".concat(Object(c.a)(e.folder),"/").concat(n);return'<div class="cm-mdpreview-wrapper image-wrapper"><div class="cm-mdpreview-image" data-file-path="'.concat(e.path,'" data-src="').concat(i,'" onclick="').concat(Object(s.c)("image-open-lightbox",p),'"> <img onerror="this.style.display=\'none\'" src="').concat(i+Object(a.c)(),'" /></div></div>').concat(o)},b=function(){return"\n.cm-mdpreview-wrapper.image-wrapper {\n\t\t.cm-mdpreview-image {\n\t\t\tcursor:pointer;\n\t\t}\n\t\t.mdpreview-source {\n\t\t\t\tline-height: initial;\n\t\t}\n}\n\n"}},112:function(t,n,e){"use strict";e.d(n,"b",(function(){return f})),e.d(n,"a",(function(){return g})),e.d(n,"c",(function(){return v})),e.d(n,"d",(function(){return w}));var o=e(3),c=e(5),i=e(6),a=e(20),r=e(21),l=e(11),s=e(7),u=e(4),p=e(102),d=e(111),f={LatexMdEl:u.a.define()},b={resolve:"LatexMdEl"},g={defineNodes:["LatexMdEl"],parseInline:[{name:"MdCustomTagsParser",parse:function(t,n,e){return 36===n?t.addDelimiter(b,e,e+1,!0,!0):-1},after:"Emphasis"}],props:[Object(u.c)({LatexMdEl:f.LatexMdEl})]},h=function(t){Object(a.a)(e,t);var n=Object(r.a)(e);function e(t){var o;return Object(c.a)(this,e),(o=n.call(this)).str=t,o}return Object(i.a)(e,[{key:"ignoreEvent",value:function(){return!1}},{key:"toDOM",value:function(){var t=document.createElement("div");t.classList.add("cm-mdpreview-wrapper"),t.classList.add("latex-wrapper");var n=Object(p.c)(this.str);return t.innerHTML=' <div class="latex-height" >'.concat(n,"</div> "),t}}]),e}(l.g);function m(t,n){var e,c=[],i=Object(o.a)(t.visibleRanges);try{for(i.s();!(e=i.n()).done;){var a=e.value,r=a.from,u=a.to;Object(s.E)(t.state).iterate({from:r,to:u,enter:function(n){if("LatexMdEl"===n.name){var e=t.state.doc.sliceString(n.from,n.to),o=l.a.widget({widget:new h(e),side:1});c.push(o.range(n.from))}}})}}catch(p){i.e(p)}finally{i.f()}return l.a.set(c)}var v=function(t){return l.f.fromClass(function(){function n(e){Object(c.a)(this,n),this.decorations=void 0,this.decorations=m(e,t.file)}return Object(i.a)(n,[{key:"update",value:function(n){(n.docChanged||n.viewportChanged)&&(this.decorations=m(n.view,t.file))}}]),n}(),{decorations:function(t){return t.decorations},eventHandlers:{mousedown:function(n,e){var o=n.target;if(o.classList.contains("actionable-title")){var c=o.innerHTML.replace(/^#{1,6} /,"");t.onTitleClick(c)}}}})},w=function(){return"\n.latex-height {\n\t\theight: 20px;\n\t\toverflow: auto;\n\t\tline-height: initial;\n\t\tbackground: rgb(247,247,247);\n\t\tpadding: 10px;\n\t\tborder-radius: 5px;\n\t\tcolor: rgba(0,0,0,0);\n\t\ttransition: all 0.2s;\n\t\t.katex, .katex span {\n\t\t\t\tcolor: black;\n\t\t}\n}\n\n.mdpreview-source {\n\t\tfont-weight: bold;\n\t\tcolor: #b4b4b4;\n\t\tfont-size: 9px;\n\t\tdisplay: block;\n}\n\n.cm-mdpreview-wrapper {\n\t\tline-height: 0px;\n\n\t\t&.latex-wrapper {\n\t\t\t\tposition: relative;\n\t\t\t\tleft: -10px;\n\t\t\t\tdisplay: inline-block;\n\t\t}\n\t\t&.image-wrapper {\n\t\t\t\t/* max-height: 160px; */\n\t\t}\n\n\t\t.cm-mdpreview-image {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-block;\n\n\t\t\t\timg {\n\t\t\t\t\t\tmargin: 5px 0px;\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\tmax-width: calc(100% - 20px);\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tmax-height: 220px;\n\t\t\t\t}\n\t\t\t\t.enlarge {\n\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\ttransition: 0.2s all;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 8px;\n\t\t\t\t\t\tright: 23px;\n\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\tpadding: 6px;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tbackground: rgba(0,0,0,0.6);\n\t\t\t\t\t\tborder-radius: 19px;\n\t\t\t\t}\n\t\t\t\tsvg, span {\n\t\t\t\t\t\tpointer-events: none;\n\t\t\t\t}\n\t\t\t\tsvg {\n\t\t\t\t\t\tbox-shadow: 0 0 0 rgba(0,0,0,0.4);\n\t\t\t\t}\n\n\t\t}\n\t\t&:hover .enlarge {\n\t\t\t\topacity: 0.3;\n\t\t\t\t/* pointer-events: all; */\n\t\t}\n}\n}\n\n ".concat(Object(d.b)(),"\n ")}},113:function(t,n,e){"use strict";e.d(n,"a",(function(){return s})),e.d(n,"b",(function(){return p}));var o=e(12),c=e(52),i=e(13),a=e(8),r="tiro-analytics",l=function(cb){Object(i.d)((function(t){t.cache.get(r,(function(t){var n={};t&&(n=t),cb(n)}))}))},s=function(t){var n=Object(c.c)();l((function(e){var c,l=Object(o.a)({},e);l[n[0]]||(l[n[0]]={}),l[n[0]][n[1]]||(l[n[0]][n[1]]={}),l[n[0]][n[1]][n[2]]||(l[n[0]][n[1]][n[2]]={}),Object(a.isNumber)(l[n[0]][n[1]][n[2]][t])?l[n[0]][n[1]][n[2]][t]++:l[n[0]][n[1]][n[2]][t]=1,c=l,Object(i.d)((function(t){t.cache.set(r,c,-1)}))}))},u=function(cb,t){t||(t={});t.start?t.start:Object(c.c)(Object(c.b)("lastMonth")),t.end?t.end:Object(c.c)();l((function(t){cb(t)}))},p=function(t){return{log:s,report:u}}},123:function(t,n,e){"use strict";e.d(n,"b",(function(){return p})),e.d(n,"a",(function(){return d}));var o=e(17),c=e(8),i=e(64),a="tiro-ls-id-",r=function(t,n){var e=JSON.stringify(n);localStorage.setItem(a+t,e)},l="local_node_history",s="[".concat(l.toUpperCase(),"]"),u="notes-history-ls",p=function(t){var n=[],e=Object(c.cloneDeep)(function(t){var n,e=window.localStorage.getItem(a+t);return e&&(n=JSON.parse(e)),n||null}(u));e&&(n=t?e.filter((function(n){return n.path===t})):e);return n},d=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,e=arguments.length>2?arguments[2]:void 0,c=t,i=p(),a=p(c.path);e&&console.log(s,"adding el to ls : ",{itAdd:c}),i=i.filter((function(t){return t.path!==c.path})),a.unshift(c),a.length>n&&(a=a.slice(0,n)),i=[].concat(Object(o.a)(a),Object(o.a)(i));var l=f(i,3);r(u,l)},f=function t(n,e){var o=n,c=JSON.stringify(o);return b(c)>e&&o.length>1?(o.pop(),console.log(s,"recursivelyReduceArrTillSmallerThan REDUCE ARR > new length=",o.length),t(o,e)):o},b=function(t){return new Blob([t]).size/1048576};Object(i.a)(l,"addLocalNoteHistory",(function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/woopy/doopy",e={timestamp:Date.now(),path:n,content:"".concat(Object(c.random)(0,1e7)," helllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllohelllo helllo helllo")};d(e,10,t)})),Object(i.a)(l,"addLocalNoteHistorySeveral",(function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/woopy/doopy",o=0;o<t;o++)Object(i.b)(l,"addLocalNoteHistory")(n,e)})),Object(i.a)(l,"getLocalNoteHistory",(function(t){console.log(p(t),"size: ".concat(b(JSON.stringify(p(t))),"MB"))})),Object(i.a)(l,"cleanLocalNoteHistory",(function(){r(u,[]),console.log(p(),"size: ".concat(b(JSON.stringify(p())),"MB"))}))},125:function(t,n,e){"use strict";e.d(n,"a",(function(){return l})),e.d(n,"b",(function(){return s}));var o=e(8),c=(e(0),e(13)),i=e(10),a=e(28),r=e(1),l=function(t){var n="faPaperclip";"image"===t.type&&(n="faImage"),"camera"===t.type&&(n="faCamera"),"microphone"===t.type&&(n="faMicrophone");var e="*";"image"===t.type&&(e="image/*"),"camera"===t.type&&(e="image/*"),"microphone"===t.type&&(e="audio/*");var i=Object(o.uniqueId)();return Object(r.c)("div",{className:"upload-button-component"},Object(r.c)("input",{className:"input-file-hidden",id:"file-".concat(i),multiple:!0,name:"file-".concat(i),type:"file",capture:"camera"===t.type||"microphone"===t.type,accept:e,onChange:function(n){var e=n.target.files;0!==e.length&&Object(o.each)(e,(function(n){Object(c.d)((function(e){e.upload.uploadFile({file:n,folderPath:t.file.folder,onProgress:t.onProgress,onSuccess:t.onSuccess})}))}))}}),Object(r.c)("label",{htmlFor:"file-".concat(i)},Object(r.c)(a.a,{name:n}),Object(r.c)("span",{className:"label-text"},t.label)))},s=function(){return"\n.upload-button-wrapper {\n\t\twidth: 100%;\n\t\tcursor: pointer;\n\t\t.inside-html-wrapper {\n\t\t\t\twidth: 100%;\n\t\t}\n\t\t&:hover {\n\t\t\t\t.label-text { color :".concat(i.a.colors.main,"; }\n\t\t}\n\t\t.upload-button-component {\n\t\t\t\tcursor: pointer;\n\t\t\t\tdisplay: flex;\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 100%;\n\t\t\t\t.input-file-hidden {\n\t\t\t\t\t\twidth: 0.1px;\n\t\t\t\t\t\theight: 0.1px;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tz-index: -1;\n\t\t\t\t}\n\t\t\t\t.label-text {\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t\tfont-size: 11px;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t}\n\t\t}\n}\n")}},13:function(t,n,e){"use strict";e.d(n,"e",(function(){return U})),e.d(n,"d",(function(){return W})),e.d(n,"a",(function(){return q})),e.d(n,"f",(function(){return V})),e.d(n,"c",(function(){return G})),e.d(n,"b",(function(){return J}));var o=e(17),c=e(8),i=e(0),a=e.n(i),r=e(43),l=e(77),s=e(38),u=e(26),p=e(19),d=!1,f=function(t){if(!t)return null;if(t.startsWith(p.a.metas.headerStart)&&(d=!0),t.startsWith(p.a.metas.headerEnd)&&(d=!1),""===t)return null;if(!d)return null;var n=t.split(": ");if(2!==n.length)return null;var e=n.shift();if(!e)return null;var o,c=n.join(":").trim();if("created"===e||"modified"===e){o=c,c=parseInt(o).toString()===o?function(t){var n="".concat(t).substr(0,10);return parseInt(n)}(c):c;var i=new Date(c).getTime();isNaN(i)||(c=i)}return{name:e,value:c}},b=e(47),g=e(16),h=e(23),m=function(t){Object(i.useEffect)((function(){g.b.on("moveFolderAnswer",(function(n){t.eventBus.notify(n.idReq,n.idReq)}))}),[]);return{file:function(n,e,cb){var o=G("move-file-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFILE] ".concat(n," -> ").concat(e)),g.b.emit("moveFile",{initPath:n,endPath:e,idReq:o,token:Object(h.b)()})},folder:function(n,e,cb){var o=G("move-folder-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFOLDER] ".concat(n," -> ").concat(e)),g.b.emit("moveFolder",{initPath:n,endPath:e,idReq:o,token:Object(h.b)()})}}},v=function(t){var n="[FILE API] 005363 ";Object(i.useEffect)((function(){g.b.on("getFileContent",(function(n){if(n.error)t.eventBus.notify(n.idReq,{error:n.error});else{var e=function(t){var n=t.match(u.a.metas),e={};if(n&&n[0])for(var o=n[0].split("\n"),c=0;c<o.length;c++){var i=f(o[c]);i&&(e[i.name]=i.value)}var a=t,r=u.a.metas;return{metas:e,content:a=Object(b.a)(a,[[r,""]])}}(n.fileContent);t.eventBus.notify(n.idReq,{content:e.content})}}))}),[]);var e=Object(i.useRef)("");return{getContent:function(n,cb,e){var o=w(n),c=G("get-file-content");t.eventBus.subscribe(c,(function(t){t.error&&e&&e.onError?e.onError(t.error):!t.error||e&&e.onError?t.error||cb(t.content):cb(t.error)})),g.b.emit("askForFileContent",{filePath:o,token:Object(h.b)(),idReq:c})},saveContent:function(n,o,c){var i=!(!c||!c.history)&&c.history,a=(!c||!c.withMetas||c.withMetas,w(n));g.b.emit("saveFileContent",{filePath:a,newFileContent:o,token:Object(h.b)()}),i&&(n!==e.current&&U().then((function(t){var e=t.ui.browser.folders.current.get;if(e===Object(s.c)(n)){var o,c="",i=t.ui.windows.active.get();if(i)c=(null===(o=i.content.file)||void 0===o?void 0:o.name)||"";t.ui.browser.goTo(e,c)}})),t.historyApi.intervalSave(n,o),e.current=n)},delete:function(e,cb){var o=G("delete-file");console.log("".concat(n," delete file ").concat(e.path)),t.eventBus.subscribe(o,cb),g.b.emit("onFileDelete",{filepath:e.path,idReq:o,token:Object(h.b)()})},move:m({eventBus:t.eventBus}).file,create:function(e,cb){var o=G("create-file");console.log("".concat(n," create file in ").concat(e)),t.eventBus.subscribe(o,cb),g.b.emit("createNote",{folderPath:e,idReq:o,token:Object(h.b)()})}}},w=function(t){return t.replace(u.a.linklink,"$2/$1")},O=e(12),j=e(9),x=e(29),k=e(46),y=function(){var t=Object(k.a)(Object(x.a)().mark((function t(n){return Object(x.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){var o={},i=[];U().then((function(e){e.search.word("#",n,(function(n){var e=[],a={};console.log(n),Object(c.each)(n,(function(t,n){var i={file:t.file,titleName:""};Object(c.each)(t.results,(function(t,n){var r=[],l=t.match(u.a.titleMd);if(l&&l[0]){var s=l[0].split("#").join("").trim();i.titleName=s}var p=t.match(u.a.hashtag3);Object(c.each)(p,(function(t){t=t.substring(1),o[t]||(o[t]={id:Object.keys(o).length+1,name:t,lines:[],noteParts:[]}),o[t].noteParts.push(Object(c.cloneDeep)(i)),o[t].lines.push(n),o[t].lines=Object(c.uniq)(o[t].lines);var e=i.file.name+"-"+i.titleName;a[e]||(a[e]=[]),a[e].push(o[t].id),r.push(o[t])})),Object(c.each)(r,(function(t,n){Object(c.each)(r,(function(o,c){if(n!==c){var i=t.id,a=o.id,r="".concat(i,"-").concat(a),l="".concat(a,"-").concat(i);-1===e.indexOf(r)&&-1===e.indexOf(l)&&e.push(r)}}))}))}))})),Object(c.each)(o,(function(t){i.push(t)})),t({nodesObj:o,nodesArr:i,edges:e})}))}))})));case 1:case"end":return t.stop()}}),t)})));return function(n){return t.apply(this,arguments)}}(),C=function(t){var n="[SEARCH API] 00563 ",e=Object(i.useState)(""),o=Object(j.a)(e,2),c=o[0],a=o[1];Object(i.useEffect)((function(){g.b.on("getWordSearch",(function(n){t.eventBus.notify(n.idReq,n.result)}))}),[]);var r=function(e,cb){!function(e,cb,o){var c=G("search-".concat(o,"-"));console.log("".concat(n," searching ").concat(e," with type ").concat(o)),t.statusApi.searching.set(!0),t.eventBus.subscribe(c,(function(n){t.statusApi.searching.set(!1),cb(n)})),g.b.emit("searchFor",{term:e,token:Object(h.b)(),type:o,idReq:c})}(e,cb,"text")};return{files:{search:r},word:function(e,o,cb){var c=G("search-word-");console.log("".concat(n," searching WORD ").concat(e)),t.eventBus.subscribe(c,(function(t){cb(t)})),g.b.emit("searchWord",{word:e,folder:o,token:Object(h.b)(),idReq:c})},hashtags:function(t,cb){y(t).then((function(t){cb(t)}))},ui:{search:function(t){U().then((function(n){n.ui.browser.files.set([]),a(t),r(t,(function(t){n.ui.browser.files.set(t)}))}))},term:{set:a,get:c}}}},_=e(328),E=function(t){var n=Object(O.a)({},t).eventBus;Object(i.useEffect)((function(){g.b.on("getUploadedFile",(function(t){n.notify(t.idReq,t)}))}),[]);var e={uploadFile:function(t){var e=G("upload-file");n.subscribe(e,(function(n){delete n.idReq,t.onSuccess(n)})),function(t){var n=Object(O.a)({},t),e=n.file,o=n.path,c=n.idReq,i=n.onProgress,a=new _(g.a);a.addEventListener("start",(function(t){t.file.meta.idReq=c,t.file.meta.path=o,t.file.meta.token=Object(h.b)()})),a.addEventListener("progress",(function(t){var n=Math.round(t.bytesLoaded/t.file.size*100);i(n)})),a.submitFiles([e])}({file:t.file,path:t.folderPath,idReq:e,onProgress:function(n){t.onProgress&&t.onProgress(n)}})}};return e},T=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,S=/([^\s,]+)/g,I=e(72),N=e(283),F="/".concat(p.a.path.configFolder,"/").concat(p.a.path.cacheFolder,"/cache-api"),R="[CACHE API]",A=p.a.client.log.verbose,D=p.a.client.log.verbose,L=function(){return(new Date).getTime()},P=function(t){var n=t-L()<0;return A&&console.log(R,"isExpired? : ",n,(t-L())/6e4,"mins"),n},M=function(t){var n=function(t){return"".concat(F,"/cache-api-storage-").concat(Object(b.b)(t),".md")},e=Object(i.useRef)({}),o=function(t,n,o){var c;e.current[t]={content:n,until:(c=o,L()+60*c*1e3)}},c=5e5,a="__CHUNKED__CACHED__OBJ__SIZE:",r="[CACHE CHUNK]",l=function(t,e){var o=JSON.stringify(e),i=function(t,e){D&&console.log(r,n(t),{str:e}),W((function(o){o.file.saveContent(n(t),"".concat(e))}))};if(!(o.length>c))return i(t,o);var l,s=(l=c,o.match(new RegExp(".{1,"+l+"}","g")));D&&console.log(r,"SAVE >> TOO LARGE, split in ".concat(s.length," parts"),{cacheId:t,contentArr:s}),i(t,"".concat(a).concat(s.length));for(var u=function(n){setTimeout((function(){i("c".concat(n,"_").concat(t),s[n])}),200*n)},p=0;p<s.length;p++)u(p)},s=function(t,cb,e){var o=function(t,e,o){W((function(c){c.file.getContent(n(t),e,{onError:o})}))},c="___ERROR___CHUNK___LOADING___FAILURE";o(t,(function(n){try{if(n.startsWith(a)){var i=parseInt(n.replaceAll(a,""));D&&console.log(R,"GET >> remerging a ".concat(i," part"),{cacheId:t}),function(n,e,i,a){for(var l=[],s=function(){if(l.length===e){var n=l.join(""),o=n.includes(c);D&&console.log("GET >> RESULT remerging",{hasFailed:o,cacheId:t,nbChunks:e,resMerge:n}),o?a():i(n)}},u=function(n){o("c".concat(n,"_").concat(t),(function(o){l[n]=o,D&&console.log(r,"c".concat(n,"_").concat(t),{nb:l.length,nbChunks:e,r:o}),s()}),(function(t){l[n]=c,s()}))},p=0;p<e;p++)u(p)}(0,i,(function(t){cb(t)}),(function(t){e()}))}else cb(n)}catch(l){e(l)}}),(function(t){e(t)}))};return{get:function(t,cb){if(t in e.current){var n=e.current[t],c=P(n.until);c&&(n.content=void 0),A&&console.log(R,"FROM RAM",t," expired:",c),cb(n.content)}else s(t,(function(n){try{var o=JSON.parse(n);e.current[t]=Object(O.a)({},o);var c=e.current[t],i=P(c.until);i&&(c.content=void 0),A&&console.log(R,"FROM FILE",t," expired:",i),cb(c.content)}catch(a){}}),(function(n){"NO_FILE"===n&&(A&&console.log(R,"FROM FILE: NO_FILE",t),o(t,void 0,60),cb(e.current[t].content))}))},set:function(t,n,c){c||(c=60),-1===c&&(c=1e32),o(t,n,c);var i=e.current[t];A&&console.log(R,"SETTING",t," with cachedTime in min",c),l(t,i)}}},z=e(113),B=e(83),H=null,U=function(){return new Promise((function(t,n){if(H)return t(H);var e=setInterval((function(){if(H)return clearInterval(e),t(H)}),200)}))},W=function(cb){U().then((function(t){cb(t)}))},q=a.a.createContext(null),V=function(t){var n=Object(i.useRef)({}),e=function(t){delete n.current[t]},o={subscribe:function(t,cb,e){e||(e={}),n.current[t]||(n.current[t]=[]),n.current[t].push({cb:cb,options:e})},unsubscribe:e,notify:function(t,o){Object(c.each)(n.current,(function(n,i){i===t&&Object(c.each)(n,(function(n){try{n.cb(o)}catch(c){console.log("[CLIENT API] error with function",c)}n.options.persistent||e(t)}))}))}};Object(i.useEffect)((function(){p.a.client.log.verbose&&console.log("[CLIENT API ]INIT ")}),[]);var a=function(t){Object(i.useEffect)((function(){g.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),g.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),g.b.on("disconnect",(function(){t.eventBus.notify(n,{isConnected:!1})}))}),[]);var n="watch-api-unique-id-request";return Object(i.useEffect)((function(){g.b.on("onNoteWatchUpdate",(function(e){t.eventBus.notify(n,e)}))}),[]),{file:function(e,cb){t.eventBus.subscribe(n,(function(t){e===t.filePath&&cb(t)}),{persistent:!0})},appStatus:function(cb){t.eventBus.subscribe(n,(function(t){cb(t)}),{persistent:!0})},dev:{toggleIsConnected:function(e){t.eventBus.notify(n,{isConnected:e})}}}}({eventBus:o}),r=C({eventBus:o,statusApi:t.statusApi}),s=v({eventBus:o,historyApi:t.historyApi}),u=function(t){return Object(i.useEffect)((function(){g.b.on("getFiles",(function(n){t.eventBus.notify(n.idReq,n.files)})),g.b.on("getFilesPreview",(function(n){t.eventBus.notify(n.idReq,n.filesPreview)}))}),[]),{get:function(n,cb){p.a.client.log.socket&&console.log("[CLIENT API] get files ".concat(n));var e=G("get-files-");t.statusApi.searching.set(!0),t.eventBus.subscribe(e,(function(e){t.statusApi.searching.set(!1),cb(e,n)})),g.b.emit("askForFiles",{folderPath:n,token:Object(h.b)(),idReq:e})},getPreviews:function(n,cb){var e=G("get-files-");t.eventBus.subscribe(e,cb),g.b.emit("askFilesPreview",{filesPath:n,idReq:e,token:Object(h.b)()})},search:t.searchApi.files.search}}({eventBus:o,searchApi:r,statusApi:t.statusApi}),d=E({eventBus:o}),f=Object(N.a)({eventBus:o}),b=function(t){return Object(i.useEffect)((function(){g.b.on("getFoldersScan",(function(n){t.eventBus.notify(n.idReq,{folders:n.folders,pathBase:n.pathBase})}))}),[]),{get:function(n,cb){p.a.client.log.socket&&console.log("[FOLDERS API] get folders ");var e=G("get-folders-");t.eventBus.subscribe(e,(function(t){var e=Object(O.a)({},t);e.folderPaths=n,cb(e)})),g.b.emit("askFoldersScan",{foldersPaths:n,token:Object(h.b)(),idReq:e})},move:m({eventBus:t.eventBus}).folder,create:l.a,delete:l.b}}({eventBus:o}),w=function(t){return Object(i.useEffect)((function(){g.b.on("getCommandExec",(function(n){t.eventBus.notify(n.idReq,n.resultCommand)}))}),[]),{exec:function(n,cb){var e=G("command-exec-");t.eventBus.subscribe(e,(function(t){Object(c.isString)(t)||(t=JSON.stringify(t)),cb(t)})),g.b.emit("askCommandExec",{commandString:n,token:Object(h.b)(),idReq:e})}}}({eventBus:o}),x=M(),k=Object(l.d)({searchUiApi:r.ui,statusApi:t.statusApi,filesApi:u,foldersApi:b,windowApi:t.windowsApi,tabsApi:t.tabsApi,userSettingsApi:t.userSettingsApi}),y=function(t){var n=Object(i.useState)(),e=Object(j.a)(n,2),o=e[0],c=e[1];return Object(O.a)(Object(O.a)({},I.b),{},{ui:{lineJump:{jump:c,get:o}}})}(),_=Object(z.b)({}),T={cache:x,file:s,encryption:B.b,files:u,popup:t.popupApi,upload:d,ressource:f,tabs:t.tabsApi,folders:b,userSettings:t.userSettingsApi,history:t.historyApi,status:t.statusApi,note:y,analytics:_,search:r,command:w,watch:a,ui:{browser:k,windows:t.windowsApi,lightbox:t.lightboxApi,textToSpeechPopup:t.ttsApi,search:r.ui,note:y.ui}};return H=T,T},G=function(t){return"client-api-".concat(t,"-req-").concat(Object(r.a)())},J=function(t,cb){U().then((function(n){var e=t.apiName.split("."),i=n;if(Object(c.each)(e,(function(t){i=i[t]?i[t]:null})),null===i)return cb("nok",{error:'"'.concat(t.apiName,'" does not exists in current api \n\nAvailable Api properties :\n\n').concat(Y("",n))});try{var a=K(i);if(!Object(c.isNumber)(a)){var r=i.apply(void 0,Object(o.a)(t.apiArguments));return cb("ok",r)}var l=Object(c.cloneDeep)(t.apiArguments);l.splice(a,0,(function(t){cb("ok",t)})),i.apply(void 0,Object(o.a)(l))}catch(s){return cb("nok",{error:'error "'.concat(JSON.stringify(s),'" when executing "').concat(t.apiName,'" with props ').concat(t.apiArguments)})}}))},K=function(t){var n=function(t){var n=t.toString().replace(T,""),e=null;return null===(e=n.startsWith("cb =>")?["cb"]:n.slice(n.indexOf("(")+1,n.indexOf(")")).match(S))&&(e=[]),e}(t),e=n.indexOf("cb");return-1===e?null:e},Y=function t(n,e){var o="";for(var i in e)if("object"===typeof e[i]&&e[i].constructor!==Array){if(i.length>1&&"get"!==i){var a=""!==n?"".concat(n,"."):"";o+=t("".concat(a).concat(i),e[i])}}else o="".concat(o).concat(n,".").concat(i,"\n");var r=o.split("\n"),l=[];return U().then((function(t){Object(c.each)(r,(function(n){var e=n.split("."),o=t;Object(c.each)(e,(function(t,n){o[t]&&(o=o[t])}));var i="var",a="";Object(c.isFunction)(o)&&(i="Function",a=o.toString()),l.push({name:n,type:i,description:a})}))})),o}},14:function(t,n,e){"use strict";e.d(n,"d",(function(){return o})),e.d(n,"e",(function(){return c})),e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return a})),e.d(n,"a",(function(){return r}));var o=function(){var t,n=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n},c=function(t){return"navigator"===t||"editor"===t||"preview"===t},i=function(t){return r()===t};function a(){return!!/iPad/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}var r=function(){var t=window.innerWidth,n="desktop";return l()||t<1e3&&(n="tablet"),t<500&&(n="mobile"),n},l=function(){return!s()},s=function(){var t,n=!1;return t=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(n=!0),n}},142:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(277),c=e(4),i=e(10),a=e(112),r=function(){return Object(o.a)({theme:"light",settings:{background:"#ffffff",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",selectionMatch:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C",gutterBorder:"#ddd",lineHighlight:"#fff"},styles:[{tag:c.e.comment,color:"#787b80"},{tag:c.e.definition(c.e.typeName),color:"#194a7b"},{tag:c.e.typeName,color:"#194a7b"},{tag:c.e.tagName,color:"#008a02"},{tag:c.e.variableName,color:"#1a00db"},{tag:c.e.heading,color:i.a.colors.main},{tag:s.Image,color:"red",class:"tiro-image"},{tag:a.b.LatexMdEl,class:"cm-mdpreview-latex-code mdpreview-source"},{tag:c.e.heading1,class:"actionable-title h1"},{tag:c.e.heading2,class:"actionable-title h2"},{tag:c.e.heading3,class:"actionable-title h3"},{tag:c.e.heading4,class:"actionable-title h4"},{tag:c.e.heading5,class:"actionable-title h5"},{tag:c.e.heading6,class:"actionable-title h6"},{tag:c.e.content,fontSize:"10px"}]})},l={ImageTwo:c.a.define()},s=(Object(c.c)({ImageTwo:l.ImageTwo,"Strikethrough/...":l.ImageTwo}),{ListItem:c.a.define(),headingMark:c.a.define(),LinkReference:c.a.define(),Image:c.a.define(),LinkTitle:c.a.define(),LinkLabel:c.a.define(),Link:c.a.define(),LinkMark:c.a.define(),BulletList:c.a.define()});Object(c.c)({LinkReference:s.LinkReference,ListItem:s.ListItem,Link:s.Link,Image:s.Image,LinkTitle:s.LinkTitle,LinkLabel:s.LinkLabel,LinkMark:s.LinkMark,BulletList:s.BulletList})},143:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));e(0);var o=e(10),c=e(42),i=e(1),a=function(t){return Object(i.c)("div",null,Object(i.c)(c.a,{class:"mobile-text-manip-toolbar",colors:[o.a.colors.editor.mobileToolbar.font,o.a.colors.editor.mobileToolbar.font],buttons:[{icon:"faAngleLeft",action:function(){return t.onButtonClicked("<-")}},{icon:"faAngleRight",action:function(){return t.onButtonClicked("->")}},{icon:"faCheckSquare",action:function(){return t.onButtonClicked("[x]")}},{icon:"faAngleUp",action:function(){return t.onButtonClicked("^")}},{icon:"faAngleDown",action:function(){return t.onButtonClicked("v")}},{icon:"faEraser",action:function(){return t.onButtonClicked("X")}},{icon:"faClone",action:function(){return t.onButtonClicked("C")}}]}))},r=function(){return"\n .mobile-text-manip-toolbar {\n position: fixed;\n bottom: ".concat(o.a.sizes.mobile.editorBar+10,"px;\n display: flex;\n list-style: none;\n width: 100%;\n padding: 0px;\n align-content: center;\n justify-content: center;\n align-items: center;\n height: ").concat(o.a.sizes.mobile.editorBar,"px;\n background: ").concat(o.a.colors.editor.mobileToolbar.bg,";\n li {\n flex: 1 1 auto;\n justify-content: center;\n display: flex;\n }\n }\n")}},144:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));e(0);var o=e(10),c=e(28),i=e(1),a=function(t){var n=t.dir?t.dir:"left",e=t.maxHeight?t.maxHeight:50;return Object(i.c)("div",{className:"dropdown-wrapper ".concat(n," ").concat(t.hover?"hover-active":"")},Object(i.c)("span",{onMouseEnter:function(){},onClick:function(){},className:"context-menu-wrapper"},Object(i.c)("div",{className:"dropdown-icon"},Object(i.c)(c.a,{name:"faEllipsisH",color:o.a.colors.l1.font})),Object(i.c)("div",{className:"context-menu",style:{maxHeight:e}},t.children)))},r=function(){return"\n.dropdown-wrapper {\n\t\t\n\t\tposition: relative;\n\t\t&.hover-active:hover {\n\t\t\t\t.context-menu {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\tpointer-events: all;\n\t\t\t\t}\n\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\tcolor: ".concat(o.a.colors.main,";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t.dropdown-icon {\n\t\t\t\tposition: absolute;\n\t\t\t\tpadding: 10px;\n\t\t\t\ttop: -10px;\n\t\t\t\tsvg {\n\t\t\t\t\t\tcolor: #d4d1d1;\n\t\t\t\t}\n\t\t}\n\n\t\t.context-menu {\n\t\t\t\toverflow-y: scroll;\n\t\t\t\tz-index: 100;\n\t\t\t\tright: 10px;\n\t\t\t\ttop: 20px;\n\t\t\t\tpointer-events: none;\n\n\n\t\t\t\ttransition: 0.2s all;\n\t\t\t\ttransition-delay: 0.2s, 0s;\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 0;\n\n\t\t\t\tmin-width: 140px;\n\t\t\t\tpadding: 10px;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tbackground: white;\n\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t}\t\n\n\t\t&.right {\n\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t}\n\t\t}\n}\n")}},145:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));var o=e(0),c=e.n(o),i=e(1),a=function(t){var n=t.progress,e=n>=0&&n<100;return Object(i.c)(c.a.Fragment,null,e&&Object(i.c)("div",{className:"upload-progress-bar-wrapper"},Object(i.c)("div",{className:"bg-fill",style:{width:"".concat(n,"%")}}),Object(i.c)("div",{className:"label"},n,"% uploaded... ")))},r=function(){return"\n.device-mobile {\n\t\t.upload-progress-bar-wrapper {\n\t\t\t\tbottom: 176px;\n\t\t}\n}\n.upload-progress-bar-wrapper {\n\t\t.label {\n\t\t\t\tposition: relative;\n\t\t}\n\t\t.bg-fill {\n\t\t\t\ttransition: 0.1s all;\n\t\t\t\tposition:absolute;\n\t\t\t\tbackground: #077e00;\n\t\t\t\theight: 100%;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: 0px;\n\t\t}\n\t\tposition:absolute;\n\t\tbottom: 0px;\n\t\twidth: 100%;\n\t\tleft: 0px;\n\t\t/* background: green; */\n\t\tbackground: #a0a0a0;\n\t\tcolor: white;\n\t\ttext-align: center;\n\t\tz-index:3;\n\t\tfont-size: 9px;\n\t\tpadding: 5px;\n}\n"}},146:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var o=e(278),c=function(t){return t||(t=0),Object(o.isNumber)(t)?t+1:0}},147:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(9),c=e(8),i=e(0),a=function(){var t=Object(i.useState)(!1),n=Object(o.a)(t,2),e=n[0],a=n[1],r=Object(i.useRef)(0);return Object(i.useEffect)((function(){var t=Object(c.debounce)((function(){r.current=r.current+1,a(!0),setTimeout((function(){a(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{resizeState:e,resizeCount:r}},r=function(t){var n=Object(i.useState)(!1),e=Object(o.a)(n,2),a=e[0],r=e[1];return Object(i.useEffect)((function(){var n=Object(c.debounce)((function(){r(!0),setTimeout((function(){r(!1)}),200)}),200),e=document.querySelector(t);if(e){var o=new ResizeObserver((function(t){n()}));return o.observe(e),function(){o.disconnect()}}}),[]),{resizeState:a}}},148:function(t,n,e){"use strict";e.d(n,"a",(function(){return i})),e.d(n,"b",(function(){return a}));e(8);var o=e(13),c="notes-view-type",i=function(t){return new Promise((function(n,e){Object(o.d)((function(e){e.cache.get(c,(function(e){if(e){var o=e[t];n(o||!1)}}))}))}))},a=function(t,n){Object(o.d)((function(e){e.cache.get(c,(function(o){o||(o={}),o[t]=n,e.cache.set(c,o,1e17)}))}))}},149:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(3),c=e(9),i=e(0),a=e(120),r=e.n(a),l=e(54),s=e(1),u=function(t){var n=Object(i.useState)(0),e=Object(c.a)(n,2),a=e[0],u=e[1],p=Object(i.useRef)(null),d=Object(i.useRef)(null),f=function(){var t={maxY:0,y:0,percent:0},n=d.current?d.current:null,e=p.current?p.current:null;if(!e||!n)return t;var o=e.getBoundingClientRect().height,c=n.getBoundingClientRect().y;return t.maxY=n.getBoundingClientRect().height-o,t.y=e.getBoundingClientRect().y-c,t.percent=t.y/t.maxY*100,t};Object(i.useEffect)((function(){var n=d.current?d.current:null;if(n){var e=new MutationObserver((function(n,e){var c,i=Object(o.a)(n);try{for(i.s();!(c=i.n()).done;){if("data-scroll-refresh"===c.value.attributeName){var a=l.a.getScrollObj(t.windowId),r=a.dims.scroller.viewport;r<20&&(r=20),m(r);var s=(a.dims.scroller.full-a.dims.scroller.viewport)/100,p=a.posPercent*s;u(p)}}}catch(d){i.e(d)}finally{i.f()}}));return e.observe(n,{attributes:!0}),function(){e.disconnect()}}}),[]);var b=Object(i.useState)(0),g=Object(c.a)(b,2),h=g[0],m=g[1];return Object(s.c)("div",{className:"scrolling-bar-wrapper",ref:d},Object(s.c)(r.a,{onDrag:function(n){l.a.onScrollerScroll(t.windowId,f().percent)},onStop:function(){u(f().y)},position:{x:0,y:a},axis:"y",bounds:"parent"},Object(s.c)("div",{ref:p,style:{height:"".concat(h,"px")},className:"scrolling-bar"})))},p=function(){return"\n.view-editor .scrolling-bar-wrapper {\n}\n\n.scrolling-bar-wrapper {\n\t\toverflow: hidden;\n\t\tposition: absolute;\n\t\ttop: 33px;\n\t\theight: calc(100% - 53px);\n\t\tbackground: rgb(226,226,226);\n\t\twidth: 10px;\n\t\tright: 0px;\n\t\tposition: absolute;\n\n\t\t.scrolling-bar {\n\t\t\t\tcursor: ns-resize;\n\t\t\t\tbackground: #cdcccc;\n\t\t\t\theight: 20px;\n\n\t\t}\n}\n"}},150:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return c}));var o=function(t){var n=function(n){i(n,(function(n){n&&t.onImagePasted(n)}))};window.addEventListener("paste",n,!1);return function(){window.removeEventListener("paste",n,!1)}},c=function(t){var n=t.value;navigator&&navigator.clipboard&&navigator.clipboard.writeText(n).then((function(){console.log("Text copied to clipboard...")})).catch((function(t){console.log("Something went wrong",t)}))},i=function(t,n){0==t.clipboardData&&"function"==typeof n&&n(void 0);var e=t.clipboardData.items;void 0==e&&"function"==typeof n&&n(void 0);for(var o=0;o<e.length;o++)if(-1!=e[o].type.indexOf("image")){console.log("[PASTE] informations on files pasted : ",t,e,e.length);var c=e[o].getAsFile();"function"==typeof n&&n(c)}}},151:function(t,n,e){"use strict";e.d(n,"a",(function(){return h}));var o=e(9),c=e(8),i=e(0),a=e(43),r=e(19),l=e(16),s=e(10),u=e(23),p=e(32),d=e(70),f={ui_sidebar:!0,ui_filesList_sortMode:2,ui_layout_colors_main:"#E86666",ui_editor_markdown_preview:!0,ui_editor_links_as_button:!0,ui_editor_markdown_table_preview:!0},b="[USER SETTINGS] :",g=r.a.client.log.verbose,h=function(){var t=Object(d.a)("user-settings",{}),n=Object(o.a)(t,3),e=n[0],r=n[1],h=n[2],m=Object(i.useState)(0),v=Object(o.a)(m,2),w=v[0],O=v[1],j=Object(i.useRef)([]);Object(i.useEffect)((function(){x()}),[e]);var x=Object(p.a)((function(){g&&console.log(b,"UPDATE!",e,w),function(t,n,o){j.current[t]||(j.current[t]=n[o]);var i=e[t];Object(c.isNull)(i)||Object(c.isUndefined)(i)||(""===i&&j.current[t]&&(i=j.current[t]),n[o]=i)}("ui_layout_colors_main",s.a.colors,"main"),O(w+1)}),1e3),k=function(t,n){l.b.emit("updateSetupJson",{paramName:t,paramValue:n,token:Object(u.b)(),idReq:"updateSetupJson-".concat(Object(a.a)())})};return{userSettings:e,userSettingsApi:{updateSetupJson:k,set:function(t,n,o){o||(o={}),o.writeInSetupJson||(o.writeInSetupJson=!1),o.writeInSetupJson&&k(t,"".concat(n)),g&&console.log(b,"updateUserSettings ".concat(t," to ").concat(n));var i=Object(c.cloneDeep)(e);i[t]=n,r(i)},get:function(t){var n=f[t],o=n;return t in e&&(o=e[t]),""===o&&(o=n),o},list:function(){var t=[];return Object(c.each)(e,(function(n,e){var o=e;t.push({key:o,val:n})})),t},refresh:{css:{get:w}}},refreshUserSettingsFromBackend:h}}},152:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(38),c=e(26),i=e(33),a=e(49),r=e(47),l=e(10),s=e(55),u=function(t,n){return Object(s.a)({file:t,pattern:c.a.userCustomTagFull2,replacement:function(e){var c=document.createElement("span");return c.innerHTML=function(t,n,e){var c=t[2].replaceAll("[[","").replaceAll("]]",""),l=t[0].replaceAll("[[".concat(c,"]]"),""),s="".concat(Object(r.b)(c),"-").concat(Object(r.b)(l)),u="ress-".concat(s);Object(i.a)(n,s,(function(){var t=document.querySelector(".".concat(u," .iframe-wrapper-cm-ctag"));if(t){var o=Object(a.a)(c,l,{file:n,windowId:e});Object(a.b)(t,o)}}));var p='\n\t<div class="button-ctag-cm-toggle" \n\t\tonclick="'.concat(Object(i.c)("toggle-ctag-link",(function(t){if(t){var n=t.dataset.filepath,e=decodeURIComponent(t.dataset.tagcontent),c=t.dataset.tagname,l=t.dataset.windowid,s="".concat(Object(r.b)(c),"-").concat(Object(r.b)(e)),u=Object(o.d)(n),p=t.parentNode.parentNode.querySelector(".iframe-wrapper-cm-ctag"),d=p.querySelector("iframe")?"closed":"open";Object(i.b)(u,s,d);var f=Object(a.a)(c,e,{file:u,windowId:l});Object(a.b)(p,f)}})),'"\n\t\tdata-filepath="').concat(n.path,'"\n\t\tdata-windowid="').concat(e,'"\n\t\tdata-tagname="').concat(c,'"\n\t\tdata-tagcontent="').concat(encodeURIComponent(l),'"\n\t>').concat(Object(i.d)("eye"),"</div>"),d='<div class="cm-ctag-name">[[ '.concat(c," ]]</div>"),f='<div class="cm-ctag-overview">'.concat(d).concat(p,"</div>");return'<div class="cm-ctag-wrapper '.concat(u,'">').concat(f).concat('<div class="iframe-wrapper-cm-ctag"></div>',"</div>")}(e,t,n),c}})},p=function(){return"\n\t.cm-ctag-wrapper {\n\t\tposition:relative;\n\t\tbackground: #f2f2f2;\n\t\tpadding: 8px;\n\t\tborder-radius: 5px;\n\t\t.cm-ctag-overview {\n\t\t\tdisplay: flex;\n\t\t\t.cm-ctag-name {\n\t\t\t\tfont-weight: bold;\n\t\t\t\tcolor: ".concat(l.a.colors.main,";\n\t\t\t}\n\t\t\t.button-ctag-cm-toggle {\n\t\t\t\tposition: absolute;\n\t\t\t\tright: 0px;\n\t\t\t\ttop: -1px;\n\t\t\t\topacity: 0.5;\n\t\t\t\tcursor: pointer;\n\t\t\t\tpadding: 10px;\n\t\t\t\t&:hover {\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t.iframe-wrapper-cm-ctag {\n\n\t\t}\n\t}\n\t\n\n\t")}},153:function(t,n,e){"use strict";e.d(n,"a",(function(){return U})),e.d(n,"b",(function(){return W}));var o=e(0),c=e.n(o),i=e(157),a=e(282),r=e(39),l=e(11),s=e(286),u=e(10),p=e(54),d=e(14),f=e(147),b=e(58),g=e(142),h=e(8),m=e(19),v=e(13),w=e(65),O=(m.a.client.log.verbose,function(t,n,e,o,c){return{label:t,apply:n||t,info:e,detail:c,type:"tag",boost:o||0}}),j=function(t){var n=k(t);return[y,n,x]},x=function(t){var n=t.matchBefore(/\-\-/);if(!t.explicit&&!n)return null;var e="".concat(m.a.path.configFolder,"/snippets.md");return new Promise((function(o,c){Object(v.d)((function(c){c.file.getContent(e,(function(e){var c=[],i=e.split("\n");Object(h.each)(i,(function(t){var n,e=(t=t.split("\\n").join("\n")).split("|"),o=null===(n=e.shift())||void 0===n?void 0:n.trim(),i=e.join("|").trim();if(i&&o){if(o="--"+o,i.includes("${")){var a=i;try{i=new Function("return `"+a+"`")()}catch(l){console.warn("[Code Mirror]","snippets error: ",l,a)}}var r=i.length>20?"".concat(i.substring(0,20),"..."):i;c.push(O(o,i,void 0,void 0,r))}}));var a={from:n?n.from:t.pos,options:c,validFor:/.*/};o(a)}))}))}))},k=function(t){return function(n){var e=n.matchBefore(/\#/);return n.explicit||e?new Promise((function(o,c){Object(v.d)((function(c){var i=Object(w.b)(Object(w.b)(t.folder));c.search.hashtags(i,(function(t){var c=[];Object(h.each)(t.nodesArr,(function(t){c.push(O(t.name,t.name))}));var i={from:e?e.from:n.pos,options:c,validFor:/.*/};o(i)}))}))})):null}},y=function(t){var n=t.matchBefore(/\[\[/);return t.explicit||n?new Promise((function(e,o){Object(v.d)((function(o){o.files.get("/.tiro/tags",(function(t){var n=[],e=0;Object(h.each)(t,(function(i){var a=i.name.replace(".md",""),r="[[".concat(a,"]]"),l="".concat(r," ").concat(r),s="Insert installed custom tag ".concat(r),u=0;o.file.getContent(i.path,(function(o){var i=o.split("\n"),a="// --insert:",p="// --comment:",d="// --boost:";Object(h.each)(i,(function(t){(t=t.split("\\n").join("\n")).startsWith(a)&&(l=t.replace(a,"")),t.startsWith(p)&&(s=t.replace(p,"")),t.startsWith(d)&&(u=parseInt(t.replace(d,"")))})),n.push(O(r,l,s,u)),++e===t.length&&c(n)}))}))}));var c=function(o){var c={from:n?n.from:t.pos,options:o,validFor:/.*/};e(c)}}))})):null},C=e(112),_=e(151),E=e(80),T=e(105),S=e(88),I=e(111),N=e(107),F=e(26),R=e(55),A=e(1),D=function(t){return Object(R.a)({file:t,pattern:F.a.ressource,replacement:function(n){var e=document.createElement("span");return e.innerHTML=function(t,n){var e=t[0],o='<div class="mdpreview-source">'.concat(e,"</div>"),c=Object(N.renderToString)(Object(A.c)(E.a,{markdownTag:e,file:n}));return"".concat(c," ").concat(o)}(n,t),e}})},L={val:!1},P=L,M=e(152),z="[Code Mirror]",B=m.a.client.log.verbose,H=Object(o.forwardRef)((function(t,n){var e=function(){var t=n.current;return t&&t.state?t:null},c=Object(o.useRef)(null);Object(o.useEffect)((function(){!function(){var n=e();if(window.cmobj=n,!n)return!1;if(t.value===c.current)return!1;if("loading..."===t.value)return!1;if(n.view.state.doc.toString()===t.value)return!1;var o=b.a.getCurrentLineInfos(n).currentPosition;b.a.updateText(n,t.value,o),c.current=t.value}()}),[t.value,t.forceRender]);Object(o.useEffect)((function(){if(B&&console.log(z,"JUMP to line :",t.jumpToLine),-1!==t.jumpToLine){var n=e();n&&(t.posY<=-10||b.a.scrollToLine(n,t.jumpToLine))}}),[t.jumpToLine]);Object(o.useEffect)((function(){m()}),[t.value]),Object(o.useEffect)((function(){m()}),[]);var u=Object(f.a)(".window-id-".concat(t.windowId)).resizeState;Object(o.useEffect)((function(){m()}),[u]);var h,m=function(){var n=e();if(n){var o=b.a.getEditorInfos(n.view);p.a.updateEditorDims(t.windowId,{viewport:o.viewportHeight,full:o.contentHeight}),p.a.updateScrollerDims(t.windowId)}},v=Object(C.c)({file:t.file,onTitleClick:function(n){!function(n){var o=e();if(o){var c=b.a.getCurrentLineInfos(o);B&&console.log(z,"CLICK ON TITLE DETECTED",n,c),t.onTitleClick(c.lineIndex)}}(n)}}),w=[Object(r.a)({override:j(t.file)}),l.c.domEventHandlers({scroll:function(t,n){},wheel:function(n,e){var o=b.a.getEditorInfos(e);p.a.onEditorScroll(t.windowId,o.currentPercentScrolled),t.onScroll()}})],O={base:i.markdownLanguage,codeLanguages:a.a,extensions:[]},x=!t.value.includes("--no-editor-table")&&!t.value.includes("--nt"),k=!t.value.includes("--no-latex")&&!t.value.includes("--nl"),y=Object(_.a)().userSettingsApi,E="desktop"!==Object(d.a)();y.get("ui_editor_links_as_button")&&(w.push(Object(T.c)(t.file)),w.push(Object(S.c)(t.file,t.windowId))),y.get("ui_editor_markdown_table_preview")&&x&&(w.push((h=t.file,Object(R.a)({file:h,pattern:/\|/gim,classWrap:function(t){return"md-table-limiter"}}))),w.push(function(t){return Object(R.a)({file:t,pattern:F.a.mdTableCell,classWrap:function(t){var n=t[0];return n&&"-"===n||n&&"-|"===n?"":"md-table-cell"}})}(t.file)),w.push(function(t){return Object(R.a)({file:t,pattern:F.a.mdTableLine,classWrap:function(t){var n=t[0].trim();n.startsWith("|")&&(n=n.substring(1)),n.endsWith("|")&&(n=n.substring(0,n.length-1));var e=n.split("|").length;return P.val=!P.val,"md-table-line md-table-".concat(e," ").concat(P.val?"even":"")}})}(t.file))),y.get("ui_editor_markdown_preview")&&k&&O.extensions.push(C.a),y.get("ui_editor_markdown_preview")&&(w.push(v),w.push(Object(I.c)(t.file)),w.push(D(t.file)),w.push(Object(M.a)(t.file,t.windowId))),E||w.push(Object(i.markdown)(O));var N="";return y.get("ui_editor_markdown_table_preview")&&(N+="md-table-preview-enabled"),Object(A.c)("div",{className:"codemirror-editor-wrapper ".concat(N)},Object(A.c)(s.a,{value:"",ref:n,theme:Object(g.a)(),onChange:function(n,e){n!==t.value&&(c.current=n,t.onChange(n),L.val=!1,m())},basicSetup:{foldGutter:!1,dropCursor:!1,allowMultipleSelections:!1,indentOnInput:!1,closeBrackets:!1,bracketMatching:!1,lineNumbers:!1},extensions:w}))})),U=c.a.memo(H,(function(t,n){var e=!0;return t.forceRender!==n.forceRender&&(e=!1),t.jumpToLine!==n.jumpToLine&&(e=!1),t.file.path!==n.file.path&&(e=!1),e})),W=function(){return"\n.teststorage {\n position: absolute;\n top: 120px;\n z-index: 10;\n}\n.cm-selectionLayer {\n pointer-events: none;\n\t\tz-index:0!important;\n}\n.cm-selectionBackground {\n\t\tbackground: rgba(0,0,0,0.1);\n}\n\n\n.actionable-title {\n\t\tcolor: ".concat(u.a.colors.main,";\n\t\tposition: relative;\n\t\t&:before {\n\t\t\t\tcontent: \"\u279d\";\n\t\t\t\tposition: absolute;\n\t\t\t\tright: -20px;\n\t\t\t\tcolor: #c6c6c6;\n\t\t\t\tfont-size: 18px;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition: 0.2s all;\n\t\t\t\tbottom: -3px;\n\t\t}\n\t\t&:hover {\n\t\t\t\t&:before {\n\t\t\t\t\t\topacity: 1\n\t\t\t\t}\n\t\t}\n\t\t&.h1 {\n\t\t\t\tfont-size: 15px;\n\t\t\t\tfont-weight: bold;\n\t\t\t\ttext-decoration: underline;\n\n\t\t}\n\t\t&.h2 {\n\t\t\t\tfont-size: 13px;\n\t\t\t\ttext-decoration: underline;\n\n\t\t}\n\t\t&.h3 {\n\t\t\t\tfont-size: 12px;\n\t\t}\n\n}\n\n\n.cm-matchingBracket {\n\t\tbackground-color: rgba(0,0,0,0)!important;\n}\n\n\n.cm-content {\n\t\t// font-family: 'Open sans', sans-serif;\n\t\tfont-family: Consolas, monaco, monospace;\n\t\tfont-size: 11px;\n}\n\n.cm-focused {\n\t\toutline: none!important;\n}\n.main-editor-wrapper {\n\t\twidth: calc(100% + 18px);\n\t\tmargin: 32px 0px 0px 0px;\n\t\tpadding: 0px;\n\t\twidth:100%;\n\t\theight: ").concat(Object(d.b)("desktop")?"calc(100% - 32px);":"calc(100% - 180px);",'; \n}\n\n.codemirror-editor-wrapper {\n\t\tmargin-right: 18px;\n\t\twidth: calc(100% - 10px);\n}\n.codemirror-editor-wrapper, \t.cm-editor, .cm-theme {\n\t\theight: calc(100% - 30px);\n}\n.codemirror-editor-wrapper, \t.cm-editor, .cm-theme {\n\t\theight: 100% ;\n\t\toverflow:hidden;\n\t\tpadding: 0px;\n}\n.cm-editor {\n\t\tword-break: break-word;\n}\n.cm-search {\n\t\tpadding: 6px 10px 11px;\n}\n.cm-content {\n\t\twidth: 100%;\n\t\toverflow:hidden;\n\t\twhite-space: pre-wrap;\n}\n.cm-scroller {\n\t\tz-index: auto!important;\n\t\tleft: 15px;\n\t\tpadding-right: 25px;\n}\n.cm-line {\n}\n.cm-cursor {\n}\n\n.cm-tooltip-autocomplete {\n\t\tpadding: 10px 5px;\n\t\tbackground: white;\n\t\tborder-radius: 5px;\n\t\tborder: none;\n\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\t\t[aria-selected="true"]{\n\t\t\t\tbackground: ').concat(u.a.colors.main,';\n\t\t\t\tborder-radius: 2px;\n\t\t}\n\n}\n\n.codemirror-mobile-fallback {\n\t\tmargin: 10px;\n\t\ttextarea {\n\t\t\t\twidth: calc(100% - 20px);\n\t\t\t\theight: calc(100vh - 350px);\n\t\t}\n}\n\n.test-success {\n\t\t// background: orange;\n\t\tcolor: red;\n\t\tdisplay: block;\n\t\tpadding-top: 50px;\n}\n.tiro-image {\n\t\tcolor: red;\n\t\tdisplay: block;\n\t\tpadding: 20px;\n}\n.tiro-image-wrapper{\n\t\tposition: relative;\n\n\t\t&:before {\n\t\t\t\tposition: absolute;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: 50%;\n\t\t\t\tcontent: "x";\n\t\t\t\twidth: 50%;\n\t\t\t\theight: 100px;\n\t\t\t\tdisplay:block;\n\t\t\t\t// background: orange;\n\n\t\t}\n}\n\n').concat(Object(C.d)(),"\n\n// FILE RESSOURCE PREVIEW\n").concat(Object(E.b)(),"\n\n// PREVIEW LINK\n").concat(Object(S.b)(),"\n\n\n").concat(function(){for(var t="",n=0;n<30;n++){var e=Math.floor(100/n);t+="\n\t\t\t\t&.md-table-".concat(n," span.md-table-cell{\n\t\t\t\t\t\twidth: calc(").concat(e,"% - 15px);\n\t\t\t\t}")}return"\n.md-table-preview-enabled {\n\t\t.md-table-line {\n\t\t\t\t&.even {\n\t\t\t\t\t\tbackground: #e3e3e3;\n\t\t\t\t}\n\t\t\t\tdisplay: inline-flex;\n\n\t\t\t\tdisplay: block;\n\t\t\t\tbackground: #f4f4f4;\n\t\t\t\tpadding: 5px;\n\t\t\t\t".concat(t,"\n\t\t\t\tspan.md-table-cell {\n\t\t\t\t\t\tpadding-right:13px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tvertical-align: top;\n\t\t\t\t}\n\t\t\t\tspan.md-table-cell span.md-table-limiter {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\tright:0px;\n\t\t\t\t\t\tcolor: #c8c3c3;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t}\n\t\t\t\tspan.md-table-cell>span:first-child {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t}\n\n }\n\t\t.cm-activeLine {\n\t\t\t\t.md-table-line {\n\t\t\t\t\t\tbackground: #d9d9d9;\n\t\t\t\t\t\tspan.md-table-cell span.md-table-limiter {\n\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\t\t.cm-line .md-table-limiter {\n\t\t\t\tdisplay: inline;\n\t\t}\n\n}\n\t\t")}(),"\n")}},154:function(t,n,e){"use strict";e.d(n,"a",(function(){return m})),e.d(n,"b",(function(){return v}));var o=e(9),c=e(12),i=e(81),a=e(8),r=e(0),l=e.n(r),s=e(13),u=e(104),p=e(150),d=e(36),f=e(18),b=e(84),g=e(1);var h={upload:{uploadCounter:0,reinit:function(){}},file:{onTitleUpdate:function(t,n){},onFileDelete:function(t){}}},m=l.a.createContext(h),v=function(t){var n=Object(c.a)({},t).tab,e=Object(r.useContext)(s.a),i=Object(r.useState)(h),l=Object(o.a)(i,2),v=l[0],O=l[1],j=function(){var t=Object(r.useContext)(s.a),n=Object(r.useState)({name:"",data:{}}),e=Object(o.a)(n,2),c=e[0],i=e[1],a=Object(r.useRef)({});return Object(r.useEffect)((function(){if(t){var cb=a.current[c.name];cb&&cb(t,c.data)}}),[c]),{onNextStateTrigger:function(t){i(t)},addNextStateAction:function(t,cb){a.current[t]=cb}}}(),x=j.onNextStateTrigger,k=j.addNextStateAction;k("refreshFolderList",(function(t,n){var e=t.ui.browser.folders.current.get;e===n.folder&&(t.ui.browser.goTo(e,n.name,{openIn:"activeWindow"}),x({name:"checkIfNoWindows"}))})),k("checkIfNoWindows",(function(t){0===n.grid.content.length&&t.tabs.close(n.id)}));var y=Object(a.cloneDeep)(v);return y.file.onFileDelete=function(t){e&&e.popup.confirm("".concat(f.a.trashNote),(function(){var n;null===(n=e.lastNotesApi)||void 0===n||n.removeFile(t.path),e.file.delete(t,(function(n){e.ui.windows.getIdsFromFile(t.path),n[n.length-1];var o=n[0];Object(a.each)(n,(function(t){t.modified&&o.modified&&t.modified>o.modified&&(o=t)})),x({name:"refreshFolderList",data:o})}))}))},y.file.onTitleUpdate=function(t,n){e&&e.file.move(t,n,(function(o){var c,i=null;if(Object(a.each)(o,(function(t){t.path===n&&(i=t)})),i){var r=e.ui.windows.getIdsFromFile(t);e.ui.windows.updateWindows(r,i),null===(c=e.lastNotesApi)||void 0===c||c.removeFile(t),x({name:"refreshFolderList",data:i})}}))},y.upload.reinit=function(){var t=Object(a.cloneDeep)(v);delete t.upload.file,O(t)},Object(r.useEffect)((function(){var t=function(t){var o,c=null===(o=Object(u.b)(n))||void 0===o?void 0:o.file;c&&e&&e.upload.uploadFile({file:t,folderPath:c.folder,onSuccess:function(t){var n=Object(a.cloneDeep)(v);n.upload.uploadCounter=n.upload.uploadCounter+1,n.upload.file=t,delete n.upload.progress,O(n)},onProgress:function(t){var n=Object(a.cloneDeep)(v);delete n.upload.file,n.upload.progress=t,O(n)}})},o=function(t){var n=function(n){if(n.preventDefault(),n.dataTransfer&&n.dataTransfer.items){var e=n.dataTransfer.items;if(!e[0])return;for(var o=0;o<e.length;o++)t.onDropped(e[o].getAsFile())}},e=function(t){t.preventDefault(),o()},o=Object(a.debounce)((function(){t.onDragEnd()}),100);return d.a.log.upload&&console.log("[UPLOAD] reinit drag/drop events"),window.addEventListener("drop",n),window.addEventListener("dragover",e),function(){window.removeEventListener("drop",n),window.removeEventListener("dragover",e)}}({onDropped:t,onDragEnd:function(){console.log("003442 onDragEnd")}}),c=Object(p.b)({onImagePasted:t});return function(){c(),o()}}),[t.tab]),Object(g.c)(w,null,Object(g.c)("div",{className:"window-grid-wrapper"},Object(g.c)(m.Provider,{value:y},Object(g.c)(b.a,{refresh:n.refresh||0,grid:n.grid,onGridUpdate:t.onGridUpdate,mobileView:t.mobileView}))))},w=Object(i.a)("div",{target:"ejnwhwz0"})({name:"zk0z9r",styles:"height:100%;.window-grid-wrapper{height:100%;}"})},155:function(t,n,e){"use strict";e.d(n,"b",(function(){return p})),e.d(n,"a",(function(){return d}));var o=e(9),c=e(0),i=e.n(c),a=e(14),r=e(10),l=e(28),s=e(1),u=function(t){var n=Object(c.useState)(""),e=Object(o.a)(n,2),i=e[0],u=e[1],p=Object(c.useState)(!1),d=Object(o.a)(p,2),f=d[0],b=d[1];Object(c.useEffect)((function(){u(t.title),b(!1)}),[t.title]);return Object(s.c)("div",{className:"title-input-wrapper"},Object(s.c)("input",{className:"big-title",type:"text",value:i,onChange:function(t){var n=function(t){var n=t;return n.replace(/[^\w\s\_\-]/gi,"")}(t.target.value);u(n),b(!0)},onKeyDown:function(n){if("Enter"===n.key){if(i.length<3)return;t.onEdited(t.title,i),b(!1)}}}),f&&Object(s.c)("div",{className:"press-to-save"},Object(s.c)(l.a,{name:"faCircle",color:r.a.colors.main,size:.7})),f&&"mobile"===Object(a.a)()&&Object(s.c)("button",{className:"buttonSaveTitleMobile",onClick:function(){0!==i.length&&(b(!1),t.onEdited(t.title,i))}}," Save "))},p=function(){return"\n.buttonSaveTitleMobile {\n\t\tposition: relative;\n\t\tright: 20px;\n\n\n}\n"},d=i.a.memo(u,(function(t,n){var e=!1;return t.title!==n.title&&(e=!1),e}))},16:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return c})),e.d(n,"c",(function(){return d})),e.d(n,"d",(function(){return f}));var o,c,i=e(12),a=e(17),r=e(8),l=e(274),s=e(76),u=e(36),p=e(18),d=function(){var t=u.a.global.protocol,n=Object(s.b)("backend-port")?":".concat(Object(s.b)("backend-port")):"".concat(u.a.global.port),e="".concat(t).concat(u.a.global.url).concat(n);return Object(s.b)("backend-port").includes(".")&&(e="".concat(t).concat(Object(s.b)("backend-port"))),e},f=function(){return new Promise((function(t,n){o||(o=l(d()),u.a.log.socket&&console.log("[SOCKET] try connecting to ".concat(d(),"...")),(c=g(o)).on("connectionSuccess",(function(n){u.a.log.socket&&console.log("[SOCKET] connection successful!, socket.connected :".concat(o.connected),n),n.isRgGood||alert(p.a.rgNotWorking),t({socket:o,ipsServer:n.ipsServer,socketManager:c})})))}))},b=function(t,n){return["%c [CLIENT SOCKET 2] ".concat(t),"background: #ccc; color: red",n||null]},g=function(t){var n={};return{on:function(e,o){var c=function(t,n){return function(e){var o;u.a.log.socket&&(o=console).log.apply(o,Object(a.a)(b("<== ON ".concat(t," "),Object(i.a)({},e)))),n(e)}}(e,o),l=Object(r.random)(1,1e8);return n[l]={endpoint:e,apiFn:c},t.on(e,c),l},off:function(e){n[e]&&(t.off(n[e].endpoint,n[e].apiFn),delete n[e])},emit:function(n,e){var o;u.a.log.socket&&(o=console).log.apply(o,Object(a.a)(b("==> EMIT ".concat(n," "),Object(i.a)({},e)))),t.emit(n,e)}}}},18:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=e(19).a.strings},19:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o={tokenRefreshInHours:96,path:{staticResources:"static",defaultDataFolder:"markdown-notes",configFolder:".tiro",backendStateFolder:".states",cacheFolder:"cache",historyFolder:".history",archiveFolder:".history_archive",uploadFolder:".resources",relativeUploadFolderName:".resources"},metas:{headerStart:"=== HEADER ===",headerEnd:"=== END HEADER ==="},strings:{folders:"Folders",files:"files",images:"images",trashNote:"Are you sure to trash that note?",clickHereDisconnected:"(click here if persist)",searchingLabel:"searching...",lastNotes:"Last Notes",newNote:"New Note",dateModified:"Modified :",dateCreated:"Created :",searchPlaceholder:"Search Note",hoursAgo:" hours ago",daysAgo:" days ago",minsAgo:" mins ago",months:["January","February","March","April","May","June","July","August","September","October","November","December"],createFolder:"Create folder",createFolderPrompt:"New Folder name to create in",renameFolder:"Rename folder",renameFolderPrompt:"Rename folder to :",deleteFolder:"Delete folder",deleteFolderPrompt:"Are you sure you want to delete the folder and all its notes (no recovery possible) : ",deleteTabPrompt:"Are you sure you want to delete that tab? : ",moveToTrash:"Move to trash",moveToTrashPrompt:"Are you sure you want move folder in .tiro/.trash : ",loadingFolder:"loading...",moveFolderPrompt:"move folder",setupForm:{title:"Login to Tiro",saveToLs:"Autologin/Save for 30 days on that device",introText:"Welcome to Tiro, please fill these informations to get started",user:"user",password:"password",dataFolder:"folder path",userExplanation:"should have > 3 chars",passwordExplanation:"should have > 3 chars",folderExplanation:"relative from Tiro folder installation (../data for example)",successReload:"Configuration file successfully written, reloading application...",submit:"login",noFolder1:"folder path",noFolder2:"doesn't exists, please create it or choose another folder (no data will be deleted)."},appviews:{image:"Switch to Gallery View",text:"Switch to Files View"},loginForm:{wrongUserPassword:"Wrong login/password",wrongToken:"Authentication expired, please log again"},passwordForm:{explanation:"please enter your password",submit:"submit"},editorBar:{tts:"Text to speech",explanation:{history:"File history"},lightbox:"Show Images"},ttsPopup:{title:"Text to speech",voice:"Voice"},settingsPopup:{title:"Tiro Settings",backend:{title:"Server settings",explanation:"Only fill if server is on another port/protocol than the client (usually in development)",protocol:"Https",protocolExpl:"https or http",port:"Backend Port or URL",portExpl:'Port/Url used by backend (ex: "3023" or "backend.myurl.com" or "backend.url.com:3023")'}},historyPopup:{title:"Versions for ",thead:{date:"date",name:"version"}},rgNotWorking:"ERROR: Tiro requires Ripgrep to be working, it seems that ripgrep (rg command) is either not installed or not functionning correctly on you computer. To install it, follow these instructions : https://github.com/BurntSushi/ripgrep#installation",promptPopup:{defaultTitle:"User Prompt",confirmTitle:"Confirm",accept:"Ok",refuse:"Cancel"},tabs:{newTab:"New Tab"}},server:{log:{socket:!1,verbose:!1,fs:!1,ripgrep:!1}},client:{log:{verbose:!1,socket:!1,upload:!1,iframe:!1,eventManager:!1},version:"0.30.97",params:{previewArea:{scrollSpeed:1.3}}},dev:{disableLogin:!1}}},23:function(t,n,e){"use strict";e.d(n,"b",(function(){return h})),e.d(n,"c",(function(){return m})),e.d(n,"a",(function(){return w})),e.d(n,"d",(function(){return O}));var o=e(9),c=e(8),i=e(0),a=e.n(i),r=e(19),l=e(53),s=e(51),u=e(16),p=e(18),d=e(101),f=e(13),b=e(56),g=e(1),h=function(){var t=function(t){var n,e="; ".concat(document.cookie).split("; ".concat(t,"="));return 2===e.length?null===(n=e.pop())||void 0===n?void 0:n.split(";").shift():void 0}("tiro-login-token");return t||""},m=function(){return"?token=".concat(h())},v=function(t){!function(t,n,e){var o=new Date;o.setTime(o.getTime()+60*e*60*1e3);var c="expires="+o.toUTCString();document.cookie=t+"="+n+";"+c+";path=/"}("tiro-login-token",t,r.a.tokenRefreshInHours)},w=function(){v("")},O=function(t){var n=Object(i.useState)(!1),e=Object(o.a)(n,2),r=e[0],m=e[1],w=Object(i.useState)(""),O=Object(o.a)(w,2),j=O[0],x=O[1],k=Object(i.useState)(""),y=Object(o.a)(k,2),C=y[0],_=y[1],E=Object(i.useState)(),T=Object(o.a)(E,2),S=T[0],I=T[1],N=Object(i.useRef)(0);Object(i.useEffect)((function(){return N.current=u.b.on("getLoginInfos",(function(n){switch(n.code){case"SUCCESS":if(!n.token)return;v(n.token),m(!1),t.onLoginSuccess();break;case"WRONG_TOKEN":m(!0),I(["error",p.a.loginForm.wrongToken]);var e=n.loginInfos;null!==e&&void 0!==e&&e.demo_mode&&(x("viewer"),_(e.viewer_password)),t.onLoginAsked();break;case"WRONG_USER_PASSWORD":I(["error",p.a.loginForm.wrongUserPassword]),m(!0)}})),function(){u.b.off(N.current)}}),[]);var F=Object(b.a)("user-password-cache-ls",{}),R=Object(o.a)(F,2),A=R[0],D=R[1];Object(i.useEffect)((function(){if(r){var t=Object(d.b)().dic,n="__HARDCODED_LOGIN_LS_PASSWORD_0129dsfaf1029__";t.l1&&t.l2&&t.l1.value&&t.l2.value&&Object(f.d)((function(e){var o,i,a=t.l1.value+t.l2.value;if(A[a])o=A[a].usr,i=A[a].pass;else if(o=e.encryption.decryptUrlParam(t.l1.value,n).plaintext,i=e.encryption.decryptUrlParam(t.l2.value,n).plaintext,o&&i){var r=Object(c.cloneDeep)(A);r[a]={usr:o,pass:i},D(r)}o&&i&&(x(o),_(i),setTimeout((function(){console.log("success login url, submitting it",{usr:o,pass:i}),u.b.emit("sendLoginInfos",{user:o,password:i,token:h()})}),1e3))}))}}),[r]);var L=function(){I(void 0),u.b.emit("sendLoginInfos",{user:j,password:C,token:h()})},P=Object(i.useState)(1),M=Object(o.a)(P,2),z=M[0],B=M[1],H=Object(b.a)("login-to-ls",!1),U=Object(o.a)(H,2);U[0],U[1];return{displayLoginPopup:r,LoginPopupComponent:function(t){return Object(g.c)(a.a.Fragment,null,r&&Object(g.c)("div",{className:"setup-popup-component"},Object(g.c)(s.a,{title:p.a.setupForm.title,onClose:function(){}},Object(g.c)("div",null,Object(g.c)(l.a,{shouldFocus:1===z,value:j,onEnterPressed:function(){B(2)},label:p.a.setupForm.user,onChange:function(t){x(t)}}),Object(g.c)(l.a,{shouldFocus:2===z,value:C,label:p.a.setupForm.password,type:"password",onEnterPressed:function(){L()},onChange:function(t){_(t)}}),Object(g.c)("button",{value:"submit",className:"submit-button",onClick:function(t){L()}},p.a.setupForm.submit),S&&Object(g.c)("div",{className:S[0]},S[1])))))}}}},26:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(30),c=e.n(o),i=e(19),a={img:c()().find(".").then("jpg").or("jpeg").or("png").or("gif").or("webm").or("svg").or("webp"),imgMdConfig:c()().anythingBut("[]|").maybe("|").beginCapture().anythingBut("[]|").endCapture().maybe("|").beginCapture().anythingBut("[]|").endCapture(),customTag:/\[\[[a-zA-Z0-9-\ _\/]*\]\]/},r={strings:{charWithAccents:"[a-zA-Z\xc0-\u024f\u1e00-\u1eff]{1}",tableLine:"([a-z\xc0-\xfaA-Z0-9@:%,-*._+~#= ]+|)"},metas:c()().find(i.a.metas.headerStart).beginCapture().anythingBut("").endCapture().then(i.a.metas.headerEnd),titleHtml:/<(title)[^>]*>([^<]*)<\/\1>/gi,metasHtml:/<meta[^>]*(name|property)="([^"]*)"[^>]*content="([^"]*)"[^>]*>/gi,externalLink3:/https?:\/\/((www\.)?[a-z\xc0-\xfaA-Z0-9@:%._\+~#=]{1,256})\b(\/[-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*\/)?([-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*)\/(\n| |$)/gim,externalLink3Int:/https?:\/\/((www\.)?[a-z\xc0-\xfaA-Z0-9@:%._\+~#=]{1,256})\b(\/[-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*\/)?([-a-zA-Z\xc0-\xfa0-9()\*\;\!@:%_\-\+.,~#?&\/=]*)\//gim,mdTableLine:/\|?(([^\|]+\|)+([^\|]+))\|?/gim,mdTableCell:/((([^|\n])+\|)|(([^|\n])+))/gim,matchingHtmlTags:/<([^>]*)>([^<]*)<\/\1>/,baliseHtml:c()().find("<").anythingBut("<>").then(">"),ressource:c()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").endCapture().then(")"),ref:c()().find("[").anythingBut("[]").then("](").anythingBut("()").then(")"),extimage:c()().find("![").anythingBut("[]").then("](").beginCapture().then("http").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),image:c()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),fullImageMd:c()().beginCapture().find("![").anythingBut("[]").then("](").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageMdSrc:c()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture:c()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture2:/\!\[([^\[\]]+)\]\(([^\(\)]+\.(jpg|jpeg|png|gif|webm|svg|webp))\)/gi,imageAndConfig:c()().find("![").then(a.imgMdConfig).then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),searchlink:c()().find("[search|").beginCapture().anythingBut("[]").endCapture().then("]"),linklink:c()().find("[link|").beginCapture().anythingBut("[]").endCapture().then(" ").beginCapture().then("/").anythingBut("[]").endCapture().then("]"),latexTag:c()().find("[[latex]]").beginCapture().anythingBut("").endCapture().then("[[latex]]"),scriptTag:c()().find("[[script]]").beginCapture().anythingBut("").endCapture().then("[[script]]"),userCustomTagFull:c()().find(a.customTag).beginCapture().anythingBut("").endCapture().then(a.customTag),userCustomTagFull2:c()().beginCapture().beginCapture().find(a.customTag).endCapture().anythingBut("").beginCapture().then(a.customTag).endCapture().endCapture(),userCustomTagFull3:c()().beginCapture().find(a.customTag).endCapture(),userCustomTag3:c()().beginCapture().then(a.customTag).endCapture(),userCustomTagManual:a.customTag,externalLink:c()().find("http").maybe("s").then("://").beginCapture().anythingBut("/ ").endCapture().beginCapture().anythingBut(" ").then("/").beginCapture().anythingBut("? ").endCapture().anythingBut(" \n").then("\\n").endCapture(),url2transform:c()().find("!").beginCapture().find("http").maybe("s").then("://").beginCapture().anything().endCapture().endCapture(),searchFolder:c()().find(" /").anything().endOfLine(),searchFolderNoSpace:c()().find("/").anything().endOfLine(),firstPartImg:c()().find("![").anythingBut("[]").then("]("),hashtag3:c()().find(/[-| |\n]{1}\#([A-z\xc0-\xfa1-9_\-]+)/gi),titleMd:c()().startOfLine().find("#").oneOrMore().then(" ").beginCapture().anythingBut("").endCapture(),scriptHtml:c()().find("<script>").beginCapture().anythingBut("").endCapture().then("<\/script>")}},28:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(5),c=e(6),i=e(20),a=e(21),r=e(0),l=e.n(r),s=e(275),u=e(276),p=e(1),d=function(t){Object(i.a)(e,t);var n=Object(a.a)(e);function e(){var t;Object(o.a)(this,e);for(var c=arguments.length,i=new Array(c),a=0;a<c;a++)i[a]=arguments[a];return(t=n.call.apply(n,[this].concat(i))).size=t.props.size?t.props.size:1,t.isLocal=!t.props.name.startsWith("fa"),t}return Object(c.a)(e,[{key:"render",value:function(){return Object(p.c)("span",{style:{transform:"scale(".concat(this.size,")"),display:"inline-block"}},!this.isLocal&&Object(p.c)(s.a,{icon:u[this.props.name],color:this.props.color||"black",size:"1x"}),this.isLocal&&Object(p.c)("span",{style:{transform:"scale(".concat(this.size,")"),display:"inline-block",width:"20px",height:"20px",background:"url('".concat(this.props.name,"')"),backgroundSize:"contain",backgroundRepeat:"no-repeat"}}))}}]),e}(l.a.Component),f=l.a.memo(d,(function(t,n){return JSON.stringify(t)===JSON.stringify(n)}))},283:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return useRessourceApi}));var _home_ubuntu_Desktop_Dev_tiro_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(12),react__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_1___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__),_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(43),_shared_shared_config__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(19),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(16),_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(23),_api_hook__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(13),_managers_url_manager__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(101),_shared_helpers_filename_helper__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(38),h="[RESSOURCE API] ",useRessourceApi=function useRessourceApi(p){var _p=Object(_home_ubuntu_Desktop_Dev_tiro_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__.a)({},p),eventBus=_p.eventBus;Object(react__WEBPACK_IMPORTED_MODULE_1__.useEffect)((function(){_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__.b.on("getRessourceApiAnswer",(function(t){eventBus.notify(t.idReq,t)}))}),[]);var deleteRessource=function(t,cb){var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_6__.c)("delete-ressource");console.log("".concat(h," delete ressource ").concat(t)),p.eventBus.subscribe(n,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__.b.emit("askRessourceDelete",{path:t,idReq:n,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_5__.b)()})},downloadRessource=function(t,n,cb){var e=Object(_api_hook__WEBPACK_IMPORTED_MODULE_6__.c)("download-ressource");p.eventBus.subscribe(e,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__.b.emit("askRessourceDownload",{url:t,folder:n,idReq:e,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_5__.b)()})},fetchRessource=function(t,cb,n){n||(n={}),n.disableCache||(n.disableCache=!1);var e="/.tiro/cache/fetch/",o="/".concat(_shared_shared_config__WEBPACK_IMPORTED_MODULE_3__.a.path.staticResources,"/").concat(e).concat(Object(_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_2__.b)(t),"?token=").concat(Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_5__.b)());o=Object(_shared_helpers_filename_helper__WEBPACK_IMPORTED_MODULE_8__.b)("".concat(Object(_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_4__.c)()).concat(o)),console.log("".concat(h," FETCHING ressource url ").concat(t," "),{url:t,options:n,staticPath:o});var c=function(){fetch(o).then((function(t){return t.text()})).then((function(t){cb(t)}))},i=function(){downloadRessource(t,e,(function(t){t.message&&c()}))};!0===n.disableCache?i():Object(_managers_url_manager__WEBPACK_IMPORTED_MODULE_7__.a)({url:o,onSuccess:function(){console.log("".concat(h," FETCHING => getting CACHED file"),{url:t,options:n}),c()},onFail:function(){i()}})},fetchUrlArticle=function fetchUrlArticle(url,cb,options){var readabilityUrl="https://cdn.jsdelivr.net/npm/moz-readability@0.2.1/Readability.js";fetchRessource(readabilityUrl,(function(readabilityTxt){var r1=eval(readabilityTxt);fetchRessource(url,(function(t){var n=document.implementation.createHTMLDocument("");n.open(),n.write(t),n.close();var e=new r1(n).parse(),o=(null===e||void 0===e?void 0:e.textContent.replaceAll(" ","\n"))||"";o=(o=(o=(o=o.replaceAll(" ","\n")).replaceAll(" ","\n")).replaceAll(" ","\n")).replaceAll(" ","\n");var c=(null===e||void 0===e?void 0:e.content)||"",i=(null===e||void 0===e?void 0:e.title)||"";cb({title:i,text:o,html:c,raw:t})}))}))},ressourceApi={delete:deleteRessource,download:downloadRessource,fetch:fetchRessource,fetchUrlArticle:fetchUrlArticle};return ressourceApi}},319:function(t,n){},32:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(8),c=e.n(o),i=e(0);function a(cb,t){var n=Object(i.useRef)(cb);return Object(i.useEffect)((function(){n.current=cb})),Object(i.useCallback)(c.a.throttle((function(){return n.current.apply(n,arguments)}),t,{leading:!0,trailing:!1}),[t])}function r(cb,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e={leading:!1,trailing:!0};n&&(e.leading=n);var o=Object(i.useRef)(cb),a=function(){var t=Object(i.useRef)(!0);return Object(i.useEffect)((function(){return function(){t.current=!1}}),[]),function(){return t.current}}();return Object(i.useEffect)((function(){o.current={cb:cb,delay:t}})),Object(i.useCallback)(c.a.debounce((function(){var n;o.current.delay===t&&a()&&(n=o.current).cb.apply(n,arguments)}),t,e),[t,c.a.debounce])}},33:function(t,n,e){"use strict";e.d(n,"d",(function(){return c})),e.d(n,"c",(function(){return i})),e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));e(330);var o=e(13),c=function(t){return'<i class="ssr-icon fa-solid fa-'.concat(t,'"></i>')};window.ssrActionsDic={};var i=function(t,n){var e="window.ssrActionsDic['".concat(t,"'](this)"),o=window.ssrActionsDic;return o[t]||(o[t]=function(t){n(t)}),e},a=function(t,n,e){var c="ressource-preview-status-".concat(t.path),i="".concat(t.path,"-").concat(n);Object(o.d)((function(t){t.cache.get(c,(function(n){n||(n={}),n[i]=e,t.cache.set(c,n,-1)}))}))},r=function(t,n,e){!function(t,n,cb){var e="ressource-preview-status-".concat(t.path),c="".concat(t.path,"-").concat(n);Object(o.d)((function(t){t.cache.get(e,(function(t){if(t){var n=t[c]?t[c]:"closed";cb(n)}}))}))}(t,n,(function(t){"open"===t&&setTimeout((function(){e()}),500)}))}},337:function(t,n){},339:function(t,n){},35:function(t,n,e){"use strict";e.d(n,"g",(function(){return b})),e.d(n,"f",(function(){return g})),e.d(n,"e",(function(){return h})),e.d(n,"a",(function(){return m})),e.d(n,"d",(function(){return v})),e.d(n,"c",(function(){return w})),e.d(n,"b",(function(){return O})),e.d(n,"h",(function(){return j}));e(0);var o=e(19),c=e(26),i=e(47),a=e(16),r=e(73),l=e(80),s=e(107),u=e(88),p=(e(8),e(105)),d=e(111),f=e(1),b=function(t){return Object(r.d)(t,c.a.externalLink3,(function(t){return Object(p.a)(t)}))},g=function(t,n){var e=Object(u.a)("$1","$2",t);return n.replace(c.a.linklink,e)},h=function(t){var n=t.replace(c.a.searchlink,'<a class="search-link preview-link" href="javascript:window.tiroCli.triggerSearch.func(\'$1$2\');">$1</a>');return n=Object(i.a)(n,[[">[__id_",">["],[">[__tags_",">["],[">[__tag_",">["],[" ]</a>","]</a>"]])},m=function(t){var n=t.replace("".concat(Object(a.c)(),"/").concat(o.a.path.staticResources,"/"),""),e="".concat(Object(a.c)(),"/").concat(o.a.path.staticResources,"/").concat(n);return t.startsWith("http")?t:e},v=function(t,n){var e=0,o=Object(r.d)(n,c.a.ressource,(function(n){e++;"".concat(n,"-").concat(e);var o="".concat(function(t,n){return Object(s.renderToString)(Object(f.c)(l.a,{markdownTag:t,file:n}))}(n,t)," ");return o}));return o},w=function(t,n){return Object(r.d)(n,c.a.image,(function(n){var e=n.split("](")[1].slice(0,-1);return Object(d.a)(n,e,t)}))},O=function(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")},j=function(t){return t.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'")}},350:function(t,n){},352:function(t,n){},36:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(12),c=e(19),i=Object(o.a)(Object(o.a)({},c.a.client),{},{global:{protocol:"".concat(window.location.protocol,"//"),url:"".concat(window.location.hostname),port:"80"===window.location.port?"":":".concat(window.location.port)}})},377:function(t,n){},379:function(t,n){},38:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"d",(function(){return c})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return a}));var o=function(t){return t=(t=(t=(t=(t=t.split("://").join("__HTTP__SEP")).split("//").join("/")).split("\\").join("/")).split("//").join("/")).split("__HTTP__SEP").join("://")},c=function(t){var n=function(t){var n=t.split("/"),e=t.split("\\"),o=n.length>e.length?n:e,c=o[o.length-1],i=c.split("."),a=t.replace(c,""),r="";i.length>1&&(r=i[i.length-1]);var l=c.replace(".".concat(r),"");return{filename:c,extension:r,path:t,folder:a,filenameWithoutExt:l}}(t),e=n.extension?"file":"folder";return{path:t,realname:n.filename,nature:e,name:n.filename,extension:n.extension,folder:n.folder}},i=function(t){var n=t.match(/(.*)[\/\\]/),e=n?n[1]+"/":"";return o(e)},a=function(t,n){return o(t+"/")===o(n+"/")}},380:function(t,n){},385:function(t,n){},387:function(t,n){},393:function(t,n){},395:function(t,n){},414:function(t,n){},42:function(t,n,e){"use strict";e.d(n,"a",(function(){return p})),e.d(n,"b",(function(){return f}));var o=e(12),c=e(0),i=e.n(c),a=e(110),r=e(10),l=e(28),s=e(1),u=function(t){var n=Object(o.a)({},t),e=n.design,i=n.colors,l=n.size;e||(e="horizontal");var u=!("popup"in t)||t.popup,p=Object(a.a)("button.toolbar-button{position:relative;&.active{svg{color:",i?i[1]:r.a.colors.main,";}}svg{transform:scale(",l||1.3,");color:",i?i[0]:r.a.colors.editor.interfaceGrey,";&:hover{color:",i?i[1]:r.a.colors.main,";}}}","");return Object(c.useMemo)((function(){return Object(s.c)("div",{className:p},Object(s.c)("ul",{className:"buttons-toolbar-component ".concat(t.class," ").concat(e," ").concat(u?"with-popup":"no-popup")},t.buttons.map((function(t,n){var e;return t.action&&Object(s.c)("li",{className:"".concat(t.class," btn-").concat(null===(e=t.title)||void 0===e?void 0:e.toLowerCase()),title:t.title,key:n},Object(s.c)(d,t))}))))}),[t.buttons])},p=i.a.memo(u,(function(t,n){return!1})),d=function(t){var n=Object(s.c)(i.a.Fragment,null);t.title&&(n=Object(s.c)(i.a.Fragment,null,t.title)),t.icon&&(n=Object(s.c)(l.a,{name:t.icon})),t.customHtml&&(n=t.customHtml);var e="toolbar-button ".concat(t.class&&t.class," ").concat(t.active&&"active");return Object(s.c)("button",{className:e,onMouseEnter:function(n){t.onHover&&t.onHover()},onClick:function(n){t.action&&t.action(n)}},Object(s.c)("div",{className:"inside-html-wrapper"},n),Object(s.c)("div",{className:"button-hover-popup "},t.title))},f=function(){return"\n ul.buttons-toolbar-component {\n list-style: none;\n padding: 0px;\n margin: 0px;\n button.toolbar-button {\n ".concat(r.a.els().button,";\n cursor: pointer;\n }\n\t\t\t\t&.vertical {\n\t\t\t\t\t\t.toolbar-button {\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(r.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.button-hover-popup {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(r.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\t\t\t\twidth: 15px;\n\t\t\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.button-hover-popup {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 15px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t\t\t\t\tfont-size: 11px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&.horizontal.with-popup {\n\t\t\t\t\t\t\t\tli button:hover .button-hover-popup {\n\t\t\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&.horizontal {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tli {\n\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t.button-hover-popup {\n\t\t\t\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t\t\t\t\topacity: 0.2;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tbottom: 22px;\n\t\t\t\t\t\t\t\t\t\tbackground: ").concat(r.a.colors.editor.interfaceGrey,";\n\t\t\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\t\t\tleft: 50%;\n\t\t\t\t\t\t\t\t\t\twidth: max-content;\n\t\t\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\t\t\ttransform: translateX(-50%);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n }\n}\n")}},426:function(t,n){},429:function(t,n){},43:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return c}));var o=function(){var t=(new Date).getTime(),n="undefined"!==typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var o=16*Math.random();return t>0?(o=(t+o)%16|0,t=Math.floor(t/16)):(o=(n+o)%16|0,n=Math.floor(n/16)),("x"===e?o:3&o|8).toString(16)}))},c=function(t){var n=t.split("?")[1]||"",e=t.split("?")[0],o=e.replace(/[^\w\s]/gi,"_"),c=n.replace(/[^\w\s]/gi,"_"),i=e.split(".").pop()||"";return((i="."+i.replace(/[^\w\s]/gi,"_")).length>6||i.length<=1)&&(i=""),"".concat(o,"_").concat(c).concat(i)}},47:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return c}));var o=function(t){return(t=c(t,[["-","_"],["_","_"],[" ","_"],["/","_"]])).replace(/[^\w\s]/gi,"")},c=function(t,n){for(var e=0;e<n.length;e++){var o=n[e];t=t.split(o[0]).join(o[1])}return t}},471:function(t,n,e){"use strict";e.r(n);var o=e(0),c=e.n(o),i=e(9),a=e(1),r=e(14),l=e(16),s=e(12),u=e(110),p=e(10),d=e(108),f=e(62),b=e(42),g=e(8),h=e(56),m={};window.tiroCli=m;var v=function(t,n){var e,r,l=Object(h.a)("showRenderId",!1),s=Object(i.a)(l,2),u=s[0],p=s[1];e="toggleRenderId",(r={description:"toggle display of renderId for each block",func:function(){console.log("[toggleRenderId]"),p(!u),setTimeout((function(){window.location.reload()}),1e3)}}).f=r.func,m[e]=r;var d=Object(g.random)(0,1e3);return Object(o.useMemo)((function(){var n=(new Date).getTime(),e=(new Error).stack,o=(null===e||void 0===e||e.split("\n")[6].replace("at ","").replace(/\(.*\)/gi,"").trim(),Object(a.c)(c.a.Fragment,null,u&&Object(a.c)("p",{style:{position:"absolute",fontSize:"10px",color:"rgba(255,0,0,0.8)"}},d),t));(new Date).getTime();return o}),n)},w=e(19),O=e(36),j=e(13),x=function(t,n){var e=Object(o.useRef)();Object(o.useEffect)((function(){e.current=t}),[t]),Object(o.useEffect)((function(){if(null!==n){var t=setInterval((function(){e.current()}),n);return function(){return clearInterval(t)}}}),[n])},k=function(){return"Tiro (".concat(O.a.version,")")},y=e(28),C=e(18),_=function(t){return Object(a.c)("button",{className:"new-file-button",onClick:function(n){t.onNewFile()}},Object(a.c)(y.a,{name:"faPlusCircle",color:"white"}),Object(a.c)("span",null,C.a.newNote))},E=c.a.memo(_,(function(t,n){return!0})),T=e(5),S=e(6),I=e(20),N=e(21),F=e(52),R=e(35),A=e(287),D=e(284),L=e(23),P={ctrl:!1,shift:!1,alt:!1,opt:!1},M={38:"up",40:"down",17:"ctrl",16:"shift",18:"alt",93:"opt",13:"enter"},z=function(t){return t=t||window.event,M[t.keyCode]?M[t.keyCode]:t.key},B={},H=e(71),U=function(t){Object(I.a)(e,t);var n=Object(N.a)(e);function e(t){var o;return Object(T.a)(this,e),(o=n.call(this,t)).oldFiles=[],o.liRefs=[],o.scrollerWrapperRef=c.a.createRef(),o.scrollerListRef=c.a.createRef(),o.canAutoScroll=!1,o.getVisibleItemsDebounced=Object(g.debounce)((function(){var t=o.scrollerWrapperRef.current;if(t){for(var n=t.getBoundingClientRect().height,e=-1,c=[],i=0;i<o.liRefs.length;i++){var a=o.liRefs[i].current;if(a){var r,l=a.getBoundingClientRect().top;if(l>-50&&l<n+100)-1===e&&(e=i),o.props.files[i]&&c.push(null===(r=o.props.files[i])||void 0===r?void 0:r.path)}}o.props.onVisibleItemsChange(c)}}),500),o.onListScroll=function(){o.canAutoScroll=!1,o.getVisibleItemsDebounced()},o.isMultiSelected=function(t){var n=!1;return o.state.selectionEdges[0]<=t&&o.state.selectionEdges[1]>=t&&(n=!0),n},o.itemToScroll=0,o.autoScrollToItem=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];o.itemToScroll=n?t:o.itemToScroll+t,o.itemToScroll<0&&(o.itemToScroll=0),o.itemToScroll>o.props.files.length&&(o.itemToScroll=o.props.files.length),o.scrollerListRef.current.scrollToItem(o.itemToScroll)},o.getUrlLoginToken=function(){return"?token=".concat(Object(L.b)())},o.state={hoverMode:!1,selectionEdges:[-1,-1]},o}return Object(S.a)(e,[{key:"shouldComponentUpdate",value:function(t,n){if(JSON.stringify(t.files)!==JSON.stringify(this.oldFiles)){this.oldFiles=Object(g.cloneDeep)(t.files),this.liRefs=[];for(var e=0;e<t.files.length;e++)this.liRefs.push(c.a.createRef());this.getVisibleItemsDebounced(),this.setState({selectionEdges:[-1,-1]}),this.canAutoScroll=!0}return this.props.activeFileIndex>0&&this.canAutoScroll&&(this.canAutoScroll=!1,this.autoScrollToItem(this.props.activeFileIndex)),!0}},{key:"render",value:function(){var t=this,n=H.a[this.props.sortMode],e=p.a.sizes.l2.fileLi.height+2*p.a.sizes.l2.fileLi.padding+p.a.sizes.l2.fileLi.margin,o=window.innerHeight-(p.a.sizes.search.h+p.a.sizes.search.padding),i=Object(r.b)("desktop")?o:o-p.a.sizes.mobile.bottomBarHeight;return Object(a.c)(c.a.Fragment,null,Object(a.c)("div",{className:"list-wrapper-scroller",style:{height:i},onScroll:this.onListScroll,ref:this.scrollerWrapperRef},Object(a.c)(D.a,null,(function(o){o.height;var r=o.width;return Object(a.c)(A.a,{itemData:t.props.files,className:"List",ref:t.scrollerListRef,height:i,itemCount:t.props.files.length,itemSize:e,width:r||0,onScroll:t.onListScroll},(function(e){var o=e.index,i=e.style,l=t.props.files[o],s=t.props.filesPreview[l.path];return Object(a.c)("div",{style:i},Object(a.c)("li",{ref:t.liRefs[o],style:{width:r||0-2*G.l2.fileLi.padding-2*G.l2.fileLi.margin-35},className:["file-element-list","element-".concat(o),"".concat(t.isMultiSelected(o)?"active":""),"".concat(o===t.props.activeFileIndex?"active":""),"".concat(s&&s.picture?"with-image":"")].join(" "),key:o,draggable:!0,onDragStart:function(){var n=[],e=t.state.selectionEdges;n=-1!==e[0]||-1!==e[1]?t.props.files.slice(e[0],e[1]+1):[l],t.props.onFileDragStart(n)},onDragEnd:function(){t.props.onFileDragEnd()},onClick:function(n){if(P["shift"]){var e=[t.props.activeFileIndex,o];e.sort(),t.setState({selectionEdges:e})}else t.props.onFileClicked(o),t.setState({selectionEdges:[-1,-1]});t.props.onFileClicked(o)}},Object(a.c)("div",{className:"background-item"}),Object(a.c)("div",{className:"background-item-border"}),Object(a.c)("div",{className:"left"},Object(a.c)("h3",{className:"label ".concat(l.name.length<=35?"oneliner":"more"),onMouseEnter:function(n){t.props.hoverMode&&t.props.onFileClicked(o)}},l.name),Object(a.c)("div",{className:"content"},s&&s.content&&Object(a.c)(c.a.Fragment,null,s.content)),Object(a.c)("div",{className:"date ".concat(n)},Object(F.a)(new Date(("modified"===n?l.modified:l.created)||0)))),Object(a.c)("div",{className:"right"},s&&s.picture&&Object(a.c)("div",{className:"picture",style:{backgroundColor:"white",backgroundImage:"url('".concat(s.picture.startsWith("http")?s.picture+t.getUrlLoginToken():"".concat(Object(R.a)(t.props.files[0].folder),"/").concat(s.picture).concat(t.getUrlLoginToken()),"')")}}))))}))}))))}}]),e}(c.a.Component),W=c.a.memo(U,(function(t,n){return!1})),q=Object(s.a)({},p.a),V=(q.els,q.colors),G=(q.font,q.sizes),J=e(143),K=e(38),Y=function(t){return Object(a.c)("div",{className:"folder-tree-view-component"},Object(a.c)("h3",{className:"subtitle"},C.a.folders),Object(a.c)($,{openFolders:t.openFolders,folder:t.folder,current:t.current,onFolderClicked:t.onFolderClicked,onFolderMenuAction:t.onFolderMenuAction,onFolderOpen:function(n){Object(j.d)((function(e){e.ui.browser.folders.open.add(n),t.onFolderOpen(n)}))},onFolderClose:function(n){Object(j.d)((function(e){e.ui.browser.folders.open.remove([n]),t.onFolderClose(n)}))},onFolderDragStart:t.onFolderDragStart,onFolderDragEnd:t.onFolderDragEnd,onFolderDrop:t.onFolderDrop}))},$=function t(n){var e=n.openFolders.includes(n.folder.path)&&n.folder.hasFolderChildren,c=Object(o.useState)(!1),r=Object(i.a)(c,2),l=r[0],s=r[1],u=Object(o.useState)(""),d=Object(i.a)(u,2),f=d[0],b=d[1],g=Object(K.a)(n.current,n.folder.key);return Object(a.c)("li",{className:"folder-wrapper ".concat(g?"current":""," "),draggable:!0,onDrop:function(t){n.folder.key&&(n.onFolderDrop(n.folder),t.stopPropagation())},onDragStart:function(t){n.folder.key&&(n.onFolderDragStart(n.folder),t.stopPropagation())},onDragEnd:function(){n.folder.key&&n.onFolderDragEnd()},onMouseLeave:function(){l&&s(!1)}},Object(a.c)("div",{className:"folder-title ".concat(f),onDragEnter:function(t){b("drag")},onDrop:function(t){b("")},onDragLeave:function(t){b("")}},Object(a.c)("span",{className:"icon",onClick:function(t){e?n.onFolderClose(n.folder.key):n.onFolderOpen(n.folder.key)}},n.folder.hasFolderChildren&&Object(a.c)(y.a,{name:e?"faCaretDown":"faCaretRight",color:p.a.colors.main})),Object(a.c)("span",{className:"title",onClick:function(t){n.onFolderClicked(n.folder.key)}},Object(a.c)("div",{className:"title-drag-bg"}),Object(a.c)("div",{className:"title-label"}," ",n.folder.title)),Object(a.c)("span",{onClick:function(){s(!l)},className:"context-menu-wrapper"},Object(a.c)(y.a,{name:"faEllipsisH",color:p.a.colors.l1.font}),l&&Object(a.c)("div",{className:"context-menu context-menu-folders"},Object(a.c)("ul",null,Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);var t=prompt("".concat(C.a.renameFolderPrompt," "),n.folder.title);t&&""!==t&&t!==n.folder.title&&n.onFolderMenuAction("rename",n.folder,t),s(!1)}},C.a.renameFolder),Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);Object(j.e)().then((function(t){t.popup.prompt({text:"".concat(C.a.createFolderPrompt,' "').concat(n.folder.path,'"?'),userInput:!0,onAccept:function(t){t&&""!==t&&n.onFolderMenuAction("create",n.folder,t)},onRefuse:function(){}})})),s(!1)}},C.a.createFolder),-1===n.folder.path.indexOf(".tiro/.trash")&&Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);s(!1),n.onFolderMenuAction("moveToTrash",n.folder)}},C.a.moveToTrash),-1!==n.folder.path.indexOf(".tiro/.trash")&&Object(a.c)("li",{onClick:function(){if(""===n.folder.path)return s(!1);s(!1),Object(j.e)().then((function(t){t.popup.confirm("".concat(C.a.deleteFolderPrompt,' "').concat(n.folder.path,'"?'),(function(){n.onFolderMenuAction("delete",n.folder)}))}))}},C.a.deleteFolder))))),e&&Object(a.c)("ul",{className:"folder-children"},n.folder.children&&n.folder.children.map((function(e,o){return Object(a.c)(t,{openFolders:n.openFolders,key:o,folder:e,current:n.current,onFolderOpen:n.onFolderOpen,onFolderMenuAction:n.onFolderMenuAction,onFolderClose:n.onFolderClose,onFolderClicked:n.onFolderClicked,onFolderDragStart:n.onFolderDragStart,onFolderDragEnd:n.onFolderDragEnd,onFolderDrop:n.onFolderDrop})}))))},Z=function(t){var n=Object(s.a)({},t).files.slice(0,20);return Object(a.c)(c.a.Fragment,null,n.length>0&&Object(a.c)("div",{className:"last-notes-component"},Object(a.c)("h3",{className:"subtitle"},C.a.lastNotes),Object(a.c)("ul",null,n.map((function(n,e){var o=n.name.replace(".md","");return o=o.length>20?"".concat(o.substr(0,20)):o,Object(a.c)("li",{key:e,title:o,onClick:function(e){t.onClick(n)},className:"note"},Object(a.c)(y.a,{name:"faFile"}),o)})))))},X=c.a.memo(Z,(function(t,n){return t.files===n.files})),Q=e(53),tt=e(51),nt=function(t){var n=Object(o.useContext)(j.a),e=!!n&&n.status.searching.get;return Object(a.c)(c.a.Fragment,null,Object(a.c)("div",{className:"search-bar-component"},Object(a.c)("input",{type:"text",placeholder:C.a.searchPlaceholder,value:t.term,onKeyDown:function(e){if("Enter"===e.key){if(t.term.length<3)return;n&&n.ui.search.search(t.term)}},onChange:function(e){!function(e,o){if(n){var c=n.ui.browser.folders.current.get;""===t.term&&""!==c&&(e=e+" "+c,o&&setTimeout((function(){var t=(o.selectionStart||0)-c.length-1;o.selectionStart=t,o.selectionEnd=t}),10)),n.ui.search.term.set(e)}}(e.target.value,e.target)}}),Object(a.c)("div",{className:"search-status"},e&&C.a.searchingLabel)))},et=e(101),ot=function(t){var n={title:t.realname,folder:t.folder,mobileview:"editor"},e="".concat(O.a.global.protocol).concat(O.a.global.url).concat(O.a.global.port,"?").concat(Object(et.c)(n));window.open(e,"popupDetached","width=600,height=600")},ct=function(t){var n=Object(o.useState)(0),e=Object(i.a)(n,2),c=e[0],r=e[1];Object(o.useEffect)((function(){r(t.startingIndex)}),[t.startingIndex]);var l=function(n){var e=c;e=-1===n&&0===c?t.images.length-1:1===n&&c===t.images.length-1?0:c+n,r(e),d(10)},s=Object(o.useState)(10),u=Object(i.a)(s,2),p=u[0],d=u[1],f=function(t){var n=t+p;n<0&&(n=0),n>20&&(n=20),d(n)},g=Object(o.useRef)(null),h=function(){var t=50*(p-10)+99;p<10&&(t=10*-(10-p)+99);var n="".concat(t,"%"),e={height:n};g.current&&(g.current.naturalWidth>g.current.naturalHeight&&(e={width:n}));return m.current,e},m=Object(o.useRef)(null),v=function(){var t="0px";if(m.current){var n=m.current.clientHeight;t="".concat(n,"px")}return t}();return Object(a.c)("div",{className:"lightbox-component"},Object(a.c)("div",{className:"lightbox-bg",onClick:function(){t.onClose()}}),Object(a.c)("div",{className:"lightbox-content images-nb-".concat(t.images.length),ref:m},t.images.map((function(n,e){return Object(a.c)("div",{key:e,className:"lightbox-image",style:{display:e===c?"flex":"none"}},Object(a.c)("div",{className:"image-zoom-wrapper",style:{lineHeight:v}},Object(a.c)("img",{ref:g,style:h(),src:Object(R.a)(n.url)+Object(L.c)()})),Object(a.c)("div",{className:"image-infos"},Object(a.c)("div",{className:"image-name",onClick:function(t){return ot(n.file)}},n.file.name," - ",n.title),Object(a.c)(b.a,{popup:!1,buttons:[{class:"left",title:"left",icon:"faChevronLeft",action:function(){l(-1)}},{class:"zoom",title:"zoom",icon:"faPlus",action:function(){f(1)}},{class:"dezoom",title:"dezoom",icon:"faMinus",action:function(){f(-1)}},{class:"close",title:"close",icon:"faTimes",action:function(){t.onClose()}},{class:"right",title:"right",icon:"faChevronRight",action:function(){l(1)}}]})))}))))},it={onAccept:function(){},onRefuse:function(){}},at=function(t){var n=Object(o.useState)(!1),e=Object(i.a)(n,2),r=e[0],l=e[1],s=Object(o.useState)(""),u=Object(i.a)(s,2),p=u[0],d=u[1],f=Object(o.useState)(null),b=Object(i.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(C.a.promptPopup.defaultTitle),v=Object(i.a)(m,2),w=v[0],O=v[1],j=Object(o.useState)(!1),x=Object(i.a)(j,2),k=x[0],y=x[1],_=function(t){l(!0),d(t.text),t.title&&O(t.title),t.userInput&&h(""),t.onAccept&&(it.onAccept=t.onAccept),t.onRefuse?(it.onRefuse=t.onRefuse,y(!0)):y(!1)},E=function(){l(!1),h(null),O(""),d(""),y(!1)},T={confirm:function(t,cb,n){_({title:"",text:t,onAccept:cb,onRefuse:function(t){function n(){return t.apply(this,arguments)}return n.toString=function(){return t.toString()},n}((function(){n&&n()}))})},show:function(t,n,cb){_({title:n,text:t,onAccept:cb,onRefuse:function(){}})},prompt:_};return{popupApi:T,PromptPopupComponent:function(){return Object(a.c)(c.a.Fragment,null,r&&Object(a.c)("div",{className:"prompt-popup-component"},Object(a.c)(tt.a,{title:w,onClose:E,canBgClose:!1},Object(a.c)("div",null,Object(a.c)("div",{className:"content",dangerouslySetInnerHTML:{__html:p}}),Object(a.c)("br",null),null!==g&&Object(a.c)("div",null,Object(a.c)("input",{type:"text",value:g,onChange:function(t){h(t.target.value)}}),Object(a.c)("br",null)),Object(a.c)("button",{value:"submit",className:"accept submit-button",onClick:function(t){it.onAccept(g),E()}},C.a.promptPopup.accept),k&&Object(a.c)("button",{value:"submit",className:"refuse submit-button",onClick:function(t){it.onRefuse(g),E()}},C.a.promptPopup.refuse)))))}}},rt=e(149),lt=e(84),st=function(t){var n=Object(o.useContext)(j.a),e=Object(o.useState)(-1),c=Object(i.a)(e,2),r=c[0],l=c[1];return Object(a.c)("div",{className:"tab-list-scroll-wrapper"},Object(a.c)("div",{className:"tab-list-invisible-scroll"},Object(a.c)("div",{className:"tab-list-wrapper"},t.tabs.map((function(e,o){return Object(a.c)(pt,{key:o,tab:e,onDrop:function(t){l(t)},onDragEnter:function(t){l(t)},onDragEnd:function(t){n&&n.tabs.reorder(t,r),l(-1)},dragIndic:r,pos:o,onUpdate:t.onUpdate})})),(null===n||void 0===n?void 0:n.ui.browser.files.active.get)&&Object(a.c)("div",{className:"tab-wrapper tab-more",onClick:function(n){t.onUpdate("add")}},"+"))))},ut=function(t){var n=Object(s.a)({},t),e=n.tab,o=n.pos,i="Six",l=e.grid.layout.length;return 2===l&&(i="Two"),3===l&&(i="Three"),4===l&&(i="Four"),5===l&&(i="Five"),i="faDice".concat(i),Object(a.c)("div",{className:"tab-and-drag-wrapper"},t.dragIndic===o&&Object(a.c)("div",{className:"drag-indic"},"\u25bc"),Object(a.c)("div",{className:"tab-wrapper ".concat(e.active?"active":""),draggable:!0,onDragEnter:function(){t.onDragEnter(o)},onDrop:function(){t.onDrop(o)},onDragEnd:function(){t.onDragEnd(o)}},Object(a.c)("div",{className:"active-ribbon"}),Object(a.c)("div",{className:"tab-name",onClick:function(){t.onUpdate("activate",e)}},"mobile"!==Object(r.a)()&&Object(a.c)("input",{type:"text",className:"tab-input-text",value:e.name,style:{width:10*e.name.length+"px"},onChange:function(n){t.onUpdate("rename",e,n.target.value)}}),"mobile"===Object(r.a)()&&Object(a.c)(c.a.Fragment,null,e.name)),e.grid.layout.length>1&&Object(a.c)("div",{className:"tab-nb-windows",onClick:function(){t.onUpdate("activate",e)}},Object(a.c)(y.a,{name:i,color:"#b2b2b2"})),Object(a.c)("div",{className:"tab-close",onClick:function(){Object(j.d)((function(n){n.popup.confirm("".concat(C.a.deleteTabPrompt,' "').concat(e.name,'"?'),(function(){t.onUpdate("close",e)}))}))}},Object(a.c)(y.a,{name:"faPlus",color:"#b2b2b2"}))))},pt=c.a.memo(ut,(function(t,n){var e=!0,o=Object(g.cloneDeep)({n:t.tab,p:n.tab});return o.n.grid=o.p.grid={},o.n.refresh=o.p.refresh="",JSON.stringify(o.p)!==JSON.stringify(o.n)&&(e=!1),n.pos!==t.pos&&(e=!1),n.dragIndic!==t.dragIndic&&(e=!1),n.tab.active!==t.tab.active&&(e=!1),n.onUpdate!==t.onUpdate&&(e=!1),e})),dt=e(144),ft=e(125),bt=e(145),gt=e(109),ht=e(76),mt=e(153),vt=e(102),wt=e(17),Ot=e(285),jt=e(32),xt=function(t){var n=Object(o.useState)(""),e=Object(i.a)(n,2),c=e[0],r=e[1],l=Object(jt.a)((function(){Object(j.d)((function(n){n.file.getContent(t.file.path,(function(e){if(t.searchedString){var o=t.searchedString;e=e.replaceAll(o,"<span class='found-word'>".concat(t.searchedString,"</span>"))}e=n.note.render({raw:e,file:t.file,windowId:""}),setTimeout((function(){var t;null===(t=document.querySelector(".note-preview-wrapper .found-word"))||void 0===t||t.scrollIntoView()}),100);var c="<div class='file-content render-latex'>".concat(e," </div>");r(c)}))}))}),200);return Object(o.useEffect)((function(){l()}),[t.file,t.searchedString]),Object(a.c)("div",{className:"note-preview-wrapper"},Object(a.c)("div",{className:"simple-css-wrapper",dangerouslySetInnerHTML:{__html:c}}))},kt=e(113),yt="[Search Mode]",Ct="[Explorer Mode]",_t="[Plugin Mode]",Et={dict:{},config:{enabled:!0}},Tt=function(){Et.config.enabled=!1,Et.dict={}},St=function(t){var n=Object(o.useState)([]),e=Object(i.a)(n,2),c=e[0],l=e[1],u=Object(o.useRef)([]),d=function(t){Object(g.isArray)(t)&&(l(t),u.current=t)},f=Object(o.useState)([]),b=Object(i.a)(f,2),h=b[0],m=b[1],v=function(t){pt(t),m(t)},O=Object(o.useState)("No Options"),x=Object(i.a)(O,2),k=x[0],C=(x[1],{indicatorsContainer:function(t,n){return Object(s.a)(Object(s.a)({},t),{},{display:"none"})},menu:function(t,n){var e="mobile"===Object(r.a)()?"all":"none";return Object(s.a)(Object(s.a)({},t),{},{position:"relative",pointerEvents:e})},control:function(t,n){return Object(s.a)(Object(s.a)({},t),{},{outline:"none",boxShadow:"none",border:0})},multiValue:function(t,n){return n.data.editable?t:Object(s.a)(Object(s.a)({},t),{},{backgroundColor:p.a.colors.main})},multiValueRemove:function(t,n){return n.data.editable?t:Object(s.a)(Object(s.a)({},t),{},{display:"none"})}}),_=Object(o.useRef)(),E=h[0]||{label:"",value:""},T=function(n){var e=Object(K.d)(n);Object(j.d)((function(n){n.ui.browser.goTo(e.folder,e.name,{openIn:"activeWindow"}),t.onClose()}))},S=Object(o.useState)(""),I=Object(i.a)(S,2),N=I[0],F=I[1],R=Object(o.useRef)(null);Object(o.useEffect)((function(){R.current=N}),[N]);var A=Object(o.useRef)("");Object(o.useEffect)((function(){!function(){var t=u.current,n=N.trim();if(0===t.length)"/"===n&&(Object(kt.a)("suggest_explorer"),Object(j.d)((function(t){F("");var n=t.ui.browser.files.active.get.folder;U(n)}))),""===n&&G(),"?"===n&&(Object(kt.a)("suggest_search"),W()),":"===n&&J();else if(t[0].label===yt)if(t[1]){if(2===t.length)V(n,t[1].label);else if(3===t.length&&q.current===t[2].value)console.log("STEP 3-1 (optional) : filter found results",q.current);else if(3===t.length||4===t.length){console.log("STEP 3-2 : jump to page",{w:q.current,stags:t});var e=t.length-1,o=t[e].payload.file;T(o.path)}}else"?"===n&&Object(j.d)((function(t){var n=t.ui.browser.files.active.get.folder;F(n)})),z('Path to search (ex:"/path/to/folder") + ENTER'),v([{label:n,value:n}]);else if(t[0].label===Ct){var c=function(){var n=Object(wt.a)(t);n.shift();var e="";return Object(g.each)(n,(function(t){e+="/"+t.value})),e}();c.endsWith(".md")?(c=c.replace(t[0].label,""),T(c)):A.current!==c&&(A.current=c,U(c))}else t[0].label===_t&&Y(n,t)}(),$.current&&$.current()}),[c,N]);var D='"?" for search mode, "/" for explorer mode, ":" for plugin mode',L=Object(o.useState)(D),P=Object(i.a)(L,2),M=P[0],z=P[1],B=Object(o.useRef)(0),H=Object(o.useRef)(""),U=function(t){if(""!==t&&(t.endsWith("/")||(t+="/"),t!==H.current)){H.current=t,console.log("== EXPLORER",t),v([{label:"loading..."}]),tt(null),B.current++;var n=B.current;Object(j.d)((function(e){var o=[t];e.folders.get(o,(function(c){if(n===B.current&&(c.folderPaths.join("")===o.join("")&&c.folders[0])){var i=c.folders[0].children;e.files.get(t,(function(n,e){if(e===t){var o=t.split("/"),c=[];c.push({value:Ct,label:Ct}),c.push({value:"/",label:"/"}),Object(g.each)(o,(function(t){""!==t&&c.push({value:t,label:t+"/"})}));var r=[];Object(a.c)("div",{style:{backgroundImage:"url('".concat("http://localhost:3023/static//ctags//.resources/screenshot%2020230127%20at%20135701.jpg?token=KL3XFJdTJ7MWPtIu50OyUKlBhIszxRMdDwpd3EnSMJ1HGjLCAHaPDGjw9UcZ","')")},className:"barimage"});Object(g.each)(i,(function(t){var n=t.path.split("/"),e=n[n.length-1]+"/";r.push({value:e,label:e})})),Object(g.each)(n,(function(t){var n=t.path.split("/"),e=n[n.length-1],o={file:t},c=Object(a.c)("div",{className:"path-option-wrapper"},Object(a.c)("div",{className:"file"},t.name),Object(a.c)("div",{className:"folder"},t.folder));r.push({value:e,label:c,payload:o})})),d(c),v(r)}}))}}))}))}},W=function(){d([{value:yt,label:yt}])},q=Object(o.useRef)(null),V=Object(jt.a)((function(t,n){var e=n,o=t;if(o&&e&&o.length>2&&e.length>0){z('Searching "'.concat(o,'" in "').concat(e,'" ...')),v([{label:"loading..."}]);var c=o.includes("*"),i=[];v(i),q.current=o,Object(j.d)((function(t){t.search.word(o,e,(function(t){Object(g.each)(t,(function(t){Object(g.each)(t.results,(function(n){var e=c?"(".concat(o,")"):"",r="".concat(t.file.path," ").concat(e),l=n.indexOf(o),s=100,u=n,p=l>50?l-50:0,d=l+50<u.length?l+50:u.length;u.length>s&&(u=u.substring(p,d)),n=u;var f=u.replaceAll(o,"<b>".concat(o,"</b>")),b=Object(a.c)("div",{className:"path-option-wrapper"},Object(a.c)("div",{className:"search-location"},r),Object(a.c)("div",{className:"occur-wrapper",dangerouslySetInnerHTML:{__html:f}}));i.push({label:b,value:q.current+t.file+n+r,payload:{file:t.file,line:n}})}))})),0===i.length&&tt(null),i.unshift({label:"\ud83d\udd0e Filter the ".concat(i.length,' results for "').concat(q.current,'"'),value:q.current}),z("".concat(i.length-1,' results found for "').concat(o,'" in "').concat(e,'" ')),v(i)}))}))}else z("Type the word searched"),v([]),tt(null),q.current=""}),500),G=function(){z(D);var n=function(t){var n=[];return Object(g.each)(t,(function(t){var e=Object(a.c)("div",{className:"path-option-wrapper"},Object(a.c)("div",{className:"file"},t.name),Object(a.c)("div",{className:"folder"},t.folder)),o={value:t.path,label:e,payload:{file:t}};n.push(o)})),n}(t.lastNotes),e=n.shift(),o=n.shift();n.unshift(e),n.unshift(o),v(n)},J=function(){d([{value:_t,label:_t}])},Y=function(n,e){if(tt(null),1===e.length){var o="/".concat(w.a.path.configFolder,"/bar_plugins/");Object(j.d)((function(t){var e=[];t.files.get(o,(function(t){Object(g.each)(t,(function(t){e.push({label:t.name.replace(".md",""),value:t})})),e=Object(g.orderBy)(e,["label"]),v(e),":"===n&&F(""),z("".concat(t.length,' plugins found in "').concat(o,'"'))}))}))}else if(2===e.length){var c=e[1].value;Object(j.d)((function(e){var o=function(o){var c=Et.dict[o],i={input:n,setInputTxt:F,inputTxt:N,inputTxtRef:R,options:h,setOptions:v,onChange:$,onClose:t.onClose,onHide:t.onHide,selectedOptionRef:u,setSelectedOption:d,lodash:g,setNotePreview:tt,notePreview:Q,setHtmlPreview:ct,htmlPreview:ot,loadBarPlugin:function(t,n,o){var c=!Et.config.enabled;e.ressource.fetch(t,(function(t){try{new Function("barApi","tiroApi",t)(n,o)}catch(c){var e="[ERROR LOADING PLUGIN BAR]: ".concat(JSON.stringify(c),'"');console.log(e)}}),{disableCache:c})},disableCache:Tt};try{new Function("barApi","tiroApi",c)(i,e)}catch(r){var a="[ERROR PLUGIN BAR]: ".concat(JSON.stringify(r),'"');console.log(a)}};Object(kt.a)("suggest_plugin_".concat(c.name)),Et.dict[c.name]?o(c.name):e.file.getContent(c.path,(function(t){Et.dict[c.name]=t,o(c.name)}))}))}},$=Object(o.useRef)(null),Z=Object(o.useState)(null),X=Object(i.a)(Z,2),Q=X[0],tt=X[1],nt=Object(o.useState)(null),et=Object(i.a)(nt,2),ot=et[0],ct=et[1],it=Object(o.useState)(void 0),at=Object(i.a)(it,2),rt=at[0],lt=at[1],st=Object(o.useRef)([]),ut=function(t){Object(g.each)(st.current,(function(t){t.disconnect()})),st.current=[];var n=document.querySelectorAll("div[id*='-option']");Object(g.each)(n,(function(t,n){var e=new MutationObserver((function(n){var e=parseInt(t.id.split("-").pop());if("rgba(0, 0, 0, 0)"!==getComputedStyle(t)["background-color"]&&h[e]&&h[e].payload){var o=h[e].payload;!function(t,n){var e=u.current;e[0]&&e[0].label===Ct?tt(t):e[0]&&e[0].label===yt?(tt(t),lt(n),console.log("SEARCH JUMP TO",n,t.path)):e[0]?tt(null):tt(t)}(o.file,o.line||void 0)}}));e.observe(t,{childList:!0,attributes:!0,subtree:!1}),st.current.push(e)}))},pt=Object(jt.a)((function(t){ut()}),100);Object(o.useEffect)((function(){pt(h)}),[h,N]);var dt=Object(o.useState)(300),ft=Object(i.a)(dt,2),bt=ft[0],gt=ft[1],ht=Object(o.useRef)(null);return Object(jt.a)((function(){if(ht&&ht.current){var t=ht.current.clientHeight+30,n=window.innerHeight-t-50;bt!==n&&gt(n)}}),10)(),Object(a.c)("div",{className:"suggest-popup-bg ".concat(t.show?"":"hide"),onClick:function(n){t.onClose()}},Object(a.c)("div",{className:"suggest-popup-wrapper"},Object(a.c)("div",{className:"flex-wrapper",onClick:function(t){t.stopPropagation()}},Object(a.c)("div",{ref:ht},Object(a.c)("div",{className:"help"},M),Object(a.c)("div",{className:"help-right",onClick:function(n){t.onHide()}},Object(a.c)(y.a,{name:"faEyeSlash",color:"#b2b2b2"})),Object(a.c)(Ot.a,{isMulti:!0,ref:_,menuIsOpen:!0,defaultValue:E,value:c,autoFocus:!0,onChange:function(t,n){var e=t[0];if(e&&e.payload&&e.payload.file){var o=e.payload.file;T(o.path),t=[]}d(t)},openMenuOnClick:!1,inputValue:N,onInputChange:function(t,n){"input-blur"===n.action||"menu-close"===n.action||F(t)},onFocus:function(t){},options:h,styles:C,noOptionsMessage:function(){return tt(null),k}})),Object(a.c)("div",{className:"preview-wrapper ".concat(Q?"note-preview":"html-preview-wrapper"),style:{height:bt}},Q&&"mobile"!==Object(r.a)()&&Object(a.c)(xt,{file:Q,searchedString:rt,height:bt}),ot&&Object(a.c)("div",{className:"html-preview",dangerouslySetInnerHTML:{__html:ot},style:{height:bt}})))))},It=function(t){var n=Object(o.useState)(""),e=Object(i.a)(n,2),r=e[0],l=e[1];return Object(o.useEffect)((function(){Object(j.d)((function(n){n.file.getContent(t.filePath,(function(e){var o=Object(K.d)(t.filePath),c=n.note.render({raw:e,file:o});l(c)}))}))}),[t.filePath]),Object(a.c)(c.a.Fragment,null,Object(a.c)("div",{className:"rendered-note-component"},Object(a.c)("span",{className:"rendered-note-content-wrapper",dangerouslySetInnerHTML:{__html:r}})))},Nt=function(t){return Object(a.c)(c.a.Fragment,null,Object(a.c)("div",{className:"shortcut-component"},Object(a.c)("h3",{className:"subtitle"},"shortcuts"),Object(a.c)(It,{filePath:t.filePath})))},Ft=e(105),Rt=e(155),At=e(152),Dt=(Object(r.a)(),Object(s.a)({},p.a)),Lt=Dt.els,Pt=Dt.colors,Mt=(Dt.font,Dt.sizes),zt=function(t,n){var e="//css\n\t\t.content-image {\n\t\t\t\twidth: 90%;\n\t\t}\n\t\t.full {\n\t\t\t\t.content-image {\n\t\t\t\t}\n\t\t}\n\n\t\t".concat("\n .main-wrapper.view-image {\n .mobile-view-toggler {\n display: none;\n }\n \n .left-wrapper {\n width: ".concat("desktop"===Object(r.a)()?15:40,"vw ;\n .left-wrapper-1 {\n width: 100%\n }\n .left-wrapper-2 {\n display: none;\n }\n }\n\n\n .right-wrapper.dual-viewer-view {\n display: none;\n }\n .right-wrapper {\n height: 100vh;\n }\n .right-wrapper.image-gallery-view {\n width: ").concat(100-("desktop"===Object(r.a)()?15:40),"vw;\n }\n }\n \n .main-wrapper.view-text {\n .right-wrapper.dual-viewer-view {\n \n }\n .right-wrapper.image-gallery-view {\n display: none;\n }\n }\n"),"\n\t\t").concat(Object(vt.a)(),"\n\t\t").concat("\n.lightbox-component {\n position: fixed;\n\t\tz-index: 1002;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n \n .lightbox-bg {\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n position: absolute;\n\t\t\t\tbackground: rgb(0 0 0 / 82%);\n }\n\n .lightbox-content {\n\t\t\t\t&.images-nb-1 {\n\t\t\t\t\t\t.left, .right {\n\t\t\t\t\t\t\t\tdisplay: none!important;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tborder-radius: 9px;\n\t\t\t\toverflow: hidden;\n position: absolute;\n width: 95vw;\n height: 95vh;\n background: black;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%); \n\t\t\t\t.zoom, .dezoom {\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\theight: 43px;\n\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\tsvg path {\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsvg {\n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tpadding: 3px;\n\t\t\t\t\t\tborder-radius: 22px;\n\t\t\t\t\t\twidth: 13px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px #00000040;\n\n\t\t\t\t}\n\n .lightbox-image {\n position: relative;\n justify-content: space-around;\n align-items: center;\n width: 100%;\n height: 100%;\n\n &:hover {\n .image-infos {\n display: block;\n }\n }\n .image-infos {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\theight: 55px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tbackground: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 100%);\n\t\t\t\t\t\t\t\tul {\n\t\t\t\t\t\t\t\t\t\tmargin-top: 5px;\n\t\t\t\t\t\t\t\t\t\tjustify-content: flex-end;\n\t\t\t\t\t\t\t\t\t\theight: 95vh;\n\t\t\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tli {\n\t\t\t\t\t\t\t\t\t\t\t\t&.left,\n\t\t\t\t\t\t\t\t\t\t\t\t&.right {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 20%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjustify-content: space-evenly;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t&.left {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index:3;\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.right {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index:3;\n\t\t\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\t\t&.close {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index:4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n // position: relative;\n &:hover {\n .image-name {\n display: block;\n }\n }\n .image-name {\n display: none;\n cursor: pointer;\n color: grey;\n padding: 5px;\n font-size: 10px;\n position: absolute;\n top: 5px;\n left: 5px;\n }\n }\n\t\t\t\t\t\t.image-zoom-wrapper {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t\toverflow: auto;\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\t\t\timg {\n\t\tvertical-align: middle;\n\t\t\t\t\t\t\t\t\t\t/* max-width: 95vw; */\n\t\t\t\t\t\t\t\t\t\tz-index:2;\n\t\t\t\t\t\t\t\t\t\t/* position: relative; */\n\t\t\t\t\t\t\t\t\t\t/* max-height: 95vh; */\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n }\n }\n\n}\n","\n\t\t").concat("\n .prompt-popup-component {\n\t\t\t\t.popup-wrapper {\n\t\t\t\t\t\tmin-width: 200px;\n\t\t\t\t\t\tmin-height: 100px;\n\t\t\t\t\t\ttext-align:center;\n\t\t\t\t}\n }\n","\n\t\t").concat("\n\t\t\t\t\t\t&.device-view-mobile {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.suggest-popup-bg.hide {\n\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.suggest-popup-bg {\n\t\t\t\t\t\t\t\tbackground: rgba(0,0,0,0.5);\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\twidth: 100vw;\n\t\t\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\t\t\tz-index: 1000;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.suggest-popup-wrapper {\n\t\t\t\t\t\t\t\twidth: 88%;\n\t\t\t\t\t\t\t\tmargin: 0 auto;\n\t\t\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tleft: 50%;\n\t\t\t\t\t\t\t\ttransform: translate(-50%);\n\t\t\t\t\t\t\t\ttop: 22px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.help-right {\n\t\t\t\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 3px;\n\t\t\t\t\t\t\t\ttop: 3px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.help {\n\t\t\t\t\t\t\t\tcolor:white;\n\t\t\t\t\t\t\t\tmargin-bottom: 10px;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.preview-wrapper {\n\t\t\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.barimage {\n\t\t\t\t\t\t\t\theight: 60px; \n\t\t\t\t\t\t\t\twidth: 100px;\n\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tdiv[class$='-menu']>div {\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tflex-wrap: wrap;\n\t\t\t\t\t\t\t\tjustify-content: flex-start;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdiv[class$='-option'] {\n\t\t\t\t\t\t\t\twidth: ".concat("mobile"===Object(r.a)()?"100":"20","%;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.path-option-wrapper {\n\n\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t\t.search-location {\n\t\t\t\t\t\t\t\t\t\tcolor: #b3b1b1;\n\t\t\t\t\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.folder {\n\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.file {\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.html-preview-wrapper {\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t.html-preview {\n\t\t\t\t\t\t\t\t\t\tiframe {\n\t\t\t\t\t\t\t\t\t\t\t\t// transform: scale(0.65);\n\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(0.8);\n\t\t\t\t\t\t\t\t\t\t\t\ttransform-origin:top left;\n\t\t\t\t\t\t\t\t\t\t\t\tborder:none;\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 125%;\n\t\t\t\t\t\t\t\t\t\t\t\theight: 125%;\n\t\t\t\t\t\t\t\t\t\t\t\t// width: 155%;\n\t\t\t\t\t\t\t\t\t\t\t\t// height: 155%;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t"),"\n\n\t\t").concat("\n .app-view-switcher-component {\n margin: 0px 10px 10px 10px;\n ul.buttons-toolbar-component {\n li {\n margin-left: 5px;\n margin-right: 5px;\n }\n }\n }\n","\n\t\t").concat(Object(b.b)(),"\n\n\n\t\t").concat("\n .image-gallery-component-wrapper {\n margin: 0px 17px;\n overflow-y: scroll;\n // height: calc(100vh - ".concat(p.a.sizes.search.padding+p.a.sizes.gallery.topH+("desktop"===Object(r.a)()?0:190),"px);\n height: calc(100vh - ").concat(p.a.sizes.search.padding+p.a.sizes.gallery.topH,"px);\n // height: 100%;\n width: 100%;\n\n .masonry-gallery {\n display: flex;\n list-style: none;\n flex-direction: row;\n flex-wrap: wrap;\n\n .masonry-col {\n width: ").concat("desktop"===Object(r.a)()?32:90,"%;\n margin-right: 1%;\n\n .masonry-col-item {\n position: relative;\n &:hover {\n .image-infos {\n display: block;\n }\n }\n .image-infos {\n display: none;\n ").concat(p.a.els().imageInfos,"\n }\n img {\n ").concat(p.a.els().images,"\n }\n margin-bottom: 10px;\n }\n }\n }\n }\n"),"\n\n\t\t").concat(Object(dt.b)(),"\n\n\t\t").concat("\n.search-bar-component {\n input {\n\t\t\t\tborder-radius: 5px;\n width: calc(100% - ".concat(2*p.a.sizes.block+20,"px);\n border: none;\n background: white;\n\t\t\t\tpadding: 18px 9px;\n\t\t\t\tmargin: 0px 15px 15px 15px;\n\t\t\t\tbox-shadow: 0px 0px 6px rgb(0 0 0 / 5%);\n\t\t\t\tfont-size: 11px;\n margin: 0px ").concat(p.a.sizes.block,"px ").concat(p.a.sizes.block,"px ").concat(p.a.sizes.block,"px; \n &::placeholder {\n color: #afadad;\n }\n }\n .search-status {\n text-align: center;\n font-size: 8px;\n\t\t\t\tposition: relative;\n\t\t\t\tbottom:9px;\n\t\t\t\tcolor: grey;\n }\n}\n"),"\n\n\t\t").concat("\n.mobile-view-toggler {\n position: fixed;\n bottom: 0px;\n left: 0px;\n z-index: 10;\n display:flex;\n width: 100%;\n list-style: none;\n margin: 0px;\n padding: 0px;\n background: ".concat(p.a.colors.main,";\n li {\n flex: 1 1 auto;\n button {\n ").concat(p.a.els().button,";\n padding: 8px;\n width: 100%;\n svg {\n color: white;\n transform: scale(1.1);\n background: rgba(255,255,255,0);\n padding: 10px 27px;\n border-radius: 6px;\n }\n &:hover {\n svg {\n color: white;\n }\n }\n &.active {\n svg {\n color: white;\n background: rgba(255,255,255,0.2);\n }\n }\n }\n }\n}\n"),"\n\n\t\t").concat("\n.connection-status {\n font-size: 9px;\n z-index: 11;\n a {\n margin-left: 10px;\n color: white;\n }\n .back-online, .disconnected {\n position: absolute;\n text-align:center;\n color:white;\n top: 0px;\n left: 0px;\n width: 100vw;\n padding: 1px;\n }\n .back-online{\n background: green;\n }\n .disconnected{\n background: ".concat(p.a.colors.main,";\n }\n .connected {\n display:none;\n position: absolute;\n bottom: 5px;\n right: 5px;\n color: ").concat(p.a.colors.green,";\n }\n}\n"),"\n\n\t\t").concat("\n .setup-popup-component {\n .submit-button {\n margin-top: 10px;\n ".concat(p.a.els().redButton,";\n padding: 10px 20px;\n }\n .error {\n color: ").concat(p.a.colors.main,";\n }\n .success {\n color: ").concat(p.a.colors.green,";\n }\n }\n"),"\n\n\t\t").concat(Object(Q.b)(),"\n\n\t\t").concat(Object(gt.b)(),"\n\n\t\t").concat(Object(ht.c)(),"\n\n\t\t").concat("\n.last-notes-component {\n padding: 0px ".concat(p.a.sizes.block,"px;\n \n h3 {\n\n }\n ul {\n height: ").concat(110,"px;\n overflow: hidden;\n &:hover {\n min-height: ").concat(110,"px;\n height: auto;\n }\n\n padding: 0px;\n margin: 0px;\n li {\n cursor: pointer;\n margin-bottom: 7px;\n overflow: hidden;\n height: ").concat(15,"px;\n list-style: none;\n font-size: 11px;\n font-weight: 400;\n svg {\n color: ").concat(p.a.colors.main,";\n margin-right: 10px;\n }\n }\n }\n}\n"),"\n\t\t").concat("\n.shortcut-component {\n\t\tmargin: 0px ".concat(p.a.sizes.block,"px;\n\t\tmargin-bottom: 10px;\n\t\toverflow: hidden;\n\t\t.rendered-note-component {\n\t\t\t\twidth: 800px;\n\t\t\t\t.preview-link {\n\t\t\t\t\t\tcolor: #585757!important;\n\t\t\t\t}\n\t\t\t\t.preview-link {\n\t\t\t\t\t\tfont-weight: 400!important;\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n}\n"),"\n\t\t").concat("\n.rendered-note-component {\n\t\th3 {\n\n\t\t}\n\t\t.rendered-note-content-wrapper {\n\t\t\t".concat(Object(f.c)(),"\n\t\t\t\t&>p {\n\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\tpadding:0px;\n\t\t\t\t}\n\n\t\t}\n\n}\n"),"\n\n\t\t").concat("\n\n.note-preview-wrapper {\n\t\tpadding: 15px ;\n\t\t".concat(Object(f.c)(),"\n\t\t.simple-css-wrapper {\n\n\t\t\t\t.resource-link-content-wrapper ul {\n\t\t\t\t\t\topacity:1!important;\n\t\t\t\t\t\tpointer-events:all!important;\n\t\t\t\t}\n\t\t\t\tiframe {\n\t\t\t\t\t\theight: 400px!important;\n\t\t\t\t}\n\t\t\t\t.resource-link-iframe-wrapper {\n\t\t\t\t\t\tmargin-bottom: 5px;\n\t\t\t\t}\n\t\t}\n\n\t\t.found-word {\n\t\t\t\tfont-weight: bold;\n\t\t\t\tbackground: #fff876;\n\t\t\t\tpadding: 2px;\n\t\t}\n\n\t\t// .note-preview-wrapper .content-preview h3.note-title {\n\t\t\t\t// \t\tmargin-bottom: 10px;\n\t\t\t\t// \t\tmargin-top: 0px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview p {\n\t\t\t\t// \t\tmargin: 0px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview ul,\n\t\t// .note-preview-wrapper .content-preview li {\n\t\t\t\t// \t\tmargin: 0px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview img {\n\t\t\t\t// \t\tmax-width: 300px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview .file-content {\n\t\t\t\t// \t\tpadding: 10px 30px;\n\t\t\t\t// }\n\t\t// .note-preview-wrapper .content-preview {\n\t\t\t\t// \t\t/* max-height: 50vh; */\n\t\t\t\t// }\n\n}\n"),"\n\t\t").concat(Object(Rt.b)(),"\n\n\t\t").concat(Object(tt.b)(),"\n\t\t").concat(Object(Ft.b)(),"\n\t\t").concat(Object(At.b)(),"\n\n\t\t.main-wrapper {\n\t\t\t\t").concat("\n&.device-view-mobile {\n\t\t.folder-tree-view-component {\n\t\t\t\tli.folder-wrapper {\n\t\t\t\t\t\t.context-menu-wrapper {\n\t\t\t\t\t\t\t\tright: -10px;\n\t\t\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\t\t\tright: 5px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n\n.folder-tree-view-component {\n\t\tpadding: ".concat(p.a.sizes.block,"px;\n\t\tpadding-right: 0px;\n\t\tmargin: 0px 0px 100px 0px;\n\t\twidth: calc(100% - ").concat(p.a.sizes.block*(Object(r.b)("desktop")&&!Object(r.c)()?1:2),"px);\n\n\t\tul.folder-children {\n\t\t\t\tmargin: 0px 0px 0px 0px;\n\t\t\t\tpadding: 0px 0px 0px 10px;\n\t\t}\n\n\t\tli.folder-wrapper {\n\n\t\t\t\tposition: relative;\n\t\t\t\tlist-style: none;\n\t\t\t\tfont-size: 13px;\n\t\t\t\tfont-weight: 600;\n\t\t\t\tcursor: pointer;\n\n\t\t\t\t.context-menu-wrapper {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\ttop: -10px;\n\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\ttop: 15px;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 4px rgb(0 0 0 / 10%);\n\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t\t\tpadding: 0px 0px;\n\t\t\t\t\t\t\t\twidth: 100px;\n\t\t\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\tul {\n\t\t\t\t\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tli {\n\t\t\t\t\t\t\t\t\t\t\t\tpadding: 4px 11px;\n\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t.folder-title:hover > .context-menu-wrapper {\n\t\t\t\t\t\tcursor:pointer;\n\t\t\t\t\t\tdisplay:block;\n\t\t\t\t}\n\t\t\t\t&.current > .folder-title {\n\t\t\t\t\t\tcolor: ").concat(p.a.colors.main,";\n\t\t\t\t\t\ttext-decoration: underline;\n\t\t\t\t}\n\t\t\t\t.folder-title {\n\t\t\t\t\t\tposition: relative;\n\n\t\t\t\t\t\t.title-label {\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\tz-index: 0;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.title-drag-bg {\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\twidth: calc(100% - 8px);\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\ttop: -4px;\n\t\t\t\t\t\t\t\tz-index: -1;\n\t\t\t\t\t\t\t\tleft: -5px;\n\t\t\t\t\t\t\t\ttransition: 50ms;\n\t\t\t\t\t\t\t\tbackground: rgba(255,255,255,0);\n\t\t\t\t\t\t\t\tz-index:0;\n\t\t\t\t\t\t\t\tpointer-events: none;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t&.drag .title-drag-bg {\n\t\t\t\t\t\t\t\tbackground: rgba(255,255,255,0.6);\n\t\t\t\t\t\t\t\tpointer-events: all;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpadding: 1px;\n\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\tpadding-left: 20px;\n\t\t\t\t\t\t.icon {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tleft: 2px;\n\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\tpadding: 1px;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tsvg {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\t\t\n}\n"),"\n\t\t\t\tdisplay: flex;\n\t\t\t\t.no-file {\n\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\tmargin-top: 49vh;\n\t\t\t\t}\n\n\n\n\n\n\n\n\n\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t// LEFT 1\n\t\t\t\t////////////////////////////////////////////v\n\t\t\t\t\n\t\t\t\t").concat("\n .new-file-button {\n ".concat(p.a.els().redButton,"\n ").concat(p.a.font.main,";\n padding: ").concat(Object(r.b)("desktop")?"14px 5px":"13px 7px",";\n margin: 13px 15px 15px 15px;\n\t\t\t\twidth: calc(100% - 30px); \n font-size: ").concat((Object(r.b)("desktop"),11),"px;\n svg {\n margin-right: ").concat(Object(r.b)("desktop")?"10px":"5px",";\n }\n \n }\n"),"\n\n\t\t\t\t&.device-view-mobile {\n\t\t\t\t\t\t.settings-button {\n\t\t\t\t\t\t\t\tbottom: 60px;\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t.settings-button {\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tposition: fixed;\n\t\t\t\t\t\tbottom: 10px;\n\t\t\t\t\t\tleft: 10px;\n\t\t\t\t\t\tz-index: 11;\n\t\t\t\t}\n\n\n\n\t\t\t\t&.without-sidebar.device-view-desktop {\n\t\t\t\t\t\t.left-sidebar-indicator {\n\t\t\t\t\t\t\t\ttransition: 0.5s all;\t\n\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0%;\n\t\t\t\t\t\t\t\tz-index:100;\n\t\t\t\t\t\t\t\twidth: 18px;\n\t\t\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\t\t\tbackground: rgb(236, 236, 236);\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\t\tmargin: 0% 0px;\n\t\t\t\t\t\t\t\tborder-radius: 0px 5px;\n\t\t\t\t\t\t\t\t.left-wrapper {\n\t\t\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\t\t\t\ttransition: 0.2s all;\n\t\t\t\t\t\t\t\t\t\ttransition-delay: 500ms, 0ms;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tleft: -").concat(Mt.desktop.l,"vw;\n\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.left-sidebar-indicator:hover {\n\t\t\t\t\t\t\t\t.left-wrapper {\n\t\t\t\t\t\t\t\t\t\tleft: 0vw;\n\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.invisible-scrollbars {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tpadding-right: 18px;\n\t\t\t\t\t\toverflow-y: scroll;\n\t\t\t\t\t\theight: ").concat("desktop"===Object(r.a)()?"100vh":"calc(100vh - 48px)","; \n\t\t\t\t}\n\n\t\t\t\t.left-wrapper {\n\t\t\t\t\t\tbackground: ").concat(Pt.l2.bg,"; \n\t\t\t\t\t\twidth: ").concat("desktop"===Object(r.a)()?Mt.desktop.l:"navigator"!==t?0:100,"vw;\n\n\t\t\t\t\t\tdisplay: ").concat("desktop"===Object(r.a)()?"flex":"navigator"!==t?"none":"flex",";\n\n\n\t\t\t\t\t\t.left-wrapper-1 {\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\tbackground-image: url('").concat(p.a.assets.decoBgMap,"');\n\t\t\t\t\t\t\t\tbackground-color: ").concat(p.a.colors.bgInterface2,";\n\t\t\t\t\t\t\t\tbackground-blend-mode: color-burn;\n\t\t\t\t\t\t\t\tcolor: ").concat(p.a.colors.fontInterface2,";\n\t\t\t\t\t\t\t\twidth: ").concat(Mt.desktop.l1,'%;\n\t\t\t\t\t\t\t\theight:100vh;\n\t\t\t\t\t\t\t\tposition: relative;\n\n\n\t\t\t\t\t\t\t\th3.subtitle {\n\t\t\t\t\t\t\t\t\t\tmargin: 0px 0px 15px;\n\t\t\t\t\t\t\t\t\t\tfont-family: "Open sans", sans-serif;\n\t\t\t\t\t\t\t\t\t\ttext-transform: uppercase;\n\t\t\t\t\t\t\t\t\t\tfont-size: 14px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 800;\n\t\t\t\t\t\t\t\t\t\tfont-style: italic;\n\t\t\t\t\t\t\t\t\t\tcolor: ').concat(Pt.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t\t\t// TEXT VIEW : LEFT 2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t////////////////////////////////////////////v2\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.left-wrapper-2 {\n\t\t\t\t\t\t\t\twidth: ").concat(Mt.desktop.l2,"%;\n\t\t\t\t\t\t\t\theight:100vh;\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgInterface,";\n\n\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t.top-files-list-wrapper {\n\t\t\t\t\t\t\t\t\t\tpadding-top: ").concat(Mt.search.padding,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(Mt.search.h,"px;\n\t\t\t\t\t\t\t\t\t\t.subtitle-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t\t\t\t\t.folder-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 2px 16px 10px 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* margin-top: 4px; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: #aeadad;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.toggle-sidebar-btn {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\th3.subtitle {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin: 0px ").concat(Mt.block,"px ").concat(Mt.block,"px ").concat(Mt.block,"px; \n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.counter {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 2px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Pt.l2.text,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: 800;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t.files-list-component {\n\t\t\t\t\t\t\t\tposition: relative\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.list-toolbar {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: -93px;\n\t\t\t\t\t\t\t\tright: 23px;\n\t\t\t\t\t\t\t\tcolor: ").concat(Pt.l2.text,";\n\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Pt.l2.text,";\n\t\t\t\t\t\t\t\t\t\t").concat(Lt().button,"\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tmargin-right: ").concat(Mt.block,"px; \n\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.items-list-count {\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\ttop: 5px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t").concat("\n.list-wrapper {\n .list-wrapper-scroller{\n height: 100%;\n width: calc(100% + 20px);\n overflow-y:scroll;\n overflow: hidden;\n }\n\n .mobile-buttons-up-down {\n position: fixed;\n right: 0px;\n z-index: 10;\n top: 50%;\n div {\n background: #d6d6d6;\n padding: 10px;\n color:white;\n cursor: pointer;\n }\n }\n\n div.List {\n list-style: none;\n margin-right:20px;\n padding: 0px 0px 0px 0px;\n &.multiselect-mode {\n\t\t\t\t\t\tli .label {\n\t\t\t\t\t\t\t\tmargin-left: 4px;\n\t\t\t\t\t\t}\n }\n\n // NORMAL\n li {\n\t\t\tmax-width:calc(100% - 47px);\n padding: ".concat(G.l2.fileLi.padding,"px ").concat(G.block-G.l2.fileLi.margin,"px;\n margin: ").concat(G.l2.fileLi.margin,"px ").concat(G.l2.fileLi.margin+5,"px ").concat(G.l2.fileLi.margin,"px ").concat(G.l2.fileLi.margin,"px ;\n display: block;\n cursor: pointer;\n position: relative;\n height: ").concat(G.l2.fileLi.height,"px;\n overflow: hidden;\n border: 2px rgba(0,0,0,0) solid;\n \n // ACTIVE\n &:hover,\n &.multiselected,\n &.active {\n }\n\n display: flex;\n justify-content: center;\n\t\t\t\t\t\t&.active .background-item-border,\n\t\t\t\t\t\t&.active .background-item {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tz-index: -1;\n\t\t\t\t\t\t\t\topacity: 0.2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t&.active .background-item-border {\n\t\t\t\t\t\t\t\twidth: calc(100% - 4px);\n\t\t\t\t\t\t\t\theight: calc(100% - 4px);\n\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t\t\tborder: 2px ").concat(p.a.colors.main," solid;\n\t\t\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t\t\t}\n \n\t\t\t\t\t\th3 {\n\t\t\t\t\t\t\t\tfont-size: 12px;\n\t\t\t\t\t\t}\n .left {\n\t\t\t\t\t\t\t\t// width: calc(100% - ").concat(G.l2.fileLi.img,"px - 10px);\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tpadding-right: 10px;\n\n\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\tflex-direction:column;\n\n\t\t\t\t\t\t\t\t.label {\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tmax-height: 35px;\n\t\t\t\t\t\t\t\t\t\t//height: 46px;\n\t\t\t\t\t\t\t\t\t\t// display: flex;\n\t\t\t\t\t\t\t\t\t\t// align-items: center;\n\t\t\t\t\t\t\t\t\t\tmargin-bottom: 2px;\n\t\t\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t\t\ttext-overflow: ellipsis;\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(V.l2.title,";\n\t\t\t\t\t\t\t\t\t\tline-break: anywhere;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t.content {\n\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t\tmargin-bottom: 3px;\n\t\t\t\t\t\t\t\t\t\theight: 25px;\n\t\t\t\t\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\t\t\tline-break: anywhere;\n\t\t\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t\t\t\t").concat(Object(r.b)("desktop")?"":"max-height: 25px;","\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.date {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(V.l2.date,";\n\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\t\t\t\t}\n }\n\n .right {\n\t\t\t\t\t\t\t\t.picture {\n\t\t\t\t\t\t\t\t\t\twidth: ").concat(G.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(G.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\tbackground-size: cover;\n\t\t\t\t\t\t\t\t\t\tz-index: 1;\n\t\t\t\t\t\t\t\t\t\tmargin-top: 3px;\n\t\t\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\t\t\tborder: 2px white solid;\n\t\t\t\t\t\t\t\t}\n }\n }\n }\n}\n"),"\n\n\t\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\n\n\n\n\n\n\n\n\n\n\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t// IMAGE GALLERY VIEW\n\t\t\t\t////////////////////////////////////////////v\n\t\t\t\t.right-wrapper.image-gallery-view {\n\t\t\t\t\t\tbackground: ").concat(Pt.l2.bg,"; \n\t\t\t\t\t\t.image-gallery-header {\n\t\t\t\t\t\t\t\tpadding-top: ").concat(Mt.search.padding,"px;\n\t\t\t\t\t\t\t\theight: ").concat(Mt.gallery.topH,"px;\n\n\t\t\t\t\t\t\t\t.search-bar-component {\n\t\t\t\t\t\t\t\t\t\t// padding: 10px 0px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.image-gallery-component-wrapper {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t// TEXT VIEW : RIGHT\n\t\t\t\t\t\t\t\t\t\t\t\t\t ////////////////////////////////////////////v \n\t\t\t\t\t\t\t\t\t\t\t\t\t ").concat("\n.tab-list-scroll-wrapper {\n\t\theight: 44px;\n\t\tbackground: ".concat(p.a.colors.bgTabs,";\n border-radius: 0px 0px 0px 5px;\n\t\toverflow: hidden;\n\t\t.tab-list-invisible-scroll {\n\t\t\t\twidth: 100%;\n\t\t\t\toverflow-x: scroll;\n\t\t\t\tpadding-bottom: 18px;\n\t\t\t\t.tab-list-wrapper {\n\t\t\t\t\t\tpadding: 7px 0px 0px 13px;\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgTabs,";\n\t\t\t\t\t\tborder-radius: 0px 0px 0px 5px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t&>div:last-child {\n\t\t\t\t\t\t\t\tmargin-right: 30px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.tab-and-drag-wrapper {\n\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t.drag-indic {\n\t\t\t\t\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\ttop: -8px;\n\t\t\t\t\t\t\t\t\t\tleft: -6px;\n\t\t\t\t\t\t\t\t\t\twidth: 20px;\n\t\t\t\t\t\t\t\t\t\theight: 20px;\n\t\t\t\t\t\t\t\t\t\tcolor: #aaaaaa;\n\t\t\t\t\t\t\t\t\t\tfont-size: 8px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.tab-wrapper {\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\talign-items:center;\n\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\tmargin-right: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgTab,";\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tcolor: ").concat(p.a.colors.fontTab,";\n\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.editor,";\n\t\t\t\t\t\t\t\theight: 35px;\n\t\t\t\t\t\t\t\tbox-shadow:rgb(0 0 0 / 20%) 0px -1px 2px ;\n\t\t\t\t\t\t\t\tborder-radius: 5px 5px 0px 0px;\n\t\t\t\t\t\t\t\tjustify-content: space-between;\n\t\t\t\t\t\t\t\tmax-height: 27px;\n\t\t\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\t\t\ttext-align: center;\n\t\t\t\t\t\t\t\t.tab-nb-windows {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 10px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.active-ribbon {\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\theight: 2px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t\t\t.active-ribbon {\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tbackground: ").concat(p.a.colors.bgTabActive,";\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.tab-more {\n\t\t\t\t\t\t\t\t\t\tmin-width: 30px;\n\t\t\t\t\t\t\t\t\t\twidth: 30px;\n\t\t\t\t\t\t\t\t\t\tmax-width: 30px;\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.main,";\n\t\t\t\t\t\t\t\t\t\tdisplay:flex;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\tfont-size:14px;\n\t\t\t\t\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-name {\n\t\t\t\t\t\t\t\t\t\tpadding: 10px 0px 10px 10px;\n\n\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(p.a.colors.fontTab," ;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 11px;\n\t\t\t\t\t\t\t\t\t\t\t\tbackground: none;\n\t\t\t\t\t\t\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\t\t\t\t\t\t\tmin-width: 30px;\n\t\t\t\t\t\t\t\t\t\t\t\tmax-width: 100px;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.editor,";\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-nb-windows {\n\t\t\t\t\t\t\t\t\t\tpadding: 10px 0px 10px 0px;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.tab-close {\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tmargin-left: 5px;\n\t\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\tmargin-left: 5px;\n\t\t\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(p.a.font.main,";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n"),"\n\t\t\t\t").concat(Object(lt.d)(),"\n\t\t\t\t").concat(Object(lt.b)(),"\n\n\t\t\t\t").concat(Object(J.b)(),"\n\t\t\t\t").concat(Object(rt.b)(),"\n\n\t\t\t\t&.without-sidebar.device-view-desktop {\n\t\t\t\t\t\t.right-wrapper.dual-viewer-view {\n\t\t\t\t\t\t\t\twidth: calc(100vw - 18px);\n\t\t\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.right-wrapper.dual-viewer-view {\n\n\t\t\t\t\t\twidth: ").concat("desktop"===Object(r.a)()?Mt.desktop.r:"navigator"!==t?100:0,"vw;\n\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\tdisplay: ").concat("desktop"===Object(r.a)()||"navigator"!==t?"block":"none",";\n\t\t\t\t\t\tpadding-top: 0px;\n\t\t\t\t\t\t.note-wrapper {\n\t\t\t\t\t\t\t\t.dual-view-wrapper.device-tablet, \n\t\t\t\t\t\t\t\t.dual-view-wrapper.device-mobile {\n\t\t\t\t\t\t\t\t\t\t.editor-area,\n\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t\t\t&.view-both.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t.__EDITOR_DESIGN HERE__ {}\n\t\t\t\t\t\t\t\t\t\t&.view-editor.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* display:none; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: -9999px;\n\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t&.view-editor-with-map.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 80%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t.__MINIMAP_DESIGN HERE__ {}\n\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% - 30px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: -50%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbox-shadow: -4px 5px 10px rgba(0, 0, 0, 0.10);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-transitions {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransition-delay: ").concat(p.a.anim.time,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(0.2) translateZ(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransform-origin: 0px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: calc(-80%);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// height: 500vh;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% * 5);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-transitions {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay:").concat(p.a.anim.time,"; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: padding; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransition-delay:").concat(p.a.anim.time,"; \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: all; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 73%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 80px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-right: 140px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 40px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t&.view-preview.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t\t\tdisplay: ").concat("desktop"===Object(r.a)()?"flex":"block",";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t").concat(Object(d.c)(t),"\n\t\t\t\t\t\t\t\t\t\t").concat(Object(mt.b)(),"\n\n\n\t\t\t\t\t\t\t\t\t\t").concat(Object(f.b)(),"\n\n\t\t\t\t\t\t\t\t\t\t").concat(Object(ft.b)(),"\n\t\t\t\t\t\t\t\t\t\t").concat(Object(bt.b)(),'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\th3 {\n\t\t\t\t\t\t\t\tmargin-bottom: 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpre {\n\t\t\t\t\t\t\t\twhite-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */\n\t\t\t\t\t\t\t\twhite-space: -pre-wrap; /* Opera */\n\t\t\t\t\t\t\t\twhite-space: -o-pre-wrap; /* Opera */\n\t\t\t\t\t\t\t\twhite-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */\n\t\t\t\t\t\t\t\tword-wrap: break-word; /* IE 5.5+ */\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n\n\n.preview-content {\n\t\tcounter-reset: h2counter;\n h1 {\n counter-reset: h2counter;\n }\n h2:before {\n content: counter(h2counter) ".\\0000a0\\0000a0";\n counter-increment: h2counter;\n counter-reset: h3counter;\n }\n h3:before {\n content: counter(h2counter) "." counter(h3counter) ".\\0000a0\\0000a0";\n counter-increment: h3counter;\n }\n}\n\n\n');return Object(u.a)(e,";","")},Bt=e(65),Ht="\n<style>\n.popupContent p {\n\t\tbackground: #dadada;\n padding: 3px 5px;\n\t\tmargin: 0px 4px;\n\t\tdisplay: inline-block;\n}\n</style>\n",Ut=function(t,n,e,o){var c=function(t,n){console.log("[MOVEFILE] ".concat(t," -> ").concat(n)),Object(j.e)().then((function(e){e.file.move(t,n,(function(){e&&e.ui.browser.goTo(e.ui.browser.folders.current.get)}))}))};return{askForMoveFile:c,promptAndBatchMoveFiles:function(n){var e=n.files,o=n.folderToDropInto,i="Move <p>".concat(null===e||void 0===e?void 0:e.length,'</p> file(s) to <p>"').concat(o.key,'"</p>?\n<br>\n<br>\nRessources links will be automatically updated<br>\n').concat(Ht,"\n");Object(j.d)((function(n){n.popup.confirm(i,(function(){!function(){for(var n=0;n<e.length;n++){var i=e[n],a="".concat(i.path),r="".concat(o.key,"/").concat(i.name);c(a,r),t()}}()}))}))},promptAndMoveFolder:function(e){var o=Object(s.a)({},e),c=o.folder,i=o.folderToDropInto,a=o.folderBasePath,r=o.newTitle,l=o.renameOnly,u=[c.path,"".concat(l?Object(Bt.a)(i):i.path,"/").concat(r||c.title)],p="".concat(a,"/").concat(u[0]),d="".concat(a,"/").concat(u[1]),f="\n".concat(C.a.moveFolderPrompt," <p>").concat(u[0],"</p> to <p>").concat(u[1],"</p>?\n").concat(Ht,"\n"),b=function(){!function(t,n,cb){console.log("[MOVEFOLDER] ".concat(t," -> ").concat(n)),Object(j.d)((function(e){e.folders.move(t,n,(function(){e&&e.ui.browser.goTo(e.ui.browser.folders.current.get),cb&&cb()}))}))}(p,d,(function(){t(),n(),e.onMoveFn&&e.onMoveFn()}))};e.disablePrompt?b():Object(j.e)().then((function(t){t.popup.confirm(f,(function(){b()}))}))}}},Wt=e(70),qt="[LAST FILE]",Vt=w.a.client.log.verbose,Gt=e(104),Jt=e(154),Kt=e(151),Yt=e(103),$t=function(t){var n=Object(o.useState)({}),e=Object(i.a)(n,2),c=e[0],r=e[1];Object(o.useEffect)((function(){}),[t.files]);var l=Object(o.useReducer)((function(t){return t+1}),0),s=Object(i.a)(l,2)[1],u=Object(o.useState)(2),d=Object(i.a)(u,2),f=d[0],b=d[1];Object(o.useEffect)((function(){Object(j.d)((function(t){b(t.userSettings.get("ui_filesList_sortMode"))}))}),[]);return Object(a.c)("div",{className:"files-list-component"},Object(a.c)("div",{className:"list-toolbar"},Object(a.c)("button",{type:"button",title:"sort",onClick:function(){var n=f+1>=H.a.length?0:f+1;Object(j.d)((function(e){e.userSettings.set("ui_filesList_sortMode",n),b(n),t.onSortFiles(Object(H.d)(t.files,n))}))}},Object(a.c)("span",null,t.files.length>0&&Object(a.c)("span",{className:"list-count"},"(",t.files.length,")"),H.b[f]),Object(a.c)(y.a,{name:"faSort",color:p.a.colors.l2.text}))),Object(a.c)("div",{className:"list-wrapper"},Object(a.c)(W,{files:t.files,filesPreview:c,hoverMode:!1,activeFileIndex:t.activeFileIndex,sortMode:f,onFileClicked:function(n){t.onFileClicked(n)},onFileDragStart:t.onFileDragStart,onFileDragEnd:t.onFileDragEnd,onVisibleItemsChange:function(t){!function(t){for(var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=[],o=0;o<t.length;o++){var i=t[o];c[i]&&!n||e.push(i)}e.length>1&&Object(j.d)((function(t){t.files.getPreviews(e,(function(t){Object(g.each)(t,(function(t){c[t.path]=t})),r(c),s()}))}))}(t,!0)}})))},Zt=e(77),Xt="[PWA]",Qt=w.a.client.log.verbose,tn=e(158),nn=e(81),en=e(26),on=function(){var t=[];return window.speechSynthesis.getVoices().forEach((function(n,e){var o=n.lang?" (".concat(n.lang,")"):"",c="".concat(n.name).concat(o);t.push({key:e,label:c,obj:n})})),t},cn=Object(S.a)((function t(n){var e=this;Object(T.a)(this,t),this.rawText=void 0,this.voice=void 0,this.text2read=void 0,this.chunkedText=void 0,this.chunkLength=1e3,this.currChunkId=0,this.currSpeechObj=void 0,this.speed=1,this.isLoaded=!1,this.shouldStop=!1,this.chunkText=function(t){for(var n=(t=t.replace(/(\r\n\r\n|\n\n|\r\r|\n)/gm,".")).split(/[.!?]+/),o=[],c=0;c<n.length;c++){var i=n[c];if(i.length>e.chunkLength)for(var a=i.split(" "),r="",l=0;l<a.length;l++)((r+=a[l]+" ").length>e.chunkLength||l===a.length-1)&&(o.push(r),r="");else o.push(i)}return o},this.loadVoice=function(t){e.voice=t},this.updateSpeed=function(t){e.speed=t},this.play=function(){if(e.isLoaded)window.speechSynthesis.resume();else{if(e.currChunkId>e.chunkedText.length-1)return console.log("[TTS] finished played");e.isLoaded=!0,e.currSpeechObj=new SpeechSynthesisUtterance,e.currSpeechObj.text=e.chunkedText[e.currChunkId],e.currSpeechObj.rate=e.speed,e.voice&&(e.currSpeechObj.voice=e.voice),setTimeout((function(){window.speechSynthesis.speak(e.currSpeechObj)}),0),e.currSpeechObj.addEventListener("end",(function(){e.isLoaded=!1,e.shouldStop?e.shouldStop=!1:(e.currChunkId+=1,e.play())}))}},this.isPlaying=function(){var t=window.speechSynthesis.speaking;return t&&(t=!window.speechSynthesis.paused),t},this.pause=function(){e.stop()},this.stop=function(){e.shouldStop=!0,e.isLoaded=!1,e.debounceReinitStop(),window.speechSynthesis.cancel()},this.debounceReinitStop=Object(g.debounce)((function(){e.shouldStop=!1}),1e3),this.goToChunk=function(t){t<=0||t>e.chunkedText.length-1||(e.currChunkId=t,e.isPlaying()&&e.debounceRestart())},this.extractToChunkPos=function(t){var n=e.chunkText(t),o=null;if(Object(g.each)(n,(function(t){if(t.length>50)return o=t,!1})),!o)return-1;var c=-1;return Object(g.each)(e.chunkedText,(function(t,n){if(-1!==t.indexOf(o))return c=n,!1})),c},this.getCurrentChunkText=function(){return e.chunkedText[e.currChunkId]},this.debounceRestart=Object(g.debounce)((function(){e.stop(),e.play()}),500),this.goBack=function(){e.goToChunk(e.currChunkId-1)},this.goForward=function(){e.goToChunk(e.currChunkId+1)},this.rawText=n.text,this.text2read=n.text.replace(en.a.ressource,"").replace(en.a.ref,"").replace(en.a.baliseHtml,""),this.chunkedText=this.chunkText(this.text2read),console.log("[TTS] init new manager ",{p:n,text:this.chunkedText,length:this.chunkedText.length})})),an=e(29),rn=e(46),ln="[SCREEN WAKE LOCK]",sn=null,un=function(){var t=Object(rn.a)(Object(an.a)().mark((function t(){return Object(an.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,navigator.wakeLock.request("screen");case 3:sn=t.sent,console.log(ln,"ACTIVE"),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(ln,"Error : ".concat(t.t0.name,", ").concat(t.t0.message));case 10:case"end":return t.stop()}}),t,null,[[0,7]])})));return function(){return t.apply(this,arguments)}}();var pn=function(t){var n=Object(o.useState)(!1),e=Object(i.a)(n,2),c=e[0],l=e[1],s=Object(h.a)("tts-selected-voice",0),u=Object(i.a)(s,2),p=u[0],d=u[1],f=Object(o.useState)(!1),b=Object(i.a)(f,2),g=b[0],m=b[1],v=function(t){!0===t?un():sn&&sn.release().then((function(){sn=null,console.log(ln,"DISABLED")})),m(t)},w=Object(h.a)("tts-pos-".concat(t.id),0),O=Object(i.a)(w,2),j=O[0],k=O[1],_=Object(h.a)("tts-rate",1),E=Object(i.a)(_,2),T=E[0],S=E[1],I=Object(o.useState)(0),N=Object(i.a)(I,2),F=N[0],R=N[1],A=Object(o.useState)(""),D=Object(i.a)(A,2),L=D[0],P=D[1];Object(o.useEffect)((function(){var t=function(t){var n=0,e="".concat(Math.ceil(t),"m");if(t>60){n=Math.floor(t/60);Math.ceil(t%60);e="".concat(n,"h")}return e},n=t(6*(F-j)/(60*T)),e=t(6*F/(60*T)),o=" ".concat(n," left of ").concat(e);P(o)}),[F,T,j]);var M=Object(o.useRef)();window.tts=M,Object(o.useEffect)((function(){setTimeout((function(){on()[p]&&M.current.loadVoice(on()[p].obj)})),M.current=new cn({text:t.fileContent}),M.current.goToChunk(j)}),[]),Object(o.useEffect)((function(){on()[p]&&M.current.loadVoice(on()[p].obj)}),[p]),Object(o.useEffect)((function(){M.current.updateSpeed(T)}),[T]);var z=Object(o.useRef)(!1);return x((function(){l(M.current.isPlaying());var n=-1;(n=0!==M.current.currChunkId?M.current.currChunkId:M.current.currChunkId=1,t.startString&&!z.current)&&(n=M.current.extractToChunkPos(t.startString),M.current.goToChunk(n),z.current=!0);-1!==n&&k(n),R(M.current.chunkedText.length)}),500),Object(o.useEffect)((function(){var n=M.current.getCurrentChunkText();t.onUpdate({totalChunks:F,currentChunk:j,isPlaying:c,currentText:n})}),[F,j,c]),Object(a.c)(dn,null,Object(a.c)(tt.a,{title:"".concat(C.a.ttsPopup.title),onClose:function(){M.current.stop(),t.onUpdate({totalChunks:F,currentChunk:j,isPlaying:!1}),t.onClose()}},Object(a.c)(Q.a,{value:p,type:"select",list:on(),label:C.a.ttsPopup.voice,onSelectChange:function(t){d(parseInt(t))}}),Object(a.c)("span",null," SPEED : "),Object(a.c)("input",{className:"speed-range",type:"range",value:T,min:"0",max:"3",step:"0.1",onChange:function(t){var n=t.target.value;S(n)}})," (",T,")",Object(a.c)("br",null),Object(a.c)("br",null),Object(a.c)("b",null," SENTENCES : "),Object(a.c)("input",{type:"number",className:"text-pos",value:j,min:"0",max:F,onChange:function(t){var n=parseInt(t.target.value);M.current.goToChunk(n),k(n)}})," / ",F,Object(a.c)("br",null),Object(a.c)("input",{type:"range",value:j,className:"range-pos",min:"0",max:F,onChange:function(t){var n=parseInt(t.target.value);M.current.goToChunk(n),k(n)}}),Object(a.c)("div",{className:"estimated-time"},Object(a.c)("b",null,"Reading Time")," :",L),Object(a.c)("div",{className:"buttons"},Object(a.c)("button",{onClick:function(t){M.current.goBack()}},Object(a.c)(y.a,{name:"faFastBackward",color:"black"})),Object(a.c)("button",{onClick:function(t){c||M.current.goToChunk(j),c?M.current.stop():M.current.play()}},Object(a.c)(y.a,{name:c?"faPause":"faPlay",color:"black"})),Object(a.c)("button",{onClick:function(t){M.current.goForward()}},Object(a.c)(y.a,{name:"faFastForward",color:"black"})),"desktop"!==Object(r.a)()&&Object(a.c)("button",{onClick:function(t){v(!0)}},Object(a.c)(y.a,{name:"faLock",color:"black"})))),g&&Object(a.c)("div",{className:"bg-lock"},Object(a.c)("button",{onContextMenu:function(t){v(!1)}},Object(a.c)(y.a,{name:"faUnlock",color:"black"}))))},dn=Object(nn.a)("div",{target:"e1kwupat0"})({name:"1ybx9fr",styles:".bg-lock{position:fixed;top:0px;left:0px;width:100vw;height:100vh;z-index:1005;background:rgba(0,0,0,0.3);display:flex;justify-content:center;align-items:center;button{}}.popup-wrapper .popupContent{padding:20px;.input-component span,span{display:inline-block;width:30%;font-size:12px;font-weight:bold;}.speed-range{position:relative;top:8px;}.range-pos{width:100%;margin-bottom:10px;}.text-pos{width:50px;margin-bottom:10px;}}.buttons{display:flex;padding:20px 0px 0px 0px;button{width:30%;padding:10px;}}"}),fn=(e(123),e(64)),bn=e(106);Object(bn.b)(Object(a.c)((function(){Object(o.useEffect)((function(){return Qt&&console.log(Xt," init"),"serviceWorker"in navigator&&navigator.serviceWorker.register("/service-worker.js"),window.addEventListener("beforeinstallprompt",(function(t){t.preventDefault(),Qt&&console.log(Xt," beforeinstallprompt WORKING=>",t),window.deferredPrompt=t})),console.log("========= [APP] MOUNTED on a ".concat(Object(r.a)())),Object(l.d)().then((function(t){J(!0),Tt&&Tt.status.ipsServer.set(t.ipsServer),Object(j.d)((function(t){t.ui.browser.folders.refreshFromBackend()}))})),window.onkeydown=function(t){var n=z(t);Object(g.isNull)(P[n])||(P[n]=!0);var e="".concat(n,"-down");B[e]&&B[e]()},window.onkeyup=function(t){var n=z(t);Object(g.isNull)(P[n])||(P[n]=!1);var e="".concat(n,"-up");B[e]&&B[e]()},Object(fn.a)("init","init",(function(){})),function(){console.log("app will unmount")}}),[]);var t=function(){It.active.set(-1)},n=function(){Et.ui.browser.files.set([])},e=function(t){var n=Object(o.useState)(!1),e=Object(i.a)(n,2),r=e[0],s=e[1],u=Object(o.useState)(""),p=Object(i.a)(u,2),d=p[0],f=p[1],b=Object(o.useState)(""),g=Object(i.a)(b,2),h=g[0],m=g[1],v=Object(o.useState)(""),O=Object(i.a)(v,2),j=O[0],x=O[1],k=Object(o.useState)(),y=Object(i.a)(k,2),_=y[0],E=y[1],T="[SETUP CONFIG]",S=w.a.client.log.verbose,I=Object(o.useRef)(0);return Object(o.useEffect)((function(){return S&&console.log(T," init socket listener"),I.current=l.b.on("getSetupInfos",(function(n){"SUCCESS_CONFIG_CREATION"===n.code?(E(["success","".concat(C.a.setupForm.successReload)]),setTimeout((function(){window.location.reload()}),3e3)):"ASK_SETUP"===n.code?(t.cleanAllApp(),s(!0),n.defaultFolder&&x(n.defaultFolder)):E(["error","".concat(n.code,": ").concat(n.message)])})),function(){S&&console.log(T," clean socket listener"),l.b.off(I.current)}}),[]),{displayWelcomePopup:r,SetupPopupComponent:function(t){return Object(a.c)(c.a.Fragment,null,r&&Object(a.c)("div",{className:"setup-popup-component"},Object(a.c)(tt.a,{title:"Welcome to Tiro",onClose:function(){}},Object(a.c)("p",null,C.a.setupForm.introText)," ",Object(a.c)("br",null),Object(a.c)("div",null,Object(a.c)(Q.a,{value:d,label:C.a.setupForm.user,explanation:C.a.setupForm.userExplanation,onChange:function(t){f(t)},shouldNotSelectOnClick:!0}),Object(a.c)(Q.a,{value:h,label:C.a.setupForm.password,type:"password",explanation:C.a.setupForm.passwordExplanation,onChange:function(t){m(t)},shouldNotSelectOnClick:!0}),Object(a.c)(Q.a,{value:j,label:C.a.setupForm.dataFolder,explanation:C.a.setupForm.folderExplanation,onChange:function(t){x(t)},shouldNotSelectOnClick:!0}),Object(a.c)("input",{type:"button",value:"submit",className:"submit-button",onClick:function(t){E(void 0),l.b.emit("sendSetupInfos",{form:{user:d,password:h,dataFolder:j},token:Object(L.b)()})}}),_&&Object(a.c)("div",{className:_[0]},_[1])))))}}}({cleanAllApp:function(){console.log("[cleanAllApp]"),Mt(),At(),t(),n()}}),u=e.SetupPopupComponent,d=Object(L.d)({onLoginAsked:function(){console.log("[cleanListAndFileContent]"),t(),n()},onLoginSuccess:function(){I(),O(),Ht(),Object(j.d)((function(t){t.ui.browser.folders.refreshFromBackend()})),Rt(["/"])}}),f=d.LoginPopupComponent,h=Object(Kt.a)(),m=h.userSettingsApi,O=h.refreshUserSettingsFromBackend,_=Object(Gt.c)(),T=_.tabs,S=_.updateTab,I=_.refreshTabsFromBackend,N=_.updateActiveTabGrid,F=_.refreshWindowGrid,R=_.tabsApi,A=_.windowsApi,D=R.active.get(),M=at(),U=M.PromptPopupComponent,W=M.popupApi,q=function(){Object(o.useRef)([]);var t=Object(o.useState)(!1),n=Object(i.a)(t,2),e=n[0],c=n[1],r=Object(o.useState)(!1),l=Object(i.a)(r,2),s=l[0],u=l[1],p="(DISCONNECTED)",d=Object(o.useRef)(p);x((function(){d.current=d.current===p?"(/!\\ DISCONNECTED /!\\)":p;var t=e?"".concat(k()," (Connected)"):"".concat(k()," ").concat(d.current);document.title=t}),1e3),Object(o.useEffect)((function(){Object(j.d)((function(t){t.watch.appStatus((function(t){!1===t.isConnected?f(!1):!0===t.isConnected&&(f(!0),u(!0),setTimeout((function(){u(!1)}),1e3))}))}))}),[]);var f=function(t){w.a.client.log.verbose&&console.log("[SOCKET CONNECTION TOGGLE] to ".concat(t)),c(t)};return{isConnected:e,connectionStatusComponent:function(){var t=["connected","connected"];return s&&(t=["back-online","back online"]),e||(t=["disconnected","disconnected"]),Object(a.c)("div",{className:"connection-status"},Object(a.c)("div",{className:t[0]},t[1]))},toggleSocketConnection:f}}(),V=q.isConnected,G=q.connectionStatusComponent,J=q.toggleSocketConnection,K=function(){var t=Object(o.useState)(!1),n=Object(i.a)(t,2),e=n[0],c=n[1],a=Object(o.useState)(0),r=Object(i.a)(a,2),l=r[0],s=r[1],u=Object(o.useRef)(0);return Object(o.useEffect)((function(){var t=Object(g.debounce)((function(){u.current=u.current+1,s(l+1),c(!0),setTimeout((function(){c(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{forceResponsiveRender:e,frr:u,responsiveRefreshCounter:l,setResponsiveRefresh:s}}(),$=K.forceResponsiveRender,Z=K.responsiveRefreshCounter,et=K.setResponsiveRefresh,ot=Object(o.useRef)([]),it=Object(o.useState)(!1),rt=Object(i.a)(it,2),lt=rt[0],ut=rt[1],pt=Object(Yt.b)(),dt=pt.lightboxApi,ft=pt.lightboxImages,bt=pt.lightboxIndex,gt=function(){var t=Object(o.useState)(!1),n=Object(i.a)(t,2),e=n[0],c=n[1],a=Object(o.useState)(null),r=Object(i.a)(a,2),l=r[0],s=r[1],u=Object(o.useState)(null),p=Object(i.a)(u,2),d=p[0],f=p[1],b=Object(o.useState)(""),g=Object(i.a)(b,2),h=g[0],m=g[1],v=Object(o.useRef)(null);return{ttsApi:{open:function(t,n){var e=(n=n||{}).id?n.id:null,o=n.startString?n.startString:null;console.log("[TTS API]","open",{id:e,content:t,startString:o}),s(e),o&&f(o),m(t),c(!0)},close:function(){c(!1)},getStatus:function(cb){v.current&&cb(v.current)}},ttsPopupContent:h,ttsPopupId:l,ttsPos:d,setTtsPopup:c,ttsPopup:e,syncTtsStatus:function(t){v.current=t}}}(),mt=gt.ttsApi,vt=gt.ttsPos,wt=gt.ttsPopup,Ot=gt.setTtsPopup,xt=gt.ttsPopupContent,kt=gt.ttsPopupId,yt=gt.syncTtsStatus,Ct=function(t){var n=Object(o.useState)(!1),e=Object(i.a)(n,2),c=e[0],a=e[1],r=Object(o.useState)([]),l=Object(i.a)(r,2),u=l[0],p=l[1];return{isConnected:t.isConnected,searching:{get:c,set:a},ipsServer:{get:u,set:p,getLocal:function(){var t=u[0];return Object(g.each)(u,(function(n){n.startsWith("192.168")&&(t=n)})),t}},refresh:Object(s.a)(Object(s.a)({},t.refresh),{},{increment:function(){t.refresh.set(t.refresh.get+1)}})}}({isConnected:V,refresh:{get:Z,set:et}}),_t=function(){var t="[NOTE HISTORY] ",n=w.a.client.log.verbose,e=Object(o.useRef)({}),c=function(){return(new Date).getTime()},i=function(e,o,c){n&&console.log("".concat(t," saveNoteHistory ").concat(e)),l.b.emit("createHistoryFile",{filePath:e,content:o,historyFileType:c,token:Object(L.b)()})};return{save:i,intervalSave:function(o,a){var r=e.current[o];(!r||r&&r+6e4<c())&&(n&&console.log("".concat(t," ").concat(o,", time ").concat(1," expired/inexistand, PROCEED BACKUP")),i(o,a,"int"),e.current[o]=c())}}}(),Et=Object(j.f)({popupApi:W,tabsApi:R,userSettingsApi:m,windowsApi:A,statusApi:Ct,historyApi:_t,lightboxApi:dt,ttsApi:mt}),Tt=Et,It=Tt.ui.browser.files,Ft=Tt.ui.browser.folders,Rt=Ft.scan,At=Ft.clean,Dt=Ft.base,Lt=function(t){var n=Object(Wt.a)("files-history",[]),e=Object(i.a)(n,3),c=e[0],a=e[1],r=e[2];Object(o.useEffect)((function(){Vt&&console.log(qt," activeFile changed!",t),t&&l(t)}),[t]);var l=function(t){Vt&&console.log(qt,"Add to history",t.name);for(var n=!0,e=-1,o=c,i=0;i<c.length;i++)c[i].name===t.name&&(n=!1,e=i);n||o.splice(e,1),(o=o.slice(0,400)).unshift(t),a(o)};return Object(jt.a)(l,1e3),{filesHistory:c,cleanLastFilesHistory:function(){a([])},refreshFilesHistoryFromBackend:r,lastFilesHistoryApi:{getAll:function(){return c},removeFile:function(t){console.log("".concat(qt," removing ").concat(t," from last notes"));var n=Object(g.cloneDeep)(c);n=n.filter((function(n){return n.path!==t})),a(n)}}}}(It.active.get),Pt=Lt.filesHistory,Mt=Lt.cleanLastFilesHistory,Ht=Lt.refreshFilesHistoryFromBackend,nn=Lt.lastFilesHistoryApi;Tt.lastNotesApi=nn;var en=Ut(t,n),on=(en.askForMoveFile,en.promptAndMoveFolder),cn=en.promptAndBatchMoveFiles,an=function(){var t=Object(o.useState)("navigator"),n=Object(i.a)(t,2),e=n[0],l=n[1];return{mobileView:e,setMobileView:l,MobileToolbarComponent:function(t){return v(Object(a.c)(c.a.Fragment,null,"desktop"!==Object(r.a)()&&Object(a.c)(b.a,{class:"mobile-view-toggler",buttons:[{icon:"faStream",class:"".concat("navigator"===e?"active":""),action:function(){l("navigator")}},{icon:"faPenNib",class:"".concat("editor"===e?"active":""),action:function(){l("editor")}},{icon:"faEye",class:"".concat("preview"===e?"active":""),action:function(){l("preview")}},{icon:"faSearch",class:"",action:function(){t.onButtons[0]&&t.onButtons[0]()}}]})),[e,t.forceRerender])}}}(),rn=an.mobileView,ln=an.MobileToolbarComponent;window.api=Tt;var sn=Object(o.useState)(!1),un=Object(i.a)(sn,2),dn=un[0],bn=un[1],gn=Object(o.useState)(!1),hn=Object(i.a)(gn,2),mn=hn[0],vn=hn[1];Object(o.useEffect)((function(){return tn.bind("alt + spacebar",(function(){bn(!0),vn(!0)})),tn.bind("esc",(function(){bn(!1)})),function(){tn.releaseAllKeys()}}),[Pt]);var wn=$?0:1;Tt.userSettings.refresh.css.get;return Object(a.c)("div",{className:zt(rn)},Object(a.c)("div",{className:" ".concat("mobile"===Object(r.a)()?"mobile-view-".concat(rn):"")},Object(a.c)(j.a.Provider,{value:Et},dn&&Object(a.c)(St,{show:mn,lastNotes:Pt,onClose:function(t){bn(!1)},onHide:function(t){vn(!1)}}),Object(a.c)(a.a,{styles:Object(a.b)("*{-webkit-print-color-adjust:exact!important;color-adjust:exact!important;}*:focus{outline:none;}body{margin:0;padding:0px;background:",p.a.colors.bg.light,";font-size:11px;font-family:",p.a.font.main,";}html,body{height:100vh;overflow:hidden;background:",p.a.colors.bgInterface,";}button,input{font-family:",p.a.font.main,";font-weight:700;color:",p.a.colors.l2.title,";}","\n@page {\n margin: 0;\n padding: 0;\n}\n\n.main-wrapper,\n#root,\n.print-body {\n\t// position: absolute;\n// top: 22px;\n\t\t// height: 1000vh;\n\t\t// overflow: auto;\n}\n\n.print-wrapper {\n\t\tz-index: 10000000000000;\n\t\tbackground-color: white;\n\t\toverflow: hidden;\n width: 100%!important;\n\t\theight: 1000vh!important;\n position: fixed;\n top: 0;\n left: 0;\n margin: 0;\n padding: 15px;\n font-size: 14px;\n line-height: 18px;\n\t\tmargin-top: 0px!important;\n\t\tdisplay: block!important;\n}\n/* .print-wrapper { */\n/* \t\tz-index: 10000000000000; */\n/* \t\ttop: 0px; */\n/* \t\tleft: 0px; */\n/* \t\tposition: fixed; */\n/* \t\twidth: 100%!important; */\n/* \t\t/* height: 100vh; */ */\n/* } */\n\n"," body{position:relative;}","")}),Object(a.c)("div",{role:"dialog",className:"\n\t\t\t\t\t\t\t\tmain-wrapper\n\t\t\t\t\t\t\t\t".concat(Tt.userSettings.get("ui_sidebar")?"with-sidebar":"without-sidebar","\n\t\t\t\t\t\t\t\tdevice-view-").concat(Object(r.a)())},U(),f({}),u({}),G(),ln({forceRerender:$,onButtons:[function(){vn(!0),bn(!0)}]}),Object(a.c)("div",{className:"left-sidebar-indicator"},Object(a.c)("div",{className:"left-wrapper"},Object(a.c)("div",{className:"left-wrapper-1"},Object(a.c)("div",{className:"invisible-scrollbars"},Object(a.c)(E,{onNewFile:function(){Object(j.d)((function(t){var n=t.ui.browser.folders.current.get;t.file.create(n,(function(e){var o=Object(H.c)(e);o&&t.ui.browser.goTo(n,o.name,{openIn:"activeWindow"})}))}))}}),Tt.userSettings.get("ui_layout_shortcuts_panel")&&Object(a.c)(Nt,{filePath:".tiro/shortcuts.md",onClick:function(){}}),Object(a.c)(X,{files:Pt,onClick:function(t){Et.ui.browser.goTo(t.folder,t.name,{openIn:"active"})}}),Object(a.c)(Y,{openFolders:Ft.open.get(),folder:Ft.get(),current:Ft.current.get,onFolderClicked:function(t){Et.ui.browser.goTo(t,null)},onFolderMenuAction:function(t,n,e){"rename"===t&&e?on({folder:n,folderToDropInto:n,folderBasePath:Dt,newTitle:e,renameOnly:!0,disablePrompt:!0,onMoveFn:function(){Rt([Object(Bt.b)(n.path)],{cache:!1,cb:function(){Ft.open.remove([Object(Bt.b)(n.path)]),Ft.open.add(Object(Bt.b)(n.path))}})}}):"create"===t&&e?(Object(Zt.a)(e,n),setTimeout((function(){Rt([n.path],{cache:!1})}))):"moveToTrash"===t?on({folder:n,folderToDropInto:Zt.c,folderBasePath:Dt,newTitle:e,onMoveFn:function(){Rt([Object(Bt.b)(n.path)],{cache:!1,cb:function(){Ft.open.add(n.path)}})}}):"delete"===t&&(Object(Zt.b)("trash"),setTimeout((function(){Rt([n.path],{cache:!1})})))},onFolderOpen:function(t){Rt([t],{cache:!1})},onFolderClose:function(t){},onFolderDragStart:function(t){console.log("[DRAG MOVE] onFolderDragStart",t),ot.current=[{type:"folder",folder:t}]},onFolderDragEnd:function(){console.log("[DRAG MOVE] onFolderDragEnd"),ot.current=[]},onFolderDrop:function(t){!function(t){console.log("[DRAG MOVE] processDragDropAction ->",ot.current,t);var n=ot.current[0];"file"===n.type&&n.files?cn({files:n.files,folderToDropInto:t}):"folder"===n.type&&n.folder&&on({folder:n.folder,folderToDropInto:t,folderBasePath:Dt,disablePrompt:!0,onMoveFn:function(){if(n.folder){var e=n.folder.path,o=t.path;Rt([Object(Bt.b)(e),Object(Bt.b)(o),o,e],{cache:!1,cb:function(){Ft.open.add(e)}})}}})}(t)}})),Object(a.c)("div",{className:"settings-button",onClick:function(){ut(!lt)}},Object(a.c)(y.a,{name:"faCog",color:"grey"})),lt&&Object(a.c)(ht.a,{onClose:function(){ut(!1)}})),Object(a.c)("div",{className:"left-wrapper-2"},Object(a.c)("div",{className:"top-files-list-wrapper"},Object(a.c)("div",{className:"subtitle-wrapper"},Object(a.c)("div",{className:"folder-wrapper"},Tt&&Tt.ui.browser.folders.current.get,!Tt.ui.browser.folders.current.get&&"/"),"mobile"!==Object(r.a)()&&Object(a.c)("div",{className:"toggle-sidebar-btn"},Object(a.c)(b.a,{popup:!1,buttons:[{icon:"faThumbtack",title:"Toggle Sidebar",action:function(t){m.set("ui_sidebar",!m.get("ui_sidebar")),F()},active:!0===Et.userSettings.get("ui_sidebar")}],colors:["#d4d1d1","#615f5f"],size:.8}))),Object(a.c)(nt,{term:Et.ui.search.term.get})),Object(a.c)("div",{className:"files-list-wrapper"},Object(a.c)($t,{files:It.get,activeFileIndex:It.active.getIndex,onSortFiles:function(t){Et.ui.browser.files.set(t)},onFileClicked:function(t){It.active.set(t);var n=It.get[t];Tt.tabs.active.get()?A.active.setContent(n):Tt.tabs.openInNewTab(n)},onFileDragStart:function(t){console.log("[DRAG MOVE] onFileDragStart",t),ot.current=[{type:"file",files:t}]},onFileDragEnd:function(){console.log("[DRAG MOVE] onFileDragEnd"),ot.current=[]}}))))),Object(a.c)("div",{className:"right-wrapper dual-viewer-view"},Object(a.c)(st,{tabs:T,onUpdate:S}),D&&Object(a.c)(Jt.b,{tab:D,onGridUpdate:N,mobileView:rn}))))),ft.length>0&&Object(a.c)(ct,{images:ft,startingIndex:bt,onClose:Et.ui.lightbox.close}),wt&&Object(a.c)(pn,{id:kt,fileContent:xt,startString:vt,onUpdate:function(t){yt(t)},onClose:function(){Ot(!1)}}))}),null),document.getElementById("root"))},49:function(t,n,e){"use strict";e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return s}));e(0);var o=e(109),c=e(103),i=e(106),a=e(1),r=400,l=function(t,n,e){if(!t)return"";var o=t.querySelector("iframe"),c=Object(i.c)(n,{delay:100}),a='<div id="'.concat(c,'" class="resource-link-ctag"><div class="loading-string">loading...</div></div>'),r=!o||!0===e;t.innerHTML=r?a:""},s=function(t,n,e){return e||(e={}),e.file||(e.file=Object(c.a)()),Object(a.c)(o.a,{file:e.file,block:{type:"tag",tagName:t,content:n,start:0,end:0},windowHeight:r+75,windowId:e.windowId||"null",yCnt:0,onIframeMouseWheel:function(){},ctagSandboxed:e.sandboxed,ctagFullscreen:e.fullscreen,ctagOnFullscreenClose:e.onFullscreenClose})}},51:function(t,n,e){"use strict";e.d(n,"a",(function(){return d})),e.d(n,"b",(function(){return f}));var o=e(5),c=e(6),i=e(20),a=e(21),r=e(0),l=e.n(r),s=e(10),u=e(14),p=e(1),d=function(t){Object(i.a)(e,t);var n=Object(a.a)(e);function e(){var t;Object(o.a)(this,e);for(var c=arguments.length,i=new Array(c),a=0;a<c;a++)i[a]=arguments[a];return(t=n.call.apply(n,[this].concat(i))).canBgClose=!t.props.canBgClose||t.props.canBgClose,t}return Object(c.a)(e,[{key:"render",value:function(){var t=this;return Object(p.c)("div",{className:"popup-wrapper-component"},Object(p.c)("div",{className:"overlay-click-popup",onClick:function(n){t.canBgClose&&t.props.onClose()}}),Object(p.c)("div",{className:"popup-wrapper ".concat(Object(u.c)()?"ipad":"")},Object(p.c)("div",{className:"popupTitle"}," ",this.props.title),Object(p.c)("div",{className:"popupContent"},this.props.children)))}}]),e}(l.a.Component),f=function(){return"\n.popup-wrapper-component {\n\t\t\t\tposition: absolute;\n top: 0px;\n left: 0px;\n .overlay-click-popup {\n position: fixed;\n z-index:1000;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n background: rgba(0,0,0,0.1);\n }\n .popup-wrapper {\n position: fixed;\n z-index:1001;\n left: 50%;\n top:50%;\n &.ipad {\n top:20%;\n }\n width : auto;\n max-width: 90%;\n transform:translate(-50%,-50%);\n\t\t\t\tbackground: ".concat(s.a.colors.bgPopup,";\n border-radius:6px;\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n .popupTitle {\n margin: 0px 0px 20px 0px;\n text-align: left;\n background: ").concat(s.a.colors.main,";\n color: white;\n font-weight: 700;\n text-transform: uppercase;\n font-size: 14px;\n padding: 5px 0px 5px 20px;\n border-radius:6px 6px 0px 0px;\n }\n .popupContent {\n padding: 0px 20px 20px 20px;\n // min-width : 350px;\n }\n img{\n padding: 0px 5px 0px 0px;\n margin: 5px 5px 0px 0px;\n }\n }\n}\n")}},52:function(t,n,e){"use strict";e.d(n,"a",(function(){return c})),e.d(n,"c",(function(){return i})),e.d(n,"b",(function(){return a}));var o=e(18),c=function(t){var n=((new Date).getTime()-t.getTime())/1e3,e=604800,c="";if(n<=3600)c="".concat(Math.ceil(n/60)," ").concat(o.a.minsAgo);else if(n>3600&&n<=86400)c="".concat(Math.ceil(n/3600)," ").concat(o.a.hoursAgo);else if(n>86400&&n<=e)c="".concat(Math.ceil(n/86400)," ").concat(o.a.daysAgo);else if(n>e){var i=("0"+t.getDate()).slice(-2),a=o.a.months[t.getMonth()],r=t.getFullYear().toString();c="".concat(i," ").concat(a," ").concat(r)}return c},i=function(t){t||(t=(new Date).getTime());var n=new Date(t);return[n.getFullYear(),n.getMonth()+1,n.getDate()]},a=function(t){var n=(new Date).getTime();return"lastMonth"===t&&(n=n-432e5),n}},53:function(t,n,e){"use strict";e.d(n,"a",(function(){return r})),e.d(n,"b",(function(){return l}));var o=e(110),c=e(8),i=e(0),a=e(1),r=function(t){var n,e=Object(i.useRef)(),r=function(){t.shouldFocus&&e.current.focus()};Object(i.useEffect)((function(){r()}),[t.shouldFocus]),Object(i.useEffect)((function(){r()}),[]);var l="checkbox"===t.type&&(!0===t.value||"true"===t.value),s=t.value;Object(c.isBoolean)(s)&&(s="");return Object(a.c)("div",{className:"input-component-wrapper ".concat(t.style?Object(o.a)(t.style,";",""):"")},Object(a.c)("div",{className:"input-component ".concat(t.id?t.id:""," ").concat(t.type)},t.label&&Object(a.c)("span",{onClick:function(n){"checkbox"===t.type&&(e.current.checked=!e.current.checked,t.onChange&&t.onChange(e.current.checked))}},t.label," "),Object(a.c)("div",{className:"input-wrapper"},"select"!==t.type&&Object(a.c)("input",{ref:e,type:t.type?t.type:"text",value:s,checked:l,readOnly:t.readonly,onFocus:function(){t.onFocus&&t.onFocus()},onClick:function(){!t.shouldNotSelectOnClick&&e.current.select()},onKeyPress:function(n){"Enter"==(n.code||n.key)&&t.onEnterPressed&&t.onEnterPressed()},onChange:function(n){t.onCheckedChange&&t.onCheckedChange(n.target.checked),t.onChange&&t.onChange(n.target.value)}}),"select"===t.type&&Object(a.c)("select",{value:s,onChange:function(n){t.onSelectChange&&t.onSelectChange(n.target.value)}},null===(n=t.list)||void 0===n?void 0:n.map((function(t,n){return Object(a.c)("option",{value:t.key},t.label," ")}))),t.explanation&&Object(a.c)("div",{className:"explanation"}," ",t.explanation," "))))},l=function(){return"\n .input-component {\n display: flex;\n align-items: center;\n padding-bottom: 10px;\n input, select {\n max-width: 100%;\n }\n &.select {\n span {\n width: 20%;\n }\n }\n span {\n width: 30%;\n font-weight: 700;\n text-transform: uppercase;\n }\n .input-wrapper {\n width: 70%;\n input {\n padding: 7px;\n border: none;\n background: #ececec;\n border-radius: 5px;\n }\n .explanation {\n font-size: 11px;\n color: grey;\n }\n }\n }\n"}},54:function(t,n,e){"use strict";e.d(n,"a",(function(){return u}));var o=e(19),c={};window.dbscroll=c;o.a.client.log.verbose;var i=function(t){var n=document.querySelector(".window-id-".concat(t," .preview-area")),e=document.querySelector(".window-id-".concat(t," .cm-scroller")),o=document.querySelector(".window-id-".concat(t," .scrolling-bar-wrapper"));return c[t]||(c[t]={els:{preview:n,editor:e,scroller:o},dims:{editor:{viewport:0,full:0},preview:{viewport:0,full:0},scroller:{viewport:0,full:0}},posPercent:0,previewOffsetY:0}),c[t].els.preview=n,c[t].els.editor=e,c[t].els.scroller=o,c[t]},a=function(t,n){var e=i(t);if(e.els.editor){n||(n=e.posPercent);var o=e.els.scroller.dataset;o.scrollRefresh||(o.scrollRefresh=1),o.scrollRefresh=parseInt(o.scrollRefresh)+1}},r=function(t,n){var e=i(t);if(e.els.editor){var o=e.dims.editor;n||(n=e.posPercent);var c=(o.full-o.viewport)/100;e.els.editor.scrollTop=c*n}},l=function(t,n){var e=i(t);if(e.els.editor&&e.els.preview){var o=e.dims.preview;n||(n=e.posPercent);var c=o.full/100,a=Math.round(c*n);e.els.preview.scrollTop=a+e.previewOffsetY}},s=function(t,n){var e=i(t);if(e.els.editor){var o=e.dims.preview.full/100,c=n-Math.round(o*e.posPercent);e.previewOffsetY=c}},u={getScrollObj:i,updateEditorDims:function(t,n){var e=i(t);e.els.editor&&e.els.preview&&(e.dims.editor=n)},updatePreviewDims:function(t){var n=i(t);if(n.els.editor&&n.els.preview){var e=n.els.preview.querySelector(".simple-css-wrapper").clientHeight,o=n.els.preview.clientHeight;n.dims.preview={viewport:o,full:e}}},updateScrollerDims:function(t){var n=i(t);if(n.els.editor&&n.els.preview){var e=n.dims.editor.viewport/n.dims.editor.full||1e7,o=n.dims.preview.viewport/n.dims.preview.full||1e7,c=e<o?e:o,a=n.els.scroller.clientHeight,r=c*a,l={viewport:r=r>a?a:r,full:a};n.dims.scroller=l;var s=n.els.scroller.dataset;s.scrollRefresh||(s.scrollRefresh=1),s.scrollRefresh=parseInt(s.scrollRefresh)+1}},updatePreviewOffset:s,onEditorScroll:function(t,n){var e=i(t);e.els.editor&&(e.posPercent=n,a(t,n),l(t,n))},onScrollerScroll:function(t,n){var e=i(t);e.els.editor&&(e.posPercent=n,r(t,n),l(t,n))},onPreviewScroll:function(t){var n=i(t);if(n.els.editor){var e=n.els.preview.scrollTop;s(t,e)}},onWindowLoad:function(t){if(c[t]){var n=i(t);if(!n.els.editor)return;var e=n.posPercent;a(t,e),r(t,e),l(t,e)}},scrollEditor:r,scrollPreview:l,scrollScroller:a}},55:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(5),c=e(6),i=e(20),a=e(21),r=e(11),l=e(64),s=function(t){Object(i.a)(e,t);var n=Object(a.a)(e);function e(t,c){var i;return Object(o.a)(this,e),(i=n.call(this)).match=t,i.replacement=c,i}return Object(c.a)(e,[{key:"toDOM",value:function(){return this.replacement(this.match)}}]),e}(r.g),u={};Object(l.a)("code_mirror","cache_get",(function(){return u}));var p=function(t,n,e){return new r.e({regexp:t,decoration:function(t){var o=t.input,c=e.path;if(u[c]||(u[c]={}),!u[c][o]){var i=new s(t,n),a=r.a.widget({widget:i});u[c][o]=a}return u[c][o]}})},d=function(t,n){return new r.e({regexp:t,decoration:function(t){return r.a.mark({class:n(t)})}})},f=function(t){return r.f.fromClass(function(){function n(e){Object(o.a)(this,n),this.decorations=void 0,t.replacement?this.decorations=p(t.pattern,t.replacement,t.file).createDeco(e):this.decorations=d(t.pattern,t.classWrap).createDeco(e)}return Object(c.a)(n,[{key:"update",value:function(n){try{t.replacement&&(n.docChanged||n.viewportChanged)?this.decorations=p(t.pattern,t.replacement,t.file).updateDeco(n,this.decorations):this.decorations=d(t.pattern,t.classWrap).updateDeco(n,this.decorations)}catch(e){console.warn("[ERROR VIEWPLUGIN CM]",e,n)}}}]),n}(),{decorations:function(t){return t.decorations},provide:function(n){return r.c.atomicRanges.of((function(e){var o,c,i=(null===(o=e.plugin(n))||void 0===o?void 0:o.decorations)||r.a.none;return null!==(c=t.options)&&void 0!==c&&c.isAtomic||(i=r.a.none),i}))}})}},56:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(9),c=e(0);function i(t,n){var e=Object(c.useState)((function(){try{var e=window.localStorage.getItem(t);return e?JSON.parse(e):n}catch(o){return console.log(o),n}})),i=Object(o.a)(e,2),a=i[0],r=i[1];return[a,function(n){try{var e=n instanceof Function?n(a):n;r(e),window.localStorage.setItem(t,JSON.stringify(e))}catch(o){console.log(o)}}]}},58:function(t,n,e){"use strict";e.d(n,"a",(function(){return u}));var o=e(19),c=e(142),i="[Code Mirror]",a=o.a.client.log.verbose,r=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];a&&console.log(i," update cursor",n,t);try{e&&t.view.dispatch({selection:{anchor:n,head:n},scrollIntoView:!0})}catch(o){console.warn(i,"update Cursor error",o)}},l=0,s=function(t){if(console.log("GET SCROLLING LINE -> NOT USED, SHOULD BE UPDATED"),!t.view)return-1;for(var n=t.view.state.doc.toString(),e=t.view.elementAtHeight(t.view.scrollDOM.scrollTop).from,o=n.split("\n"),c=0,i=0,a=0;a<o.length&&(c+=o[a].length)<e;a++)i=a;l=i},u={getEditorInfos:function(t){var n=t,e=Math.round(n.viewState.pixelViewport.top),o=n.lineBlockAtHeight(e),c=n.state.doc.lineAt(o.from).number,i=n.contentHeight,a=n.viewState.editorHeight,r=(i-a)/100;return{viewportHeight:a,contentHeight:i,visibleFirstLine:c,percentPx:r,currentPercentScrolled:n.viewState.pixelViewport.top/r}},getCurrentLineInfos:function(t){var n=t.view.state.doc.lineAt(t.view.state.selection.main.head).number-1,e=function(t){return t.view.state.selection.ranges[0].from}(t),o=t.view.state.doc.toString().split("\n");return{lines:o,currentPosition:e,activeLine:o[n]||"",lineIndex:n}},getScrolledLine:function(t){return s(t),l},updateCursor:r,updateText:function(t,n,e){var o=t.view.state.doc.toString().length,c=t.view.state.selection.ranges[0].from;t.view.dispatch(t.view.state.update({changes:{from:0,to:o,insert:n}})),r(t,c,!0)},scrollTo:function(t,n){if(!t.view)return-1;r(t,n,!0)},scrollToLine:function(t,n){var e=t.view.state.doc.line(n);r(t,e.from,!0)},getCustomTheme:c.a}},62:function(t,n,e){"use strict";e.d(n,"a",(function(){return g})),e.d(n,"c",(function(){return h})),e.d(n,"b",(function(){return m}));var o=e(9),c=e(8),i=e(0),a=e(14),r=e(72),l=e(10),s=e(108),u=e(109),p=e(54),d=e(80),f=e(88),b=e(1),g=function(t){var n={wrapper:Object(i.useRef)(null),main:Object(i.useRef)(null)},e=t.file.path.split("/");e.pop();e.join("/");Object(i.useEffect)((function(){setTimeout((function(){t.onMaxYUpdate(l())}),1e3)}),[t.fileContent]);var l=function(){var t=n.main.current;return 2*((null===t||void 0===t?void 0:t.clientHeight)||3e3)},s=Object(i.useState)([]),d=Object(o.a)(s,2),f=d[0],g=d[1];Object(i.useEffect)((function(){var n=r.b.chunks.chunk(t.fileContent);g(n),setTimeout((function(){r.b.injectLogic({fileContent:t.fileContent,file:t.file})}),100),setTimeout((function(){p.a.updatePreviewDims(t.windowId),p.a.updateScrollerDims(t.windowId)}),100)}),[t.fileContent]);var h=function(){var n=0,e=document.querySelector(".window-id-".concat(t.windowId));return e&&(n=e.clientHeight),"mobile"===Object(a.a)()&&0===n&&(n=document.body.clientHeight-120),n};return Object(b.c)("div",{className:"preview-area-wrapper render-latex",onWheelCapture:function(n){p.a.onPreviewScroll(t.windowId)}},Object(b.c)("div",{className:"preview-area",ref:n.wrapper,style:{bottom:function(){var n=l(),e=t.posY+0;return Object(c.clamp)(e,0,n)}()}},Object(b.c)("div",{className:"preview-area-transitions"},Object(b.c)("div",{className:"infos-preview-wrapper"},Object(b.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(b.c)("h1",{className:"title big-title"},t.file.name.replace(".md",""))),Object(b.c)("div",{className:"content-blocks-wrapper"},Object(b.c)("div",{className:"simple-css-wrapper"},f.map((function(n,e){return Object(b.c)(u.a,{key:e,index:e,block:n,windowId:t.windowId,file:t.file,windowHeight:h(),yCnt:t.yCnt,onIframeMouseWheel:t.onIframeMouseWheel})})))))))},h=function(t){return t||(t={w:".simple-css-wrapper",pl:".preview-link",r:".resource-link-icon"}),"\n\n\t\thtml, body {\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px;\n\t\t}\n\n\t\t".concat(t.w," {\n\t\t\t\tcolor: ").concat(l.a.colors.editor.font,";\n\t\t\t\tline-height: 19px;\n\t\t\t\tfont-size: 11px;\n\t\t\t\tfont-family:").concat(l.a.font.main,";\n\t\t}\n\n\t\tbutton,\n\t\tinput {\n\t\t\t\tfont-family:").concat(l.a.font.main,";\n\t\t\t\tfont-weight: 700;\n\t\t\t\tcolor: ").concat(l.a.colors.l2.title,";\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t// COUNTER TITLES\n\n*********************************************************/\n\n\t\t").concat(t.w,' {\n\t\t\t\toverflow-wrap: break-word;\n\t\t\t\tcounter-reset: sh1 ;\n\t\t}\n\n\n\t\th1:before {\n\t\t\t\tcontent: ""counter(sh1)" \u2219 ";\n\t\t\t\tcounter-increment: sh1;\n\t\t}\n\t\th1 {\n\t\t\t\tcounter-reset: sh2;\n\t\t}\n\n\t\th2:before {\n\t\t\t\tcontent: ""counter(sh1)"." counter(sh2)" \u2219 ";\n\t\t\t\tcounter-increment: sh2;\n\t\t}\n\t\th2 {\n\t\t\t\tcounter-reset: sh3;\n\t\t}\n\n\t\th3:before {\n\t\t\t\tcontent: ""counter(sh1)"." counter(sh2)"."counter(sh3)" \u2219 ";\n\t\t\t\tcounter-increment: sh3;\n\t\t}\n\t\th3 {\n\t\t}\n\n\n\n\t\t/**********************************************************\n\n\t\t// BASIC STYLE\n\n**********************************************************/\n\n\t\ta {\n\t\t\t\tcolor: ').concat(l.a.colors.main,";\n\t\t}\n\n\t\t.main-color, .main-color:before, .main-color:after {\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t}\n\t\t.title {\n\t\t\t\tmargin: 0px 0px;\n\t\t}\n\n\t\th1:before, h2:before, h3:before, h4:before, h5:before, h6:before {\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t}\n\t\th1, h2, h3, h4, h5, h6 {\n\t\t\t\tposition:relative;\n\t\t\t\tcolor: ").concat(l.a.colors.main,';\n\t\t\t\tmargin-top: 0px;\n\t\t\t\tline-height: normal;\n\t\t\t\tmargin-right: 10px;\n\t\t}\n\t\th1:after,\n\t\th2:after {\n\t\t\t\tcontent: "-";\n\t\t\t\tbackground: ').concat(l.a.colors.main,";\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 2px;\n\t\t\t\tposition: absolute;\n\t\t\t\tbottom: 0px;\n\t\t\t\tleft: 0px;\n\t\t\t\tfont-size: 0px;\n\t\t\t\t/* opacity: 0.4; */\n\t\t}\n\t\th2:after {\n\t\t\t\t/* width: 70%; */\n\t\t\t\theight: 1px;\n\t\t}\n\t\th1 {\n\t\t\t\tpadding: 5px;\n\t\t\t\t/* border-bottom: 2px solid; */\n\t\t\t\tmargin-top: 30px;\n\t\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\th2 {\n\t\t\t\tpadding: 5px;\n\t\t\t\t/* border-bottom: 1px solid; */\n\t\t}\n\t\th2, h3, h4, h5, h6 {\n\t\t\t\tmargin-bottom: 10px;\n\t\t\t\tmargin-top: 25px;\n\t\t}\n\n img,\n .content-image {\n\t\t\t\tcursor: pointer;\n }\n\t\t\t.content-image-img {\n\t\t\t\t\t").concat(l.a.els().images,"\n\t\t\t\t\tcursor: pointer;\n\t\t\t}\n\n p {\n\t\t\t\tdisplay: inline;\n }\n\n\n\t\t/**********************************************************\n\n\t\t// LIST\n\n**********************************************************/\n\t\t.no-css ul li {\n\t\t\t\tbackground: none!important;\n\t\t\t\tpadding: 0px;\n\t\t}\n\n\t\tul {\n\t\t\t\tpadding: 0px;\n\t\t\t\tlist-style-image: \"./custom_icons/view-1.svg\"; \n\t\t\t\tlist-style: none; \n\t\t}\n\n\t\tul li {\n\t\t\t\tpadding-left: 12px;\n\t\t}\n\t\tul li:before {\n\t\t\t\tcontent: '-';\n\t\t\t\tcolor: ").concat(l.a.colors.main,";\n\t\t\t\twidth: 10px;\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tfont-size: 15px;\n\n\t\t\t\t/* background-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-position: -3px 4px; */\n\t\t\t\t/* background-size: 11px; */\n\n\t\t\t\t/* background-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-color: ").concat(l.a.colors.main,'; */\n\t\t\t\t/* -webkit-mask-position: -3px 4px; */\n\t\t\t\t/* -webkit-mask-size: 11px; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/line.svg); */\n\t\t\t\t/* -webkit-mask-repeat: no-repeat; */\n\t\t}\n\t\tul li p {\n\t\t\t\tmargin: 0px;\n\t\t}\n\n\t\tul input[type=checkbox] {\n\t\t\t\tposition: relative;\n\t\t\t\twidth: 0px;\n\t\t\t\theight: 10px;\n\t\t\t\tmargin-right: 9px\n\t\t}\n\t\tul input[type=checkbox]:before {\n\t\t\t\tcontent: "";\n\t\t\t\tdisplay: block;\n\t\t\t\tposition: absolute;\n\t\t\t\twidth: 15px;\n\t\t\t\theight: 15px;\n\t\t\t\ttop: 0px;\n\t\t\t\tleft: -4px;\n\n\t\t\t\tbackground-color: ').concat(l.a.colors.main,";\n\t\t\t\t/* background-image: url(./custom_icons/check.svg); */\n\t\t\t\t/* background-repeat: no-repeat; */\n\t\t\t\t/* background-size: contain; */\n\t\t\t\tmask-position: -2px -1px;\n\t\t\t\tmask-image: url(./custom_icons/check.svg);\n\t\t\t\tmask-size: contain;\n\t\t\t\tmask-repeat: no-repeat;\n\n\t\t\t\t-webkit-mask-position: -2px -1px;\n\t\t\t\t-webkit-mask-image: url(./custom_icons/check.svg);\n\t\t\t\t-webkit-mask-size: contain;\n\t\t\t\t-webkit-mask-repeat: no-repeat;\n\t\t}\n\t\tul input[type=checkbox]:checked:before {\n\t\t\t\t/* background-color: red; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* background-image: url(./custom_icons/uncheck.svg); */\n\n\t\t\t\t/* background-color: red; */\n\t\t\t\t/* -webkit-mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\t/* mask-image: url(./custom_icons/uncheck.svg); */\n\t\t\t\tmask-image: url(./custom_icons/uncheck.svg);\n\t\t\t\t-webkit-mask-image: url(./custom_icons/uncheck.svg);\n\n\t\t}\n\n\t\t/**********************************************************\n\n\t\t PREVIEW LINK\n\n**********************************************************/\n\n\n\t\t").concat(Object(f.b)(t.pl),"\n\n\t\t/**********************************************************\n\n\t\t// TABLE\n\n**********************************************************/\n\n\t\ttable {\n\t\t\t\tmargin: 10px 0px;\n\t\t\t\tpadding 15px;\n\t\t\t\tborder-spacing: 0;\n\t\t\t\tborder-collapse: collapse;\n\t\t}\n\n\n\t\tth {\n\t\t\t\ttext-align: left;\n\t\t\t\tpadding: 10px 10px;\n\t\t}\n\t\ttd {\n\t\t\t\tpadding: 5px 10px;\n\t\t}\n\t\tthead tr {\n\t\t\t\tbackground: #e4e3e3;\n\t\t}\n\t\tth, td {\n\t\t\t\tborder: 1px solid #ccc;\n\t\t}\n\t\ttbody {\n\t\t}\n\t\t// tbody tr:nth-child(even) {background: #CCC}\n\t\t// tbody tr:nth-child(odd) {background: #EEE}\n\n\t\t/**********************************************************\n\n\t\t// RESSOURCE LINK\n\n**********************************************************/\n\t\t").concat(Object(d.b)(),"\n\n\t\tpre {\n\t\t}\n\n\t\tpre code {\n\t\t\t\tdisplay: block;\n\t\t\t\tborder-radius: 8px;\n\t\t\t\tbackground: #d2d2d2;\n\t\t\t\tpadding: 11px 23px;\n\t\t}\n\t\t")},m=function(){return"\n.preview-area {\n\t\tmargin-top: 0px;\n .infos-preview-wrapper {\n\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n display: ".concat(Object(a.b)("desktop")?"none":"block",";\n\t\t\t\tpadding: 5px 0px 12px 0px;\n\t\t}\n}\n.preview-area {\n position: relative;\n display: block;\n\toverflow: auto; \n\twidth: calc(100% );\n padding-right: 30px;\n\n ").concat(s.b,"\n\n .infos-preview-wrapper {\n }\n\t\t.infos-preview-wrapper h1.big-title {\n\t\t\t\twidth: calc(100% - 65px);\n\t\t\t\tfont-family: ").concat(l.a.font.editor,";\n\t\t\t\tcolor: grey;\n\t\t\t\tfont-size: 15px;\n\t\t\t\tmargin: 0px;\n\t\t\t\tpadding: 0px 14px;\n\t\t}\n}\n.content-blocks-wrapper {\n\t\t").concat(h(),"\n}\n.view-both .preview-area {\n\t\t// margin-top: 20px;\n\t\tmargin-top: 0px;\n}\n\n.preview-area-wrapper {\n\t\theight: calc(100% - 35px);\n margin-top: ").concat(Object(a.b)("desktop")?"140":"0","px;\n\n}\n\n")}},64:function(t,n,e){"use strict";e.d(n,"a",(function(){return c})),e.d(n,"b",(function(){return i}));var o="tiroDevCli",c=function(t,n,e){console.log("[TIRO DEV CLI] adding ",t,n),window[o]||(window[o]={}),window[o][t]||(window[o][t]={}),window[o][t][n]=e},i=function(t,n){return window[o]&&window[o][t]&&window[o][t][n]?window[o][t][n]:function(){console.log("DEV FN",t,n,"does not exists")}}},65:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return c}));var o=function(t){return t.path.substr(0,t.path.length-(t.title.length+1))},c=function(t){var n=t.split("/");(n=n.filter((function(t){return""!==t}))).pop();var e="/"+n.join("/")+"/";return e=e.replaceAll("//","/")}},70:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(9),c=e(0),i=e(19),a=e(13);function r(t,n){var e=Object(c.useState)(n),r=Object(o.a)(e,2),l=r[0],s=r[1],u="/".concat(i.a.path.configFolder,"/").concat(i.a.path.backendStateFolder,"/").concat(t,".md");'[BACKEND STATE] "'.concat(t,'" clientApi not loaded! Persistance system will not work correctly');Object(c.useEffect)((function(){p()}),[]);var p=function(cb){Object(a.d)((function(t){t.file.getContent(u,(function(t){var n=JSON.parse(t);s(n),cb&&cb(n)}))}))};return[l,function(t){s(t),Object(a.d)((function(n){n.file.saveContent(u,JSON.stringify(t))}))},p]}},71:function(t,n,e){"use strict";e.d(n,"b",(function(){return c})),e.d(n,"a",(function(){return i})),e.d(n,"d",(function(){return a})),e.d(n,"c",(function(){return r}));var o=e(8),c=["Az","Crea","Modif"],i=["alphabetical","created","modified"],a=function(t,n){var e;switch(i[n]){case"alphabetical":default:e=Object(o.sortBy)(t,[function(t){return t.realname.toLocaleLowerCase()}]);break;case"created":e=Object(o.sortBy)(t,["created"]).reverse();break;case"modified":e=Object(o.sortBy)(t,["modified"]).reverse()}return e},r=function(t){var n=t[0];return n?(Object(o.each)(t,(function(t){t.created&&n.created&&t.created>n.created&&(n=t)})),n):null}},72:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return f}));var o=e(12),c=e(8),i=e(26),a=e(102),r=e(73),l=e(35),s=function(t){var n=Object(o.a)({},t),e=n.raw,c=n.file,i=n.windowId;i||(i="");var s=Object(r.b)(Object(l.d)(c,Object(l.c)(c,Object(l.e)(Object(l.f)(i,Object(l.g)(e))))));return Object(a.b)(),s},u=function(t,cb){for(var n=document.getElementsByClassName(t),e=function(){var t=n[o];t.onclick=function(){cb(t)}},o=0;o<n.length;o++)e()},p=function(t){var n=t.split(i.a.userCustomTagManual),e=[],o=[],a=i.a.userCustomTag3,r=t.match(a)||"",l=[];Object(c.each)(r,(function(t){l.push(t)}));var s=null,u=-1,p=[],d=[],f={};if(Object(c.each)(l,(function(t){f[t]?f[t]=f[t]+1:f[t]=1})),Object(c.each)(f,(function(t,n){t>=2&&d.push(n)})),Object(c.each)(l,(function(t,e){if(d.includes(t))if(s){if(s===t){var c=[u+1,e+1];p.push.apply(p,c);for(var i=n.slice(c[0],c[1]),a=l.slice(u+1,e+1),r="",f=0;f<i.length;f++){var b=f===i.length-1?"":a[f];r+="".concat(i[f]).concat(b)}o.push({type:"tag",tagName:s.replace("[[","").replace("]]",""),content:r,start:u,end:e}),u=-1,s=null}}else s=t,u=e})),0===p.length)e.push({type:"text",content:t,start:0,end:1});else{p.unshift(0);for(var b=0;b<p.length;b+=2){var g=p[b];n[g]&&e.push({type:"text",content:n[g],start:g,end:g+1})}}for(var h=0===t.indexOf(l[0]),m=[],v=o.length>e.length?o.length:e.length,w=0;w<v;w++)h?(o[w]&&m.push(o[w]),e[w]&&m.push(e[w])):(e[w]&&m.push(e[w]),o[w]&&m.push(o[w]));return m},d=function(t){var n="";return Object(c.each)(t,(function(t){"text"===t.type?n+=t.content:"tag"===t.type&&(n+="[[".concat(t.tagName,"]]").concat(t.content,"[[").concat(t.tagName,"]]"))})),n},f={render:function(t){var n=Object(o.a)({},t),e=n.raw,i=n.file,a=n.windowId;a||(a="");var r=p(e);return Object(c.each)(r,(function(t){"text"===t.type&&(t.content=s({raw:t.content,file:i,windowId:a})),"tag"===t.type&&(t.content=Object(l.b)(t.content))})),d(r)},injectLogic:function(t){},chunks:{chunk:p,merge:d}}},73:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"d",(function(){return r})),e.d(n,"c",(function(){return l})),e.d(n,"a",(function(){return u}));var o=e(17),c=e(8),i=e(329);i.setOptions({gfm:!0,breaks:!0,headerPrefix:"t-"});var a=function(t){var n=t;return n=i.parse(n)},r=function(t,n,e){var o=t,i=o.match(n)||"";return Object(c.each)(i,(function(t){o=o.replace(t,e(t))})),o},l=function(t,n,e){var o=t,c=n.replace("[[","").replace("]]",""),i="(?:\\[\\[".concat(c,"\\]\\])((?:[^]*))(?:\\[\\[").concat(c,"\\]\\])"),a=new RegExp(i,"gm"),r=o.match(a)||"";if(r[0]){for(var l=r[0].split(n),s=[],u=0;u<l.length;u++){var p=l[u];""!==p&&s.push(p)}for(var d=0;d<s.length;d++){s[d];if(d%2===0)try{s[d]=e(s[d])}catch(b){console.warn("[REPLACE CUSTOM MD TAGS] error: ".concat(b),s[d])}}var f=s.join("");o=o.replace(a,f)}return o},s=function t(n,e){var o=!1;if(Object(c.each)(n,(function(t){t.id===e&&(o=!0)})),o){var i=!1,a=[e[e.length-2],e[e.length-1]],r=e.slice(0,-2),l=parseInt(a[1]);return"-"!==a[0]||isNaN(l)||(i=!0),i?e="".concat(r,"-").concat(l+1):e+="-1",t(n,e)}return e},u=function(t){for(var n=[],e=t.split("\n"),c=[],i=0;i<e.length;i++){var a=e[i],r=Object(o.a)(a.matchAll(/([#]{1,9})\ (.+)/gi));if(r.length>0){var l=r[0],u=l[2].toLowerCase(),p=i,d=u.trim().split(" ").join("-").replace(/[^a-zA-Z0-9-_\xc0-\xfa]/gi,"");d=s(c,d),c.push({raw:a,matches:l,id:d,line:p,title:u,ranking:l[1].length}),n.push({id:d,title:u,line:p})}}return n}},76:function(t,n,e){"use strict";e.d(n,"b",(function(){return m})),e.d(n,"a",(function(){return v})),e.d(n,"c",(function(){return w}));var o=e(9),c=e(0),i=e(56),a=e(18),r=e(51),l=e(53),s=e(13),u=e(70),p=e(8),d=e(36),f=e(10),b=e(47),g=e(23),h=e(1),m=function(t){var n=localStorage.getItem("settings-".concat(t))||"";return Object(b.a)(n,[['"',""]])},v=function(t){var n=Object(i.a)("settings-backend-port",-1),e=Object(o.a)(n,2),f=e[0],b=e[1],m=Object(i.a)("settings-backend-protocol","same"),v=Object(o.a)(m,2),w=(v[0],v[1],Object(c.useContext)(s.a)),O=a.a.settingsPopup,j=[];if(w){var x=w.userSettings,k="".concat(window.location.protocol,"//"),y="".concat(k).concat(w.status.ipsServer.getLocal()).concat(d.a.global.port),C="https://api.qrserver.com/v1/create-qr-code/?size=400x400&margin=50&data=".concat(y);j=[{title:"Devices",fields:[{type:"text",var:y,customHtml:'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class="qrcode-wrapper">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// <img src="'.concat(C,'"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>'),title:"Tiro Url",readOnly:!0,expl:"Access Tiro on another device on the <b>same wifi/local network</b> either by :\n\t\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\t - Entering that url in a browser\n\t\t\t\t\t\t\t\t\t\t\t\t <br>\n\t\t\t\t\t\t\t\t\t\t\t\t - Scanning that qrcode (on desktop, go to a website like <a href='https://webqr.com/'>webqr.com </a>)",modifier:function(){},onCustomHtmlClick:function(){w.ui.lightbox.open(0,[C])}},{type:"none",var:"",customHtml:"<button> Open Tiro Window </button>",title:"Open Tiro Window",readOnly:!0,expl:"Open Tiro in a separate window (Desktop only)",modifier:function(){},onCustomHtmlClick:function(){window.open(window.location.href,"popup-tiro","width=800,height=1000"),window.open("","_self").close()}}]},{title:"layout",fields:[{type:"text",title:"Main color",expl:"A color string like 'orange' or 'blue' or an Hex string like '#E86666' (tiro red) or '#729fc4'",var:x.get("ui_layout_colors_main"),modifier:function(t){x.set("ui_layout_colors_main",t)}},{type:"checkbox",title:"Sidebar Shortcut Panel",expl:"Adds a shortcuts/scratchpad space in the sidebar. To edit it, create a note in '.tiro/shortcuts.md'",var:x.get("ui_layout_shortcuts_panel"),modifier:function(t){x.set("ui_layout_shortcuts_panel",t)}}]},{title:"editor",fields:[{type:"checkbox",title:"Markdown Preview",expl:"Preview Images and Latex in the editor",var:x.get("ui_editor_markdown_preview"),modifier:function(t){R(!0),x.set("ui_editor_markdown_preview",t)}},{type:"checkbox",title:"Links button",expl:"Replace http links into buttons in the editor by adding a '/' at the end of it.",var:x.get("ui_editor_links_as_button"),modifier:function(t){R(!0),x.set("ui_editor_links_as_button",t)}},{type:"checkbox",title:"Improved Markdown Table",expl:"Improves the display of markdown table. Can be disabled inside a note if it includes '--no-editor-table'. ",var:x.get("ui_editor_markdown_table_preview"),modifier:function(t){R(!0),x.set("ui_editor_markdown_table_preview",t)}}]},{title:"Users and Rights",fields:[{type:"checkbox",title:"Enable read-only viewer",expl:'Create a "viewer" user that can read but not edit the content',var:x.get("users_viewer_user_enable"),modifier:function(t){x.set("users_viewer_user_enable",t,{writeInSetupJson:!0})}},{type:"text",title:"Viewer user password",expl:'Define the "viewer" user password',var:x.get("users_viewer_user_password"),modifier:function(t){x.set("users_viewer_user_password",t,{writeInSetupJson:!0})}},{type:"checkbox",title:"Demo Mode",expl:"Autofill the 'viewer' user and password on login popup for easier access during a demo mode",var:x.get("demo_mode_enable"),modifier:function(t){x.set("demo_mode_enable",t,{writeInSetupJson:!0})}},{type:"none",var:"",customHtml:"<button> Logout </button>",title:"Logout current User",readOnly:!0,expl:"Logout Current User",modifier:function(){},onCustomHtmlClick:function(){Object(g.a)(),t.onClose(),Object(s.d)((function(t){t.folders.get(["/"],(function(){}))}))}}]},{title:"Advanced",fields:[{type:"text",var:f,title:O.backend.port,expl:O.backend.portExpl,modifier:b}]}]}var _=Object(u.a)("config-panels-opened",[]),E=Object(o.a)(_,3),T=E[0],S=E[1],I=(E[2],Object(c.useState)(!1)),N=Object(o.a)(I,2),F=N[0],R=N[1];return Object(h.c)("div",{className:"settings-popup-wrapper"},Object(h.c)(r.a,{title:"".concat(O.title),onClose:function(){t.onClose()}},j.map((function(t,n){return Object(h.c)("div",{className:"settings-panel"},Object(h.c)("h3",{onClick:function(){!function(t){var n=Object(p.cloneDeep)(T);n[t]=!n[t],S(n)}(n)}},Object(h.c)("div",{className:"arrow"},T[n]?"\u25bc":"\u25ba"),t.title),Object(h.c)("div",{className:"fields-wrapper ".concat(T[n]?"active":"")},t.fields.map((function(t){return Object(h.c)("div",{className:"field-wrapper"},Object(h.c)("div",{className:"input-and-html-wrapper"},"none"===t.type&&Object(h.c)("span",null,t.title),"none"!==t.type&&Object(h.c)(l.a,{value:t.var,label:t.title,type:t.type,readonly:t.readOnly,onChange:function(n){"checkbox"!==t.type&&t.modifier(n)},onCheckedChange:function(n){"checkbox"===t.type&&t.modifier(n)}}),t.customHtml&&Object(h.c)("div",{className:"custom-html-wrapper",onClick:function(n){t.onCustomHtmlClick&&t.onCustomHtmlClick()},dangerouslySetInnerHTML:{__html:t.customHtml}})),Object(h.c)("div",{className:"explanation",dangerouslySetInnerHTML:{__html:t.expl||""}}))}))))})),F&&Object(h.c)("button",{onClick:function(t){window.location.reload()}},"Reload App")))},w=function(){return"\n.device-view-mobile {\n\t.settings-popup-wrapper .popup-wrapper .popupContent {\n\t\t\t\twidth: 80vw;\n\t\t\t\t.field-wrapper {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tpadding: 5px 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t}\n}\n\n.settings-popup-wrapper .popup-wrapper .popupContent {\n padding: 0px 20px;\n\t\twidth: 50vw;\n\t\tmin-height: 50vh;\n\t\tmax-height: 70vh;\n\t\toverflow-y: scroll;\n\n}\n\n.settings-panel {\n\n\t\th3 {\n\t\t\t\tcursor: pointer;\n\t\t\t\ttext-transform: uppercase;\n\t\t\t\t.arrow {\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tfont-size: 7px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tbottom: 2px;\n\t\t\t\t\t\tmargin-right: 10px;\n\t\t\t\t}\n\t\t}\n\t\t.fields-wrapper {\n\t\t\t\tdisplay: none;\n\t\t\t\t&.active {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tpadding: 12px 12px 0px 12px;\n\t\t\t\t\t\tbackground: ".concat(f.a.colors.bgPopup2,";\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tborder: 1px ").concat(f.a.colors.bgPopup3," solid;\n\t\t\t\t\t\tmargin-top: 10px;\n\t\t\t\t}\n\t\t\t\t.field-wrapper {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tpadding-bottom: 11px;\n\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\t.input-and-html-wrapper {\n\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t.input-component {\n\t\t\t\t\t\t\t\t\t\tflex: 1;\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.custom-html-wrapper {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 20px;\n\t\t\t\t\t\t\t\t\t\t.qrcode-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\timg {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin: 5px 25px 0px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\twidth: 150px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n}\n\n\n\n\n.buttons {\n display: flex;\n padding: 20px 0px 0px 0px;\n button {\n width: 30%;\n padding: 10px;\n }\n}\n")}},77:function(t,n,e){"use strict";e.d(n,"d",(function(){return h})),e.d(n,"c",(function(){return O})),e.d(n,"a",(function(){return j})),e.d(n,"b",(function(){return x}));var o=e(17),c=e(9),i=e(8),a=e(0),r=e(38),l=e(19),s=e(64),u=e(16),p=e(71),d=e(23),f=e(70),b=e(56),g=e(13),h=function(t){var n=Object(a.useState)([]),e=Object(c.a)(n,2),s=e[0],u=e[1],d=Object(a.useState)(-1),h=Object(c.a)(d,2),O=h[0],j=h[1],x=Object(b.a)("selected-folder",""),k=Object(c.a)(x,2),y=k[0],C=k[1],_=Object(a.useState)(m),E=Object(c.a)(_,2),T=E[0],S=E[1],I=Object(a.useState)(""),N=Object(c.a)(I,2),F=N[0],R=N[1],A=Object(f.a)("folders-open",["/"]),D=Object(c.a)(A,3),L=D[0],P=D[1],M=D[2],z=Object(a.useRef)([]),B=function(t){t=Object(i.uniq)(t),P(t)};Object(a.useEffect)((function(){H(L)}),[L]);var H=function(t,n){n||(n={}),Object(i.isBoolean)(n.cache)||(n.cache=!0);var e=!!Object(i.isBoolean)(n.background)&&n.background,o=0;Object(g.d)((function(c){Object(i.each)(t,(function(i){var a="folder-scan-".concat(i),r=function(){c.folders.get([i],(function(i){var r;(!e&&W(i.pathBase,i.folders),c.cache.set(a,i,-1),++o>=t.length)&&((null===(r=n)||void 0===r?void 0:r.cb)&&n.cb())}))};n&&n.cache?c.cache.get(a,(function(c){var i;c?e||(W(c.pathBase,c.folders),++o>=t.length&&(null===(i=n)||void 0===i?void 0:i.cb)&&n.cb()):r()})):r()}))}))},U=Object(a.useRef)([]),W=function(t,n){var e=Object(i.cloneDeep)(U.current),o={current:e};Object(i.each)(n,(function(t){t&&(o.current=o.current.filter((function(n){return t.path!==n.path})))})),Object(i.each)(n,(function(t){t&&(o.current=w(t,o.current))})),e=o.current,U.current=e;var c=v("/",e);c&&S(c),R(t)};return{goTo:function(n,e,o){if(""!==n){n=Object(r.b)("".concat(n,"/"));l.a.client.log.verbose&&console.log("".concat("[BROWSER GO TO] "," ").concat(n," ").concat(e," ").concat(JSON.stringify(o))),t.searchUiApi.term.set(""),t.statusApi.searching.set(!0),C(n),t.filesApi.get(n,(function(n){t.statusApi.searching.set(!1);var c=t.userSettingsApi.get("ui_filesList_sortMode"),a=Object(p.d)(n,c),r=-1;if(e&&Object(i.each)(a,(function(t,n){t.name===e&&(r=n)})),j(r),u(a),o&&o.openIn){var l=a[r];"active"===o.openIn||"activeWindow"===o.openIn?t.tabsApi.active.get()?t.windowApi.active.setContent(l):t.tabsApi.openInNewTab(l):t.windowApi.updateWindows([o.openIn],l)}}))}},files:{active:{get:s[O],getIndex:O,set:j},set:u,get:s},folders:{refreshFromBackend:function(){M((function(t){z.current=t}))},base:F,get:function(){return T},clean:function(){S(m)},scan:H,open:{get:function(){return z.current},add:function(t){z.current=[].concat(Object(o.a)(z.current),[t]),B(z.current)},remove:function(t){Object(i.each)(t,(function(t){z.current=z.current.filter((function(n){return!n.startsWith(t)}))})),B(z.current)}},current:{get:y,set:C}}}},m={title:"",key:"",path:""},v=function t(n,e){for(var o,c=0;c<e.length;c++)if(Object(r.a)(e[c].path,n)){o=Object(i.cloneDeep)(e[c]);var a=e[c].children;if(Object(i.isArray)(a))for(var l=0;l<a.length;l++){var s=t(a[l].path,e);s&&(o.children[l]=s)}}return o},w=function(t,n){for(var e="add",o=0;o<n.length;o++)Object(r.a)(t.path,n[o].path)&&(n[o]=t,e="update");return"add"===e&&n.push(t),n},O={title:".trash",key:"/.tiro/.trash",path:"/.tiro/.trash"},j=function(t,n){console.log("[askFolderCreate]",t,n),u.b.emit("askFolderCreate",{newFolderName:t,parent:n,token:Object(d.b)()})},x=function(t,n){console.log("[askFolderDelete]",t,n),u.b.emit("askFolderDelete",{typeFolder:t,cacheFolderName:n,token:Object(d.b)()})};Object(s.a)("cache","clean_ctag_cache",(function(){Object(g.d)((function(t){t.folders.delete("cache","ctag-ressources")}))}))},80:function(t,n,e){"use strict";e.d(n,"a",(function(){return f})),e.d(n,"b",(function(){return g}));e(8),e(0);var o=e(38),c=e(23),i=e(14),a=e(33),r=e(49),l=e(47),s=e(10),u=e(35),p=e(1),d=400,f=function(t){var n=function(t){var n="",e=t.split(".");return"7z"===(n=e[e.length-1].split("?")[0])&&(n="d7z"),n},e=t.markdownTag.split("](")[1].slice(0,-1),s=t.markdownTag.split("](")[0].replace("![",""),d="".concat(Object(u.a)(t.file.folder),"/").concat(e).concat(Object(c.c)()),f="".concat(s,".").concat(n(e)),b=Object(o.b)(d),g="ress-".concat(Object(l.b)(b));Object(a.a)(t.file,b,(function(){var n=document.querySelector(".".concat(g," .iframe-wrapper"));n&&v(b,n,t.file.path)}));var m=a.d,v=function(t,e,c,i){var l=(null===i||void 0===i?void 0:i.fullscreen)||!1;null===i||void 0===i||i.fullscreen;if(e){var s=Object(o.d)(c);if(null!==i&&void 0!==i&&i.persist){var u=e.querySelector("iframe")?"closed":"open";Object(a.b)(s,t,u)}var p=function(){e.innerHTML=""};"epub"===n(t).toLocaleLowerCase()?Object(r.b)(e,Object(r.a)("epub",t,{file:s,fullscreen:l,onFullscreenClose:p}),null===i||void 0===i?void 0:i.openOnly):"pdf"===n(t).toLocaleLowerCase()?Object(r.b)(e,Object(r.a)("pdf",t,{file:s,fullscreen:l,onFullscreenClose:p}),null===i||void 0===i?void 0:i.openOnly):Object(r.b)(e,Object(r.a)("iframe",t,{fullscreen:l,onFullscreenClose:p}))}},w='<li title="Open link in detached window"\n\t\tonclick="'.concat(Object(a.c)("open-win-ress",(function(t){if(t){var n=t.dataset.link;window.open(n,"popup-preview-link","width=800,height=1000")}})),'"\n\t\tdata-link="').concat(b,'">').concat(m("up-right-from-square"),"</li>"),O=function(t,n){if(t){var e=t.dataset.link,o=t.dataset.filepath,c=function(t){return t.parentNode.parentNode.parentNode.parentNode.parentNode.querySelector(".iframe-wrapper")}(t);v(e,c,o,n)}},j='<li\n\t\tonclick="'.concat(Object(a.c)("preview-link-ress",(function(t){return O(t,{persist:!0})})),'"\n\t\ttitle="Toggle a pinned preview" \n\t\tdata-filepath="').concat(t.file.path,'" \n\t\tdata-link="').concat(b,'">').concat(m("thumbtack"),"</li>"),x='<li\n\t\tonclick="'.concat(Object(a.c)("download-link-ress",(function(t){h(f,d)})),'"\n\t\ttitle="Preview link" data-filepath="').concat(t.file.path,'" data-link="').concat(b,'">').concat(m("download"),"</li>"),k="<ul>".concat(j," ").concat(w," ").concat(x,"</ul>"),y='<div class="ressource-link-label" data-filepath="'.concat(t.file.path,'" data-link="').concat(b,'" onclick="').concat(Object(a.c)("preview-link-ress-main",(function(t){return O(t,{fullscreen:!0})})),'">').concat(s," (").concat(n(b),")</div>");return Object(p.c)("div",{className:"".concat(g," resource-link-iframe-wrapper")},Object(p.c)("div",{className:" resource-link-wrapper device-".concat(Object(i.a)())},Object(p.c)("div",{className:"resource-link-icon ".concat(n(b))}),Object(p.c)("div",{className:"resource-link-content-wrapper"},Object(p.c)("div",{dangerouslySetInnerHTML:{__html:y}}),Object(p.c)("div",{dangerouslySetInnerHTML:{__html:k},className:"buttons-wrapper"}))),Object(p.c)("div",{className:"iframe-wrapper"}))},b=".resource-link-icon",g=function(){return"\n.loading-string {\n text-align: center;\n padding: 50px;\n}\n.ressource-link-label {\n\t\tfont-weight: bold;\n\t\tcursor: pointer;\n}\n.resource-link-ctag {\n\t\t// height: ".concat(d-21,"px;\n\t\tmin-height: 120px;\n\t\toverflow:hidden;\n\t\twidth: 100%;\n\t\tborder:none;\n}\n.resource-link-iframe {\n\t\tborder: none;\n\t\twidth: 100%;\n}\n\n.resource-link-wrapper,\n.resource-link-wrapper a {\n\t\tcolor: ").concat(s.a.colors.main,";\n}\n.resource-link-iframe-wrapper {\n\t\tbackground: #f7f6f6;\n\t\tborder-radius: 5px;\n\t\toverflow:hidden;\n}\n.preview-area-wrapper .resource-link-iframe-wrapper {\n\t\tmargin-top: 3px;\n\t\tbackground:#eee!important;\n}\n\n.resource-link-wrapper {\n\t\tpadding: 7px;\n\t\tborder-radius: 10px;\n\t\tposition: relative;\n\t\tmargin: 5px 0px;\n}\n\n.buttons-wrapper {\n\t\tposition: relative;\n\t\ttop: -10px;\n\t\theight: 10px;\n}\n.resource-link-content-wrapper .ssr-icon {\n\t\tpadding: 3px;\n\t\tfont-size: 13px;\n\t\tmargin: 0px 5px 0px 0px;\n\t\tcolor: #b9b9b9;\n\t\tcursor: pointer;\n}\n.resource-link-content-wrapper .ssr-icon:hover {\n\t\tcolor:grey;\n}\n\n.mdpreview-source {\n\t\tdisplay:none!important;\n}\n\n.resource-link-icon {\n\t\ttop: 10px;\n\t\tleft: 19px;\n\t\twidth: 12px;\n\t\theight: 27px;\n\t\tdisplay: inline-block;\n\t\tbackground-image: url(/static/media/file-solid.6415173e.svg);\n\t\topacity: 0.08;\n\t\tposition: absolute;\n\t\tbackground-repeat: no-repeat;\n\t\ttransform: scale(1.5);\n\t\tbackground-image: url(").concat(s.a.assets.fileIcon,");\n}\n\n").concat(b,".epub, ").concat(b,".cbr, ").concat(b,".cbz,").concat(b,".mobi, ").concat(b,".azw, ").concat(b,".azw3, ").concat(b,".iba {background-image: url(").concat(s.a.assets.bookIcon,"); }\n").concat(b,".pdf\n{background-image: url(").concat(s.a.assets.pdfIcon,"); }\n\n").concat(b,".xls, ").concat(b,".xlsm, ").concat(b,".xlsx, ").concat(b,".ods\n{background-image: url(").concat(s.a.assets.excelIcon,"); }\n\n").concat(b,".avi, ").concat(b,".flv, ").concat(b,".h264, ").concat(b,".m4v, ").concat(b,".mov, ").concat(b,".mp4, ").concat(b,".mpg, ").concat(b,".mpeg, ").concat(b,".rm, ").concat(b,".swf, ").concat(b,".vob, ").concat(b,".wmv, ").concat(b,".mkv\n{background-image: url(").concat(s.a.assets.videoIcon,"); }\n\n").concat(b,".d7z, ").concat(b,".arj, ").concat(b,".deb, ").concat(b,".rar, ").concat(b,".gz, ").concat(b,".zip, ").concat(b,".rpm, ").concat(b,".pkg\n{background-image: url(").concat(s.a.assets.archiveIcon,");}\n\n").concat(b,".aif, ").concat(b,".mp3, ").concat(b,".cda, ").concat(b,".mid, ").concat(b,".mpa, ").concat(b,".ogg, ").concat(b,".wav, ").concat(b,".wpl, ").concat(b,".wma, ").concat(b,".midi\n{background-image: url(").concat(s.a.assets.audioIcon,"); }\n\n").concat(b,".doc, ").concat(b,".docx, ").concat(b,".odt, ").concat(b,".txt\n{background-image: url(").concat(s.a.assets.wordIcon,"); }\n\n").concat(b,".html, ").concat(b,".css, ").concat(b,".js, ").concat(b,".json, ").concat(b,".ts, ").concat(b,".jsx, ").concat(b,".tsx\n{background-image: url(").concat(s.a.assets.codeIcon,"); }\n\n").concat(b,".bin, ").concat(b,".dmg, ").concat(b,".iso, ").concat(b,".toast, ").concat(b,".vcd\n{\n\t\ttop: 19px;\n\t\ttransform: scale(1.8);\n\t\tbackground-image: url(").concat(s.a.assets.diskIcon,");\n}\n\n").concat(b,".ppt, ").concat(b,".pptx, ").concat(b,".odp, ").concat(b,".key, ").concat(b,".pps\n{background-image: url(").concat(s.a.assets.presIcon,"); }\n\n\n.resource-link-content-wrapper {\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n}\n\n.resource-link-content-wrapper {\n}\n\n.resource-link-content-wrapper ul {\n\t\tpadding-left: 7px;\n\t\tdisplay: flex;\n}\n.resource-link-content-wrapper ul li {\n\t\tlist-style: none;\n\t\tpadding-left: 0px;\n}\n.resource-link-content-wrapper ul li:before {\n\t\tdisplay: none;\n}\n\n\n// HIDING IT ON DESKTOP \n.device-desktop .resource-link-wrapper:hover .resource-link-content-wrapper ul {\n\t\topacity:1;\n\t\twidth: 90px;\n\t\t// margin-top: 15px;\n\t\tpointer-events: all;\n}\n.device-desktop .resource-link-content-wrapper ul {\n\t\topacity: 0;\n\t\twidth: 0px;\n\t\ttransition: 0.2s all;\n\t\ttransition-delay: 0.2s, 0s;\n\t\tpointer-events: none;\n}\n\n\n")},h=function(t,n){var e=document.createElement("a");e.style.display="none",document.body.appendChild(e),e.href=n,e.target="_blank",e.setAttribute("download",t),e.click(),window.URL.revokeObjectURL(e.href),document.body.removeChild(e)}},83:function(t,n,e){"use strict";e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r})),e.d(n,"d",(function(){return u}));var o=e(114),c=e.n(o),i=function(t,n){var e=c.a.generateRSAKey(n,1024),o=c.a.publicKeyString(e);return c.a.encrypt(t,o)},a=function(t,n){var e=c.a.generateRSAKey(n,1024);return c.a.decrypt(t,e)},r={encryptText:i,decryptText:a,encryptUrlParam:function(t,n){var e=i(t,n);return e.cipher&&(e.cipher=encodeURIComponent(e.cipher)),e},decryptUrlParam:function(t,n){return t=decodeURIComponent(t),a(t,n)}},l=function(t,n){var e=n.replace(t,"").length,o=n.length;return Math.round(e/o*100)/100},s=function(t){return t>0&&t<=.9},u=function(t){var n=!1,e={nb:l(/[^0-9]/g,t),up:l(/[^A-Z]/g,t),low:l(/[^a-z]/g,t),spe:l(/[^\/\=\?\+]/g,t)},o=s(e.nb)&&s(e.up)&&s(e.low)&&e.spe>0,c=(t.trim().endsWith("==")||t.trim().endsWith("="),/^[a-zA-Z0-9\/\=\?\+]+$/.test(t)),i=t.length>100;return c&&o&&i&&(n=!0),n}},84:function(t,n,e){"use strict";e.d(n,"c",(function(){return N})),e.d(n,"a",(function(){return R})),e.d(n,"b",(function(){return A})),e.d(n,"d",(function(){return D}));var o=e(9),c=e(0),i=e.n(c),a=e(8),r=e(279),l=e.n(r),s=(e(445),e(446),e(146)),u=e(104),p=e(147),d=e(12),f=e(13),b=e(32),g=e(123),h=e(148),m=e(22),v=e(62),w=e(108),O=e(54),j=e(14),x=e(149),k=e(73),y=e(1),C=function(t){var n=Object(c.useState)(""),e=Object(o.a)(n,2),i=e[0],r=e[1],l=Object(c.useState)(0),s=Object(o.a)(l,2),u=(s[0],s[1]),p=Object(c.useRef)(0),d=function(t){t>p.current&&(p.current=t),u(p.current)};Object(c.useEffect)((function(){u(0)}),[t.fileContent]);Object(b.a)((function(t){r(t)}),Object(j.d)()?3e3:1e3),Object(b.b)((function(t){r(t)}),1e3);var f=function(t){r(t)};Object(c.useEffect)((function(){f(t.fileContent)}),[t.fileContent,t.file.path]),Object(c.useEffect)((function(){setTimeout((function(){O.a.onWindowLoad(t.windowId)}),500)}),[t.file.path]);var g=Object(c.useState)(-1),h=Object(o.a)(g,2),m=h[0],C=h[1];Object(c.useEffect)((function(){t.lineJumpEvent&&("active"!==t.lineJumpEvent.windowId||t.isActive)&&("active"!==t.lineJumpEvent.windowId&&t.lineJumpEvent.windowId!==t.windowId||(C(t.lineJumpEvent.line),setTimeout((function(){C(-1)}),100)))}),[t.lineJumpEvent]);var _={id:"",line:0,title:""},E=function(n){var e=Object(k.a)(i),o=_;if(Object(a.each)(e,(function(t){n>=t.line&&(o=t)})),""!==o.id){var c=".window-id-".concat(t.windowId," #t-").concat(o.id);try{var r,l=null===(r=document.querySelector(c))||void 0===r?void 0:r.offsetTop;Object(a.isNumber)(l)&&(O.a.updatePreviewOffset(t.windowId,l),O.a.scrollPreview(t.windowId))}catch(s){console.error(s)}}},T=Object(b.b)(E,200),S=Object(b.a)(E,500),I="desktop"===Object(j.a)()&&"editor"===t.viewType||"desktop"!==Object(j.a)()&&"editor"===t.mobileView;return Object(y.c)("div",{className:"dual-view-wrapper view-".concat(t.viewType," device-").concat(Object(j.a)()," window-id-").concat(t.windowId)},Object(y.c)(w.a,{viewType:t.viewType,mobileView:t.mobileView,windowId:t.windowId,editorType:"codemirror",file:t.file,canEdit:t.canEdit,fileContent:t.fileContent,isActive:t.isActive,jumpToLine:m,posY:0,onTitleClick:function(t){!function(t){T(t),S(t)}(t)},onScroll:function(t){},onUpdateY:function(t){},onMaxYUpdate:d,onFileEdited:function(n,e){t.onFileEdited(n,e),f(e)},onScrollModeChange:function(t){},onViewToggle:function(n){t.onViewChange&&t.onViewChange(n)}}),!I&&Object(y.c)(v.a,{windowId:t.windowId,file:t.file,posY:0,fileContent:i,onMaxYUpdate:d,yCnt:0,onIframeMouseWheel:function(t){}}),Object(y.c)(x.a,{windowId:t.windowId}))},_=function(t){var n=Object(c.useContext)(f.a),e=null===n||void 0===n?void 0:n.ui.note.lineJump.get;return Object(y.c)(C,Object(m.a)({},t,{lineJumpEvent:e}))},E=function(t){var n=Object(d.a)({},t.content),e=n.file,r=n.view,l=n.active,s=n.i,u=Object(c.useState)(""),p=Object(o.a)(u,2),m=p[0],v=p[1],w=Object(c.useState)(),O=Object(o.a)(w,2),j=O[0],x=O[1];Object(c.useEffect)((function(){x(r),Object(h.a)(null===e||void 0===e?void 0:e.path).then((function(t){t&&x(t)}))}),[r,null===e||void 0===e?void 0:e.path]);var k=Object(c.useRef)((null===e||void 0===e?void 0:e.path)||"");Object(c.useEffect)((function(){console.log(444,null===e||void 0===e?void 0:e.path),v("loading...")}),[null===e||void 0===e?void 0:e.path]),Object(c.useEffect)((function(){k.current=(null===e||void 0===e?void 0:e.path)||"",S(!1),e&&Object(f.d)((function(t){console.log(445,e.path),t.file.getContent(e.path,(function(t){console.log(445,e.path,{content:t}),v(t),S(!0)})),t.watch.file(e.path,(function(t){return N.current?console.log("FILE WATCH DISABLED FOR 10s after reconnection"):k.current===t.filePath?!0===L.current?D.current=t.fileContent:void v(t.fileContent):void 0}))}))}),[null===e||void 0===e?void 0:e.path,m]);var C=Object(c.useState)(!1),E=Object(o.a)(C,2),T=E[0],S=E[1],I=Object(b.a)((function(t){Object(g.a)(t,20,!0)}),3e3),N=Object(c.useRef)(!1),F=Object(b.a)((function(){N.current=!1,console.log("reenable watch file")}),1e4),R=Object(c.useRef)({}),A=Object(c.useRef)(0);Object(c.useEffect)((function(){var t=R.current;Object(f.d)((function(n){n.watch.appStatus((function(n){if(!1===n.isConnected)A.current=A.current+1,console.log("disabling watch update as disconnected"),N.current=!0;else if(!0===n.isConnected){A.current>=1&&n.isConnected&&(F(),Object(f.d)((function(n){var o=null===e||void 0===e?void 0:e.path;if(t=R.current,console.log("2 RECONNECTION",o,t,R),o&&t&&t.path&&o===t.path&&t.content){var c=t.content;console.log("3 UPDATE OFFLINE CONTENT",{filepath:o,content:c}),n.file.saveContent(o,c,{history:!0})}})))}}))}))}),[null===e||void 0===e?void 0:e.path]);var D=Object(c.useRef)(!1),L=Object(c.useRef)(!1),P=Object(b.a)((function(){L.current=!1,Object(a.isBoolean)(D.current)||(D.current=!1)}),2e3);return Object(c.useEffect)((function(){e&&l&&Object(f.d)((function(t){t.ui.browser.goTo(e.folder,e.name)}))}),[l]),Object(y.c)(i.a.Fragment,null,e&&Object(y.c)("div",{className:"window-editor-wrapper"},Object(y.c)(_,{windowId:s,file:e,fileContent:m,isActive:l,canEdit:T,viewType:j,onViewChange:t.onViewChange,mobileView:t.mobileView,onFileEdited:function(t,n){!function(t,n){Object(f.d)((function(e){e.file.saveContent(t,n,{history:!0})})),L.current=!0,P(),R.current={content:n,path:null===e||void 0===e?void 0:e.path},I({path:t,content:n,timestamp:Date.now()})}(t,n)}})))},T=i.a.memo(E,(function(t,n){return!1})),S=e(10),I=e(42),N={rows:2,cols:4},F={m:10,rows:N.rows,cols:N.cols,decalBottom:10},R=function(t){var n=Object(c.useState)([]),e=Object(o.a)(n,2),r=e[0],d=e[1],b=Object(c.useState)([]),g=Object(o.a)(b,2),h=g[0],m=g[1],v=Object(c.useRef)();Object(c.useEffect)((function(){t.grid&&t.grid.layout&&(m(t.grid.layout),d(t.grid.content))}),[t.refresh]),Object(c.useEffect)((function(){P(),E()}),[h]);var w=function(n,e){t.onGridUpdate({layout:n,content:e})},O=function(){var t=r[0].file;if(t){var n=function(t){for(var n=[],e=N,o=function(o){for(var c=[],i=function(n){var e=0;Object(a.each)(t,(function(t){for(var c=0;c<t.w;c++)for(var i=0;i<t.h;i++){var a=t.x+c,r=t.y+i;a===n&&r===o&&(e=1)}})),c.push(e)},r=0;r<e.cols;r++)i(r);n.push(c)},c=0;c<e.rows;c++)o(c);for(var i=[-1,-1],r=[-1,-1],l=0;l<e.rows;l++)for(var s=0;s<e.cols;s++)0===n[l][s]&&-1===i[0]&&-1===i[1]&&(i[0]=s,i[1]=l),0===n[l][s]&&(r[0]=s,r[1]=l);var u=r[0]-i[0]+1,p=r[1]-i[1]+1;return{x:i[0],y:i[1],w:u,h:p}}(h),e=Object(u.a)({file:t,w:n.w,h:n.h,x:n.x,y:n.y}),o=Object(a.cloneDeep)(h);o.push(e.layout),H(o)&&(m(o),setTimeout((function(){var t=Object(a.cloneDeep)(r);t.push(e.content);var n=M(e.content.i,t);d(n),w(o,n)})),w(o,r))}},x=Object(c.useState)(!1),k=Object(o.a)(x,2),C=k[0],_=k[1],E=function(){_(h.length>1)},S=function(t){var n=Object(a.filter)(Object(a.cloneDeep)(h),(function(n){return n.i!==t})),e=function(t){var n=N;return 1===t.length&&(t[0].x=0,t[0].y=0,t[0].h=n.rows,t[0].w=n.cols),t}(n);m(e),setTimeout((function(){var e=Object(a.filter)(Object(a.cloneDeep)(r),(function(n){return n.i!==t}));d(e),w(n,e)})),w(n,r)},R=Object(c.useState)(!1),A=Object(o.a)(R,2),D=A[0],L=A[1],P=function(){var t=0,n=F.cols*F.rows;Object(a.each)(h,(function(n){t+=n.w*n.h})),L(t!==n)},M=function(t,n){var e=Object(a.cloneDeep)(n);return Object(a.each)(e,(function(n){n.active=n.i===t})),e},z=function(t,n){var e=M(t,r);d(e),w(h,e),n&&(null===V||void 0===V||V.ui.browser.goTo(n.folder,n.name))},B=function(t){v.current=Object(a.cloneDeep)(t)},H=function(t){for(var n=!0,e=0;e<t.length;e++){var o=t[e];o.y>1&&(n=!1),o.h>1&&o.y>0&&(n=!1)}return n};Object(p.b)(),Object(c.useEffect)((function(){var t=U.current;if(t)return t.addEventListener("resize",(function(){})),function(){t.removeEventListener("resize",(function(){}))}}),[]);var U=Object(c.useRef)(null),W={width:300,height:300};U.current&&(W.width=U.current.clientWidth,W.height=U.current.clientHeight-F.decalBottom);var q=function(t,n){var e=Object(a.cloneDeep)(r);e[n].view=t,d(e),w(h,e)},V=Object(c.useContext)(f.a),G=Object(c.useState)(null),J=Object(o.a)(G,2),K=J[0],Y=J[1];Object(c.useEffect)((function(){if("mobile"===Object(j.a)()){var t=null===V||void 0===V?void 0:V.ui.windows.active.get();if(t)Y(t);else{var n={layout:h[0],content:r[0]};n.layout&&n.content&&n.layout.i===n.content.i&&(Y(n),z(n.content.i))}}}),[t.refresh]);return Object(y.c)("div",{className:"draggable-grid-wrapper"},Object(y.c)("div",{className:"draggable-grid-wrapper-in",ref:U},"mobile"!==Object(j.a)()&&Object(y.c)(l.a,{className:"draggable-grid",autoSize:!1,layout:h,onLayoutChange:function(t){var n=Object(a.cloneDeep)(t);if(H(n)){var e=function(t){var n=t,e=N;return n.length,2===n.length&&(n[0].w===e.cols/2-1&&n[1].w===e.cols/2||n[1].w===e.cols/2-1&&n[0].w===e.cols/2)&&(n[0].w=e.cols/2,n[1].w=e.cols/2),n}(n);B(e),m(e),w(e,r)}else{if(!v.current)return;var o=function(t){var n=t,e=N,o=null;console.log("0035",n),(2===n.length&&(n[0].w===e.cols-1&&n[0].h===e.rows&&n[1].w===e.cols/2&&n[1].h===e.rows||n[1].w===e.cols-1&&n[1].h===e.rows&&n[0].w===e.cols/2&&n[0].h===e.rows)||2===n.length&&(n[0].w===e.cols-1&&n[0].h===e.rows&&n[1].w===e.cols/2&&n[1].h===e.rows||n[1].w===e.cols-1&&n[1].h===e.rows&&n[0].w===e.cols/2&&n[0].h===e.rows))&&(console.log("[ALT LAYOUT] 0035 found i|iii to ii|ii"),o=Object(a.cloneDeep)(t),Object(a.each)(o,(function(t,n){t.w=e.cols/2,t.y=0,1===n&&(t.x=e.cols/2)})));return o}(t);o&&B(o);var c=o||v.current,i=Object(a.cloneDeep)(c);Object(a.each)(i,(function(t){t.refresh=Object(s.a)(t.refresh)})),m(i),w(i,r)}},cols:F.cols,compactType:"horizontal",useCSSTransforms:!1,rowHeight:W.height/F.rows-F.m*(F.rows+1),draggableHandle:".drag-handle",width:W.width,margin:[F.m,F.m]},h.map((function(n,e){return Object(y.c)("div",{key:n.i,className:" ".concat(r[e]&&r[e].active?"active":""," window-wrapper "),onClick:function(){r[e]&&!r[e].active&&z(r[e].i,r[e].file)},onMouseEnter:function(){}},function(t,n){return Object(y.c)(i.a.Fragment,null,Object(y.c)("div",{className:"note-active-ribbon"}),Object(y.c)("div",{className:"window-buttons-bar ".concat(D?"can-add":""," ").concat(C?"can-remove":"")},Object(y.c)(I.a,{design:"horizontal",popup:!1,buttons:[{icon:"faGripVertical",title:"Move Window",class:"drag-handle",action:function(){},onHover:function(){t&&!t.active&&z(t.i,t.file)}},{icon:"faPlus",title:"Add Window",class:"add-button",action:function(){O()}},{icon:"faPlus",title:"Delete Window",class:"delete-button",action:function(){S(t.i)}}],colors:["#d4d1d1","#615f5f"],size:.8})))}(n),Object(y.c)("div",{className:"note-wrapper"},Object(y.c)(T,{content:t.grid.content[e]&&t.grid.content[e],onViewChange:function(t){q(t,e)},mobileView:t.mobileView})))}))),"mobile"===Object(j.a)()&&Object(y.c)("div",{className:"mobile-grid-view"},Object(y.c)("div",{className:" window-wrapper"},Object(y.c)("div",{className:"note-wrapper"},K&&Object(y.c)(T,{content:K.content,onViewChange:function(t){q(t,0)},mobileView:t.mobileView}))))))},A=function(){return"\n.draggable-grid-wrapper \n.draggable-grid-wrapper-in \n.mobile-grid-view {\n\t\t.window-wrapper {\n\n\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\t.note-wrapper {\n\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\tmargin-top: 47px;\n\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\ttop: -43px;\n\t\t\t\t\t\t\t\t\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: ".concat(S.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: -15px;\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t.textarea-editor {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% - 300px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 20px 20px 70px 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 40px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tresize: none;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\theight: calc(100% - 165px);\n\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px!important;\n\t\t\t\t\t\t\t\t\t\t\t\tbottom: 0px!important;\n\t\t\t\t\t\t\t\t\t\t\t\t.dates-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-content {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px 0px 50px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n")},D=function(){return"\n\n.draggable-grid-wrapper {\n\t\t// remove transition\n\t\theight: 100%;\n\n\t\t.react-grid-item {\n\t\t\t\ttransition: all 0ms ease;\n\t\t\t\ttransition-property: left, top;\n\t\t\t\t.react-resizable-handle {\n\t\t\t\t\t\tbottom: 0px;\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\tcursor: se-resize;\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\theight: 18px;\n\t\t\t\t\t\tbackground: rgb(247,247,247);\n\t\t\t\t}\n\t\t\t\t.react-resizable-handle:after {\n\t\t\t\t\t\ttop: 5px;\n\t\t\t\t\t\tleft: 1px;\n\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t}\n\t\t}\n\n\t\t.draggable-grid-wrapper-in {\n\t\t\t\theight: 100%;\n\t\t\t\tposition: relative;\n\n\t\t\t\t.draggable-grid, .mobile-grid-view {\n\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t.window-wrapper {\n\t\t\t\t\t\t\t\t//overflow: hidden;\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tcolor: ".concat(S.a.colors.fontEditor,";\n\t\t\t\t\t\t\t\tbackground: ").concat(S.a.colors.bgEditor,";\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.1);\n\t\t\t\t\t\t\t\toverflow-y: hidden;\n\t\t\t\t\t\t\t\toverflow-x: hidden;\n\t\t\t\t\t\t\t\theight:100%;\n\n\t\t\t\t\t\t\t\t// height 100% everywhere\n\t\t\t\t\t\t\t\t.note-wrapper,\n\t\t\t\t\t\t\t\t.window-editor-wrapper,\n\t\t\t\t\t\t\t\t.dual-view-wrapper,\n\t\t\t\t\t\t\t\t.editor-area,\n\t\t\t\t\t\t\t\t.preview-area-wrapper,\n\t\t\t\t\t\t\t\t.preview-area,\n\t\t\t\t\t\t\t\t.main-editor-wrapper{\n\t\t\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.content-wrapper {\n\t\t\t\t\t\t\t\t\t\theight:100%;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.note-active-ribbon {\n\t\t\t\t\t\t\t\t\t\theight: 2px;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t\t\t.note-active-ribbon {\n\t\t\t\t\t\t\t\t\t\t\t\t//background:").concat(S.a.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.dual-view-wrapper\n\t\t\t\t\t\t\t\t\t\t.editor-area\n\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper\n\t\t\t\t\t\t\t\t\t\t.title-input-wrapper\n\t\t\t\t\t\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: ").concat(S.a.colors.main,";\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.note-wrapper {\n\t\t\t\t\t\t\t\t\t\t.editor-toolbar-dropdown {\n\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\n\n\n\n\t\t\t\t\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tz-index:2;\n\t\t\t\t\t\t\t\t\t\tright: 30px;\n\t\t\t\t\t\t\t\t\t\ttop: 10px;\n\t\t\t\t\t\t\t\t\t\t.delete-button {display: none;}\n\t\t\t\t\t\t\t\t\t\t.add-button {display: none;}\n\t\t\t\t\t\t\t\t\t\t.drag-handle {\n\t\t\t\t\t\t\t\t\t\t\t\tcursor: grab;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.delete-button svg {\n\t\t\t\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t&.can-add {\n\t\t\t\t\t\t\t\t\t\t\t\t.add-button {display: block;}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t&.can-remove {\n\t\t\t\t\t\t\t\t\t\t\t\t.delete-button {display: block;}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t// content css modification\n\t\t\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t\t\t.file-path-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\tposition:initial;\n\t\t\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index: 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition:absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 32px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-rigth: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 33px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 3px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-rigth: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 10px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: -6px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: initial;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 0.5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 65px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(S.a.font.editor,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 15px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// ALL\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t&.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 33px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//padding: 5px 5px 5px 5px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(S.a.colors.bgPreview,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//padding: 10px 10px 10px 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// FULL PREVIEW\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t&.device-desktop.view-preview {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// FULL EDITOR\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t&.device-desktop.view-editor {\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 33px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t\n}\n")}},88:function(t,n,e){"use strict";e.d(n,"c",(function(){return l})),e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(26),c=e(13),i=e(33),a=e(10),r=e(55),l=function(t,n){return Object(r.a)({file:t,pattern:o.a.linklink,replacement:function(t){var e=document.createElement("span");e.classList.add("note-link-mdpreview-wrapper"),e.classList.add("note-link-wrapper");var o=t[1],c=t[2],i=u(o,c,n);return e.innerHTML="".concat(i),e}})},s=function(t){if(t){var n=t.dataset.file,e=t.dataset.folder,o=""===t.dataset.windowid?"active":t.dataset.windowid;n&&e&&Object(c.e)().then((function(t){t.ui.browser.goTo(e,n,{openIn:o})}))}},u=function(t,n,e){return'<a\n\t\tonclick="'.concat(Object(i.c)("open-link-page",s),'"\nclass="title-search-link preview-link" data-file="').concat(t,'" data-folder="').concat(n,'" data-windowid="').concat(e,'">').concat(t,"</a>")},p=function(t){return t||(t=""),"\n\t\t\t.preview-link {\t\t\t\t\t\t\t\n\t\t\t\tfont-weight: 800;\n\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\tbackground-position: 4px 2px;\n\t\t\t\tpadding-left: 20px;\n\t\t\t\tbackground-size: 10px;\n\t\t}\n\n\t\t".concat(t,".external-link {\n\t\t\t\tbackground-image: url(").concat(a.a.assets.worldIcon,");\n\t\t}\n\t\t").concat(t,".search-link {\n\t\t\t\tcolor: ").concat(a.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(a.a.assets.searchIcon,");\n\t\t}\n\t\t").concat(t,".title-search-link {\n\t\t\t\tcolor: ").concat(a.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(a.a.assets.linkIcon,");\n\t\t\t\tcursor: pointer;\n\t\t}\n\t\t").concat(t,".resource-link {\n\t\t\t\tcolor: ").concat(a.a.colors.main,";\n\t\t} ")}}},[[471,11,12]]]);