tiro-notes 0.30.97-21 → 0.30.97-23
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 +0,0 @@
|
|
|
1
|
-
(this["webpackJsonptiro-notes-client"]=this["webpackJsonptiro-notes-client"]||[]).push([[10],{249:function(t,n){},270:function(t,n){},272:function(t,n){},283:function(t,n){},285:function(t,n){},310:function(t,n){},312:function(t,n){},313:function(t,n){},318:function(t,n){},320:function(t,n){},326:function(t,n){},328:function(t,n){},347:function(t,n){},359:function(t,n){},362:function(t,n){},390:function(t,n,e){"use strict";e.r(n);var o=e(0),i=e.n(o),r=e(9),a=e(1),c=function(t){return s()===t};function l(){return!!/iPad/.test(navigator.platform)||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)}var s=function(){var t=window.innerWidth,n="desktop";return u()||t<1e3&&(n="tablet"),t<500&&(n="mobile"),n},u=function(){return!d()},d=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},p=e(15),f=e(18),b=e(8),g=e.n(b),h=e(205),m=96,v={staticResources:"static",defaultDataFolder:"markdown-notes",configFolder:".tiro",backendStateFolder:".states",cacheFolder:"cache",historyFolder:".history",archiveFolder:".history_archive",uploadFolder:".resources",relativeUploadFolderName:".resources"},w={headerStart:"=== HEADER ===",headerEnd:"=== END HEADER ==="},x={log:{verbose:!1,socket:!1,upload:!1,iframe:!1,eventManager:!1},version:"0.30.97",params:{previewArea:{scrollSpeed:1.3}}};function O(t,n){var e=Object(o.useState)((function(){try{var e=window.localStorage.getItem(t);return e?JSON.parse(e):n}catch(o){return console.log(o),n}})),i=Object(r.a)(e,2),a=i[0],c=i[1];return[a,function(n){try{var e=n instanceof Function?n(a):n;c(e),window.localStorage.setItem(t,JSON.stringify(e))}catch(o){console.log(o)}}]}var j={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",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:"Port",portExpl:"Port used by backend (ex: 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"}},k=e(5),y=e(6),C=e(12),S=e(14),T=(e(252),e(253),e(254),e(255),e.p+"static/media/deco-bg-map.7ca9103b.png"),E=e.p+"static/media/file-solid.6415173e.svg",I=e.p+"static/media/compact-disc-solid.55b6e50c.svg",N=e.p+"static/media/file-pdf-solid.0a9d75fe.svg",F=e.p+"static/media/file-word-solid.9228e1ff.svg",L=e.p+"static/media/file-code-solid.62b467ac.svg",R=e.p+"static/media/book-solid.87f5b737.svg",A=e.p+"static/media/file-excel-solid.217d73db.svg",D=e.p+"static/media/file-video-solid.312288cf.svg",P=e.p+"static/media/file-audio-solid.a76f99f0.svg",M=e.p+"static/media/file-zipper-solid.7db57917.svg",z=e.p+"static/media/file-powerpoint-solid.4d969453.svg",B=e.p+"static/media/link-solid.7b689dbd.svg",_=e.p+"static/media/globe-africa-solid.0ad34146.svg",H=e.p+"static/media/search-solid.cc51b702.svg",U={main:"#E86666",bgPopup:"#FFF",bgPopup2:"#f9f9f9",bgPopup3:"#f5efef",bgTabs:"#D8D8D8",bgTab:"#D0D0D0",fontTab:"#797979",bgTabActive:"#EFEFEF",bgInterface:"#efefef",fontInterface:"#323232",bgInterface2:"#e1e1e1",fontInterface2:"#585757",bgEditor:"#FFFFFF",bgPreview:"#F7F7F7",fontEditor:"#323232",dev:["#C3668B","#A766A7","#CE66E8","#E4E866"],compl:["#11abf8","#3fd7a4"],pal1:["#5c1a70","#ffa67c","#ffda77"],grey1:"#797979",grey2:"red",green:"green",l1:{bg:"#e1e1e1",font:"#615f5f"},l2:{bg:"#eeecec",title:"#797979",text:"#615f5f",date:"#b3b2b2"},editor:{bg:"#ffffff",font:"#525252",interfaceGrey:"#d4d1d1",mobileToolbar:{bg:"#e1e1e1",font:"#747474"}},bg:{l1:"#e1e1e1",dark:"rgb(39, 39, 39)",grey:"rgb(221, 221, 221)",light:"#FFFFFF",black:"#000000"},font:{light:"#FFFFFF",black:"#000000"}},W={els:function(){return{button:"\n\t\tbackground: none;\n border: none;\n ",images:"\n\t\tborder-radius: 7px;\n box-shadow: 0px 0px 10px rgb(0 0 0 / 10%);\n max-width: 100%;\n ",imageInfos:"\n ",redButton:"\n\t\t\tborder: none;\n\t\t\tbackground: ".concat(U.main,";\n &:hover {\n\t\t\topacity: 0.9;\n\n }\n color: white;\n border-radius: 5px;\n cursor: pointer;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 1px;\n ")}},colors:U,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:T,linkIcon:B,worldIcon:_,fileIcon:E,diskIcon:I,pdfIcon:N,presIcon:z,audioIcon:P,videoIcon:D,excelIcon:A,wordIcon:F,codeIcon:L,bookIcon:R,archiveIcon:M,searchIcon:H},anim:{time:"100ms"}},q=function(t){Object(C.a)(e,t);var n=Object(S.a)(e);function e(){var t;Object(k.a)(this,e);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return(t=n.call.apply(n,[this].concat(i))).canBgClose=!t.props.canBgClose||t.props.canBgClose,t}return Object(y.a)(e,[{key:"render",value:function(){var t=this;return Object(a.d)("div",{className:"popup-wrapper-component"},Object(a.d)("div",{className:"overlay-click-popup",onClick:function(n){t.canBgClose&&t.props.onClose()}}),Object(a.d)("div",{className:"popup-wrapper ".concat(l()?"ipad":"")},Object(a.d)("div",{className:"popupTitle"}," ",this.props.title),Object(a.d)("div",{className:"popupContent"},this.props.children)))}}]),e}(i.a.Component),V=function(t){var n,e=Object(o.useRef)(),i=function(){t.shouldFocus&&e.current.focus()};Object(o.useEffect)((function(){i()}),[t.shouldFocus]),Object(o.useEffect)((function(){i()}),[]);var r="checkbox"===t.type&&(!0===t.value||"true"===t.value),c=t.value;return Object(b.isBoolean)(c)&&(c=""),Object(a.d)("div",{className:"input-component ".concat(t.id?t.id:""," ").concat(t.type)},t.label&&Object(a.d)("span",null,t.label," :"),Object(a.d)("div",{className:"input-wrapper"},"select"!==t.type&&Object(a.d)("input",{ref:e,type:t.type?t.type:"text",value:c,checked:r,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.d)("select",{value:c,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.d)("option",{value:t.key,selected:c===t.key},t.label," ")}))),t.explanation&&Object(a.d)("div",{className:"explanation"}," ",t.explanation," ")))},G=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)}))},J=function(t){var n=t.split("?")[1]||"",e=t.split("?")[0],o=e.replace(/[^\w\s]/gi,"_"),i=n.replace(/[^\w\s]/gi,"_"),r=e.split(".").pop()||"";return((r="."+r.replace(/[^\w\s]/gi,"_")).length>6||r.length<=1)&&(r=""),"".concat(o,"_").concat(i).concat(r)},Y=function(t){return t=(t=(t=t.split("//").join("/")).split("\\").join("/")).split("//").join("/")},K=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],r=i.split("."),a=t.replace(i,""),c="";r.length>1&&(c=r[r.length-1]);var l=i.replace(".".concat(c),"");return{filename:i,extension:c,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}},$=function(t,n){return Y(t+"/")===Y(n+"/")},X=["Az","Crea","Modif"],Z=["alphabetical","created","modified"],Q=function(t,n){var e;switch(Z[n]){case"alphabetical":default:e=Object(b.sortBy)(t,[function(t){return t.realname.toLocaleLowerCase()}]);break;case"created":e=Object(b.sortBy)(t,["created"]).reverse();break;case"modified":e=Object(b.sortBy)(t,["modified"]).reverse()}return e},tt=function(){var t=function(t){var n,e="; ".concat(document.cookie).split("; ".concat(t,"="));return 2===e.length?null===(n=e.pop())||void 0===n?void 0:n.split(";").shift():void 0}("tiro-login-token");return t||""},nt=function(){return"?token=".concat(tt())},et=function(t){!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=/"}("tiro-login-token",t,m)};function ot(t,n){var e=Object(o.useState)(n),i=Object(r.a)(e,2),a=i[0],c=i[1],l="/".concat(v.configFolder,"/").concat(v.backendStateFolder,"/").concat(t,".md");'[BACKEND STATE] "'.concat(t,'" clientApi not loaded! Persistance system will not work correctly');Object(o.useEffect)((function(){s()}),[]);var s=function(){$o().then((function(t){t.file.getContent(l,(function(t){var n=JSON.parse(t);c(n)}))}))};return[a,function(t){c(t),$o().then((function(n){n.file.saveContent(l,JSON.stringify(t))}))},s]}var it={title:"",key:"",path:""},rt=function t(n,e){for(var o,i=0;i<e.length;i++)if($(e[i].path,n)){o=Object(b.cloneDeep)(e[i]);var r=e[i].children;if(Object(b.isArray)(r))for(var a=0;a<r.length;a++){var c=t(r[a].path,e);c&&(o.children[a]=c)}}return o},at=function(t,n){for(var e="add",o=0;o<n.length;o++)$(t.path,n[o].path)&&(n[o]=t,e="update");return"add"===e&&n.push(t),n},ct={title:".trash",key:"/.tiro/.trash",path:"/.tiro/.trash"},lt=e(20),st=e.n(lt),ut={img:st()().find(".").then("jpg").or("jpeg").or("png").or("gif").or("webm").or("svg").or("webp"),imgMdConfig:st()().anythingBut("[]|").maybe("|").beginCapture().anythingBut("[]|").endCapture().maybe("|").beginCapture().anythingBut("[]|").endCapture(),customTag:/\[\[[a-zA-Z0-9-\ _\/]*\]\]/},dt={metas:st()().find(w.headerStart).beginCapture().anythingBut("").endCapture().then(w.headerEnd),titleHtml:/<(title)[^>]*>([^<]*)<\/\1>/gi,metasHtml:/<meta[^>]*(name|property)="([^"]*)"[^>]*content="([^"]*)"[^>]*>/gi,externalLink3:/https?:\/\/((www\.)?[a-z\xc0-\xfaA-Z0-9@:%._\+~#=]{1,256})\b(\/[a-z\xc0-\xfaA-Z0-9()@:%_\-\+.,~#?&=]*\/)?([-a-zA-Z\xc0-\xfa0-9()@:%_\-\+.,~#?&\/=]*)\/(\n| |$)/gim,externalLink3Int:/https?:\/\/((www\.)?[a-z\xc0-\xfaA-Z0-9@:%._\+~#=]{1,256})\b(\/[a-z\xc0-\xfaA-Z0-9()@:%_\-\+.,~#?&=]*\/)?([-a-zA-Z\xc0-\xfa0-9()@:%_\-\+.,~#?&\/=]*)\//gim,matchingHtmlTags:/<([^>]*)>([^<]*)<\/\1>/,baliseHtml:st()().find("<").anythingBut("<>").then(">"),ressource:st()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").endCapture().then(")"),ref:st()().find("[").anythingBut("[]").then("](").anythingBut("()").then(")"),extimage:st()().find("![").anythingBut("[]").then("](").beginCapture().then("http").anythingBut("()").then(ut.img).anythingBut("()").endCapture().then(")"),image:st()().find("![").anythingBut("[]").then("](").beginCapture().anythingBut("()").then(ut.img).anythingBut("()").endCapture().then(")"),fullImageMd:st()().beginCapture().find("![").anythingBut("[]").then("](").anythingBut("()").then(ut.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture:st()().find("![").beginCapture().anythingBut("[]").endCapture().then("](").beginCapture().anythingBut("()").then(ut.img).anythingBut("()").endCapture().then(")"),imageAndTitleCapture2:/\!\[([^\[\]]+)\]\(([^\(\)]+\.(jpg|jpeg|png|gif|webm|svg|webp))\)/gi,imageAndConfig:st()().find(".beginCapture().anythingBut("()").then(ut.img).anythingBut("()").endCapture().then(")"),searchlink:st()().find("[search|").beginCapture().anythingBut("[]").endCapture().then("]"),linklink:st()().find("[link|").beginCapture().anythingBut("[]").endCapture().then(" ").beginCapture().then("/").anythingBut("[]").endCapture().then("]"),latexTag:st()().find("[[latex]]").beginCapture().anythingBut("").endCapture().then("[[latex]]"),scriptTag:st()().find("[[script]]").beginCapture().anythingBut("").endCapture().then("[[script]]"),userCustomTagFull:st()().find(ut.customTag).beginCapture().anythingBut("").endCapture().then(ut.customTag),userCustomTagFull2:st()().beginCapture().beginCapture().find(ut.customTag).endCapture().anythingBut("").beginCapture().then(ut.customTag).endCapture().endCapture(),userCustomTagFull3:st()().beginCapture().find(ut.customTag).endCapture(),userCustomTag3:st()().beginCapture().then(ut.customTag).endCapture(),userCustomTagManual:ut.customTag,externalLink:st()().find("http").maybe("s").then("://").beginCapture().anythingBut("/ ").endCapture().beginCapture().anythingBut(" ").then("/").beginCapture().anythingBut("? ").endCapture().anythingBut(" \n").then("\\n").endCapture(),url2transform:st()().find("!").beginCapture().find("http").maybe("s").then("://").beginCapture().anything().endCapture().endCapture(),searchFolder:st()().find(" /").anything().endOfLine(),searchFolderNoSpace:st()().find("/").anything().endOfLine(),firstPartImg:st()().find("![").anythingBut("[]").then("]("),hashtag3:st()().find(/[-| |\n]{1}\#([A-z\xc0-\xfa1-9_\-]+)/gi),titleMd:st()().startOfLine().find("#").oneOrMore().then(" ").beginCapture().anythingBut("").endCapture(),scriptHtml:st()().find("<script>").beginCapture().anythingBut("").endCapture().then("<\/script>")},pt=!1,ft=function(t){if(!t)return null;if(t.startsWith(w.headerStart)&&(pt=!0),t.startsWith(w.headerEnd)&&(pt=!1),""===t)return null;if(!pt)return null;var n=t.split(": ");if(2!==n.length)return null;var e=n.shift();if(!e)return null;var o,i=n.join(":").trim();if("created"===e||"modified"===e){o=i,i=parseInt(o).toString()===o?function(t){var n="".concat(t).substr(0,10);return parseInt(n)}(i):i;var r=new Date(i).getTime();isNaN(r)||(i=r)}return{name:e,value:i}},bt=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},gt=function(t){return{file:function(n,e,cb){var o=ti("move-file-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFILE] ".concat(n," -> ").concat(e)),He.emit("moveFile",{initPath:n,endPath:e,idReq:o,token:tt()})},folder:function(n,e,cb){var o=ti("move-folder-get-files");t.eventBus.subscribe(o,cb||function(){}),console.log("[MOVEFOLDER] ".concat(n," -> ").concat(e)),He.emit("moveFolder",{initPath:n,endPath:e,idReq:o,token:tt()})}}},ht=function(t){var n="[FILE API] 005363 ";Object(o.useEffect)((function(){He.on("getFileContent",(function(n){if(n.error)t.eventBus.notify(n.idReq,{error:n.error});else{var e=function(t){var n=t.match(dt.metas),e={};if(n&&n[0])for(var o=n[0].split("\n"),i=0;i<o.length;i++){var r=ft(o[i]);r&&(e[r.name]=r.value)}return{metas:e,content:bt(t,[[dt.metas,""]])}}(n.fileContent);t.eventBus.notify(n.idReq,{content:e.content})}}))}),[]);var e=Object(o.useRef)("");return{getContent:function(n,cb,e){var o=mt(n),i=ti("get-file-content");t.eventBus.subscribe(i,(function(t){t.error&&e&&e.onError?e.onError(t.error):!t.error||e&&e.onError?t.error||cb(t.content):cb(t.error)})),He.emit("askForFileContent",{filePath:o,token:tt(),idReq:i})},saveContent:function(n,o,i){var r=!(!i||!i.history)&&i.history,a=(!i||!i.withMetas||i.withMetas,mt(n));He.emit("saveFileContent",{filePath:a,newFileContent:o,token:tt()}),r&&(n!==e.current&&$o().then((function(t){var e=t.ui.browser.folders.current.get;if(e===function(t){var n=t.match(/(.*)[\/\\]/),e=n?n[1]+"/":"";return Y(e)}(n)){var o,i="",r=t.ui.windows.active.get();if(r)i=(null===(o=r.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=ti("delete-file");console.log("".concat(n," delete file ").concat(e.path)),t.eventBus.subscribe(o,cb),He.emit("onFileDelete",{filepath:e.path,idReq:o,token:tt()})},move:gt({eventBus:t.eventBus}).file,create:function(e,cb){var o=ti("create-file");console.log("".concat(n," create file in ").concat(e)),t.eventBus.subscribe(o,cb),He.emit("createNote",{folderPath:e,idReq:o,token:tt()})}}},mt=function(t){return t.replace(dt.linklink,"$2/$1")},vt=e(62),wt=e(87),xt=function(){var t=Object(wt.a)(Object(vt.a)().mark((function t(n){return Object(vt.a)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,e){var o={},i=[];$o().then((function(e){e.search.word("#",n,(function(n){var e=[],r={};console.log(n),Object(b.each)(n,(function(t,n){var i={file:t.file,titleName:""};Object(b.each)(t.results,(function(t,n){var a=[],c=t.match(dt.titleMd);if(c&&c[0]){var l=c[0].split("#").join("").trim();i.titleName=l}var s=t.match(dt.hashtag3);Object(b.each)(s,(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(b.cloneDeep)(i)),o[t].lines.push(n),o[t].lines=Object(b.uniq)(o[t].lines);var e=i.file.name+"-"+i.titleName;r[e]||(r[e]=[]),r[e].push(o[t].id),a.push(o[t])})),Object(b.each)(a,(function(t,n){Object(b.each)(a,(function(o,i){if(n!==i){var r=t.id,a=o.id,c="".concat(r,"-").concat(a),l="".concat(a,"-").concat(r);-1===e.indexOf(c)&&-1===e.indexOf(l)&&e.push(c)}}))}))}))})),Object(b.each)(o,(function(t){i.push(t)}));var a={nodesObj:o,nodesArr:i,edges:e};console.log(22232,a),t(a)}))}))})));case 1:case"end":return t.stop()}}),t)})));return function(n){return t.apply(this,arguments)}}(),Ot=function(t){var n="[SEARCH API] 00563 ",e=Object(o.useState)(""),i=Object(r.a)(e,2),a=i[0],c=i[1];Object(o.useEffect)((function(){He.on("getWordSearch",(function(n){t.eventBus.notify(n.idReq,n.result)}))}),[]);var l=function(e,cb){!function(e,cb,o){var i=ti("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)})),He.emit("searchFor",{term:e,token:tt(),type:o,idReq:i})}(e,cb,"text")};return{files:{search:l},word:function(e,o,cb){var i=ti("search-word-");console.log("".concat(n," searching WORD ").concat(e)),t.eventBus.subscribe(i,(function(t){cb(t)})),He.emit("searchWord",{word:e,folder:o,token:tt(),idReq:i})},hashtags:function(t,cb){xt(t).then((function(t){cb(t)}))},ui:{search:function(t){$o().then((function(n){n.ui.browser.files.set([]),c(t),l(t,(function(t){n.ui.browser.files.set(t)}))}))},term:{set:c,get:a}}}},jt=e(258),kt=function(t){var n=Object(p.a)({},t).eventBus;Object(o.useEffect)((function(){He.on("getUploadedFile",(function(t){n.notify(t.idReq,t)}))}),[]);var e={uploadFile:function(t){var e=ti("upload-file");n.subscribe(e,(function(n){delete n.idReq,t.onSuccess(n)})),function(t){var n=Object(p.a)({},t),e=n.file,o=n.path,i=n.idReq,r=n.onProgress,a=new jt(_e);a.addEventListener("start",(function(t){t.file.meta.idReq=i,t.file.meta.path=o,t.file.meta.token=tt()})),a.addEventListener("progress",(function(t){var n=Math.round(t.bytesLoaded/t.file.size*100);r(n)})),a.submitFiles([e])}({file:t.file,path:t.folderPath,idReq:e,onProgress:function(n){t.onProgress&&t.onProgress(n)}})}};return e},yt=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ct=/([^\s,]+)/g,St=e(10),Tt=function(t){Object(C.a)(e,t);var n=Object(S.a)(e);function e(t,o){var i;return Object(k.a)(this,e),(i=n.call(this)).match=t,i.replacement=o,i}return Object(y.a)(e,[{key:"toDOM",value:function(){return this.replacement(this.match)}}]),e}(St.g),Et=function(t,n){return new St.e({regexp:t,decoration:function(t){return St.a.widget({widget:new Tt(t,n)})}})},It=function(t){return St.f.fromClass(function(){function n(e){Object(k.a)(this,n),this.decorations=void 0,this.decorations=Et(t.pattern,t.replacement).createDeco(e)}return Object(y.a)(n,[{key:"update",value:function(n){try{this.decorations=Et(t.pattern,t.replacement).updateDeco(n,this.decorations)}catch(e){console.warn("[ERROR VIEWPLUGIN CM]",e,n)}}}]),n}(),{decorations:function(t){return t.decorations},provide:function(n){return St.c.atomicRanges.of((function(e){var o,i,r=(null===(o=e.plugin(n))||void 0===o?void 0:o.decorations)||St.a.none;return null!==(i=t.options)&&void 0!==i&&i.isAtomic||(r=St.a.none),r}))}})},Nt=function(t,n,e){return'<a class="title-search-link preview-link" data-file="'.concat(t,'" data-folder="').concat(n,'" data-windowid="').concat(e,'">').concat(t,"</a>")},Ft=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(W.assets.worldIcon,");\n\t\t}\n\t\t").concat(t,".search-link {\n\t\t\t\tcolor: ").concat(W.colors.main,";\n\t\t\t\tbackground-image: url(").concat(W.assets.searchIcon,");\n\t\t}\n\t\t").concat(t,".title-search-link {\n\t\t\t\tcolor: ").concat(W.colors.main,";\n\t\t\t\tbackground-image: url(").concat(W.assets.linkIcon,");\n\t\t\t\tcursor: pointer;\n\t\t}\n\t\t").concat(t,".resource-link {\n\t\t\t\tcolor: ").concat(W.colors.main,";\n\t\t} ")},Lt=function(t){var n=t.dataset.file,e=t.dataset.folder,o=""===t.dataset.windowid?"active":t.dataset.windowid;n&&e&&$o().then((function(t){t.ui.browser.goTo(e,n,{openIn:o})}))},Rt=null,At=null,Dt=!1,Pt="[LATEX]",Mt=x.log.verbose,zt=function(t,n){var e=document.createElement("script");e.src=t,e.crossorigin="anonymous",document.body.appendChild(e),e.onload=function(){n()}};Dt||(zt("https://cdn.jsdelivr.net/npm/katex@0.15.2/dist/katex.min.js",(function(){zt("https://cdn.jsdelivr.net/npm/katex@0.16.2/dist/contrib/auto-render.min.js",(function(){Dt=!0,Rt=window.katex,At=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 Bt=Object(b.debounce)((function(){Mt&&console.log(Pt,"REFRESH"),_t(".render-latex")}),100),_t=function(t){if(At){var n=document.querySelectorAll(t);if(!n)return console.warn(Pt,"no el found :",t);Mt&&console.log(Pt,n),Object(b.each)(n,(function(t){At(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})}))}},Ht=e(259);Ht.setOptions({gfm:!0,breaks:!0,headerPrefix:"t-"});var Ut=function(t,n,e){var o=t,i=o.match(n)||"";return Object(b.each)(i,(function(t){o=o.replace(t,e(t))})),o},Wt=function(t,n,e){var o=t,i=n.replace("[[","").replace("]]",""),r="(?:\\[\\[".concat(i,"\\]\\])((?:[^]*))(?:\\[\\[").concat(i,"\\]\\])"),a=new RegExp(r,"gm"),c=o.match(a)||"";if(c[0]){for(var l=c[0].split(n),s=[],u=0;u<l.length;u++){var d=l[u];""!==d&&s.push(d)}for(var p=0;p<s.length;p++){s[p];if(p%2===0)try{s[p]=e(s[p])}catch(b){console.warn("[REPLACE CUSTOM MD TAGS] error: ".concat(b),s[p])}}var f=s.join("");o=o.replace(a,f)}return o},qt=function t(n,e){var o=!1;if(Object(b.each)(n,(function(t){t.id===e&&(o=!0)})),o){var i=!1,r=[e[e.length-2],e[e.length-1]],a=e.slice(0,-2),c=parseInt(r[1]);return"-"!==r[0]||isNaN(c)||(i=!0),i?e="".concat(a,"-").concat(c+1):e+="-1",t(n,e)}return e},Vt=e(206),Gt=e(34),Jt=function(t,n){var e="render-react-wrapper-".concat(G()),o=function(){var n=Yt(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},Yt=function(t,n){return n||(n=document.createElement("div")),Object(Vt.createRoot)(n).render(t),n},Kt=(Gt.renderToString,e(88)),$t=e(207),Xt=e(208),Zt=function(t){Object(C.a)(e,t);var n=Object(S.a)(e);function e(){var t;Object(k.a)(this,e);for(var o=arguments.length,i=new Array(o),r=0;r<o;r++)i[r]=arguments[r];return(t=n.call.apply(n,[this].concat(i))).size=t.props.size?t.props.size:1,t.isLocal=!t.props.name.startsWith("fa"),t}return Object(y.a)(e,[{key:"render",value:function(){return Object(a.d)("span",{style:{transform:"scale(".concat(this.size,")"),display:"inline-block"}},!this.isLocal&&Object(a.d)($t.a,{icon:Xt[this.props.name],color:this.props.color||"black",size:"1x"}),this.isLocal&&Object(a.d)("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}(i.a.Component),Qt=i.a.memo(Zt,(function(t,n){return JSON.stringify(t)===JSON.stringify(n)})),tn=function(t){var n=Object(p.a)({},t),e=n.design,i=n.colors,r=n.size;e||(e="horizontal");var c=!("popup"in t)||t.popup,l=Object(Kt.a)("button.toolbar-button{position:relative;&.active{svg{color:",i?i[1]:W.colors.main,";}}svg{transform:scale(",r||1.3,");color:",i?i[0]:W.colors.editor.interfaceGrey,";&:hover{color:",i?i[1]:W.colors.main,";}}}","");return Object(o.useMemo)((function(){return Object(a.d)("div",{className:l},Object(a.d)("ul",{className:"buttons-toolbar-component ".concat(t.class," ").concat(e," ").concat(c?"with-popup":"no-popup")},t.buttons.map((function(t,n){var e;return t.action&&Object(a.d)("li",{className:"".concat(t.class," btn-").concat(null===(e=t.title)||void 0===e?void 0:e.toLowerCase()),title:t.title,key:n},Object(a.d)(en,t))}))))}),[t.buttons])},nn=i.a.memo(tn,(function(t,n){return!1})),en=function(t){var n=Object(a.d)(i.a.Fragment,null);t.title&&(n=Object(a.d)(i.a.Fragment,null,t.title)),t.icon&&(n=Object(a.d)(Qt,{name:t.icon})),t.customHtml&&(n=t.customHtml);var e="toolbar-button ".concat(t.class&&t.class," ").concat(t.active&&"active");return Object(a.d)("button",{className:e,onClick:function(n){t.action&&t.action(n)}},Object(a.d)("div",{className:"inside-html-wrapper"},n),Object(a.d)("div",{className:"button-hover-popup "},t.title))},on=e(13),rn=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 r=e[i],a=!1;if(i.endsWith("-once")&&(i=i.replace("-once",""),a=!0),i===t.subId)try{r(t.data),a&&o("".concat(i,"-once"))}catch(c){n&&console.log("".concat(n," error with function"),c)}}},subscribe:function(t,cb){e[t]=cb},subscribeOnce:function(t,cb){var n="".concat(t,"-once");e[n]=cb},unsubscribe:o}},an="[IFRAME PARENT] 00563",cn=x.log.iframe,ln=rn({headerLog:an}),sn=ln.notify,un=ln.subscribe,dn=ln.unsubscribe;window.addEventListener("message",(function(t){t.data.subId&&(cn&&console.log(an,"parent <== iframe",t.data.data),sn(t.data))}));var pn={subscribe:un,unsubscribe:dn,send:function(t,n){t&&t.contentWindow&&(cn&&console.log(an,"parent ==> iframe",n),t.contentWindow.postMessage(n,"*"))}},fn=function(t){return'\n<html>\n\t\t<div id="content-wrapper">\n\t\t\t\t'.concat(t,'\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(ai(),'"\n\t\t\t\tconst IMPORTED_login_token = "').concat(tt(),'"\n\t\t\t\tconst IMPORTED_replaceCustomMdTags = ').concat(Wt.toString(),"\n\t\t\t\tconst IMPORTED_unescapeHtml = ").concat(Do.toString(),"\n\t\t\t\tconst IMPORTED_createEventBus = ").concat(rn.toString(),"\n\t\t\t\tconst IMPORTED_generateUUID = ").concat(G.toString(),"\n\t\t\t\tconst IMPORTED_getRessourceIdFromUrl = ").concat(J.toString(),"\n\t\t\t\tconst IMPORTED_bindToElClass = ").concat(zo.toString(),"\n\t\t\t\tconst main = ").concat(bn.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")},bn=function(t){var n,e="[IFRAME child] 00564",o={file:null,frameId:"",reloadCounter:0,windowId:"",innerTag:"",tagName:"",tagContent:"",loginToken:t.loginToken,backendUrl:t.backendUrl},i=function(t){if(""===o.frameId)return console.warn(e,"NO FRAME ID, CANNOT SEND TO PARENT");var n={subId:o.frameId,data:t};window.parent.postMessage(n,"*")},r=function(t){var n={error:"CUSTOM TAG/SCRIPT ERROR: ".concat(t)};i({action:"iframeError",data:n})},a=function(t){var n=document.getElementById("content-wrapper");if(!t){if(!n||0===n.clientHeight)return;t=n.clientHeight+20}i({action:"resize",data:{height:t}})},c=function(){var t=document.body,n=t.requestFullScreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullScreen;n&&n.call(t)},l=t.createEventBus({headerLog:"[FRAME API] 00567"}),s=l.subscribeOnce,u=l.notify,d=function(t,n){var o;t.includes(".js")?(o=document.createElement("script")).src=t:t.includes(".css")&&((o=document.createElement("link")).href=t,o.rel="stylesheet",o.type="text/css"),o.onload=function(){n()};var i=document.getElementById("external-ressources-wrapper");if(!i)return console.error(e,"could not load ".concat(t," because ressource wrapper was not detected"));i.appendChild(o)},p=function(n){var e="?token=".concat(t.loginToken);return"".concat(t.backendUrl,"/static").concat("/.tiro/cache/ctag-ressources/").concat(t.getRessourceIdFromUrl(n)).concat(e)},f=function(t,cb){for(var n=0,o=function(){if(++n===t.length)try{cb&&cb()}catch(o){console.error(e,"ERROR LoadScript Callback : ".concat(o))}},i=function(n){var i=t[n],r=p(i),a=!0===window.disableCache,c=function(){b("ressource.download",[i,"/.tiro/cache/ctag-ressources/"],(function(){d(r,(function(){o()}))}))};a?(console.warn(e,"CACHE DISABLED, DOWNLOADING RESSOURCES EVERYTIME!"),c()):function(t,n,e){try{var o=new XMLHttpRequest;o.open("HEAD",t,!1),o.send(),404!==o.status?n():e()}catch(i){e(i)}}(r,(function(){d(r,(function(){o()}))}),(function(){c()}))},r=0;r<t.length;r++)i(r)},b=function(n,e,cb){if(!e||!n||e.constructor!==Array||"string"!==typeof n)return r("Call Api : ".concat(n," => wrong arguments type / number(").concat(JSON.stringify({apiName:n,apiArguments:e,cb:cb}),")"));var o="iframe-api-call-".concat(t.generateUUID()," ");s(o,(function(t){cb&&cb(t)})),i({action:"apiCall",data:{reqId:o,apiName:n,apiArguments:e}})},g={version:1.1,call:b,utils:{getInfos:function(){return o},loadCachedRessources:f,getCachedRessourceUrl:p,loadScripts:function(t,cb){f(t,cb)},loadRessources:function(t,cb){f(t,cb)},loadScriptsNoCache:function(t,cb){for(var n=0,o=0;o<t.length;o++){var i=t[o],r=document.createElement("script");r.src=i,r.onload=function(){if(++n===t.length)try{cb&&cb()}catch(o){console.error(e,"ERROR LoadScript Callback : ".concat(o))}};var a=document.getElementById("external-ressources-wrapper");a&&a.appendChild(r)}},resizeIframe:a,fullscreenIframe:c,canScrollIframe:function(t){i({action:"canScrollIframe",data:{status:t}})},loadCustomTag:function(t,n,e){var o=g.utils.createDiv(),i=o.div,r=o.updateContent;e||(e={}),e.base_url=t.split("/").slice(0,-1).join("/");var a=!0;return!1===e.padding&&(a=e.padding),g.utils.loadScripts([t],(function(){var t=window.initCustomTag("".concat(n),e);a&&(t='<div class="with-padding" style="padding: 0px 15px;">'.concat(t,"</div>")),r(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=g,n={init:function(n){o.frameId=n.frameId,o.innerTag=n.innerTag,o.tagContent=n.tagContent,o.tagName=n.tagName,o.file=n.file,o.reloadCounter=n.reloadCounter,o.windowId=n.windowId;var i,c=document.getElementById("content-wrapper");if(c){var l=t.unescapeHtml(c.innerHTML),s=(i=l,t.replaceCustomMdTags(i,"[[script]]",(function(t){var n="".concat(t);try{return new Function(n)()}catch(o){console.warn(e,"[SCRIPT] error: ".concat(o),n),r("".concat(o,' in Code "').concat(n,'"'))}})));c.innerHTML=s,setTimeout((function(){a()}),100),t.bindToElClass("title-search-link",(function(t){var n=t.dataset.file,e=t.dataset.folder,o=t.dataset.windowid;g.call("ui.browser.goTo",[e,n,{openIn:o}])}))}},askFullscreen:c,apiAnswer:function(t){var n={subId:t.reqId,data:t.data};u(n)}},window.onmessage=function(t){var e=t.data;if(e)for(var o in n)n&&n[o]&&o===e.action&&n[o](t.data.data)},g};function gn(cb,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],e={leading:!1,trailing:!0};n&&(e.leading=n);var i=Object(o.useRef)(cb),r=hn();return Object(o.useEffect)((function(){i.current={cb:cb,delay:t}})),Object(o.useCallback)(g.a.debounce((function(){var n;i.current.delay===t&&r()&&(n=i.current).cb.apply(n,arguments)}),t,e),[t,g.a.debounce])}function hn(){var t=Object(o.useRef)(!0);return Object(o.useEffect)((function(){return function(){t.current=!1}}),[]),function(){return t.current}}var mn=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),i=e[0],c=e[1],l=Object(o.useState)(!1),u=Object(r.a)(l,2),d=u[0],p=u[1];Object(o.useEffect)((function(){c(t.title)}),[t.title]);var f=gn((function(n){0!==n.length&&"mobile"===s()&&(p(!1),t.onEdited(t.title,i))}),1e3);return Object(a.d)("div",{className:"title-input-wrapper"},Object(a.d)("input",{className:"big-title",type:"text",value:i,onChange:function(t){var n=function(t){return t.replace(/[^\w\s\_\-]/gi,"")}(t.target.value);c(n),p(!0),f(n)},onKeyDown:function(n){if("Enter"===n.key){if(i.length<3)return;t.onEdited(t.title,i),p(!1)}}}),d&&Object(a.d)("div",{className:"press-to-save"},Object(a.d)(Qt,{name:"faCircle",color:W.colors.main,size:.7})))},vn=i.a.memo(mn,(function(t,n){var e=!1;return t.title!==n.title&&(e=!1),e})),wn=e(209),xn=e(4),On=e(3),jn=e(7),kn=function(t,n){for(var e=document.querySelectorAll(t),o=function(t){var o=e[t];null===o||void 0===o||o.addEventListener("click",(function(t){n(o)}))},i=0;i<e.length;i++)o(i)},yn=function(){setTimeout((function(){kn(".cm-mdpreview-image .enlarge",(function(t){var n;if(t){var e=null===(n=t.parentNode.querySelector("img"))||void 0===n?void 0:n.src;Object(b.isString)(e)&&e.startsWith("http")&&(e=e.replace(nt(),""),Xo((function(t){t.ui.lightbox.open(0,[e])})))}}))}),1e3)},Cn={LatexMdEl:xn.a.define()},Sn={resolve:"LatexMdEl"},Tn={defineNodes:["LatexMdEl"],parseInline:[{name:"MdCustomTagsParser",parse:function(t,n,e){return 36===n?t.addDelimiter(Sn,e,e+1,!0,!0):-1},after:"Emphasis"}],props:[Object(xn.c)({LatexMdEl:Cn.LatexMdEl})]},En=function(t){Object(C.a)(e,t);var n=Object(S.a)(e);function e(t){var o;return Object(k.a)(this,e),(o=n.call(this)).str=t,o}return Object(y.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=function(t){var n=t=t.replaceAll("$","");if(!Rt)return n;try{window.ka=Rt,n=Rt.renderToString(t)}catch(e){Mt&&console.log("LATEX ERR:",e)}return n}(this.str);return t.innerHTML=' <div class="latex-height" >'.concat(n,"</div> "),t}}]),e}(St.g);function In(t,n){var e,o=[],i=Object(On.a)(t.visibleRanges);try{for(i.s();!(e=i.n()).done;){var r=e.value,a=r.from,c=r.to;Object(jn.B)(t.state).iterate({from:a,to:c,enter:function(n){if("LatexMdEl"===n.name){var e=t.state.doc.sliceString(n.from,n.to),i=St.a.widget({widget:new En(e),side:1});o.push(i.range(n.from))}}})}}catch(l){i.e(l)}finally{i.f()}return St.a.set(o)}var Nn=function(t){return St.f.fromClass(function(){function n(e){Object(k.a)(this,n),this.decorations=void 0,this.decorations=In(e,t.file)}return Object(y.a)(n,[{key:"update",value:function(n){(n.docChanged||n.viewportChanged)&&(this.decorations=In(n.view,t.file))}}]),n}(),{decorations:function(t){return t.decorations},eventHandlers:{mousedown:function(n,e){var o=n.target;if(function(t){t.classList.contains("title-search-link")&&Lt(t)}(o),o.classList.contains("actionable-title")){var i=o.innerHTML.replace(/^#{1,6} /,"");t.onTitleClick(i)}}}})},Fn=function(){return Object(wn.a)({theme:"light",settings:{background:"#ffffff",foreground:"#4D4D4C",caret:"#AEAFAD",selection:"#D6D6D6",selectionMatch:"#D6D6D6",gutterBackground:"#FFFFFF",gutterForeground:"#4D4D4C",gutterBorder:"#ddd",lineHighlight:"#fff"},styles:[{tag:xn.e.comment,color:"#787b80"},{tag:xn.e.definition(xn.e.typeName),color:"#194a7b"},{tag:xn.e.typeName,color:"#194a7b"},{tag:xn.e.tagName,color:"#008a02"},{tag:xn.e.variableName,color:"#1a00db"},{tag:xn.e.heading,color:W.colors.main},{tag:Rn.Image,color:"red",class:"tiro-image"},{tag:Cn.LatexMdEl,class:"cm-mdpreview-latex-code mdpreview-source"},{tag:xn.e.heading1,class:"actionable-title h1"},{tag:xn.e.heading2,class:"actionable-title h2"},{tag:xn.e.heading3,class:"actionable-title h3"},{tag:xn.e.heading4,class:"actionable-title h4"},{tag:xn.e.heading5,class:"actionable-title h5"},{tag:xn.e.heading6,class:"actionable-title h6"},{tag:xn.e.content,fontSize:"10px"}]})},Ln={ImageTwo:xn.a.define()},Rn=(Object(xn.c)({ImageTwo:Ln.ImageTwo,"Strikethrough/...":Ln.ImageTwo}),{ListItem:xn.a.define(),headingMark:xn.a.define(),LinkReference:xn.a.define(),Image:xn.a.define(),LinkTitle:xn.a.define(),LinkLabel:xn.a.define(),Link:xn.a.define(),LinkMark:xn.a.define(),BulletList:xn.a.define()}),An=(Object(xn.c)({LinkReference:Rn.LinkReference,ListItem:Rn.ListItem,Link:Rn.Link,Image:Rn.Image,LinkTitle:Rn.LinkTitle,LinkLabel:Rn.LinkLabel,LinkMark:Rn.LinkMark,BulletList:Rn.BulletList}),"[Code Mirror]"),Dn=x.log.verbose,Pn=function(t,n){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Dn&&console.log(An," update cursor",n,t);try{e&&t.view.dispatch({selection:{anchor:n,head:n},scrollIntoView:!0})}catch(o){console.warn(An,"update Cursor error",o)}},Mn=0,zn=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,r=0,a=0;a<o.length&&(i+=o[a].length)<e;a++)r=a;Mn=r},Bn={getEditorInfos:function(t){var n=t,e=Math.round(n.viewState.pixelViewport.top),o=n.lineBlockAtHeight(e),i=n.state.doc.lineAt(o.from).number,r=n.contentHeight,a=n.viewState.editorHeight,c=(r-a)/100;return{viewportHeight:a,contentHeight:r,visibleFirstLine:i,percentPx:c,currentPercentScrolled:n.viewState.pixelViewport.top/c}},getCurrentLineInfos:function(t){var n=t.view.state.doc.lineAt(t.view.state.selection.main.head).number-1,e=function(t){return t.view.state.selection.ranges[0].from}(t),o=t.view.state.doc.toString().split("\n");return{lines:o,currentPosition:e,activeLine:o[n]||"",lineIndex:n}},getScrolledLine:function(t){return zn(t),Mn},updateCursor:Pn,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}})),Pn(t,i,!0)},scrollTo:function(t,n){if(!t.view)return-1;Pn(t,n,!0)},scrollToLine:function(t,n){var e=t.view.state.doc.line(n);Pn(t,e.from,!0)},getCustomTheme:Fn},_n=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},Hn="[TEXT MANIP ACTION]",Un=function(t){var n=Object(o.useRef)(0),e=t.editorRef,i=t.editorRef,r=t.editorRef,a=function(){var o;if("codemirror"===t.editorType){var a=Bn.getCurrentLineInfos(e.current);o=a,n.current=a.currentPosition}else if("monaco-textarea"===t.editorType){var c;if("desktop"===t.deviceType)o=null===(c=i.current)||void 0===c?void 0:c.getCurrentLineInfos(),n.current=o&&o.monacoPosition?o.monacoPosition:0;else o=r.current?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}}(r.current):null,n.current=o&&o.currentPosition?o.currentPosition:0}return o},l=function(o){var a=n.current+o;if("codemirror"===t.editorType)Bn.updateCursor(e.current,a,!0);else if(c("desktop")){var l;null===(l=i.current)||void 0===l||l.editor.setPosition(a)}else{var s=r.current;if(!s)return;s.focus(),setTimeout((function(){s&&(s.selectionStart=a,s.selectionEnd=a)}))}};return{getLineTextInfos:a,resetCursorPosition:l,applyTextModifAction:function(t,n){var e=a();if(!e)return null;console.log(Hn,"applying =>",t,n);var o=function(t,n,cb,e){var o=n.lines;if("^"===t){var i=o[n.lineIndex-1],r=o[n.lineIndex];o[n.lineIndex]=i,o[n.lineIndex-1]=r,cb(-i.length-1)}if("v"===t){var a=o[n.lineIndex+1],c=o[n.lineIndex];o[n.lineIndex]=a,o[n.lineIndex+1]=c,cb(+a.length+1)}if("X"===t){o[n.lineIndex].length;var l=Object(f.a)(o).splice(0,n.lineIndex).join("\n").length+1-n.currentPosition;o[n.lineIndex]="",cb(l)}if("C"===t){var s=o[n.lineIndex].length,u=o[n.lineIndex];o.splice(n.lineIndex,0,u),cb(s+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 d=n.activeLine.trim();if("[x]"===t&&(d.startsWith("- [ ]")||d.startsWith("- [x]")?d.startsWith("- [ ]")?(o[n.lineIndex]=o[n.lineIndex].replace("[ ]","[x]"),cb(0)):d.startsWith("- [x]")?(o[n.lineIndex]=o[n.lineIndex].replace("[x]","[ ]"),cb(0)):cb(0):(o[n.lineIndex]=o[n.lineIndex].replace(d,"- [ ] "+d.replace("-","")),cb(6))),"insertAt"===t&&e&&e.textToInsert&&(Object(b.isNumber)(e.insertPosition)||Object(b.isString)(e.insertPosition))){var p="currentPos"===e.insertPosition?n.currentPosition+1:e.insertPosition,g=o.join("\n");o=[g.slice(0,p),e.textToInsert,g.slice(p)].join("").split("\n")}return o.join("\n")}(t,e,(function(t){console.log(Hn,"applying a decal of cursor of :",t),l(t)}),n);return o}}},Wn=function(t,n){var e=Un({editorType:"monaco-textarea",deviceType:"mobile",editorRef:n.mobileTextarea}),i=e.getLineTextInfos,a=e.resetCursorPosition,c=function(t){var n=Object(o.useState)(0),e=Object(r.a)(n,2),i=e[0],a=e[1];return{saveYTextarea:function(n){var e=t.current?t.current.scrollTop:0;a(n||e)},resetYTextarea:function(){t.current&&(console.log("resetYTextarea",i),t.current.scrollTop=i)}}}(n.mobileTextarea),l=c.saveYTextarea,s=c.resetYTextarea,u=Object(o.useState)(!1),d=Object(r.a)(u,2),p=d[0],f=d[1];Object(b.debounce)((function(){f(!1)}),500);return{onTextareaChange:function(e){console.log("onTextareaChange");var o=e.target.value,r=o[e.target.selectionStart-1]&&o[e.target.selectionStart-1].charCodeAt(0);if(o.length>t.length){var c=i();if(!c)return;o=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("-"),r="";-1!==o&&"- [ ] "!==e?(r=e.substr(0,o+3)+" ] ",_n(r)&&(t.lines[t.lineIndex]=r+t.activeLine,cb(r.length))):-1!==i&&"- "!==e&&"- [ ] "!==e&&(r=e.substr(0,i+1)+" ",_n(r)&&(t.lines[t.lineIndex]=r+t.activeLine,cb(r.length)))}return t.lines.join("\n")}(c,r,(function(t){setTimeout((function(){a(t),s()}))}))}n.onMobileNoteEdition(o)},onTextareaScroll:function(t){if(!p){var n=t.target.scrollTop;l(n),console.log("onTextareaScroll")}}}},qn="",Vn=e(44),Gn=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),i=e[0],c=e[1],l=function(){t.onSubmit(i)};return Object(a.d)(Jn,null,Object(a.d)(q,{title:j.passwordForm.explanation,onClose:function(){t.onClose()}},Object(a.d)("div",null,Object(a.d)(V,{value:i,label:j.setupForm.password,type:"password",shouldFocus:!0,onChange:function(t){c(t)},onEnterPressed:function(){l()}}),Object(a.d)("button",{className:"submit-button",onClick:function(t){l()}},j.passwordForm.submit))))},Jn=Object(Vn.a)("div",{target:"eozyeru0"})(".submit-button{margin-top:10px;",W.els().redButton,";padding:10px 20px;}"),Yn=e(63),Kn=e.n(Yn),$n=function(t,n){var e=Kn.a.generateRSAKey(n,1024),o=Kn.a.publicKeyString(e);return Kn.a.encrypt(t,o)},Xn=function(t,n){var e=n.replace(t,"").length,o=n.length;return Math.round(e/o*100)/100},Zn=function(t){return t>0&&t<=.9},Qn=function(t){var n=!1,e={nb:Xn(/[^0-9]/g,t),up:Xn(/[^A-Z]/g,t),low:Xn(/[^a-z]/g,t),spe:Xn(/[^\/\=\?\+]/g,t)},o=Zn(e.nb)&&Zn(e.up)&&Zn(e.low)&&e.spe>0,i=(t.trim().endsWith("==")||t.trim().endsWith("="),/^[a-zA-Z0-9\/\=\?\+]+$/.test(t)),r=t.length>100;return i&&o&&r&&(n=!0),n},te=function(t){var n=Object(o.useState)(null),e=Object(r.a)(n,2),i=e[0],c=e[1],l=Object(o.useState)(!1),s=Object(r.a)(l,2),u=s[0],d=s[1],p=Object(o.useState)(!1),f=Object(r.a)(p,2),b=f[0],g=f[1],h=Object(o.useState)(null),m=Object(r.a)(h,2),v=m[0],w=m[1],x=function(n){var e=t.fileContent,o=$n(e,n);if("failure"===o.status)w(null);else{console.log("encryption done",o),d(!1);var i=o.cipher;t.onTextEncrypted(i)}},O=function(n){var e=function(t,n){var e=Kn.a.generateRSAKey(n,1024);return Kn.a.decrypt(t,e)}(t.fileContent,n);if("failure"===e.status)w(null),alert("wrong password");else{g(!0),d(!0),console.log("decryption done",e);var o=e.plaintext;t.onTextDecrypted(o)}};return{APasswordPopup:Object(a.d)(Gn,{onClose:function(){c(null)},onSubmit:function(t){var n=i;c(null),w(t),"toEncrypt"===n&&x(t),"toDecrypt"===n&&O(t)}}),askForPassword:i,decryptButtonConfig:{title:"decrypt text",icon:"faUnlock",action:function(){v?O(v):c("toDecrypt")}},encryptButtonConfig:{title:"encrypt text",icon:"faLock",action:function(){v?x(v):c("toEncrypt")}},ifEncryptOnLeave:function(cb){if(u&&v){console.log("[EVENTS EDITOR] shouldEncryptOnLeave");var n=$n(t.fileContent,v);n.cipher&&cb(n.cipher)}w(null),g(!1)},noHistoryBackupWhenDecrypted:b}},ne=function(t){var n=((new Date).getTime()-t.getTime())/1e3,e=604800,o="";if(n<=3600)o="".concat(Math.ceil(n/60)," ").concat(j.minsAgo);else if(n>3600&&n<=86400)o="".concat(Math.ceil(n/3600)," ").concat(j.hoursAgo);else if(n>86400&&n<=e)o="".concat(Math.ceil(n/86400)," ").concat(j.daysAgo);else if(n>e){var i=("0"+t.getDate()).slice(-2),r=j.months[t.getMonth()],a=t.getFullYear().toString();o="".concat(i," ").concat(r," ").concat(a)}return o},ee=function(t){var n=Object(o.useState)([]),e=Object(r.a)(n,2),i=e[0],c=e[1];Object(o.useEffect)((function(){He.emit("askFileHistory",{filepath:t.file.path,token:tt()});var n=He.on("getFileHistory",(function(t){var n=Object(b.orderBy)(t.files,["created"],["desc"]);c(n)}));return function(){He.off(n)}}),[]);var l=Object(o.useContext)(Zo),s=Object(o.useState)(""),u=Object(r.a)(s,2),d=u[0],p=u[1],f=Object(o.useState)(null),g=Object(r.a)(f,2),h=g[0],m=g[1];return Object(a.d)(oe,null,Object(a.d)("div",{className:"history-popup-wrapper"},Object(a.d)(q,{title:"".concat(j.historyPopup.title,'"').concat(t.file.realname,'"'),onClose:function(){t.onClose()}},Object(a.d)("div",{className:"table-wrapper"},Object(a.d)("table",null,Object(a.d)("thead",null,Object(a.d)("tr",null,Object(a.d)("th",null,j.historyPopup.thead.name),Object(a.d)("th",null,j.historyPopup.thead.date))),Object(a.d)("tbody",null,i.map((function(t){return Object(a.d)("tr",{className:"".concat((null===h||void 0===h?void 0:h.path)===t.path?"active":""),onClick:function(){!function(t){l&&l.file.getContent(t.path,(function(n){p(n),m(t)}))}(t)}},Object(a.d)("td",null," ",t.realname," "),Object(a.d)("td",null," ",ne(new Date(t.created||0))," "))}))))),d&&Object(a.d)("div",{className:"note-preview"},Object(a.d)("textarea",{className:"note-preview-textarea",value:d})))))},oe=Object(Vn.a)("div",{target:"ew7e5uv0"})(".history-popup-wrapper .popup-wrapper-component .popup-wrapper{}.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",W.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;}}"),ie=function(t){return Object(a.d)("div",null,Object(a.d)(nn,{class:"mobile-text-manip-toolbar",colors:[W.colors.editor.mobileToolbar.font,W.colors.editor.mobileToolbar.font],buttons:[{icon:"faAngleLeft",action:function(){return t.onButtonClicked("<-")}},{icon:"faAngleRight",action:function(){return t.onButtonClicked("->")}},{icon:"faCheckSquare",action:function(){return t.onButtonClicked("[x]")}},{icon:"faAngleUp",action:function(){return t.onButtonClicked("^")}},{icon:"faAngleDown",action:function(){return t.onButtonClicked("v")}},{icon:"faEraser",action:function(){return t.onButtonClicked("X")}},{icon:"faClone",action:function(){return t.onButtonClicked("C")}}]}))},re=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=(e[0],e[1],t.dir?t.dir:"left"),c=t.maxHeight?t.maxHeight:50;return Object(a.d)("div",{className:"dropdown-wrapper ".concat(i," ").concat(t.hover?"hover-active":"")},Object(a.d)("span",{onMouseEnter:function(){},onClick:function(){},className:"context-menu-wrapper"},Object(a.d)("div",{className:"dropdown-icon"},Object(a.d)(Qt,{name:"faEllipsisH",color:W.colors.l1.font})),Object(a.d)("div",{className:"context-menu",style:{maxHeight:c}},t.children)))},ae=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 o=Object(b.uniqueId)();return Object(a.d)("div",{className:"upload-button-component"},Object(a.d)("input",{className:"input-file-hidden",id:"file-".concat(o),multiple:!0,name:"file-".concat(o),type:"file",capture:"camera"===t.type||"microphone"===t.type,accept:e,onChange:function(n){var e=n.target.files;0!==e.length&&Object(b.each)(e,(function(n){Xo((function(e){e.upload.uploadFile({file:n,folderPath:t.file.folder,onProgress:t.onProgress,onSuccess:t.onSuccess})}))}))}}),Object(a.d)("label",{htmlFor:"file-".concat(o)},Object(a.d)(Qt,{name:n}),Object(a.d)("span",{className:"label-text"},t.label)))},ce=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(W.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")},le=function(t){var n=t.progress,e=n>=0&&n<100;return Object(a.d)(i.a.Fragment,null,e&&Object(a.d)("div",{className:"upload-progress-bar-wrapper"},Object(a.d)("div",{className:"bg-fill",style:{width:"".concat(n,"%")}}),Object(a.d)("div",{className:"label"},n,"% uploaded... ")))},se=e(210),ue=function(t){return t||(t=0),Object(se.isNumber)(t)?t+1:0},de=e(211),pe=e.n(de),fe=(e(375),e(376),"notes-view-type"),be={};window.dbscroll=be;x.log.verbose;var ge=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 be[t]||(be[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}),be[t].els.preview=n,be[t].els.editor=e,be[t].els.scroller=o,be[t]},he=function(t,n){var e=ge(t);if(e.els.editor){n||(n=e.posPercent);var o=e.els.scroller.dataset;o.scrollRefresh||(o.scrollRefresh=1),o.scrollRefresh=parseInt(o.scrollRefresh)+1}},me=function(t,n){var e=ge(t);if(e.els.editor){var o=e.dims.editor;n||(n=e.posPercent);var i=(o.full-o.viewport)/100;e.els.editor.scrollTop=i*n}},ve=function(t,n){var e=ge(t);if(e.els.editor){var o=e.dims.preview;n||(n=e.posPercent);var i=o.full/100,r=Math.round(i*n);e.els.preview.scrollTop=r+e.previewOffsetY}},we=function(t,n){var e=ge(t);if(e.els.editor){var o=e.dims.preview.full/100,i=n-Math.round(o*e.posPercent);e.previewOffsetY=i}},xe={getScrollObj:ge,updateEditorDims:function(t,n){var e=ge(t);e.els.editor&&(e.dims.editor=n)},updatePreviewDims:function(t){var n=ge(t);if(n.els.editor){var e=n.els.preview.querySelector(".simple-css-wrapper").clientHeight,o=n.els.preview.clientHeight;n.dims.preview={viewport:o,full:e}}},updateScrollerDims:function(t){var n=ge(t);if(n.els.editor){var e=n.dims.editor.viewport/n.dims.editor.full||1e7,o=n.dims.preview.viewport/n.dims.preview.full||1e7,i=e<o?e:o,r=n.els.scroller.clientHeight,a=i*r,c={viewport:a=a>r?r:a,full:r};n.dims.scroller=c;var l=n.els.scroller.dataset;l.scrollRefresh||(l.scrollRefresh=1),l.scrollRefresh=parseInt(l.scrollRefresh)+1}},updatePreviewOffset:we,onEditorScroll:function(t,n){var e=ge(t);e.els.editor&&(e.posPercent=n,he(t,n),ve(t,n))},onScrollerScroll:function(t,n){var e=ge(t);e.els.editor&&(e.posPercent=n,me(t,n),ve(t,n))},onPreviewScroll:function(t){var n=ge(t);if(n.els.editor){var e=n.els.preview.scrollTop;we(t,e)}},onWindowLoad:function(t){if(be[t]){var n=ge(t);if(!n.els.editor)return;var e=n.posPercent;he(t,e),me(t,e),ve(t,e)}},scrollEditor:me,scrollPreview:ve,scrollScroller:he},Oe=e(69),je=e.n(Oe),ke=function(t){var n=Object(o.useState)(0),e=Object(r.a)(n,2),i=e[0],c=e[1],l=Object(o.useRef)(null),s=Object(o.useRef)(null),u=function(){var t={maxY:0,y:0,percent:0},n=s.current?s.current:null,e=l.current?l.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(o.useEffect)((function(){var n=s.current?s.current:null;if(n){var e=new MutationObserver((function(n,e){var o,i=Object(On.a)(n);try{for(i.s();!(o=i.n()).done;){if("data-scroll-refresh"===o.value.attributeName){var r=xe.getScrollObj(t.windowId),a=r.dims.scroller.viewport;a<20&&(a=20),b(a);var l=(r.dims.scroller.full-r.dims.scroller.viewport)/100,s=r.posPercent*l;c(s)}}}catch(u){i.e(u)}finally{i.f()}}));return e.observe(n,{attributes:!0}),function(){e.disconnect()}}}),[]);var d=Object(o.useState)(0),p=Object(r.a)(d,2),f=p[0],b=p[1];return Object(a.d)("div",{className:"scrolling-bar-wrapper",ref:s},Object(a.d)(je.a,{onDrag:function(n){xe.onScrollerScroll(t.windowId,u().percent)},onStop:function(){c(u().y)},position:{x:0,y:i},axis:"y",bounds:"parent"},Object(a.d)("div",{ref:l,style:{height:"".concat(f,"px")},className:"scrolling-bar"})))},ye=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),i=e[0],c=e[1],l=Object(o.useState)(0),u=Object(r.a)(l,2),d=(u[0],u[1]),p=Object(o.useRef)(0),h=function(t){t>p.current&&(p.current=t),d(p.current)};Object(o.useEffect)((function(){d(0)}),[t.fileContent]),Object(o.useEffect)((function(){c(t.fileContent)}),[t.fileContent,t.file.path]),Object(o.useEffect)((function(){setTimeout((function(){xe.onWindowLoad(t.windowId)}),500)}),[t.file.path]);var m=Object(o.useState)(-1),v=Object(r.a)(m,2),w=v[0],x=v[1];Object(o.useEffect)((function(){t.lineJumpEvent&&("active"!==t.lineJumpEvent.windowId||t.isActive)&&("active"!==t.lineJumpEvent.windowId&&t.lineJumpEvent.windowId!==t.windowId||(x(t.lineJumpEvent.line),setTimeout((function(){x(-1)}),100)))}),[t.lineJumpEvent]);var O={id:"",line:0,title:""},j=function(n){var e=function(t){for(var n=[],e=t.split("\n"),o=[],i=0;i<e.length;i++){var r=e[i],a=Object(f.a)(r.matchAll(/([#]{1,9})\ (.+)/gi));if(a.length>0){var c=a[0],l=c[2].toLowerCase(),s=i,u=l.trim().split(" ").join("-").replace(/[^a-zA-Z0-9-_\xc0-\xfa]/gi,"");u=qt(o,u),o.push({raw:r,matches:c,id:u,line:s,title:l,ranking:c[1].length}),n.push({id:u,title:l,line:s})}}return n}(i),o=O;if(Object(b.each)(e,(function(t){n>=t.line&&(o=t)})),""!==o.id){var r=".window-id-".concat(t.windowId," #t-").concat(o.id);try{var a,c=null===(a=document.querySelector(r))||void 0===a?void 0:a.offsetTop;Object(b.isNumber)(c)&&(xe.updatePreviewOffset(t.windowId,c),xe.scrollPreview(t.windowId))}catch(l){console.error(l)}}},k=function(cb,t){var n=Object(o.useRef)(cb);return Object(o.useEffect)((function(){n.current=cb})),Object(o.useCallback)(g.a.throttle((function(){return n.current.apply(n,arguments)}),t,{leading:!0,trailing:!1}),[t])}(j,200),y=gn(j,500);return Object(a.d)("div",{className:"dual-view-wrapper view-".concat(t.viewType," device-").concat(s()," window-id-").concat(t.windowId)},Object(a.d)(vo,{windowId:t.windowId,editorType:"codemirror",file:t.file,canEdit:t.canEdit,fileContent:t.fileContent,isActive:t.isActive,jumpToLine:w,posY:0,onTitleClick:function(t){!function(t){k(t),y(t)}(t)},onScroll:function(t){},onUpdateY:function(t){},onMaxYUpdate:h,onFileEdited:function(n,e){t.onFileEdited(n,e),c(e)},onScrollModeChange:function(t){},onViewToggle:function(n){t.onViewChange&&t.onViewChange(n)}}),Object(a.d)(wo,{windowId:t.windowId,file:t.file,posY:0,fileContent:i,onMaxYUpdate:h,yCnt:0,onIframeMouseWheel:function(t){}}),Object(a.d)(ke,{windowId:t.windowId}))},Ce=function(t){var n=Object(o.useContext)(Zo),e=null===n||void 0===n?void 0:n.ui.note.lineJump.get;return Object(a.d)(ye,Object(on.a)({},t,{lineJumpEvent:e}))},Se=function(t){var n=Object(p.a)({},t.content),e=n.file,c=n.view,l=n.active,s=n.i,u=Object(o.useState)(""),d=Object(r.a)(u,2),f=d[0],g=d[1],h=Object(o.useState)(),m=Object(r.a)(h,2),v=m[0],w=m[1];Object(o.useEffect)((function(){var t;w(c),(t=null===e||void 0===e?void 0:e.path,new Promise((function(n,e){Xo((function(e){e.cache.get(fe,(function(e){if(e){var o=e[t];n(o||!1)}}))}))}))).then((function(t){t&&w(t)}))}),[c,null===e||void 0===e?void 0:e.path]);var x=Object(o.useRef)((null===e||void 0===e?void 0:e.path)||"");Object(o.useEffect)((function(){x.current=(null===e||void 0===e?void 0:e.path)||"",y(!1),e&&Xo((function(t){t.file.getContent(e.path,(function(t){g(t),y(!0)})),t.watch.file(e.path,(function(t){if(x.current===t.filePath)return!0===S.current?C.current=t.fileContent:void g(t.fileContent)}))}))}),[null===e||void 0===e?void 0:e.path,f]);var O=Object(o.useState)(!1),j=Object(r.a)(O,2),k=j[0],y=j[1],C=Object(o.useRef)(!1),S=Object(o.useRef)(!1),T=gn((function(){S.current=!1,Object(b.isBoolean)(C.current)||(C.current=!1)}),2e3);return Object(o.useEffect)((function(){e&&l&&Xo((function(t){t.ui.browser.goTo(e.folder,e.name)}))}),[l]),Object(a.d)(i.a.Fragment,null,e&&Object(a.d)("div",{className:"window-editor-wrapper"},Object(a.d)(Ce,{windowId:s,file:e,fileContent:f,isActive:l,canEdit:k,viewType:v,onViewChange:t.onViewChange,onFileEdited:function(t,n){!function(t,n){Xo((function(e){e.file.saveContent(t,n,{history:!0})})),S.current=!0,T()}(t,n)}})))},Te=i.a.memo(Se,(function(t,n){return!1})),Ee={rows:2,cols:4},Ie={m:10,rows:Ee.rows,cols:Ee.cols,decalBottom:10},Ne=function(t){var n=Object(o.useState)([]),e=Object(r.a)(n,2),c=e[0],l=e[1],u=Object(o.useState)([]),d=Object(r.a)(u,2),p=d[0],f=d[1],g=Object(o.useRef)();Object(o.useEffect)((function(){t.grid&&t.grid.layout&&(f(t.grid.layout),l(t.grid.content))}),[t.refresh]),Object(o.useEffect)((function(){E(),j()}),[p]);var h=function(n,e){t.onGridUpdate({layout:n,content:e})},m=function(){var t=c[0].file;if(t){var n=function(t){for(var n=[],e=Ee,o=function(o){for(var i=[],r=function(n){var e=0;Object(b.each)(t,(function(t){for(var i=0;i<t.w;i++)for(var r=0;r<t.h;r++){var a=t.x+i,c=t.y+r;a===n&&c===o&&(e=1)}})),i.push(e)},a=0;a<e.cols;a++)r(a);n.push(i)},i=0;i<e.rows;i++)o(i);for(var r=[-1,-1],a=[-1,-1],c=0;c<e.rows;c++)for(var l=0;l<e.cols;l++)0===n[c][l]&&-1===r[0]&&-1===r[1]&&(r[0]=l,r[1]=c),0===n[c][l]&&(a[0]=l,a[1]=c);var s=a[0]-r[0]+1,u=a[1]-r[1]+1;return{x:r[0],y:r[1],w:s,h:u}}(p),e=Fe({file:t,w:n.w,h:n.h,x:n.x,y:n.y}),o=Object(b.cloneDeep)(p);o.push(e.layout),L(o)&&(f(o),setTimeout((function(){var t=Object(b.cloneDeep)(c);t.push(e.content);var n=I(e.content.i,t);l(n),h(o,n)})),h(o,c))}},v=Object(o.useState)(!1),w=Object(r.a)(v,2),x=w[0],O=w[1],j=function(){O(p.length>1)},k=function(t){var n=Object(b.filter)(Object(b.cloneDeep)(p),(function(n){return n.i!==t})),e=function(t){var n=Ee;return 1===t.length&&(t[0].x=0,t[0].y=0,t[0].h=n.rows,t[0].w=n.cols),t}(n);f(e),setTimeout((function(){var e=Object(b.filter)(Object(b.cloneDeep)(c),(function(n){return n.i!==t}));l(e),h(n,e)})),h(n,c)},y=Object(o.useState)(!1),C=Object(r.a)(y,2),S=C[0],T=C[1],E=function(){var t=0,n=Ie.cols*Ie.rows;Object(b.each)(p,(function(n){t+=n.w*n.h})),T(t!==n)},I=function(t,n){var e=Object(b.cloneDeep)(n);return Object(b.each)(e,(function(n){n.active=n.i===t})),e},N=function(t,n){var e=I(t,c);l(e),h(p,e),n&&(null===P||void 0===P||P.ui.browser.goTo(n.folder,n.name))},F=function(t){g.current=Object(b.cloneDeep)(t)},L=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};!function(){var t=Object(o.useState)(!1),n=Object(r.a)(t,2),e=n[0],i=n[1],a=Object(o.useRef)(0);Object(o.useEffect)((function(){var t=Object(b.debounce)((function(){a.current=a.current+1,i(!0),setTimeout((function(){i(!1)}),200)}),200);return window.addEventListener("resize",(function(){t()})),function(){window.removeEventListener("resize",(function(){t()}))}}),[])}(),Object(o.useEffect)((function(){var t=R.current;if(t)return t.addEventListener("resize",(function(){})),function(){t.removeEventListener("resize",(function(){}))}}),[]);var R=Object(o.useRef)(null),A={width:300,height:300};R.current&&(A.width=R.current.clientWidth,A.height=R.current.clientHeight-Ie.decalBottom);var D=function(t,n){var e=Object(b.cloneDeep)(c);e[n].view=t,l(e),h(p,e)},P=Object(o.useContext)(Zo),M=Object(o.useState)(null),z=Object(r.a)(M,2),B=z[0],_=z[1];Object(o.useEffect)((function(){if("mobile"===s()){var t=null===P||void 0===P?void 0:P.ui.windows.active.get();if(t)_(t);else{var n={layout:p[0],content:c[0]};n.layout&&n.content&&n.layout.i===n.content.i&&(_(n),N(n.content.i))}}}),[t.refresh]);return Object(a.d)("div",{className:"draggable-grid-wrapper"},Object(a.d)("div",{className:"draggable-grid-wrapper-in",ref:R},"mobile"!==s()&&Object(a.d)(pe.a,{className:"draggable-grid",autoSize:!1,layout:p,onLayoutChange:function(t){var n=Object(b.cloneDeep)(t);if(L(n)){var e=function(t){var n=t,e=Ee;return n.length,2===n.length&&(n[0].w===e.cols/2-1&&n[1].w===e.cols/2||n[1].w===e.cols/2-1&&n[0].w===e.cols/2)&&(n[0].w=e.cols/2,n[1].w=e.cols/2),n}(n);F(e),f(e),h(e,c)}else{if(!g.current)return;var o=function(t){var n=t,e=Ee,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(b.cloneDeep)(t),Object(b.each)(o,(function(t,n){t.w=e.cols/2,t.y=0,1===n&&(t.x=e.cols/2)})));return o}(t);o&&F(o);var i=o||g.current,r=Object(b.cloneDeep)(i);Object(b.each)(r,(function(t){t.refresh=ue(t.refresh)})),f(r),h(r,c)}},cols:Ie.cols,compactType:"horizontal",useCSSTransforms:!1,rowHeight:A.height/Ie.rows-Ie.m*(Ie.rows+1),draggableHandle:".drag-handle",width:A.width,margin:[Ie.m,Ie.m]},p.map((function(n,e){return Object(a.d)("div",{key:n.i,className:"\n\t\t\t\t\t\t\t\t\t\t".concat(c[e]&&c[e].active?"active":"","\n\t\t\t\t\t\t\t\t\t\twindow-wrapper\n\t\t\t\t\t\t\t\t"),onClick:function(){c[e]&&!c[e].active&&N(c[e].i,c[e].file)}},function(t,n){return Object(a.d)(i.a.Fragment,null,Object(a.d)("div",{className:"note-active-ribbon"}),Object(a.d)("div",{className:"window-buttons-bar ".concat(S?"can-add":""," ").concat(x?"can-remove":"")},Object(a.d)(nn,{design:"horizontal",popup:!1,buttons:[{icon:"faGripVertical",title:"Move Window",class:"drag-handle",action:function(){}},{icon:"faPlus",title:"Add Window",class:"add-button",action:function(){m()}},{icon:"faPlus",title:"Delete Window",class:"delete-button",action:function(){k(t.i)}}],colors:["#d4d1d1","#615f5f"],size:.8})))}(n),Object(a.d)("div",{className:"note-wrapper"},Object(a.d)(Te,{content:t.grid.content[e]&&t.grid.content[e],onViewChange:function(t){D(t,e)}})))}))),"mobile"===s()&&Object(a.d)("div",{className:"mobile-grid-view"},Object(a.d)("div",{className:" window-wrapper"},Object(a.d)("div",{className:"note-wrapper"},B&&Object(a.d)(Te,{content:B.content,onViewChange:function(t){D(t,0)}}))))))},Fe=function(t){var n=Object(p.a)({},t),e=n.w,o=n.h,i=n.x,r=n.y,a=n.file;o||(o=Ee.rows),e||(e=Ee.cols),i||(i=0),r||(r=0);var c=G();return{layout:{i:c,x:i,y:r,w:e,h:o,minH:1,maxH:2,forceRender:0},content:{i:c,active:!1,file:a,view:"both"}}},Le=function(t){var n=Object(b.cloneDeep)(t);return Object(b.each)(n,(function(t){t.refresh=ue(t.refresh)})),n},Re=function(t){return t.length>15?"".concat(t.substring(0,13),".."):t},Ae=function(t){var n=void 0;return Object(b.each)(t,(function(t,e){t.active&&(n=e)})),n},De=function(t,n){var e=Object(b.cloneDeep)(n);return Object(b.each)(e,(function(n){n.refresh=Object(b.isNumber)(n.refresh)?n.refresh++:1,n.id===t?n.active=!0:n.active=!1})),e},Pe=function(t){if(t.copiedTab){var n=Object(b.cloneDeep)(t.copiedTab);return n.id=G(),n.name=Me(t.copiedTab.name),n}if(t.fullWindowFile){var e=Fe({file:t.fullWindowFile});return{id:G(),name:Re(t.fullWindowFile.name),active:!0,grid:{layout:[e.layout],content:[e.content]}}}},Me=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},ze=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)}},Be=Object(p.a)(Object(p.a)({},x),{},{global:{protocol:"".concat(window.location.protocol,"//"),url:"".concat(window.location.hostname),port:"80"===window.location.port?"":":".concat(window.location.port)}});var _e,He,Ue={upload:{uploadCounter:0,reinit:function(){}},file:{onTitleUpdate:function(t,n){},onFileDelete:function(t){}}},We=i.a.createContext(Ue),qe=function(t){var n=Object(p.a)({},t).tab,e=Object(o.useContext)(Zo),i=Object(o.useState)(Ue),c=Object(r.a)(i,2),l=c[0],s=c[1],u=function(){var t=Object(o.useContext)(Zo),n=Object(o.useState)({name:"",data:{}}),e=Object(r.a)(n,2),i=e[0],a=e[1],c=Object(o.useRef)({});return Object(o.useEffect)((function(){if(t){var cb=c.current[i.name];cb&&cb(t,i.data)}}),[i]),{onNextStateTrigger:function(t){a(t)},addNextStateAction:function(t,cb){c.current[t]=cb}}}(),d=u.onNextStateTrigger,f=u.addNextStateAction;f("refreshFolderList",(function(t,n){var e=t.ui.browser.folders.current.get;e===n.folder&&(t.ui.browser.goTo(e,n.name,{openIn:"activeWindow"}),d({name:"checkIfNoWindows"}))})),f("checkIfNoWindows",(function(t){0===n.grid.content.length&&t.tabs.close(n.id)}));var g=Object(b.cloneDeep)(l);return g.file.onFileDelete=function(t){e&&e.popup.confirm("".concat(j.trashNote),(function(){e.file.delete(t,(function(n){e.ui.windows.getIdsFromFile(t.path),n[n.length-1];var o=n[0];Object(b.each)(n,(function(t){t.modified&&o.modified&&t.modified>o.modified&&(o=t)})),d({name:"refreshFolderList",data:o})}))}))},g.file.onTitleUpdate=function(t,n){e&&e.file.move(t,n,(function(o){var i=null;if(Object(b.each)(o,(function(t){t.path===n&&(i=t)})),i){var r=e.ui.windows.getIdsFromFile(t);e.ui.windows.updateWindows(r,i),d({name:"refreshFolderList",data:i})}}))},g.upload.reinit=function(){var t=Object(b.cloneDeep)(l);delete t.upload.file,s(t)},Object(o.useEffect)((function(){var t=function(t){var o,i=null===(o=function(t){var n=void 0;return Object(b.each)(t.grid.content,(function(t){t.active&&(n=t)})),n||(n=t.grid.content[0]),n}(n))||void 0===o?void 0:o.file;i&&(console.log("003441 dragdrop OR clipboard",t,i.name),e&&e.upload.uploadFile({file:t,folderPath:i.folder,onSuccess:function(t){var n=Object(b.cloneDeep)(l);n.upload.uploadCounter=n.upload.uploadCounter+1,n.upload.file=t,delete n.upload.progress,s(n)},onProgress:function(t){var n=Object(b.cloneDeep)(l);delete n.upload.file,n.upload.progress=t,s(n)}}))},o=function(t){var n=function(n){if(n.preventDefault(),n.dataTransfer&&n.dataTransfer.items){var e=n.dataTransfer.items;if(!e[0])return;for(var o=0;o<e.length;o++)t.onDropped(e[o].getAsFile())}},e=function(t){t.preventDefault(),o()},o=Object(b.debounce)((function(){t.onDragEnd()}),100);return Be.log.upload&&console.log("[UPLOAD] reinit drag/drop events"),window.addEventListener("drop",n),window.addEventListener("dragover",e),function(){window.removeEventListener("drop",n),window.removeEventListener("dragover",e)}}({onDropped:t,onDragEnd:function(){console.log("003442 onDragEnd")}}),i=function(t){var n=function(n){ze(n,(function(n){n&&t.onImagePasted(n)}))};return window.addEventListener("paste",n,!1),function(){window.removeEventListener("paste",n,!1)}}({onImagePasted:t});return function(){i(),o()}}),[t.tab]),Object(a.d)(Ve,null,Object(a.d)("div",{className:"window-grid-wrapper"},Object(a.d)(We.Provider,{value:g},Object(a.d)(Ne,{refresh:n.refresh||0,grid:n.grid,onGridUpdate:t.onGridUpdate}))))},Ve=Object(Vn.a)("div",{target:"ejnwhwz0"})({name:"zk0z9r",styles:"height:100%;.window-grid-wrapper{height:100%;}"}),Ge=e(89),Je=e(213),Ye=e(22),Ke=e(215),$e=function(t){return t.path.substr(0,t.path.length-(t.title.length+1))},Xe=function(t){var n=t.split("/");return n=n.filter((function(t){return""!==t})),console.log(n),n.pop(),"/"+n.join("/")+"/"},Ze=(x.log.verbose,function(t,n,e,o,i){return{label:t,apply:n||t,info:e,detail:i,type:"tag",boost:o||0}}),Qe=function(t){var n=no(t);return[eo,n,to]},to=function(t){var n=t.matchBefore(/\-\-/);if(!t.explicit&&!n)return null;var e="".concat(v.configFolder,"/snippets.md");return new Promise((function(o,i){Xo((function(i){i.file.getContent(e,(function(e){var i=[],r=e.split("\n");Object(b.each)(r,(function(t){var n,e=(t=t.split("\\n").join("\n")).split("|"),o=null===(n=e.shift())||void 0===n?void 0:n.trim(),r=e.join("|").trim();if(r&&o){if(o="--"+o,r.includes("${")){var a=r;try{r=new Function("return `"+a+"`")()}catch(l){console.warn("[Code Mirror]","snippets error: ",l,a)}}var c=r.length>20?"".concat(r.substring(0,20),"..."):r;i.push(Ze(o,r,void 0,void 0,c))}}));var a={from:n?n.from:t.pos,options:i,validFor:/.*/};o(a)}))}))}))},no=function(t){return function(n){var e=n.matchBefore(/\#/);return n.explicit||e?new Promise((function(o,i){Xo((function(i){var r=Xe(Xe(t.folder));i.search.hashtags(r,(function(t){console.log(r,t);var i=[];Object(b.each)(t.nodesArr,(function(t){i.push(Ze(t.name,t.name))}));var a={from:e?e.from:n.pos,options:i,validFor:/.*/};console.log(a),o(a)}))}))})):null}},eo=function(t){var n=t.matchBefore(/\[\[/);return t.explicit||n?new Promise((function(e,o){Xo((function(o){o.files.get("/.tiro/tags",(function(t){var n=[],e=0;Object(b.each)(t,(function(r){var a=r.name.replace(".md",""),c="[[".concat(a,"]]"),l="".concat(c," ").concat(c),s="Insert installed custom tag ".concat(c),u=0;o.file.getContent(r.path,(function(o){var r=o.split("\n"),a="// --insert:",d="// --comment:",p="// --boost:";Object(b.each)(r,(function(t){(t=t.split("\\n").join("\n")).startsWith(a)&&(l=t.replace(a,"")),t.startsWith(d)&&(s=t.replace(d,"")),t.startsWith(p)&&(u=parseInt(t.replace(p,"")))})),n.push(Ze(c,l,s,u)),++e===t.length&&i(n)}))}))}));var i=function(o){var i={from:n?n.from:t.pos,options:o,validFor:/.*/};e(i)}}))})):null},oo={ui_sidebar:!0,ui_filesList_sortMode:2,ui_layout_colors_main:"#E86666",ui_editor_markdown_preview:!0,ui_editor_links_as_button:!0},io="[USER SETTINGS] :",ro=x.log.verbose,ao=function(){var t=ot("user-settings",{}),n=Object(r.a)(t,3),e=n[0],i=n[1],a=n[2],c=Object(o.useState)(0),l=Object(r.a)(c,2),s=l[0],u=l[1],d=Object(o.useRef)([]);Object(o.useEffect)((function(){p()}),[e]);var p=gn((function(){ro&&console.log(io,"UPDATE!",e,s),function(t,n,o){d.current[t]||(d.current[t]=n[o]);var i=e[t];Object(b.isNull)(i)||Object(b.isUndefined)(i)||(""===i&&d.current[t]&&(i=d.current[t]),n[o]=i)}("ui_layout_colors_main",W.colors,"main"),u(s+1)}),1e3),f=function(t,n){He.emit("updateSetupJson",{paramName:t,paramValue:n,token:tt(),idReq:"updateSetupJson-".concat(G())})};return{userSettings:e,userSettingsApi:{updateSetupJson:f,set:function(t,n,o){o||(o={}),o.writeInSetupJson||(o.writeInSetupJson=!1),o.writeInSetupJson&&f(t,"".concat(n)),ro&&console.log(io,"updateUserSettings ".concat(t," to ").concat(n));var r=Object(b.cloneDeep)(e);r[t]=n,i(r)},get:function(t){var n=oo[t],o=n;return t in e&&(o=e[t]),""===o&&(o=n),o},list:function(){var t=[];return Object(b.each)(e,(function(n,e){var o=e;t.push({key:o,val:n})})),t},refresh:{css:{get:s}}},refreshUserSettingsFromBackend:a}},co=It({pattern:dt.externalLink3,replacement:function(t){return lo(t)}}),lo=function(t){var n=[];n=Object(b.isArray)(t)?t:Object(f.a)(t.matchAll(dt.externalLink3))[0];var e=document.createElement("span");if(n.length<3)return e;var o=n[0].slice(0,-1),i=n[1].replace("www.",""),r=n[3],c=n[4],l="linkid".concat(Object(b.random)(0,1e7)),s=l;e.classList.add("link-mdpreview-wrapper"),e.classList.add("link-wrapper");i.length>20&&(i=i.substring(i.length-20));var u=r;""!==u&&u||(u=c),u.length>20&&(u=u.substring(0,20)+""),u=0!==u.length?"".concat(u):"";var d="".concat(i).concat(u),p="".concat(Object(Gt.renderToString)(Object(a.d)(Qt,{name:"faLink",color:W.colors.main}))),g='<span class="link-action link-openwindow" data-link="'.concat(o,'">').concat(Object(Gt.renderToString)(Object(a.d)(Qt,{name:"faExternalLinkAlt"})),"</span>"),h='<span class="link-openpreview link-action" data-id="'.concat(s,'" data-link="').concat(o,'">').concat(Object(Gt.renderToString)(Object(a.d)(Qt,{name:"faEye"})),"</span>"),m='<div class="'.concat(s,' link-iframe-wrapper"></div>'),v='<span class="link-mdpreview-wrapper '.concat(l,'"><a href="').concat(o,'" class="link-mdpreview" title="').concat(o,'" target="_blank" rel="noreferrer">').concat(p," ").concat(d,"</a> ").concat(g," ").concat(h," ").concat(m,"</span>");return e.innerHTML="".concat(v),so(l),e},so=function(t){setTimeout((function(){kn(".".concat(t," .link-openwindow"),(function(t){if(t){var n=t.dataset.link;window.open(n,"popup-preview-link","width=800,height=1000")}})),kn(".".concat(t," .link-openpreview"),(function(t){if(t){var n=t.dataset.link,e=t.dataset.id;!function(t,n){var e=document.querySelector("".concat(t)),o=null===e||void 0===e?void 0:e.querySelector("iframe"),i="<iframe\n\t\t\t\tsrc='".concat(n,"'\n\t\t\t\ttitle='").concat(n,'\'\n\t\t\t\tallowFullScreen\n\t\t\t\tclass="resource-link-iframe small-iframe"\n></iframe>\n');if(e){e.innerHTML=o?"":i;var r=e.classList.contains("big");o?o&&!r?e.classList.add("big"):o&&r&&(e.classList.remove("open"),e.classList.remove("big")):(e.innerHTML=i,e.classList.add("open"))}}(".".concat(e,".link-iframe-wrapper"),n)}}))}),100)},uo="[Code Mirror]",po=x.log.verbose,fo=Object(o.forwardRef)((function(t,n){var e=function(){var t=n.current;return t&&t.state?t:null},i=Object(o.useRef)(null);Object(o.useEffect)((function(){!function(){var n=e();if(window.cmobj=n,!n)return!1;if(t.value===i.current)return!1;if("loading..."===t.value)return!1;if(n.view.state.doc.toString()===t.value)return!1;var o=Bn.getCurrentLineInfos(n).currentPosition;Bn.updateText(n,t.value,o),i.current=t.value}()}),[t.value,t.forceRender]);Object(o.useEffect)((function(){if(po&&console.log(uo,"JUMP to line :",t.jumpToLine),-1!==t.jumpToLine){var n=e();n&&(t.posY<=-10||Bn.scrollToLine(n,t.jumpToLine))}}),[t.jumpToLine]);Object(o.useEffect)((function(){d()}),[t.value]),Object(o.useEffect)((function(){d()}),[]);var c=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],a=e[1];return Object(o.useEffect)((function(){var n=Object(b.debounce)((function(){a(!0),setTimeout((function(){a(!1)}),200)}),200),e=document.querySelector(t);if(e){var o=new ResizeObserver((function(t){n()}));return o.observe(e),function(){o.disconnect()}}}),[]),{resizeState:i}}(".window-id-".concat(t.windowId)),l=c.resizeState;Object(o.useEffect)((function(){d()}),[l]);var s,u,d=function(){var n=e();if(n){var o=Bn.getEditorInfos(n.view);xe.updateEditorDims(t.windowId,{viewport:o.viewportHeight,full:o.contentHeight}),xe.updateScrollerDims(t.windowId)}},p=Nn({file:t.file,onTitleClick:function(n){!function(n){var o=e();if(o){var i=Bn.getCurrentLineInfos(o);po&&console.log(uo,"CLICK ON TITLE DETECTED",n,i),t.onTitleClick(i.lineIndex)}}(n)}}),f=[Object(Ye.a)({override:Qe(t.file)}),St.c.domEventHandlers({scroll:function(t,n){},wheel:function(n,e){var o=Bn.getEditorInfos(e);xe.onEditorScroll(t.windowId,o.currentPercentScrolled),t.onScroll()}})],g={base:Ge.markdownLanguage,codeLanguages:Je.a,extensions:[]},h=ao().userSettingsApi;return h.get("ui_editor_links_as_button")&&(f.push(co),f.push((s=t.windowId,It({pattern:dt.linklink,replacement:function(t){var n=document.createElement("span");n.classList.add("note-link-mdpreview-wrapper"),n.classList.add("note-link-wrapper");var e=t[1],o=t[2],i=Nt(e,o,s);return n.innerHTML="".concat(i),n}})))),h.get("ui_editor_markdown_preview")&&(f.push(p),g.extensions.push(Tn),f.push((u=t.file,It({pattern:dt.image,replacement:function(t){var n=document.createElement("div"),e=t[0],o='<div class="mdpreview-source">'.concat(e,"</div>"),i="".concat(Ro(u.folder),"/").concat(t[1]);n.classList.add("cm-mdpreview-wrapper"),n.classList.add("image-wrapper");var r=Object(Gt.renderToString)(Object(a.d)(Qt,{name:"faExpand",color:"white"}));return n.innerHTML='<div class="cm-mdpreview-image"><div class="enlarge" data-src='.concat(i,"> ").concat(r,'</div><img onerror="this.style.display=\'none\'" src="').concat(i+nt(),'" /></div>').concat(o),yn(),n}}))),f.push(function(t){return It({pattern:dt.ressource,replacement:function(n){var e=n[0],o='<div class="mdpreview-source">'.concat(e,"</div>"),i=document.createElement("span"),r=Object(Gt.renderToString)(Object(a.d)(Eo,{markdownTag:e,file:t}));return i.innerHTML="".concat(r," ").concat(o),i}})}(t.file))),f.push(Object(Ge.markdown)(g)),Object(a.d)("div",{className:"codemirror-editor-wrapper"},Object(a.d)(Ke.a,{value:"",ref:n,theme:Fn(),onChange:function(n,e){n!==t.value&&(i.current=n,t.onChange(n),d())},basicSetup:{foldGutter:!1,dropCursor:!1,allowMultipleSelections:!1,indentOnInput:!1,closeBrackets:!1,bracketMatching:!1,lineNumbers:!1},extensions:f}))})),bo=i.a.memo(fo,(function(t,n){var e=!0;return t.forceRender!==n.forceRender&&(e=!1),t.jumpToLine!==n.jumpToLine&&(e=!1),e})),go=function(){return"\n@page {\nmargin: 0;\n}\n@media print {\n.hide-print {\ndisplay: none;\n\n}\n}\n\n* {\n\t-webkit-print-color-adjust: exact; \n\tprint-color-adjust: exact; \n}\n\n.file-path-wrapper {\n\tdisplay: none;\n}\n.file-infos-wrapper {\n\tbackground: #eeeeee;\n\tpadding: 10px;\n\tmargin: 10px;\n}\n\t\t.simple-css-print-wrapper {\n\t\t\tmargin: 20px;\n\t\t\twidth: 70%;\n\n\t\t}\n\t\timg {\n\t\t\t\tmax-width: 300px!important;\n\t\t\t\tmax-height: 500px!important;\n\t\t}\n\t\t.block-tag {\n\t\t\t\tdisplay: none;\n\t\t}\n\t\t"},ho=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),c=e[0],l=e[1],u=Object(o.useRef)(null),d=!0;!1===t.canEdit&&(d=!1),!1===t.isConnected&&(d=!1),Object(o.useEffect)((function(){l("")}),[t.file.path]);var g=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],a=e[1],c=Object(o.useRef)(!1);Object(o.useEffect)((function(){c.current=t.canEdit}),[t.canEdit]),Object(o.useEffect)((function(){return a(!1),t.onEditorDidMount&&t.onEditorDidMount(),function(){t.onEditorWillUnmount&&(l(),t.onEditorWillUnmount())}}),[t.file.path]),Object(o.useEffect)((function(){l()}),[t.file.path]),Object(o.useEffect)((function(){t.onNoteContentDidLoad&&t.onNoteContentDidLoad()}),[t.fileContent,t.file.path]);var l=function(){""!==qn&&t.onNoteLeaving&&t.onNoteLeaving(i,qn),qn=t.file.path};return{triggerNoteEdition:function(n){if(!c.current)return console.warn("[EVENTS EDITOR] => onEdition CANNOT EDIT AS OFFLINE");i?t.onNoteEdition&&t.onNoteEdition(n,!1):t.onNoteEdition&&t.onNoteEdition(n,!0),a(!0)}}}({file:t.file,fileContent:t.fileContent,canEdit:d,onEditorDidMount:function(){},onEditorWillUnmount:function(){},onNoteContentDidLoad:function(){_e&&l(t.fileContent)},onNoteEdition:function(n,e){l(n),t.onFileEdited(t.file.path,n),e&&Xo((function(n){n.history.save(t.file.path,t.fileContent,"enter")}))},onNoteLeaving:function(n,e){E((function(n){t.onFileEdited(e,n)}))}}),h=g.triggerNoteEdition,m=Object(o.useRef)(null),v=Wn(c,{mobileTextarea:m,onMobileNoteEdition:h}),w=(v.onTextareaChange,v.onTextareaScroll,Object(o.useRef)(null)),x="desktop"!==s()?m:u;"codemirror"===t.editorType&&(x=w);var O=Un({editorType:t.editorType,deviceType:s(),editorRef:x}).applyTextModifAction,k=te({fileContent:c,onTextEncrypted:function(t){h(t),Z()},onTextDecrypted:function(t){h(t),Z()}}),y=k.APasswordPopup,C=k.askForPassword,S=k.decryptButtonConfig,T=k.encryptButtonConfig,E=k.ifEncryptOnLeave,I=(k.noHistoryBackupWhenDecrypted,Object(o.useContext)(We)),N=Object(o.useState)(-1),F=Object(r.a)(N,2),L=F[0],R=F[1];Object(o.useEffect)((function(){if(I.upload.progress&&t.isActive&&R(I.upload.progress),I.upload.file&&t.isActive){var n=Object(p.a)({},I.upload.file),e=n.name,o=n.path;I.upload.reinit(),A(e,o)}}),[I.upload]);var A=function(t,n){D.current+=".concat(n,")\n"),P()},D=Object(o.useRef)(""),P=gn((function(){var t=w.current,n=Bn.getCurrentLineInfos(t).currentPosition;!function(t,n){var e=O("insertAt",{textToInsert:t,insertPosition:n});e&&(h(e),Z())}(D.current,"currentPos"),D.current="",Bn.updateCursor(t,n,!0)}),500),M="[link|".concat(t.file.realname," ").concat(t.file.folder,"]\n"),z=function(n,e){return{title:"",class:"upload-button-wrapper",action:function(){},customHtml:Object(a.d)(ae,{file:t.file,type:n,label:e,onProgress:function(t){return R(t)},onSuccess:function(t){A(t.name,t.path)}})}},B=[].concat(Object(f.a)(function(){var t=[z("all","Upload files")];return"desktop"!==s()&&(t.push(z("image","Upload Gallery")),t.push(z("camera","Capture")),t.push(z("microphone","Record"))),t}()),[Qn(c)?S:T,{title:"Export/Print",icon:"faFileDownload",action:function(){!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 r=ne(new Date(n.modified||0)),a=ne(new Date(n.modified||0)),c="\n<head>\n\t<title>".concat(n.name,' </title>\n\n\n</head>\n<html>\n\t<body>\n\t\t\t\t<div class="simple-css-print-wrapper">\n<div class="hide-print">\n\t<bm> Export options </bm>\n\t<button onclick="window.print()">print</button>\n\t<button onclick="window.print()">export to pdf</button>\n<button onclick="window.alert(\'CTRL+ S then select *complete webpage* if available\')">export to html</button>\n</div>\n\t\t\t\t\t<div class="file-infos-wrapper">\n\t\t\t\t\tNote Name : ').concat(n.name,"<br>\n\t\t\t\t\tNote Path : ").concat(n.path,"<br>\n\t\t\t\t\tCreated : ").concat(r,"<br>\n\t\t\t\t\tEdited : ").concat(a,"<br>\n\t\t\t\t\t</div>\n\t\t\t\t").concat(o.innerHTML,"\n\t\t\t\t</div>\n\n\t\t\t\t<style>").concat(xo({w:".simple-css-print-wrapper",pl:".preview-link",r:".resource-link-icon"}),"</style>\n\t\t\t\t<style>").concat(go(),"</style>\n\n<script>\n<\/script>\n\n\n\n\t</body>\n</html>\n\t\t\t\t"),l=window.open("","print-popup","width=800,height=1000");null===l||void 0===l||l.document.write(c)}}(t.windowId,t.file)}},{title:j.editorBar.explanation.history,icon:"faHistory",action:function(){W(!U)}},{title:j.editorBar.tts,icon:"faCommentDots",action:function(){Xo((function(n){n.ui.textToSpeechPopup.open(t.file.path,t.fileContent)}))}},{title:"Delete note",class:"delete",icon:"faTrash",action:function(){I.file.onFileDelete(t.file)}}]),_=Object(o.useState)(!1),H=Object(r.a)(_,2),U=H[0],W=H[1],q=Object(o.useRef)(null),V=q.current,G=700;V&&(G=V.clientHeight/1.3),"mobile"===s()&&(G=window.innerHeight);var J=Object(o.useRef)(null);Object(o.useEffect)((function(){Z()}),[t.fileContent,t.file.path]);var Y=Object(o.useState)(0),K=Object(r.a)(Y,2),$=K[0],X=K[1],Z=function(){X($+1)},Q=c.length>3e4&&"desktop"!==s(),tt=function(n){var e,o;e=t.file.path,o=n,Xo((function(t){t.cache.get(fe,(function(n){n||(n={}),n[e]=o,t.cache.set(fe,n,1e17)}))})),t.onViewToggle(n)};return Object(a.d)("div",{className:"editor-area",ref:q},Object(a.d)("div",{className:"infos-editor-wrapper"},Object(a.d)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(a.d)(vn,{title:t.file.name.replace(".md",""),onEdited:function(n,e){var o="".concat(t.file.folder).concat(n,".md"),i="".concat(t.file.folder).concat(e,".md");I.file.onTitleUpdate(o,i),Z()}}),Object(a.d)("div",{className:"toolbar-and-dates-wrapper"},Object(a.d)("div",{className:"editor-toolbar-dropdown"},Object(a.d)(re,{hover:!0,dir:"right",maxHeight:G},Object(a.d)(i.a.Fragment,null,Object(a.d)("div",{className:"view-toggler-wrapper"},"mobile"!==s()&&Object(a.d)(nn,{class:"editor-view-toolbar",size:.8,buttons:[{title:"Editor",icon:"custom_icons/view-3.svg",action:function(){tt("editor")}},{title:"Editor with minimap",icon:"custom_icons/view-4.svg",action:function(){tt("editor-with-map")}},{title:"Dual view",icon:"custom_icons/view-1.svg",action:function(){tt("both")}},{title:"Render view",icon:"custom_icons/view-2.svg",action:function(){tt("preview")}}]})),Object(a.d)("div",{className:"toolbar-wrapper"},Object(a.d)(nn,{class:"editor-main-toolbar",design:"vertical",size:.8,buttons:B})),Object(a.d)("div",{className:"separation-bar"}),Object(a.d)("div",{className:"dates-wrapper"},Object(a.d)("div",{className:"date modified"},Object(a.d)("h4",null,"Modified"),ne(new Date(t.file.modified||0))),Object(a.d)("div",{className:"date created"},Object(a.d)("h4",null,"Created"),ne(new Date(t.file.created||0)))),Object(a.d)("div",{className:"path-wrapper"},Object(a.d)("div",{className:"path"},Object(a.d)("h4",null,"Path"),Object(a.d)("span",{className:"path-link",onClick:function(){Xo((function(n){n.ui.browser.goTo(t.file.folder,t.file.name)}))}}," ",t.file.folder," "))),Object(a.d)("div",{className:"note-id-wrapper"},Object(a.d)("h4",null,"Node Id"),Object(a.d)("div",{className:"note-id-form"},Object(a.d)("input",{type:"text",ref:J,onClick:function(t){var n=t.target;n.setSelectionRange(0,n.value.length)},value:M,readOnly:!0}),Object(a.d)(nn,{class:"note-id-toolbar",size:1,buttons:[{title:"Copy note ID",icon:"faClipboard",action:function(){var t=J.current;t&&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)}))}(t)}}]})))))))),Object(a.d)(le,{progress:L}),Object(a.d)("div",{className:"main-editor-wrapper"},!Q&&"codemirror"===t.editorType&&Object(a.d)(bo,{windowId:t.windowId,ref:w,value:c,onChange:h,posY:t.posY,jumpToLine:t.jumpToLine||0,forceRender:$,onScroll:t.onScroll,onTitleClick:t.onTitleClick,file:t.file}),Q&&Object(a.d)("div",{className:"codemirror-mobile-fallback"},Object(a.d)("p",null," note is too long for mobile, we disabled the advanced edition system "),Object(a.d)("textarea",{defaultValue:c,onChange:function(t){h(t.target.value)}}))),"desktop"!==s()&&Object(a.d)(ie,{onButtonClicked:function(t){var n=O(t);n&&(h(n),Z())}}),C&&y,U&&Object(a.d)(ee,{file:t.file,onClose:function(){W(!1)}}))},mo=function(){return"\n.mobile-text-manip-toolbar {\n\t\t.toolbar-button {\n\t\t\t\tpadding: 13px 20px;\n\t\t}\n}\n\n.file-path-wrapper {\n\t\tpadding-top: ".concat(c("desktop")?W.sizes.block:W.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(W.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(W.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(W.colors.main,";\n\t\t\t\tfont-weight: bold;\n\t\t\t\tcursor: pointer;\n }\n}\n\n.note-id-wrapper {\n\t\tcolor: grey;\n text-align: left;\n\t\t.note-id-form {\n\t\t\t\tdisplay:flex;\n\t\t\t\tinput {\n\t\t\t\t\t\tborder: none;\n\t\t\t\t\t\tpadding: 5px;\n\t\t\t\t\t\tbackground: #ebebeb;\n\t\t\t\t\t\tborder-radius: 3px;\n\t\t\t\t\t\tfont-size: 9px;\n\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t}\n\t\t}\n}\n.toolbar-and-dates-wrapper {\n\t\th4 {\n\t\t\t\tmargin: 0px;\n\n\t\t}\n}\n\n\n")},vo=function(t){var n=Object(o.useContext)(Zo),e=(null===n||void 0===n?void 0:n.status.isConnected)||!1;return Object(o.useMemo)((function(){return Object(a.d)(ho,Object(on.a)({},t,{isConnected:e}))}),[e,t.canEdit,t.editorType,t.file.path,t.file,t.fileContent,t.isActive,t.jumpToLine])},wo=function(t){var n={wrapper:Object(o.useRef)(null),main:Object(o.useRef)(null)},e=t.file.path.split("/");e.pop();e.join("/");Object(o.useEffect)((function(){setTimeout((function(){t.onMaxYUpdate(i())}),1e3)}),[t.fileContent]);var i=function(){var t=n.main.current;return 2*((null===t||void 0===t?void 0:t.clientHeight)||3e3)},c=Object(o.useState)([]),l=Object(r.a)(c,2),u=l[0],d=l[1];Object(o.useEffect)((function(){var n=Ho.chunks.chunk(t.fileContent);d(n),setTimeout((function(){Ho.injectLogic({fileContent:t.fileContent,file:t.file})}),100),setTimeout((function(){xe.updatePreviewDims(t.windowId),xe.updateScrollerDims(t.windowId)}),100)}),[t.fileContent]);var p=function(){var n=0,e=document.querySelector(".window-id-".concat(t.windowId));return e&&(n=e.clientHeight),"mobile"===s()&&0===n&&(n=document.body.clientHeight-120),n};return Object(a.d)("div",{className:"preview-area-wrapper render-latex",onWheelCapture:function(n){xe.onPreviewScroll(t.windowId)}},Object(a.d)("div",{className:"preview-area",ref:n.wrapper,style:{bottom:function(){var n=i(),e=t.posY+0;return Object(b.clamp)(e,0,n)}()}},Object(a.d)("div",{className:"preview-area-transitions"},Object(a.d)("div",{className:"infos-preview-wrapper"},Object(a.d)("div",{className:"file-path-wrapper"},t.file.path.replace("/".concat(t.file.name),"")),Object(a.d)("h1",{className:"title big-title"},t.file.name.replace(".md",""))),Object(a.d)("div",{className:"content-blocks-wrapper"},Object(a.d)("div",{className:"simple-css-wrapper"},u.map((function(n,e){return Object(a.d)(yo,{key:e,block:n,windowId:t.windowId,file:t.file,windowHeight:p(),yCnt:t.yCnt,onIframeMouseWheel:t.onIframeMouseWheel})})))))))},xo=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(W.colors.editor.font,";\n\t\t\t\tline-height: 19px;\n\t\t\t\tfont-size: 11px;\n\t\t\t\tfont-family:").concat(W.font.main,";\n\t\t}\n\n\t\tbutton,\n\t\tinput {\n\t\t\t\tfont-family:").concat(W.font.main,";\n\t\t\t\tfont-weight: 700;\n\t\t\t\tcolor: ").concat(W.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(W.colors.main,";\n\t\t}\n\n\t\t.main-color, .main-color:before, .main-color:after {\n\t\t\t\tcolor: ").concat(W.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(W.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(W.colors.main,';\n\t\t\t\tmargin-top: 0px;\n\t\t\t\tline-height: normal;\n\t\t\t\tmargin-right: 10px;\n\t\t}\n\t\th1:after,\n\t\th2:after {\n\t\t\t\tcontent: "-";\n\t\t\t\tbackground: ').concat(W.colors.main,";\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 2px;\n\t\t\t\tposition: absolute;\n\t\t\t\tbottom: 0px;\n\t\t\t\tleft: 0px;\n\t\t\t\tfont-size: 0px;\n\t\t\t\t/* opacity: 0.4; */\n\t\t}\n\t\th2:after {\n\t\t\t\t/* width: 70%; */\n\t\t\t\theight: 1px;\n\t\t}\n\t\th1 {\n\t\t\t\tpadding: 5px;\n\t\t\t\t/* border-bottom: 2px solid; */\n\t\t\t\tmargin-top: 30px;\n\t\t\t\tmargin-bottom: 20px;\n\t\t}\n\t\th2 {\n\t\t\t\tpadding: 5px;\n\t\t\t\t/* border-bottom: 1px solid; */\n\t\t}\n\t\th2, h3, h4, h5, h6 {\n\t\t\t\tmargin-bottom: 10px;\n\t\t\t\tmargin-top: 25px;\n\t\t}\n\n img,\n .content-image {\n\t\t\t\tcursor: pointer;\n }\n\t\t\t.content-image-img {\n\t\t\t\t\t").concat(W.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(W.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(W.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(W.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(Ft(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(No(),"\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")},Oo=x.log.verbose,jo=["latex","l"],ko=function(t){var n="tag"===t.block.type&&!jo.includes(t.block.tagName||""),e=Object(o.useState)(null),i=Object(r.a)(e,2),c=i[0],l=i[1],s=Object(o.useState)(null),u=Object(r.a)(s,2),d=u[0],p=u[1],f=Object(o.useState)("null"),b=Object(r.a)(f,2),g=b[0],h=b[1];Object(o.useEffect)((function(){n&&(h("loading"),"script"===t.block.tagName?(l("\n[[script]]".concat(t.block.content,"[[script]]")),setTimeout((function(){h("loaded")}),100),t.block.content=""):$o().then((function(n){n.file.getContent("/.tiro/tags/".concat(t.block.tagName,".md"),(function(t){l(t),setTimeout((function(){h("loaded")}),100)}),{onError:function(){l(null)}})})))}),[t.windowId,t.block.content]);var m="l"===t.block.tagName||"latex"===t.block.tagName;return Object(o.useEffect)((function(){if(!n){var e=Ho.render({raw:t.block.content,file:t.file,windowId:t.windowId});m&&(e="[[l]]".concat(t.block.content,"[[l]]")),p(e)}}),[t.windowId,t.file,t.block]),Object(a.d)("span",{className:"content-block ".concat(n?"block-tag":"block-text"," ")},"loaded"===g&&n&&c&&Object(a.d)(Co,Object(on.a)({},t,{noteTagContent:c})),!n&&d&&Object(a.d)("span",{className:"content-block-text",dangerouslySetInnerHTML:{__html:d}}))},yo=i.a.memo(ko,(function(t,n){var e=!0;return JSON.stringify(t.block)!==JSON.stringify(n.block)&&(e=!1),t.block.content!==n.block.content&&(e=!1),t.file.path!==n.file.path&&(e=!1),e})),Co=function(t){var n=Object(p.a)({},t).noteTagContent,e=Object(o.useState)(""),i=Object(r.a)(e,2),c=i[0],l=i[1],s=Object(o.useRef)(null),u=Object(o.useState)(""),d=Object(r.a)(u,2),f=d[0],g=d[1],h=Object(o.useState)(!1),m=Object(r.a)(h,2),v=m[0],w=m[1],x=Object(o.useState)(0),O=Object(r.a)(x,2),j=O[0],k=O[1],y=Object(o.useState)(null),C=Object(r.a)(y,2),S=C[0],T=C[1],E=Object(o.useState)(!1),I=Object(r.a)(E,2),N=I[0],F=I[1],L=function(){var n,e,o=function(n){N&&t.onIframeMouseWheel(n)};return null===(n=s.current)||void 0===n||null===(e=n.contentDocument)||void 0===e||e.addEventListener("mousewheel",o),function(){var t,n;return null===(t=s.current)||void 0===t||null===(n=t.contentDocument)||void 0===n?void 0:n.removeEventListener("mousewheel",o)}};Object(o.useEffect)(L,[t.yCnt,N]);var R=gn((function(e){L(),g(e),T(null),pn.subscribe(e,(function(n){if("resize"===n.action){var e=n.data.height;if(Object(b.isString)(e)&&e.endsWith("%")){var o=parseInt(e.replace("%",""))/100;e=(t.windowHeight||200)*o}Oo&&console.log("[IFRAME COMPONENT]","resizing to",e),k(e),w(!0)}if("canScrollIframe"===n.action){var i=n.data;F(i.status)}if("apiCall"===n.action){var r=n.data;ni(r,(function(t,e){if("nok"===t)return T(e.error);var o={reqId:n.data.reqId,data:e};pn.send(s.current,{action:"apiAnswer",data:o})}))}if("iframeError"===n.action){var a=n.data.error;T(a)}})),setTimeout((function(){var o={file:t.file,innerTag:t.block.content,windowId:t.windowId,frameId:e,reloadCounter:P,tagContent:n,tagName:t.block.tagName||"",loginToken:tt(),backendUrl:ai()};pn.send(s.current,{action:"init",data:o})}),100)}),500),A=Object(o.useState)(0),D=Object(r.a)(A,2),P=D[0],M=D[1],z=Object(o.useState)(!1),B=Object(r.a)(z,2),_=B[0],H=B[1];Object(o.useEffect)((function(){w(!1),function(){var e=Ho.render({raw:n,windowId:t.windowId,file:t.file}),o=fn(e),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(xo(),"\n\t\t\t\t</style>\n\t\t\t\t");i=bt(i,[["{{innerTag}}",t.block.content.trim()]]),l(i)}();var e="iframe-".concat(G());return R(e),function(){pn.unsubscribe(e)}}),[t.windowId,t.block.content,t.block.tagName,t.noteTagContent,P]);return Object(a.d)("div",{className:"iframe-view-wrapper ".concat(v?"can-show":"hide"," iframe-tag-").concat(t.block.tagName)},Object(a.d)("div",{className:"ctag-menu"},Object(a.d)("div",{className:"ctag-ellipsis"},Object(a.d)(Qt,{name:"faEllipsisH",color:"#b2b2b2"})),Object(a.d)("div",{className:"ctag-menu-button ctag-reload",onClick:function(){M(P+1),H(!0),setTimeout((function(){H(!1)}),100)}},Object(a.d)(Qt,{name:"faRetweet",color:"#b2b2b2"})),Object(a.d)("div",{className:"ctag-menu-button ctag-fullscreen",onClick:function(){pn.send(s.current,{action:"askFullscreen",data:{}})}},Object(a.d)(Qt,{name:"faExpand",color:"#b2b2b2"}))),!_&&Object(a.d)("iframe",{ref:s,id:f,"data-testid":"iframe",title:f,srcDoc:c,className:"tag-iframe",style:{height:j},sandbox:"allow-scripts allow-same-origin allow-popups"}),S&&Object(a.d)("div",{className:"iframe-error"},Object(a.d)("code",null,Object(a.d)("pre",null,S))))},So=400,To=200,Eo=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],c=e[1],l=t.markdownTag.split("](")[1].slice(0,-1),u=t.markdownTag.split("](")[0].replace("![",""),d=l.split("."),p=d[d.length-1];"7z"===p&&(p="d7z");var f="".concat(Ro(t.file.folder),"/").concat(l).concat(nt()),b="".concat(u,".").concat(p),g=[{title:"Download",icon:"faDownload",action:function(){console.log(f,b),Fo(b,f)}}],h=!1;["pdf","mp4","mp3","ogg","wav","aac","webm","flac","txt","json","css","js","html","epub"].includes(p.toLowerCase())&&(h=!0);var m=window.location.origin,v=["ppt","pptx","doc","docx","xls","xlsx"].includes(p.toLowerCase()),w=v||"pdf"===p.toLowerCase(),x=Lo(m,["localhost","192.168"]),O=f;!x&&v&&(O="https://docs.google.com/gview?url=".concat(f,"&embedded=true"));var j=x&&v?"[REQUIRES NON LOCAL TIRO URL] ":"";(h||v)&&(g.unshift({title:j+"Open in detached window",icon:"faExternalLinkAlt",action:function(){x&&v||window.open(O,"popup-".concat(O),"width=800,height=1000")}}),g.unshift({title:i?"Close Preview":j+"Preview",icon:i?"faEyeSlash":"faEye",action:function(){x&&v||c(!i)}}));var k="id-".concat(G()),y=function(t,n){var e=document.querySelector(t);null===e||void 0===e||e.addEventListener("click",(function(t){n(t)}))},C=function(){var t=document.querySelector(".".concat(k," .iframe-wrapper")),n=null===t||void 0===t?void 0:t.querySelector("iframe"),e=w?So:To,o="<iframe\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsrc='".concat(O,"'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle='").concat(O,'\'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tallowFullScreen\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclass="resource-link-iframe"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle="height:').concat(e,'px"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/>');t&&(t.innerHTML=n?"":o,I(n?"closed":"open"))},S=function(){x&&v||("epub"===p.toLocaleLowerCase()?Xo((function(n){n.file.getContent("/.tiro/tags/epub.md",(function(n){!function(){var n=document.querySelector(".".concat(k," .iframe-wrapper"));if(n){var e=n.querySelector("iframe"),o=Jt(Object(a.d)(yo,{file:t.file,block:{type:"tag",tagName:"epub",content:O,start:0,end:0},windowHeight:So+75,windowId:"null",yCnt:0,onIframeMouseWheel:function(){}}),{delay:100}),i='<div id="'.concat(o,'" class="resource-link-ctag"><div class="loading-string">loading...</div></div>');n.innerHTML=e?"":i,I(e?"closed":"open")}}()}),{onError:function(t){}})})):"pdf"===p.toLocaleLowerCase()?Xo((function(n){n.file.getContent("/.tiro/tags/pdf.md",(function(n){!function(){var n=document.querySelector(".".concat(k," .iframe-wrapper"));if(n){var e=n.querySelector("iframe"),o=Jt(Object(a.d)(yo,{file:t.file,block:{type:"tag",tagName:"pdf",content:O,start:0,end:0},windowHeight:So+75,windowId:"null",yCnt:0,onIframeMouseWheel:function(){}}),{delay:100}),i='<div id="'.concat(o,'" class="resource-link-ctag"><div class="loading-string">loading...</div></div>');n.innerHTML=e?"":i,I(e?"closed":"open")}}()}),{onError:function(t){C()}})})):C())},T="ressource-preview-status",E="".concat(t.file.path,"-").concat(l),I=function(t){Xo((function(n){n.cache.get(T,(function(e){e||(e={}),e[E]=t,n.cache.set(T,e,1e17)}))}))};return setTimeout((function(){var cb;cb=function(t){"open"===t&&S()},Xo((function(t){t.cache.get(T,(function(t){if(t){var n=t[E]?t[E]:"closed";cb(n)}}))}));var t=".".concat(k," ul.buttons-toolbar-component");y("".concat(t," .btn-preview"),S),y("".concat(t," .btn-open"),(function(){x&&v||window.open(O,"popup-".concat(O),"width=800,height=1000")})),y("".concat(t," .btn-download"),(function(){Fo(b,f)}))}),100),Object(a.d)("div",{className:"".concat(k," resource-link-iframe-wrapper")},Object(a.d)("div",{className:" resource-link-wrapper device-".concat(s())},Object(a.d)("div",{className:"resource-link-icon ".concat(p)}),Object(a.d)("div",{className:"resource-link-content-wrapper"},Object(a.d)("a",{className:"resource-link preview-link",href:f,download:!0},u," (",p,")"),Object(a.d)(nn,{buttons:g,size:1}))),Object(a.d)("div",{className:"iframe-wrapper"}))},Io=".resource-link-icon",No=function(){return"\n.loading-string {\n text-align: center;\n padding: 50px;\n}\n.resource-link-ctag {\n\t\theight: ".concat(So-21,"px;\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(W.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: 20px;\n\t\tborder-radius: 10px;\n\t\tposition: relative;\n\t\tmargin: 5px 0px;\n\t\t// height: 20px;\n\n}\n\n.resource-link-icon {\n\t\ttop: 14px;\n\t\tleft: 19px;\n\t\twidth: 21px;\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(W.assets.fileIcon,");\n}\n\n").concat(Io,".epub, ").concat(Io,".cbr, ").concat(Io,".cbz,").concat(Io,".mobi, ").concat(Io,".azw, ").concat(Io,".azw3, ").concat(Io,".iba {background - image: url(").concat(W.assets.bookIcon,"); }\n").concat(Io,".pdf\n{background - image: url(").concat(W.assets.pdfIcon,"); }\n\n").concat(Io,".xls, ").concat(Io,".xlsm, ").concat(Io,".xlsx, ").concat(Io,".ods\n{background - image: url(").concat(W.assets.excelIcon,"); }\n\n").concat(Io,".avi, ").concat(Io,".flv, ").concat(Io,".h264, ").concat(Io,".m4v, ").concat(Io,".mov, ").concat(Io,".mp4, ").concat(Io,".mpg, ").concat(Io,".mpeg, ").concat(Io,".rm, ").concat(Io,".swf, ").concat(Io,".vob, ").concat(Io,".wmv, ").concat(Io,".mkv\n{background - image: url(").concat(W.assets.videoIcon,"); }\n\n").concat(Io,".d7z, ").concat(Io,".arj, ").concat(Io,".deb, ").concat(Io,".rar, ").concat(Io,".gz, ").concat(Io,".zip, ").concat(Io,".rpm, ").concat(Io,".pkg\n{background - image: url(").concat(W.assets.archiveIcon,");}\n\n").concat(Io,".aif, ").concat(Io,".mp3, ").concat(Io,".cda, ").concat(Io,".mid, ").concat(Io,".mpa, ").concat(Io,".ogg, ").concat(Io,".wav, ").concat(Io,".wpl, ").concat(Io,".wma, ").concat(Io,".midi\n{background - image: url(").concat(W.assets.audioIcon,"); }\n\n").concat(Io,".doc, ").concat(Io,".docx, ").concat(Io,".odt, ").concat(Io,".txt\n{background - image: url(").concat(W.assets.wordIcon,"); }\n\n").concat(Io,".html, ").concat(Io,".css, ").concat(Io,".js, ").concat(Io,".json, ").concat(Io,".ts, ").concat(Io,".jsx, ").concat(Io,".tsx\n{background - image: url(").concat(W.assets.codeIcon,"); }\n\n").concat(Io,".bin, ").concat(Io,".dmg, ").concat(Io,".iso, ").concat(Io,".toast, ").concat(Io,".vcd\n{\n\t\ttop: 19px;\n\t\ttransform: scale(1.8);\n\t\tbackground-image: url(").concat(W.assets.diskIcon,");\n}\n\n").concat(Io,".ppt, ").concat(Io,".pptx, ").concat(Io,".odp, ").concat(Io,".key, ").concat(Io,".pps\n{background - image: url(").concat(W.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}\n.resource-link-content-wrapper ul li {\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\tpointer-events: all;\n}\n.device-desktop .resource-link-content-wrapper ul {\n\t\topacity: 0;\n\t\ttransition: 0.2s all;\n\t\tpointer-events: none;\n}\n\n\n")},Fo=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)},Lo=function(t,n){var e=!1;return Object(b.each)(n,(function(n){n.includes(t)&&(e=!0),t.includes(n)&&(e=!0)})),e},Ro=function(t){var n=t.replace("".concat(ai(),"/").concat(v.staticResources,"/"),""),e="".concat(ai(),"/").concat(v.staticResources,"/").concat(n);return t.startsWith("http")?t:e},Ao=function(t,n){var e=0,o=function(t,n){var e=t.match(dt.image),o=[];return Object(b.each)(e,(function(t){var e=t.match(dt.firstPartImg),i=e&&e[0]?e[0].replace("![","").replace("]","").replace("(",""):"",r=t.replace(dt.firstPartImg,"").replace(")",""),a={url:Ro(n.folder)+"/"+r,title:i,file:n};o.push(a)})),o}(n,t);if(0===o.length)return n;var i=encodeURIComponent(JSON.stringify(o));return Ut(n,dt.image,(function(n){var o=n.split("](")[1].slice(0,-1),r=n.match(/w_([0-9]+)/),a=n.match(/r_([0-9]+)/),c=r?"width: ".concat(r[1],"px;"):"",l=a?"transform:rotate(".concat(a[1],"deg);"):"",s="max-width: 100%; ".concat(c," ").concat(l," "),u='<div class="content-image" data-images='.concat(i,' data-index="').concat(e,'"><img class="content-image-img" style="').concat(s,'" src="').concat(Ro(t.folder),"/").concat(o).concat(nt(),'" /></div>');return e++,u}))},Do=function(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'")},Po=function(t){var n=t;return n=(n=(n=n.replaceAll("#","")).replaceAll("-","")).trim()},Mo=function(t){var n=Object(p.a)({},t),e=n.raw,o=n.file,i=n.windowId;i||(i="");var r=function(t){var n=t;return Ht.parse(n)}(function(t,n){var e=0;return Ut(n,dt.ressource,(function(n){e++,"".concat(n,"-").concat(e);var o=Object(Gt.renderToString)(Object(a.d)(Eo,{markdownTag:n,file:t}));return"".concat(o," ")}))}(o,Ao(o,function(t){var n=t.replace(dt.searchlink,'<a class="search-link preview-link" href="javascript:window.tiroCli.triggerSearch.func(\'$1$2\');">$1</a>');return bt(n,[[">[__id_",">["],[">[__tags_",">["],[">[__tag_",">["],[" ]</a>","]</a>"]])}(function(t,n){var e=Nt("$1","$2",t);return n.replace(dt.linklink,e)}(i,Ut(e,dt.externalLink3,(function(t){return lo(t).outerHTML})))))));return Bt(),r},zo=function(t,cb){for(var n=document.getElementsByClassName(t),e=function(t){var e=n[t];e.onclick=function(){cb(e)}},o=0;o<n.length;o++)e(o)},Bo=function(t){var n=t.split(dt.userCustomTagManual),e=[],o=[],i=dt.userCustomTag3,r=t.match(i)||"",a=[];Object(b.each)(r,(function(t){a.push(t)}));var c=null,l=-1,s=[],u=[],d={};if(Object(b.each)(a,(function(t){d[t]?d[t]=d[t]+1:d[t]=1})),Object(b.each)(d,(function(t,n){t>=2&&u.push(n)})),Object(b.each)(a,(function(t,e){if(u.includes(t))if(c){if(c===t){var i=[l+1,e+1];s.push.apply(s,i);for(var r=n.slice(i[0],i[1]),d=a.slice(l+1,e+1),p="",f=0;f<r.length;f++){var b=f===r.length-1?"":d[f];p+="".concat(r[f]).concat(b)}o.push({type:"tag",tagName:c.replace("[[","").replace("]]",""),content:p,start:l,end:e}),l=-1,c=null}}else c=t,l=e})),0===s.length)e.push({type:"text",content:t,start:0,end:1});else{s.unshift(0);for(var p=0;p<s.length;p+=2){var f=s[p];n[f]&&e.push({type:"text",content:n[f],start:f,end:f+1})}}for(var g=0===t.indexOf(a[0]),h=[],m=o.length>e.length?o.length:e.length,v=0;v<m;v++)g?(o[v]&&h.push(o[v]),e[v]&&h.push(e[v])):(e[v]&&h.push(e[v]),o[v]&&h.push(o[v]));return h},_o=function(t){var n="";return Object(b.each)(t,(function(t){"text"===t.type?n+=t.content:"tag"===t.type&&(n+="[[".concat(t.tagName,"]]").concat(t.content,"[[").concat(t.tagName,"]]"))})),n},Ho={render:function(t){var n=Object(p.a)({},t),e=n.raw,o=n.file,i=n.windowId;i||(i="");var r=Bo(e);return Object(b.each)(r,(function(t){"text"===t.type&&(t.content=Mo({raw:t.content,file:o,windowId:i})),"tag"===t.type&&(t.content=t.content.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"))})),_o(r)},injectLogic:function(t){zo("title-search-link",Lt),zo("content-image",(function(t){$o().then((function(n){var e=parseInt(t.dataset.index);try{var o=JSON.parse(decodeURIComponent(t.dataset.images));Object(b.isNumber)(e)||(e=0),n.ui.lightbox.open(e,o)}catch(i){console.error(i)}}))}))},chunks:{chunk:Bo,merge:_o}},Uo="[RESSOURCE API] ",Wo=function(t){var n=Object(p.a)({},t).eventBus;Object(o.useEffect)((function(){He.on("getRessourceApiAnswer",(function(t){n.notify(t.idReq,t)}))}),[]);var e=function(n,e,cb){var o=ti("download-ressource");console.log("".concat(Uo," downloading ressource url ").concat(n," to folder ").concat(e)),t.eventBus.subscribe(o,cb),He.emit("askRessourceDownload",{url:n,folder:e,idReq:o,token:tt()})};return{delete:function(n,cb){var e=ti("delete-ressource");console.log("".concat(Uo," delete ressource ").concat(n)),t.eventBus.subscribe(e,cb),He.emit("askRessourceDelete",{path:n,idReq:e,token:tt()})},download:e,fetch:function(t,cb,n){n||(n={}),n.disableCache||(n.disableCache=!1);var o="/.tiro/cache/fetch/",i="".concat(ai(),"/").concat(v.staticResources,"/").concat(o).concat(J(t),"?token=").concat(tt()),r=function(){fetch(i).then((function(t){return t.text()})).then((function(t){cb(t)}))},a=function(){e(t,o,(function(t){t.message&&r()}))};!0===n.disableCache?a():function(t){try{var n=new XMLHttpRequest;n.open("HEAD",t.url,!1),n.send(),404!==n.status?t.onSuccess():t.onFail()}catch(e){t.onFail(e)}}({url:i,onSuccess:function(){console.log("".concat(Uo," FETCHING => getting CACHED file"),{url:t,options:n}),r()},onFail:function(){a()}})}}},qo="/".concat(v.configFolder,"/").concat(v.cacheFolder,"/cache-api"),Vo="[CACHE API]",Go=x.log.verbose,Jo=function(){return(new Date).getTime()},Yo=function(t){var n=t-Jo()<0;return Go&&console.log(Vo,"isExpired? : ",n,(t-Jo())/6e4,"mins"),n},Ko=null,$o=function(){return new Promise((function(t,n){if(Ko)return t(Ko);var e=setInterval((function(){if(Ko)return clearInterval(e),t(Ko)}),200)}))},Xo=function(cb){$o().then((function(t){cb(t)}))},Zo=i.a.createContext(null),Qo=function(t){var n=Object(o.useRef)({}),e=function(t){delete n.current[t]},i={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(b.each)(n.current,(function(n,i){i===t&&Object(b.each)(n,(function(n){try{n.cb(o)}catch(i){console.log("[CLIENT API] error with function",i)}n.options.persistent||e(t)}))}))}};Object(o.useEffect)((function(){x.log.verbose&&console.log("[CLIENT API ]INIT ")}),[]);var a=function(t){var n="watch-api-unique-id-request";return Object(o.useEffect)((function(){He.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})}}}({eventBus:i}),c=Ot({eventBus:i,statusApi:t.statusApi}),l=ht({eventBus:i,historyApi:t.historyApi}),s=function(t){return Object(o.useEffect)((function(){He.on("getFiles",(function(n){t.eventBus.notify(n.idReq,n.files)})),He.on("getFilesPreview",(function(n){t.eventBus.notify(n.idReq,n.filesPreview)}))}),[]),{get:function(n,cb){x.log.socket&&console.log("[CLIENT API] get files ".concat(n));var e=ti("get-files-");t.statusApi.searching.set(!0),t.eventBus.subscribe(e,(function(n){t.statusApi.searching.set(!1),cb(n)})),He.emit("askForFiles",{folderPath:n,token:tt(),idReq:e})},getPreviews:function(n,cb){var e=ti("get-files-");t.eventBus.subscribe(e,cb),He.emit("askFilesPreview",{filesPath:n,idReq:e,token:tt()})},search:t.searchApi.files.search}}({eventBus:i,searchApi:c,statusApi:t.statusApi}),u=kt({eventBus:i}),d=Wo({eventBus:i}),g=function(t){return Object(o.useEffect)((function(){He.on("getFoldersScan",(function(n){t.eventBus.notify(n.idReq,{folders:n.folders,pathBase:n.pathBase})}))}),[]),{get:function(n,cb){x.log.socket&&console.log("[FOLDERS API] get folders ");var e=ti("get-folders-");t.eventBus.subscribe(e,cb),He.emit("askFoldersScan",{foldersPaths:n,token:tt(),idReq:e})},move:gt({eventBus:t.eventBus}).folder}}({eventBus:i}),h=function(t){var n=function(t){return"".concat(qo,"/cache-api-storage-").concat(t.replace(/[^\w\s]/gi,""),".md")},e=Object(o.useRef)({}),i=function(t,n,o){var i;e.current[t]={content:n,until:(i=o,Jo()+60*i*1e3)}};return{get:function(t,cb){if(t in e.current){var o=e.current[t],r=Yo(o.until);r&&(o.content=void 0),Go&&console.log(Vo,"FROM RAM",t," expired:",r),cb(o.content)}else Xo((function(o){o.file.getContent(n(t),(function(n){var o=JSON.parse(n);e.current[t]=o;var i=e.current[t],r=Yo(i.until);r&&(i.content=void 0),Go&&console.log(Vo,"FROM FILE",t," expired:",r),cb(i.content)}),{onError:function(n){"NO_FILE"===n&&(Go&&console.log(Vo,"FROM FILE: NO_FILE",t),i(t,void 0,60),cb(e.current[t].content))}})}))},set:function(t,o,r){r||(r=60),i(t,o,r);var a=e.current[t];Go&&console.log(Vo,"SETTING",t," with cachedTime in min",r),$o().then((function(e){e.file.saveContent(n(t),JSON.stringify(a))}))}}}(),m=function(t){var n=Object(o.useState)([]),e=Object(r.a)(n,2),i=e[0],a=e[1],c=Object(o.useState)(-1),l=Object(r.a)(c,2),s=l[0],u=l[1],d=O("selected-folder",""),p=Object(r.a)(d,2),g=p[0],h=p[1],m=Object(o.useState)(it),v=Object(r.a)(m,2),w=v[0],j=v[1],k=ot("foldersFlat",[]),y=Object(r.a)(k,3),C=y[0],S=y[1],T=y[2],E=Object(o.useState)(""),I=Object(r.a)(E,2),N=I[0],F=I[1],L=ot("folders-open",["/"]),R=Object(r.a)(L,3),A=R[0],D=R[1],P=R[2];Object(o.useEffect)((function(){M(A)}),[A]);var M=function(t,n){n||(n={}),Object(b.isBoolean)(n.cache)||(n.cache=!0);var e=!!Object(b.isBoolean)(n.background)&&n.background,o=t.join("-"),i=o.length;o=o.substring(0,30)+"-"+i;var r="folder-scan-".concat(o);Xo((function(o){var i=function(){o.folders.get(t,(function(t){!e&&z(t.pathBase,t.folders),o.cache.set(r,t,999999)}))};n&&n.cache?o.cache.get(r,(function(t){t?!e&&z(t.pathBase,t.folders):i()})):i()}))},z=function(t,n){var e=Object(b.cloneDeep)(C),o={current:e};Object(b.each)(n,(function(t){t&&(o.current=o.current.filter((function(n){return t.path!==n.path})))})),Object(b.each)(n,(function(t){t&&(o.current=at(t,o.current))})),e=o.current,S(e);var i=rt("/",e);i&&j(i),F(t)};return{goTo:function(n,e,o){""!==n&&(n=Y("".concat(n,"/")),x.log.verbose&&console.log("".concat("[BROWSER GO TO] "," ").concat(n," ").concat(e," ").concat(JSON.stringify(o))),t.searchUiApi.term.set(""),t.statusApi.searching.set(!0),h(n),t.filesApi.get(n,(function(n){t.statusApi.searching.set(!1);var i=t.userSettingsApi.get("ui_filesList_sortMode"),r=Q(n,i),c=-1;if(e&&Object(b.each)(r,(function(t,n){t.name===e&&(c=n)})),u(c),a(r),o&&o.openIn){var l=r[c];"active"===o.openIn||"activeWindow"===o.openIn?t.tabsApi.active.get()?t.windowApi.active.setContent(l):t.tabsApi.openInNewTab(l):t.windowApi.updateWindows([o.openIn],l)}})))},files:{active:{get:i[s],getIndex:s,set:u},set:a,get:i},folders:{refreshFromBackend:function(){T(),P()},base:N,get:w,clean:function(){j(it)},scan:M,open:{get:A,add:function(t){D([].concat(Object(f.a)(A),[t]))},remove:function(t){var n=Object(b.cloneDeep)(A),e=n.indexOf(t);e>-1&&n.splice(e,1),D(n)}},current:{get:g,set:h}}}}({searchUiApi:c.ui,statusApi:t.statusApi,filesApi:s,foldersApi:g,windowApi:t.windowsApi,tabsApi:t.tabsApi,userSettingsApi:t.userSettingsApi}),v=function(t){var n=Object(o.useState)(),e=Object(r.a)(n,2),i=e[0],a=e[1];return Object(p.a)(Object(p.a)({},Ho),{},{ui:{lineJump:{jump:a,get:i}}})}(),w={cache:h,file:l,files:s,popup:t.popupApi,upload:u,ressource:d,tabs:t.tabsApi,folders:g,userSettings:t.userSettingsApi,history:t.historyApi,status:t.statusApi,note:v,search:c,watch:a,ui:{browser:m,windows:t.windowsApi,lightbox:t.lightboxApi,textToSpeechPopup:t.ttsApi,search:c.ui,note:v.ui}};return Ko=w,w},ti=function(t){return"client-api-".concat(t,"-req-").concat(G())},ni=function(t,cb){$o().then((function(n){var e=t.apiName.split("."),o=n;if(Object(b.each)(e,(function(t){o=o[t]?o[t]:null})),null===o)return cb("nok",{error:'"'.concat(t.apiName,'" does not exists in current api \n\nAvailable Api properties :\n\n').concat(oi("",n))});try{var i=ei(o);if(!Object(b.isNumber)(i)){var r=o.apply(void 0,Object(f.a)(t.apiArguments));return cb("ok",r)}var a=Object(b.cloneDeep)(t.apiArguments);a.splice(i,0,(function(t){cb("ok",t)})),o.apply(void 0,Object(f.a)(a))}catch(c){return cb("nok",{error:'error "'.concat(JSON.stringify(c),'" when executing "').concat(t.apiName,'" with props ').concat(t.apiArguments)})}}))},ei=function(t){var n=function(t){var n=t.toString().replace(yt,""),e=null;return null===(e=n.startsWith("cb =>")?["cb"]:n.slice(n.indexOf("(")+1,n.indexOf(")")).match(Ct))&&(e=[]),e}(t),e=n.indexOf("cb");return-1===e?null:e},oi=function t(n,e){var o="";for(var i in e)if("object"===typeof e[i]&&e[i].constructor!==Array){if(i.length>1&&"get"!==i){var r=""!==n?"".concat(n,"."):"";o+=t("".concat(r).concat(i),e[i])}}else o="".concat(o).concat(n,".").concat(i,"\n");var a=o.split("\n"),c=[];return $o().then((function(t){Object(b.each)(a,(function(n){var e=n.split("."),o=t;Object(b.each)(e,(function(t,n){o[t]&&(o=o[t])}));var i="var",r="";Object(b.isFunction)(o)&&(i="Function",r=o.toString()),c.push({name:n,type:i,description:r})}))})),o},ii=function(t){var n=localStorage.getItem("settings-".concat(t))||"";return bt(n,[['"',""]])},ri=function(t){var n=O("settings-backend-port",-1),e=Object(r.a)(n,2),i=e[0],c=e[1],l=O("settings-backend-protocol","same"),s=Object(r.a)(l,2),u=(s[0],s[1],Object(o.useContext)(Zo)),d=j.settingsPopup,p=[];if(u){var f=u.userSettings,g="".concat(window.location.protocol,"//"),h="".concat(g).concat(u.status.ipsServer.getLocal()).concat(Be.global.port),m="https://api.qrserver.com/v1/create-qr-code/?size=400x400&margin=50&data=".concat(h);p=[{title:"Devices",fields:[{type:"text",var:h,customHtml:'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class="qrcode-wrapper">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img src="'.concat(m,'"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>'),title:"Tiro Url",readOnly:!0,expl:"Access Tiro on another device on the <b>same wifi/local network</b> either by :\n\t\t\t\t\t\t\t\t\t\t\t\t<br>\n\t\t\t\t\t\t\t\t\t\t\t\t - Entering that url in a browser\n\t\t\t\t\t\t\t\t\t\t\t\t <br>\n\t\t\t\t\t\t\t\t\t\t\t\t - Scanning that qrcode (on desktop, go to a website like <a href='https://webqr.com/'>webqr.com </a>)",modifier:function(){},onCustomHtmlClick:function(){u.ui.lightbox.open(0,[m])}},{type:"none",var:"",customHtml:"<button> Open Tiro Window </button>",title:"Open Tiro Window",readOnly:!0,expl:"Open Tiro in a separate window (Desktop only)",modifier:function(){},onCustomHtmlClick:function(){window.open(window.location.href,"popup-tiro","width=800,height=1000"),window.open("","_self").close()}}]},{title:"layout",fields:[{type:"text",title:"Main color",expl:"A color string like 'orange' or 'blue' or an Hex string like '#E86666' (tiro red) or '#729fc4'",var:f.get("ui_layout_colors_main"),modifier:function(t){f.set("ui_layout_colors_main",t)}},{type:"checkbox",title:"Sidebar Shortcut Panel",expl:"Adds a shortcuts/scratchpad space in the sidebar. To edit it, create a note in '.tiro/shortcuts.md'",var:f.get("ui_layout_shortcuts_panel"),modifier:function(t){f.set("ui_layout_shortcuts_panel",t)}}]},{title:"editor",fields:[{type:"checkbox",title:"Markdown Preview",expl:"Preview Images and Latex in the editor",var:f.get("ui_editor_markdown_preview"),modifier:function(t){T(!0),f.set("ui_editor_markdown_preview",t)}},{type:"checkbox",title:"Links button",expl:"Replace http links into buttons in the editor",var:f.get("ui_editor_links_as_button"),modifier:function(t){T(!0),f.set("ui_editor_links_as_button",t)}}]},{title:"Users and Rights",fields:[{type:"checkbox",title:"Enable read-only viewer",expl:'Create a "viewer" user that can read but not edit the content',var:f.get("users_viewer_user_enable"),modifier:function(t){f.set("users_viewer_user_enable",t,{writeInSetupJson:!0})}},{type:"text",title:"Viewer user password",expl:'Define the "viewer" user password',var:f.get("users_viewer_user_password"),modifier:function(t){f.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:f.get("demo_mode_enable"),modifier:function(t){f.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(){et(""),t.onClose(),Xo((function(t){t.folders.get(["/"],(function(){}))}))}}]},{title:"Advanced",fields:[{type:"text",var:i,title:d.backend.port,expl:d.backend.portExpl,modifier:c}]}]}var v=ot("config-panels-opened",[]),w=Object(r.a)(v,3),x=w[0],k=w[1],y=(w[2],Object(o.useState)(!1)),C=Object(r.a)(y,2),S=C[0],T=C[1];return Object(a.d)("div",{className:"settings-popup-wrapper"},Object(a.d)(q,{title:"".concat(d.title),onClose:function(){t.onClose()}},p.map((function(t,n){return Object(a.d)("div",{className:"settings-panel"},Object(a.d)("h3",{onClick:function(){!function(t){var n=Object(b.cloneDeep)(x);n[t]=!n[t],k(n)}(n)}},Object(a.d)("div",{className:"arrow"},x[n]?"\u25bc":"\u25ba"),t.title),Object(a.d)("div",{className:"fields-wrapper ".concat(x[n]?"active":"")},t.fields.map((function(t){return Object(a.d)("div",{className:"field-wrapper"},Object(a.d)("div",{className:"input-and-html-wrapper"},"none"===t.type&&Object(a.d)("span",null,t.title),"none"!==t.type&&Object(a.d)(V,{value:t.var,label:t.title,type:t.type,readonly:t.readOnly,onChange:function(n){"checkbox"!==t.type&&t.modifier(n)},onCheckedChange:function(n){"checkbox"===t.type&&t.modifier(n)}}),t.customHtml&&Object(a.d)("div",{className:"custom-html-wrapper",onClick:function(n){t.onCustomHtmlClick&&t.onCustomHtmlClick()},dangerouslySetInnerHTML:{__html:t.customHtml}})),Object(a.d)("div",{className:"explanation",dangerouslySetInnerHTML:{__html:t.expl||""}}))}))))})),S&&Object(a.d)("button",{onClick:function(t){window.location.reload()}},"Reload App")))},ai=function(){var t=Be.global.protocol,n=ii("backend-port")?":".concat(ii("backend-port")):"".concat(Be.global.port);return"".concat(t).concat(Be.global.url).concat(n)},ci=function(t,n){return["%c [CLIENT SOCKET 2] ".concat(t),"background: #ccc; color: red",n||null]},li=function(t){var n={};return{on:function(e,o){var i=function(t,n){return function(e){var o;x.log.socket&&(o=console).log.apply(o,Object(f.a)(ci("<== ON ".concat(t," "),Object(p.a)({},e)))),n(e)}}(e,o),r=Object(b.random)(1,1e8);return n[r]={endpoint:e,apiFn:i},t.on(e,i),r},off:function(e){n[e]&&(t.off(n[e].endpoint,n[e].apiFn),delete n[e])},emit:function(n,e){var o;x.log.socket&&(o=console).log.apply(o,Object(f.a)(ci("==> EMIT ".concat(n," "),Object(p.a)({},e)))),t.emit(n,e)}}},si={};window.tiroCli=si;var ui=function(t,n){var e,c,l=O("showRenderId",!1),s=Object(r.a)(l,2),u=s[0],d=s[1];e="toggleRenderId",(c={description:"toggle display of renderId for each block",func:function(){console.log("[toggleRenderId]"),d(!u),setTimeout((function(){window.location.reload()}),1e3)}}).f=c.func,si[e]=c;var p=Object(b.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.d)(i.a.Fragment,null,u&&Object(a.d)("p",{style:{position:"absolute",fontSize:"10px",color:"rgba(255,0,0,0.8)"}},p),t));(new Date).getTime();return o}),n)},di=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])},pi=function(){return"Tiro (".concat(Be.version,")")},fi=function(t){return Object(a.d)("button",{className:"new-file-button",onClick:function(n){t.onNewFile()}},Object(a.d)(Qt,{name:"faPlusCircle",color:"white"}),Object(a.d)("span",null,j.newNote))},bi=i.a.memo(fi,(function(t,n){return!0})),gi=e(217),hi=e(214),mi={ctrl:!1,shift:!1,alt:!1,opt:!1},vi={38:"up",40:"down",17:"ctrl",16:"shift",18:"alt",93:"opt",13:"enter"},wi=function(t){return t=t||window.event,vi[t.keyCode]?vi[t.keyCode]:t.key},xi={},Oi=function(t){Object(C.a)(e,t);var n=Object(S.a)(e);function e(t){var o;return Object(k.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(b.debounce)((function(){var t=o.scrollerWrapperRef.current;if(t){for(var n=t.getBoundingClientRect().height,e=-1,i=[],r=0;r<o.liRefs.length;r++){var a=o.liRefs[r].current;if(a){var c,l=a.getBoundingClientRect().top;if(l>-50&&l<n+100)-1===e&&(e=r),o.props.files[r]&&i.push(null===(c=o.props.files[r])||void 0===c?void 0:c.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(tt())},o.state={hoverMode:!1,selectionEdges:[-1,-1]},o}return Object(y.a)(e,[{key:"shouldComponentUpdate",value:function(t,n){if(JSON.stringify(t.files)!==JSON.stringify(this.oldFiles)){this.oldFiles=Object(b.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=Z[this.props.sortMode],e=W.sizes.l2.fileLi.height+2*W.sizes.l2.fileLi.padding+W.sizes.l2.fileLi.margin,o=window.innerHeight-(W.sizes.search.h+W.sizes.search.padding),r=c("desktop")?o:o-W.sizes.mobile.bottomBarHeight;return Object(a.d)(i.a.Fragment,null,Object(a.d)("div",{className:"list-wrapper-scroller",style:{height:r},onScroll:this.onListScroll,ref:this.scrollerWrapperRef},Object(a.d)(hi.a,null,(function(o){o.height;var c=o.width;return Object(a.d)(gi.a,{itemData:t.props.files,className:"List",ref:t.scrollerListRef,height:r,itemCount:t.props.files.length,itemSize:e,width:c,onScroll:t.onListScroll},(function(e){var o=e.index,r=e.style,l=t.props.files[o],s=t.props.filesPreview[l.path];return Object(a.d)("div",{style:r},Object(a.d)("li",{ref:t.liRefs[o],style:{width:c-2*Ci.l2.fileLi.padding-2*Ci.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(mi["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.d)("div",{className:"background-item"}),Object(a.d)("div",{className:"background-item-border"}),Object(a.d)("div",{className:"left"},Object(a.d)("h3",{className:"label ".concat(l.name.length<=35?"oneliner":"more"),onMouseEnter:function(n){t.props.hoverMode&&t.props.onFileClicked(o)}},l.name),Object(a.d)("div",{className:"content"},s&&s.content&&Object(a.d)(i.a.Fragment,null,s.content)),Object(a.d)("div",{className:"date ".concat(n)},ne(new Date(("modified"===n?l.modified:l.created)||0)))),Object(a.d)("div",{className:"right"},s&&s.picture&&Object(a.d)("div",{className:"picture",style:{backgroundColor:"white",backgroundImage:"url('".concat(s.picture.startsWith("http")?s.picture+t.getUrlLoginToken():"".concat(Ro(t.props.files[0].folder),"/").concat(s.picture).concat(t.getUrlLoginToken()),"')")}}))))}))}))))}}]),e}(i.a.Component),ji=i.a.memo(Oi,(function(t,n){return!1})),ki=Object(p.a)({},W),yi=(ki.els,ki.colors),Ci=(ki.font,ki.sizes),Si=function(t){return Object(a.d)("div",{className:"folder-tree-view-component"},Object(a.d)("h3",{className:"subtitle"},j.folders),Object(a.d)(Ti,{openFolders:t.openFolders,folder:t.folder,current:t.current,onFolderClicked:t.onFolderClicked,onFolderMenuAction:t.onFolderMenuAction,onFolderOpen:function(n){Xo((function(e){e.ui.browser.folders.open.add(n),t.onFolderOpen(n)}))},onFolderClose:function(n){Xo((function(e){e.ui.browser.folders.open.remove(n),t.onFolderClose(n)}))},onFolderDragStart:t.onFolderDragStart,onFolderDragEnd:t.onFolderDragEnd,onFolderDrop:t.onFolderDrop}))},Ti=function t(n){var e=n.openFolders.includes(n.folder.path)&&n.folder.hasFolderChildren,i=Object(o.useState)(!1),c=Object(r.a)(i,2),l=c[0],s=c[1],u=Object(o.useState)(""),d=Object(r.a)(u,2),p=d[0],f=d[1],b=$(n.current,n.folder.key);return Object(a.d)("li",{className:"folder-wrapper ".concat(b?"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.d)("div",{className:"folder-title ".concat(p),onDragEnter:function(t){f("drag")},onDrop:function(t){f("")},onDragLeave:function(t){f("")}},Object(a.d)("span",{className:"icon",onClick:function(t){e?n.onFolderClose(n.folder.key):n.onFolderOpen(n.folder.key)}},n.folder.hasFolderChildren&&Object(a.d)(Qt,{name:e?"faCaretDown":"faCaretRight",color:W.colors.main})),Object(a.d)("span",{className:"title",onClick:function(t){n.onFolderClicked(n.folder.key)}},Object(a.d)("div",{className:"title-drag-bg"}),Object(a.d)("div",{className:"title-label"}," ",n.folder.title)),Object(a.d)("span",{onClick:function(){s(!l)},className:"context-menu-wrapper"},Object(a.d)(Qt,{name:"faEllipsisH",color:W.colors.l1.font}),l&&Object(a.d)("div",{className:"context-menu context-menu-folders"},Object(a.d)("ul",null,Object(a.d)("li",{onClick:function(){if(""===n.folder.path)return s(!1);var t=prompt("".concat(j.renameFolderPrompt," "),n.folder.title);t&&""!==t&&t!==n.folder.title&&n.onFolderMenuAction("rename",n.folder,t),s(!1)}},j.renameFolder),Object(a.d)("li",{onClick:function(){if(""===n.folder.path)return s(!1);$o().then((function(t){t.popup.prompt({text:"".concat(j.createFolderPrompt,' "').concat(n.folder.path,'"?'),userInput:!0,onAccept:function(t){t&&""!==t&&n.onFolderMenuAction("create",n.folder,t)},onRefuse:function(){}})})),s(!1)}},j.createFolder),-1===n.folder.path.indexOf(".tiro/.trash")&&Object(a.d)("li",{onClick:function(){if(""===n.folder.path)return s(!1);s(!1),n.onFolderMenuAction("moveToTrash",n.folder)}},j.moveToTrash),-1!==n.folder.path.indexOf(".tiro/.trash")&&Object(a.d)("li",{onClick:function(){if(""===n.folder.path)return s(!1);s(!1),$o().then((function(t){t.popup.confirm("".concat(j.deleteFolderPrompt,' "').concat(n.folder.path,'"?'),(function(){n.onFolderMenuAction("delete",n.folder)}))}))}},j.deleteFolder))))),e&&Object(a.d)("ul",{className:"folder-children"},n.folder.children&&n.folder.children.map((function(e,o){return Object(a.d)(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})}))))},Ei=i.a.memo(Si,(function(t,n){var e=!0;return t.openFolders===n.openFolders&&t.folder===n.folder&&t.current===n.current||(e=!1),e})),Ii=function(t){var n=Object(p.a)({},t).files.slice(0,20);return Object(a.d)(i.a.Fragment,null,n.length>0&&Object(a.d)("div",{className:"last-notes-component"},Object(a.d)("h3",{className:"subtitle"},j.lastNotes),Object(a.d)("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.d)("li",{key:e,title:o,onClick:function(e){t.onClick(n)},className:"note"},Object(a.d)(Qt,{name:"faFile"}),o)})))))},Ni=i.a.memo(Ii,(function(t,n){return t.files===n.files})),Fi=function(t){var n=Object(o.useContext)(Zo),e=!!n&&n.status.searching.get;return Object(a.d)(i.a.Fragment,null,Object(a.d)("div",{className:"search-bar-component"},Object(a.d)("input",{type:"text",placeholder:j.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.d)("div",{className:"search-status"},e&&j.searchingLabel)))},Li=function(t){var n={title:t.realname,folder:t.folder,mobileview:"editor"},e="".concat(Be.global.protocol).concat(Be.global.url).concat(Be.global.port,"?").concat(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}(n));window.open(e,"popupDetached","width=600,height=600")},Ri=function(t){var n=Object(o.useState)(0),e=Object(r.a)(n,2),i=e[0],c=e[1];Object(o.useEffect)((function(){c(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,c(e)};return Object(a.d)("div",{className:"lightbox-component"},Object(a.d)("div",{className:"lightbox-bg"}),Object(a.d)("div",{className:"lightbox-content"},t.images.map((function(n,e){return Object(a.d)("div",{key:e,className:"lightbox-image",style:{display:e===i?"flex":"none"}},Object(a.d)("img",{src:Ro(n.url)+nt()}),Object(a.d)("div",{className:"image-infos"},Object(a.d)("div",{className:"image-name",onClick:function(t){return Li(n.file)}},n.file.name," - ",n.title),Object(a.d)(nn,{popup:!1,buttons:[{class:"left",title:"left",icon:"faChevronLeft",action:function(){l(-1)}},{class:"close",title:"close",icon:"faTimes",action:function(){t.onClose()}},{class:"right",title:"right",icon:"faChevronRight",action:function(){l(1)}}]})))}))))},Ai={onAccept:function(){},onRefuse:function(){}},Di=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],l=e[1],s=Object(o.useState)(""),u=Object(r.a)(s,2),d=u[0],p=u[1],f=Object(o.useState)(null),b=Object(r.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(j.promptPopup.defaultTitle),v=Object(r.a)(m,2),w=v[0],x=v[1],O=Object(o.useState)(!1),k=Object(r.a)(O,2),y=k[0],C=k[1],S=function(t){l(!0),p(t.text),t.title&&x(t.title),t.userInput&&h(""),t.onAccept&&(Ai.onAccept=t.onAccept),t.onRefuse?(Ai.onRefuse=t.onRefuse,C(!0)):C(!1)},T=function(){l(!1),h(null),x(""),p(""),C(!1)},E={confirm:function(t,cb,n){S({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){S({title:n,text:t,onAccept:cb,onRefuse:function(){}})},prompt:S};return{popupApi:E,PromptPopupComponent:function(){return Object(a.d)(i.a.Fragment,null,c&&Object(a.d)("div",{className:"prompt-popup-component"},Object(a.d)(q,{title:w,onClose:T,canBgClose:!1},Object(a.d)("div",null,Object(a.d)("div",{className:"content",dangerouslySetInnerHTML:{__html:d}}),Object(a.d)("br",null),null!==g&&Object(a.d)("div",null,Object(a.d)("input",{type:"text",value:g,onChange:function(t){h(t.target.value)}}),Object(a.d)("br",null)),Object(a.d)("button",{value:"submit",className:"accept submit-button",onClick:function(t){Ai.onAccept(g),T()}},j.promptPopup.accept),y&&Object(a.d)("button",{value:"submit",className:"refuse submit-button",onClick:function(t){Ai.onRefuse(g),T()}},j.promptPopup.refuse)))))}}},Pi=function(t){var n=Object(o.useContext)(Zo),e=Object(o.useState)(-1),i=Object(r.a)(e,2),c=i[0],l=i[1];return Object(a.d)("div",{className:"tab-list-scroll-wrapper"},Object(a.d)("div",{className:"tab-list-invisible-scroll"},Object(a.d)("div",{className:"tab-list-wrapper"},t.tabs.map((function(e,o){return Object(a.d)(zi,{key:o,tab:e,onDrop:function(t){l(t)},onDragEnter:function(t){l(t)},onDragEnd:function(t){n&&n.tabs.reorder(t,c),l(-1)},dragIndic:c,pos:o,onUpdate:t.onUpdate})})),(null===n||void 0===n?void 0:n.ui.browser.files.active.get)&&Object(a.d)("div",{className:"tab-wrapper tab-more",onClick:function(n){t.onUpdate("add")}},"+"))))},Mi=function(t){var n=Object(p.a)({},t),e=n.tab,o=n.pos,r="Six",c=e.grid.layout.length;return 2===c&&(r="Two"),3===c&&(r="Three"),4===c&&(r="Four"),5===c&&(r="Five"),r="faDice".concat(r),Object(a.d)("div",{className:"tab-and-drag-wrapper"},t.dragIndic===o&&Object(a.d)("div",{className:"drag-indic"},"\u25bc"),Object(a.d)("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.d)("div",{className:"active-ribbon"}),Object(a.d)("div",{className:"tab-name",onClick:function(){t.onUpdate("activate",e)}},"mobile"!==s()&&Object(a.d)("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"===s()&&Object(a.d)(i.a.Fragment,null,e.name)),e.grid.layout.length>1&&Object(a.d)("div",{className:"tab-nb-windows",onClick:function(){t.onUpdate("activate",e)}},Object(a.d)(Qt,{name:r,color:"#b2b2b2"})),Object(a.d)("div",{className:"tab-close",onClick:function(){Xo((function(n){n.popup.confirm("".concat(j.deleteTabPrompt,' "').concat(e.name,'"?'),(function(){t.onUpdate("close",e)}))}))}},Object(a.d)(Qt,{name:"faPlus",color:"#b2b2b2"}))))},zi=i.a.memo(Mi,(function(t,n){var e=!0,o=Object(b.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})),Bi=e(216),_i=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),i=e[0],c=e[1],l=gn((function(){Xo((function(n){n.file.getContent(t.file.path,(function(e){var o=n.note.render({raw:e,file:t.file,windowId:""});t.searchedString&&(console.log(333333,Po(t.searchedString)),o=o.replaceAll(Po(t.searchedString),"<span class='found-word'>".concat(t.searchedString,"</span>")),setTimeout((function(){var t;null===(t=document.querySelector(".note-preview-wrapper .content-preview .found-word"))||void 0===t||t.scrollIntoView()}),100));var i="<div class='file-content render-latex'><h3>".concat(t.file.path,"</h3> ").concat(o," </div>");c(i)}))}))}),200);return Object(o.useEffect)((function(){l()}),[t.file,t.searchedString]),Object(a.d)("div",{className:"note-preview-wrapper"},Object(a.d)("div",{className:"content-preview",dangerouslySetInnerHTML:{__html:i}}))},Hi="[Search Mode]",Ui="[Explorer Mode]",Wi="[Plugin Mode]",qi={dict:{},config:{enabled:!0}},Vi=function(){qi.config.enabled=!1,qi.dict={}},Gi=function(t){var n=Object(o.useState)([]),e=Object(r.a)(n,2),i=e[0],c=e[1],l=Object(o.useRef)([]),u=function(t){Object(b.isArray)(t)&&(c(t),l.current=t)},d=Object(o.useState)([]),g=Object(r.a)(d,2),h=g[0],m=g[1],w=function(t){et(t),m(t)},x=Object(o.useState)("No Options"),O=Object(r.a)(x,2),j=O[0],k=(O[1],{indicatorsContainer:function(t,n){return Object(p.a)(Object(p.a)({},t),{},{display:"none"})},menu:function(t,n){var e="mobile"===s()?"all":"none";return Object(p.a)(Object(p.a)({},t),{},{position:"relative",pointerEvents:e})},control:function(t,n){return Object(p.a)(Object(p.a)({},t),{},{outline:"none",boxShadow:"none",border:0})},multiValue:function(t,n){return n.data.editable?t:Object(p.a)(Object(p.a)({},t),{},{backgroundColor:W.colors.main})},multiValueRemove:function(t,n){return n.data.editable?t:Object(p.a)(Object(p.a)({},t),{},{display:"none"})}}),y=Object(o.useRef)(),C=h[0]||{label:"",value:""},S=function(n){var e=K(n);Xo((function(n){n.ui.browser.goTo(e.folder,e.name,{openIn:"activeWindow"}),t.onClose()}))},T=Object(o.useState)(""),E=Object(r.a)(T,2),I=E[0],N=E[1],F=Object(o.useRef)("");Object(o.useEffect)((function(){!function(){var t=l.current;if(0===t.length)"/"===I&&Xo((function(t){N("");var n=t.ui.browser.files.active.get.folder;M(n)})),""===I&&H(),"?"===I&&z(),":"===I&&U();else if(t[0].label===Hi)if(t[1]){if(2===t.length)_(I,t[1].label);else if(3===t.length&&B.current===t[2].value)console.log("STEP 3-1 (optional) : filter found results",B.current);else if(3===t.length||4===t.length){console.log("STEP 3-2 : jump to page",{w:B.current,stags:t});var n=t.length-1,e=t[n].value;S(e.path)}}else"?"===I&&Xo((function(t){var n=t.ui.browser.files.active.get.folder;N(n)})),P('Path to search (ex:"/path/to/folder") + ENTER'),w([{label:I,value:I}]);else if(t[0].label===Ui){var o=function(){var n=Object(f.a)(t);n.shift();var e="";return Object(b.each)(n,(function(t){e+="/"+t.value})),e}();o.endsWith(".md")?(o=o.replace(t[0].label,""),S(o)):F.current!==o&&(F.current=o,M(o))}else t[0].label===Wi&&q(I,t)}()}),[i,I]);var L='"?" for search mode, "/" for explorer mode, ":" for plugin mode',R=Object(o.useState)(L),A=Object(r.a)(R,2),D=A[0],P=A[1],M=function(t){console.log("== EXPLORER",t),""!==t&&(w([{label:"loading..."}]),Y(null),Xo((function(n){n.folders.get([t],(function(e){if(e.folders[0]){var o=e.folders[0].children;n.files.get(t,(function(n){var e=t.split("/"),i=[];i.push({value:Ui,label:Ui}),i.push({value:"/",label:"/"}),Object(b.each)(e,(function(t){""!==t&&i.push({value:t,label:t+"/"})}));var r=[];Object(b.each)(o,(function(t){var n=t.path.split("/"),e=n[n.length-1]+"/";r.push({value:e,label:e})})),Object(b.each)(n,(function(t){var n=t.path.split("/"),e=n[n.length-1];r.push({value:e,label:e})})),u(i),w(r)}))}}))})))},z=function(){u([{value:Hi,label:Hi}])},B=Object(o.useRef)(null),_=gn((function(t,n){var e=n,o=t;if(o&&e&&o.length>2&&e.length>0){P('Searching "'.concat(o,'" in "').concat(e,'" ...')),w([{label:"loading..."}]);var i=[];w(i),B.current=o,Xo((function(t){t.search.word(o,e,(function(t){i.push({label:'Filter results for "'.concat(B.current,'"'),value:B.current}),Object(b.each)(t,(function(t){Object(b.each)(t.results,(function(n){var e="[".concat(t.file.path,"] ").concat(n);i.push({label:e,value:t.file,payload:{file:t.file,line:n}})}))})),P("".concat(i.length,' results found for "').concat(o,'" in "').concat(e,'" ')),w(i)}))}))}else P("Type the word searched"),w([]),B.current=""}),500),H=function(){P(L);var n=function(t){var n=[];return Object(b.each)(t,(function(t){var e={value:t.path,label:t.path,payload:{file:t}};n.push(e)})),n}(t.lastNotes),e=n.shift(),o=n.shift();n.unshift(e),n.unshift(o),w(n)},U=function(){u([{value:Wi,label:Wi}])},q=function(t,n){if(Y(null),1===n.length){var e="/".concat(v.configFolder,"/bar_plugins/");Xo((function(n){var o=[];n.files.get(e,(function(n){Object(b.each)(n,(function(t){o.push({label:t.name.replace(".md",""),value:t})})),o=Object(b.orderBy)(o,["label"]),w(o),":"===t&&N(""),P("".concat(n.length,' plugins found in "').concat(e,'"'))}))}))}else if(2===n.length){var o=n[1].value;Xo((function(n){var e=function(e){var o=qi.dict[e],i={input:t,setInputTxt:N,options:h,setOptions:w,loadBarPlugin:function(t,e,o){var i=!qi.config.enabled;n.ressource.fetch(t,(function(t){try{new Function("barApi","tiroApi",t)(e,o)}catch(i){var n="[ERROR LOADING PLUGIN BAR]: ".concat(JSON.stringify(i),'"');console.log(n)}}),{disableCache:i})},disableCache:Vi};try{new Function("barApi","tiroApi",o)(i,n)}catch(a){var r="[ERROR PLUGIN BAR]: ".concat(JSON.stringify(a),'"');console.log(r)}};qi.dict[o.name]?e(o.name):n.file.getContent(o.path,(function(t){qi.dict[o.name]=t,e(o.name)}))}))}},V=Object(o.useState)(null),G=Object(r.a)(V,2),J=G[0],Y=G[1],$=Object(o.useState)(void 0),X=Object(r.a)($,2),Z=X[0],Q=X[1],tt=Object(o.useRef)([]),nt=function(t){Object(b.each)(tt.current,(function(t){t.disconnect()})),tt.current=[];var n=document.querySelectorAll("div[id*='-option']");Object(b.each)(n,(function(t,n){var e=new MutationObserver((function(n){var e=parseInt(t.id.split("-").pop());if("rgba(0, 0, 0, 0)"!==getComputedStyle(t)["background-color"]&&h[e]&&h[e].payload){var o=h[e].payload;!function(t,n){var e=l.current;e[0]&&e[0].label===Hi?(Y(t),Q(n),console.log("SEARCH JUMP TO",n,t.path)):e[0]?(console.log("CLOSING 2"),Y(null)):Y(t)}(o.file,o.line||void 0)}}));e.observe(t,{childList:!0,attributes:!0,subtree:!1}),tt.current.push(e)}))},et=gn((function(t){nt()}),100);return Object(o.useEffect)((function(){et(h)}),[h,I]),Object(a.d)("div",{className:"suggest-popup-bg",onClick:function(n){t.onClose()}},Object(a.d)("div",{className:"suggest-popup-wrapper"},Object(a.d)("div",{className:"flex-wrapper",onClick:function(t){t.stopPropagation()}},Object(a.d)("div",{className:"help"},D),Object(a.d)(Bi.a,{isMulti:!0,ref:y,menuIsOpen:!0,defaultValue:C,value:i,autoFocus:!0,onChange:function(t,n){var e=t[0];if(e&&e.payload&&e.payload.file){var o=e.payload.file;S(o.path),t=[]}u(t)},inputValue:I,onInputChange:function(t){N(t.trim())},options:h,styles:k,noOptionsMessage:function(){return j}}),Object(a.d)("div",{className:"preview-wrapper"},J&&"mobile"!==s()&&Object(a.d)(_i,{file:J,searchedString:Z})))))},Ji=function(t){var n=Object(o.useState)(""),e=Object(r.a)(n,2),c=e[0],l=e[1];return Object(o.useEffect)((function(){Xo((function(n){n.file.getContent(t.filePath,(function(e){var o=K(t.filePath),i=n.note.render({raw:e,file:o});l(i)}))}))}),[t.filePath]),Object(a.d)(i.a.Fragment,null,Object(a.d)("div",{className:"rendered-note-component"},Object(a.d)("span",{className:"rendered-note-content-wrapper",dangerouslySetInnerHTML:{__html:c}})))},Yi=function(t){return Object(a.d)(i.a.Fragment,null,Object(a.d)("div",{className:"shortcut-component"},Object(a.d)("h3",{className:"subtitle"},"shortcuts"),Object(a.d)(Ji,{filePath:t.filePath})))},Ki=(s(),Object(p.a)({},W)),$i=Ki.els,Xi=Ki.colors,Zi=(Ki.font,Ki.sizes),Qi=function(t,n){var e,o="//css\n\t\t.content-image {\n\t\t\t\twidth: 90%;\n\t\t}\n\t\t.full {\n\t\t\t\t.content-image {\n\t\t\t\t}\n\t\t}\n\n\t\t".concat("\n .main-wrapper.view-image {\n .mobile-view-toggler {\n display: none;\n }\n \n .left-wrapper {\n width: ".concat("desktop"===s()?15:40,"vw ;\n .left-wrapper-1 {\n width: 100%\n }\n .left-wrapper-2 {\n display: none;\n }\n }\n\n\n .right-wrapper.dual-viewer-view {\n display: none;\n }\n .right-wrapper {\n height: 100vh;\n }\n .right-wrapper.image-gallery-view {\n width: ").concat(100-("desktop"===s()?15:40),"vw;\n }\n }\n \n .main-wrapper.view-text {\n .right-wrapper.dual-viewer-view {\n \n }\n .right-wrapper.image-gallery-view {\n display: none;\n }\n }\n"),"\n\t\t").concat("\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","\n\t\t").concat("\n.lightbox-component {\n position: fixed;\n\t\tz-index: 1002;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n \n .lightbox-bg {\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n position: absolute;\n\t\t\t\tbackground: rgb(0 0 0 / 82%);\n }\n\n .lightbox-content {\n\t\t\t\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\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 img {\n max-width: 95vw;\n\t\t\t\t\t\t\t\tz-index:2;\n\t\t\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\t\t\tmax-height: 95vh;\n }\n }\n }\n}\n","\n\t\t").concat("\n .prompt-popup-component {\n\t\t\t\t.popup-wrapper {\n\t\t\t\t\t\tmin-width: 200px;\n\t\t\t\t\t\tmin-height: 100px;\n\t\t\t\t\t\ttext-align:center;\n\t\t\t\t}\n }\n","\n\t\t").concat("\n\t\t\t\t\t\t&.device-view-mobile {\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.suggest-popup-bg {\n\t\t\t\t\t\t\t\tbackground: rgba(0,0,0,0.5);\n\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\twidth: 100vw;\n\t\t\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\t\t\tz-index: 1000;\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.suggest-popup-wrapper {\n\t\t\t\t\t\t\t\twidth: 70%;\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 {\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\n\t\t\t\t\t\t/* \t\t\t\t\t\t.flex-wrapper { */\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\tflex-direction: column; */\n\t\t\t\t\t\t/* \t\t\t\t\t\t\t\theight: 100vh; */\n\t\t\t\t\t\t/* \t\t\t\t\t\t\t\t.help { */\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.search-wrapper { */\n\t\t\t\t\t\t/* \t\t\t\t\t\t\t\t} */\n\t\t\t\t\t\t/* .preview-wrapper { */\n\t\t\t\t\t\t/* flex: 1; */\n\t\t\t\t\t\t/* } */\n\t\t\t\t\t\t/* \t\t\t\t\t\t} */\n.preview-wrapper {\n\tmax-height: 45vh;\n\t\toverflow-y: scroll;\n\t\tbackground: white;\n\t\tborder-radius: 5px;\n}\n\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("\n ul.buttons-toolbar-component {\n list-style: none;\n padding: 0px;\n margin: 0px;\n button.toolbar-button {\n ".concat(W.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(W.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.button-hover-popup {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor:").concat(W.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.inside-html-wrapper {\n\t\t\t\t\t\t\t\t\t\twidth: 15px;\n\t\t\t\t\t\t\t\t\t\tspan {\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.button-hover-popup {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 15px;\n\t\t\t\t\t\t\t\t\t\tfont-weight: 400;\n\t\t\t\t\t\t\t\t\t\tfont-size: 11px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&.horizontal.with-popup {\n\t\t\t\t\t\t\t\tli button:hover .button-hover-popup {\n\t\t\t\t\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t&.horizontal {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tli {\n\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t.button-hover-popup {\n\t\t\t\t\t\t\t\t\t\tdisplay: none;\n\t\t\t\t\t\t\t\t\t\topacity: 0.2;\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tbottom: 22px;\n\t\t\t\t\t\t\t\t\t\tbackground: ").concat(W.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"),"\n\n\n\t\t").concat("\n .image-gallery-component-wrapper {\n margin: 0px 17px;\n overflow-y: scroll;\n // height: calc(100vh - ".concat(W.sizes.search.padding+W.sizes.gallery.topH+("desktop"===s()?0:190),"px);\n height: calc(100vh - ").concat(W.sizes.search.padding+W.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"===s()?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(W.els().imageInfos,"\n }\n img {\n ").concat(W.els().images,"\n }\n margin-bottom: 10px;\n }\n }\n }\n }\n"),"\n\n\t\t").concat("\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(W.colors.main,";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n\t\t.dropdown-icon {\n\t\t\t\tposition: absolute;\n\t\t\t\tpadding: 10px;\n\t\t\t\ttop: -10px;\n\t\t\t\tsvg {\n\t\t\t\t\t\tcolor: #d4d1d1;\n\t\t\t\t}\n\t\t}\n\n\t\t.context-menu {\n\t\t\t\toverflow-y: scroll;\n\t\t\t\tz-index: 100;\n\t\t\t\tright: 10px;\n\t\t\t\ttop: 20px;\n\t\t\t\tpointer-events: none;\n\n\n\t\t\t\ttransition: 0.2s all;\n\t\t\t\ttransition-delay: 0.2s, 0s;\n\t\t\t\tposition: absolute;\n\t\t\t\topacity: 0;\n\n\t\t\t\tmin-width: 140px;\n\t\t\t\tpadding: 10px;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tbackground: white;\n\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t}\t\n\n\t\t&.right {\n\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t}\n\t\t}\n}\n"),"\n\n\t\t").concat("\n.search-bar-component {\n input {\n\t\t\t\tborder-radius: 5px;\n width: calc(100% - ".concat(2*W.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(W.sizes.block,"px ").concat(W.sizes.block,"px ").concat(W.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(W.colors.main,";\n li {\n flex: 1 1 auto;\n button {\n ").concat(W.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(W.colors.main,";\n }\n .connected {\n display:none;\n position: absolute;\n bottom: 5px;\n right: 5px;\n color: ").concat(W.colors.green,";\n }\n}\n"),"\n\n\t\t").concat("\n .setup-popup-component {\n .submit-button {\n margin-top: 10px;\n ".concat(W.els().redButton,";\n padding: 10px 20px;\n }\n .error {\n color: ").concat(W.colors.main,";\n }\n .success {\n color: ").concat(W.colors.green,";\n }\n }\n"),"\n\n\t\t").concat("\n .input-component {\n display: flex;\n align-items: center;\n padding-bottom: 10px;\n input, select {\n max-width: 100%;\n }\n &.select {\n span {\n width: 20%;\n }\n }\n span {\n width: 30%;\n font-weight: 700;\n text-transform: uppercase;\n }\n .input-wrapper {\n width: 70%;\n input {\n padding: 7px;\n border: none;\n background: #ececec;\n border-radius: 5px;\n }\n .explanation {\n font-size: 11px;\n color: grey;\n }\n }\n }\n","\n\n\t\t").concat("\n\n.content-blocks-wrapper {\n\t\tpadding: 0px 15px;\n}\n.simple-css-wrapper {\n\t\t/* overflow: hidden; */\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.iframe-view-wrapper {\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\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\ttransition: 0.3s all;\n\t\t\t\twidth: calc(100% );\n\t\t\t\t// border: 2px #eaeaea solid;\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","\n\n\t\t").concat("\n&.device-view-mobile {\n\t\t.popup-wrapper .popupContent {\n\t\t\t\twidth: 80vw;\n\t\t\t\t.field-wrapper {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\tpadding: 5px 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tinput {\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t}\n}\n\n.settings-popup-wrapper .popup-wrapper .popupContent {\n padding: 0px 20px;\n\t\twidth: 50vw;\n\t\tmin-height: 50vh;\n\t\tmax-height: 70vh;\n\t\toverflow-y: scroll;\n\n}\n\n.settings-panel {\n\n\t\th3 {\n\t\t\t\tcursor: pointer;\n\t\t\t\ttext-transform: uppercase;\n\t\t\t\t.arrow {\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tfont-size: 7px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tbottom: 2px;\n\t\t\t\t\t\tmargin-right: 10px;\n\t\t\t\t}\n\t\t}\n\t\t.fields-wrapper {\n\t\t\t\tdisplay: none;\n\t\t\t\t&.active {\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tdisplay: block;\n\t\t\t\t\t\tpadding: 12px 12px 0px 12px;\n\t\t\t\t\t\tbackground: ".concat(W.colors.bgPopup2,";\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tborder: 1px ").concat(W.colors.bgPopup3," solid;\n\t\t\t\t\t\tmargin-top: 10px;\n\t\t\t\t}\n\t\t\t\t.field-wrapper {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tpadding-bottom: 11px;\n\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\t.input-and-html-wrapper {\n\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\t.input-component {\n\t\t\t\t\t\t\t\t\t\tflex: 1;\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.custom-html-wrapper {\n\t\t\t\t\t\t\t\t\t\tmargin-left: 20px;\n\t\t\t\t\t\t\t\t\t\t.qrcode-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\timg {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin: 5px 25px 0px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\twidth: 150px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t.explanation {\n\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n\n}\n\n\n\n\n.buttons {\n display: flex;\n padding: 20px 0px 0px 0px;\n button {\n width: 30%;\n padding: 10px;\n }\n}\n"),"\n\n\t\t").concat("\n.last-notes-component {\n padding: 0px ".concat(W.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(W.colors.main,";\n margin-right: 10px;\n }\n }\n }\n}\n"),"\n\t\t").concat("\n.shortcut-component {\n\t\tmargin: 0px ".concat(W.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(xo(),"\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").concat("\n\n.note-preview-wrapper {\n\t\tpadding: 15px 0px;\n}\n\n.note-preview-wrapper .content-preview h3.note-title {\n\t\tmargin-bottom: 10px;\n\t\tmargin-top: 0px;\n}\n.note-preview-wrapper .content-preview p {\n\t\tmargin: 0px;\n}\n.note-preview-wrapper .content-preview ul,\n.note-preview-wrapper .content-preview li {\n\t\tmargin: 0px;\n}\n.note-preview-wrapper .content-preview .found-word {\n\t\tfont-weight: bold;\n\t\tbackground: #fff876;\n\t\tpadding: 2px;\n}\n.note-preview-wrapper .content-preview img {\n\t\tmax-width: 300px;\n}\n.note-preview-wrapper .content-preview .file-content {\n\t\tpadding: 10px 30px;\n}\n.note-preview-wrapper .content-preview {\n\t\t/* max-height: 50vh; */\n}\n\n","\n\n\t\t").concat("\n.popup-wrapper-component {\n\t\t\t\tposition: absolute;\n top: 0px;\n left: 0px;\n .overlay-click-popup {\n position: fixed;\n z-index:1000;\n top: 0px;\n left: 0px;\n width: 100vw;\n height: 100vh;\n background: rgba(0,0,0,0.1);\n }\n .popup-wrapper {\n position: fixed;\n z-index:1001;\n left: 50%;\n top:50%;\n &.ipad {\n top:20%;\n }\n width : auto;\n max-width: 90%;\n transform:translate(-50%,-50%);\n\t\t\t\tbackground: ".concat(W.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(W.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"),"\n\t\t.main-wrapper {\n").concat("\n.link-mdpreview-wrapper {\n\t\tposition: relative;\n\t\t&:hover {\n\t\t\t\t.link-action{\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.link-action {\n\t\t\t\t\t\topacity: 0.1\n\t\t\t\t}\n\t\t}\n\t\t.link-action {\n\t\t\t\tcursor: pointer;\n\t\t\t\tposition: relative;\n\t\t\t\tright: 6px;\n\t\t\t\ttop: 0px;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition: 0.2s all;\n\t\t\t\tpointer-events: none;\n\t\t\t\tsvg, span, div {\n\t\t\t\t\t\tpointer-events:none;\n\t\t\t\t}\n\t\t}\n\t\t.link-iframe-wrapper {\n\t\t\t\tdisplay: none;\n\t\t}\n\t\t.link-iframe-wrapper.open {\n\t\t\t\tdisplay: block;\n\t\t\t\theight: 330px!important;\n\t\t}\n\t\t.link-iframe-wrapper iframe {\n\t\t\t\tborder-radius: 7px;\n\t\t\t\toverflow:hidden;\n\t\t\t\tbox-shadow: 0 0 4px rgba(0,0,0,0.3);\n\t\t\t\twidth: 150%!important;\n\t\t\t\ttransform-origin:top left;\n\t\t\t\ttransform: scale(0.65);\n\t\t\t\theight: 500px!important;\n\t\t}\n\t\t.link-iframe-wrapper.big iframe{\n\t\t\t\theight: 900px!important;\n\t\t}\n\n\t\t.link-mdpreview-wrapper {\n\n\t\t}\n\t\t.link-mdpreview {\n\t\t\t\topacity: 0.6;\n\t\t\t\ttransition: 0.2s all;\n\t\t\t\t&:hover {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t}\n\t\t\t\tline-height: 20px;\n\t\t\t\ttext-decoration: none;\n\t\t\t\tcolor: ".concat(W.colors.main,";\n\t\t\t\t// border: solid 2px ").concat(W.colors.main,";\n\t\t\t\tpadding: 0px 6px;\n\t\t\t\tcursor: pointer;\n\t\t\t\tborder-radius: 5px;\n\t\t\t\tsvg {\n\t\t\t\t\t\tcolor: ").concat(W.colors.main,";\n\t\t\t\t}\n\t\t}\n}\n"),"\n\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(W.sizes.block,"px;\n\t\tpadding-right: 0px;\n\t\tmargin: 0px 0px 100px 0px;\n\t\twidth: calc(100% - ").concat(W.sizes.block*(c("desktop")&&!l()?1:2),"px);\n\n\t\tul.folder-children {\n\t\t\t\tmargin: 0px 0px 0px 0px;\n\t\t\t\tpadding: 0px 0px 0px 10px;\n\t\t}\n\n\t\tli.folder-wrapper {\n\n\t\t\t\tposition: relative;\n\t\t\t\tlist-style: none;\n\t\t\t\tfont-size: 13px;\n\t\t\t\tfont-weight: 600;\n\t\t\t\tcursor: pointer;\n\n\t\t\t\t.context-menu-wrapper {\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\ttop: -10px;\n\t\t\t\t\t\tpadding: 10px;\n\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\ttop: 15px;\n\t\t\t\t\t\t\t\tbackground: white;\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 4px rgb(0 0 0 / 10%);\n\t\t\t\t\t\t\t\tcolor: black;\n\t\t\t\t\t\t\t\tpadding: 0px 0px;\n\t\t\t\t\t\t\t\twidth: 100px;\n\t\t\t\t\t\t\t\tz-index: 100;\n\t\t\t\t\t\t\t\tborder-radius: 4px;\n\t\t\t\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\t\t\t\tul {\n\t\t\t\t\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\tmargin: 0px;\n\t\t\t\t\t\t\t\t\t\tli {\n\t\t\t\t\t\t\t\t\t\t\t\tpadding: 4px 11px;\n\t\t\t\t\t\t\t\t\t\t\t\t&:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(W.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(W.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(W.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(W.els().redButton,"\n ").concat(W.font.main,";\n padding: ").concat(c("desktop")?"14px 5px":"13px 7px",";\n margin: 13px 15px 15px 15px;\n\t\t\t\twidth: calc(100% - 30px); \n font-size: ").concat((c("desktop"),11),"px;\n svg {\n margin-right: ").concat(c("desktop")?"10px":"5px",";\n }\n \n }\n"),"\n\n\t\t\t\t&.device-view-mobile {\n\t\t\t\t\t\t.settings-button {\n\t\t\t\t\t\t\t\tbottom: 60px;\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t.settings-button {\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tposition: fixed;\n\t\t\t\t\t\tbottom: 10px;\n\t\t\t\t\t\tleft: 10px;\n\t\t\t\t\t\tz-index: 11;\n\t\t\t\t}\n\n\n\n\t\t\t\t&.without-sidebar.device-view-desktop {\n\t\t\t\t\t\t.left-sidebar-indicator {\n\t\t\t\t\t\t\t\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: ").concat(W.anim.time,";\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tleft: -").concat(Zi.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"===s()?"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(Xi.l2.bg,"; \n\t\t\t\t\t\twidth: ").concat("desktop"===s()?Zi.desktop.l:"navigator"!==t?0:100,"vw;\n\n\t\t\t\t\t\tdisplay: ").concat("desktop"===s()?"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(W.assets.decoBgMap,"');\n\t\t\t\t\t\t\t\tbackground-color: ").concat(W.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(W.colors.fontInterface2,";\n\t\t\t\t\t\t\t\twidth: ").concat(Zi.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(Xi.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(Zi.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(W.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(Zi.search.padding,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(Zi.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(Zi.block,"px ").concat(Zi.block,"px ").concat(Zi.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(Xi.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(Xi.l2.text,";\n\t\t\t\t\t\t\t\tbutton {\n\t\t\t\t\t\t\t\t\t\tcolor: ").concat(Xi.l2.text,";\n\t\t\t\t\t\t\t\t\t\t").concat($i().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(Zi.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 padding: ".concat(Ci.l2.fileLi.padding,"px ").concat(Ci.block-Ci.l2.fileLi.margin,"px;\n margin: ").concat(Ci.l2.fileLi.margin,"px ").concat(Ci.l2.fileLi.margin+5,"px ").concat(Ci.l2.fileLi.margin,"px ").concat(Ci.l2.fileLi.margin,"px ;\n display: block;\n cursor: pointer;\n position: relative;\n height: ").concat(Ci.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(W.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(W.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(Ci.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(yi.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-all;\n\t\t\t\t\t\t\t\t\t\t").concat(c("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(yi.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(Ci.l2.fileLi.img,"px;\n\t\t\t\t\t\t\t\t\t\theight: ").concat(Ci.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(Xi.l2.bg,"; \n\t\t\t\t\t\t.image-gallery-header {\n\t\t\t\t\t\t\t\tpadding-top: ").concat(Zi.search.padding,"px;\n\t\t\t\t\t\t\t\theight: ").concat(Zi.gallery.topH,"px;\n\n\t\t\t\t\t\t\t\t.search-bar-component {\n\t\t\t\t\t\t\t\t\t\t// padding: 10px 0px;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t.image-gallery-component-wrapper {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\t\t\t\t////////////////////////////////////////////v \n\t\t\t\t// TEXT VIEW : RIGHT\n\t\t\t\t\t\t\t\t\t\t\t\t\t ////////////////////////////////////////////v \n\t\t\t\t\t\t\t\t\t\t\t\t\t ").concat("\n.tab-list-scroll-wrapper {\n\t\theight: 44px;\n\t\tbackground: ".concat(W.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(W.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(W.colors.bgTab,";\n\t\t\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\t\t\tcolor: ").concat(W.colors.fontTab,";\n\t\t\t\t\t\t\t\tfont-family: ").concat(W.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(W.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(W.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(W.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(W.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(W.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(W.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("\n\n.draggable-grid-wrapper {\n\t\t// remove transition\n\t\theight: 100%;\n\n\t\t.react-grid-item {\n\t\t\t\ttransition: all 0ms ease;\n\t\t\t\ttransition-property: left, top;\n\t\t\t\t.react-resizable-handle {\n\t\t\t\t\t\tbottom: 0px;\n\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\tcursor: se-resize;\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\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: 7px;\n\t\t\t\t\t\topacity: 0.3;\n\t\t\t\t}\n\t\t}\n\n\t\t.draggable-grid-wrapper-in {\n\t\t\t\theight: 100%;\n\t\t\t\tposition: relative;\n\n\t\t\t\t.draggable-grid, .mobile-grid-view {\n\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t.window-wrapper {\n\t\t\t\t\t\t\t\t//overflow: hidden;\n\t\t\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\t\t\tcolor: ".concat(W.colors.fontEditor,";\n\t\t\t\t\t\t\t\tbackground: ").concat(W.colors.bgEditor,";\n\t\t\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.1);\n\t\t\t\t\t\t\t\toverflow-y: hidden;\n\t\t\t\t\t\t\t\toverflow-x: hidden;\n\t\t\t\t\t\t\t\theight:100%;\n\n\t\t\t\t\t\t\t\t// height 100% everywhere\n\t\t\t\t\t\t\t\t.note-wrapper,\n\t\t\t\t\t\t\t\t.window-editor-wrapper,\n\t\t\t\t\t\t\t\t.dual-view-wrapper,\n\t\t\t\t\t\t\t\t.editor-area,\n\t\t\t\t\t\t\t\t.preview-area-wrapper,\n\t\t\t\t\t\t\t\t.preview-area,\n\t\t\t\t\t\t\t\t.main-editor-wrapper{\n\t\t\t\t\t\t\t\t\t\theight: 100%;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.content-wrapper {\n\t\t\t\t\t\t\t\t\t\theight:100%;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.note-active-ribbon {\n\t\t\t\t\t\t\t\t\t\theight: 2px;\n\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t&.active {\n\t\t\t\t\t\t\t\t\t\t.note-active-ribbon {\n\t\t\t\t\t\t\t\t\t\t\t\t//background:").concat(W.colors.main,";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.dual-view-wrapper\n\t\t\t\t\t\t\t\t\t\t.editor-area\n\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper\n\t\t\t\t\t\t\t\t\t\t.title-input-wrapper\n\t\t\t\t\t\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\t\t\t\t\t\tcolor: ").concat(W.colors.main,";\n\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t.note-wrapper {\n\t\t\t\t\t\t\t\t\t\t.editor-toolbar-dropdown {\n\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\tright: 0px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\n\n\n\n\t\t\t\t\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\tz-index:2;\n\t\t\t\t\t\t\t\t\t\tright: 30px;\n\t\t\t\t\t\t\t\t\t\ttop: 10px;\n\t\t\t\t\t\t\t\t\t\t.delete-button {display: none;}\n\t\t\t\t\t\t\t\t\t\t.add-button {display: none;}\n\t\t\t\t\t\t\t\t\t\t.drag-handle {\n\t\t\t\t\t\t\t\t\t\t\t\tcursor: grab;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.delete-button svg {\n\t\t\t\t\t\t\t\t\t\t\t\ttransform: rotate(45deg);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t&.can-add {\n\t\t\t\t\t\t\t\t\t\t\t\t.add-button {display: block;}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t&.can-remove {\n\t\t\t\t\t\t\t\t\t\t\t\t.delete-button {display: block;}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t// content css modification\n\t\t\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t\t\t.file-path-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\tposition:initial;\n\t\t\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tz-index: 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition:absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//box-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: 32px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 3px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-rigth: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 33px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 3px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-rigth: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 10px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.press-to-save {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttop: -6px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: initial;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 0.5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.big-title {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 65px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-family: ").concat(W.font.editor,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: grey;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfont-size: 15px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// ALL\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t&.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 33px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//padding: 5px 5px 5px 5px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbackground: ").concat(W.colors.bgPreview,";\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//padding: 10px 10px 10px 10px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// FULL PREVIEW\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t&.device-desktop.view-preview {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t// FULL EDITOR\n\t\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t\t\t\t\t\t&.device-desktop.view-editor {\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 33px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n"),"\n\t\t\t\t").concat("\n.draggable-grid-wrapper \n.draggable-grid-wrapper-in \n.mobile-grid-view {\n\t\t.window-wrapper {\n\n\t\t\t\t.window-buttons-bar {\n\t\t\t\t\t\tdisplay: none;\n\t\t\t\t}\n\n\t\t\t\t.note-wrapper {\n\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\tmargin-top: 47px;\n\t\t\t\t\t\t\t\t\t\t.infos-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\tmargin-top: 10px;\n\t\t\t\t\t\t\t\t\t\t\t\ttop: -43px;\n\t\t\t\t\t\t\t\t\t\t\t\t.title-input-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tinput {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolor: ".concat(W.colors.main,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.dropdown-icon {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: -15px;\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.context-menu {\n\t\t\t\t\t\t\t\t\t\t\t\tright: 10px;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t.textarea-editor {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% - 300px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 20px 20px 70px 20px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: calc(100% - 40px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tresize: none;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\theight: calc(100% - 165px);\n\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\ttop: 0px!important;\n\t\t\t\t\t\t\t\t\t\t\t\tbottom: 0px!important;\n\t\t\t\t\t\t\t\t\t\t\t\t.dates-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-content {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px 0px 50px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.scrolling-bar-wrapper {\n\t\t\t\t\t\t\t\t\t\tdisplay:none;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n"),"\n\n\t\t\t\t").concat("\n .mobile-text-manip-toolbar {\n position: fixed;\n bottom: ".concat(W.sizes.mobile.editorBar+10,"px;\n display: flex;\n list-style: none;\n width: 100%;\n padding: 0px;\n align-content: center;\n justify-content: center;\n align-items: center;\n height: ").concat(W.sizes.mobile.editorBar,"px;\n background: ").concat(W.colors.editor.mobileToolbar.bg,";\n li {\n flex: 1 1 auto;\n justify-content: center;\n display: flex;\n }\n }\n"),"\n\t\t\t\t").concat("\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","\n\n\t\t\t\t&.without-sidebar.device-view-desktop {\n\t\t\t\t\t\t.right-wrapper.dual-viewer-view {\n\t\t\t\t\t\t\t\twidth: calc(100vw - 18px);\n\t\t\t\t\t\t\t\tmargin-left: 18px;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t.right-wrapper.dual-viewer-view {\n\n\t\t\t\t\t\twidth: ").concat("desktop"===s()?Zi.desktop.r:"navigator"!==t?100:0,"vw;\n\t\t\t\t\t\theight: 100vh;\n\t\t\t\t\t\tdisplay: ").concat("desktop"===s()||"navigator"!==t?"block":"none",";\n\t\t\t\t\t\tpadding-top: 0px;\n\t\t\t\t\t\t.note-wrapper {\n\t\t\t\t\t\t\t\t.dual-view-wrapper.device-tablet, \n\t\t\t\t\t\t\t\t.dual-view-wrapper.device-mobile {\n\t\t\t\t\t\t\t\t\t\t.editor-area,\n\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t.dual-view-wrapper {\n\t\t\t\t\t\t\t\t\t\t&.view-both.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\t\t\t\t\t.__EDITOR_DESIGN HERE__ {}\n\t\t\t\t\t\t\t\t\t\t&.view-editor.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* display:none */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t&.view-editor-with-map.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 80%;\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t\t.__MINIMAP_DESIGN HERE__ {}\n\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper:hover {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% - 30px);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: -50%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tbox-shadow: -4px 5px 10px rgba(0, 0, 0, 0.10);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-transitions {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 50%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransition-delay: ").concat(W.anim.time,";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tword-break: break-word;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransform: scale(0.2) translateZ(0);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransform-origin: 0px 0px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tright: calc(-80%);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// height: 500vh;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\theight: calc(100% * 5);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-transitions {\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay:").concat(W.anim.time,"; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: padding; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransition-delay:").concat(W.anim.time,"; \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: all; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-delay: 0ms; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* transition-property: bottom; */\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 73%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding: 80px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-right: 140px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpadding-left: 40px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t&.view-preview.device-desktop {\n\t\t\t\t\t\t\t\t\t\t\t\t.editor-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 0%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.main-editor-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tleft: -9999px;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t/* display:none; */\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t.preview-area-wrapper {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.preview-area {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\tposition:relative;\n\t\t\t\t\t\t\t\t\t\tdisplay: ").concat("desktop"===s()?"flex":"block",";\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t").concat((e=t,"\n\n.editor-area {\n\t\twidth: ".concat(c("desktop")?"50%":"editor"===e?"100vw":"0vw",";\n\t\tdisplay: block;\n\n\t\tposition: ").concat(c("desktop")||"editor"===e?"relative":"absolute!important",";\n\t\ttop: ").concat("editor"!==e||c("desktop")?"-9999px":"0px",";\n\n\n\t\t.mobile-text-manip-toolbar {\n\t\t\t\tdisplay: ").concat("editor"!==e||c("desktop")?"none":"flex",";\n\t\t}\n\n\t\t.infos-editor-wrapper {\n\t\t\t\t").concat(c("desktop")?"":"height: ".concat(W.sizes.mobile.editorTopWrapper,"px;"),"\n\t\t\t\t").concat(c("desktop")?"width: calc(200% - ".concat(3*W.sizes.block*2,"px);"):"","\n\t\t\t\tpadding: 0px ").concat(c("desktop")?3*W.sizes.block:2*W.sizes.block,"px;\n\t\t\t\tposition: relative;\n\n\t\t\t\t").concat(mo(),"\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(c("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(W.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(c("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(ce,"\n }\n}\n\n\n\n\n.main-editor-wrapper {\n ").concat(c("desktop")?"":"padding: 0px ".concat(2*W.sizes.block,"px 0px ").concat(2*W.sizes.block,"px;"),"\n ").concat(c("desktop")?"":"margin: 0px 0px ".concat(W.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(W.sizes.mobile.editorTopWrapper+W.sizes.mobile.editorBar+2*W.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\t\t\t\t\t\t\t\t\t\t").concat("\n.cm-selectionLayer {\n pointer-events: none;\n\tz-index:0!important;\n}\n.cm-selectionBackground {\n\tbackground: rgba(0,0,0,0.1);\n}\n\n\n.actionable-title {\n\t\tcolor: ".concat(W.colors.main,";\n\t\tposition: relative;\n\t\t&:before {\n\t\t\t\tcontent: \"\u279d\";\n\t\t\t\tposition: absolute;\n\t\t\t\tright: -20px;\n\t\t\t\tcolor: #c6c6c6;\n\t\t\t\tfont-size: 18px;\n\t\t\t\topacity: 0;\n\t\t\t\ttransition: 0.2s all;\n\t\t\t\tbottom: -3px;\n\t\t}\n\t\t&:hover {\n\t\t\t\t&:before {\n\t\t\t\t\t\topacity: 1\n\t\t\t\t}\n\t\t}\n\t\t&.h1 {\n\t\t\t\tfont-size: 15px;\n\t\t\t\tfont-weight: bold;\n\t\t\t\ttext-decoration: underline;\n\n\t\t}\n\t\t&.h2 {\n\t\t\t\tfont-size: 13px;\n\t\t\t\ttext-decoration: underline;\n\n\t\t}\n\t\t&.h3 {\n\t\t\t\tfont-size: 12px;\n\t\t}\n\n}\n\n\n.cm-matchingBracket {\n\t\tbackground-color: rgba(0,0,0,0)!important;\n}\n\n\n.cm-content {\n\t\t// font-family: 'Open sans', sans-serif;\n\t\tfont-family: Consolas, monaco, monospace;\n\t\tfont-size: 11px;\n}\n\n.cm-focused {\n\t\toutline: none!important;\n}\n.main-editor-wrapper {\n\t\twidth: calc(100% + 18px);\n\t\tmargin: 32px 0px 0px 0px;\n\t\tpadding: 0px;\n\t\twidth:100%;\n\t\theight: ").concat(c("desktop")?"calc(100% - 32px);":"calc(100% - 280px);",'; \n}\n\n.codemirror-editor-wrapper {\n\t\tmargin-right: 18px;\n}\n.codemirror-editor-wrapper, \t.cm-editor, .cm-theme {\n\t\theight: calc(100% - 30px);\n}\n.codemirror-editor-wrapper, \t.cm-editor, .cm-theme {\n\t\theight: 100% ;\n\t\toverflow:hidden;\n\t\tpadding: 0px;\n}\n.cm-editor {\n\t\tword-break: break-all;\n}\n.cm-content {\n\t\twidth: 100%;\n\t\toverflow:hidden;\n\t\twhite-space: pre-wrap;\n}\n.cm-scroller {\n\t\tleft: 15px;\n\t\tpadding-right: 15px;\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(W.colors.main,';\n\t\t\t\tborder-radius: 2px;\n\t\t}\n\n}\n\n.codemirror-mobile-fallback {\n\t\tmargin: 10px;\n\t\ttextarea {\n\t\t\t\twidth: calc(100% - 20px);\n\t\t\t\theight: calc(100vh - 350px);\n\t\t}\n}\n\n.test-success {\n// background: orange;\ncolor: red;\ndisplay: block;\npadding-top: 50px;\n}\n.tiro-image {\n\t\tcolor: red;\n\t\tdisplay: block;\npadding: 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("\n.latex-height {\n\t\theight: 20px;\n\t\toverflow: scroll;\n\t\tline-height: initial;\n\t\tbackground: rgb(247,247,247);\n\t\tpadding: 10px;\n\t\tborder-radius: 5px;\n\t\tcolor: rgba(0,0,0,0);\n\t\ttransition: all 0.2s;\n\t\t.katex, .katex span {\n\t\t\t\tcolor: black;\n\t\t}\n}\n\n.mdpreview-source {\n\t\tfont-weight: bold;\n\t\tcolor: #b4b4b4;\n\t\tfont-size: 9px;\n\t\tdisplay: block;\n}\n\n.cm-mdpreview-wrapper {\n\t\tline-height: 0px;\n\n\t\t&.latex-wrapper {\n\t\t\t\tposition: relative;\n\t\t\t\tleft: -10px;\n\t\t\t\tdisplay: inline-block;\n\t\t}\n\t\t&.image-wrapper {\n\t\t\t\t/* max-height: 160px; */\n\t\t}\n\n\t\t.cm-mdpreview-image {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-block;\n\n\t\t\t\timg {\n\t\t\t\t\t\tmargin: 5px 0px;\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tbox-shadow: 0px 0px 5px rgba(0,0,0,.2);\n\t\t\t\t\t\tmax-width: calc(100% - 20px);\n\t\t\t\t\t\tborder-radius: 5px;\n\t\t\t\t\t\tmax-height: 220px;\n\t\t\t\t}\n\t\t\t\t.enlarge {\n\t\t\t\t\t\twidth: 10px;\n\t\t\t\t\t\topacity: 0;\n\t\t\t\t\t\ttransition: 0.2s all;\n\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\ttop: 8px;\n\t\t\t\t\t\tright: 23px;\n\t\t\t\t\t\tz-index: 2;\n\t\t\t\t\t\tpadding: 6px;\n\t\t\t\t\t\tcursor: pointer;\n\t\t\t\t\t\tbackground: rgba(0,0,0,0.6);\n\t\t\t\t\t\tborder-radius: 19px;\n\t\t\t\t}\n\t\t\t\tsvg, span {\n\t\t\t\t\t\tpointer-events: none;\n\t\t\t\t}\n\t\t\t\tsvg {\n\t\t\t\t\t\tbox-shadow: 0 0 0 rgba(0,0,0,0.4);\n\t\t\t\t}\n\n\t\t}\n\t\t&:hover .enlarge {\n\t\t\t\topacity: 0.3;\n\t\t\t\t/* pointer-events: all; */\n\t\t}\n}\n}\n\n ".concat("\n.cm-mdpreview-wrapper.image-wrapper {\n\t\t.mdpreview-source {\n\t\t\t\tline-height: initial;\n\t\t}\n}\n\n","\n "),"\n\n// FILE RESSOURCE PREVIEW\n").concat(No(),"\n\n// PREVIEW LINK\n").concat(Ft(),"\n\n"),"\n\n\n\t\t\t\t\t\t\t\t\t\t").concat("\n.preview-area {\n\t\tmargin-top: 5px;\n .infos-preview-wrapper {\n\t\t\t\tborder-bottom: 1px solid rgba(0 0 0 / 5%);\n display: ".concat(c("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\t\toverflow: scroll; \n\t\twidth: calc(100% );\n padding-right: 30px;\n\n ").concat(mo,"\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(W.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(xo(),"\n}\n.view-both .preview-area {\n\t\tmargin-top: 20px;\n}\n\n.preview-area-wrapper {\n\t\theight: calc(100% - 35px);\n margin-top: ").concat(c("desktop")?"140":"0","px;\n\n}\n\n"),"\n\n\t\t\t\t\t\t\t\t\t\t").concat(ce(),"\n\t\t\t\t\t\t\t\t\t\t").concat("\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",'\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\th3 {\n\t\t\t\t\t\t\t\tmargin-bottom: 0px;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpre {\n\t\t\t\t\t\t\t\twhite-space: -moz-pre-wrap; /* Mozilla, supported since 1999 */\n\t\t\t\t\t\t\t\twhite-space: -pre-wrap; /* Opera */\n\t\t\t\t\t\t\t\twhite-space: -o-pre-wrap; /* Opera */\n\t\t\t\t\t\t\t\twhite-space: pre-wrap; /* CSS3 - Text module (Candidate Recommendation) http://www.w3.org/TR/css3-text/#white-space */\n\t\t\t\t\t\t\t\tword-wrap: break-word; /* IE 5.5+ */\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t}\n}\n\n\n.preview-content {\n\t\tcounter-reset: h2counter;\n h1 {\n counter-reset: h2counter;\n }\n h2:before {\n content: counter(h2counter) ".\\0000a0\\0000a0";\n counter-increment: h2counter;\n counter-reset: h3counter;\n }\n h3:before {\n content: counter(h2counter) "." counter(h3counter) ".\\0000a0\\0000a0";\n counter-increment: h3counter;\n }\n}\n\n\n');return Object(Kt.a)(o,";","")},tr="\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",nr=function(t,n,e,o){var i=function(t,n){console.log("[MOVEFILE] ".concat(t," -> ").concat(n)),$o().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,e){$o().then((function(o){o.popup.confirm("Move <p>".concat(null===n||void 0===n?void 0:n.length,'</p> file(s) to <p>"').concat(e.key,'"</p>?\n<br>\n<br>\nRessources links will be automatically updated<br>\n').concat(tr,"\n"),(function(){for(var o=0;o<n.length;o++){var r=n[o],a="".concat(r.path),c="".concat(e.key,"/").concat(r.name);i(a,c),t()}}))}))},promptAndMoveFolder:function(i){console.log(777,i);var r=Object(p.a)({},i),a=r.folder,c=r.folderToDropInto,l=r.folderBasePath,s=r.newTitle,u=r.renameOnly,d=[a.path,"".concat(u?$e(c):c.path,"/").concat(s||a.title)],f="".concat(l,"/").concat(d[0]),b="".concat(l,"/").concat(d[1]);$o().then((function(i){i.popup.confirm("\n".concat(j.moveFolderPrompt," <p>").concat(d[0],"</p> to <p>").concat(d[1],"</p>?\n").concat(tr,"\n"),(function(){console.log("CONFIRM, DO IT"),function(t,n){console.log("[MOVEFOLDER] ".concat(t," -> ").concat(n)),$o().then((function(e){e.folders.move(t,n,(function(){e&&e.ui.browser.goTo(e.ui.browser.folders.current.get)}))}))}(f,b),t(),n(),e(),setTimeout((function(){o([$e(a),c.path],{cache:!1})}),100)}))}))}}},er="[LAST FILE]",or=x.log.verbose,ir=function(){return{nature:"file",name:"",realname:"",path:"",folder:""}},rr=function(t){var n=Object(o.useState)({}),e=Object(r.a)(n,2),i=e[0],c=e[1];Object(o.useEffect)((function(){}),[t.files]);var l=Object(o.useReducer)((function(t){return t+1}),0),s=Object(r.a)(l,2)[1],u=Object(o.useState)(2),d=Object(r.a)(u,2),p=d[0],f=d[1];Object(o.useEffect)((function(){Xo((function(t){f(t.userSettings.get("ui_filesList_sortMode"))}))}),[]);return Object(a.d)("div",{className:"files-list-component"},Object(a.d)("div",{className:"list-toolbar"},Object(a.d)("button",{type:"button",title:"sort",onClick:function(){var n=p+1>=Z.length?0:p+1;Xo((function(e){e.userSettings.set("ui_filesList_sortMode",n),f(n),t.onSortFiles(Q(t.files,n))}))}},Object(a.d)("span",null,t.files.length>0&&Object(a.d)("span",{className:"list-count"},"(",t.files.length,")"),X[p]),Object(a.d)(Qt,{name:"faSort",color:W.colors.l2.text}))),Object(a.d)("div",{className:"list-wrapper"},Object(a.d)(ji,{files:t.files,filesPreview:i,hoverMode:!1,activeFileIndex:t.activeFileIndex,sortMode:p,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 r=t[o];i[r]&&!n||e.push(r)}e.length>1&&Xo((function(t){t.files.getPreviews(e,(function(t){Object(b.each)(t,(function(t){i[t.path]=t})),c(i),s()}))}))}(t,!0)}})))},ar="[PWA]",cr=x.log.verbose,lr=e(91),sr=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},ur=Object(y.a)((function t(n){var e=this;Object(k.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 r=n[i];if(r.length>e.chunkLength)for(var a=r.split(" "),c="",l=0;l<a.length;l++)((c+=a[l]+" ").length>e.chunkLength||l===a.length-1)&&(o.push(c),c="");else o.push(r)}return console.log(o),o},this.loadVoice=function(t){console.log("[TTS] LOAD VOICE",t),e.voice=t},this.updateSpeed=function(t){e.speed=t},this.play=function(){if(e.isLoaded)console.log("[TTS] RESUME play chunk ".concat(e.currChunkId)),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(){console.log("[TTS] pause"),e.stop()},this.stop=function(){console.log("[TTS] stop"),e.shouldStop=!0,e.isLoaded=!1,window.speechSynthesis.cancel()},this.goToChunk=function(t){console.log("[TTS] goToChunk",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(b.each)(n,(function(t){if(t.length>50)return o=t,!1})),!o)return-1;var i=-1;return Object(b.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(b.debounce)((function(){console.log("DEBOUNCE RESTART"),e.stop(),e.play()}),500),this.goBack=function(){console.log("[TTS] goBack",e.currChunkId),e.goToChunk(e.currChunkId-1)},this.goForward=function(){console.log("[TTS] goForward",e.currChunkId),e.goToChunk(e.currChunkId+1)},this.rawText=n.text,this.text2read=function(t){var n=t;return n=(n=(n=n.replace(dt.ressource,"")).replace(dt.ref,"")).replace(dt.baliseHtml,""),console.log("cleanText2Speech",n),n}(n.text),this.chunkedText=this.chunkText(this.text2read),console.log("[TTS] init new manager ",{p:n,text:this.chunkedText,length:this.chunkedText.length})})),dr="[SCREEN WAKE LOCK]",pr=null,fr=function(){var t=Object(wt.a)(Object(vt.a)().mark((function t(){return Object(vt.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:pr=t.sent,console.log(dr,"ACTIVE"),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.log(dr,"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 br=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],c=e[1],l=O("tts-selected-voice",0),u=Object(r.a)(l,2),d=u[0],p=u[1],f=Object(o.useState)(!1),b=Object(r.a)(f,2),g=b[0],h=b[1],m=function(t){!0===t?fr():pr&&pr.release().then((function(){pr=null,console.log(dr,"DISABLED")})),h(t)},v=O("tts-pos-".concat(t.file.name),0),w=Object(r.a)(v,2),x=w[0],k=w[1],y=O("tts-rate",1),C=Object(r.a)(y,2),S=C[0],T=C[1],E=Object(o.useState)(0),I=Object(r.a)(E,2),N=I[0],F=I[1],L=Object(o.useRef)();Object(o.useEffect)((function(){setTimeout((function(){sr()[d]&&L.current.loadVoice(sr()[d].obj)})),L.current=new ur({text:t.fileContent}),L.current.goToChunk(x)}),[]),Object(o.useEffect)((function(){sr()[d]&&L.current.loadVoice(sr()[d].obj)}),[d]),Object(o.useEffect)((function(){L.current.updateSpeed(S)}),[S]);var R=Object(o.useRef)(!1);return di((function(){c(L.current.isPlaying());var n=-1;(0!==L.current.currChunkId&&(n=L.current.currChunkId),t.startString&&!R.current)&&(n=L.current.extractToChunkPos(t.startString),L.current.goToChunk(n),R.current=!0);-1!==n&&k(n),F(L.current.chunkedText.length)}),500),Object(o.useEffect)((function(){var n=L.current.getCurrentChunkText();t.onUpdate({totalChunks:N,currentChunk:x,isPlaying:i,currentText:n})}),[N,x,i]),Object(a.d)(gr,null,Object(a.d)(q,{title:"".concat(j.ttsPopup.title),onClose:function(){L.current.stop(),t.onUpdate({totalChunks:N,currentChunk:x,isPlaying:!1}),t.onClose()}},Object(a.d)(V,{value:d,type:"select",list:sr(),label:j.ttsPopup.voice,onSelectChange:function(t){p(parseInt(t))}}),Object(a.d)("span",null," SPEED : "),Object(a.d)("input",{type:"range",value:S,min:"0",max:"3",step:"0.1",onChange:function(t){var n=t.target.value;T(n)}}),Object(a.d)("br",null),Object(a.d)("br",null),Object(a.d)("input",{type:"range",value:x,min:"0",max:N,onChange:function(t){var n=parseInt(t.target.value);L.current.goToChunk(n),k(n)}}),Object(a.d)("input",{type:"number",value:x,min:"0",max:N,onChange:function(t){var n=parseInt(t.target.value);L.current.goToChunk(n),k(n)}})," / ",N,Object(a.d)("div",{className:"buttons"},Object(a.d)("button",{onClick:function(t){L.current.goBack()}},Object(a.d)(Qt,{name:"faFastBackward",color:"black"})),Object(a.d)("button",{onClick:function(t){i?L.current.pause():L.current.play()}},Object(a.d)(Qt,{name:i?"faPause":"faPlay",color:"black"})),Object(a.d)("button",{onClick:function(t){L.current.goForward()}},Object(a.d)(Qt,{name:"faFastForward",color:"black"})),"desktop"!==s()&&Object(a.d)("button",{onClick:function(t){m(!0)}},Object(a.d)(Qt,{name:"faLock",color:"black"})))),g&&Object(a.d)("div",{className:"bg-lock"},Object(a.d)("button",{onContextMenu:function(t){m(!1)}},Object(a.d)(Qt,{name:"faUnlock",color:"black"}))))},gr=Object(Vn.a)("div",{target:"e1kwupat0"})({name:"11mbgq1",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;}}"}),hr="[TTS API]";Yt(Object(a.d)((function(){Object(o.useEffect)((function(){cr&&console.log(ar," init"),"serviceWorker"in navigator&&navigator.serviceWorker.register("/service-worker.js"),window.addEventListener("beforeinstallprompt",(function(t){t.preventDefault(),cr&&console.log(ar," beforeinstallprompt WORKING=>",t),window.deferredPrompt=t})),console.log("========= [APP] MOUNTED on a ".concat(s())),new Promise((function(t,n){_e||(_e=h(ai()),Be.log.socket&&console.log("[SOCKET] try connecting to ".concat(ai(),"...")),(He=li(_e)).on("connectionSuccess",(function(n){Be.log.socket&&console.log("[SOCKET] connection successful!, socket.connected :".concat(_e.connected),n),n.isRgGood||alert(j.rgNotWorking),t({socket:_e,ipsServer:n.ipsServer,socketManager:He})})))})).then((function(t){D(!0),bt&&bt.status.ipsServer.set(t.ipsServer)})),window.onkeydown=function(t){var n=wi(t);Object(b.isNull)(mi[n])||(mi[n]=!0);var e="".concat(n,"-down");xi[e]&&xi[e]()},window.onkeyup=function(t){var n=wi(t);Object(b.isNull)(mi[n])||(mi[n]=!1);var e="".concat(n,"-up");xi[e]&&xi[e]()};return function(){console.log("app will unmount")}}),[]);var t=function(){gt.active.set(-1)},n=function(){ft.ui.browser.files.set([])},e=(Object(b.debounce)((function(){}),100),function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],l=e[1],s=Object(o.useState)(""),u=Object(r.a)(s,2),d=u[0],p=u[1],f=Object(o.useState)(""),b=Object(r.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(""),v=Object(r.a)(m,2),w=v[0],O=v[1],k=Object(o.useState)(),y=Object(r.a)(k,2),C=y[0],S=y[1],T="[SETUP CONFIG]",E=x.log.verbose,I=Object(o.useRef)(0);return Object(o.useEffect)((function(){return E&&console.log(T," init socket listener"),I.current=He.on("getSetupInfos",(function(n){"SUCCESS_CONFIG_CREATION"===n.code?(S(["success","".concat(j.setupForm.successReload)]),setTimeout((function(){window.location.reload()}),3e3)):"ASK_SETUP"===n.code?(t.cleanAllApp(),l(!0),n.defaultFolder&&O(n.defaultFolder)):S(["error","".concat(n.code,": ").concat(n.message)])})),function(){E&&console.log(T," clean socket listener"),He.off(I.current)}}),[]),{displayWelcomePopup:c,SetupPopupComponent:function(t){return Object(a.d)(i.a.Fragment,null,c&&Object(a.d)("div",{className:"setup-popup-component"},Object(a.d)(q,{title:"Welcome to Tiro",onClose:function(){}},Object(a.d)("p",null,j.setupForm.introText)," ",Object(a.d)("br",null),Object(a.d)("div",null,Object(a.d)(V,{value:d,label:j.setupForm.user,explanation:j.setupForm.userExplanation,onChange:function(t){p(t)},shouldNotSelectOnClick:!0}),Object(a.d)(V,{value:g,label:j.setupForm.password,type:"password",explanation:j.setupForm.passwordExplanation,onChange:function(t){h(t)},shouldNotSelectOnClick:!0}),Object(a.d)(V,{value:w,label:j.setupForm.dataFolder,explanation:j.setupForm.folderExplanation,onChange:function(t){O(t)},shouldNotSelectOnClick:!0}),Object(a.d)("input",{type:"button",value:"submit",className:"submit-button",onClick:function(t){S(void 0),He.emit("sendSetupInfos",{form:{user:d,password:g,dataFolder:w},token:tt()})}}),C&&Object(a.d)("div",{className:C[0]},C[1])))))}}}({cleanAllApp:function(){console.log("[cleanAllApp]"),jt(),vt(),t(),n()}})),c=e.SetupPopupComponent,l=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),c=e[0],l=e[1],s=Object(o.useState)(""),u=Object(r.a)(s,2),d=u[0],p=u[1],f=Object(o.useState)(""),b=Object(r.a)(f,2),g=b[0],h=b[1],m=Object(o.useState)(),v=Object(r.a)(m,2),w=v[0],x=v[1],O=Object(o.useRef)(0);Object(o.useEffect)((function(){return O.current=He.on("getLoginInfos",(function(n){switch(n.code){case"SUCCESS":if(!n.token)return;et(n.token),l(!1),t.onLoginSuccess();break;case"WRONG_TOKEN":l(!0),x(["error",j.loginForm.wrongToken]);var e=n.loginInfos;null!==e&&void 0!==e&&e.demo_mode&&(p("viewer"),h(e.viewer_password)),t.onLoginAsked();break;case"WRONG_USER_PASSWORD":x(["error",j.loginForm.wrongUserPassword]),l(!0)}})),function(){He.off(O.current)}}),[]);var k=function(){x(void 0),He.emit("sendLoginInfos",{user:d,password:g,token:tt()})},y=Object(o.useState)(1),C=Object(r.a)(y,2),S=C[0],T=C[1];return{displayLoginPopup:c,LoginPopupComponent:function(t){return Object(a.d)(i.a.Fragment,null,c&&Object(a.d)("div",{className:"setup-popup-component"},Object(a.d)(q,{title:j.setupForm.title,onClose:function(){}},Object(a.d)("div",null,Object(a.d)(V,{shouldFocus:1===S,value:d,onEnterPressed:function(){T(2)},label:j.setupForm.user,onChange:function(t){p(t)}}),Object(a.d)(V,{shouldFocus:2===S,value:g,label:j.setupForm.password,type:"password",onEnterPressed:function(){k()},onChange:function(t){h(t)}}),Object(a.d)("button",{value:"submit",className:"submit-button",onClick:function(t){k()}},j.setupForm.submit),w&&Object(a.d)("div",{className:w[0]},w[1])))))}}}({onLoginAsked:function(){console.log("[cleanListAndFileContent]"),t(),n()},onLoginSuccess:function(){k(),m(),kt(),Xo((function(t){t.ui.browser.folders.refreshFromBackend()})),mt(["/"])}}),u=l.LoginPopupComponent,d=ao(),g=d.userSettingsApi,m=d.refreshUserSettingsFromBackend,v=function(){var t=ot("tabs",[]),n=Object(r.a)(t,3),e=n[0],o=n[1],i=n[2],a=function(t){o(t)},c=function(t){var n=Pe({fullWindowFile:t});if(n){var o=[].concat(Object(f.a)(e),[n]),i=De(n.id,o);a(i)}},l=function(t){var n=[],o=Object(b.cloneDeep)(e);Object(b.each)(o,(function(e,o){e.id!==t&&n.push(e)})),a(n)},u=function(t){if(!t){var n=Object(b.cloneDeep)(e),o=Ae(n);if(!Object(b.isNumber)(o))return;t=n[o]}if(t.grid.layout[0]){var i,r=t.grid;return Object(b.each)(r.content,(function(t,n){t.active&&(i={layout:r.layout[n],content:r.content[n]})})),i}};return{tabs:e,updateTab:function(t,n,o){if("add"===t)$o().then((function(t){c(t.ui.browser.files.active.get)}));else if("close"===t){if(!n)return;l(n.id)}else if("rename"===t){if(!n)return;if(o.length>15)return;var i=Object(b.cloneDeep)(e);Object(b.each)(i,(function(t){t.id===n.id&&(t.name=o,t.manualName=!0)})),a(i)}else if("activate"===t){if(!n)return;var r=De(n.id,e),d=Le(r);if(a(d),"desktop"!==s()){var p,f=null===(p=u(n))||void 0===p?void 0:p.content.file;if(!f)return;Xo((function(t){t.ui.browser.goTo(f.folder,f.name)}))}}},refreshTabsFromBackend:i,updateActiveTabGrid:function(t){var n=Object(b.cloneDeep)(e),o=Ae(n);Object(b.isNumber)(o)&&(n[o].grid=t,a(n))},refreshWindowGrid:function(){var t=Le(e);a(t)},tabsApi:{get:function(){return e},close:l,openInNewTab:c,reorder:function(t,n){var o=Object(b.cloneDeep)(e),i=o[t];o.splice(t,1),o.splice(n,0,i),a(o)},active:{get:function(){var t=null;return Object(b.each)(e,(function(n){n.active&&(t=n)})),t}}},windowsApi:{close:function(t){var n=Object(b.cloneDeep)(e);Object(b.each)(t,(function(t){Object(b.each)(n,(function(n,e){for(var o=0;o<n.grid.content.length;o++){var i=n.grid.content[o],r=n.grid.layout[o];i.i===t&&n.grid.content.splice(o,1),r.i===t&&n.grid.layout.splice(o,1)}}))}));var o=Le(n);a(o)},active:{get:u,setContent:function(t){if(t){var n=Object(b.cloneDeep)(e),o=Ae(n);if(Object(b.isNumber)(o)){var i=n[o],r=i.grid.content;if(!(r.length<1)){var c=0;Object(b.each)(r,(function(t,n){!0===t.active&&(c=n)})),r[c].file=Object(b.cloneDeep)(t),i.manualName||(i.name=Re(t.name));var l=Le(n);a(l)}}}}},updateWindows:function(t,n){var o=Object(b.cloneDeep)(e);Object(b.each)(t,(function(t){Object(b.each)(o,(function(e,o){Object(b.each)(e.grid.content,(function(e){e.i===t&&(e.file=n)}))}))}));var i=Le(o);a(i)},getIdsFromFile:function(t){var n=[];return Object(b.each)(e,(function(e){Object(b.each)(e.grid.content,(function(e){e.file&&e.file.path===t&&n.push(e.i)}))})),n}}}}(),w=v.tabs,O=v.updateTab,k=v.refreshTabsFromBackend,y=v.updateActiveTabGrid,C=v.refreshWindowGrid,S=v.tabsApi,T=v.windowsApi,E=S.active.get(),I=Di(),N=I.PromptPopupComponent,F=I.popupApi,L=function(){var t=Object(o.useRef)([]),n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],c=e[1],l=Object(o.useState)(!1),s=Object(r.a)(l,2),u=s[0],d=s[1],p="(DISCONNECTED)",f=Object(o.useRef)(p);di((function(){f.current=f.current===p?"(/!\\ DISCONNECTED /!\\)":p;var t=i?"".concat(pi()," (Connected)"):"".concat(pi()," ").concat(f.current);document.title=t}),1e3),Object(o.useEffect)((function(){return t.current[0]=He.on("disconnect",(function(){b(!1)})),t.current[1]=He.on("reconnect",(function(){b(!0),d(!0),setTimeout((function(){d(!1)}),1e3)})),t.current[2]=He.on("connect",(function(){b(!0),d(!0),setTimeout((function(){d(!1)}),1e3)})),function(){t.current.forEach((function(t){He.off(t)}))}}),[]);var b=function(t){x.log.verbose&&console.log("[SOCKET CONNECTION TOGGLE] to ".concat(t)),c(t)};return{isConnected:i,connectionStatusComponent:function(){var t=["connected","connected"];return u&&(t=["back-online","back online"]),i||(t=["disconnected","disconnected"]),Object(a.d)("div",{className:"connection-status"},Object(a.d)("div",{className:t[0]},t[1]))},toggleSocketConnection:b}}(),R=L.isConnected,A=L.connectionStatusComponent,D=L.toggleSocketConnection;di((function(){}),1e3);var P=function(){var t=Object(o.useState)(!1),n=Object(r.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(0),c=Object(r.a)(a,2),l=c[0],s=c[1],u=Object(o.useRef)(0);return Object(o.useEffect)((function(){var t=Object(b.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}}(),M=P.forceResponsiveRender,z=P.responsiveRefreshCounter,B=P.setResponsiveRefresh,_=Object(o.useRef)([]),H=Object(o.useState)(!1),U=Object(r.a)(H,2),G=U[0],J=U[1],Y=function(){var t=Object(o.useState)([]),n=Object(r.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(0),c=Object(r.a)(a,2),l=c[0],s=c[1];return{lightboxApi:{open:function(t,n){console.log("[LIGHTBOX] open ".concat(n.length," images to index ").concat(t),{images:n});var e=[];Object(b.each)(n,(function(t){if(Object(b.isString)(t)){var n={file:ir(),title:"",url:t};e.push(n)}else e.push(t)})),i(e),s(t)},close:function(){console.log("[LIGHTBOX] close"),i([]),s(0)}},lightboxImages:e,lightboxIndex:l}}(),$=Y.lightboxApi,X=Y.lightboxImages,Z=Y.lightboxIndex,Q=function(){var t=Object(o.useState)(!1),n=Object(r.a)(t,2),e=n[0],i=n[1],a=Object(o.useState)(null),c=Object(r.a)(a,2),l=c[0],s=c[1],u=Object(o.useState)(null),d=Object(r.a)(u,2),p=d[0],f=d[1],b=Object(o.useState)(""),g=Object(r.a)(b,2),h=g[0],m=g[1],v=Object(o.useRef)(null);return{ttsApi:{open:function(t,n,e){console.log(hr,"open",{filePath:t,content:n,startString:e});var o=K(t);o&&(s(o),e&&f(e),m(n),i(!0))},close:function(){console.log(hr," close"),i(!1)},getStatus:function(cb){console.log(hr,"getStatus",v.current,cb,cb.toString()),v.current&&cb(v.current)}},ttsPopupContent:h,ttsPopupFile:l,ttsPos:p,setTtsPopup:i,ttsPopup:e,syncTtsStatus:function(t){v.current=t}}}(),nt=Q.ttsApi,it=Q.ttsPos,rt=Q.ttsPopup,at=Q.setTtsPopup,lt=Q.ttsPopupContent,st=Q.ttsPopupFile,ut=Q.syncTtsStatus,dt=function(t){var n=Object(o.useState)(!1),e=Object(r.a)(n,2),i=e[0],a=e[1],c=Object(o.useState)([]),l=Object(r.a)(c,2),s=l[0],u=l[1];return{isConnected:t.isConnected,searching:{get:i,set:a},ipsServer:{get:s,set:u,getLocal:function(){var t=s[0];return Object(b.each)(s,(function(n){n.startsWith("192.168")&&(t=n)})),t}},refresh:Object(p.a)(Object(p.a)({},t.refresh),{},{increment:function(){t.refresh.set(t.refresh.get+1)}})}}({isConnected:R,refresh:{get:z,set:B}}),pt=function(){var t="[NOTE HISTORY] ",n=x.log.verbose,e=Object(o.useRef)({}),i=function(){return(new Date).getTime()},r=function(e,o,i){n&&console.log("".concat(t," saveNoteHistory ").concat(e)),He.emit("createHistoryFile",{filePath:e,content:o,historyFileType:i,token:tt()})};return{save:r,intervalSave:function(o,a){var c=e.current[o];(!c||c&&c+6e4<i())&&(n&&console.log("".concat(t," ").concat(o,", time ").concat(1," expired/inexistand, PROCEED BACKUP")),r(o,a,"int"),e.current[o]=i())}}}(),ft=Qo({popupApi:F,tabsApi:S,userSettingsApi:g,windowsApi:T,statusApi:dt,historyApi:pt,lightboxApi:$,ttsApi:nt}),bt=ft,gt=bt.ui.browser.files,ht=bt.ui.browser.folders,mt=ht.scan,vt=ht.clean,wt=ht.base,xt=function(t){var n=ot("files-history",[]),e=Object(r.a)(n,3),i=e[0],a=e[1],c=e[2];Object(o.useEffect)((function(){or&&console.log(er," activeFile changed!",t),t&&l(t)}),[t]);var l=function(t){or&&console.log(er,"Add to history",t.name);for(var n=!0,e=-1,o=i,r=0;r<i.length;r++)i[r].name===t.name&&(n=!1,e=r);n||o.splice(e,1),(o=o.slice(0,200)).unshift(t),a(o)};return gn(l,1e3),{filesHistory:i,cleanLastFilesHistory:function(){a([])},refreshFilesHistoryFromBackend:c}}(gt.active.get),Ot=xt.filesHistory,jt=xt.cleanLastFilesHistory,kt=xt.refreshFilesHistoryFromBackend,yt=nr(t,n,vt,mt),Ct=(yt.askForMoveFile,yt.promptAndMoveFolder),St=yt.promptAndBatchMoveFiles,Tt=function(){var t=Object(o.useState)("navigator"),n=Object(r.a)(t,2),e=n[0],c=n[1];return{mobileView:e,setMobileView:c,MobileToolbarComponent:function(t){return ui(Object(a.d)(i.a.Fragment,null,"desktop"!==s()&&Object(a.d)(nn,{class:"mobile-view-toggler",buttons:[{icon:"faStream",class:"".concat("navigator"===e?"active":""),action:function(){c("navigator")}},{icon:"faPenNib",class:"".concat("editor"===e?"active":""),action:function(){c("editor")}},{icon:"faEye",class:"".concat("preview"===e?"active":""),action:function(){c("preview")}},{icon:"faSearch",class:"",action:function(){t.onButtons[0]&&t.onButtons[0]()}}]})),[e,t.forceRerender])}}}(),Et=Tt.mobileView,It=Tt.MobileToolbarComponent;window.api=bt;var Nt=Object(o.useState)(!1),Ft=Object(r.a)(Nt,2),Lt=Ft[0],Rt=Ft[1];return Object(o.useEffect)((function(){return lr.bind("alt + spacebar",(function(){Rt(!0)})),lr.bind("esc",(function(){Rt(!1)})),function(){lr.releaseAllKeys()}}),[Ot]),Object(a.d)("div",{className:Qi(Et,bt.userSettings.refresh.css.get)},Object(a.d)("div",{className:" ".concat("mobile"===s()?"mobile-view-".concat(Et):"")},Object(a.d)(Zo.Provider,{value:ft},Lt&&Object(a.d)(Gi,{lastNotes:Ot,onClose:function(t){Rt(!1)}}),Object(a.d)(a.b,{styles:Object(a.c)("*{-webkit-print-color-adjust:exact!important;color-adjust:exact!important;}*:focus{outline:none;}body{margin:0;padding:0px;background:",W.colors.bg.light,";font-size:11px;font-family:",W.font.main,";}html,body{height:100vh;overflow:hidden;background:",W.colors.bgInterface,";}button,input{font-family:",W.font.main,";font-weight:700;color:",W.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: scroll;\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.d)("div",{role:"dialog",className:"\n\t\t\t\t\t\t\t\tmain-wrapper\n\t\t\t\t\t\t\t\t".concat(bt.userSettings.get("ui_sidebar")?"with-sidebar":"without-sidebar","\n\t\t\t\t\t\t\t\tdevice-view-").concat(s())},N(),u({}),c({}),A(),It({forceRerender:M,onButtons:[function(){Rt(!Lt)}]}),Object(a.d)("div",{className:"left-sidebar-indicator"},Object(a.d)("div",{className:"left-wrapper"},Object(a.d)("div",{className:"left-wrapper-1"},Object(a.d)("div",{className:"invisible-scrollbars"},Object(a.d)(bi,{onNewFile:function(){Xo((function(t){var n=t.ui.browser.folders.current.get;t.file.create(n,(function(e){var o=function(t){var n=t[0];return n?(Object(b.each)(t,(function(t){t.created&&n.created&&t.created>n.created&&(n=t)})),n):null}(e);o&&t.ui.browser.goTo(n,o.name,{openIn:"activeWindow"})}))}))}}),bt.userSettings.get("ui_layout_shortcuts_panel")&&Object(a.d)(Yi,{filePath:".tiro/shortcuts.md",onClick:function(){}}),Object(a.d)(Ni,{files:Ot,onClick:function(t){ft.ui.browser.goTo(t.folder,t.name,{openIn:"active"})}}),Object(a.d)(Ei,{openFolders:ht.open.get,folder:ht.get,current:ht.current.get,onFolderClicked:function(t){ft.ui.browser.goTo(t,null)},onFolderMenuAction:function(t,n,e){var o,i,r;"rename"===t&&e?(Ct({folder:n,folderToDropInto:n,folderBasePath:wt,newTitle:e,renameOnly:!0}),mt([n.path],{cache:!1})):"create"===t&&e?(i=e,r=n,console.log("[askFolderCreate]",i,r),He.emit("askFolderCreate",{newFolderName:i,parent:r,token:tt()}),mt([n.path],{cache:!1})):"moveToTrash"===t?(Ct({folder:n,folderToDropInto:ct,folderBasePath:wt,newTitle:e}),mt([n.path],{cache:!1})):"delete"===t&&(o=n,console.log("[askFolderDelete]",o),He.emit("askFolderDelete",{folderToDelete:o,token:tt()}),mt([n.path],{cache:!1})),mt(ht.open.get,{cache:!1,background:!0})},onFolderOpen:function(t){mt([t],{cache:!1})},onFolderClose:function(t){},onFolderDragStart:function(t){console.log("[DRAG MOVE] onFolderDragStart",t),_.current=[{type:"folder",folder:t}]},onFolderDragEnd:function(){console.log("[DRAG MOVE] onFolderDragEnd"),_.current=[]},onFolderDrop:function(t){!function(t){console.log("[DRAG MOVE] processDragDropAction ->",_.current,t);var n=_.current[0];"file"===n.type&&n.files?St(n.files,t):"folder"===n.type&&n.folder&&Ct({folder:n.folder,folderToDropInto:t,folderBasePath:wt})}(t)}})),Object(a.d)("div",{className:"settings-button",onClick:function(){J(!G)}},Object(a.d)(Qt,{name:"faCog",color:"grey"})),G&&Object(a.d)(ri,{onClose:function(){J(!1)}})),Object(a.d)("div",{className:"left-wrapper-2"},Object(a.d)("div",{className:"top-files-list-wrapper"},Object(a.d)("div",{className:"subtitle-wrapper"},Object(a.d)("div",{className:"folder-wrapper"},bt&&bt.ui.browser.folders.current.get,!bt.ui.browser.folders.current.get&&"/"),"mobile"!==s()&&Object(a.d)("div",{className:"toggle-sidebar-btn"},Object(a.d)(nn,{popup:!1,buttons:[{icon:"faThumbtack",title:"Toggle Sidebar",action:function(t){g.set("ui_sidebar",!g.get("ui_sidebar")),C()},active:!0===ft.userSettings.get("ui_sidebar")}],colors:["#d4d1d1","#615f5f"],size:.8}))),Object(a.d)(Fi,{term:ft.ui.search.term.get})),Object(a.d)("div",{className:"files-list-wrapper"},Object(a.d)(rr,{files:gt.get,activeFileIndex:gt.active.getIndex,onSortFiles:function(t){ft.ui.browser.files.set(t)},onFileClicked:function(t){gt.active.set(t);var n=gt.get[t];bt.tabs.active.get()?T.active.setContent(n):bt.tabs.openInNewTab(n)},onFileDragStart:function(t){console.log("[DRAG MOVE] onFileDragStart",t),_.current=[{type:"file",files:t}]},onFileDragEnd:function(){console.log("[DRAG MOVE] onFileDragEnd"),_.current=[]}}))))),Object(a.d)("div",{className:"right-wrapper dual-viewer-view"},Object(a.d)(Pi,{tabs:w,onUpdate:O}),E&&Object(a.d)(qe,{tab:E,onGridUpdate:y}))))),X.length>0&&Object(a.d)(Ri,{images:X,startingIndex:Z,onClose:ft.ui.lightbox.close}),rt&&Object(a.d)(br,{file:st,fileContent:lt,startString:it,onUpdate:function(t){ut(t)},onClose:function(){at(!1)}}))}),null),document.getElementById("root"))}},[[390,11,12]]]);
|