verstak/cmd/verstak-gui/frontend-dist/assets/main-DqItQmr8.js

4 lines
140 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var $o=Object.defineProperty;var es=(l,e,t)=>e in l?$o(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t;var Wt=(l,e,t)=>es(l,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function Z(){}function Jn(l){return l()}function bl(){return Object.create(null)}function de(l){l.forEach(Jn)}function Yn(l){return typeof l=="function"}function at(l,e){return l!=l?e==e:l!==e||l&&typeof l=="object"||typeof l=="function"}let It;function Dt(l,e){return l===e?!0:(It||(It=document.createElement("a")),It.href=e,l===It.href)}function ts(l){return Object.keys(l).length===0}function ls(l){return l??""}function c(l,e){l.appendChild(e)}function w(l,e,t){l.insertBefore(e,t||null)}function g(l){l.parentNode&&l.parentNode.removeChild(l)}function je(l,e){for(let t=0;t<l.length;t+=1)l[t]&&l[t].d(e)}function f(l){return document.createElement(l)}function j(l){return document.createElementNS("http://www.w3.org/2000/svg",l)}function E(l){return document.createTextNode(l)}function y(){return E(" ")}function et(){return E("")}function O(l,e,t,n){return l.addEventListener(e,t,n),()=>l.removeEventListener(e,t,n)}function Mt(l){return function(e){return e.preventDefault(),l.call(this,e)}}function ot(l){return function(e){return e.stopPropagation(),l.call(this,e)}}function dt(l){return function(e){e.target===this&&l.call(this,e)}}function o(l,e,t){t==null?l.removeAttribute(e):l.getAttribute(e)!==t&&l.setAttribute(e,t)}function Et(l){return l===""?null:+l}function ns(l){return Array.from(l.childNodes)}function R(l,e){e=""+e,l.data!==e&&(l.data=e)}function Ce(l,e){l.value=e??""}function Re(l,e,t,n){t==null?l.style.removeProperty(e):l.style.setProperty(e,t,"")}function kl(l,e,t){for(let n=0;n<l.options.length;n+=1){const i=l.options[n];if(i.__value===e){i.selected=!0;return}}(!t||e!==void 0)&&(l.selectedIndex=-1)}function is(l){const e=l.querySelector(":checked");return e&&e.__value}function tt(l,e,t){l.classList.toggle(e,!!t)}function os(l,e,{bubbles:t=!1,cancelable:n=!1}={}){return new CustomEvent(l,{detail:e,bubbles:t,cancelable:n})}let Ft;function Nt(l){Ft=l}function Xt(){if(!Ft)throw new Error("Function called outside component initialization");return Ft}function Zn(l){Xt().$$.on_mount.push(l)}function Qn(l){Xt().$$.on_destroy.push(l)}function jt(){const l=Xt();return(e,t,{cancelable:n=!1}={})=>{const i=l.$$.callbacks[e];if(i){const s=os(e,t,{cancelable:n});return i.slice().forEach(a=>{a.call(l,s)}),!s.defaultPrevented}return!0}}function ss(l,e){const t=l.$$.callbacks[e.type];t&&t.slice().forEach(n=>n.call(this,e))}const ht=[],yl=[];let bt=[];const gl=[],as=Promise.resolve();let qt=!1;function cs(){qt||(qt=!0,as.then($n))}function Lt(l){bt.push(l)}const Kt=new Set;let vt=0;function $n(){if(vt!==0)return;const l=Ft;do{try{for(;vt<ht.length;){const e=ht[vt];vt++,Nt(e),rs(e.$$)}}catch(e){throw ht.length=0,vt=0,e}for(Nt(null),ht.length=0,vt=0;yl.length;)yl.pop()();for(let e=0;e<bt.length;e+=1){const t=bt[e];Kt.has(t)||(Kt.add(t),t())}bt.length=0}while(ht.length);for(;gl.length;)gl.pop()();qt=!1,Kt.clear(),Nt(l)}function rs(l){if(l.fragment!==null){l.update(),de(l.before_update);const e=l.dirty;l.dirty=[-1],l.fragment&&l.fragment.p(l.ctx,e),l.after_update.forEach(Lt)}}function us(l){const e=[],t=[];bt.forEach(n=>l.indexOf(n)===-1?e.push(n):t.push(n)),t.forEach(n=>n()),bt=e}const At=new Set;let ft;function Be(){ft={r:0,c:[],p:ft}}function He(){ft.r||de(ft.c),ft=ft.p}function Q(l,e){l&&l.i&&(At.delete(l),l.i(e))}function le(l,e,t,n){if(l&&l.o){if(At.has(l))return;At.add(l),ft.c.push(()=>{At.delete(l),n&&(t&&l.d(1),n())}),l.o(e)}else n&&n()}function re(l){return(l==null?void 0:l.length)!==void 0?l:Array.from(l)}function fs(l,e){le(l,1,1,()=>{e.delete(l.key)})}function ds(l,e,t,n,i,s,a,r,u,d,b,v){let p=l.length,h=s.length,k=p;const S={};for(;k--;)S[l[k].key]=k;const T=[],C=new Map,F=new Map,M=[];for(k=h;k--;){const N=v(i,s,k),D=t(N);let H=a.get(D);H?M.push(()=>H.p(N,e)):(H=d(D,N),H.c()),C.set(D,T[k]=H),D in S&&F.set(D,Math.abs(k-S[D]))}const I=new Set,L=new Set;function A(N){Q(N,1),N.m(r,b),a.set(N.key,N),b=N.first,h--}for(;p&&h;){const N=T[h-1],D=l[p-1],H=N.key,B=D.key;N===D?(b=N.first,p--,h--):C.has(B)?!a.has(H)||I.has(H)?A(N):L.has(B)?p--:F.get(H)>F.get(B)?(L.add(H),A(N)):(I.add(B),p--):(u(D,a),p--)}for(;p--;){const N=l[p];C.has(N.key)||u(N,a)}for(;h;)A(T[h-1]);return de(M),T}function Je(l){l&&l.c()}function Ge(l,e,t){const{fragment:n,after_update:i}=l.$$;n&&n.m(e,t),Lt(()=>{const s=l.$$.on_mount.map(Jn).filter(Yn);l.$$.on_destroy?l.$$.on_destroy.push(...s):de(s),l.$$.on_mount=[]}),i.forEach(Lt)}function Xe(l,e){const t=l.$$;t.fragment!==null&&(us(t.after_update),de(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function ms(l,e){l.$$.dirty[0]===-1&&(ht.push(l),cs(),l.$$.dirty.fill(0)),l.$$.dirty[e/31|0]|=1<<e%31}function ct(l,e,t,n,i,s,a=null,r=[-1]){const u=Ft;Nt(l);const d=l.$$={fragment:null,ctx:[],props:s,update:Z,not_equal:i,bound:bl(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:bl(),dirty:r,skip_bound:!1,root:e.target||u.$$.root};a&&a(d.root);let b=!1;if(d.ctx=t?t(l,e.props||{},(v,p,...h)=>{const k=h.length?h[0]:p;return d.ctx&&i(d.ctx[v],d.ctx[v]=k)&&(!d.skip_bound&&d.bound[v]&&d.bound[v](k),b&&ms(l,v)),p}):[],d.update(),b=!0,de(d.before_update),d.fragment=n?n(d.ctx):!1,e.target){if(e.hydrate){const v=ns(e.target);d.fragment&&d.fragment.l(v),v.forEach(g)}else d.fragment&&d.fragment.c();e.intro&&Q(l.$$.fragment),Ge(l,e.target,e.anchor),$n()}Nt(u)}class rt{constructor(){Wt(this,"$$");Wt(this,"$$set")}$destroy(){Xe(this,1),this.$destroy=Z}$on(e,t){if(!Yn(t))return Z;const n=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return n.push(t),()=>{const i=n.indexOf(t);i!==-1&&n.splice(i,1)}}$set(e){this.$$set&&!ts(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const ps="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ps);function _s(l){let e,t;return{c(){e=j("path"),t=j("polyline"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8")},m(n,i){w(n,e,i),w(n,t,i)},d(n){n&&(g(e),g(t))}}}function vs(l){let e,t,n,i,s;return{c(){e=j("path"),t=j("polyline"),n=j("line"),i=j("line"),s=j("polyline"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8"),o(n,"x1","16"),o(n,"y1","13"),o(n,"x2","8"),o(n,"y2","13"),o(i,"x1","16"),o(i,"y1","17"),o(i,"x2","8"),o(i,"y2","17"),o(s,"points","10 9 9 9 8 9")},m(a,r){w(a,e,r),w(a,t,r),w(a,n,r),w(a,i,r),w(a,s,r)},d(a){a&&(g(e),g(t),g(n),g(i),g(s))}}}function hs(l){let e,t;return{c(){e=j("polyline"),t=j("polyline"),o(e,"points","16 18 22 12 16 6"),o(t,"points","8 6 2 12 8 18")},m(n,i){w(n,e,i),w(n,t,i)},d(n){n&&(g(e),g(t))}}}function bs(l){let e,t,n,i;return{c(){e=j("path"),t=j("polyline"),n=j("line"),i=j("rect"),o(e,"d","M21 8v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8"),o(t,"points","7 3 12 8 17 3"),o(n,"x1","3"),o(n,"y1","8"),o(n,"x2","21"),o(n,"y2","8"),o(i,"x","10"),o(i,"y","12"),o(i,"width","4"),o(i,"height","4"),o(i,"rx","1")},m(s,a){w(s,e,a),w(s,t,a),w(s,n,a),w(s,i,a)},d(s){s&&(g(e),g(t),g(n),g(i))}}}function ks(l){let e,t,n,i,s;return{c(){e=j("path"),t=j("polyline"),n=j("line"),i=j("line"),s=j("line"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8"),o(n,"x1","9"),o(n,"y1","12"),o(n,"x2","15"),o(n,"y2","12"),o(i,"x1","9"),o(i,"y1","15"),o(i,"x2","13"),o(i,"y2","15"),o(s,"x1","12"),o(s,"y1","15"),o(s,"x2","12"),o(s,"y2","18")},m(a,r){w(a,e,r),w(a,t,r),w(a,n,r),w(a,i,r),w(a,s,r)},d(a){a&&(g(e),g(t),g(n),g(i),g(s))}}}function ys(l){let e,t,n,i,s,a;return{c(){e=j("path"),t=j("polyline"),n=j("line"),i=j("line"),s=j("line"),a=j("line"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8"),o(n,"x1","8"),o(n,"y1","12"),o(n,"x2","16"),o(n,"y2","12"),o(i,"x1","8"),o(i,"y1","16"),o(i,"x2","16"),o(i,"y2","16"),o(s,"x1","8"),o(s,"y1","14"),o(s,"x2","12"),o(s,"y2","14"),o(a,"x1","12"),o(a,"y1","12"),o(a,"x2","12"),o(a,"y2","18")},m(r,u){w(r,e,u),w(r,t,u),w(r,n,u),w(r,i,u),w(r,s,u),w(r,a,u)},d(r){r&&(g(e),g(t),g(n),g(i),g(s),g(a))}}}function gs(l){let e,t,n,i;return{c(){e=j("path"),t=j("polyline"),n=j("line"),i=j("line"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8"),o(n,"x1","16"),o(n,"y1","13"),o(n,"x2","8"),o(n,"y2","13"),o(i,"x1","16"),o(i,"y1","17"),o(i,"x2","8"),o(i,"y2","17")},m(s,a){w(s,e,a),w(s,t,a),w(s,n,a),w(s,i,a)},d(s){s&&(g(e),g(t),g(n),g(i))}}}function ws(l){let e,t,n,i,s;return{c(){e=j("path"),t=j("polyline"),n=j("line"),i=j("line"),s=j("line"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8"),o(n,"x1","8"),o(n,"y1","12"),o(n,"x2","16"),o(n,"y2","12"),o(i,"x1","8"),o(i,"y1","16"),o(i,"x2","16"),o(i,"y2","16"),o(s,"x1","8"),o(s,"y1","14"),o(s,"x2","12"),o(s,"y2","14")},m(a,r){w(a,e,r),w(a,t,r),w(a,n,r),w(a,i,r),w(a,s,r)},d(a){a&&(g(e),g(t),g(n),g(i),g(s))}}}function Cs(l){let e,t,n;return{c(){e=j("path"),t=j("circle"),n=j("circle"),o(e,"d","M9 18V5l12-2v13"),o(t,"cx","6"),o(t,"cy","18"),o(t,"r","3"),o(n,"cx","18"),o(n,"cy","16"),o(n,"r","3")},m(i,s){w(i,e,s),w(i,t,s),w(i,n,s)},d(i){i&&(g(e),g(t),g(n))}}}function Ss(l){let e,t;return{c(){e=j("rect"),t=j("polyline"),o(e,"x","2"),o(e,"y","4"),o(e,"width","20"),o(e,"height","16"),o(e,"rx","2"),o(t,"points","10 9 16 12 10 15 10 9")},m(n,i){w(n,e,i),w(n,t,i)},d(n){n&&(g(e),g(t))}}}function Ts(l){let e,t,n;return{c(){e=j("rect"),t=j("circle"),n=j("polyline"),o(e,"x","3"),o(e,"y","3"),o(e,"width","18"),o(e,"height","18"),o(e,"rx","2"),o(e,"ry","2"),o(t,"cx","8.5"),o(t,"cy","8.5"),o(t,"r","1.5"),o(n,"points","21 15 16 10 5 21")},m(i,s){w(i,e,s),w(i,t,s),w(i,n,s)},d(i){i&&(g(e),g(t),g(n))}}}function Ns(l){let e;return{c(){e=j("path"),o(e,"d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z")},m(t,n){w(t,e,n)},d(t){t&&g(e)}}}function Fs(l){let e;function t(s,a){return s[0]==="folder"?Ns:s[0]==="image"?Ts:s[0]==="video"?Ss:s[0]==="audio"?Cs:s[0]==="pdf"?ws:s[0]==="document"?gs:s[0]==="spreadsheet"?ys:s[0]==="presentation"?ks:s[0]==="archive"?bs:s[0]==="code"?hs:s[0]==="text"?vs:_s}let n=t(l),i=n(l);return{c(){e=j("svg"),i.c(),o(e,"width",l[1]),o(e,"height",l[1]),o(e,"viewBox","0 0 24 24"),o(e,"fill","none"),o(e,"stroke","currentColor"),o(e,"stroke-width","1.5"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"xmlns","http://www.w3.org/2000/svg")},m(s,a){w(s,e,a),i.m(e,null)},p(s,[a]){n!==(n=t(s))&&(i.d(1),i=n(s),i&&(i.c(),i.m(e,null))),a&2&&o(e,"width",s[1]),a&2&&o(e,"height",s[1])},i:Z,o:Z,d(s){s&&g(e),i.d()}}}function Is(l,e,t){let{kind:n="generic"}=e,{size:i=20}=e;return l.$$set=s=>{"kind"in s&&t(0,n=s.kind),"size"in s&&t(1,i=s.size)},[n,i]}class ei extends rt{constructor(e){super(),ct(this,e,Is,Fs,at,{kind:0,size:1})}}const Ms={"nav.today":"Сегодня","nav.inbox":"Неразобранное","nav.activity":"Активность","nav.clients":"Клиенты","nav.projects":"Проекты","nav.recipes":"Рецепты","nav.documents":"Документы","nav.archive":"Архив","nav.sections":"Разделы","nav.cases":"Дела","nav.noCases":"Нет дел","nav.sync":"Синхронизация","nav.syncSettings":"Настройки синхронизации","nav.syncNow":"Синхронизировать","nav.selectPrompt":"Выберите раздел или дело","nav.brand":"Верстак","nav.system":"Системное","nav.workspace":"Рабочее пространство","nav.noNodes":"Нет узлов","nav.openFolder":"Открыть папку","nav.createInside":"Создать внутри","tab.overview":"Обзор","tab.notes":"Заметки","tab.files":"Файлы","tab.actions":"Действия","tab.worklog":"Журнал","tab.activity":"Активность","common.save":"Сохранить","common.cancel":"Отмена","common.delete":"Удалить","common.rename":"Переименовать","common.close":"Закрыть","common.create":"Создать","common.confirm":"Подтверждение","common.back":"← Назад","common.loading":"Загрузка...","common.error":"Ошибка:","common.yes":"Да","common.ok":"OK","common.copy":"Копировать","common.cut":"Вырезать","common.paste":"Вставить","common.duplicate":"Дублировать","common.run":"Запустить","common.test":"Test","common.testAgain":"Проверить","common.connect":"Подключиться","common.disconnect":"Отключиться","common.settings":"Настройки","common.name":"Название","common.type":"Тип","common.section":"Раздел","common.created":"Создано","common.empty":"Нет","common.newName":"Новое имя","welcome.title":"Верстак","welcome.selectSection":"Выберите раздел в боковой панели.","welcome.createCase":"Или создайте новое дело кнопкой «+».","welcome.addCase":"Добавить дело","event.noteCreated":"Заметка создана","event.noteUpdated":"Заметка изменена","event.fileAdded":"Файл добавлен","event.fileDeleted":"Файл удалён","event.fileRenamed":"Файл переименован","event.fileCopied":"Файл скопирован","event.fileMoved":"Файл перемещён","event.folderAdded":"Папка добавлена","event.folderDeleted":"Папка удалена","event.folderRenamed":"Папка переименована","event.caseCreated":"Дело создано","event.caseUpdated":"Дело изменено","kind.project":"Проект","kind.client":"Клиент","kind.document":"Документ","kind.recipe":"Рецепт","kind.archive":"Архив","kind.case":"Дело","action.openUrl":"Открыть URL","action.openFile":"Открыть файл","action.openFolder":"Открыть папку","action.runCommand":"Запустить команду","action.runScript":"Запустить скрипт","action.openTerminal":"Открыть терминал","action.launchApp":"Запустить приложение","action.addAction":"+ Добавить действие","action.newAction":"Новое действие","action.noActions":"Действий пока нет","action.run":"Запустить","action.dataUrl":"URL","action.dataPath":"Путь","action.dataCommand":"Команда","action.urlPlaceholder":"https://example.com","action.pathPlaceholder":"/path/to/file","action.commandPlaceholder":"команда","action.namePlaceholder":"Например: Открыть сайт","note.add":"+ Добавить заметку","note.new":"Новая заметка","note.title":"Название заметки","note.noNotes":"Нет заметок","note.createFirst":"Создайте первую заметку для этого дела.","note.placeholder":"Начните писать...","note.unsavedTitle":"Несохранённые изменения","note.unsavedMessage":"Закрыть редактор? Все несохранённые изменения будут потеряны.","note.unsavedClose":"Закрыть","file.addFile":"+ Добавить файл","file.addFolder":"+ Добавить папку","file.newFile":"+ Новый файл","file.addFileSimple":"Добавить файл","file.addFolderSimple":"Добавить папку","file.noFiles":"В этой папке пока нет файлов","file.noFilesCase":"В этом проекте пока нет файлов","file.hint":"Добавьте файл или папку, чтобы сохранить материалы проекта.","file.root":"Файлы","file.preview":"Предпросмотр","file.openExternal":"Открыть во внешней программе","file.openFolder":"Открыть папку","file.showInExplorer":"Показать в проводнике","file.more":"Ещё","file.delete":"Удалить","file.ariaFolder":"Папка","file.ariaFile":"Файл","file.scanning":"Сканирование...","file.pickSingle":"Выберите файл","file.pickMultiple":"Выберите файлы","file.pickDirectory":"Выберите папку","file.importTitle":"Добавить в","file.importFiles":"Файлов:","file.importFolders":"Папок:","file.importSize":"Размер:","file.importCopy":"Скопировать","file.importLink":"Привязать","file.selectCaseFirst":"Сначала выберите дело для добавления файлов","worklog.title":"Журнал","worklog.whatDone":"Что сделано","worklog.minutes":"Мин","worklog.min":"мин","worklog.log":"Записать","worklog.empty":"Записей работы пока нет","sync.title":"Синхронизация","sync.settings":"Настройки синхронизации","sync.status":"Статус","sync.server":"Сервер","sync.device":"Устройство","sync.deviceId":"ID устройства","sync.unpushed":"Неотправлено","sync.lastSync":"Последняя синх.","sync.revoked":"Отозвано","sync.connected":"Подключено","sync.notConnected":"Не подключено","sync.disabled":"Отключена","sync.serverUrl":"URL сервера","sync.serverUrlPlaceholder":"https://example.com:47732","sync.username":"Логин","sync.usernamePlaceholder":"username","sync.password":"Пароль","sync.passwordPlaceholder":"password","sync.autoSync":"Автосинхронизация (мин, 0 = отключено)","sync.saveInterval":"Сохранить интервал","sync.syncNow":"Синхронизировать","sync.disconnect":"Отключиться","sync.connect":"Подключиться","sync.test":"Проверить","sync.settingsSaved":"интервал сохранён","today.title":"Сегодня","today.changedCases":"Изменён сегодня","today.timeline":"Лента за сегодня","today.empty":"Сегодня пока тихо","today.emptyHint":"Здесь появятся дела, заметки, файлы и действия, с которыми вы работали сегодня.","today.plural.case_one":"дело","today.plural.case_few":"дела","today.plural.case_many":"дел","today.plural.note_one":"заметка","today.plural.note_few":"заметки","today.plural.note_many":"заметок","today.plural.file_one":"файл","today.plural.file_few":"файла","today.plural.file_many":"файлов","today.plural.event_one":"событие","today.plural.event_few":"события","today.plural.event_many":"событий","activity.title":"Активность","activity.empty":"Активность пока не зафиксирована","activity.perCaseEmpty":"Активность пока не зафиксирована","overview.type":"Тип","overview.section":"Раздел","overview.created":"Создано","overview.newNote":"Новая заметка","overview.addFile":"Добавить файл","overview.addAction":"Добавить действие","overview.logTime":"Записать время","overview.recentNotes":"Последние заметки","overview.recentEntries":"Последние записи","rename.title":"Переименовать","rename.emptyError":"Имя не может быть пустым","rename.invalidError":"Недопустимое имя","delete.confirmTitle":"Удаление","delete.confirmMessage":"Удалить","delete.folder":"папку","delete.file":"файл","template.optionNone":"Без шаблона","template.optional":"Шаблон (опционально)","template.folder":"Папка","template.project":"Проект","template.client":"Клиент","template.document":"Документ","template.recipe":"Рецепт","template.select":"Выберите шаблон","mime.jpeg":"Изображение JPEG","mime.png":"Изображение PNG","mime.gif":"Изображение GIF","mime.webp":"Изображение WebP","mime.svg":"Изображение SVG","mime.bmp":"Изображение BMP","mime.tiff":"Изображение TIFF","mime.avif":"Изображение AVIF","mime.pdf":"PDF документ","mime.word":"Документ Word","mime.excel":"Таблица Excel","mime.ppt":"Презентация PowerPoint","mime.zip":"ZIP архив","mime.gzip":"GZIP архив","mime.tar":"TAR архив","mime.sevenz":"7z архив","mime.rar":"RAR архив","mime.text":"Текстовый файл","mime.html":"HTML файл","mime.css":"CSS файл","mime.js":"JavaScript файл","mime.json":"JSON файл","mime.xml":"XML файл","mime.yaml":"YAML файл","mime.binary":"Бинарный файл","mime.executable":"Исполняемый файл","mime.folder":"Папка","mime.unknown":"Неизвестно","mime.file":"Файл","error.nameEmpty":"Имя не может быть пустым","error.nameInvalid":"Недопустимое имя","error.selectCaseFirst":"Сначала выберите дело","common.open":"Открыть","delete.files":"файлов ({count})","file.namePrompt":"Введите имя файла:","file.pdfUnavailable":"Предпросмотр PDF недоступен.","file.previewUnavailable":"Предпросмотр недоступен для этого типа файлов.","case.new":"Новое дело","case.namePlaceholder":"Название дела","error.generic":"Произошла ошибка","error.invalidCredentials":"Неверный логин или пароль","error.accountBlocked":"Аккаунт заблокирован","error.emailNotConfirmed":"Email не подтверждён","error.tokenInvalid":"Неверный или просроченный токен","error.tokenExpired":"Срок действия токена истёк"},As={"nav.today":"Today","nav.inbox":"Inbox","nav.activity":"Activity","nav.clients":"Clients","nav.projects":"Projects","nav.recipes":"Recipes","nav.documents":"Documents","nav.archive":"Archive","nav.system":"System","nav.workspace":"Workspace","nav.noNodes":"No nodes","nav.openFolder":"Open folder","nav.createInside":"Create inside","tab.overview":"Overview","tab.notes":"Notes","tab.files":"Files","tab.actions":"Actions","tab.worklog":"Work Log","tab.activity":"Activity","common.save":"Save","common.cancel":"Cancel","common.delete":"Delete","common.rename":"Rename","common.close":"Close","common.create":"Create","common.confirm":"Confirm","common.back":"← Back","common.loading":"Loading...","common.error":"Error:","common.yes":"Yes","common.ok":"OK","common.run":"Run","common.name":"Name","common.settings":"Settings","welcome.title":"Verstak","welcome.selectSection":"Select a section in the sidebar.","welcome.addCase":"Add case","event.noteCreated":"Note created","event.noteUpdated":"Note updated","event.fileAdded":"File added","event.fileDeleted":"File deleted","event.fileRenamed":"File renamed","event.fileCopied":"File copied","event.fileMoved":"File moved","event.caseCreated":"Case created","action.openUrl":"Open URL","action.openFile":"Open file","action.openFolder":"Open folder","action.runCommand":"Run command","action.runScript":"Run script","action.openTerminal":"Open terminal","action.launchApp":"Launch app","note.add":"+ Add note","note.noNotes":"No notes","note.title":"Note title","note.placeholder":"Start writing...","file.addFile":"+ Add file","file.addFolder":"+ Add folder","file.preview":"Preview","file.openExternal":"Open in external program","file.openFolder":"Open folder","file.delete":"Delete","file.pickSingle":"Select file","file.pickDirectory":"Select folder","sync.title":"Sync","sync.settings":"Sync settings","sync.status":"Status","sync.server":"Server","sync.device":"Device","sync.connected":"Connected","sync.notConnected":"Not connected","sync.disabled":"Disabled","template.optionNone":"No template","template.optional":"Template (optional)","template.folder":"Folder","template.project":"Project","template.client":"Client","template.document":"Document","template.recipe":"Recipe","template.select":"Select template","error.generic":"An error occurred","error.invalidCredentials":"Invalid username or password"},wl={ru:Ms,en:As};let Cl="ru";function _(l,e){var i;const t=wl[Cl];let n=t==null?void 0:t[l];if(n==null&&Cl!=="ru"&&(n=(i=wl.ru)==null?void 0:i[l]),n==null&&(n=l),e!=null)for(const[s,a]of Object.entries(e))n=n.replace(`{${s}}`,String(a));return n}function xt(l){if(l==null||l<0)return"—";if(l===0)return"0 B";const e=["B","KB","MB","GB"],t=Math.min(Math.floor(Math.log(l)/Math.log(1024)),e.length-1),n=l/Math.pow(1024,t);return(t===0?n.toFixed(0):n.toFixed(1))+" "+e[t]}const Gt={"image/jpeg":_("mime.jpeg"),"image/png":_("mime.png"),"image/gif":_("mime.gif"),"image/webp":_("mime.webp"),"image/svg+xml":_("mime.svg"),"image/bmp":_("mime.bmp"),"image/tiff":_("mime.tiff"),"image/avif":_("mime.avif"),"application/pdf":_("mime.pdf"),"application/msword":_("mime.word"),"application/vnd.openxmlformats-officedocument.wordprocessingml.document":_("mime.word"),"application/vnd.ms-excel":_("mime.excel"),"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":_("mime.excel"),"application/vnd.ms-powerpoint":_("mime.ppt"),"application/vnd.openxmlformats-officedocument.presentationml.presentation":_("mime.ppt"),"application/zip":_("mime.zip"),"application/gzip":_("mime.gzip"),"application/x-tar":_("mime.tar"),"application/x-7z-compressed":_("mime.sevenz"),"application/x-rar-compressed":_("mime.rar"),"text/plain":_("mime.text"),"text/html":_("mime.html"),"text/css":_("mime.css"),"text/javascript":_("mime.js"),"application/json":_("mime.json"),"application/xml":_("mime.xml"),"application/x-yaml":_("mime.yaml"),"application/octet-stream":_("mime.binary"),"application/x-msdos-program":_("mime.executable"),"inode/directory":_("mime.folder")};function Sl(l){return l?Gt[l]||l:_("mime.unknown")}function Ds(l){if(l.type==="folder")return _("mime.folder");const e=(l.mime||"").toLowerCase();if(Gt[e])return Gt[e];const n=(l.name||"").toLowerCase().split(".").pop();return n?n.toUpperCase():_("mime.file")}function ti(l){if(l.type==="folder")return"folder";const e=(l.mime||"").toLowerCase();if(e.startsWith("image/"))return"image";if(e.startsWith("video/"))return"video";if(e.startsWith("audio/"))return"audio";if(e.startsWith("text/"))return"text";if(e.includes("pdf"))return"pdf";if(e.includes("word")||e.includes("document"))return"document";if(e.includes("spreadsheet")||e.includes("excel"))return"spreadsheet";if(e.includes("presentation")||e.includes("powerpoint"))return"presentation";if(e.includes("zip")||e.includes("tar")||e.includes("gzip")||e.includes("rar")||e.includes("7z")||e.includes("compress"))return"archive";if(e.includes("json")||e.includes("xml")||e.includes("yaml")||e.includes("javascript")||e.includes("css")||e.includes("html"))return"code";const n=(l.name||"").toLowerCase().split(".").pop();return["js","ts","jsx","tsx","vue","svelte","py","rs","go","c","cpp","h","hpp","java","kt","swift","rb","php","pl","sh","bash","zsh","fish","yml","yaml","json","xml","toml","ini","cfg","conf","md","markdown","css","scss","less","sass","sql","graphql","proto","gradle","cmake","makefile","dockerfile","env","gitignore"].includes(n)?"code":"generic"}const Es=["image/jpeg","image/png","image/gif","image/webp","image/bmp","image/tiff","image/avif","image/svg+xml"],Ls=["text/plain","text/html","text/css","text/javascript","application/json","application/xml","application/x-yaml","text/x-shellscript"],xs=["txt","log","conf","ini","yaml","yml","json","xml","csv","sh","py","js","ts","css","html","md","markdown","cfg"],js=["jpg","jpeg","png","gif","webp","bmp","tiff","tif","avif","svg"];function li(l){const e=(l.mime||"").toLowerCase(),n=(l.name||"").toLowerCase().split(".").pop();return Es.includes(e)||js.includes(n)}function ni(l){const e=(l.mime||"").toLowerCase(),n=(l.name||"").toLowerCase().split(".").pop();return Ls.includes(e)||xs.includes(n)&&n!=="md"&&n!=="markdown"}function ii(l){return(l.mime||"").toLowerCase().includes("pdf")}function oi(l){const e=(l.name||"").toLowerCase();return e.endsWith(".md")||e.endsWith(".markdown")}function Ps(l){return li(l)||ii(l)}function Os(l){return ni(l)||oi(l)}function zs(l){let e,t,n,i=xt(l[0].size)+"",s;return{c(){e=f("span"),e.textContent="·",t=y(),n=f("span"),s=E(i),o(e,"class","meta-sep svelte-1u905d2")},m(a,r){w(a,e,r),w(a,t,r),w(a,n,r),c(n,s)},p(a,r){r&1&&i!==(i=xt(a[0].size)+"")&&R(s,i)},d(a){a&&(g(e),g(t),g(n))}}}function Bs(l){let e,t,n;return{c(){e=f("button"),e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path><line x1="9" y1="14" x2="15" y2="14"></line></svg>',o(e,"class","action-btn svelte-1u905d2"),o(e,"title",_("file.openFolder")),o(e,"aria-label",_("file.openFolder"))},m(i,s){w(i,e,s),t||(n=O(e,"click",ot(l[27])),t=!0)},p:Z,d(i){i&&g(e),t=!1,n()}}}function Hs(l){let e,t,n,i,s;return{c(){e=f("button"),e.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path><circle cx="12" cy="12" r="3"></circle></svg>',t=y(),n=f("button"),n.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',o(e,"class","action-btn svelte-1u905d2"),o(e,"title",_("file.preview")),o(e,"aria-label",_("file.preview")),o(n,"class","action-btn svelte-1u905d2"),o(n,"title",_("file.openExternal")),o(n,"aria-label",_("file.openExternal"))},m(a,r){w(a,e,r),w(a,t,r),w(a,n,r),i||(s=[O(e,"click",ot(l[26])),O(n,"click",ot(l[8]))],i=!0)},p:Z,d(a){a&&(g(e),g(t),g(n)),i=!1,de(s)}}}function Tl(l){let e,t,n,i,s,a,r,u,d=_("common.open")+"",b,v,p,h,k,S,T,C,F=_("file.openExternal")+"",M,I,L,A,N,D,H,B,x,V,J=_("common.rename")+"",q,X,z,Y,K,G,W,ye=_("common.duplicate")+"",Me,Ve,ce,ne,te,ie,se,Ae,Oe,Ye=_("common.cut")+"",De,pe,ee,be,Te,Ze,Qe,Ue=_("common.copy")+"",ge,We,Ie,we,_e,ae,ve,Se,ke,ze=_("common.delete")+"",Ee,Ke,he,fe=l[5]&&Rs(l);return{c(){e=f("div"),t=y(),n=f("div"),i=f("button"),s=j("svg"),a=j("path"),r=j("circle"),u=y(),b=E(d),v=y(),p=f("button"),h=j("svg"),k=j("path"),S=j("polyline"),T=j("line"),C=y(),M=E(F),I=y(),fe&&fe.c(),L=y(),A=f("div"),N=y(),D=f("button"),H=j("svg"),B=j("path"),x=j("path"),V=y(),q=E(J),X=y(),z=f("button"),Y=j("svg"),K=j("rect"),G=j("path"),W=y(),Me=E(ye),Ve=y(),ce=f("button"),ne=j("svg"),te=j("circle"),ie=j("circle"),se=j("line"),Ae=j("line"),Oe=y(),De=E(Ye),pe=y(),ee=f("button"),be=j("svg"),Te=j("rect"),Ze=j("path"),Qe=y(),ge=E(Ue),We=y(),Ie=f("div"),we=y(),_e=f("button"),ae=j("svg"),ve=j("polyline"),Se=j("path"),ke=y(),Ee=E(ze),o(e,"class","menu-backdrop svelte-1u905d2"),o(e,"role","presentation"),o(a,"d","M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"),o(r,"cx","12"),o(r,"cy","12"),o(r,"r","3"),o(s,"width","14"),o(s,"height","14"),o(s,"viewBox","0 0 24 24"),o(s,"fill","none"),o(s,"stroke","currentColor"),o(s,"stroke-width","2"),o(s,"stroke-linecap","round"),o(s,"stroke-linejoin","round"),o(i,"class","menu-item svelte-1u905d2"),o(i,"role","menuitem"),o(k,"d","M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"),o(S,"points","15 3 21 3 21 9"),o(T,"x1","10"),o(T,"y1","14"),o(T,"x2","21"),o(T,"y2","3"),o(h,"width","14"),o(h,"height","14"),o(h,"viewBox","0 0 24 24"),o(h,"fill","none"),o(h,"stroke","currentColor"),o(h,"stroke-width","2"),o(h,"stroke-linecap","round"),o(h,"stroke-linejoin","round"),o(p,"class","menu-item svelte-1u905d2"),o(p,"role","menuitem"),o(A,"class","menu-sep svelte-1u905d2"),o(B,"d","M12 20h9"),o(x,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"),o(H,"width","14"),o(H,"height","14"),o(H,"viewBox","0 0 24 24"),o(H,"fill","none"),o(H,"stroke","currentColor"),o(H,"stroke-width","2"),o(H,"stroke-linecap","round"),o(H,"stroke-linejoin","round"),o(D,"class","menu-item svelte-1u905d2"),o(D,"role","menuitem"),o(K,"x","9"),o(K,"y","9"),o(K,"width","13"),o(K,"height","13"),o(K,"rx","2"),o(K,"ry","2"),o(G,"d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"),o(Y,"width","14"),o(Y,"height","14"),o(Y,"viewBox","0 0 24 24"),o(Y,"fill","none"),o(Y,"stroke","currentColor"),o(Y,"stroke-width","2"),o(Y,"stroke-linecap","round"),o(Y,"stroke-linejoin","round"),o(z,"class","menu-item svelte-1u905d2"),o(z,"role","menuitem"),o(te,"cx","6"),o(te,"cy","6"),o(te,"r","3"),o(ie,"cx","6"),o(ie,"cy","18"),o(ie,"r","3"),o(se,"x1","20"),o(se,"y1","4"),o(se,"x2","8.12"),o(se,"y2","15.88"),o(Ae,"x1","8.12"),o(Ae,"y1","8.12"),o(Ae,"x2","20"),o(Ae,"y2","20"),o(ne,"width","14"),o(ne,"height","14"),o(ne,"viewBox","0 0 24 24"),o(ne,"fill","none"),o(ne,"stroke","currentColor"),o(ne,"stroke-width","2"),o(ne,"stroke-linecap","round"),o(ne,"stroke-linejoin","round"),o(ce,"class","menu-item svelte-1u905d2"),o(ce,"role","menuitem"),o(Te,"x","9"),o(Te,"y","9"),o(Te,"width","13"),o(Te,"height","13"),o(Te,"rx","2"),o(Te,"ry","2"),o(Ze,"d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"),o(be,"width","14"),o(be,"height","14"),o(be,"viewBox","0 0 24 24"),o(be,"fill","none"),o(be,"stroke","currentColor"),o(be,"stroke-width","2"),o(be,"stroke-linecap","round"),o(be,"stroke-linejoin","round"),o(ee,"class","menu-item svelte-1u905d2"),o(ee,"role","menuitem"),o(Ie,"class","menu-sep svelte-1u905d2"),o(ve,"points","3 6 5 6 21 6"),o(Se,"d","M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"),o(ae,"width","14"),o(ae,"height","14"),o(ae,"viewBox","0 0 24 24"),o(ae,"fill","none"),o(ae,"stroke","currentColor"),o(ae,"stroke-width","2"),o(ae,"stroke-linecap","round"),o(ae,"stroke-linejoin","round"),o(_e,"class","menu-item menu-item-danger svelte-1u905d2"),o(_e,"role","menuitem"),o(n,"class","menu svelte-1u905d2"),o(n,"role","menu")},m(oe,Ne){w(oe,e,Ne),w(oe,t,Ne),w(oe,n,Ne),c(n,i),c(i,s),c(s,a),c(s,r),c(i,u),c(i,b),c(n,v),c(n,p),c(p,h),c(h,k),c(h,S),c(h,T),c(p,C),c(p,M),c(n,I),fe&&fe.m(n,null),c(n,L),c(n,A),c(n,N),c(n,D),c(D,H),c(H,B),c(H,x),c(D,V),c(D,q),c(n,X),c(n,z),c(z,Y),c(Y,K),c(Y,G),c(z,W),c(z,Me),c(n,Ve),c(n,ce),c(ce,ne),c(ne,te),c(ne,ie),c(ne,se),c(ne,Ae),c(ce,Oe),c(ce,De),c(n,pe),c(n,ee),c(ee,be),c(be,Te),c(be,Ze),c(ee,Qe),c(ee,ge),c(n,We),c(n,Ie),c(n,we),c(n,_e),c(_e,ae),c(ae,ve),c(ae,Se),c(_e,ke),c(_e,Ee),Ke||(he=[O(e,"click",ot(l[17])),O(i,"click",l[15]),O(p,"click",l[8]),O(D,"click",l[11]),O(z,"click",l[12]),O(ce,"click",l[13]),O(ee,"click",l[14]),O(_e,"click",l[10]),O(n,"click",ot(l[25]))],Ke=!0)},p(oe,Ne){oe[5]&&fe.p(oe,Ne)},d(oe){oe&&(g(e),g(t),g(n)),fe&&fe.d(),Ke=!1,de(he)}}}function Rs(l){let e,t,n,i,s=_("file.showInExplorer")+"",a,r,u;return{c(){e=f("button"),t=j("svg"),n=j("path"),i=y(),a=E(s),o(n,"d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"),o(t,"width","14"),o(t,"height","14"),o(t,"viewBox","0 0 24 24"),o(t,"fill","none"),o(t,"stroke","currentColor"),o(t,"stroke-width","2"),o(t,"stroke-linecap","round"),o(t,"stroke-linejoin","round"),o(e,"class","menu-item svelte-1u905d2"),o(e,"role","menuitem")},m(d,b){w(d,e,b),c(e,t),c(t,n),c(e,i),c(e,a),r||(u=O(e,"click",l[9]),r=!0)},p:Z,d(d){d&&g(e),r=!1,u()}}}function Vs(l){let e,t,n,i,s,a,r=l[0].name+"",u,d,b,v,p,h,k,S,T,C,F,M,I,L,A,N,D,H,B,x,V,J;n=new ei({props:{kind:l[4],size:22}});let q=!l[5]&&zs(l);function X(G,W){return G[5]?Bs:Hs}let Y=X(l)(l),K=l[2]&&Tl(l);return{c(){e=f("div"),t=f("div"),Je(n.$$.fragment),i=y(),s=f("div"),a=f("div"),u=E(r),b=y(),v=f("div"),p=f("span"),p.textContent=`${l[6]}`,h=y(),q&&q.c(),k=y(),S=f("div"),Y.c(),T=y(),C=f("button"),F=j("svg"),M=j("circle"),I=j("circle"),L=j("circle"),A=y(),N=f("button"),N.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path></svg>',H=y(),K&&K.c(),B=et(),o(t,"class","file-row-icon svelte-1u905d2"),o(a,"class","file-row-name svelte-1u905d2"),o(a,"title",d=l[0].name),o(v,"class","file-row-meta svelte-1u905d2"),o(s,"class","file-row-body svelte-1u905d2"),o(M,"cx","12"),o(M,"cy","5"),o(M,"r","2"),o(I,"cx","12"),o(I,"cy","12"),o(I,"r","2"),o(L,"cx","12"),o(L,"cy","19"),o(L,"r","2"),o(F,"width","16"),o(F,"height","16"),o(F,"viewBox","0 0 24 24"),o(F,"fill","currentColor"),o(C,"class","action-btn svelte-1u905d2"),o(C,"title",_("file.more")),o(C,"aria-label",_("file.more")),o(C,"aria-expanded",l[2]),o(N,"class","action-btn action-btn-danger svelte-1u905d2"),o(N,"title",_("common.delete")),o(N,"aria-label",_("common.delete")),o(S,"class","file-row-actions svelte-1u905d2"),o(e,"class","file-row svelte-1u905d2"),o(e,"role","button"),o(e,"tabindex","0"),o(e,"draggable","true"),o(e,"aria-label",D=l[5]?_("file.ariaFolder")+" "+l[0].name:_("file.ariaFile")+" "+l[0].name),tt(e,"file-row--selected",l[1])},m(G,W){w(G,e,W),c(e,t),Ge(n,t,null),c(e,i),c(e,s),c(s,a),c(a,u),c(s,b),c(s,v),c(v,p),c(v,h),q&&q.m(v,null),c(e,k),c(e,S),Y.m(S,null),c(S,T),c(S,C),c(C,F),c(F,M),c(F,I),c(F,L),c(S,A),c(S,N),w(G,H,W),K&&K.m(G,W),w(G,B,W),x=!0,V||(J=[O(window,"click",l[17]),O(C,"click",ot(l[16])),O(N,"click",ot(l[10])),O(e,"click",l[7]),O(e,"contextmenu",l[21]),O(e,"dragstart",l[18]),O(e,"dragover",l[19]),O(e,"drop",l[20])],V=!0)},p(G,[W]){(!x||W&1)&&r!==(r=G[0].name+"")&&R(u,r),(!x||W&1&&d!==(d=G[0].name))&&o(a,"title",d),G[5]||q.p(G,W),Y.p(G,W),(!x||W&4)&&o(C,"aria-expanded",G[2]),(!x||W&1&&D!==(D=G[5]?_("file.ariaFolder")+" "+G[0].name:_("file.ariaFile")+" "+G[0].name))&&o(e,"aria-label",D),(!x||W&2)&&tt(e,"file-row--selected",G[1]),G[2]?K?K.p(G,W):(K=Tl(G),K.c(),K.m(B.parentNode,B)):K&&(K.d(1),K=null)},i(G){x||(Q(n.$$.fragment,G),x=!0)},o(G){le(n.$$.fragment,G),x=!1},d(G){G&&(g(e),g(H),g(B)),Xe(n),q&&q.d(),Y.d(),K&&K.d(G),V=!1,de(J)}}}function Us(l,e,t){let{item:n}=e,{selected:i=!1}=e,{onDragStart:s}=e,{onDragOver:a}=e,{onDrop:r}=e;const u=jt(),d=ti(n),b=n.type==="folder",v=Ds(n);let p=!1,h=null;function k(z){z.ctrlKey||z.metaKey?u("toggleSelect",n.id):z.shiftKey?u("rangeSelect",n.id):h?(clearTimeout(h),h=null,b?u("navigate",n.id):u("preview",n)):h=setTimeout(()=>{h=null,u("selectOne",n.id)},250)}function S(){u("openExternal",n.fileId)}function T(){u("showInFolder",n.id)}function C(){t(2,p=!1),u("delete",{id:n.id,type:n.type})}function F(){t(2,p=!1),u("rename",{id:n.id,name:n.name})}function M(){t(2,p=!1),u("duplicate",n.id)}function I(){t(2,p=!1),u("cut",n.id)}function L(){t(2,p=!1),u("copy",n.id)}function A(){t(2,p=!1),b?u("navigate",n.id):u("preview",n)}function N(){t(2,p=!p)}function D(){t(2,p=!1)}function H(z){s&&s(z,n.id)}function B(z){a&&b&&a(z,n.id)}function x(z){r&&b&&r(z,n.id)}function V(z){z.preventDefault(),t(2,p=!0)}function J(z){ss.call(this,l,z)}const q=()=>u("preview",n),X=()=>u("navigate",n.id);return l.$$set=z=>{"item"in z&&t(0,n=z.item),"selected"in z&&t(1,i=z.selected),"onDragStart"in z&&t(22,s=z.onDragStart),"onDragOver"in z&&t(23,a=z.onDragOver),"onDrop"in z&&t(24,r=z.onDrop)},[n,i,p,u,d,b,v,k,S,T,C,F,M,I,L,A,N,D,H,B,x,V,s,a,r,J,q,X]}class Ws extends rt{constructor(e){super(),ct(this,e,Us,Vs,at,{item:0,selected:1,onDragStart:22,onDragOver:23,onDrop:24})}}function Nl(l,e,t){const n=l.slice();return n[4]=e[t],n[6]=t,n}function Ks(l){let e;return{c(){e=f("span"),e.textContent="/",o(e,"class","sep svelte-csi2lb")},m(t,n){w(t,e,n)},d(t){t&&g(e)}}}function qs(l){let e,t=l[4].name+"",n,i,s;function a(){return l[2](l[6])}return{c(){e=f("button"),n=E(t),o(e,"class","crumb crumb--link svelte-csi2lb")},m(r,u){w(r,e,u),c(e,n),i||(s=O(e,"click",a),i=!0)},p(r,u){l=r,u&1&&t!==(t=l[4].name+"")&&R(n,t)},d(r){r&&g(e),i=!1,s()}}}function Gs(l){let e,t=l[4].name+"",n;return{c(){e=f("span"),n=E(t),o(e,"class","crumb crumb--current svelte-csi2lb")},m(i,s){w(i,e,s),c(e,n)},p(i,s){s&1&&t!==(t=i[4].name+"")&&R(n,t)},d(i){i&&g(e)}}}function Fl(l){let e,t,n=l[6]>0&&Ks();function i(r,u){return r[6]===r[0].length-1?Gs:qs}let s=i(l),a=s(l);return{c(){n&&n.c(),e=y(),a.c(),t=et()},m(r,u){n&&n.m(r,u),w(r,e,u),a.m(r,u),w(r,t,u)},p(r,u){s===(s=i(r))&&a?a.p(r,u):(a.d(1),a=s(r),a&&(a.c(),a.m(t.parentNode,t)))},d(r){r&&(g(e),g(t)),n&&n.d(r),a.d(r)}}}function Xs(l){let e,t=re(l[0]),n=[];for(let i=0;i<t.length;i+=1)n[i]=Fl(Nl(l,t,i));return{c(){e=f("nav");for(let i=0;i<n.length;i+=1)n[i].c();o(e,"class","breadcrumbs svelte-csi2lb")},m(i,s){w(i,e,s);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,[s]){if(s&3){t=re(i[0]);let a;for(a=0;a<t.length;a+=1){const r=Nl(i,t,a);n[a]?n[a].p(r,s):(n[a]=Fl(r),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},i:Z,o:Z,d(i){i&&g(e),je(n,i)}}}function Js(l,e,t){let{crumbs:n=[]}=e;const i=jt();function s(r){i("navigate",r)}const a=r=>s(r);return l.$$set=r=>{"crumbs"in r&&t(0,n=r.crumbs)},[n,s,a]}class si extends rt{constructor(e){super(),ct(this,e,Js,Xs,at,{crumbs:0})}}function Ys(l){let e,t,n,i,s,a;return{c(){e=f("div"),t=f("p"),t.textContent=`${_("file.previewUnavailable")}`,n=y(),i=f("button"),i.textContent=`${_("file.openExternal")}`,o(i,"class","btn btn-sm svelte-1cw3u0m"),o(e,"class","preview-status svelte-1cw3u0m")},m(r,u){w(r,e,u),c(e,t),c(e,n),c(e,i),s||(a=O(i,"click",l[9]),s=!0)},p:Z,d(r){r&&g(e),s=!1,a()}}}function Zs(l){let e,t;function n(a,r){return r&2&&(e=null),e==null&&(e=!!(a[1]&&a[1].startsWith("data:"))),e?na:la}let i=n(l,-1),s=i(l);return{c(){s.c(),t=et()},m(a,r){s.m(a,r),w(a,t,r)},p(a,r){i===(i=n(a,r))&&s?s.p(a,r):(s.d(1),s=i(a),s&&(s.c(),s.m(t.parentNode,t)))},d(a){a&&g(t),s.d(a)}}}function Qs(l){let e,t,n;return{c(){e=f("pre"),t=f("code"),n=E(l[1]),o(e,"class","preview-text svelte-1cw3u0m")},m(i,s){w(i,e,s),c(e,t),c(t,n)},p(i,s){s&2&&R(n,i[1])},d(i){i&&g(e)}}}function $s(l){let e,t,n,i;return{c(){e=f("div"),t=f("img"),Dt(t.src,n=l[1])||o(t,"src",n),o(t,"alt",i=l[0].name),o(t,"class","preview-image svelte-1cw3u0m"),o(e,"class","preview-image-container svelte-1cw3u0m")},m(s,a){w(s,e,a),c(e,t)},p(s,a){a&2&&!Dt(t.src,n=s[1])&&o(t,"src",n),a&1&&i!==(i=s[0].name)&&o(t,"alt",i)},d(s){s&&g(e)}}}function ea(l){let e,t,n,i,s,a,r;return{c(){e=f("div"),t=f("p"),n=E(l[3]),i=y(),s=f("button"),s.textContent=`${_("file.openExternal")}`,o(s,"class","btn btn-sm svelte-1cw3u0m"),o(e,"class","preview-status svelte-1cw3u0m")},m(u,d){w(u,e,d),c(e,t),c(t,n),c(e,i),c(e,s),a||(r=O(s,"click",l[9]),a=!0)},p(u,d){d&8&&R(n,u[3])},d(u){u&&g(e),a=!1,r()}}}function ta(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${_("common.loading")}`,o(e,"class","preview-status svelte-1cw3u0m")},m(n,i){w(n,e,i),c(e,t)},p:Z,d(n){n&&g(e)}}}function la(l){let e,t,n,i,s,a;return{c(){e=f("div"),t=f("p"),t.textContent=`${_("file.pdfUnavailable")}`,n=y(),i=f("button"),i.textContent=`${_("file.openExternal")}`,o(i,"class","btn btn-sm svelte-1cw3u0m"),o(e,"class","preview-status svelte-1cw3u0m")},m(r,u){w(r,e,u),c(e,t),c(e,n),c(e,i),s||(a=O(i,"click",l[9]),s=!0)},p:Z,d(r){r&&g(e),s=!1,a()}}}function na(l){let e,t,n;return{c(){e=f("div"),t=f("embed"),Dt(t.src,n=l[1])||o(t,"src",n),o(t,"type","application/pdf"),o(t,"class","preview-pdf svelte-1cw3u0m"),o(e,"class","preview-pdf-container svelte-1cw3u0m")},m(i,s){w(i,e,s),c(e,t)},p(i,s){s&2&&!Dt(t.src,n=i[1])&&o(t,"src",n)},d(i){i&&g(e)}}}function ia(l){let e,t,n,i,s,a,r,u=l[0].name+"",d,b,v,p,h=xt(l[0].size)+"",k,S,T=Sl(l[0].mime)+"",C,F,M,I,L,A,N,D,H,B,x,V;s=new ei({props:{kind:l[8],size:18}});function J(z,Y){return z[2]?ta:z[3]?ea:z[6]&&z[1]?$s:z[5]&&z[1]?Qs:z[4]?Zs:Ys}let q=J(l),X=q(l);return{c(){e=f("div"),t=f("div"),n=f("header"),i=f("div"),Je(s.$$.fragment),a=y(),r=f("span"),d=E(u),v=y(),p=f("div"),k=E(h),S=E(" · "),C=E(T),F=y(),M=f("div"),I=f("button"),I.innerHTML='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"></path><polyline points="15 3 21 3 21 9"></polyline><line x1="10" y1="14" x2="21" y2="3"></line></svg>',L=y(),A=f("button"),A.innerHTML='<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>',N=y(),D=f("div"),X.c(),o(r,"class","preview-name svelte-1cw3u0m"),o(r,"title",b=l[0].name),o(i,"class","preview-title svelte-1cw3u0m"),o(p,"class","preview-meta svelte-1cw3u0m"),o(I,"class","action-btn svelte-1cw3u0m"),o(I,"title",_("file.openExternal")),o(I,"aria-label",_("file.openExternal")),o(A,"class","action-btn action-btn-close svelte-1cw3u0m"),o(A,"title","Close"),o(A,"aria-label","Close preview"),o(M,"class","preview-actions svelte-1cw3u0m"),o(n,"class","preview-header svelte-1cw3u0m"),o(D,"class","preview-body svelte-1cw3u0m"),o(t,"class","modal svelte-1cw3u0m"),o(e,"class","overlay svelte-1cw3u0m"),o(e,"role","dialog"),o(e,"aria-modal","true"),o(e,"aria-label",H=`Preview: ${l[0].name}`)},m(z,Y){w(z,e,Y),c(e,t),c(t,n),c(n,i),Ge(s,i,null),c(i,a),c(i,r),c(r,d),c(n,v),c(n,p),c(p,k),c(p,S),c(p,C),c(n,F),c(n,M),c(M,I),c(M,L),c(M,A),c(t,N),c(t,D),X.m(D,null),B=!0,x||(V=[O(I,"click",l[9]),O(A,"click",l[10]),O(e,"click",dt(l[11]))],x=!0)},p(z,[Y]){(!B||Y&1)&&u!==(u=z[0].name+"")&&R(d,u),(!B||Y&1&&b!==(b=z[0].name))&&o(r,"title",b),(!B||Y&1)&&h!==(h=xt(z[0].size)+"")&&R(k,h),(!B||Y&1)&&T!==(T=Sl(z[0].mime)+"")&&R(C,T),q===(q=J(z))&&X?X.p(z,Y):(X.d(1),X=q(z),X&&(X.c(),X.m(D,null))),(!B||Y&1&&H!==(H=`Preview: ${z[0].name}`))&&o(e,"aria-label",H)},i(z){B||(Q(s.$$.fragment,z),B=!0)},o(z){le(s.$$.fragment,z),B=!1},d(z){z&&g(e),Xe(s),X.d(),x=!1,de(V)}}}function oa(l,e,t){let n,i,s,{item:a}=e,{content:r=""}=e,{loading:u=!1}=e,{error:d=""}=e;const b=jt(),v=ti(a);function p(T){T.key==="Escape"&&b("close")}function h(){b("openExternal",a.fileId)}Zn(()=>{window.addEventListener("keydown",p)}),Qn(()=>{window.removeEventListener("keydown",p)});const k=()=>b("close"),S=()=>b("close");return l.$$set=T=>{"item"in T&&t(0,a=T.item),"content"in T&&t(1,r=T.content),"loading"in T&&t(2,u=T.loading),"error"in T&&t(3,d=T.error)},l.$$.update=()=>{l.$$.dirty&3&&t(6,n=li(a)&&r&&r.startsWith("data:")),l.$$.dirty&1&&t(5,i=ni(a)||oi(a)),l.$$.dirty&1&&t(4,s=ii(a))},[a,r,u,d,s,i,n,b,v,h,k,S]}class sa extends rt{constructor(e){super(),ct(this,e,oa,ia,at,{item:0,content:1,loading:2,error:3})}}function aa(l){let e,t,n,i,s,a,r,u,d,b,v,p,h,k,S,T,C;return{c(){e=f("div"),t=f("div"),n=f("h3"),i=E(l[0]),s=y(),a=f("p"),r=E(l[1]),u=y(),d=f("div"),b=f("button"),v=E(l[2]),h=y(),k=f("button"),S=E(l[3]),o(n,"class","svelte-1fv6yyk"),o(a,"class","message svelte-1fv6yyk"),o(b,"class",p="btn "+(l[4]?"btn-danger":"btn-primary")+" svelte-1fv6yyk"),o(k,"class","btn svelte-1fv6yyk"),o(d,"class","actions svelte-1fv6yyk"),o(t,"class","modal svelte-1fv6yyk"),o(e,"class","overlay svelte-1fv6yyk"),o(e,"role","dialog"),o(e,"aria-modal","true"),o(e,"aria-label",l[0])},m(F,M){w(F,e,M),c(e,t),c(t,n),c(n,i),c(t,s),c(t,a),c(a,r),c(t,u),c(t,d),c(d,b),c(b,v),c(d,h),c(d,k),c(k,S),T||(C=[O(b,"click",l[6]),O(k,"click",l[7]),O(e,"click",dt(l[8]))],T=!0)},p(F,[M]){M&1&&R(i,F[0]),M&2&&R(r,F[1]),M&4&&R(v,F[2]),M&16&&p!==(p="btn "+(F[4]?"btn-danger":"btn-primary")+" svelte-1fv6yyk")&&o(b,"class",p),M&8&&R(S,F[3]),M&1&&o(e,"aria-label",F[0])},i:Z,o:Z,d(F){F&&g(e),T=!1,de(C)}}}function ca(l,e,t){let{title:n=_("common.confirm")}=e,{message:i=""}=e,{confirmText:s=_("common.delete")}=e,{cancelText:a=_("common.cancel")}=e,{danger:r=!1}=e;const u=jt(),d=()=>u("confirm"),b=()=>u("cancel"),v=()=>u("cancel");return l.$$set=p=>{"title"in p&&t(0,n=p.title),"message"in p&&t(1,i=p.message),"confirmText"in p&&t(2,s=p.confirmText),"cancelText"in p&&t(3,a=p.cancelText),"danger"in p&&t(4,r=p.danger)},[n,i,s,a,r,u,d,b,v]}class ra extends rt{constructor(e){super(),ct(this,e,ca,aa,at,{title:0,message:1,confirmText:2,cancelText:3,danger:4})}}function ua(l){let e,t,n;return{c(){e=j("circle"),t=j("line"),n=j("line"),o(e,"cx","12"),o(e,"cy","12"),o(e,"r","10"),o(t,"x1","12"),o(t,"y1","16"),o(t,"x2","12"),o(t,"y2","12"),o(n,"x1","12"),o(n,"y1","8"),o(n,"x2","12.01"),o(n,"y2","8")},m(i,s){w(i,e,s),w(i,t,s),w(i,n,s)},d(i){i&&(g(e),g(t),g(n))}}}function fa(l){let e,t;return{c(){e=j("path"),t=j("polyline"),o(e,"d","M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"),o(t,"points","13 2 13 9 20 9")},m(n,i){w(n,e,i),w(n,t,i)},d(n){n&&(g(e),g(t))}}}function da(l){let e,t;return{c(){e=j("path"),t=j("path"),o(e,"d","M12 20h9"),o(t,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z")},m(n,i){w(n,e,i),w(n,t,i)},d(n){n&&(g(e),g(t))}}}function ma(l){let e,t,n,i,s;return{c(){e=j("path"),t=j("path"),n=j("line"),i=j("line"),s=j("line"),o(e,"d","M4 19.5A2.5 2.5 0 0 1 6.5 17H20"),o(t,"d","M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"),o(n,"x1","8"),o(n,"y1","7"),o(n,"x2","16"),o(n,"y2","7"),o(i,"x1","8"),o(i,"y1","11"),o(i,"x2","14"),o(i,"y2","11"),o(s,"x1","8"),o(s,"y1","15"),o(s,"x2","12"),o(s,"y2","15")},m(a,r){w(a,e,r),w(a,t,r),w(a,n,r),w(a,i,r),w(a,s,r)},d(a){a&&(g(e),g(t),g(n),g(i),g(s))}}}function pa(l){let e,t,n,i;return{c(){e=j("path"),t=j("polyline"),n=j("line"),i=j("line"),o(e,"d","M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"),o(t,"points","14 2 14 8 20 8"),o(n,"x1","16"),o(n,"y1","13"),o(n,"x2","8"),o(n,"y2","13"),o(i,"x1","16"),o(i,"y1","17"),o(i,"x2","8"),o(i,"y2","17")},m(s,a){w(s,e,a),w(s,t,a),w(s,n,a),w(s,i,a)},d(s){s&&(g(e),g(t),g(n),g(i))}}}function _a(l){let e,t;return{c(){e=j("path"),t=j("circle"),o(e,"d","M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"),o(t,"cx","12"),o(t,"cy","7"),o(t,"r","4")},m(n,i){w(n,e,i),w(n,t,i)},d(n){n&&(g(e),g(t))}}}function va(l){let e,t,n,i;return{c(){e=j("rect"),t=j("rect"),n=j("rect"),i=j("rect"),o(e,"x","3"),o(e,"y","3"),o(e,"width","7"),o(e,"height","7"),o(e,"rx","1"),o(t,"x","14"),o(t,"y","3"),o(t,"width","7"),o(t,"height","4"),o(t,"rx","1"),o(n,"x","14"),o(n,"y","10"),o(n,"width","7"),o(n,"height","11"),o(n,"rx","1"),o(i,"x","3"),o(i,"y","14"),o(i,"width","7"),o(i,"height","7"),o(i,"rx","1")},m(s,a){w(s,e,a),w(s,t,a),w(s,n,a),w(s,i,a)},d(s){s&&(g(e),g(t),g(n),g(i))}}}function ha(l){let e;return{c(){e=j("path"),o(e,"d","M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z")},m(t,n){w(t,e,n)},d(t){t&&g(e)}}}function ba(l){let e;function t(s,a){return s[0]==="folder"?ha:s[0]==="project"?va:s[0]==="client"?_a:s[0]==="document"?pa:s[0]==="recipe"?ma:s[0]==="note"?da:s[0]==="file"?fa:ua}let n=t(l),i=n(l);return{c(){e=j("svg"),i.c(),o(e,"width",l[1]),o(e,"height",l[1]),o(e,"viewBox","0 0 24 24"),o(e,"fill","none"),o(e,"stroke","currentColor"),o(e,"stroke-width","1.5"),o(e,"stroke-linecap","round"),o(e,"stroke-linejoin","round"),o(e,"xmlns","http://www.w3.org/2000/svg")},m(s,a){w(s,e,a),i.m(e,null)},p(s,[a]){n!==(n=t(s))&&(i.d(1),i=n(s),i&&(i.c(),i.m(e,null))),a&2&&o(e,"width",s[1]),a&2&&o(e,"height",s[1])},i:Z,o:Z,d(s){s&&g(e),i.d()}}}function ka(l,e,t){let{kind:n="generic"}=e,{size:i=18}=e;return l.$$set=s=>{"kind"in s&&t(0,n=s.kind),"size"in s&&t(1,i=s.size)},[n,i]}class Pt extends rt{constructor(e){super(),ct(this,e,ka,ba,at,{kind:0,size:1})}}function Il(l,e,t){const n=l.slice();return n[10]=e[t],n}function ya(l){let e;return{c(){e=f("span"),o(e,"class","tree-spacer")},m(t,n){w(t,e,n)},p:Z,d(t){t&&g(e)}}}function ga(l){let e,t=l[1][l[10].id]?"▼":"▶",n;return{c(){e=f("span"),n=E(t),o(e,"class","tree-arrow")},m(i,s){w(i,e,s),c(e,n)},p(i,s){s&3&&t!==(t=i[1][i[10].id]?"▼":"▶")&&R(n,t)},d(i){i&&g(e)}}}function Ml(l){let e,t;return e=new ai({props:{nodes:l[10].children,expanded:l[1],selectedNodeId:l[2],level:l[3]+1,onSelect:l[4],onToggle:l[5],onContextMenu:l[6]}}),{c(){Je(e.$$.fragment)},m(n,i){Ge(e,n,i),t=!0},p(n,i){const s={};i&1&&(s.nodes=n[10].children),i&2&&(s.expanded=n[1]),i&4&&(s.selectedNodeId=n[2]),i&8&&(s.level=n[3]+1),i&16&&(s.onSelect=n[4]),i&32&&(s.onToggle=n[5]),i&64&&(s.onContextMenu=n[6]),e.$set(s)},i(n){t||(Q(e.$$.fragment,n),t=!0)},o(n){le(e.$$.fragment,n),t=!1},d(n){Xe(e,n)}}}function Al(l){let e,t,n,i,s,a,r,u=l[10].title+"",d,b,v,p,h,k;function S(A,N){return A[10].children&&A[10].children.length>0?ga:ya}let T=S(l),C=T(l);function F(){return l[7](l[10])}s=new Pt({props:{kind:Dl(l[10]),size:16}});function M(){return l[8](l[10])}function I(...A){return l[9](l[10],...A)}let L=l[1][l[10].id]&&l[10].children&&l[10].children.length>0&&Ml(l);return{c(){e=f("div"),t=f("button"),C.c(),n=y(),i=f("span"),Je(s.$$.fragment),a=y(),r=f("span"),d=E(u),b=y(),L&&L.c(),v=et(),o(t,"class","tree-toggle"),o(i,"class","tree-icon svelte-1kki00y"),o(r,"class","tree-label"),o(e,"class","tree-item svelte-1kki00y"),Re(e,"padding-left",l[3]*16+8+"px"),tt(e,"selected",l[2]===l[10].id)},m(A,N){w(A,e,N),c(e,t),C.m(t,null),c(e,n),c(e,i),Ge(s,i,null),c(e,a),c(e,r),c(r,d),w(A,b,N),L&&L.m(A,N),w(A,v,N),p=!0,h||(k=[O(t,"click",F),O(t,"contextmenu",Mt(Ca)),O(r,"click",M),O(r,"contextmenu",Mt(Sa)),O(e,"contextmenu",Mt(I))],h=!0)},p(A,N){l=A,T===(T=S(l))&&C?C.p(l,N):(C.d(1),C=T(l),C&&(C.c(),C.m(t,null)));const D={};N&1&&(D.kind=Dl(l[10])),s.$set(D),(!p||N&1)&&u!==(u=l[10].title+"")&&R(d,u),(!p||N&8)&&Re(e,"padding-left",l[3]*16+8+"px"),(!p||N&5)&&tt(e,"selected",l[2]===l[10].id),l[1][l[10].id]&&l[10].children&&l[10].children.length>0?L?(L.p(l,N),N&3&&Q(L,1)):(L=Ml(l),L.c(),Q(L,1),L.m(v.parentNode,v)):L&&(Be(),le(L,1,1,()=>{L=null}),He())},i(A){p||(Q(s.$$.fragment,A),Q(L),p=!0)},o(A){le(s.$$.fragment,A),le(L),p=!1},d(A){A&&(g(e),g(b),g(v)),C.d(),Xe(s),L&&L.d(A),h=!1,de(k)}}}function wa(l){let e,t,n=re(l[0]),i=[];for(let a=0;a<n.length;a+=1)i[a]=Al(Il(l,n,a));const s=a=>le(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;a<i.length;a+=1)i[a].c();e=et()},m(a,r){for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(a,r);w(a,e,r),t=!0},p(a,[r]){if(r&127){n=re(a[0]);let u;for(u=0;u<n.length;u+=1){const d=Il(a,n,u);i[u]?(i[u].p(d,r),Q(i[u],1)):(i[u]=Al(d),i[u].c(),Q(i[u],1),i[u].m(e.parentNode,e))}for(Be(),u=n.length;u<i.length;u+=1)s(u);He()}},i(a){if(!t){for(let r=0;r<n.length;r+=1)Q(i[r]);t=!0}},o(a){i=i.filter(Boolean);for(let r=0;r<i.length;r+=1)le(i[r]);t=!1},d(a){a&&g(e),je(i,a)}}}function Dl(l){if(l.type==="folder"&&l.template_id){const e={"folder.default":"folder","project.default":"project","client.default":"client","document.default":"document","recipe.default":"recipe"};if(e[l.template_id])return e[l.template_id]}return l.type==="project"||l.type==="folder"?"folder":l.type==="note"?"note":l.type==="file"?"file":"generic"}const Ca=l=>l.stopPropagation(),Sa=l=>l.stopPropagation();function Ta(l,e,t){let{nodes:n=[]}=e,{expanded:i={}}=e,{selectedNodeId:s=""}=e,{level:a=0}=e,{onSelect:r}=e,{onToggle:u}=e,{onContextMenu:d}=e;const b=h=>u&&u(h.id),v=h=>r&&r(h),p=(h,k)=>d&&d(k,h);return l.$$set=h=>{"nodes"in h&&t(0,n=h.nodes),"expanded"in h&&t(1,i=h.expanded),"selectedNodeId"in h&&t(2,s=h.selectedNodeId),"level"in h&&t(3,a=h.level),"onSelect"in h&&t(4,r=h.onSelect),"onToggle"in h&&t(5,u=h.onToggle),"onContextMenu"in h&&t(6,d=h.onContextMenu)},[n,i,s,a,r,u,d,b,v,p]}class ai extends rt{constructor(e){super(),ct(this,e,Ta,wa,at,{nodes:0,expanded:1,selectedNodeId:2,level:3,onSelect:4,onToggle:5,onContextMenu:6})}}function El(l,e,t){const n=l.slice();return n[214]=e[t],n}function Ll(l,e,t){const n=l.slice();return n[217]=e[t],n}function xl(l,e,t){const n=l.slice();return n[217]=e[t],n}function jl(l,e,t){const n=l.slice();return n[238]=e[t],n}function Pl(l,e,t){const n=l.slice();return n[238]=e[t],n}function Ol(l,e,t){const n=l.slice();return n[246]=e[t],n}function zl(l,e,t){const n=l.slice();return n[238]=e[t],n}function Bl(l,e,t){const n=l.slice();return n[238]=e[t],n}function Hl(l,e,t){const n=l.slice();return n[222]=e[t],n}function Rl(l,e,t){const n=l.slice();return n[233]=e[t],n}function Vl(l,e,t){const n=l.slice();return n[230]=e[t],n}function Ul(l,e,t){const n=l.slice();return n[225]=e[t],n}function Wl(l,e,t){const n=l.slice();return n[222]=e[t],n}function Kl(l,e,t){const n=l.slice();return n[225]=e[t],n}function ql(l,e,t){const n=l.slice();return n[241]=e[t],n}function Gl(l,e,t){const n=l.slice();return n[253]=e[t],n}function Xl(l,e,t){const n=l.slice();return n[256]=e[t],n}function Jl(l){let e,t=l[256].label+"",n,i,s,a,r;function u(){return l[125](l[256])}return{c(){e=f("button"),n=E(t),i=y(),o(e,"class",s="nav-item "+(l[8]===l[256].id?"selected":"")+" svelte-6adx1u")},m(d,b){w(d,e,b),c(e,n),c(e,i),a||(r=O(e,"click",u),a=!0)},p(d,b){l=d,b[0]&1&&t!==(t=l[256].label+"")&&R(n,t),b[0]&257&&s!==(s="nav-item "+(l[8]===l[256].id?"selected":"")+" svelte-6adx1u")&&o(e,"class",s)},d(d){d&&g(e),a=!1,r()}}}function Na(l){let e;return{c(){e=f("div"),e.textContent=`${_("nav.noNodes")}`,o(e,"class","nav-empty svelte-6adx1u")},m(t,n){w(t,e,n)},p:Z,i:Z,o:Z,d(t){t&&g(e)}}}function Fa(l){var n;let e,t;return e=new ai({props:{nodes:l[1],expanded:l[32],selectedNodeId:((n=l[9])==null?void 0:n.id)||"",onSelect:l[62],onToggle:l[92],onContextMenu:l[90]}}),{c(){Je(e.$$.fragment)},m(i,s){Ge(e,i,s),t=!0},p(i,s){var r;const a={};s[0]&2&&(a.nodes=i[1]),s[1]&2&&(a.expanded=i[32]),s[0]&512&&(a.selectedNodeId=((r=i[9])==null?void 0:r.id)||""),e.$set(a)},i(i){t||(Q(e.$$.fragment,i),t=!0)},o(i){le(e.$$.fragment,i),t=!1},d(i){Xe(e,i)}}}function Ia(l){let e;return{c(){e=f("span"),e.textContent=`${_("nav.selectPrompt")}`,o(e,"class","crumb placeholder svelte-6adx1u")},m(t,n){w(t,e,n)},p:Z,d(t){t&&g(e)}}}function Ma(l){let e,t=re(l[0]),n=[];for(let i=0;i<t.length;i+=1)n[i]=Yl(Gl(l,t,i));return{c(){e=f("span");for(let i=0;i<n.length;i+=1)n[i].c();o(e,"class","crumb svelte-6adx1u")},m(i,s){w(i,e,s);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,s){if(s[0]&257){t=re(i[0]);let a;for(a=0;a<t.length;a+=1){const r=Gl(i,t,a);n[a]?n[a].p(r,s):(n[a]=Yl(r),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&g(e),je(n,i)}}}function Aa(l){let e,t=l[9].title+"",n,i,s,a=l[9].type+"",r;return{c(){e=f("span"),n=E(t),i=y(),s=f("span"),r=E(a),o(e,"class","crumb svelte-6adx1u"),o(s,"class","crumb-type svelte-6adx1u")},m(u,d){w(u,e,d),c(e,n),w(u,i,d),w(u,s,d),c(s,r)},p(u,d){d[0]&512&&t!==(t=u[9].title+"")&&R(n,t),d[0]&512&&a!==(a=u[9].type+"")&&R(r,a)},d(u){u&&(g(e),g(i),g(s))}}}function Yl(l){let e=(l[253].id===l[8]?l[253].label:"")+"",t;return{c(){t=E(e)},m(n,i){w(n,t,i)},p(n,i){i[0]&257&&e!==(e=(n[253].id===n[8]?n[253].label:"")+"")&&R(t,e)},d(n){n&&g(t)}}}function Zl(l){let e,t,n,i,s,a,r,u,d=l[52].unpushedOps>0&&Ql(l);return{c(){e=f("button"),t=j("svg"),n=j("polyline"),i=j("polyline"),s=j("path"),a=y(),d&&d.c(),o(n,"points","23 4 23 10 17 10"),o(n,"class","svelte-6adx1u"),o(i,"points","1 20 1 14 7 14"),o(i,"class","svelte-6adx1u"),o(s,"d","M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"),o(s,"class","svelte-6adx1u"),o(t,"width","16"),o(t,"height","16"),o(t,"viewBox","0 0 24 24"),o(t,"fill","none"),o(t,"stroke","currentColor"),o(t,"stroke-width","2"),o(t,"stroke-linecap","round"),o(t,"stroke-linejoin","round"),o(t,"class","svelte-6adx1u"),o(e,"class","header-sync-btn svelte-6adx1u"),e.disabled=l[53],o(e,"title",_("nav.syncNow"))},m(b,v){w(b,e,v),c(e,t),c(t,n),c(t,i),c(t,s),c(e,a),d&&d.m(e,null),r||(u=O(e,"click",l[124]),r=!0)},p(b,v){b[52].unpushedOps>0?d?d.p(b,v):(d=Ql(b),d.c(),d.m(e,null)):d&&(d.d(1),d=null),v[1]&4194304&&(e.disabled=b[53])},d(b){b&&g(e),d&&d.d(),r=!1,u()}}}function Ql(l){let e,t=l[52].unpushedOps+"",n;return{c(){e=f("span"),n=E(t),o(e,"class","sync-badge svelte-6adx1u")},m(i,s){w(i,e,s),c(e,n)},p(i,s){s[1]&2097152&&t!==(t=i[52].unpushedOps+"")&&R(n,t)},d(i){i&&g(e)}}}function $l(l){let e,t,n,i,s,a;return{c(){e=f("div"),t=E(l[7]),n=y(),i=f("button"),i.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-6adx1u"><line x1="18" y1="6" x2="6" y2="18" class="svelte-6adx1u"></line><line x1="6" y1="6" x2="18" y2="18" class="svelte-6adx1u"></line></svg>',o(i,"class","dismiss-btn svelte-6adx1u"),o(i,"aria-label","Dismiss"),o(e,"class","error-banner svelte-6adx1u")},m(r,u){w(r,e,u),c(e,t),c(e,n),c(e,i),s||(a=[O(i,"click",ot(l[126])),O(e,"click",l[127])],s=!0)},p(r,u){u[0]&128&&R(t,r[7])},d(r){r&&g(e),s=!1,de(a)}}}function Da(l){let e,t,n;function i(r,u){if(r[28])return za;if(r[0].length>0)return Oa;if(r[7])return Pa}let s=i(l),a=s&&s(l);return{c(){e=f("div"),t=f("h2"),t.textContent=`${_("welcome.title")}`,n=y(),a&&a.c(),o(t,"class","svelte-6adx1u"),o(e,"class","welcome svelte-6adx1u")},m(r,u){w(r,e,u),c(e,t),c(e,n),a&&a.m(e,null)},p(r,u){s===(s=i(r))&&a?a.p(r,u):(a&&a.d(1),a=s&&s(r),a&&(a.c(),a.m(e,null)))},i:Z,o:Z,d(r){r&&g(e),a&&a.d()}}}function Ea(l){let e,t,n,i;function s(u,d){return u[4].length===0?Ha:Ba}let a=s(l),r=a(l);return{c(){e=f("div"),t=f("div"),n=f("h2"),n.textContent=`${_("activity.title")}`,i=y(),r.c(),o(n,"class","svelte-6adx1u"),o(t,"class","activity-feed-header svelte-6adx1u"),o(e,"class","activity-feed svelte-6adx1u")},m(u,d){w(u,e,d),c(e,t),c(t,n),c(e,i),r.m(e,null)},p(u,d){a===(a=s(u))&&r?r.p(u,d):(r.d(1),r=a(u),r&&(r.c(),r.m(e,null)))},i:Z,o:Z,d(u){u&&g(e),r.d()}}}function La(l){let e,t,n,i,s,a=l[3].date+"",r,u,d,b=l[3].summary&&ln(l);function v(k,S){return k[3].groups&&k[3].groups.length>0?Va:Ra}let p=v(l),h=p(l);return{c(){e=f("div"),t=f("div"),n=f("h2"),n.textContent=`${_("today.title")}`,i=y(),s=f("span"),r=E(a),u=y(),b&&b.c(),d=y(),h.c(),o(n,"class","svelte-6adx1u"),o(s,"class","today-date svelte-6adx1u"),o(t,"class","today-header svelte-6adx1u"),o(e,"class","today-dashboard svelte-6adx1u")},m(k,S){w(k,e,S),c(e,t),c(t,n),c(t,i),c(t,s),c(s,r),c(e,u),b&&b.m(e,null),c(e,d),h.m(e,null)},p(k,S){S[0]&8&&a!==(a=k[3].date+"")&&R(r,a),k[3].summary?b?b.p(k,S):(b=ln(k),b.c(),b.m(e,d)):b&&(b.d(1),b=null),p===(p=v(k))&&h?h.p(k,S):(h.d(1),h=p(k),h&&(h.c(),h.m(e,null)))},i:Z,o:Z,d(k){k&&g(e),b&&b.d(),h.d()}}}function xa(l){let e,t,n,i,s,a,r=re(l[60]),u=[];for(let p=0;p<r.length;p+=1)u[p]=mn(ql(l,r,p));const d=[Ya,Ja,Xa,Ga,qa,Ka],b=[];function v(p,h){return p[10]==="overview"?0:p[10]==="notes"?1:p[10]==="files"?2:p[10]==="actions"?3:p[10]==="worklog"?4:p[10]==="activity"?5:-1}return~(i=v(l))&&(s=b[i]=d[i](l)),{c(){e=f("div");for(let p=0;p<u.length;p+=1)u[p].c();t=y(),n=f("div"),s&&s.c(),o(e,"class","tabs svelte-6adx1u"),o(n,"class","tab-content svelte-6adx1u")},m(p,h){w(p,e,h);for(let k=0;k<u.length;k+=1)u[k]&&u[k].m(e,null);w(p,t,h),w(p,n,h),~i&&b[i].m(n,null),a=!0},p(p,h){if(h[0]&1536|h[1]&536870952|h[2]&2|h[3]&65536){r=re(p[60]);let S;for(S=0;S<r.length;S+=1){const T=ql(p,r,S);u[S]?u[S].p(T,h):(u[S]=mn(T),u[S].c(),u[S].m(e,null))}for(;S<u.length;S+=1)u[S].d(1);u.length=r.length}let k=i;i=v(p),i===k?~i&&b[i].p(p,h):(s&&(Be(),le(b[k],1,1,()=>{b[k]=null}),He()),~i?(s=b[i],s?s.p(p,h):(s=b[i]=d[i](p),s.c()),Q(s,1),s.m(n,null)):s=null)},i(p){a||(Q(s),a=!0)},o(p){le(s),a=!1},d(p){p&&(g(e),g(t),g(n)),je(u,p),~i&&b[i].d()}}}function ja(l){let e,t,n,i=l[12].title+"",s,a,r,u,d,b,v,p,h,k,S,T=l[12].dirty&&In();return{c(){e=f("div"),t=f("div"),n=f("span"),s=E(i),a=y(),T&&T.c(),r=y(),u=f("div"),d=f("button"),d.textContent=`${_("common.save")}`,b=y(),v=f("button"),v.textContent=`${_("common.close")}`,p=y(),h=f("textarea"),o(n,"class","note-title svelte-6adx1u"),o(d,"class","btn btn-primary svelte-6adx1u"),o(v,"class","btn svelte-6adx1u"),o(u,"class","note-editor-actions svelte-6adx1u"),o(t,"class","note-editor-header svelte-6adx1u"),o(h,"class","note-textarea svelte-6adx1u"),o(h,"placeholder",_("note.placeholder")),o(e,"class","note-editor svelte-6adx1u")},m(C,F){w(C,e,F),c(e,t),c(t,n),c(n,s),c(t,a),T&&T.m(t,null),c(t,r),c(t,u),c(u,d),c(u,b),c(u,v),c(e,p),c(e,h),Ce(h,l[12].content),k||(S=[O(d,"click",l[102]),O(v,"click",l[100]),O(h,"input",l[128]),O(h,"input",l[101])],k=!0)},p(C,F){F[0]&4096&&i!==(i=C[12].title+"")&&R(s,i),C[12].dirty?T||(T=In(),T.c(),T.m(t,r)):T&&(T.d(1),T=null),F[0]&4096&&Ce(h,C[12].content)},i:Z,o:Z,d(C){C&&g(e),T&&T.d(),k=!1,de(S)}}}function Pa(l){let e,t=_("common.error")+"",n,i,s;return{c(){e=f("p"),n=E(t),i=y(),s=E(l[7]),o(e,"class","error-text svelte-6adx1u")},m(a,r){w(a,e,r),c(e,n),c(e,i),c(e,s)},p(a,r){r[0]&128&&R(s,a[7])},d(a){a&&g(e)}}}function Oa(l){let e,t,n;return{c(){e=f("p"),e.textContent=`${_("welcome.selectSection")}`,t=y(),n=f("p"),n.textContent=`${_("welcome.createCase")}`,o(e,"class","svelte-6adx1u"),o(n,"class","hint svelte-6adx1u")},m(i,s){w(i,e,s),w(i,t,s),w(i,n,s)},p:Z,d(i){i&&(g(e),g(t),g(n))}}}function za(l){let e;return{c(){e=f("p"),e.textContent=`${_("common.loading")}`,o(e,"class","svelte-6adx1u")},m(t,n){w(t,e,n)},p:Z,d(t){t&&g(e)}}}function Ba(l){let e,t=re(l[4]),n=[];for(let i=0;i<t.length;i+=1)n[i]=tn(jl(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();o(e,"class","activity-feed-events svelte-6adx1u")},m(i,s){w(i,e,s);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,s){if(s[0]&16|s[3]&16908288){t=re(i[4]);let a;for(a=0;a<t.length;a+=1){const r=jl(i,t,a);n[a]?n[a].p(r,s):(n[a]=tn(r),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&g(e),je(n,i)}}}function Ha(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${_("activity.empty")}`,o(t,"class","svelte-6adx1u"),o(e,"class","empty-state svelte-6adx1u")},m(n,i){w(n,e,i),c(e,t)},p:Z,d(n){n&&g(e)}}}function en(l){let e,t=l[238].targetType+"",n;return{c(){e=f("span"),n=E(t),o(e,"class","activity-feed-target svelte-6adx1u")},m(i,s){w(i,e,s),c(e,n)},p(i,s){s[0]&16&&t!==(t=i[238].targetType+"")&&R(n,t)},d(i){i&&g(e)}}}function tn(l){let e,t,n=kt(l[238].eventType)+"",i,s,a,r,u=l[238].title+"",d,b,v,p,h=l[110](l[238].eventType)+"",k,S,T,C,F=nt(l[238].createdAt)+"",M,I,L=lt(l[238].createdAt)+"",A,N,D,H,B=l[238].targetType&&en(l);function x(){return l[161](l[238])}function V(...J){return l[162](l[238],...J)}return{c(){e=f("div"),t=f("span"),i=E(n),s=y(),a=f("div"),r=f("span"),d=E(u),b=y(),v=f("div"),p=f("span"),k=E(h),S=y(),B&&B.c(),T=y(),C=f("span"),M=E(F),I=y(),A=E(L),N=y(),o(t,"class","activity-feed-icon svelte-6adx1u"),o(r,"class","activity-feed-title svelte-6adx1u"),o(p,"class","activity-feed-type svelte-6adx1u"),o(C,"class","activity-feed-time svelte-6adx1u"),o(v,"class","activity-feed-meta svelte-6adx1u"),o(a,"class","activity-feed-body svelte-6adx1u"),o(e,"class","activity-feed-event svelte-6adx1u"),o(e,"role","button"),o(e,"tabindex","0")},m(J,q){w(J,e,q),c(e,t),c(t,i),c(e,s),c(e,a),c(a,r),c(r,d),c(a,b),c(a,v),c(v,p),c(p,k),c(v,S),B&&B.m(v,null),c(v,T),c(v,C),c(C,M),c(C,I),c(C,A),c(e,N),D||(H=[O(e,"click",x),O(e,"keydown",V)],D=!0)},p(J,q){l=J,q[0]&16&&n!==(n=kt(l[238].eventType)+"")&&R(i,n),q[0]&16&&u!==(u=l[238].title+"")&&R(d,u),q[0]&16&&h!==(h=l[110](l[238].eventType)+"")&&R(k,h),l[238].targetType?B?B.p(l,q):(B=en(l),B.c(),B.m(v,T)):B&&(B.d(1),B=null),q[0]&16&&F!==(F=nt(l[238].createdAt)+"")&&R(M,F),q[0]&16&&L!==(L=lt(l[238].createdAt)+"")&&R(A,L)},d(J){J&&g(e),B&&B.d(),D=!1,de(H)}}}function ln(l){let e,t,n,i=l[3].summary.changedCases>0&&nn(l),s=l[3].summary.notes>0&&on(l),a=l[3].summary.files>0&&sn(l);return{c(){e=f("div"),i&&i.c(),t=y(),s&&s.c(),n=y(),a&&a.c(),o(e,"class","today-summary svelte-6adx1u")},m(r,u){w(r,e,u),i&&i.m(e,null),c(e,t),s&&s.m(e,null),c(e,n),a&&a.m(e,null)},p(r,u){r[3].summary.changedCases>0?i?i.p(r,u):(i=nn(r),i.c(),i.m(e,t)):i&&(i.d(1),i=null),r[3].summary.notes>0?s?s.p(r,u):(s=on(r),s.c(),s.m(e,n)):s&&(s.d(1),s=null),r[3].summary.files>0?a?a.p(r,u):(a=sn(r),a.c(),a.m(e,null)):a&&(a.d(1),a=null)},d(r){r&&g(e),i&&i.d(),s&&s.d(),a&&a.d()}}}function nn(l){let e,t=l[3].summary.changedCases+"",n,i,s=st(l[3].summary.changedCases,_("today.plural.case_one"),_("today.plural.case_few"),_("today.plural.case_many"))+"",a;return{c(){e=f("span"),n=E(t),i=y(),a=E(s),o(e,"class","summary-chip svelte-6adx1u")},m(r,u){w(r,e,u),c(e,n),c(e,i),c(e,a)},p(r,u){u[0]&8&&t!==(t=r[3].summary.changedCases+"")&&R(n,t),u[0]&8&&s!==(s=st(r[3].summary.changedCases,_("today.plural.case_one"),_("today.plural.case_few"),_("today.plural.case_many"))+"")&&R(a,s)},d(r){r&&g(e)}}}function on(l){let e,t=l[3].summary.notes+"",n,i,s=st(l[3].summary.notes,_("today.plural.note_one"),_("today.plural.note_few"),_("today.plural.note_many"))+"",a;return{c(){e=f("span"),n=E(t),i=y(),a=E(s),o(e,"class","summary-chip svelte-6adx1u")},m(r,u){w(r,e,u),c(e,n),c(e,i),c(e,a)},p(r,u){u[0]&8&&t!==(t=r[3].summary.notes+"")&&R(n,t),u[0]&8&&s!==(s=st(r[3].summary.notes,_("today.plural.note_one"),_("today.plural.note_few"),_("today.plural.note_many"))+"")&&R(a,s)},d(r){r&&g(e)}}}function sn(l){let e,t=l[3].summary.files+"",n,i,s=st(l[3].summary.files,_("today.plural.file_one"),_("today.plural.file_few"),_("today.plural.file_many"))+"",a;return{c(){e=f("span"),n=E(t),i=y(),a=E(s),o(e,"class","summary-chip svelte-6adx1u")},m(r,u){w(r,e,u),c(e,n),c(e,i),c(e,a)},p(r,u){u[0]&8&&t!==(t=r[3].summary.files+"")&&R(n,t),u[0]&8&&s!==(s=st(r[3].summary.files,_("today.plural.file_one"),_("today.plural.file_few"),_("today.plural.file_many"))+"")&&R(a,s)},d(r){r&&g(e)}}}function Ra(l){let e,t,n,i;return{c(){e=f("div"),t=f("p"),t.textContent=`${_("today.empty")}`,n=y(),i=f("p"),i.textContent=`${_("today.emptyHint")}`,o(t,"class","svelte-6adx1u"),o(i,"class","hint svelte-6adx1u"),o(e,"class","today-empty svelte-6adx1u")},m(s,a){w(s,e,a),c(e,t),c(e,n),c(e,i)},p:Z,d(s){s&&g(e)}}}function Va(l){let e,t,n=re(l[3].groups),i=[];for(let a=0;a<n.length;a+=1)i[a]=un(Ol(l,n,a));let s=l[3].events&&l[3].events.length>0&&fn(l);return{c(){for(let a=0;a<i.length;a+=1)i[a].c();e=y(),s&&s.c(),t=et()},m(a,r){for(let u=0;u<i.length;u+=1)i[u]&&i[u].m(a,r);w(a,e,r),s&&s.m(a,r),w(a,t,r)},p(a,r){if(r[0]&8|r[3]&17170432){n=re(a[3].groups);let u;for(u=0;u<n.length;u+=1){const d=Ol(a,n,u);i[u]?i[u].p(d,r):(i[u]=un(d),i[u].c(),i[u].m(e.parentNode,e))}for(;u<i.length;u+=1)i[u].d(1);i.length=n.length}a[3].events&&a[3].events.length>0?s?s.p(a,r):(s=fn(a),s.c(),s.m(t.parentNode,t)):s&&(s.d(1),s=null)},d(a){a&&(g(e),g(t)),je(i,a),s&&s.d(a)}}}function an(l){let e,t=l[246].events.length+"",n,i,s=st(l[246].events.length,_("today.plural.event_one"),_("today.plural.event_few"),_("today.plural.event_many"))+"",a;return{c(){e=f("span"),n=E(t),i=y(),a=E(s),o(e,"class","today-case-count svelte-6adx1u")},m(r,u){w(r,e,u),c(e,n),c(e,i),c(e,a)},p(r,u){u[0]&8&&t!==(t=r[246].events.length+"")&&R(n,t),u[0]&8&&s!==(s=st(r[246].events.length,_("today.plural.event_one"),_("today.plural.event_few"),_("today.plural.event_many"))+"")&&R(a,s)},d(r){r&&g(e)}}}function Ua(l){let e;return{c(){e=f("div"),e.textContent=`${_("today.changedCases")}`,o(e,"class","today-events-empty svelte-6adx1u")},m(t,n){w(t,e,n)},p:Z,d(t){t&&g(e)}}}function Wa(l){let e,t=re(l[246].events),n=[];for(let i=0;i<t.length;i+=1)n[i]=rn(zl(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();o(e,"class","today-events svelte-6adx1u")},m(i,s){w(i,e,s);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,s){if(s[0]&8|s[3]&16908288){t=re(i[246].events);let a;for(a=0;a<t.length;a+=1){const r=zl(i,t,a);n[a]?n[a].p(r,s):(n[a]=rn(r),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&g(e),je(n,i)}}}function cn(l){let e,t=l[238].targetType+"",n;return{c(){e=f("span"),n=E(t),o(e,"class","activity-event-target svelte-6adx1u")},m(i,s){w(i,e,s),c(e,n)},p(i,s){s[0]&8&&t!==(t=i[238].targetType+"")&&R(n,t)},d(i){i&&g(e)}}}function rn(l){let e,t,n=kt(l[238].eventType)+"",i,s,a,r=l[238].title+"",u,d,b,v=l[110](l[238].eventType)+"",p,h,k,S,T=lt(l[238].createdAt)+"",C,F,M,I=l[238].targetType&&cn(l);function L(){return l[157](l[246])}function A(...N){return l[158](l[246],...N)}return{c(){e=f("div"),t=f("span"),i=E(n),s=y(),a=f("span"),u=E(r),d=y(),b=f("span"),p=E(v),h=y(),I&&I.c(),k=y(),S=f("span"),C=E(T),o(t,"class","today-event-icon svelte-6adx1u"),o(a,"class","today-event-title svelte-6adx1u"),o(b,"class","today-event-type svelte-6adx1u"),o(S,"class","today-event-time svelte-6adx1u"),o(e,"class","today-event svelte-6adx1u"),o(e,"role","button"),o(e,"tabindex","0")},m(N,D){w(N,e,D),c(e,t),c(t,i),c(e,s),c(e,a),c(a,u),c(e,d),c(e,b),c(b,p),c(e,h),I&&I.m(e,null),c(e,k),c(e,S),c(S,C),F||(M=[O(e,"click",L),O(e,"keydown",A)],F=!0)},p(N,D){l=N,D[0]&8&&n!==(n=kt(l[238].eventType)+"")&&R(i,n),D[0]&8&&r!==(r=l[238].title+"")&&R(u,r),D[0]&8&&v!==(v=l[110](l[238].eventType)+"")&&R(p,v),l[238].targetType?I?I.p(l,D):(I=cn(l),I.c(),I.m(e,k)):I&&(I.d(1),I=null),D[0]&8&&T!==(T=lt(l[238].createdAt)+"")&&R(C,T)},d(N){N&&g(e),I&&I.d(),F=!1,de(M)}}}function un(l){let e,t,n,i=l[246].nodeTitle+"",s,a,r,u=l[111](l[246].nodeKind)+"",d,b,v,p,h=lt(l[246].lastActivityAt)+"",k,S,T,C,F=l[246].events&&an(l);function M(){return l[155](l[246])}function I(...D){return l[156](l[246],...D)}function L(D,H){return D[246].events&&D[246].events.length>0?Wa:Ua}let A=L(l),N=A(l);return{c(){e=f("div"),t=f("div"),n=f("span"),s=E(i),a=y(),r=f("span"),d=E(u),b=y(),F&&F.c(),v=y(),p=f("span"),k=E(h),S=y(),N.c(),o(n,"class","today-case-title svelte-6adx1u"),o(r,"class","today-case-type svelte-6adx1u"),o(p,"class","today-case-time svelte-6adx1u"),o(t,"class","today-case-header svelte-6adx1u"),o(t,"role","button"),o(t,"tabindex","0"),o(e,"class","today-case svelte-6adx1u")},m(D,H){w(D,e,H),c(e,t),c(t,n),c(n,s),c(t,a),c(t,r),c(r,d),c(t,b),F&&F.m(t,null),c(t,v),c(t,p),c(p,k),c(e,S),N.m(e,null),T||(C=[O(t,"click",M),O(t,"keydown",I)],T=!0)},p(D,H){l=D,H[0]&8&&i!==(i=l[246].nodeTitle+"")&&R(s,i),H[0]&8&&u!==(u=l[111](l[246].nodeKind)+"")&&R(d,u),l[246].events?F?F.p(l,H):(F=an(l),F.c(),F.m(t,v)):F&&(F.d(1),F=null),H[0]&8&&h!==(h=lt(l[246].lastActivityAt)+"")&&R(k,h),A===(A=L(l))&&N?N.p(l,H):(N.d(1),N=A(l),N&&(N.c(),N.m(e,null)))},d(D){D&&g(e),F&&F.d(),N.d(),T=!1,de(C)}}}function fn(l){let e,t,n,i=re(l[3].events),s=[];for(let a=0;a<i.length;a+=1)s[a]=dn(Pl(l,i,a));return{c(){e=f("div"),t=f("h3"),t.textContent=`${_("today.timeline")}`,n=y();for(let a=0;a<s.length;a+=1)s[a].c();o(t,"class","svelte-6adx1u"),o(e,"class","today-timeline svelte-6adx1u")},m(a,r){w(a,e,r),c(e,t),c(e,n);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(e,null)},p(a,r){if(r[0]&8|r[3]&16908288){i=re(a[3].events);let u;for(u=0;u<i.length;u+=1){const d=Pl(a,i,u);s[u]?s[u].p(d,r):(s[u]=dn(d),s[u].c(),s[u].m(e,null))}for(;u<s.length;u+=1)s[u].d(1);s.length=i.length}},d(a){a&&g(e),je(s,a)}}}function dn(l){let e,t,n,i,s=l[238].title+"",a,r,u,d=l[110](l[238].eventType)+"",b,v,p,h=lt(l[238].createdAt)+"",k,S,T,C;function F(){return l[159](l[238])}function M(...I){return l[160](l[238],...I)}return{c(){e=f("div"),t=f("span"),n=y(),i=f("span"),a=E(s),r=y(),u=f("span"),b=E(d),v=y(),p=f("span"),k=E(h),S=y(),o(t,"class","timeline-dot svelte-6adx1u"),o(i,"class","timeline-title svelte-6adx1u"),o(u,"class","timeline-type svelte-6adx1u"),o(p,"class","timeline-time svelte-6adx1u"),o(e,"class","timeline-event svelte-6adx1u"),o(e,"role","button"),o(e,"tabindex","0")},m(I,L){w(I,e,L),c(e,t),c(e,n),c(e,i),c(i,a),c(e,r),c(e,u),c(u,b),c(e,v),c(e,p),c(p,k),c(e,S),T||(C=[O(e,"click",F),O(e,"keydown",M)],T=!0)},p(I,L){l=I,L[0]&8&&s!==(s=l[238].title+"")&&R(a,s),L[0]&8&&d!==(d=l[110](l[238].eventType)+"")&&R(b,d),L[0]&8&&h!==(h=lt(l[238].createdAt)+"")&&R(k,h)},d(I){I&&g(e),T=!1,de(C)}}}function mn(l){let e,t=l[241].label+"",n,i,s;function a(){return l[129](l[241])}return{c(){e=f("button"),n=E(t),o(e,"class",ls(l[109](l[241].id))+" svelte-6adx1u")},m(r,u){w(r,e,u),c(e,n),i||(s=O(e,"click",a),i=!0)},p(r,u){l=r},d(r){r&&g(e),i=!1,s()}}}function Ka(l){let e;function t(s,a){return s[5].length===0?Qa:Za}let n=t(l),i=n(l);return{c(){e=f("div"),i.c(),o(e,"class","activity-tab svelte-6adx1u")},m(s,a){w(s,e,a),i.m(e,null)},p(s,a){n===(n=t(s))&&i?i.p(s,a):(i.d(1),i=n(s),i&&(i.c(),i.m(e,null)))},i:Z,o:Z,d(s){s&&g(e),i.d()}}}function qa(l){let e,t,n,i,s,a,r,u=_("worklog.log")+"",d,b,v,p,h;function k(C,F){return C[14].length===0?ec:$a}let S=k(l),T=S(l);return{c(){e=f("div"),t=f("div"),n=f("input"),i=y(),s=f("input"),a=y(),r=f("button"),d=E(u),v=y(),T.c(),o(n,"type","text"),o(n,"placeholder",_("worklog.whatDone")),o(n,"class","svelte-6adx1u"),o(s,"type","number"),o(s,"placeholder",_("worklog.minutes")),o(s,"min","1"),o(s,"class","svelte-6adx1u"),o(r,"class","btn btn-primary svelte-6adx1u"),r.disabled=b=!l[16].trim()||!l[15],o(t,"class","worklog-form svelte-6adx1u"),o(e,"class","worklog-tab svelte-6adx1u")},m(C,F){w(C,e,F),c(e,t),c(t,n),Ce(n,l[16]),c(t,i),c(t,s),Ce(s,l[15]),c(t,a),c(t,r),c(r,d),c(e,v),T.m(e,null),p||(h=[O(n,"input",l[153]),O(s,"input",l[154]),O(r,"click",l[103])],p=!0)},p(C,F){F[0]&65536&&n.value!==C[16]&&Ce(n,C[16]),F[0]&32768&&Et(s.value)!==C[15]&&Ce(s,C[15]),F[0]&98304&&b!==(b=!C[16].trim()||!C[15])&&(r.disabled=b),S===(S=k(C))&&T?T.p(C,F):(T.d(1),T=S(C),T&&(T.c(),T.m(e,null)))},i:Z,o:Z,d(C){C&&g(e),T.d(),p=!1,de(h)}}}function Ga(l){let e,t,n,i,s,a;function r(b,v){return b[13].length===0?lc:tc}let u=r(l),d=u(l);return{c(){e=f("div"),t=f("div"),n=f("button"),n.textContent=`${_("action.addAction")}`,i=y(),d.c(),o(n,"class","btn btn-primary svelte-6adx1u"),o(t,"class","tab-toolbar svelte-6adx1u"),o(e,"class","actions-tab svelte-6adx1u")},m(b,v){w(b,e,v),c(e,t),c(t,n),c(e,i),d.m(e,null),s||(a=O(n,"click",l[112]),s=!0)},p(b,v){u===(u=r(b))&&d?d.p(b,v):(d.d(1),d=u(b),d&&(d.c(),d.m(e,null)))},i:Z,o:Z,d(b){b&&g(e),d.d(),s=!1,a()}}}function Xa(l){let e,t,n,i=_("file.addFile")+"",s,a,r,u=_("file.addFolder")+"",d,b,v,p,h,k,S,T,C,F,M,I,L,A=l[41].items.length>0&&bn(l);const N=[ic,nc],D=[];function H(V,J){return V[33]?0:1}k=H(l),S=D[k]=N[k](l);let B=l[29]&&!l[31]&&yn(),x=l[37]&&gn(l);return{c(){e=f("div"),t=f("div"),n=f("button"),s=E(i),a=y(),r=f("button"),d=E(u),b=y(),v=f("button"),v.textContent=`${_("file.newFile")}`,p=y(),A&&A.c(),h=y(),S.c(),T=y(),B&&B.c(),C=y(),x&&x.c(),F=et(),o(n,"class","btn btn-primary svelte-6adx1u"),n.disabled=l[29],o(r,"class","btn svelte-6adx1u"),r.disabled=l[29],o(v,"class","btn svelte-6adx1u"),o(t,"class","tab-toolbar svelte-6adx1u"),o(e,"class","files-tab svelte-6adx1u")},m(V,J){w(V,e,J),c(e,t),c(t,n),c(n,s),c(t,a),c(t,r),c(r,d),c(t,b),c(t,v),c(t,p),A&&A.m(t,null),c(e,h),D[k].m(e,null),c(e,T),B&&B.m(e,null),w(V,C,J),x&&x.m(V,J),w(V,F,J),M=!0,I||(L=[O(n,"click",l[104]),O(r,"click",l[105]),O(v,"click",l[69])],I=!0)},p(V,J){(!M||J[0]&536870912)&&(n.disabled=V[29]),(!M||J[0]&536870912)&&(r.disabled=V[29]),V[41].items.length>0?A?A.p(V,J):(A=bn(V),A.c(),A.m(t,null)):A&&(A.d(1),A=null);let q=k;k=H(V),k===q?D[k].p(V,J):(Be(),le(D[q],1,1,()=>{D[q]=null}),He(),S=D[k],S?S.p(V,J):(S=D[k]=N[k](V),S.c()),Q(S,1),S.m(e,T)),V[29]&&!V[31]?B||(B=yn(),B.c(),B.m(e,null)):B&&(B.d(1),B=null),V[37]?x?(x.p(V,J),J[1]&64&&Q(x,1)):(x=gn(V),x.c(),Q(x,1),x.m(F.parentNode,F)):x&&(Be(),le(x,1,1,()=>{x=null}),He())},i(V){M||(Q(S),Q(x),M=!0)},o(V){le(S),le(x),M=!1},d(V){V&&(g(e),g(C),g(F)),A&&A.d(),D[k].d(),B&&B.d(),x&&x.d(V),I=!1,de(L)}}}function Ja(l){let e,t,n,i,s,a,r,u=l[22]&&wn(l);function d(p,h){return p[11].length===0&&!p[22]?uc:rc}let b=d(l),v=b(l);return{c(){e=f("div"),t=f("div"),n=f("button"),n.textContent=`${_("note.add")}`,i=y(),u&&u.c(),s=y(),v.c(),o(n,"class","btn btn-primary svelte-6adx1u"),o(t,"class","tab-toolbar svelte-6adx1u"),o(e,"class","notes-tab svelte-6adx1u")},m(p,h){w(p,e,h),c(e,t),c(t,n),c(e,i),u&&u.m(e,null),c(e,s),v.m(e,null),a||(r=O(n,"click",l[96]),a=!0)},p(p,h){p[22]?u?u.p(p,h):(u=wn(p),u.c(),u.m(e,s)):u&&(u.d(1),u=null),b===(b=d(p))&&v?v.p(p,h):(v.d(1),v=b(p),v&&(v.c(),v.m(e,null)))},i:Z,o:Z,d(p){p&&g(e),u&&u.d(),v.d(),a=!1,r()}}}function Ya(l){let e,t,n=l[9].title+"",i,s,a,r,u,d,b=l[9].type+"",v,p,h,k,S,T=(l[9].section||"—")+"",C,F,M,I,L,A=nt(l[9].createdAt)+"",N,D,H,B,x,V,J,q,X=_("overview.newNote")+"",z,Y,K,G,W,ye,Me=_("overview.addFile")+"",Ve,ce,ne,te,ie,se,Ae=_("overview.addAction")+"",Oe,Ye,De,pe,ee,be,Te,Ze=_("overview.logTime")+"",Qe,Ue,ge,We,Ie,we=l[11].length>0&&Sn(l),_e=l[14].length>0&&Nn(l);return{c(){e=f("div"),t=f("h2"),i=E(n),s=y(),a=f("div"),r=f("div"),u=f("span"),u.textContent=`${_("overview.type")}`,d=f("span"),v=E(b),p=y(),h=f("div"),k=f("span"),k.textContent=`${_("overview.section")}`,S=f("span"),C=E(T),F=y(),M=f("div"),I=f("span"),I.textContent=`${_("overview.created")}`,L=f("span"),N=E(A),D=y(),H=f("div"),B=f("button"),x=j("svg"),V=j("path"),J=j("path"),q=y(),z=E(X),Y=y(),K=f("button"),G=j("svg"),W=j("path"),ye=y(),Ve=E(Me),ce=y(),ne=f("button"),te=j("svg"),ie=j("polygon"),se=y(),Oe=E(Ae),Ye=y(),De=f("button"),pe=j("svg"),ee=j("circle"),be=j("polyline"),Te=y(),Qe=E(Ze),Ue=y(),we&&we.c(),ge=y(),_e&&_e.c(),o(t,"class","svelte-6adx1u"),o(u,"class","meta-label svelte-6adx1u"),o(d,"class","svelte-6adx1u"),o(r,"class","meta-item svelte-6adx1u"),o(k,"class","meta-label svelte-6adx1u"),o(S,"class","svelte-6adx1u"),o(h,"class","meta-item svelte-6adx1u"),o(I,"class","meta-label svelte-6adx1u"),o(L,"class","svelte-6adx1u"),o(M,"class","meta-item svelte-6adx1u"),o(a,"class","meta-grid svelte-6adx1u"),o(V,"d","M12 20h9"),o(V,"class","svelte-6adx1u"),o(J,"d","M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"),o(J,"class","svelte-6adx1u"),o(x,"width","16"),o(x,"height","16"),o(x,"viewBox","0 0 24 24"),o(x,"fill","none"),o(x,"stroke","currentColor"),o(x,"stroke-width","2"),o(x,"stroke-linecap","round"),o(x,"stroke-linejoin","round"),o(x,"class","svelte-6adx1u"),o(B,"class","qa-btn svelte-6adx1u"),o(W,"d","M21.44 11.05l-9.19 9.19a6 6 0 0 1-8.49-8.49l9.19-9.19a4 4 0 0 1 5.66 5.66l-9.2 9.19a2 2 0 0 1-2.83-2.83l8.49-8.48"),o(W,"class","svelte-6adx1u"),o(G,"width","16"),o(G,"height","16"),o(G,"viewBox","0 0 24 24"),o(G,"fill","none"),o(G,"stroke","currentColor"),o(G,"stroke-width","2"),o(G,"stroke-linecap","round"),o(G,"stroke-linejoin","round"),o(G,"class","svelte-6adx1u"),o(K,"class","qa-btn svelte-6adx1u"),o(ie,"points","13 2 3 14 12 14 11 22 21 10 12 10 13 2"),o(ie,"class","svelte-6adx1u"),o(te,"width","16"),o(te,"height","16"),o(te,"viewBox","0 0 24 24"),o(te,"fill","none"),o(te,"stroke","currentColor"),o(te,"stroke-width","2"),o(te,"stroke-linecap","round"),o(te,"stroke-linejoin","round"),o(te,"class","svelte-6adx1u"),o(ne,"class","qa-btn svelte-6adx1u"),o(ee,"cx","12"),o(ee,"cy","12"),o(ee,"r","10"),o(ee,"class","svelte-6adx1u"),o(be,"points","12 6 12 12 16 14"),o(be,"class","svelte-6adx1u"),o(pe,"width","16"),o(pe,"height","16"),o(pe,"viewBox","0 0 24 24"),o(pe,"fill","none"),o(pe,"stroke","currentColor"),o(pe,"stroke-width","2"),o(pe,"stroke-linecap","round"),o(pe,"stroke-linejoin","round"),o(pe,"class","svelte-6adx1u"),o(De,"class","qa-btn svelte-6adx1u"),o(H,"class","quick-actions svelte-6adx1u"),o(e,"class","overview svelte-6adx1u")},m(ae,ve){w(ae,e,ve),c(e,t),c(t,i),c(e,s),c(e,a),c(a,r),c(r,u),c(r,d),c(d,v),c(a,p),c(a,h),c(h,k),c(h,S),c(S,C),c(a,F),c(a,M),c(M,I),c(M,L),c(L,N),c(e,D),c(e,H),c(H,B),c(B,x),c(x,V),c(x,J),c(B,q),c(B,z),c(H,Y),c(H,K),c(K,G),c(G,W),c(K,ye),c(K,Ve),c(H,ce),c(H,ne),c(ne,te),c(te,ie),c(ne,se),c(ne,Oe),c(H,Ye),c(H,De),c(De,pe),c(pe,ee),c(pe,be),c(De,Te),c(De,Qe),c(e,Ue),we&&we.m(e,null),c(e,ge),_e&&_e.m(e,null),We||(Ie=[O(B,"click",l[130]),O(K,"click",l[131]),O(ne,"click",l[112]),O(De,"click",l[132])],We=!0)},p(ae,ve){ve[0]&512&&n!==(n=ae[9].title+"")&&R(i,n),ve[0]&512&&b!==(b=ae[9].type+"")&&R(v,b),ve[0]&512&&T!==(T=(ae[9].section||"—")+"")&&R(C,T),ve[0]&512&&A!==(A=nt(ae[9].createdAt)+"")&&R(N,A),ae[11].length>0?we?we.p(ae,ve):(we=Sn(ae),we.c(),we.m(e,ge)):we&&(we.d(1),we=null),ae[14].length>0?_e?_e.p(ae,ve):(_e=Nn(ae),_e.c(),_e.m(e,null)):_e&&(_e.d(1),_e=null)},i:Z,o:Z,d(ae){ae&&g(e),we&&we.d(),_e&&_e.d(),We=!1,de(Ie)}}}function Za(l){let e,t=re(l[5]),n=[];for(let i=0;i<t.length;i+=1)n[i]=_n(Bl(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();o(e,"class","activity-events svelte-6adx1u")},m(i,s){w(i,e,s);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,s){if(s[0]&32|s[3]&131072){t=re(i[5]);let a;for(a=0;a<t.length;a+=1){const r=Bl(i,t,a);n[a]?n[a].p(r,s):(n[a]=_n(r),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&g(e),je(n,i)}}}function Qa(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${_("activity.perCaseEmpty")}`,o(t,"class","svelte-6adx1u"),o(e,"class","empty-state svelte-6adx1u")},m(n,i){w(n,e,i),c(e,t)},p:Z,d(n){n&&g(e)}}}function pn(l){let e,t=l[238].targetType+"",n;return{c(){e=f("span"),n=E(t),o(e,"class","activity-event-target svelte-6adx1u")},m(i,s){w(i,e,s),c(e,n)},p(i,s){s[0]&32&&t!==(t=i[238].targetType+"")&&R(n,t)},d(i){i&&g(e)}}}function _n(l){let e,t,n=kt(l[238].eventType)+"",i,s,a,r=l[238].title+"",u,d,b,v=l[110](l[238].eventType)+"",p,h,k,S,T=lt(l[238].createdAt)+"",C,F,M=l[238].targetType&&pn(l);return{c(){e=f("div"),t=f("span"),i=E(n),s=y(),a=f("span"),u=E(r),d=y(),b=f("span"),p=E(v),h=y(),M&&M.c(),k=y(),S=f("span"),C=E(T),F=y(),o(t,"class","activity-event-icon svelte-6adx1u"),o(a,"class","activity-event-title svelte-6adx1u"),o(b,"class","activity-event-type svelte-6adx1u"),o(S,"class","activity-event-time svelte-6adx1u"),o(e,"class","activity-event svelte-6adx1u")},m(I,L){w(I,e,L),c(e,t),c(t,i),c(e,s),c(e,a),c(a,u),c(e,d),c(e,b),c(b,p),c(e,h),M&&M.m(e,null),c(e,k),c(e,S),c(S,C),c(e,F)},p(I,L){L[0]&32&&n!==(n=kt(I[238].eventType)+"")&&R(i,n),L[0]&32&&r!==(r=I[238].title+"")&&R(u,r),L[0]&32&&v!==(v=I[110](I[238].eventType)+"")&&R(p,v),I[238].targetType?M?M.p(I,L):(M=pn(I),M.c(),M.m(e,k)):M&&(M.d(1),M=null),L[0]&32&&T!==(T=lt(I[238].createdAt)+"")&&R(C,T)},d(I){I&&g(e),M&&M.d()}}}function $a(l){let e,t=re(l[14]),n=[];for(let i=0;i<t.length;i+=1)n[i]=vn(Hl(l,t,i));return{c(){for(let i=0;i<n.length;i+=1)n[i].c();e=et()},m(i,s){for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(i,s);w(i,e,s)},p(i,s){if(s[0]&16384){t=re(i[14]);let a;for(a=0;a<t.length;a+=1){const r=Hl(i,t,a);n[a]?n[a].p(r,s):(n[a]=vn(r),n[a].c(),n[a].m(e.parentNode,e))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&g(e),je(n,i)}}}function ec(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${_("worklog.empty")}`,o(t,"class","svelte-6adx1u"),o(e,"class","empty-state svelte-6adx1u")},m(n,i){w(n,e,i),c(e,t)},p:Z,d(n){n&&g(e)}}}function vn(l){let e,t,n=l[222].summary+"",i,s,a,r=l[222].minutes+"",u,d,b=_("worklog.min")+"",v,p,h=nt(l[222].createdAt)+"",k,S;return{c(){e=f("div"),t=f("div"),i=E(n),s=y(),a=f("div"),u=E(r),d=y(),v=E(b),p=E(" · "),k=E(h),S=y(),o(t,"class","svelte-6adx1u"),o(a,"class","wl-meta svelte-6adx1u"),o(e,"class","worklog-entry svelte-6adx1u")},m(T,C){w(T,e,C),c(e,t),c(t,i),c(e,s),c(e,a),c(a,u),c(a,d),c(a,v),c(a,p),c(a,k),c(e,S)},p(T,C){C[0]&16384&&n!==(n=T[222].summary+"")&&R(i,n),C[0]&16384&&r!==(r=T[222].minutes+"")&&R(u,r),C[0]&16384&&h!==(h=nt(T[222].createdAt)+"")&&R(k,h)},d(T){T&&g(e)}}}function tc(l){let e,t=re(l[13]),n=[];for(let i=0;i<t.length;i+=1)n[i]=hn(Rl(l,t,i));return{c(){for(let i=0;i<n.length;i+=1)n[i].c();e=et()},m(i,s){for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(i,s);w(i,e,s)},p(i,s){if(s[0]&8192|s[3]&12582912){t=re(i[13]);let a;for(a=0;a<t.length;a+=1){const r=Rl(i,t,a);n[a]?n[a].p(r,s):(n[a]=hn(r),n[a].c(),n[a].m(e.parentNode,e))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&g(e),je(n,i)}}}function lc(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${_("action.noActions")}`,o(t,"class","svelte-6adx1u"),o(e,"class","empty-state svelte-6adx1u")},m(n,i){w(n,e,i),c(e,t)},p:Z,d(n){n&&g(e)}}}function hn(l){let e,t,n,i=l[233].title+"",s,a,r,u=l[116](l[233].type)+"",d,b,v,p=l[233].data+"",h,k,S,T,C,F,M,I,L;function A(){return l[151](l[233])}function N(){return l[152](l[233])}return{c(){e=f("div"),t=f("div"),n=f("span"),s=E(i),a=y(),r=f("span"),d=E(u),b=y(),v=f("span"),h=E(p),k=y(),S=f("div"),T=f("button"),T.textContent=`${_("action.run")}`,C=y(),F=f("button"),F.innerHTML='<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" class="svelte-6adx1u"><polyline points="3 6 5 6 21 6" class="svelte-6adx1u"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" class="svelte-6adx1u"></path></svg>',M=y(),o(n,"class","action-title svelte-6adx1u"),o(r,"class","action-type svelte-6adx1u"),o(v,"class","action-data svelte-6adx1u"),o(t,"class","action-info svelte-6adx1u"),o(T,"class","btn btn-sm svelte-6adx1u"),o(F,"class","btn btn-sm btn-danger svelte-6adx1u"),o(S,"class","action-btns svelte-6adx1u"),o(e,"class","action-card svelte-6adx1u")},m(D,H){w(D,e,H),c(e,t),c(t,n),c(n,s),c(t,a),c(t,r),c(r,d),c(t,b),c(t,v),c(v,h),c(e,k),c(e,S),c(S,T),c(S,C),c(S,F),c(e,M),I||(L=[O(T,"click",A),O(F,"click",N)],I=!0)},p(D,H){l=D,H[0]&8192&&i!==(i=l[233].title+"")&&R(s,i),H[0]&8192&&u!==(u=l[116](l[233].type)+"")&&R(d,u),H[0]&8192&&p!==(p=l[233].data+"")&&R(h,p)},d(D){D&&g(e),I=!1,de(L)}}}function bn(l){let e,t=_("common.paste")+"",n,i,s=l[41].items.length+"",a,r,u;return{c(){e=f("button"),n=E(t),i=y(),a=E(s),o(e,"class","btn svelte-6adx1u")},m(d,b){w(d,e,b),c(e,n),c(e,i),c(e,a),r||(u=O(e,"click",l[74]),r=!0)},p(d,b){b[1]&1024&&s!==(s=d[41].items.length+"")&&R(a,s)},d(d){d&&g(e),r=!1,u()}}}function nc(l){let e,t,n,i,s,a,r;const u=[sc,oc],d=[];function b(k,S){return k[35].length>0?0:1}e=b(l),t=d[e]=u[e](l);const v=[cc,ac],p=[];function h(k,S){return k[36].length===0?0:1}return i=h(l),s=p[i]=v[i](l),{c(){t.c(),n=y(),s.c(),a=et()},m(k,S){d[e].m(k,S),w(k,n,S),p[i].m(k,S),w(k,a,S),r=!0},p(k,S){let T=e;e=b(k),e===T?d[e].p(k,S):(Be(),le(d[T],1,1,()=>{d[T]=null}),He(),t=d[e],t?t.p(k,S):(t=d[e]=u[e](k),t.c()),Q(t,1),t.m(n.parentNode,n));let C=i;i=h(k),i===C?p[i].p(k,S):(Be(),le(p[C],1,1,()=>{p[C]=null}),He(),s=p[i],s?s.p(k,S):(s=p[i]=v[i](k),s.c()),Q(s,1),s.m(a.parentNode,a))},i(k){r||(Q(t),Q(s),r=!0)},o(k){le(t),le(s),r=!1},d(k){k&&(g(n),g(a)),d[e].d(k),p[i].d(k)}}}function ic(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${_("common.loading")}`,o(t,"class","svelte-6adx1u"),o(e,"class","empty-state svelte-6adx1u")},m(n,i){w(n,e,i),c(e,t)},p:Z,i:Z,o:Z,d(n){n&&g(e)}}}function oc(l){let e,t;return e=new si({props:{crumbs:[{name:_("file.root")}]}}),{c(){Je(e.$$.fragment)},m(n,i){Ge(e,n,i),t=!0},p:Z,i(n){t||(Q(e.$$.fragment,n),t=!0)},o(n){le(e.$$.fragment,n),t=!1},d(n){Xe(e,n)}}}function sc(l){let e,t,n,i,s,a,r,u=_("common.back")+"",d,b,v,p;return e=new si({props:{crumbs:[{name:_("file.root")},...l[35]]}}),e.$on("navigate",l[137]),{c(){Je(e.$$.fragment),t=y(),n=f("button"),i=j("svg"),s=j("line"),a=j("polyline"),r=y(),d=E(u),o(s,"x1","19"),o(s,"y1","12"),o(s,"x2","5"),o(s,"y2","12"),o(s,"class","svelte-6adx1u"),o(a,"points","12 19 5 12 12 5"),o(a,"class","svelte-6adx1u"),o(i,"width","14"),o(i,"height","14"),o(i,"viewBox","0 0 24 24"),o(i,"fill","none"),o(i,"stroke","currentColor"),o(i,"stroke-width","2"),o(i,"stroke-linecap","round"),o(i,"stroke-linejoin","round"),o(i,"class","svelte-6adx1u"),o(n,"class","btn btn-sm back-btn svelte-6adx1u")},m(h,k){Ge(e,h,k),w(h,t,k),w(h,n,k),c(n,i),c(i,s),c(i,a),c(n,r),c(n,d),b=!0,v||(p=O(n,"click",l[65]),v=!0)},p(h,k){const S={};k[1]&16&&(S.crumbs=[{name:_("file.root")},...h[35]]),e.$set(S)},i(h){b||(Q(e.$$.fragment,h),b=!0)},o(h){le(e.$$.fragment,h),b=!1},d(h){h&&(g(t),g(n)),Xe(e,h),v=!1,p()}}}function ac(l){let e,t=[],n=new Map,i,s=re(l[36]);const a=r=>r[230].id;for(let r=0;r<s.length;r+=1){let u=Vl(l,s,r),d=a(u);n.set(d,t[r]=kn(d,u))}return{c(){e=f("div");for(let r=0;r<t.length;r+=1)t[r].c();o(e,"class","file-list svelte-6adx1u")},m(r,u){w(r,e,u);for(let d=0;d<t.length;d+=1)t[d]&&t[d].m(e,null);i=!0},p(r,u){u[1]&2080|u[2]&519972|u[3]&32768&&(s=re(r[36]),Be(),t=ds(t,u,a,1,r,s,n,e,fs,kn,null,Vl),He())},i(r){if(!i){for(let u=0;u<s.length;u+=1)Q(t[u]);i=!0}},o(r){for(let u=0;u<t.length;u+=1)le(t[u]);i=!1},d(r){r&&g(e);for(let u=0;u<t.length;u+=1)t[u].d()}}}function cc(l){let e,t,n,i,s=(l[35].length>0?_("file.noFiles"):_("file.noFilesCase"))+"",a,r,u,d,b,v,p,h,k,S;return{c(){e=f("div"),t=f("div"),t.innerHTML='<svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="svelte-6adx1u"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" class="svelte-6adx1u"></path><polyline points="14 2 14 8 20 8" class="svelte-6adx1u"></polyline></svg>',n=y(),i=f("p"),a=E(s),r=y(),u=f("p"),u.textContent=`${_("file.hint")}`,d=y(),b=f("div"),v=f("button"),v.textContent=`${_("file.addFileSimple")}`,p=y(),h=f("button"),h.textContent=`${_("file.addFolderSimple")}`,o(t,"class","empty-icon svelte-6adx1u"),o(i,"class","svelte-6adx1u"),o(u,"class","hint svelte-6adx1u"),o(v,"class","btn btn-primary svelte-6adx1u"),o(h,"class","btn svelte-6adx1u"),o(b,"class","empty-actions svelte-6adx1u"),o(e,"class","empty-state svelte-6adx1u")},m(T,C){w(T,e,C),c(e,t),c(e,n),c(e,i),c(i,a),c(e,r),c(e,u),c(e,d),c(e,b),c(b,v),c(b,p),c(b,h),k||(S=[O(v,"click",l[104]),O(h,"click",l[105])],k=!0)},p(T,C){C[1]&16&&s!==(s=(T[35].length>0?_("file.noFiles"):_("file.noFilesCase"))+"")&&R(a,s)},i:Z,o:Z,d(T){T&&g(e),k=!1,de(S)}}}function kn(l,e){let t,n,i;return n=new Ws({props:{item:e[230],selected:e[42].includes(e[230].id),onDragStart:e[78],onDragOver:e[79],onDrop:e[80]}}),n.$on("navigate",e[138]),n.$on("preview",e[139]),n.$on("openExternal",e[140]),n.$on("showInFolder",e[141]),n.$on("delete",e[142]),n.$on("rename",e[143]),n.$on("duplicate",e[144]),n.$on("cut",e[145]),n.$on("copy",e[146]),n.$on("selectOne",e[147]),n.$on("toggleSelect",e[148]),n.$on("rangeSelect",e[149]),{key:l,first:null,c(){t=et(),Je(n.$$.fragment),this.first=t},m(s,a){w(s,t,a),Ge(n,s,a),i=!0},p(s,a){e=s;const r={};a[1]&32&&(r.item=e[230]),a[1]&2080&&(r.selected=e[42].includes(e[230].id)),n.$set(r)},i(s){i||(Q(n.$$.fragment,s),i=!0)},o(s){le(n.$$.fragment,s),i=!1},d(s){s&&g(t),Xe(n,s)}}}function yn(l){let e,t;return{c(){e=f("div"),t=f("p"),t.textContent=`${_("file.scanning")}`,o(t,"class","svelte-6adx1u"),o(e,"class","empty-state svelte-6adx1u")},m(n,i){w(n,e,i),c(e,t)},d(n){n&&g(e)}}}function gn(l){let e,t;return e=new sa({props:{item:l[37],content:l[38],loading:l[39],error:l[40]}}),e.$on("close",l[68]),e.$on("openExternal",l[150]),{c(){Je(e.$$.fragment)},m(n,i){Ge(e,n,i),t=!0},p(n,i){const s={};i[1]&64&&(s.item=n[37]),i[1]&128&&(s.content=n[38]),i[1]&256&&(s.loading=n[39]),i[1]&512&&(s.error=n[40]),e.$set(s)},i(n){t||(Q(e.$$.fragment,n),t=!0)},o(n){le(e.$$.fragment,n),t=!1},d(n){Xe(e,n)}}}function wn(l){let e,t,n,i,s,a,r,u,d;return{c(){e=f("div"),t=f("input"),n=y(),i=f("div"),s=f("button"),s.textContent=`${_("common.create")}`,a=y(),r=f("button"),r.textContent=`${_("common.cancel")}`,o(t,"type","text"),o(t,"placeholder",_("note.title")),o(t,"class","svelte-6adx1u"),o(s,"class","btn btn-primary svelte-6adx1u"),o(r,"class","btn svelte-6adx1u"),o(i,"class","form-actions svelte-6adx1u"),o(e,"class","create-form svelte-6adx1u")},m(b,v){w(b,e,v),c(e,t),Ce(t,l[23]),c(e,n),c(e,i),c(i,s),c(i,a),c(i,r),u||(d=[O(t,"input",l[134]),O(t,"keydown",l[135]),O(s,"click",l[98]),O(r,"click",l[97])],u=!0)},p(b,v){v[0]&8388608&&t.value!==b[23]&&Ce(t,b[23])},d(b){b&&g(e),u=!1,de(d)}}}function rc(l){let e,t=re(l[11]),n=[];for(let i=0;i<t.length;i+=1)n[i]=Cn(Ul(l,t,i));return{c(){e=f("div");for(let i=0;i<n.length;i+=1)n[i].c();o(e,"class","notes-list svelte-6adx1u")},m(i,s){w(i,e,s);for(let a=0;a<n.length;a+=1)n[a]&&n[a].m(e,null)},p(i,s){if(s[0]&2048|s[3]&64){t=re(i[11]);let a;for(a=0;a<t.length;a+=1){const r=Ul(i,t,a);n[a]?n[a].p(r,s):(n[a]=Cn(r),n[a].c(),n[a].m(e,null))}for(;a<n.length;a+=1)n[a].d(1);n.length=t.length}},d(i){i&&g(e),je(n,i)}}}function uc(l){let e,t,n;return{c(){e=f("div"),t=f("p"),t.textContent=`${_("note.noNotes")}`,n=f("p"),n.textContent=`${_("note.createFirst")}`,o(t,"class","svelte-6adx1u"),o(n,"class","hint svelte-6adx1u"),o(e,"class","empty-state svelte-6adx1u")},m(i,s){w(i,e,s),c(e,t),c(e,n)},p:Z,d(i){i&&g(e)}}}function Cn(l){let e,t,n=l[225].title+"",i,s,a,r=nt(l[225].createdAt)+"",u,d,b,v;function p(){return l[136](l[225])}return{c(){e=f("div"),t=f("div"),i=E(n),s=y(),a=f("div"),u=E(r),d=y(),o(t,"class","note-card-title svelte-6adx1u"),o(a,"class","note-card-date svelte-6adx1u"),o(e,"class","note-card svelte-6adx1u")},m(h,k){w(h,e,k),c(e,t),c(t,i),c(e,s),c(e,a),c(a,u),c(e,d),b||(v=O(e,"click",p),b=!0)},p(h,k){l=h,k[0]&2048&&n!==(n=l[225].title+"")&&R(i,n),k[0]&2048&&r!==(r=nt(l[225].createdAt)+"")&&R(u,r)},d(h){h&&g(e),b=!1,v()}}}function Sn(l){let e,t,n,i=re(l[11].slice(0,5)),s=[];for(let a=0;a<i.length;a+=1)s[a]=Tn(Kl(l,i,a));return{c(){e=f("div"),t=f("h3"),t.textContent=`${_("overview.recentNotes")}`,n=y();for(let a=0;a<s.length;a+=1)s[a].c();o(t,"class","svelte-6adx1u"),o(e,"class","recent-section svelte-6adx1u")},m(a,r){w(a,e,r),c(e,t),c(e,n);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(e,null)},p(a,r){if(r[0]&2048|r[3]&64){i=re(a[11].slice(0,5));let u;for(u=0;u<i.length;u+=1){const d=Kl(a,i,u);s[u]?s[u].p(d,r):(s[u]=Tn(d),s[u].c(),s[u].m(e,null))}for(;u<s.length;u+=1)s[u].d(1);s.length=i.length}},d(a){a&&g(e),je(s,a)}}}function Tn(l){let e,t,n=l[225].title+"",i,s,a=nt(l[225].createdAt)+"",r,u,d,b;function v(){return l[133](l[225])}return{c(){e=f("div"),t=f("span"),i=E(n),s=f("span"),r=E(a),u=y(),o(t,"class","svelte-6adx1u"),o(s,"class","recent-date svelte-6adx1u"),o(e,"class","recent-note svelte-6adx1u")},m(p,h){w(p,e,h),c(e,t),c(t,i),c(e,s),c(s,r),c(e,u),d||(b=O(e,"click",v),d=!0)},p(p,h){l=p,h[0]&2048&&n!==(n=l[225].title+"")&&R(i,n),h[0]&2048&&a!==(a=nt(l[225].createdAt)+"")&&R(r,a)},d(p){p&&g(e),d=!1,b()}}}function Nn(l){let e,t,n,i=re(l[14].slice(0,3)),s=[];for(let a=0;a<i.length;a+=1)s[a]=Fn(Wl(l,i,a));return{c(){e=f("div"),t=f("h3"),t.textContent=`${_("overview.recentEntries")}`,n=y();for(let a=0;a<s.length;a+=1)s[a].c();o(t,"class","svelte-6adx1u"),o(e,"class","recent-section svelte-6adx1u")},m(a,r){w(a,e,r),c(e,t),c(e,n);for(let u=0;u<s.length;u+=1)s[u]&&s[u].m(e,null)},p(a,r){if(r[0]&16384){i=re(a[14].slice(0,3));let u;for(u=0;u<i.length;u+=1){const d=Wl(a,i,u);s[u]?s[u].p(d,r):(s[u]=Fn(d),s[u].c(),s[u].m(e,null))}for(;u<s.length;u+=1)s[u].d(1);s.length=i.length}},d(a){a&&g(e),je(s,a)}}}function Fn(l){let e,t=l[222].summary+"",n,i,s=l[222].minutes+"",a,r,u=_("worklog.min")+"",d,b;return{c(){e=f("div"),n=E(t),i=E(" ("),a=E(s),r=y(),d=E(u),b=E(")"),o(e,"class","recent-entry svelte-6adx1u")},m(v,p){w(v,e,p),c(e,n),c(e,i),c(e,a),c(e,r),c(e,d),c(e,b)},p(v,p){p[0]&16384&&t!==(t=v[222].summary+"")&&R(n,t),p[0]&16384&&s!==(s=v[222].minutes+"")&&R(a,s)},d(v){v&&g(e)}}}function In(l){let e;return{c(){e=f("span"),e.textContent="●",o(e,"class","dirty-mark svelte-6adx1u")},m(t,n){w(t,e,n)},d(t){t&&g(e)}}}function Mn(l){let e,t,n,i=(l[19]?_("nav.createInside"):_("case.new"))+"",s,a,r,u,d,b,v,p,h,k,S,T,C,F,M,I,L,A,N,D,H,B,x,V,J,q=l[19]&&An(l);h=new Pt({props:{kind:"folder",size:22}});let X=re(l[2]),z=[];for(let K=0;K<X.length;K+=1)z[K]=Dn(xl(l,X,K));const Y=K=>le(z[K],1,1,()=>{z[K]=null});return{c(){e=f("div"),t=f("div"),n=f("h3"),s=E(i),a=y(),q&&q.c(),r=y(),u=f("div"),d=f("label"),d.textContent=`${_("template.select")}`,b=y(),v=f("div"),p=f("button"),Je(h.$$.fragment),k=y(),S=f("span"),S.textContent=`${_("template.optionNone")}`,T=y();for(let K=0;K<z.length;K+=1)z[K].c();C=y(),F=f("div"),M=f("label"),M.textContent=`${_("common.name")}`,I=y(),L=f("input"),A=y(),N=f("div"),D=f("button"),D.textContent=`${_("common.create")}`,H=y(),B=f("button"),B.textContent=`${_("common.cancel")}`,o(n,"class","svelte-6adx1u"),o(d,"class","svelte-6adx1u"),o(S,"class","svelte-6adx1u"),o(p,"class","template-card svelte-6adx1u"),tt(p,"selected",!l[20]),o(v,"class","template-cards svelte-6adx1u"),o(u,"class","form-group svelte-6adx1u"),o(M,"class","svelte-6adx1u"),o(L,"type","text"),o(L,"placeholder",_("case.namePlaceholder")),L.autofocus=!0,o(L,"class","svelte-6adx1u"),o(F,"class","form-group svelte-6adx1u"),o(D,"class","btn btn-primary svelte-6adx1u"),o(B,"class","btn svelte-6adx1u"),o(N,"class","modal-actions svelte-6adx1u"),o(t,"class","modal svelte-6adx1u"),o(e,"class","modal-overlay svelte-6adx1u")},m(K,G){w(K,e,G),c(e,t),c(t,n),c(n,s),c(t,a),q&&q.m(t,null),c(t,r),c(t,u),c(u,d),c(u,b),c(u,v),c(v,p),Ge(h,p,null),c(p,k),c(p,S),c(v,T);for(let W=0;W<z.length;W+=1)z[W]&&z[W].m(v,null);c(t,C),c(t,F),c(F,M),c(F,I),c(F,L),Ce(L,l[18]),c(t,A),c(t,N),c(N,D),c(N,H),c(N,B),x=!0,L.focus(),V||(J=[O(p,"click",l[163]),O(L,"input",l[165]),O(L,"keydown",l[166]),O(D,"click",l[89]),O(B,"click",l[88]),O(e,"click",dt(l[88]))],V=!0)},p(K,G){if((!x||G[0]&524288)&&i!==(i=(K[19]?_("nav.createInside"):_("case.new"))+"")&&R(s,i),K[19]?q?q.p(K,G):(q=An(K),q.c(),q.m(t,r)):q&&(q.d(1),q=null),(!x||G[0]&1048576)&&tt(p,"selected",!K[20]),G[0]&1048580){X=re(K[2]);let W;for(W=0;W<X.length;W+=1){const ye=xl(K,X,W);z[W]?(z[W].p(ye,G),Q(z[W],1)):(z[W]=Dn(ye),z[W].c(),Q(z[W],1),z[W].m(v,null))}for(Be(),W=X.length;W<z.length;W+=1)Y(W);He()}G[0]&262144&&L.value!==K[18]&&Ce(L,K[18])},i(K){if(!x){Q(h.$$.fragment,K);for(let G=0;G<X.length;G+=1)Q(z[G]);x=!0}},o(K){le(h.$$.fragment,K),z=z.filter(Boolean);for(let G=0;G<z.length;G+=1)le(z[G]);x=!1},d(K){K&&g(e),q&&q.d(),Xe(h),je(z,K),V=!1,de(J)}}}function An(l){let e,t=_("nav.createInside")+"",n,i,s=l[19].title+"",a,r;return{c(){e=f("div"),n=E(t),i=E(" «"),a=E(s),r=E("»"),o(e,"class","create-context svelte-6adx1u")},m(u,d){w(u,e,d),c(e,n),c(e,i),c(e,a),c(e,r)},p(u,d){d[0]&524288&&s!==(s=u[19].title+"")&&R(a,s)},d(u){u&&g(e)}}}function Dn(l){let e,t,n,i,s=_(l[217].title)+"",a,r,u,d,b;t=new Pt({props:{kind:l[217].icon||"generic",size:22}});function v(){return l[164](l[217])}return{c(){var p;e=f("button"),Je(t.$$.fragment),n=y(),i=f("span"),a=E(s),r=y(),o(i,"class","svelte-6adx1u"),o(e,"class","template-card svelte-6adx1u"),tt(e,"selected",((p=l[20])==null?void 0:p.id)===l[217].id)},m(p,h){w(p,e,h),Ge(t,e,null),c(e,n),c(e,i),c(i,a),c(e,r),u=!0,d||(b=O(e,"click",v),d=!0)},p(p,h){var S;l=p;const k={};h[0]&4&&(k.kind=l[217].icon||"generic"),t.$set(k),(!u||h[0]&4)&&s!==(s=_(l[217].title)+"")&&R(a,s),(!u||h[0]&1048580)&&tt(e,"selected",((S=l[20])==null?void 0:S.id)===l[217].id)},i(p){u||(Q(t.$$.fragment,p),u=!0)},o(p){le(t.$$.fragment,p),u=!1},d(p){p&&g(e),Xe(t),d=!1,b()}}}function En(l){let e,t,n,i,s,a,r,u,d,b,v,p=l[21].node&&Ln(l);return{c(){e=f("div"),t=f("div"),p&&p.c(),n=y(),i=f("button"),i.textContent=`${_("common.rename")}`,s=y(),a=f("button"),a.textContent=`${_("common.delete")}`,r=y(),u=f("button"),u.textContent=`${_("nav.openFolder")}`,o(i,"class","context-menu-item svelte-6adx1u"),o(a,"class","context-menu-item danger svelte-6adx1u"),o(u,"class","context-menu-item svelte-6adx1u"),o(t,"class","context-menu svelte-6adx1u"),Re(t,"left",l[21].x+"px"),Re(t,"top",l[21].y+"px"),o(e,"class","context-menu-backdrop svelte-6adx1u")},m(h,k){w(h,e,k),c(e,t),p&&p.m(t,null),c(t,n),c(t,i),c(t,s),c(t,a),c(t,r),c(t,u),d=!0,b||(v=[O(i,"click",l[168]),O(a,"click",l[169]),O(u,"click",l[170]),O(e,"click",l[91]),O(e,"contextmenu",Mt(l[91]))],b=!0)},p(h,k){h[21].node?p?(p.p(h,k),k[0]&2097152&&Q(p,1)):(p=Ln(h),p.c(),Q(p,1),p.m(t,n)):p&&(Be(),le(p,1,1,()=>{p=null}),He()),(!d||k[0]&2097152)&&Re(t,"left",h[21].x+"px"),(!d||k[0]&2097152)&&Re(t,"top",h[21].y+"px")},i(h){d||(Q(p),d=!0)},o(h){le(p),d=!1},d(h){h&&g(e),p&&p.d(),b=!1,de(v)}}}function Ln(l){let e,t,n,i,s,a=re(l[2].length>0?l[2]:[{id:"",title:"template.optionNone",icon:"folder"}]),r=[];for(let d=0;d<a.length;d+=1)r[d]=xn(Ll(l,a,d));const u=d=>le(r[d],1,1,()=>{r[d]=null});return{c(){e=f("div"),e.textContent=`${_("common.create")}`,t=y();for(let d=0;d<r.length;d+=1)r[d].c();n=y(),i=f("div"),o(e,"class","context-menu-section svelte-6adx1u"),o(i,"class","context-menu-divider svelte-6adx1u")},m(d,b){w(d,e,b),w(d,t,b);for(let v=0;v<r.length;v+=1)r[v]&&r[v].m(d,b);w(d,n,b),w(d,i,b),s=!0},p(d,b){if(b[0]&4|b[2]&16777216){a=re(d[2].length>0?d[2]:[{id:"",title:"template.optionNone",icon:"folder"}]);let v;for(v=0;v<a.length;v+=1){const p=Ll(d,a,v);r[v]?(r[v].p(p,b),Q(r[v],1)):(r[v]=xn(p),r[v].c(),Q(r[v],1),r[v].m(n.parentNode,n))}for(Be(),v=a.length;v<r.length;v+=1)u(v);He()}},i(d){if(!s){for(let b=0;b<a.length;b+=1)Q(r[b]);s=!0}},o(d){r=r.filter(Boolean);for(let b=0;b<r.length;b+=1)le(r[b]);s=!1},d(d){d&&(g(e),g(t),g(n),g(i)),je(r,d)}}}function xn(l){let e,t,n,i,s=_(l[217].title)+"",a,r,u,d;t=new Pt({props:{kind:l[217].icon||"folder",size:16}});function b(){return l[167](l[217])}return{c(){e=f("button"),Je(t.$$.fragment),n=y(),i=f("span"),a=E(s),o(i,"class","svelte-6adx1u"),o(e,"class","context-menu-item svelte-6adx1u")},m(v,p){w(v,e,p),Ge(t,e,null),c(e,n),c(e,i),c(i,a),r=!0,u||(d=O(e,"click",b),u=!0)},p(v,p){l=v;const h={};p[0]&4&&(h.kind=l[217].icon||"folder"),t.$set(h),(!r||p[0]&4)&&s!==(s=_(l[217].title)+"")&&R(a,s)},i(v){r||(Q(t.$$.fragment,v),r=!0)},o(v){le(t.$$.fragment,v),r=!1},d(v){v&&g(e),Xe(t),u=!1,d()}}}function jn(l){let e,t,n,i,s,a,r,u,d,b,v,p,h,k,S,T,C=(l[26]==="open_url"?_("action.dataUrl"):l[26]==="open_folder"||l[26]==="open_file"?_("action.dataPath"):_("action.dataCommand"))+"",F,M,I,L,A,N,D,H,B,x,V,J=re(l[59]),q=[];for(let X=0;X<J.length;X+=1)q[X]=Pn(El(l,J,X));return{c(){e=f("div"),t=f("div"),n=f("h3"),n.textContent=`${_("action.newAction")}`,i=y(),s=f("div"),a=f("label"),a.textContent=`${_("common.name")}`,r=y(),u=f("input"),d=y(),b=f("div"),v=f("label"),v.textContent=`${_("common.type")}`,p=y(),h=f("select");for(let X=0;X<q.length;X+=1)q[X].c();k=y(),S=f("div"),T=f("label"),F=E(C),M=y(),I=f("input"),A=y(),N=f("div"),D=f("button"),D.textContent=`${_("common.create")}`,H=y(),B=f("button"),B.textContent=`${_("common.cancel")}`,o(n,"class","svelte-6adx1u"),o(a,"class","svelte-6adx1u"),o(u,"type","text"),o(u,"placeholder",_("action.namePlaceholder")),u.autofocus=!0,o(u,"class","svelte-6adx1u"),o(s,"class","form-group svelte-6adx1u"),o(v,"class","svelte-6adx1u"),o(h,"class","svelte-6adx1u"),l[26]===void 0&&Lt(()=>l[173].call(h)),o(b,"class","form-group svelte-6adx1u"),o(T,"class","svelte-6adx1u"),o(I,"type","text"),o(I,"placeholder",L=l[26]==="open_url"?_("action.urlPlaceholder"):l[26]==="open_folder"||l[26]==="open_file"?_("action.pathPlaceholder"):_("action.commandPlaceholder")),o(I,"class","svelte-6adx1u"),o(S,"class","form-group svelte-6adx1u"),o(D,"class","btn btn-primary svelte-6adx1u"),o(B,"class","btn svelte-6adx1u"),o(N,"class","modal-actions svelte-6adx1u"),o(t,"class","modal svelte-6adx1u"),o(e,"class","modal-overlay svelte-6adx1u")},m(X,z){w(X,e,z),c(e,t),c(t,n),c(t,i),c(t,s),c(s,a),c(s,r),c(s,u),Ce(u,l[25]),c(t,d),c(t,b),c(b,v),c(b,p),c(b,h);for(let Y=0;Y<q.length;Y+=1)q[Y]&&q[Y].m(h,null);kl(h,l[26],!0),c(t,k),c(t,S),c(S,T),c(T,F),c(S,M),c(S,I),Ce(I,l[27]),c(t,A),c(t,N),c(N,D),c(N,H),c(N,B),u.focus(),x||(V=[O(u,"input",l[171]),O(u,"keydown",l[172]),O(h,"change",l[173]),O(I,"input",l[174]),O(I,"keydown",l[175]),O(D,"click",l[114]),O(B,"click",l[113]),O(e,"click",dt(l[113]))],x=!0)},p(X,z){if(z[0]&33554432&&u.value!==X[25]&&Ce(u,X[25]),z[1]&268435456){J=re(X[59]);let Y;for(Y=0;Y<J.length;Y+=1){const K=El(X,J,Y);q[Y]?q[Y].p(K,z):(q[Y]=Pn(K),q[Y].c(),q[Y].m(h,null))}for(;Y<q.length;Y+=1)q[Y].d(1);q.length=J.length}z[0]&67108864|z[1]&268435456&&kl(h,X[26]),z[0]&67108864&&C!==(C=(X[26]==="open_url"?_("action.dataUrl"):X[26]==="open_folder"||X[26]==="open_file"?_("action.dataPath"):_("action.dataCommand"))+"")&&R(F,C),z[0]&67108864|z[1]&268435456&&L!==(L=X[26]==="open_url"?_("action.urlPlaceholder"):X[26]==="open_folder"||X[26]==="open_file"?_("action.pathPlaceholder"):_("action.commandPlaceholder"))&&o(I,"placeholder",L),z[0]&134217728&&I.value!==X[27]&&Ce(I,X[27])},d(X){X&&g(e),je(q,X),x=!1,de(V)}}}function Pn(l){let e,t=l[214].label+"",n;return{c(){e=f("option"),n=E(t),e.__value=l[214].id,Ce(e,e.__value),o(e,"class","svelte-6adx1u")},m(i,s){w(i,e,s),c(e,n)},p:Z,d(i){i&&g(e)}}}function On(l){let e,t,n,i=_("file.importTitle")+"",s,a,r=(l[9]?l[9].title:"")+"",u,d,b,v,p,h,k,S=l[30].files+"",T,C,F,M,I,L=l[30].folders+"",A,N,D,H,B,x=(l[30].totalBytes/1024).toFixed(1)+"",V,J,q,X,z,Y,K,G,W,ye,Me,Ve,ce=l[30].isDangerous&&zn(l);return{c(){e=f("div"),t=f("div"),n=f("h3"),s=E(i),a=E(" «"),u=E(r),d=E("»"),b=y(),v=f("div"),p=f("div"),h=f("span"),h.textContent=`${_("file.importFiles")}`,k=f("span"),T=E(S),C=y(),F=f("div"),M=f("span"),M.textContent=`${_("file.importFolders")}`,I=f("span"),A=E(L),N=y(),D=f("div"),H=f("span"),H.textContent=`${_("file.importSize")}`,B=f("span"),V=E(x),J=E(" KB"),q=y(),ce&&ce.c(),X=y(),z=f("div"),Y=f("button"),Y.textContent=`${_("file.importCopy")}`,K=y(),G=f("button"),G.textContent=`${_("file.importLink")}`,W=y(),ye=f("button"),ye.textContent=`${_("common.cancel")}`,o(n,"class","svelte-6adx1u"),o(h,"class","svelte-6adx1u"),o(k,"class","svelte-6adx1u"),o(p,"class","summary-row svelte-6adx1u"),o(M,"class","svelte-6adx1u"),o(I,"class","svelte-6adx1u"),o(F,"class","summary-row svelte-6adx1u"),o(H,"class","svelte-6adx1u"),o(B,"class","svelte-6adx1u"),o(D,"class","summary-row svelte-6adx1u"),o(v,"class","import-summary svelte-6adx1u"),o(Y,"class","btn btn-primary svelte-6adx1u"),o(G,"class","btn svelte-6adx1u"),o(ye,"class","btn svelte-6adx1u"),o(z,"class","modal-actions svelte-6adx1u"),o(t,"class","modal svelte-6adx1u"),o(e,"class","modal-overlay svelte-6adx1u")},m(ne,te){w(ne,e,te),c(e,t),c(t,n),c(n,s),c(n,a),c(n,u),c(n,d),c(t,b),c(t,v),c(v,p),c(p,h),c(p,k),c(k,T),c(v,C),c(v,F),c(F,M),c(F,I),c(I,A),c(v,N),c(v,D),c(D,H),c(D,B),c(B,V),c(B,J),c(v,q),ce&&ce.m(v,null),c(t,X),c(t,z),c(z,Y),c(z,K),c(z,G),c(z,W),c(z,ye),Me||(Ve=[O(Y,"click",l[176]),O(G,"click",l[177]),O(ye,"click",l[107]),O(e,"click",dt(l[107]))],Me=!0)},p(ne,te){te[0]&512&&r!==(r=(ne[9]?ne[9].title:"")+"")&&R(u,r),te[0]&1073741824&&S!==(S=ne[30].files+"")&&R(T,S),te[0]&1073741824&&L!==(L=ne[30].folders+"")&&R(A,L),te[0]&1073741824&&x!==(x=(ne[30].totalBytes/1024).toFixed(1)+"")&&R(V,x),ne[30].isDangerous?ce?ce.p(ne,te):(ce=zn(ne),ce.c(),ce.m(v,null)):ce&&(ce.d(1),ce=null)},d(ne){ne&&g(e),ce&&ce.d(),Me=!1,de(Ve)}}}function zn(l){let e,t,n,i,s,a,r=l[30].dangerReason+"",u;return{c(){e=f("div"),t=j("svg"),n=j("path"),i=j("line"),s=j("line"),a=y(),u=E(r),o(n,"d","M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"),o(n,"class","svelte-6adx1u"),o(i,"x1","12"),o(i,"y1","9"),o(i,"x2","12"),o(i,"y2","13"),o(i,"class","svelte-6adx1u"),o(s,"x1","12"),o(s,"y1","17"),o(s,"x2","12.01"),o(s,"y2","17"),o(s,"class","svelte-6adx1u"),o(t,"width","14"),o(t,"height","14"),o(t,"viewBox","0 0 24 24"),o(t,"fill","none"),o(t,"stroke","currentColor"),o(t,"stroke-width","2"),o(t,"stroke-linecap","round"),o(t,"stroke-linejoin","round"),o(t,"class","svelte-6adx1u"),o(e,"class","summary-warn svelte-6adx1u")},m(d,b){w(d,e,b),c(e,t),c(t,n),c(t,i),c(t,s),c(e,a),c(e,u)},p(d,b){b[0]&1073741824&&r!==(r=d[30].dangerReason+"")&&R(u,r)},d(d){d&&g(e)}}}function Bn(l){let e,t,n,i,s,a,r,u,d,b,v,p,h,k,S,T,C=l[50]&&Hn(l);return{c(){e=f("div"),t=f("div"),n=f("h3"),n.textContent=`${_("rename.title")}`,i=y(),s=f("div"),a=f("label"),a.textContent=`${_("common.newName")}`,r=y(),u=f("input"),d=y(),C&&C.c(),b=y(),v=f("div"),p=f("button"),p.textContent=`${_("common.rename")}`,h=y(),k=f("button"),k.textContent=`${_("common.cancel")}`,o(n,"class","svelte-6adx1u"),o(a,"class","svelte-6adx1u"),o(u,"type","text"),o(u,"class","svelte-6adx1u"),o(s,"class","form-group svelte-6adx1u"),o(p,"class","btn btn-primary svelte-6adx1u"),o(k,"class","btn svelte-6adx1u"),o(v,"class","modal-actions svelte-6adx1u"),o(t,"class","modal svelte-6adx1u"),o(e,"class","modal-overlay svelte-6adx1u")},m(F,M){w(F,e,M),c(e,t),c(t,n),c(t,i),c(t,s),c(s,a),c(s,r),c(s,u),Ce(u,l[49]),c(t,d),C&&C.m(t,null),c(t,b),c(t,v),c(v,p),c(v,h),c(v,k),S||(T=[O(u,"input",l[178]),O(u,"keydown",l[83]),O(p,"click",l[81]),O(k,"click",l[82]),O(e,"click",dt(l[82]))],S=!0)},p(F,M){M[1]&262144&&u.value!==F[49]&&Ce(u,F[49]),F[50]?C?C.p(F,M):(C=Hn(F),C.c(),C.m(t,b)):C&&(C.d(1),C=null)},d(F){F&&g(e),C&&C.d(),S=!1,de(T)}}}function Hn(l){let e,t;return{c(){e=f("div"),t=E(l[50]),o(e,"class","rename-error svelte-6adx1u")},m(n,i){w(n,e,i),c(e,t)},p(n,i){i[1]&524288&&R(t,n[50])},d(n){n&&g(e)}}}function Rn(l){let e,t;return e=new ra({props:{title:l[44],message:l[45],confirmText:l[47],danger:l[46]}}),e.$on("confirm",l[84]),e.$on("cancel",l[85]),{c(){Je(e.$$.fragment)},m(n,i){Ge(e,n,i),t=!0},p(n,i){const s={};i[1]&8192&&(s.title=n[44]),i[1]&16384&&(s.message=n[45]),i[1]&65536&&(s.confirmText=n[47]),i[1]&32768&&(s.danger=n[46]),e.$set(s)},i(n){t||(Q(e.$$.fragment,n),t=!0)},o(n){le(e.$$.fragment,n),t=!1},d(n){Xe(e,n)}}}function Vn(l){let e,t,n,i,s,a,r,u,d,b,v,p,h,k=_("sync.saveInterval")+"",S,T,C,F,M,I,L,A=l[52]&&Un(l);function N(x,V){var J;return(J=x[52])!=null&&J.configured?vc:_c}let D=N(l),H=D(l),B=l[58]&&Xn(l);return{c(){e=f("div"),t=f("div"),n=f("h3"),n.textContent=`${_("sync.settings")}`,i=y(),A&&A.c(),s=y(),H.c(),a=y(),r=f("div"),u=f("div"),d=f("label"),d.textContent=`${_("sync.autoSync")}`,b=y(),v=f("input"),p=y(),h=f("button"),S=E(k),T=y(),B&&B.c(),C=y(),F=f("div"),M=f("button"),M.textContent=`${_("common.close")}`,o(n,"class","svelte-6adx1u"),o(d,"class","svelte-6adx1u"),o(v,"type","number"),o(v,"placeholder","0"),o(v,"min","0"),o(v,"class","svelte-6adx1u"),o(u,"class","form-group svelte-6adx1u"),o(h,"class","btn svelte-6adx1u"),h.disabled=l[53],Re(r,"margin-top","16px"),Re(r,"padding-top","16px"),Re(r,"border-top","1px solid #2a2a3c"),o(r,"class","svelte-6adx1u"),o(M,"class","btn svelte-6adx1u"),o(F,"class","modal-actions svelte-6adx1u"),Re(F,"margin-top","12px"),o(t,"class","modal modal-sync svelte-6adx1u"),o(e,"class","modal-overlay svelte-6adx1u")},m(x,V){w(x,e,V),c(e,t),c(t,n),c(t,i),A&&A.m(t,null),c(t,s),H.m(t,null),c(t,a),c(t,r),c(r,u),c(u,d),c(u,b),c(u,v),Ce(v,l[57]),c(r,p),c(r,h),c(h,S),c(t,T),B&&B.m(t,null),c(t,C),c(t,F),c(F,M),I||(L=[O(v,"input",l[182]),O(h,"click",l[121]),O(M,"click",l[119]),O(e,"click",dt(l[119]))],I=!0)},p(x,V){x[52]?A?A.p(x,V):(A=Un(x),A.c(),A.m(t,s)):A&&(A.d(1),A=null),D===(D=N(x))&&H?H.p(x,V):(H.d(1),H=D(x),H&&(H.c(),H.m(t,a))),V[1]&67108864&&Et(v.value)!==x[57]&&Ce(v,x[57]),V[1]&4194304&&(h.disabled=x[53]),x[58]?B?B.p(x,V):(B=Xn(x),B.c(),B.m(t,C)):B&&(B.d(1),B=null)},d(x){x&&g(e),A&&A.d(),H.d(),B&&B.d(),I=!1,de(L)}}}function Un(l){let e,t,n,i,s,a,r,u,d,b,v,p,h=l[52].unpushedOps+"",k,S;function T(N,D){return N[52].revoked?pc:N[52].connected?mc:N[52].configured?dc:fc}let C=T(l),F=C(l),M=l[52].serverUrl&&Wn(l),I=l[52].deviceName&&Kn(l),L=l[52].deviceId&&!l[52].deviceName&&qn(l),A=l[52].lastSyncAt&&Gn(l);return{c(){e=f("div"),t=f("div"),n=f("span"),n.textContent=`${_("sync.status")}`,i=y(),s=f("span"),F.c(),a=y(),M&&M.c(),r=y(),I&&I.c(),u=y(),L&&L.c(),d=y(),b=f("div"),v=f("span"),v.textContent=`${_("sync.unpushed")}`,p=f("span"),k=E(h),S=y(),A&&A.c(),o(n,"class","sync-label svelte-6adx1u"),o(s,"class","sync-value svelte-6adx1u"),o(t,"class","sync-row svelte-6adx1u"),o(v,"class","sync-label svelte-6adx1u"),o(p,"class","sync-value svelte-6adx1u"),o(b,"class","sync-row svelte-6adx1u"),o(e,"class","sync-status svelte-6adx1u")},m(N,D){w(N,e,D),c(e,t),c(t,n),c(t,i),c(t,s),F.m(s,null),c(e,a),M&&M.m(e,null),c(e,r),I&&I.m(e,null),c(e,u),L&&L.m(e,null),c(e,d),c(e,b),c(b,v),c(b,p),c(p,k),c(e,S),A&&A.m(e,null)},p(N,D){C!==(C=T(N))&&(F.d(1),F=C(N),F&&(F.c(),F.m(s,null))),N[52].serverUrl?M?M.p(N,D):(M=Wn(N),M.c(),M.m(e,r)):M&&(M.d(1),M=null),N[52].deviceName?I?I.p(N,D):(I=Kn(N),I.c(),I.m(e,u)):I&&(I.d(1),I=null),N[52].deviceId&&!N[52].deviceName?L?L.p(N,D):(L=qn(N),L.c(),L.m(e,d)):L&&(L.d(1),L=null),D[1]&2097152&&h!==(h=N[52].unpushedOps+"")&&R(k,h),N[52].lastSyncAt?A?A.p(N,D):(A=Gn(N),A.c(),A.m(e,null)):A&&(A.d(1),A=null)},d(N){N&&g(e),F.d(),M&&M.d(),I&&I.d(),L&&L.d(),A&&A.d()}}}function fc(l){let e;return{c(){e=f("span"),e.textContent=`${_("sync.disabled")}`,Re(e,"color","#666"),o(e,"class","svelte-6adx1u")},m(t,n){w(t,e,n)},d(t){t&&g(e)}}}function dc(l){let e;return{c(){e=f("span"),e.textContent=`${_("sync.notConnected")}`,Re(e,"color","#f59e0b"),o(e,"class","svelte-6adx1u")},m(t,n){w(t,e,n)},d(t){t&&g(e)}}}function mc(l){let e;return{c(){e=f("span"),e.textContent=`${_("sync.connected")}`,Re(e,"color","#34d399"),o(e,"class","svelte-6adx1u")},m(t,n){w(t,e,n)},d(t){t&&g(e)}}}function pc(l){let e;return{c(){e=f("span"),e.textContent=`${_("sync.revoked")}`,Re(e,"color","#ff6b6b"),o(e,"class","svelte-6adx1u")},m(t,n){w(t,e,n)},d(t){t&&g(e)}}}function Wn(l){let e,t,n,i=l[52].serverUrl+"",s;return{c(){e=f("div"),t=f("span"),t.textContent=`${_("sync.server")}`,n=f("span"),s=E(i),o(t,"class","sync-label svelte-6adx1u"),o(n,"class","sync-value mono svelte-6adx1u"),o(e,"class","sync-row svelte-6adx1u")},m(a,r){w(a,e,r),c(e,t),c(e,n),c(n,s)},p(a,r){r[1]&2097152&&i!==(i=a[52].serverUrl+"")&&R(s,i)},d(a){a&&g(e)}}}function Kn(l){let e,t,n,i=l[52].deviceName+"",s;return{c(){e=f("div"),t=f("span"),t.textContent=`${_("sync.device")}`,n=f("span"),s=E(i),o(t,"class","sync-label svelte-6adx1u"),o(n,"class","sync-value svelte-6adx1u"),o(e,"class","sync-row svelte-6adx1u")},m(a,r){w(a,e,r),c(e,t),c(e,n),c(n,s)},p(a,r){r[1]&2097152&&i!==(i=a[52].deviceName+"")&&R(s,i)},d(a){a&&g(e)}}}function qn(l){let e,t,n,i=l[52].deviceId+"",s;return{c(){e=f("div"),t=f("span"),t.textContent=`${_("sync.deviceId")}`,n=f("span"),s=E(i),o(t,"class","sync-label svelte-6adx1u"),o(n,"class","sync-value mono svelte-6adx1u"),o(e,"class","sync-row svelte-6adx1u")},m(a,r){w(a,e,r),c(e,t),c(e,n),c(n,s)},p(a,r){r[1]&2097152&&i!==(i=a[52].deviceId+"")&&R(s,i)},d(a){a&&g(e)}}}function Gn(l){let e,t,n,i=l[52].lastSyncAt+"",s;return{c(){e=f("div"),t=f("span"),t.textContent=`${_("sync.lastSync")}`,n=f("span"),s=E(i),o(t,"class","sync-label svelte-6adx1u"),o(n,"class","sync-value svelte-6adx1u"),o(e,"class","sync-row svelte-6adx1u")},m(a,r){w(a,e,r),c(e,t),c(e,n),c(n,s)},p(a,r){r[1]&2097152&&i!==(i=a[52].lastSyncAt+"")&&R(s,i)},d(a){a&&g(e)}}}function _c(l){let e,t,n,i,s,a,r,u,d,b,v,p,h,k,S,T,C,F=_("sync.test")+"",M,I,L,A,N=_("sync.connect")+"",D,H,B;return{c(){e=f("div"),t=f("label"),t.textContent=`${_("sync.serverUrl")}`,n=y(),i=f("input"),s=y(),a=f("div"),r=f("label"),r.textContent=`${_("sync.username")}`,u=y(),d=f("input"),b=y(),v=f("div"),p=f("label"),p.textContent=`${_("sync.password")}`,h=y(),k=f("input"),S=y(),T=f("div"),C=f("button"),M=E(F),L=y(),A=f("button"),D=E(N),o(t,"class","svelte-6adx1u"),o(i,"type","text"),o(i,"placeholder",_("sync.serverUrlPlaceholder")),o(i,"class","svelte-6adx1u"),o(e,"class","form-group svelte-6adx1u"),o(r,"class","svelte-6adx1u"),o(d,"type","text"),o(d,"placeholder",_("sync.usernamePlaceholder")),o(d,"class","svelte-6adx1u"),o(a,"class","form-group svelte-6adx1u"),o(p,"class","svelte-6adx1u"),o(k,"type","password"),o(k,"placeholder",_("sync.passwordPlaceholder")),o(k,"class","svelte-6adx1u"),o(v,"class","form-group svelte-6adx1u"),o(C,"class","btn svelte-6adx1u"),C.disabled=I=l[53]||!l[54],o(A,"class","btn btn-primary svelte-6adx1u"),A.disabled=l[53],o(T,"class","modal-actions svelte-6adx1u"),Re(T,"margin-top","12px")},m(x,V){w(x,e,V),c(e,t),c(e,n),c(e,i),Ce(i,l[54]),w(x,s,V),w(x,a,V),c(a,r),c(a,u),c(a,d),Ce(d,l[55]),w(x,b,V),w(x,v,V),c(v,p),c(v,h),c(v,k),Ce(k,l[56]),w(x,S,V),w(x,T,V),c(T,C),c(C,M),c(T,L),c(T,A),c(A,D),H||(B=[O(i,"input",l[179]),O(d,"input",l[180]),O(k,"input",l[181]),O(C,"click",l[122]),O(A,"click",l[120])],H=!0)},p(x,V){V[1]&8388608&&i.value!==x[54]&&Ce(i,x[54]),V[1]&16777216&&d.value!==x[55]&&Ce(d,x[55]),V[1]&33554432&&k.value!==x[56]&&Ce(k,x[56]),V[1]&12582912&&I!==(I=x[53]||!x[54])&&(C.disabled=I),V[1]&4194304&&(A.disabled=x[53])},d(x){x&&(g(e),g(s),g(a),g(b),g(v),g(S),g(T)),H=!1,de(B)}}}function vc(l){let e,t,n=_("sync.syncNow")+"",i,s,a,r=_("sync.disconnect")+"",u,d,b;return{c(){e=f("div"),t=f("button"),i=E(n),s=y(),a=f("button"),u=E(r),o(t,"class","btn svelte-6adx1u"),t.disabled=l[53],o(a,"class","btn btn-danger svelte-6adx1u"),a.disabled=l[53],o(e,"class","sync-connected-actions svelte-6adx1u")},m(v,p){w(v,e,p),c(e,t),c(t,i),c(e,s),c(e,a),c(a,u),d||(b=[O(t,"click",l[124]),O(a,"click",l[123])],d=!0)},p(v,p){p[1]&4194304&&(t.disabled=v[53]),p[1]&4194304&&(a.disabled=v[53])},d(v){v&&g(e),d=!1,de(b)}}}function Xn(l){let e,t;return{c(){e=f("div"),t=E(l[58]),o(e,"class","sync-result svelte-6adx1u"),Re(e,"margin-top","8px")},m(n,i){w(n,e,i),c(e,t)},p(n,i){i[1]&134217728&&R(t,n[58])},d(n){n&&g(e)}}}function hc(l){var yt;let e,t,n,i,s,a,r,u,d,b,v,p,h,k,S,T,C,F,M,I,L,A,N,D,H,B,x,V,J,q,X,z,Y,K,G,W,ye,Me,Ve,ce,ne,te,ie,se,Ae,Oe,Ye,De,pe,ee,be,Te,Ze,Qe,Ue=re(l[0]),ge=[];for(let U=0;U<Ue.length;U+=1)ge[U]=Jl(Xl(l,Ue,U));const We=[Fa,Na],Ie=[];function we(U,ue){return U[1].length>0?0:1}M=we(l),I=Ie[M]=We[M](l);function _e(U,ue){return U[9]?Aa:U[8]?Ma:Ia}let ae=_e(l),ve=ae(l),Se=((yt=l[52])==null?void 0:yt.configured)&&Zl(l),ke=l[7]&&$l(l);const ze=[ja,xa,La,Ea,Da],Ee=[];function Ke(U,ue){return U[12]?0:U[9]?1:U[8]==="today"&&U[3]?2:U[8]==="activity"?3:4}ie=Ke(l),se=Ee[ie]=ze[ie](l);let he=l[17]&&Mn(l),fe=l[21].visible&&En(l),oe=l[24]&&jn(l),Ne=l[31]&&l[30]&&On(l),Le=l[48]&&Bn(l),Fe=l[43]&&Rn(l),Pe=l[51]&&Vn(l);return{c(){var U;e=f("div"),t=f("aside"),n=f("div"),i=f("span"),i.textContent="⚒",s=y(),a=f("span"),a.textContent=`${_("nav.brand")}`,r=y(),u=f("nav"),d=f("div"),b=f("div"),b.textContent=`${_("nav.system")}`,v=y();for(let ue=0;ue<ge.length;ue+=1)ge[ue].c();p=y(),h=f("div"),k=f("div"),S=f("span"),S.textContent=`${_("nav.workspace")}`,T=y(),C=f("button"),C.textContent="+",F=y(),I.c(),L=y(),A=f("div"),N=f("button"),D=j("svg"),H=j("polyline"),B=j("polyline"),x=j("path"),V=y(),J=f("span"),q=y(),X=f("span"),X.textContent=`${_("nav.sync")}`,z=y(),Y=f("span"),K=E(l[6]),G=y(),W=f("main"),ye=f("header"),Me=f("div"),ve.c(),Ve=y(),ce=f("div"),Se&&Se.c(),ne=y(),ke&&ke.c(),te=y(),se.c(),Ae=y(),he&&he.c(),Oe=y(),fe&&fe.c(),Ye=y(),oe&&oe.c(),De=y(),Ne&&Ne.c(),pe=y(),Le&&Le.c(),ee=y(),Fe&&Fe.c(),be=y(),Pe&&Pe.c(),o(i,"class","logo svelte-6adx1u"),o(a,"class","brand-name svelte-6adx1u"),o(n,"class","sidebar-brand svelte-6adx1u"),o(b,"class","nav-label svelte-6adx1u"),o(d,"class","nav-group svelte-6adx1u"),o(S,"class","svelte-6adx1u"),o(C,"class","nav-add-btn svelte-6adx1u"),o(C,"title",_("common.create")),o(k,"class","nav-label-row svelte-6adx1u"),o(h,"class","nav-group svelte-6adx1u"),o(u,"class","sidebar-nav svelte-6adx1u"),o(H,"points","23 4 23 10 17 10"),o(H,"class","svelte-6adx1u"),o(B,"points","1 20 1 14 7 14"),o(B,"class","svelte-6adx1u"),o(x,"d","M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"),o(x,"class","svelte-6adx1u"),o(D,"width","16"),o(D,"height","16"),o(D,"viewBox","0 0 24 24"),o(D,"fill","none"),o(D,"stroke","currentColor"),o(D,"stroke-width","2"),o(D,"stroke-linecap","round"),o(D,"stroke-linejoin","round"),o(D,"class","svelte-6adx1u"),o(J,"class","sync-dot svelte-6adx1u"),tt(J,"active",(U=l[52])==null?void 0:U.configured),o(X,"class","sidebar-sync-label svelte-6adx1u"),o(N,"class","sidebar-sync-btn svelte-6adx1u"),o(N,"title",_("nav.syncSettings")),o(Y,"class","version svelte-6adx1u"),o(A,"class","sidebar-footer svelte-6adx1u"),o(t,"class","sidebar svelte-6adx1u"),o(Me,"class","header-left svelte-6adx1u"),o(ce,"class","header-right svelte-6adx1u"),o(ye,"class","header svelte-6adx1u"),o(W,"class","main svelte-6adx1u"),o(e,"class","app svelte-6adx1u")},m(U,ue){w(U,e,ue),c(e,t),c(t,n),c(n,i),c(n,s),c(n,a),c(t,r),c(t,u),c(u,d),c(d,b),c(d,v);for(let $e=0;$e<ge.length;$e+=1)ge[$e]&&ge[$e].m(d,null);c(u,p),c(u,h),c(h,k),c(k,S),c(k,T),c(k,C),c(h,F),Ie[M].m(h,null),c(t,L),c(t,A),c(A,N),c(N,D),c(D,H),c(D,B),c(D,x),c(N,V),c(N,J),c(N,q),c(N,X),c(A,z),c(A,Y),c(Y,K),c(e,G),c(e,W),c(W,ye),c(ye,Me),ve.m(Me,null),c(ye,Ve),c(ye,ce),Se&&Se.m(ce,null),c(W,ne),ke&&ke.m(W,null),c(W,te),Ee[ie].m(W,null),c(W,Ae),he&&he.m(W,null),c(W,Oe),fe&&fe.m(W,null),c(W,Ye),oe&&oe.m(W,null),c(W,De),Ne&&Ne.m(W,null),c(W,pe),Le&&Le.m(W,null),c(W,ee),Fe&&Fe.m(W,null),c(W,be),Pe&&Pe.m(W,null),Te=!0,Ze||(Qe=[O(C,"click",l[87]),O(N,"click",l[118])],Ze=!0)},p(U,ue){var pt,_t;if(ue[0]&257|ue[1]&1073741824){Ue=re(U[0]);let qe;for(qe=0;qe<Ue.length;qe+=1){const gt=Xl(U,Ue,qe);ge[qe]?ge[qe].p(gt,ue):(ge[qe]=Jl(gt),ge[qe].c(),ge[qe].m(d,null))}for(;qe<ge.length;qe+=1)ge[qe].d(1);ge.length=Ue.length}let $e=M;M=we(U),M===$e?Ie[M].p(U,ue):(Be(),le(Ie[$e],1,1,()=>{Ie[$e]=null}),He(),I=Ie[M],I?I.p(U,ue):(I=Ie[M]=We[M](U),I.c()),Q(I,1),I.m(h,null)),(!Te||ue[1]&2097152)&&tt(J,"active",(pt=U[52])==null?void 0:pt.configured),(!Te||ue[0]&64)&&R(K,U[6]),ae===(ae=_e(U))&&ve?ve.p(U,ue):(ve.d(1),ve=ae(U),ve&&(ve.c(),ve.m(Me,null))),(_t=U[52])!=null&&_t.configured?Se?Se.p(U,ue):(Se=Zl(U),Se.c(),Se.m(ce,null)):Se&&(Se.d(1),Se=null),U[7]?ke?ke.p(U,ue):(ke=$l(U),ke.c(),ke.m(W,te)):ke&&(ke.d(1),ke=null);let mt=ie;ie=Ke(U),ie===mt?Ee[ie].p(U,ue):(Be(),le(Ee[mt],1,1,()=>{Ee[mt]=null}),He(),se=Ee[ie],se?se.p(U,ue):(se=Ee[ie]=ze[ie](U),se.c()),Q(se,1),se.m(W,Ae)),U[17]?he?(he.p(U,ue),ue[0]&131072&&Q(he,1)):(he=Mn(U),he.c(),Q(he,1),he.m(W,Oe)):he&&(Be(),le(he,1,1,()=>{he=null}),He()),U[21].visible?fe?(fe.p(U,ue),ue[0]&2097152&&Q(fe,1)):(fe=En(U),fe.c(),Q(fe,1),fe.m(W,Ye)):fe&&(Be(),le(fe,1,1,()=>{fe=null}),He()),U[24]?oe?oe.p(U,ue):(oe=jn(U),oe.c(),oe.m(W,De)):oe&&(oe.d(1),oe=null),U[31]&&U[30]?Ne?Ne.p(U,ue):(Ne=On(U),Ne.c(),Ne.m(W,pe)):Ne&&(Ne.d(1),Ne=null),U[48]?Le?Le.p(U,ue):(Le=Bn(U),Le.c(),Le.m(W,ee)):Le&&(Le.d(1),Le=null),U[43]?Fe?(Fe.p(U,ue),ue[1]&4096&&Q(Fe,1)):(Fe=Rn(U),Fe.c(),Q(Fe,1),Fe.m(W,be)):Fe&&(Be(),le(Fe,1,1,()=>{Fe=null}),He()),U[51]?Pe?Pe.p(U,ue):(Pe=Vn(U),Pe.c(),Pe.m(W,null)):Pe&&(Pe.d(1),Pe=null)},i(U){Te||(Q(I),Q(se),Q(he),Q(fe),Q(Fe),Te=!0)},o(U){le(I),le(se),le(he),le(fe),le(Fe),Te=!1},d(U){U&&g(e),je(ge,U),Ie[M].d(),ve.d(),Se&&Se.d(),ke&&ke.d(),Ee[ie].d(),he&&he.d(),fe&&fe.d(),oe&&oe.d(),Ne&&Ne.d(),Le&&Le.d(),Fe&&Fe.d(),Pe&&Pe.d(),Ze=!1,de(Qe)}}}function $(l,...e){try{if(window.go&&window.go.main&&window.go.main.App){const t=window.go.main.App[l];if(typeof t=="function")return t(...e)}}catch(t){console.error("Wails call error:",l,t)}return Promise.reject(new Error("Wails not connected: "+l))}function kt(l){return l==="note_created"||l==="file_added"||l==="folder_added"||l==="node_created"?"+":l==="file_deleted"||l==="folder_deleted"?"×":l==="file_renamed"||l==="folder_renamed"||l==="note_updated"||l==="node_updated"?"~":l==="file_copied"?"⧉":l==="file_moved"?"→":"•"}function lt(l){if(!l)return"";try{return new Date(l).toLocaleTimeString("ru-RU",{hour:"2-digit",minute:"2-digit"})}catch{return""}}function nt(l){if(!l)return"";try{return new Date(l).toLocaleDateString("ru-RU",{day:"numeric",month:"short"})}catch{return l}}function st(l,e,t,n){return l=Math.abs(l)%100,l>=5&&l<=20?n:(l%=10,l===1?e:l>=2&&l<=4?t:n)}function bc(l,e,t){let n=[],i=[],s=[],a=null,r=[],u=0,d=!0,b=[],v="",p="",h="",k=null,S="overview",T=[],C=null,F=[],M=[],I=[],L="",A="",N=!1,D="",H=null,B=null,x={visible:!1,x:0,y:0,node:null},V=!1,J="",q=!1,X="",z="open_url",Y="",K=[{id:"open_url",label:_("action.openUrl")},{id:"open_file",label:_("action.openFile")},{id:"open_folder",label:_("action.openFolder")},{id:"run_command",label:_("action.runCommand")},{id:"run_script",label:_("action.runScript")},{id:"open_terminal",label:_("action.openTerminal")},{id:"launch_app",label:_("action.launchApp")}],G=!0,W=!1,ye=null,Me=!1,Ve="",ce={},ne=!1,te=null,ie=[],se=[],Ae=null,Oe="",Ye=!1,De="",pe={items:[],mode:"copy"},ee=[],be=[],Te=!1,Ze="",Qe="",Ue=!1,ge=_("common.delete"),We=null,Ie=null,we=!1,_e="",ae="",ve="",Se=!1,ke=null,ze=!1,Ee="",Ke="",he="",fe=0,oe="";const Ne=[{id:"overview",label:_("tab.overview")},{id:"notes",label:_("tab.notes")},{id:"files",label:_("tab.files")},{id:"actions",label:_("tab.actions")},{id:"worklog",label:_("tab.worklog")},{id:"activity",label:_("tab.activity")}];let Le=null;Zn(async()=>{try{t(6,v=await $("VerstakVersion")||"verstak-gui/v2"),t(0,n=await $("ListSystemViews")||[]),t(1,i=await $("ListWorkspaceTree")||[]),t(2,s=await $("ListEnabledTemplates")||[])}catch(m){t(7,p=String(m)),t(0,n=[{id:"today",label:_("nav.today")},{id:"inbox",label:_("nav.inbox")},{id:"activity",label:_("nav.activity")}]),t(1,i=[]),t(2,s=[])}window.runtime&&window.runtime.EventsOn&&(window.runtime.EventsOn("files-dropped",Li),Le=()=>window.runtime.EventsOff("files-dropped")),window.addEventListener("keydown",ll),t(28,G=!1),St()}),Qn(()=>{Le&&Le(),window.removeEventListener("keydown",ll)});async function Fe(m){t(8,h=m),t(9,k=null),t(10,S="overview"),t(11,T=[]),F=[],t(13,M=[]),t(14,I=[]),t(17,N=!1),t(7,p=""),t(3,a=null),t(4,r=[]),u=0,d=!0;try{m==="today"?t(3,a=await $("ListTodayView")||{cases:[]}):m==="activity"&&(t(4,r=await $("ListActivityFeed",50,0)||[]),u=r.length,d=r.length===50)}catch(P){t(7,p=String(P)),t(3,a={cases:[]}),t(4,r=[])}}async function Pe(m){t(9,k=m),t(10,S="overview"),t(11,T=[]),F=[],t(13,M=[]),t(14,I=[]),t(32,ce={}),t(36,se=[]),t(35,ie=[]),t(34,te=null),t(37,Ae=null),t(38,Oe=""),t(42,ee=[]),be=[],t(12,C=null),t(17,N=!1),t(22,V=!1),t(7,p=""),t(5,b=[]),await yt(m.id)}async function yt(m){try{t(11,T=await $("ListNotes",m)||[])}catch{}try{F=await $("ListFiles",m)||[]}catch{}try{t(13,M=await $("ListActions",m)||[])}catch{}try{t(14,I=await $("ListWorklog",m)||[])}catch{}try{t(5,b=await $("ListActivityByNode",m,50,0)||[])}catch{}}async function U(m){t(33,ne=!0);try{let P=await $("ListItems",m)||[];P.sort((me,xe)=>me.type!==xe.type?me.type==="folder"?-1:1:(me.name||"").localeCompare(xe.name||"")),t(36,se=P)}catch{t(36,se=[])}t(33,ne=!1)}async function ue(m){if(k){try{const P=await $("GetNodeDetail",m);P&&t(35,ie=[...ie,{id:m,name:P.title}])}catch{t(35,ie=[...ie,{id:m,name:"..."}])}t(34,te=m),await U(m)}}function $e(){if(ie.length<2)t(35,ie=[]),t(34,te=null),U(k.id);else{const m=ie[ie.length-2];t(35,ie=ie.slice(0,-1)),t(34,te=m.id),U(m.id)}}function mt(m){const P=ie[m];t(35,ie=ie.slice(0,m+1)),t(34,te=P.id),U(P.id)}async function pt(m){t(37,Ae=m),t(38,Oe=""),t(40,De=""),t(39,Ye=!0);try{Ps(m)?t(38,Oe=await $("GetFileBase64",m.fileId)||""):Os(m)&&t(38,Oe=await $("ReadFileText",m.fileId)||"")}catch(P){t(40,De=String(P))}t(39,Ye=!1)}function _t(){t(37,Ae=null),t(38,Oe=""),t(40,De="")}async function qe(){const m=prompt(_("file.namePrompt"));if(!(!m||!m.trim()))try{const P=te||k.id;await $("CreateEmptyFile",P,m.trim()),await U(P)}catch(P){t(7,p=String(P))}}async function gt(m){try{await $("DuplicateNode",m);const P=te||k.id;await U(P)}catch(P){t(7,p=String(P))}}function Jt(m){const P=se.find(me=>me.id===m);P&&zt(P.id,P.name)}function Yt(m){t(41,pe={items:[m],mode:"cut"})}function Zt(m){t(41,pe={items:[m],mode:"copy"})}async function Qt(){if(pe.items.length===0)return;const m=te||k.id;try{if(pe.mode==="copy")for(const P of pe.items)await $("DuplicateNode",P);else for(const P of pe.items)await $("MoveNode",P,m);t(41,pe={items:[],mode:"copy"}),await U(m)}catch(P){t(7,p=String(P))}}function $t(m){ee.includes(m)?t(42,ee=ee.filter(P=>P!==m)):t(42,ee=[...ee,m])}function el(m){t(42,ee=[m])}function ci(){t(42,ee=se.map(m=>m.id))}function tl(m){if(se.length===0)return;const P=ee.length>0?ee[ee.length-1]:se[0].id,me=se.findIndex(ut=>ut.id===P),xe=se.findIndex(ut=>ut.id===m);if(me===-1||xe===-1)return;const Tt=Math.min(me,xe),Ut=Math.max(me,xe),Qo=se.slice(Tt,Ut+1).map(ut=>ut.id),hl=new Set(ee);Qo.forEach(ut=>hl.add(ut)),t(42,ee=[...hl])}function ri(){t(42,ee=[])}function Ot(m){return m.length>0?m:se.map(P=>P.id)}async function ui(){const m=Ot(ee),P=se.find(xe=>xe.id===m[0]);let me;m.length===1&&(P==null?void 0:P.type)==="folder"?me=_("delete.folder"):m.length===1?me=_("delete.file"):me=_("delete.files",{count:m.length}),wt({title:_("delete.confirmTitle"),message:_("delete.confirmMessage")+" "+me+"?",confirmText:_("common.delete"),danger:!0,onConfirm:async()=>{for(const Tt of m)try{await $("DeleteFileOrFolder",Tt)}catch(Ut){t(7,p=String(Ut))}t(42,ee=[]);const xe=te||k.id;await U(xe)}})}function fi(){const m=Ot(ee);t(41,pe={items:m,mode:"cut"}),t(42,ee=[])}function di(){const m=Ot(ee);t(41,pe={items:m,mode:"copy"}),t(42,ee=[])}function mi(m,P){const me=ee.includes(P)?ee:[P];be=me,m.dataTransfer.effectAllowed="move",m.dataTransfer.setData("text/plain",me.join(","))}function pi(m,P){const me=se.find(xe=>xe.id===P);me&&me.type==="folder"&&(m.preventDefault(),m.dataTransfer.dropEffect="move")}async function _i(m,P){if(m.preventDefault(),be.length!==0){for(const me of be)try{await $("MoveNode",me,P)}catch(xe){t(7,p=String(xe))}be=[],t(42,ee=[]),await U(te||k.id)}}function ll(m){if(S==="files"&&!(m.target.tagName==="INPUT"||m.target.tagName==="TEXTAREA"))if(m.ctrlKey||m.metaKey)m.key==="c"||m.key==="C"?(m.preventDefault(),di()):m.key==="x"||m.key==="X"?(m.preventDefault(),fi()):m.key==="v"||m.key==="V"?(m.preventDefault(),Qt()):m.key==="a"||m.key==="A"?(m.preventDefault(),ci()):m.key==="o"||m.key==="O"?(m.preventDefault(),vi()):m.key==="Enter"&&(m.preventDefault(),nl());else if(m.key==="Enter")m.preventDefault(),nl();else if(m.key==="Delete"||m.key==="Backspace"){if(Ae){m.preventDefault(),_t();return}if(ee.length>0){m.preventDefault(),ui();return}if(m.key==="Backspace"&&ie.length>0){m.preventDefault(),$e();return}}else if(m.key==="Escape"){if(Ae){_t();return}if(ee.length>0){ri();return}}else m.key==="F2"&&(m.preventDefault(),hi())}function nl(){if(ee.length===1){const m=se.find(P=>P.id===ee[0]);m&&(m.type==="folder"?ue(m.id):pt(m))}}function vi(){if(ee.length===1){const m=se.find(P=>P.id===ee[0]);m&&m.fileId&&$("OpenFile",m.fileId)}}function zt(m,P){_e=m,t(49,ae=P),t(50,ve=""),t(48,we=!0)}function hi(){if(ee.length===1){const m=se.find(P=>P.id===ee[0]);m&&zt(m.id,m.name)}}async function il(){const m=ae.trim();if(!m){t(50,ve=_("rename.emptyError"));return}try{await $("ValidateName",m)}catch{t(50,ve=_("rename.invalidError"));return}t(48,we=!1),_e="";try{await $("RenameNode",_e,m);const P=te||k.id;await U(P)}catch(P){t(7,p=String(P))}}function bi(){t(48,we=!1),_e="",t(49,ae=""),t(50,ve="")}function ki(m){m.key==="Enter"?il():t(50,ve="")}function wt(m){t(44,Ze=m.title||_("common.confirm")),t(45,Qe=m.message||""),t(46,Ue=m.danger!==void 0?m.danger:!0),t(47,ge=m.confirmText||_("common.delete")),We=m.onConfirm||null,Ie=m.onCancel||null,t(43,Te=!0)}function ol(){t(43,Te=!1),We=null,Ie=null}function yi(){We&&We(),ol()}function gi(){Ie&&Ie(),ol()}function sl(m){t(19,H=x.node),t(20,B=m),t(18,D=""),t(17,N=!0),Ct()}function wi(){t(19,H=null),t(20,B=null),t(18,D=""),t(17,N=!0)}function Ci(){t(17,N=!1),t(18,D=""),t(19,H=null),t(20,B=null)}async function al(){if(D.trim())try{const m=H?H.id:"",P=B?B.id:"";if(await $("CreateNodeFromTemplate",m,D.trim(),P),t(17,N=!1),t(18,D=""),t(19,H=null),t(20,B=null),t(1,i=await $("ListWorkspaceTree")||i),!m){const me=await $("ListWorkspaceTree")||i;t(1,i=me)}}catch(m){t(7,p=String(m))}}function Si(m,P){t(21,x={visible:!0,x:m.clientX,y:m.clientY,node:P})}function Ct(){t(21,x={visible:!1,x:0,y:0,node:null})}function Ti(m){t(32,ce={...ce,[m]:!ce[m]})}function cl(m){zt(m.id,m.title),Ct()}function rl(m){Ct(),wt({title:_("delete.confirmTitle"),message:_("delete.confirmMessage")+" "+m.title+"?",confirmText:_("common.delete"),danger:!0,onConfirm:async()=>{try{await $("DeleteNode",m.id),t(1,i=await $("ListWorkspaceTree")||i),k&&k.id===m.id&&t(9,k=null)}catch(P){t(7,p=String(P))}}})}async function ul(m){Ct();try{await $("OpenNodeFolder",m.id)}catch(P){t(7,p=String(P))}}function fl(){t(22,V=!0),t(23,J="")}function Ni(){t(22,V=!1),t(23,J="")}async function dl(){if(!(!J.trim()||!k))try{const m=await $("CreateNote",k.id,J.trim());t(11,T=[...T,m&&m.id?m:{id:Date.now().toString(),title:J.trim(),createdAt:new Date().toISOString()}]),t(22,V=!1),t(23,J="")}catch{const P={id:Date.now().toString(),title:J.trim(),createdAt:new Date().toISOString()};t(11,T=[...T,P]),t(22,V=!1),t(23,J="")}}async function Bt(m){if(C&&C.dirty){wt({title:_("note.unsavedTitle"),message:_("note.unsavedMessage"),confirmText:_("note.unsavedClose"),danger:!1,onConfirm:async()=>{await ml(m)}});return}await ml(m)}async function ml(m){try{const P=await $("ReadNote",m.id);t(12,C={id:m.id,title:m.title,content:P||"",dirty:!1})}catch{t(12,C={id:m.id,title:m.title,content:"# "+m.title+`
`,dirty:!1})}}function Fi(){if(C&&C.dirty){wt({title:_("note.unsavedTitle"),message:_("note.unsavedMessage"),confirmText:_("note.unsavedClose"),danger:!1,onConfirm:()=>{t(12,C=null)}});return}t(12,C=null)}function Ii(m){C&&(t(12,C.content=m.target.value,C),t(12,C.dirty=!0,C))}async function Mi(){if(C)try{await $("SaveNote",C.id,C.content),t(12,C.dirty=!1,C)}catch{t(12,C.dirty=!1,C)}}async function Ai(){const m=parseInt(L,10);if(!(!A.trim()||isNaN(m)||m<=0||!k)){try{const P=await $("CreateWorklog",k.id,A.trim(),m);t(14,I=[...I,P&&P.id?P:{id:Date.now().toString(),nodeId:k.id,summary:A.trim(),minutes:m,createdAt:new Date().toISOString()}])}catch{t(14,I=[...I,{id:Date.now().toString(),nodeId:k.id,summary:A.trim(),minutes:m,createdAt:new Date().toISOString()}])}t(16,A=""),t(15,L="")}}async function pl(){const m=await $("PickFile");m&&await Ht(k.id,m)}async function Di(){const m=await $("PickDirectory");m&&await Ht(k.id,m)}async function Ht(m,P){t(29,W=!0);try{const me=await $("PreviewImport",P);t(30,ye=me),Ve=P,t(31,Me=!0)}catch(me){t(7,p=String(me))}t(29,W=!1)}async function Rt(m){try{const P=m==="copy"?await $("AddPathCopy",k.id,Ve):await $("AddPathLink",k.id,Ve);t(31,Me=!1),t(30,ye=null),t(35,ie=[]),t(34,te=null),await Promise.all([yt(k.id),U(k.id)])}catch(P){t(7,p=String(P))}}function Ei(){t(31,Me=!1),t(30,ye=null)}async function _l({id:m,type:P}){const me=_(P==="folder"?"delete.folder":"delete.file");wt({title:_("delete.confirmTitle"),message:_("delete.confirmMessage")+" "+me+"?",confirmText:_("common.delete"),danger:!0,onConfirm:async()=>{try{await $("DeleteFileOrFolder",m),F=F.filter(Tt=>Tt.nodeId!==m);const xe=te||k.id;await U(xe)}catch(xe){t(7,p=String(xe))}}})}async function Li(m){if(!m||m.length===0)return;if(!k){t(7,p=_("error.selectCaseFirst"));return}const P=m[0];await Ht(k.id,P)}function xi(m){return S===m?"tab active":"tab"}function ji(m){return{note_created:_("event.noteCreated"),note_updated:_("event.noteUpdated"),file_added:_("event.fileAdded"),file_deleted:_("event.fileDeleted"),file_renamed:_("event.fileRenamed"),file_copied:_("event.fileCopied"),file_moved:_("event.fileMoved"),folder_added:_("event.folderAdded"),folder_deleted:_("event.folderDeleted"),folder_renamed:_("event.folderRenamed"),node_created:_("event.caseCreated"),node_updated:_("event.caseUpdated")}[m]||m}function Pi(m){return{project:_("kind.project"),client:_("kind.client"),document:_("kind.document"),recipe:_("kind.recipe"),archive:_("kind.archive"),case:_("kind.case")}[m]||m||_("kind.case")}function Oi(){t(24,q=!0),t(25,X=""),t(26,z="open_url"),t(27,Y="")}function zi(){t(24,q=!1),t(25,X=""),t(27,Y="")}async function Vt(){if(!(!X.trim()||!Y.trim()||!k))try{const m=await $("CreateAction",k.id,z,X.trim(),Y.trim());m&&m.id&&t(13,M=[...M,m]),t(24,q=!1),t(25,X=""),t(27,Y="")}catch(m){t(7,p=String(m))}}async function vl(m){try{await $("DeleteAction",m),t(13,M=M.filter(P=>P.id!==m))}catch(P){t(7,p=String(P))}}function Bi(m){const P=K.find(me=>me.id===m);return P?P.label:m}async function it(m){try{const P=await $("GetNodeDetail",m);P&&Pe(P)}catch(P){t(7,p=String(P))}}async function St(){try{t(52,ke=await $("SyncStatus"))}catch{t(52,ke={configured:!1,serverUrl:"",deviceId:"",unpushedOps:0,lastSyncAt:"",syncInterval:0})}}function Hi(){t(51,Se=!0),t(54,Ee=(ke==null?void 0:ke.serverUrl)||""),t(55,Ke=""),t(56,he=""),t(57,fe=(ke==null?void 0:ke.syncInterval)||0),t(58,oe="")}function Ri(){t(51,Se=!1),t(58,oe="")}async function Vi(){t(53,ze=!0),t(58,oe="");try{await $("SyncConfigure",Ee,Ke,he),fe>0&&await $("SyncSetInterval",fe),t(56,he=""),t(55,Ke=""),await St(),t(51,Se=!1)}catch(m){t(58,oe="err: "+String(m))}t(53,ze=!1)}async function Ui(){t(53,ze=!0),t(58,oe="");try{await $("SyncSetInterval",fe),t(58,oe=_("sync.settingsSaved")),await St()}catch(m){t(58,oe="err: "+String(m))}t(53,ze=!1)}async function Wi(){t(53,ze=!0),t(58,oe="");try{await $("SyncTestConnection",Ee,Ke,he),t(58,oe="connection ok")}catch(m){t(58,oe="connection failed: "+String(m))}t(53,ze=!1)}async function Ki(){t(53,ze=!0),t(58,oe="");try{await $("SyncDisconnect"),t(58,oe="disconnected"),await St()}catch(m){t(58,oe="err: "+String(m))}t(53,ze=!1)}async function qi(){t(53,ze=!0),t(58,oe="");try{const m=await $("SyncNow");t(58,oe="pushed "+m.pushed+", pulled "+m.pulled+" (seq "+m.serverSequence+")"),await St()}catch(m){t(58,oe="err: "+String(m))}t(53,ze=!1)}const Gi=m=>Fe(m.id),Xi=()=>t(7,p=""),Ji=()=>t(7,p="");function Yi(){C.content=this.value,t(12,C)}const Zi=m=>{t(10,S=m.id),m.id==="files"&&k&&se.length===0&&!te&&U(k.id)},Qi=()=>{t(10,S="notes"),fl()},$i=()=>{t(10,S="files"),pl()},eo=()=>t(10,S="worklog"),to=m=>Bt(m);function lo(){J=this.value,t(23,J)}const no=m=>m.key==="Enter"&&dl(),io=m=>Bt(m),oo=m=>{const P=m.detail;P===0?(t(35,ie=[]),t(34,te=null),U(k.id)):mt(P-1)},so=m=>ue(m.detail),ao=m=>pt(m.detail),co=m=>$("OpenFile",m.detail),ro=m=>$("OpenFolder",m.detail),uo=m=>_l(m.detail),fo=m=>Jt(m.detail.id),mo=m=>gt(m.detail),po=m=>Yt(m.detail),_o=m=>Zt(m.detail),vo=m=>el(m.detail),ho=m=>$t(m.detail),bo=m=>tl(m.detail),ko=m=>$("OpenFile",m.detail),yo=m=>$("RunAction",m.id),go=m=>vl(m.id);function wo(){A=this.value,t(16,A)}function Co(){L=Et(this.value),t(15,L)}const So=m=>it(m.nodeId),To=(m,P)=>P.key==="Enter"&&it(m.nodeId),No=m=>it(m.nodeId),Fo=(m,P)=>P.key==="Enter"&&it(m.nodeId),Io=m=>it(m.nodeId),Mo=(m,P)=>P.key==="Enter"&&it(m.nodeId),Ao=m=>it(m.nodeId),Do=(m,P)=>P.key==="Enter"&&it(m.nodeId),Eo=()=>t(20,B=null),Lo=m=>t(20,B=m);function xo(){D=this.value,t(18,D)}const jo=m=>m.key==="Enter"&&al(),Po=m=>sl(m),Oo=()=>cl(x.node),zo=()=>rl(x.node),Bo=()=>ul(x.node);function Ho(){X=this.value,t(25,X)}const Ro=m=>m.key==="Enter"&&Vt();function Vo(){z=is(this),t(26,z),t(59,K)}function Uo(){Y=this.value,t(27,Y)}const Wo=m=>m.key==="Enter"&&Vt(),Ko=()=>Rt("copy"),qo=()=>Rt("link");function Go(){ae=this.value,t(49,ae)}function Xo(){Ee=this.value,t(54,Ee)}function Jo(){Ke=this.value,t(55,Ke)}function Yo(){he=this.value,t(56,he)}function Zo(){fe=Et(this.value),t(57,fe)}return[n,i,s,a,r,b,v,p,h,k,S,T,C,M,I,L,A,N,D,H,B,x,V,J,q,X,z,Y,G,W,ye,Me,ce,ne,te,ie,se,Ae,Oe,Ye,De,pe,ee,Te,Ze,Qe,Ue,ge,we,ae,ve,Se,ke,ze,Ee,Ke,he,fe,oe,K,Ne,Fe,Pe,U,ue,$e,mt,pt,_t,qe,gt,Jt,Yt,Zt,Qt,$t,el,tl,mi,pi,_i,il,bi,ki,yi,gi,sl,wi,Ci,al,Si,Ct,Ti,cl,rl,ul,fl,Ni,dl,Bt,Fi,Ii,Mi,Ai,pl,Di,Rt,Ei,_l,xi,ji,Pi,Oi,zi,Vt,vl,Bi,it,Hi,Ri,Vi,Ui,Wi,Ki,qi,Gi,Xi,Ji,Yi,Zi,Qi,$i,eo,to,lo,no,io,oo,so,ao,co,ro,uo,fo,mo,po,_o,vo,ho,bo,ko,yo,go,wo,Co,So,To,No,Fo,Io,Mo,Ao,Do,Eo,Lo,xo,jo,Po,Oo,zo,Bo,Ho,Ro,Vo,Uo,Wo,Ko,qo,Go,Xo,Jo,Yo,Zo]}class kc extends rt{constructor(e){super(),ct(this,e,bc,hc,at,{},null,[-1,-1,-1,-1,-1,-1,-1,-1,-1])}}new kc({target:document.getElementById("app")});