tiro-notes 0.40.21 → 0.40.22
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(316),e(317),e(318),e(319);var o=e.p+"static/media/deco-bg-map.7ca9103b.png",i=e.p+"static/media/file-solid.6415173e.svg",c=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",mainFont:"#FFFFFF",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\t\t\t&:hover {\n\t\t\t\t\topacity: 0.9;\n\t\t\t}\n\t\t\tcolor: white;\n\t\t\tborder-radius: 5px;\n\t\t\tmargin-right: 5px;\n\t\t\tcursor: pointer;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-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:i,diskIcon:c,pdfIcon:a,presIcon:b,audioIcon:d,videoIcon:p,excelIcon:u,wordIcon:r,codeIcon:l,bookIcon:s,archiveIcon:f,searchIcon:m},anim:{time:"100ms"}}},100:function(t,n,e){"use strict";e.d(n,"c",(function(){return h})),e.d(n,"b",(function(){return O})),e.d(n,"a",(function(){return j}));var o=e(17),i=e(6),c=e(4),a=e(0),r=e(26),l=e(18),s=e(31),u=e(15),p=e(80),d=e(19),f=e(55),b=e(61),g=e(12),h=function(t){var n=Object(a.useState)([]),e=Object(i.a)(n,2),s=e[0],u=e[1],d=Object(a.useState)(-1),h=Object(i.a)(d,2),O=h[0],j=h[1],x=Object(b.a)("selected-folder",""),k=Object(i.a)(x,2),y=k[0],_=k[1],C=Object(a.useRef)("");Object(a.useEffect)((function(){C.current=y}),[y]);var E=Object(a.useState)(m),S=Object(i.a)(E,2),T=S[0],I=S[1],N=Object(a.useState)(""),P=Object(i.a)(N,2),R=P[0],A=P[1],F=Object(f.a)("folders-open",["/"]),L=Object(i.a)(F,3),D=L[0],M=L[1],z=L[2],B=Object(a.useRef)([]),U=function(t){t=Object(c.uniq)(t),M(t)},H=Object(a.useRef)(!1);Object(a.useEffect)((function(){H.current||(console.log("openFolders > scanFolders",D.length),W(D),D.length>1&&(H.current=!0))}),[D]);var W=function(t,n){Object(c.each)(t,(function(n,e){""===t[e]&&(t[e]="/")})),t=Object(c.uniq)(t),n||(n={}),Object(c.isBoolean)(n.cache)||(n.cache=!0);var e=!!Object(c.isBoolean)(n.background)&&n.background,o=0;Object(g.d)((function(i){Object(c.each)(t,(function(c){i.folders.get([c],(function(i){var c;!e&&V(i.pathBase,i.folders),++o>=t.length&&(null===(c=n)||void 0===c?void 0:c.cb)&&n.cb()}))}))}))},q=Object(a.useRef)([]),V=function(t,n){var e=Object(c.cloneDeep)(q.current),o={current:e};Object(c.each)(n,(function(t){t&&(o.current=o.current.filter((function(n){return t.path!==n.path})))})),Object(c.each)(n,(function(t){t&&(o.current=w(t,o.current))})),e=o.current,q.current=e;var i=v("/",e);i&&I(i),A(t)};return{goTo:function(t,n,e){""!==t&&Object(g.d)((function(o){t=Object(r.b)("".concat(t,"/"));l.a.client.log.verbose&&console.log("".concat("[BROWSER GO TO] "," ").concat(t," ").concat(n," ").concat(JSON.stringify(e))),o.ui.search.term.set(""),o.status.searching.set(!0),_(t),o.files.get(t,(function(t){o.status.searching.set(!1);var i=o.userSettings.get("ui_filesList_sortMode"),a=Object(p.d)(t,i),r=-1;if(n&&Object(c.each)(a,(function(t,e){t.name===n&&(r=e)})),j(r),u(a),e&&e.openIn){var l=a[r];if("active"===e.openIn||"activeWindow"===e.openIn){var s=o.tabs.active.get();null===s||void 0===s||s.grid.content[0].i;s?o.ui.windows.active.setContent(l):o.tabs.openInNewTab(l)}else o.ui.windows.updateWindows([e.openIn],l)}}))}))},files:{active:{get:s[O],getIndex:O,set:j},set:u,get:s},folders:{refreshFromBackend:function(){z((function(t){B.current=t}))},base:R,get:function(){return T},clean:function(){I(m)},scan:W,open:{get:function(){return B.current},add:function(t){console.log("ADD",t),B.current=[].concat(Object(o.a)(B.current),[t]),B.current=Object(c.uniq)(B.current),U(B.current)},remove:function(t){console.log("REMOVE",t),Object(c.each)(t,(function(t){B.current=B.current.filter((function(n){return n!==t}))})),U(B.current)}},current:{get:function(){return C.current},set:_,getSync:y}}}},m={title:"",key:"",path:""},v=function t(n,e){for(var o,i=0;i<e.length;i++)if(Object(r.a)(e[i].path,n)){o=Object(c.cloneDeep)(e[i]);var a=e[i].children;if(Object(c.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("[askFolderDelete]",t,n),u.b.emit("askFolderDelete",{typeFolder:t,cacheFolderName:n,token:Object(d.b)()})};Object(s.a)("cache","clean_cache",(function(){Object(g.d)((function(t){t.folders.delete("cache","ctag-ressources"),t.ressource.cleanCache(),t.cache.cleanRamCache(),Object(s.d)("Cache cleaned successfully")}))}))},101:function(t,n,e){"use strict";e.d(n,"a",(function(){return v})),e.d(n,"b",(function(){return w}));var o=e(6),i=e(11),c=e(4),a=e(0),r=e.n(a),l=e(12),s=e(35),u=e(134),p=e(164),d=e(165),f=e(10),b=(e(56),e(167)),g=(e(41),e(26),e(99)),h=e(1),m=function(t){var n=Object(i.a)({},t.content),e=n.file,f=n.view,m=n.active,v=n.i,w=Object(a.useState)(""),O=Object(o.a)(w,2),j=O[0],x=O[1],k=Object(a.useState)("editor"),y=Object(o.a)(k,2),_=y[0],C=y[1],E=v;Object(a.useEffect)((function(){if(t.forceView)return C(t.forceView);C(f),Object(p.a)(null===e||void 0===e?void 0:e.path).then((function(t){C(t||"editor")}))}),[f,null===e||void 0===e?void 0:e.path,E,t.forceView]);var S=Object(a.useRef)((null===e||void 0===e?void 0:e.path)||"");Object(a.useEffect)((function(){S.current=(null===e||void 0===e?void 0:e.path)||"",P(!1),e&&Object(l.d)((function(t){t.file.getContent(e.path,(function(t){x(t),P(!0)})),t.watch.file(e.path,(function(t){if(S.current===t.filePath)return!0===B.current?z.current=t.fileContent:void x(t.fileContent)}))}))}),[null===e||void 0===e?void 0:e.path,E]);var T=Object(a.useState)(!1),I=Object(o.a)(T,2),N=I[0],P=I[1],R=Object(s.a)((function(t){Object(u.a)(t,20)}),3e3),A=Object(a.useRef)(!1),F=(Object(s.a)((function(){A.current=!1,console.log("reenable watch file")}),1e4),Object(a.useRef)({})),L=Object(a.useRef)(0);Object(a.useEffect)((function(){}),[null===e||void 0===e?void 0:e.path,j]),Object(a.useEffect)((function(){F.current;Object(l.d)((function(t){t.watch.appStatus((function(t){if(!1===t.isConnected)L.current=L.current+1,console.log("disabling watch update as disconnected"),A.current=!0;else if(!0===t.isConnected){if(L.current>=1&&t.isConnected)return}}))}))}),[null===e||void 0===e?void 0:e.path,j]);var D=Object(a.useRef)(j);Object(a.useEffect)((function(){D.current=j}),[j]);var M=function(t,n){Object(l.d)((function(e){e.file.saveContent(t,n,{history:!0})})),B.current=!0,U(),F.current={content:n,path:null===e||void 0===e?void 0:e.path},R({path:t,content:n,timestamp:Date.now()})},z=Object(a.useRef)(!1),B=Object(a.useRef)(!1),U=Object(s.a)((function(){B.current=!1,Object(c.isBoolean)(z.current)||(z.current=!1)}),2e3);Object(a.useEffect)((function(){e&&m&&Object(l.d)((function(t){t.ui.browser.goTo(e.folder,e.name)}))}),[m]);var H=Object(a.useState)(!1),W=Object(o.a)(H,2),q=W[0],V=W[1];return Object(h.c)(r.a.Fragment,null,e&&Object(h.c)("div",{className:"window-editor-wrapper",onPaste:function(t){null!==e&&void 0!==e&&e.path&&Object(b.b)(t,(function(t){Object(g.b)({fileToUpload:t,folder:e.folder,windowId:E})}))},onDragOver:function(t){t.preventDefault(),t.stopPropagation(),console.log("handle dragover",null===e||void 0===e?void 0:e.path),V(!0)},onDragLeave:function(t){t.preventDefault(),t.stopPropagation(),V(!1),console.log("handle dragleave",null===e||void 0===e?void 0:e.path)},onDrop:function(t){t.preventDefault(),t.stopPropagation(),V(!1),console.log("handle drop",null===e||void 0===e?void 0:e.path),null!==e&&void 0!==e&&e.path&&function(t,n){if(t.preventDefault(),t.dataTransfer&&t.dataTransfer.items){var e=t.dataTransfer.items;if(!e[0])return;for(var o=0;o<e.length;o++)n(e[o].getAsFile())}}(t,(function(t){Object(g.b)({fileToUpload:t,folder:e.folder,windowId:E})}))}},Object(h.c)(d.a,{windowId:E,file:e,fileContent:j,isActive:m,canEdit:N,isDragging:q,showViewToggler:t.showViewToggler,showToolbar:t.showToolbar,titleEditor:t.titleEditor,viewType:_,mobileView:t.mobileView,onLayoutUpdate:t.onLayoutUpdate,onFileEdited:function(t,n){M(t,n)}})))},v=r.a.memo(m,(function(t,n){return!1})),w=function(){return"\n\t.content-different-preview {\n\t\tmax-height: 50vh;\n\t\twidth: 70vw;\n\t\toverflow-y: auto;\n\t\ttext-align: left;\n\t\t.content-different-preview-inner {\n\t\t\tbackground: #e7e7e7;\n\t\t\tpadding: 10px;\n\t\t\tborder-radius: 10px;\n\t\t}\n\t\t.diff-sign {\n\t\t\tfont-weight: bold;\n\t\t}\n\t\t.diff-sign.diff-modified {\n\t\t\tcolor: orange;\n\t\t}\n\t\t.diff-sign.diff-deleted {\n\t\t\tcolor: red;\n\t\t}\n\t\t.diff-sign.diff-added {\n\t\t\tcolor: green;\n\t\t}\n\t}\n\n\t// height 100% everywhere\n\t.window-editor-wrapper-wrapper,\n\t.window-editor-wrapper,\n\t.dual-view-wrapper,\n\t.editor-area,\n\t.preview-area-wrapper,\n\t.preview-area,\n\t.main-editor-wrapper{\n\t\t\theight: 100%;\n\t}\n\n\t.window-editor-wrapper {\n\t\n\t\t\n\n\t\t.content-wrapper {\n\t\t\t\theight:100%;\n\t\t}\n\t\t.note-active-ribbon {\n\t\t\t\theight: 2px;\n\t\t\t\twidth: 100%;\n\t\t}\n\t\t\n\n\t\t.editor-toolbar-dropdown {\n\t\t\tposition: absolute;\n\t\t\ttop: 10px;\n\t\t\tright: 0px;\n\t\t}\n\n\n\n\n\n\t\t\n\n\n\n\t\t// content css modification\n\t\t.dual-view-wrapper {\n\t\t\t\t.file-path-wrapper {\n\t\t\t\t\t\tdisplay:none;\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t//\n\t\t\t\t// ALL\n\t\t\t\t//\n\t\t\t\t&.device-desktop {\n\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\tmargin-top: 33px;\n\t\t\t\t\t\t\t\t//padding: 5px 5px 5px 5px;\n\t\t\t\t\t\t\t\tbackground: ".concat(f.a.colors.bgPreview,";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t//padding: 10px 10px 10px 10px;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// FULL PREVIEW\n\t\t\t\t//\n\t\t\t\t&.device-desktop.view-preview {\n\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// FULL EDITOR\n\t\t\t\t//\n\t\t\t\t&.device-desktop.view-editor {\n\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\ttop: 33px;\n\t\t\t\t}\n\t\t}\n\t}\n")}},102:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return i}));var o=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},i=function(t,n,e){var o=new Date;o.setTime(o.getTime()+60*e*60*1e3);var i="expires="+o.toUTCString();document.cookie=t+"="+n+";"+i+";path=/"}},116: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(4),i=e(18),c=null,a=null,r=!1,l="[LATEX]",s=i.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,c=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(!c)return n;try{window.ka=c,n=c.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"}},117: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),i=e(4),c=e(29),a=e(12),r=e(14),l=e(28),s=e(10),u=e(47),p=e(118),d=e(63),f=Object(p.a)((function(t,n){return g(t,n)})),b=function(t,n){return Object(u.a)({file:t,windowId:n,pattern:c.a.externalLink3,replacement:function(t){var n=document.createElement("span");return n.innerHTML=f(t),n}})},g=function(t,n){var e=[];e=Object(i.isArray)(t)?t:Object(o.a)(t.matchAll(c.a.externalLink3))[0];var s=document.createElement("span"),u=e[0].slice(0,-1),p=Object(d.b)(u),f=function(t,cb){var n=t.dataset.link;Object(a.d)((function(t){t.ressource.fetchUrlArticle(n,(function(n){var e=encodeURIComponent(n.html);t.ui.floatingPanel.create({type:"ctag",ctagConfig:{tagName:"web",content:e}}),cb(n)}))}))},b="";null!==n&&void 0!==n&&n.addLineJump&&(b="\n");var g=l.d,h='<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(u,'">').concat(g("up-right-from-square"),"</span>"),m='<span\nonclick="'.concat(Object(l.c)("fetch-link",(function(t){t&&f(t,(function(){}))})),'"\ntitle="Display url content" class="link-fetcharticle link-action" data-link="').concat(u,'">').concat(g("file-lines"),"</span>"),v='<span\nonclick="'.concat(Object(l.c)("audio-link",(function(t){t&&f(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(u,'">').concat(g("volume-high"),"</span>"),w='<span\n\t\tonclick="'.concat(Object(l.c)("detach-link",(function(t){if(t){var n=t.dataset.link;Object(a.d)((function(t){t.ui.floatingPanel.create({type:"ctag",ctagConfig:{tagName:"web",content:n}})}))}})),'"\n\t\ttitle="Detach link in floating panel" class="link-detach link-action" data-link="').concat(u,'">').concat(g("window-restore"),"</span>"),O='<span class="link-action-more"><span class="icon-more">'.concat(g("ellipsis"),'</span><span class="link-action-wrapper">').concat(m," ").concat(v," ").concat(w," ").concat(h," </span></span>"),j='<span class="'.concat(Object(r.d)()?"mobile-version":"",' link-mdpreview-wrapper"><a href="').concat(u,'" class="link-mdpreview" title="').concat(u,'" target="_blank" rel="noreferrer">').concat(g("link")).concat(p,"</a>").concat(O).concat('<span class="cm-hover-popup cm-hover-popup"></span>',"</span>").concat(b);return s.innerHTML="".concat(j),s.outerHTML},h=function(t){var n=parseFloat(t.get("ui_editor_links_preview_zoom")),e=t.get("beta_floating_windows");return isNaN(n)&&(n=1),isNaN(e)&&(e=!1),"\n.link-fetch-preview-wrapper {\n\t\tbackground: grey;\n}\n// .preview-area-wrapper .link-mdpreview-wrapper,\n// .preview-area .link-mdpreview-wrapper {\n// \tdisplay: inline-block;\n// }\n\n".concat(e?"":".link-detach {display:none;}","\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\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.cm-hover-popup {\n}\n.cm-hover-popup .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// height size iframe here\n.cm-hover-popup .resource-link-ctag .iframe-view-wrapper.not-fullscreen {\n\t\n\theight: 400px!important;\n}\n\n.cm-hover-popup .resource-link-ctag .iframe-view-wrapper iframe {\n\t\twidth: ").concat(100/n,"%!important;\n\t\theight: ").concat(100/n,"!important;\n\t\tmax-height: ").concat(100/n,"%!important;\n\t\ttransform-origin:top left;\n\t\ttransform: scale(").concat(n,");\n\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")}},118: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),i=e(302),c=e(34),a=e(4),r=function(t,n){var e="render-react-wrapper-".concat(Object(c.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(i.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))}))}},119:function(t,n,e){"use strict";e.d(n,"a",(function(){return l}));var o=e(102),i=e(31),c="[FRONT PERF]",a={value:!1};"true"===Object(o.a)("tiroConsoleLogEnabled")||(console.error("=============================================================================="),console.error("!!! console.log is disabled, to enable it again, tiroDevCli.log.toggle_enabe()"),console.error("=============================================================================="),window.console={warn:function(){},error:function(){},info:function(){},log:function(){}}),Object(i.a)("log","toggle_enable",(function(){var t="true"===Object(o.a)("tiroConsoleLogEnabled");Object(o.b)("tiroConsoleLogEnabled",t?"false":"true",720),window.location.reload()})),Object(i.a)("performance","toggle_monitoring",(function(){a.value=!a.value,console.log(c,"toggled to ".concat(a.value))}));var r={},l=function(t){if(!a.value)return function(){};r[t]||(r[t]=[]),r[t][0]=performance.now();return function(){r[t][1]=performance.now();var n=r[t],e=n[1]-n[0];console.warn(c,"".concat(t," = ").concat(e," ms"),n)}}},12:function(t,n,e){"use strict";e.d(n,"e",(function(){return Y})),e.d(n,"d",(function(){return $})),e.d(n,"a",(function(){return Z})),e.d(n,"f",(function(){return X})),e.d(n,"c",(function(){return Q})),e.d(n,"b",(function(){return tt}));var o=e(17),i=e(4),c=e(0),a=e.n(c),r=e(34),l=e(60),s=e(100),u=e(26),p=e(29),d=e(119),f=e(15),b=e(19),g=function(t){Object(c.useEffect)((function(){f.b.on("moveFolderAnswer",(function(n){t.eventBus.notify(n.idReq,n.idReq)}))}),[]);return{file:function(n,e,cb){var o=Q("move-file-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFILE] ".concat(n," -> ").concat(e)),f.b.emit("moveFile",{initPath:n,endPath:e,idReq:o,token:Object(b.b)()})},folder:function(n,e,cb){var o=Q("move-folder-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFOLDER] ".concat(n," -> ").concat(e)),f.b.emit("moveFolder",{initPath:n,endPath:e,idReq:o,token:Object(b.b)()})}}},h=function(t){return t.replace(p.a.linklink,"$2/$1")},m=e(18),v=e(11),w=e(6),O=e(32),j=e(50),x=function(){var t=Object(j.a)(Object(O.a)().mark((function t(n){return Object(O.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){var o={},c=[];Y().then((function(e){e.search.word("#",n,(function(n){var e=[],a={};console.log(n),Object(i.each)(n,(function(t,n){var c={file:t.file,titleName:""};Object(i.each)(t.results,(function(t,n){var r=[],l=t.match(p.a.titleMd);if(l&&l[0]){var s=l[0].split("#").join("").trim();c.titleName=s}var u=t.match(p.a.hashtag3);Object(i.each)(u,(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(i.cloneDeep)(c)),o[t].lines.push(n),o[t].lines=Object(i.uniq)(o[t].lines);var e=c.file.name+"-"+c.titleName;a[e]||(a[e]=[]),a[e].push(o[t].id),r.push(o[t])})),Object(i.each)(r,(function(t,n){Object(i.each)(r,(function(o,i){if(n!==i){var c=t.id,a=o.id,r="".concat(c,"-").concat(a),l="".concat(a,"-").concat(c);-1===e.indexOf(r)&&-1===e.indexOf(l)&&e.push(r)}}))}))}))})),Object(i.each)(o,(function(t){c.push(t)})),t({nodesObj:o,nodesArr:c,edges:e})}))}))})));case 1:case"end":return t.stop()}}),t)})));return function(n){return t.apply(this,arguments)}}(),k=function(t){var n="[SEARCH API] 00563 ",e=Object(c.useState)(""),o=Object(w.a)(e,2),i=o[0],a=o[1];Object(c.useEffect)((function(){f.b.on("getWordSearch",(function(n){t.eventBus.notify(n.idReq,n.result)}))}),[]);var r=function(e,cb){!function(e,cb,o){var i=Q("search-".concat(o,"-"));console.log("".concat(n," searching ").concat(e," with type ").concat(o)),t.statusApi.searching.set(!0),t.eventBus.subscribe(i,(function(n){t.statusApi.searching.set(!1),cb(n)})),f.b.emit("searchFor",{term:e,token:Object(b.b)(),type:o,idReq:i})}(e,cb,"text")};return{files:{search:r},word:function(e,o,cb){var i=Q("search-word-");console.log("".concat(n," searching WORD ").concat(e)),t.eventBus.subscribe(i,(function(t){cb(t)})),f.b.emit("searchWord",{word:e,folder:o,token:Object(b.b)(),idReq:i})},hashtags:function(t,cb){x(t).then((function(t){cb(t)}))},ui:{search:function(t){Y().then((function(n){n.ui.browser.files.set([]),a(t),r(t,(function(t){n.ui.browser.files.set(t)}))}))},term:{set:a,get:i}}}},y=e(99),_=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,C=/([^\s,]+)/g,E=e(79),S=e(303),T=e(56),I="/".concat(m.a.path.configFolder,"/").concat(m.a.path.cacheFolder,"/cache-api"),N="[CACHE API]",P=m.a.client.log.verbose,R=m.a.client.log.verbose,A=function(){return(new Date).getTime()},F=function(t){var n=t-A()<0;return P&&console.log(N,"isExpired? : ",n,(t-A())/6e4,"mins"),n},L=function(t){var n=function(t){return"".concat(I,"/cache-api-storage-").concat(Object(T.b)(t),".md")},e=Object(c.useRef)({}),o=function(t,n,o){var i;e.current[t]={content:n,until:(i=o,A()+60*i*1e3)}},i=9e5,a="__CHUNKED__CACHED__OBJ__SIZE:",r="[CACHE CHUNK]",l=function(t,e,o){var c=JSON.stringify(e),l=function(t,e,cb){R&&console.log(r,n(t),{str:e}),$((function(o){o.file.saveContent(n(t),"".concat(e),{},(function(t){cb(t)}))}))};if(!(c.length>i))return l(t,c,(function(){o&&o()}));var s=(u=i,c.match(new RegExp(".{1,"+u+"}","g")));R&&console.log(r,"SAVE >> TOO LARGE, split in ".concat(s.length," parts"),{cacheId:t,contentArr:s});var u,p=0,d=function(){++p===s.length-1&&o&&o()};l(t,"".concat(a).concat(s.length),d);for(var f=function(n){setTimeout((function(){l("c".concat(n,"_").concat(t),s[n],d)}),1e3*n)},b=0;b<s.length;b++)f(b)},s=function(t,cb,e){var o=function(t,e,o){$((function(i){i.file.getContent(n(t),e,{onError:o})}))},i="___ERROR___CHUNK___LOADING___FAILURE";o(t,(function(n){try{if(n.startsWith(a)){var c=parseInt(n.replaceAll(a,""));R&&console.log(N,"GET >> remerging a ".concat(c," part"),{cacheId:t}),function(n,e,c,a){for(var l=Object(d.a)("".concat(N," getAllChunksAndMerge")),s=[],u=0,p=function(){if(u===e){var n=s.join(""),o=n.includes(i);R&&console.log("GET >> RESULT remerging",{hasFailed:o,cacheId:t,nbChunks:e,resMerge:n}),l(),o?a():c(n)}},f=function(n){o("c".concat(n,"_").concat(t),(function(o){s[n]=o,R&&console.log(r,"c".concat(n,"_").concat(t),{loadingCounter:u,nbChunks:e}),u++,p()}),(function(t){u++,s[n]=i,p()}))},b=0;b<e;b++)f(b)}(0,c,(function(t){cb(t)}),(function(t){e()}))}else cb(n)}catch(l){e(l)}}),(function(t){e(t)}))},u=function(){e.current={}};return{get:function(t,cb,n){if(!0===(null===n||void 0===n?void 0:n.disableRamCache)&&u(),t in e.current){var i=e.current[t],c=F(i.until);c&&(i.content=void 0),P&&console.log(N,"FROM RAM",t," expired:",c),cb(i.content)}else s(t,(function(n){try{var i=JSON.parse(n);e.current[t]=Object(v.a)({},i);var c=e.current[t],a=F(c.until);a&&(c.content=void 0),P&&console.log(N,"FROM FILE",t," expired:",a),cb(c.content)}catch(r){P&&console.log(N,"error getting cache",r,t),o(t,void 0,60),cb(e.current[t].content)}}),(function(n){return"NO_FILE"===n?(P&&console.log(N,"FROM FILE: NO_FILE",t),o(t,void 0,60),cb(e.current[t].content)):cb(void 0)}))},set:function(t,n,i,cb){i||(i=60),-1===i&&(i=1e32),o(t,n,i);var c=e.current[t];P&&console.log(N,"SETTING",t," with cachedTime in min",i),l(t,c,(function(t){cb&&cb(t)}))},cleanRamCache:u}},D=e(137),M=e(92),z=e(31),B="[PLUGINS]",U="[NOTIFICATIONS]",H={obj:null},W={play:function(t){$((function(n){n.ressource.fetch(t,(function(t,n){H.obj=new Audio(n),H.obj.play()}),{returnsPathOnly:!0})}))},stop:function(){H.obj&&(H.obj.pause(),H.obj.currentTime=0)}},q=e(55),V=e(89),K="[FLOATING PANELS]",J=function(t){var n=Object(q.a)("floatingPanelsConfig",[]),e=Object(w.a)(n,3),r=e[0],l=e[1],s=e[2],u=a.a.useRef([]);Object(c.useEffect)((function(){u.current.length>0||(u.current=r)}),[r]);var p=function(t){u.current=t,l(t)};Object(c.useEffect)((function(){s()}),[]);var d=function(t){var n=u.current.map((function(n){return n.id===t.id?t:n}));p(n)},f=function(t){var n=Math.max.apply(Math,Object(o.a)(u.current.map((function(t){return t.zIndex||0})))),e=u.current.findIndex((function(n){return n.id===t}));-1!==e&&(Object(i.cloneDeep)(u.current)[e].zIndex=n+1,d(Object(v.a)(Object(v.a)({},u.current[e]),{},{zIndex:n+1})))},b=function(t){p(t)},g=function(t,n){var e=Object(i.cloneDeep)(u.current.find((function(n){return n.id===t})));if(e){if("last"===n){var c=Math.max.apply(Math,Object(o.a)(u.current.map((function(t){return t.orderPosition||0}))));n=c+1}if("first"===n){var a=Math.min.apply(Math,Object(o.a)(u.current.map((function(t){return t.orderPosition||0}))));n=a-1}e.orderPosition=n,d(e)}},h={create:function(t){if("full-center"===t.layout){t.position={x:20,y:20},t.size={width:window.innerWidth-40,height:window.innerHeight-40}}var n=u.current.filter((function(t){return!t.status.includes("hidden")})),e=Object(v.a)({position:{x:100+20*n.length,y:100+20*n.length},size:{width:300,height:300},status:"visible",file:Object(V.a)(),view:"editor",id:Math.random().toString(36).substring(7),zIndex:1e3,orderPosition:n.length},t);p([e].concat(Object(o.a)(u.current))),g(e.id,"first"),f(e.id)},update:d,updateAll:b,delete:function(t){console.log("".concat(K," deletePanel"),t);var n=u.current.filter((function(n){return n.id!==t}));p(n)},movePanel:function(t,n){d(Object(v.a)(Object(v.a)({},u.current.find((function(n){return n.id===t}))),{},{position:n}))},resizePanel:function(t,n){d(Object(v.a)(Object(v.a)({},u.current.find((function(n){return n.id===t}))),{},{size:n}))},actionAll:function(t){if("organizeWindows"===t)return function(){console.log("".concat(K," reorganizeAll"));var t=Object(i.cloneDeep)(u.current),n=0;t.forEach((function(t){"visible"===t.status&&(t.zIndex=1e3+n,t.position={x:100+20*n,y:100+20*n},t.size={width:320,height:200},n++)})),b(t)}();var n=Object(i.cloneDeep)(u.current);n.forEach((function(n){n.status="hide"===t?"visible":"minimized"})),b(n)},panels:r,refreshFromBackend:s,pushWindowOnTop:f,movePositioninArray:function(t,n){var e=Object(i.cloneDeep)(u.current),o=e.findIndex((function(n){return n.id===t}));if(-1!==o){var c=e.splice(o,1)[0];"up"===n?e.splice(o-1,0,c):"down"===n?e.splice(o+1,0,c):"first"===n?e.splice(0,0,c):"last"===n&&e.push(c),b(e)}},updateOrderPosition:g};return h},G=null,Y=function(){return new Promise((function(t,n){if(G)return t(G);var e=setInterval((function(){if(G)return clearInterval(e),t(G)}),200)}))},$=function(cb){Y().then((function(t){cb(t)}))},Z=a.a.createContext(null),X=function(t){var n=Object(c.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(i.each)(n.current,(function(n,c){c===t&&Object(i.each)(n,(function(n){try{n.cb(o)}catch(i){console.warn("[CLIENT API] error with function",i)}n.options.persistent||e(t)}))}))}};Object(c.useEffect)((function(){m.a.client.log.verbose&&console.log("[CLIENT API ]INIT ")}),[]);var a=function(t){Object(c.useEffect)((function(){f.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),f.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),f.b.on("disconnect",(function(){t.eventBus.notify(n,{isConnected:!1})}))}),[]);var n="watch-api-unique-id-request";return Object(c.useEffect)((function(){f.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=k({eventBus:o,statusApi:t.statusApi}),p=function(t){var n="[FILE API] 005363 ";Object(c.useEffect)((function(){f.b.on("onServerTaskFinished",(function(n){t.eventBus.notify(n.idReq,{data:n})})),f.b.on("getFileContent",(function(n){n.error?t.eventBus.notify(n.idReq,{error:n.error}):t.eventBus.notify(n.idReq,{content:n.fileContent})}))}),[]);var e=Object(c.useRef)("");return{getContent:function(n,cb,e){var o=Object(d.a)("getFileContent "+n),i=h(n),c=Q("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),o()})),f.b.emit("askForFileContent",{filePath:i,token:Object(b.b)(),idReq:c})},saveContent:function(n,o,i,cb){var c=!(!i||!i.history)&&i.history,a=(!i||!i.withMetas||i.withMetas,Q("save-file-content"));cb&&t.eventBus.subscribe(a,(function(t){cb&&cb(t)}));var r=h(n);f.b.emit("saveFileContent",{filePath:r,newFileContent:o,token:Object(b.b)(),idReq:a,withCb:!!cb}),c&&(n!==e.current&&Y().then((function(t){var e=t.ui.browser.folders.current.get();if(e===Object(u.c)(n)){var o,i="",c=t.ui.windows.active.get();c&&(i=(null===(o=c.content.file)||void 0===o?void 0:o.name)||""),t.ui.browser.goTo(e,i)}})),t.historyApi.intervalSave(n,o),e.current=n)},delete:function(e,cb){var o=Q("delete-file");console.log("".concat(n," delete file ").concat(e.path)),t.eventBus.subscribe(o,cb),f.b.emit("onFileDelete",{filepath:e.path,idReq:o,token:Object(b.b)()})},move:g({eventBus:t.eventBus}).file,create:function(e,cb){var o=Q("create-file");console.log("".concat(n," create file in ").concat(e)),t.eventBus.subscribe(o,cb),f.b.emit("createNote",{folderPath:e,idReq:o,token:Object(b.b)()})}}}({eventBus:o,historyApi:t.historyApi}),O=function(t){return Object(c.useEffect)((function(){f.b.on("getFiles",(function(n){t.eventBus.notify(n.idReq,n.files)})),f.b.on("getFilesPreview",(function(n){t.eventBus.notify(n.idReq,n.filesPreview)}))}),[]),{get:function(n,cb){m.a.client.log.socket&&console.log("[CLIENT API] get files ".concat(n));var e=Q("get-files-");t.statusApi.searching.set(!0),t.eventBus.subscribe(e,(function(e){t.statusApi.searching.set(!1),cb(e,n)})),f.b.emit("askForFiles",{folderPath:n,token:Object(b.b)(),idReq:e})},getPreviews:function(n,cb){var e=Q("get-files-");t.eventBus.subscribe(e,cb),f.b.emit("askFilesPreview",{filesPath:n,idReq:e,token:Object(b.b)()})},search:t.searchApi.files.search}}({eventBus:o,searchApi:r,statusApi:t.statusApi}),j=function(t){var n=Object(v.a)({},t).eventBus;return Object(c.useEffect)((function(){f.b.on("getUploadedFile",(function(t){n.notify(t.idReq,t)}))}),[]),{uploadFile:function(t,cb){try{var e=Q("upload-file");n.subscribe(e,(function(n){delete n.idReq,t.onSuccess&&t.onSuccess(n),cb&&cb({message:"success",succesObj:n})})),Object(y.a)({file:t.file,path:t.folderPath,idReq:e,onProgress:function(n){t.onProgress&&t.onProgress(n)}})}catch(o){console.warn(o)}}}}({eventBus:o}),x=Object(S.a)({eventBus:o}),_=function(t){return Object(c.useEffect)((function(){f.b.on("getFoldersScan",(function(n){t.eventBus.notify(n.idReq,{folders:n.folders,pathBase:n.pathBase})})),f.b.on("onServerTaskFinished",(function(n){t.eventBus.notify(n.idReq,n.status)}))}),[]),{get:function(n,cb){m.a.client.log.socket&&console.log("[FOLDERS API] get folders ");var e=Q("get-folders-");t.eventBus.subscribe(e,(function(t){var e=Object(v.a)({},t);e.folderPaths=n,cb(e)})),f.b.emit("askFoldersScan",{foldersPaths:n,token:Object(b.b)(),idReq:e})},move:g({eventBus:t.eventBus}).folder,create:function(n,cb){console.log("[askFolderCreate]",n);var e=Q("create-folder-");n=Object(u.b)(n),cb&&t.eventBus.subscribe(e,(function(t){cb(t)})),f.b.emit("askFolderCreate",{newFolderPath:n,token:Object(b.b)(),idReq:e})},delete:s.a}}({eventBus:o}),C=function(t){return Object(c.useEffect)((function(){f.b.on("getCommandExec",(function(n){t.eventBus.notify(n.idReq,n.resultCommand)})),f.b.on("getCommandExecStream",(function(n){t.eventBus.notify(n.idReq,n.streamChunk)}))}),[]),{exec:function(n,cb){var e=Q("command-exec-");t.eventBus.subscribe(e,(function(t){Object(i.isString)(t)||(t=JSON.stringify(t)),cb(t)}),{persistent:!0}),f.b.emit("askCommandExec",{commandString:n,token:Object(b.b)(),idReq:e})},stream:function(n,cb){var e=Q("command-stream-");t.eventBus.subscribe(e,(function(n){cb(n),n.isLast&&t.eventBus.unsubscribe(e)}),{persistent:!0}),f.b.emit("askCommandExecStream",{commandString:n,token:Object(b.b)(),idReq:e})}}}({eventBus:o}),T=function(t){Object(c.useEffect)((function(){f.b.on("getBackendConfig",(function(n){t.eventBus.notify(n.idReq,n.config)}))}),[]);var n={get:function(cb){var n=Q("get-config-");t.eventBus.subscribe(n,(function(t){cb(t)})),f.b.emit("askBackendConfig",{token:Object(b.b)(),idReq:n})},getPlatform:function t(){return t()}};return n}({eventBus:o}),I=function(t){Object(c.useEffect)((function(){f.b.on("getPluginsList",(function(n){t.eventBus.notify(n.idReq,n)}))}),[]);var n=function(cb,n){n||(n={}),n.noCache||(n.noCache=!1),m.a.client.log.socket&&console.log("".concat(B," get plugins"));var e=Q("get-plugins-");t.eventBus.subscribe(e,(function(t){t.scanLog.length>0&&$((function(n){return n.ui.notification.emit({content:"PLUGIN SCAN LOG:<br/>".concat(JSON.stringify(t.scanLog)),options:{hideAfter:60}})}));var n=Object(i.sortBy)(t.plugins,(function(t){return t.name}));cb(n,t.scanLog)})),f.b.emit("askPluginsList",{noCache:n.noCache,token:Object(b.b)(),idReq:e})},e={list:n,get:function(t,e,cb){n((function(n,o){var i=n.filter((function(n){return n.name===t&&n.type===e}))[0]||null;cb(i)}),{noCache:!0})},cronCache:{set:function(t,n){var e="plugins-cron-infos";$((function(o){o.cache.get(e,(function(i){i||(i={}),i[t]||(i[t]={vars:{}}),i[t].vars=n,o.cache.set(e,i,-1)}))}))}},marketplace:{fetchList:function(cb){$((function(t){var n=t.userSettings.get("plugins_marketplace_url"),e="".concat(B," api.plugins.marketplace.fetchList error for url: ").concat(n," :");t.ressource.fetch(n,(function(t){try{var o=JSON.parse(t),c=[];Object(i.isArray)(o)?(Object(i.each)(o,(function(t){var n={name:"",description:"",versions:[],configuration:[]};t.name&&(n.name=t.name),t.description&&(n.description=t.description),t.versions&&(n.versions=t.versions),t.images&&(n.images=t.images),t.icon&&(n.icon=t.icon),t.configuration&&(n.configuration=t.configuration),""!==n.name&&c.push(n)})),cb(c)):Object(z.d)("".concat(e,": did not find a plugin list"))}catch(a){Object(z.d)("".concat(e," ").concat(JSON.stringify(a),", url: ").concat(n))}}),{disableCache:!0})}))}}};return e}({eventBus:o}),N=L(),P={emit:function(t){var n,e=function(){console.log(U,"emitNotification",t),f.b.emit("emitNotification",{notification:t,token:Object(b.b)()})};null!==(n=t.options)&&void 0!==n&&n.showOnceEvery&&t.id?$((function(n){var o="notif-showevery-".concat(t.id);n.cache.get(o,(function(i){var c;if(i&&!0===i.alreadyShown)return console.log(U,"showOnceEvery => already shown notif, dont reshow it",t);e(),n.cache.set(o,{alreadyShown:!0},null===(c=t.options)||void 0===c?void 0:c.showOnceEvery)}))})):e()}},R={get:function(cb){var t=setInterval((function(){f.b&&(cb(f.b),clearInterval(t))}),10)}},A=Object(l.b)({eventBus:o}).userSettingsApi,F=Object(s.c)({searchUiApi:r.ui,statusApi:t.statusApi,filesApi:O,foldersApi:_,windowApi:t.windowsApi,tabsApi:t.tabsApi,userSettingsApi:A}),H=function(t){var n=Object(c.useState)(null),e=Object(w.a)(n,2),o=e[0],i=e[1],a=function(t){t.windowId||(t.windowId="active"),t.insertPos||(t.insertPos="currentPos"),i(t)};return Object(v.a)(Object(v.a)({},E.b),{},{ui:{lineJump:{jump:function(t,n){a({type:"lineJump",windowId:t,lineJumpNb:n})}},editorAction:{dispatch:a,get:o}}})}(),q=Object(D.b)({}),V=function(t){return Object(c.useEffect)((function(){f.b.on("getPerformanceReport",(function(n){t.eventBus.notify(n.idReq,n)}))}),[]),{getReport:function(cb){var n=Q("get-perf-report");t.eventBus.subscribe(n,(function(t){cb?cb(t):(console.log("[PERF API]","report"),console.log(t.report))})),f.b.emit("askPerformanceReport",{token:Object(b.b)(),idReq:n})}}}({eventBus:o}),K=function(t){var n="[ACTIVITY API]";return Object(c.useEffect)((function(){f.b.on("getActivityReport",(function(n){t.eventBus.notify(n.idReq,n)}))}),[]),{getReport:function(e,cb){console.log(n,"asked for report (if no cb provided, will be outputed to console.log)",e);var o=Q("get-perf-report");t.eventBus.subscribe(o,(function(t){cb?cb(t):(console.log(n,"report"),console.log(t.report))})),f.b.emit("askActivityReport",{params:e,token:Object(b.b)(),idReq:o})}}}({eventBus:o}),Z=J(),X={cache:N,file:p,audio:W,encryption:M.b,files:O,socket:R,popup:t.popupApi,upload:j,ressource:x,tabs:t.tabsApi,folders:_,config:T,userSettings:A,history:t.historyApi,status:t.statusApi,note:H,analytics:q,search:r,command:C,plugins:I,watch:a,performance:V,activity:K,ui:{browser:F,floatingPanel:Z,notification:P,windows:t.windowsApi,lightbox:t.lightboxApi,textToSpeechPopup:t.ttsApi,search:r.ui,note:H.ui,notePreviewPopup:t.notePreviewPopupApi}};return G=X,X},Q=function(t){return"client-api-".concat(t,"-req-").concat(Object(r.a)())},tt=function(t,cb){Y().then((function(n){var e=t.apiName.split("."),c=n;if(Object(i.each)(e,(function(t){c=c[t]?c[t]:null})),null===c)return cb("nok",{error:'"'.concat(t.apiName,'" does not exists in current api \n\nAvailable Api properties :\n\n').concat(et("",n))});try{var a=nt(c);if(!Object(i.isNumber)(a)){var r=c.apply(void 0,Object(o.a)(t.apiArguments));return cb("ok",r)}var l=Object(i.cloneDeep)(t.apiArguments);l.splice(a,0,(function(t){cb("ok",t)})),c.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)})}}))},nt=function(t){var n=function(t){var n=t.toString().replace(_,""),e=null;return null===(e=n.startsWith("cb =>")?["cb"]:n.slice(n.indexOf("(")+1,n.indexOf(")")).match(C))&&(e=[]),e}(t),e=n.indexOf("cb");return-1===e?null:e},et=function t(n,e){var o="";for(var c in e)if("object"===typeof e[c]&&e[c].constructor!==Array){if(c.length>1&&"get"!==c){var a=""!==n?"".concat(n,"."):"";o+=t("".concat(a).concat(c),e[c])}}else o="".concat(o).concat(n,".").concat(c,"\n");var r=o.split("\n"),l=[];return Y().then((function(t){Object(i.each)(r,(function(n){var e=n.split("."),o=t;Object(i.each)(e,(function(t,n){o[t]&&(o=o[t])}));var c="var",a="";Object(i.isFunction)(o)&&(c="Function",a=o.toString()),l.push({name:n,type:c,description:a})}))})),o}},120:function(t,n,e){"use strict";e.d(n,"c",(function(){return Q})),e.d(n,"a",(function(){return tt})),e.d(n,"b",(function(){return nt}));var o=e(23),i=e(17),c=e(6),a=e(0),r=e.n(a),l=e(14),s=e(176),u=e(51),p=e(59),d="[TEXT MANIP ACTION]",f=function(t){var n=Object(a.useRef)(0),e=t.editorRef,o=t.editorRef,i=t.editorRef,c=function(){var c;if("codemirror"===t.editorType){var a=u.a.getCurrentLineInfos(e.current);if(!a)return null;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?Object(p.c)(i.current):null,n.current=c&&c.currentPosition?c.currentPosition:0}return c},r=function(c){var a=n.current+c;if("codemirror"===t.editorType)u.a.updateCursor(e.current,a,!0);else if(Object(l.b)("desktop")){var r;null===(r=o.current)||void 0===r||r.editor.setPosition(a)}else{var s=i.current;if(!s)return;s.focus(),setTimeout((function(){s&&(s.selectionStart=a,s.selectionEnd=a)}))}};return{getLineTextInfos:c,resetCursorPosition:r,applyTextModifAction:function(t,n){var e=c();return e?(console.log(d,"applying =>",t,n),Object(p.f)(t,e,(function(t){console.log(d,"applying a decal of cursor of :",t),r(t)}),n)):null}}},b=e(4),g=function(t,n){var e=f({editorType:"monaco-textarea",deviceType:"mobile",editorRef:n.mobileTextarea}),o=e.getLineTextInfos,i=e.resetCursorPosition,r=function(t){var n=Object(a.useState)(0),e=Object(c.a)(n,2),o=e[0],i=e[1];return{saveYTextarea:function(n){var e=t.current?t.current.scrollTop:0;i(n||e)},resetYTextarea:function(){t.current&&(console.log("resetYTextarea",o),t.current.scrollTop=o)}}}(n.mobileTextarea),l=r.saveYTextarea,s=r.resetYTextarea,u=Object(a.useState)(!1),d=Object(c.a)(u,2),g=d[0],h=d[1];Object(b.debounce)((function(){h(!1)}),500);return{onTextareaChange:function(e){console.log("onTextareaChange");var c=e.target.value,a=c[e.target.selectionStart-1]&&c[e.target.selectionStart-1].charCodeAt(0);if(c.length>t.length){var r=o();if(!r)return;c=Object(p.g)(r,a,(function(t){setTimeout((function(){i(t),s()}))}))}n.onMobileNoteEdition(c)},onTextareaScroll:function(t){if(!g){var n=t.target.scrollTop;l(n),console.log("onTextareaScroll")}}}},h="",m=e(156),v=e(92),w=e(1),O=e(15),j=e(57),x=e(10),k=e(22),y=e(124),_=e(157),C=e(12),E=e(19),S=e(89),T=e(134),I=e(25),N=e(46),P=function(t){var n=Object(a.useState)([]),e=Object(c.a)(n,2),o=e[0],r=e[1],l=Object(a.useState)(!1),s=Object(c.a)(l,2),u=s[0],p=s[1],d=function(){var n=f();r([].concat(n)),p(!0),O.b.emit("askFileHistory",{filepath:t.file.path,token:Object(E.b)()});var e=O.b.on("getFileHistory",(function(t){var o=[];Object(b.each)(t.files,(function(t){var n,e=null===(n=t.filenameWithoutExt)||void 0===n?void 0:n.split("___")[1];e&&(t.created=Object(_.a)(e).num.timestamp),t.created&&t.created<Date.now()&&o.push(t)}));var c=Object(b.orderBy)(o,["created"],["desc"]);r([].concat(n,Object(i.a)(c))),p(!1),O.b.off(e)}))},f=function(){var n=[],e=Object(T.b)(t.file.path);return Object(b.each)(e,(function(t,e){var o=e+1,i=Object(S.a)();i.created=t.timestamp,i.path=t.path+o;var c="Temporary local save ".concat(o," from ").concat(Object(j.a)(new Date(i.created||0)));i.name=c,i.realname=c,i.localContent=t.content,i.isLocal=!0,n.push(i)})),console.log("getLSHistoryList",e,t.file.path),n};Object(a.useEffect)((function(){d()}),[]);var g=Object(a.useContext)(C.a),h=Object(a.useState)(""),m=Object(c.a)(h,2),v=m[0],x=m[1],y=Object(a.useState)(null),P=Object(c.a)(y,2),A=P[0],F=P[1];return Object(w.c)(R,null,Object(w.c)("div",{className:"history-popup-wrapper"},Object(w.c)(N.a,{title:"".concat(k.a.historyPopup.title,'"').concat(t.file.realname,'"'),onClose:function(){t.onClose()}},Object(w.c)("div",{className:"count"},o.length," backups found :"),u&&Object(w.c)("div",{className:"count"}," (Loading backend history files...)"),Object(w.c)("div",{className:"table-wrapper"},Object(w.c)("table",null,Object(w.c)("thead",null,Object(w.c)("tr",null,Object(w.c)("th",null,k.a.historyPopup.thead.name),Object(w.c)("th",null,k.a.historyPopup.thead.date))),Object(w.c)("tbody",null,o.map((function(t){return Object(w.c)("tr",{className:"".concat((null===A||void 0===A?void 0:A.path)===t.path?"active":""),onClick:function(){!function(t){t.isLocal&&t.localContent?(x(t.localContent),F(t)):g&&g.file.getContent(t.path,(function(n){x(n),F(t)}))}(t)}},Object(w.c)("td",null," ",t.realname," "),Object(w.c)("td",null," ",Object(j.a)(new Date(t.created||0))," "),Object(w.c)("td",null," ",!t.isLocal&&Object(w.c)("div",{className:"trash",onClick:function(){!function(t){Object(C.d)((function(n){n.file.delete(t,(function(t){d(),F(null),x("")}))}))}(t)}}," ",Object(w.c)(I.a,{name:"faTrash",color:"grey"})," ")))}))))),v&&Object(w.c)("div",{className:"note-preview"},Object(w.c)("textarea",{className:"note-preview-textarea",value:v})),Object(w.c)("div",{className:"advice"},' To disable history backup for a note, add "--disable-history--"in it'))))},R=Object(y.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",x.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;}"),A=e(38),F=e(158),L=e(159),D=e(136),M=e(160),z=e(175),B=e(167),U=e(122),H=e(69),W=function(t,n){var e=".window-id-".concat(t," .preview-area-wrapper"),o=document.querySelector(e),i="print-wrapper";if(o){!function(){var t=document.querySelectorAll(".".concat(i));Object(b.each)(t,(function(t){t.classList.remove(i)}))}();var c=Object(j.a)(new Date(n.modified||0)),a=Object(j.a)(new Date(n.modified||0)),r="\n<head>\n\t<title>".concat(n.name,' </title>\n\t\n</head>\n<html>\n\t<body>\n\t\t\n\t\t<div class="simple-css-print-wrapper">\n\t\t\t<div class="hide-print">\n\t\t\t\t<bm> Export options </bm>\n\t\t\t\t<button onclick="window.print()">print</button>\n\t\t\t\t<button onclick="window.print()">export to pdf</button>\n\t\t\t\t<button onclick="window.alert(\'CTRL+ S then select *complete webpage* if available\')">export to html</button>\n\t\t\t</div>\n\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(c,"<br>\n\t\t\t\t\tEdited : ").concat(a,"<br>\n\t\t\t\t</div>\n\t\t\t\t").concat(o.innerHTML,"\n\t\t\t</div>\n\t\t\t<style>").concat(Object(H.c)({w:".simple-css-print-wrapper",pl:".preview-link",r:".resource-link-icon"}),"</style>\n\t\t\t<style>").concat(q(),'</style>\n\n<script>\n\tconsole.log("hello world")\n<\/script>\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)}},q=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\t.file-path-wrapper {\n\t\tdisplay: none;\n\t}\n\th1.title.big-title {\n\t\tdisplay: none;\n\t}\n\t.file-infos-wrapper {\n\t\tdisplay: none;\n\t\tbackground: #eeeeee;\n\t\tpadding: 10px;\n\t\tmargin: 10px;\n\t}\n\n\t.simple-css-print-wrapper {\n\t\tmargin: 20px;\n\t\twidth: 90%;\n\t}\n\t.simple-css-wrapper {\n\t\tfont-size: 12px;\n\t}\n\n\ttable {\n\t\tfont-size: 12px!important;\n\t}\n\timg {\n\t\t// max-width: 300px!important;\n\t\t// max-height: 500px!important;\n\t\tmax-width: 100%;\n\t\tmax-height: 500px;\n\t}\n\t.block-tag {\n\t\t\tdisplay: none;\n\t}\n"},V=e(171),K=e(26),J=e(18),G=e(172),Y=e(28),$=function(t){if(t){var n=t.dataset.format,e=t.dataset.path;if(n&&e){var o=Object(K.d)(e);Object(C.d)((function(t){Object(C.d)((function(t){t.ui.notification.emit({content:"[EXPORT] converting...",id:"export",options:{hideAfter:-1}})})),t.config.get((function(e){var i="/".concat(J.a.path.configFolder,"/").concat(J.a.path.cacheFolder,"/pandoc");t.folders.create(i,(function(c){var a="";"dzslides"===n&&(a="--self-contained"),"slideous"===n&&(a="--self-contained"),"revealjs"===n&&(a="--self-contained"),"beamer"===n&&(a="--self-contained");var r=n;"dzslides"===n&&(r="html"),"slideous"===n&&(r="html"),"revealjs"===n&&(r="html"),"latex"===n&&(r="tex"),"gfm"===n&&(r="md"),"latex-pdf"===n&&(r="pdf"),"beamer"===n&&(r="pdf");var l="".concat(o.name),s="".concat(l,".").concat(r),u="".concat(e.dataFolder,"/"),p=Object(K.b)("".concat(u,"/").concat(o.folder)),d=Object(K.b)("./".concat(o.name)),f=Object(K.b)("".concat(u,"/").concat(i)),g=Object(K.b)("".concat(f,"/").concat(s)),h=Object(K.b)("/".concat(J.a.path.configFolder,"/").concat(J.a.path.cacheFolder,"/pandoc/").concat(s)),m='cd "'.concat(p,'" && pandoc --output="').concat(g,'" --verbose ').concat(function(t,n){var e=t.userSettings.get("export_pandoc_cli_options").split("\n")||[],o={};return Object(b.each)(e,(function(t){var n=t.split("|");2===n.length&&(o[n[0].trim()]=n[1].trim())})),console.log(o,e),o[n]||""}(t,n)," ").concat(a," --from=markdown --to=").concat(n,' "').concat(d,'" '),v=m;"latex-pdf"===n&&(v='cd "'.concat(p,'" && pdflatex -halt-on-error -output-directory="').concat(f,'" -jobname="').concat(l,'" "').concat(d,'" '));var w=function(n){var e=""===n.stderr?n.stdout:n.stderr;console.error("[CONVERT ERROR]:",n),t.ui.notification.emit({content:'[EXPORT] Error <br/> "'.concat(e," <br/><br/> ").concat(n.shortMessage,'"'),id:"export",options:{hideAfter:-1}})};t.command.exec("pkill -9 pandoc",(function(n){t.command.exec(v,(function(t){var n={failed:!1,stderr:null,shortMessage:null};try{n=JSON.parse(t)||{failed:!1}}catch(o){w(n)}if(n.failed)w(n);else{var e=Object(G.a)(h);!function(t,n){var e=document.createElement("a");e.setAttribute("download",t),e.setAttribute("href",n),e.setAttribute("target","_blank"),Object(C.d)((function(t){t.ui.notification.emit({content:"[EXPORT] done",id:"export",options:{hideAfter:3}})})),e.click()}(s,e)}}))}))}))}))}))}}},Z=e(125),X=function(t){var n,e=Object(a.useState)(""),o=Object(c.a)(e,2),d=o[0],x=o[1],y=Object(a.useRef)(null),_=!0;!1===t.canEdit&&(_=!1),!1===t.isConnected&&(_=!1);var E=!0;!1===t.showViewToggler&&(E=!1);var S=!0;!1===t.showToolbar&&(S=!1);var T=!Object(b.isBoolean)(t.titleEditor)&&!Object(b.isString)(t.titleEditor)||t.titleEditor,I=Object(a.useRef)(t.file);Object(a.useEffect)((function(){I.current=t.file}),[t.file.path]);var N=function(t){var n=Object(a.useState)(!1),e=Object(c.a)(n,2),o=e[0],i=e[1],r=Object(a.useRef)(!1);Object(a.useEffect)((function(){r.current=t.canEdit}),[t.canEdit]),Object(a.useEffect)((function(){return i(!1),t.onEditorDidMount&&t.onEditorDidMount(),function(){t.onEditorWillUnmount&&(l(),t.onEditorWillUnmount())}}),[t.file.path]),Object(a.useEffect)((function(){l()}),[t.file.path]),Object(a.useEffect)((function(){t.onNoteContentDidLoad&&t.onNoteContentDidLoad()}),[t.fileContent,t.file.path]);var l=function(){""!==h&&t.onNoteLeaving&&t.onNoteLeaving(o,h),h=t.file.path};return{triggerNoteEdition:function(n){o?t.onNoteEdition&&t.onNoteEdition(n,!1):t.onNoteEdition&&t.onNoteEdition(n,!0),i(!0)}}}({file:t.file,fileContent:t.fileContent,canEdit:_,onEditorDidMount:function(){},onEditorWillUnmount:function(){},onNoteContentDidLoad:function(){O.a&&x(t.fileContent)},onNoteEdition:function(n,e){var o=I.current;x(n),e&&Object(C.d)((function(n){n.history.save(o.path,t.fileContent,"enter")})),t.onFileEdited(o.path,n)},onNoteLeaving:function(t,n){}}),R=N.triggerNoteEdition,H=Object(a.useRef)(null),q=g(d,{mobileTextarea:H,onMobileNoteEdition:R}),J=(q.onTextareaChange,q.onTextareaScroll,Object(a.useRef)(null)),G="desktop"!==Object(l.a)()?H:y;"codemirror"===t.editorType&&(G=J);var X=f({editorType:t.editorType,deviceType:Object(l.a)(),editorRef:G}).applyTextModifAction,Q=function(t){var n=Object(a.useState)(null),e=Object(c.a)(n,2),o=e[0],i=e[1],r=Object(a.useState)(!1),l=Object(c.a)(r,2),s=l[0],u=l[1],p=Object(a.useState)(!1),d=Object(c.a)(p,2),f=d[0],b=d[1],g=Object(a.useState)(null),h=Object(c.a)(g,2),O=h[0],j=h[1],x=function(n){var e=t.fileContent,o=Object(v.c)(e,n);if("failure"===o.status)j(null);else{console.log("encryption done",o),u(!1);var i=o.cipher;t.onTextEncrypted(i)}},k=function(n){var e=t.fileContent,o=Object(v.a)(e,n);if("failure"===o.status)j(null),alert("wrong password");else{b(!0),u(!0),console.log("decryption done",o);var i=o.plaintext;t.onTextDecrypted(i)}};return{APasswordPopup:Object(w.c)(m.a,{onClose:function(){i(null)},onSubmit:function(t){var n=o;i(null),j(t),"toEncrypt"===n&&x(t),"toDecrypt"===n&&k(t)}}),askForPassword:o,decryptButtonConfig:{title:"decrypt text",icon:"faUnlock",action:function(){O?k(O):i("toDecrypt")}},encryptButtonConfig:{title:"encrypt text",icon:"faLock",action:function(){O?x(O):i("toEncrypt")}},ifEncryptOnLeave:function(cb){if(s&&O){console.log("[EVENTS EDITOR] shouldEncryptOnLeave");var n=Object(v.c)(t.fileContent,O);n.cipher&&cb(n.cipher)}j(null),b(!1)},noHistoryBackupWhenDecrypted:f}}({fileContent:d,onTextEncrypted:function(n){R(n),yt(),Object(C.d)((function(e){e.history.save(t.file.path,n,"int")}))},onTextDecrypted:function(t){R(t),yt()}}),tt=Q.APasswordPopup,nt=Q.askForPassword,et=Q.decryptButtonConfig,ot=Q.encryptButtonConfig,it=(Q.ifEncryptOnLeave,Q.noHistoryBackupWhenDecrypted,Object(a.useContext)(z.a)),ct=Object(a.useState)(-1),at=Object(c.a)(ct,2),rt=at[0],lt=at[1],st=function(n,e){return{title:"",class:"upload-button-wrapper",action:function(){},customHtml:Object(w.c)(D.a,{file:t.file,windowId:t.windowId,type:n,label:e})}},ut=[].concat(Object(i.a)(function(){var t=[st("all","Upload files")];return"desktop"!==Object(l.a)()&&(t.push(st("image","Upload Gallery")),t.push(st("camera","Capture")),t.push(st("microphone","Record"))),t}()),[Object(v.d)(d)?et:ot,{title:"Export",icon:"faFileDownload",action:function(){var n;n=t.file,Object(C.d)((function(t){t.popup.show('\n <div id="export-popup-wrapper">\n <div class="buttons-list"> \n <button onclick="'.concat(Object(Y.c)("export-note-to",$),'" data-format="docx" data-path="').concat(n.path,'">docx</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="odt " data-path="').concat(n.path,'">odt</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="pdf" data-path="').concat(n.path,'">pdf</button>\n \n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="gfm" data-path="').concat(n.path,'">markdown</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="epub" data-path="').concat(n.path,'">epub</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="rtf" data-path="').concat(n.path,'">rtf</button>\n </div>\n <br/>\n <div class="buttons-list"> \n Latex:\n <br/>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="latex" data-path="').concat(n.path,'">latex (.tex)</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="latex-pdf" data-path="').concat(n.path,'">latex (.pdf)</button>\n \n </div>\n <br/>\n <div class="buttons-list"> \n Slides: \n <br/>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="pptx" data-path="').concat(n.path,'">pptx</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="beamer" data-path="').concat(n.path,'">beamer</button>\n <br/>\n <br/>\n HTML Slides: <br/>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="revealjs" data-path="').concat(n.path,'">revealjs</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="dzslides" data-path="').concat(n.path,'">dzslides</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="slideous" data-path="').concat(n.path,'">slideous</button>\n \n </div>\n <br/>\n <br/>\n <div class="advice"> \n Export requires extra install, please check settings > export.\n </div>\n </div>\n '),"Export Note to :",(function(t){console.log(t)}))}))}},{title:"Print",icon:"faPrint",action:function(){"editor"===(t.viewType||"editor")?(Rt("both"),setTimeout((function(){W(t.windowId,t.file),setTimeout((function(){Rt("editor")}))}),100)):W(t.windowId,t.file)}},{title:k.a.editorBar.explanation.history,icon:"faHistory",action:function(){bt(!ft)}},{title:k.a.editorBar.tts,icon:"faCommentDots",action:function(){Object(C.d)((function(n){n.ui.textToSpeechPopup.open(d,{id:t.file.name})}))}},{title:"Delete note",class:"delete",icon:"faTrash",action:function(){it.file.onFileDelete(t.file)}}]),pt=Object(a.useState)(!1),dt=Object(c.a)(pt,2),ft=dt[0],bt=dt[1],gt=Object(a.useRef)(null),ht=gt.current,mt=700;ht&&(mt=ht.clientHeight/1.3),"mobile"===Object(l.a)()&&(mt=window.innerHeight);var vt=Object(a.useRef)(null);Object(a.useEffect)((function(){yt()}),[t.fileContent,t.file.path,t.windowId]);var wt=Object(a.useRef)(0),Ot=Object(a.useState)(0),jt=Object(c.a)(Ot,2),xt=jt[0],kt=jt[1],yt=function(){wt.current=wt.current+1,kt(wt.current)},_t=Object(a.useState)(!1),Ct=Object(c.a)(_t,2),Et=Ct[0],St=Ct[1],Tt=Object(a.useState)(!1),It=Object(c.a)(Tt,2),Nt=It[0],Pt=It[1];Object(a.useEffect)((function(){var t=d.length>3e4&&"desktop"!==Object(l.a)();St(t)}),[d,t.viewType]),Object(a.useEffect)((function(){var n=d.length>3e4&&"desktop"!==Object(l.a)();St(n),yt();var e="desktop"===Object(l.a)()&&"preview"===t.viewType||"desktop"!==Object(l.a)()&&"preview"===t.mobileView;Pt(e);var o=t.file.path;setTimeout((function(){o===t.file.path&&yt()}),100)}),[t.viewType,t.mobileView]);var Rt=function(n){t.onLayoutUpdate("windowViewChange",{view:n})},At=Object(a.useState)(-1),Ft=Object(c.a)(At,2),Lt=Ft[0],Dt=Ft[1];Object(a.useEffect)((function(){var n=t.editorAction;if(n&&(console.log("[EDITOR ACTION] action ".concat(n.type," triggered on ").concat(n.windowId)),("active"!==n.windowId||t.isActive)&&("active"===n.windowId||n.windowId===t.windowId))){if("lineJump"===n.type){var e=0;if(n.lineJumpNb&&(e=n.lineJumpNb),n.lineJumpString){var o=(null===n||void 0===n?void 0:n.lineJumpString)||"",i=t.fileContent.split("\n");Object(b.each)(i,(function(t,n){t.includes(o)&&(e=n+3)}))}Dt(e),setTimeout((function(){Dt(-1)}),100)}if("insertText"===n.type&&n.insertText&&n.insertPos&&(console.log("insertText",n),function(t,n){var e=X("insertAt",{textToInsert:t,insertPosition:n});e&&(R(e),yt())}(n.insertText,n.insertPos)),"searchWord"===n.type&&n.searchWordString){var c=J.current;if(!c)return;u.a.searchWord(c,n.searchWordString,!0)}if("setSelection"===n.type&&n.selection){var a=J.current;if(!a)return;u.a.setSelection(a,n.selection)}if("undo"===n.type){var r=J.current;if(!r)return;console.log("undo"),u.a.undo(r.view)}if("redo"===n.type){var l=J.current;if(console.log(l,l.view),!l)return;console.log("redo"),u.a.redo(l.view)}"uploadProgress"===n.type&<(n.uploadProgress||-1)}}),[t.editorAction,t.windowId]);var Mt=function(){Object(C.d)((function(n){var e;null===(e=n.lastNotesApi)||void 0===e||e.addToHistory(t.file,!1)}))},zt=Object(a.useState)({x:0,y:0,from:0,to:0,fromPx:0,toPx:0}),Bt=Object(c.a)(zt,2),Ut=Bt[0],Ht=Bt[1],Wt=d.substring(Ut.from,Ut.to),qt=".window-id-".concat(t.windowId),Vt=(null===(n=document.querySelector(qt))||void 0===n?void 0:n.getBoundingClientRect().top)||0,Kt=(Ut.y,"desktop"===Object(l.a)()?40:10),Jt="desktop"===Object(l.a)()?0:10;return Object(w.c)("div",{className:"editor-area",ref:gt},Object(w.c)("div",{className:"infos-editor-wrapper ".concat(T?"with-title-editor":"no-title-editor")},(!0===T||"disabled"===T)&&Object(w.c)(r.a.Fragment,null,Object(w.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(w.c)(s.a,{title:t.file.name.replace(".md",""),enabled:!0===T,onEdited:function(n,e){var o="".concat(t.file.folder).concat(n,".md"),i="".concat(t.file.folder).concat(e,".md");it.file.onTitleUpdate(o,i);Object(K.d)(i);yt()}})),S&&Object(w.c)("div",{className:"toolbar-and-dates-wrapper"},Object(w.c)("div",{className:"editor-toolbar-dropdown"},Object(w.c)(L.a,{hover:!0,dir:"right",maxHeight:mt,onMouseEnter:function(n){t.onLayoutUpdate("windowActiveStatus")}},Object(w.c)(r.a.Fragment,null,E&&Object(w.c)("div",{className:"view-toggler-wrapper"},"mobile"!==Object(l.a)()&&Object(w.c)(A.a,{class:"editor-view-toolbar",size:.8,buttons:[{title:"Editor",icon:"custom_icons/view-3.svg",action:function(){Rt("editor")}},{title:"Editor with minimap",icon:"custom_icons/view-4.svg",action:function(){Rt("editor-with-map")}},{title:"Dual view",icon:"custom_icons/view-1.svg",action:function(){Rt("both")}},{title:"Render view",icon:"custom_icons/view-2.svg",action:function(){Rt("preview")}}]})),Object(w.c)("div",{className:"toolbar-wrapper"},Object(w.c)(A.a,{class:"editor-main-toolbar",design:"vertical",size:.8,buttons:ut})),Object(w.c)("div",{className:"separation-bar"}),Object(w.c)("div",{className:"note-id-wrapper"},Object(w.c)("h4",null,"Note Link"),Object(w.c)("div",{className:"note-id-form"},Object(w.c)("input",{type:"text",ref:vt,onClick:function(t){var n=t.target;n.setSelectionRange(0,n.value.length)},value:Object(V.a)(t.file),readOnly:!0}),Object(w.c)(A.a,{class:"note-id-toolbar",size:1,buttons:[{title:"Copy note ID",icon:"faClipboard",action:function(){var t=vt.current;t&&Object(B.a)(t)}}]}))),Object(w.c)("div",{className:"dates-wrapper"},Object(w.c)("div",{className:"date modified"},Object(w.c)("h4",null,"Modified"),Object(j.a)(new Date(t.file.modified||0))),Object(w.c)("div",{className:"date created"},Object(w.c)("h4",null,"Created"),Object(j.a)(new Date(t.file.created||0)))),Object(w.c)("div",{className:"path-wrapper"},Object(w.c)("div",{className:"path"},Object(w.c)("h4",null,"Path"),Object(w.c)("span",{className:"path-link",onClick:function(){Object(C.d)((function(n){n.ui.browser.goTo(t.file.folder,t.file.name)}))}}," ",t.file.folder," ")))))))),Object(w.c)(M.a,{progress:rt}),Object(w.c)("div",{className:"main-editor-wrapper ".concat(T?"with-title-editor":"no-title-editor"," ").concat(t.windowId)},!Nt&&!Et&&"codemirror"===t.editorType&&Object(w.c)(U.a,{windowId:t.windowId,ref:J,file:t.file,pluginsConfig:t.pluginsConfig,value:d,posY:t.posY,jumpToLine:Lt||0,forceRender:xt,onChange:function(t){Mt(),R(t)},onEvent:function(t){},onScroll:function(n){t.onScroll(n),Ht({x:-9999,y:-9999,from:0,to:0,fromPx:-9999,toPx:-9999})},onTitleClick:t.onTitleClick,onCursorMove:function(t){Ht(t)}}),!Nt&&Et&&Object(w.c)("div",{className:"codemirror-mobile-fallback"},Object(w.c)("p",null," Note is too long for mobile, the advanced edition features are disabled "),Object(w.c)("textarea",{defaultValue:d,onChange:function(t){Mt(),R(t.target.value)}}))),Object(w.c)("div",{className:"mobile-text-manip-toolbar-wrapper",style:{top:Kt,left:Jt}},Object(w.c)(F.a,{cursorInfos:Ut,selection:Wt,onButtonClicked:function(n){if("aiSearch"===n)Object(Z.b)({windowId:t.windowId,file:t.file,fileContent:d,selectionTxt:Wt,insertPos:Ut.to});else if("calc"===n)Object(p.e)({windowId:t.windowId,file:t.file,fileContent:d,selectionTxt:Wt,insertPos:Ut.to});else if("undo"===n)Object(C.d)((function(t){t.ui.note.editorAction.dispatch({type:"undo"})}));else if("redo"===n)Object(C.d)((function(t){t.ui.note.editorAction.dispatch({type:"redo"})}));else{var e=X(n);e&&(Mt(),R(e),yt())}}})),nt&&tt,ft&&Object(w.c)(P,{file:t.file,onClose:function(){bt(!1)}}))},Q=function(t){return"\n\n\n.editor-area {\n\t\twidth: ".concat(Object(l.b)("desktop")?"50%":"editor"===t?"100vw":"0vw",";\n\t\tdisplay: block;\n\n\t\tposition: ").concat(Object(l.b)("desktop")||"editor"===t?"relative":"absolute!important",";\n\t\ttop: ").concat("editor"!==t||Object(l.b)("desktop")?"-9999px":"0px",";\n\n\n\t\t.mobile-text-manip-toolbar {\n\t\t\t\tdisplay: ").concat("editor"!==t||Object(l.b)("desktop")?"none":"flex",";\n\t\t}\n\n\t\t.infos-editor-wrapper {\n\t\t\t\t").concat(Object(l.b)("desktop")?"":"height: ".concat(x.a.sizes.mobile.editorTopWrapper,"px;"),"\n\t\t\t\t").concat(Object(l.b)("desktop")?"width: calc(200% - ".concat(3*x.a.sizes.block*2,"px);"):"","\n\t\t\t\tpadding: 0px ").concat(Object(l.b)("desktop")?3*x.a.sizes.block:2*x.a.sizes.block,"px;\n\t\t\t\tposition: relative;\n\n\t\t\t\t").concat(nt(),"\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(l.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(x.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(l.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(D.b,"\n }\n}\n\n\n\n\n.main-editor-wrapper {\n ").concat(Object(l.b)("desktop")?"":"padding: 0px ".concat(2*x.a.sizes.block,"px 0px ").concat(2*x.a.sizes.block,"px;"),"\n ").concat(Object(l.b)("desktop")?"":"margin: 0px 0px ".concat(x.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(x.a.sizes.mobile.editorTopWrapper+x.a.sizes.mobile.editorBar+2*x.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\n.editor-area {\n\tposition:initial;\n\t.infos-editor-wrapper {\n\t\t\tz-index: 1;\n\t\t\tposition:absolute;\n\t\t\ttop: 0px;\n\t\t\tright: 7px;\n\t\t\twidth: 100%;\n\t\t\t&.with-title-editor {\n\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n\t\t\t}\n\t\t\t//box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\theight: 32px;\n\t\t\tpadding: 0px;\n\t}\n\t.main-editor-wrapper {\n\t\t\tpadding-left: 0px;\n\t\t\tpadding-rigth: 10px;\n\t\t\t").concat(Object(l.b)("desktop")?"margin-top: 33px;":"margin-top: 0px;","; \n\t\t\twidth: 100%;\n\t}\n\t.main-editor-wrapper.no-title-editor {\n\t\tmargin-top: 0px;\n\t}\n\t.infos-editor-wrapper {\n\t\t\tpadding-left: 3px;\n\t\t\tpadding-rigth: 10px;\n\t\t\twidth: calc(100% - 10px);\n\t\t\t&.no-title-editor {\n\t\t\t\twidth: 30px;\n\t\t\t}\n\t\t\t.title-input-wrapper {\n\t\t\t\t\tpadding-left: 10px;\n\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\ttop: -6px;\n\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\tright: initial;\n\t\t\t\t\t\t\topacity: 0.5;\n\t\t\t\t\t}\n\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\twidth: calc(100% - 65px);\n\t\t\t\t\t\t\tfont-family: ").concat(x.a.font.editor,";\n\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\tfont-size: 15px;\n\t\t\t\t\t}\n\t\t\t}\n\t}\n}\n\n")},tt=function(t){var n=Object(a.useContext)(C.a),e=(null===n||void 0===n?void 0:n.status.isConnected)||!1;return Object(a.useMemo)((function(){return Object(w.c)(X,Object(o.a)({},t,{isConnected:e}))}),[t.viewType,t.mobileView,e,t.canEdit,t.editorType,t.windowId,t.file.created,t.file.name,t.file.path,t.file,t.fileContent,t.isActive,t.editorAction])},nt=function(){return"\n\n\n.file-path-wrapper {\n\t\tpadding-top: ".concat(Object(l.b)("desktop")?x.a.sizes.block:x.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(x.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(x.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(x.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\tmargin-bottom: 5px;\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")}},121:function(t,n,e){"use strict";e.d(n,"a",(function(){return M})),e.d(n,"b",(function(){return B}));var o=e(11),i=e(23),c=e(6),a=e(0),r=e.n(a),l=e(34),s=e(79),u=function(t){var n=t.headerLog,e={},o=function(t){e[t]&&delete e[t]};return{notify:function(t){for(var i in e){var c=e[i],a=!1;if(i.endsWith("-once")&&(i=i.replace("-once",""),a=!0),i===t.subId)try{c(t.data),a&&o("".concat(i,"-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(78),d=e(39),f=e(19),b=e(15),g=e(18),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="[IFRAME child js]",e={file:null,frameId:"",reloadCounter:0,windowId:"",innerTag:"",tagName:"",tagContent:"",loginToken:t.loginToken,backendUrl:t.backendUrl},o=function(t){if(""===e.frameId)return console.warn(n,"NO FRAME ID, CANNOT SEND TO PARENT");var o={subId:e.frameId,data:t};window.parent.postMessage(o,"*")},i=function(t){var n={error:"CUSTOM TAG/SCRIPT ERROR: ".concat(t)};o({action:"iframeError",data:n})};window.addEventListener("resize",(function(t){r("100%")}));var c,a={value:"100%"},r=function(t){var n=document.getElementById("content-wrapper");if(!t){if(!n||0===n.clientHeight)return;t=n.clientHeight+20}a.value="".concat(t),o({action:"resize",data:{height:t}})},l=function(){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;n&&n.call(t)},s=t.createEventBus({headerLog:"[FRAME API] 00567"}),u=s.subscribeOnce,p=s.notify,d=function(t,e){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(){e()};var i=document.getElementById("external-ressources-wrapper");if(!i)return console.error(n,"could not load ".concat(t," because ressource wrapper was not detected"));i.appendChild(o)},f=function(n){var e="?token=".concat(t.loginToken);return"".concat(t.backendUrl,"/static").concat("/.tiro/cache/ctag-ressources/").concat(t.getRessourceIdFromUrl(n)).concat(e)},b=function(t,cb){for(var e=0,o=function(){if(++e===t.length)try{cb&&cb()}catch(o){console.error(n,"ERROR LoadScript Callback : ".concat(o))}},i=function(){var e,i,a=t[c],r=f(a),l=!0===window.disableCache,s=function(){g("ressource.download",[a,"/.tiro/cache/ctag-ressources/"],(function(){d(r,(function(){o()}))}))};l?(console.warn(n,"CACHE DISABLED, DOWNLOADING RESSOURCES EVERYTIME!"),s()):(e=function(){d(r,(function(){o()}))},i=function(){s()},fetch(r,{method:"HEAD"}).then((function(t){return t.ok?e():i()})).catch((function(t){return i(t)})))},c=0;c<t.length;c++)i()},g=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 c="iframe-api-call-".concat(t.generateUUID()," ");u(c,(function(t){cb&&cb(t)})),o({action:"apiCall",data:{reqId:c,apiName:n,apiArguments:e}})},h={version:1.2,call:g,utils:{getInfos:function(){return e},loadCachedRessources:b,getCachedRessourceUrl:f,getRessourceIdFromUrl:t.getRessourceIdFromUrl,loadScripts:function(t,cb){b(t,cb)},loadRessources:function(t,cb){b(t,cb)},loadScriptsNoCache:function(t,cb){for(var e=0,o=0;o<t.length;o++){var i=t[o],c=document.createElement("script");c.src=i,c.onload=function(){if(++e===t.length)try{cb&&cb()}catch(o){console.error(n,"ERROR LoadScript Callback : ".concat(o))}};var a=document.getElementById("external-ressources-wrapper");a&&a.appendChild(c)}},resizeIframe:r,fullscreenIframe:l,canScrollIframe:function(t){o({action:"canScrollIframe",data:{status:t}})},loadCustomTag:function(t,n,e){var o=h.utils.createDiv(),i=o.div,c=o.updateContent;e||(e={}),e.base_url=t.split("/").slice(0,-1).join("/").replace("//","/"),e.plugins_root_url=e.base_url.split("/").slice(0,-1).join("/").replace("//","/");var a=!0;return!1===e.padding&&(a=e.padding),h.utils.loadScripts([t],(function(){var t=window.initCustomTag("".concat(n),e);a&&(t='<div class="with-padding" style="padding: 0px 15px;">'.concat(t,"</div>")),c(t)})),i},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=h,c={init:function(o){e.frameId=o.frameId,e.innerTag=o.innerTag,e.tagContent=o.tagContent,e.tagName=o.tagName,e.file=o.file,e.reloadCounter=o.reloadCounter,e.windowId=o.windowId;var c,a=document.getElementById("content-wrapper");if(a){var l=t.unescapeHtml(a.innerHTML),s=(c=l,t.replaceCustomMdTags(c,"[[script]]",(function(t){var e="".concat(t);try{return new Function(e)()}catch(o){console.warn(n,"[SCRIPT] error: ".concat(o),e),i("".concat(o,' in Code "').concat(e,'"'))}})));a.innerHTML=s,setTimeout((function(){r()}),100),t.bindToElClass("title-search-link",(function(t){var n=t.dataset.file,e=t.dataset.folder,o=t.dataset.windowid;h.call("ui.browser.goTo",[e,n,{openIn:o}])}))}},askFullscreen:l,apiAnswer:function(t){var n={subId:t.reqId,data:t.data};p(n)}},window.onmessage=function(t){var n=t.data;if(n)for(var e in c)c&&c[e]&&e===n.action&&c[e](t.data.data)},h},y=e(12),_=e(69),C=e(35),E=e(4),S=e(56);g.a.client.log.verbose;var T=["epub","pdf","iframe","web","smartlist"],I=function(t,cb){Object(y.d)((function(n){n.file.getContent("/.tiro/tags/".concat(t,".md"),(function(t){cb(t)}),{onError:function(){T.includes(t)?function(t,cb){var n="https://raw.githubusercontent.com/dotgreg/tiro-notes/dev/plugins/".concat(t,"/").concat(t,".js"),e="";"epub"===t&&(e='open:true, size: "80%"'),"pdf"===t&&(e="open:true"),"web"===t&&(e='"search_engines": {\n "default":"https://search.bowlman.org/search?q=",\n "g":"https://www.google.com/search?q=",\n "m": "https://www.google.com/maps/search/"\n }');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)}})}))},N=e(14),P=e(31),R=e(1),A=(g.a.client.log.verbose,{}),F={},L=["latex","l"],D=function(t){var n="tag"===t.block.type&&!L.includes(t.block.tagName||""),e=Object(a.useState)(null),o=Object(c.a)(e,2),r=o[0],l=o[1],u=Object(a.useState)(null),p=Object(c.a)(u,2),d=p[0],f=p[1],b=Object(a.useState)("null"),g=Object(c.a)(b,2),h=g[0],m=g[1];Object(a.useEffect)((function(){var e,cb;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&&(e=t.block.tagName,cb=function(t){t?(l(t),setTimeout((function(){m("loaded")}),100)):l(null)},Object(y.d)((function(t){t.plugins.get(e,"tag",(function(t){t&&"tag"===t.type?cb(t.code):("iframe"===e&&(e="web"),I(e,(function(t){cb(t)})))}))}))))}),[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(R.c)("span",{className:"content-block ".concat(n?"block-tag":"block-text"," ")},"loaded"===h&&n&&r&&Object(R.c)(z,Object(i.a)({},t,{noteTagContent:r})),!n&&d&&Object(R.c)("span",{className:"content-block-text",dangerouslySetInnerHTML:{__html:d}}))},M=r.a.memo(D,(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),t.windowId!==n.windowId&&(e=!1),e})),z=function(t){var n=Object(o.a)({},t).noteTagContent,e=Object(a.useState)(""),i=Object(c.a)(e,2),g=i[0],h=i[1],m=Object(a.useRef)(null),v=Object(a.useState)(""),w=Object(c.a)(v,2),O=w[0],j=w[1],T=Object(a.useState)(!1),I=Object(c.a)(T,2),L=I[0],D=I[1],M=Object(a.useState)(0),z=Object(c.a)(M,2),B=z[0],U=z[1],H=Object(a.useState)(null),W=Object(c.a)(H,2),q=W[0],V=W[1],K=Object(a.useState)(!1),J=Object(c.a)(K,2),G=J[0],Y=J[1],$=function(){var n,e,o=function(n){G&&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)($,[t.yCnt,G]);var Z=Object(C.a)((function(e){$(),j(e),V(null),x.subscribe(e,(function(n){if("resize"===n.action){var e=n.data,o=0,i=document.querySelector(".window-id-sizeref-".concat(t.windowId));if(!i)return;var c=i.getBoundingClientRect();if(Object(E.isString)(e.height)&&e.height.endsWith("%")){var a=parseInt(e.height.replace("%",""))/100;o=c.height*a}else if(Object(E.isNumber)(e.height))o=e.height;else{i.getBoundingClientRect();o=300}t.ctagHeightOffset&&(o+=t.ctagHeightOffset),U("".concat(o,"px")),D(!0)}if("canScrollIframe"===n.action){var r=n.data;Y(r.status)}if("apiCall"===n.action){var l=n.data;Object(y.b)(l,(function(t,e){if("nok"===t)return V(e.error);var o={reqId:n.data.reqId,data:e};x.send(m.current,{action:"apiAnswer",data:o})}))}if("iframeError"===n.action){var s=n.data.error;V(s),Object(P.d)("".concat(s))}})),setTimeout((function(){var o={file:t.file,innerTag:t.block.content,windowId:t.windowId,frameId:e,reloadCounter:nt,tagContent:n,tagName:t.block.tagName||"",loginToken:Object(f.b)(),backendUrl:Object(b.c)()};x.send(m.current,{action:"init",data:o})}),100)}),500),X=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"),i='\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)(),"\n\t\t\t\t</style>\n\t\t\t\t");i=Object(S.a)(i,[["{{innerTag}}",t.block.content.trim()]]),h(i)},Q=Object(a.useState)(0),tt=Object(c.a)(Q,2),nt=tt[0],et=(tt[1],Object(a.useState)(!1)),ot=Object(c.a)(et,2),it=ot[0];ot[1];Object(a.useEffect)((function(){D(!1),X();var t="iframe-".concat(Object(l.a)());return Z(t),function(){x.unsubscribe(t)}}),[t.windowId,t.block.content,t.block.tagName,t.noteTagContent,nt]);var ct=t.index||0,at="".concat(t.windowId,"-").concat(ct,"-").concat(t.block.tagName);Object(a.useEffect)((function(){A[at]?ut(!0):A={},F[at]?bt(!0):A={}}),[]);var rt=Object(a.useState)(!1),lt=Object(c.a)(rt,2),st=lt[0],ut=lt[1],pt=Object(a.useState)(!1),dt=Object(c.a)(pt,2),ft=dt[0],bt=dt[1],gt=function(t){t||(t=!ft),F[at]=t,bt(t),ut(!1)};Object(a.useEffect)((function(){t.ctagFullscreen&>(!0)}),[t.ctagFullscreen]);var ht=Object(l.a)();return Object(R.c)(r.a.Fragment,null,ft&&Object(R.c)("div",{className:"fullscreen-pin-bg",onClick:function(n){gt(!1),t.ctagOnFullscreenClose&&t.ctagOnFullscreenClose()}}),Object(R.c)("div",{className:"iframe-view-wrapper ".concat(L?"can-show":"hide"," iframe-tag-").concat(t.block.tagName," ").concat(st?"pinned":"not-pinned"," ").concat(ft?"pinned fullscreen":"not-fullscreen"," ").concat(Object(N.d)()?"mobile":"")},!it&&Object(R.c)("iframe",{onMouseLeave:function(t){!function(t,n){var e=document.getElementById(n);e&&e.focus({preventScroll:!0})}(0,ht)},ref:m,id:O,"data-testid":"iframe",title:O,srcDoc:g,className:"tag-iframe",style:{height:B},sandbox:t.ctagSandboxed?"allow-scripts allow-same-origin allow-popups":void 0}),q&&Object(R.c)("div",{className:"iframe-error"},Object(R.c)("code",null,Object(R.c)("pre",null,q))),Object(R.c)("input",{className:"refocus-input",id:ht,type:"text"})))},B=function(){return"\n.refocus-input {\n\tposition: fixed;\n\tz-index: -10000;\n\twidth: 0px;\n\theight: 0px;\n\topacity: 0.00001;\n\ttop: -10000px;\n\tleft: -10000px;\n}\n.content-blocks-wrapper {\n\t\t// padding: 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"}},122:function(t,n,e){"use strict";e.d(n,"a",(function(){return K})),e.d(n,"b",(function(){return J}));var o=e(6),i=e(0),c=e.n(i),a=e(178),r=e(179),l=e(43),s=e(13),u=e(307),p=e(10),d=e(53),f=e(14),b=e(163),g=e(51),h=e(155),m=e(17),v=e(4),w=e(18),O=e(12),j=e(31),x=(w.a.client.log.verbose,function(t,n,e,o,i){return{label:t,apply:n||t,info:e,detail:i,type:"tag",boost:o||0}}),k=function(t){var n=_(t);return[C,n,y]},y=function(t){var n=t.matchBefore(/\-\-/);if(!t.explicit&&!n)return null;var e="".concat(w.a.path.configFolder,"/snippets.md");return new Promise((function(o,i){Object(O.d)((function(i){i.file.getContent(e,(function(e){var i=[],c=e.split("\n");Object(v.each)(c,(function(t){var n,e=(t=t.split("\\n").join("\n")).split("|"),o=null===(n=e.shift())||void 0===n?void 0:n.trim(),c=e.join("|").trim();if(c&&o){if(o="--"+o,c.includes("${")){var a=c;try{c=new Function("return `"+a+"`")()}catch(s){var r="".concat("[Code Mirror]"," snippets error: ").concat(JSON.stringify({e:s,oto:a}));Object(j.d)(r)}}var l=c.length>20?"".concat(c.substring(0,20),"..."):c;i.push(x(o,c,void 0,void 0,l))}}));var a={from:n?n.from:t.pos,options:i,validFor:/.*/};o(a)}))}))}))},_=function(t){return function(n){var e=n.matchBefore(/\#/);return n.explicit||e?new Promise((function(o,i){Object(O.d)((function(i){var c=t.folder;console.log("searching for folder",c),i.search.word("#",c,(function(t){var i=[];Object(v.each)(t,(function(t){Object(v.each)(t.results,(function(t){var n=t.split(" ");Object(v.each)(n,(function(t){(t=t.trim())&&t.startsWith("#")&&(t.length<=1||"#"!==t[1]&&i.push(x(t,t)))}))}))}));var c={from:e?e.from:n.pos,options:i,validFor:/.*/};o(c)}))}))})):null}},C=function(t){var n=t.matchBefore(/\[\[/);return t.explicit||n?new Promise((function(e,o){var i=new Promise((function(t,n){Object(O.d)((function(n){n.files.get("/.tiro/tags",(function(e){var o=0,i=[];Object(v.each)(e,(function(c){n.file.getContent(c.path,(function(n){o++,i.push({name:c.name,content:n}),o===e.length&&t(i)}))}))}))}))})),c=new Promise((function(t,n){Object(O.d)((function(n){var e=[];n.plugins.list((function(n){Object(v.each)(n,(function(t){"tag"===t.type&&e.push({name:t.name,content:t.code})})),t(e)}))}))}));Promise.all([c,i]).then((function(t){var n=function(t){var n=[];return Object(v.each)(t,(function(t){var e=t.name.replace(".md",""),o="[[".concat(e,"]]"),i="".concat(o," ").concat(o),c="Insert installed custom tag ".concat(o),a=0,r=t.content.split("\n"),l="// --insert:",s="// --comment:",u="// --boost:";Object(v.each)(r,(function(t){(t=t.split("\\n").join("\n")).startsWith(l)&&(i=t.replace(l,"")),t.startsWith(s)&&(c=t.replace(s,"")),t.startsWith(u)&&(a=parseInt(t.replace(u,"")))})),n.push(x(o,i,c,a))})),n}([].concat(Object(m.a)(t[0]),Object(m.a)(t[1])));a(n)})).catch((function(){console.warn("ERROR HERE")}));var a=function(o){var i={from:n?n.from:t.pos,options:o,validFor:/.*/};e(i)}})):null},E=e(91),S=e(77),T=e(117),I=e(64),N=e(88),P=e(168),R=e(29),A=e(74),F=e(47),L=e(1),D=function(t,n){return Object(F.a)({file:t,windowId:n,pattern:R.a.ressource,replacement:function(e){var o=document.createElement("span"),i=e[2];return"none"===Object(A.a)(i)?o.innerHTML=Object(N.a)(e[0],e[2],t,!0):o.innerHTML=function(t,n,e){var o=t[0],i='<div class="mdpreview-source">'.concat(o,"</div>"),c=Object(P.renderToString)(Object(L.c)(S.a,{markdownTag:o,file:n,windowId:e}));return"".concat(c," ").concat(i)}(e,t,n),o}})},M=e(82),z=e(169),B=e(25),U=e(35),H=e(170),W="[Code Mirror]",q=w.a.client.log.verbose,V=Object(i.forwardRef)((function(t,n){var e=function(){var t=n.current;return t&&t.state?t:null},p=Object(i.useRef)(null);Object(i.useEffect)((function(){!function(){var n,o=e();if(!o)return!1;if(t.value===p.current)return!1;if("loading..."===t.value)return!1;if((null===(n=o.view)||void 0===n?void 0:n.state.doc.toString())===t.value)return!1;var i=g.a.getCurrentLineInfos(o);if(!i)return!1;var c=i.currentPosition;g.a.updateText(o,t.value,c),p.current=t.value}()}),[t.value,t.forceRender,t.file.path]);var m=Object(i.useState)(!1),w=Object(o.a)(m,2),j=w[0],x=w[1];Object(i.useEffect)((function(){x(!1)}),[t.file.path]),Object(i.useEffect)((function(){!0===j&&y()}),[t.value]);var y=Object(U.a)((function(){var t=e();g.a.foldAllChildren(t)}),500),_=Object(i.useRef)(t.value);Object(i.useEffect)((function(){_.current=t.value}),[t.value]);var C=function(n,e){n!==t.value&&(p.current=n,_.current=n,t.onChange(n),St(!1),M.a.val=!1,P(),G(n))};Object(i.useEffect)((function(){if(q&&console.log(W,"JUMP to line :",t.jumpToLine),-1!==t.jumpToLine){var n=e();if(n&&!(t.posY<=-10))try{g.a.scrollToLine(n,t.jumpToLine)}catch(o){console.log(o)}}}),[t.jumpToLine]);Object(i.useEffect)((function(){P()}),[t.value]),Object(i.useEffect)((function(){P()}),[]);var S=Object(b.a)(".window-id-".concat(t.windowId)).resizeState;Object(i.useEffect)((function(){P()}),[S,t.windowId]);var P=function(){var n=e();if(n){var o=g.a.getEditorInfos(n.view);d.a.updateEditorDims(t.windowId,{viewport:o.viewportHeight(),full:o.contentHeight}),d.a.updateScrollerDims(t.windowId)}},R=Object(E.c)({file:t.file,onTitleClick:function(n){!function(n){var o=e();if(o){var i=g.a.getCurrentLineInfos(o);i&&(q&&console.log(W,"CLICK ON TITLE DETECTED",n,i),t.onTitleClick(i.lineIndex))}}(n)}}),A=Object(i.useState)(null),F=Object(o.a)(A,2),V=F[0],K=F[1];Object(i.useEffect)((function(){var t=null;Object(v.each)(r.a,(function(n){"Javascript"===n.name&&(t=n)})),K(t)}),[]),Object(v.each)(r.a);var J={base:a.markdownLanguage,codeLanguages:r.a,extensions:[]};V&&(J.defaultCodeLanguage=V);var G=Object(U.a)((function(t){t.includes("--table")&&!Z&&(X(!0),pt()),t.includes("--latex")&&!nt&&(et(!0),pt()),t.includes("--spellcheck")&&!ct&&(at(!0),pt()),!t.includes("--table")&&Z&&(X(!1),pt()),!t.includes("--latex")&&nt&&(et(!1),pt()),!t.includes("--spellcheck")&&ct&&(at(!1),pt())}),500),Y=Object(i.useState)(!1),$=Object(o.a)(Y,2),Z=$[0],X=$[1],Q=Object(i.useState)(!1),tt=Object(o.a)(Q,2),nt=tt[0],et=tt[1],ot=Object(i.useState)(!1),it=Object(o.a)(ot,2),ct=it[0],at=it[1],rt=Object(i.useState)(0),lt=Object(o.a)(rt,2),st=lt[0],ut=lt[1],pt=function(){ut(st+1)};Object(i.useEffect)((function(){G(t.value)}),[t.value]);var dt=Object(i.useState)([]),ft=Object(o.a)(dt,2),bt=ft[0],gt=ft[1],ht=Object(i.useState)(""),mt=Object(o.a)(ht,2),vt=mt[0],wt=mt[1];Object(i.useEffect)((function(){Object(O.d)((function(n){var e=[Object(l.a)({override:k(t.file)}),s.c.domEventHandlers({scroll:function(t,n){},wheel:function(n,e){var o=g.a.getEditorInfos(e);d.a.onEditorScroll(t.windowId,o.currentPercentScrolled()),t.onScroll()}})];(n.userSettings.get("ui_editor_spellcheck")||ct)&&e.push(s.c.contentAttributes.of({spellcheck:"true"}));var o=t.pluginsConfig;o||(o={}),Object(v.isBoolean)(o.markdown)||(o.markdown=!0),Object(v.isBoolean)(o.linkPreview)||(o.linkPreview=!0);var i=n.userSettings;Object(f.a)();e.push(Object(H.b)(t.file,t.windowId)),i.get("ui_editor_links_as_button")&&(e.push(Object(T.c)(t.file,t.windowId)),e.push(Object(I.c)(t.file,t.windowId,o.linkPreview))),i.get("ui_editor_markdown_table_preview")&&Z&&(e.push(Object(M.f)(t.file,t.windowId)),e.push(Object(M.g)(t.file,t.windowId)),e.push(Object(M.d)(t.file,t.windowId)),e.push(Object(M.c)(t.file,t.windowId))),i.get("ui_editor_markdown_latex_preview")&&nt&&J.extensions.push(E.a),i.get("ui_editor_markdown_preview")&&(e.push(R),i.get("ui_editor_markdown_enhanced_preview")&&(e.push(Object(N.c)(t.file,t.windowId)),e.push(D(t.file,t.windowId)),e.push(Object(z.a)(t.file,t.windowId)))),o.markdown?e.push(Object(a.markdown)(J)):e.push(Object(M.b)(t.file,t.windowId));var c="device-".concat(Object(f.a)()," ");i.get("ui_editor_markdown_table_preview")&&(c+="md-table-preview-enabled"),e.push(Ot),gt(e),wt(c)}))}),[t.pluginsConfig,t.windowId,t.file.path,t.value,nt,Z,ct,st]);var Ot=s.c.domEventHandlers({blur:function(n,e){t.onEvent("blur")},focus:function(n,e){t.onEvent("focus")}}),jt=Object(i.useRef)(""),xt=Object(i.useRef)([-9999,-9999]),kt=Object(i.useState)([-9999,-9999]),yt=Object(o.a)(kt,2),_t=(yt[0],yt[1]),Ct=Object(i.useState)(!1),Et=Object(o.a)(Ct,2),St=(Et[0],Et[1]),Tt=Object(i.useRef)({from:-1,to:-1}),It=Object(i.useRef)({from:-1,to:-1}),Nt=[30,10],Pt=Object(i.useState)({x:0,y:0}),Rt=Object(o.a)(Pt,2),At=(Rt[0],Rt[1],Object(U.a)((function(n){var o,i=null===(o=e())||void 0===o?void 0:o.view;if(i){var c=i.coordsAtPos(i.state.selection.main.head),a=i.coordsAtPos(i.state.selection.ranges[0].from);if(!c)return;t.onCursorMove({x:c.left,y:c.top,from:n.from,to:n.to,fromPx:(null===a||void 0===a?void 0:a.top)||0,toPx:(null===a||void 0===a?void 0:a.bottom)||0})}n.from!==n.to&&Object(v.isNumber)(n.from)&&Object(v.isNumber)(n.to)&&(n.from<0||n.to<0||JSON.stringify(It.current)!==JSON.stringify(n)&&(It.current=Object(v.cloneDeep)(n),Lt()))}),200)),Ft=function(t,n){"up"===t?jt.current=t:"down"===t?St(!1):"move"===t&&(xt.current=[n.clientX,n.clientY])},Lt=function(){Object(O.d)((function(t){if(t.userSettings.get("ui_editor_ai_text_selection")){St(!0);var n=xt.current;_t([n[0]+Nt[0],n[1]+Nt[1]])}}))},Dt=Object(i.useMemo)((function(){return Object(L.c)(c.a.Fragment,null,Object(L.c)(u.a,{value:"",ref:n,theme:Object(h.a)(),onChange:C,onUpdate:function(t){!function(t){var n=t.state.selection.ranges[0];Tt.current=n,At(n)}(t)},basicSetup:{foldGutter:!0,dropCursor:!1,allowMultipleSelections:!1,indentOnInput:!1,closeBrackets:!1,history:!0,bracketMatching:!1,lineNumbers:!1},extensions:bt}))}),[t.value,bt]);return Object(L.c)(c.a.Fragment,null,Object(L.c)("div",{className:"codemirror-editor-wrapper ".concat(vt," "),onClick:function(t){Ft("up",t)},onMouseDown:function(t){Ft("down",t)},onMouseMove:function(t){return Ft("move",t)}},Object(L.c)("div",{className:"foldall-wrapper ".concat(Object(f.a)()),onClick:function(t){!function(){var t=e();j?g.a.unfoldAllChildren(t):g.a.foldAllChildren(t,!1),x(!j)}()}},Object(L.c)(B.b,{name:"".concat(j?"up-right-and-down-left-from-center":"down-left-and-up-right-to-center"),label:"".concat(j?"Unfold all text":"Fold all text")})),Dt))})),K=c.a.memo(V,(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})),J=function(){return"\n.codemirror-popup-cursor {\n\tposition: fixed;\n\tz-index: 2;\n\tbackground: white;\n\tpadding: 5px;\n\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\tborder-radius: 3px;\n}\n.cm-hover-popup.cm-selection-popup {\n\tdisplay: flex;\n\tposition: fixed;\n\tz-index: 2;\n\tbackground: white;\n\tpadding: 5px;\n\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\tborder-radius: 3px;\n\topacity:0.4;\n\ttransition: all 0.2s;\n\t.link-action {\n\t\tpadding: 0px 3px;\n\t\tdisplay: flex;\n\t\t.result-calc {\n\t\t\tpadding: 0px 3px;\n\t\t}\n\t}\n\t&:hover {\n\t\topacity:1;\n\t}\n\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)!important;\n}\n\n\n.cm-gutters {\n\t\tborder: none;\n\t\topacity: 0;\n\t\tz-index: 0;\n\t\t&:hover {\n\t\t\t\topacity: 1;\n\t\t}\n\t\t.cm-gutter {\n\t\t\t\t.cm-gutterElement span {\n\t\t\t\t\t\tcolor: #cccaca;\n\t\t\t\t}\n\t\t}\n}\n.device-mobile {\n\t\t.cm-gutters {\n\t\t\t\topacity:1!important;\n\t\t\t\t// background:red!important;\n\t\t}\n}\n\n.foldall-wrapper {\n\t\t&.desktop {\n\t\t\t\topacity: 0;\n\t\t}\n\t\t&.desktop:hover {\t\n\t\t\t\topacity: 1;\n\t\t}\n\t\t&::selection {\n\t\t\t\tbackground: none;\n\t\t}\n\t\t\n\t\topacity:0.6;\n\t\tposition: absolute;\n\t\tz-index: 1;\n\t\ttop: 2px;\n\t\tcolor: #d7d7d7;\n\t\tcursor: pointer;\n\t\tpadding: 5px 4px;\n\t\tleft: 0px;\n\t\tbackground: white;\n}\n\n\n.actionable-title {\n\t\tcolor: ".concat(p.a.colors.main,";\n\t\tposition: relative;\n\t\t// &:before {\n\t\t\t\t// \t\tcontent: \"\u279d\";\n\t\t\t\t// \t\tposition: absolute;\n\t\t\t\t// \t\tright: -20px;\n\t\t\t\t// \t\tcolor: #c6c6c6;\n\t\t\t\t// \t\tfont-size: 18px;\n\t\t\t\t// \t\topacity: 0;\n\t\t\t\t// \t\ttransition: 0.2s all;\n\t\t\t\t// \t\tbottom: -3px;\n\t\t\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-foldPlaceholder {\n\t\tmargin-left: 8px;\n\t\topacity: 0.5;\n\t\tpadding: 2px 5px;\n\t\tborder: none;\n}\n.cm-foldGutter {\n\t\t&::before {\n\n\t\t}\n}\n\n.cm-focused {\n\t\toutline: none!important;\n}\n.main-editor-wrapper {\n\t\t// width: calc(100% + 18px);\n\t\t// margin: 32px 0px 0px 0px;\n\t\tpadding: 0px;\n\t\twidth:100%;\n\t\theight: ").concat(Object(f.b)("desktop")?"calc(100% - 32px);":"calc(100% - 180px);",'; \n}\n\n.codemirror-editor-wrapper {\n\t\t// margin-right: 18px;\n\t\t// width: calc(100% - 10px);\n\t\tposition: relative;\n\t\t// left: -10px;\n}\n.codemirror-editor-wrapper, .cm-editor, .cm-theme {\n\t\t// height: 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\n.cm-scroller {\n\t\tz-index: auto!important;\n\t\twidth: calc(100% - 30px);\n\t\twidth: calc(100% - 23px); // reduce width overall CM\n\t\tpadding-right: 35px; // make scrollbar disappear\n\t\tpadding-left: 5px; // some space for the gutter\n\t\t.cm-content {\n\t\twidth: calc(100% - 10px); // needed otherwise x scroll\n\t\toverflow:hidden;\n\t\twhite-space: pre-wrap;\n\t}\xa0\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(p.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\tp {\n\t\t\t\tcolor:grey;\n\t\t\t\tfont-size: 10px;\n\t\t}\n\t\ttextarea {\n\t\t\t\twidth: calc(100% - 20px);\n\t\t\t\theight: calc(100vh - 230px);\n\t\t\t\tborder: 0px;\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(E.d)(),"\n\n// // FILE RESSOURCE PREVIEW\n// ").concat(Object(S.b)(),"\n\n// // PREVIEW LINK\n// ").concat(Object(I.b)(),"\n\n\n// ").concat(Object(M.e)(),"\n")}},125:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));var o=e(11),i=e(12),c=e(59),a={},r=function(t){console.log("trigger AI search",t.windowId,t.file.path,t.selectionTxt,t.insertPos);var n=t.selectionTxt,e=t.fileContent,r=t.insertPos,l=e,s=!1,u=n=(n=(n=(n=n.replaceAll('"','\\"')).replaceAll("'","\\'")).replaceAll("`","\\`")).replaceAll("$","\\$"),p=function(){return{title:"Ai Answer",currentContent:l,textUpdate:" waiting for answer...",question:u,insertPos:r,windowId:t.windowId,file:t.file,isLast:!1}};a[t.windowId]=!0,Object(i.d)((function(e){var i=e.userSettings.get("ui_editor_ai_command");i=i.replace("{{input}}",n),Object(c.b)(p()),e.command.stream(i,(function(n){if(n.isError&&(s=!0),s){if(console.log("[AI ERROR]",n),""===n.text||"[object Object]"===n.text)return;e.ui.notification.emit({content:"[AI] Error while executing command <br/>============<br/> ANSWER => <br/>".concat(n.text," </br>============"),options:{hideAfter:600}}),Object(c.b)(Object(o.a)(Object(o.a)({},p()),{},{textUpdate:"",isLast:!0,linejump:a[t.windowId]}))}else Object(c.b)(Object(o.a)(Object(o.a)({},p()),{},{textUpdate:n.textTot,isLast:n.isLast,linejump:a[t.windowId]}))}))}))}},134:function(t,n,e){"use strict";e.d(n,"b",(function(){return f})),e.d(n,"a",(function(){return b}));var o=e(17),i=e(4),c=e(18),a=e(31),r="tiro-ls-id-",l=function(t,n){var e=JSON.stringify(n);localStorage.setItem(r+t,e)},s="local_node_history",u="[".concat(s.toUpperCase(),"]"),p=c.a.client.log.verbose,d="notes-history-ls",f=function(t){var n=[],e=Object(i.cloneDeep)(function(t){var n,e=window.localStorage.getItem(r+t);return e&&(n=JSON.parse(e)),n||null}(d));e&&(n=t?e.filter((function(n){return n.path===t})):e);return n},b=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,e=arguments.length>2?arguments[2]:void 0;if(!t.content.includes("--disable-history--")){var i=t,c=f(),a=f(i.path);e&&console.log(u,"adding el to ls : ",{itAdd:i}),c=c.filter((function(t){return t.path!==i.path})),a.unshift(i),a.length>n&&(a=a.slice(0,n)),c=[].concat(Object(o.a)(a),Object(o.a)(c));var r=g(c,3);l(d,r)}},g=function t(n,e){var o=n,i=JSON.stringify(o);return h(i)>e&&o.length>1?(o.pop(),p&&console.log(u,"recursivelyReduceArrTillSmallerThan REDUCE ARR > new length=",o.length),t(o,e)):o},h=function(t){return new Blob([t]).size/1048576};Object(a.a)(s,"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(i.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")};b(e,10,t)})),Object(a.a)(s,"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(a.c)(s,"addLocalNoteHistory")(n,e)})),Object(a.a)(s,"getLocalNoteHistory",(function(t){console.log(f(t),"size: ".concat(h(JSON.stringify(f(t))),"MB"))})),Object(a.a)(s,"cleanLocalNoteHistory",(function(){l(d,[]),console.log(f(),"size: ".concat(h(JSON.stringify(f())),"MB"))}))},136:function(t,n,e){"use strict";e.d(n,"a",(function(){return l})),e.d(n,"b",(function(){return s}));var o=e(4),i=(e(0),e(10)),c=e(25),a=e(99),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(a.b)({fileToUpload:n,folder:t.file.folder,windowId:t.windowId})}))}}),Object(r.c)("label",{htmlFor:"file-".concat(i)},Object(r.c)(c.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")}},137:function(t,n,e){"use strict";e.d(n,"a",(function(){return s})),e.d(n,"b",(function(){return p}));var o=e(11),i=e(57),c=e(12),a=e(4),r="tiro-analytics",l=function(cb){Object(c.d)((function(t){t.cache.get(r,(function(t){var n={};t&&(n=t),cb(n)}))}))},s=function(t){var n=Object(i.c)();l((function(e){var i,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,i=l,Object(c.d)((function(t){t.cache.set(r,i,-1)}))}))},u=function(cb,t){t||(t={});t.start?t.start:Object(i.c)(Object(i.b)("lastMonth")),t.end?t.end:Object(i.c)();l((function(t){cb(t)}))},p=function(t){return{log:s,report:u}}},14:function(t,n,e){"use strict";e.d(n,"d",(function(){return o})),e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return a}));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},i=function(t){return a()===t};function c(){return!!/iPad/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}var a=function(){var t=window.innerWidth,n="desktop";return r()||t<1e3&&(n="tablet"),t<500&&(n="mobile"),n},r=function(){return!l()},l=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}},15:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return h})),e.d(n,"c",(function(){return m})),e.d(n,"d",(function(){return v}));var o,i=e(11),c=e(17),a=e(4),r=e(84),l=e(41),s=e(215),u=e.n(s),p=e(12),d=e(26),f=e(18),b="[RIPGREP INSTALL]",g=function(t){var n="rg-".concat(t.os,"-").concat(t.arch);"win"===t.os&&(n+=".exe");var e=-1!==["rg-darwin-arm","rg-darwin-x64","rg-darwin-x64","rg-linux-x64","rg-win-x64.exe"].indexOf(n),o="Tiro Notes requires the tool Ripgrep, which does not seem to be installed on your computer",i="Install Ripgrep",c=function(){},a="rg-install-notif";e&&(o+="<br>Do you want Tiro to download and install it? <br><br> The following version will be downloaded and installed: <br><code>".concat(n,"</code>"),c=function(){var e="".concat("https://github.com/dotgreg/tiro-notes/raw/master/platforms/electron/not-packaged/ripgrep/").concat(n);Object(p.d)((function(o){o.config.get((function(i){var c=Object(d.b)("".concat(f.a.path.configFolder,"/bin/")),r=Object(d.b)("".concat(i.dataFolder,"/").concat(c,"/").concat(n));console.log(c,r),o.ui.notification.emit({id:a,content:"".concat(b," downloading ripgrep..."),options:{hideAfter:-1}}),o.ressource.download(e,c,(function(){var n,cb;o.ui.notification.emit({id:a,content:"".concat(b," updating config..."),options:{hideAfter:-1}}),n=r,cb=function(){o.userSettings.updateSetupJson("rg_path",r,(function(t){o.ui.notification.emit({id:a,content:"".concat(b," finished, restarting tiro notes..."),options:{hideAfter:10}})}),{requiresServerRestart:!0})},"win"!==t.os?Object(p.d)((function(t){var e="chmod 0755 ".concat(n);t.command.exec(e,(function(t){console.log("".concat(b," -> cmd: ").concat(e," : ").concat(t)),cb(t)}))})):cb()}),{fileName:n})}))}))}),e||(o+='\n <br><br>To install it, follow these instructions :<br> <a href="https://github.com/BurntSushi/ripgrep#installation">https://github.com/BurntSushi/ripgrep#installation</a> \n <br> then restart Tiro',i="ok"),Object(p.d)((function(t){t.popup.prompt({title:"Ripgrep install required",text:o,onAccept:c,onRefuse:function(){},acceptLabelButton:i})}))},h={on:function(){},off:function(){}},m=function(){var t=l.a.global.protocol,n=Object(r.b)("backend-port")?":".concat(Object(r.b)("backend-port")):"".concat(l.a.global.port),e="".concat(t).concat(l.a.global.url).concat(n);return Object(r.b)("backend-port").includes(".")&&(e="".concat(t).concat(Object(r.b)("backend-port"))),e},v=function(){return new Promise((function(t,n){if(!o){var e=s?u.a:function(){};o=e(m()),l.a.log.socket&&console.log("[SOCKET] try connecting to ".concat(m(),"...")),(h=O(o)).on("onServerError",(function(t){"NO_RIPGREP_COMMAND_AVAILABLE"===t.status&&Object(p.d)((function(n){g(t.platform)}))})),h.on("connectionSuccess",(function(n){l.a.log.socket&&console.log("[SOCKET] connection successful!, socket.connected :".concat(o.connected),n),n.isRgGood,t({socket:o,ipsServer:n.ipsServer,socketManager:h})}))}}))},w=function(t,n){return["%c [CLIENT SOCKET 2] ".concat(t),"background: #ccc; color: red",n||null]},O=function(t){var n={};return{on:function(e,o){var r=function(t,n){return function(e){var o;l.a.log.socket&&(o=console).log.apply(o,Object(c.a)(w("<== ON ".concat(t," "),Object(i.a)({},e)))),n(e)}}(e,o),s=Object(a.random)(1,1e8);return n[s]={endpoint:e,apiFn:r},t.on(e,r),s},off:function(e){n[e]&&(t.off(n[e].endpoint,n[e].apiFn),delete n[e])},emit:function(n,e){var o;l.a.log.socket&&(o=console).log.apply(o,Object(c.a)(w("==> EMIT ".concat(n," "),Object(i.a)({},e)))),t.emit(n,e)}}}},154:function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var o=e(4),i=e(29),c=e(39),a=function(t,n){var e=t.match(i.a.image),a=[];return Object(o.each)(e,(function(t){var e=t.match(i.a.firstPartImg),o=e&&e[0]?e[0].replace("![","").replace("]","").replace("(",""):"",r=t.replace(i.a.firstPartImg,"").replace(")",""),l={url:Object(c.a)(n.folder)+"/"+r,title:o,file:n};a.push(l)})),a}},155:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(298),i=e(5),c=e(10),a=e(91),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:i.e.comment,color:"#787b80"},{tag:i.e.definition(i.e.typeName),color:"#194a7b"},{tag:i.e.typeName,color:"#194a7b"},{tag:i.e.tagName,color:"#008a02"},{tag:i.e.variableName,color:"#1a00db"},{tag:i.e.heading,color:c.a.colors.main},{tag:s.Image,color:"red",class:"tiro-image"},{tag:a.b.LatexMdEl,class:"cm-mdpreview-latex-code mdpreview-source"},{tag:i.e.heading1,class:"actionable-title h1"},{tag:i.e.heading2,class:"actionable-title h2"},{tag:i.e.heading3,class:"actionable-title h3"},{tag:i.e.monospace,class:"code-wrapper"},{tag:i.e.content,fontSize:"10px"}]})},l={ImageTwo:i.a.define()},s=(Object(i.c)({ImageTwo:l.ImageTwo,"Strikethrough/...":l.ImageTwo}),{ListItem:i.a.define(),headingMark:i.a.define(),LinkReference:i.a.define(),Image:i.a.define(),LinkTitle:i.a.define(),LinkLabel:i.a.define(),Link:i.a.define(),LinkMark:i.a.define(),BulletList:i.a.define()});Object(i.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})},156:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(6),i=e(0),c=e(46),a=e(22),r=e(10),l=e(58),s=e(1),u=function(t){var n=Object(i.useState)(""),e=Object(o.a)(n,2),r=e[0],u=e[1],p=function(){t.onSubmit(r)};return Object(s.c)("div",{className:"password-popup-wrapper"},Object(s.c)(c.a,{title:a.a.passwordForm.explanation,onClose:function(){t.onClose()}},Object(s.c)("div",null,Object(s.c)(l.a,{value:r,label:a.a.setupForm.password,type:"password",shouldFocus:!0,onChange:function(t){u(t)},onEnterPressed:function(){p()}}),Object(s.c)("button",{className:"submit-button",onClick:function(t){p()}},a.a.passwordForm.submit))))},p=function(){return"\n .submit-button {\n margin-top: 10px;\n ".concat(r.a.els().redButton,";\n\t\tbackground: ").concat(r.a.colors.main,"!important;\n padding: 10px 20px;\n }\n ")}},157:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=function(t){return("0"+t).slice(-2)};String.prototype.replaceAll||(String.prototype.replaceAll=function(t,n){return"[object regexp]"===Object.prototype.toString.call(t).toLowerCase()?this.replace(t,n):this.replace(new RegExp(t,"g"),n)});var i=function(t){var n=function(t){var n=new Date;if(t&&""!==t&&"undefined"!==t)if("string"===typeof t){var e=t,i=t;if(t.startsWith("f")){var c=(e=t.replaceAll("f","").replaceAll("h",":").replaceAll("m",":00").replaceAll("-","/").replaceAll("_"," ")).split("/");e="".concat(c[1],"/").concat(c[0],"/").concat(c[2]),i="".concat(c[0],"/").concat(c[1],"/").concat(c[2])}else if(t.startsWith("d")){var a=t.replaceAll("d","").split("_")[0].split("-");e="".concat(a[1],"/").concat(a[0],"/").concat(a[2])}else if(t.startsWith("w")){var r=t.replaceAll("w","").split("-"),l=o(7*parseInt(r[0]));e="".concat(r[1],"/").concat(l,"/").concat(r[2])}else if(t.startsWith("h")){var s=(e=t.replace("h","").replaceAll("h",":00:00").replaceAll("-","/").replaceAll("_"," ")).split("/");e="".concat(s[1],"/").concat(s[0],"/").concat(s[2])}var u=Number.isNaN(new Date(e).getDate());n=new Date(e),u&&(n=new Date(i))}else n=new Date(t);else n=new Date;return n}(t),e=n.getFullYear(),i=n.getMonth()+1,c=n.getDate(),a=e.toString(),r=o(i),l=o(c),s=o(n.getHours()),u=o(n.getMinutes()),p="".concat(r,"/").concat(l,"/").concat(a," ").concat(s,":").concat(u),d="".concat(r,"-").concat(l,"-").concat(a,"_").concat(s,"h").concat(u,"m"),f="".concat(l,"-").concat(r,"-").concat(a,"_").concat(s,"h").concat(u,"m"),b="".concat(r,"/").concat(l,"/").concat(a),g={year:e,month:i,day:c,hour:n.getHours(),min:n.getMinutes(),timestamp:n.getTime()},h=function(){return Math.ceil(c/7)};return{year:a,month:r,day:l,hour:s,min:u,full:p,num:g,date:b,raw:n,full_file:d,full_file_fr:f,getWeekNb:h,getCustomFormat:function(t){var n="f".concat(f);return"day"===t&&(n="d".concat(l,"-").concat(r,"-").concat(e)),"week"===t&&(n="w".concat(h(),"-").concat(r,"-").concat(e)),"hour"===t&&(n="h".concat(l,"-").concat(r,"-").concat(e,"_").concat(s,"h")),"".concat(n)}}}},158:function(t,n,e){"use strict";e.d(n,"a",(function(){return p})),e.d(n,"b",(function(){return d}));var o=e(11),i=e(6),c=e(0),a=e(59),r=e(10),l=e(38),s=e(14),u=e(1),p=function(t){var n=Object(c.useState)(!1),e=Object(i.a)(n,2),p=e[0],d=e[1],f=Object(c.useState)(!1),b=Object(i.a)(f,2),g=b[0],h=b[1];Object(c.useEffect)((function(){p&&h(!0)}),[t.cursorInfos.y]);var m=function(n){h(!1),t.onButtonClicked(n)},v=[{icon:"faCircle",action:function(){d(!1),h(!1)},class:"separator"},{icon:"faUndo",action:function(){return m("undo")}},{icon:"faRedo",action:function(){return m("redo")}},{icon:"faAngleLeft",action:function(){return m("<-")}},{icon:"faAngleRight",action:function(){return m("->")}},{icon:"faCheckSquare",action:function(){return m("[x]")}},{icon:"faAngleUp",action:function(){return m("^")}},{icon:"faAngleDown",action:function(){return m("v")}},{icon:"faEraser",action:function(){return m("X")}},{icon:"faClone",action:function(){return m("C")}}],w=[];if(w.push({icon:"faCircle",action:function(){return d(!0)}}),t.selection.length>0){var O=Object(a.d)(t.selection),j={icon:"chart-line",action:function(){},customHtml:Object(u.c)("div",{className:"numbers-preview-wrapper"},Object(u.c)("i",{className:"fa fa-chart-line"}),Object(u.c)("span",{className:"numbers-preview"},Object(a.h)(t.selection)))};O&&(j={icon:"calculator",customHtml:Object(u.c)("div",{className:"numbers-preview-wrapper"},Object(u.c)("i",{className:"fa fa-calculator"}),Object(u.c)("span",{className:"numbers-preview"},Object(a.a)(t.selection))),action:function(){t.onButtonClicked("calc"),d(!1)}});var x={icon:"wand-magic-sparkles",action:function(){t.onButtonClicked("aiSearch"),d(!1)}};w.push(x),w.push(j);var k=Object(o.a)({},j);k.class="separator-right",v.push(k),v.push(x)}return Object(u.c)("div",{className:"mobile-toolbar-wrapper device-".concat(Object(s.a)()," ").concat(p?"open":"closed"," ").concat(g?"popup-transparent":"")},!p&&Object(u.c)(l.a,{class:"mobile-text-manip-toolbar closed",size:"desktop"===Object(s.a)()?.8:1,colors:[r.a.colors.editor.mobileToolbar.font,r.a.colors.editor.mobileToolbar.font],buttons:w}),p&&Object(u.c)(l.a,{class:"mobile-text-manip-toolbar",size:"desktop"===Object(s.a)()?.8:1,colors:[r.a.colors.editor.mobileToolbar.font,r.a.colors.editor.mobileToolbar.font],buttons:v}))},d=function(){return"\n.mobile-text-manip-toolbar-wrapper {\n \n \n pointer-events: none;\n position: absolute;\n width: 100%;\n // z-index: 100;\n display: flex;\n justify-content: flex-end;\n}\n.mobile-text-manip-toolbar {\n \n \n\t\t.toolbar-button {\n\t\t\t\tpadding: 13px 20px;\n\t\t}\n}\n\n.numbers-preview-wrapper {\n display: flex;\n font-size: 10px;\n font-weight: 400;\n i {\n margin-top: 2px;\n }\n .numbers-preview {\n margin-left: 5px;\n }\n}\n\n .mobile-toolbar-wrapper {\n &.popup-transparent {\n opacity: 0.4;\n }\n\n\n .mobile-text-manip-toolbar {\n width: 10px;\n flex-direction: column;\n pointer-events: all;\n margin-right:20px;\n \n background: #fff;\n border-radius: 10px;\n display: flex;\n list-style: none;\n padding: 0px 10px;\n box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);\n align-content: center;\n justify-content: center;\n align-items: center;\n // height: ".concat(r.a.sizes.mobile.editorBar,"px;\n &:hover {\n opacity: 1;\n }\n opacity: 0.4;\n left: 15px;\n \n transition: opacity 0.2s;\n \n .toolbar-button {\n padding: 3px 5px; \n }\n .separator {\n // margin-left: 8px;\n }\n .separator-right {\n // margin-right: 8px;\n }\n\n li {\n flex: 1 1 auto;\n justify-content: center;\n display: flex;\n }\n\n &.closed {\n opacity: 0.2;\n background: none;\n box-shadow: none;\n &:hover {\n background: #fff;\n box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);\n opacity: 1;\n }\n }\n\n \n }\n\n &.device-mobile {\n .mobile-text-manip-toolbar {\n transform: scale(0.9);r\n opacity: 1;\n &.closed {\n opacity: 0.2;\n &:hover {\n opacity: 1;\n }\n } \n transform: scale(1);\n .toolbar-button {\n // padding: 12px; \n }\n }\n }\n \n }\n")}},159: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),i=e(25),c=e(1),a=function(t){var n=t.dir?t.dir:"left",e=t.maxHeight?t.maxHeight:50;return Object(c.c)("div",{className:"dropdown-wrapper ".concat(n," ").concat(t.hover?"hover-active":"")},Object(c.c)("span",{onMouseEnter:function(){t.onMouseEnter&&t.onMouseEnter()},onMouseLeave:function(){t.onMouseLeave&&t.onMouseLeave()},onClick:function(){},className:"context-menu-wrapper"},Object(c.c)("div",{className:"dropdown-icon"},Object(c.c)(i.a,{name:"faEllipsisH",color:o.a.colors.l1.font})),Object(c.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\toverflow: auto;\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")}},160:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));var o=e(0),i=e.n(o),c=e(1),a=function(t){var n=t.progress,e=n>=0&&n<100;return Object(c.c)(i.a.Fragment,null,e&&Object(c.c)("div",{className:"upload-progress-bar-wrapper"},Object(c.c)("div",{className:"bg-fill",style:{width:"".concat(n,"%")}}),Object(c.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"}},161:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(300),i=function(t){return t||(t=0),Object(o.isNumber)(t)?t+1:0}},162:function(t,n,e){"use strict";e.d(n,"a",(function(){return b})),e.d(n,"b",(function(){return g}));var o=e(17),i=e(6),c=e(11),a=e(34),r=e(4),l=e(161),s=e(55),u=e(93),p=e(12),d=e(14),f=e(0),b=function(t){var n=Object(c.a)({},t),e=n.w,o=n.h,i=n.x,r=n.y,l=n.file;o||(o=u.c.rows),e||(e=u.c.cols),i||(i=0),r||(r=0);var s=Object(a.a)();return{layout:{i:s,x:i,y:r,w:e,h:o,minH:1,maxH:2,forceRender:0},content:{i:s,active:!1,file:l,view:"both"}}},g=function(){var t=Object(s.a)("tabs",[]),n=Object(i.a)(t,3),e=n[0],c=n[1],a=n[2],l=Object(f.useRef)([]),u=function(t,cb){l.current=t,c(l.current)};Object(f.useEffect)((function(){l.current=e}),[e]);var b=function(t){var n=O({fullWindowFile:t});if(n){var e=[].concat(Object(o.a)(l.current),[n]),i=w(n.id,e);u(i)}},g=function(t){var n=[],e=Object(r.cloneDeep)(l.current);Object(r.each)(e,(function(e,o){e.id!==t&&n.push(e)})),u(n)},j=function(t){if(!t){var n=Object(r.cloneDeep)(l.current),e=v(n);if(!Object(r.isNumber)(e))return;t=n[e]}if(t.grid.layout[0]){var o,i=t.grid;return Object(r.each)(i.content,(function(t,n){t.active&&(o={layout:i.layout[n],content:i.content[n]})})),o}};return{tabs:e,updateTab:function(t,n,e){if("add"===t)Object(p.e)().then((function(t){b(t.ui.browser.files.active.get)}));else if("close"===t){if(!n)return;g(n.id)}else if("rename"===t){if(!n)return;if(e.length>15)return;var o=Object(r.cloneDeep)(l.current);Object(r.each)(o,(function(t){t.id===n.id&&(t.name=e,t.manualName=!0)})),u(o)}else if("activate"===t){if(!n)return;var i=w(n.id,l.current),c=h(i);if(u(c),"desktop"!==Object(d.a)()){var a,s=null===(a=j(n))||void 0===a?void 0:a.content.file;if(!s)return;Object(p.d)((function(t){t.ui.browser.goTo(s.folder,s.name)}))}}},refreshTabsFromBackend:a,updateActiveTabGrid:function(t,cb){var n=Object(r.cloneDeep)(l.current),e=v(n);Object(r.isNumber)(e)&&(n[e].grid=t,u(n))},refreshWindowGrid:function(){var t=h(l.current);u(t)},tabsApi:{get:function(){return l.current},close:g,openInNewTab:b,reorder:function(t,n){var e=Object(r.cloneDeep)(l.current),o=e[t];e.splice(t,1),e.splice(n,0,o),u(e)},active:{get:function(){var t=null;return Object(r.each)(l.current,(function(n){n.active&&(t=n)})),t}}},windowsApi:{close:function(t){var n=Object(r.cloneDeep)(l.current);Object(r.each)(t,(function(t){Object(r.each)(n,(function(n,e){for(var o=0;o<n.grid.content.length;o++){var i=n.grid.content[o],c=n.grid.layout[o];i.i===t&&n.grid.content.splice(o,1),c.i===t&&n.grid.layout.splice(o,1)}}))}));var e=h(n);u(e)},active:{get:j,setContent:function(t){if(t){var n=Object(r.cloneDeep)(l.current),e=v(n);if(Object(r.isNumber)(e)){var o=n[e],i=o.grid.content;if(!(i.length<1)){var c=0;Object(r.each)(i,(function(t,n){!0===t.active&&(c=n)})),i[c].file=Object(r.cloneDeep)(t),o.manualName||(o.name=m(t.name));var a=h(n);u(a)}}}}},updateWindows:function(t,n){var e=Object(r.cloneDeep)(l.current);Object(r.each)(t,(function(t){Object(r.each)(e,(function(e,o){Object(r.each)(e.grid.content,(function(e){e.i===t&&(e.file=n)}))}))}));var o=h(e);u(o)},getIdsFromFile:function(t){var n=[];return Object(r.each)(l.current,(function(e){Object(r.each)(e.grid.content,(function(e){e.file&&e.file.path===t&&n.push(e.i)}))})),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=b({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}},163:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(6),i=e(4),c=e(0),a=function(){var t=Object(c.useState)(!1),n=Object(o.a)(t,2),e=n[0],a=n[1],r=Object(c.useRef)(0);return Object(c.useEffect)((function(){var t=Object(i.debounce)((function(){r.current=r.current+1,a(!0),setTimeout((function(){a(!1)}),200)}),200);return function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{resizeState:e,resizeCount:r}},r=function(t){var n=Object(c.useState)(!1),e=Object(o.a)(n,2),a=e[0],r=e[1];return Object(c.useEffect)((function(){var n=Object(i.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}}},164:function(t,n,e){"use strict";e.d(n,"a",(function(){return c})),e.d(n,"b",(function(){return a}));e(4);var o=e(12),i="notes-view-type",c=function(t){return new Promise((function(n,e){Object(o.d)((function(e){e.cache.get(i,(function(e){if(e){var o=e[t];n(o||!1)}}))}))}))},a=function(t,n){Object(o.d)((function(e){e.cache.get(i,(function(o){o||(o={}),o[t]=n,e.cache.set(i,o,-1)}))}))}},165:function(t,n,e){"use strict";e.d(n,"b",(function(){return w})),e.d(n,"a",(function(){return O}));var o=e(23),i=e(6),c=e(0),a=e(69),r=e(120),l=e(53),s=e(14),u=e(4),p=e(166),d=e(12),f=e(35),b=e(78),g=e(10),h=e(64),m=e(1),v=function(t){var n=Object(c.useState)(""),e=Object(i.a)(n,2),o=e[0],d=e[1],g=Object(c.useState)(0),v=Object(i.a)(g,2),w=(v[0],v[1]),O=Object(c.useRef)(0),j=function(t){t>O.current&&(O.current=t),w(O.current)};Object(c.useEffect)((function(){w(0)}),[t.fileContent,t.windowId]);Object(f.a)((function(t){d(t)}),Object(s.d)()?3e3:1e3),Object(f.b)((function(t){d(t)}),1e3);var x=function(t){d(t)};Object(c.useEffect)((function(){x(t.fileContent)}),[t.fileContent,t.file.path,t.windowId]),Object(c.useEffect)((function(){setTimeout((function(){l.a.onWindowLoad(t.windowId)}),500)}),[t.file.path,t.windowId]),Object(c.useEffect)((function(){Object(h.d)(!0)}),[t.file.path,t.windowId]);var k={id:"",line:0,title:""},y=function(n){var e=Object(b.a)(o),i=k;if(Object(u.each)(e,(function(t){n>=t.line&&(i=t)})),""!==i.id){var c=".window-id-".concat(t.windowId," #t-").concat(i.id);try{var a,r=null===(a=document.querySelector(c))||void 0===a?void 0:a.offsetTop;Object(u.isNumber)(r)&&(l.a.updatePreviewOffset(t.windowId,r),l.a.scrollPreview(t.windowId))}catch(s){console.error(s)}}},_=Object(f.b)(y,200),C=Object(f.a)(y,500),E="desktop"===Object(s.a)()&&"editor"===t.viewType||"desktop"!==Object(s.a)()&&"editor"===t.mobileView,S=Object(c.useState)(!1),T=Object(i.a)(S,2),I=T[0],N=T[1];return Object(c.useEffect)((function(){N(!1)}),[t.canEdit]),Object(m.c)("div",{className:"dual-view-wrapper view-".concat(t.viewType," device-").concat(Object(s.a)()," window-id-").concat(t.windowId," window-id-sizeref-").concat(t.windowId)},!t.canEdit&&!I&&Object(m.c)("div",{className:"loading-overlay",onClick:function(t){N(!0)}},Object(m.c)("div",{className:"loading-text"},"loading...")),t.isDragging&&Object(m.c)("div",{className:"loading-overlay",onClick:function(t){N(!0)}},Object(m.c)("div",{className:"loading-text"}," drop to upload")),Object(m.c)(r.a,{viewType:t.viewType,mobileView:t.mobileView,windowId:t.windowId,editorType:"codemirror",showViewToggler:t.showViewToggler,showToolbar:t.showToolbar,titleEditor:t.titleEditor,file:t.file,canEdit:t.canEdit,fileContent:t.fileContent,isActive:t.isActive,editorAction:t.editorAction,posY:0,onTitleClick:function(t){!function(t){_(t),C(t)}(t)},onScroll:function(t){},onUpdateY:function(t){},onMaxYUpdate:j,onFileEdited:function(n,e){t.onFileEdited(n,e),x(e)},onScrollModeChange:function(t){},onLayoutUpdate:t.onLayoutUpdate,pluginsConfig:t.pluginsConfig}),!E&&Object(m.c)(a.a,{windowId:t.windowId,file:t.file,posY:0,fileContent:o,onMaxYUpdate:j,yCnt:0,onIframeMouseWheel:function(t){}}),Object(m.c)(p.a,{windowId:t.windowId}))},w=function(t,n){return"\n\t.dual-view-wrapper {\n\t\tposition: relative;\n\t\t.loading-overlay {\n\t\t\t.loading-text {\n\t\t\t\tcolor: ".concat(g.a.colors.main,";\n\t\t\t}\n\n\t\t\tdisplay: flex;\n\t\t\talign-content: center;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\twidth: 100%;\n\t\t\theight: 120%;\n\t\t\tposition: absolute;\n\t\t\tbackground: rgba(0,0,0,0.1);\n\t\t\ttop: -2px;\n\t\t\tleft: 0px;\n\t\t\tz-index: 99;\n\t\t\tfont-weight: bold;\n\t\t\tcolor: white;\n\t\t}\n\t}\n\n\t.mobile-view-preview {\n\t\t\n\t\t.editor-area {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\t\n\t.dual-view-wrapper.device-tablet, \n\t.dual-view-wrapper.device-mobile {\n\t\t\t.editor-area,\n\t\t\t.preview-area-wrapper {\n\t\t\t\t\twidth: 100%;\n\t\t\t}\n\t}\n\t.dual-view-wrapper {\n\t\t\t&.view-both.device-desktop {\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\t.__EDITOR_DESIGN HERE__ {}\n\t\t\t&.view-editor.device-desktop {\n\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t/* display:none; */\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\ttop: -9999px;\n\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.view-editor-with-map.device-desktop {\n\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\twidth: 80%;\n\t\t\t\t\t}\n\n\t\t\t\t\t.__MINIMAP_DESIGN HERE__ {}\n\n\t\t\t\t\t.preview-area-wrapper:hover {\n\t\t\t\t\t\t\theight: calc(100% - 30px);\n\t\t\t\t\t\t\ttransform: scale(1);\n\t\t\t\t\t\t\tright: -50%;\n\t\t\t\t\t\t\topacity: 1;\n\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.preview-area-transitions {\n\t\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\ttransition-delay: ").concat(g.a.anim.time,";\n\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t/* transition-property: bottom; */\n\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\ttransform: scale(0.2) translateZ(0);\n\t\t\t\t\t\t\ttransform-origin: 0px 0px;\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\tright: calc(-80%);\n\t\t\t\t\t\t\t// height: 500vh;\n\t\t\t\t\t\t\theight: calc(100% * 5);\n\t\t\t\t\t\t\t.preview-area-transitions {\n\n\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\t/* transition-delay:").concat(g.a.anim.time,"; */\n\t\t\t\t\t\t\t\t\t/* transition-property: padding; */\n\n\t\t\t\t\t\t\t\t\ttransition-delay:").concat(g.a.anim.time,"; \n\t\t\t\t\t\t\t\t\t/* transition-property: all; */\n\n\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\twidth: 73%;\n\t\t\t\t\t\t\t\t\tpadding: 80px;\n\t\t\t\t\t\t\t\t\tpadding-right: 140px;\n\t\t\t\t\t\t\t\t\tpadding-left: 40px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.view-preview.device-desktop {\n\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tposition:relative;\n\t\t\tdisplay: ").concat("desktop"===Object(s.a)()?"flex":"block",";\n\t}\n\t\n")},O=function(t){var n=Object(c.useContext)(d.a),e=(null===n||void 0===n?void 0:n.ui.note.editorAction.get)||null;return Object(m.c)(v,Object(o.a)({},t,{editorAction:e}))}},166:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(3),i=e(6),c=e(0),a=e(98),r=e.n(a),l=e(53),s=e(1),u=function(t){var n=Object(c.useState)(0),e=Object(i.a)(n,2),a=e[0],u=e[1],p=Object(c.useRef)(null),d=Object(c.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,i=n.getBoundingClientRect().y;return t.maxY=n.getBoundingClientRect().height-o,t.y=e.getBoundingClientRect().y-i,t.percent=t.y/t.maxY*100,t};Object(c.useEffect)((function(){var n=d.current?d.current:null;if(n){var e=new MutationObserver((function(n,e){var i,c=Object(o.a)(n);try{for(c.s();!(i=c.n()).done;){if("data-scroll-refresh"===i.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){c.e(d)}finally{c.f()}}));return e.observe(n,{attributes:!0}),function(){e.disconnect()}}}),[t.windowId]);var b=Object(c.useState)(0),g=Object(i.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"}},167:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return i}));var o=function(t,n){c(t,(function(t){console.log("ON IMAGE PASTE"),t&&n(t)}))},i=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)}))},c=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 i=e[o].getAsFile();"function"==typeof n&&n(i)}}},169:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(26),i=e(29),c=e(28),a=e(62),r=e(56),l=e(10),s=e(47),u=function(t,n){return Object(s.a)({file:t,windowId:n,pattern:i.a.userCustomTagFull2,replacement:function(e){var i=document.createElement("span");return i.innerHTML=function(t,n,e){var i=t[2].replaceAll("[[","").replaceAll("]]",""),l=t[0].replaceAll("[[".concat(i,"]]"),""),s=function(t,n,e){return"".concat(Object(r.b)(t,""),"-").concat(Object(r.b)(n,""),"-").concat(Object(r.b)(e,""))},u=s(i,l,n.path),p="ress-".concat(u);Object(c.a)(n,u,(function(){var t=document.querySelector(".".concat(p," .iframe-wrapper-cm-ctag"));if(t){var o=Object(a.b)(i,l,e,{file:n});Object(a.c)(t,o)}}));var d='\n\t<div class="button-ctag-cm-toggle" \n\t\tonclick="'.concat(Object(c.c)("toggle-ctag-link",(function(t){if(t){var n=t.dataset.filepath,e=decodeURIComponent(t.dataset.tagcontent),i=t.dataset.tagname,r=t.dataset.windowid,l=s(i,e,n),u=Object(o.d)(n),p=t.parentNode.parentNode.querySelector(".iframe-wrapper-cm-ctag"),d=p.querySelector("iframe")?"closed":"open";Object(c.b)(u,l,d);var f=Object(a.b)(i,e,r,{file:u});Object(a.c)(p,f)}})),'"\n\t\tdata-filepath="').concat(n.path,'"\n\t\tdata-windowid="').concat(e,'"\n\t\tdata-tagname="').concat(i,'"\n\t\tdata-tagcontent="').concat(encodeURIComponent(l),'"\n\t>').concat(Object(c.d)("eye"),"</div>"),f='<div class="cm-ctag-name">[[ '.concat(i," ]]</div>"),b='<div class="cm-ctag-overview">'.concat(f).concat(d,"</div>");return'<div class="cm-ctag-wrapper '.concat(p,'">').concat(b).concat('<div class="iframe-wrapper-cm-ctag"></div>',"</div>")}(e,t,n),i}})},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")}},170:function(t,n,e){"use strict";e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return u}));var o=e(29),i=e(12),c=e(28),a=e(10),r=e(47),l=function(t,n){return Object(r.a)({file:t,windowId:n,pattern:o.a.hashtag,replacement:function(n){var e=document.createElement("span");return e.classList.add("cm-hashtag"),e.innerHTML='<span class="hash-inner" \n data-hashtag="'.concat(n[1],'"\n data-hashtag2="').concat(n[0],'"\n data-folder="').concat(t.folder,'"\n onclick="').concat(Object(c.c)("open-win-smartlist-hashtag",s),'" >').concat(n[0],"</a>"),e},options:{isAtomic:!0}})},s=function(t){if(t){var n=t.dataset.hashtag2,e=t.dataset.folder;Object(i.d)((function(t){t.ui.floatingPanel.create({type:"ctag",layout:"full-center",ctagConfig:{tagName:"smartlist",content:"- | ".concat(e," | ").concat(n)}})}))}},u=function(){return"\n .cm-hashtag {\n // color: var(--color-text);\n color: grey;\n background: ".concat(a.a.colors.main,";\n color: ").concat(a.a.colors.mainFont,";\n border-radius: 3px;\n padding: 2px 4px;\n margin: 0 2px;\n // display: inline-block;\n font-size: 0.9em;\n .hash-inner {\n cursor: pointer;\n }\n }\n")}},171:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=function(t){return"[link|".concat(t.realname," ").concat(t.folder,"]\n")}},172:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(26),i=e(18),c=e(19),a=e(15),r=function(t){return Object(o.b)("".concat(Object(a.c)(),"/").concat(i.a.path.staticResources,"/").concat(t,"?token=").concat(Object(c.b)()))}},173:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=function(t){!function(){var t=document.getElementById("icon-page");t&&t.remove()}(),function(t){var n=document.createElement("link");n.rel="icon",n.href=t,n.id="icon-page",document.getElementsByTagName("head")[0].appendChild(n)}(t)}},175:function(t,n,e){"use strict";e.d(n,"a",(function(){return b})),e.d(n,"b",(function(){return g}));var o=e(6),i=e(11),c=e(124),a=e(4),r=e(0),l=e.n(r),s=e(12),u=e(22),p=e(93),d=e(1);var f={upload:{uploadCounter:0,reinit:function(){}},file:{onTitleUpdate:function(t,n){},onFileDelete:function(t){}}},b=l.a.createContext(f),g=function(t){var n=Object(i.a)({},t).tab,e=Object(r.useContext)(s.a),c=Object(r.useState)(f),l=Object(o.a)(c,2),g=l[0],m=l[1],v=function(){var t=Object(r.useContext)(s.a),n=Object(r.useState)({name:"",data:{}}),e=Object(o.a)(n,2),i=e[0],c=e[1],a=Object(r.useRef)({});return Object(r.useEffect)((function(){if(t){var cb=a.current[i.name];cb&&cb(t,i.data)}}),[i]),{onNextStateTrigger:function(t){c(t)},addNextStateAction:function(t,cb){a.current[t]=cb}}}(),w=v.onNextStateTrigger,O=v.addNextStateAction;O("refreshFolderList",(function(t,n){var e=t.ui.browser.folders.current.get();e===n.folder&&(t.ui.browser.goTo(e,n.name,{openIn:"activeWindow"}),w({name:"checkIfNoWindows"}))})),O("checkIfNoWindows",(function(t){0===n.grid.content.length&&t.tabs.close(n.id)}));var j=Object(a.cloneDeep)(g);j.file.onFileDelete=function(t){e&&e.popup.confirm("".concat(u.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)})),w({name:"refreshFolderList",data:o})}))}))},j.file.onTitleUpdate=function(t,n){e&&e.file.move(t,n,(function(o){var i,c=null;if(Object(a.each)(o,(function(t){t.path===n&&(c=t)})),c){var r=e.ui.windows.getIdsFromFile(t);e.ui.windows.updateWindows(r,c),null===(i=e.lastNotesApi)||void 0===i||i.removeFile(t),w({name:"refreshFolderList",data:c})}}))},j.upload.reinit=function(){var t=Object(a.cloneDeep)(g);delete t.upload.file,m(t)};var x=Object(r.useState)(0),k=Object(o.a)(x,2),y=k[0],_=k[1];return Object(r.useEffect)((function(){_(y+1)}),[n.refresh,JSON.stringify(t.pinStatus)]),Object(d.c)(h,null,Object(d.c)("div",{className:"window-grid-wrapper"},Object(d.c)(b.Provider,{value:j},Object(d.c)(p.a,{refresh:y,grid:n.grid,onGridUpdate:t.onGridUpdate,mobileView:t.mobileView}))))},h=Object(c.a)("div",{target:"ejnwhwz0"})({name:"zk0z9r",styles:"height:100%;.window-grid-wrapper{height:100%;}"})},176:function(t,n,e){"use strict";e.d(n,"b",(function(){return d})),e.d(n,"a",(function(){return f}));var o=e(6),i=e(0),c=e.n(i),a=e(14),r=e(10),l=e(25),s=e(4),u=e(1),p=function(t){var n=Object(i.useState)(""),e=Object(o.a)(n,2),c=e[0],p=e[1],d=Object(i.useState)(!1),f=Object(o.a)(d,2),b=f[0],g=f[1],h=!Object(s.isBoolean)(t.enabled)||t.enabled;Object(i.useEffect)((function(){p(t.title),g(!1)}),[t.title]);return Object(u.c)("div",{className:"title-input-wrapper"},Object(u.c)("input",{className:"big-title",type:"text",value:c,disabled:!h,onChange:function(t){var n=function(t){var n=t;return n.replace(/[^\w\s\_\-]/gi,"")}(t.target.value);p(n),g(!0)},onKeyDown:function(n){if(!1!==h&&"Enter"===n.key){if(c.length<3)return;t.onEdited(t.title,c),g(!1)}}}),b&&Object(u.c)("div",{className:"press-to-save"},Object(u.c)(l.a,{name:"faCircle",color:r.a.colors.main,size:.7})),b&&"mobile"===Object(a.a)()&&Object(u.c)("button",{className:"buttonSaveTitleMobile",onClick:function(){0!==c.length&&(g(!1),t.onEdited(t.title,c))}}," Save "))},d=function(){return"\n.buttonSaveTitleMobile {\n\t\tposition: relative;\n\t\tright: 20px;\n\n\n}\n"},f=c.a.memo(p,(function(t,n){var e=!1;return t.title!==n.title&&(e=!1),e}))},18: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.40.1"},dev:{disableLogin:!1}}},19:function(t,n,e){"use strict";e.d(n,"b",(function(){return m})),e.d(n,"c",(function(){return v})),e.d(n,"a",(function(){return O})),e.d(n,"d",(function(){return j}));var o=e(6),i=e(4),c=e(0),a=e.n(c),r=e(18),l=e(58),s=e(46),u=e(102),p=e(15),d=e(22),f=e(63),b=e(12),g=e(61),h=e(1),m=function(){var t=Object(u.a)("tiro-login-token");return t||""},v=function(){return"?token=".concat(m())},w=function(t){Object(u.b)("tiro-login-token",t,r.a.tokenRefreshInHours)},O=function(){w("")},j=function(t){var n=Object(c.useState)(!1),e=Object(o.a)(n,2),r=e[0],u=e[1],v=Object(c.useState)(""),O=Object(o.a)(v,2),j=O[0],x=O[1],k=Object(c.useState)(""),y=Object(o.a)(k,2),_=y[0],C=y[1],E=Object(c.useState)(),S=Object(o.a)(E,2),T=S[0],I=S[1],N=Object(c.useRef)(0);Object(c.useEffect)((function(){return N.current=p.b.on("getLoginInfos",(function(n){switch(n.code){case"SUCCESS":if(!n.token)return;w(n.token),u(!1),t.onLoginSuccess();break;case"WRONG_TOKEN":u(!0),I(["error",d.a.loginForm.wrongToken]);var e=n.loginInfos;null!==e&&void 0!==e&&e.demo_mode&&(x("viewer"),C(e.viewer_password)),t.onLoginAsked();break;case"WRONG_USER_PASSWORD":I(["error",d.a.loginForm.wrongUserPassword]),u(!0)}})),function(){p.b.off(N.current)}}),[]);var P=Object(g.a)("user-password-cache-ls",{}),R=Object(o.a)(P,2),A=R[0],F=R[1];Object(c.useEffect)((function(){if(r){var t=Object(f.c)().dic,n="__HARDCODED_LOGIN_LS_PASSWORD_0129dsfaf1029__";t.l1&&t.l2&&t.l1.value&&t.l2.value&&Object(b.d)((function(e){var o,c,a=t.l1.value+t.l2.value;if(A[a])o=A[a].usr,c=A[a].pass;else if(o=e.encryption.decryptUrlParam(t.l1.value,n).plaintext,c=e.encryption.decryptUrlParam(t.l2.value,n).plaintext,o&&c){var r=Object(i.cloneDeep)(A);r[a]={usr:o,pass:c},F(r)}o&&c&&(x(o),C(c),setTimeout((function(){console.log("success login url, submitting it"),p.b.emit("sendLoginInfos",{user:o,password:c,token:m()})}),1e3))}))}}),[r]);var L=function(){I(void 0),p.b.emit("sendLoginInfos",{user:j,password:_,token:m()})},D=Object(c.useState)(1),M=Object(o.a)(D,2),z=M[0],B=M[1],U=Object(g.a)("login-to-ls",!1),H=Object(o.a)(U,2);H[0],H[1];return{displayLoginPopup:r,LoginPopupComponent:function(t){return Object(h.c)(a.a.Fragment,null,r&&Object(h.c)("div",{className:"setup-popup-component"},Object(h.c)(s.a,{title:d.a.setupForm.title,onClose:function(){}},Object(h.c)("div",null,Object(h.c)(l.a,{shouldFocus:1===z,value:j,onEnterPressed:function(){B(2)},label:d.a.setupForm.user,onChange:function(t){x(t)}}),Object(h.c)(l.a,{shouldFocus:2===z,value:_,label:d.a.setupForm.password,type:"password",onEnterPressed:function(){L()},onChange:function(t){C(t)}}),Object(h.c)("button",{value:"submit",className:"submit-button",onClick:function(t){L()}},d.a.setupForm.submit),T&&Object(h.c)("div",{className:T[0]},T[1])))))}}}},22:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=e(18).a.strings},25:function(t,n,e){"use strict";e.d(n,"b",(function(){return f})),e.d(n,"a",(function(){return g}));var o=e(7),i=e(8),c=e(20),a=e(21),r=e(0),l=e.n(r),s=e(296),u=e(297),p=e(28),d=e(1),f=function(t){return Object(d.c)("div",{className:"icon-2-wrapper",title:t.label,dangerouslySetInnerHTML:{__html:Object(p.d)(t.name)},style:{fontSize:t.size||"10px",color:t.color||"#797979"}})},b=function(t){Object(c.a)(e,t);var n=Object(a.a)(e);function e(){var t;Object(o.a)(this,e);for(var i=arguments.length,c=new Array(i),a=0;a<i;a++)c[a]=arguments[a];return(t=n.call.apply(n,[this].concat(c))).size=t.props.size?t.props.size:1,t.isLocal=!t.props.name.startsWith("fa"),t}return Object(i.a)(e,[{key:"render",value:function(){return Object(d.c)("span",{style:{transform:"scale(".concat(this.size,")"),display:"inline-block"}},!this.isLocal&&Object(d.c)(s.a,{icon:u[this.props.name],color:this.props.color||"black",size:"1x"}),this.isLocal&&Object(d.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),g=l.a.memo(b,(function(t,n){return JSON.stringify(t)===JSON.stringify(n)}))},26:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"d",(function(){return i})),e.d(n,"c",(function(){return c})),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("://")},i=function(t){var n=function(t){var n=t.split("/"),e=t.split("\\"),o=n.length>e.length?n:e,i=o[o.length-1],c=i.split("."),a=t.replace(i,""),r="";c.length>1&&(r=c[c.length-1]);var l=i.replace(".".concat(r),"");return{filename:i,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,filenameWithoutExt:n.filenameWithoutExt}},c=function(t){var n=t.match(/(.*)[\/\\]/),e=n?n[1]+"/":"";return o(e)},a=function(t,n){return o(t+"/")===o(n+"/")}},28:function(t,n,e){"use strict";e.d(n,"d",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));e(323);var o=e(12),i=function(t){return'<i class="ssr-icon fa-solid fa-'.concat(t,'"></i>')};window.ssrActionsDic={};var c=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 i="ressource-preview-status-".concat(t.path),c="".concat(t.path,"-").concat(n);Object(o.d)((function(t){t.cache.get(i,(function(n){n||(n={}),n[c]=e,t.cache.set(i,n,-1)}))}))},r=function(t,n,e){!function(t,n,cb){var e="ressource-preview-status-".concat(t.path),i="".concat(t.path,"-").concat(n);Object(o.d)((function(t){t.cache.get(e,(function(t){if(t){var n=t[i]?t[i]:"closed";cb(n)}}))}))}(t,n,(function(t){"open"===t&&setTimeout((function(){e()}),500)}))}},29:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(33),i=e.n(o),c=e(18),a={img:i()().find(".").then("jpg").or("jpeg").or("png").or("gif").or("webm").or("svg").or("webp"),imgMdConfig:i()().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:i()().find(c.a.metas.headerStart).beginCapture().anythingBut("").endCapture().then(c.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,mdTitle:/^([#]{1,9})\ (.+)/gi,mdTableCell:/((([^|\n])+\|)|(([^|\n])+))/gim,hashtag:/#([A-z\xc0-\xfa1-9_\-]+)/gi,matchingHtmlTags:/<([^>]*)>([^<]*)<\/\1>/,baliseHtml:i()().find("<").anythingBut("<>").then(">"),ressource:i()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").endCapture().then(")"),ref:i()().find("[").anythingBut("[]").then("](").anythingBut("()").then(")"),extimage:i()().find("![").anythingBut("[]").then("](").beginCapture().then("http").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),image:i()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),image2:/!\[(.*?)\]\((.*?\.(jpg|png|gif|bmp|jpeg|webm|svg|webp"))\)(\{(.*)\})?/gim,fullImageMd:i()().beginCapture().find("![").anythingBut("[]").then("](").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageMdSrc:i()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture:i()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture2:/\!\[([^\[\]]+)\]\(([^\(\)]+\.(jpg|jpeg|png|gif|webm|svg|webp))\)/gi,imageAndConfig:i()().find(".beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),searchlink:i()().find("[search|").beginCapture().anythingBut("[]").endCapture().then("]"),linklink2:i()().find("123").beginCapture().anythingBut("456").endCapture().then("456"),linklink:i()().find("[link|").beginCapture().anythingBut("[]").endCapture().then(" ").beginCapture().then("/").anythingBut("[]").endCapture().then("]"),latexTag:i()().find("[[latex]]").beginCapture().anythingBut("").endCapture().then("[[latex]]"),scriptTag:i()().find("[[script]]").beginCapture().anythingBut("").endCapture().then("[[script]]"),userCustomTagFull:i()().find(a.customTag).beginCapture().anythingBut("").endCapture().then(a.customTag),userCustomTagFull2:i()().beginCapture().beginCapture().find(a.customTag).endCapture().anythingBut("").beginCapture().then(a.customTag).endCapture().endCapture(),userCustomTagFull3:i()().beginCapture().find(a.customTag).endCapture(),userCustomTag3:i()().beginCapture().then(a.customTag).endCapture(),userCustomTagManual:a.customTag,externalLink:i()().find("http").maybe("s").then("://").beginCapture().anythingBut("/ ").endCapture().beginCapture().anythingBut(" ").then("/").beginCapture().anythingBut("? ").endCapture().anythingBut(" \n").then("\\n").endCapture(),url2transform:i()().find("!").beginCapture().find("http").maybe("s").then("://").beginCapture().anything().endCapture().endCapture(),searchFolder:i()().find(" /").anything().endOfLine(),searchFolderNoSpace:i()().find("/").anything().endOfLine(),firstPartImg:i()().find("![").anythingBut("[]").then("]("),hashtag3:i()().find(/[-| |\n]{1}\#([A-z\xc0-\xfa1-9_\-]+)/gi),titleMd:i()().startOfLine().find("#").oneOrMore().then(" ").beginCapture().anythingBut("").endCapture(),scriptHtml:i()().find("<script>").beginCapture().anythingBut("").endCapture().then("<\/script>")}},303:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return useRessourceApi}));var _config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_construct_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(174),_config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(11),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__),_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(34),_shared_shared_config__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(18),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(15),_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(19),_api_hook__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(12),_managers_url_manager__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(63),lodash__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(4),lodash__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__),_managers_ressource_manager__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(172),_managers_devCli_manager__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(31),_managers_tryCatch_manager__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(304),h="[RESSOURCE API] ",useRessourceApi=function useRessourceApi(p){var _p=Object(_config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__.a)({},p),eventBus=_p.eventBus;Object(react__WEBPACK_IMPORTED_MODULE_2__.useEffect)((function(){_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.on("getRessourceApiAnswer",(function(t){eventBus.notify(t.idReq,t)})),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.on("getRessourceScan",(function(t){eventBus.notify(t.idReq,t)}))}),[]);var deleteRessource=function(t,cb){var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("delete-ressource");console.log("".concat(h," delete ressource ").concat(t)),p.eventBus.subscribe(n,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceDelete",{path:t,idReq:n,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)()})},downloadRessource=function(t,n,cb,e){var o=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("download-ressource");p.eventBus.subscribe(o,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceDownload",{url:t,folder:n,idReq:o,opts:e,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)()})},fetchRessource=function(t,cb,n){n||(n={}),n.disableCache||(n.disableCache=!1),n.returnsPathOnly||(n.returnsPathOnly=!1),"false"===n.disableCache&&(n.disableCache=!1),"true"===n.disableCache&&(n.disableCache=!0);var e="/.tiro/cache/fetch/",o=Object(_managers_ressource_manager__WEBPACK_IMPORTED_MODULE_10__.a)("/".concat(e).concat(Object(_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_3__.b)(t))),i=function(){fetch(o).then((function(t){return t.text()})).then((function(t){Object(_managers_tryCatch_manager__WEBPACK_IMPORTED_MODULE_12__.a)((function(){return cb(t,o)}))}))},c=function(){downloadRessource(t,e,(function(t){var e;t.message&&(null!==(e=n)&&void 0!==e&&e.returnsPathOnly?cb("",o):i())}))};!0===n.disableCache?c():Object(_managers_url_manager__WEBPACK_IMPORTED_MODULE_8__.a)({url:o,onSuccess:function(){i()},onFail:function(){c()}})},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 i=(null===e||void 0===e?void 0:e.content)||"",c=(null===e||void 0===e?void 0:e.title)||"";cb({title:c,text:o,html:i,raw:t})}))}))},ramFetchEvalCache={val:{}},fetchEval=function(t,n,e,cb){e||(e={}),e.disableCache||(e.disableCache=!1),"false"===e.disableCache&&(e.disableCache=!1),"true"===e.disableCache&&(e.disableCache=!0);var o=function(o){try{var i=[],c=[];Object(lodash__WEBPACK_IMPORTED_MODULE_9__.each)(n,(function(t,n){i.push(n),c.push(t)}));var a=Object(_config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_construct_js__WEBPACK_IMPORTED_MODULE_0__.a)(Function,i.concat([o])).apply(void 0,c);cb&&cb(a)}catch(l){var r="[ERR remote code] (api.ress.fetchEval): ".concat(l," <br> url: ").concat(t," (more infos in console)");console.log(r,l,{url:t,funcParams:n,options:e}),Object(_managers_devCli_manager__WEBPACK_IMPORTED_MODULE_11__.d)("".concat(r))}};e.disableCache&&(ramFetchEvalCache.val[t]=null),!ramFetchEvalCache.val[t]||e.disableCache?fetchRessource(t,(function(n){o(n),ramFetchEvalCache.val[t]=n}),e):o(ramFetchEvalCache.val[t])},cleanCache=function(){ramFetchEvalCache.val={},Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.d)((function(t){t.folders.delete("cache","fetch")}))},scanRessourceFolder=function(t,cb){_shared_shared_config__WEBPACK_IMPORTED_MODULE_4__.a.client.log.socket&&console.log("[CLIENT API] get ressources files ".concat(t));var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("get-ressources-files-");p.eventBus.subscribe(n,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceScan",{folderPath:t,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)(),idReq:n})},ressourceApi={delete:deleteRessource,download:downloadRessource,scanFolder:scanRessourceFolder,fetch:fetchRessource,fetchEval:fetchEval,fetchUrlArticle:fetchUrlArticle,cleanCache:cleanCache};return ressourceApi}},304:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(31),i=function(t){try{t()}catch(n){Object(o.d)("".concat(n))}}},31:function(t,n,e){"use strict";e.d(n,"a",(function(){return c})),e.d(n,"c",(function(){return a})),e.d(n,"b",(function(){return r})),e.d(n,"d",(function(){return l}));e(11);var o=e(12),i="tiroDevCli",c=function(t,n,e){window[i]||(window[i]={}),window[i][t]||(window[i][t]={}),window[i][t][n]=e},a=function(t,n){return window[i]&&window[i][t]&&window[i][t][n]?window[i][t][n]:function(){console.log("DEV FN",t,n,"does not exists")}},r=function(t,n){if(window[i]&&window[i][t]&&window[i][t][n])window[i][t][n]();else{var e="DEV FN ".concat(t," ").concat(n," does not exists");console.log(e),l(e)}},l=function(t,n){console.log("[NOTIF LOG]: ",t),Object(o.d)((function(e){e.ui.notification.emit({content:t,id:n,options:{hideAfter:60,type:"warning",keepInHistory:!0}})}))}},333:function(t,n){},335:function(t,n){},34:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return i}));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)}))},i=function(t){var n=t.split("?")[1]||"",e=t.split("?")[0],o=e.replace(/[^\w\s]/gi,"_"),i=n.replace(/[^\w\s]/gi,"_"),c=e.split(".").pop()||"";return((c="."+c.replace(/[^\w\s]/gi,"_")).length>6||c.length<=1)&&(c=""),"".concat(o,"_").concat(i).concat(c)}},346:function(t,n){},348:function(t,n){},35:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(4),i=e.n(o),c=e(0);function a(cb,t){var n=Object(c.useRef)(cb);return Object(c.useEffect)((function(){n.current=cb})),Object(c.useCallback)(i.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(c.useRef)(cb),a=function(){var t=Object(c.useRef)(!0);return Object(c.useEffect)((function(){return function(){t.current=!1}}),[]),function(){return t.current}}();return Object(c.useEffect)((function(){o.current={cb:cb,delay:t}})),Object(c.useCallback)(i.a.debounce((function(){var n;o.current.delay===t&&a()&&(n=o.current).cb.apply(n,arguments)}),t,e),[t,i.a.debounce])}},373:function(t,n){},375:function(t,n){},376:function(t,n){},38:function(t,n,e){"use strict";e.d(n,"a",(function(){return p})),e.d(n,"b",(function(){return f}));var o=e(11),i=e(0),c=e.n(i),a=e(123),r=e(10),l=e(25),s=e(1),u=function(t){var n=Object(o.a)({},t),e=n.design,c=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,i{color:",c?c[1]:r.a.colors.main,";}}svg,i{transform:scale(",l||1.3,");color:",c?c[0]:r.a.colors.editor.interfaceGrey,";&:hover{color:",c?c[1]:r.a.colors.main,";}}}","");return Object(i.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=c.a.memo(u,(function(t,n){return!1})),d=function(t){var n=Object(s.c)(c.a.Fragment,null);t.title&&(n=Object(s.c)(c.a.Fragment,null,t.title)),t.icon&&(n=t.icon.startsWith("fa")||t.icon.includes(".")?Object(s.c)(l.a,{name:t.icon}):Object(s.c)(l.b,{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),t.title&&Object(s.c)("div",{className:"button-title-wrapper "},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-title-wrapper {\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\t// width: 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-title-wrapper {\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-title-wrapper {\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-title-wrapper {\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")}},381:function(t,n){},383:function(t,n){},389:function(t,n){},39: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(18),i=e(29),c=e(56),a=e(15),r=e(78),l=e(77),s=e(168),u=e(64),p=(e(4),e(117)),d=e(88),f=e(1),b=function(t){return Object(r.d)(t,i.a.externalLink3,(function(t){return Object(p.a)(t,{addLineJump:!0})}))},g=function(t,n){var e=Object(u.a)("$1","$2",null,t,!0);return n.replace(i.a.linklink,e)},h=function(t){var n=t.replace(i.a.searchlink,'<a class="search-link preview-link" href="javascript:window.tiroCli.triggerSearch.func(\'$1$2\');">$1</a>');return n=Object(c.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,e){var o=0,c=Object(r.d)(e,i.a.ressource,(function(e){o++;"".concat(e,"-").concat(o);var i="".concat(function(t,n,e){return Object(s.renderToString)(Object(f.c)(l.a,{markdownTag:t,file:n,windowId:e}))}(e,t,n)," ");return i}));return c},w=function(t,n){return Object(r.d)(n,i.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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},j=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")}},391:function(t,n){},41:function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var o=e(11),i=e(18),c="80"===window.location.port?"":":".concat(window.location.port);"3000"===window.location.port&&(c=":3023");var a=Object(o.a)(Object(o.a)({},i.a.client),{},{global:{protocol:"".concat(window.location.protocol,"//"),url:"".concat(window.location.hostname),port:c}})},410:function(t,n){},422:function(t,n){},425:function(t,n){},46:function(t,n,e){"use strict";e.d(n,"a",(function(){return d})),e.d(n,"b",(function(){return f}));var o=e(7),i=e(8),c=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(c.a)(e,t);var n=Object(a.a)(e);function e(){var t;Object(o.a)(this,e);for(var i=arguments.length,c=new Array(i),a=0;a<i;a++)c[a]=arguments[a];return(t=n.call.apply(n,[this].concat(c))).canBgClose=!t.props.canBgClose||t.props.canBgClose,t}return Object(i.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:10001;\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")}},469:function(t,n){},47:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(7),i=e(8),c=e(20),a=e(21),r=e(13),l=e(31),s=function(t){Object(c.a)(e,t);var n=Object(a.a)(e);function e(t,i){var c;return Object(o.a)(this,e),(c=n.call(this)).match=t,c.replacement=i,c}return Object(i.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,o){return new r.e({regexp:t,decoration:function(t){var i=t.input+t.index,c=e.path+o;if(u[c]||(u[c]={}),!u[c][i]){var a=new s(t,n),l=r.a.replace({widget:a});u[c][i]=l}return u[c][i]}})},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,t.windowId).createDeco(e):this.decorations=d(t.pattern,t.classWrap).createDeco(e)}return Object(i.a)(n,[{key:"update",value:function(n){try{t.replacement&&(n.docChanged||n.viewportChanged)?this.decorations=p(t.pattern,t.replacement,t.file,t.windowId).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,i,c=(null===(o=e.plugin(n))||void 0===o?void 0:o.decorations)||r.a.none;return null!==(i=t.options)&&void 0!==i&&i.isAtomic||(c=r.a.none),c}))}})}},493:function(t,n){var e="[MARKETPLACE-HTML] generatePluginsMarketplaceHtml";var o=function(t){var n=t?"50%":"25%",e="\n html, body {\n font-family: arial, sans-serif;\n }\n\n /*\n Version table CSS\n */\n table {\n border-spacing: 0px;\n width: 100%;\n }\n thead tr th{\n padding: 8px;\n }\n tbody {\n text-align: left;\n }\n tbody tr {\n cursor: pointer;\n background: #f1f0f0;\n }\n tbody tr:nth-child(2n) {\n background: none;\n }\n tbody td {\n padding: 8px;\n }\n\n /*\n DETAILS CSS\n */\n\n #plugin-detail-wrapper {\n overflow: hidden;\n overflow-y: ".concat(t?"auto":"hidden",";\n display:none;\n width: calc(100% - 40px);\n height: calc(100% - 70px);\n z-index: 3;\n position: absolute;\n top: 30px;\n left: 0px;\n background: white;\n padding: 20px;\n border-radius: 7px;\n }\n #plugin-detail-wrapper.show {\n display:").concat(t?"block":"flex",";\n }\n #detail-close {\n position: absolute;\n top: 10px;\n right: 10px;\n font-size: 13px;\n background: white;\n padding: 3px 7px;\n border-radius: 100;\n box-shadow: 0px 0px 5px #0006;\n cursor: pointer;\n border-radius: 110px;\n z-index: 3;\n }\n \n #detail-left {\n width: ").concat(t?"100":"70","%;\n overflow-y: auto;\n }\n #detail-title {\n font-size: 31px;\n margin-bottom: 20px;\n font-weight: bold;\n margin-top: 0px;\n }\n #detail-description {\n margin: 0px;\n margin-bottom: 30px;\n \n }\n #detail-versions {\n }\n\n #detail-right {\n width: ").concat(t?"100":"30","%;\n \n position: relative;\n }\n #detail-icon {\n position: absolute;\n left: -50px;\n }\n #detail-icon img{ \n width: 30px;\n }\n #detail-images {\n margin-top: ").concat(t?"30":"0","px;\n display: block;\n height: 100%;\n overflow: hidden;\n overflow-y: auto;\n }\n #detail-images img {\n max-width: calc(100% - 20px);\n border-radius: 8px;\n box-shadow: 0px 0px 5px #0006;\n margin: 7px;\n }\n\n\n /*\n // LIST CSS\n */\n\n .plugins-list-wrapper {\n display: flex;\n flex-wrap: wrap;\n // width: 400px;\n overflow:auto;\n }\n\n .plugins-list-wrapper .plugin-item-wrapper {\n cursor: pointer;\n // display:inline-block;\n width: calc(").concat(n," - 40px);\n padding: 10px;\n margin: 5px;\n background: #ededed;\n border-radius: 10px;\n display: flex;\n height: 80px;\n }\n\n .plugins-list-wrapper .plugin-item-wrapper\t.plugin-item-content {\n width: 60%;\n }\n .plugin-item-content .plugin-item-title {\n font-size: 11px;\n font-weight: bold;\n }\n .plugin-item-content .plugin-item-description {\n font-size: 10px;\n }\n .plugin-item-icon {\n width: 40%;\n height: 100%;\n width: 40%;\n height: 100%;\n background-size: 30px;\n background-repeat: no-repeat;\n background-position: center;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n ");return"<style>".concat(e,"</style")},i=function(t,cb){if(t.constructor===Array)for(var n=0;n<t.length;++n)cb(t[n]);else for(var e in t)cb(t[e],e)};window.ssrActionsPluginsMarketDic={};var c=function(t,n){var e="window.ssrActionsPluginsMarketDic['".concat(t,"'](this)"),o=window.ssrActionsPluginsMarketDic;return o[t]||(o[t]=function(t){n(t)}),e},a=function(){var t=window.innerWidth,n="desktop";return r()||t<1e3&&(n="tablet"),t<500&&(n="mobile"),n},r=function(){return!l()},l=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};"undefined"!==typeof window&&(window._tiro_generatePluginsMarketplaceHtml=function(t){var n=t.onPluginClick?t.onPluginClick:function(t){console.log(e,"on plugin click",t)},r=t.onSettingChange?t.onSettingChange:function(t){console.log(e,"on setting change",t)},l=t.pluginsDescriptions?t.pluginsDescriptions:[],s=t.fullDisplayMode;console.log(e,{pluginsDescriptions:l});var u='<div class="plugins-marketplace-wrapper">';u+='<div class="plugins-list-wrapper">';var p="mobile"===a(),d=function(t,n){return document.getElementById("detail-"+t).innerHTML=n};i(l,(function(t){var e=t.icon;e||(e=t.images&&t.images[0]?t.images[0]:"");var o=c("plugin-click-id-".concat(t.name),(function(){n(t),f(t)})),i=t.description.substr(0,100);t.description.length>100&&(i+="..."),u+='\n <div class="plugin-item-wrapper">\n <div class="plugin-item-content" onClick="'.concat(o,'">\n <div class="plugin-item-title"> ').concat(t.name,' </div>\n <div class="plugin-item-description"> ').concat(i,' </div>\n </div>\n <div class="plugin-item-icon" style="background-image: url(\'').concat(e,"')\">\n </div>\n </div>\n ").trim()}));var f=function(t){if(document.getElementById("plugin-detail-wrapper").classList.add("show"),d("title",t.name),d("description",t.description),s&&t.configuration.length>0){var n="<h3>Settings</h3><table>";n+="<thead><tr>",n+="<th>Id</th>",n+="<th>Field</th>",n+="<th>Description</th>",n+="</tr><thead>",n+="</thead>",n+="<tbody>",t.configuration.map((function(e){n+="<tr>\n <td>".concat(e.id,"</td>\n <td>").concat(function(n,e,o){var i="",a=c("setting-onchange-id-".concat(e),(function(o){var i="checkbox"===n?o.checked:o.value;r({plugin:t,type:n,id:e,value:i})}));return"checkbox"===n?i+='<input type="checkbox" '.concat(!0===o?"checked='checked'":"",' onChange="').concat(a,'" />'):"text"===n&&(i+='<input type="text" value="'.concat(o,'" onkeyup="').concat(a,'" />')),i}(e.type,e.id,"woop"),"</td>\n <td>").concat(e.description,"</td>\n </tr>")})),d("settings",n+="</tbody></table>")}else d("settings","");var e="<h3>Install</h3><table>";e+="<thead><tr>",e+="<th>Version</th>",e+="<th>Date</th>",e+="<th>Description</th>",e+="<th>Install</th>",e+="</tr><thead>",e+="</thead>",e+="<tbody>",t.versions.map((function(t){e+="<tr>\n <td>".concat(t.version,"</td>\n <td>").concat(t.date,"</td>\n <td>").concat(t.comment,"</td>\n <td><button ").concat(s?"":"disabled",">Install</button></td>\n </tr>")})),d("versions",e+="</tbody></table>"),t.icon&&d("icon",'<img class="plugin-images" src="'.concat(t.icon,'" />'));var o="<table>";t.images.map((function(t){o+='<img class="plugin-images" src="'.concat(t,'" />')})),d("images",o)},b=c("plugin-click-close",(function(){document.getElementById("plugin-detail-wrapper").classList.remove("show")}));return u+="</div>",u+='<div id="plugin-detail-wrapper">',u+='<div id="detail-close" onClick="'.concat(b,'">x</div>'),u+='<div id="detail-left">',u+='<h1 id="detail-title"></h1>',u+='<div id="detail-description"></div>',u+='<div id="detail-versions"></div>',u+='<div id="detail-settings"></div>',u+="</div>",u+='<div id="detail-right">',u+='<div id="detail-icon"></div>',u+='<div id="detail-images"></div>',u+="</div>",u+="</div>",u+='<div id="detail-configuration"></div>',u+="</div>",u+="</div>",(u+="</div>")+o(p)})},494:function(t,n,e){"use strict";e.r(n);var o=e(0),i=e.n(o),c=e(6),a=e(1),r=e(14),l=e(15),s=e(11),u=e(123),p=e(10),d=e(120),f=e(69),b=e(38),g=e(4),h=e(61),m={};window.tiroCli=m;var v=function(t,n){var e,r,l=Object(h.a)("showRenderId",!1),s=Object(c.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)(i.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(18),O=e(41),j=e(12),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(25),_=e(22),C=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,_.a.newNote))},E=i.a.memo(C,(function(t,n){return!0})),S=e(7),T=e(8),I=e(20),N=e(21),P=e(57),R=e(39),A=e(308),F=e(305),L=e(19),D={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={},U=e(80),H=function(t){Object(I.a)(e,t);var n=Object(N.a)(e);function e(t){var o;return Object(S.a)(this,e),(o=n.call(this,t)).oldFiles=[],o.liRefs=[],o.scrollerWrapperRef=i.a.createRef(),o.scrollerListRef=i.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,i=[],c=0;c<o.liRefs.length;c++){var a=o.liRefs[c].current;if(a){var r,l=a.getBoundingClientRect().top;if(l>-50&&l<n+100)-1===e&&(e=c),o.props.files[c]&&i.push(null===(r=o.props.files[c])||void 0===r?void 0:r.path)}}o.props.onVisibleItemsChange(i)}}),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(T.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(i.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=U.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),c=Object(r.b)("desktop")?o:o-p.a.sizes.mobile.bottomBarHeight;return Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"list-wrapper-scroller",style:{height:c},onScroll:this.onListScroll,ref:this.scrollerWrapperRef},Object(a.c)(F.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:c,itemCount:t.props.files.length,itemSize:e,width:r||0,onScroll:t.onListScroll},(function(e){var o=e.index,c=e.style,l=t.props.files[o],s=t.props.filesPreview[l.path];return Object(a.c)("div",{style:c},Object(a.c)("li",{ref:t.liRefs[o],style:{width:r||0-2*K.l2.fileLi.padding-2*K.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(D["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)(i.a.Fragment,null,s.content)),Object(a.c)("div",{className:"date ".concat(n)},Object(P.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}(i.a.Component),W=i.a.memo(H,(function(t,n){return!1})),q=Object(s.a)({},p.a),V=(q.els,q.colors),K=(q.font,q.sizes),J=e(158),G=e(26),Y=function(t){return Object(a.c)("div",{className:"folder-tree-view-component"},Object(a.c)("h3",{className:"subtitle"},_.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){console.log("ONFOLDERCLOSE",n),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,i=Object(o.useState)(!1),r=Object(c.a)(i,2),l=r[0],s=r[1],u=Object(o.useState)(!1),d=Object(c.a)(u,2),f=d[0],b=d[1],g=Object(o.useState)(""),h=Object(c.a)(g,2),m=h[0],v=h[1];Object(o.useEffect)((function(){e&&!n.folder.children||e&&n.folder.children&&0===n.folder.children.length?b(!0):b(!1)}),[n.folder.children,e]);var w=Object(G.a)(n.current,n.folder.key);return Object(a.c)("li",{className:"folder-wrapper ".concat(w?"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(m),onDragEnter:function(t){v("drag")},onDrop:function(t){v("")},onDragLeave:function(t){v("")}},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(_.a.renameFolderPrompt," "),n.folder.title);t&&""!==t&&t!==n.folder.title&&n.onFolderMenuAction("rename",n.folder,t),s(!1)}},_.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(_.a.createFolderPrompt,' "').concat(n.folder.path,'"?'),userInput:!0,onAccept:function(t){t&&""!==t&&n.onFolderMenuAction("create",n.folder,t)},onRefuse:function(){}})})),s(!1)}},_.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)}},_.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(_.a.deleteFolderPrompt,' "').concat(n.folder.path,'"?'),(function(){n.onFolderMenuAction("delete",n.folder)}))}))}},_.a.deleteFolder))))),f&&Object(a.c)("div",{className:"loading"},"..."),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)(i.a.Fragment,null,n.length>0&&Object(a.c)("div",{className:"last-notes-component"},Object(a.c)("h3",{className:"subtitle"},_.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=i.a.memo(Z,(function(t,n){return t.files===n.files})),Q=e(58),tt=e(46),nt=function(t){var n=Object(o.useContext)(j.a),e=!!n&&n.status.searching.get;return Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"search-bar-component"},Object(a.c)("input",{type:"text",placeholder:_.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 i=n.ui.browser.folders.current.get();""===t.term&&""!==i&&(e=e+" "+i,o&&setTimeout((function(){var t=(o.selectionStart||0)-i.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&&_.a.searchingLabel)))},et=e(63),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.f)(n));window.open(e,"popupDetached","width=600,height=600")},it=function(t){var n=Object(o.useState)(0),e=Object(c.a)(n,2),i=e[0],r=e[1];Object(o.useEffect)((function(){r(t.startingIndex)}),[t.startingIndex]);var l=function(n){var e=i;e=-1===n&&0===i?t.images.length-1:1===n&&i===t.images.length-1?0:i+n,r(e),d(10)},s=Object(o.useState)(10),u=Object(c.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)([]),function(t){return setTimeout((function(){!function(){var n=document.getElementById(t),e=document.getElementById("lightbox-image-id"),o=50*(p-10)+99;if(p<10&&(o=10*-(10-p)+99),n&&e){n.style.transform="scale(".concat(o/100,")"),n.style.transformOrigin="top left";var i=n.naturalWidth/n.naturalHeight,c=e.offsetWidth,a=e.offsetHeight,r=c/a;i<r&&(n.style.height="".concat(a-10,"px")),i>r&&(n.style.width="".concat(c-10,"px"))}}()}),50),{}}),h=Object(o.useRef)(null),m=function(){var t="0px";if(h.current){var n=h.current.clientHeight;t="".concat(n-5,"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:h},t.images.map((function(n,e){return Object(a.c)("div",{key:e,id:"lightbox-image-id",className:"lightbox-image",style:{display:e===i?"flex":"none"}},Object(a.c)("div",{className:"image-zoom-wrapper",style:{lineHeight:m}},Object(a.c)("img",{id:"img-lightbox-id-".concat(e),style:g("img-lightbox-id-".concat(e)),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)}}]})))}))))},ct={onAccept:function(){},onRefuse:function(){}},at=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),r=e[0],l=e[1],s=Object(o.useState)(""),u=Object(c.a)(s,2),p=u[0],d=u[1],f=Object(o.useState)(null),b=Object(c.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(_.a.promptPopup.defaultTitle),v=Object(c.a)(m,2),w=v[0],O=v[1],j=Object(o.useState)(!1),x=Object(c.a)(j,2),k=x[0],y=x[1],C=Object(o.useState)(_.a.promptPopup.accept),E=Object(c.a)(C,2),S=E[0],T=E[1],I=Object(o.useState)(_.a.promptPopup.refuse),N=Object(c.a)(I,2),P=N[0],R=N[1],A=function(t){l(!0),d(t.text),t.acceptLabelButton&&T(t.acceptLabelButton),t.refuseLabelButton&&R(t.refuseLabelButton),t.title&&O(t.title),t.userInput&&h(""),t.onAccept&&(ct.onAccept=t.onAccept),t.onRefuse?(ct.onRefuse=t.onRefuse,y(!0)):y(!1)},F=function(){l(!1),h(null),O(""),d(""),y(!1)},L={confirm:function(t,cb,n){A({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){A({title:n,text:t,onAccept:cb,onRefuse:function(){}})},prompt:A};return{popupApi:L,PromptPopupComponent:function(){return Object(a.c)(i.a.Fragment,null,r&&Object(a.c)("div",{className:"prompt-popup-component"},Object(a.c)(tt.a,{title:w,onClose:F,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){ct.onAccept(g),F()}},S),k&&Object(a.c)("button",{value:"submit",className:"refuse submit-button",onClick:function(t){ct.onRefuse(g),F()}},P)))))}}},rt=e(166),lt=e(93),st=function(t){var n=Object(o.useContext)(j.a),e=Object(o.useState)(-1),i=Object(c.a)(e,2),r=i[0],l=i[1];return Object(a.c)("div",{className:"tab-list-wrapper-hover ".concat(t.pinStatus?"pinned":"unpinned")},Object(a.c)("div",{className:"top-hover-bar"}," "),Object(a.c)("div",{className:"tab-list-scroll-wrapper",style:{top:"".concat(t.pinStatus?0:-44,"px")}},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")}},"+"),Object(a.c)("div",{className:"tab-wrapper tab-more",onClick:function(n){t.onPinToggle()}},Object(a.c)(y.b,{name:"thumbtack"}))))))},ut=function(t){var n=Object(s.a)({},t),e=n.tab,o=n.pos,c="Six",l=e.grid.layout.length;return 2===l&&(c="Two"),3===l&&(c="Three"),4===l&&(c="Four"),5===l&&(c="Five"),c="faDice".concat(c),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)(i.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:c,color:"#b2b2b2"})),Object(a.c)("div",{className:"tab-close",onClick:function(){Object(j.d)((function(n){n.popup.confirm("".concat(_.a.deleteTabPrompt,' "').concat(e.name,'"?'),(function(){t.onUpdate("close",e)}))}))}},Object(a.c)(y.a,{name:"faPlus",color:"#b2b2b2"}))))},pt=i.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(159),ft=e(136),bt=e(160),gt=e(121),ht=e(84),mt=e(122),vt=e(116),wt=e(17),Ot=e(306),jt=e(35),xt=e(34),kt=e(101),yt=function(t){var n=Object(o.useState)(""),e=Object(c.a)(n,2),i=(e[0],e[1]),r=Object(o.useState)(t.view),l=Object(c.a)(r,2),s=l[0],u=(l[1],Object(jt.a)((function(){Object(j.d)((function(n){n.file.getContent(t.file.path,(function(n){i(n),t.searchedString&&Object(j.d)((function(n){setTimeout((function(){console.log("searchword",t.searchedString),n.ui.note.editorAction.dispatch({type:"searchWord",searchWordString:t.searchedString,windowId:t.windowId});var e=document.querySelector(".select-wrapper input");e&&(e.focus(),setTimeout((function(){e.focus(),setTimeout((function(){e.focus()}),100)}),50))}),300)}))}))}))}),200));Object(o.useEffect)((function(){u()}),[t.file,t.searchedString,s]);var p=t.height?t.height+"px":"100%",d=Object(o.useState)(t.windowId||Object(xt.a)()),f=Object(c.a)(d,2),b=f[0],g=f[1];return Object(o.useEffect)((function(){g(t.windowId||Object(xt.a)())}),[t.windowId]),Object(a.c)("div",{className:"note-preview-wrapper "+s,style:{height:p}},Object(a.c)(kt.a,{content:{i:b,file:t.file,active:!1,view:t.view},forceView:t.view,canEdit:!0,showViewToggler:t.showViewToggler,showToolbar:t.showToolbar,titleEditor:t.titleEditor,onLayoutUpdate:t.onLayoutUpdate||function(){}}))},_t=i.a.memo(yt,(function(t,n){return JSON.stringify(t)===JSON.stringify(n)})),Ct=e(137),Et=e(171),St=e(55),Tt=e(174),It=e(31),Nt="[PLUGIN CRON]";Object(It.a)("cron","trigger",(function(){At()}));var Pt="plugins-cron-infos",Rt=function(t,n){var e=[],o=[];Object(g.each)(n,(function(t,n){e.push(n),o.push(t)}));try{Object(Tt.a)(Function,e.concat([t.code])).apply(void 0,o)}catch(c){var i="[ERR in ".concat(t.type.toLocaleUpperCase()," plugin ").concat(t.name.toLocaleUpperCase(),"]: ").concat(c);console.log(i,c,{paramsNames:e,paramsValues:o,plugin:t}),console.trace(c),Object(It.d)("".concat(i))}},At=function(){Object(j.d)((function(t){t.plugins.list((function(n){t.cache.get(Pt,(function(e){e||(e={}),console.log(Nt,"starting new batch cron",{plugins:n,cronState:e}),Object(g.each)(n,(function(n){var o,i,c,a=!0;if(!1===(null===(o=n.options)||void 0===o?void 0:o.disabled)&&(a=!1),"background"===n.type&&a){e[n.name]||(e[n.name]={vars:{}});var r=60*((null===(i=n.options)||void 0===i?void 0:i.background_exec_interval_in_min)||60)*1e3,l=(new Date).getTime(),s=(null===(c=e[n.name])||void 0===c?void 0:c.lastRunTime)||0;if(s+r>l)return console.log(Nt,"bg plugin ".concat(n.name,", wait for ").concat(Math.round((s+r-l)/1e3)," seconds"));console.log(Nt,"exec the bg plugin ".concat(n.name,", last exec was ").concat(new Date(s).toJSON()));var u=e[n.name];Rt(n,{tiroApi:t,bgState:u}),e[n.name]&&!Object(g.isUndefined)(e[n.name])||(e[n.name]={vars:{}}),e[n.name].lastRunTime=l}})),t.cache.set(Pt,e,-1)}),{disableRamCache:!0})}))}))},Ft=e(60),Lt={charsStart:2},Dt=[{label:"loading...",value:""}],Mt="[Search Mode]",zt="[Explorer Mode]",Bt="[History Mode]",Ut="[Plugin Mode]",Ht={dict:{},config:{enabled:!0}},Wt=function(){Ht.config.enabled=!1,Ht.dict={}},qt={hasBeenLoaded:!1},Vt=function(t){var n=Object(o.useState)("editable"),e=Object(c.a)(n,2),i=e[0],l=e[1];Object(o.useEffect)((function(){L.current.focus()}),[i]);var u=Object(o.useState)([]),d=Object(c.a)(u,2),f=d[0],b=d[1],h=Object(o.useRef)([]),m=function(t){Object(g.isArray)(t)&&(b(t),h.current=t)},v=Object(o.useState)([]),w=Object(c.a)(v,2),O=w[0],x=w[1],k=function(t){console.log("setOptions",t),Object(j.d)((function(n){var e=n.tabs.active.get();"mobile"!==Object(r.a)()&&Object(g.each)(null===e||void 0===e?void 0:e.grid.content,(function(n){if(n.file){var e=n.file;Object(g.each)(t,(function(n,o){if(n&&n.value&&n.value===e.path)return delete t[o],!1}))}})),tn(t),x(t)}))},_=Object(o.useState)("No Options"),C=Object(c.a)(_,2),E=C[0],S=(C[1],function(n){Object(j.d)((function(e){e.ui.note.editorAction.dispatch({type:"insertText",insertText:Object(Et.a)(n)}),t.onClose()}))}),T=function(n){Object(j.d)((function(e){e.ui.floatingPanel.create({view:"editor",type:"file",file:n}),t.onClose()}))},I=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),i=e[0],l=e[1];return Object(o.useMemo)((function(){return Object(a.c)("div",{className:"path-option-wrapper device-".concat(Object(r.a)()),onMouseEnter:function(t){l(!0)},onMouseLeave:function(t){l(!1)}},Object(a.c)("div",{className:"file"},t.file.name),Object(a.c)("div",{className:"folder"},t.file.folder),i&&Object(a.c)("div",{className:"actions"},Object(a.c)("div",{className:"action",onClick:function(n){n.stopPropagation(),S(t.file)}},Object(a.c)(y.b,{name:"link",label:"insert note link in the current note"})),Ft.c.curr.beta_floating_windows&&Object(a.c)("div",{className:"action",onClick:function(n){n.stopPropagation(),T(t.file)}},Object(a.c)(y.b,{name:"window-restore",label:"Open note in a floating window"}))))}),[t.file,i])},N=function(t){return Object(a.c)(I,{file:t})},P=(Object(o.useRef)(!1),Object(o.useState)({indicatorsContainer:function(t,n){return Object(s.a)(Object(s.a)({},t),{},{display:"none"})},menuList:function(t,n){var e="mobile"===Object(r.a)()?{}:{maxHeight:"150px"};return Object(s.a)(Object(s.a)({},t),e)},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})},multiValueLabel:function(t,n){var e=Object(s.a)(Object(s.a)({},t),{},{color:"#919090!important"});return Object(s.a)({},e)},multiValueRemove:function(t,n){var e="mobile"===Object(r.a)()?"block":"none";return n.data.editable?t:Object(s.a)(Object(s.a)({},t),{},{display:e,opacity:"0.2",position:"relative",top:"3px"})}})),R=Object(c.a)(P,2),A=R[0],F=R[1];Object(o.useEffect)((function(){setTimeout((function(){A.menu=function(t,n){var e=(Object(r.a)(),"all");return Object(s.a)(Object(s.a)({},t),{},{position:"relative",pointerEvents:e})},F(A)}),500)}),[]);var L=Object(o.useRef)(),D=O[0]||{label:"",value:""},M=function(n){var e=Object(G.d)(n);Object(j.d)((function(n){n.ui.browser.goTo(e.folder,e.name,{openIn:"activeWindow"}),t.onClose()}))},z=Object(o.useState)(""),B=Object(c.a)(z,2),U=B[0],H=B[1],W=Object(o.useRef)(null);Object(o.useEffect)((function(){W.current=U}),[U]);var q=Object(o.useRef)("");Object(o.useEffect)((function(){!function(){var t=h.current,n=U.trim();if(un("editor"),0===t.length)"/"===n&&(Object(Ct.a)("omnibar_explorer"),Object(j.d)((function(t){H("");var n=t.ui.browser.folders.current.get();setTimeout((function(){console.log(t.ui.browser.folders.current.get())})),Q(n)}))),""===n&&ct(),"?"===n&&(Object(Ct.a)("omnibar_search"),tt()),":"===n&&bt(),","===n&&at();else if(t[0].label===Mt)et(t,n);else if(t[0].label===zt){var e=function(){var n=Object(wt.a)(t);n.shift();var e="";return Object(g.each)(n,(function(t){e+="/"+t.value})),e}();e.endsWith(".md")?(e=e.replace(t[0].label,""),M(e)):q.current!==e&&(q.current=e,Q(e))}else t[0].label===Ut?gt(n,t):t[0].label===Bt&&ft(n,t)}(),ht.current&&ht.current()}),[f,U]);var V='[OMNIBAR "ctrl+alt+space"] type "?" for search mode, "/" for explorer mode, ":" for plugin mode, "," for history mode',K=Object(o.useState)(V),J=Object(c.a)(K,2),Y=J[0],$=J[1],Z=Object(o.useRef)(0),X=Object(o.useRef)(""),Q=function(t){if(""!==t&&(t.endsWith("/")||(t+="/"),t!==X.current)){X.current=t,console.log("== EXPLORER",t),k(Dt),l("locked"),Z.current++;var n=Z.current;Object(j.d)((function(e){var o=[t];e.folders.get(o,(function(i){if(n===Z.current&&(i.folderPaths.join("")===o.join("")&&i.folders[0])){var c=i.folders[0].children;e.files.get(t,(function(n,e){if(e===t){var o=t.split("/"),i=[];i.push({value:zt,label:zt}),i.push({value:"/",label:"/"}),Object(g.each)(o,(function(t){""!==t&&i.push({value:t,label:t+"/"})}));var r=[];Object(a.c)("div",{style:{},className:"barimage"});Object(g.each)(c,(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},i=N(t);r.push({value:e,label:i,payload:o})})),m(i),k(r),l("editable")}}))}}))}))}},tt=function(){m([{value:Mt,label:Mt}])},nt=Object(o.useRef)(""),et=function(t,n){if(t[1]){if(2===t.length)un("editor"),it(n,t[1].label,t);else if(3===t.length&&ot.current===t[2].value)un("preview"),console.log("STEP 3-1 (optional) : filter found results",ot.current);else if(3===t.length||4===t.length){var e;console.log("STEP 3-2 : jump to page",{w:ot.current,stags:t});var o=t.length-1;if(null===(e=t[o].payload)||void 0===e||!e.file)return;var i=t[o].payload.file;M(i.path)}}else"?"===n&&Object(j.d)((function(t){var n=t.ui.browser.folders.current.get;H(n)})),""===n?H(nt.current):nt.current=n.slice(0,-1),$('Path to search (ex:"/path/to/folder") + ENTER'),k([{label:n,value:n}])},ot=Object(o.useRef)(null),it=Object(jt.a)((function(t,n,e){var o=n,i=t;if(i&&o&&i.length>=Lt.charsStart&&o.length>0){$('Searching "'.concat(i,'" in "').concat(o,'" ...')),k(Dt);var c=i.includes("*"),r=[];k(r),ot.current=i,dt([].concat(Object(wt.a)(e),[{label:i,value:i}])),Object(j.d)((function(t){t.search.word(i,o,(function(t){Object(g.each)(t,(function(t){Object(g.each)(t.results,(function(n){var e=c?"(".concat(i,")"):"",o="".concat(t.file.path," ").concat(e),l=n.indexOf(i),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));var f=u,b=u.replaceAll(i,"<b>".concat(i,"</b>")),g=Object(a.c)("div",{className:"path-option-wrapper"},Object(a.c)("div",{className:"search-location"},o),Object(a.c)("div",{className:"occur-wrapper",dangerouslySetInnerHTML:{__html:b}}));r.push({label:g,value:ot.current+t.file+f+o,payload:{file:t.file,line:f,raw:n}})}))})),0===r.length&&Pt(null),r.unshift({label:"\ud83d\udd0e Filter the ".concat(r.length,' results for "').concat(ot.current,'"'),value:ot.current}),$("".concat(r.length-1,' results found for "').concat(i,'" in "').concat(o,'" ')),k(r)}))}))}else $("Type the searched word"),k([]),setTimeout((function(){L.current.focus()}),100),Pt(null),ot.current=""}),500),ct=function(){var n;$(V);var e=function(t){var n=[];return Object(g.each)(t,(function(t){var e={value:t.path,label:N(t),payload:{file:t}};n.push(e)})),n}(t.lastNotes),o=e.shift(),i=e.shift();e.unshift(o),e.unshift(i);var c=e[0]?null===(n=e[0].payload)||void 0===n?void 0:n.file:null;c&&Pt(c),k(e)},at=function(){m([{value:Bt,label:Bt}])};Object(o.useEffect)((function(){qt.hasBeenLoaded||(pt(),qt.hasBeenLoaded=!0)}),[]);var rt=Object(St.a)("omni-history",[]),lt=Object(c.a)(rt,3),st=lt[0],ut=lt[1],pt=lt[2],dt=function(t){console.log("addToOmniHistory");var n=[];Object(g.each)(t,(function(t){n.push(t.label)}));var e=n.join(" "),o={options:t,id:e},i=st.filter((function(t){return t.id!==e})),c=[o].concat(Object(wt.a)(i));c.length>100&&c.splice(0,100),console.log("[HIST mode] add to omnihist ",{nItem:o,nItems:c}),ut(c)},ft=function(t,n){if(Pt(null),n[1]){if(n[1]){var e;console.log("HIST selected",n[1]);var o=null===(e=n[1].payload)||void 0===e?void 0:e.options;if(!o)return;var i=o.pop();i&&H(i.label),m(o)}}else{var c=st,a=[];k(a),Object(g.each)(c,(function(t){a.push({label:t.id,value:t.id,payload:t})})),$("history mode"),k(a),","===t&&H("")}},bt=function(){m([{value:Ut,label:Ut}])},gt=function(n,e){Pt(null),Object(j.d)((function(o){if(1===e.length){var i=[];o.plugins.list((function(t){Object(g.each)(t,(function(t){"bar"===t.type&&i.push({label:t.name,value:t})})),k(i),":"===n&&H(""),i=Object(g.orderBy)(i,["label"]),$("".concat(i.length," bar plugins found"))}))}else if(e.length>=2){var c={input:n,setInputTxt:H,inputTxt:U,inputTxtRef:W,options:O,setOptions:k,onChange:ht,onClose:t.onClose,onHide:t.onHide,close:t.onClose,hide:t.onHide,selectedOptionRef:h,setSelectedOption:m,lodash:g,selectedTags:e,setNotePreview:Pt,notePreview:It,setHtmlPreview:Kt,htmlPreview:Vt,disableCache:Wt},a=e[1].value;k(Dt),Object(j.d)((function(t){Rt(a,{barApi:c,tiroApi:t})}))}}))},ht=Object(o.useRef)(null),mt=Object(o.useState)(Object(xt.a)()),vt=Object(c.a)(mt,2),kt=vt[0],yt=(vt[1],Object(o.useState)(null)),Tt=Object(c.a)(yt,2),It=Tt[0],Nt=Tt[1],Pt=function(t){Nt(t)},At=Object(o.useState)(null),Ht=Object(c.a)(At,2),Vt=Ht[0],Kt=Ht[1],Jt=Object(o.useState)(void 0),Gt=Object(c.a)(Jt,2),Yt=Gt[0],$t=Gt[1],Zt=function(t,n){var e=h.current;e[0]&&e[0].label===zt?Pt(t):e[0]&&e[0].label===Mt?(Pt(t),setTimeout((function(){$t(n)}),300)):e[0]?Pt(null):Pt(t)},Xt=Object(o.useRef)([]),Qt=Object(jt.a)((function(){var t=document.querySelectorAll("div[id*='-option']");if(0===t.length)return Pt(null);Object(g.each)(t,(function(t){if("rgb(222, 235, 255)"===getComputedStyle(t)["background-color"]){var n=parseInt(t.id.split("-").pop()),e=O[n].payload;if(!e)return;var o=e.file,i=e.line||void 0;Zt(o,i)}}))}),400),tn=Object(jt.a)((function(t){!function(t){Object(g.each)(Xt.current,(function(t){t.disconnect()})),Xt.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"]&&O[e]&&O[e].payload){var o=O[e].payload;if(!o)return;var i=o.file,c=o.line||void 0;document.querySelectorAll("div[id*='-option']"),Zt(i,c)}}));e.observe(t,{childList:!0,attributes:!0,subtree:!1}),Xt.current.push(e)}))}()}),100);Object(o.useEffect)((function(){tn(O)}),[O,U]);var nn=Object(o.useState)(300),en=Object(c.a)(nn,2),on=en[0],cn=en[1],an=Object(o.useRef)(null);Object(jt.a)((function(){if(an&&an.current){var t=an.current.clientHeight+30,n=window.innerHeight-t-50;on!==n&&cn(n)}}),10)();var rn=Object(o.useState)("editor"),ln=Object(c.a)(rn,2),sn=ln[0],un=ln[1];return Object(a.c)("div",{className:"omnibar-popup-bg ".concat(t.show?"":"hide"),onClick:function(n){t.onClose()}},Object(a.c)("div",{className:"omnibar-popup-wrapper device-".concat(Object(r.a)()," ").concat(i)},Object(a.c)("div",{className:"flex-wrapper",onClick:function(t){t.stopPropagation()}},Object(a.c)("div",{className:"select-wrapper",ref:an},Object(a.c)("div",{className:"help"},Y),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:L,menuIsOpen:!0,defaultValue:D,value:f,autoFocus:!0,isDisabled:"locked"===i,onChange:function(t,n){var e=t[0];if(e&&e.payload&&e.payload.file){var o=e.payload.file;M(o.path),t=[]}m(t)},openMenuOnClick:!1,inputValue:U,onInputChange:function(t,n){Qt(),"input-blur"===n.action||"menu-close"===n.action||H(t)},onFocus:function(t){},options:O,styles:A,noOptionsMessage:function(){return E}})),It&&"mobile"!==Object(r.a)()&&Object(a.c)("div",{className:"preview-wrapper ".concat(It?"note-preview":"html-preview-wrapper"),style:{height:on}},It&&"mobile"!==Object(r.a)()&&Object(a.c)(_t,{file:It,showToolbar:!0,titleEditor:!1,searchedString:Yt,height:on,view:sn,windowId:kt}),Vt&&Object(a.c)("div",{className:"html-preview",dangerouslySetInnerHTML:{__html:Vt},style:{height:on}})))))},Kt=function(t){var n=Object(o.useState)(""),e=Object(c.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(G.d)(t.filePath),i=n.note.render({raw:e,file:o});l(i)}))}))}),[t.filePath]),Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"rendered-note-component"},Object(a.c)("span",{className:"rendered-note-content-wrapper",dangerouslySetInnerHTML:{__html:r}})))},Jt=function(t){return Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"shortcut-component"},Object(a.c)("h3",{className:"subtitle"},"shortcuts"),Object(a.c)(Kt,{filePath:t.filePath})))},Gt=e(117),Yt=e(176),$t=e(169);Object(It.a)("notification","emit",(function(t,n){var e=t||"";Object(j.d)((function(o){console.log(t,n),o.ui.notification.emit({content:(new Date).toJSON()+" \n\n <br/> test notif => \n"+e,options:Object(s.a)({},n)})}))}));var Zt=function(t){var n=Object(o.useState)([]),e=Object(c.a)(n,2),i=e[0],r=e[1],l=Object(o.useRef)([]);Object(o.useEffect)((function(){Object(j.d)((function(t){t.socket.get((function(t){t.on("getNotification",(function(t){var cb;cb=function(n){if(!0===!n)return console.log("[NOTIFS] notifications disabled, not displaying it");t.notification.id||(t.notification.id=Object(xt.a)()),p(t.notification),u(t.notification)},Object(j.d)((function(t){cb(!t.userSettings.get("view_disable_notification_popups"))}))}))}))}))}),[]);var s=Object(o.useRef)({}),u=function(t){var n,e=1e3*((null===(n=t.options)||void 0===n?void 0:n.hideAfter)||10);e<0||t.id&&(s.current[t.id]=setTimeout((function(){d(t.id)}),e))},p=function(t){l.current=l.current.filter((function(n){return n.id!==t.id})),t.id&&s.current[t.id]&&clearTimeout(s.current[t.id]),l.current.unshift(t),r(Object(wt.a)(l.current))},d=function(t){t&&(l.current=l.current.filter((function(n){return n.id!==t})),r(Object(wt.a)(l.current)))},f=function(t){var n,e,o="normal";return null!==(n=t.options)&&void 0!==n&&n.type&&(o=null===(e=t.options)||void 0===e?void 0:e.type),o};return Object(a.c)("div",{className:"notifications-center-wrapper"},Object(a.c)("div",{className:"notifications-list"},i.map((function(t){return Object(a.c)("div",{key:t.id,className:"notif-wrapper notif-type-".concat(f(t))},Object(a.c)("div",{className:"notif-close",onClick:function(n){d(t.id)}},Object(a.c)(y.b,{name:"close"})),Object(a.c)("div",{className:"notif-content",dangerouslySetInnerHTML:{__html:t.content}}))}))))},Xt=e(165),Qt=e(64),tn=function(t){var n,e=Object(G.d)(t.notePreview.filepath);Object(o.useEffect)((function(){s("note-preview-popup-wid-".concat(Object(xt.a)()))}),[]);var i=Object(o.useState)(""),r=Object(c.a)(i,2),l=r[0],s=r[1];return Object(a.c)("div",{className:"page-link-preview-popup-ext",onMouseLeave:function(t){Object(j.d)((function(t){t.ui.notePreviewPopup.close()}))},style:{left:t.notePreview.position[0],top:t.notePreview.position[1]}},Object(a.c)("div",{className:"click-throught",onClick:function(n){var e,o=Object(G.d)(t.notePreview.filepath);o&&null!==(e=t.notePreview.opts)&&void 0!==e&&e.windowIdToOpenIn&&(Object(Qt.d)(!0),Object(j.d)((function(n){var e;n.ui.browser.goTo(o.folder,o.name,{openIn:null===(e=t.notePreview.opts)||void 0===e?void 0:e.windowIdToOpenIn})})))}}),Object(a.c)("div",{className:"page-link-preview-popup-int"},Object(a.c)(_t,{file:e,searchedString:null===(n=t.notePreview.opts)||void 0===n?void 0:n.searchedString,windowId:l,showToolbar:!0,titleEditor:!1,view:"editor",linkPreview:!1})))},nn=400,en=300,on=e(91),cn=e(77),an=e(82),rn=(e(493),window._tiro_generatePluginsMarketplaceHtml?window._tiro_generatePluginsMarketplaceHtml:function(){}),ln=function(t){var n=Object(o.useState)([]),e=Object(c.a)(n,2),i=e[0],r=e[1],l=Object(o.useState)(""),s=Object(c.a)(l,2),u=s[0],p=s[1];return Object(o.useEffect)((function(){Object(j.d)((function(t){t.plugins.marketplace.fetchList((function(t){r(t);var n=rn({pluginsDescriptions:t,fullDisplayMode:!0,onPluginClick:function(t){console.log("pluginClick",t)},onSettingChange:function(t){console.log("onSettingChange",t)}});p(n)}))}))}),[]),Object(a.c)("div",{className:"plugins-marketplace-popup-wrapper"},Object(a.c)(tt.a,{title:"Plugins Marketplace",onClose:function(){t.onClose()}},i.length>0&&Object(a.c)("div",{id:"plugin-marketplace-placeholder",dangerouslySetInnerHTML:{__html:u}}),0===i.length&&Object(a.c)("div",{className:"plugins-list-loading"},"Contacting Marketplace...")))},sn=e(119),un=e(309),pn=e(98),dn=e.n(pn),fn=e(62),bn=15,gn=!1,hn=function(){if(gn)return bn;var t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t);var n=document.createElement("div");return t.appendChild(n),bn=t.offsetWidth-n.offsetWidth,t.parentNode.removeChild(t),gn=!0,bn},mn=function(t){var n=Object(o.useRef)(t.panel);Object(o.useEffect)((function(){n.current=t.panel}),[t.panel]);var e=function(n){t.onPanelUpdate&&Object(j.d)((function(t){t.ui.floatingPanel.update(n)}))},i=Object(o.useState)(!1),r=Object(c.a)(i,2),l=r[0],u=r[1],p=function(t){u(t)},d=Object(o.useState)(!1),f=Object(c.a)(d,2),g=f[0],h=f[1],m=function(){N(),h(!0),t.onPanelDragStart()},v=function(){h(!1),t.onPanelDragEnd()},w=Object(o.useState)(t.panel),O=Object(c.a)(w,2),x=O[0],k=O[1],_=Object(jt.a)((function(){v()}),500),C=t.panel.size.height;t.panel.ctagConfig&&(t.panel.ctagConfig.opts||(t.panel.ctagConfig.opts={}),t.panel.ctagConfig.opts.wrapperHeight="100%",t.panel.ctagConfig.opts.sandboxed=!1);var E=Object(o.useState)(!0),S=Object(c.a)(E,2),T=S[0],I=S[1],N=function(){t.highestVisibleZIndex!==t.panel.zIndex&&Object(j.d)((function(n){n.ui.floatingPanel.pushWindowOnTop(t.panel.id)}))},P=l&&t.panelsVisibleNumber>1&&t.highestVisibleZIndex!==t.panel.zIndex,R=Object(o.useState)(Object(xt.a)()),A=Object(c.a)(R,2),F=A[0];A[1];return t.panel.ctagConfig&&(t.panel.ctagConfig.opts||(t.panel.ctagConfig.opts={}),t.panel.ctagConfig.opts.windowId=F),Object(a.c)("div",{className:"floating-panel-wrapper ".concat(t.panel.status),style:{zIndex:t.panel.zIndex},key:t.panel.id,onMouseDown:function(){N()}},Object(a.c)(dn.a,{cancel:"body",handle:".handle",position:t.panel.position,scale:1,onStart:function(n,o){N(),m(),e(Object(s.a)(Object(s.a)({},t.panel),{},{position:{x:o.x,y:o.y}}))},onDrag:function(n,o){e(Object(s.a)(Object(s.a)({},t.panel),{},{position:{x:o.x,y:o.y}}))},onStop:function(n,o){v(),e(Object(s.a)(Object(s.a)({},t.panel),{},{position:{x:o.x,y:o.y}}))}},Object(a.c)(un.a,{boundsByDirection:!0,className:"floating-panel",size:t.panel.size,onResize:function(n,o,i,c){e(Object(s.a)(Object(s.a)({},t.panel),{},{size:{width:i.offsetWidth,height:i.offsetHeight}})),m(),_()}},Object(a.c)("div",{className:"floating-panel__wrapper"},Object(a.c)("div",{className:"floating-panel__actions"},Object(a.c)(b.a,{class:"floating-bar-toolbar",size:1,buttons:[{title:"Move Window",customHtml:Object(a.c)("div",{className:"handle"},Object(a.c)(y.b,{name:"grip-vertical"})),action:function(){}},{title:"Minimize",icon:"window-minimize",action:function(){e(Object(s.a)(Object(s.a)({},t.panel),{},{status:"minimized",zIndex:1e3}))}},{title:"Maximize",icon:"expand",action:function(){var n=t.panel;n.size.width===window.innerWidth&&n.size.height===window.innerHeight&&0===n.position.x&&0===n.position.y?e(x):(k(n),e(Object(s.a)(Object(s.a)({},n),{},{size:{width:window.innerWidth,height:window.innerHeight},position:{x:0,y:0}})))}},{title:"Reload content",icon:"rotate-right",action:function(){I(!1),setTimeout((function(){I(!0)}),100)}},{title:"Close window",icon:"xmark",action:function(){Object(j.d)((function(n){n.ui.floatingPanel.delete(t.panel.id)}))}}]})),T&&Object(a.c)("div",{className:"floating-panel__content content-type-".concat(t.panel.type),style:{height:C},onMouseDown:function(){N()},onMouseEnter:function(){p(!0)},onMouseLeave:function(){p(!1)}},Object(a.c)("div",{className:"floating-panel__drag-overlay ".concat(g?"":"hide"," ").concat(P?"hover-mode":""),onMouseDown:function(){N(),p(!1)}}),"file"===t.panel.type&&t.panel.file&&Object(a.c)("div",{className:"floating-panel__inner-content"},Object(a.c)(_t,{file:t.panel.file,height:t.panel.size.height,view:t.panel.view||"editor",titleEditor:"disabled",onLayoutUpdate:function(t,o){"windowViewChange"===t&&null!==o&&void 0!==o&&o.view&&e(Object(s.a)(Object(s.a)({},n.current),{},{view:o.view}))}})),"ctag"===t.panel.type&&t.panel.ctagConfig&&Object(a.c)("div",{className:"floating-panel__inner-content window-id-sizeref-".concat(F),style:{height:C}},Object(fn.a)(t.panel.ctagConfig)))))))},vn=function(t){var n=t.panels,e=Object(o.useRef)([]);Object(o.useEffect)((function(){e.current=n}),[n]);var i=function(t){Object(j.d)((function(n){n.ui.floatingPanel.update(t)}))},r=Object(o.useState)(!1),l=Object(c.a)(r,2),s=l[0],u=l[1],p=function(t){return function(){u("start"===t)}},d=Object(o.useState)(!1),f=Object(c.a)(d,2),b=f[0],h=f[1];Object(o.useEffect)((function(){if(!b&&0!==e.current.length){h(!0);var t=Object(g.cloneDeep)(e.current);t.forEach((function(t){"minimized"===t.status&&(t.status="hidden")})),Object(j.d)((function(n){n.ui.floatingPanel.updateAll(t)}))}}),[n,b]);var m=Object(o.useState)([]),v=Object(c.a)(m,2),w=v[0],O=v[1],x=Object(o.useState)(0),k=Object(c.a)(x,2),_=k[0],C=k[1],E=Object(o.useState)(0),S=Object(c.a)(E,2),T=S[0],I=S[1],N=Object(jt.a)((function(){var t=0;n.forEach((function(n){void 0!==n.zIndex&&n.zIndex>t&&(t=n.zIndex)})),C(t),I(n.filter((function(t){return"visible"===t.status})).length);var o=Object(g.cloneDeep)(e.current),i=o.filter((function(t){return"minimized"===t.status})),c=o.filter((function(t){return"hidden"===t.status})),a=o.filter((function(t){return"visible"===t.status})),r=i.concat(c).concat(a);r=Object(g.sortBy)(r,(function(t){return t.orderPosition})),O(r)}),100);return Object(o.useEffect)((function(){N()}),[n]),Object(a.c)("div",{className:"floating-panels-wrapper",style:{pointerEvents:s?"all":"none"}},n.map((function(t){return"hidden"!==t.status&&Object(a.c)("div",{key:t.id},Object(a.c)(mn,{panel:t,onPanelUpdate:i,onPanelDragStart:p("start"),onPanelDragEnd:p("end"),panelsVisibleNumber:T,highestVisibleZIndex:_}))})),Object(a.c)("div",{className:"panels-minimized-bottom-bar-wrapper",style:{height:"".concat(35+hn(),"px"),bottom:"-".concat(hn(),"px")}},Object(a.c)("div",{className:"panels-minimized-bottom-bar-background ".concat(t.pinStatus?"pinned":"")}," "),Object(a.c)("div",{className:"bottom-hover-bar"}," "),Object(a.c)("div",{className:"panels-minimized-bottom-bar ".concat(t.pinStatus?"pinned":""),style:{width:"".concat(n.length>8?15*n.length:100,"%")}},Object(a.c)("div",{className:"floating-panels-bottom-toolbar"},Object(a.c)("div",{className:"btn-action reinit-position-and-size",onClick:function(){Object(j.d)((function(t){t.ui.floatingPanel.actionAll("organizeWindows")}))}},Object(a.c)(y.b,{name:"layer-group"})," "),Object(a.c)("div",{className:"btn-action pin-bar",onClick:function(){return t.onPinChange(!t.pinStatus)}}," ",Object(a.c)(y.b,{name:"thumbtack"})," ")),w.map((function(t){return"visible"!==t.status&&Object(a.c)("div",{key:t.id,className:"panel-minimized",onClick:function(n){!function(t){t.status="visible",i(t),Object(j.d)((function(n){n.ui.floatingPanel.pushWindowOnTop(t.id),n.ui.floatingPanel.updateOrderPosition(t.id,"first")}))}(t)}},Object(a.c)("div",{className:"label"},function(t){if(!t)return"";if("file"===t.type)return t.file.name;if("ctag"===t.type){var n,e;if("iframe"===(null===(n=t.ctagConfig)||void 0===n?void 0:n.tagName)){var o,i=null===(o=t.ctagConfig)||void 0===o?void 0:o.content;return Object(et.b)(i)}return"".concat(null===(e=t.ctagConfig)||void 0===e?void 0:e.tagName," | ").concat(t.file.name)}return""}(t)),"minimized"===t.status&&Object(a.c)("div",{className:"active-icon"},Object(a.c)(y.b,{name:"circle"})),Object(a.c)("div",{className:"close-btn",onClick:function(n){n.stopPropagation(),"minimized"===t.status?function(t){t.status="hidden",i(t)}(t):function(t){Object(j.d)((function(n){n.ui.floatingPanel.delete(t.id)}))}(t)}},Object(a.c)(y.b,{name:"xmark"})))})))))},wn=e(156),On=e(170),jn=(Object(r.a)(),Object(s.a)({},p.a)),xn=jn.els,kn=jn.colors,yn=(jn.font,jn.sizes),_n=Object(g.memoize)((function(t,n,e,o){return Cn(t,n,e,o)}),(function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return JSON.stringify(n)})),Cn=function(t,n,e,o){var i=Object(sn.a)("CssApp2"+t+n),c="\n\n\t\theight:100%;\n\t\t.main-wrapper,\n\t\t.mobile-view-container {\n\t\t\theight:100%;\n\t\t}\n\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// for preview css\n\t\t".concat(Object(on.d)(),"\n\t\t// FILE RESSOURCE PREVIEW\n\t\t").concat(Object(cn.b)(),"\n\t\t// PREVIEW LINK\n\t\t").concat(Object(Qt.b)(),"\n\t\t").concat(Object(an.e)(),"\n\n\n\t\t\n\t\t").concat(Object(On.a)(),"\n\t\t").concat("\n .mobile-view-preview {\n .page-link-preview-popup-int {\n .editor-area {\n display:block;\n }\n .preview-area-wrapper {\n display:none;\n }\n }\n }\n .page-link-preview-popup-ext {\n // pointer-events: none;\n position: absolute;\n z-index: 10001;\n .click-throught {\n cursor:pointer;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 30px;\n }\n .page-link-preview-popup-int {\n cursor:default;\n margin-top: 20px;\n background: white;\n width: ".concat(nn,"px;\n height: ").concat(en,"px;\n border-radius: 10px;\n box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.1);\n overflow-y:hidden;\n overflow-x:hidden;\n .cm-scroller {\n width: calc(100% - 40px)!important;\n }\n\n // disable links inside\n .title-search-link {\n pointer-events: none;\n }\n }\n .\n }\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.draggable-grid-editors-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.draggable-grid-editors-view {\n \n }\n .right-wrapper.image-gallery-view {\n display: none;\n }\n }\n"),"\n\t\t").concat("\n.notifications-center-wrapper {\n\t\tposition: fixed;\n\t\ttop: 0px;\n\t\tright: 0px;\n\t\tz-index: 2000;\n\n\t\t.notifications-list {\n\t\t\t\t.notif-wrapper {\n\t\t\t\t\t\t// background: ".concat(p.a.colors.main,"; \n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tmargin: 5px;\n\n\n\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\t\t\t.notif-close {\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\ttop: 3px;\n\t\t\t\t\t\t\t\tright: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.notif-content {\n\t\t\t\t\t\t\t\tpadding: 5px 29px 5px 5px;\n\t\t\t\t\t\t\t\tmax-width: 190px;\n\t\t\t\t\t\t\t\tmax-height: 180px;\n\t\t\t\t\t\t\t\toverflow-y: auto;\n\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n"),"\n\t\t").concat(Object(vt.a)(),"\n\t\t").concat("\n.lightbox-component {\n position: fixed;\n\t\tz-index: 1500;\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 {\n\t\t\t\t\ttop: 3px;\n\t\t\t\t\tleft: 25px;\n\t\t\t\t}\n\t\t\t\t.dezoom {\n\t\t\t\t\ttop: 3px;\n\t\t\t\t\tleft: 8px;\n\t\t\t\t}\n\t\t\t\t.zoom, .dezoom {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\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.omnibar-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.omnibar-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: 10000;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.omnibar-popup-wrapper {\n\t\t\t\t\t\t\t\t&.locked {\n\t\t\t\t\t\t\t\t\tpointer-events:none;\n\t\t\t\t\t\t\t\t}\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\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t.search-location {\n\t\t\t\t\t\t\t\t\tcolor: #b3b1b1;\n\t\t\t\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.folder {\n\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.file {\n\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&.device-desktop .actions {\n\t\t\t\t\t\t\t\ttransition: all 0.2s;\n\t\t\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\t\t\t.action {\n\t\t\t\t\t\t\t\t\tmargin-left: 8px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t&.device-desktop:hover .actions {\n\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.actions {\n\t\t\t\t\t\t\t\tdisplay:flex;\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: 0px;\n\t\t\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\t.action {\n\t\t\t\t\t\t\t\t\ttransition: all 0.2s;\n\t\t\t\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\topacity: 1;\n\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}\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\t\t").concat("\n.device-view-mobile {\n\t.plugins-marketplace-popup-wrapper .popup-wrapper .popupContent {\n\t\twidth: 80vw;\n\t}\n}\n\n.plugins-list-loading {\n\tpadding: 60px;\n}\n\n.plugins-marketplace-popup-wrapper .popup-wrapper .popupContent {\n padding: 0px 20px;\n\twidth: 50vw;\n\tmin-height: 50vh;\n\tmax-height: 70vh;\n\toverflow-y: scroll;\n}\n\n\n","\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\t&.preview {\n\t\t\tpadding: 15px ;\n\t\t}\n\n\t\t\n\n\t\t".concat(Object(f.b)(),"\n\t\t").concat(Object(mt.b)(),"\n\n\t\t.preview-area-wrapper {\n\t\t\theight: calc(100% - 0px);\n\t\t\tmargin-top: 0px;\n\t\t}\n\n\t\t.preview-area {\n\t\t\twidth: calc(100%);\n\t\t\t// padding: 15px;\n\t\t}\n\n\t\t// .note-preview-wrapper .preview-area-wrapper\n\t\t//\n\t\t// PREVIEW\n\t\t//\n\t\t\n\t\t\n\t\t\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\t// height: 100%!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\n\n\t\t//\n\t\t// EDITOR VIEW\n\t\t//\n\n\t\t&.editor,\n\t\t.window-editor-wrapper,\n\t\t.dual-view-wrapper,\n\t\t.editor-area,\n\t\t.main-editor-wrapper,\n\t\t.codemirror-editor-wrapper {height: 100%}\n\n\n}\n"),"\n\t\t").concat(Object(Yt.b)(),"\n\n\t\t").concat(Object(tt.b)(),"\n\t\t").concat(Object(Gt.b)(e),"\n\t\t").concat(Object($t.b)(),"\n\t\t").concat(Object(wn.b)(),"\n\n\t\t").concat("\n\n//\n// PANEL\n//\n// resizing handles\n.floating-panel__wrapper + div > div { z-index: 100000;}\n\n.floating-panels-wrapper {\n \n \n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n pointer-events: none;\n .floating-panel-wrapper {\n &.minimized {\n display:none;\n }\n position: absolute;\n top: 0px;\n left: 0px;\n .floating-panel {\n overflow: hidden;\n background: #fff;\n border: 1px solid #000;\n border-radius: 4px;\n box-shadow: 0 0 4px rgba(0,0,0,0.3);\n z-index: 1000;\n pointer-events: all;\n .floating-panel__drag-overlay {\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n background: rgba(255,255,255,0.5);\n z-index: 100;\n opacity: 0.5;\n transition: 0.1s opacity;\n &.hide {\n opacity: 0;\n pointer-events: none;\n }\n &.hover-mode {\n opacity: 0.5;\n pointer-events: all;\n }\n }\n .floating-panel__actions {\n position: absolute;\n top: 4px;\n transition: 0.5s all;\n right: 40px;\n z-index:102;\n padding: 4px;\n &:hover {\n background: white;\n padding: 4px;\n box-shadow: 0px 0px 4px rgba(0,0,0,0.3);\n border-radius: 4px;\n }\n }\n .floating-panel__content {\n // overflow-y: auto;\n // overflow: hidden;\n position: absolute;\n top:0px;\n left: 0px;\n width: 100%;\n overflow: hidden;\n &.content-type-file {\n }\n }\n }\n }\n \n \n}\n\n\n//\n// BAR\n//\n.panels-minimized-bottom-bar-wrapper {\n position: absolute;\n left: left: 18px;\n width: 100vw;\n overflow: hidden;\n overflow-x: scroll;\n pointer-events: none;\n\n .panels-minimized-bottom-bar-background {\n &.pinned {\n bottom: 0px;\n }\n transition: all 0.3s ease-in-out 0.5s;\n position: fixed;\n left: 0px;\n width: 100%;\n height: 30px;\n background: #fff;\n z-index: 11;\n pointer-events: all;\n bottom: -30px;\n }\n\n .bottom-hover-bar {\n pointer-events: all;\n cursor: pointer;\n position: absolute;\n width: 150vw;\n height: 15px;\n bottom: 0px;\n box-shadow: 0 0 0px rgba(0,0,0,0.3);\n z-index: 10;\n transition: 0.5s all;\n opacity: 0;\n }\n \n &:hover {\n .panels-minimized-bottom-bar-background {\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n bottom: 0px;\n }\n .panels-minimized-bottom-bar {\n bottom: 0px;\n \n }\n .bottom-hover-bar {\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n background: ".concat(p.a.colors.main,";\n opacity: 0.5;\n }\n }\n\n .panels-minimized-bottom-bar{\n z-index: 11;\n pointer-events: all;\n left: 18px;\n\n // transition: all 0.3s ease-in-out 0.5s, box-shadow 0.5s ease-in-out 0s;\n transition: all 0.3s ease-in-out 0.5s;\n \n position: absolute;\n width: 100%;\n bottom: -30px;\n &.pinned {\n bottom: 0px;\n }\n height: 30px;\n background: #fff;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n .floating-panels-bottom-toolbar {\n \n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n margin-left: 10px;\n .floating-bar-toolbar {\n }\n .btn-action {\n padding: 5px;\n margin: 0px 5px;\n cursor: pointer;\n transition: 0.3s all;\n &:hover {\n background: #f0f0f0;\n }\n }\n }\n }\n}\n\n\n.panel-minimized {\n background: #c9c9c9;\n margin: 0px 0px 0px 4px;\n border-radius: 7px;\n height: 24px;\n width: 5vw;\n display: flex;\n font-size:10px;\n overflow: hidden;\n align-content: center;\n justify-content: space-around;\n padding: 0 10px;\n cursor: pointer;\n transition: 0.5s all;\n position: relative;\n :hover {\n background: #f0f0f0;\n }\n .label {\n margin-top: 5px;\n height: 14px;\n overflow: hidden;\n }\n .active-icon {\n color: rgb(121, 121, 121);\n margin: 6px 6px 0px 6px;\n\n }\n .close-btn {\n paddding: 5px;\n margin-top: 6px;\n cursor: pointer;\n }\n}\n\n//\n// Modifying style of the note preview\n//\n.floating-panel__wrapper .note-preview-wrapper .cm-mdpreview-wrapper .cm-mdpreview-image img {\n\tmax-height: none;\n}\n.floating-panel__wrapper .note-preview-wrapper.preview {\n padding: 0px\n}\n\n\n.content-block.block-tag {\n left: 0px;\n width: calc(100%)\n}\n\n"),"\n\n\t\t").concat(Object(kt.b)(),"\n\t\t").concat(Object(f.b)(),"\n\t\t").concat(Object(d.c)(t),"\n\t\t").concat(Object(mt.b)(),"\n\t\t").concat(Object(ft.b)(),"\n\t\t").concat(Object(bt.b)(),"\n\n\t\t").concat(Object(Xt.b)(t,o),"\n\n\t\t.draggable-grid-editors-view {\n\t\t\twidth: ").concat("desktop"===Object(r.a)()?p.a.sizes.desktop.r:"navigator"!==t?100:0,"vw;\n\t\t\theight: ").concat("desktop"===Object(r.a)()?"calc(100vh - ".concat(o.bottomBar?"30":"10","px)"):"100%",";\n\t\t\tdisplay: ").concat("desktop"===Object(r.a)()||"navigator"!==t?"block":"none",";\n\t\t\tpadding-top: 0px;\n\t\t\th3 {\n\t\t\t\tmargin-bottom: 0px;\n\t\t\t}\n\t\t\tpre {\n\t\t\t\t\twhite-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */\n\t\t\t\t\twhite-space: -pre-wrap; /* Opera */\n\t\t\t\t\twhite-space: -o-pre-wrap; /* Opera */\n\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\tword-wrap: break-word; /* IE 5.5+ */\n\t\t\t}\n\t\t}\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\t.loading {\n\t\t\tmargin-left: 30px;\n\t\t\tfont-size: 12px;\n\t\t\tfont-weight: 400;\n\t\t}\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.config-buttons-bar {\n\t\t\t\t\t\t\t\tbottom: 60px;\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t.config-buttons-bar {\n\t\t\t\t\tposition: fixed;\n\t\t\t\t\tbottom: 10px;\n\t\t\t\t\tleft: 3px;\n\t\t\t\t\tz-index: 11;\n\n\t\t\t\t\t.config-button {\n\t\t\t\t\t\t// margin-top: 10px;\n\t\t\t\t\t\topacity: 0.6;\n\t\t\t\t\t\ttransition: 0.2s all; \n\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t.plugins-marketplace-button {\n\n\t\t\t\t\t}\n\t\t\t\t\t.settings-button {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t \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(yn.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(kn.l2.bg,"; \n\t\t\t\t\t\twidth: ").concat("desktop"===Object(r.a)()?yn.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(yn.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(kn.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(yn.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(yn.search.padding,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(yn.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(yn.block,"px ").concat(yn.block,"px ").concat(yn.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(kn.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(kn.l2.text,";\n\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(kn.l2.text,";\n\t\t\t\t\t\t\t\t\t\t").concat(xn().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(yn.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(K.l2.fileLi.padding,"px ").concat(K.block-K.l2.fileLi.margin,"px;\n margin: ").concat(K.l2.fileLi.margin,"px ").concat(K.l2.fileLi.margin+5,"px ").concat(K.l2.fileLi.margin,"px ").concat(K.l2.fileLi.margin,"px ;\n display: block;\n cursor: pointer;\n position: relative;\n height: ").concat(K.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(K.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(K.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(K.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(kn.l2.bg,"; \n\t\t\t\t\t\t.image-gallery-header {\n\t\t\t\t\t\t\t\tpadding-top: ").concat(yn.search.padding,"px;\n\t\t\t\t\t\t\t\theight: ").concat(yn.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////////////////////////////////////////////v \n\t\t\t\t").concat("\n\n.tab-list-wrapper-hover {\n\t.top-hover-bar {\n\t\tcursor: pointer;\n\t\theight: 14px;\n\t\twidth: 100%;\n\t\tposition: absolute;\n\t\topacity: 0;\n\t\ttransition: 0.5s all;\n\t}\n\t&:hover {\n\t\t.top-hover-bar {\n\t\t\tbackground: ".concat(p.a.colors.main,";\n\t\t\topacity: 0.5;\n\t\t}\n\t}\n\ttransition: 0.5s all;\n\tposition: absolute;\n z-index: 22;\n\twidth: 100%;\n\t&.pinned {\n\t\tposition: initial;\n\t\t.top-hover-bar { display:none}\n\t}\n\t&.unpinned {\n\t\t.tab-list-scroll-wrapper {\n\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\t\t}\n\t}\n\t&:hover {\n\t\t.tab-list-scroll-wrapper {\n\t\t\ttop: 0px!important;\n\t\t}\n\t}\n}\n\n.tab-list-scroll-wrapper {\n\t\n\tposition: absolute;\n\theight: 44px;\n\twidth: 100%;\n\ttransition: all 0.3s ease-in-out;\n\ttransition-delay: 500ms, 0ms;\n\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)(o),"\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.draggable-grid-editors-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\t\t\t\t\n\t\t} // end main-wrapper\n\n\n\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 i(),Object(u.a)(c,";","")},En=function(t){return t.path.substr(0,t.path.length-(t.title.length+1))},Sn=function(t){var n=t.split("/");(n=n.filter((function(t){return""!==t}))).pop();var e="/"+n.join("/")+"/";return e=e.replaceAll("//","/")},Tn="\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",In=function(t,n,e,o){var i=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:i,promptAndBatchMoveFiles:function(n){var e=n.files,o=n.folderToDropInto,c="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(Tn,"\n");Object(j.d)((function(n){n.popup.confirm(c,(function(){!function(){for(var n=0;n<e.length;n++){var c=e[n],a="".concat(c.path),r="".concat(o.key,"/").concat(c.name);i(a,r),t()}}()}))}))},promptAndMoveFolder:function(e){var o=Object(s.a)({},e),i=o.folder,c=o.folderToDropInto,a=o.folderBasePath,r=o.newTitle,l=o.renameOnly,u=[i.path,"".concat(l?En(c):c.path,"/").concat(r||i.title)],p="".concat(a,"/").concat(u[0]),d="".concat(a,"/").concat(u[1]),f="\n".concat(_.a.moveFolderPrompt," <p>").concat(u[0],"</p> to <p>").concat(u[1],"</p>?\n").concat(Tn,"\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()}))}))}}},Nn=e(157),Pn="[LAST FILE]",Rn=w.a.client.log.verbose,An=e(162),Fn=e(175),Ln=e(89),Dn=function(t){var n=Object(o.useState)({}),e=Object(c.a)(n,2),i=e[0],r=e[1];Object(o.useEffect)((function(){}),[t.files]);var l=Object(o.useReducer)((function(t){return t+1}),0),s=Object(c.a)(l,2)[1],u=Object(o.useState)(2),d=Object(c.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>=U.a.length?0:f+1;Object(j.d)((function(e){e.userSettings.set("ui_filesList_sortMode",n),b(n),t.onSortFiles(Object(U.d)(t.files,n))}))}},Object(a.c)("span",null,t.files.length>0&&Object(a.c)("span",{className:"list-count"},"(",t.files.length,")"),U.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:i,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 c=t[o];i[c]&&!n||e.push(c)}e.length>1&&Object(j.d)((function(t){t.files.getPreviews(e,(function(t){Object(g.each)(t,(function(t){i[t.path]=t})),r(i),s()}))}))}(t,!0)}})))},Mn=e(100),zn="[PWA]",Bn=w.a.client.log.verbose,Un=e(124),Hn=e(29),Wn=function(){var t=[];return window.speechSynthesis.getVoices().forEach((function(n,e){var o=n.lang?" (".concat(n.lang,")"):"",i="".concat(n.name).concat(o);t.push({key:e,label:i,obj:n})})),t},qn=Object(T.a)((function t(n){var e=this;Object(S.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=[],i=0;i<n.length;i++){var c=n[i];if(c.length>e.chunkLength)for(var a=c.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(c)}return o},this.loadVoice=function(t){console.log("[TTS] LOAD VOICE",t),e.voice=t,e.pause(),e.play()},this.updateSpeed=function(t){e.speed=t,e.pause(),e.play()},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 i=-1;return Object(g.each)(e.chunkedText,(function(t,n){if(-1!==t.indexOf(o))return i=n,!1})),i},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(Hn.a.ressource,"").replace(Hn.a.ref,"").replace(Hn.a.baliseHtml,"").replace(/<[^>]*>?/gm," ").replace(/((<!--).+?(-->))/gm," ").replace(/(<!--).+?(-->)/gm," ").replace(/(\r\n|\n|\r)/gm," ").replace(/(\r\n|\n|\r)/gm," "),this.chunkedText=this.chunkText(this.text2read),console.log("[TTS] init new manager ",{p:n,text:this.chunkedText,length:this.chunkedText.length})})),Vn=e(32),Kn=e(50),Jn="[SCREEN WAKE LOCK]",Gn=null,Yn=function(){var t=Object(Kn.a)(Object(Vn.a)().mark((function t(){return Object(Vn.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:Gn=t.sent,console.log(Jn,"ACTIVE"),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(Jn,"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 $n=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),i=e[0],l=e[1],s=Object(h.a)("tts-selected-voice",0),u=Object(c.a)(s,2),p=u[0],d=u[1],f=Object(o.useState)(!1),b=Object(c.a)(f,2),g=b[0],m=b[1],v=function(t){!0===t?Yn():Gn&&Gn.release().then((function(){Gn=null,console.log(Jn,"DISABLED")})),m(t)},w=Object(h.a)("tts-pos-".concat(t.id),0),O=Object(c.a)(w,2),j=O[0],k=O[1],C=Object(h.a)("tts-rate",1),E=Object(c.a)(C,2),S=E[0],T=E[1],I=Object(o.useState)(0),N=Object(c.a)(I,2),P=N[0],R=N[1],A=Object(o.useState)(""),F=Object(c.a)(A,2),L=F[0],D=F[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*(P-j)/(60*S)),e=t(6*P/(60*S)),o=" ".concat(n," left of ").concat(e);D(o)}),[P,S,j]);var M=Object(o.useRef)();window.tts=M,Object(o.useEffect)((function(){M.current=new qn({text:t.fileContent}),M.current.goToChunk(j)}),[]),Object(o.useEffect)((function(){M.current.updateSpeed(S)}),[S]);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:P,currentChunk:j,isPlaying:i,currentText:n})}),[P,j,i]),Object(a.c)(Zn,null,Object(a.c)(tt.a,{title:"".concat(_.a.ttsPopup.title),onClose:function(){M.current.stop(),t.onUpdate({totalChunks:P,currentChunk:j,isPlaying:!1}),t.onClose()}},Object(a.c)(Q.a,{value:p,type:"select",list:Wn(),label:_.a.ttsPopup.voice,onSelectChange:function(t){!function(t){d(t);var n=Wn();n[p]&&M.current.loadVoice(n[p].obj)}(parseInt(t))}}),Object(a.c)("span",null," SPEED : "),Object(a.c)("input",{className:"speed-range",type:"range",value:S,min:"0",max:"3",step:"0.1",onChange:function(t){var n=t.target.value;T(n)}})," (",S,")",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:P,onChange:function(t){var n=parseInt(t.target.value);M.current.goToChunk(n),k(n)}})," / ",P,Object(a.c)("br",null),Object(a.c)("input",{type:"range",value:j,className:"range-pos",min:"0",max:P,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){i||M.current.goToChunk(j),i?M.current.stop():M.current.play()}},Object(a.c)(y.a,{name:i?"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"}))))},Zn=Object(Un.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;}}"}),Xn=(e(134),e(103)),Qn=function(t,n){Xn&&Xn.bind&&Xn.bind(t,n)},te=e(36),ne=e(173),ee=e(118);Object(ee.b)(Object(a.c)((function(){Object(o.useEffect)((function(){return setTimeout((function(){console.log(Nt,"starting frontendBackgroundPlugins Cron"),setInterval((function(){At()}),6e4)}),Object(g.random)(1e3,1e4)),Bn&&console.log(zn," init"),"serviceWorker"in navigator&&navigator.serviceWorker.register("/service-worker.js"),window.addEventListener("beforeinstallprompt",(function(t){t.preventDefault(),Bn&&console.log(zn," beforeinstallprompt WORKING=>",t),window.deferredPrompt=t})),console.log("========= [APP] MOUNTED on a ".concat(Object(r.a)())),Object(l.d)().then((function(t){V(!0),Rt&&Rt.status.ipsServer.set(t.ipsServer),Object(j.d)((function(t){t.ui.browser.folders.refreshFromBackend()}))})),t(),window.onkeydown=function(t){var n=z(t);Object(g.isNull)(D[n])||(D[n]=!0);var e="".concat(n,"-down");B[e]&&B[e]()},window.onkeyup=function(t){var n=z(t);Object(g.isNull)(D[n])||(D[n]=!1);var e="".concat(n,"-up");B[e]&&B[e]()},Object(It.a)("init","init",(function(){})),function(){console.log("app will unmount")}}),[]);var t=function(){setTimeout((function(){Object(et.d)(on)}),300)},n=function(){Lt.active.set(-1)},e=function(){Pt.ui.browser.files.set([])},u=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),r=e[0],s=e[1],u=Object(o.useState)(""),p=Object(c.a)(u,2),d=p[0],f=p[1],b=Object(o.useState)(""),g=Object(c.a)(b,2),h=g[0],m=g[1],v=Object(o.useState)(""),O=Object(c.a)(v,2),j=O[0],x=O[1],k=Object(o.useState)(),y=Object(c.a)(k,2),C=y[0],E=y[1],S="[SETUP CONFIG]",T=w.a.client.log.verbose,I=Object(o.useRef)(0);return Object(o.useEffect)((function(){return T&&console.log(S," init socket listener"),I.current=l.b.on("getSetupInfos",(function(n){"SUCCESS_CONFIG_CREATION"===n.code?(E(["success","".concat(_.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(){T&&console.log(S," clean socket listener"),l.b.off(I.current)}}),[]),{displayWelcomePopup:r,SetupPopupComponent:function(t){return Object(a.c)(i.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,_.a.setupForm.introText)," ",Object(a.c)("br",null),Object(a.c)("div",null,Object(a.c)(Q.a,{value:d,label:_.a.setupForm.user,explanation:_.a.setupForm.userExplanation,onChange:function(t){f(t)},shouldNotSelectOnClick:!0}),Object(a.c)(Q.a,{value:h,label:_.a.setupForm.password,type:"password",explanation:_.a.setupForm.passwordExplanation,onChange:function(t){m(t)},shouldNotSelectOnClick:!0}),Object(a.c)(Q.a,{value:j,label:_.a.setupForm.dataFolder,explanation:_.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)()})}}),C&&Object(a.c)("div",{className:C[0]},C[1])))))}}}({cleanAllApp:function(){console.log("[cleanAllApp]"),Wt(),zt(),n(),e()}}),d=u.SetupPopupComponent,f=Object(L.d)({onLoginAsked:function(){console.log("[cleanListAndFileContent]"),n(),e()},onLoginSuccess:function(){S(),kn(),qt(),Object(j.d)((function(t){t.userSettings.refreshUserSettingsFromBackend(),t.ui.floatingPanel.refreshFromBackend()})),Object(j.d)((function(t){t.ui.browser.folders.refreshFromBackend()})),Mt(["/"]),t()}}),h=f.LoginPopupComponent,m=Object(An.b)(),O=m.tabs,C=m.updateTab,S=m.refreshTabsFromBackend,T=m.updateActiveTabGrid,I=m.refreshWindowGrid,N=m.tabsApi,P=m.windowsApi,R=N.active.get(),A=at(),F=A.PromptPopupComponent,M=A.popupApi,H=function(){Object(o.useRef)([]);var t=Object(o.useState)(!1),n=Object(c.a)(t,2),e=n[0],i=n[1],l=Object(o.useState)(!1),s=Object(c.a)(l,2),u=s[0],p=s[1],d="(DISCONNECTED)",f=Object(o.useRef)(d);x((function(){f.current=f.current===d?"(/!\\ DISCONNECTED /!\\)":d;var t=e?"".concat(k()," (Connected)"):"".concat(k()," ").concat(f.current);"mobile"!==Object(r.a)()&&(document.title=t)}),1e3),Object(o.useEffect)((function(){Object(j.d)((function(t){t.watch.appStatus((function(t){!1===t.isConnected?b(!1):!0===t.isConnected&&(b(!0),p(!0),setTimeout((function(){p(!1)}),1e3))}))}))}),[]);var b=function(t){w.a.client.log.verbose&&console.log("[SOCKET CONNECTION TOGGLE] to ".concat(t)),i(t)};return{isConnected:e,connectionStatusComponent:function(){var t=["connected","connected"];return u&&(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:b}}(),W=H.isConnected,q=H.connectionStatusComponent,V=H.toggleSocketConnection,K=function(){var t=Object(o.useState)(!1),n=Object(c.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(0),r=Object(c.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),i(!0),setTimeout((function(){i(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{forceResponsiveRender:e,frr:u,responsiveRefreshCounter:l,setResponsiveRefresh:s}}(),J=K.forceResponsiveRender,G=K.responsiveRefreshCounter,$=K.setResponsiveRefresh,Z=Object(o.useRef)([]),ot=Object(o.useState)(null),ct=Object(c.a)(ot,2),rt=ct[0],lt=ct[1];Object(o.useEffect)((function(){setTimeout((function(){}),2e3)}),[]);var ut=Object(Ln.b)(),pt=ut.lightboxApi,dt=ut.lightboxImages,ft=ut.lightboxIndex,bt=function(){var t=Object(o.useState)(!1),n=Object(c.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(null),r=Object(c.a)(a,2),l=r[0],s=r[1],u=Object(o.useState)(null),p=Object(c.a)(u,2),d=p[0],f=p[1],b=Object(o.useState)(""),g=Object(c.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),i(!0)},close:function(){i(!1)},getStatus:function(cb){v.current&&cb(v.current)}},ttsPopupContent:h,ttsPopupId:l,ttsPos:d,setTtsPopup:i,ttsPopup:e,syncTtsStatus:function(t){v.current=t}}}(),gt=bt.ttsApi,mt=bt.ttsPos,vt=bt.ttsPopup,wt=bt.setTtsPopup,Ot=bt.ttsPopupContent,xt=bt.ttsPopupId,kt=bt.syncTtsStatus,yt=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),i=e[0],a=e[1],r=Object(o.useState)([]),l=Object(c.a)(r,2),u=l[0],p=l[1];return{isConnected:t.isConnected,searching:{get:i,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:W,refresh:{get:G,set:$}}),_t=function(){var t="[NOTE HISTORY] ",n=w.a.client.log.verbose,e=Object(o.useRef)({}),i=function(){return(new Date).getTime()},c=function(e,o,i){n&&console.log("".concat(t," saveNoteHistory ").concat(e)),l.b.emit("createHistoryFile",{filePath:e,content:o,historyFileType:i,token:Object(L.b)()})};return{save:c,intervalSave:function(o,a){var r=e.current[o];(!r||r&&r+6e4<i())&&(n&&console.log("".concat(t," ").concat(o,", time ").concat(1," expired/inexistand, PROCEED BACKUP")),c(o,a,"int"),e.current[o]=i())}}}(),Ct=function(){var t=Object(o.useState)(null),n=Object(c.a)(t,2),e=n[0],i=n[1];return{notePreviewPopupApi:{open:function(t,n,e){var o=n[0],c=n[1];nn+o>window.innerWidth&&(o-=Math.abs(window.innerWidth-nn-o-10)),en+c>window.innerHeight&&(c-=Math.abs(window.innerHeight-en-c-10)),"50%"===o&&(o="calc(50% - ".concat(nn/2,"px)")),"50%"===c&&(c="calc(50% - ".concat(nn/2,"px)")),i({isOpen:!0,filepath:t,position:n=[o,c],opts:e})},close:function(){i(null)}},notePreviewPopup:e,setNotePreviewPopup:i}}(),Et=Ct.notePreviewPopupApi,Tt=Ct.notePreviewPopup,Pt=Object(j.f)({popupApi:M,tabsApi:N,windowsApi:P,statusApi:yt,historyApi:_t,notePreviewPopupApi:Et,lightboxApi:pt,ttsApi:gt}),Rt=Pt,Lt=Rt.ui.browser.files,Dt=Rt.ui.browser.folders,Mt=Dt.scan,zt=Dt.clean,Bt=Dt.base,Ut=function(t){var n=Object(St.a)("files-history",[]),e=Object(c.a)(n,3),a=e[0],r=e[1],l=e[2],s=i.a.useRef(a);Object(o.useEffect)((function(){s.current=a}),[a]),Object(o.useEffect)((function(){Rn&&console.log(Pn," activeFile changed!",t),t&&u(t)}),[t]);var u=function(t){Rn&&console.log(Pn,"Add to history",t.name);var n=s.current;if(!(n.length>0&&n[0].name===t.name)){for(var e=!0,o=-1,i=n,c=0;c<n.length;c++)n[c].name===t.name&&(e=!1,o=c);e||i.splice(o,1),(i=i.slice(0,400)).unshift(t),r(i)}},p=Object(jt.a)(u,300),d={getAll:function(){return a},removeFile:function(t){console.log("".concat(Pn," removing ").concat(t," from last notes"));var n=Object(g.cloneDeep)(a);n=n.filter((function(n){return n.path!==t})),r(n)},addToHistory:function(t){arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?u(t):p(t)}};return{filesHistory:a,filesHistoryRef:s,cleanLastFilesHistory:function(){r([])},refreshFilesHistoryFromBackend:l,lastFilesHistoryApi:d}}(Lt.active.get),Ht=Ut.filesHistory,Wt=(Ut.filesHistoryRef,Ut.cleanLastFilesHistory),qt=Ut.refreshFilesHistoryFromBackend,Kt=Ut.lastFilesHistoryApi;Rt.lastNotesApi=Kt;var Gt=In(n,e),Yt=(Gt.askForMoveFile,Gt.promptAndMoveFolder),$t=Gt.promptAndBatchMoveFiles,Xt=function(){var t=Object(o.useState)("navigator"),n=Object(c.a)(t,2),e=n[0],l=n[1];return{mobileView:e,setMobileView:l,MobileToolbarComponent:function(t){return v(Object(a.c)(i.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])}}}(),Qt=Xt.mobileView,on=Xt.setMobileView,cn=Xt.MobileToolbarComponent;window.api=Rt;var an=Object(o.useState)(!1),rn=Object(c.a)(an,2),sn=rn[0],un=rn[1],pn=Object(o.useState)(!1),dn=Object(c.a)(pn,2),fn=dn[0],bn=dn[1];Object(o.useEffect)((function(){return Qn("alt + spacebar",(function(){un(!0),bn(!0)})),Qn("esc",(function(){un(!1)})),function(){Xn&&Xn.bind&&Xn.releaseAllKeys()}}),[Ht]),Object(o.useEffect)((function(){if("mobile"!==Object(r.a)())return Object(ne.a)("/favicon.png");Object(et.e)(O,Qt)}),[O,Qt]);var gn=J?0:1,hn=Rt.userSettings.refresh.css.get+gn,mn=Rt.userSettings,wn=function(){var t=Object(St.a)("interface-pin-element-status",{topTab:!1,bottomBar:!1}),n=Object(c.a)(t,3),e=n[0],i=n[1],a=n[2];return Object(o.useEffect)((function(){a()}),[]),{pinStatus:e,updatePinStatus:function(t){return function(n){i(Object(s.a)(Object(s.a)({},e),{},Object(te.a)({},t,n)))}},togglePinStatus:function(t){return function(){console.log(222222),i(Object(s.a)(Object(s.a)({},e),{},Object(te.a)({},t,!e[t])))}},refreshPinStatus:a}}(),On=wn.pinStatus,jn=wn.updatePinStatus,xn=wn.togglePinStatus,kn=wn.refreshPinStatus;return Object(a.c)("div",{className:_n(Qt,hn,mn,On)},Object(a.c)("div",{className:" ".concat("mobile"===Object(r.a)()?"mobile-view-container mobile-view-".concat(Qt):"")},Object(a.c)(j.a.Provider,{value:Pt},(null===Tt||void 0===Tt?void 0:Tt.isOpen)&&Object(a.c)(tn,{notePreview:Tt}),sn&&Object(a.c)(Vt,{show:fn,lastNotes:Ht,onClose:function(t){un(!1)},onHide:function(t){bn(!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,";}#root{height:100%;}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:"main-wrapper ".concat(Rt.userSettings.get("ui_sidebar")?"with-sidebar":"without-sidebar"," device-view-").concat(Object(r.a)())},F(),h({}),d({}),q(),cn({forceRerender:J,onButtons:[function(){bn(!0),un(!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(U.c)(e);o&&t.ui.browser.goTo(n,o.name,{openIn:"activeWindow"})}))}))}}),Rt.userSettings.get("ui_layout_shortcuts_panel")&&Object(a.c)(Jt,{filePath:".tiro/shortcuts.md",onClick:function(){}}),Object(a.c)(X,{files:Ht,onClick:function(t){Pt.ui.browser.goTo(t.folder,t.name,{openIn:"active"})}}),Object(a.c)(Y,{openFolders:Dt.open.get(),folder:Dt.get(),current:Dt.current.get(),onFolderClicked:function(t){Pt.ui.browser.goTo(t,null)},onFolderMenuAction:function(t,n,e){"rename"===t&&e?Yt({folder:n,folderToDropInto:n,folderBasePath:Bt,newTitle:e,renameOnly:!0,disablePrompt:!0,onMoveFn:function(){Mt([Sn(n.path)],{cache:!1,cb:function(){}})}}):"create"===t&&e?Object(j.d)((function(t){t.folders.create("".concat(n.path,"/").concat(e),(function(t){Mt([n.path],{cache:!1})}))})):"moveToTrash"===t?Yt({folder:n,folderToDropInto:Mn.b,folderBasePath:Bt,newTitle:"".concat(n.title,"_").concat(Object(Nn.a)().full_file),onMoveFn:function(){Mt([Sn(n.path),n.path],{cache:!1,cb:function(){Dt.open.add(n.path)}})}}):"delete"===t&&(Object(Mn.a)("trash"),setTimeout((function(){Mt([n.path],{cache:!1})})))},onFolderOpen:function(t){Mt([t],{cache:!1})},onFolderClose:function(t){},onFolderDragStart:function(t){console.log("[DRAG MOVE] onFolderDragStart",t),Z.current=[{type:"folder",folder:t}]},onFolderDragEnd:function(){console.log("[DRAG MOVE] onFolderDragEnd"),Z.current=[]},onFolderDrop:function(t){!function(t){console.log("[DRAG MOVE] processDragDropAction ->",Z.current,t);var n=Z.current[0];"file"===n.type&&n.files?$t({files:n.files,folderToDropInto:t}):"folder"===n.type&&n.folder&&Yt({folder:n.folder,folderToDropInto:t,folderBasePath:Bt,disablePrompt:!0,onMoveFn:function(){if(n.folder){var e=n.folder.path,o=t.path;Mt([Sn(e),Sn(o),o,e],{cache:!1,cb:function(){Dt.open.add(e),Dt.open.add(o),Dt.open.add(Sn(e)),Dt.open.add(Sn(o))}})}}})}(t),console.log(111111)}})),Object(a.c)("div",{className:"config-buttons-bar"},Rt.userSettings.get("beta_plugins_marketplace")&&Object(a.c)("div",{className:"config-button plugins-marketplace-button",onClick:function(){lt("plugins-marketplace")}},Object(a.c)(y.b,{name:"puzzle-piece"})),Object(a.c)("div",{className:"config-button settings-button",onClick:function(){lt("settings")}},Object(a.c)(y.b,{name:"cog"})))),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"},Rt&&Rt.ui.browser.folders.current.get(),!Rt.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){Object(j.d)((function(t){t.userSettings.set("ui_sidebar",!t.userSettings.get("ui_sidebar"))})),I()},active:!0===Pt.userSettings.get("ui_sidebar")}],colors:["#d4d1d1","#615f5f"],size:.8}))),Object(a.c)(nt,{term:Pt.ui.search.term.get})),Object(a.c)("div",{className:"files-list-wrapper"},Object(a.c)(Dn,{files:Lt.get,activeFileIndex:Lt.active.getIndex,onSortFiles:function(t){Pt.ui.browser.files.set(t)},onFileClicked:function(t){Lt.active.set(t);var n=Lt.get[t];Rt.tabs.active.get()?P.active.setContent(n):Rt.tabs.openInNewTab(n)},onFileDragStart:function(t){console.log("[DRAG MOVE] onFileDragStart",t),Z.current=[{type:"file",files:t}]},onFileDragEnd:function(){console.log("[DRAG MOVE] onFileDragEnd"),Z.current=[]}}))))),Object(a.c)("div",{className:"right-wrapper draggable-grid-editors-view"},Object(a.c)(st,{tabs:O,onUpdate:C,onPinToggle:xn("topTab"),pinStatus:On.topTab}),R&&Object(a.c)(Fn.b,{tab:R,onGridUpdate:T,mobileView:Qt,pinStatus:On})),"mobile"!==Object(r.a)()&&Ft.c.curr.beta_floating_windows&&Object(a.c)(vn,{panels:Rt.ui.floatingPanel.panels,pinStatus:On.bottomBar,onPinChange:jn("bottomBar")}),"plugins-marketplace"===rt&&Object(a.c)(ln,{onClose:function(){lt(null)}}),"settings"===rt&&Object(a.c)(ht.a,{onClose:function(){lt(null)}})))),Object(a.c)(Zt,null),dt.length>0&&Object(a.c)(it,{images:dt,startingIndex:ft,onClose:Pt.ui.lightbox.close}),vt&&Object(a.c)($n,{id:xt,fileContent:Ot,startString:mt,onUpdate:function(t){kt(t)},onClose:function(){wt(!1)}}))}),null),document.getElementById("root"))},51:function(t,n,e){"use strict";e.d(n,"a",(function(){return w}));var o=e(17),i=e(2),c=e(18),a=e(155),r=e(4),l=e(9),s=e(94),u=e(71),p=e(29),d="[Code Mirror]",f=c.a.client.log.verbose,b=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];f&&console.log(d," update cursor",n,t);try{e&&t.view.dispatch({selection:{anchor:n,head:n},scrollIntoView:!0})}catch(o){console.warn(d,"update Cursor error",o)}},g=function(t){if(!(t&&t.view&&t.view.state))return null;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}},h=0,m=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"),i=0,c=0,a=0;a<o.length&&(i+=o[a].length)<e;a++)c=a;h=c},v=function(t){var n=null===t||void 0===t?void 0:t.view;if(!n)return[];for(var e=n.state.doc.toString().split("\n"),i=[],c=0,a=0;a<e.length;a++){var r=e[a],l=r.length+1,s=Object(o.a)(r.matchAll(p.a.mdTitle)),u=c,d=u+l;if(s.length>0){var f=s[0],b=f[1].length;i[i.length-1]&&i[i.length-1].level<b&&(i[i.length-1].lastChild=!1),i.push({raw:r,matches:f,line:a,title:f[2],from:u,to:d,level:b,lastChild:!0})}c+=l}return i},w={getEditorInfos:function(t){var n=t,e=Math.round(n.viewState.pixelViewport.top),o=n.contentHeight,i=function(){return n.viewState.editorHeight},c=function(){return(o-i())/100};return{viewportHeight:i,contentHeight:o,visibleFirstLine:function(){var t=n.lineBlockAtHeight(e);return n.state.doc.lineAt(t.from).number},percentPx:c,currentPercentScrolled:function(){return n.viewState.pixelViewport.top/c()}}},getCurrentLineInfos:g,getScrolledLine:function(t){return m(t),h},updateCursor:b,updateText:function(t,n,e){var o=t.view.state.doc.toString().length,i=t.view.state.selection.ranges[0].from;t.view.dispatch(t.view.state.update({changes:{from:0,to:o,insert:n}})),b(t,i,!0)},scrollTo:function(t,n){if(!t.view)return-1;b(t,n,!0)},scrollToLine:function(t,n){var e=t.view.state.doc.line(n);b(t,e.from,!0)},getCustomTheme:a.a,getMarkdownStructure:v,foldAllChildren:function(t){var n=v(t),e=g(t);Object(r.each)(n,(function(o,i){if(null!==t&&void 0!==t&&t.view){var c=n[i+1]?n[i+1].from-1:t.view.state.doc.length,a=o.to-1;e&&e.currentPosition>a&&e.currentPosition;try{t.view.dispatch({effects:l.p.of({from:a,to:c})})}catch(r){console.warn("ERROR FOR ".concat(o.title),r)}}}))},unfoldAllChildren:function(t){null!==t&&void 0!==t&&t.view&&Object(l.G)(t.view)},searchWord:function(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(null!==t&&void 0!==t&&t.view)try{var o=t.view;Object(s.d)(o),o.dispatch({effects:s.f.of(new s.a({search:n}))}),e&&Object(s.b)(o)}catch(i){console.log("[CM utils > search word] error:",i)}},setSelection:function(t,n){if(null!==t&&void 0!==t&&t.view)try{var e=t.view,o=[0,0];n.range&&(o=n.range),e.dispatch({selection:i.e.create([i.e.range(o[0],o[1])])})}catch(c){console.log("[CM utils > set selection] error:",c)}},undo:u.f,redo:u.e}},53:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(18),i=e(125),c=e(31),a={};window.dbscroll=a,Object(c.a)("syncscroll","get_db",(function(){return a}));o.a.client.log.verbose;var r=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 a[t]||(a[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}),a[t].els.preview=n,a[t].els.editor=e,a[t].els.scroller=o,a[t]},l=function(t){var n,e,o=r(t),i=o.dims.editor.viewport/o.dims.editor.full||1e7,c=o.dims.preview.viewport/o.dims.preview.full||1e7,a=i<c?i:c,l=(null===(n=o.els.scroller)||void 0===n?void 0:n.clientHeight)||0,s=a*l,u={viewport:s=s>l?l:s,full:l};o.dims.scroller=u;var p=null===(e=o.els.scroller)||void 0===e?void 0:e.dataset;p&&(p.scrollRefresh||(p.scrollRefresh=1),p.scrollRefresh=parseInt(p.scrollRefresh)+1)},s=function(t,n){var e;i.a[t]=!1;var o=r(t);n||(n=o.posPercent);var c=null===(e=o.els.scroller)||void 0===e?void 0:e.dataset;c&&(c.scrollRefresh||(c.scrollRefresh=1),c.scrollRefresh=parseInt(c.scrollRefresh)+1)},u=function(t,n){i.a[t]=!1;var e=r(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}},p=function(t,n){i.a[t]=!1;var e=r(t);if(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}},d=function(t,n){var e=r(t),o=e.dims.preview.full/100,i=n-Math.round(o*e.posPercent);e.previewOffsetY=i},f={getScrollObj:r,updateEditorDims:function(t,n){var e=r(t);e.els.editor&&(e.dims.editor=n)},updatePreviewDims:function(t){var n=r(t);if(n.els.preview){var e=n.els.preview.querySelector(".preview-area-full-height-content"),o=e.clientHeight-e.parentNode.clientHeight,i=n.els.preview.clientHeight;n.dims.preview={viewport:i,full:o},n.dims.preview={viewport:i,full:o}}},updateScrollerDims:l,updatePreviewOffset:d,onEditorScroll:function(t,n){var e=r(t);e.els.editor&&(e.posPercent=n,s(t,n),p(t,n))},onScrollerScroll:function(t,n){r(t).posPercent=n,u(t,n),p(t,n)},onPreviewScroll:function(t){var n=r(t),e=n.els.preview.scrollTop;d(t,e),n.posPercent=e/n.dims.preview.full*100,u(t,n.posPercent),s(t,n.posPercent)},onWindowLoad:function(t){if(a[t]){var n=r(t).posPercent;l(t),s(t,n),u(t,n),p(t,n)}},scrollEditor:u,scrollPreview:p,scrollScroller:s}},55:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(6),i=e(0),c=e(18),a=e(12);function r(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Object(i.useState)(n),l=Object(o.a)(r,2),s=l[0],u=l[1],p="/".concat(c.a.path.configFolder,"/").concat(c.a.path.backendStateFolder,"/").concat(t,".md");'[BACKEND STATE] "'.concat(t,'" clientApi not loaded! Persistance system will not work correctly');Object(i.useEffect)((function(){d()}),[]);var d=function(cb){Object(a.d)((function(n){n.file.getContent(p,(function(n){var o=JSON.parse(n);e&&console.log("[BACKEND STATE] refreshValFromBackend: ".concat(t," => "),o),u(o),cb&&cb(o)}))}))};return[s,function(n){u(n),e&&console.log("[BACKEND STATE] setValue: ".concat(t," => "),n),Object(a.d)((function(t){t.file.saveContent(p,JSON.stringify(n))}))},d]}},56:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return i})),e.d(n,"c",(function(){return c}));var o=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return(t=i(t,[["-",n],["_",n],[" ",n],["/",n]])).replace(/[^\w\s]/gi,"")},i=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};function c(t,n){for(var e=t.split("\n"),o=n.split("\n"),i=Math.max(e.length,o.length),c=[],a=0;a<i;a++)void 0!==e[a]&&void 0!==o[a]?e[a]!==o[a]?c.push('<span class="diff-sign diff-modified">~~~</span> '+o[a]):c.push(o[a]):void 0!==e[a]&&void 0===o[a]?c.push('<span class="diff-sign diff-deleted">---</span> '+e[a]):void 0===e[a]&&void 0!==o[a]&&c.push('<span class="diff-sign diff-added">+++</span> '+o[a]);return c.join("\n")}},57:function(t,n,e){"use strict";e.d(n,"a",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"b",(function(){return a}));var o=e(22),i=function(t){var n=((new Date).getTime()-t.getTime())/1e3,e=604800,i="";if(n<=3600)i="".concat(Math.ceil(n/60)," ").concat(o.a.minsAgo);else if(n>3600&&n<=86400)i="".concat(Math.ceil(n/3600)," ").concat(o.a.hoursAgo);else if(n>86400&&n<=e)i="".concat(Math.ceil(n/86400)," ").concat(o.a.daysAgo);else if(n>e){var c=("0"+t.getDate()).slice(-2),a=o.a.months[t.getMonth()],r=t.getFullYear().toString();i="".concat(c," ").concat(a," ").concat(r)}return i},c=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}},58:function(t,n,e){"use strict";e.d(n,"a",(function(){return r})),e.d(n,"b",(function(){return l}));var o=e(123),i=e(4),c=e(0),a=e(1),r=function(t){var n,e=Object(c.useRef)(),r=function(){t.shouldFocus&&e.current.focus()};Object(c.useEffect)((function(){r()}),[t.shouldFocus]),Object(c.useEffect)((function(){r()}),[]);var l="checkbox"===t.type&&(!0===t.value||"true"===t.value),s=t.value;Object(i.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&&"textarea"!==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," ")}))),"textarea"===t.type&&Object(a.c)("textarea",{defaultValue:s,onChange:function(n){t.onChange&&t.onChange(n.target.value)}}),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\t\t\t\tfont-size: 11px;\n background: #ececec;\n border-radius: 5px;\n }\n\t\t\ttextarea {\n\t\t\t\theight: 120px;\n\t\t\t\tfont-size: 10px;\n\t\t\t\tborder: none;\n\t\t\t\tbackground: #ececec;\n border-radius: 5px;\n\t\t\t\tpadding: 2px;\n\t\t\t}\n .explanation {\n font-size: 11px;\n color: grey;\n }\n }\n }\n"}},59:function(t,n,e){"use strict";e.d(n,"c",(function(){return l})),e.d(n,"g",(function(){return u})),e.d(n,"f",(function(){return p})),e.d(n,"h",(function(){return d})),e.d(n,"d",(function(){return f})),e.d(n,"a",(function(){return b})),e.d(n,"e",(function(){return g})),e.d(n,"b",(function(){return h}));var o=e(11),i=e(17),c=e(4),a=e(12),r=e(31),l=function(t){for(var n=t.value.split("\n"),e=t.selectionStart,o=0,i=0;o<e+1;){o+=n[i].length+1,i++}return{currentPosition:e,lines:n,activeLine:n[--i],lineIndex:i}},s=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},u=function(t,n,cb){if(10===n){console.log("updateTextFromLetterInput => ENTER PRESSED");var e=t.lines[t.lineIndex-1],o=e.indexOf("- ["),i=e.indexOf("-"),c="";-1!==o&&"- [ ] "!==e?(c=e.substr(0,o+3)+" ] ",s(c)&&(t.lines[t.lineIndex]=c+t.activeLine,cb(c.length))):-1!==i&&"- "!==e&&"- [ ] "!==e&&(c=e.substr(0,i+1)+" ",s(c)&&(t.lines[t.lineIndex]=c+t.activeLine,cb(c.length)))}return t.lines.join("\n")},p=function(t,n,cb,e){var o=n.lines;if("^"===t){var a=o[n.lineIndex-1],r=o[n.lineIndex];o[n.lineIndex]=a,o[n.lineIndex-1]=r,cb(-a.length-1)}if("v"===t){var l=o[n.lineIndex+1],s=o[n.lineIndex];o[n.lineIndex]=l,o[n.lineIndex+1]=s,cb(+l.length+1)}if("X"===t){o[n.lineIndex].length;var u=Object(i.a)(o).splice(0,n.lineIndex).join("\n").length+1-n.currentPosition;o[n.lineIndex]="",cb(u)}if("C"===t){var p=o[n.lineIndex].length,d=o[n.lineIndex];o.splice(n.lineIndex,0,d),cb(p+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(c.isNumber)(e.insertPosition)||Object(c.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")},d=function(t){var n=t.split("\n"),e=0;return Array.isArray(n)?(Object(c.each)(n,(function(t){var n=t.split(" ").filter((function(t){return""!==t}));e+=n.length})),e):e},f=function(t){var n=!1;return(t="".concat(t)).toLowerCase().startsWith("math.")&&(n=!0),t.startsWith("(")&&(n=!0),isNaN(parseInt(t))||(n=!0),t.includes("\n")&&(n=!1),t.length>400&&(n=!1),n},b=function(t){var n=null;if(!f(t))return n;try{n=new Function("return ".concat(t))()}catch(e){}return n},g=function(t){var n=t.windowId,e=t.file,i=t.fileContent,c=t.selectionTxt,a=t.insertPos;try{var l=new Function("return ".concat(c))(),s=Object(o.a)(Object(o.a)({},{wrapSyntax:!1,title:"",currentContent:i,insertPos:a,windowId:n,selection:c,file:e,linejump:!1,isLast:!1}),{},{textUpdate:" = ".concat(l),isLast:!0});h(s)}catch(u){Object(r.d)('[CALC] Error <br/> "'.concat(u,'"'))}},h=function(t){t.question||(t.question=""),t.title||(t.title=""),Object(c.isBoolean)(t.linejump)||(t.linejump=!0),Object(c.isBoolean)(t.viewFollow)||(t.viewFollow=!0),Object(c.isBoolean)(t.wrapSyntax)||(t.wrapSyntax=!0);var n=t.linejump?"\n\n":" ",e="###",o="---",i="".concat(n," ").concat(e," [").concat(t.title,"] (generating ...) ").concat(n),r="".concat(n," ").concat(o," [").concat(t.title,"] (done) ").concat(n),l="".concat(n).concat(t.textUpdate);t.wrapSyntax||(i=r=o=e=""),l="".concat(i).concat(t.textUpdate).concat(n).concat(e," \n"),t.isLast&&(l="".concat(r).concat(t.textUpdate).concat(n).concat(o," \n"));var s=t.currentContent.substring(0,t.insertPos),u=t.currentContent.substring(t.insertPos),p=s+l+u;Object(a.d)((function(n){if(n.file.saveContent(t.file.path,p),t.viewFollow){var e=("".concat(s).concat(l).split("\n").length||0)-2;e<0&&(e=0),m(t.windowId,e)}}))},m=Object(c.throttle)((function(t,n){Object(a.d)((function(e){e.ui.note.editorAction.dispatch({windowId:t,type:"lineJump",lineJumpNb:n})}))}),1e3)},60:function(t,n,e){"use strict";e.d(n,"c",(function(){return f})),e.d(n,"a",(function(){return b})),e.d(n,"b",(function(){return v}));var o=e(6),i=e(4),c=e(0),a=e(34),r=e(18),l=e(15),s=e(10),u=e(19),p=e(35),d=e(55),f={curr:{}},b={ui_sidebar:!0,ui_filesList_sortMode:2,ui_layout_colors_main:"#E86666",ui_layout_colors_main_font:"#FFFFFF",ui_editor_markdown_preview:!0,ui_editor_markdown_latex_preview:!0,ui_editor_markdown_enhanced_preview:!0,ui_editor_markdown_table_preview:!0,ui_editor_spellcheck:!0,ui_editor_links_as_button:!0,ui_editor_links_preview_zoom:.8,ui_editor_show_image_title:!1,export_pandoc_cli_options:"\ndocx | --wrap=preserve --toc --number-sections \n revealjs | -V theme=moon \n beamer | --wrap=preserve --include-in-header=./include-tex.md ",ui_editor_ai_text_selection:!0,ui_editor_ai_command:"export OPENAI_API_KEY='YOUR_OPENAI_API_KEY'; npx chatgpt \" {{input}}\" --continue --model gpt-4 ",server_activity_logging_enable:!1,view_disable_notification_popups:!1,beta_floating_windows:!1,beta_plugins_marketplace:!1,plugins_marketplace_url:"https://raw.githubusercontent.com/dotgreg/tiro-notes/master/docs/marketplace.json"},g=b,h="[USER SETTINGS] :",m=r.a.client.log.verbose,v=function(t){var n=Object(d.a)("user-settings",{}),e=Object(o.a)(n,3),r=e[0],b=e[1],v=e[2],w=Object(c.useState)(0),O=Object(o.a)(w,2),j=O[0],x=O[1],k=Object(c.useRef)([]),y=function(t,n,e){k.current[t]||(k.current[t]=n[e]);var o=r[t];Object(i.isNull)(o)||Object(i.isUndefined)(o)||(""===o&&k.current[t]&&(o=k.current[t]),n[e]=o)};Object(c.useEffect)((function(){_(),f.curr=r}),[r]);var _=Object(p.a)((function(){m&&console.log(h,"UPDATE!",r,j),y("ui_layout_colors_main",s.a.colors,"main"),y("ui_layout_colors_main_font",s.a.colors,"mainFont"),x(j+1)}),1e3),C=function(n,e,cb,o){var i="updateSetupJson-".concat(Object(a.a)());t.eventBus.subscribe(i,(function(t){cb&&cb(t)})),l.b.emit("updateSetupJson",{paramName:n,paramValue:e,opts:o,token:Object(u.b)(),idReq:i})};return Object(c.useEffect)((function(){l.b.on("onServerTaskFinished",(function(n){t.eventBus.notify(n.idReq,{data:n})}))}),[]),{userSettingsApi:{refreshUserSettingsFromBackend:v,updateSetupJson:C,set:function(t,n,e){e||(e={}),e.writeInSetupJson||(e.writeInSetupJson=!1),e.writeInSetupJson&&C(t,"".concat(n)),m&&console.log(h,"updateUserSettings ".concat(t," to ").concat(n));var o=Object(i.cloneDeep)(r);o[t]=n,b(o)},get:function(t){var n=g[t],e=n;return t in r&&(e=r[t]),""===e&&(e=n),e},list:function(){var t=[];return Object(i.each)(r,(function(n,e){var o=e;t.push({key:o,val:n})})),t},refresh:{css:{get:j}}}}}},61:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var o=e(6),i=e(0);function c(t,n){var e=Object(i.useState)((function(){try{var e=window.localStorage.getItem(t);return e?JSON.parse(e):n}catch(o){return console.log(o),n}})),c=Object(o.a)(e,2),a=c[0],r=c[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)}}]}},62:function(t,n,e){"use strict";e.d(n,"c",(function(){return l})),e.d(n,"a",(function(){return s})),e.d(n,"b",(function(){return u}));e(0);var o=e(121),i=e(89),c=e(118),a=e(19),r=e(1),l=function(t,n,e){if(!t)return"";var o=t.querySelector("iframe"),i=Object(c.c)(n,{delay:100}),a='<div id="'.concat(i,'" class="resource-link-ctag"><div class="loading-string">loading...</div></div>'),r=!o||!0===e;t.innerHTML=r?a:""},s=function(t){var n;if("pdf"===t.tagName||"epub"===t.tagName){var e,o=null===(e=t.content)||void 0===e?void 0:e.split("?token=")[0];o+=Object(a.c)(),t.content=o}return u(t.tagName,t.content,(null===(n=t.opts)||void 0===n?void 0:n.windowId)||"null",t.opts)},u=function(t,n,e,c){var a;c||(c={}),c.file||(c.file=Object(i.a)());var l=(null===(a=c)||void 0===a?void 0:a.ctagHeightOffset)||0;return Object(r.c)(o.a,{file:c.file,block:{type:"tag",tagName:t,content:n,start:0,end:0},windowId:e,ctagHeightOffset:l,yCnt:0,onIframeMouseWheel:function(){},ctagSandboxed:c.sandboxed,ctagFullscreen:c.fullscreen,ctagOnFullscreenClose:c.onFullscreenClose})}},63:function(t,n,e){"use strict";e.d(n,"b",(function(){return d})),e.d(n,"e",(function(){return b})),e.d(n,"d",(function(){return g})),e.d(n,"c",(function(){return m})),e.d(n,"f",(function(){return v})),e.d(n,"a",(function(){return w}));var o=e(3),i=e(4),c=e(26),a=e(41),r=e(12),l=e(14),s=e(154),u=e(19),p=e(173),d=function(t){var n=new URL(t),e=n.hostname.replace(/^www\./,""),o=n.pathname.split("/").filter((function(t){return""!==t.trim()})),i="";return o.length>0&&(i=(i=o[o.length-1]).length>20?i.substring(0,20).replace(/[^A-Za-z0-9-_\ ]/g,""):i.replace(/[^A-Za-z0-9]/g,"")),e.length>15&&(e=e.substring(0,15)),i.length>0?"".concat(e,"/").concat(i):e},f={value:!1},b=function(t,n){f.value&&Object(r.d)((function(t){var e,o=t.ui.windows.active.get(),i=null===o||void 0===o||null===(e=o.content.file)||void 0===e?void 0:e.path,a=null===o||void 0===o?void 0:o.content.view,r=m().array;r=r.filter((function(t){return"filepath"!==t.name&&"view"!==t.name})),i&&a&&(r.unshift({name:"filepath",value:i}),"mobile"===Object(l.a)()?r.unshift({name:"view",value:n}):r.unshift({name:"view",value:a}),t.file.getContent(i,(function(t){var n=Object(s.a)(t,Object(c.d)(i));if(console.log(n),!(n.length<1)){var e="".concat(n[0].url).concat(Object(u.c)());console.log(e),Object(p.a)(e),document.title=Object(c.d)(i).filenameWithoutExt||Object(c.d)(i).name}})),h(r))}))},g=function(t){var n,e;setTimeout((function(){f.value=!0}),5e3);var o=m().dic,i=null===(n=o.filepath)||void 0===n?void 0:n.value,a=null===(e=o.view)||void 0===e?void 0:e.value;if(i&&a&&"mobile"===Object(l.a)()){var s=Object(c.d)(i);Object(r.d)((function(n){n.ui.browser.goTo(s.folder,s.name,{openIn:"activeWindow"}),t(a)}))}},h=function(t){var n="".concat(a.a.global.protocol).concat(a.a.global.url).concat(a.a.global.port,"/?");Object(i.each)(t,(function(e,o){var i=o<t.length-1?"&":"";n+="".concat(e.name,"=").concat(e.value).concat(i)})),window.history.pushState({},document.title,n)},m=function(){var t,n=[],e={},i=window.location.search,c=new URLSearchParams(i).entries(),a=Object(o.a)(c);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}},v=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},w=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)}}},64:function(t,n,e){"use strict";e.d(n,"c",(function(){return s})),e.d(n,"d",(function(){return g})),e.d(n,"a",(function(){return m})),e.d(n,"b",(function(){return v}));var o=e(29),i=e(12),c=e(14),a=e(28),r=e(10),l=e(47),s=function(t,n,e){return Object(l.a)({file:t,windowId:n,pattern:o.a.linklink,replacement:function(t){var o=document.createElement("span");o.classList.add("note-link-mdpreview-wrapper"),o.classList.add("note-link-wrapper");var i=t[2],c=t[1],a=null;if(i.includes("|")){var r=i.split("|");i=r[0],a=r[1]}var l=m(c,i,a,n,e);return o.innerHTML="".concat(l),o}})},u=function(t){if(t){g(),f++;var n=t.dataset.file,e=t.dataset.folder,o=(t.dataset.searchedstring,t.dataset.windowid||"active");n&&e&&o&&Object(i.d)((function(t){t.ui.browser.goTo(e,n,{openIn:o})}))}},p=function(t){if(t&&"desktop"===Object(c.a)()){var n=t.getBoundingClientRect(),e=[n.left+window.scrollX,n.top+window.scrollY],o=t.dataset.file,a=t.dataset.folder,r=t.dataset.searchedstring,l=t.dataset.windowid,s="".concat(a).concat(o);"preview-popup"!==l&&(Object(i.d)((function(t){t.ui.notePreviewPopup.close()})),h(s,e,r,l))}},d=null,f=0,b=function(t){t.dataset.windowid;g()},g=function(t){d&&clearTimeout(d),f++,t&&setTimeout((function(){f++}),700)},h=function(t,n,e,o){var c=++f;d&&clearTimeout(d),d=setTimeout((function(){f===c&&(""===e&&(e=null),Object(i.d)((function(i){i.ui.notePreviewPopup.open(t,n,{windowIdToOpenIn:o,searchedString:e})})))}),700)},m=function(t,n,e,o,i){var c=t;if(e){var r=e.length>20?e.substring(0,20)+"...":e;c="".concat(t," > ").concat(r)}return'<a\n\t\tonclick="'.concat(Object(a.c)("open-link-page",u),'"\n\t\tonmouseenter="').concat(i&&Object(a.c)("hover-link-page-enter",p),'"\n\t\tonmouseleave="').concat(i&&Object(a.c)("hover-link-page-leave",b),'"\n\t\tclass="title-search-link preview-link" \n\t\tdata-file="').concat(t,'" \n\t\tdata-folder="').concat(n,'" \n\t\tdata-searchedstring="').concat(e||"",'"\n\t\tdata-windowid="').concat(o,'">').concat(c,"</a>")},v=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(r.a.assets.worldIcon,");\n\t\t}\n\t\t").concat(t,".search-link {\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(r.a.assets.searchIcon,");\n\t\t}\n\t\t").concat(t,".title-search-link {\n\t\t\t\ttransition: 1s all;\n\t\t\t\tbackground-color: rgba(0,0,0,0);\n\t\t\t\t&:hover {\n\t\t\t\t\tcolor: white;\n\t\t\t\t\tbackground-color: ").concat(r.a.colors.main,";\n\t\t\t\t}\n\t\t\t\t&.popup-link {\n\t\t\t\t\tposition: relative;\n\t\t\t\t\tz-index: 99;\n\t\t\t\t}\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(r.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(r.a.colors.main,";\n\t\t} ")}},69: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(6),i=e(4),c=e(0),a=e(14),r=e(79),l=e(10),s=e(120),u=e(121),p=e(53),d=e(77),f=e(64),b=e(1),g=function(t){var n={wrapper:Object(c.useRef)(null),main:Object(c.useRef)(null)},e=t.file.path.split("/");e.pop();e.join("/");Object(c.useEffect)((function(){setTimeout((function(){t.onMaxYUpdate(a())}),1e3)}),[t.fileContent]);var a=function(){var t=n.main.current;return 2*((null===t||void 0===t?void 0:t.clientHeight)||3e3)},l=Object(c.useState)([]),s=Object(o.a)(l,2),d=s[0],f=s[1];return Object(c.useEffect)((function(){var n=r.b.chunks.chunk(t.fileContent);f(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),setTimeout((function(){p.a.updatePreviewDims(t.windowId),p.a.updateScrollerDims(t.windowId)}),100)}),100)}),[t.fileContent,t.file.path,t.windowId]),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=a(),e=t.posY+0;return Object(i.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"},Object(b.c)("div",{className:"preview-area-full-height-content"},d.map((function(n,e){return Object(b.c)(u.a,{key:e,index:e,block:n,windowId:t.windowId,file:t.file,reactOnHeightResize:t.reactOnHeightResize,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\t// LONG LINE STYLE\n\t\t\t\t// content: "-";\n\t\t\t\t// background: ').concat(l.a.colors.main,";\n\t\t\t\t// width: 100%;\n\t\t\t\t// height: 2px;\n\t\t\t\t// position: absolute;\n\t\t\t\t// bottom: 0px;\n\t\t\t\t// left: 0px;\n\t\t\t\t// font-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\n\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\theight: calc(100% - 35px);\n margin-top: ").concat(Object(a.b)("desktop")?"140":"0","px;\n}\n\n.preview-area, .preview-area-transitions, .content-blocks-wrapper, .simple-css-wrapper { height: 100%; }\n\n")}},74:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=function(t){var n="none",e=t.split(".");return"7z"===(n=e[e.length-1].split("?")[0])&&(n="d7z"),n.length>5&&(n="none"),n}},77:function(t,n,e){"use strict";e.d(n,"a",(function(){return g})),e.d(n,"b",(function(){return m}));e(4),e(0);var o=e(26),i=e(19),c=e(14),a=e(74),r=e(28),l=e(62),s=e(56),u=e(10),p=e(39),d=e(12),f=e(1),b=400,g=function(t){var n=t.markdownTag.split("](")[1].slice(0,-1),e=t.markdownTag.split("](")[0].replace("![",""),u="".concat(Object(p.a)(t.file.folder),"/").concat(n).concat(Object(i.c)()),b="".concat(e,".").concat(Object(a.a)(n)),g=Object(o.b)(u),h="ress-".concat(Object(s.b)(g));Object(r.a)(t.file,g,(function(){var n=document.querySelector(".".concat(h," .iframe-wrapper"));n&&w(g,n,t.file.path)}));var m=r.d,w=function(n,e,i,s){var u=(null===s||void 0===s?void 0:s.fullscreen)||!1;null===s||void 0===s||s.fullscreen;if(e){var p=Object(o.d)(i);if(null!==s&&void 0!==s&&s.persist){var d=e.querySelector("iframe")?"closed":"open";Object(r.b)(p,n,d)}var f=function(){e.innerHTML=""},b="mobile"===Object(c.a)()?-300:-100;"epub"===Object(a.a)(n).toLocaleLowerCase()?Object(l.c)(e,Object(l.b)("epub",n,t.windowId,{file:p,fullscreen:u,onFullscreenClose:f,ctagHeightOffset:b}),null===s||void 0===s?void 0:s.openOnly):"pdf"===Object(a.a)(n).toLocaleLowerCase()?Object(l.c)(e,Object(l.b)("pdf",n,t.windowId,{file:p,fullscreen:u,onFullscreenClose:f,ctagHeightOffset:b}),null===s||void 0===s?void 0:s.openOnly):Object(l.c)(e,Object(l.b)("iframe",n,t.windowId,{fullscreen:u,onFullscreenClose:f,ctagHeightOffset:b}))}},O='<li title="Open link in detached window"\n\t\tonclick="'.concat(Object(r.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(g,'">').concat(m("up-right-from-square"),"</li>"),j='<li\n\t\tonclick="'.concat(Object(r.c)("preview-link-ress",(function(t){return function(t,n){if(t){var e=t.dataset.link,o=t.dataset.filepath,i=function(t){return t.parentNode.parentNode.parentNode.parentNode.parentNode.querySelector(".iframe-wrapper")}(t);w(e,i,o,n)}}(t,{persist:!0})})),'"\n\t\ttitle="Toggle a pinned preview" \n\t\tdata-filepath="').concat(t.file.path,'" \n\t\tdata-link="').concat(g,'">').concat(m("thumbtack"),"</li>"),x='<li\n\t\tonclick="'.concat(Object(r.c)("download-link-ress",(function(t){v(b,u)})),'"\n\t\ttitle="Preview link" data-filepath="').concat(t.file.path,'" data-link="').concat(g,'">').concat(m("download"),"</li>"),k="<ul>".concat(j," ").concat(O," ").concat(x,"</ul>"),y='<div \n\t\tclass="ressource-link-label" \n\t\tdata-filepath="'.concat(t.file.path,'" \n\t\tdata-link="').concat(g,'" \n\t\tonclick="').concat(Object(r.c)("click-ress-main-action",(function(t){if(t){var n=t.dataset.link,e="iframe",o=Object(a.a)(n).toLocaleLowerCase();"epub"===o&&(e="epub"),"pdf"===o&&(e="pdf"),Object(d.d)((function(t){t.ui.floatingPanel.create({type:"ctag",layout:"full-center",ctagConfig:{tagName:e,content:n}})}))}})),'">\n\t\t\t').concat(e," (").concat(Object(a.a)(g),")\n\t\t</div>").split("\n").join("");return Object(f.c)("div",{className:"".concat(h," resource-link-iframe-wrapper")},Object(f.c)("div",{className:" resource-link-wrapper device-".concat(Object(c.a)())},Object(f.c)("div",{className:"resource-link-icon ".concat(Object(a.a)(g))}),Object(f.c)("div",{className:"resource-link-content-wrapper"},Object(f.c)("div",{dangerouslySetInnerHTML:{__html:y}}),Object(f.c)("div",{dangerouslySetInnerHTML:{__html:k},className:"buttons-wrapper"}))),Object(f.c)("div",{className:"iframe-wrapper"}))},h=".resource-link-icon",m=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(b-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(u.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\t// display: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(u.a.assets.fileIcon,");\n}\n\n").concat(h,".epub, ").concat(h,".cbr, ").concat(h,".cbz,").concat(h,".mobi, ").concat(h,".azw, ").concat(h,".azw3, ").concat(h,".iba {background-image: url(").concat(u.a.assets.bookIcon,"); }\n").concat(h,".pdf\n{background-image: url(").concat(u.a.assets.pdfIcon,"); }\n\n").concat(h,".xls, ").concat(h,".xlsm, ").concat(h,".xlsx, ").concat(h,".ods\n{background-image: url(").concat(u.a.assets.excelIcon,"); }\n\n").concat(h,".avi, ").concat(h,".flv, ").concat(h,".h264, ").concat(h,".m4v, ").concat(h,".mov, ").concat(h,".mp4, ").concat(h,".mpg, ").concat(h,".mpeg, ").concat(h,".rm, ").concat(h,".swf, ").concat(h,".vob, ").concat(h,".wmv, ").concat(h,".mkv\n{background-image: url(").concat(u.a.assets.videoIcon,"); }\n\n").concat(h,".d7z, ").concat(h,".arj, ").concat(h,".deb, ").concat(h,".rar, ").concat(h,".gz, ").concat(h,".zip, ").concat(h,".rpm, ").concat(h,".pkg\n{background-image: url(").concat(u.a.assets.archiveIcon,");}\n\n").concat(h,".aif, ").concat(h,".mp3, ").concat(h,".cda, ").concat(h,".mid, ").concat(h,".mpa, ").concat(h,".ogg, ").concat(h,".wav, ").concat(h,".wpl, ").concat(h,".wma, ").concat(h,".midi\n{background-image: url(").concat(u.a.assets.audioIcon,"); }\n\n").concat(h,".doc, ").concat(h,".docx, ").concat(h,".odt, ").concat(h,".txt\n{background-image: url(").concat(u.a.assets.wordIcon,"); }\n\n").concat(h,".html, ").concat(h,".css, ").concat(h,".js, ").concat(h,".json, ").concat(h,".ts, ").concat(h,".jsx, ").concat(h,".tsx\n{background-image: url(").concat(u.a.assets.codeIcon,"); }\n\n").concat(h,".bin, ").concat(h,".dmg, ").concat(h,".iso, ").concat(h,".toast, ").concat(h,".vcd\n{\n\t\ttop: 19px;\n\t\ttransform: scale(1.8);\n\t\tbackground-image: url(").concat(u.a.assets.diskIcon,");\n}\n\n").concat(h,".ppt, ").concat(h,".pptx, ").concat(h,".odp, ").concat(h,".key, ").concat(h,".pps\n{background-image: url(").concat(u.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.device-desktop .resource-link-wrapper .resource-link-content-wrapper ul {\n\t\topacity:1;\n\t\twidth: 90px;\n\t\tpointer-events: all;\n}\n\n")},v=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)}},78: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),i=e(4),c=e(322);c.setOptions({gfm:!0,breaks:!0,headerPrefix:"t-"});var a=function(t){var n=t;return n=c.parse(n)},r=function(t,n,e){var o=t,c=o.match(n)||"";return Object(i.each)(c,(function(t){o=o.replace(t,e(t))})),o},l=function(t,n,e){var o=t,i=n.replace("[[","").replace("]]",""),c="(?:\\[\\[".concat(i,"\\]\\])((?:[^]*))(?:\\[\\[").concat(i,"\\]\\])"),a=new RegExp(c,"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(i.each)(n,(function(t){t.id===e&&(o=!0)})),o){var c=!1,a=[e[e.length-2],e[e.length-1]],r=e.slice(0,-2),l=parseInt(a[1]);return"-"!==a[0]||isNaN(l)||(c=!0),c?e="".concat(r,"-").concat(l+1):e+="-1",t(n,e)}return e},u=function(t){for(var n=[],e=t.split("\n"),i=[],c=0;c<e.length;c++){var a=e[c],r=Object(o.a)(a.matchAll(/([#]{1,9})\ (.+)/gi));if(r.length>0){var l=r[0],u=l[2].toLowerCase(),p=c,d=u.trim().split(" ").join("-").replace(/[^a-zA-Z0-9-_\xc0-\xfa]/gi,"");d=s(i,d),i.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}},79:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return f}));var o=e(11),i=e(4),c=e(29),a=e(116),r=e(78),l=e(39),s=function(t){var n=Object(o.a)({},t),e=n.raw,i=n.file,c=n.windowId;c||(c="");var s=Object(r.b)(Object(l.d)(i,c,Object(l.c)(i,Object(l.e)(Object(l.f)(c,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(c.a.userCustomTagManual),e=[],o=[],a=c.a.userCustomTag3,r=t.match(a)||"",l=[];Object(i.each)(r,(function(t){l.push(t)}));var s=null,u=-1,p=[],d=[],f={};if(Object(i.each)(l,(function(t){f[t]?f[t]=f[t]+1:f[t]=1})),Object(i.each)(f,(function(t,n){t>=2&&d.push(n)})),Object(i.each)(l,(function(t,e){if(d.includes(t))if(s){if(s===t){var i=[u+1,e+1];p.push.apply(p,i);for(var c=n.slice(i[0],i[1]),a=l.slice(u+1,e+1),r="",f=0;f<c.length;f++){var b=f===c.length-1?"":a[f];r+="".concat(c[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(i.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,c=n.file,a=n.windowId;a||(a="");var r=p(e);return Object(i.each)(r,(function(t){"text"===t.type&&(t.content=s({raw:t.content,file:c,windowId:a})),"tag"===t.type&&(t.content=Object(l.b)(t.content))})),d(r)},injectLogic:function(t){},chunks:{chunk:p,merge:d}}},80:function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"a",(function(){return c})),e.d(n,"d",(function(){return a})),e.d(n,"c",(function(){return r}));var o=e(4),i=["Az","Crea","Modif"],c=["alphabetical","created","modified"],a=function(t,n){var e;switch(c[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}},82:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"f",(function(){return l})),e.d(n,"g",(function(){return s})),e.d(n,"d",(function(){return u})),e.d(n,"b",(function(){return p})),e.d(n,"c",(function(){return d})),e.d(n,"e",(function(){return f}));var o=e(29),i=e(10),c=e(47),a={val:!1},r=a,l=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:/\|/gim,classWrap:function(t){return"md-table-limiter"}})},s=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:/t1.+t2/gim,classWrap:function(t){return"ttt4"}})},u=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.mdTableCell,classWrap:function(t){var n=t[0];return n&&"-"===n||n&&"-|"===n?"":"md-table-cell"}})},p=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.mdTitle,classWrap:function(t){var n=t[1].length;return"md-title-wrapper level-".concat(n)}})},d=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.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 r.val=!r.val,"md-table-line md-table-".concat(e," ").concat(r.val?"even":"")}})},f=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-title-wrapper {\n\tcolor: ".concat(i.a.colors.main,";\n\t\n\t&.level-1 {\n\t\tfont-size: 15px;\n\t\ttext-decoration: underline;\n\t\tfont-weight: bold;\n\t}\n\t&.level-2 {\n\t\tfont-size: 13px;\n\t\ttext-decoration: underline;\n\t\t// font-weight: bold;\n\t}\n\t&.level-3 {\n\t\tfont-size: 12px;\n\t}\n}\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")}},84:function(t,n,e){"use strict";e.d(n,"b",(function(){return O})),e.d(n,"a",(function(){return x})),e.d(n,"c",(function(){return k}));var o=e(6),i=e(0),c=e(61),a=e(22),r=e(46),l=e(58),s=e(12),u=e(55),p=e(4),d=e(41),f=e(10),b=e(56),g=e(19),h=e(60),m=e(31),v=e(14),w=e(1),O=function(t){var n=localStorage.getItem("settings-".concat(t))||"";return Object(b.a)(n,[['"',""]])},j=function(t){return"<br/> <br/> Default value: ".concat(h.a[t].replaceAll("\n","<br/>"))},x=function(t){var n="<br/> Requires interface reload",e=Object(c.a)("settings-backend-port",-1),f=Object(o.a)(e,2),b=f[0],v=f[1],O=Object(c.a)("settings-backend-protocol","same"),x=Object(o.a)(O,2),k=(x[0],x[1],Object(i.useContext)(s.a)),y=a.a.settingsPopup,_=[];if(k){var C=k.userSettings,E="".concat(window.location.protocol,"//"),S="".concat(E).concat(k.status.ipsServer.getLocal()).concat(d.a.global.port);"https://api.qrserver.com/v1/create-qr-code/?size=400x400&margin=50&data=".concat(S);_=[{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:C.get("ui_layout_colors_main"),modifier:function(t){C.set("ui_layout_colors_main",t)}},{type:"text",title:"Font color for main color",expl:"Font color for items with main color as background",var:C.get("ui_layout_colors_main_font"),modifier:function(t){C.set("ui_layout_colors_main_font",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:C.get("ui_layout_shortcuts_panel"),modifier:function(t){C.set("ui_layout_shortcuts_panel",t)}}]},{title:"editor",fields:[{type:"checkbox",title:"AI Suggest",expl:"Send the selected text as a question to an AI",var:C.get("ui_editor_ai_text_selection"),modifier:function(t){C.set("ui_editor_ai_text_selection",t)}},{type:"textarea",title:"AI Suggest command line",expl:"Which AI API command to be called, {{input}} will be replaced by the selection. <br/><br/> For ChatGPT, you need an <a href='https://platform.openai.com/account/api-keys' target='_blank'>api key</a> and enter the following command : "+"<br/><code>".concat(h.a.ui_editor_ai_command,"</code>"),var:C.get("ui_editor_ai_command"),modifier:function(t){C.set("ui_editor_ai_command",t)}},{type:"checkbox",title:"Markdown Preview",expl:"Markdown preview "+n,var:C.get("ui_editor_markdown_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_preview",t)}},{type:"checkbox",title:"Enhanced Markdown",expl:"Enhanced Markdown Preview for files, documents etc"+n,var:C.get("ui_editor_markdown_enhanced_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_enhanced_preview",t)}},{type:"checkbox",title:"Links button",expl:"Replace http links into buttons in the editor by adding a '/' at the end of it."+n,var:C.get("ui_editor_links_as_button"),modifier:function(t){L(!0),C.set("ui_editor_links_as_button",t)}},{type:"checkbox",title:"Latex preview",expl:"Add Latex preview. Add '--latex' in the note to activate it then use $_latex_expression_$"+n,var:C.get("ui_editor_markdown_latex_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_latex_preview",t)}},{type:"checkbox",title:"Improved Markdown Table",expl:"Improves the display of markdown table. Add '--table' in the note to activate it."+n,var:C.get("ui_editor_markdown_table_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_table_preview",t)}},{type:"checkbox",title:"Spellcheck",expl:"Enable/disable native browser spellcheck for all notes. <br> You can also activate it per note by adding '--spellcheck' inside the note content <br>"+n,var:C.get("ui_editor_spellcheck"),modifier:function(t){L(!0),C.set("ui_editor_spellcheck",t)}},{type:"checkbox",title:"Image title",expl:"Show image title on interface and exports"+n,var:C.get("ui_editor_show_image_title"),modifier:function(t){L(!0),C.set("ui_editor_show_image_title",t)}}]},{title:"exports",fields:[{type:"textarea",title:"Options for Pandoc exporter",expl:"Modify how pandoc exports files. All options can be found at <a href='https://pandoc.org/MANUAL.html' target=\"_blank\">pandoc options manual</a>. One file extension options per line.<br/><br/>format: <br/> file extention | options ".concat(j("export_pandoc_cli_options")),var:C.get("export_pandoc_cli_options"),modifier:function(t){C.set("export_pandoc_cli_options",t)}},{type:"none",var:"",customHtml:" ",title:"Export Install",readOnly:!0,expl:'In order to export in many formats, Tiro notes needs to install Pandoc on your computer. (At least v2.9) <br/>\n\t\t\t\t\t\t<a href="https://pandoc.org/installing.html" target="_blank">Guide here </a>\n\t\t\t\t\t\t<br/><br/>\n\t\t\t\t\t\tFor PDF, make sure pdflatex is installed \n\t\t\t\t\t\t<br/> (if you are on termux: <code>pkg install texlive-installer texlive-tlmgr; termux-install-tl</code>)',modifier:function(){},onCustomHtmlClick:function(){}}]},{title:"plugins",fields:[{type:"text",title:"Plugins Marketplace URL",expl:"Custom Plugins Marketplace URL, should redirect to a marketplace.json file <br> Goes to the official 'https://raw.githubusercontent.com/dotgreg/tiro-notes/master/docs/marketplace.json' by default/if empty.",var:C.get("plugins_marketplace_url"),modifier:function(t){C.set("plugins_marketplace_url",t)}},{type:"none",var:"",customHtml:"<button> Clean Plugins Cache </button>",title:"Clean Plugins Cache",readOnly:!0,expl:"Clean Plugins Cache",modifier:function(){},onCustomHtmlClick:function(){Object(m.b)("cache","clean_cache")}}]},{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:C.get("users_viewer_user_enable"),modifier:function(t){C.set("users_viewer_user_enable",t,{writeInSetupJson:!0})}},{type:"text",title:"Viewer user password",expl:'Define the "viewer" user password',var:C.get("users_viewer_user_password"),modifier:function(t){C.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:C.get("demo_mode_enable"),modifier:function(t){C.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:b,title:y.backend.port,expl:y.backend.portExpl,modifier:v},{type:"checkbox",title:"Activity Logging",expl:"Enable the activity logging for events like read/write files, you can then consult it using api.activity.getReport(). \n Requires an app restart to take effect.",var:C.get("server_activity_logging_enable"),modifier:function(t){C.set("server_activity_logging_enable",t)}},{type:"checkbox",title:"Disable notification popups",expl:"Force notification popups to not appear on the interface"+n,var:C.get("view_disable_notification_popups"),modifier:function(t){L(!0),C.set("view_disable_notification_popups",t)}}]},{title:"Beta",fields:[{type:"checkbox",title:"Floating Windows",expl:"Enable the floating window system"+n,var:C.get("beta_floating_windows"),modifier:function(t){L(!0),C.set("beta_floating_windows",t)}},{type:"checkbox",title:"Plugins Marketplace",expl:"Enable the plugin marketplace system",var:C.get("beta_plugins_marketplace"),modifier:function(t){C.set("beta_plugins_marketplace",t)}}]}]}var T=Object(u.a)("config-panels-opened",[]),I=Object(o.a)(T,3),N=I[0],P=I[1],R=(I[2],Object(i.useState)(!1)),A=Object(o.a)(R,2),F=A[0],L=A[1];return Object(w.c)("div",{className:"settings-popup-wrapper"},Object(w.c)(r.a,{title:"".concat(y.title),onClose:function(){t.onClose()}},_.map((function(t,n){return Object(w.c)("div",{className:"settings-panel"},Object(w.c)("h3",{onClick:function(){!function(t){var n=Object(p.cloneDeep)(N);n[t]=!n[t],P(n)}(n)}},Object(w.c)("div",{className:"arrow"},N[n]?"\u25bc":"\u25ba"),t.title),Object(w.c)("div",{className:"fields-wrapper ".concat(N[n]?"active":"")},t.fields.map((function(t){return Object(w.c)("div",{className:"field-wrapper"},Object(w.c)("div",{className:"input-and-html-wrapper"},"none"===t.type&&Object(w.c)("span",null,t.title),"none"!==t.type&&Object(w.c)(l.a,{value:t.var,shouldNotSelectOnClick:!0,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(w.c)("div",{className:"custom-html-wrapper",onClick:function(n){t.onCustomHtmlClick&&t.onCustomHtmlClick()},dangerouslySetInnerHTML:{__html:t.customHtml}})),Object(w.c)("div",{className:"explanation",dangerouslySetInnerHTML:{__html:t.expl||"woop"}}))}))))})),F&&Object(w.c)("button",{className:"submit-button reload-btn",onClick:function(t){window.location.reload()}},"Reload App")))},k=function(){return"\n//\n// mobile version\n//\n\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: 70vw;\n\t\tmin-height: 50vh;\n\t\tmax-height: 70vh;\n\t\toverflow-y: scroll;\n\n}\n\n.reload-btn {\n\tposition: absolute;\n\tbottom: 10px;\n\tright: 10px;\n}\n\n\n.settings-panel {\n\t\t\n\t\t.input-and-html-wrapper {\n\t\t\twidth: 50%;\n\t\t\t.input-component-wrapper {\n\t\t\t\t.input-component {\n\t\t\t\t\t".concat("desktop"===Object(v.a)()?"":"display:block!important;","\n\t\t\t\t\t.input-wrapper {\n\t\t\t\t\t\ttextarea, input {\n\t\t\t\t\t\t\t").concat("desktop"===Object(v.a)()?"width: calc(100% - 20px); ":"width: calc(100% - 30px); margin: 5px 0px; ",'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput[type=checkbox] {\n\t\t\t\t\t\t\twidth: 20px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput[type="text"] {\n\t\t\t\t\t\t\t').concat("desktop"===Object(v.a)()?"width: calc(100% - 20px); ":"width: calc(100% - 40px);","\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\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// 3 EXPLANATION\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t// width: 50%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.input-and-html-wrapper {\n\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t.input-component {\n\t\t\t\t\t\t\t\t// 1 TITLE\n\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\twidth: 100px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// 2 INPUT\n\t\t\t\t\t\t\t\t.input-wrapper {\n\t\t\t\t\t\t\t\t\twidth: 300px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tjustify-content: space-evenly;\n\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.custom-html-wrapper {\n\t\t\t\t\t\t\t\t\tmargin-left: 20px;\n\t\t\t\t\t\t\t\t\t.qrcode-wrapper {\n\t\t\t\t\t\t\t\t\t\t\timg {\n\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\tcursor: pointer;\n\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&:hover {\n\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}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\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\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")}},88:function(t,n,e){"use strict";e.d(n,"c",(function(){return b})),e.d(n,"a",(function(){return h})),e.d(n,"b",(function(){return m}));var o=e(29),i=e(39),c=e(47),a=e(19),r=e(4),l=e(12),s=e(28),u=e(154),p=e(26),d=e(60),f=function(t){if(t){var n=t.dataset.filePath,e=t.dataset.src;Object(l.d)((function(t){t.file.getContent(n,(function(o){var i=Object(u.a)(o,Object(p.d)(n));if(console.log(i),!(i.length<1)){var c=[],a=0;Object(r.each)(i,(function(t,n){e.includes(t.url)&&(a=n),c.push(t.url)})),t.ui.lightbox.open(a,c)}}))}))}},b=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.image2,replacement:function(n){var e=document.createElement("div");return e.innerHTML=g(n[0],n[2],n[1],n[5],t),e}})},g=function(t,n,e,o,c){"image"!==e&&(e='<div class="mdpreview-source">'.concat(e,"</div>")),d.c.curr.ui_editor_show_image_title||(e="");var r=n.startsWith("http")?n:"".concat(Object(i.a)(c.folder),"/").concat(n).concat(Object(a.c)());o||(o="");var l=o.trim().split("="),u="";if("width"===l[0]||"height"===l[0]){var p="width"===l[0]?"height:auto;max-height:none":"width:auto; max-width:none;";u='style="'.concat(l[0],":").concat(l[1],"; ").concat(p,'"')}return'<div class="cm-mdpreview-wrapper image-wrapper"><div class="cm-mdpreview-image" data-file-path="'.concat(c.path,'" data-src="').concat(r,'" onclick="').concat(Object(s.c)("image-open-lightbox",f),'"> <img onerror="this.style.display=\'none\'" ').concat(u,' src="').concat(r,'" /></div></div>').concat(e)},h=function(t,n,e){var o="",c=t.split("[")[1].split("]")[0];"image"!==c&&(o='<div class="mdpreview-source">'.concat(c,"</div>")),d.c.curr.ui_editor_show_image_title||(o="");var r=n.startsWith("http")?n:"".concat(Object(i.a)(e.folder),"/").concat(n).concat(Object(a.c)());return'<div class="cm-mdpreview-wrapper image-wrapper"><div class="cm-mdpreview-image" data-file-path="'.concat(e.path,'" data-src="').concat(r,'" onclick="').concat(Object(s.c)("image-open-lightbox",f),'"> <img onerror="this.style.display=\'none\'" src="').concat(r,'" /></div></div>').concat(o)},m=function(){return"\n.cm-mdpreview-wrapper.image-wrapper {\n\t\t// display: inline;\n\t\tdiv {\n\t\t\t// display: inline;\n\t\t}\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"}},89:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(6),i=e(4),c=e(0),a=function(){var t=Object(c.useState)([]),n=Object(o.a)(t,2),e=n[0],a=n[1],l=Object(c.useState)(0),s=Object(o.a)(l,2),u=s[0],p=s[1];return{lightboxApi:{open:function(t,n){var e=[];Object(i.each)(n,(function(t){if(Object(i.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(t,n){return{nature:"file",name:t||"",realname:"",path:n||"",folder:""}}},91: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),i=e(7),c=e(8),a=e(20),r=e(21),l=e(13),s=e(9),u=e(5),p=e(116),d=e(88),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(i.a)(this,e),(o=n.call(this)).str=t,o}return Object(c.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,i=[],c=Object(o.a)(t.visibleRanges);try{for(c.s();!(e=c.n()).done;){var a=e.value,r=a.from,u=a.to;Object(s.F)(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});i.push(o.range(n.from))}}})}}catch(p){c.e(p)}finally{c.f()}return l.a.set(i)}var v=function(t){return l.f.fromClass(function(){function n(e){Object(i.a)(this,n),this.decorations=void 0,this.decorations=m(e,t.file)}return Object(c.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(t,n){t.target}}})},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\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 ".concat(Object(d.b)(),"\n ")}},92:function(t,n,e){"use strict";e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r})),e.d(n,"d",(function(){return u}));var o=e(126),i=e.n(o),c=function(t,n){var e=i.a.generateRSAKey(n,1024),o=i.a.publicKeyString(e);return i.a.encrypt(t,o)},a=function(t,n){var e=i.a.generateRSAKey(n,1024);return i.a.decrypt(t,e)},r={encryptText:c,decryptText:a,encryptUrlParam:function(t,n){var e=c(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,i=(t.trim().endsWith("==")||t.trim().endsWith("="),/^[a-zA-Z0-9\/\=\?\+]+$/.test(t)),c=t.length>100;return i&&o&&c&&(n=!0),n}},93:function(t,n,e){"use strict";e.d(n,"c",(function(){return O})),e.d(n,"a",(function(){return x})),e.d(n,"b",(function(){return k})),e.d(n,"d",(function(){return y}));var o=e(6),i=e(0),c=e.n(i),a=e(4),r=e(299),l=e.n(r),s=(e(442),e(443),e(161)),u=e(162),p=e(163),d=e(101),f=e(10),b=e(38),g=e(12),h=e(14),m=e(60),v=e(164),w=e(1),O={rows:2,cols:4},j={m:10,rows:O.rows,cols:O.cols,decalBottom:10},x=function(t){var n=Object(i.useState)([]),e=Object(o.a)(n,2),r=e[0],f=e[1],x=function(t){f(t),k.current=t},k=Object(i.useRef)([]),y=Object(i.useState)([]),_=Object(o.a)(y,2),C=_[0],E=_[1],S=Object(i.useRef)();Object(i.useEffect)((function(){t.grid&&t.grid.layout&&(E(t.grid.layout),x(t.grid.content))}),[t.refresh]),Object(i.useEffect)((function(){U(),F()}),[C]);var T=function(n,e){t.onGridUpdate({layout:n,content:e})},I=function(){var t=r[0].file;if(t){var n=function(t){for(var n=[],e=O,o=function(o){for(var i=[],c=function(n){var e=0;Object(a.each)(t,(function(t){for(var i=0;i<t.w;i++)for(var c=0;c<t.h;c++){var a=t.x+i,r=t.y+c;a===n&&r===o&&(e=1)}})),i.push(e)},r=0;r<e.cols;r++)c(r);n.push(i)},i=0;i<e.rows;i++)o(i);for(var c=[-1,-1],r=[-1,-1],l=0;l<e.rows;l++)for(var s=0;s<e.cols;s++)0===n[l][s]&&-1===c[0]&&-1===c[1]&&(c[0]=s,c[1]=l),0===n[l][s]&&(r[0]=s,r[1]=l);var u=r[0]-c[0]+1,p=r[1]-c[1]+1;return{x:c[0],y:c[1],w:u,h:p}}(C),e=Object(u.a)({file:t,w:n.w,h:n.h,x:n.x,y:n.y}),o=Object(a.cloneDeep)(C);o.push(e.layout),V(o)&&(E(o),setTimeout((function(){var t=Object(a.cloneDeep)(r);t.push(e.content);var n=H(e.content.i,t);x(n),T(o,n)})),T(o,r))}},N=Object(i.useState)(!1),P=Object(o.a)(N,2),R=P[0],A=P[1],F=function(){A(C.length>1)},L=function(t){var n=Object(a.filter)(Object(a.cloneDeep)(C),(function(n){return n.i!==t})),e=function(t){var n=O;return 1===t.length&&(t[0].x=0,t[0].y=0,t[0].h=n.rows,t[0].w=n.cols),t}(n);E(e),setTimeout((function(){var e=Object(a.filter)(Object(a.cloneDeep)(r),(function(n){return n.i!==t}));x(e),T(n,e)})),T(n,r)},D=Object(i.useState)(!1),M=Object(o.a)(D,2),z=M[0],B=M[1],U=function(){var t=0,n=j.cols*j.rows;Object(a.each)(C,(function(n){t+=n.w*n.h})),B(t!==n)},H=function(t,n){var e=Object(a.cloneDeep)(n);return Object(a.each)(e,(function(n){n.active=n.i===t})),e},W=function(t,n){var e=H(t,k.current);x(e),T(C,e),n&&(null===G||void 0===G||G.ui.browser.goTo(n.folder,n.name))},q=function(t){S.current=Object(a.cloneDeep)(t)},V=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(i.useEffect)((function(){var t=K.current;if(t)return t.addEventListener("resize",(function(){})),function(){t.removeEventListener("resize",(function(){}))}}),[]);var K=Object(i.useRef)(null),J={width:300,height:300};K.current&&(J.width=K.current.clientWidth,J.height=K.current.clientHeight-j.decalBottom);var G=Object(i.useContext)(g.a),Y=Object(i.useState)(null),$=Object(o.a)(Y,2),Z=$[0],X=$[1];Object(i.useEffect)((function(){if("mobile"===Object(h.a)()){var t=null===G||void 0===G?void 0:G.ui.windows.active.get();if(t)X(t);else{var n={layout:C[0],content:r[0]};n.layout&&n.content&&n.layout.i===n.content.i&&(X(n),W(n.content.i))}}}),[t.refresh]);var Q=function(n,e){return function(o,i){if("windowActiveStatus"===o)n&&!n.active&&W(n.i,n.file);else if("windowViewChange"===o){var c;if(null===i||void 0===i||!i.view||!t.grid.content[e].file)return;!function(t,n){var e=Object(a.cloneDeep)(r);e[n].view=t,x(e),T(C,e)}(null===i||void 0===i?void 0:i.view,e);var l=(null===(c=t.grid.content[e].file)||void 0===c?void 0:c.path)||"";Object(v.b)(l,null===i||void 0===i?void 0:i.view)}}};return Object(w.c)("div",{className:"draggable-grid-wrapper"},Object(w.c)("div",{className:"draggable-grid-wrapper-in",ref:K},"mobile"!==Object(h.a)()&&Object(w.c)(l.a,{className:"draggable-grid",autoSize:!1,layout:C,onLayoutChange:function(t){var n=Object(a.cloneDeep)(t);if(V(n)){var e=n;q(e),E(e),T(e,r)}else{if(!S.current)return;var o=function(t){var n=t,e=O,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&&q(o);var i=o||S.current,c=Object(a.cloneDeep)(i);Object(a.each)(c,(function(t){t.refresh=Object(s.a)(t.refresh)})),E(c),T(c,r)}},cols:j.cols,compactType:"horizontal",useCSSTransforms:!1,rowHeight:J.height/j.rows-j.m*(j.rows+1),draggableHandle:".drag-handle",width:J.width,margin:[j.m,j.m]},C.map((function(n,e){return Object(w.c)("div",{key:n.i,className:" ".concat(r[e]&&r[e].active?"active":""," window-wrapper "),onClick:function(){r[e]&&!r[e].active&&W(r[e].i,r[e].file)},onMouseEnter:function(){}},function(t,n,e){var o=[{icon:"faGripVertical",title:"Move Window",class:"drag-handle",action:function(){},onHover:function(){t&&!t.active&&W(t.i,t.file)}},{icon:"faPlus",title:"Add Window",class:"add-button",action:function(){I()}},{icon:"faPlus",title:"Delete Window",class:"delete-button",action:function(){L(t.i)}}];return m.c.curr.beta_floating_windows&&o.unshift({icon:"window-restore",title:"Detach Window",class:"detach-button",action:function(){console.log("detach",r[n].view,r[n]),e.file&&Object(g.d)((function(t){t.ui.floatingPanel.create({type:"file",file:e.file,view:"preview"===r[n].view?"preview":"editor"})}))}}),Object(w.c)(c.a.Fragment,null,Object(w.c)("div",{className:"note-active-ribbon"}),Object(w.c)("div",{className:"window-buttons-bar ".concat(z?"can-add":""," ").concat(R?"can-remove":"")},Object(w.c)(b.a,{design:"horizontal",popup:!1,buttons:o,colors:["#d4d1d1","#615f5f"],size:.8})))}(n,e,t.grid.content[e]),Object(w.c)("div",{className:"window-editor-wrapper-wrapper"},Object(w.c)(d.a,{content:t.grid.content[e]&&t.grid.content[e],onLayoutUpdate:Q(n,e),mobileView:t.mobileView})))}))),"mobile"===Object(h.a)()&&Object(w.c)("div",{className:"mobile-grid-view"},Object(w.c)("div",{className:" window-wrapper"},Object(w.c)("div",{className:"window-editor-wrapper-wrapper"},Z&&Object(w.c)(d.a,{content:Z.content,onLayoutUpdate:Q(window,0),mobileView:t.mobileView}))))))},k=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.window-editor-wrapper-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(f.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\t// height: calc(100% - 165px);\n\t\t\t\t\t\t\t\t\t\theight: calc(100% - 85px);\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")},y=function(t){return"\n\n.draggable-grid-wrapper {\n\t\t// remove transition\n\n\t\theight: calc(100% + ".concat(t.topTab?"0":"44","px);\n\t\ttop: ").concat(t.topTab?"44":"0","px;\n\t\tposition: relative;\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\t.window-wrapper {\n\t\t\t\t\t\t\t//overflow: hidden;\n\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\tcolor: ").concat(f.a.colors.fontEditor,";\n\t\t\t\t\t\t\tbackground: ").concat(f.a.colors.bgEditor,";\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.1);\n\t\t\t\t\t\t\toverflow-y: hidden;\n\t\t\t\t\t\t\toverflow-x: hidden;\n\t\t\t\t\t\t\theight:100%;\n\n\t\t\t\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tz-index:2;\n\t\t\t\t\t\t\t\tright: 30px;\n\t\t\t\t\t\t\t\ttop: 10px;\n\t\t\t\t\t\t\t\t.delete-button {display: none;}\n\t\t\t\t\t\t\t\t.add-button {display: none;}\n\t\t\t\t\t\t\t\t.drag-handle {\n\t\t\t\t\t\t\t\t\t\tcursor: grab;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.delete-button svg {\n\t\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.can-add {\n\t\t\t\t\t\t\t\t\t\t.add-button {display: block;}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.can-remove {\n\t\t\t\t\t\t\t\t\t\t.delete-button {display: block;}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t.note-active-ribbon {\n\t\t\t\t\t\t\t\t\t\t//background:").concat(f.a.colors.main,";\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.editor-area\n\t\t\t\t\t\t\t\t.infos-editor-wrapper\n\t\t\t\t\t\t\t\t.title-input-wrapper\n\t\t\t\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(f.a.colors.main,";\n\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t\n}\n")}},99:function(t,n,e){"use strict";e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return s}));var o=e(11),i=e(12),c=e(19),a=e(15),r=e(428),l=function(t){var n=Object(o.a)({},t),e=n.fileToUpload,c=n.folder,a=n.windowId;Object(i.d)((function(t){t.upload.uploadFile({file:e,folderPath:c,onSuccess:function(n){var e=".concat(n.path,")\n");console.log("inserting file",e),t.ui.note.editorAction.dispatch({type:"insertText",insertText:e,windowId:a})},onProgress:function(n){t.ui.note.editorAction.dispatch({type:"uploadProgress",uploadProgress:n,windowId:a})}})}))},s=function(t){var n=Object(o.a)({},t),e=n.file,i=n.path,l=n.idReq,s=n.onProgress,u=new r(a.a);u.addEventListener("start",(function(t){t.file.meta.idReq=l,t.file.meta.path=i,t.file.meta.token=Object(c.b)()})),u.addEventListener("progress",(function(t){var n=Math.round(t.bytesLoaded/t.file.size*100);s(n)})),u.submitFiles([e])}}},[[494,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(316),e(317),e(318),e(319);var o=e.p+"static/media/deco-bg-map.7ca9103b.png",i=e.p+"static/media/file-solid.6415173e.svg",c=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",mainFont:"#FFFFFF",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\t\t\t&:hover {\n\t\t\t\t\topacity: 0.9;\n\t\t\t}\n\t\t\tcolor: white;\n\t\t\tborder-radius: 5px;\n\t\t\tmargin-right: 5px;\n\t\t\tcursor: pointer;\n\t\t\tfont-weight: 700;\n\t\t\ttext-transform: uppercase;\n\t\t\tletter-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:i,diskIcon:c,pdfIcon:a,presIcon:b,audioIcon:d,videoIcon:p,excelIcon:u,wordIcon:r,codeIcon:l,bookIcon:s,archiveIcon:f,searchIcon:m},anim:{time:"100ms"}}},100:function(t,n,e){"use strict";e.d(n,"c",(function(){return h})),e.d(n,"b",(function(){return O})),e.d(n,"a",(function(){return j}));var o=e(17),i=e(6),c=e(4),a=e(0),r=e(26),l=e(18),s=e(31),u=e(15),p=e(80),d=e(19),f=e(55),b=e(61),g=e(12),h=function(t){var n=Object(a.useState)([]),e=Object(i.a)(n,2),s=e[0],u=e[1],d=Object(a.useState)(-1),h=Object(i.a)(d,2),O=h[0],j=h[1],x=Object(b.a)("selected-folder",""),k=Object(i.a)(x,2),y=k[0],_=k[1],C=Object(a.useRef)("");Object(a.useEffect)((function(){C.current=y}),[y]);var E=Object(a.useState)(m),S=Object(i.a)(E,2),T=S[0],I=S[1],N=Object(a.useState)(""),P=Object(i.a)(N,2),R=P[0],A=P[1],F=Object(f.a)("folders-open",["/"]),L=Object(i.a)(F,3),D=L[0],M=L[1],z=L[2],B=Object(a.useRef)([]),U=function(t){t=Object(c.uniq)(t),M(t)},H=Object(a.useRef)(!1);Object(a.useEffect)((function(){H.current||(console.log("openFolders > scanFolders",D.length),W(D),D.length>1&&(H.current=!0))}),[D]);var W=function(t,n){Object(c.each)(t,(function(n,e){""===t[e]&&(t[e]="/")})),t=Object(c.uniq)(t),n||(n={}),Object(c.isBoolean)(n.cache)||(n.cache=!0);var e=!!Object(c.isBoolean)(n.background)&&n.background,o=0;Object(g.d)((function(i){Object(c.each)(t,(function(c){i.folders.get([c],(function(i){var c;!e&&V(i.pathBase,i.folders),++o>=t.length&&(null===(c=n)||void 0===c?void 0:c.cb)&&n.cb()}))}))}))},q=Object(a.useRef)([]),V=function(t,n){var e=Object(c.cloneDeep)(q.current),o={current:e};Object(c.each)(n,(function(t){t&&(o.current=o.current.filter((function(n){return t.path!==n.path})))})),Object(c.each)(n,(function(t){t&&(o.current=w(t,o.current))})),e=o.current,q.current=e;var i=v("/",e);i&&I(i),A(t)};return{goTo:function(t,n,e){""!==t&&Object(g.d)((function(o){t=Object(r.b)("".concat(t,"/"));l.a.client.log.verbose&&console.log("".concat("[BROWSER GO TO] "," ").concat(t," ").concat(n," ").concat(JSON.stringify(e))),o.ui.search.term.set(""),o.status.searching.set(!0),_(t),o.files.get(t,(function(t){o.status.searching.set(!1);var i=o.userSettings.get("ui_filesList_sortMode"),a=Object(p.d)(t,i),r=-1;if(n&&Object(c.each)(a,(function(t,e){t.name===n&&(r=e)})),j(r),u(a),e&&e.openIn){var l=a[r];if("active"===e.openIn||"activeWindow"===e.openIn){var s=o.tabs.active.get();null===s||void 0===s||s.grid.content[0].i;s?o.ui.windows.active.setContent(l):o.tabs.openInNewTab(l)}else o.ui.windows.updateWindows([e.openIn],l)}}))}))},files:{active:{get:s[O],getIndex:O,set:j},set:u,get:s},folders:{refreshFromBackend:function(){z((function(t){B.current=t}))},base:R,get:function(){return T},clean:function(){I(m)},scan:W,open:{get:function(){return B.current},add:function(t){console.log("ADD",t),B.current=[].concat(Object(o.a)(B.current),[t]),B.current=Object(c.uniq)(B.current),U(B.current)},remove:function(t){console.log("REMOVE",t),Object(c.each)(t,(function(t){B.current=B.current.filter((function(n){return n!==t}))})),U(B.current)}},current:{get:function(){return C.current},set:_,getSync:y}}}},m={title:"",key:"",path:""},v=function t(n,e){for(var o,i=0;i<e.length;i++)if(Object(r.a)(e[i].path,n)){o=Object(c.cloneDeep)(e[i]);var a=e[i].children;if(Object(c.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("[askFolderDelete]",t,n),u.b.emit("askFolderDelete",{typeFolder:t,cacheFolderName:n,token:Object(d.b)()})};Object(s.a)("cache","clean_cache",(function(){Object(g.d)((function(t){t.folders.delete("cache","ctag-ressources"),t.ressource.cleanCache(),t.cache.cleanRamCache(),Object(s.d)("Cache cleaned successfully")}))}))},101:function(t,n,e){"use strict";e.d(n,"a",(function(){return v})),e.d(n,"b",(function(){return w}));var o=e(6),i=e(11),c=e(4),a=e(0),r=e.n(a),l=e(12),s=e(35),u=e(134),p=e(164),d=e(165),f=e(10),b=(e(56),e(167)),g=(e(41),e(26),e(99)),h=e(1),m=function(t){var n=Object(i.a)({},t.content),e=n.file,f=n.view,m=n.active,v=n.i,w=Object(a.useState)(""),O=Object(o.a)(w,2),j=O[0],x=O[1],k=Object(a.useState)("editor"),y=Object(o.a)(k,2),_=y[0],C=y[1],E=v;Object(a.useEffect)((function(){if(t.forceView)return C(t.forceView);C(f),Object(p.a)(null===e||void 0===e?void 0:e.path).then((function(t){C(t||"editor")}))}),[f,null===e||void 0===e?void 0:e.path,E,t.forceView]);var S=Object(a.useRef)((null===e||void 0===e?void 0:e.path)||"");Object(a.useEffect)((function(){S.current=(null===e||void 0===e?void 0:e.path)||"",P(!1),e&&Object(l.d)((function(t){t.file.getContent(e.path,(function(t){x(t),P(!0)})),t.watch.file(e.path,(function(t){if(S.current===t.filePath)return!0===B.current?z.current=t.fileContent:void x(t.fileContent)}))}))}),[null===e||void 0===e?void 0:e.path,E]);var T=Object(a.useState)(!1),I=Object(o.a)(T,2),N=I[0],P=I[1],R=Object(s.a)((function(t){Object(u.a)(t,20)}),3e3),A=Object(a.useRef)(!1),F=(Object(s.a)((function(){A.current=!1,console.log("reenable watch file")}),1e4),Object(a.useRef)({})),L=Object(a.useRef)(0);Object(a.useEffect)((function(){}),[null===e||void 0===e?void 0:e.path,j]),Object(a.useEffect)((function(){F.current;Object(l.d)((function(t){t.watch.appStatus((function(t){if(!1===t.isConnected)L.current=L.current+1,console.log("disabling watch update as disconnected"),A.current=!0;else if(!0===t.isConnected){if(L.current>=1&&t.isConnected)return}}))}))}),[null===e||void 0===e?void 0:e.path,j]);var D=Object(a.useRef)(j);Object(a.useEffect)((function(){D.current=j}),[j]);var M=function(t,n){Object(l.d)((function(e){e.file.saveContent(t,n,{history:!0})})),B.current=!0,U(),F.current={content:n,path:null===e||void 0===e?void 0:e.path},R({path:t,content:n,timestamp:Date.now()})},z=Object(a.useRef)(!1),B=Object(a.useRef)(!1),U=Object(s.a)((function(){B.current=!1,Object(c.isBoolean)(z.current)||(z.current=!1)}),2e3);Object(a.useEffect)((function(){e&&m&&Object(l.d)((function(t){t.ui.browser.goTo(e.folder,e.name)}))}),[m]);var H=Object(a.useState)(!1),W=Object(o.a)(H,2),q=W[0],V=W[1];return Object(h.c)(r.a.Fragment,null,e&&Object(h.c)("div",{className:"window-editor-wrapper",onPaste:function(t){null!==e&&void 0!==e&&e.path&&Object(b.b)(t,(function(t){Object(g.b)({fileToUpload:t,folder:e.folder,windowId:E})}))},onDragOver:function(t){t.preventDefault(),t.stopPropagation(),console.log("handle dragover",null===e||void 0===e?void 0:e.path),V(!0)},onDragLeave:function(t){t.preventDefault(),t.stopPropagation(),V(!1),console.log("handle dragleave",null===e||void 0===e?void 0:e.path)},onDrop:function(t){t.preventDefault(),t.stopPropagation(),V(!1),console.log("handle drop",null===e||void 0===e?void 0:e.path),null!==e&&void 0!==e&&e.path&&function(t,n){if(t.preventDefault(),t.dataTransfer&&t.dataTransfer.items){var e=t.dataTransfer.items;if(!e[0])return;for(var o=0;o<e.length;o++)n(e[o].getAsFile())}}(t,(function(t){Object(g.b)({fileToUpload:t,folder:e.folder,windowId:E})}))}},Object(h.c)(d.a,{windowId:E,file:e,fileContent:j,isActive:m,canEdit:N,isDragging:q,showViewToggler:t.showViewToggler,showToolbar:t.showToolbar,titleEditor:t.titleEditor,viewType:_,mobileView:t.mobileView,onLayoutUpdate:t.onLayoutUpdate,onFileEdited:function(t,n){M(t,n)}})))},v=r.a.memo(m,(function(t,n){return!1})),w=function(){return"\n\t.content-different-preview {\n\t\tmax-height: 50vh;\n\t\twidth: 70vw;\n\t\toverflow-y: auto;\n\t\ttext-align: left;\n\t\t.content-different-preview-inner {\n\t\t\tbackground: #e7e7e7;\n\t\t\tpadding: 10px;\n\t\t\tborder-radius: 10px;\n\t\t}\n\t\t.diff-sign {\n\t\t\tfont-weight: bold;\n\t\t}\n\t\t.diff-sign.diff-modified {\n\t\t\tcolor: orange;\n\t\t}\n\t\t.diff-sign.diff-deleted {\n\t\t\tcolor: red;\n\t\t}\n\t\t.diff-sign.diff-added {\n\t\t\tcolor: green;\n\t\t}\n\t}\n\n\t// height 100% everywhere\n\t.window-editor-wrapper-wrapper,\n\t.window-editor-wrapper,\n\t.dual-view-wrapper,\n\t.editor-area,\n\t.preview-area-wrapper,\n\t.preview-area,\n\t.main-editor-wrapper{\n\t\t\theight: 100%;\n\t}\n\n\t.window-editor-wrapper {\n\t\n\t\t\n\n\t\t.content-wrapper {\n\t\t\t\theight:100%;\n\t\t}\n\t\t.note-active-ribbon {\n\t\t\t\theight: 2px;\n\t\t\t\twidth: 100%;\n\t\t}\n\t\t\n\n\t\t.editor-toolbar-dropdown {\n\t\t\tposition: absolute;\n\t\t\ttop: 10px;\n\t\t\tright: 0px;\n\t\t}\n\n\n\n\n\n\t\t\n\n\n\n\t\t// content css modification\n\t\t.dual-view-wrapper {\n\t\t\t\t.file-path-wrapper {\n\t\t\t\t\t\tdisplay:none;\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\t//\n\t\t\t\t// ALL\n\t\t\t\t//\n\t\t\t\t&.device-desktop {\n\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\tmargin-top: 33px;\n\t\t\t\t\t\t\t\t//padding: 5px 5px 5px 5px;\n\t\t\t\t\t\t\t\tbackground: ".concat(f.a.colors.bgPreview,";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t//padding: 10px 10px 10px 10px;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// FULL PREVIEW\n\t\t\t\t//\n\t\t\t\t&.device-desktop.view-preview {\n\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//\n\t\t\t\t// FULL EDITOR\n\t\t\t\t//\n\t\t\t\t&.device-desktop.view-editor {\n\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\ttop: 33px;\n\t\t\t\t}\n\t\t}\n\t}\n")}},102:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return i}));var o=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},i=function(t,n,e){var o=new Date;o.setTime(o.getTime()+60*e*60*1e3);var i="expires="+o.toUTCString();document.cookie=t+"="+n+";"+i+";path=/"}},116: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(4),i=e(18),c=null,a=null,r=!1,l="[LATEX]",s=i.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,c=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(!c)return n;try{window.ka=c,n=c.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"}},117: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),i=e(4),c=e(29),a=e(12),r=e(14),l=e(28),s=e(10),u=e(47),p=e(118),d=e(63),f=Object(p.a)((function(t,n){return g(t,n)})),b=function(t,n){return Object(u.a)({file:t,windowId:n,pattern:c.a.externalLink3,replacement:function(t){var n=document.createElement("span");return n.innerHTML=f(t),n}})},g=function(t,n){var e=[];e=Object(i.isArray)(t)?t:Object(o.a)(t.matchAll(c.a.externalLink3))[0];var s=document.createElement("span"),u=e[0].slice(0,-1),p=Object(d.b)(u),f=function(t,cb){var n=t.dataset.link;Object(a.d)((function(t){t.ressource.fetchUrlArticle(n,(function(n){var e=encodeURIComponent(n.html);t.ui.floatingPanel.create({type:"ctag",ctagConfig:{tagName:"web",content:e}}),cb(n)}))}))},b="";null!==n&&void 0!==n&&n.addLineJump&&(b="\n");var g=l.d,h='<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(u,'">').concat(g("up-right-from-square"),"</span>"),m='<span\nonclick="'.concat(Object(l.c)("fetch-link",(function(t){t&&f(t,(function(){}))})),'"\ntitle="Display url content" class="link-fetcharticle link-action" data-link="').concat(u,'">').concat(g("file-lines"),"</span>"),v='<span\nonclick="'.concat(Object(l.c)("audio-link",(function(t){t&&f(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(u,'">').concat(g("volume-high"),"</span>"),w='<span\n\t\tonclick="'.concat(Object(l.c)("detach-link",(function(t){if(t){var n=t.dataset.link;Object(a.d)((function(t){t.ui.floatingPanel.create({type:"ctag",ctagConfig:{tagName:"web",content:n}})}))}})),'"\n\t\ttitle="Detach link in floating panel" class="link-detach link-action" data-link="').concat(u,'">').concat(g("window-restore"),"</span>"),O='<span class="link-action-more"><span class="icon-more">'.concat(g("ellipsis"),'</span><span class="link-action-wrapper">').concat(m," ").concat(v," ").concat(w," ").concat(h," </span></span>"),j='<span class="'.concat(Object(r.d)()?"mobile-version":"",' link-mdpreview-wrapper"><a href="').concat(u,'" class="link-mdpreview" title="').concat(u,'" target="_blank" rel="noreferrer">').concat(g("link")).concat(p,"</a>").concat(O).concat('<span class="cm-hover-popup cm-hover-popup"></span>',"</span>").concat(b);return s.innerHTML="".concat(j),s.outerHTML},h=function(t){var n=parseFloat(t.get("ui_editor_links_preview_zoom")),e=t.get("beta_floating_windows");return isNaN(n)&&(n=1),isNaN(e)&&(e=!1),"\n.link-fetch-preview-wrapper {\n\t\tbackground: grey;\n}\n// .preview-area-wrapper .link-mdpreview-wrapper,\n// .preview-area .link-mdpreview-wrapper {\n// \tdisplay: inline-block;\n// }\n\n".concat(e?"":".link-detach {display:none;}","\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\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.cm-hover-popup {\n}\n.cm-hover-popup .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// height size iframe here\n.cm-hover-popup .resource-link-ctag .iframe-view-wrapper.not-fullscreen {\n\t\n\theight: 400px!important;\n}\n\n.cm-hover-popup .resource-link-ctag .iframe-view-wrapper iframe {\n\t\twidth: ").concat(100/n,"%!important;\n\t\theight: ").concat(100/n,"!important;\n\t\tmax-height: ").concat(100/n,"%!important;\n\t\ttransform-origin:top left;\n\t\ttransform: scale(").concat(n,");\n\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")}},118: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),i=e(302),c=e(34),a=e(4),r=function(t,n){var e="render-react-wrapper-".concat(Object(c.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(i.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))}))}},119:function(t,n,e){"use strict";e.d(n,"a",(function(){return l}));var o=e(102),i=e(31),c="[FRONT PERF]",a={value:!1};"true"===Object(o.a)("tiroConsoleLogEnabled")||(console.error("=============================================================================="),console.error("!!! console.log is disabled, to enable it again, tiroDevCli.log.toggle_enabe()"),console.error("=============================================================================="),window.console={warn:function(){},error:function(){},info:function(){},log:function(){}}),Object(i.a)("log","toggle_enable",(function(){var t="true"===Object(o.a)("tiroConsoleLogEnabled");Object(o.b)("tiroConsoleLogEnabled",t?"false":"true",720),window.location.reload()})),Object(i.a)("performance","toggle_monitoring",(function(){a.value=!a.value,console.log(c,"toggled to ".concat(a.value))}));var r={},l=function(t){if(!a.value)return function(){};r[t]||(r[t]=[]),r[t][0]=performance.now();return function(){r[t][1]=performance.now();var n=r[t],e=n[1]-n[0];console.warn(c,"".concat(t," = ").concat(e," ms"),n)}}},12:function(t,n,e){"use strict";e.d(n,"e",(function(){return Y})),e.d(n,"d",(function(){return $})),e.d(n,"a",(function(){return Z})),e.d(n,"f",(function(){return X})),e.d(n,"c",(function(){return Q})),e.d(n,"b",(function(){return tt}));var o=e(17),i=e(4),c=e(0),a=e.n(c),r=e(34),l=e(60),s=e(100),u=e(26),p=e(29),d=e(119),f=e(15),b=e(19),g=function(t){Object(c.useEffect)((function(){f.b.on("moveFolderAnswer",(function(n){t.eventBus.notify(n.idReq,n.idReq)}))}),[]);return{file:function(n,e,cb){var o=Q("move-file-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFILE] ".concat(n," -> ").concat(e)),f.b.emit("moveFile",{initPath:n,endPath:e,idReq:o,token:Object(b.b)()})},folder:function(n,e,cb){var o=Q("move-folder-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFOLDER] ".concat(n," -> ").concat(e)),f.b.emit("moveFolder",{initPath:n,endPath:e,idReq:o,token:Object(b.b)()})}}},h=function(t){return t.replace(p.a.linklink,"$2/$1")},m=e(18),v=e(11),w=e(6),O=e(32),j=e(50),x=function(){var t=Object(j.a)(Object(O.a)().mark((function t(n){return Object(O.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){var o={},c=[];Y().then((function(e){e.search.word("#",n,(function(n){var e=[],a={};console.log(n),Object(i.each)(n,(function(t,n){var c={file:t.file,titleName:""};Object(i.each)(t.results,(function(t,n){var r=[],l=t.match(p.a.titleMd);if(l&&l[0]){var s=l[0].split("#").join("").trim();c.titleName=s}var u=t.match(p.a.hashtag3);Object(i.each)(u,(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(i.cloneDeep)(c)),o[t].lines.push(n),o[t].lines=Object(i.uniq)(o[t].lines);var e=c.file.name+"-"+c.titleName;a[e]||(a[e]=[]),a[e].push(o[t].id),r.push(o[t])})),Object(i.each)(r,(function(t,n){Object(i.each)(r,(function(o,i){if(n!==i){var c=t.id,a=o.id,r="".concat(c,"-").concat(a),l="".concat(a,"-").concat(c);-1===e.indexOf(r)&&-1===e.indexOf(l)&&e.push(r)}}))}))}))})),Object(i.each)(o,(function(t){c.push(t)})),t({nodesObj:o,nodesArr:c,edges:e})}))}))})));case 1:case"end":return t.stop()}}),t)})));return function(n){return t.apply(this,arguments)}}(),k=function(t){var n="[SEARCH API] 00563 ",e=Object(c.useState)(""),o=Object(w.a)(e,2),i=o[0],a=o[1];Object(c.useEffect)((function(){f.b.on("getWordSearch",(function(n){t.eventBus.notify(n.idReq,n.result)}))}),[]);var r=function(e,cb){!function(e,cb,o){var i=Q("search-".concat(o,"-"));console.log("".concat(n," searching ").concat(e," with type ").concat(o)),t.statusApi.searching.set(!0),t.eventBus.subscribe(i,(function(n){t.statusApi.searching.set(!1),cb(n)})),f.b.emit("searchFor",{term:e,token:Object(b.b)(),type:o,idReq:i})}(e,cb,"text")};return{files:{search:r},word:function(e,o,cb){var i=Q("search-word-");console.log("".concat(n," searching WORD ").concat(e)),t.eventBus.subscribe(i,(function(t){cb(t)})),f.b.emit("searchWord",{word:e,folder:o,token:Object(b.b)(),idReq:i})},hashtags:function(t,cb){x(t).then((function(t){cb(t)}))},ui:{search:function(t){Y().then((function(n){n.ui.browser.files.set([]),a(t),r(t,(function(t){n.ui.browser.files.set(t)}))}))},term:{set:a,get:i}}}},y=e(99),_=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,C=/([^\s,]+)/g,E=e(79),S=e(303),T=e(56),I="/".concat(m.a.path.configFolder,"/").concat(m.a.path.cacheFolder,"/cache-api"),N="[CACHE API]",P=m.a.client.log.verbose,R=m.a.client.log.verbose,A=function(){return(new Date).getTime()},F=function(t){var n=t-A()<0;return P&&console.log(N,"isExpired? : ",n,(t-A())/6e4,"mins"),n},L=function(t){var n=function(t){return"".concat(I,"/cache-api-storage-").concat(Object(T.b)(t),".md")},e=Object(c.useRef)({}),o=function(t,n,o){var i;e.current[t]={content:n,until:(i=o,A()+60*i*1e3)}},i=9e5,a="__CHUNKED__CACHED__OBJ__SIZE:",r="[CACHE CHUNK]",l=function(t,e,o){var c=JSON.stringify(e),l=function(t,e,cb){R&&console.log(r,n(t),{str:e}),$((function(o){o.file.saveContent(n(t),"".concat(e),{},(function(t){cb(t)}))}))};if(!(c.length>i))return l(t,c,(function(){o&&o()}));var s=(u=i,c.match(new RegExp(".{1,"+u+"}","g")));R&&console.log(r,"SAVE >> TOO LARGE, split in ".concat(s.length," parts"),{cacheId:t,contentArr:s});var u,p=0,d=function(){++p===s.length-1&&o&&o()};l(t,"".concat(a).concat(s.length),d);for(var f=function(n){setTimeout((function(){l("c".concat(n,"_").concat(t),s[n],d)}),1e3*n)},b=0;b<s.length;b++)f(b)},s=function(t,cb,e){var o=function(t,e,o){$((function(i){i.file.getContent(n(t),e,{onError:o})}))},i="___ERROR___CHUNK___LOADING___FAILURE";o(t,(function(n){try{if(n.startsWith(a)){var c=parseInt(n.replaceAll(a,""));R&&console.log(N,"GET >> remerging a ".concat(c," part"),{cacheId:t}),function(n,e,c,a){for(var l=Object(d.a)("".concat(N," getAllChunksAndMerge")),s=[],u=0,p=function(){if(u===e){var n=s.join(""),o=n.includes(i);R&&console.log("GET >> RESULT remerging",{hasFailed:o,cacheId:t,nbChunks:e,resMerge:n}),l(),o?a():c(n)}},f=function(n){o("c".concat(n,"_").concat(t),(function(o){s[n]=o,R&&console.log(r,"c".concat(n,"_").concat(t),{loadingCounter:u,nbChunks:e}),u++,p()}),(function(t){u++,s[n]=i,p()}))},b=0;b<e;b++)f(b)}(0,c,(function(t){cb(t)}),(function(t){e()}))}else cb(n)}catch(l){e(l)}}),(function(t){e(t)}))},u=function(){e.current={}};return{get:function(t,cb,n){if(!0===(null===n||void 0===n?void 0:n.disableRamCache)&&u(),t in e.current){var i=e.current[t],c=F(i.until);c&&(i.content=void 0),P&&console.log(N,"FROM RAM",t," expired:",c),cb(i.content)}else s(t,(function(n){try{var i=JSON.parse(n);e.current[t]=Object(v.a)({},i);var c=e.current[t],a=F(c.until);a&&(c.content=void 0),P&&console.log(N,"FROM FILE",t," expired:",a),cb(c.content)}catch(r){P&&console.log(N,"error getting cache",r,t),o(t,void 0,60),cb(e.current[t].content)}}),(function(n){return"NO_FILE"===n?(P&&console.log(N,"FROM FILE: NO_FILE",t),o(t,void 0,60),cb(e.current[t].content)):cb(void 0)}))},set:function(t,n,i,cb){i||(i=60),-1===i&&(i=1e32),o(t,n,i);var c=e.current[t];P&&console.log(N,"SETTING",t," with cachedTime in min",i),l(t,c,(function(t){cb&&cb(t)}))},cleanRamCache:u}},D=e(137),M=e(92),z=e(31),B="[PLUGINS]",U="[NOTIFICATIONS]",H={obj:null},W={play:function(t){$((function(n){n.ressource.fetch(t,(function(t,n){H.obj=new Audio(n),H.obj.play()}),{returnsPathOnly:!0})}))},stop:function(){H.obj&&(H.obj.pause(),H.obj.currentTime=0)}},q=e(55),V=e(89),K="[FLOATING PANELS]",J=function(t){var n=Object(q.a)("floatingPanelsConfig",[]),e=Object(w.a)(n,3),r=e[0],l=e[1],s=e[2],u=a.a.useRef([]);Object(c.useEffect)((function(){u.current.length>0||(u.current=r)}),[r]);var p=function(t){u.current=t,l(t)};Object(c.useEffect)((function(){s()}),[]);var d=function(t){var n=u.current.map((function(n){return n.id===t.id?t:n}));p(n)},f=function(t){var n=Math.max.apply(Math,Object(o.a)(u.current.map((function(t){return t.zIndex||0})))),e=u.current.findIndex((function(n){return n.id===t}));-1!==e&&(Object(i.cloneDeep)(u.current)[e].zIndex=n+1,d(Object(v.a)(Object(v.a)({},u.current[e]),{},{zIndex:n+1})))},b=function(t){p(t)},g=function(t,n){var e=Object(i.cloneDeep)(u.current.find((function(n){return n.id===t})));if(e){if("last"===n){var c=Math.max.apply(Math,Object(o.a)(u.current.map((function(t){return t.orderPosition||0}))));n=c+1}if("first"===n){var a=Math.min.apply(Math,Object(o.a)(u.current.map((function(t){return t.orderPosition||0}))));n=a-1}e.orderPosition=n,d(e)}},h={create:function(t){if("full-center"===t.layout){t.position={x:20,y:20},t.size={width:window.innerWidth-40,height:window.innerHeight-40}}var n=u.current.filter((function(t){return!t.status.includes("hidden")})),e=Object(v.a)({position:{x:100+20*n.length,y:100+20*n.length},size:{width:300,height:300},status:"visible",file:Object(V.a)(),view:"editor",id:Math.random().toString(36).substring(7),zIndex:1e3,orderPosition:n.length},t);p([e].concat(Object(o.a)(u.current))),g(e.id,"first"),f(e.id)},update:d,updateAll:b,delete:function(t){console.log("".concat(K," deletePanel"),t);var n=u.current.filter((function(n){return n.id!==t}));p(n)},movePanel:function(t,n){d(Object(v.a)(Object(v.a)({},u.current.find((function(n){return n.id===t}))),{},{position:n}))},resizePanel:function(t,n){d(Object(v.a)(Object(v.a)({},u.current.find((function(n){return n.id===t}))),{},{size:n}))},actionAll:function(t){if("organizeWindows"===t)return function(){console.log("".concat(K," reorganizeAll"));var t=Object(i.cloneDeep)(u.current),n=0;t.forEach((function(t){"visible"===t.status&&(t.zIndex=1e3+n,t.position={x:100+20*n,y:100+20*n},t.size={width:320,height:200},n++)})),b(t)}();var n=Object(i.cloneDeep)(u.current);n.forEach((function(n){n.status="hide"===t?"visible":"minimized"})),b(n)},panels:r,refreshFromBackend:s,pushWindowOnTop:f,movePositioninArray:function(t,n){var e=Object(i.cloneDeep)(u.current),o=e.findIndex((function(n){return n.id===t}));if(-1!==o){var c=e.splice(o,1)[0];"up"===n?e.splice(o-1,0,c):"down"===n?e.splice(o+1,0,c):"first"===n?e.splice(0,0,c):"last"===n&&e.push(c),b(e)}},updateOrderPosition:g};return h},G=null,Y=function(){return new Promise((function(t,n){if(G)return t(G);var e=setInterval((function(){if(G)return clearInterval(e),t(G)}),200)}))},$=function(cb){Y().then((function(t){cb(t)}))},Z=a.a.createContext(null),X=function(t){var n=Object(c.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(i.each)(n.current,(function(n,c){c===t&&Object(i.each)(n,(function(n){try{n.cb(o)}catch(i){console.warn("[CLIENT API] error with function",i)}n.options.persistent||e(t)}))}))}};Object(c.useEffect)((function(){m.a.client.log.verbose&&console.log("[CLIENT API ]INIT ")}),[]);var a=function(t){Object(c.useEffect)((function(){f.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),f.b.on("reconnect",(function(){t.eventBus.notify(n,{isConnected:!0})})),f.b.on("disconnect",(function(){t.eventBus.notify(n,{isConnected:!1})}))}),[]);var n="watch-api-unique-id-request";return Object(c.useEffect)((function(){f.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=k({eventBus:o,statusApi:t.statusApi}),p=function(t){var n="[FILE API] 005363 ";Object(c.useEffect)((function(){f.b.on("onServerTaskFinished",(function(n){t.eventBus.notify(n.idReq,{data:n})})),f.b.on("getFileContent",(function(n){n.error?t.eventBus.notify(n.idReq,{error:n.error}):t.eventBus.notify(n.idReq,{content:n.fileContent})}))}),[]);var e=Object(c.useRef)("");return{getContent:function(n,cb,e){var o=Object(d.a)("getFileContent "+n),i=h(n),c=Q("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),o()})),f.b.emit("askForFileContent",{filePath:i,token:Object(b.b)(),idReq:c})},saveContent:function(n,o,i,cb){var c=!(!i||!i.history)&&i.history,a=(!i||!i.withMetas||i.withMetas,Q("save-file-content"));cb&&t.eventBus.subscribe(a,(function(t){cb&&cb(t)}));var r=h(n);f.b.emit("saveFileContent",{filePath:r,newFileContent:o,token:Object(b.b)(),idReq:a,withCb:!!cb}),c&&(n!==e.current&&Y().then((function(t){var e=t.ui.browser.folders.current.get();if(e===Object(u.c)(n)){var o,i="",c=t.ui.windows.active.get();c&&(i=(null===(o=c.content.file)||void 0===o?void 0:o.name)||""),t.ui.browser.goTo(e,i)}})),t.historyApi.intervalSave(n,o),e.current=n)},delete:function(e,cb){var o=Q("delete-file");console.log("".concat(n," delete file ").concat(e.path)),t.eventBus.subscribe(o,cb),f.b.emit("onFileDelete",{filepath:e.path,idReq:o,token:Object(b.b)()})},move:g({eventBus:t.eventBus}).file,create:function(e,cb){var o=Q("create-file");console.log("".concat(n," create file in ").concat(e)),t.eventBus.subscribe(o,cb),f.b.emit("createNote",{folderPath:e,idReq:o,token:Object(b.b)()})}}}({eventBus:o,historyApi:t.historyApi}),O=function(t){return Object(c.useEffect)((function(){f.b.on("getFiles",(function(n){t.eventBus.notify(n.idReq,n.files)})),f.b.on("getFilesPreview",(function(n){t.eventBus.notify(n.idReq,n.filesPreview)}))}),[]),{get:function(n,cb){m.a.client.log.socket&&console.log("[CLIENT API] get files ".concat(n));var e=Q("get-files-");t.statusApi.searching.set(!0),t.eventBus.subscribe(e,(function(e){t.statusApi.searching.set(!1),cb(e,n)})),f.b.emit("askForFiles",{folderPath:n,token:Object(b.b)(),idReq:e})},getPreviews:function(n,cb){var e=Q("get-files-");t.eventBus.subscribe(e,cb),f.b.emit("askFilesPreview",{filesPath:n,idReq:e,token:Object(b.b)()})},search:t.searchApi.files.search}}({eventBus:o,searchApi:r,statusApi:t.statusApi}),j=function(t){var n=Object(v.a)({},t).eventBus;return Object(c.useEffect)((function(){f.b.on("getUploadedFile",(function(t){n.notify(t.idReq,t)}))}),[]),{uploadFile:function(t,cb){try{var e=Q("upload-file");n.subscribe(e,(function(n){delete n.idReq,t.onSuccess&&t.onSuccess(n),cb&&cb({message:"success",succesObj:n})})),Object(y.a)({file:t.file,path:t.folderPath,idReq:e,onProgress:function(n){t.onProgress&&t.onProgress(n)}})}catch(o){console.warn(o)}}}}({eventBus:o}),x=Object(S.a)({eventBus:o}),_=function(t){return Object(c.useEffect)((function(){f.b.on("getFoldersScan",(function(n){t.eventBus.notify(n.idReq,{folders:n.folders,pathBase:n.pathBase})})),f.b.on("onServerTaskFinished",(function(n){t.eventBus.notify(n.idReq,n.status)}))}),[]),{get:function(n,cb){m.a.client.log.socket&&console.log("[FOLDERS API] get folders ");var e=Q("get-folders-");t.eventBus.subscribe(e,(function(t){var e=Object(v.a)({},t);e.folderPaths=n,cb(e)})),f.b.emit("askFoldersScan",{foldersPaths:n,token:Object(b.b)(),idReq:e})},move:g({eventBus:t.eventBus}).folder,create:function(n,cb){console.log("[askFolderCreate]",n);var e=Q("create-folder-");n=Object(u.b)(n),cb&&t.eventBus.subscribe(e,(function(t){cb(t)})),f.b.emit("askFolderCreate",{newFolderPath:n,token:Object(b.b)(),idReq:e})},delete:s.a}}({eventBus:o}),C=function(t){return Object(c.useEffect)((function(){f.b.on("getCommandExec",(function(n){t.eventBus.notify(n.idReq,n.resultCommand)})),f.b.on("getCommandExecStream",(function(n){t.eventBus.notify(n.idReq,n.streamChunk)}))}),[]),{exec:function(n,cb){var e=Q("command-exec-");t.eventBus.subscribe(e,(function(t){Object(i.isString)(t)||(t=JSON.stringify(t)),cb(t)}),{persistent:!0}),f.b.emit("askCommandExec",{commandString:n,token:Object(b.b)(),idReq:e})},stream:function(n,cb){var e=Q("command-stream-");t.eventBus.subscribe(e,(function(n){cb(n),n.isLast&&t.eventBus.unsubscribe(e)}),{persistent:!0}),f.b.emit("askCommandExecStream",{commandString:n,token:Object(b.b)(),idReq:e})}}}({eventBus:o}),T=function(t){Object(c.useEffect)((function(){f.b.on("getBackendConfig",(function(n){t.eventBus.notify(n.idReq,n.config)}))}),[]);var n={get:function(cb){var n=Q("get-config-");t.eventBus.subscribe(n,(function(t){cb(t)})),f.b.emit("askBackendConfig",{token:Object(b.b)(),idReq:n})},getPlatform:function t(){return t()}};return n}({eventBus:o}),I=function(t){Object(c.useEffect)((function(){f.b.on("getPluginsList",(function(n){t.eventBus.notify(n.idReq,n)}))}),[]);var n=function(cb,n){n||(n={}),n.noCache||(n.noCache=!1),m.a.client.log.socket&&console.log("".concat(B," get plugins"));var e=Q("get-plugins-");t.eventBus.subscribe(e,(function(t){t.scanLog.length>0&&$((function(n){return n.ui.notification.emit({content:"PLUGIN SCAN LOG:<br/>".concat(JSON.stringify(t.scanLog)),options:{hideAfter:60}})}));var n=Object(i.sortBy)(t.plugins,(function(t){return t.name}));cb(n,t.scanLog)})),f.b.emit("askPluginsList",{noCache:n.noCache,token:Object(b.b)(),idReq:e})},e={list:n,get:function(t,e,cb){n((function(n,o){var i=n.filter((function(n){return n.name===t&&n.type===e}))[0]||null;cb(i)}),{noCache:!0})},cronCache:{set:function(t,n){var e="plugins-cron-infos";$((function(o){o.cache.get(e,(function(i){i||(i={}),i[t]||(i[t]={vars:{}}),i[t].vars=n,o.cache.set(e,i,-1)}))}))}},marketplace:{fetchList:function(cb){$((function(t){var n=t.userSettings.get("plugins_marketplace_url"),e="".concat(B," api.plugins.marketplace.fetchList error for url: ").concat(n," :");t.ressource.fetch(n,(function(t){try{var o=JSON.parse(t),c=[];Object(i.isArray)(o)?(Object(i.each)(o,(function(t){var n={name:"",description:"",versions:[],configuration:[]};t.name&&(n.name=t.name),t.description&&(n.description=t.description),t.versions&&(n.versions=t.versions),t.images&&(n.images=t.images),t.icon&&(n.icon=t.icon),t.configuration&&(n.configuration=t.configuration),""!==n.name&&c.push(n)})),cb(c)):Object(z.d)("".concat(e,": did not find a plugin list"))}catch(a){Object(z.d)("".concat(e," ").concat(JSON.stringify(a),", url: ").concat(n))}}),{disableCache:!0})}))}}};return e}({eventBus:o}),N=L(),P={emit:function(t){var n,e=function(){console.log(U,"emitNotification",t),f.b.emit("emitNotification",{notification:t,token:Object(b.b)()})};null!==(n=t.options)&&void 0!==n&&n.showOnceEvery&&t.id?$((function(n){var o="notif-showevery-".concat(t.id);n.cache.get(o,(function(i){var c;if(i&&!0===i.alreadyShown)return console.log(U,"showOnceEvery => already shown notif, dont reshow it",t);e(),n.cache.set(o,{alreadyShown:!0},null===(c=t.options)||void 0===c?void 0:c.showOnceEvery)}))})):e()}},R={get:function(cb){var t=setInterval((function(){f.b&&(cb(f.b),clearInterval(t))}),10)}},A=Object(l.b)({eventBus:o}).userSettingsApi,F=Object(s.c)({searchUiApi:r.ui,statusApi:t.statusApi,filesApi:O,foldersApi:_,windowApi:t.windowsApi,tabsApi:t.tabsApi,userSettingsApi:A}),H=function(t){var n=Object(c.useState)(null),e=Object(w.a)(n,2),o=e[0],i=e[1],a=function(t){t.windowId||(t.windowId="active"),t.insertPos||(t.insertPos="currentPos"),i(t)};return Object(v.a)(Object(v.a)({},E.b),{},{ui:{lineJump:{jump:function(t,n){a({type:"lineJump",windowId:t,lineJumpNb:n})}},editorAction:{dispatch:a,get:o}}})}(),q=Object(D.b)({}),V=function(t){return Object(c.useEffect)((function(){f.b.on("getPerformanceReport",(function(n){t.eventBus.notify(n.idReq,n)}))}),[]),{getReport:function(cb){var n=Q("get-perf-report");t.eventBus.subscribe(n,(function(t){cb?cb(t):(console.log("[PERF API]","report"),console.log(t.report))})),f.b.emit("askPerformanceReport",{token:Object(b.b)(),idReq:n})}}}({eventBus:o}),K=function(t){var n="[ACTIVITY API]";return Object(c.useEffect)((function(){f.b.on("getActivityReport",(function(n){t.eventBus.notify(n.idReq,n)}))}),[]),{getReport:function(e,cb){console.log(n,"asked for report (if no cb provided, will be outputed to console.log)",e);var o=Q("get-perf-report");t.eventBus.subscribe(o,(function(t){cb?cb(t):(console.log(n,"report"),console.log(t.report))})),f.b.emit("askActivityReport",{params:e,token:Object(b.b)(),idReq:o})}}}({eventBus:o}),Z=J(),X={cache:N,file:p,audio:W,encryption:M.b,files:O,socket:R,popup:t.popupApi,upload:j,ressource:x,tabs:t.tabsApi,folders:_,config:T,userSettings:A,history:t.historyApi,status:t.statusApi,note:H,analytics:q,search:r,command:C,plugins:I,watch:a,performance:V,activity:K,ui:{browser:F,floatingPanel:Z,notification:P,windows:t.windowsApi,lightbox:t.lightboxApi,textToSpeechPopup:t.ttsApi,search:r.ui,note:H.ui,notePreviewPopup:t.notePreviewPopupApi}};return G=X,X},Q=function(t){return"client-api-".concat(t,"-req-").concat(Object(r.a)())},tt=function(t,cb){Y().then((function(n){var e=t.apiName.split("."),c=n;if(Object(i.each)(e,(function(t){c=c[t]?c[t]:null})),null===c)return cb("nok",{error:'"'.concat(t.apiName,'" does not exists in current api \n\nAvailable Api properties :\n\n').concat(et("",n))});try{var a=nt(c);if(!Object(i.isNumber)(a)){var r=c.apply(void 0,Object(o.a)(t.apiArguments));return cb("ok",r)}var l=Object(i.cloneDeep)(t.apiArguments);l.splice(a,0,(function(t){cb("ok",t)})),c.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)})}}))},nt=function(t){var n=function(t){var n=t.toString().replace(_,""),e=null;return null===(e=n.startsWith("cb =>")?["cb"]:n.slice(n.indexOf("(")+1,n.indexOf(")")).match(C))&&(e=[]),e}(t),e=n.indexOf("cb");return-1===e?null:e},et=function t(n,e){var o="";for(var c in e)if("object"===typeof e[c]&&e[c].constructor!==Array){if(c.length>1&&"get"!==c){var a=""!==n?"".concat(n,"."):"";o+=t("".concat(a).concat(c),e[c])}}else o="".concat(o).concat(n,".").concat(c,"\n");var r=o.split("\n"),l=[];return Y().then((function(t){Object(i.each)(r,(function(n){var e=n.split("."),o=t;Object(i.each)(e,(function(t,n){o[t]&&(o=o[t])}));var c="var",a="";Object(i.isFunction)(o)&&(c="Function",a=o.toString()),l.push({name:n,type:c,description:a})}))})),o}},120:function(t,n,e){"use strict";e.d(n,"c",(function(){return Q})),e.d(n,"a",(function(){return tt})),e.d(n,"b",(function(){return nt}));var o=e(23),i=e(17),c=e(6),a=e(0),r=e.n(a),l=e(14),s=e(176),u=e(51),p=e(59),d="[TEXT MANIP ACTION]",f=function(t){var n=Object(a.useRef)(0),e=t.editorRef,o=t.editorRef,i=t.editorRef,c=function(){var c;if("codemirror"===t.editorType){var a=u.a.getCurrentLineInfos(e.current);if(!a)return null;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?Object(p.c)(i.current):null,n.current=c&&c.currentPosition?c.currentPosition:0}return c},r=function(c){var a=n.current+c;if("codemirror"===t.editorType)u.a.updateCursor(e.current,a,!0);else if(Object(l.b)("desktop")){var r;null===(r=o.current)||void 0===r||r.editor.setPosition(a)}else{var s=i.current;if(!s)return;s.focus(),setTimeout((function(){s&&(s.selectionStart=a,s.selectionEnd=a)}))}};return{getLineTextInfos:c,resetCursorPosition:r,applyTextModifAction:function(t,n){var e=c();return e?(console.log(d,"applying =>",t,n),Object(p.f)(t,e,(function(t){console.log(d,"applying a decal of cursor of :",t),r(t)}),n)):null}}},b=e(4),g=function(t,n){var e=f({editorType:"monaco-textarea",deviceType:"mobile",editorRef:n.mobileTextarea}),o=e.getLineTextInfos,i=e.resetCursorPosition,r=function(t){var n=Object(a.useState)(0),e=Object(c.a)(n,2),o=e[0],i=e[1];return{saveYTextarea:function(n){var e=t.current?t.current.scrollTop:0;i(n||e)},resetYTextarea:function(){t.current&&(console.log("resetYTextarea",o),t.current.scrollTop=o)}}}(n.mobileTextarea),l=r.saveYTextarea,s=r.resetYTextarea,u=Object(a.useState)(!1),d=Object(c.a)(u,2),g=d[0],h=d[1];Object(b.debounce)((function(){h(!1)}),500);return{onTextareaChange:function(e){console.log("onTextareaChange");var c=e.target.value,a=c[e.target.selectionStart-1]&&c[e.target.selectionStart-1].charCodeAt(0);if(c.length>t.length){var r=o();if(!r)return;c=Object(p.g)(r,a,(function(t){setTimeout((function(){i(t),s()}))}))}n.onMobileNoteEdition(c)},onTextareaScroll:function(t){if(!g){var n=t.target.scrollTop;l(n),console.log("onTextareaScroll")}}}},h="",m=e(156),v=e(92),w=e(1),O=e(15),j=e(57),x=e(10),k=e(22),y=e(124),_=e(157),C=e(12),E=e(19),S=e(89),T=e(134),I=e(25),N=e(46),P=function(t){var n=Object(a.useState)([]),e=Object(c.a)(n,2),o=e[0],r=e[1],l=Object(a.useState)(!1),s=Object(c.a)(l,2),u=s[0],p=s[1],d=function(){var n=f();r([].concat(n)),p(!0),O.b.emit("askFileHistory",{filepath:t.file.path,token:Object(E.b)()});var e=O.b.on("getFileHistory",(function(t){var o=[];Object(b.each)(t.files,(function(t){var n,e=null===(n=t.filenameWithoutExt)||void 0===n?void 0:n.split("___")[1];e&&(t.created=Object(_.a)(e).num.timestamp),t.created&&t.created<Date.now()&&o.push(t)}));var c=Object(b.orderBy)(o,["created"],["desc"]);r([].concat(n,Object(i.a)(c))),p(!1),O.b.off(e)}))},f=function(){var n=[],e=Object(T.b)(t.file.path);return Object(b.each)(e,(function(t,e){var o=e+1,i=Object(S.a)();i.created=t.timestamp,i.path=t.path+o;var c="Temporary local save ".concat(o," from ").concat(Object(j.a)(new Date(i.created||0)));i.name=c,i.realname=c,i.localContent=t.content,i.isLocal=!0,n.push(i)})),console.log("getLSHistoryList",e,t.file.path),n};Object(a.useEffect)((function(){d()}),[]);var g=Object(a.useContext)(C.a),h=Object(a.useState)(""),m=Object(c.a)(h,2),v=m[0],x=m[1],y=Object(a.useState)(null),P=Object(c.a)(y,2),A=P[0],F=P[1];return Object(w.c)(R,null,Object(w.c)("div",{className:"history-popup-wrapper"},Object(w.c)(N.a,{title:"".concat(k.a.historyPopup.title,'"').concat(t.file.realname,'"'),onClose:function(){t.onClose()}},Object(w.c)("div",{className:"count"},o.length," backups found :"),u&&Object(w.c)("div",{className:"count"}," (Loading backend history files...)"),Object(w.c)("div",{className:"table-wrapper"},Object(w.c)("table",null,Object(w.c)("thead",null,Object(w.c)("tr",null,Object(w.c)("th",null,k.a.historyPopup.thead.name),Object(w.c)("th",null,k.a.historyPopup.thead.date))),Object(w.c)("tbody",null,o.map((function(t){return Object(w.c)("tr",{className:"".concat((null===A||void 0===A?void 0:A.path)===t.path?"active":""),onClick:function(){!function(t){t.isLocal&&t.localContent?(x(t.localContent),F(t)):g&&g.file.getContent(t.path,(function(n){x(n),F(t)}))}(t)}},Object(w.c)("td",null," ",t.realname," "),Object(w.c)("td",null," ",Object(j.a)(new Date(t.created||0))," "),Object(w.c)("td",null," ",!t.isLocal&&Object(w.c)("div",{className:"trash",onClick:function(){!function(t){Object(C.d)((function(n){n.file.delete(t,(function(t){d(),F(null),x("")}))}))}(t)}}," ",Object(w.c)(I.a,{name:"faTrash",color:"grey"})," ")))}))))),v&&Object(w.c)("div",{className:"note-preview"},Object(w.c)("textarea",{className:"note-preview-textarea",value:v})),Object(w.c)("div",{className:"advice"},' To disable history backup for a note, add "--disable-history--"in it'))))},R=Object(y.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",x.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;}"),A=e(38),F=e(158),L=e(159),D=e(136),M=e(160),z=e(175),B=e(167),U=e(122),H=e(69),W=function(t,n){var e=".window-id-".concat(t," .preview-area-wrapper"),o=document.querySelector(e),i="print-wrapper";if(o){!function(){var t=document.querySelectorAll(".".concat(i));Object(b.each)(t,(function(t){t.classList.remove(i)}))}();var c=Object(j.a)(new Date(n.modified||0)),a=Object(j.a)(new Date(n.modified||0)),r="\n<head>\n\t<title>".concat(n.name,' </title>\n\t\n</head>\n<html>\n\t<body>\n\t\t\n\t\t<div class="simple-css-print-wrapper">\n\t\t\t<div class="hide-print">\n\t\t\t\t<bm> Export options </bm>\n\t\t\t\t<button onclick="window.print()">print</button>\n\t\t\t\t<button onclick="window.print()">export to pdf</button>\n\t\t\t\t<button onclick="window.alert(\'CTRL+ S then select *complete webpage* if available\')">export to html</button>\n\t\t\t</div>\n\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(c,"<br>\n\t\t\t\t\tEdited : ").concat(a,"<br>\n\t\t\t\t</div>\n\t\t\t\t").concat(o.innerHTML,"\n\t\t\t</div>\n\t\t\t<style>").concat(Object(H.c)({w:".simple-css-print-wrapper",pl:".preview-link",r:".resource-link-icon"}),"</style>\n\t\t\t<style>").concat(q(),'</style>\n\n<script>\n\tconsole.log("hello world")\n<\/script>\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)}},q=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\t.file-path-wrapper {\n\t\tdisplay: none;\n\t}\n\th1.title.big-title {\n\t\tdisplay: none;\n\t}\n\t.file-infos-wrapper {\n\t\tdisplay: none;\n\t\tbackground: #eeeeee;\n\t\tpadding: 10px;\n\t\tmargin: 10px;\n\t}\n\n\t.simple-css-print-wrapper {\n\t\tmargin: 20px;\n\t\twidth: 90%;\n\t}\n\t.simple-css-wrapper {\n\t\tfont-size: 12px;\n\t}\n\n\ttable {\n\t\tfont-size: 12px!important;\n\t}\n\timg {\n\t\t// max-width: 300px!important;\n\t\t// max-height: 500px!important;\n\t\tmax-width: 100%;\n\t\tmax-height: 500px;\n\t}\n\t.block-tag {\n\t\t\tdisplay: none;\n\t}\n"},V=e(171),K=e(26),J=e(18),G=e(172),Y=e(28),$=function(t){if(t){var n=t.dataset.format,e=t.dataset.path;if(n&&e){var o=Object(K.d)(e);Object(C.d)((function(t){Object(C.d)((function(t){t.ui.notification.emit({content:"[EXPORT] converting...",id:"export",options:{hideAfter:-1}})})),t.config.get((function(e){var i="/".concat(J.a.path.configFolder,"/").concat(J.a.path.cacheFolder,"/pandoc");t.folders.create(i,(function(c){var a="";"dzslides"===n&&(a="--self-contained"),"slideous"===n&&(a="--self-contained"),"revealjs"===n&&(a="--self-contained"),"beamer"===n&&(a="--self-contained");var r=n;"dzslides"===n&&(r="html"),"slideous"===n&&(r="html"),"revealjs"===n&&(r="html"),"latex"===n&&(r="tex"),"gfm"===n&&(r="md"),"latex-pdf"===n&&(r="pdf"),"beamer"===n&&(r="pdf");var l="".concat(o.name),s="".concat(l,".").concat(r),u="".concat(e.dataFolder,"/"),p=Object(K.b)("".concat(u,"/").concat(o.folder)),d=Object(K.b)("./".concat(o.name)),f=Object(K.b)("".concat(u,"/").concat(i)),g=Object(K.b)("".concat(f,"/").concat(s)),h=Object(K.b)("/".concat(J.a.path.configFolder,"/").concat(J.a.path.cacheFolder,"/pandoc/").concat(s)),m='cd "'.concat(p,'" && pandoc --output="').concat(g,'" --verbose ').concat(function(t,n){var e=t.userSettings.get("export_pandoc_cli_options").split("\n")||[],o={};return Object(b.each)(e,(function(t){var n=t.split("|");2===n.length&&(o[n[0].trim()]=n[1].trim())})),console.log(o,e),o[n]||""}(t,n)," ").concat(a," --from=markdown --to=").concat(n,' "').concat(d,'" '),v=m;"latex-pdf"===n&&(v='cd "'.concat(p,'" && pdflatex -halt-on-error -output-directory="').concat(f,'" -jobname="').concat(l,'" "').concat(d,'" '));var w=function(n){var e=""===n.stderr?n.stdout:n.stderr;console.error("[CONVERT ERROR]:",n),t.ui.notification.emit({content:'[EXPORT] Error <br/> "'.concat(e," <br/><br/> ").concat(n.shortMessage,'"'),id:"export",options:{hideAfter:-1}})};t.command.exec("pkill -9 pandoc",(function(n){t.command.exec(v,(function(t){var n={failed:!1,stderr:null,shortMessage:null};try{n=JSON.parse(t)||{failed:!1}}catch(o){w(n)}if(n.failed)w(n);else{var e=Object(G.a)(h);!function(t,n){var e=document.createElement("a");e.setAttribute("download",t),e.setAttribute("href",n),e.setAttribute("target","_blank"),Object(C.d)((function(t){t.ui.notification.emit({content:"[EXPORT] done",id:"export",options:{hideAfter:3}})})),e.click()}(s,e)}}))}))}))}))}))}}},Z=e(125),X=function(t){var n,e=Object(a.useState)(""),o=Object(c.a)(e,2),d=o[0],x=o[1],y=Object(a.useRef)(null),_=!0;!1===t.canEdit&&(_=!1),!1===t.isConnected&&(_=!1);var E=!0;!1===t.showViewToggler&&(E=!1);var S=!0;!1===t.showToolbar&&(S=!1);var T=!Object(b.isBoolean)(t.titleEditor)&&!Object(b.isString)(t.titleEditor)||t.titleEditor,I=Object(a.useRef)(t.file);Object(a.useEffect)((function(){I.current=t.file}),[t.file.path]);var N=function(t){var n=Object(a.useState)(!1),e=Object(c.a)(n,2),o=e[0],i=e[1],r=Object(a.useRef)(!1);Object(a.useEffect)((function(){r.current=t.canEdit}),[t.canEdit]),Object(a.useEffect)((function(){return i(!1),t.onEditorDidMount&&t.onEditorDidMount(),function(){t.onEditorWillUnmount&&(l(),t.onEditorWillUnmount())}}),[t.file.path]),Object(a.useEffect)((function(){l()}),[t.file.path]),Object(a.useEffect)((function(){t.onNoteContentDidLoad&&t.onNoteContentDidLoad()}),[t.fileContent,t.file.path]);var l=function(){""!==h&&t.onNoteLeaving&&t.onNoteLeaving(o,h),h=t.file.path};return{triggerNoteEdition:function(n){o?t.onNoteEdition&&t.onNoteEdition(n,!1):t.onNoteEdition&&t.onNoteEdition(n,!0),i(!0)}}}({file:t.file,fileContent:t.fileContent,canEdit:_,onEditorDidMount:function(){},onEditorWillUnmount:function(){},onNoteContentDidLoad:function(){O.a&&x(t.fileContent)},onNoteEdition:function(n,e){var o=I.current;x(n),e&&Object(C.d)((function(n){n.history.save(o.path,t.fileContent,"enter")})),t.onFileEdited(o.path,n)},onNoteLeaving:function(t,n){}}),R=N.triggerNoteEdition,H=Object(a.useRef)(null),q=g(d,{mobileTextarea:H,onMobileNoteEdition:R}),J=(q.onTextareaChange,q.onTextareaScroll,Object(a.useRef)(null)),G="desktop"!==Object(l.a)()?H:y;"codemirror"===t.editorType&&(G=J);var X=f({editorType:t.editorType,deviceType:Object(l.a)(),editorRef:G}).applyTextModifAction,Q=function(t){var n=Object(a.useState)(null),e=Object(c.a)(n,2),o=e[0],i=e[1],r=Object(a.useState)(!1),l=Object(c.a)(r,2),s=l[0],u=l[1],p=Object(a.useState)(!1),d=Object(c.a)(p,2),f=d[0],b=d[1],g=Object(a.useState)(null),h=Object(c.a)(g,2),O=h[0],j=h[1],x=function(n){var e=t.fileContent,o=Object(v.c)(e,n);if("failure"===o.status)j(null);else{console.log("encryption done",o),u(!1);var i=o.cipher;t.onTextEncrypted(i)}},k=function(n){var e=t.fileContent,o=Object(v.a)(e,n);if("failure"===o.status)j(null),alert("wrong password");else{b(!0),u(!0),console.log("decryption done",o);var i=o.plaintext;t.onTextDecrypted(i)}};return{APasswordPopup:Object(w.c)(m.a,{onClose:function(){i(null)},onSubmit:function(t){var n=o;i(null),j(t),"toEncrypt"===n&&x(t),"toDecrypt"===n&&k(t)}}),askForPassword:o,decryptButtonConfig:{title:"decrypt text",icon:"faUnlock",action:function(){O?k(O):i("toDecrypt")}},encryptButtonConfig:{title:"encrypt text",icon:"faLock",action:function(){O?x(O):i("toEncrypt")}},ifEncryptOnLeave:function(cb){if(s&&O){console.log("[EVENTS EDITOR] shouldEncryptOnLeave");var n=Object(v.c)(t.fileContent,O);n.cipher&&cb(n.cipher)}j(null),b(!1)},noHistoryBackupWhenDecrypted:f}}({fileContent:d,onTextEncrypted:function(n){R(n),yt(),Object(C.d)((function(e){e.history.save(t.file.path,n,"int")}))},onTextDecrypted:function(t){R(t),yt()}}),tt=Q.APasswordPopup,nt=Q.askForPassword,et=Q.decryptButtonConfig,ot=Q.encryptButtonConfig,it=(Q.ifEncryptOnLeave,Q.noHistoryBackupWhenDecrypted,Object(a.useContext)(z.a)),ct=Object(a.useState)(-1),at=Object(c.a)(ct,2),rt=at[0],lt=at[1],st=function(n,e){return{title:"",class:"upload-button-wrapper",action:function(){},customHtml:Object(w.c)(D.a,{file:t.file,windowId:t.windowId,type:n,label:e})}},ut=[].concat(Object(i.a)(function(){var t=[st("all","Upload files")];return"desktop"!==Object(l.a)()&&(t.push(st("image","Upload Gallery")),t.push(st("camera","Capture")),t.push(st("microphone","Record"))),t}()),[Object(v.d)(d)?et:ot,{title:"Export",icon:"faFileDownload",action:function(){var n;n=t.file,Object(C.d)((function(t){t.popup.show('\n <div id="export-popup-wrapper">\n <div class="buttons-list"> \n <button onclick="'.concat(Object(Y.c)("export-note-to",$),'" data-format="docx" data-path="').concat(n.path,'">docx</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="odt " data-path="').concat(n.path,'">odt</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="pdf" data-path="').concat(n.path,'">pdf</button>\n \n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="gfm" data-path="').concat(n.path,'">markdown</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="epub" data-path="').concat(n.path,'">epub</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="rtf" data-path="').concat(n.path,'">rtf</button>\n </div>\n <br/>\n <div class="buttons-list"> \n Latex:\n <br/>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="latex" data-path="').concat(n.path,'">latex (.tex)</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="latex-pdf" data-path="').concat(n.path,'">latex (.pdf)</button>\n \n </div>\n <br/>\n <div class="buttons-list"> \n Slides: \n <br/>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="pptx" data-path="').concat(n.path,'">pptx</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="beamer" data-path="').concat(n.path,'">beamer</button>\n <br/>\n <br/>\n HTML Slides: <br/>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="revealjs" data-path="').concat(n.path,'">revealjs</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="dzslides" data-path="').concat(n.path,'">dzslides</button>\n <button onclick="').concat(Object(Y.c)("export-note-to",$),'" data-format="slideous" data-path="').concat(n.path,'">slideous</button>\n \n </div>\n <br/>\n <br/>\n <div class="advice"> \n Export requires extra install, please check settings > export.\n </div>\n </div>\n '),"Export Note to :",(function(t){console.log(t)}))}))}},{title:"Print",icon:"faPrint",action:function(){"editor"===(t.viewType||"editor")?(Rt("both"),setTimeout((function(){W(t.windowId,t.file),setTimeout((function(){Rt("editor")}))}),100)):W(t.windowId,t.file)}},{title:k.a.editorBar.explanation.history,icon:"faHistory",action:function(){bt(!ft)}},{title:k.a.editorBar.tts,icon:"faCommentDots",action:function(){Object(C.d)((function(n){n.ui.textToSpeechPopup.open(d,{id:t.file.name})}))}},{title:"Delete note",class:"delete",icon:"faTrash",action:function(){it.file.onFileDelete(t.file)}}]),pt=Object(a.useState)(!1),dt=Object(c.a)(pt,2),ft=dt[0],bt=dt[1],gt=Object(a.useRef)(null),ht=gt.current,mt=700;ht&&(mt=ht.clientHeight/1.3),"mobile"===Object(l.a)()&&(mt=window.innerHeight);var vt=Object(a.useRef)(null);Object(a.useEffect)((function(){yt()}),[t.fileContent,t.file.path,t.windowId]);var wt=Object(a.useRef)(0),Ot=Object(a.useState)(0),jt=Object(c.a)(Ot,2),xt=jt[0],kt=jt[1],yt=function(){wt.current=wt.current+1,kt(wt.current)},_t=Object(a.useState)(!1),Ct=Object(c.a)(_t,2),Et=Ct[0],St=Ct[1],Tt=Object(a.useState)(!1),It=Object(c.a)(Tt,2),Nt=It[0],Pt=It[1];Object(a.useEffect)((function(){var t=d.length>3e6&&"desktop"!==Object(l.a)();St(t)}),[d,t.viewType]),Object(a.useEffect)((function(){var n=d.length>3e4&&"desktop"!==Object(l.a)();St(n),yt();var e="desktop"===Object(l.a)()&&"preview"===t.viewType||"desktop"!==Object(l.a)()&&"preview"===t.mobileView;Pt(e);var o=t.file.path;setTimeout((function(){o===t.file.path&&yt()}),100)}),[t.viewType,t.mobileView]);var Rt=function(n){t.onLayoutUpdate("windowViewChange",{view:n})},At=Object(a.useState)(-1),Ft=Object(c.a)(At,2),Lt=Ft[0],Dt=Ft[1];Object(a.useEffect)((function(){var n=t.editorAction;if(n&&(console.log("[EDITOR ACTION] action ".concat(n.type," triggered on ").concat(n.windowId)),("active"!==n.windowId||t.isActive)&&("active"===n.windowId||n.windowId===t.windowId))){if("lineJump"===n.type){var e=0;if(n.lineJumpNb&&(e=n.lineJumpNb),n.lineJumpString){var o=(null===n||void 0===n?void 0:n.lineJumpString)||"",i=t.fileContent.split("\n");Object(b.each)(i,(function(t,n){t.includes(o)&&(e=n+3)}))}Dt(e),setTimeout((function(){Dt(-1)}),100)}if("insertText"===n.type&&n.insertText&&n.insertPos&&(console.log("insertText",n),function(t,n){var e=X("insertAt",{textToInsert:t,insertPosition:n});e&&(R(e),yt())}(n.insertText,n.insertPos)),"searchWord"===n.type&&n.searchWordString){var c=J.current;if(!c)return;u.a.searchWord(c,n.searchWordString,!0)}if("setSelection"===n.type&&n.selection){var a=J.current;if(!a)return;u.a.setSelection(a,n.selection)}if("undo"===n.type){var r=J.current;if(!r)return;console.log("undo"),u.a.undo(r.view)}if("redo"===n.type){var l=J.current;if(console.log(l,l.view),!l)return;console.log("redo"),u.a.redo(l.view)}"uploadProgress"===n.type&<(n.uploadProgress||-1)}}),[t.editorAction,t.windowId]);var Mt=function(){Object(C.d)((function(n){var e;null===(e=n.lastNotesApi)||void 0===e||e.addToHistory(t.file,!1)}))},zt=Object(a.useState)({x:0,y:0,from:0,to:0,fromPx:0,toPx:0}),Bt=Object(c.a)(zt,2),Ut=Bt[0],Ht=Bt[1],Wt=d.substring(Ut.from,Ut.to),qt=".window-id-".concat(t.windowId),Vt=(null===(n=document.querySelector(qt))||void 0===n?void 0:n.getBoundingClientRect().top)||0,Kt=(Ut.y,"desktop"===Object(l.a)()?40:10),Jt="desktop"===Object(l.a)()?0:10;return Object(w.c)("div",{className:"editor-area",ref:gt},Object(w.c)("div",{className:"infos-editor-wrapper ".concat(T?"with-title-editor":"no-title-editor")},(!0===T||"disabled"===T)&&Object(w.c)(r.a.Fragment,null,Object(w.c)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(w.c)(s.a,{title:t.file.name.replace(".md",""),enabled:!0===T,onEdited:function(n,e){var o="".concat(t.file.folder).concat(n,".md"),i="".concat(t.file.folder).concat(e,".md");it.file.onTitleUpdate(o,i);Object(K.d)(i);yt()}})),S&&Object(w.c)("div",{className:"toolbar-and-dates-wrapper"},Object(w.c)("div",{className:"editor-toolbar-dropdown"},Object(w.c)(L.a,{hover:!0,dir:"right",maxHeight:mt,onMouseEnter:function(n){t.onLayoutUpdate("windowActiveStatus")}},Object(w.c)(r.a.Fragment,null,E&&Object(w.c)("div",{className:"view-toggler-wrapper"},"mobile"!==Object(l.a)()&&Object(w.c)(A.a,{class:"editor-view-toolbar",size:.8,buttons:[{title:"Editor",icon:"custom_icons/view-3.svg",action:function(){Rt("editor")}},{title:"Editor with minimap",icon:"custom_icons/view-4.svg",action:function(){Rt("editor-with-map")}},{title:"Dual view",icon:"custom_icons/view-1.svg",action:function(){Rt("both")}},{title:"Render view",icon:"custom_icons/view-2.svg",action:function(){Rt("preview")}}]})),Object(w.c)("div",{className:"toolbar-wrapper"},Object(w.c)(A.a,{class:"editor-main-toolbar",design:"vertical",size:.8,buttons:ut})),Object(w.c)("div",{className:"separation-bar"}),Object(w.c)("div",{className:"note-id-wrapper"},Object(w.c)("h4",null,"Note Link"),Object(w.c)("div",{className:"note-id-form"},Object(w.c)("input",{type:"text",ref:vt,onClick:function(t){var n=t.target;n.setSelectionRange(0,n.value.length)},value:Object(V.a)(t.file),readOnly:!0}),Object(w.c)(A.a,{class:"note-id-toolbar",size:1,buttons:[{title:"Copy note ID",icon:"faClipboard",action:function(){var t=vt.current;t&&Object(B.a)(t)}}]}))),Object(w.c)("div",{className:"dates-wrapper"},Object(w.c)("div",{className:"date modified"},Object(w.c)("h4",null,"Modified"),Object(j.a)(new Date(t.file.modified||0))),Object(w.c)("div",{className:"date created"},Object(w.c)("h4",null,"Created"),Object(j.a)(new Date(t.file.created||0)))),Object(w.c)("div",{className:"path-wrapper"},Object(w.c)("div",{className:"path"},Object(w.c)("h4",null,"Path"),Object(w.c)("span",{className:"path-link",onClick:function(){Object(C.d)((function(n){n.ui.browser.goTo(t.file.folder,t.file.name)}))}}," ",t.file.folder," ")))))))),Object(w.c)(M.a,{progress:rt}),Object(w.c)("div",{className:"main-editor-wrapper ".concat(T?"with-title-editor":"no-title-editor"," ").concat(t.windowId)},!Nt&&!Et&&"codemirror"===t.editorType&&Object(w.c)(U.a,{windowId:t.windowId,ref:J,file:t.file,pluginsConfig:t.pluginsConfig,value:d,posY:t.posY,jumpToLine:Lt||0,forceRender:xt,onChange:function(t){Mt(),R(t)},onEvent:function(t){},onScroll:function(n){t.onScroll(n),Ht({x:-9999,y:-9999,from:0,to:0,fromPx:-9999,toPx:-9999})},onTitleClick:t.onTitleClick,onCursorMove:function(t){Ht(t)}}),!Nt&&Et&&Object(w.c)("div",{className:"codemirror-mobile-fallback"},Object(w.c)("p",null," Note is too long for mobile, the advanced edition features are disabled "),Object(w.c)("textarea",{defaultValue:d,onChange:function(t){Mt(),R(t.target.value)}}))),Object(w.c)("div",{className:"mobile-text-manip-toolbar-wrapper",style:{top:Kt,left:Jt}},Object(w.c)(F.a,{cursorInfos:Ut,selection:Wt,onButtonClicked:function(n){if("aiSearch"===n)Object(Z.b)({windowId:t.windowId,file:t.file,fileContent:d,selectionTxt:Wt,insertPos:Ut.to});else if("calc"===n)Object(p.e)({windowId:t.windowId,file:t.file,fileContent:d,selectionTxt:Wt,insertPos:Ut.to});else if("undo"===n)Object(C.d)((function(t){t.ui.note.editorAction.dispatch({type:"undo"})}));else if("redo"===n)Object(C.d)((function(t){t.ui.note.editorAction.dispatch({type:"redo"})}));else{var e=X(n);e&&(Mt(),R(e),yt())}}})),nt&&tt,ft&&Object(w.c)(P,{file:t.file,onClose:function(){bt(!1)}}))},Q=function(t){return"\n\n\n.editor-area {\n\t\twidth: ".concat(Object(l.b)("desktop")?"50%":"editor"===t?"100vw":"0vw",";\n\t\tdisplay: block;\n\n\t\tposition: ").concat(Object(l.b)("desktop")||"editor"===t?"relative":"absolute!important",";\n\t\ttop: ").concat("editor"!==t||Object(l.b)("desktop")?"-9999px":"0px",";\n\n\n\t\t.mobile-text-manip-toolbar {\n\t\t\t\tdisplay: ").concat("editor"!==t||Object(l.b)("desktop")?"none":"flex",";\n\t\t}\n\n\t\t.infos-editor-wrapper {\n\t\t\t\t").concat(Object(l.b)("desktop")?"":"height: ".concat(x.a.sizes.mobile.editorTopWrapper,"px;"),"\n\t\t\t\t").concat(Object(l.b)("desktop")?"width: calc(200% - ".concat(3*x.a.sizes.block*2,"px);"):"","\n\t\t\t\tpadding: 0px ").concat(Object(l.b)("desktop")?3*x.a.sizes.block:2*x.a.sizes.block,"px;\n\t\t\t\tposition: relative;\n\n\t\t\t\t").concat(nt(),"\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(l.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(x.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(l.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(D.b,"\n }\n}\n\n\n\n\n.main-editor-wrapper {\n ").concat(Object(l.b)("desktop")?"":"padding: 0px ".concat(2*x.a.sizes.block,"px 0px ").concat(2*x.a.sizes.block,"px;"),"\n ").concat(Object(l.b)("desktop")?"":"margin: 0px 0px ".concat(x.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(x.a.sizes.mobile.editorTopWrapper+x.a.sizes.mobile.editorBar+2*x.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\n.editor-area {\n\tposition:initial;\n\t.infos-editor-wrapper {\n\t\t\tz-index: 1;\n\t\t\tposition:absolute;\n\t\t\ttop: 0px;\n\t\t\tright: 7px;\n\t\t\twidth: 100%;\n\t\t\t&.with-title-editor {\n\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n\t\t\t}\n\t\t\t//box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\theight: 32px;\n\t\t\tpadding: 0px;\n\t}\n\t.main-editor-wrapper {\n\t\t\tpadding-left: 0px;\n\t\t\tpadding-rigth: 10px;\n\t\t\t").concat(Object(l.b)("desktop")?"margin-top: 33px;":"margin-top: 0px;","; \n\t\t\twidth: 100%;\n\t}\n\t.main-editor-wrapper.no-title-editor {\n\t\tmargin-top: 0px;\n\t}\n\t.infos-editor-wrapper {\n\t\t\tpadding-left: 3px;\n\t\t\tpadding-rigth: 10px;\n\t\t\twidth: calc(100% - 10px);\n\t\t\t&.no-title-editor {\n\t\t\t\twidth: 30px;\n\t\t\t}\n\t\t\t.title-input-wrapper {\n\t\t\t\t\tpadding-left: 10px;\n\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\ttop: -6px;\n\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\tright: initial;\n\t\t\t\t\t\t\topacity: 0.5;\n\t\t\t\t\t}\n\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\twidth: calc(100% - 65px);\n\t\t\t\t\t\t\tfont-family: ").concat(x.a.font.editor,";\n\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\tfont-size: 15px;\n\t\t\t\t\t}\n\t\t\t}\n\t}\n}\n\n")},tt=function(t){var n=Object(a.useContext)(C.a),e=(null===n||void 0===n?void 0:n.status.isConnected)||!1;return Object(a.useMemo)((function(){return Object(w.c)(X,Object(o.a)({},t,{isConnected:e}))}),[t.viewType,t.mobileView,e,t.canEdit,t.editorType,t.windowId,t.file.created,t.file.name,t.file.path,t.file,t.fileContent,t.isActive,t.editorAction])},nt=function(){return"\n\n\n.file-path-wrapper {\n\t\tpadding-top: ".concat(Object(l.b)("desktop")?x.a.sizes.block:x.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(x.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(x.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(x.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\tmargin-bottom: 5px;\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")}},121:function(t,n,e){"use strict";e.d(n,"a",(function(){return M})),e.d(n,"b",(function(){return B}));var o=e(11),i=e(23),c=e(6),a=e(0),r=e.n(a),l=e(34),s=e(79),u=function(t){var n=t.headerLog,e={},o=function(t){e[t]&&delete e[t]};return{notify:function(t){for(var i in e){var c=e[i],a=!1;if(i.endsWith("-once")&&(i=i.replace("-once",""),a=!0),i===t.subId)try{c(t.data),a&&o("".concat(i,"-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(78),d=e(39),f=e(19),b=e(15),g=e(18),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="[IFRAME child js]",e={file:null,frameId:"",reloadCounter:0,windowId:"",innerTag:"",tagName:"",tagContent:"",loginToken:t.loginToken,backendUrl:t.backendUrl},o=function(t){if(""===e.frameId)return console.warn(n,"NO FRAME ID, CANNOT SEND TO PARENT");var o={subId:e.frameId,data:t};window.parent.postMessage(o,"*")},i=function(t){var n={error:"CUSTOM TAG/SCRIPT ERROR: ".concat(t)};o({action:"iframeError",data:n})};window.addEventListener("resize",(function(t){r("100%")}));var c,a={value:"100%"},r=function(t){var n=document.getElementById("content-wrapper");if(!t){if(!n||0===n.clientHeight)return;t=n.clientHeight+20}a.value="".concat(t),o({action:"resize",data:{height:t}})},l=function(){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;n&&n.call(t)},s=t.createEventBus({headerLog:"[FRAME API] 00567"}),u=s.subscribeOnce,p=s.notify,d=function(t,e){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(){e()};var i=document.getElementById("external-ressources-wrapper");if(!i)return console.error(n,"could not load ".concat(t," because ressource wrapper was not detected"));i.appendChild(o)},f=function(n){var e="?token=".concat(t.loginToken);return"".concat(t.backendUrl,"/static").concat("/.tiro/cache/ctag-ressources/").concat(t.getRessourceIdFromUrl(n)).concat(e)},b=function(t,cb){for(var e=0,o=function(){if(++e===t.length)try{cb&&cb()}catch(o){console.error(n,"ERROR LoadScript Callback : ".concat(o))}},i=function(){var e,i,a=t[c],r=f(a),l=!0===window.disableCache,s=function(){g("ressource.download",[a,"/.tiro/cache/ctag-ressources/"],(function(){d(r,(function(){o()}))}))};l?(console.warn(n,"CACHE DISABLED, DOWNLOADING RESSOURCES EVERYTIME!"),s()):(e=function(){d(r,(function(){o()}))},i=function(){s()},fetch(r,{method:"HEAD"}).then((function(t){return t.ok?e():i()})).catch((function(t){return i(t)})))},c=0;c<t.length;c++)i()},g=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 c="iframe-api-call-".concat(t.generateUUID()," ");u(c,(function(t){cb&&cb(t)})),o({action:"apiCall",data:{reqId:c,apiName:n,apiArguments:e}})},h={version:1.2,call:g,utils:{getInfos:function(){return e},loadCachedRessources:b,getCachedRessourceUrl:f,getRessourceIdFromUrl:t.getRessourceIdFromUrl,loadScripts:function(t,cb){b(t,cb)},loadRessources:function(t,cb){b(t,cb)},loadScriptsNoCache:function(t,cb){for(var e=0,o=0;o<t.length;o++){var i=t[o],c=document.createElement("script");c.src=i,c.onload=function(){if(++e===t.length)try{cb&&cb()}catch(o){console.error(n,"ERROR LoadScript Callback : ".concat(o))}};var a=document.getElementById("external-ressources-wrapper");a&&a.appendChild(c)}},resizeIframe:r,fullscreenIframe:l,canScrollIframe:function(t){o({action:"canScrollIframe",data:{status:t}})},loadCustomTag:function(t,n,e){var o=h.utils.createDiv(),i=o.div,c=o.updateContent;e||(e={}),e.base_url=t.split("/").slice(0,-1).join("/").replace("//","/"),e.plugins_root_url=e.base_url.split("/").slice(0,-1).join("/").replace("//","/");var a=!0;return!1===e.padding&&(a=e.padding),h.utils.loadScripts([t],(function(){var t=window.initCustomTag("".concat(n),e);a&&(t='<div class="with-padding" style="padding: 0px 15px;">'.concat(t,"</div>")),c(t)})),i},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=h,c={init:function(o){e.frameId=o.frameId,e.innerTag=o.innerTag,e.tagContent=o.tagContent,e.tagName=o.tagName,e.file=o.file,e.reloadCounter=o.reloadCounter,e.windowId=o.windowId;var c,a=document.getElementById("content-wrapper");if(a){var l=t.unescapeHtml(a.innerHTML),s=(c=l,t.replaceCustomMdTags(c,"[[script]]",(function(t){var e="".concat(t);try{return new Function(e)()}catch(o){console.warn(n,"[SCRIPT] error: ".concat(o),e),i("".concat(o,' in Code "').concat(e,'"'))}})));a.innerHTML=s,setTimeout((function(){r()}),100),t.bindToElClass("title-search-link",(function(t){var n=t.dataset.file,e=t.dataset.folder,o=t.dataset.windowid;h.call("ui.browser.goTo",[e,n,{openIn:o}])}))}},askFullscreen:l,apiAnswer:function(t){var n={subId:t.reqId,data:t.data};p(n)}},window.onmessage=function(t){var n=t.data;if(n)for(var e in c)c&&c[e]&&e===n.action&&c[e](t.data.data)},h},y=e(12),_=e(69),C=e(35),E=e(4),S=e(56);g.a.client.log.verbose;var T=["epub","pdf","iframe","web","smartlist"],I=function(t,cb){Object(y.d)((function(n){n.file.getContent("/.tiro/tags/".concat(t,".md"),(function(t){cb(t)}),{onError:function(){T.includes(t)?function(t,cb){var n="https://raw.githubusercontent.com/dotgreg/tiro-notes/dev/plugins/".concat(t,"/").concat(t,".js"),e="";"epub"===t&&(e='open:true, size: "80%"'),"pdf"===t&&(e="open:true"),"web"===t&&(e='"search_engines": {\n "default":"https://search.bowlman.org/search?q=",\n "g":"https://www.google.com/search?q=",\n "m": "https://www.google.com/maps/search/"\n }');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)}})}))},N=e(14),P=e(31),R=e(1),A=(g.a.client.log.verbose,{}),F={},L=["latex","l"],D=function(t){var n="tag"===t.block.type&&!L.includes(t.block.tagName||""),e=Object(a.useState)(null),o=Object(c.a)(e,2),r=o[0],l=o[1],u=Object(a.useState)(null),p=Object(c.a)(u,2),d=p[0],f=p[1],b=Object(a.useState)("null"),g=Object(c.a)(b,2),h=g[0],m=g[1];Object(a.useEffect)((function(){var e,cb;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&&(e=t.block.tagName,cb=function(t){t?(l(t),setTimeout((function(){m("loaded")}),100)):l(null)},Object(y.d)((function(t){t.plugins.get(e,"tag",(function(t){t&&"tag"===t.type?cb(t.code):("iframe"===e&&(e="web"),I(e,(function(t){cb(t)})))}))}))))}),[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(R.c)("span",{className:"content-block ".concat(n?"block-tag":"block-text"," ")},"loaded"===h&&n&&r&&Object(R.c)(z,Object(i.a)({},t,{noteTagContent:r})),!n&&d&&Object(R.c)("span",{className:"content-block-text",dangerouslySetInnerHTML:{__html:d}}))},M=r.a.memo(D,(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),t.windowId!==n.windowId&&(e=!1),e})),z=function(t){var n=Object(o.a)({},t).noteTagContent,e=Object(a.useState)(""),i=Object(c.a)(e,2),g=i[0],h=i[1],m=Object(a.useRef)(null),v=Object(a.useState)(""),w=Object(c.a)(v,2),O=w[0],j=w[1],T=Object(a.useState)(!1),I=Object(c.a)(T,2),L=I[0],D=I[1],M=Object(a.useState)(0),z=Object(c.a)(M,2),B=z[0],U=z[1],H=Object(a.useState)(null),W=Object(c.a)(H,2),q=W[0],V=W[1],K=Object(a.useState)(!1),J=Object(c.a)(K,2),G=J[0],Y=J[1],$=function(){var n,e,o=function(n){G&&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)($,[t.yCnt,G]);var Z=Object(C.a)((function(e){$(),j(e),V(null),x.subscribe(e,(function(n){if("resize"===n.action){var e=n.data,o=0,i=document.querySelector(".window-id-sizeref-".concat(t.windowId));if(!i)return;var c=i.getBoundingClientRect();if(Object(E.isString)(e.height)&&e.height.endsWith("%")){var a=parseInt(e.height.replace("%",""))/100;o=c.height*a}else if(Object(E.isNumber)(e.height))o=e.height;else{i.getBoundingClientRect();o=300}t.ctagHeightOffset&&(o+=t.ctagHeightOffset),U("".concat(o,"px")),D(!0)}if("canScrollIframe"===n.action){var r=n.data;Y(r.status)}if("apiCall"===n.action){var l=n.data;Object(y.b)(l,(function(t,e){if("nok"===t)return V(e.error);var o={reqId:n.data.reqId,data:e};x.send(m.current,{action:"apiAnswer",data:o})}))}if("iframeError"===n.action){var s=n.data.error;V(s),Object(P.d)("".concat(s))}})),setTimeout((function(){var o={file:t.file,innerTag:t.block.content,windowId:t.windowId,frameId:e,reloadCounter:nt,tagContent:n,tagName:t.block.tagName||"",loginToken:Object(f.b)(),backendUrl:Object(b.c)()};x.send(m.current,{action:"init",data:o})}),100)}),500),X=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"),i='\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)(),"\n\t\t\t\t</style>\n\t\t\t\t");i=Object(S.a)(i,[["{{innerTag}}",t.block.content.trim()]]),h(i)},Q=Object(a.useState)(0),tt=Object(c.a)(Q,2),nt=tt[0],et=(tt[1],Object(a.useState)(!1)),ot=Object(c.a)(et,2),it=ot[0];ot[1];Object(a.useEffect)((function(){D(!1),X();var t="iframe-".concat(Object(l.a)());return Z(t),function(){x.unsubscribe(t)}}),[t.windowId,t.block.content,t.block.tagName,t.noteTagContent,nt]);var ct=t.index||0,at="".concat(t.windowId,"-").concat(ct,"-").concat(t.block.tagName);Object(a.useEffect)((function(){A[at]?ut(!0):A={},F[at]?bt(!0):A={}}),[]);var rt=Object(a.useState)(!1),lt=Object(c.a)(rt,2),st=lt[0],ut=lt[1],pt=Object(a.useState)(!1),dt=Object(c.a)(pt,2),ft=dt[0],bt=dt[1],gt=function(t){t||(t=!ft),F[at]=t,bt(t),ut(!1)};Object(a.useEffect)((function(){t.ctagFullscreen&>(!0)}),[t.ctagFullscreen]);var ht=Object(l.a)();return Object(R.c)(r.a.Fragment,null,ft&&Object(R.c)("div",{className:"fullscreen-pin-bg",onClick:function(n){gt(!1),t.ctagOnFullscreenClose&&t.ctagOnFullscreenClose()}}),Object(R.c)("div",{className:"iframe-view-wrapper ".concat(L?"can-show":"hide"," iframe-tag-").concat(t.block.tagName," ").concat(st?"pinned":"not-pinned"," ").concat(ft?"pinned fullscreen":"not-fullscreen"," ").concat(Object(N.d)()?"mobile":"")},!it&&Object(R.c)("iframe",{onMouseLeave:function(t){!function(t,n){var e=document.getElementById(n);e&&e.focus({preventScroll:!0})}(0,ht)},ref:m,id:O,"data-testid":"iframe",title:O,srcDoc:g,className:"tag-iframe",style:{height:B},sandbox:t.ctagSandboxed?"allow-scripts allow-same-origin allow-popups":void 0}),q&&Object(R.c)("div",{className:"iframe-error"},Object(R.c)("code",null,Object(R.c)("pre",null,q))),Object(R.c)("input",{className:"refocus-input",id:ht,type:"text"})))},B=function(){return"\n.refocus-input {\n\tposition: fixed;\n\tz-index: -10000;\n\twidth: 0px;\n\theight: 0px;\n\topacity: 0.00001;\n\ttop: -10000px;\n\tleft: -10000px;\n}\n.content-blocks-wrapper {\n\t\t// padding: 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"}},122:function(t,n,e){"use strict";e.d(n,"a",(function(){return K})),e.d(n,"b",(function(){return J}));var o=e(6),i=e(0),c=e.n(i),a=e(178),r=e(179),l=e(43),s=e(13),u=e(307),p=e(10),d=e(53),f=e(14),b=e(163),g=e(51),h=e(155),m=e(17),v=e(4),w=e(18),O=e(12),j=e(31),x=(w.a.client.log.verbose,function(t,n,e,o,i){return{label:t,apply:n||t,info:e,detail:i,type:"tag",boost:o||0}}),k=function(t){var n=_(t);return[C,n,y]},y=function(t){var n=t.matchBefore(/\-\-/);if(!t.explicit&&!n)return null;var e="".concat(w.a.path.configFolder,"/snippets.md");return new Promise((function(o,i){Object(O.d)((function(i){i.file.getContent(e,(function(e){var i=[],c=e.split("\n");Object(v.each)(c,(function(t){var n,e=(t=t.split("\\n").join("\n")).split("|"),o=null===(n=e.shift())||void 0===n?void 0:n.trim(),c=e.join("|").trim();if(c&&o){if(o="--"+o,c.includes("${")){var a=c;try{c=new Function("return `"+a+"`")()}catch(s){var r="".concat("[Code Mirror]"," snippets error: ").concat(JSON.stringify({e:s,oto:a}));Object(j.d)(r)}}var l=c.length>20?"".concat(c.substring(0,20),"..."):c;i.push(x(o,c,void 0,void 0,l))}}));var a={from:n?n.from:t.pos,options:i,validFor:/.*/};o(a)}))}))}))},_=function(t){return function(n){var e=n.matchBefore(/\#/);return n.explicit||e?new Promise((function(o,i){Object(O.d)((function(i){var c=t.folder;console.log("searching for folder",c),i.search.word("#",c,(function(t){var i=[];Object(v.each)(t,(function(t){Object(v.each)(t.results,(function(t){var n=t.split(" ");Object(v.each)(n,(function(t){(t=t.trim())&&t.startsWith("#")&&(t.length<=1||"#"!==t[1]&&i.push(x(t,t)))}))}))}));var c={from:e?e.from:n.pos,options:i,validFor:/.*/};o(c)}))}))})):null}},C=function(t){var n=t.matchBefore(/\[\[/);return t.explicit||n?new Promise((function(e,o){var i=new Promise((function(t,n){Object(O.d)((function(n){n.files.get("/.tiro/tags",(function(e){var o=0,i=[];Object(v.each)(e,(function(c){n.file.getContent(c.path,(function(n){o++,i.push({name:c.name,content:n}),o===e.length&&t(i)}))}))}))}))})),c=new Promise((function(t,n){Object(O.d)((function(n){var e=[];n.plugins.list((function(n){Object(v.each)(n,(function(t){"tag"===t.type&&e.push({name:t.name,content:t.code})})),t(e)}))}))}));Promise.all([c,i]).then((function(t){var n=function(t){var n=[];return Object(v.each)(t,(function(t){var e=t.name.replace(".md",""),o="[[".concat(e,"]]"),i="".concat(o," ").concat(o),c="Insert installed custom tag ".concat(o),a=0,r=t.content.split("\n"),l="// --insert:",s="// --comment:",u="// --boost:";Object(v.each)(r,(function(t){(t=t.split("\\n").join("\n")).startsWith(l)&&(i=t.replace(l,"")),t.startsWith(s)&&(c=t.replace(s,"")),t.startsWith(u)&&(a=parseInt(t.replace(u,"")))})),n.push(x(o,i,c,a))})),n}([].concat(Object(m.a)(t[0]),Object(m.a)(t[1])));a(n)})).catch((function(){console.warn("ERROR HERE")}));var a=function(o){var i={from:n?n.from:t.pos,options:o,validFor:/.*/};e(i)}})):null},E=e(91),S=e(77),T=e(117),I=e(64),N=e(88),P=e(168),R=e(29),A=e(74),F=e(47),L=e(1),D=function(t,n){return Object(F.a)({file:t,windowId:n,pattern:R.a.ressource,replacement:function(e){var o=document.createElement("span"),i=e[2];return"none"===Object(A.a)(i)?o.innerHTML=Object(N.a)(e[0],e[2],t,!0):o.innerHTML=function(t,n,e){var o=t[0],i='<div class="mdpreview-source">'.concat(o,"</div>"),c=Object(P.renderToString)(Object(L.c)(S.a,{markdownTag:o,file:n,windowId:e}));return"".concat(c," ").concat(i)}(e,t,n),o}})},M=e(82),z=e(169),B=e(25),U=e(35),H=e(170),W="[Code Mirror]",q=w.a.client.log.verbose,V=Object(i.forwardRef)((function(t,n){var e=function(){var t=n.current;return t&&t.state?t:null},p=Object(i.useRef)(null);Object(i.useEffect)((function(){!function(){var n,o=e();if(!o)return!1;if(t.value===p.current)return!1;if("loading..."===t.value)return!1;if((null===(n=o.view)||void 0===n?void 0:n.state.doc.toString())===t.value)return!1;var i=g.a.getCurrentLineInfos(o);if(!i)return!1;var c=i.currentPosition;g.a.updateText(o,t.value,c),p.current=t.value}()}),[t.value,t.forceRender,t.file.path]);var m=Object(i.useState)(!1),w=Object(o.a)(m,2),j=w[0],x=w[1];Object(i.useEffect)((function(){x(!1)}),[t.file.path]),Object(i.useEffect)((function(){!0===j&&y()}),[t.value]);var y=Object(U.a)((function(){var t=e();g.a.foldAllChildren(t)}),500),_=Object(i.useRef)(t.value);Object(i.useEffect)((function(){_.current=t.value}),[t.value]);var C=function(n,e){n!==t.value&&(p.current=n,_.current=n,t.onChange(n),St(!1),M.a.val=!1,P(),G(n))};Object(i.useEffect)((function(){if(q&&console.log(W,"JUMP to line :",t.jumpToLine),-1!==t.jumpToLine){var n=e();if(n&&!(t.posY<=-10))try{g.a.scrollToLine(n,t.jumpToLine)}catch(o){console.log(o)}}}),[t.jumpToLine]);Object(i.useEffect)((function(){P()}),[t.value]),Object(i.useEffect)((function(){P()}),[]);var S=Object(b.a)(".window-id-".concat(t.windowId)).resizeState;Object(i.useEffect)((function(){P()}),[S,t.windowId]);var P=function(){var n=e();if(n){var o=g.a.getEditorInfos(n.view);d.a.updateEditorDims(t.windowId,{viewport:o.viewportHeight(),full:o.contentHeight}),d.a.updateScrollerDims(t.windowId)}},R=Object(E.c)({file:t.file,onTitleClick:function(n){!function(n){var o=e();if(o){var i=g.a.getCurrentLineInfos(o);i&&(q&&console.log(W,"CLICK ON TITLE DETECTED",n,i),t.onTitleClick(i.lineIndex))}}(n)}}),A=Object(i.useState)(null),F=Object(o.a)(A,2),V=F[0],K=F[1];Object(i.useEffect)((function(){var t=null;Object(v.each)(r.a,(function(n){"Javascript"===n.name&&(t=n)})),K(t)}),[]),Object(v.each)(r.a);var J={base:a.markdownLanguage,codeLanguages:r.a,extensions:[]};V&&(J.defaultCodeLanguage=V);var G=Object(U.a)((function(t){t.includes("--table")&&!Z&&(X(!0),pt()),t.includes("--latex")&&!nt&&(et(!0),pt()),t.includes("--spellcheck")&&!ct&&(at(!0),pt()),!t.includes("--table")&&Z&&(X(!1),pt()),!t.includes("--latex")&&nt&&(et(!1),pt()),!t.includes("--spellcheck")&&ct&&(at(!1),pt())}),500),Y=Object(i.useState)(!1),$=Object(o.a)(Y,2),Z=$[0],X=$[1],Q=Object(i.useState)(!1),tt=Object(o.a)(Q,2),nt=tt[0],et=tt[1],ot=Object(i.useState)(!1),it=Object(o.a)(ot,2),ct=it[0],at=it[1],rt=Object(i.useState)(0),lt=Object(o.a)(rt,2),st=lt[0],ut=lt[1],pt=function(){ut(st+1)};Object(i.useEffect)((function(){G(t.value)}),[t.value]);var dt=Object(i.useState)([]),ft=Object(o.a)(dt,2),bt=ft[0],gt=ft[1],ht=Object(i.useState)(""),mt=Object(o.a)(ht,2),vt=mt[0],wt=mt[1];Object(i.useEffect)((function(){Object(O.d)((function(n){var e=[Object(l.a)({override:k(t.file)}),s.c.domEventHandlers({scroll:function(t,n){},wheel:function(n,e){var o=g.a.getEditorInfos(e);d.a.onEditorScroll(t.windowId,o.currentPercentScrolled()),t.onScroll()}})];(n.userSettings.get("ui_editor_spellcheck")||ct)&&e.push(s.c.contentAttributes.of({spellcheck:"true"}));var o=t.pluginsConfig;o||(o={}),Object(v.isBoolean)(o.markdown)||(o.markdown=!0),Object(v.isBoolean)(o.linkPreview)||(o.linkPreview=!0);var i=n.userSettings;Object(f.a)();e.push(Object(H.b)(t.file,t.windowId)),i.get("ui_editor_links_as_button")&&(e.push(Object(T.c)(t.file,t.windowId)),e.push(Object(I.c)(t.file,t.windowId,o.linkPreview))),i.get("ui_editor_markdown_table_preview")&&Z&&(e.push(Object(M.f)(t.file,t.windowId)),e.push(Object(M.g)(t.file,t.windowId)),e.push(Object(M.d)(t.file,t.windowId)),e.push(Object(M.c)(t.file,t.windowId))),i.get("ui_editor_markdown_latex_preview")&&nt&&J.extensions.push(E.a),i.get("ui_editor_markdown_preview")&&(e.push(R),i.get("ui_editor_markdown_enhanced_preview")&&(e.push(Object(N.c)(t.file,t.windowId)),e.push(D(t.file,t.windowId)),e.push(Object(z.a)(t.file,t.windowId)))),o.markdown?e.push(Object(a.markdown)(J)):e.push(Object(M.b)(t.file,t.windowId));var c="device-".concat(Object(f.a)()," ");i.get("ui_editor_markdown_table_preview")&&(c+="md-table-preview-enabled"),e.push(Ot),gt(e),wt(c)}))}),[t.pluginsConfig,t.windowId,t.file.path,t.value,nt,Z,ct,st]);var Ot=s.c.domEventHandlers({blur:function(n,e){t.onEvent("blur")},focus:function(n,e){t.onEvent("focus")}}),jt=Object(i.useRef)(""),xt=Object(i.useRef)([-9999,-9999]),kt=Object(i.useState)([-9999,-9999]),yt=Object(o.a)(kt,2),_t=(yt[0],yt[1]),Ct=Object(i.useState)(!1),Et=Object(o.a)(Ct,2),St=(Et[0],Et[1]),Tt=Object(i.useRef)({from:-1,to:-1}),It=Object(i.useRef)({from:-1,to:-1}),Nt=[30,10],Pt=Object(i.useState)({x:0,y:0}),Rt=Object(o.a)(Pt,2),At=(Rt[0],Rt[1],Object(U.a)((function(n){var o,i=null===(o=e())||void 0===o?void 0:o.view;if(i){var c=i.coordsAtPos(i.state.selection.main.head),a=i.coordsAtPos(i.state.selection.ranges[0].from);if(!c)return;t.onCursorMove({x:c.left,y:c.top,from:n.from,to:n.to,fromPx:(null===a||void 0===a?void 0:a.top)||0,toPx:(null===a||void 0===a?void 0:a.bottom)||0})}n.from!==n.to&&Object(v.isNumber)(n.from)&&Object(v.isNumber)(n.to)&&(n.from<0||n.to<0||JSON.stringify(It.current)!==JSON.stringify(n)&&(It.current=Object(v.cloneDeep)(n),Lt()))}),200)),Ft=function(t,n){"up"===t?jt.current=t:"down"===t?St(!1):"move"===t&&(xt.current=[n.clientX,n.clientY])},Lt=function(){Object(O.d)((function(t){if(t.userSettings.get("ui_editor_ai_text_selection")){St(!0);var n=xt.current;_t([n[0]+Nt[0],n[1]+Nt[1]])}}))},Dt=Object(i.useMemo)((function(){return Object(L.c)(c.a.Fragment,null,Object(L.c)(u.a,{value:"",ref:n,theme:Object(h.a)(),onChange:C,onUpdate:function(t){!function(t){var n=t.state.selection.ranges[0];Tt.current=n,At(n)}(t)},basicSetup:{foldGutter:!0,dropCursor:!1,allowMultipleSelections:!1,indentOnInput:!1,closeBrackets:!1,history:!0,bracketMatching:!1,lineNumbers:!1},extensions:bt}))}),[t.value,bt]);return Object(L.c)(c.a.Fragment,null,Object(L.c)("div",{className:"codemirror-editor-wrapper ".concat(vt," "),onClick:function(t){Ft("up",t)},onMouseDown:function(t){Ft("down",t)},onMouseMove:function(t){return Ft("move",t)}},Object(L.c)("div",{className:"foldall-wrapper ".concat(Object(f.a)()),onClick:function(t){!function(){var t=e();j?g.a.unfoldAllChildren(t):g.a.foldAllChildren(t,!1),x(!j)}()}},Object(L.c)(B.b,{name:"".concat(j?"up-right-and-down-left-from-center":"down-left-and-up-right-to-center"),label:"".concat(j?"Unfold all text":"Fold all text")})),Dt))})),K=c.a.memo(V,(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})),J=function(){return"\n.codemirror-popup-cursor {\n\tposition: fixed;\n\tz-index: 2;\n\tbackground: white;\n\tpadding: 5px;\n\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\tborder-radius: 3px;\n}\n.cm-hover-popup.cm-selection-popup {\n\tdisplay: flex;\n\tposition: fixed;\n\tz-index: 2;\n\tbackground: white;\n\tpadding: 5px;\n\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\tborder-radius: 3px;\n\topacity:0.4;\n\ttransition: all 0.2s;\n\t.link-action {\n\t\tpadding: 0px 3px;\n\t\tdisplay: flex;\n\t\t.result-calc {\n\t\t\tpadding: 0px 3px;\n\t\t}\n\t}\n\t&:hover {\n\t\topacity:1;\n\t}\n\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)!important;\n}\n\n\n.cm-gutters {\n\t\tborder: none;\n\t\topacity: 0;\n\t\tz-index: 0;\n\t\t&:hover {\n\t\t\t\topacity: 1;\n\t\t}\n\t\t.cm-gutter {\n\t\t\t\t.cm-gutterElement span {\n\t\t\t\t\t\tcolor: #cccaca;\n\t\t\t\t}\n\t\t}\n}\n.device-mobile {\n\t\t.cm-gutters {\n\t\t\t\topacity:1!important;\n\t\t\t\t// background:red!important;\n\t\t}\n}\n\n.foldall-wrapper {\n\t\t&.desktop {\n\t\t\t\topacity: 0;\n\t\t}\n\t\t&.desktop:hover {\t\n\t\t\t\topacity: 1;\n\t\t}\n\t\t&::selection {\n\t\t\t\tbackground: none;\n\t\t}\n\t\t\n\t\topacity:0.6;\n\t\tposition: absolute;\n\t\tz-index: 1;\n\t\ttop: 2px;\n\t\tcolor: #d7d7d7;\n\t\tcursor: pointer;\n\t\tpadding: 5px 4px;\n\t\tleft: 0px;\n\t\tbackground: white;\n}\n\n\n.actionable-title {\n\t\tcolor: ".concat(p.a.colors.main,";\n\t\tposition: relative;\n\t\t// &:before {\n\t\t\t\t// \t\tcontent: \"\u279d\";\n\t\t\t\t// \t\tposition: absolute;\n\t\t\t\t// \t\tright: -20px;\n\t\t\t\t// \t\tcolor: #c6c6c6;\n\t\t\t\t// \t\tfont-size: 18px;\n\t\t\t\t// \t\topacity: 0;\n\t\t\t\t// \t\ttransition: 0.2s all;\n\t\t\t\t// \t\tbottom: -3px;\n\t\t\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-foldPlaceholder {\n\t\tmargin-left: 8px;\n\t\topacity: 0.5;\n\t\tpadding: 2px 5px;\n\t\tborder: none;\n}\n.cm-foldGutter {\n\t\t&::before {\n\n\t\t}\n}\n\n.cm-focused {\n\t\toutline: none!important;\n}\n.main-editor-wrapper {\n\t\t// width: calc(100% + 18px);\n\t\t// margin: 32px 0px 0px 0px;\n\t\tpadding: 0px;\n\t\twidth:100%;\n\t\theight: ").concat(Object(f.b)("desktop")?"calc(100% - 32px);":"calc(100% - 180px);",'; \n}\n\n.codemirror-editor-wrapper {\n\t\t// margin-right: 18px;\n\t\t// width: calc(100% - 10px);\n\t\tposition: relative;\n\t\t// left: -10px;\n}\n.codemirror-editor-wrapper, .cm-editor, .cm-theme {\n\t\t// height: 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\n.cm-scroller {\n\t\tz-index: auto!important;\n\t\twidth: calc(100% - 30px);\n\t\twidth: calc(100% - 23px); // reduce width overall CM\n\t\tpadding-right: 35px; // make scrollbar disappear\n\t\tpadding-left: 5px; // some space for the gutter\n\t\t.cm-content {\n\t\twidth: calc(100% - 10px); // needed otherwise x scroll\n\t\toverflow:hidden;\n\t\twhite-space: pre-wrap;\n\t}\xa0\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(p.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\tp {\n\t\t\t\tcolor:grey;\n\t\t\t\tfont-size: 10px;\n\t\t}\n\t\ttextarea {\n\t\t\t\twidth: calc(100% - 20px);\n\t\t\t\theight: calc(100vh - 230px);\n\t\t\t\tborder: 0px;\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(E.d)(),"\n\n// // FILE RESSOURCE PREVIEW\n// ").concat(Object(S.b)(),"\n\n// // PREVIEW LINK\n// ").concat(Object(I.b)(),"\n\n\n// ").concat(Object(M.e)(),"\n")}},125:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));var o=e(11),i=e(12),c=e(59),a={},r=function(t){console.log("trigger AI search",t.windowId,t.file.path,t.selectionTxt,t.insertPos);var n=t.selectionTxt,e=t.fileContent,r=t.insertPos,l=e,s=!1,u=n=(n=(n=(n=n.replaceAll('"','\\"')).replaceAll("'","\\'")).replaceAll("`","\\`")).replaceAll("$","\\$"),p=function(){return{title:"Ai Answer",currentContent:l,textUpdate:" waiting for answer...",question:u,insertPos:r,windowId:t.windowId,file:t.file,isLast:!1}};a[t.windowId]=!0,Object(i.d)((function(e){var i=e.userSettings.get("ui_editor_ai_command");i=i.replace("{{input}}",n),Object(c.b)(p()),e.command.stream(i,(function(n){if(n.isError&&(s=!0),s){if(console.log("[AI ERROR]",n),""===n.text||"[object Object]"===n.text)return;e.ui.notification.emit({content:"[AI] Error while executing command <br/>============<br/> ANSWER => <br/>".concat(n.text," </br>============"),options:{hideAfter:600}}),Object(c.b)(Object(o.a)(Object(o.a)({},p()),{},{textUpdate:"",isLast:!0,linejump:a[t.windowId]}))}else Object(c.b)(Object(o.a)(Object(o.a)({},p()),{},{textUpdate:n.textTot,isLast:n.isLast,linejump:a[t.windowId]}))}))}))}},134:function(t,n,e){"use strict";e.d(n,"b",(function(){return f})),e.d(n,"a",(function(){return b}));var o=e(17),i=e(4),c=e(18),a=e(31),r="tiro-ls-id-",l=function(t,n){var e=JSON.stringify(n);localStorage.setItem(r+t,e)},s="local_node_history",u="[".concat(s.toUpperCase(),"]"),p=c.a.client.log.verbose,d="notes-history-ls",f=function(t){var n=[],e=Object(i.cloneDeep)(function(t){var n,e=window.localStorage.getItem(r+t);return e&&(n=JSON.parse(e)),n||null}(d));e&&(n=t?e.filter((function(n){return n.path===t})):e);return n},b=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,e=arguments.length>2?arguments[2]:void 0;if(!t.content.includes("--disable-history--")){var i=t,c=f(),a=f(i.path);e&&console.log(u,"adding el to ls : ",{itAdd:i}),c=c.filter((function(t){return t.path!==i.path})),a.unshift(i),a.length>n&&(a=a.slice(0,n)),c=[].concat(Object(o.a)(a),Object(o.a)(c));var r=g(c,3);l(d,r)}},g=function t(n,e){var o=n,i=JSON.stringify(o);return h(i)>e&&o.length>1?(o.pop(),p&&console.log(u,"recursivelyReduceArrTillSmallerThan REDUCE ARR > new length=",o.length),t(o,e)):o},h=function(t){return new Blob([t]).size/1048576};Object(a.a)(s,"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(i.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")};b(e,10,t)})),Object(a.a)(s,"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(a.c)(s,"addLocalNoteHistory")(n,e)})),Object(a.a)(s,"getLocalNoteHistory",(function(t){console.log(f(t),"size: ".concat(h(JSON.stringify(f(t))),"MB"))})),Object(a.a)(s,"cleanLocalNoteHistory",(function(){l(d,[]),console.log(f(),"size: ".concat(h(JSON.stringify(f())),"MB"))}))},136:function(t,n,e){"use strict";e.d(n,"a",(function(){return l})),e.d(n,"b",(function(){return s}));var o=e(4),i=(e(0),e(10)),c=e(25),a=e(99),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(a.b)({fileToUpload:n,folder:t.file.folder,windowId:t.windowId})}))}}),Object(r.c)("label",{htmlFor:"file-".concat(i)},Object(r.c)(c.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")}},137:function(t,n,e){"use strict";e.d(n,"a",(function(){return s})),e.d(n,"b",(function(){return p}));var o=e(11),i=e(57),c=e(12),a=e(4),r="tiro-analytics",l=function(cb){Object(c.d)((function(t){t.cache.get(r,(function(t){var n={};t&&(n=t),cb(n)}))}))},s=function(t){var n=Object(i.c)();l((function(e){var i,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,i=l,Object(c.d)((function(t){t.cache.set(r,i,-1)}))}))},u=function(cb,t){t||(t={});t.start?t.start:Object(i.c)(Object(i.b)("lastMonth")),t.end?t.end:Object(i.c)();l((function(t){cb(t)}))},p=function(t){return{log:s,report:u}}},14:function(t,n,e){"use strict";e.d(n,"d",(function(){return o})),e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return a}));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},i=function(t){return a()===t};function c(){return!!/iPad/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}var a=function(){var t=window.innerWidth,n="desktop";return r()||t<1e3&&(n="tablet"),t<500&&(n="mobile"),n},r=function(){return!l()},l=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}},15:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return h})),e.d(n,"c",(function(){return m})),e.d(n,"d",(function(){return v}));var o,i=e(11),c=e(17),a=e(4),r=e(84),l=e(41),s=e(215),u=e.n(s),p=e(12),d=e(26),f=e(18),b="[RIPGREP INSTALL]",g=function(t){var n="rg-".concat(t.os,"-").concat(t.arch);"win"===t.os&&(n+=".exe");var e=-1!==["rg-darwin-arm","rg-darwin-x64","rg-darwin-x64","rg-linux-x64","rg-win-x64.exe"].indexOf(n),o="Tiro Notes requires the tool Ripgrep, which does not seem to be installed on your computer",i="Install Ripgrep",c=function(){},a="rg-install-notif";e&&(o+="<br>Do you want Tiro to download and install it? <br><br> The following version will be downloaded and installed: <br><code>".concat(n,"</code>"),c=function(){var e="".concat("https://github.com/dotgreg/tiro-notes/raw/master/platforms/electron/not-packaged/ripgrep/").concat(n);Object(p.d)((function(o){o.config.get((function(i){var c=Object(d.b)("".concat(f.a.path.configFolder,"/bin/")),r=Object(d.b)("".concat(i.dataFolder,"/").concat(c,"/").concat(n));console.log(c,r),o.ui.notification.emit({id:a,content:"".concat(b," downloading ripgrep..."),options:{hideAfter:-1}}),o.ressource.download(e,c,(function(){var n,cb;o.ui.notification.emit({id:a,content:"".concat(b," updating config..."),options:{hideAfter:-1}}),n=r,cb=function(){o.userSettings.updateSetupJson("rg_path",r,(function(t){o.ui.notification.emit({id:a,content:"".concat(b," finished, restarting tiro notes..."),options:{hideAfter:10}})}),{requiresServerRestart:!0})},"win"!==t.os?Object(p.d)((function(t){var e="chmod 0755 ".concat(n);t.command.exec(e,(function(t){console.log("".concat(b," -> cmd: ").concat(e," : ").concat(t)),cb(t)}))})):cb()}),{fileName:n})}))}))}),e||(o+='\n <br><br>To install it, follow these instructions :<br> <a href="https://github.com/BurntSushi/ripgrep#installation">https://github.com/BurntSushi/ripgrep#installation</a> \n <br> then restart Tiro',i="ok"),Object(p.d)((function(t){t.popup.prompt({title:"Ripgrep install required",text:o,onAccept:c,onRefuse:function(){},acceptLabelButton:i})}))},h={on:function(){},off:function(){}},m=function(){var t=l.a.global.protocol,n=Object(r.b)("backend-port")?":".concat(Object(r.b)("backend-port")):"".concat(l.a.global.port),e="".concat(t).concat(l.a.global.url).concat(n);return Object(r.b)("backend-port").includes(".")&&(e="".concat(t).concat(Object(r.b)("backend-port"))),e},v=function(){return new Promise((function(t,n){if(!o){var e=s?u.a:function(){};o=e(m()),l.a.log.socket&&console.log("[SOCKET] try connecting to ".concat(m(),"...")),(h=O(o)).on("onServerError",(function(t){"NO_RIPGREP_COMMAND_AVAILABLE"===t.status&&Object(p.d)((function(n){g(t.platform)}))})),h.on("connectionSuccess",(function(n){l.a.log.socket&&console.log("[SOCKET] connection successful!, socket.connected :".concat(o.connected),n),n.isRgGood,t({socket:o,ipsServer:n.ipsServer,socketManager:h})}))}}))},w=function(t,n){return["%c [CLIENT SOCKET 2] ".concat(t),"background: #ccc; color: red",n||null]},O=function(t){var n={};return{on:function(e,o){var r=function(t,n){return function(e){var o;l.a.log.socket&&(o=console).log.apply(o,Object(c.a)(w("<== ON ".concat(t," "),Object(i.a)({},e)))),n(e)}}(e,o),s=Object(a.random)(1,1e8);return n[s]={endpoint:e,apiFn:r},t.on(e,r),s},off:function(e){n[e]&&(t.off(n[e].endpoint,n[e].apiFn),delete n[e])},emit:function(n,e){var o;l.a.log.socket&&(o=console).log.apply(o,Object(c.a)(w("==> EMIT ".concat(n," "),Object(i.a)({},e)))),t.emit(n,e)}}}},154:function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var o=e(4),i=e(29),c=e(39),a=function(t,n){var e=t.match(i.a.image),a=[];return Object(o.each)(e,(function(t){var e=t.match(i.a.firstPartImg),o=e&&e[0]?e[0].replace("![","").replace("]","").replace("(",""):"",r=t.replace(i.a.firstPartImg,"").replace(")",""),l={url:Object(c.a)(n.folder)+"/"+r,title:o,file:n};a.push(l)})),a}},155:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(298),i=e(5),c=e(10),a=e(91),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:i.e.comment,color:"#787b80"},{tag:i.e.definition(i.e.typeName),color:"#194a7b"},{tag:i.e.typeName,color:"#194a7b"},{tag:i.e.tagName,color:"#008a02"},{tag:i.e.variableName,color:"#1a00db"},{tag:i.e.heading,color:c.a.colors.main},{tag:s.Image,color:"red",class:"tiro-image"},{tag:a.b.LatexMdEl,class:"cm-mdpreview-latex-code mdpreview-source"},{tag:i.e.heading1,class:"actionable-title h1"},{tag:i.e.heading2,class:"actionable-title h2"},{tag:i.e.heading3,class:"actionable-title h3"},{tag:i.e.monospace,class:"code-wrapper"},{tag:i.e.content,fontSize:"10px"}]})},l={ImageTwo:i.a.define()},s=(Object(i.c)({ImageTwo:l.ImageTwo,"Strikethrough/...":l.ImageTwo}),{ListItem:i.a.define(),headingMark:i.a.define(),LinkReference:i.a.define(),Image:i.a.define(),LinkTitle:i.a.define(),LinkLabel:i.a.define(),Link:i.a.define(),LinkMark:i.a.define(),BulletList:i.a.define()});Object(i.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})},156:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(6),i=e(0),c=e(46),a=e(22),r=e(10),l=e(58),s=e(1),u=function(t){var n=Object(i.useState)(""),e=Object(o.a)(n,2),r=e[0],u=e[1],p=function(){t.onSubmit(r)};return Object(s.c)("div",{className:"password-popup-wrapper"},Object(s.c)(c.a,{title:a.a.passwordForm.explanation,onClose:function(){t.onClose()}},Object(s.c)("div",null,Object(s.c)(l.a,{value:r,label:a.a.setupForm.password,type:"password",shouldFocus:!0,onChange:function(t){u(t)},onEnterPressed:function(){p()}}),Object(s.c)("button",{className:"submit-button",onClick:function(t){p()}},a.a.passwordForm.submit))))},p=function(){return"\n .submit-button {\n margin-top: 10px;\n ".concat(r.a.els().redButton,";\n\t\tbackground: ").concat(r.a.colors.main,"!important;\n padding: 10px 20px;\n }\n ")}},157:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=function(t){return("0"+t).slice(-2)};String.prototype.replaceAll||(String.prototype.replaceAll=function(t,n){return"[object regexp]"===Object.prototype.toString.call(t).toLowerCase()?this.replace(t,n):this.replace(new RegExp(t,"g"),n)});var i=function(t){var n=function(t){var n=new Date;if(t&&""!==t&&"undefined"!==t)if("string"===typeof t){var e=t,i=t;if(t.startsWith("f")){var c=(e=t.replaceAll("f","").replaceAll("h",":").replaceAll("m",":00").replaceAll("-","/").replaceAll("_"," ")).split("/");e="".concat(c[1],"/").concat(c[0],"/").concat(c[2]),i="".concat(c[0],"/").concat(c[1],"/").concat(c[2])}else if(t.startsWith("d")){var a=t.replaceAll("d","").split("_")[0].split("-");e="".concat(a[1],"/").concat(a[0],"/").concat(a[2])}else if(t.startsWith("w")){var r=t.replaceAll("w","").split("-"),l=o(7*parseInt(r[0]));e="".concat(r[1],"/").concat(l,"/").concat(r[2])}else if(t.startsWith("h")){var s=(e=t.replace("h","").replaceAll("h",":00:00").replaceAll("-","/").replaceAll("_"," ")).split("/");e="".concat(s[1],"/").concat(s[0],"/").concat(s[2])}var u=Number.isNaN(new Date(e).getDate());n=new Date(e),u&&(n=new Date(i))}else n=new Date(t);else n=new Date;return n}(t),e=n.getFullYear(),i=n.getMonth()+1,c=n.getDate(),a=e.toString(),r=o(i),l=o(c),s=o(n.getHours()),u=o(n.getMinutes()),p="".concat(r,"/").concat(l,"/").concat(a," ").concat(s,":").concat(u),d="".concat(r,"-").concat(l,"-").concat(a,"_").concat(s,"h").concat(u,"m"),f="".concat(l,"-").concat(r,"-").concat(a,"_").concat(s,"h").concat(u,"m"),b="".concat(r,"/").concat(l,"/").concat(a),g={year:e,month:i,day:c,hour:n.getHours(),min:n.getMinutes(),timestamp:n.getTime()},h=function(){return Math.ceil(c/7)};return{year:a,month:r,day:l,hour:s,min:u,full:p,num:g,date:b,raw:n,full_file:d,full_file_fr:f,getWeekNb:h,getCustomFormat:function(t){var n="f".concat(f);return"day"===t&&(n="d".concat(l,"-").concat(r,"-").concat(e)),"week"===t&&(n="w".concat(h(),"-").concat(r,"-").concat(e)),"hour"===t&&(n="h".concat(l,"-").concat(r,"-").concat(e,"_").concat(s,"h")),"".concat(n)}}}},158:function(t,n,e){"use strict";e.d(n,"a",(function(){return p})),e.d(n,"b",(function(){return d}));var o=e(11),i=e(6),c=e(0),a=e(59),r=e(10),l=e(38),s=e(14),u=e(1),p=function(t){var n=Object(c.useState)(!1),e=Object(i.a)(n,2),p=e[0],d=e[1],f=Object(c.useState)(!1),b=Object(i.a)(f,2),g=b[0],h=b[1];Object(c.useEffect)((function(){p&&h(!0)}),[t.cursorInfos.y]);var m=function(n){h(!1),t.onButtonClicked(n)},v=[{icon:"faCircle",action:function(){d(!1),h(!1)},class:"separator"},{icon:"faUndo",action:function(){return m("undo")}},{icon:"faRedo",action:function(){return m("redo")}},{icon:"faAngleLeft",action:function(){return m("<-")}},{icon:"faAngleRight",action:function(){return m("->")}},{icon:"faCheckSquare",action:function(){return m("[x]")}},{icon:"faAngleUp",action:function(){return m("^")}},{icon:"faAngleDown",action:function(){return m("v")}},{icon:"faEraser",action:function(){return m("X")}},{icon:"faClone",action:function(){return m("C")}}],w=[];if(w.push({icon:"faCircle",action:function(){return d(!0)}}),t.selection.length>0){var O=Object(a.d)(t.selection),j={icon:"chart-line",action:function(){},customHtml:Object(u.c)("div",{className:"numbers-preview-wrapper"},Object(u.c)("i",{className:"fa fa-chart-line"}),Object(u.c)("span",{className:"numbers-preview"},Object(a.h)(t.selection)))};O&&(j={icon:"calculator",customHtml:Object(u.c)("div",{className:"numbers-preview-wrapper"},Object(u.c)("i",{className:"fa fa-calculator"}),Object(u.c)("span",{className:"numbers-preview"},Object(a.a)(t.selection))),action:function(){t.onButtonClicked("calc"),d(!1)}});var x={icon:"wand-magic-sparkles",action:function(){t.onButtonClicked("aiSearch"),d(!1)}};w.push(x),w.push(j);var k=Object(o.a)({},j);k.class="separator-right",v.push(k),v.push(x)}return Object(u.c)("div",{className:"mobile-toolbar-wrapper device-".concat(Object(s.a)()," ").concat(p?"open":"closed"," ").concat(g?"popup-transparent":"")},!p&&Object(u.c)(l.a,{class:"mobile-text-manip-toolbar closed",size:"desktop"===Object(s.a)()?.8:1,colors:[r.a.colors.editor.mobileToolbar.font,r.a.colors.editor.mobileToolbar.font],buttons:w}),p&&Object(u.c)(l.a,{class:"mobile-text-manip-toolbar",size:"desktop"===Object(s.a)()?.8:1,colors:[r.a.colors.editor.mobileToolbar.font,r.a.colors.editor.mobileToolbar.font],buttons:v}))},d=function(){return"\n.mobile-text-manip-toolbar-wrapper {\n \n \n pointer-events: none;\n position: absolute;\n width: 100%;\n // z-index: 100;\n display: flex;\n justify-content: flex-end;\n}\n.mobile-text-manip-toolbar {\n \n \n\t\t.toolbar-button {\n\t\t\t\tpadding: 13px 20px;\n\t\t}\n}\n\n.numbers-preview-wrapper {\n display: flex;\n font-size: 10px;\n font-weight: 400;\n i {\n margin-top: 2px;\n }\n .numbers-preview {\n margin-left: 5px;\n }\n}\n\n .mobile-toolbar-wrapper {\n &.popup-transparent {\n opacity: 0.4;\n }\n\n\n .mobile-text-manip-toolbar {\n width: 10px;\n flex-direction: column;\n pointer-events: all;\n margin-right:20px;\n \n background: #fff;\n border-radius: 10px;\n display: flex;\n list-style: none;\n padding: 0px 10px;\n box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);\n align-content: center;\n justify-content: center;\n align-items: center;\n // height: ".concat(r.a.sizes.mobile.editorBar,"px;\n &:hover {\n opacity: 1;\n }\n opacity: 0.4;\n left: 15px;\n \n transition: opacity 0.2s;\n \n .toolbar-button {\n padding: 3px 5px; \n }\n .separator {\n // margin-left: 8px;\n }\n .separator-right {\n // margin-right: 8px;\n }\n\n li {\n flex: 1 1 auto;\n justify-content: center;\n display: flex;\n }\n\n &.closed {\n opacity: 0.2;\n background: none;\n box-shadow: none;\n &:hover {\n background: #fff;\n box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);\n opacity: 1;\n }\n }\n\n \n }\n\n &.device-mobile {\n .mobile-text-manip-toolbar {\n transform: scale(0.9);r\n opacity: 1;\n &.closed {\n opacity: 0.2;\n &:hover {\n opacity: 1;\n }\n } \n transform: scale(1);\n .toolbar-button {\n // padding: 12px; \n }\n }\n }\n \n }\n")}},159: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),i=e(25),c=e(1),a=function(t){var n=t.dir?t.dir:"left",e=t.maxHeight?t.maxHeight:50;return Object(c.c)("div",{className:"dropdown-wrapper ".concat(n," ").concat(t.hover?"hover-active":"")},Object(c.c)("span",{onMouseEnter:function(){t.onMouseEnter&&t.onMouseEnter()},onMouseLeave:function(){t.onMouseLeave&&t.onMouseLeave()},onClick:function(){},className:"context-menu-wrapper"},Object(c.c)("div",{className:"dropdown-icon"},Object(c.c)(i.a,{name:"faEllipsisH",color:o.a.colors.l1.font})),Object(c.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\toverflow: auto;\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")}},160:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r}));var o=e(0),i=e.n(o),c=e(1),a=function(t){var n=t.progress,e=n>=0&&n<100;return Object(c.c)(i.a.Fragment,null,e&&Object(c.c)("div",{className:"upload-progress-bar-wrapper"},Object(c.c)("div",{className:"bg-fill",style:{width:"".concat(n,"%")}}),Object(c.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"}},161:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(300),i=function(t){return t||(t=0),Object(o.isNumber)(t)?t+1:0}},162:function(t,n,e){"use strict";e.d(n,"a",(function(){return b})),e.d(n,"b",(function(){return g}));var o=e(17),i=e(6),c=e(11),a=e(34),r=e(4),l=e(161),s=e(55),u=e(93),p=e(12),d=e(14),f=e(0),b=function(t){var n=Object(c.a)({},t),e=n.w,o=n.h,i=n.x,r=n.y,l=n.file;o||(o=u.c.rows),e||(e=u.c.cols),i||(i=0),r||(r=0);var s=Object(a.a)();return{layout:{i:s,x:i,y:r,w:e,h:o,minH:1,maxH:2,forceRender:0},content:{i:s,active:!1,file:l,view:"both"}}},g=function(){var t=Object(s.a)("tabs",[]),n=Object(i.a)(t,3),e=n[0],c=n[1],a=n[2],l=Object(f.useRef)([]),u=function(t,cb){l.current=t,c(l.current)};Object(f.useEffect)((function(){l.current=e}),[e]);var b=function(t){var n=O({fullWindowFile:t});if(n){var e=[].concat(Object(o.a)(l.current),[n]),i=w(n.id,e);u(i)}},g=function(t){var n=[],e=Object(r.cloneDeep)(l.current);Object(r.each)(e,(function(e,o){e.id!==t&&n.push(e)})),u(n)},j=function(t){if(!t){var n=Object(r.cloneDeep)(l.current),e=v(n);if(!Object(r.isNumber)(e))return;t=n[e]}if(t.grid.layout[0]){var o,i=t.grid;return Object(r.each)(i.content,(function(t,n){t.active&&(o={layout:i.layout[n],content:i.content[n]})})),o}};return{tabs:e,updateTab:function(t,n,e){if("add"===t)Object(p.e)().then((function(t){b(t.ui.browser.files.active.get)}));else if("close"===t){if(!n)return;g(n.id)}else if("rename"===t){if(!n)return;if(e.length>15)return;var o=Object(r.cloneDeep)(l.current);Object(r.each)(o,(function(t){t.id===n.id&&(t.name=e,t.manualName=!0)})),u(o)}else if("activate"===t){if(!n)return;var i=w(n.id,l.current),c=h(i);if(u(c),"desktop"!==Object(d.a)()){var a,s=null===(a=j(n))||void 0===a?void 0:a.content.file;if(!s)return;Object(p.d)((function(t){t.ui.browser.goTo(s.folder,s.name)}))}}},refreshTabsFromBackend:a,updateActiveTabGrid:function(t,cb){var n=Object(r.cloneDeep)(l.current),e=v(n);Object(r.isNumber)(e)&&(n[e].grid=t,u(n))},refreshWindowGrid:function(){var t=h(l.current);u(t)},tabsApi:{get:function(){return l.current},close:g,openInNewTab:b,reorder:function(t,n){var e=Object(r.cloneDeep)(l.current),o=e[t];e.splice(t,1),e.splice(n,0,o),u(e)},active:{get:function(){var t=null;return Object(r.each)(l.current,(function(n){n.active&&(t=n)})),t}}},windowsApi:{close:function(t){var n=Object(r.cloneDeep)(l.current);Object(r.each)(t,(function(t){Object(r.each)(n,(function(n,e){for(var o=0;o<n.grid.content.length;o++){var i=n.grid.content[o],c=n.grid.layout[o];i.i===t&&n.grid.content.splice(o,1),c.i===t&&n.grid.layout.splice(o,1)}}))}));var e=h(n);u(e)},active:{get:j,setContent:function(t){if(t){var n=Object(r.cloneDeep)(l.current),e=v(n);if(Object(r.isNumber)(e)){var o=n[e],i=o.grid.content;if(!(i.length<1)){var c=0;Object(r.each)(i,(function(t,n){!0===t.active&&(c=n)})),i[c].file=Object(r.cloneDeep)(t),o.manualName||(o.name=m(t.name));var a=h(n);u(a)}}}}},updateWindows:function(t,n){var e=Object(r.cloneDeep)(l.current);Object(r.each)(t,(function(t){Object(r.each)(e,(function(e,o){Object(r.each)(e.grid.content,(function(e){e.i===t&&(e.file=n)}))}))}));var o=h(e);u(o)},getIdsFromFile:function(t){var n=[];return Object(r.each)(l.current,(function(e){Object(r.each)(e.grid.content,(function(e){e.file&&e.file.path===t&&n.push(e.i)}))})),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=b({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}},163:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(6),i=e(4),c=e(0),a=function(){var t=Object(c.useState)(!1),n=Object(o.a)(t,2),e=n[0],a=n[1],r=Object(c.useRef)(0);return Object(c.useEffect)((function(){var t=Object(i.debounce)((function(){r.current=r.current+1,a(!0),setTimeout((function(){a(!1)}),200)}),200);return function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{resizeState:e,resizeCount:r}},r=function(t){var n=Object(c.useState)(!1),e=Object(o.a)(n,2),a=e[0],r=e[1];return Object(c.useEffect)((function(){var n=Object(i.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}}},164:function(t,n,e){"use strict";e.d(n,"a",(function(){return c})),e.d(n,"b",(function(){return a}));e(4);var o=e(12),i="notes-view-type",c=function(t){return new Promise((function(n,e){Object(o.d)((function(e){e.cache.get(i,(function(e){if(e){var o=e[t];n(o||!1)}}))}))}))},a=function(t,n){Object(o.d)((function(e){e.cache.get(i,(function(o){o||(o={}),o[t]=n,e.cache.set(i,o,-1)}))}))}},165:function(t,n,e){"use strict";e.d(n,"b",(function(){return w})),e.d(n,"a",(function(){return O}));var o=e(23),i=e(6),c=e(0),a=e(69),r=e(120),l=e(53),s=e(14),u=e(4),p=e(166),d=e(12),f=e(35),b=e(78),g=e(10),h=e(64),m=e(1),v=function(t){var n=Object(c.useState)(""),e=Object(i.a)(n,2),o=e[0],d=e[1],g=Object(c.useState)(0),v=Object(i.a)(g,2),w=(v[0],v[1]),O=Object(c.useRef)(0),j=function(t){t>O.current&&(O.current=t),w(O.current)};Object(c.useEffect)((function(){w(0)}),[t.fileContent,t.windowId]);Object(f.a)((function(t){d(t)}),Object(s.d)()?3e3:1e3),Object(f.b)((function(t){d(t)}),1e3);var x=function(t){d(t)};Object(c.useEffect)((function(){x(t.fileContent)}),[t.fileContent,t.file.path,t.windowId]),Object(c.useEffect)((function(){setTimeout((function(){l.a.onWindowLoad(t.windowId)}),500)}),[t.file.path,t.windowId]),Object(c.useEffect)((function(){Object(h.d)(!0)}),[t.file.path,t.windowId]);var k={id:"",line:0,title:""},y=function(n){var e=Object(b.a)(o),i=k;if(Object(u.each)(e,(function(t){n>=t.line&&(i=t)})),""!==i.id){var c=".window-id-".concat(t.windowId," #t-").concat(i.id);try{var a,r=null===(a=document.querySelector(c))||void 0===a?void 0:a.offsetTop;Object(u.isNumber)(r)&&(l.a.updatePreviewOffset(t.windowId,r),l.a.scrollPreview(t.windowId))}catch(s){console.error(s)}}},_=Object(f.b)(y,200),C=Object(f.a)(y,500),E="desktop"===Object(s.a)()&&"editor"===t.viewType||"desktop"!==Object(s.a)()&&"editor"===t.mobileView,S=Object(c.useState)(!1),T=Object(i.a)(S,2),I=T[0],N=T[1];return Object(c.useEffect)((function(){N(!1)}),[t.canEdit]),Object(m.c)("div",{className:"dual-view-wrapper view-".concat(t.viewType," device-").concat(Object(s.a)()," window-id-").concat(t.windowId," window-id-sizeref-").concat(t.windowId)},!t.canEdit&&!I&&Object(m.c)("div",{className:"loading-overlay",onClick:function(t){N(!0)}},Object(m.c)("div",{className:"loading-text"},"loading...")),t.isDragging&&Object(m.c)("div",{className:"loading-overlay",onClick:function(t){N(!0)}},Object(m.c)("div",{className:"loading-text"}," drop to upload")),Object(m.c)(r.a,{viewType:t.viewType,mobileView:t.mobileView,windowId:t.windowId,editorType:"codemirror",showViewToggler:t.showViewToggler,showToolbar:t.showToolbar,titleEditor:t.titleEditor,file:t.file,canEdit:t.canEdit,fileContent:t.fileContent,isActive:t.isActive,editorAction:t.editorAction,posY:0,onTitleClick:function(t){!function(t){_(t),C(t)}(t)},onScroll:function(t){},onUpdateY:function(t){},onMaxYUpdate:j,onFileEdited:function(n,e){t.onFileEdited(n,e),x(e)},onScrollModeChange:function(t){},onLayoutUpdate:t.onLayoutUpdate,pluginsConfig:t.pluginsConfig}),!E&&Object(m.c)(a.a,{windowId:t.windowId,file:t.file,posY:0,fileContent:o,onMaxYUpdate:j,yCnt:0,onIframeMouseWheel:function(t){}}),Object(m.c)(p.a,{windowId:t.windowId}))},w=function(t,n){return"\n\t.dual-view-wrapper {\n\t\tposition: relative;\n\t\t.loading-overlay {\n\t\t\t.loading-text {\n\t\t\t\tcolor: ".concat(g.a.colors.main,";\n\t\t\t}\n\n\t\t\tdisplay: flex;\n\t\t\talign-content: center;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t\twidth: 100%;\n\t\t\theight: 120%;\n\t\t\tposition: absolute;\n\t\t\tbackground: rgba(0,0,0,0.1);\n\t\t\ttop: -2px;\n\t\t\tleft: 0px;\n\t\t\tz-index: 99;\n\t\t\tfont-weight: bold;\n\t\t\tcolor: white;\n\t\t}\n\t}\n\n\t.mobile-view-preview {\n\t\t\n\t\t.editor-area {\n\t\t\tdisplay: none;\n\t\t}\n\t}\n\t\n\t.dual-view-wrapper.device-tablet, \n\t.dual-view-wrapper.device-mobile {\n\t\t\t.editor-area,\n\t\t\t.preview-area-wrapper {\n\t\t\t\t\twidth: 100%;\n\t\t\t}\n\t}\n\t.dual-view-wrapper {\n\t\t\t&.view-both.device-desktop {\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t}\n\t\t\t}\n\n\n\n\t\t\t.__EDITOR_DESIGN HERE__ {}\n\t\t\t&.view-editor.device-desktop {\n\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t}\n\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t/* display:none; */\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\ttop: -9999px;\n\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.view-editor-with-map.device-desktop {\n\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\twidth: 80%;\n\t\t\t\t\t}\n\n\t\t\t\t\t.__MINIMAP_DESIGN HERE__ {}\n\n\t\t\t\t\t.preview-area-wrapper:hover {\n\t\t\t\t\t\t\theight: calc(100% - 30px);\n\t\t\t\t\t\t\ttransform: scale(1);\n\t\t\t\t\t\t\tright: -50%;\n\t\t\t\t\t\t\topacity: 1;\n\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.preview-area-transitions {\n\t\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\ttransition-delay: ").concat(g.a.anim.time,";\n\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t/* transition-property: bottom; */\n\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\ttransform: scale(0.2) translateZ(0);\n\t\t\t\t\t\t\ttransform-origin: 0px 0px;\n\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\tright: calc(-80%);\n\t\t\t\t\t\t\t// height: 500vh;\n\t\t\t\t\t\t\theight: calc(100% * 5);\n\t\t\t\t\t\t\t.preview-area-transitions {\n\n\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\t/* transition-delay:").concat(g.a.anim.time,"; */\n\t\t\t\t\t\t\t\t\t/* transition-property: padding; */\n\n\t\t\t\t\t\t\t\t\ttransition-delay:").concat(g.a.anim.time,"; \n\t\t\t\t\t\t\t\t\t/* transition-property: all; */\n\n\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\twidth: 73%;\n\t\t\t\t\t\t\t\t\tpadding: 80px;\n\t\t\t\t\t\t\t\t\tpadding-right: 140px;\n\t\t\t\t\t\t\t\t\tpadding-left: 40px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t&.view-preview.device-desktop {\n\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t\tposition:relative;\n\t\t\tdisplay: ").concat("desktop"===Object(s.a)()?"flex":"block",";\n\t}\n\t\n")},O=function(t){var n=Object(c.useContext)(d.a),e=(null===n||void 0===n?void 0:n.ui.note.editorAction.get)||null;return Object(m.c)(v,Object(o.a)({},t,{editorAction:e}))}},166:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(3),i=e(6),c=e(0),a=e(98),r=e.n(a),l=e(53),s=e(1),u=function(t){var n=Object(c.useState)(0),e=Object(i.a)(n,2),a=e[0],u=e[1],p=Object(c.useRef)(null),d=Object(c.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,i=n.getBoundingClientRect().y;return t.maxY=n.getBoundingClientRect().height-o,t.y=e.getBoundingClientRect().y-i,t.percent=t.y/t.maxY*100,t};Object(c.useEffect)((function(){var n=d.current?d.current:null;if(n){var e=new MutationObserver((function(n,e){var i,c=Object(o.a)(n);try{for(c.s();!(i=c.n()).done;){if("data-scroll-refresh"===i.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){c.e(d)}finally{c.f()}}));return e.observe(n,{attributes:!0}),function(){e.disconnect()}}}),[t.windowId]);var b=Object(c.useState)(0),g=Object(i.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"}},167:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return i}));var o=function(t,n){c(t,(function(t){console.log("ON IMAGE PASTE"),t&&n(t)}))},i=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)}))},c=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 i=e[o].getAsFile();"function"==typeof n&&n(i)}}},169:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return p}));var o=e(26),i=e(29),c=e(28),a=e(62),r=e(56),l=e(10),s=e(47),u=function(t,n){return Object(s.a)({file:t,windowId:n,pattern:i.a.userCustomTagFull2,replacement:function(e){var i=document.createElement("span");return i.innerHTML=function(t,n,e){var i=t[2].replaceAll("[[","").replaceAll("]]",""),l=t[0].replaceAll("[[".concat(i,"]]"),""),s=function(t,n,e){return"".concat(Object(r.b)(t,""),"-").concat(Object(r.b)(n,""),"-").concat(Object(r.b)(e,""))},u=s(i,l,n.path),p="ress-".concat(u);Object(c.a)(n,u,(function(){var t=document.querySelector(".".concat(p," .iframe-wrapper-cm-ctag"));if(t){var o=Object(a.b)(i,l,e,{file:n});Object(a.c)(t,o)}}));var d='\n\t<div class="button-ctag-cm-toggle" \n\t\tonclick="'.concat(Object(c.c)("toggle-ctag-link",(function(t){if(t){var n=t.dataset.filepath,e=decodeURIComponent(t.dataset.tagcontent),i=t.dataset.tagname,r=t.dataset.windowid,l=s(i,e,n),u=Object(o.d)(n),p=t.parentNode.parentNode.querySelector(".iframe-wrapper-cm-ctag"),d=p.querySelector("iframe")?"closed":"open";Object(c.b)(u,l,d);var f=Object(a.b)(i,e,r,{file:u});Object(a.c)(p,f)}})),'"\n\t\tdata-filepath="').concat(n.path,'"\n\t\tdata-windowid="').concat(e,'"\n\t\tdata-tagname="').concat(i,'"\n\t\tdata-tagcontent="').concat(encodeURIComponent(l),'"\n\t>').concat(Object(c.d)("eye"),"</div>"),f='<div class="cm-ctag-name">[[ '.concat(i," ]]</div>"),b='<div class="cm-ctag-overview">'.concat(f).concat(d,"</div>");return'<div class="cm-ctag-wrapper '.concat(p,'">').concat(b).concat('<div class="iframe-wrapper-cm-ctag"></div>',"</div>")}(e,t,n),i}})},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")}},170:function(t,n,e){"use strict";e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return u}));var o=e(29),i=e(12),c=e(28),a=e(10),r=e(47),l=function(t,n){return Object(r.a)({file:t,windowId:n,pattern:o.a.hashtag,replacement:function(n){var e=document.createElement("span");return e.classList.add("cm-hashtag"),e.innerHTML='<span class="hash-inner" \n data-hashtag="'.concat(n[1],'"\n data-hashtag2="').concat(n[0],'"\n data-folder="').concat(t.folder,'"\n onclick="').concat(Object(c.c)("open-win-smartlist-hashtag",s),'" >').concat(n[0],"</a>"),e},options:{isAtomic:!0}})},s=function(t){if(t){var n=t.dataset.hashtag2,e=t.dataset.folder;Object(i.d)((function(t){t.ui.floatingPanel.create({type:"ctag",layout:"full-center",ctagConfig:{tagName:"smartlist",content:"- | ".concat(e," | ").concat(n)}})}))}},u=function(){return"\n .cm-hashtag {\n // color: var(--color-text);\n color: grey;\n background: ".concat(a.a.colors.main,";\n color: ").concat(a.a.colors.mainFont,";\n border-radius: 3px;\n padding: 2px 4px;\n margin: 0 2px;\n // display: inline-block;\n font-size: 0.9em;\n .hash-inner {\n cursor: pointer;\n }\n }\n")}},171:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=function(t){return"[link|".concat(t.realname," ").concat(t.folder,"]\n")}},172:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(26),i=e(18),c=e(19),a=e(15),r=function(t){return Object(o.b)("".concat(Object(a.c)(),"/").concat(i.a.path.staticResources,"/").concat(t,"?token=").concat(Object(c.b)()))}},173:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=function(t){!function(){var t=document.getElementById("icon-page");t&&t.remove()}(),function(t){var n=document.createElement("link");n.rel="icon",n.href=t,n.id="icon-page",document.getElementsByTagName("head")[0].appendChild(n)}(t)}},175:function(t,n,e){"use strict";e.d(n,"a",(function(){return b})),e.d(n,"b",(function(){return g}));var o=e(6),i=e(11),c=e(124),a=e(4),r=e(0),l=e.n(r),s=e(12),u=e(22),p=e(93),d=e(1);var f={upload:{uploadCounter:0,reinit:function(){}},file:{onTitleUpdate:function(t,n){},onFileDelete:function(t){}}},b=l.a.createContext(f),g=function(t){var n=Object(i.a)({},t).tab,e=Object(r.useContext)(s.a),c=Object(r.useState)(f),l=Object(o.a)(c,2),g=l[0],m=l[1],v=function(){var t=Object(r.useContext)(s.a),n=Object(r.useState)({name:"",data:{}}),e=Object(o.a)(n,2),i=e[0],c=e[1],a=Object(r.useRef)({});return Object(r.useEffect)((function(){if(t){var cb=a.current[i.name];cb&&cb(t,i.data)}}),[i]),{onNextStateTrigger:function(t){c(t)},addNextStateAction:function(t,cb){a.current[t]=cb}}}(),w=v.onNextStateTrigger,O=v.addNextStateAction;O("refreshFolderList",(function(t,n){var e=t.ui.browser.folders.current.get();e===n.folder&&(t.ui.browser.goTo(e,n.name,{openIn:"activeWindow"}),w({name:"checkIfNoWindows"}))})),O("checkIfNoWindows",(function(t){0===n.grid.content.length&&t.tabs.close(n.id)}));var j=Object(a.cloneDeep)(g);j.file.onFileDelete=function(t){e&&e.popup.confirm("".concat(u.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)})),w({name:"refreshFolderList",data:o})}))}))},j.file.onTitleUpdate=function(t,n){e&&e.file.move(t,n,(function(o){var i,c=null;if(Object(a.each)(o,(function(t){t.path===n&&(c=t)})),c){var r=e.ui.windows.getIdsFromFile(t);e.ui.windows.updateWindows(r,c),null===(i=e.lastNotesApi)||void 0===i||i.removeFile(t),w({name:"refreshFolderList",data:c})}}))},j.upload.reinit=function(){var t=Object(a.cloneDeep)(g);delete t.upload.file,m(t)};var x=Object(r.useState)(0),k=Object(o.a)(x,2),y=k[0],_=k[1];return Object(r.useEffect)((function(){_(y+1)}),[n.refresh,JSON.stringify(t.pinStatus)]),Object(d.c)(h,null,Object(d.c)("div",{className:"window-grid-wrapper"},Object(d.c)(b.Provider,{value:j},Object(d.c)(p.a,{refresh:y,grid:n.grid,onGridUpdate:t.onGridUpdate,mobileView:t.mobileView}))))},h=Object(c.a)("div",{target:"ejnwhwz0"})({name:"zk0z9r",styles:"height:100%;.window-grid-wrapper{height:100%;}"})},176:function(t,n,e){"use strict";e.d(n,"b",(function(){return d})),e.d(n,"a",(function(){return f}));var o=e(6),i=e(0),c=e.n(i),a=e(14),r=e(10),l=e(25),s=e(4),u=e(1),p=function(t){var n=Object(i.useState)(""),e=Object(o.a)(n,2),c=e[0],p=e[1],d=Object(i.useState)(!1),f=Object(o.a)(d,2),b=f[0],g=f[1],h=!Object(s.isBoolean)(t.enabled)||t.enabled;Object(i.useEffect)((function(){p(t.title),g(!1)}),[t.title]);return Object(u.c)("div",{className:"title-input-wrapper"},Object(u.c)("input",{className:"big-title",type:"text",value:c,disabled:!h,onChange:function(t){var n=function(t){var n=t;return n.replace(/[^\w\s\_\-]/gi,"")}(t.target.value);p(n),g(!0)},onKeyDown:function(n){if(!1!==h&&"Enter"===n.key){if(c.length<3)return;t.onEdited(t.title,c),g(!1)}}}),b&&Object(u.c)("div",{className:"press-to-save"},Object(u.c)(l.a,{name:"faCircle",color:r.a.colors.main,size:.7})),b&&"mobile"===Object(a.a)()&&Object(u.c)("button",{className:"buttonSaveTitleMobile",onClick:function(){0!==c.length&&(g(!1),t.onEdited(t.title,c))}}," Save "))},d=function(){return"\n.buttonSaveTitleMobile {\n\t\tposition: relative;\n\t\tright: 20px;\n\n\n}\n"},f=c.a.memo(p,(function(t,n){var e=!1;return t.title!==n.title&&(e=!1),e}))},18: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.40.1"},dev:{disableLogin:!1}}},19:function(t,n,e){"use strict";e.d(n,"b",(function(){return m})),e.d(n,"c",(function(){return v})),e.d(n,"a",(function(){return O})),e.d(n,"d",(function(){return j}));var o=e(6),i=e(4),c=e(0),a=e.n(c),r=e(18),l=e(58),s=e(46),u=e(102),p=e(15),d=e(22),f=e(63),b=e(12),g=e(61),h=e(1),m=function(){var t=Object(u.a)("tiro-login-token");return t||""},v=function(){return"?token=".concat(m())},w=function(t){Object(u.b)("tiro-login-token",t,r.a.tokenRefreshInHours)},O=function(){w("")},j=function(t){var n=Object(c.useState)(!1),e=Object(o.a)(n,2),r=e[0],u=e[1],v=Object(c.useState)(""),O=Object(o.a)(v,2),j=O[0],x=O[1],k=Object(c.useState)(""),y=Object(o.a)(k,2),_=y[0],C=y[1],E=Object(c.useState)(),S=Object(o.a)(E,2),T=S[0],I=S[1],N=Object(c.useRef)(0);Object(c.useEffect)((function(){return N.current=p.b.on("getLoginInfos",(function(n){switch(n.code){case"SUCCESS":if(!n.token)return;w(n.token),u(!1),t.onLoginSuccess();break;case"WRONG_TOKEN":u(!0),I(["error",d.a.loginForm.wrongToken]);var e=n.loginInfos;null!==e&&void 0!==e&&e.demo_mode&&(x("viewer"),C(e.viewer_password)),t.onLoginAsked();break;case"WRONG_USER_PASSWORD":I(["error",d.a.loginForm.wrongUserPassword]),u(!0)}})),function(){p.b.off(N.current)}}),[]);var P=Object(g.a)("user-password-cache-ls",{}),R=Object(o.a)(P,2),A=R[0],F=R[1];Object(c.useEffect)((function(){if(r){var t=Object(f.c)().dic,n="__HARDCODED_LOGIN_LS_PASSWORD_0129dsfaf1029__";t.l1&&t.l2&&t.l1.value&&t.l2.value&&Object(b.d)((function(e){var o,c,a=t.l1.value+t.l2.value;if(A[a])o=A[a].usr,c=A[a].pass;else if(o=e.encryption.decryptUrlParam(t.l1.value,n).plaintext,c=e.encryption.decryptUrlParam(t.l2.value,n).plaintext,o&&c){var r=Object(i.cloneDeep)(A);r[a]={usr:o,pass:c},F(r)}o&&c&&(x(o),C(c),setTimeout((function(){console.log("success login url, submitting it"),p.b.emit("sendLoginInfos",{user:o,password:c,token:m()})}),1e3))}))}}),[r]);var L=function(){I(void 0),p.b.emit("sendLoginInfos",{user:j,password:_,token:m()})},D=Object(c.useState)(1),M=Object(o.a)(D,2),z=M[0],B=M[1],U=Object(g.a)("login-to-ls",!1),H=Object(o.a)(U,2);H[0],H[1];return{displayLoginPopup:r,LoginPopupComponent:function(t){return Object(h.c)(a.a.Fragment,null,r&&Object(h.c)("div",{className:"setup-popup-component"},Object(h.c)(s.a,{title:d.a.setupForm.title,onClose:function(){}},Object(h.c)("div",null,Object(h.c)(l.a,{shouldFocus:1===z,value:j,onEnterPressed:function(){B(2)},label:d.a.setupForm.user,onChange:function(t){x(t)}}),Object(h.c)(l.a,{shouldFocus:2===z,value:_,label:d.a.setupForm.password,type:"password",onEnterPressed:function(){L()},onChange:function(t){C(t)}}),Object(h.c)("button",{value:"submit",className:"submit-button",onClick:function(t){L()}},d.a.setupForm.submit),T&&Object(h.c)("div",{className:T[0]},T[1])))))}}}},22:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=e(18).a.strings},25:function(t,n,e){"use strict";e.d(n,"b",(function(){return f})),e.d(n,"a",(function(){return g}));var o=e(7),i=e(8),c=e(20),a=e(21),r=e(0),l=e.n(r),s=e(296),u=e(297),p=e(28),d=e(1),f=function(t){return Object(d.c)("div",{className:"icon-2-wrapper",title:t.label,dangerouslySetInnerHTML:{__html:Object(p.d)(t.name)},style:{fontSize:t.size||"10px",color:t.color||"#797979"}})},b=function(t){Object(c.a)(e,t);var n=Object(a.a)(e);function e(){var t;Object(o.a)(this,e);for(var i=arguments.length,c=new Array(i),a=0;a<i;a++)c[a]=arguments[a];return(t=n.call.apply(n,[this].concat(c))).size=t.props.size?t.props.size:1,t.isLocal=!t.props.name.startsWith("fa"),t}return Object(i.a)(e,[{key:"render",value:function(){return Object(d.c)("span",{style:{transform:"scale(".concat(this.size,")"),display:"inline-block"}},!this.isLocal&&Object(d.c)(s.a,{icon:u[this.props.name],color:this.props.color||"black",size:"1x"}),this.isLocal&&Object(d.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),g=l.a.memo(b,(function(t,n){return JSON.stringify(t)===JSON.stringify(n)}))},26:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"d",(function(){return i})),e.d(n,"c",(function(){return c})),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("://")},i=function(t){var n=function(t){var n=t.split("/"),e=t.split("\\"),o=n.length>e.length?n:e,i=o[o.length-1],c=i.split("."),a=t.replace(i,""),r="";c.length>1&&(r=c[c.length-1]);var l=i.replace(".".concat(r),"");return{filename:i,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,filenameWithoutExt:n.filenameWithoutExt}},c=function(t){var n=t.match(/(.*)[\/\\]/),e=n?n[1]+"/":"";return o(e)},a=function(t,n){return o(t+"/")===o(n+"/")}},28:function(t,n,e){"use strict";e.d(n,"d",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));e(323);var o=e(12),i=function(t){return'<i class="ssr-icon fa-solid fa-'.concat(t,'"></i>')};window.ssrActionsDic={};var c=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 i="ressource-preview-status-".concat(t.path),c="".concat(t.path,"-").concat(n);Object(o.d)((function(t){t.cache.get(i,(function(n){n||(n={}),n[c]=e,t.cache.set(i,n,-1)}))}))},r=function(t,n,e){!function(t,n,cb){var e="ressource-preview-status-".concat(t.path),i="".concat(t.path,"-").concat(n);Object(o.d)((function(t){t.cache.get(e,(function(t){if(t){var n=t[i]?t[i]:"closed";cb(n)}}))}))}(t,n,(function(t){"open"===t&&setTimeout((function(){e()}),500)}))}},29:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(33),i=e.n(o),c=e(18),a={img:i()().find(".").then("jpg").or("jpeg").or("png").or("gif").or("webm").or("svg").or("webp"),imgMdConfig:i()().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:i()().find(c.a.metas.headerStart).beginCapture().anythingBut("").endCapture().then(c.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,mdTitle:/^([#]{1,9})\ (.+)/gi,mdTableCell:/((([^|\n])+\|)|(([^|\n])+))/gim,hashtag:/#([A-z\xc0-\xfa1-9_\-]+)/gi,matchingHtmlTags:/<([^>]*)>([^<]*)<\/\1>/,baliseHtml:i()().find("<").anythingBut("<>").then(">"),ressource:i()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").endCapture().then(")"),ref:i()().find("[").anythingBut("[]").then("](").anythingBut("()").then(")"),extimage:i()().find("![").anythingBut("[]").then("](").beginCapture().then("http").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),image:i()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),image2:/!\[(.*?)\]\((.*?\.(jpg|png|gif|bmp|jpeg|webm|svg|webp"))\)(\{(.*)\})?/gim,fullImageMd:i()().beginCapture().find("![").anythingBut("[]").then("](").anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageMdSrc:i()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture:i()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture2:/\!\[([^\[\]]+)\]\(([^\(\)]+\.(jpg|jpeg|png|gif|webm|svg|webp))\)/gi,imageAndConfig:i()().find(".beginCapture().anythingBut("()").then(a.img).anythingBut("()").endCapture().then(")"),searchlink:i()().find("[search|").beginCapture().anythingBut("[]").endCapture().then("]"),linklink2:i()().find("123").beginCapture().anythingBut("456").endCapture().then("456"),linklink:i()().find("[link|").beginCapture().anythingBut("[]").endCapture().then(" ").beginCapture().then("/").anythingBut("[]").endCapture().then("]"),latexTag:i()().find("[[latex]]").beginCapture().anythingBut("").endCapture().then("[[latex]]"),scriptTag:i()().find("[[script]]").beginCapture().anythingBut("").endCapture().then("[[script]]"),userCustomTagFull:i()().find(a.customTag).beginCapture().anythingBut("").endCapture().then(a.customTag),userCustomTagFull2:i()().beginCapture().beginCapture().find(a.customTag).endCapture().anythingBut("").beginCapture().then(a.customTag).endCapture().endCapture(),userCustomTagFull3:i()().beginCapture().find(a.customTag).endCapture(),userCustomTag3:i()().beginCapture().then(a.customTag).endCapture(),userCustomTagManual:a.customTag,externalLink:i()().find("http").maybe("s").then("://").beginCapture().anythingBut("/ ").endCapture().beginCapture().anythingBut(" ").then("/").beginCapture().anythingBut("? ").endCapture().anythingBut(" \n").then("\\n").endCapture(),url2transform:i()().find("!").beginCapture().find("http").maybe("s").then("://").beginCapture().anything().endCapture().endCapture(),searchFolder:i()().find(" /").anything().endOfLine(),searchFolderNoSpace:i()().find("/").anything().endOfLine(),firstPartImg:i()().find("![").anythingBut("[]").then("]("),hashtag3:i()().find(/[-| |\n]{1}\#([A-z\xc0-\xfa1-9_\-]+)/gi),titleMd:i()().startOfLine().find("#").oneOrMore().then(" ").beginCapture().anythingBut("").endCapture(),scriptHtml:i()().find("<script>").beginCapture().anythingBut("").endCapture().then("<\/script>")}},303:function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return useRessourceApi}));var _config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_construct_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(174),_config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(11),react__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__),_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(34),_shared_shared_config__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(18),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(15),_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(19),_api_hook__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(12),_managers_url_manager__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(63),lodash__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(4),lodash__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_9__),_managers_ressource_manager__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(172),_managers_devCli_manager__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(31),_managers_tryCatch_manager__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(304),h="[RESSOURCE API] ",useRessourceApi=function useRessourceApi(p){var _p=Object(_config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__.a)({},p),eventBus=_p.eventBus;Object(react__WEBPACK_IMPORTED_MODULE_2__.useEffect)((function(){_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.on("getRessourceApiAnswer",(function(t){eventBus.notify(t.idReq,t)})),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.on("getRessourceScan",(function(t){eventBus.notify(t.idReq,t)}))}),[]);var deleteRessource=function(t,cb){var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("delete-ressource");console.log("".concat(h," delete ressource ").concat(t)),p.eventBus.subscribe(n,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceDelete",{path:t,idReq:n,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)()})},downloadRessource=function(t,n,cb,e){var o=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("download-ressource");p.eventBus.subscribe(o,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceDownload",{url:t,folder:n,idReq:o,opts:e,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)()})},fetchRessource=function(t,cb,n){n||(n={}),n.disableCache||(n.disableCache=!1),n.returnsPathOnly||(n.returnsPathOnly=!1),"false"===n.disableCache&&(n.disableCache=!1),"true"===n.disableCache&&(n.disableCache=!0);var e="/.tiro/cache/fetch/",o=Object(_managers_ressource_manager__WEBPACK_IMPORTED_MODULE_10__.a)("/".concat(e).concat(Object(_shared_helpers_id_helper__WEBPACK_IMPORTED_MODULE_3__.b)(t))),i=function(){fetch(o).then((function(t){return t.text()})).then((function(t){Object(_managers_tryCatch_manager__WEBPACK_IMPORTED_MODULE_12__.a)((function(){return cb(t,o)}))}))},c=function(){downloadRessource(t,e,(function(t){var e;t.message&&(null!==(e=n)&&void 0!==e&&e.returnsPathOnly?cb("",o):i())}))};!0===n.disableCache?c():Object(_managers_url_manager__WEBPACK_IMPORTED_MODULE_8__.a)({url:o,onSuccess:function(){i()},onFail:function(){c()}})},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 i=(null===e||void 0===e?void 0:e.content)||"",c=(null===e||void 0===e?void 0:e.title)||"";cb({title:c,text:o,html:i,raw:t})}))}))},ramFetchEvalCache={val:{}},fetchEval=function(t,n,e,cb){e||(e={}),e.disableCache||(e.disableCache=!1),"false"===e.disableCache&&(e.disableCache=!1),"true"===e.disableCache&&(e.disableCache=!0);var o=function(o){try{var i=[],c=[];Object(lodash__WEBPACK_IMPORTED_MODULE_9__.each)(n,(function(t,n){i.push(n),c.push(t)}));var a=Object(_config_workspace_tiro_notes_client_node_modules_babel_runtime_helpers_esm_construct_js__WEBPACK_IMPORTED_MODULE_0__.a)(Function,i.concat([o])).apply(void 0,c);cb&&cb(a)}catch(l){var r="[ERR remote code] (api.ress.fetchEval): ".concat(l," <br> url: ").concat(t," (more infos in console)");console.log(r,l,{url:t,funcParams:n,options:e}),Object(_managers_devCli_manager__WEBPACK_IMPORTED_MODULE_11__.d)("".concat(r))}};e.disableCache&&(ramFetchEvalCache.val[t]=null),!ramFetchEvalCache.val[t]||e.disableCache?fetchRessource(t,(function(n){o(n),ramFetchEvalCache.val[t]=n}),e):o(ramFetchEvalCache.val[t])},cleanCache=function(){ramFetchEvalCache.val={},Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.d)((function(t){t.folders.delete("cache","fetch")}))},scanRessourceFolder=function(t,cb){_shared_shared_config__WEBPACK_IMPORTED_MODULE_4__.a.client.log.socket&&console.log("[CLIENT API] get ressources files ".concat(t));var n=Object(_api_hook__WEBPACK_IMPORTED_MODULE_7__.c)("get-ressources-files-");p.eventBus.subscribe(n,cb),_managers_sockets_socket_manager__WEBPACK_IMPORTED_MODULE_5__.b.emit("askRessourceScan",{folderPath:t,token:Object(_app_loginToken_hook__WEBPACK_IMPORTED_MODULE_6__.b)(),idReq:n})},ressourceApi={delete:deleteRessource,download:downloadRessource,scanFolder:scanRessourceFolder,fetch:fetchRessource,fetchEval:fetchEval,fetchUrlArticle:fetchUrlArticle,cleanCache:cleanCache};return ressourceApi}},304:function(t,n,e){"use strict";e.d(n,"a",(function(){return i}));var o=e(31),i=function(t){try{t()}catch(n){Object(o.d)("".concat(n))}}},31:function(t,n,e){"use strict";e.d(n,"a",(function(){return c})),e.d(n,"c",(function(){return a})),e.d(n,"b",(function(){return r})),e.d(n,"d",(function(){return l}));e(11);var o=e(12),i="tiroDevCli",c=function(t,n,e){window[i]||(window[i]={}),window[i][t]||(window[i][t]={}),window[i][t][n]=e},a=function(t,n){return window[i]&&window[i][t]&&window[i][t][n]?window[i][t][n]:function(){console.log("DEV FN",t,n,"does not exists")}},r=function(t,n){if(window[i]&&window[i][t]&&window[i][t][n])window[i][t][n]();else{var e="DEV FN ".concat(t," ").concat(n," does not exists");console.log(e),l(e)}},l=function(t,n){console.log("[NOTIF LOG]: ",t),Object(o.d)((function(e){e.ui.notification.emit({content:t,id:n,options:{hideAfter:60,type:"warning",keepInHistory:!0}})}))}},333:function(t,n){},335:function(t,n){},34:function(t,n,e){"use strict";e.d(n,"a",(function(){return o})),e.d(n,"b",(function(){return i}));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)}))},i=function(t){var n=t.split("?")[1]||"",e=t.split("?")[0],o=e.replace(/[^\w\s]/gi,"_"),i=n.replace(/[^\w\s]/gi,"_"),c=e.split(".").pop()||"";return((c="."+c.replace(/[^\w\s]/gi,"_")).length>6||c.length<=1)&&(c=""),"".concat(o,"_").concat(i).concat(c)}},346:function(t,n){},348:function(t,n){},35:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(4),i=e.n(o),c=e(0);function a(cb,t){var n=Object(c.useRef)(cb);return Object(c.useEffect)((function(){n.current=cb})),Object(c.useCallback)(i.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(c.useRef)(cb),a=function(){var t=Object(c.useRef)(!0);return Object(c.useEffect)((function(){return function(){t.current=!1}}),[]),function(){return t.current}}();return Object(c.useEffect)((function(){o.current={cb:cb,delay:t}})),Object(c.useCallback)(i.a.debounce((function(){var n;o.current.delay===t&&a()&&(n=o.current).cb.apply(n,arguments)}),t,e),[t,i.a.debounce])}},373:function(t,n){},375:function(t,n){},376:function(t,n){},38:function(t,n,e){"use strict";e.d(n,"a",(function(){return p})),e.d(n,"b",(function(){return f}));var o=e(11),i=e(0),c=e.n(i),a=e(123),r=e(10),l=e(25),s=e(1),u=function(t){var n=Object(o.a)({},t),e=n.design,c=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,i{color:",c?c[1]:r.a.colors.main,";}}svg,i{transform:scale(",l||1.3,");color:",c?c[0]:r.a.colors.editor.interfaceGrey,";&:hover{color:",c?c[1]:r.a.colors.main,";}}}","");return Object(i.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=c.a.memo(u,(function(t,n){return!1})),d=function(t){var n=Object(s.c)(c.a.Fragment,null);t.title&&(n=Object(s.c)(c.a.Fragment,null,t.title)),t.icon&&(n=t.icon.startsWith("fa")||t.icon.includes(".")?Object(s.c)(l.a,{name:t.icon}):Object(s.c)(l.b,{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),t.title&&Object(s.c)("div",{className:"button-title-wrapper "},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-title-wrapper {\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\t// width: 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-title-wrapper {\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-title-wrapper {\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-title-wrapper {\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")}},381:function(t,n){},383:function(t,n){},389:function(t,n){},39: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(18),i=e(29),c=e(56),a=e(15),r=e(78),l=e(77),s=e(168),u=e(64),p=(e(4),e(117)),d=e(88),f=e(1),b=function(t){return Object(r.d)(t,i.a.externalLink3,(function(t){return Object(p.a)(t,{addLineJump:!0})}))},g=function(t,n){var e=Object(u.a)("$1","$2",null,t,!0);return n.replace(i.a.linklink,e)},h=function(t){var n=t.replace(i.a.searchlink,'<a class="search-link preview-link" href="javascript:window.tiroCli.triggerSearch.func(\'$1$2\');">$1</a>');return n=Object(c.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,e){var o=0,c=Object(r.d)(e,i.a.ressource,(function(e){o++;"".concat(e,"-").concat(o);var i="".concat(function(t,n,e){return Object(s.renderToString)(Object(f.c)(l.a,{markdownTag:t,file:n,windowId:e}))}(e,t,n)," ");return i}));return c},w=function(t,n){return Object(r.d)(n,i.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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},j=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")}},391:function(t,n){},41:function(t,n,e){"use strict";e.d(n,"a",(function(){return a}));var o=e(11),i=e(18),c="80"===window.location.port?"":":".concat(window.location.port);"3000"===window.location.port&&(c=":3023");var a=Object(o.a)(Object(o.a)({},i.a.client),{},{global:{protocol:"".concat(window.location.protocol,"//"),url:"".concat(window.location.hostname),port:c}})},410:function(t,n){},422:function(t,n){},425:function(t,n){},46:function(t,n,e){"use strict";e.d(n,"a",(function(){return d})),e.d(n,"b",(function(){return f}));var o=e(7),i=e(8),c=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(c.a)(e,t);var n=Object(a.a)(e);function e(){var t;Object(o.a)(this,e);for(var i=arguments.length,c=new Array(i),a=0;a<i;a++)c[a]=arguments[a];return(t=n.call.apply(n,[this].concat(c))).canBgClose=!t.props.canBgClose||t.props.canBgClose,t}return Object(i.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:10001;\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")}},469:function(t,n){},47:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(7),i=e(8),c=e(20),a=e(21),r=e(13),l=e(31),s=function(t){Object(c.a)(e,t);var n=Object(a.a)(e);function e(t,i){var c;return Object(o.a)(this,e),(c=n.call(this)).match=t,c.replacement=i,c}return Object(i.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,o){return new r.e({regexp:t,decoration:function(t){var i=t.input+t.index,c=e.path+o;if(u[c]||(u[c]={}),!u[c][i]){var a=new s(t,n),l=r.a.replace({widget:a});u[c][i]=l}return u[c][i]}})},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,t.windowId).createDeco(e):this.decorations=d(t.pattern,t.classWrap).createDeco(e)}return Object(i.a)(n,[{key:"update",value:function(n){try{t.replacement&&(n.docChanged||n.viewportChanged)?this.decorations=p(t.pattern,t.replacement,t.file,t.windowId).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,i,c=(null===(o=e.plugin(n))||void 0===o?void 0:o.decorations)||r.a.none;return null!==(i=t.options)&&void 0!==i&&i.isAtomic||(c=r.a.none),c}))}})}},493:function(t,n){var e="[MARKETPLACE-HTML] generatePluginsMarketplaceHtml";var o=function(t){var n=t?"50%":"25%",e="\n html, body {\n font-family: arial, sans-serif;\n }\n\n /*\n Version table CSS\n */\n table {\n border-spacing: 0px;\n width: 100%;\n }\n thead tr th{\n padding: 8px;\n }\n tbody {\n text-align: left;\n }\n tbody tr {\n cursor: pointer;\n background: #f1f0f0;\n }\n tbody tr:nth-child(2n) {\n background: none;\n }\n tbody td {\n padding: 8px;\n }\n\n /*\n DETAILS CSS\n */\n\n #plugin-detail-wrapper {\n overflow: hidden;\n overflow-y: ".concat(t?"auto":"hidden",";\n display:none;\n width: calc(100% - 40px);\n height: calc(100% - 70px);\n z-index: 3;\n position: absolute;\n top: 30px;\n left: 0px;\n background: white;\n padding: 20px;\n border-radius: 7px;\n }\n #plugin-detail-wrapper.show {\n display:").concat(t?"block":"flex",";\n }\n #detail-close {\n position: absolute;\n top: 10px;\n right: 10px;\n font-size: 13px;\n background: white;\n padding: 3px 7px;\n border-radius: 100;\n box-shadow: 0px 0px 5px #0006;\n cursor: pointer;\n border-radius: 110px;\n z-index: 3;\n }\n \n #detail-left {\n width: ").concat(t?"100":"70","%;\n overflow-y: auto;\n }\n #detail-title {\n font-size: 31px;\n margin-bottom: 20px;\n font-weight: bold;\n margin-top: 0px;\n }\n #detail-description {\n margin: 0px;\n margin-bottom: 30px;\n \n }\n #detail-versions {\n }\n\n #detail-right {\n width: ").concat(t?"100":"30","%;\n \n position: relative;\n }\n #detail-icon {\n position: absolute;\n left: -50px;\n }\n #detail-icon img{ \n width: 30px;\n }\n #detail-images {\n margin-top: ").concat(t?"30":"0","px;\n display: block;\n height: 100%;\n overflow: hidden;\n overflow-y: auto;\n }\n #detail-images img {\n max-width: calc(100% - 20px);\n border-radius: 8px;\n box-shadow: 0px 0px 5px #0006;\n margin: 7px;\n }\n\n\n /*\n // LIST CSS\n */\n\n .plugins-list-wrapper {\n display: flex;\n flex-wrap: wrap;\n // width: 400px;\n overflow:auto;\n }\n\n .plugins-list-wrapper .plugin-item-wrapper {\n cursor: pointer;\n // display:inline-block;\n width: calc(").concat(n," - 40px);\n padding: 10px;\n margin: 5px;\n background: #ededed;\n border-radius: 10px;\n display: flex;\n height: 80px;\n }\n\n .plugins-list-wrapper .plugin-item-wrapper\t.plugin-item-content {\n width: 60%;\n }\n .plugin-item-content .plugin-item-title {\n font-size: 11px;\n font-weight: bold;\n }\n .plugin-item-content .plugin-item-description {\n font-size: 10px;\n }\n .plugin-item-icon {\n width: 40%;\n height: 100%;\n width: 40%;\n height: 100%;\n background-size: 30px;\n background-repeat: no-repeat;\n background-position: center;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n }\n ");return"<style>".concat(e,"</style")},i=function(t,cb){if(t.constructor===Array)for(var n=0;n<t.length;++n)cb(t[n]);else for(var e in t)cb(t[e],e)};window.ssrActionsPluginsMarketDic={};var c=function(t,n){var e="window.ssrActionsPluginsMarketDic['".concat(t,"'](this)"),o=window.ssrActionsPluginsMarketDic;return o[t]||(o[t]=function(t){n(t)}),e},a=function(){var t=window.innerWidth,n="desktop";return r()||t<1e3&&(n="tablet"),t<500&&(n="mobile"),n},r=function(){return!l()},l=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};"undefined"!==typeof window&&(window._tiro_generatePluginsMarketplaceHtml=function(t){var n=t.onPluginClick?t.onPluginClick:function(t){console.log(e,"on plugin click",t)},r=t.onSettingChange?t.onSettingChange:function(t){console.log(e,"on setting change",t)},l=t.pluginsDescriptions?t.pluginsDescriptions:[],s=t.fullDisplayMode;console.log(e,{pluginsDescriptions:l});var u='<div class="plugins-marketplace-wrapper">';u+='<div class="plugins-list-wrapper">';var p="mobile"===a(),d=function(t,n){return document.getElementById("detail-"+t).innerHTML=n};i(l,(function(t){var e=t.icon;e||(e=t.images&&t.images[0]?t.images[0]:"");var o=c("plugin-click-id-".concat(t.name),(function(){n(t),f(t)})),i=t.description.substr(0,100);t.description.length>100&&(i+="..."),u+='\n <div class="plugin-item-wrapper">\n <div class="plugin-item-content" onClick="'.concat(o,'">\n <div class="plugin-item-title"> ').concat(t.name,' </div>\n <div class="plugin-item-description"> ').concat(i,' </div>\n </div>\n <div class="plugin-item-icon" style="background-image: url(\'').concat(e,"')\">\n </div>\n </div>\n ").trim()}));var f=function(t){if(document.getElementById("plugin-detail-wrapper").classList.add("show"),d("title",t.name),d("description",t.description),s&&t.configuration.length>0){var n="<h3>Settings</h3><table>";n+="<thead><tr>",n+="<th>Id</th>",n+="<th>Field</th>",n+="<th>Description</th>",n+="</tr><thead>",n+="</thead>",n+="<tbody>",t.configuration.map((function(e){n+="<tr>\n <td>".concat(e.id,"</td>\n <td>").concat(function(n,e,o){var i="",a=c("setting-onchange-id-".concat(e),(function(o){var i="checkbox"===n?o.checked:o.value;r({plugin:t,type:n,id:e,value:i})}));return"checkbox"===n?i+='<input type="checkbox" '.concat(!0===o?"checked='checked'":"",' onChange="').concat(a,'" />'):"text"===n&&(i+='<input type="text" value="'.concat(o,'" onkeyup="').concat(a,'" />')),i}(e.type,e.id,"woop"),"</td>\n <td>").concat(e.description,"</td>\n </tr>")})),d("settings",n+="</tbody></table>")}else d("settings","");var e="<h3>Install</h3><table>";e+="<thead><tr>",e+="<th>Version</th>",e+="<th>Date</th>",e+="<th>Description</th>",e+="<th>Install</th>",e+="</tr><thead>",e+="</thead>",e+="<tbody>",t.versions.map((function(t){e+="<tr>\n <td>".concat(t.version,"</td>\n <td>").concat(t.date,"</td>\n <td>").concat(t.comment,"</td>\n <td><button ").concat(s?"":"disabled",">Install</button></td>\n </tr>")})),d("versions",e+="</tbody></table>"),t.icon&&d("icon",'<img class="plugin-images" src="'.concat(t.icon,'" />'));var o="<table>";t.images.map((function(t){o+='<img class="plugin-images" src="'.concat(t,'" />')})),d("images",o)},b=c("plugin-click-close",(function(){document.getElementById("plugin-detail-wrapper").classList.remove("show")}));return u+="</div>",u+='<div id="plugin-detail-wrapper">',u+='<div id="detail-close" onClick="'.concat(b,'">x</div>'),u+='<div id="detail-left">',u+='<h1 id="detail-title"></h1>',u+='<div id="detail-description"></div>',u+='<div id="detail-versions"></div>',u+='<div id="detail-settings"></div>',u+="</div>",u+='<div id="detail-right">',u+='<div id="detail-icon"></div>',u+='<div id="detail-images"></div>',u+="</div>",u+="</div>",u+='<div id="detail-configuration"></div>',u+="</div>",u+="</div>",(u+="</div>")+o(p)})},494:function(t,n,e){"use strict";e.r(n);var o=e(0),i=e.n(o),c=e(6),a=e(1),r=e(14),l=e(15),s=e(11),u=e(123),p=e(10),d=e(120),f=e(69),b=e(38),g=e(4),h=e(61),m={};window.tiroCli=m;var v=function(t,n){var e,r,l=Object(h.a)("showRenderId",!1),s=Object(c.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)(i.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(18),O=e(41),j=e(12),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(25),_=e(22),C=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,_.a.newNote))},E=i.a.memo(C,(function(t,n){return!0})),S=e(7),T=e(8),I=e(20),N=e(21),P=e(57),R=e(39),A=e(308),F=e(305),L=e(19),D={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={},U=e(80),H=function(t){Object(I.a)(e,t);var n=Object(N.a)(e);function e(t){var o;return Object(S.a)(this,e),(o=n.call(this,t)).oldFiles=[],o.liRefs=[],o.scrollerWrapperRef=i.a.createRef(),o.scrollerListRef=i.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,i=[],c=0;c<o.liRefs.length;c++){var a=o.liRefs[c].current;if(a){var r,l=a.getBoundingClientRect().top;if(l>-50&&l<n+100)-1===e&&(e=c),o.props.files[c]&&i.push(null===(r=o.props.files[c])||void 0===r?void 0:r.path)}}o.props.onVisibleItemsChange(i)}}),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(T.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(i.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=U.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),c=Object(r.b)("desktop")?o:o-p.a.sizes.mobile.bottomBarHeight;return Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"list-wrapper-scroller",style:{height:c},onScroll:this.onListScroll,ref:this.scrollerWrapperRef},Object(a.c)(F.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:c,itemCount:t.props.files.length,itemSize:e,width:r||0,onScroll:t.onListScroll},(function(e){var o=e.index,c=e.style,l=t.props.files[o],s=t.props.filesPreview[l.path];return Object(a.c)("div",{style:c},Object(a.c)("li",{ref:t.liRefs[o],style:{width:r||0-2*K.l2.fileLi.padding-2*K.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(D["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)(i.a.Fragment,null,s.content)),Object(a.c)("div",{className:"date ".concat(n)},Object(P.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}(i.a.Component),W=i.a.memo(H,(function(t,n){return!1})),q=Object(s.a)({},p.a),V=(q.els,q.colors),K=(q.font,q.sizes),J=e(158),G=e(26),Y=function(t){return Object(a.c)("div",{className:"folder-tree-view-component"},Object(a.c)("h3",{className:"subtitle"},_.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){console.log("ONFOLDERCLOSE",n),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,i=Object(o.useState)(!1),r=Object(c.a)(i,2),l=r[0],s=r[1],u=Object(o.useState)(!1),d=Object(c.a)(u,2),f=d[0],b=d[1],g=Object(o.useState)(""),h=Object(c.a)(g,2),m=h[0],v=h[1];Object(o.useEffect)((function(){e&&!n.folder.children||e&&n.folder.children&&0===n.folder.children.length?b(!0):b(!1)}),[n.folder.children,e]);var w=Object(G.a)(n.current,n.folder.key);return Object(a.c)("li",{className:"folder-wrapper ".concat(w?"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(m),onDragEnter:function(t){v("drag")},onDrop:function(t){v("")},onDragLeave:function(t){v("")}},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(_.a.renameFolderPrompt," "),n.folder.title);t&&""!==t&&t!==n.folder.title&&n.onFolderMenuAction("rename",n.folder,t),s(!1)}},_.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(_.a.createFolderPrompt,' "').concat(n.folder.path,'"?'),userInput:!0,onAccept:function(t){t&&""!==t&&n.onFolderMenuAction("create",n.folder,t)},onRefuse:function(){}})})),s(!1)}},_.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)}},_.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(_.a.deleteFolderPrompt,' "').concat(n.folder.path,'"?'),(function(){n.onFolderMenuAction("delete",n.folder)}))}))}},_.a.deleteFolder))))),f&&Object(a.c)("div",{className:"loading"},"..."),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)(i.a.Fragment,null,n.length>0&&Object(a.c)("div",{className:"last-notes-component"},Object(a.c)("h3",{className:"subtitle"},_.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=i.a.memo(Z,(function(t,n){return t.files===n.files})),Q=e(58),tt=e(46),nt=function(t){var n=Object(o.useContext)(j.a),e=!!n&&n.status.searching.get;return Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"search-bar-component"},Object(a.c)("input",{type:"text",placeholder:_.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 i=n.ui.browser.folders.current.get();""===t.term&&""!==i&&(e=e+" "+i,o&&setTimeout((function(){var t=(o.selectionStart||0)-i.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&&_.a.searchingLabel)))},et=e(63),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.f)(n));window.open(e,"popupDetached","width=600,height=600")},it=function(t){var n=Object(o.useState)(0),e=Object(c.a)(n,2),i=e[0],r=e[1];Object(o.useEffect)((function(){r(t.startingIndex)}),[t.startingIndex]);var l=function(n){var e=i;e=-1===n&&0===i?t.images.length-1:1===n&&i===t.images.length-1?0:i+n,r(e),d(10)},s=Object(o.useState)(10),u=Object(c.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)([]),function(t){return setTimeout((function(){!function(){var n=document.getElementById(t),e=document.getElementById("lightbox-image-id"),o=50*(p-10)+99;if(p<10&&(o=10*-(10-p)+99),n&&e){n.style.transform="scale(".concat(o/100,")"),n.style.transformOrigin="top left";var i=n.naturalWidth/n.naturalHeight,c=e.offsetWidth,a=e.offsetHeight,r=c/a;i<r&&(n.style.height="".concat(a-10,"px")),i>r&&(n.style.width="".concat(c-10,"px"))}}()}),50),{}}),h=Object(o.useRef)(null),m=function(){var t="0px";if(h.current){var n=h.current.clientHeight;t="".concat(n-5,"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:h},t.images.map((function(n,e){return Object(a.c)("div",{key:e,id:"lightbox-image-id",className:"lightbox-image",style:{display:e===i?"flex":"none"}},Object(a.c)("div",{className:"image-zoom-wrapper",style:{lineHeight:m}},Object(a.c)("img",{id:"img-lightbox-id-".concat(e),style:g("img-lightbox-id-".concat(e)),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)}}]})))}))))},ct={onAccept:function(){},onRefuse:function(){}},at=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),r=e[0],l=e[1],s=Object(o.useState)(""),u=Object(c.a)(s,2),p=u[0],d=u[1],f=Object(o.useState)(null),b=Object(c.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(_.a.promptPopup.defaultTitle),v=Object(c.a)(m,2),w=v[0],O=v[1],j=Object(o.useState)(!1),x=Object(c.a)(j,2),k=x[0],y=x[1],C=Object(o.useState)(_.a.promptPopup.accept),E=Object(c.a)(C,2),S=E[0],T=E[1],I=Object(o.useState)(_.a.promptPopup.refuse),N=Object(c.a)(I,2),P=N[0],R=N[1],A=function(t){l(!0),d(t.text),t.acceptLabelButton&&T(t.acceptLabelButton),t.refuseLabelButton&&R(t.refuseLabelButton),t.title&&O(t.title),t.userInput&&h(""),t.onAccept&&(ct.onAccept=t.onAccept),t.onRefuse?(ct.onRefuse=t.onRefuse,y(!0)):y(!1)},F=function(){l(!1),h(null),O(""),d(""),y(!1)},L={confirm:function(t,cb,n){A({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){A({title:n,text:t,onAccept:cb,onRefuse:function(){}})},prompt:A};return{popupApi:L,PromptPopupComponent:function(){return Object(a.c)(i.a.Fragment,null,r&&Object(a.c)("div",{className:"prompt-popup-component"},Object(a.c)(tt.a,{title:w,onClose:F,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){ct.onAccept(g),F()}},S),k&&Object(a.c)("button",{value:"submit",className:"refuse submit-button",onClick:function(t){ct.onRefuse(g),F()}},P)))))}}},rt=e(166),lt=e(93),st=function(t){var n=Object(o.useContext)(j.a),e=Object(o.useState)(-1),i=Object(c.a)(e,2),r=i[0],l=i[1];return Object(a.c)("div",{className:"tab-list-wrapper-hover ".concat(t.pinStatus?"pinned":"unpinned")},Object(a.c)("div",{className:"top-hover-bar"}," "),Object(a.c)("div",{className:"tab-list-scroll-wrapper",style:{top:"".concat(t.pinStatus?0:-44,"px")}},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")}},"+"),Object(a.c)("div",{className:"tab-wrapper tab-more",onClick:function(n){t.onPinToggle()}},Object(a.c)(y.b,{name:"thumbtack"}))))))},ut=function(t){var n=Object(s.a)({},t),e=n.tab,o=n.pos,c="Six",l=e.grid.layout.length;return 2===l&&(c="Two"),3===l&&(c="Three"),4===l&&(c="Four"),5===l&&(c="Five"),c="faDice".concat(c),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)(i.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:c,color:"#b2b2b2"})),Object(a.c)("div",{className:"tab-close",onClick:function(){Object(j.d)((function(n){n.popup.confirm("".concat(_.a.deleteTabPrompt,' "').concat(e.name,'"?'),(function(){t.onUpdate("close",e)}))}))}},Object(a.c)(y.a,{name:"faPlus",color:"#b2b2b2"}))))},pt=i.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(159),ft=e(136),bt=e(160),gt=e(121),ht=e(84),mt=e(122),vt=e(116),wt=e(17),Ot=e(306),jt=e(35),xt=e(34),kt=e(101),yt=function(t){var n=Object(o.useState)(""),e=Object(c.a)(n,2),i=(e[0],e[1]),r=Object(o.useState)(t.view),l=Object(c.a)(r,2),s=l[0],u=(l[1],Object(jt.a)((function(){Object(j.d)((function(n){n.file.getContent(t.file.path,(function(n){i(n),t.searchedString&&Object(j.d)((function(n){setTimeout((function(){console.log("searchword",t.searchedString),n.ui.note.editorAction.dispatch({type:"searchWord",searchWordString:t.searchedString,windowId:t.windowId});var e=document.querySelector(".select-wrapper input");e&&(e.focus(),setTimeout((function(){e.focus(),setTimeout((function(){e.focus()}),100)}),50))}),300)}))}))}))}),200));Object(o.useEffect)((function(){u()}),[t.file,t.searchedString,s]);var p=t.height?t.height+"px":"100%",d=Object(o.useState)(t.windowId||Object(xt.a)()),f=Object(c.a)(d,2),b=f[0],g=f[1];return Object(o.useEffect)((function(){g(t.windowId||Object(xt.a)())}),[t.windowId]),Object(a.c)("div",{className:"note-preview-wrapper "+s,style:{height:p}},Object(a.c)(kt.a,{content:{i:b,file:t.file,active:!1,view:t.view},forceView:t.view,canEdit:!0,showViewToggler:t.showViewToggler,showToolbar:t.showToolbar,titleEditor:t.titleEditor,onLayoutUpdate:t.onLayoutUpdate||function(){}}))},_t=i.a.memo(yt,(function(t,n){return JSON.stringify(t)===JSON.stringify(n)})),Ct=e(137),Et=e(171),St=e(55),Tt=e(174),It=e(31),Nt="[PLUGIN CRON]";Object(It.a)("cron","trigger",(function(){At()}));var Pt="plugins-cron-infos",Rt=function(t,n){var e=[],o=[];Object(g.each)(n,(function(t,n){e.push(n),o.push(t)}));try{Object(Tt.a)(Function,e.concat([t.code])).apply(void 0,o)}catch(c){var i="[ERR in ".concat(t.type.toLocaleUpperCase()," plugin ").concat(t.name.toLocaleUpperCase(),"]: ").concat(c);console.log(i,c,{paramsNames:e,paramsValues:o,plugin:t}),console.trace(c),Object(It.d)("".concat(i))}},At=function(){Object(j.d)((function(t){t.plugins.list((function(n){t.cache.get(Pt,(function(e){e||(e={}),console.log(Nt,"starting new batch cron",{plugins:n,cronState:e}),Object(g.each)(n,(function(n){var o,i,c,a=!0;if(!1===(null===(o=n.options)||void 0===o?void 0:o.disabled)&&(a=!1),"background"===n.type&&a){e[n.name]||(e[n.name]={vars:{}});var r=60*((null===(i=n.options)||void 0===i?void 0:i.background_exec_interval_in_min)||60)*1e3,l=(new Date).getTime(),s=(null===(c=e[n.name])||void 0===c?void 0:c.lastRunTime)||0;if(s+r>l)return console.log(Nt,"bg plugin ".concat(n.name,", wait for ").concat(Math.round((s+r-l)/1e3)," seconds"));console.log(Nt,"exec the bg plugin ".concat(n.name,", last exec was ").concat(new Date(s).toJSON()));var u=e[n.name];Rt(n,{tiroApi:t,bgState:u}),e[n.name]&&!Object(g.isUndefined)(e[n.name])||(e[n.name]={vars:{}}),e[n.name].lastRunTime=l}})),t.cache.set(Pt,e,-1)}),{disableRamCache:!0})}))}))},Ft=e(60),Lt={charsStart:2},Dt=[{label:"loading...",value:""}],Mt="[Search Mode]",zt="[Explorer Mode]",Bt="[History Mode]",Ut="[Plugin Mode]",Ht={dict:{},config:{enabled:!0}},Wt=function(){Ht.config.enabled=!1,Ht.dict={}},qt={hasBeenLoaded:!1},Vt=function(t){var n=Object(o.useState)("editable"),e=Object(c.a)(n,2),i=e[0],l=e[1];Object(o.useEffect)((function(){L.current.focus()}),[i]);var u=Object(o.useState)([]),d=Object(c.a)(u,2),f=d[0],b=d[1],h=Object(o.useRef)([]),m=function(t){Object(g.isArray)(t)&&(b(t),h.current=t)},v=Object(o.useState)([]),w=Object(c.a)(v,2),O=w[0],x=w[1],k=function(t){console.log("setOptions",t),Object(j.d)((function(n){var e=n.tabs.active.get();"mobile"!==Object(r.a)()&&Object(g.each)(null===e||void 0===e?void 0:e.grid.content,(function(n){if(n.file){var e=n.file;Object(g.each)(t,(function(n,o){if(n&&n.value&&n.value===e.path)return delete t[o],!1}))}})),tn(t),x(t)}))},_=Object(o.useState)("No Options"),C=Object(c.a)(_,2),E=C[0],S=(C[1],function(n){Object(j.d)((function(e){e.ui.note.editorAction.dispatch({type:"insertText",insertText:Object(Et.a)(n)}),t.onClose()}))}),T=function(n){Object(j.d)((function(e){e.ui.floatingPanel.create({view:"editor",type:"file",file:n}),t.onClose()}))},I=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),i=e[0],l=e[1];return Object(o.useMemo)((function(){return Object(a.c)("div",{className:"path-option-wrapper device-".concat(Object(r.a)()),onMouseEnter:function(t){l(!0)},onMouseLeave:function(t){l(!1)}},Object(a.c)("div",{className:"file"},t.file.name),Object(a.c)("div",{className:"folder"},t.file.folder),i&&Object(a.c)("div",{className:"actions"},Object(a.c)("div",{className:"action",onClick:function(n){n.stopPropagation(),S(t.file)}},Object(a.c)(y.b,{name:"link",label:"insert note link in the current note"})),Ft.c.curr.beta_floating_windows&&Object(a.c)("div",{className:"action",onClick:function(n){n.stopPropagation(),T(t.file)}},Object(a.c)(y.b,{name:"window-restore",label:"Open note in a floating window"}))))}),[t.file,i])},N=function(t){return Object(a.c)(I,{file:t})},P=(Object(o.useRef)(!1),Object(o.useState)({indicatorsContainer:function(t,n){return Object(s.a)(Object(s.a)({},t),{},{display:"none"})},menuList:function(t,n){var e="mobile"===Object(r.a)()?{}:{maxHeight:"150px"};return Object(s.a)(Object(s.a)({},t),e)},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})},multiValueLabel:function(t,n){var e=Object(s.a)(Object(s.a)({},t),{},{color:"#919090!important"});return Object(s.a)({},e)},multiValueRemove:function(t,n){var e="mobile"===Object(r.a)()?"block":"none";return n.data.editable?t:Object(s.a)(Object(s.a)({},t),{},{display:e,opacity:"0.2",position:"relative",top:"3px"})}})),R=Object(c.a)(P,2),A=R[0],F=R[1];Object(o.useEffect)((function(){setTimeout((function(){A.menu=function(t,n){var e=(Object(r.a)(),"all");return Object(s.a)(Object(s.a)({},t),{},{position:"relative",pointerEvents:e})},F(A)}),500)}),[]);var L=Object(o.useRef)(),D=O[0]||{label:"",value:""},M=function(n){var e=Object(G.d)(n);Object(j.d)((function(n){n.ui.browser.goTo(e.folder,e.name,{openIn:"activeWindow"}),t.onClose()}))},z=Object(o.useState)(""),B=Object(c.a)(z,2),U=B[0],H=B[1],W=Object(o.useRef)(null);Object(o.useEffect)((function(){W.current=U}),[U]);var q=Object(o.useRef)("");Object(o.useEffect)((function(){!function(){var t=h.current,n=U.trim();if(un("editor"),0===t.length)"/"===n&&(Object(Ct.a)("omnibar_explorer"),Object(j.d)((function(t){H("");var n=t.ui.browser.folders.current.get();setTimeout((function(){console.log(t.ui.browser.folders.current.get())})),Q(n)}))),""===n&&ct(),"?"===n&&(Object(Ct.a)("omnibar_search"),tt()),":"===n&&bt(),","===n&&at();else if(t[0].label===Mt)et(t,n);else if(t[0].label===zt){var e=function(){var n=Object(wt.a)(t);n.shift();var e="";return Object(g.each)(n,(function(t){e+="/"+t.value})),e}();e.endsWith(".md")?(e=e.replace(t[0].label,""),M(e)):q.current!==e&&(q.current=e,Q(e))}else t[0].label===Ut?gt(n,t):t[0].label===Bt&&ft(n,t)}(),ht.current&&ht.current()}),[f,U]);var V='[OMNIBAR "ctrl+alt+space"] type "?" for search mode, "/" for explorer mode, ":" for plugin mode, "," for history mode',K=Object(o.useState)(V),J=Object(c.a)(K,2),Y=J[0],$=J[1],Z=Object(o.useRef)(0),X=Object(o.useRef)(""),Q=function(t){if(""!==t&&(t.endsWith("/")||(t+="/"),t!==X.current)){X.current=t,console.log("== EXPLORER",t),k(Dt),l("locked"),Z.current++;var n=Z.current;Object(j.d)((function(e){var o=[t];e.folders.get(o,(function(i){if(n===Z.current&&(i.folderPaths.join("")===o.join("")&&i.folders[0])){var c=i.folders[0].children;e.files.get(t,(function(n,e){if(e===t){var o=t.split("/"),i=[];i.push({value:zt,label:zt}),i.push({value:"/",label:"/"}),Object(g.each)(o,(function(t){""!==t&&i.push({value:t,label:t+"/"})}));var r=[];Object(a.c)("div",{style:{},className:"barimage"});Object(g.each)(c,(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},i=N(t);r.push({value:e,label:i,payload:o})})),m(i),k(r),l("editable")}}))}}))}))}},tt=function(){m([{value:Mt,label:Mt}])},nt=Object(o.useRef)(""),et=function(t,n){if(t[1]){if(2===t.length)un("editor"),it(n,t[1].label,t);else if(3===t.length&&ot.current===t[2].value)un("preview"),console.log("STEP 3-1 (optional) : filter found results",ot.current);else if(3===t.length||4===t.length){var e;console.log("STEP 3-2 : jump to page",{w:ot.current,stags:t});var o=t.length-1;if(null===(e=t[o].payload)||void 0===e||!e.file)return;var i=t[o].payload.file;M(i.path)}}else"?"===n&&Object(j.d)((function(t){var n=t.ui.browser.folders.current.get;H(n)})),""===n?H(nt.current):nt.current=n.slice(0,-1),$('Path to search (ex:"/path/to/folder") + ENTER'),k([{label:n,value:n}])},ot=Object(o.useRef)(null),it=Object(jt.a)((function(t,n,e){var o=n,i=t;if(i&&o&&i.length>=Lt.charsStart&&o.length>0){$('Searching "'.concat(i,'" in "').concat(o,'" ...')),k(Dt);var c=i.includes("*"),r=[];k(r),ot.current=i,dt([].concat(Object(wt.a)(e),[{label:i,value:i}])),Object(j.d)((function(t){t.search.word(i,o,(function(t){Object(g.each)(t,(function(t){Object(g.each)(t.results,(function(n){var e=c?"(".concat(i,")"):"",o="".concat(t.file.path," ").concat(e),l=n.indexOf(i),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));var f=u,b=u.replaceAll(i,"<b>".concat(i,"</b>")),g=Object(a.c)("div",{className:"path-option-wrapper"},Object(a.c)("div",{className:"search-location"},o),Object(a.c)("div",{className:"occur-wrapper",dangerouslySetInnerHTML:{__html:b}}));r.push({label:g,value:ot.current+t.file+f+o,payload:{file:t.file,line:f,raw:n}})}))})),0===r.length&&Pt(null),r.unshift({label:"\ud83d\udd0e Filter the ".concat(r.length,' results for "').concat(ot.current,'"'),value:ot.current}),$("".concat(r.length-1,' results found for "').concat(i,'" in "').concat(o,'" ')),k(r)}))}))}else $("Type the searched word"),k([]),setTimeout((function(){L.current.focus()}),100),Pt(null),ot.current=""}),500),ct=function(){var n;$(V);var e=function(t){var n=[];return Object(g.each)(t,(function(t){var e={value:t.path,label:N(t),payload:{file:t}};n.push(e)})),n}(t.lastNotes),o=e.shift(),i=e.shift();e.unshift(o),e.unshift(i);var c=e[0]?null===(n=e[0].payload)||void 0===n?void 0:n.file:null;c&&Pt(c),k(e)},at=function(){m([{value:Bt,label:Bt}])};Object(o.useEffect)((function(){qt.hasBeenLoaded||(pt(),qt.hasBeenLoaded=!0)}),[]);var rt=Object(St.a)("omni-history",[]),lt=Object(c.a)(rt,3),st=lt[0],ut=lt[1],pt=lt[2],dt=function(t){console.log("addToOmniHistory");var n=[];Object(g.each)(t,(function(t){n.push(t.label)}));var e=n.join(" "),o={options:t,id:e},i=st.filter((function(t){return t.id!==e})),c=[o].concat(Object(wt.a)(i));c.length>100&&c.splice(0,100),console.log("[HIST mode] add to omnihist ",{nItem:o,nItems:c}),ut(c)},ft=function(t,n){if(Pt(null),n[1]){if(n[1]){var e;console.log("HIST selected",n[1]);var o=null===(e=n[1].payload)||void 0===e?void 0:e.options;if(!o)return;var i=o.pop();i&&H(i.label),m(o)}}else{var c=st,a=[];k(a),Object(g.each)(c,(function(t){a.push({label:t.id,value:t.id,payload:t})})),$("history mode"),k(a),","===t&&H("")}},bt=function(){m([{value:Ut,label:Ut}])},gt=function(n,e){Pt(null),Object(j.d)((function(o){if(1===e.length){var i=[];o.plugins.list((function(t){Object(g.each)(t,(function(t){"bar"===t.type&&i.push({label:t.name,value:t})})),k(i),":"===n&&H(""),i=Object(g.orderBy)(i,["label"]),$("".concat(i.length," bar plugins found"))}))}else if(e.length>=2){var c={input:n,setInputTxt:H,inputTxt:U,inputTxtRef:W,options:O,setOptions:k,onChange:ht,onClose:t.onClose,onHide:t.onHide,close:t.onClose,hide:t.onHide,selectedOptionRef:h,setSelectedOption:m,lodash:g,selectedTags:e,setNotePreview:Pt,notePreview:It,setHtmlPreview:Kt,htmlPreview:Vt,disableCache:Wt},a=e[1].value;k(Dt),Object(j.d)((function(t){Rt(a,{barApi:c,tiroApi:t})}))}}))},ht=Object(o.useRef)(null),mt=Object(o.useState)(Object(xt.a)()),vt=Object(c.a)(mt,2),kt=vt[0],yt=(vt[1],Object(o.useState)(null)),Tt=Object(c.a)(yt,2),It=Tt[0],Nt=Tt[1],Pt=function(t){Nt(t)},At=Object(o.useState)(null),Ht=Object(c.a)(At,2),Vt=Ht[0],Kt=Ht[1],Jt=Object(o.useState)(void 0),Gt=Object(c.a)(Jt,2),Yt=Gt[0],$t=Gt[1],Zt=function(t,n){var e=h.current;e[0]&&e[0].label===zt?Pt(t):e[0]&&e[0].label===Mt?(Pt(t),setTimeout((function(){$t(n)}),300)):e[0]?Pt(null):Pt(t)},Xt=Object(o.useRef)([]),Qt=Object(jt.a)((function(){var t=document.querySelectorAll("div[id*='-option']");if(0===t.length)return Pt(null);Object(g.each)(t,(function(t){if("rgb(222, 235, 255)"===getComputedStyle(t)["background-color"]){var n=parseInt(t.id.split("-").pop()),e=O[n].payload;if(!e)return;var o=e.file,i=e.line||void 0;Zt(o,i)}}))}),400),tn=Object(jt.a)((function(t){!function(t){Object(g.each)(Xt.current,(function(t){t.disconnect()})),Xt.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"]&&O[e]&&O[e].payload){var o=O[e].payload;if(!o)return;var i=o.file,c=o.line||void 0;document.querySelectorAll("div[id*='-option']"),Zt(i,c)}}));e.observe(t,{childList:!0,attributes:!0,subtree:!1}),Xt.current.push(e)}))}()}),100);Object(o.useEffect)((function(){tn(O)}),[O,U]);var nn=Object(o.useState)(300),en=Object(c.a)(nn,2),on=en[0],cn=en[1],an=Object(o.useRef)(null);Object(jt.a)((function(){if(an&&an.current){var t=an.current.clientHeight+30,n=window.innerHeight-t-50;on!==n&&cn(n)}}),10)();var rn=Object(o.useState)("editor"),ln=Object(c.a)(rn,2),sn=ln[0],un=ln[1];return Object(a.c)("div",{className:"omnibar-popup-bg ".concat(t.show?"":"hide"),onClick:function(n){t.onClose()}},Object(a.c)("div",{className:"omnibar-popup-wrapper device-".concat(Object(r.a)()," ").concat(i)},Object(a.c)("div",{className:"flex-wrapper",onClick:function(t){t.stopPropagation()}},Object(a.c)("div",{className:"select-wrapper",ref:an},Object(a.c)("div",{className:"help"},Y),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:L,menuIsOpen:!0,defaultValue:D,value:f,autoFocus:!0,isDisabled:"locked"===i,onChange:function(t,n){var e=t[0];if(e&&e.payload&&e.payload.file){var o=e.payload.file;M(o.path),t=[]}m(t)},openMenuOnClick:!1,inputValue:U,onInputChange:function(t,n){Qt(),"input-blur"===n.action||"menu-close"===n.action||H(t)},onFocus:function(t){},options:O,styles:A,noOptionsMessage:function(){return E}})),It&&"mobile"!==Object(r.a)()&&Object(a.c)("div",{className:"preview-wrapper ".concat(It?"note-preview":"html-preview-wrapper"),style:{height:on}},It&&"mobile"!==Object(r.a)()&&Object(a.c)(_t,{file:It,showToolbar:!0,titleEditor:!1,searchedString:Yt,height:on,view:sn,windowId:kt}),Vt&&Object(a.c)("div",{className:"html-preview",dangerouslySetInnerHTML:{__html:Vt},style:{height:on}})))))},Kt=function(t){var n=Object(o.useState)(""),e=Object(c.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(G.d)(t.filePath),i=n.note.render({raw:e,file:o});l(i)}))}))}),[t.filePath]),Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"rendered-note-component"},Object(a.c)("span",{className:"rendered-note-content-wrapper",dangerouslySetInnerHTML:{__html:r}})))},Jt=function(t){return Object(a.c)(i.a.Fragment,null,Object(a.c)("div",{className:"shortcut-component"},Object(a.c)("h3",{className:"subtitle"},"shortcuts"),Object(a.c)(Kt,{filePath:t.filePath})))},Gt=e(117),Yt=e(176),$t=e(169);Object(It.a)("notification","emit",(function(t,n){var e=t||"";Object(j.d)((function(o){console.log(t,n),o.ui.notification.emit({content:(new Date).toJSON()+" \n\n <br/> test notif => \n"+e,options:Object(s.a)({},n)})}))}));var Zt=function(t){var n=Object(o.useState)([]),e=Object(c.a)(n,2),i=e[0],r=e[1],l=Object(o.useRef)([]);Object(o.useEffect)((function(){Object(j.d)((function(t){t.socket.get((function(t){t.on("getNotification",(function(t){var cb;cb=function(n){if(!0===!n)return console.log("[NOTIFS] notifications disabled, not displaying it");t.notification.id||(t.notification.id=Object(xt.a)()),p(t.notification),u(t.notification)},Object(j.d)((function(t){cb(!t.userSettings.get("view_disable_notification_popups"))}))}))}))}))}),[]);var s=Object(o.useRef)({}),u=function(t){var n,e=1e3*((null===(n=t.options)||void 0===n?void 0:n.hideAfter)||10);e<0||t.id&&(s.current[t.id]=setTimeout((function(){d(t.id)}),e))},p=function(t){l.current=l.current.filter((function(n){return n.id!==t.id})),t.id&&s.current[t.id]&&clearTimeout(s.current[t.id]),l.current.unshift(t),r(Object(wt.a)(l.current))},d=function(t){t&&(l.current=l.current.filter((function(n){return n.id!==t})),r(Object(wt.a)(l.current)))},f=function(t){var n,e,o="normal";return null!==(n=t.options)&&void 0!==n&&n.type&&(o=null===(e=t.options)||void 0===e?void 0:e.type),o};return Object(a.c)("div",{className:"notifications-center-wrapper"},Object(a.c)("div",{className:"notifications-list"},i.map((function(t){return Object(a.c)("div",{key:t.id,className:"notif-wrapper notif-type-".concat(f(t))},Object(a.c)("div",{className:"notif-close",onClick:function(n){d(t.id)}},Object(a.c)(y.b,{name:"close"})),Object(a.c)("div",{className:"notif-content",dangerouslySetInnerHTML:{__html:t.content}}))}))))},Xt=e(165),Qt=e(64),tn=function(t){var n,e=Object(G.d)(t.notePreview.filepath);Object(o.useEffect)((function(){s("note-preview-popup-wid-".concat(Object(xt.a)()))}),[]);var i=Object(o.useState)(""),r=Object(c.a)(i,2),l=r[0],s=r[1];return Object(a.c)("div",{className:"page-link-preview-popup-ext",onMouseLeave:function(t){Object(j.d)((function(t){t.ui.notePreviewPopup.close()}))},style:{left:t.notePreview.position[0],top:t.notePreview.position[1]}},Object(a.c)("div",{className:"click-throught",onClick:function(n){var e,o=Object(G.d)(t.notePreview.filepath);o&&null!==(e=t.notePreview.opts)&&void 0!==e&&e.windowIdToOpenIn&&(Object(Qt.d)(!0),Object(j.d)((function(n){var e;n.ui.browser.goTo(o.folder,o.name,{openIn:null===(e=t.notePreview.opts)||void 0===e?void 0:e.windowIdToOpenIn})})))}}),Object(a.c)("div",{className:"page-link-preview-popup-int"},Object(a.c)(_t,{file:e,searchedString:null===(n=t.notePreview.opts)||void 0===n?void 0:n.searchedString,windowId:l,showToolbar:!0,titleEditor:!1,view:"editor",linkPreview:!1})))},nn=400,en=300,on=e(91),cn=e(77),an=e(82),rn=(e(493),window._tiro_generatePluginsMarketplaceHtml?window._tiro_generatePluginsMarketplaceHtml:function(){}),ln=function(t){var n=Object(o.useState)([]),e=Object(c.a)(n,2),i=e[0],r=e[1],l=Object(o.useState)(""),s=Object(c.a)(l,2),u=s[0],p=s[1];return Object(o.useEffect)((function(){Object(j.d)((function(t){t.plugins.marketplace.fetchList((function(t){r(t);var n=rn({pluginsDescriptions:t,fullDisplayMode:!0,onPluginClick:function(t){console.log("pluginClick",t)},onSettingChange:function(t){console.log("onSettingChange",t)}});p(n)}))}))}),[]),Object(a.c)("div",{className:"plugins-marketplace-popup-wrapper"},Object(a.c)(tt.a,{title:"Plugins Marketplace",onClose:function(){t.onClose()}},i.length>0&&Object(a.c)("div",{id:"plugin-marketplace-placeholder",dangerouslySetInnerHTML:{__html:u}}),0===i.length&&Object(a.c)("div",{className:"plugins-list-loading"},"Contacting Marketplace...")))},sn=e(119),un=e(309),pn=e(98),dn=e.n(pn),fn=e(62),bn=15,gn=!1,hn=function(){if(gn)return bn;var t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",document.body.appendChild(t);var n=document.createElement("div");return t.appendChild(n),bn=t.offsetWidth-n.offsetWidth,t.parentNode.removeChild(t),gn=!0,bn},mn=function(t){var n=Object(o.useRef)(t.panel);Object(o.useEffect)((function(){n.current=t.panel}),[t.panel]);var e=function(n){t.onPanelUpdate&&Object(j.d)((function(t){t.ui.floatingPanel.update(n)}))},i=Object(o.useState)(!1),r=Object(c.a)(i,2),l=r[0],u=r[1],p=function(t){u(t)},d=Object(o.useState)(!1),f=Object(c.a)(d,2),g=f[0],h=f[1],m=function(){N(),h(!0),t.onPanelDragStart()},v=function(){h(!1),t.onPanelDragEnd()},w=Object(o.useState)(t.panel),O=Object(c.a)(w,2),x=O[0],k=O[1],_=Object(jt.a)((function(){v()}),500),C=t.panel.size.height;t.panel.ctagConfig&&(t.panel.ctagConfig.opts||(t.panel.ctagConfig.opts={}),t.panel.ctagConfig.opts.wrapperHeight="100%",t.panel.ctagConfig.opts.sandboxed=!1);var E=Object(o.useState)(!0),S=Object(c.a)(E,2),T=S[0],I=S[1],N=function(){t.highestVisibleZIndex!==t.panel.zIndex&&Object(j.d)((function(n){n.ui.floatingPanel.pushWindowOnTop(t.panel.id)}))},P=l&&t.panelsVisibleNumber>1&&t.highestVisibleZIndex!==t.panel.zIndex,R=Object(o.useState)(Object(xt.a)()),A=Object(c.a)(R,2),F=A[0];A[1];return t.panel.ctagConfig&&(t.panel.ctagConfig.opts||(t.panel.ctagConfig.opts={}),t.panel.ctagConfig.opts.windowId=F),Object(a.c)("div",{className:"floating-panel-wrapper ".concat(t.panel.status),style:{zIndex:t.panel.zIndex},key:t.panel.id,onMouseDown:function(){N()}},Object(a.c)(dn.a,{cancel:"body",handle:".handle",position:t.panel.position,scale:1,onStart:function(n,o){N(),m(),e(Object(s.a)(Object(s.a)({},t.panel),{},{position:{x:o.x,y:o.y}}))},onDrag:function(n,o){e(Object(s.a)(Object(s.a)({},t.panel),{},{position:{x:o.x,y:o.y}}))},onStop:function(n,o){v(),e(Object(s.a)(Object(s.a)({},t.panel),{},{position:{x:o.x,y:o.y}}))}},Object(a.c)(un.a,{boundsByDirection:!0,className:"floating-panel",size:t.panel.size,onResize:function(n,o,i,c){e(Object(s.a)(Object(s.a)({},t.panel),{},{size:{width:i.offsetWidth,height:i.offsetHeight}})),m(),_()}},Object(a.c)("div",{className:"floating-panel__wrapper"},Object(a.c)("div",{className:"floating-panel__actions"},Object(a.c)(b.a,{class:"floating-bar-toolbar",size:1,buttons:[{title:"Move Window",customHtml:Object(a.c)("div",{className:"handle"},Object(a.c)(y.b,{name:"grip-vertical"})),action:function(){}},{title:"Minimize",icon:"window-minimize",action:function(){e(Object(s.a)(Object(s.a)({},t.panel),{},{status:"minimized",zIndex:1e3}))}},{title:"Maximize",icon:"expand",action:function(){var n=t.panel;n.size.width===window.innerWidth&&n.size.height===window.innerHeight&&0===n.position.x&&0===n.position.y?e(x):(k(n),e(Object(s.a)(Object(s.a)({},n),{},{size:{width:window.innerWidth,height:window.innerHeight},position:{x:0,y:0}})))}},{title:"Reload content",icon:"rotate-right",action:function(){I(!1),setTimeout((function(){I(!0)}),100)}},{title:"Close window",icon:"xmark",action:function(){Object(j.d)((function(n){n.ui.floatingPanel.delete(t.panel.id)}))}}]})),T&&Object(a.c)("div",{className:"floating-panel__content content-type-".concat(t.panel.type),style:{height:C},onMouseDown:function(){N()},onMouseEnter:function(){p(!0)},onMouseLeave:function(){p(!1)}},Object(a.c)("div",{className:"floating-panel__drag-overlay ".concat(g?"":"hide"," ").concat(P?"hover-mode":""),onMouseDown:function(){N(),p(!1)}}),"file"===t.panel.type&&t.panel.file&&Object(a.c)("div",{className:"floating-panel__inner-content"},Object(a.c)(_t,{file:t.panel.file,height:t.panel.size.height,view:t.panel.view||"editor",titleEditor:"disabled",onLayoutUpdate:function(t,o){"windowViewChange"===t&&null!==o&&void 0!==o&&o.view&&e(Object(s.a)(Object(s.a)({},n.current),{},{view:o.view}))}})),"ctag"===t.panel.type&&t.panel.ctagConfig&&Object(a.c)("div",{className:"floating-panel__inner-content window-id-sizeref-".concat(F),style:{height:C}},Object(fn.a)(t.panel.ctagConfig)))))))},vn=function(t){var n=t.panels,e=Object(o.useRef)([]);Object(o.useEffect)((function(){e.current=n}),[n]);var i=function(t){Object(j.d)((function(n){n.ui.floatingPanel.update(t)}))},r=Object(o.useState)(!1),l=Object(c.a)(r,2),s=l[0],u=l[1],p=function(t){return function(){u("start"===t)}},d=Object(o.useState)(!1),f=Object(c.a)(d,2),b=f[0],h=f[1];Object(o.useEffect)((function(){if(!b&&0!==e.current.length){h(!0);var t=Object(g.cloneDeep)(e.current);t.forEach((function(t){"minimized"===t.status&&(t.status="hidden")})),Object(j.d)((function(n){n.ui.floatingPanel.updateAll(t)}))}}),[n,b]);var m=Object(o.useState)([]),v=Object(c.a)(m,2),w=v[0],O=v[1],x=Object(o.useState)(0),k=Object(c.a)(x,2),_=k[0],C=k[1],E=Object(o.useState)(0),S=Object(c.a)(E,2),T=S[0],I=S[1],N=Object(jt.a)((function(){var t=0;n.forEach((function(n){void 0!==n.zIndex&&n.zIndex>t&&(t=n.zIndex)})),C(t),I(n.filter((function(t){return"visible"===t.status})).length);var o=Object(g.cloneDeep)(e.current),i=o.filter((function(t){return"minimized"===t.status})),c=o.filter((function(t){return"hidden"===t.status})),a=o.filter((function(t){return"visible"===t.status})),r=i.concat(c).concat(a);r=Object(g.sortBy)(r,(function(t){return t.orderPosition})),O(r)}),100);return Object(o.useEffect)((function(){N()}),[n]),Object(a.c)("div",{className:"floating-panels-wrapper",style:{pointerEvents:s?"all":"none"}},n.map((function(t){return"hidden"!==t.status&&Object(a.c)("div",{key:t.id},Object(a.c)(mn,{panel:t,onPanelUpdate:i,onPanelDragStart:p("start"),onPanelDragEnd:p("end"),panelsVisibleNumber:T,highestVisibleZIndex:_}))})),Object(a.c)("div",{className:"panels-minimized-bottom-bar-wrapper",style:{height:"".concat(35+hn(),"px"),bottom:"-".concat(hn(),"px")}},Object(a.c)("div",{className:"panels-minimized-bottom-bar-background ".concat(t.pinStatus?"pinned":"")}," "),Object(a.c)("div",{className:"bottom-hover-bar"}," "),Object(a.c)("div",{className:"panels-minimized-bottom-bar ".concat(t.pinStatus?"pinned":""),style:{width:"".concat(n.length>8?15*n.length:100,"%")}},Object(a.c)("div",{className:"floating-panels-bottom-toolbar"},Object(a.c)("div",{className:"btn-action reinit-position-and-size",onClick:function(){Object(j.d)((function(t){t.ui.floatingPanel.actionAll("organizeWindows")}))}},Object(a.c)(y.b,{name:"layer-group"})," "),Object(a.c)("div",{className:"btn-action pin-bar",onClick:function(){return t.onPinChange(!t.pinStatus)}}," ",Object(a.c)(y.b,{name:"thumbtack"})," ")),w.map((function(t){return"visible"!==t.status&&Object(a.c)("div",{key:t.id,className:"panel-minimized",onClick:function(n){!function(t){t.status="visible",i(t),Object(j.d)((function(n){n.ui.floatingPanel.pushWindowOnTop(t.id),n.ui.floatingPanel.updateOrderPosition(t.id,"first")}))}(t)}},Object(a.c)("div",{className:"label"},function(t){if(!t)return"";if("file"===t.type)return t.file.name;if("ctag"===t.type){var n,e;if("iframe"===(null===(n=t.ctagConfig)||void 0===n?void 0:n.tagName)){var o,i=null===(o=t.ctagConfig)||void 0===o?void 0:o.content;return Object(et.b)(i)}return"".concat(null===(e=t.ctagConfig)||void 0===e?void 0:e.tagName," | ").concat(t.file.name)}return""}(t)),"minimized"===t.status&&Object(a.c)("div",{className:"active-icon"},Object(a.c)(y.b,{name:"circle"})),Object(a.c)("div",{className:"close-btn",onClick:function(n){n.stopPropagation(),"minimized"===t.status?function(t){t.status="hidden",i(t)}(t):function(t){Object(j.d)((function(n){n.ui.floatingPanel.delete(t.id)}))}(t)}},Object(a.c)(y.b,{name:"xmark"})))})))))},wn=e(156),On=e(170),jn=(Object(r.a)(),Object(s.a)({},p.a)),xn=jn.els,kn=jn.colors,yn=(jn.font,jn.sizes),_n=Object(g.memoize)((function(t,n,e,o){return Cn(t,n,e,o)}),(function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return JSON.stringify(n)})),Cn=function(t,n,e,o){var i=Object(sn.a)("CssApp2"+t+n),c="\n\n\t\theight:100%;\n\t\t.main-wrapper,\n\t\t.mobile-view-container {\n\t\t\theight:100%;\n\t\t}\n\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// for preview css\n\t\t".concat(Object(on.d)(),"\n\t\t// FILE RESSOURCE PREVIEW\n\t\t").concat(Object(cn.b)(),"\n\t\t// PREVIEW LINK\n\t\t").concat(Object(Qt.b)(),"\n\t\t").concat(Object(an.e)(),"\n\n\n\t\t\n\t\t").concat(Object(On.a)(),"\n\t\t").concat("\n .mobile-view-preview {\n .page-link-preview-popup-int {\n .editor-area {\n display:block;\n }\n .preview-area-wrapper {\n display:none;\n }\n }\n }\n .page-link-preview-popup-ext {\n // pointer-events: none;\n position: absolute;\n z-index: 10001;\n .click-throught {\n cursor:pointer;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 30px;\n }\n .page-link-preview-popup-int {\n cursor:default;\n margin-top: 20px;\n background: white;\n width: ".concat(nn,"px;\n height: ").concat(en,"px;\n border-radius: 10px;\n box-shadow: 0px 0px 3px 1px rgba(0,0,0,0.1);\n overflow-y:hidden;\n overflow-x:hidden;\n .cm-scroller {\n width: calc(100% - 40px)!important;\n }\n\n // disable links inside\n .title-search-link {\n pointer-events: none;\n }\n }\n .\n }\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.draggable-grid-editors-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.draggable-grid-editors-view {\n \n }\n .right-wrapper.image-gallery-view {\n display: none;\n }\n }\n"),"\n\t\t").concat("\n.notifications-center-wrapper {\n\t\tposition: fixed;\n\t\ttop: 0px;\n\t\tright: 0px;\n\t\tz-index: 2000;\n\n\t\t.notifications-list {\n\t\t\t\t.notif-wrapper {\n\t\t\t\t\t\t// background: ".concat(p.a.colors.main,"; \n\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tmargin: 5px;\n\n\n\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px #0006;\n\t\t\t\t\t\t.notif-close {\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\ttop: 3px;\n\t\t\t\t\t\t\t\tright: 5px;\n\t\t\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.notif-content {\n\t\t\t\t\t\t\t\tpadding: 5px 29px 5px 5px;\n\t\t\t\t\t\t\t\tmax-width: 190px;\n\t\t\t\t\t\t\t\tmax-height: 180px;\n\t\t\t\t\t\t\t\toverflow-y: auto;\n\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n"),"\n\t\t").concat(Object(vt.a)(),"\n\t\t").concat("\n.lightbox-component {\n position: fixed;\n\t\tz-index: 1500;\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 {\n\t\t\t\t\ttop: 3px;\n\t\t\t\t\tleft: 25px;\n\t\t\t\t}\n\t\t\t\t.dezoom {\n\t\t\t\t\ttop: 3px;\n\t\t\t\t\tleft: 8px;\n\t\t\t\t}\n\t\t\t\t.zoom, .dezoom {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\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.omnibar-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.omnibar-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: 10000;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.omnibar-popup-wrapper {\n\t\t\t\t\t\t\t\t&.locked {\n\t\t\t\t\t\t\t\t\tpointer-events:none;\n\t\t\t\t\t\t\t\t}\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\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t.search-location {\n\t\t\t\t\t\t\t\t\tcolor: #b3b1b1;\n\t\t\t\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.folder {\n\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.file {\n\t\t\t\t\t\t\t\t\tfont-weight: bold;\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&.device-desktop .actions {\n\t\t\t\t\t\t\t\ttransition: all 0.2s;\n\t\t\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\t\t\t.action {\n\t\t\t\t\t\t\t\t\tmargin-left: 8px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t&.device-desktop:hover .actions {\n\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.actions {\n\t\t\t\t\t\t\t\tdisplay:flex;\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: 0px;\n\t\t\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\t.action {\n\t\t\t\t\t\t\t\t\ttransition: all 0.2s;\n\t\t\t\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\topacity: 1;\n\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}\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\t\t").concat("\n.device-view-mobile {\n\t.plugins-marketplace-popup-wrapper .popup-wrapper .popupContent {\n\t\twidth: 80vw;\n\t}\n}\n\n.plugins-list-loading {\n\tpadding: 60px;\n}\n\n.plugins-marketplace-popup-wrapper .popup-wrapper .popupContent {\n padding: 0px 20px;\n\twidth: 50vw;\n\tmin-height: 50vh;\n\tmax-height: 70vh;\n\toverflow-y: scroll;\n}\n\n\n","\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\t&.preview {\n\t\t\tpadding: 15px ;\n\t\t}\n\n\t\t\n\n\t\t".concat(Object(f.b)(),"\n\t\t").concat(Object(mt.b)(),"\n\n\t\t.preview-area-wrapper {\n\t\t\theight: calc(100% - 0px);\n\t\t\tmargin-top: 0px;\n\t\t}\n\n\t\t.preview-area {\n\t\t\twidth: calc(100%);\n\t\t\t// padding: 15px;\n\t\t}\n\n\t\t// .note-preview-wrapper .preview-area-wrapper\n\t\t//\n\t\t// PREVIEW\n\t\t//\n\t\t\n\t\t\n\t\t\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\t// height: 100%!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\n\n\t\t//\n\t\t// EDITOR VIEW\n\t\t//\n\n\t\t&.editor,\n\t\t.window-editor-wrapper,\n\t\t.dual-view-wrapper,\n\t\t.editor-area,\n\t\t.main-editor-wrapper,\n\t\t.codemirror-editor-wrapper {height: 100%}\n\n\n}\n"),"\n\t\t").concat(Object(Yt.b)(),"\n\n\t\t").concat(Object(tt.b)(),"\n\t\t").concat(Object(Gt.b)(e),"\n\t\t").concat(Object($t.b)(),"\n\t\t").concat(Object(wn.b)(),"\n\n\t\t").concat("\n\n//\n// PANEL\n//\n// resizing handles\n.floating-panel__wrapper + div > div { z-index: 100000;}\n\n.floating-panels-wrapper {\n \n \n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n pointer-events: none;\n .floating-panel-wrapper {\n &.minimized {\n display:none;\n }\n position: absolute;\n top: 0px;\n left: 0px;\n .floating-panel {\n overflow: hidden;\n background: #fff;\n border: 1px solid #000;\n border-radius: 4px;\n box-shadow: 0 0 4px rgba(0,0,0,0.3);\n z-index: 1000;\n pointer-events: all;\n .floating-panel__drag-overlay {\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n background: rgba(255,255,255,0.5);\n z-index: 100;\n opacity: 0.5;\n transition: 0.1s opacity;\n &.hide {\n opacity: 0;\n pointer-events: none;\n }\n &.hover-mode {\n opacity: 0.5;\n pointer-events: all;\n }\n }\n .floating-panel__actions {\n position: absolute;\n top: 4px;\n transition: 0.5s all;\n right: 40px;\n z-index:102;\n padding: 4px;\n &:hover {\n background: white;\n padding: 4px;\n box-shadow: 0px 0px 4px rgba(0,0,0,0.3);\n border-radius: 4px;\n }\n }\n .floating-panel__content {\n // overflow-y: auto;\n // overflow: hidden;\n position: absolute;\n top:0px;\n left: 0px;\n width: 100%;\n overflow: hidden;\n &.content-type-file {\n }\n }\n }\n }\n \n \n}\n\n\n//\n// BAR\n//\n.panels-minimized-bottom-bar-wrapper {\n position: absolute;\n left: left: 18px;\n width: 100vw;\n overflow: hidden;\n overflow-x: scroll;\n pointer-events: none;\n\n .panels-minimized-bottom-bar-background {\n &.pinned {\n bottom: 0px;\n }\n transition: all 0.3s ease-in-out 0.5s;\n position: fixed;\n left: 0px;\n width: 100%;\n height: 30px;\n background: #fff;\n z-index: 11;\n pointer-events: all;\n bottom: -30px;\n }\n\n .bottom-hover-bar {\n pointer-events: all;\n cursor: pointer;\n position: absolute;\n width: 150vw;\n height: 15px;\n bottom: 0px;\n box-shadow: 0 0 0px rgba(0,0,0,0.3);\n z-index: 10;\n transition: 0.5s all;\n opacity: 0;\n }\n \n &:hover {\n .panels-minimized-bottom-bar-background {\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n bottom: 0px;\n }\n .panels-minimized-bottom-bar {\n bottom: 0px;\n \n }\n .bottom-hover-bar {\n box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n background: ".concat(p.a.colors.main,";\n opacity: 0.5;\n }\n }\n\n .panels-minimized-bottom-bar{\n z-index: 11;\n pointer-events: all;\n left: 18px;\n\n // transition: all 0.3s ease-in-out 0.5s, box-shadow 0.5s ease-in-out 0s;\n transition: all 0.3s ease-in-out 0.5s;\n \n position: absolute;\n width: 100%;\n bottom: -30px;\n &.pinned {\n bottom: 0px;\n }\n height: 30px;\n background: #fff;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n .floating-panels-bottom-toolbar {\n \n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n margin-left: 10px;\n .floating-bar-toolbar {\n }\n .btn-action {\n padding: 5px;\n margin: 0px 5px;\n cursor: pointer;\n transition: 0.3s all;\n &:hover {\n background: #f0f0f0;\n }\n }\n }\n }\n}\n\n\n.panel-minimized {\n background: #c9c9c9;\n margin: 0px 0px 0px 4px;\n border-radius: 7px;\n height: 24px;\n width: 5vw;\n display: flex;\n font-size:10px;\n overflow: hidden;\n align-content: center;\n justify-content: space-around;\n padding: 0 10px;\n cursor: pointer;\n transition: 0.5s all;\n position: relative;\n :hover {\n background: #f0f0f0;\n }\n .label {\n margin-top: 5px;\n height: 14px;\n overflow: hidden;\n }\n .active-icon {\n color: rgb(121, 121, 121);\n margin: 6px 6px 0px 6px;\n\n }\n .close-btn {\n paddding: 5px;\n margin-top: 6px;\n cursor: pointer;\n }\n}\n\n//\n// Modifying style of the note preview\n//\n.floating-panel__wrapper .note-preview-wrapper .cm-mdpreview-wrapper .cm-mdpreview-image img {\n\tmax-height: none;\n}\n.floating-panel__wrapper .note-preview-wrapper.preview {\n padding: 0px\n}\n\n\n.content-block.block-tag {\n left: 0px;\n width: calc(100%)\n}\n\n"),"\n\n\t\t").concat(Object(kt.b)(),"\n\t\t").concat(Object(f.b)(),"\n\t\t").concat(Object(d.c)(t),"\n\t\t").concat(Object(mt.b)(),"\n\t\t").concat(Object(ft.b)(),"\n\t\t").concat(Object(bt.b)(),"\n\n\t\t").concat(Object(Xt.b)(t,o),"\n\n\t\t.draggable-grid-editors-view {\n\t\t\twidth: ").concat("desktop"===Object(r.a)()?p.a.sizes.desktop.r:"navigator"!==t?100:0,"vw;\n\t\t\theight: ").concat("desktop"===Object(r.a)()?"calc(100vh - ".concat(o.bottomBar?"30":"10","px)"):"100%",";\n\t\t\tdisplay: ").concat("desktop"===Object(r.a)()||"navigator"!==t?"block":"none",";\n\t\t\tpadding-top: 0px;\n\t\t\th3 {\n\t\t\t\tmargin-bottom: 0px;\n\t\t\t}\n\t\t\tpre {\n\t\t\t\t\twhite-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */\n\t\t\t\t\twhite-space: -pre-wrap; /* Opera */\n\t\t\t\t\twhite-space: -o-pre-wrap; /* Opera */\n\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\tword-wrap: break-word; /* IE 5.5+ */\n\t\t\t}\n\t\t}\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\t.loading {\n\t\t\tmargin-left: 30px;\n\t\t\tfont-size: 12px;\n\t\t\tfont-weight: 400;\n\t\t}\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.config-buttons-bar {\n\t\t\t\t\t\t\t\tbottom: 60px;\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t.config-buttons-bar {\n\t\t\t\t\tposition: fixed;\n\t\t\t\t\tbottom: 10px;\n\t\t\t\t\tleft: 3px;\n\t\t\t\t\tz-index: 11;\n\n\t\t\t\t\t.config-button {\n\t\t\t\t\t\t// margin-top: 10px;\n\t\t\t\t\t\topacity: 0.6;\n\t\t\t\t\t\ttransition: 0.2s all; \n\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t.plugins-marketplace-button {\n\n\t\t\t\t\t}\n\t\t\t\t\t.settings-button {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t \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(yn.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(kn.l2.bg,"; \n\t\t\t\t\t\twidth: ").concat("desktop"===Object(r.a)()?yn.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(yn.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(kn.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(yn.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(yn.search.padding,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(yn.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(yn.block,"px ").concat(yn.block,"px ").concat(yn.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(kn.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(kn.l2.text,";\n\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(kn.l2.text,";\n\t\t\t\t\t\t\t\t\t\t").concat(xn().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(yn.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(K.l2.fileLi.padding,"px ").concat(K.block-K.l2.fileLi.margin,"px;\n margin: ").concat(K.l2.fileLi.margin,"px ").concat(K.l2.fileLi.margin+5,"px ").concat(K.l2.fileLi.margin,"px ").concat(K.l2.fileLi.margin,"px ;\n display: block;\n cursor: pointer;\n position: relative;\n height: ").concat(K.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(K.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(K.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(K.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(kn.l2.bg,"; \n\t\t\t\t\t\t.image-gallery-header {\n\t\t\t\t\t\t\t\tpadding-top: ").concat(yn.search.padding,"px;\n\t\t\t\t\t\t\t\theight: ").concat(yn.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////////////////////////////////////////////v \n\t\t\t\t").concat("\n\n.tab-list-wrapper-hover {\n\t.top-hover-bar {\n\t\tcursor: pointer;\n\t\theight: 14px;\n\t\twidth: 100%;\n\t\tposition: absolute;\n\t\topacity: 0;\n\t\ttransition: 0.5s all;\n\t}\n\t&:hover {\n\t\t.top-hover-bar {\n\t\t\tbackground: ".concat(p.a.colors.main,";\n\t\t\topacity: 0.5;\n\t\t}\n\t}\n\ttransition: 0.5s all;\n\tposition: absolute;\n z-index: 22;\n\twidth: 100%;\n\t&.pinned {\n\t\tposition: initial;\n\t\t.top-hover-bar { display:none}\n\t}\n\t&.unpinned {\n\t\t.tab-list-scroll-wrapper {\n\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,0.3);\n\t\t}\n\t}\n\t&:hover {\n\t\t.tab-list-scroll-wrapper {\n\t\t\ttop: 0px!important;\n\t\t}\n\t}\n}\n\n.tab-list-scroll-wrapper {\n\t\n\tposition: absolute;\n\theight: 44px;\n\twidth: 100%;\n\ttransition: all 0.3s ease-in-out;\n\ttransition-delay: 500ms, 0ms;\n\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)(o),"\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.draggable-grid-editors-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\t\t\t\t\n\t\t} // end main-wrapper\n\n\n\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 i(),Object(u.a)(c,";","")},En=function(t){return t.path.substr(0,t.path.length-(t.title.length+1))},Sn=function(t){var n=t.split("/");(n=n.filter((function(t){return""!==t}))).pop();var e="/"+n.join("/")+"/";return e=e.replaceAll("//","/")},Tn="\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",In=function(t,n,e,o){var i=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:i,promptAndBatchMoveFiles:function(n){var e=n.files,o=n.folderToDropInto,c="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(Tn,"\n");Object(j.d)((function(n){n.popup.confirm(c,(function(){!function(){for(var n=0;n<e.length;n++){var c=e[n],a="".concat(c.path),r="".concat(o.key,"/").concat(c.name);i(a,r),t()}}()}))}))},promptAndMoveFolder:function(e){var o=Object(s.a)({},e),i=o.folder,c=o.folderToDropInto,a=o.folderBasePath,r=o.newTitle,l=o.renameOnly,u=[i.path,"".concat(l?En(c):c.path,"/").concat(r||i.title)],p="".concat(a,"/").concat(u[0]),d="".concat(a,"/").concat(u[1]),f="\n".concat(_.a.moveFolderPrompt," <p>").concat(u[0],"</p> to <p>").concat(u[1],"</p>?\n").concat(Tn,"\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()}))}))}}},Nn=e(157),Pn="[LAST FILE]",Rn=w.a.client.log.verbose,An=e(162),Fn=e(175),Ln=e(89),Dn=function(t){var n=Object(o.useState)({}),e=Object(c.a)(n,2),i=e[0],r=e[1];Object(o.useEffect)((function(){}),[t.files]);var l=Object(o.useReducer)((function(t){return t+1}),0),s=Object(c.a)(l,2)[1],u=Object(o.useState)(2),d=Object(c.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>=U.a.length?0:f+1;Object(j.d)((function(e){e.userSettings.set("ui_filesList_sortMode",n),b(n),t.onSortFiles(Object(U.d)(t.files,n))}))}},Object(a.c)("span",null,t.files.length>0&&Object(a.c)("span",{className:"list-count"},"(",t.files.length,")"),U.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:i,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 c=t[o];i[c]&&!n||e.push(c)}e.length>1&&Object(j.d)((function(t){t.files.getPreviews(e,(function(t){Object(g.each)(t,(function(t){i[t.path]=t})),r(i),s()}))}))}(t,!0)}})))},Mn=e(100),zn="[PWA]",Bn=w.a.client.log.verbose,Un=e(124),Hn=e(29),Wn=function(){var t=[];return window.speechSynthesis.getVoices().forEach((function(n,e){var o=n.lang?" (".concat(n.lang,")"):"",i="".concat(n.name).concat(o);t.push({key:e,label:i,obj:n})})),t},qn=Object(T.a)((function t(n){var e=this;Object(S.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=[],i=0;i<n.length;i++){var c=n[i];if(c.length>e.chunkLength)for(var a=c.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(c)}return o},this.loadVoice=function(t){console.log("[TTS] LOAD VOICE",t),e.voice=t,e.pause(),e.play()},this.updateSpeed=function(t){e.speed=t,e.pause(),e.play()},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 i=-1;return Object(g.each)(e.chunkedText,(function(t,n){if(-1!==t.indexOf(o))return i=n,!1})),i},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(Hn.a.ressource,"").replace(Hn.a.ref,"").replace(Hn.a.baliseHtml,"").replace(/<[^>]*>?/gm," ").replace(/((<!--).+?(-->))/gm," ").replace(/(<!--).+?(-->)/gm," ").replace(/(\r\n|\n|\r)/gm," ").replace(/(\r\n|\n|\r)/gm," "),this.chunkedText=this.chunkText(this.text2read),console.log("[TTS] init new manager ",{p:n,text:this.chunkedText,length:this.chunkedText.length})})),Vn=e(32),Kn=e(50),Jn="[SCREEN WAKE LOCK]",Gn=null,Yn=function(){var t=Object(Kn.a)(Object(Vn.a)().mark((function t(){return Object(Vn.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:Gn=t.sent,console.log(Jn,"ACTIVE"),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(Jn,"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 $n=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),i=e[0],l=e[1],s=Object(h.a)("tts-selected-voice",0),u=Object(c.a)(s,2),p=u[0],d=u[1],f=Object(o.useState)(!1),b=Object(c.a)(f,2),g=b[0],m=b[1],v=function(t){!0===t?Yn():Gn&&Gn.release().then((function(){Gn=null,console.log(Jn,"DISABLED")})),m(t)},w=Object(h.a)("tts-pos-".concat(t.id),0),O=Object(c.a)(w,2),j=O[0],k=O[1],C=Object(h.a)("tts-rate",1),E=Object(c.a)(C,2),S=E[0],T=E[1],I=Object(o.useState)(0),N=Object(c.a)(I,2),P=N[0],R=N[1],A=Object(o.useState)(""),F=Object(c.a)(A,2),L=F[0],D=F[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*(P-j)/(60*S)),e=t(6*P/(60*S)),o=" ".concat(n," left of ").concat(e);D(o)}),[P,S,j]);var M=Object(o.useRef)();window.tts=M,Object(o.useEffect)((function(){M.current=new qn({text:t.fileContent}),M.current.goToChunk(j)}),[]),Object(o.useEffect)((function(){M.current.updateSpeed(S)}),[S]);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:P,currentChunk:j,isPlaying:i,currentText:n})}),[P,j,i]),Object(a.c)(Zn,null,Object(a.c)(tt.a,{title:"".concat(_.a.ttsPopup.title),onClose:function(){M.current.stop(),t.onUpdate({totalChunks:P,currentChunk:j,isPlaying:!1}),t.onClose()}},Object(a.c)(Q.a,{value:p,type:"select",list:Wn(),label:_.a.ttsPopup.voice,onSelectChange:function(t){!function(t){d(t);var n=Wn();n[p]&&M.current.loadVoice(n[p].obj)}(parseInt(t))}}),Object(a.c)("span",null," SPEED : "),Object(a.c)("input",{className:"speed-range",type:"range",value:S,min:"0",max:"3",step:"0.1",onChange:function(t){var n=t.target.value;T(n)}})," (",S,")",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:P,onChange:function(t){var n=parseInt(t.target.value);M.current.goToChunk(n),k(n)}})," / ",P,Object(a.c)("br",null),Object(a.c)("input",{type:"range",value:j,className:"range-pos",min:"0",max:P,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){i||M.current.goToChunk(j),i?M.current.stop():M.current.play()}},Object(a.c)(y.a,{name:i?"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"}))))},Zn=Object(Un.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;}}"}),Xn=(e(134),e(103)),Qn=function(t,n){Xn&&Xn.bind&&Xn.bind(t,n)},te=e(36),ne=e(173),ee=e(118);Object(ee.b)(Object(a.c)((function(){Object(o.useEffect)((function(){return setTimeout((function(){console.log(Nt,"starting frontendBackgroundPlugins Cron"),setInterval((function(){At()}),6e4)}),Object(g.random)(1e3,1e4)),Bn&&console.log(zn," init"),"serviceWorker"in navigator&&navigator.serviceWorker.register("/service-worker.js"),window.addEventListener("beforeinstallprompt",(function(t){t.preventDefault(),Bn&&console.log(zn," beforeinstallprompt WORKING=>",t),window.deferredPrompt=t})),console.log("========= [APP] MOUNTED on a ".concat(Object(r.a)())),Object(l.d)().then((function(t){V(!0),Rt&&Rt.status.ipsServer.set(t.ipsServer),Object(j.d)((function(t){t.ui.browser.folders.refreshFromBackend()}))})),t(),window.onkeydown=function(t){var n=z(t);Object(g.isNull)(D[n])||(D[n]=!0);var e="".concat(n,"-down");B[e]&&B[e]()},window.onkeyup=function(t){var n=z(t);Object(g.isNull)(D[n])||(D[n]=!1);var e="".concat(n,"-up");B[e]&&B[e]()},Object(It.a)("init","init",(function(){})),function(){console.log("app will unmount")}}),[]);var t=function(){setTimeout((function(){Object(et.d)(on)}),300)},n=function(){Lt.active.set(-1)},e=function(){Pt.ui.browser.files.set([])},u=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),r=e[0],s=e[1],u=Object(o.useState)(""),p=Object(c.a)(u,2),d=p[0],f=p[1],b=Object(o.useState)(""),g=Object(c.a)(b,2),h=g[0],m=g[1],v=Object(o.useState)(""),O=Object(c.a)(v,2),j=O[0],x=O[1],k=Object(o.useState)(),y=Object(c.a)(k,2),C=y[0],E=y[1],S="[SETUP CONFIG]",T=w.a.client.log.verbose,I=Object(o.useRef)(0);return Object(o.useEffect)((function(){return T&&console.log(S," init socket listener"),I.current=l.b.on("getSetupInfos",(function(n){"SUCCESS_CONFIG_CREATION"===n.code?(E(["success","".concat(_.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(){T&&console.log(S," clean socket listener"),l.b.off(I.current)}}),[]),{displayWelcomePopup:r,SetupPopupComponent:function(t){return Object(a.c)(i.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,_.a.setupForm.introText)," ",Object(a.c)("br",null),Object(a.c)("div",null,Object(a.c)(Q.a,{value:d,label:_.a.setupForm.user,explanation:_.a.setupForm.userExplanation,onChange:function(t){f(t)},shouldNotSelectOnClick:!0}),Object(a.c)(Q.a,{value:h,label:_.a.setupForm.password,type:"password",explanation:_.a.setupForm.passwordExplanation,onChange:function(t){m(t)},shouldNotSelectOnClick:!0}),Object(a.c)(Q.a,{value:j,label:_.a.setupForm.dataFolder,explanation:_.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)()})}}),C&&Object(a.c)("div",{className:C[0]},C[1])))))}}}({cleanAllApp:function(){console.log("[cleanAllApp]"),Wt(),zt(),n(),e()}}),d=u.SetupPopupComponent,f=Object(L.d)({onLoginAsked:function(){console.log("[cleanListAndFileContent]"),n(),e()},onLoginSuccess:function(){S(),kn(),qt(),Object(j.d)((function(t){t.userSettings.refreshUserSettingsFromBackend(),t.ui.floatingPanel.refreshFromBackend()})),Object(j.d)((function(t){t.ui.browser.folders.refreshFromBackend()})),Mt(["/"]),t()}}),h=f.LoginPopupComponent,m=Object(An.b)(),O=m.tabs,C=m.updateTab,S=m.refreshTabsFromBackend,T=m.updateActiveTabGrid,I=m.refreshWindowGrid,N=m.tabsApi,P=m.windowsApi,R=N.active.get(),A=at(),F=A.PromptPopupComponent,M=A.popupApi,H=function(){Object(o.useRef)([]);var t=Object(o.useState)(!1),n=Object(c.a)(t,2),e=n[0],i=n[1],l=Object(o.useState)(!1),s=Object(c.a)(l,2),u=s[0],p=s[1],d="(DISCONNECTED)",f=Object(o.useRef)(d);x((function(){f.current=f.current===d?"(/!\\ DISCONNECTED /!\\)":d;var t=e?"".concat(k()," (Connected)"):"".concat(k()," ").concat(f.current);"mobile"!==Object(r.a)()&&(document.title=t)}),1e3),Object(o.useEffect)((function(){Object(j.d)((function(t){t.watch.appStatus((function(t){!1===t.isConnected?b(!1):!0===t.isConnected&&(b(!0),p(!0),setTimeout((function(){p(!1)}),1e3))}))}))}),[]);var b=function(t){w.a.client.log.verbose&&console.log("[SOCKET CONNECTION TOGGLE] to ".concat(t)),i(t)};return{isConnected:e,connectionStatusComponent:function(){var t=["connected","connected"];return u&&(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:b}}(),W=H.isConnected,q=H.connectionStatusComponent,V=H.toggleSocketConnection,K=function(){var t=Object(o.useState)(!1),n=Object(c.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(0),r=Object(c.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),i(!0),setTimeout((function(){i(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[]),{forceResponsiveRender:e,frr:u,responsiveRefreshCounter:l,setResponsiveRefresh:s}}(),J=K.forceResponsiveRender,G=K.responsiveRefreshCounter,$=K.setResponsiveRefresh,Z=Object(o.useRef)([]),ot=Object(o.useState)(null),ct=Object(c.a)(ot,2),rt=ct[0],lt=ct[1];Object(o.useEffect)((function(){setTimeout((function(){}),2e3)}),[]);var ut=Object(Ln.b)(),pt=ut.lightboxApi,dt=ut.lightboxImages,ft=ut.lightboxIndex,bt=function(){var t=Object(o.useState)(!1),n=Object(c.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(null),r=Object(c.a)(a,2),l=r[0],s=r[1],u=Object(o.useState)(null),p=Object(c.a)(u,2),d=p[0],f=p[1],b=Object(o.useState)(""),g=Object(c.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),i(!0)},close:function(){i(!1)},getStatus:function(cb){v.current&&cb(v.current)}},ttsPopupContent:h,ttsPopupId:l,ttsPos:d,setTtsPopup:i,ttsPopup:e,syncTtsStatus:function(t){v.current=t}}}(),gt=bt.ttsApi,mt=bt.ttsPos,vt=bt.ttsPopup,wt=bt.setTtsPopup,Ot=bt.ttsPopupContent,xt=bt.ttsPopupId,kt=bt.syncTtsStatus,yt=function(t){var n=Object(o.useState)(!1),e=Object(c.a)(n,2),i=e[0],a=e[1],r=Object(o.useState)([]),l=Object(c.a)(r,2),u=l[0],p=l[1];return{isConnected:t.isConnected,searching:{get:i,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:W,refresh:{get:G,set:$}}),_t=function(){var t="[NOTE HISTORY] ",n=w.a.client.log.verbose,e=Object(o.useRef)({}),i=function(){return(new Date).getTime()},c=function(e,o,i){n&&console.log("".concat(t," saveNoteHistory ").concat(e)),l.b.emit("createHistoryFile",{filePath:e,content:o,historyFileType:i,token:Object(L.b)()})};return{save:c,intervalSave:function(o,a){var r=e.current[o];(!r||r&&r+6e4<i())&&(n&&console.log("".concat(t," ").concat(o,", time ").concat(1," expired/inexistand, PROCEED BACKUP")),c(o,a,"int"),e.current[o]=i())}}}(),Ct=function(){var t=Object(o.useState)(null),n=Object(c.a)(t,2),e=n[0],i=n[1];return{notePreviewPopupApi:{open:function(t,n,e){var o=n[0],c=n[1];nn+o>window.innerWidth&&(o-=Math.abs(window.innerWidth-nn-o-10)),en+c>window.innerHeight&&(c-=Math.abs(window.innerHeight-en-c-10)),"50%"===o&&(o="calc(50% - ".concat(nn/2,"px)")),"50%"===c&&(c="calc(50% - ".concat(nn/2,"px)")),i({isOpen:!0,filepath:t,position:n=[o,c],opts:e})},close:function(){i(null)}},notePreviewPopup:e,setNotePreviewPopup:i}}(),Et=Ct.notePreviewPopupApi,Tt=Ct.notePreviewPopup,Pt=Object(j.f)({popupApi:M,tabsApi:N,windowsApi:P,statusApi:yt,historyApi:_t,notePreviewPopupApi:Et,lightboxApi:pt,ttsApi:gt}),Rt=Pt,Lt=Rt.ui.browser.files,Dt=Rt.ui.browser.folders,Mt=Dt.scan,zt=Dt.clean,Bt=Dt.base,Ut=function(t){var n=Object(St.a)("files-history",[]),e=Object(c.a)(n,3),a=e[0],r=e[1],l=e[2],s=i.a.useRef(a);Object(o.useEffect)((function(){s.current=a}),[a]),Object(o.useEffect)((function(){Rn&&console.log(Pn," activeFile changed!",t),t&&u(t)}),[t]);var u=function(t){Rn&&console.log(Pn,"Add to history",t.name);var n=s.current;if(!(n.length>0&&n[0].name===t.name)){for(var e=!0,o=-1,i=n,c=0;c<n.length;c++)n[c].name===t.name&&(e=!1,o=c);e||i.splice(o,1),(i=i.slice(0,400)).unshift(t),r(i)}},p=Object(jt.a)(u,300),d={getAll:function(){return a},removeFile:function(t){console.log("".concat(Pn," removing ").concat(t," from last notes"));var n=Object(g.cloneDeep)(a);n=n.filter((function(n){return n.path!==t})),r(n)},addToHistory:function(t){arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?u(t):p(t)}};return{filesHistory:a,filesHistoryRef:s,cleanLastFilesHistory:function(){r([])},refreshFilesHistoryFromBackend:l,lastFilesHistoryApi:d}}(Lt.active.get),Ht=Ut.filesHistory,Wt=(Ut.filesHistoryRef,Ut.cleanLastFilesHistory),qt=Ut.refreshFilesHistoryFromBackend,Kt=Ut.lastFilesHistoryApi;Rt.lastNotesApi=Kt;var Gt=In(n,e),Yt=(Gt.askForMoveFile,Gt.promptAndMoveFolder),$t=Gt.promptAndBatchMoveFiles,Xt=function(){var t=Object(o.useState)("navigator"),n=Object(c.a)(t,2),e=n[0],l=n[1];return{mobileView:e,setMobileView:l,MobileToolbarComponent:function(t){return v(Object(a.c)(i.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])}}}(),Qt=Xt.mobileView,on=Xt.setMobileView,cn=Xt.MobileToolbarComponent;window.api=Rt;var an=Object(o.useState)(!1),rn=Object(c.a)(an,2),sn=rn[0],un=rn[1],pn=Object(o.useState)(!1),dn=Object(c.a)(pn,2),fn=dn[0],bn=dn[1];Object(o.useEffect)((function(){return Qn("alt + spacebar",(function(){un(!0),bn(!0)})),Qn("esc",(function(){un(!1)})),function(){Xn&&Xn.bind&&Xn.releaseAllKeys()}}),[Ht]),Object(o.useEffect)((function(){if("mobile"!==Object(r.a)())return Object(ne.a)("/favicon.png");Object(et.e)(O,Qt)}),[O,Qt]);var gn=J?0:1,hn=Rt.userSettings.refresh.css.get+gn,mn=Rt.userSettings,wn=function(){var t=Object(St.a)("interface-pin-element-status",{topTab:!1,bottomBar:!1}),n=Object(c.a)(t,3),e=n[0],i=n[1],a=n[2];return Object(o.useEffect)((function(){a()}),[]),{pinStatus:e,updatePinStatus:function(t){return function(n){i(Object(s.a)(Object(s.a)({},e),{},Object(te.a)({},t,n)))}},togglePinStatus:function(t){return function(){console.log(222222),i(Object(s.a)(Object(s.a)({},e),{},Object(te.a)({},t,!e[t])))}},refreshPinStatus:a}}(),On=wn.pinStatus,jn=wn.updatePinStatus,xn=wn.togglePinStatus,kn=wn.refreshPinStatus;return Object(a.c)("div",{className:_n(Qt,hn,mn,On)},Object(a.c)("div",{className:" ".concat("mobile"===Object(r.a)()?"mobile-view-container mobile-view-".concat(Qt):"")},Object(a.c)(j.a.Provider,{value:Pt},(null===Tt||void 0===Tt?void 0:Tt.isOpen)&&Object(a.c)(tn,{notePreview:Tt}),sn&&Object(a.c)(Vt,{show:fn,lastNotes:Ht,onClose:function(t){un(!1)},onHide:function(t){bn(!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,";}#root{height:100%;}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:"main-wrapper ".concat(Rt.userSettings.get("ui_sidebar")?"with-sidebar":"without-sidebar"," device-view-").concat(Object(r.a)())},F(),h({}),d({}),q(),cn({forceRerender:J,onButtons:[function(){bn(!0),un(!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(U.c)(e);o&&t.ui.browser.goTo(n,o.name,{openIn:"activeWindow"})}))}))}}),Rt.userSettings.get("ui_layout_shortcuts_panel")&&Object(a.c)(Jt,{filePath:".tiro/shortcuts.md",onClick:function(){}}),Object(a.c)(X,{files:Ht,onClick:function(t){Pt.ui.browser.goTo(t.folder,t.name,{openIn:"active"})}}),Object(a.c)(Y,{openFolders:Dt.open.get(),folder:Dt.get(),current:Dt.current.get(),onFolderClicked:function(t){Pt.ui.browser.goTo(t,null)},onFolderMenuAction:function(t,n,e){"rename"===t&&e?Yt({folder:n,folderToDropInto:n,folderBasePath:Bt,newTitle:e,renameOnly:!0,disablePrompt:!0,onMoveFn:function(){Mt([Sn(n.path)],{cache:!1,cb:function(){}})}}):"create"===t&&e?Object(j.d)((function(t){t.folders.create("".concat(n.path,"/").concat(e),(function(t){Mt([n.path],{cache:!1})}))})):"moveToTrash"===t?Yt({folder:n,folderToDropInto:Mn.b,folderBasePath:Bt,newTitle:"".concat(n.title,"_").concat(Object(Nn.a)().full_file),onMoveFn:function(){Mt([Sn(n.path),n.path],{cache:!1,cb:function(){Dt.open.add(n.path)}})}}):"delete"===t&&(Object(Mn.a)("trash"),setTimeout((function(){Mt([n.path],{cache:!1})})))},onFolderOpen:function(t){Mt([t],{cache:!1})},onFolderClose:function(t){},onFolderDragStart:function(t){console.log("[DRAG MOVE] onFolderDragStart",t),Z.current=[{type:"folder",folder:t}]},onFolderDragEnd:function(){console.log("[DRAG MOVE] onFolderDragEnd"),Z.current=[]},onFolderDrop:function(t){!function(t){console.log("[DRAG MOVE] processDragDropAction ->",Z.current,t);var n=Z.current[0];"file"===n.type&&n.files?$t({files:n.files,folderToDropInto:t}):"folder"===n.type&&n.folder&&Yt({folder:n.folder,folderToDropInto:t,folderBasePath:Bt,disablePrompt:!0,onMoveFn:function(){if(n.folder){var e=n.folder.path,o=t.path;Mt([Sn(e),Sn(o),o,e],{cache:!1,cb:function(){Dt.open.add(e),Dt.open.add(o),Dt.open.add(Sn(e)),Dt.open.add(Sn(o))}})}}})}(t),console.log(111111)}})),Object(a.c)("div",{className:"config-buttons-bar"},Rt.userSettings.get("beta_plugins_marketplace")&&Object(a.c)("div",{className:"config-button plugins-marketplace-button",onClick:function(){lt("plugins-marketplace")}},Object(a.c)(y.b,{name:"puzzle-piece"})),Object(a.c)("div",{className:"config-button settings-button",onClick:function(){lt("settings")}},Object(a.c)(y.b,{name:"cog"})))),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"},Rt&&Rt.ui.browser.folders.current.get(),!Rt.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){Object(j.d)((function(t){t.userSettings.set("ui_sidebar",!t.userSettings.get("ui_sidebar"))})),I()},active:!0===Pt.userSettings.get("ui_sidebar")}],colors:["#d4d1d1","#615f5f"],size:.8}))),Object(a.c)(nt,{term:Pt.ui.search.term.get})),Object(a.c)("div",{className:"files-list-wrapper"},Object(a.c)(Dn,{files:Lt.get,activeFileIndex:Lt.active.getIndex,onSortFiles:function(t){Pt.ui.browser.files.set(t)},onFileClicked:function(t){Lt.active.set(t);var n=Lt.get[t];Rt.tabs.active.get()?P.active.setContent(n):Rt.tabs.openInNewTab(n)},onFileDragStart:function(t){console.log("[DRAG MOVE] onFileDragStart",t),Z.current=[{type:"file",files:t}]},onFileDragEnd:function(){console.log("[DRAG MOVE] onFileDragEnd"),Z.current=[]}}))))),Object(a.c)("div",{className:"right-wrapper draggable-grid-editors-view"},Object(a.c)(st,{tabs:O,onUpdate:C,onPinToggle:xn("topTab"),pinStatus:On.topTab}),R&&Object(a.c)(Fn.b,{tab:R,onGridUpdate:T,mobileView:Qt,pinStatus:On})),"mobile"!==Object(r.a)()&&Ft.c.curr.beta_floating_windows&&Object(a.c)(vn,{panels:Rt.ui.floatingPanel.panels,pinStatus:On.bottomBar,onPinChange:jn("bottomBar")}),"plugins-marketplace"===rt&&Object(a.c)(ln,{onClose:function(){lt(null)}}),"settings"===rt&&Object(a.c)(ht.a,{onClose:function(){lt(null)}})))),Object(a.c)(Zt,null),dt.length>0&&Object(a.c)(it,{images:dt,startingIndex:ft,onClose:Pt.ui.lightbox.close}),vt&&Object(a.c)($n,{id:xt,fileContent:Ot,startString:mt,onUpdate:function(t){kt(t)},onClose:function(){wt(!1)}}))}),null),document.getElementById("root"))},51:function(t,n,e){"use strict";e.d(n,"a",(function(){return w}));var o=e(17),i=e(2),c=e(18),a=e(155),r=e(4),l=e(9),s=e(94),u=e(71),p=e(29),d="[Code Mirror]",f=c.a.client.log.verbose,b=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];f&&console.log(d," update cursor",n,t);try{e&&t.view.dispatch({selection:{anchor:n,head:n},scrollIntoView:!0})}catch(o){console.warn(d,"update Cursor error",o)}},g=function(t){if(!(t&&t.view&&t.view.state))return null;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}},h=0,m=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"),i=0,c=0,a=0;a<o.length&&(i+=o[a].length)<e;a++)c=a;h=c},v=function(t){var n=null===t||void 0===t?void 0:t.view;if(!n)return[];for(var e=n.state.doc.toString().split("\n"),i=[],c=0,a=0;a<e.length;a++){var r=e[a],l=r.length+1,s=Object(o.a)(r.matchAll(p.a.mdTitle)),u=c,d=u+l;if(s.length>0){var f=s[0],b=f[1].length;i[i.length-1]&&i[i.length-1].level<b&&(i[i.length-1].lastChild=!1),i.push({raw:r,matches:f,line:a,title:f[2],from:u,to:d,level:b,lastChild:!0})}c+=l}return i},w={getEditorInfos:function(t){var n=t,e=Math.round(n.viewState.pixelViewport.top),o=n.contentHeight,i=function(){return n.viewState.editorHeight},c=function(){return(o-i())/100};return{viewportHeight:i,contentHeight:o,visibleFirstLine:function(){var t=n.lineBlockAtHeight(e);return n.state.doc.lineAt(t.from).number},percentPx:c,currentPercentScrolled:function(){return n.viewState.pixelViewport.top/c()}}},getCurrentLineInfos:g,getScrolledLine:function(t){return m(t),h},updateCursor:b,updateText:function(t,n,e){var o=t.view.state.doc.toString().length,i=t.view.state.selection.ranges[0].from;t.view.dispatch(t.view.state.update({changes:{from:0,to:o,insert:n}})),b(t,i,!0)},scrollTo:function(t,n){if(!t.view)return-1;b(t,n,!0)},scrollToLine:function(t,n){var e=t.view.state.doc.line(n);b(t,e.from,!0)},getCustomTheme:a.a,getMarkdownStructure:v,foldAllChildren:function(t){var n=v(t),e=g(t);Object(r.each)(n,(function(o,i){if(null!==t&&void 0!==t&&t.view){var c=n[i+1]?n[i+1].from-1:t.view.state.doc.length,a=o.to-1;e&&e.currentPosition>a&&e.currentPosition;try{t.view.dispatch({effects:l.p.of({from:a,to:c})})}catch(r){console.warn("ERROR FOR ".concat(o.title),r)}}}))},unfoldAllChildren:function(t){null!==t&&void 0!==t&&t.view&&Object(l.G)(t.view)},searchWord:function(t,n){var e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(null!==t&&void 0!==t&&t.view)try{var o=t.view;Object(s.d)(o),o.dispatch({effects:s.f.of(new s.a({search:n}))}),e&&Object(s.b)(o)}catch(i){console.log("[CM utils > search word] error:",i)}},setSelection:function(t,n){if(null!==t&&void 0!==t&&t.view)try{var e=t.view,o=[0,0];n.range&&(o=n.range),e.dispatch({selection:i.e.create([i.e.range(o[0],o[1])])})}catch(c){console.log("[CM utils > set selection] error:",c)}},undo:u.f,redo:u.e}},53:function(t,n,e){"use strict";e.d(n,"a",(function(){return f}));var o=e(18),i=e(125),c=e(31),a={};window.dbscroll=a,Object(c.a)("syncscroll","get_db",(function(){return a}));o.a.client.log.verbose;var r=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 a[t]||(a[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}),a[t].els.preview=n,a[t].els.editor=e,a[t].els.scroller=o,a[t]},l=function(t){var n,e,o=r(t),i=o.dims.editor.viewport/o.dims.editor.full||1e7,c=o.dims.preview.viewport/o.dims.preview.full||1e7,a=i<c?i:c,l=(null===(n=o.els.scroller)||void 0===n?void 0:n.clientHeight)||0,s=a*l,u={viewport:s=s>l?l:s,full:l};o.dims.scroller=u;var p=null===(e=o.els.scroller)||void 0===e?void 0:e.dataset;p&&(p.scrollRefresh||(p.scrollRefresh=1),p.scrollRefresh=parseInt(p.scrollRefresh)+1)},s=function(t,n){var e;i.a[t]=!1;var o=r(t);n||(n=o.posPercent);var c=null===(e=o.els.scroller)||void 0===e?void 0:e.dataset;c&&(c.scrollRefresh||(c.scrollRefresh=1),c.scrollRefresh=parseInt(c.scrollRefresh)+1)},u=function(t,n){i.a[t]=!1;var e=r(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}},p=function(t,n){i.a[t]=!1;var e=r(t);if(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}},d=function(t,n){var e=r(t),o=e.dims.preview.full/100,i=n-Math.round(o*e.posPercent);e.previewOffsetY=i},f={getScrollObj:r,updateEditorDims:function(t,n){var e=r(t);e.els.editor&&(e.dims.editor=n)},updatePreviewDims:function(t){var n=r(t);if(n.els.preview){var e=n.els.preview.querySelector(".preview-area-full-height-content"),o=e.clientHeight-e.parentNode.clientHeight,i=n.els.preview.clientHeight;n.dims.preview={viewport:i,full:o},n.dims.preview={viewport:i,full:o}}},updateScrollerDims:l,updatePreviewOffset:d,onEditorScroll:function(t,n){var e=r(t);e.els.editor&&(e.posPercent=n,s(t,n),p(t,n))},onScrollerScroll:function(t,n){r(t).posPercent=n,u(t,n),p(t,n)},onPreviewScroll:function(t){var n=r(t),e=n.els.preview.scrollTop;d(t,e),n.posPercent=e/n.dims.preview.full*100,u(t,n.posPercent),s(t,n.posPercent)},onWindowLoad:function(t){if(a[t]){var n=r(t).posPercent;l(t),s(t,n),u(t,n),p(t,n)}},scrollEditor:u,scrollPreview:p,scrollScroller:s}},55:function(t,n,e){"use strict";e.d(n,"a",(function(){return r}));var o=e(6),i=e(0),c=e(18),a=e(12);function r(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=Object(i.useState)(n),l=Object(o.a)(r,2),s=l[0],u=l[1],p="/".concat(c.a.path.configFolder,"/").concat(c.a.path.backendStateFolder,"/").concat(t,".md");'[BACKEND STATE] "'.concat(t,'" clientApi not loaded! Persistance system will not work correctly');Object(i.useEffect)((function(){d()}),[]);var d=function(cb){Object(a.d)((function(n){n.file.getContent(p,(function(n){var o=JSON.parse(n);e&&console.log("[BACKEND STATE] refreshValFromBackend: ".concat(t," => "),o),u(o),cb&&cb(o)}))}))};return[s,function(n){u(n),e&&console.log("[BACKEND STATE] setValue: ".concat(t," => "),n),Object(a.d)((function(t){t.file.saveContent(p,JSON.stringify(n))}))},d]}},56:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"a",(function(){return i})),e.d(n,"c",(function(){return c}));var o=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_";return(t=i(t,[["-",n],["_",n],[" ",n],["/",n]])).replace(/[^\w\s]/gi,"")},i=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};function c(t,n){for(var e=t.split("\n"),o=n.split("\n"),i=Math.max(e.length,o.length),c=[],a=0;a<i;a++)void 0!==e[a]&&void 0!==o[a]?e[a]!==o[a]?c.push('<span class="diff-sign diff-modified">~~~</span> '+o[a]):c.push(o[a]):void 0!==e[a]&&void 0===o[a]?c.push('<span class="diff-sign diff-deleted">---</span> '+e[a]):void 0===e[a]&&void 0!==o[a]&&c.push('<span class="diff-sign diff-added">+++</span> '+o[a]);return c.join("\n")}},57:function(t,n,e){"use strict";e.d(n,"a",(function(){return i})),e.d(n,"c",(function(){return c})),e.d(n,"b",(function(){return a}));var o=e(22),i=function(t){var n=((new Date).getTime()-t.getTime())/1e3,e=604800,i="";if(n<=3600)i="".concat(Math.ceil(n/60)," ").concat(o.a.minsAgo);else if(n>3600&&n<=86400)i="".concat(Math.ceil(n/3600)," ").concat(o.a.hoursAgo);else if(n>86400&&n<=e)i="".concat(Math.ceil(n/86400)," ").concat(o.a.daysAgo);else if(n>e){var c=("0"+t.getDate()).slice(-2),a=o.a.months[t.getMonth()],r=t.getFullYear().toString();i="".concat(c," ").concat(a," ").concat(r)}return i},c=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}},58:function(t,n,e){"use strict";e.d(n,"a",(function(){return r})),e.d(n,"b",(function(){return l}));var o=e(123),i=e(4),c=e(0),a=e(1),r=function(t){var n,e=Object(c.useRef)(),r=function(){t.shouldFocus&&e.current.focus()};Object(c.useEffect)((function(){r()}),[t.shouldFocus]),Object(c.useEffect)((function(){r()}),[]);var l="checkbox"===t.type&&(!0===t.value||"true"===t.value),s=t.value;Object(i.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&&"textarea"!==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," ")}))),"textarea"===t.type&&Object(a.c)("textarea",{defaultValue:s,onChange:function(n){t.onChange&&t.onChange(n.target.value)}}),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\t\t\t\tfont-size: 11px;\n background: #ececec;\n border-radius: 5px;\n }\n\t\t\ttextarea {\n\t\t\t\theight: 120px;\n\t\t\t\tfont-size: 10px;\n\t\t\t\tborder: none;\n\t\t\t\tbackground: #ececec;\n border-radius: 5px;\n\t\t\t\tpadding: 2px;\n\t\t\t}\n .explanation {\n font-size: 11px;\n color: grey;\n }\n }\n }\n"}},59:function(t,n,e){"use strict";e.d(n,"c",(function(){return l})),e.d(n,"g",(function(){return u})),e.d(n,"f",(function(){return p})),e.d(n,"h",(function(){return d})),e.d(n,"d",(function(){return f})),e.d(n,"a",(function(){return b})),e.d(n,"e",(function(){return g})),e.d(n,"b",(function(){return h}));var o=e(11),i=e(17),c=e(4),a=e(12),r=e(31),l=function(t){for(var n=t.value.split("\n"),e=t.selectionStart,o=0,i=0;o<e+1;){o+=n[i].length+1,i++}return{currentPosition:e,lines:n,activeLine:n[--i],lineIndex:i}},s=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},u=function(t,n,cb){if(10===n){console.log("updateTextFromLetterInput => ENTER PRESSED");var e=t.lines[t.lineIndex-1],o=e.indexOf("- ["),i=e.indexOf("-"),c="";-1!==o&&"- [ ] "!==e?(c=e.substr(0,o+3)+" ] ",s(c)&&(t.lines[t.lineIndex]=c+t.activeLine,cb(c.length))):-1!==i&&"- "!==e&&"- [ ] "!==e&&(c=e.substr(0,i+1)+" ",s(c)&&(t.lines[t.lineIndex]=c+t.activeLine,cb(c.length)))}return t.lines.join("\n")},p=function(t,n,cb,e){var o=n.lines;if("^"===t){var a=o[n.lineIndex-1],r=o[n.lineIndex];o[n.lineIndex]=a,o[n.lineIndex-1]=r,cb(-a.length-1)}if("v"===t){var l=o[n.lineIndex+1],s=o[n.lineIndex];o[n.lineIndex]=l,o[n.lineIndex+1]=s,cb(+l.length+1)}if("X"===t){o[n.lineIndex].length;var u=Object(i.a)(o).splice(0,n.lineIndex).join("\n").length+1-n.currentPosition;o[n.lineIndex]="",cb(u)}if("C"===t){var p=o[n.lineIndex].length,d=o[n.lineIndex];o.splice(n.lineIndex,0,d),cb(p+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(c.isNumber)(e.insertPosition)||Object(c.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")},d=function(t){var n=t.split("\n"),e=0;return Array.isArray(n)?(Object(c.each)(n,(function(t){var n=t.split(" ").filter((function(t){return""!==t}));e+=n.length})),e):e},f=function(t){var n=!1;return(t="".concat(t)).toLowerCase().startsWith("math.")&&(n=!0),t.startsWith("(")&&(n=!0),isNaN(parseInt(t))||(n=!0),t.includes("\n")&&(n=!1),t.length>400&&(n=!1),n},b=function(t){var n=null;if(!f(t))return n;try{n=new Function("return ".concat(t))()}catch(e){}return n},g=function(t){var n=t.windowId,e=t.file,i=t.fileContent,c=t.selectionTxt,a=t.insertPos;try{var l=new Function("return ".concat(c))(),s=Object(o.a)(Object(o.a)({},{wrapSyntax:!1,title:"",currentContent:i,insertPos:a,windowId:n,selection:c,file:e,linejump:!1,isLast:!1}),{},{textUpdate:" = ".concat(l),isLast:!0});h(s)}catch(u){Object(r.d)('[CALC] Error <br/> "'.concat(u,'"'))}},h=function(t){t.question||(t.question=""),t.title||(t.title=""),Object(c.isBoolean)(t.linejump)||(t.linejump=!0),Object(c.isBoolean)(t.viewFollow)||(t.viewFollow=!0),Object(c.isBoolean)(t.wrapSyntax)||(t.wrapSyntax=!0);var n=t.linejump?"\n\n":" ",e="###",o="---",i="".concat(n," ").concat(e," [").concat(t.title,"] (generating ...) ").concat(n),r="".concat(n," ").concat(o," [").concat(t.title,"] (done) ").concat(n),l="".concat(n).concat(t.textUpdate);t.wrapSyntax||(i=r=o=e=""),l="".concat(i).concat(t.textUpdate).concat(n).concat(e," \n"),t.isLast&&(l="".concat(r).concat(t.textUpdate).concat(n).concat(o," \n"));var s=t.currentContent.substring(0,t.insertPos),u=t.currentContent.substring(t.insertPos),p=s+l+u;Object(a.d)((function(n){if(n.file.saveContent(t.file.path,p),t.viewFollow){var e=("".concat(s).concat(l).split("\n").length||0)-2;e<0&&(e=0),m(t.windowId,e)}}))},m=Object(c.throttle)((function(t,n){Object(a.d)((function(e){e.ui.note.editorAction.dispatch({windowId:t,type:"lineJump",lineJumpNb:n})}))}),1e3)},60:function(t,n,e){"use strict";e.d(n,"c",(function(){return f})),e.d(n,"a",(function(){return b})),e.d(n,"b",(function(){return v}));var o=e(6),i=e(4),c=e(0),a=e(34),r=e(18),l=e(15),s=e(10),u=e(19),p=e(35),d=e(55),f={curr:{}},b={ui_sidebar:!0,ui_filesList_sortMode:2,ui_layout_colors_main:"#E86666",ui_layout_colors_main_font:"#FFFFFF",ui_editor_markdown_preview:!0,ui_editor_markdown_latex_preview:!0,ui_editor_markdown_enhanced_preview:!0,ui_editor_markdown_table_preview:!0,ui_editor_spellcheck:!0,ui_editor_links_as_button:!0,ui_editor_links_preview_zoom:.8,ui_editor_show_image_title:!1,export_pandoc_cli_options:"\ndocx | --wrap=preserve --toc --number-sections \n revealjs | -V theme=moon \n beamer | --wrap=preserve --include-in-header=./include-tex.md ",ui_editor_ai_text_selection:!0,ui_editor_ai_command:"export OPENAI_API_KEY='YOUR_OPENAI_API_KEY'; npx chatgpt \" {{input}}\" --continue --model gpt-4 ",server_activity_logging_enable:!1,view_disable_notification_popups:!1,beta_floating_windows:!1,beta_plugins_marketplace:!1,plugins_marketplace_url:"https://raw.githubusercontent.com/dotgreg/tiro-notes/master/docs/marketplace.json"},g=b,h="[USER SETTINGS] :",m=r.a.client.log.verbose,v=function(t){var n=Object(d.a)("user-settings",{}),e=Object(o.a)(n,3),r=e[0],b=e[1],v=e[2],w=Object(c.useState)(0),O=Object(o.a)(w,2),j=O[0],x=O[1],k=Object(c.useRef)([]),y=function(t,n,e){k.current[t]||(k.current[t]=n[e]);var o=r[t];Object(i.isNull)(o)||Object(i.isUndefined)(o)||(""===o&&k.current[t]&&(o=k.current[t]),n[e]=o)};Object(c.useEffect)((function(){_(),f.curr=r}),[r]);var _=Object(p.a)((function(){m&&console.log(h,"UPDATE!",r,j),y("ui_layout_colors_main",s.a.colors,"main"),y("ui_layout_colors_main_font",s.a.colors,"mainFont"),x(j+1)}),1e3),C=function(n,e,cb,o){var i="updateSetupJson-".concat(Object(a.a)());t.eventBus.subscribe(i,(function(t){cb&&cb(t)})),l.b.emit("updateSetupJson",{paramName:n,paramValue:e,opts:o,token:Object(u.b)(),idReq:i})};return Object(c.useEffect)((function(){l.b.on("onServerTaskFinished",(function(n){t.eventBus.notify(n.idReq,{data:n})}))}),[]),{userSettingsApi:{refreshUserSettingsFromBackend:v,updateSetupJson:C,set:function(t,n,e){e||(e={}),e.writeInSetupJson||(e.writeInSetupJson=!1),e.writeInSetupJson&&C(t,"".concat(n)),m&&console.log(h,"updateUserSettings ".concat(t," to ").concat(n));var o=Object(i.cloneDeep)(r);o[t]=n,b(o)},get:function(t){var n=g[t],e=n;return t in r&&(e=r[t]),""===e&&(e=n),e},list:function(){var t=[];return Object(i.each)(r,(function(n,e){var o=e;t.push({key:o,val:n})})),t},refresh:{css:{get:j}}}}}},61:function(t,n,e){"use strict";e.d(n,"a",(function(){return c}));var o=e(6),i=e(0);function c(t,n){var e=Object(i.useState)((function(){try{var e=window.localStorage.getItem(t);return e?JSON.parse(e):n}catch(o){return console.log(o),n}})),c=Object(o.a)(e,2),a=c[0],r=c[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)}}]}},62:function(t,n,e){"use strict";e.d(n,"c",(function(){return l})),e.d(n,"a",(function(){return s})),e.d(n,"b",(function(){return u}));e(0);var o=e(121),i=e(89),c=e(118),a=e(19),r=e(1),l=function(t,n,e){if(!t)return"";var o=t.querySelector("iframe"),i=Object(c.c)(n,{delay:100}),a='<div id="'.concat(i,'" class="resource-link-ctag"><div class="loading-string">loading...</div></div>'),r=!o||!0===e;t.innerHTML=r?a:""},s=function(t){var n;if("pdf"===t.tagName||"epub"===t.tagName){var e,o=null===(e=t.content)||void 0===e?void 0:e.split("?token=")[0];o+=Object(a.c)(),t.content=o}return u(t.tagName,t.content,(null===(n=t.opts)||void 0===n?void 0:n.windowId)||"null",t.opts)},u=function(t,n,e,c){var a;c||(c={}),c.file||(c.file=Object(i.a)());var l=(null===(a=c)||void 0===a?void 0:a.ctagHeightOffset)||0;return Object(r.c)(o.a,{file:c.file,block:{type:"tag",tagName:t,content:n,start:0,end:0},windowId:e,ctagHeightOffset:l,yCnt:0,onIframeMouseWheel:function(){},ctagSandboxed:c.sandboxed,ctagFullscreen:c.fullscreen,ctagOnFullscreenClose:c.onFullscreenClose})}},63:function(t,n,e){"use strict";e.d(n,"b",(function(){return d})),e.d(n,"e",(function(){return b})),e.d(n,"d",(function(){return g})),e.d(n,"c",(function(){return m})),e.d(n,"f",(function(){return v})),e.d(n,"a",(function(){return w}));var o=e(3),i=e(4),c=e(26),a=e(41),r=e(12),l=e(14),s=e(154),u=e(19),p=e(173),d=function(t){var n=new URL(t),e=n.hostname.replace(/^www\./,""),o=n.pathname.split("/").filter((function(t){return""!==t.trim()})),i="";return o.length>0&&(i=(i=o[o.length-1]).length>20?i.substring(0,20).replace(/[^A-Za-z0-9-_\ ]/g,""):i.replace(/[^A-Za-z0-9]/g,"")),e.length>15&&(e=e.substring(0,15)),i.length>0?"".concat(e,"/").concat(i):e},f={value:!1},b=function(t,n){f.value&&Object(r.d)((function(t){var e,o=t.ui.windows.active.get(),i=null===o||void 0===o||null===(e=o.content.file)||void 0===e?void 0:e.path,a=null===o||void 0===o?void 0:o.content.view,r=m().array;r=r.filter((function(t){return"filepath"!==t.name&&"view"!==t.name})),i&&a&&(r.unshift({name:"filepath",value:i}),"mobile"===Object(l.a)()?r.unshift({name:"view",value:n}):r.unshift({name:"view",value:a}),t.file.getContent(i,(function(t){var n=Object(s.a)(t,Object(c.d)(i));if(console.log(n),!(n.length<1)){var e="".concat(n[0].url).concat(Object(u.c)());console.log(e),Object(p.a)(e),document.title=Object(c.d)(i).filenameWithoutExt||Object(c.d)(i).name}})),h(r))}))},g=function(t){var n,e;setTimeout((function(){f.value=!0}),5e3);var o=m().dic,i=null===(n=o.filepath)||void 0===n?void 0:n.value,a=null===(e=o.view)||void 0===e?void 0:e.value;if(i&&a&&"mobile"===Object(l.a)()){var s=Object(c.d)(i);Object(r.d)((function(n){n.ui.browser.goTo(s.folder,s.name,{openIn:"activeWindow"}),t(a)}))}},h=function(t){var n="".concat(a.a.global.protocol).concat(a.a.global.url).concat(a.a.global.port,"/?");Object(i.each)(t,(function(e,o){var i=o<t.length-1?"&":"";n+="".concat(e.name,"=").concat(e.value).concat(i)})),window.history.pushState({},document.title,n)},m=function(){var t,n=[],e={},i=window.location.search,c=new URLSearchParams(i).entries(),a=Object(o.a)(c);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}},v=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},w=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)}}},64:function(t,n,e){"use strict";e.d(n,"c",(function(){return s})),e.d(n,"d",(function(){return g})),e.d(n,"a",(function(){return m})),e.d(n,"b",(function(){return v}));var o=e(29),i=e(12),c=e(14),a=e(28),r=e(10),l=e(47),s=function(t,n,e){return Object(l.a)({file:t,windowId:n,pattern:o.a.linklink,replacement:function(t){var o=document.createElement("span");o.classList.add("note-link-mdpreview-wrapper"),o.classList.add("note-link-wrapper");var i=t[2],c=t[1],a=null;if(i.includes("|")){var r=i.split("|");i=r[0],a=r[1]}var l=m(c,i,a,n,e);return o.innerHTML="".concat(l),o}})},u=function(t){if(t){g(),f++;var n=t.dataset.file,e=t.dataset.folder,o=(t.dataset.searchedstring,t.dataset.windowid||"active");n&&e&&o&&Object(i.d)((function(t){t.ui.browser.goTo(e,n,{openIn:o})}))}},p=function(t){if(t&&"desktop"===Object(c.a)()){var n=t.getBoundingClientRect(),e=[n.left+window.scrollX,n.top+window.scrollY],o=t.dataset.file,a=t.dataset.folder,r=t.dataset.searchedstring,l=t.dataset.windowid,s="".concat(a).concat(o);"preview-popup"!==l&&(Object(i.d)((function(t){t.ui.notePreviewPopup.close()})),h(s,e,r,l))}},d=null,f=0,b=function(t){t.dataset.windowid;g()},g=function(t){d&&clearTimeout(d),f++,t&&setTimeout((function(){f++}),700)},h=function(t,n,e,o){var c=++f;d&&clearTimeout(d),d=setTimeout((function(){f===c&&(""===e&&(e=null),Object(i.d)((function(i){i.ui.notePreviewPopup.open(t,n,{windowIdToOpenIn:o,searchedString:e})})))}),700)},m=function(t,n,e,o,i){var c=t;if(e){var r=e.length>20?e.substring(0,20)+"...":e;c="".concat(t," > ").concat(r)}return'<a\n\t\tonclick="'.concat(Object(a.c)("open-link-page",u),'"\n\t\tonmouseenter="').concat(i&&Object(a.c)("hover-link-page-enter",p),'"\n\t\tonmouseleave="').concat(i&&Object(a.c)("hover-link-page-leave",b),'"\n\t\tclass="title-search-link preview-link" \n\t\tdata-file="').concat(t,'" \n\t\tdata-folder="').concat(n,'" \n\t\tdata-searchedstring="').concat(e||"",'"\n\t\tdata-windowid="').concat(o,'">').concat(c,"</a>")},v=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(r.a.assets.worldIcon,");\n\t\t}\n\t\t").concat(t,".search-link {\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(r.a.assets.searchIcon,");\n\t\t}\n\t\t").concat(t,".title-search-link {\n\t\t\t\ttransition: 1s all;\n\t\t\t\tbackground-color: rgba(0,0,0,0);\n\t\t\t\t&:hover {\n\t\t\t\t\tcolor: white;\n\t\t\t\t\tbackground-color: ").concat(r.a.colors.main,";\n\t\t\t\t}\n\t\t\t\t&.popup-link {\n\t\t\t\t\tposition: relative;\n\t\t\t\t\tz-index: 99;\n\t\t\t\t}\n\t\t\t\tcolor: ").concat(r.a.colors.main,";\n\t\t\t\tbackground-image: url(").concat(r.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(r.a.colors.main,";\n\t\t} ")}},69: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(6),i=e(4),c=e(0),a=e(14),r=e(79),l=e(10),s=e(120),u=e(121),p=e(53),d=e(77),f=e(64),b=e(1),g=function(t){var n={wrapper:Object(c.useRef)(null),main:Object(c.useRef)(null)},e=t.file.path.split("/");e.pop();e.join("/");Object(c.useEffect)((function(){setTimeout((function(){t.onMaxYUpdate(a())}),1e3)}),[t.fileContent]);var a=function(){var t=n.main.current;return 2*((null===t||void 0===t?void 0:t.clientHeight)||3e3)},l=Object(c.useState)([]),s=Object(o.a)(l,2),d=s[0],f=s[1];return Object(c.useEffect)((function(){var n=r.b.chunks.chunk(t.fileContent);f(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),setTimeout((function(){p.a.updatePreviewDims(t.windowId),p.a.updateScrollerDims(t.windowId)}),100)}),100)}),[t.fileContent,t.file.path,t.windowId]),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=a(),e=t.posY+0;return Object(i.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"},Object(b.c)("div",{className:"preview-area-full-height-content"},d.map((function(n,e){return Object(b.c)(u.a,{key:e,index:e,block:n,windowId:t.windowId,file:t.file,reactOnHeightResize:t.reactOnHeightResize,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\t// LONG LINE STYLE\n\t\t\t\t// content: "-";\n\t\t\t\t// background: ').concat(l.a.colors.main,";\n\t\t\t\t// width: 100%;\n\t\t\t\t// height: 2px;\n\t\t\t\t// position: absolute;\n\t\t\t\t// bottom: 0px;\n\t\t\t\t// left: 0px;\n\t\t\t\t// font-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\n\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\theight: calc(100% - 35px);\n margin-top: ").concat(Object(a.b)("desktop")?"140":"0","px;\n}\n\n.preview-area, .preview-area-transitions, .content-blocks-wrapper, .simple-css-wrapper { height: 100%; }\n\n")}},74:function(t,n,e){"use strict";e.d(n,"a",(function(){return o}));var o=function(t){var n="none",e=t.split(".");return"7z"===(n=e[e.length-1].split("?")[0])&&(n="d7z"),n.length>5&&(n="none"),n}},77:function(t,n,e){"use strict";e.d(n,"a",(function(){return g})),e.d(n,"b",(function(){return m}));e(4),e(0);var o=e(26),i=e(19),c=e(14),a=e(74),r=e(28),l=e(62),s=e(56),u=e(10),p=e(39),d=e(12),f=e(1),b=400,g=function(t){var n=t.markdownTag.split("](")[1].slice(0,-1),e=t.markdownTag.split("](")[0].replace("![",""),u="".concat(Object(p.a)(t.file.folder),"/").concat(n).concat(Object(i.c)()),b="".concat(e,".").concat(Object(a.a)(n)),g=Object(o.b)(u),h="ress-".concat(Object(s.b)(g));Object(r.a)(t.file,g,(function(){var n=document.querySelector(".".concat(h," .iframe-wrapper"));n&&w(g,n,t.file.path)}));var m=r.d,w=function(n,e,i,s){var u=(null===s||void 0===s?void 0:s.fullscreen)||!1;null===s||void 0===s||s.fullscreen;if(e){var p=Object(o.d)(i);if(null!==s&&void 0!==s&&s.persist){var d=e.querySelector("iframe")?"closed":"open";Object(r.b)(p,n,d)}var f=function(){e.innerHTML=""},b="mobile"===Object(c.a)()?-300:-100;"epub"===Object(a.a)(n).toLocaleLowerCase()?Object(l.c)(e,Object(l.b)("epub",n,t.windowId,{file:p,fullscreen:u,onFullscreenClose:f,ctagHeightOffset:b}),null===s||void 0===s?void 0:s.openOnly):"pdf"===Object(a.a)(n).toLocaleLowerCase()?Object(l.c)(e,Object(l.b)("pdf",n,t.windowId,{file:p,fullscreen:u,onFullscreenClose:f,ctagHeightOffset:b}),null===s||void 0===s?void 0:s.openOnly):Object(l.c)(e,Object(l.b)("iframe",n,t.windowId,{fullscreen:u,onFullscreenClose:f,ctagHeightOffset:b}))}},O='<li title="Open link in detached window"\n\t\tonclick="'.concat(Object(r.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(g,'">').concat(m("up-right-from-square"),"</li>"),j='<li\n\t\tonclick="'.concat(Object(r.c)("preview-link-ress",(function(t){return function(t,n){if(t){var e=t.dataset.link,o=t.dataset.filepath,i=function(t){return t.parentNode.parentNode.parentNode.parentNode.parentNode.querySelector(".iframe-wrapper")}(t);w(e,i,o,n)}}(t,{persist:!0})})),'"\n\t\ttitle="Toggle a pinned preview" \n\t\tdata-filepath="').concat(t.file.path,'" \n\t\tdata-link="').concat(g,'">').concat(m("thumbtack"),"</li>"),x='<li\n\t\tonclick="'.concat(Object(r.c)("download-link-ress",(function(t){v(b,u)})),'"\n\t\ttitle="Preview link" data-filepath="').concat(t.file.path,'" data-link="').concat(g,'">').concat(m("download"),"</li>"),k="<ul>".concat(j," ").concat(O," ").concat(x,"</ul>"),y='<div \n\t\tclass="ressource-link-label" \n\t\tdata-filepath="'.concat(t.file.path,'" \n\t\tdata-link="').concat(g,'" \n\t\tonclick="').concat(Object(r.c)("click-ress-main-action",(function(t){if(t){var n=t.dataset.link,e="iframe",o=Object(a.a)(n).toLocaleLowerCase();"epub"===o&&(e="epub"),"pdf"===o&&(e="pdf"),Object(d.d)((function(t){t.ui.floatingPanel.create({type:"ctag",layout:"full-center",ctagConfig:{tagName:e,content:n}})}))}})),'">\n\t\t\t').concat(e," (").concat(Object(a.a)(g),")\n\t\t</div>").split("\n").join("");return Object(f.c)("div",{className:"".concat(h," resource-link-iframe-wrapper")},Object(f.c)("div",{className:" resource-link-wrapper device-".concat(Object(c.a)())},Object(f.c)("div",{className:"resource-link-icon ".concat(Object(a.a)(g))}),Object(f.c)("div",{className:"resource-link-content-wrapper"},Object(f.c)("div",{dangerouslySetInnerHTML:{__html:y}}),Object(f.c)("div",{dangerouslySetInnerHTML:{__html:k},className:"buttons-wrapper"}))),Object(f.c)("div",{className:"iframe-wrapper"}))},h=".resource-link-icon",m=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(b-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(u.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\t// display: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(u.a.assets.fileIcon,");\n}\n\n").concat(h,".epub, ").concat(h,".cbr, ").concat(h,".cbz,").concat(h,".mobi, ").concat(h,".azw, ").concat(h,".azw3, ").concat(h,".iba {background-image: url(").concat(u.a.assets.bookIcon,"); }\n").concat(h,".pdf\n{background-image: url(").concat(u.a.assets.pdfIcon,"); }\n\n").concat(h,".xls, ").concat(h,".xlsm, ").concat(h,".xlsx, ").concat(h,".ods\n{background-image: url(").concat(u.a.assets.excelIcon,"); }\n\n").concat(h,".avi, ").concat(h,".flv, ").concat(h,".h264, ").concat(h,".m4v, ").concat(h,".mov, ").concat(h,".mp4, ").concat(h,".mpg, ").concat(h,".mpeg, ").concat(h,".rm, ").concat(h,".swf, ").concat(h,".vob, ").concat(h,".wmv, ").concat(h,".mkv\n{background-image: url(").concat(u.a.assets.videoIcon,"); }\n\n").concat(h,".d7z, ").concat(h,".arj, ").concat(h,".deb, ").concat(h,".rar, ").concat(h,".gz, ").concat(h,".zip, ").concat(h,".rpm, ").concat(h,".pkg\n{background-image: url(").concat(u.a.assets.archiveIcon,");}\n\n").concat(h,".aif, ").concat(h,".mp3, ").concat(h,".cda, ").concat(h,".mid, ").concat(h,".mpa, ").concat(h,".ogg, ").concat(h,".wav, ").concat(h,".wpl, ").concat(h,".wma, ").concat(h,".midi\n{background-image: url(").concat(u.a.assets.audioIcon,"); }\n\n").concat(h,".doc, ").concat(h,".docx, ").concat(h,".odt, ").concat(h,".txt\n{background-image: url(").concat(u.a.assets.wordIcon,"); }\n\n").concat(h,".html, ").concat(h,".css, ").concat(h,".js, ").concat(h,".json, ").concat(h,".ts, ").concat(h,".jsx, ").concat(h,".tsx\n{background-image: url(").concat(u.a.assets.codeIcon,"); }\n\n").concat(h,".bin, ").concat(h,".dmg, ").concat(h,".iso, ").concat(h,".toast, ").concat(h,".vcd\n{\n\t\ttop: 19px;\n\t\ttransform: scale(1.8);\n\t\tbackground-image: url(").concat(u.a.assets.diskIcon,");\n}\n\n").concat(h,".ppt, ").concat(h,".pptx, ").concat(h,".odp, ").concat(h,".key, ").concat(h,".pps\n{background-image: url(").concat(u.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.device-desktop .resource-link-wrapper .resource-link-content-wrapper ul {\n\t\topacity:1;\n\t\twidth: 90px;\n\t\tpointer-events: all;\n}\n\n")},v=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)}},78: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),i=e(4),c=e(322);c.setOptions({gfm:!0,breaks:!0,headerPrefix:"t-"});var a=function(t){var n=t;return n=c.parse(n)},r=function(t,n,e){var o=t,c=o.match(n)||"";return Object(i.each)(c,(function(t){o=o.replace(t,e(t))})),o},l=function(t,n,e){var o=t,i=n.replace("[[","").replace("]]",""),c="(?:\\[\\[".concat(i,"\\]\\])((?:[^]*))(?:\\[\\[").concat(i,"\\]\\])"),a=new RegExp(c,"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(i.each)(n,(function(t){t.id===e&&(o=!0)})),o){var c=!1,a=[e[e.length-2],e[e.length-1]],r=e.slice(0,-2),l=parseInt(a[1]);return"-"!==a[0]||isNaN(l)||(c=!0),c?e="".concat(r,"-").concat(l+1):e+="-1",t(n,e)}return e},u=function(t){for(var n=[],e=t.split("\n"),i=[],c=0;c<e.length;c++){var a=e[c],r=Object(o.a)(a.matchAll(/([#]{1,9})\ (.+)/gi));if(r.length>0){var l=r[0],u=l[2].toLowerCase(),p=c,d=u.trim().split(" ").join("-").replace(/[^a-zA-Z0-9-_\xc0-\xfa]/gi,"");d=s(i,d),i.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}},79:function(t,n,e){"use strict";e.d(n,"a",(function(){return u})),e.d(n,"b",(function(){return f}));var o=e(11),i=e(4),c=e(29),a=e(116),r=e(78),l=e(39),s=function(t){var n=Object(o.a)({},t),e=n.raw,i=n.file,c=n.windowId;c||(c="");var s=Object(r.b)(Object(l.d)(i,c,Object(l.c)(i,Object(l.e)(Object(l.f)(c,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(c.a.userCustomTagManual),e=[],o=[],a=c.a.userCustomTag3,r=t.match(a)||"",l=[];Object(i.each)(r,(function(t){l.push(t)}));var s=null,u=-1,p=[],d=[],f={};if(Object(i.each)(l,(function(t){f[t]?f[t]=f[t]+1:f[t]=1})),Object(i.each)(f,(function(t,n){t>=2&&d.push(n)})),Object(i.each)(l,(function(t,e){if(d.includes(t))if(s){if(s===t){var i=[u+1,e+1];p.push.apply(p,i);for(var c=n.slice(i[0],i[1]),a=l.slice(u+1,e+1),r="",f=0;f<c.length;f++){var b=f===c.length-1?"":a[f];r+="".concat(c[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(i.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,c=n.file,a=n.windowId;a||(a="");var r=p(e);return Object(i.each)(r,(function(t){"text"===t.type&&(t.content=s({raw:t.content,file:c,windowId:a})),"tag"===t.type&&(t.content=Object(l.b)(t.content))})),d(r)},injectLogic:function(t){},chunks:{chunk:p,merge:d}}},80:function(t,n,e){"use strict";e.d(n,"b",(function(){return i})),e.d(n,"a",(function(){return c})),e.d(n,"d",(function(){return a})),e.d(n,"c",(function(){return r}));var o=e(4),i=["Az","Crea","Modif"],c=["alphabetical","created","modified"],a=function(t,n){var e;switch(c[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}},82:function(t,n,e){"use strict";e.d(n,"a",(function(){return a})),e.d(n,"f",(function(){return l})),e.d(n,"g",(function(){return s})),e.d(n,"d",(function(){return u})),e.d(n,"b",(function(){return p})),e.d(n,"c",(function(){return d})),e.d(n,"e",(function(){return f}));var o=e(29),i=e(10),c=e(47),a={val:!1},r=a,l=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:/\|/gim,classWrap:function(t){return"md-table-limiter"}})},s=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:/t1.+t2/gim,classWrap:function(t){return"ttt4"}})},u=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.mdTableCell,classWrap:function(t){var n=t[0];return n&&"-"===n||n&&"-|"===n?"":"md-table-cell"}})},p=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.mdTitle,classWrap:function(t){var n=t[1].length;return"md-title-wrapper level-".concat(n)}})},d=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.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 r.val=!r.val,"md-table-line md-table-".concat(e," ").concat(r.val?"even":"")}})},f=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-title-wrapper {\n\tcolor: ".concat(i.a.colors.main,";\n\t\n\t&.level-1 {\n\t\tfont-size: 15px;\n\t\ttext-decoration: underline;\n\t\tfont-weight: bold;\n\t}\n\t&.level-2 {\n\t\tfont-size: 13px;\n\t\ttext-decoration: underline;\n\t\t// font-weight: bold;\n\t}\n\t&.level-3 {\n\t\tfont-size: 12px;\n\t}\n}\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")}},84:function(t,n,e){"use strict";e.d(n,"b",(function(){return O})),e.d(n,"a",(function(){return x})),e.d(n,"c",(function(){return k}));var o=e(6),i=e(0),c=e(61),a=e(22),r=e(46),l=e(58),s=e(12),u=e(55),p=e(4),d=e(41),f=e(10),b=e(56),g=e(19),h=e(60),m=e(31),v=e(14),w=e(1),O=function(t){var n=localStorage.getItem("settings-".concat(t))||"";return Object(b.a)(n,[['"',""]])},j=function(t){return"<br/> <br/> Default value: ".concat(h.a[t].replaceAll("\n","<br/>"))},x=function(t){var n="<br/> Requires interface reload",e=Object(c.a)("settings-backend-port",-1),f=Object(o.a)(e,2),b=f[0],v=f[1],O=Object(c.a)("settings-backend-protocol","same"),x=Object(o.a)(O,2),k=(x[0],x[1],Object(i.useContext)(s.a)),y=a.a.settingsPopup,_=[];if(k){var C=k.userSettings,E="".concat(window.location.protocol,"//"),S="".concat(E).concat(k.status.ipsServer.getLocal()).concat(d.a.global.port);"https://api.qrserver.com/v1/create-qr-code/?size=400x400&margin=50&data=".concat(S);_=[{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:C.get("ui_layout_colors_main"),modifier:function(t){C.set("ui_layout_colors_main",t)}},{type:"text",title:"Font color for main color",expl:"Font color for items with main color as background",var:C.get("ui_layout_colors_main_font"),modifier:function(t){C.set("ui_layout_colors_main_font",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:C.get("ui_layout_shortcuts_panel"),modifier:function(t){C.set("ui_layout_shortcuts_panel",t)}}]},{title:"editor",fields:[{type:"checkbox",title:"AI Suggest",expl:"Send the selected text as a question to an AI",var:C.get("ui_editor_ai_text_selection"),modifier:function(t){C.set("ui_editor_ai_text_selection",t)}},{type:"textarea",title:"AI Suggest command line",expl:"Which AI API command to be called, {{input}} will be replaced by the selection. <br/><br/> For ChatGPT, you need an <a href='https://platform.openai.com/account/api-keys' target='_blank'>api key</a> and enter the following command : "+"<br/><code>".concat(h.a.ui_editor_ai_command,"</code>"),var:C.get("ui_editor_ai_command"),modifier:function(t){C.set("ui_editor_ai_command",t)}},{type:"checkbox",title:"Markdown Preview",expl:"Markdown preview "+n,var:C.get("ui_editor_markdown_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_preview",t)}},{type:"checkbox",title:"Enhanced Markdown",expl:"Enhanced Markdown Preview for files, documents etc"+n,var:C.get("ui_editor_markdown_enhanced_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_enhanced_preview",t)}},{type:"checkbox",title:"Links button",expl:"Replace http links into buttons in the editor by adding a '/' at the end of it."+n,var:C.get("ui_editor_links_as_button"),modifier:function(t){L(!0),C.set("ui_editor_links_as_button",t)}},{type:"checkbox",title:"Latex preview",expl:"Add Latex preview. Add '--latex' in the note to activate it then use $_latex_expression_$"+n,var:C.get("ui_editor_markdown_latex_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_latex_preview",t)}},{type:"checkbox",title:"Improved Markdown Table",expl:"Improves the display of markdown table. Add '--table' in the note to activate it."+n,var:C.get("ui_editor_markdown_table_preview"),modifier:function(t){L(!0),C.set("ui_editor_markdown_table_preview",t)}},{type:"checkbox",title:"Spellcheck",expl:"Enable/disable native browser spellcheck for all notes. <br> You can also activate it per note by adding '--spellcheck' inside the note content <br>"+n,var:C.get("ui_editor_spellcheck"),modifier:function(t){L(!0),C.set("ui_editor_spellcheck",t)}},{type:"checkbox",title:"Image title",expl:"Show image title on interface and exports"+n,var:C.get("ui_editor_show_image_title"),modifier:function(t){L(!0),C.set("ui_editor_show_image_title",t)}}]},{title:"exports",fields:[{type:"textarea",title:"Options for Pandoc exporter",expl:"Modify how pandoc exports files. All options can be found at <a href='https://pandoc.org/MANUAL.html' target=\"_blank\">pandoc options manual</a>. One file extension options per line.<br/><br/>format: <br/> file extention | options ".concat(j("export_pandoc_cli_options")),var:C.get("export_pandoc_cli_options"),modifier:function(t){C.set("export_pandoc_cli_options",t)}},{type:"none",var:"",customHtml:" ",title:"Export Install",readOnly:!0,expl:'In order to export in many formats, Tiro notes needs to install Pandoc on your computer. (At least v2.9) <br/>\n\t\t\t\t\t\t<a href="https://pandoc.org/installing.html" target="_blank">Guide here </a>\n\t\t\t\t\t\t<br/><br/>\n\t\t\t\t\t\tFor PDF, make sure pdflatex is installed \n\t\t\t\t\t\t<br/> (if you are on termux: <code>pkg install texlive-installer texlive-tlmgr; termux-install-tl</code>)',modifier:function(){},onCustomHtmlClick:function(){}}]},{title:"plugins",fields:[{type:"text",title:"Plugins Marketplace URL",expl:"Custom Plugins Marketplace URL, should redirect to a marketplace.json file <br> Goes to the official 'https://raw.githubusercontent.com/dotgreg/tiro-notes/master/docs/marketplace.json' by default/if empty.",var:C.get("plugins_marketplace_url"),modifier:function(t){C.set("plugins_marketplace_url",t)}},{type:"none",var:"",customHtml:"<button> Clean Plugins Cache </button>",title:"Clean Plugins Cache",readOnly:!0,expl:"Clean Plugins Cache",modifier:function(){},onCustomHtmlClick:function(){Object(m.b)("cache","clean_cache")}}]},{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:C.get("users_viewer_user_enable"),modifier:function(t){C.set("users_viewer_user_enable",t,{writeInSetupJson:!0})}},{type:"text",title:"Viewer user password",expl:'Define the "viewer" user password',var:C.get("users_viewer_user_password"),modifier:function(t){C.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:C.get("demo_mode_enable"),modifier:function(t){C.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:b,title:y.backend.port,expl:y.backend.portExpl,modifier:v},{type:"checkbox",title:"Activity Logging",expl:"Enable the activity logging for events like read/write files, you can then consult it using api.activity.getReport(). \n Requires an app restart to take effect.",var:C.get("server_activity_logging_enable"),modifier:function(t){C.set("server_activity_logging_enable",t)}},{type:"checkbox",title:"Disable notification popups",expl:"Force notification popups to not appear on the interface"+n,var:C.get("view_disable_notification_popups"),modifier:function(t){L(!0),C.set("view_disable_notification_popups",t)}}]},{title:"Beta",fields:[{type:"checkbox",title:"Floating Windows",expl:"Enable the floating window system"+n,var:C.get("beta_floating_windows"),modifier:function(t){L(!0),C.set("beta_floating_windows",t)}},{type:"checkbox",title:"Plugins Marketplace",expl:"Enable the plugin marketplace system",var:C.get("beta_plugins_marketplace"),modifier:function(t){C.set("beta_plugins_marketplace",t)}}]}]}var T=Object(u.a)("config-panels-opened",[]),I=Object(o.a)(T,3),N=I[0],P=I[1],R=(I[2],Object(i.useState)(!1)),A=Object(o.a)(R,2),F=A[0],L=A[1];return Object(w.c)("div",{className:"settings-popup-wrapper"},Object(w.c)(r.a,{title:"".concat(y.title),onClose:function(){t.onClose()}},_.map((function(t,n){return Object(w.c)("div",{className:"settings-panel"},Object(w.c)("h3",{onClick:function(){!function(t){var n=Object(p.cloneDeep)(N);n[t]=!n[t],P(n)}(n)}},Object(w.c)("div",{className:"arrow"},N[n]?"\u25bc":"\u25ba"),t.title),Object(w.c)("div",{className:"fields-wrapper ".concat(N[n]?"active":"")},t.fields.map((function(t){return Object(w.c)("div",{className:"field-wrapper"},Object(w.c)("div",{className:"input-and-html-wrapper"},"none"===t.type&&Object(w.c)("span",null,t.title),"none"!==t.type&&Object(w.c)(l.a,{value:t.var,shouldNotSelectOnClick:!0,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(w.c)("div",{className:"custom-html-wrapper",onClick:function(n){t.onCustomHtmlClick&&t.onCustomHtmlClick()},dangerouslySetInnerHTML:{__html:t.customHtml}})),Object(w.c)("div",{className:"explanation",dangerouslySetInnerHTML:{__html:t.expl||"woop"}}))}))))})),F&&Object(w.c)("button",{className:"submit-button reload-btn",onClick:function(t){window.location.reload()}},"Reload App")))},k=function(){return"\n//\n// mobile version\n//\n\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: 70vw;\n\t\tmin-height: 50vh;\n\t\tmax-height: 70vh;\n\t\toverflow-y: scroll;\n\n}\n\n.reload-btn {\n\tposition: absolute;\n\tbottom: 10px;\n\tright: 10px;\n}\n\n\n.settings-panel {\n\t\t\n\t\t.input-and-html-wrapper {\n\t\t\twidth: 50%;\n\t\t\t.input-component-wrapper {\n\t\t\t\t.input-component {\n\t\t\t\t\t".concat("desktop"===Object(v.a)()?"":"display:block!important;","\n\t\t\t\t\t.input-wrapper {\n\t\t\t\t\t\ttextarea, input {\n\t\t\t\t\t\t\t").concat("desktop"===Object(v.a)()?"width: calc(100% - 20px); ":"width: calc(100% - 30px); margin: 5px 0px; ",'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput[type=checkbox] {\n\t\t\t\t\t\t\twidth: 20px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput[type="text"] {\n\t\t\t\t\t\t\t').concat("desktop"===Object(v.a)()?"width: calc(100% - 20px); ":"width: calc(100% - 40px);","\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\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// 3 EXPLANATION\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t// width: 50%;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.input-and-html-wrapper {\n\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t.input-component {\n\t\t\t\t\t\t\t\t// 1 TITLE\n\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\twidth: 100px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// 2 INPUT\n\t\t\t\t\t\t\t\t.input-wrapper {\n\t\t\t\t\t\t\t\t\twidth: 300px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tjustify-content: space-evenly;\n\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t.custom-html-wrapper {\n\t\t\t\t\t\t\t\t\tmargin-left: 20px;\n\t\t\t\t\t\t\t\t\t.qrcode-wrapper {\n\t\t\t\t\t\t\t\t\t\t\timg {\n\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\tcursor: pointer;\n\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&:hover {\n\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}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\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\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")}},88:function(t,n,e){"use strict";e.d(n,"c",(function(){return b})),e.d(n,"a",(function(){return h})),e.d(n,"b",(function(){return m}));var o=e(29),i=e(39),c=e(47),a=e(19),r=e(4),l=e(12),s=e(28),u=e(154),p=e(26),d=e(60),f=function(t){if(t){var n=t.dataset.filePath,e=t.dataset.src;Object(l.d)((function(t){t.file.getContent(n,(function(o){var i=Object(u.a)(o,Object(p.d)(n));if(console.log(i),!(i.length<1)){var c=[],a=0;Object(r.each)(i,(function(t,n){e.includes(t.url)&&(a=n),c.push(t.url)})),t.ui.lightbox.open(a,c)}}))}))}},b=function(t,n){return Object(c.a)({file:t,windowId:n,pattern:o.a.image2,replacement:function(n){var e=document.createElement("div");return e.innerHTML=g(n[0],n[2],n[1],n[5],t),e}})},g=function(t,n,e,o,c){"image"!==e&&(e='<div class="mdpreview-source">'.concat(e,"</div>")),d.c.curr.ui_editor_show_image_title||(e="");var r=n.startsWith("http")?n:"".concat(Object(i.a)(c.folder),"/").concat(n).concat(Object(a.c)());o||(o="");var l=o.trim().split("="),u="";if("width"===l[0]||"height"===l[0]){var p="width"===l[0]?"height:auto;max-height:none":"width:auto; max-width:none;";u='style="'.concat(l[0],":").concat(l[1],"; ").concat(p,'"')}return'<div class="cm-mdpreview-wrapper image-wrapper"><div class="cm-mdpreview-image" data-file-path="'.concat(c.path,'" data-src="').concat(r,'" onclick="').concat(Object(s.c)("image-open-lightbox",f),'"> <img onerror="this.style.display=\'none\'" ').concat(u,' src="').concat(r,'" /></div></div>').concat(e)},h=function(t,n,e){var o="",c=t.split("[")[1].split("]")[0];"image"!==c&&(o='<div class="mdpreview-source">'.concat(c,"</div>")),d.c.curr.ui_editor_show_image_title||(o="");var r=n.startsWith("http")?n:"".concat(Object(i.a)(e.folder),"/").concat(n).concat(Object(a.c)());return'<div class="cm-mdpreview-wrapper image-wrapper"><div class="cm-mdpreview-image" data-file-path="'.concat(e.path,'" data-src="').concat(r,'" onclick="').concat(Object(s.c)("image-open-lightbox",f),'"> <img onerror="this.style.display=\'none\'" src="').concat(r,'" /></div></div>').concat(o)},m=function(){return"\n.cm-mdpreview-wrapper.image-wrapper {\n\t\t// display: inline;\n\t\tdiv {\n\t\t\t// display: inline;\n\t\t}\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"}},89:function(t,n,e){"use strict";e.d(n,"b",(function(){return a})),e.d(n,"a",(function(){return r}));var o=e(6),i=e(4),c=e(0),a=function(){var t=Object(c.useState)([]),n=Object(o.a)(t,2),e=n[0],a=n[1],l=Object(c.useState)(0),s=Object(o.a)(l,2),u=s[0],p=s[1];return{lightboxApi:{open:function(t,n){var e=[];Object(i.each)(n,(function(t){if(Object(i.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(t,n){return{nature:"file",name:t||"",realname:"",path:n||"",folder:""}}},91: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),i=e(7),c=e(8),a=e(20),r=e(21),l=e(13),s=e(9),u=e(5),p=e(116),d=e(88),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(i.a)(this,e),(o=n.call(this)).str=t,o}return Object(c.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,i=[],c=Object(o.a)(t.visibleRanges);try{for(c.s();!(e=c.n()).done;){var a=e.value,r=a.from,u=a.to;Object(s.F)(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});i.push(o.range(n.from))}}})}}catch(p){c.e(p)}finally{c.f()}return l.a.set(i)}var v=function(t){return l.f.fromClass(function(){function n(e){Object(i.a)(this,n),this.decorations=void 0,this.decorations=m(e,t.file)}return Object(c.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(t,n){t.target}}})},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\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 ".concat(Object(d.b)(),"\n ")}},92:function(t,n,e){"use strict";e.d(n,"c",(function(){return c})),e.d(n,"a",(function(){return a})),e.d(n,"b",(function(){return r})),e.d(n,"d",(function(){return u}));var o=e(126),i=e.n(o),c=function(t,n){var e=i.a.generateRSAKey(n,1024),o=i.a.publicKeyString(e);return i.a.encrypt(t,o)},a=function(t,n){var e=i.a.generateRSAKey(n,1024);return i.a.decrypt(t,e)},r={encryptText:c,decryptText:a,encryptUrlParam:function(t,n){var e=c(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,i=(t.trim().endsWith("==")||t.trim().endsWith("="),/^[a-zA-Z0-9\/\=\?\+]+$/.test(t)),c=t.length>100;return i&&o&&c&&(n=!0),n}},93:function(t,n,e){"use strict";e.d(n,"c",(function(){return O})),e.d(n,"a",(function(){return x})),e.d(n,"b",(function(){return k})),e.d(n,"d",(function(){return y}));var o=e(6),i=e(0),c=e.n(i),a=e(4),r=e(299),l=e.n(r),s=(e(442),e(443),e(161)),u=e(162),p=e(163),d=e(101),f=e(10),b=e(38),g=e(12),h=e(14),m=e(60),v=e(164),w=e(1),O={rows:2,cols:4},j={m:10,rows:O.rows,cols:O.cols,decalBottom:10},x=function(t){var n=Object(i.useState)([]),e=Object(o.a)(n,2),r=e[0],f=e[1],x=function(t){f(t),k.current=t},k=Object(i.useRef)([]),y=Object(i.useState)([]),_=Object(o.a)(y,2),C=_[0],E=_[1],S=Object(i.useRef)();Object(i.useEffect)((function(){t.grid&&t.grid.layout&&(E(t.grid.layout),x(t.grid.content))}),[t.refresh]),Object(i.useEffect)((function(){U(),F()}),[C]);var T=function(n,e){t.onGridUpdate({layout:n,content:e})},I=function(){var t=r[0].file;if(t){var n=function(t){for(var n=[],e=O,o=function(o){for(var i=[],c=function(n){var e=0;Object(a.each)(t,(function(t){for(var i=0;i<t.w;i++)for(var c=0;c<t.h;c++){var a=t.x+i,r=t.y+c;a===n&&r===o&&(e=1)}})),i.push(e)},r=0;r<e.cols;r++)c(r);n.push(i)},i=0;i<e.rows;i++)o(i);for(var c=[-1,-1],r=[-1,-1],l=0;l<e.rows;l++)for(var s=0;s<e.cols;s++)0===n[l][s]&&-1===c[0]&&-1===c[1]&&(c[0]=s,c[1]=l),0===n[l][s]&&(r[0]=s,r[1]=l);var u=r[0]-c[0]+1,p=r[1]-c[1]+1;return{x:c[0],y:c[1],w:u,h:p}}(C),e=Object(u.a)({file:t,w:n.w,h:n.h,x:n.x,y:n.y}),o=Object(a.cloneDeep)(C);o.push(e.layout),V(o)&&(E(o),setTimeout((function(){var t=Object(a.cloneDeep)(r);t.push(e.content);var n=H(e.content.i,t);x(n),T(o,n)})),T(o,r))}},N=Object(i.useState)(!1),P=Object(o.a)(N,2),R=P[0],A=P[1],F=function(){A(C.length>1)},L=function(t){var n=Object(a.filter)(Object(a.cloneDeep)(C),(function(n){return n.i!==t})),e=function(t){var n=O;return 1===t.length&&(t[0].x=0,t[0].y=0,t[0].h=n.rows,t[0].w=n.cols),t}(n);E(e),setTimeout((function(){var e=Object(a.filter)(Object(a.cloneDeep)(r),(function(n){return n.i!==t}));x(e),T(n,e)})),T(n,r)},D=Object(i.useState)(!1),M=Object(o.a)(D,2),z=M[0],B=M[1],U=function(){var t=0,n=j.cols*j.rows;Object(a.each)(C,(function(n){t+=n.w*n.h})),B(t!==n)},H=function(t,n){var e=Object(a.cloneDeep)(n);return Object(a.each)(e,(function(n){n.active=n.i===t})),e},W=function(t,n){var e=H(t,k.current);x(e),T(C,e),n&&(null===G||void 0===G||G.ui.browser.goTo(n.folder,n.name))},q=function(t){S.current=Object(a.cloneDeep)(t)},V=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(i.useEffect)((function(){var t=K.current;if(t)return t.addEventListener("resize",(function(){})),function(){t.removeEventListener("resize",(function(){}))}}),[]);var K=Object(i.useRef)(null),J={width:300,height:300};K.current&&(J.width=K.current.clientWidth,J.height=K.current.clientHeight-j.decalBottom);var G=Object(i.useContext)(g.a),Y=Object(i.useState)(null),$=Object(o.a)(Y,2),Z=$[0],X=$[1];Object(i.useEffect)((function(){if("mobile"===Object(h.a)()){var t=null===G||void 0===G?void 0:G.ui.windows.active.get();if(t)X(t);else{var n={layout:C[0],content:r[0]};n.layout&&n.content&&n.layout.i===n.content.i&&(X(n),W(n.content.i))}}}),[t.refresh]);var Q=function(n,e){return function(o,i){if("windowActiveStatus"===o)n&&!n.active&&W(n.i,n.file);else if("windowViewChange"===o){var c;if(null===i||void 0===i||!i.view||!t.grid.content[e].file)return;!function(t,n){var e=Object(a.cloneDeep)(r);e[n].view=t,x(e),T(C,e)}(null===i||void 0===i?void 0:i.view,e);var l=(null===(c=t.grid.content[e].file)||void 0===c?void 0:c.path)||"";Object(v.b)(l,null===i||void 0===i?void 0:i.view)}}};return Object(w.c)("div",{className:"draggable-grid-wrapper"},Object(w.c)("div",{className:"draggable-grid-wrapper-in",ref:K},"mobile"!==Object(h.a)()&&Object(w.c)(l.a,{className:"draggable-grid",autoSize:!1,layout:C,onLayoutChange:function(t){var n=Object(a.cloneDeep)(t);if(V(n)){var e=n;q(e),E(e),T(e,r)}else{if(!S.current)return;var o=function(t){var n=t,e=O,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&&q(o);var i=o||S.current,c=Object(a.cloneDeep)(i);Object(a.each)(c,(function(t){t.refresh=Object(s.a)(t.refresh)})),E(c),T(c,r)}},cols:j.cols,compactType:"horizontal",useCSSTransforms:!1,rowHeight:J.height/j.rows-j.m*(j.rows+1),draggableHandle:".drag-handle",width:J.width,margin:[j.m,j.m]},C.map((function(n,e){return Object(w.c)("div",{key:n.i,className:" ".concat(r[e]&&r[e].active?"active":""," window-wrapper "),onClick:function(){r[e]&&!r[e].active&&W(r[e].i,r[e].file)},onMouseEnter:function(){}},function(t,n,e){var o=[{icon:"faGripVertical",title:"Move Window",class:"drag-handle",action:function(){},onHover:function(){t&&!t.active&&W(t.i,t.file)}},{icon:"faPlus",title:"Add Window",class:"add-button",action:function(){I()}},{icon:"faPlus",title:"Delete Window",class:"delete-button",action:function(){L(t.i)}}];return m.c.curr.beta_floating_windows&&o.unshift({icon:"window-restore",title:"Detach Window",class:"detach-button",action:function(){console.log("detach",r[n].view,r[n]),e.file&&Object(g.d)((function(t){t.ui.floatingPanel.create({type:"file",file:e.file,view:"preview"===r[n].view?"preview":"editor"})}))}}),Object(w.c)(c.a.Fragment,null,Object(w.c)("div",{className:"note-active-ribbon"}),Object(w.c)("div",{className:"window-buttons-bar ".concat(z?"can-add":""," ").concat(R?"can-remove":"")},Object(w.c)(b.a,{design:"horizontal",popup:!1,buttons:o,colors:["#d4d1d1","#615f5f"],size:.8})))}(n,e,t.grid.content[e]),Object(w.c)("div",{className:"window-editor-wrapper-wrapper"},Object(w.c)(d.a,{content:t.grid.content[e]&&t.grid.content[e],onLayoutUpdate:Q(n,e),mobileView:t.mobileView})))}))),"mobile"===Object(h.a)()&&Object(w.c)("div",{className:"mobile-grid-view"},Object(w.c)("div",{className:" window-wrapper"},Object(w.c)("div",{className:"window-editor-wrapper-wrapper"},Z&&Object(w.c)(d.a,{content:Z.content,onLayoutUpdate:Q(window,0),mobileView:t.mobileView}))))))},k=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.window-editor-wrapper-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(f.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\t// height: calc(100% - 165px);\n\t\t\t\t\t\t\t\t\t\theight: calc(100% - 85px);\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")},y=function(t){return"\n\n.draggable-grid-wrapper {\n\t\t// remove transition\n\n\t\theight: calc(100% + ".concat(t.topTab?"0":"44","px);\n\t\ttop: ").concat(t.topTab?"44":"0","px;\n\t\tposition: relative;\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\t.window-wrapper {\n\t\t\t\t\t\t\t//overflow: hidden;\n\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\tcolor: ").concat(f.a.colors.fontEditor,";\n\t\t\t\t\t\t\tbackground: ").concat(f.a.colors.bgEditor,";\n\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.1);\n\t\t\t\t\t\t\toverflow-y: hidden;\n\t\t\t\t\t\t\toverflow-x: hidden;\n\t\t\t\t\t\t\theight:100%;\n\n\t\t\t\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tz-index:2;\n\t\t\t\t\t\t\t\tright: 30px;\n\t\t\t\t\t\t\t\ttop: 10px;\n\t\t\t\t\t\t\t\t.delete-button {display: none;}\n\t\t\t\t\t\t\t\t.add-button {display: none;}\n\t\t\t\t\t\t\t\t.drag-handle {\n\t\t\t\t\t\t\t\t\t\tcursor: grab;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.delete-button svg {\n\t\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.can-add {\n\t\t\t\t\t\t\t\t\t\t.add-button {display: block;}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.can-remove {\n\t\t\t\t\t\t\t\t\t\t.delete-button {display: block;}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t.note-active-ribbon {\n\t\t\t\t\t\t\t\t\t\t//background:").concat(f.a.colors.main,";\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.editor-area\n\t\t\t\t\t\t\t\t.infos-editor-wrapper\n\t\t\t\t\t\t\t\t.title-input-wrapper\n\t\t\t\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(f.a.colors.main,";\n\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t\n}\n")}},99:function(t,n,e){"use strict";e.d(n,"b",(function(){return l})),e.d(n,"a",(function(){return s}));var o=e(11),i=e(12),c=e(19),a=e(15),r=e(428),l=function(t){var n=Object(o.a)({},t),e=n.fileToUpload,c=n.folder,a=n.windowId;Object(i.d)((function(t){t.upload.uploadFile({file:e,folderPath:c,onSuccess:function(n){var e=".concat(n.path,")\n");console.log("inserting file",e),t.ui.note.editorAction.dispatch({type:"insertText",insertText:e,windowId:a})},onProgress:function(n){t.ui.note.editorAction.dispatch({type:"uploadProgress",uploadProgress:n,windowId:a})}})}))},s=function(t){var n=Object(o.a)({},t),e=n.file,i=n.path,l=n.idReq,s=n.onProgress,u=new r(a.a);u.addEventListener("start",(function(t){t.file.meta.idReq=l,t.file.meta.path=i,t.file.meta.token=Object(c.b)()})),u.addEventListener("progress",(function(t){var n=Math.round(t.bytesLoaded/t.file.size*100);s(n)})),u.submitFiles([e])}}},[[494,11,12]]]);
|