| )#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/g,ua=/^#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/gu,Af=/(\s|:|\(|>|^)((http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-]))/g,pR=/\[([\s\S]*?)\]\(([\s\S]*?)\)/gu,Ff=/([^\s<\\*>'(]+\.(jpeg|jpg|gif|png|svg))(\]\])?(\))?/g,ad=/\[@(.+?)\]\((.+?)\)/g,mR=/[#*"\/\\<>:|\[\]\?]/gim,gR=/^(-|\*|\d\.)\s(\[.\]\s)?(\d{1,2}:\d{2}(:\d{2})?)\s(.*)/g,Qg=[{title:"DAILY",icon:"list"},{title:"CANVAS",icon:"layout-dashboard"},{title:"MULTI",icon:"file-text"},{title:"FILE",icon:"edit"}];var cT;(e=>{function t(){return parseInt(x.moment().format("x"))}e.getNowTimeStamp=t;function n(V){const U=/'’A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,Z=/\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5/.source,Q=/[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5]{1}/.source,G=new RegExp([`(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-${U}])+`,Z,Q].join("|"),"g");return(V.match(G)||[]).length}e.getWordCount=n;function r(V){Kg()&&(V!=null&&V.EnabledLocationList.some(U=>U.value==="DAILY"))&&(V!=null&&V.EnabledLocationList.some(U=>U.value==="MULTI"))&&mb().contains(V==null?void 0:V.MemoOtherSaveLocation.MemoDefaultMultiFilePath)&&new x.Notice(E("Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly."),5e3)}e.checkDailyInMulti=r;function a(){const V=navigator.userAgent;let U="Unknown";return V.indexOf("Win")!=-1?U="Windows":V.indexOf("Mac")!=-1?U="MacOS":V.indexOf("Linux")!=-1&&(U="Linux"),U}e.getOSVersion=a;function o(V){return typeof V=="string"&&(V=V.replaceAll("-","/")),new Date(V).getTime()}e.getTimeStampByDate=o;function i(V){const U=new Date(o(V));return new Date(U.getFullYear(),U.getMonth(),U.getDate()).getTime()}e.getDateStampByDate=i;function l(V){const U=new Date(o(V)),Z=U.getFullYear(),Q=U.getMonth()+1,G=U.getDate();return`${Z}/${Q}/${G}`}e.getDateString=l;function c(V){const U=new Date(o(V)),Z=U.getHours(),Q=U.getMinutes(),G=Z<10?"0"+Z:Z,re=Q<10?"0"+Q:Q;return`${G}:${re}`}e.getTimeString=c;function f(V){const U=new Date(o(V)),Z=U.getFullYear(),Q=U.getMonth()+1,G=U.getDate(),re=U.getHours(),de=U.getMinutes(),fe=U.getSeconds(),$=Q<10?"0"+Q:Q,he=G<10?"0"+G:G,se=re<10?"0"+re:re,ue=de<10?"0"+de:de,X=fe<10?"0"+fe:fe;return`${Z}/${$}/${he} ${se}:${ue}:${X}`}e.getDateTimeString=f;function h(V){return Array.from(new Set(V))}e.dedupe=h;function g(V){const U=new Set,Z=[];for(const Q of V)U.has(Q.id)||(U.add(Q.id),Z.push(Q));return Z}e.dedupeObjectWithId=g;function y(V,U){let Z=null;return()=>{Z&&clearTimeout(Z),Z=setTimeout(V,U)}}e.debounce=y;function w(V,U,Z=!1,Q){let G=null,re=!1;function de(...fe){if(G&&clearTimeout(G),Z&&!re){const $=V.apply(this,fe);Q&&typeof Q=="function"&&Q($),re=!0}else G=setTimeout(()=>{const $=V.apply(this,fe);Q&&typeof Q=="function"&&Q($),re=!1,G=null},U)}return de.cancel=function(){G&&clearTimeout(G),G=null,re=!1},de}e.debouncePlus=w;function S(V,U){let Z=!0;return()=>{if(!Z)return!1;Z=!1,setTimeout(()=>{V(),Z=!0},U)}}e.throttle=S;function D(V){const U=[],Z=Object.keys(V).sort();for(const Q of Z){const G=V[Q];G&&(typeof G=="object"?U.push(...D(G).split("&")):U.push(`${Q}=${G}`))}return U.join("&")}e.transformObjectToParamsString=D;function I(V){const U={},Z=V.split("&");for(const Q of Z){const[G,re]=Q.split("=");G&&re&&(U[G]=re)}return U}e.transformParamsStringToObject=I;function M(V){if(!V)return{};const U={},Z=Object.keys(V).sort();for(const Q of Z){const G=V[Q];if(typeof G=="object"){const re=M(JSON.parse(JSON.stringify(G)));re&&Object.keys(re).length>0&&(U[Q]=re)}else G&&(U[Q]=G)}return U}e.filterObjectNullKeys=M;async function N(V){if(navigator.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(V)}catch(U){console.warn("Copy to clipboard failed.",U)}else console.warn("Copy to clipboard failed, methods not supports.")}e.copyTextToClipboard=N;function B(V){return new Promise(U=>{const Z=new Image;Z.onload=()=>{const{width:Q,height:G}=Z;Q>0&&G>0?U({width:Q,height:G}):U({width:0,height:0})},Z.onerror=()=>{U({width:0,height:0})},Z.className="thino-hidden",Z.src=V,document.body.appendChild(Z),Z.remove()})}e.getImageSize=B;async function k(V){var G,re,de,fe;let U;const Q=app.plugins.getPlugin("obsidian-memos").settings.UseDailyOrPeriodic==="Daily";try{return!Q&&((fe=(de=(re=(G=window.app.plugins)==null?void 0:G.getPlugin("periodic-notes"))==null?void 0:re.calendarSetManager)==null?void 0:de.getActiveConfig("day"))!=null&&fe.enabled)?(U=await window.app.plugins.getPlugin("periodic-notes").createPeriodicNote("day",V),U):(U=await app.internalPlugins.getPluginById("daily-notes").instance.getDailyNote(V)||await lA(V),U)}catch($){return console.error($),new x.Notice(E("Failed to create daily note. Please check if you created a folder for daily notes.")),null}}e.createDailyNoteCheck=k;function R(V){const U=[];let Z=0;for(;Z").map(a=>`${a!==""?a:" "}
`).join(""),e=lR(e,t),e=e.replace($r,"#$1 ").replace(Wa,"#$2 ").replace(Af,"$1$2 ").replace(pR,"$1 ").replace(ad,"$1 ").replace(/\^\S{6}/g,"");const n=document.createElement("div");n.innerHTML=e;for(let a=0;a{const n=window.atob(e),r=new ArrayBuffer(n.length),a=new Uint8Array(r);for(let o=0;otypeof t[n]=="object"&&t[n]!==null&&typeof e[n]=="object"&&e[n]!==null?dA(e[n],t[n]):Object.prototype.hasOwnProperty.call(e,n)&&e[n]===t[n])}function wR(e,t){switch(t.type){case"SET_MEMOS":{const n=t.payload.memos.sort((a,o)=>{const i=ut.getTimeStampByDate(a.createdAt),l=ut.getTimeStampByDate(o.createdAt);return i===l?o.id.localeCompare(a.id):ut.getTimeStampByDate(o.createdAt)-ut.getTimeStampByDate(a.createdAt)}),r=ut.dedupeObjectWithId(n);return{...e,memos:[...r]}}case"SET_COMMENT_MEMOS":{const n=ut.dedupeObjectWithId(t.payload.commentMemos.sort((r,a)=>ut.getTimeStampByDate(a.createdAt)-ut.getTimeStampByDate(r.createdAt)));return{...e,commentMemos:[...n]}}case"SET_TAGS":return{...e,tags:t.payload.tags,tagsNum:t.payload.tagsNum};case"INSERT_MEMO":{const n=ut.dedupeObjectWithId([t.payload.memo,...e.memos].sort((r,a)=>ut.getTimeStampByDate(a.createdAt)-ut.getTimeStampByDate(r.createdAt)));return{...e,memos:n}}case"INSERT_COMMENT_MEMO":{const n=ut.dedupeObjectWithId([t.payload.memo,...e.commentMemos].sort((r,a)=>ut.getTimeStampByDate(a.createdAt)-ut.getTimeStampByDate(r.createdAt)));return{...e,commentMemos:[...n]}}case"DELETE_MEMO_BY_ID":return{...e,memos:[...e.memos].filter(n=>n.id!==t.payload.id)};case"DELETE_MEMO_BY_ID_BATCH":{const n=[...e.memos];return t.payload.ids.forEach(r=>{n.splice(n.findIndex(a=>a.id===r),1)}),{...e,memos:[...n]}}case"REPLACE_MEMO_BY_ID":{const n=e.memos.map(r=>r.id===t.payload.id?t.payload.memo:r);return{...e,memos:[...n]}}case"REMOVE_PREPARE_UPDATE_THINO":return{...e,preparingUpdateMemo:[]};case"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO":return{...e,preparingUpdateMemo:e.preparingUpdateMemo.filter(n=>n.id!==t.payload.id)};case"SET_WAITING_FOR_TEMPLATER":return{...e,preparingUpdateMemo:[...e.preparingUpdateMemo,{origin:t.payload.origin,date:t.payload.date,isList:t.payload.isList,id:t.payload.id,type:t.payload.type}]};case"CLEAR_MEMOS":return{...fA};case"EDIT_MEMO":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"EDIT_MEMO_PATH":{const n=e.memos.map(r=>r.path===t.payload.path?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"UPDATE_MEMO_BATCH":{const n=e.memos.filter(a=>a.path!==t.payload.path),r=ut.dedupeObjectWithId([...t.payload.memos,...n].sort((a,o)=>ut.getTimeStampByDate(o.createdAt)-ut.getTimeStampByDate(a.createdAt)));return{...e,memos:[...r]}}case"ARCHIVE_MEMO_BY_ID":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"ARCHIVE_MEMO_BY_ID_BULK":{const n=e.memos.map(r=>t.payload.some(a=>a.id===r.id)?{...r,...t.payload.filter(a=>a.id===r.id)[0]}:r);return{...e,memos:[...n]}}case"UNARCHIVE_MEMO_BY_ID":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"PIN_MEMO":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,pinned:t.payload.pinned}:r);return{...e,memos:[...n]}}case"EDIT_COMMENT_MEMO":{const n=e.commentMemos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,commentMemos:[...n]}}default:return e}}const fA={memos:[],commentMemos:[],tags:[],tagsNum:{},preparingUpdateMemo:[]};function bR(e,t){switch(t.type){case"SIGN_IN":return{user:t.payload.user};case"SIGN_OUT":return{user:null};default:return e}}const SR={user:null};function DR(e,t){switch(t.type){case"SET_QUERIES":{const n=ut.dedupeObjectWithId(t.payload.queries.sort((r,a)=>ut.getTimeStampByDate(a.createdAt)-ut.getTimeStampByDate(r.createdAt)).sort((r,a)=>ut.getTimeStampByDate(a.pinnedAt??0)-ut.getTimeStampByDate(r.pinnedAt??0)));return{...e,queries:n}}case"INSERT_QUERY":{const n=ut.dedupeObjectWithId([t.payload.query,...e.queries].sort((r,a)=>ut.getTimeStampByDate(a.createdAt)-ut.getTimeStampByDate(r.createdAt)));return{...e,queries:n}}case"DELETE_QUERY_BY_ID":return{...e,queries:[...e.queries].filter(n=>n.id!==t.payload.id)};case"UPDATE_QUERY":{const n=e.queries.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,queries:n}}default:return e}}const TR={queries:[]};function IR(e,t){var n,r,a,o;switch(t.type){case"SET_DAILY_NOTES":return{...e,dailyNotes:t.payload.dailyNotes};case"SET_APP":return e.app?{...e}:{...e,app:t.payload.app};case"SET_PLUGIN":return e.plugin?{...e}:{...e,plugin:t.payload.plugin};case"SET_EDITOR":return e.editor?{...e}:{...e,editor:t.payload.editor};case"SET_SETTINGS":return e.settings&&e.settings===t.payload.settings?{...e}:{...e,settings:t.payload.settings};case"SET_VIEW":return e.view&&((r=(n=e.view)==null?void 0:n.leaf)==null?void 0:r.id)===((o=(a=t.payload.view)==null?void 0:a.leaf)==null?void 0:o.id)?{...e}:{...e,view:t.payload.view};case"CLEAR_VIEW":return e.view&&e.view.unload(),{...e,view:null};case"CLEAR_FILES":return{...e,dailyNotes:null};case"SET_VERIFY_STATE":return{...e,verifyState:t.payload.verifyState};default:return e}}const ER={dailyNotes:null,app:null,view:null,settings:null,editor:null,plugin:null,verifyState:null},Le=n7({globalState:a7,locationState:qN,memoState:fA,userState:SR,queryState:TR,dailyNotesState:ER},t7({globalState:r7,locationState:o7,memoState:wR,userState:bR,queryState:DR,dailyNotesState:IR})),Lt=P.createContext(Le.getState());String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return Object.prototype.toString.call(e).toLowerCase()==="[object regexp]"?this.replace(e,t):this.replace(new RegExp(e,"g"),t)});class CR{constructor(){Se(this,"initialized",!1)}getState(){return Le.getState().dailyNotesState}setApp(t){return Le.dispatch({type:"SET_APP",payload:{app:t}}),t}setPlugin(t){return Le.dispatch({type:"SET_PLUGIN",payload:{plugin:t}}),t}setSettings(t){return Le.dispatch({type:"SET_SETTINGS",payload:{settings:t}}),this.initialized||(this.initialized=!0),t}setView(t){return Le.dispatch({type:"SET_VIEW",payload:{view:t}}),t}setEditor(t){return Le.dispatch({type:"SET_EDITOR",payload:{editor:t}}),t}async updateDailyNotes(t,n){const r=this.getState().dailyNotes,a=hp(t,"day");return n?delete r[`day-${a.format("YYYY-MM-DD")}T00:00:00+08:00}`]:r[`day-${a.format("YYYY-MM-DD")}T00:00:00+08:00}`]=t,Le.dispatch({type:"SET_DAILY_NOTES",payload:{dailyNotes:r}}),r}setVerifyState(t){return Le.dispatch({type:"SET_VERIFY_STATE",payload:{verifyState:t}}),t}async fechLocalDailyNotes(){try{const t=Ju();return Le.dispatch({type:"SET_DAILY_NOTES",payload:{dailyNotes:t}}),t}catch(t){console.error(t)}}}const ft=new CR;var la;(e=>{function t(o){const i={};for(const l of o)try{const c=localStorage.getItem(l);if(c!==null){const f=JSON.parse(c);i[l]=f}}catch(c){console.error("Get storage failed in ",l,c)}return i}e.get=t;function n(o){for(const i in o)try{const l=JSON.stringify(o[i]);localStorage.setItem(i,l)}catch(l){console.error("Save storage failed in ",i,l)}}e.set=n;function r(o){for(const i of o)try{localStorage.removeItem(i)}catch(l){console.error("Remove storage failed in ",i,l)}}e.remove=r;function a(){var i;const o=document.createElement("iframe");o.style.display="none",document.body.appendChild(o),(i=o.contentWindow)==null||i.localStorage.setItem("t",Date.now().toString()),o.remove()}e.emitStorageChangedEvent=a})(la||(la={}));class xR{constructor(){Se(this,"getState",()=>Le.getState().globalState);Se(this,"setEditMemoId",t=>{Le.dispatch({type:"SET_EDIT_MEMO_ID",payload:{editMemoId:t}})});Se(this,"setRefresh",t=>{Le.dispatch({type:"SET_REFRESH",payload:{refresh:t}})});Se(this,"setCommentMemoId",t=>{Le.dispatch({type:"SET_COMMENT_MEMO_ID",payload:{commentMemoId:t}})});Se(this,"setMarkMemoId",t=>{Le.dispatch({type:"SET_MARK_MEMO_ID",payload:{markMemoId:t}})});Se(this,"setLoaded",t=>{Le.dispatch({type:"SET_LOADED",payload:{loaded:t}})});Se(this,"setGlobalEditorShown",t=>{Le.dispatch({type:"SET_GLOBAL_EDITOR_SHOWN",payload:{globalEditorShown:t}})});Se(this,"setIsMobileView",t=>{Le.dispatch({type:"SET_MOBILE_VIEW",payload:{isMobileView:t}})});Se(this,"setChangedByMemos",t=>{Le.dispatch({type:"SET_CHANGED_BY_MEMOS",payload:{changedByMemos:t}})});Se(this,"setShowSiderbarInMobileView",t=>{Le.dispatch({type:"SET_SHOW_SIDEBAR_IN_MOBILE_VIEW",payload:{showSiderbarInMobileView:t}})});Se(this,"setAppSetting",t=>{Le.dispatch({type:"SET_APP_SETTING",payload:t}),la.set(t)});Se(this,"setMemoListView",t=>{Le.dispatch({type:"SET_MEMO_LIST_VIEW",payload:{memoListView:t}})});Se(this,"setInstance",(t,n)=>{Le.dispatch({type:"SET_INSTANCE",payload:{id:t,instance:n}})});Se(this,"setLocked",t=>{Le.dispatch({type:"SET_LOCKED",payload:{locked:t}})});Se(this,"setExitSteps",t=>{Le.dispatch({type:"SET_EXIT_STEPS",payload:{exited:t}})});Se(this,"setPluginManifest",t=>{Le.dispatch({type:"SET_MEMO_PLUGIN_MANIFEST",payload:{manifest:t}})});const t=la.get(["shouldSplitMemoWord","shouldHideImageUrl","shouldUseMarkdownParser","useTinyUndoHistoryCache"]),n={shouldSplitMemoWord:t.shouldSplitMemoWord||!0,shouldHideImageUrl:t.shouldHideImageUrl||!0,shouldUseMarkdownParser:t.shouldUseMarkdownParser||!0,useTinyUndoHistoryCache:t.useTinyUndoHistoryCache||!1};this.setAppSetting(n)}}const dt=new xR;class MR{constructor(){Se(this,"updateStateWithLocation",()=>{const{pathname:t,search:n,hash:r}=window.location,a=new URLSearchParams(n),o={pathname:"/",hash:"",query:{tag:"",duration:null,text:"",type:"",filter:""}};o.query.tag=a.get("tag")||"",o.query.type=a.get("type")??"",o.query.text=a.get("text")??"",o.query.filter=a.get("filter")??"";const i=parseInt(a.get("from")??"0"),l=parseInt(a.get("to")??"0");l>i&&l!==0&&(o.query.duration={from:i,to:l}),o.hash=r,o.pathname=this.getValidPathname(t),Le.dispatch({type:"SET_LOCATION",payload:o})});Se(this,"getState",()=>Le.getState().locationState);Se(this,"clearQuery",()=>{Le.dispatch({type:"SET_QUERY",payload:{tag:"",duration:null,text:"",type:"",filter:""}})});Se(this,"setQuery",t=>{Le.dispatch({type:"SET_QUERY",payload:t})});Se(this,"reloadApp",()=>{Le.dispatch({type:"RELOAD"})});Se(this,"setHash",t=>{Le.dispatch({type:"SET_HASH",payload:{hash:t}})});Se(this,"setPathname",t=>{Le.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})});Se(this,"pushHistory",t=>{Le.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})});Se(this,"replaceHistory",t=>{Le.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})});Se(this,"setMemoTypeQuery",(t="")=>{Le.dispatch({type:"SET_TYPE",payload:{type:t}})});Se(this,"setMemoFilter",t=>{Le.dispatch({type:"SET_QUERY_FILTER",payload:t})});Se(this,"setTextQuery",t=>{Le.dispatch({type:"SET_TEXT",payload:{text:t}})});Se(this,"setTimeQuery",t=>{Le.dispatch({type:"SET_DURATION_QUERY",payload:{duration:t}})});Se(this,"setPathQuery",t=>{Le.dispatch({type:"SET_PATH_QUERY",payload:{path:t}})});Se(this,"setMetadataQuery",(t,n)=>{Le.dispatch({type:"SET_METADATA_QUERY",payload:{name:t,value:n}})});Se(this,"setTagQuery",t=>{Le.dispatch({type:"SET_TAG_QUERY",payload:{tag:t}})});Se(this,"setFromAndToQuery",(t,n)=>{Le.dispatch({type:"SET_DURATION_QUERY",payload:{duration:{from:t,to:n}}})});Se(this,"getValidPathname",t=>["/","/homeboard","/recycle","/setting"].includes(t)?t:"/");this.updateStateWithLocation(),window.onpopstate=()=>{this.updateStateWithLocation()}}}const at=new MR,ff=e=>`${e.vault.configDir}/query.json`,hA=async(e,t)=>{try{return await e.vault.adapter.read(t),!0}catch(n){return console.error(n),!1}},Rp=async e=>(await hA(e,ff(e))||await pA(e),JSON.parse(await e.vault.adapter.read(ff(e))).queries||[]),Av=async(e,t)=>{await e.vault.adapter.write(ff(e),JSON.stringify({queries:t},null,2))},pA=async e=>{const t=dt.getState().manifest,n=e.plugins.getPlugin(t.id||"obsidian-memos").settings,r=e.metadataCache.getFirstLinkpathDest(n.QueryFileName,"");if(!r)await e.vault.adapter.write(ff(e),JSON.stringify({queries:[]},null,2));else{const o=(await e.vault.read(r)).split(`
-`);o.length===0&&await e.vault.adapter.write(ff(e),JSON.stringify({queries:[]},null,2));const i=[];for(let l=0;l{const{app:e}=Le.getState().dailyNotesState;return await hA(e,ff(e))||await pA(e),await Rp(e)||[]},NR=(e,t)=>({createdAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),id:e,pinnedAt:"",querystring:t,title:E("Temp Filter"),updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),userId:"Thino"}),AR=async(e,t)=>{const n=await Rp(Le.getState().dailyNotesState.app)||[],r={createdAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),id:x.moment().format("YYYYMMDDHHmmss")+n.length,pinnedAt:"",querystring:t,title:e,updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),userId:"Thino"};return n.push(r),await Av(Le.getState().dailyNotesState.app,n),r};var Ew={exports:{}};Ew.exports;(function(e,t){(function(){var n,r="4.17.21",a=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",l="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",g=1,y=2,w=4,S=1,D=2,I=1,M=2,N=4,B=8,k=16,R=32,L=64,_=128,V=256,U=512,Z=30,Q="...",G=800,re=16,de=1,fe=2,$=3,he=1/0,se=9007199254740991,ue=17976931348623157e292,X=NaN,oe=4294967295,De=oe-1,je=oe>>>1,Re=[["ary",_],["bind",I],["bindKey",M],["curry",B],["curryRight",k],["flip",U],["partial",R],["partialRight",L],["rearg",V]],Fe="[object Arguments]",Be="[object Array]",Xe="[object AsyncFunction]",Ze="[object Boolean]",st="[object Date]",Ct="[object DOMException]",tn="[object Error]",_e="[object Function]",et="[object GeneratorFunction]",nt="[object Map]",ht="[object Number]",St="[object Null]",Tt="[object Object]",Gt="[object Promise]",_t="[object Proxy]",Vt="[object RegExp]",Xt="[object Set]",dn="[object String]",en="[object Symbol]",Zn="[object Undefined]",Dn="[object WeakMap]",Er="[object WeakSet]",pt="[object ArrayBuffer]",Mt="[object DataView]",Jt="[object Float32Array]",sn="[object Float64Array]",ln="[object Int8Array]",vr="[object Int16Array]",fr="[object Int32Array]",ha="[object Uint8Array]",jr="[object Uint8ClampedArray]",nr="[object Uint16Array]",Lr="[object Uint32Array]",te=/\b__p \+= '';/g,me=/\b(__p \+=) '' \+/g,xe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ue=/&(?:amp|lt|gt|quot|#39);/g,He=/[&<>"']/g,Qe=RegExp(Ue.source),tt=RegExp(He.source),kt=/<%-([\s\S]+?)%>/g,Ut=/<%([\s\S]+?)%>/g,On=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Cr=/^\w*$/,Jn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yr=/[\\^$.*+?()[\]{}|]/g,ta=RegExp(yr.source),Pi=/^\s+/,Nn=/\s/,Aa=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fa=/\{\n\/\* \[wrapped with (.+)\] \*/,Zr=/,? & /,fo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Oa=/[()=,{}\[\]\/\s]/,iu=/\\(\\)?/g,si=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,li=/\w*$/,nc=/^[-+]0x[0-9a-f]+$/i,su=/^0b[01]+$/i,us=/^\[object .+?Constructor\]$/,ji=/^0o[0-7]+$/i,cs=/^(?:0|[1-9]\d*)$/,lu=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ds=/($^)/,rc=/['\n\r\u2028\u2029\\]/g,An="\\ud800-\\udfff",na="\\u0300-\\u036f",qs="\\ufe20-\\ufe2f",Gs="\\u20d0-\\u20ff",ui=na+qs+Gs,uu="\\u2700-\\u27bf",Fo="a-z\\xdf-\\xf6\\xf8-\\xff",ho="\\xac\\xb1\\xd7\\xf7",Pa="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fs="\\u2000-\\u206f",Rr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Js="A-Z\\xc0-\\xd6\\xd8-\\xde",Ks="\\ufe0e\\ufe0f",Qs=ho+Pa+fs+Rr,po="['’]",hs="["+An+"]",ci="["+Qs+"]",mo="["+ui+"]",A="\\d+",Y="["+uu+"]",K="["+Fo+"]",ie="[^"+An+Qs+A+uu+Fo+Js+"]",Ne="\\ud83c[\\udffb-\\udfff]",Ie="(?:"+mo+"|"+Ne+")",Ye="[^"+An+"]",it="(?:\\ud83c[\\udde6-\\uddff]){2}",ct="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+Js+"]",$t="\\u200d",Pn="(?:"+K+"|"+ie+")",Ga="(?:"+Ft+"|"+ie+")",ja="(?:"+po+"(?:d|ll|m|re|s|t|ve))?",ra="(?:"+po+"(?:D|LL|M|RE|S|T|VE))?",Oo=Ie+"?",La="["+Ks+"]?",Ja="(?:"+$t+"(?:"+[Ye,it,ct].join("|")+")"+La+Oo+")*",pa="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",go="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ra=La+Oo+Ja,Li="(?:"+[Y,it,ct].join("|")+")"+Ra,Ri="(?:"+[Ye+mo+"?",mo,it,ct,hs].join("|")+")",dm=RegExp(po,"g"),Bf=RegExp(mo,"g"),ps=RegExp(Ne+"(?="+Ne+")|"+Ri+Ra,"g"),fm=RegExp([Ft+"?"+K+"+"+ja+"(?="+[ci,Ft,"$"].join("|")+")",Ga+"+"+ra+"(?="+[ci,Ft+Pn,"$"].join("|")+")",Ft+"?"+Pn+"+"+ja,Ft+"+"+ra,go,pa,A,Li].join("|"),"g"),Po=RegExp("["+$t+An+ui+Ks+"]"),Xs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,cu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bn=-1,hn={};hn[Jt]=hn[sn]=hn[ln]=hn[vr]=hn[fr]=hn[ha]=hn[jr]=hn[nr]=hn[Lr]=!0,hn[Fe]=hn[Be]=hn[pt]=hn[Ze]=hn[Mt]=hn[st]=hn[tn]=hn[_e]=hn[nt]=hn[ht]=hn[Tt]=hn[Vt]=hn[Xt]=hn[dn]=hn[Dn]=!1;var pn={};pn[Fe]=pn[Be]=pn[pt]=pn[Mt]=pn[Ze]=pn[st]=pn[Jt]=pn[sn]=pn[ln]=pn[vr]=pn[fr]=pn[nt]=pn[ht]=pn[Tt]=pn[Vt]=pn[Xt]=pn[dn]=pn[en]=pn[ha]=pn[jr]=pn[nr]=pn[Lr]=!0,pn[tn]=pn[_e]=pn[Dn]=!1;var jo={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},vo={"&":"&","<":"<",">":">",'"':""","'":"'"},ac={"&":"&","<":"<",">":">",""":'"',"'":"'"},ms={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},oc=parseFloat,el=parseInt,tl=typeof dr=="object"&&dr&&dr.Object===Object&&dr,fd=typeof self=="object"&&self&&self.Object===Object&&self,zn=tl||fd||Function("return this")(),nl=t&&!t.nodeType&&t,Lo=nl&&!0&&e&&!e.nodeType&&e,hd=Lo&&Lo.exports===nl,di=hd&&tl.process,qr=function(){try{var be=Lo&&Lo.require&&Lo.require("util").types;return be||di&&di.binding&&di.binding("util")}catch{}}(),rl=qr&&qr.isArrayBuffer,Gr=qr&&qr.isDate,gs=qr&&qr.isMap,_i=qr&&qr.isRegExp,al=qr&&qr.isSet,ic=qr&&qr.isTypedArray;function xr(be,ze,Oe){switch(Oe.length){case 0:return be.call(ze);case 1:return be.call(ze,Oe[0]);case 2:return be.call(ze,Oe[0],Oe[1]);case 3:return be.call(ze,Oe[0],Oe[1],Oe[2])}return be.apply(ze,Oe)}function vs(be,ze,Oe,vt){for(var Qt=-1,Tn=be==null?0:be.length;++Qt-1}function aa(be,ze,Oe){for(var vt=-1,Qt=be==null?0:be.length;++vt-1;);return Oe}function oa(be,ze){for(var Oe=be.length;Oe--&&ys(ze,be[Oe],0)>-1;);return Oe}function Ka(be,ze){for(var Oe=be.length,vt=0;Oe--;)be[Oe]===ze&&++vt;return vt}var Qa=H(jo),pu=H(vo);function vd(be){return"\\"+ms[be]}function Bi(be,ze){return be==null?n:be[ze]}function dc(be){return Po.test(be)}function P1(be){return Xs.test(be)}function j1(be){for(var ze,Oe=[];!(ze=be.next()).done;)Oe.push(ze.value);return Oe}function Yf(be){var ze=-1,Oe=Array(be.size);return be.forEach(function(vt,Qt){Oe[++ze]=[Qt,vt]}),Oe}function hm(be,ze){return function(Oe){return be(ze(Oe))}}function _o(be,ze){for(var Oe=-1,vt=be.length,Qt=0,Tn=[];++Oe-1}function ky(d,p){var T=this.__data__,j=wa(T,d);return j<0?(++this.size,T.push([d,p])):T[j][1]=p,this}_a.prototype.clear=Dc,_a.prototype.delete=to,_a.prototype.get=nh,_a.prototype.has=My,_a.prototype.set=ky;function Ho(d){var p=-1,T=d==null?0:d.length;for(this.clear();++p=p?d:p)),d}function no(d,p,T,j,z,ee){var ce,ve=p&g,Te=p&y,We=p&w;if(T&&(ce=z?T(d,j,z,ee):T(d)),ce!==n)return ce;if(!Sr(d))return d;var $e=an(d);if($e){if(ce=Qy(d),!ve)return Ha(d,ce)}else{var Ke=Ta(d),mt=Ke==_e||Ke==et;if(Hc(d))return Om(d,ve);if(Ke==Tt||Ke==Fe||mt&&!z){if(ce=Te||mt?{}:Pc(d),!ve)return Te?z1(d,pi(ce,d)):Yy(d,Xn(ce,d))}else{if(!pn[Ke])return z?d:{};ce=Ia(d,Ke,ve)}}ee||(ee=new ya);var Nt=ee.get(d);if(Nt)return Nt;ee.set(d,ce),fC(d)?d.forEach(function(zt){ce.add(no(zt,p,T,zt,d,ee))}):cC(d)&&d.forEach(function(zt,mn){ce.set(mn,no(zt,p,T,mn,d,ee))});var Yt=We?Te?Yd:Mh:Te?qo:Ca,cn=$e?n:Yt(d);return wr(cn||d,function(zt,mn){cn&&(mn=zt,zt=d[mn]),Du(ce,mn,no(zt,p,T,mn,d,ee))}),ce}function Oy(d){var p=Ca(d);return function(T){return kd(T,d,p)}}function kd(d,p,T){var j=T.length;if(d==null)return!j;for(d=Un(d);j--;){var z=T[j],ee=p[z],ce=d[z];if(ce===n&&!(z in d)||!ee(ce))return!1}return!0}function Sm(d,p,T){if(typeof d!="function")throw new Bo(i);return Lc(function(){d.apply(n,T)},p)}function $i(d,p,T,j){var z=-1,ee=ol,ce=!0,ve=d.length,Te=[],We=p.length;if(!ve)return Te;T&&(p=jn(p,It(T))),j?(ee=aa,ce=!1):p.length>=a&&(ee=Rt,ce=!1,p=new wu(p));e:for(;++zz?0:z+T),j=j===n||j>z?z:un(j),j<0&&(j+=z),j=T>j?0:pC(j);T0&&T(ve)?p>1?_r(ve,p-1,T,j,z):Ro(z,ve):j||(z[z.length]=ve)}return z}var Nd=_m(),lh=_m(!0);function zo(d,p){return d&&Nd(d,p,Ca)}function pl(d,p){return d&&lh(d,p,Ca)}function Ba(d,p){return fi(p,function(T){return Fu(d[T])})}function So(d,p){p=Is(p,d);for(var T=0,j=p.length;d!=null&&Tp}function ml(d,p){return d!=null&&In.call(d,p)}function Dm(d,p){return d!=null&&p in Un(d)}function jy(d,p,T){return d>=ma(p,T)&&d=120&&$e.length>=120)?new wu(ce&&$e):n}$e=d[0];var Ke=-1,mt=ve[0];e:for(;++Ke-1;)ve!==d&&Gf.call(ve,Te,1),Gf.call(d,Te,1);return d}function Pd(d,p){for(var T=d?p.length:0,j=T-1;T--;){var z=p[T];if(T==j||z!==ee){var ee=z;Vo(z)?Gf.call(d,z,1):Cu(d,z)}}return d}function jd(d,p){return d+ll(Id()*(p-d+1))}function Nm(d,p,T,j){for(var z=-1,ee=kr(vu((p-d)/(T||1)),0),ce=Oe(ee);ee--;)ce[j?ee:++z]=d,d+=T;return ce}function xc(d,p){var T="";if(!d||p<1||p>se)return T;do p%2&&(T+=d),p=ll(p/2),p&&(d+=d);while(p);return T}function rn(d,p){return Oh(Ah(d,p,Go),d+"")}function Eu(d){return Vi(Xh(d))}function or(d,p){var T=Xh(d);return To(T,Ts(p,0,T.length))}function ir(d,p,T,j){if(!Sr(d))return d;p=Is(p,d);for(var z=-1,ee=p.length,ce=ee-1,ve=d;ve!=null&&++zz?0:z+p),T=T>z?z:T,T<0&&(T+=z),z=p>T?0:T-p>>>0,p>>>=0;for(var ee=Oe(z);++j>>1,ce=d[ee];ce!==null&&!Di(ce)&&(T?ce<=p:ce=a){var We=p?null:Ua(d);if(We)return sl(We);ce=!1,z=Rt,Te=new wu}else Te=p?[]:ve;e:for(;++j=j?d:Sa(d,p,T)}var kc=Ey||function(d){return zn.clearTimeout(d)};function Om(d,p){if(p)return d.slice();var T=d.length,j=mm?mm(T):new d.constructor(T);return d.copy(j),j}function Nc(d){var p=new d.constructor(d.byteLength);return new Dd(p).set(new Dd(d)),p}function Dh(d,p){var T=p?Nc(d.buffer):d.buffer;return new d.constructor(T,d.byteOffset,d.byteLength)}function Hy(d){var p=new d.constructor(d.source,li.exec(d));return p.lastIndex=d.lastIndex,p}function Pm(d){return wo?Un(wo.call(d)):{}}function jm(d,p){var T=p?Nc(d.buffer):d.buffer;return new d.constructor(T,d.byteOffset,d.length)}function Lm(d,p){if(d!==p){var T=d!==n,j=d===null,z=d===d,ee=Di(d),ce=p!==n,ve=p===null,Te=p===p,We=Di(p);if(!ve&&!We&&!ee&&d>p||ee&&ce&&Te&&!ve&&!We||j&&ce&&Te||!T&&Te||!z)return 1;if(!j&&!ee&&!We&&d=ve)return Te;var We=T[j];return Te*(We=="desc"?-1:1)}}return d.index-p.index}function Rm(d,p,T,j){for(var z=-1,ee=d.length,ce=T.length,ve=-1,Te=p.length,We=kr(ee-ce,0),$e=Oe(Te+We),Ke=!j;++ve1?T[z-1]:n,ce=z>2?T[2]:n;for(ee=d.length>3&&typeof ee=="function"?(z--,ee):n,ce&&Fn(T[0],T[1],ce)&&(ee=z<3?n:ee,z=1),p=Un(p);++j-1?z[ee?p[ce]:ce]:n}}function xu(d){return Gi(function(p){var T=p.length,j=T,z=ga.prototype.thru;for(d&&p.reverse();j--;){var ee=p[j];if(typeof ee!="function")throw new Bo(i);if(z&&!ce&&Vd(ee)=="wrapper")var ce=new ga([],!0)}for(j=ce?j:T;++j1&&Sn.reverse(),$e&&Teve))return!1;var We=ee.get(d),$e=ee.get(p);if(We&&$e)return We==p&&$e==d;var Ke=-1,mt=!0,Nt=T&D?new wu:n;for(ee.set(d,p),ee.set(p,d);++Ke1?"& ":"")+p[j],p=p.join(T>2?", ":" "),d.replace(Aa,`{
-/* [wrapped with `+p+`] */
-`)}function $1(d){return an(d)||Qd(d)||!!(Iy&&d&&d[Iy])}function Vo(d,p){var T=typeof d;return p=p??se,!!p&&(T=="number"||T!="symbol"&&cs.test(d))&&d>-1&&d%1==0&&d0){if(++p>=G)return arguments[0]}else p=0;return d.apply(n,arguments)}}function To(d,p){var T=-1,j=d.length,z=j-1;for(p=p===n?j:p;++T
1?d[p-1]:n;return T=typeof T=="function"?(d.pop(),T):n,sg(d,T)});function Eo(d){var p=J(d);return p.__chain__=!0,p}function lg(d,p){return p(d),d}function Uh(d,p){return p(d)}var kl=Gi(function(d){var p=d.length,T=p?d[0]:0,j=this.__wrapped__,z=function(ee){return ih(ee,d)};return p>1||this.__actions__.length||!(j instanceof nn)||!Vo(T)?this.thru(z):(j=j.slice(T,+T+(p?1:0)),j.__actions__.push({func:Uh,args:[z],thisArg:n}),new ga(j,this.__chain__).thru(function(ee){return p&&!ee.length&&ee.push(n),ee}))});function Yh(){return Eo(this)}function Au(){return new ga(this.value(),this.__chain__)}function zh(){this.__values__===n&&(this.__values__=hC(this.value()));var d=this.__index__>=this.__values__.length,p=d?n:this.__values__[this.__index__++];return{done:d,value:p}}function ug(){return this}function cg(d){for(var p,T=this;T instanceof Yi;){var j=Km(T);j.__index__=0,j.__values__=n,p?z.__wrapped__=j:p=j;var z=j;T=T.__wrapped__}return z.__wrapped__=d,p}function nS(){var d=this.__wrapped__;if(d instanceof nn){var p=d;return this.__actions__.length&&(p=new nn(this)),p=p.reverse(),p.__actions__.push({func:Uh,args:[Ea],thisArg:n}),new ga(p,this.__chain__)}return this.thru(Ea)}function dg(){return Am(this.__wrapped__,this.__actions__)}var rS=_d(function(d,p,T){In.call(d,T)?++d[T]:Wi(d,T,1)});function p0(d,p,T){var j=an(d)?sc:mi;return T&&Fn(d,p,T)&&(p=n),j(d,Ot(p,3))}function m0(d,p){var T=an(d)?fi:Iu;return T(d,Ot(p,3))}var Vh=Wy(_c),Wh=Wy(Il);function g0(d,p){return _r(Gh(d,p),1)}function fg(d,p){return _r(Gh(d,p),he)}function aS(d,p,T){return T=T===n?1:un(T),_r(Gh(d,p),T)}function hg(d,p){var T=an(d)?wr:Zi;return T(d,Ot(p,3))}function $h(d,p){var T=an(d)?du:Py;return T(d,Ot(p,3))}var Zh=_d(function(d,p,T){In.call(d,T)?d[T].push(p):Wi(d,T,[p])});function pg(d,p,T,j){d=Zo(d)?d:Xh(d),T=T&&!j?un(T):0;var z=d.length;return T<0&&(T=kr(z+T,0)),w0(d)?T<=z&&d.indexOf(p,T)>-1:!!z&&ys(d,p,T)>-1}var qh=rn(function(d,p,T){var j=-1,z=typeof p=="function",ee=Zo(d)?Oe(d.length):[];return Zi(d,function(ce){ee[++j]=z?xr(p,ce,T):vl(ce,p,T)}),ee}),v0=_d(function(d,p,T){Wi(d,T,p)});function Gh(d,p){var T=an(d)?jn:xm;return T(d,Ot(p,3))}function Jh(d,p,T,j){return d==null?[]:(an(p)||(p=p==null?[]:[p]),T=j?n:T,an(T)||(T=T==null?[]:[T]),ph(d,p,T))}var oS=_d(function(d,p,T){d[T?0:1].push(p)},function(){return[[],[]]});function Kd(d,p,T){var j=an(d)?pd:q,z=arguments.length<3;return j(d,Ot(p,4),T,z,Zi)}function iS(d,p,T){var j=an(d)?Hf:q,z=arguments.length<3;return j(d,Ot(p,4),T,z,Py)}function Kh(d,p){var T=an(d)?fi:Iu;return T(d,Me(Ot(p,3)))}function s(d){var p=an(d)?Vi:Eu;return p(d)}function u(d,p,T){(T?Fn(d,p,T):p===n)?p=1:p=un(p);var j=an(d)?Su:or;return j(d,p)}function m(d){var p=an(d)?Fy:Ld;return p(d)}function b(d){if(d==null)return 0;if(Zo(d))return w0(d)?mu(d):d.length;var p=Ta(d);return p==nt||p==Xt?d.size:hh(d).length}function C(d,p,T){var j=an(d)?il:Y1;return T&&Fn(d,p,T)&&(p=n),j(d,Ot(p,3))}var O=rn(function(d,p){if(d==null)return[];var T=p.length;return T>1&&Fn(d,p[0],p[1])?p=[]:T>2&&Fn(p[0],p[1],p[2])&&(p=[p[0]]),ph(d,_r(p,1),[])}),W=Kn||function(){return zn.Date.now()};function le(d,p){if(typeof p!="function")throw new Bo(i);return d=un(d),function(){if(--d<1)return p.apply(this,arguments)}}function ge(d,p,T){return p=T?n:p,p=d&&p==null?d.length:p,qi(d,_,n,n,n,n,p)}function Pe(d,p){var T;if(typeof p!="function")throw new Bo(i);return d=un(d),function(){return--d>0&&(T=p.apply(this,arguments)),d<=1&&(p=n),T}}var Ge=rn(function(d,p,T){var j=I;if(T.length){var z=_o(T,Sl(Ge));j|=R}return qi(d,j,p,T,z)}),rt=rn(function(d,p,T){var j=I|M;if(T.length){var z=_o(T,Sl(rt));j|=R}return qi(p,j,d,T,z)});function qe(d,p,T){p=T?n:p;var j=qi(d,B,n,n,n,n,n,p);return j.placeholder=qe.placeholder,j}function yt(d,p,T){p=T?n:p;var j=qi(d,k,n,n,n,n,n,p);return j.placeholder=yt.placeholder,j}function Dt(d,p,T){var j,z,ee,ce,ve,Te,We=0,$e=!1,Ke=!1,mt=!0;if(typeof d!="function")throw new Bo(i);p=Ki(p)||0,Sr(T)&&($e=!!T.leading,Ke="maxWait"in T,ee=Ke?kr(Ki(T.maxWait)||0,p):ee,mt="trailing"in T?!!T.trailing:mt);function Nt(Wr){var As=j,Pu=z;return j=z=n,We=Wr,ce=d.apply(Pu,As),ce}function Yt(Wr){return We=Wr,ve=Lc(mn,p),$e?Nt(Wr):ce}function cn(Wr){var As=Wr-Te,Pu=Wr-We,CC=p-As;return Ke?ma(CC,ee-Pu):CC}function zt(Wr){var As=Wr-Te,Pu=Wr-We;return Te===n||As>=p||As<0||Ke&&Pu>=ee}function mn(){var Wr=W();if(zt(Wr))return Sn(Wr);ve=Lc(mn,cn(Wr))}function Sn(Wr){return ve=n,mt&&j?Nt(Wr):(j=z=n,ce)}function Ti(){ve!==n&&kc(ve),We=0,j=Te=z=ve=n}function Co(){return ve===n?ce:Sn(W())}function Ii(){var Wr=W(),As=zt(Wr);if(j=arguments,z=this,Te=Wr,As){if(ve===n)return Yt(Te);if(Ke)return kc(ve),ve=Lc(mn,p),Nt(Te)}return ve===n&&(ve=Lc(mn,p)),ce}return Ii.cancel=Ti,Ii.flush=Co,Ii}var Et=rn(function(d,p){return Sm(d,1,p)}),br=rn(function(d,p,T){return Sm(d,Ki(p)||0,T)});function Ce(d){return qi(d,U)}function ye(d,p){if(typeof d!="function"||p!=null&&typeof p!="function")throw new Bo(i);var T=function(){var j=arguments,z=p?p.apply(this,j):j[0],ee=T.cache;if(ee.has(z))return ee.get(z);var ce=d.apply(this,j);return T.cache=ee.set(z,ce)||ee,ce};return T.cache=new(ye.Cache||Ho),T}ye.Cache=Ho;function Me(d){if(typeof d!="function")throw new Bo(i);return function(){var p=arguments;switch(p.length){case 0:return!d.call(this);case 1:return!d.call(this,p[0]);case 2:return!d.call(this,p[0],p[1]);case 3:return!d.call(this,p[0],p[1],p[2])}return!d.apply(this,p)}}function lt(d){return Pe(2,d)}var xt=By(function(d,p){p=p.length==1&&an(p[0])?jn(p[0],It(Ot())):jn(_r(p,1),It(Ot()));var T=p.length;return rn(function(j){for(var z=-1,ee=ma(j.length,T);++z=p}),Qd=Tm(function(){return arguments}())?Tm:function(d){return Ar(d)&&In.call(d,"callee")&&!qf.call(d,"callee")},an=Oe.isArray,LP=rl?It(rl):ch;function Zo(d){return d!=null&&y0(d.length)&&!Fu(d)}function Vr(d){return Ar(d)&&Zo(d)}function RP(d){return d===!0||d===!1||Ar(d)&&ba(d)==Ze}var Hc=vm||yS,_P=Gr?It(Gr):Ly;function BP(d){return Ar(d)&&d.nodeType===1&&!mg(d)}function HP(d){if(d==null)return!0;if(Zo(d)&&(an(d)||typeof d=="string"||typeof d.splice=="function"||Hc(d)||Qh(d)||Qd(d)))return!d.length;var p=Ta(d);if(p==nt||p==Xt)return!d.size;if(Wd(d))return!hh(d).length;for(var T in d)if(In.call(d,T))return!1;return!0}function UP(d,p){return Ic(d,p)}function YP(d,p,T){T=typeof T=="function"?T:n;var j=T?T(d,p):n;return j===n?Ic(d,p,n,T):!!j}function lS(d){if(!Ar(d))return!1;var p=ba(d);return p==tn||p==Ct||typeof d.message=="string"&&typeof d.name=="string"&&!mg(d)}function zP(d){return typeof d=="number"&&mc(d)}function Fu(d){if(!Sr(d))return!1;var p=ba(d);return p==_e||p==et||p==Xe||p==_t}function uC(d){return typeof d=="number"&&d==un(d)}function y0(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=se}function Sr(d){var p=typeof d;return d!=null&&(p=="object"||p=="function")}function Ar(d){return d!=null&&typeof d=="object"}var cC=gs?It(gs):dh;function VP(d,p){return d===p||fh(d,p,Nh(p))}function WP(d,p,T){return T=typeof T=="function"?T:n,fh(d,p,Nh(p),T)}function $P(d){return dC(d)&&d!=+d}function ZP(d){if(Xy(d))throw new Qt(o);return Em(d)}function qP(d){return d===null}function GP(d){return d==null}function dC(d){return typeof d=="number"||Ar(d)&&ba(d)==ht}function mg(d){if(!Ar(d)||ba(d)!=Tt)return!1;var p=hi(d);if(p===null)return!0;var T=In.call(p,"constructor")&&p.constructor;return typeof T=="function"&&T instanceof T&&wd.call(T)==$f}var uS=_i?It(_i):Ry;function JP(d){return uC(d)&&d>=-se&&d<=se}var fC=al?It(al):Cm;function w0(d){return typeof d=="string"||!an(d)&&Ar(d)&&ba(d)==dn}function Di(d){return typeof d=="symbol"||Ar(d)&&ba(d)==en}var Qh=ic?It(ic):Ad;function KP(d){return d===n}function QP(d){return Ar(d)&&Ta(d)==Dn}function XP(d){return Ar(d)&&ba(d)==Er}var ej=Ud(yl),tj=Ud(function(d,p){return d<=p});function hC(d){if(!d)return[];if(Zo(d))return w0(d)?yo(d):Ha(d);if(Ss&&d[Ss])return j1(d[Ss]());var p=Ta(d),T=p==nt?Yf:p==Xt?sl:Xh;return T(d)}function Ou(d){if(!d)return d===0?d:0;if(d=Ki(d),d===he||d===-he){var p=d<0?-1:1;return p*ue}return d===d?d:0}function un(d){var p=Ou(d),T=p%1;return p===p?T?p-T:p:0}function pC(d){return d?Ts(un(d),0,oe):0}function Ki(d){if(typeof d=="number")return d;if(Di(d))return X;if(Sr(d)){var p=typeof d.valueOf=="function"?d.valueOf():d;d=Sr(p)?p+"":p}if(typeof d!="string")return d===0?d:+d;d=ot(d);var T=su.test(d);return T||ji.test(d)?el(d.slice(2),T?2:8):nc.test(d)?X:+d}function mC(d){return wi(d,qo(d))}function nj(d){return d?Ts(un(d),-se,se):d===0?d:0}function Yn(d){return d==null?"":hr(d)}var rj=Ac(function(d,p){if(Wd(p)||Zo(p)){wi(p,Ca(p),d);return}for(var T in p)In.call(p,T)&&Du(d,T,p[T])}),gC=Ac(function(d,p){wi(p,qo(p),d)}),b0=Ac(function(d,p,T,j){wi(p,qo(p),d,j)}),aj=Ac(function(d,p,T,j){wi(p,Ca(p),d,j)}),oj=Gi(ih);function ij(d,p){var T=bc(d);return p==null?T:Xn(T,p)}var sj=rn(function(d,p){d=Un(d);var T=-1,j=p.length,z=j>2?p[2]:n;for(z&&Fn(p[0],p[1],z)&&(j=1);++T1),ee}),wi(d,Yd(d),T),j&&(T=no(T,g|y|w,qy));for(var z=p.length;z--;)Cu(T,p[z]);return T});function Ej(d,p){return yC(d,Me(Ot(p)))}var Cj=Gi(function(d,p){return d==null?{}:Cc(d,p)});function yC(d,p){if(d==null)return{};var T=jn(Yd(d),function(j){return[j]});return p=Ot(p),Mm(d,T,function(j,z){return p(j,z[0])})}function xj(d,p,T){p=Is(p,d);var j=-1,z=p.length;for(z||(z=1,d=n);++jp){var j=d;d=p,p=j}if(T||d%1||p%1){var z=Id();return ma(d+z*(p-d+oc("1e-"+((z+"").length-1))),p)}return jd(d,p)}var _j=Cs(function(d,p,T){return p=p.toLowerCase(),d+(T?SC(p):p)});function SC(d){return fS(Yn(d).toLowerCase())}function DC(d){return d=Yn(d),d&&d.replace(lu,Qa).replace(Bf,"")}function Bj(d,p,T){d=Yn(d),p=hr(p);var j=d.length;T=T===n?j:Ts(un(T),0,j);var z=T;return T-=p.length,T>=0&&d.slice(T,z)==p}function Hj(d){return d=Yn(d),d&&tt.test(d)?d.replace(He,pu):d}function Uj(d){return d=Yn(d),d&&ta.test(d)?d.replace(yr,"\\$&"):d}var Yj=Cs(function(d,p,T){return d+(T?"-":"")+p.toLowerCase()}),zj=Cs(function(d,p,T){return d+(T?" ":"")+p.toLowerCase()}),Vj=Bm("toLowerCase");function Wj(d,p,T){d=Yn(d),p=un(p);var j=p?mu(d):0;if(!p||j>=p)return d;var z=(p-j)/2;return Hd(ll(z),T)+d+Hd(vu(z),T)}function $j(d,p,T){d=Yn(d),p=un(p);var j=p?mu(d):0;return p&&j>>0,T?(d=Yn(d),d&&(typeof p=="string"||p!=null&&!uS(p))&&(p=hr(p),!p&&dc(d))?Es(yo(d),0,T):d.split(p,T)):[]}var Xj=Cs(function(d,p,T){return d+(T?" ":"")+fS(p)});function eL(d,p,T){return d=Yn(d),T=T==null?0:Ts(un(T),0,d.length),p=hr(p),d.slice(T,T+p.length)==p}function tL(d,p,T){var j=J.templateSettings;T&&Fn(d,p,T)&&(p=n),d=Yn(d),p=b0({},p,j,Ym);var z=b0({},p.imports,j.imports,Ym),ee=Ca(z),ce=Kt(z,ee),ve,Te,We=0,$e=p.interpolate||ds,Ke="__p += '",mt=yd((p.escape||ds).source+"|"+$e.source+"|"+($e===On?si:ds).source+"|"+(p.evaluate||ds).source+"|$","g"),Nt="//# sourceURL="+(In.call(p,"sourceURL")?(p.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bn+"]")+`
-`;d.replace(mt,function(zt,mn,Sn,Ti,Co,Ii){return Sn||(Sn=Ti),Ke+=d.slice(We,Ii).replace(rc,vd),mn&&(ve=!0,Ke+=`' +
-__e(`+mn+`) +
-'`),Co&&(Te=!0,Ke+=`';
-`+Co+`;
-__p += '`),Sn&&(Ke+=`' +
-((__t = (`+Sn+`)) == null ? '' : __t) +
-'`),We=Ii+zt.length,zt}),Ke+=`';
-`;var Yt=In.call(p,"variable")&&p.variable;if(!Yt)Ke=`with (obj) {
-`+Ke+`
-}
-`;else if(Oa.test(Yt))throw new Qt(l);Ke=(Te?Ke.replace(te,""):Ke).replace(me,"$1").replace(xe,"$1;"),Ke="function("+(Yt||"obj")+`) {
-`+(Yt?"":`obj || (obj = {});
-`)+"var __t, __p = ''"+(ve?", __e = _.escape":"")+(Te?`, __j = Array.prototype.join;
-function print() { __p += __j.call(arguments, '') }
-`:`;
-`)+Ke+`return __p
-}`;var cn=IC(function(){return Tn(ee,Nt+"return "+Ke).apply(n,ce)});if(cn.source=Ke,lS(cn))throw cn;return cn}function nL(d){return Yn(d).toLowerCase()}function rL(d){return Yn(d).toUpperCase()}function aL(d,p,T){if(d=Yn(d),d&&(T||p===n))return ot(d);if(!d||!(p=hr(p)))return d;var j=yo(d),z=yo(p),ee=Hn(j,z),ce=oa(j,z)+1;return Es(j,ee,ce).join("")}function oL(d,p,T){if(d=Yn(d),d&&(T||p===n))return d.slice(0,Vf(d)+1);if(!d||!(p=hr(p)))return d;var j=yo(d),z=oa(j,yo(p))+1;return Es(j,0,z).join("")}function iL(d,p,T){if(d=Yn(d),d&&(T||p===n))return d.replace(Pi,"");if(!d||!(p=hr(p)))return d;var j=yo(d),z=Hn(j,yo(p));return Es(j,z).join("")}function sL(d,p){var T=Z,j=Q;if(Sr(p)){var z="separator"in p?p.separator:z;T="length"in p?un(p.length):T,j="omission"in p?hr(p.omission):j}d=Yn(d);var ee=d.length;if(dc(d)){var ce=yo(d);ee=ce.length}if(T>=ee)return d;var ve=T-mu(j);if(ve<1)return j;var Te=ce?Es(ce,0,ve).join(""):d.slice(0,ve);if(z===n)return Te+j;if(ce&&(ve+=Te.length-ve),uS(z)){if(d.slice(ve).search(z)){var We,$e=Te;for(z.global||(z=yd(z.source,Yn(li.exec(z))+"g")),z.lastIndex=0;We=z.exec($e);)var Ke=We.index;Te=Te.slice(0,Ke===n?ve:Ke)}}else if(d.indexOf(hr(z),ve)!=ve){var mt=Te.lastIndexOf(z);mt>-1&&(Te=Te.slice(0,mt))}return Te+j}function lL(d){return d=Yn(d),d&&Qe.test(d)?d.replace(Ue,wy):d}var uL=Cs(function(d,p,T){return d+(T?" ":"")+p.toUpperCase()}),fS=Bm("toUpperCase");function TC(d,p,T){return d=Yn(d),p=T?n:p,p===n?P1(d)?_1(d):lc(d):d.match(p)||[]}var IC=rn(function(d,p){try{return xr(d,n,p)}catch(T){return lS(T)?T:new Qt(T)}}),cL=Gi(function(d,p){return wr(p,function(T){T=bi(T),Wi(d,T,Ge(d[T],d))}),d});function dL(d){var p=d==null?0:d.length,T=Ot();return d=p?jn(d,function(j){if(typeof j[1]!="function")throw new Bo(i);return[T(j[0]),j[1]]}):[],rn(function(j){for(var z=-1;++z
se)return[];var T=oe,j=ma(d,oe);p=Ot(p),d-=oe;for(var z=Ee(j,p);++T0||p<0)?new nn(T):(d<0?T=T.takeRight(-d):d&&(T=T.drop(d)),p!==n&&(p=un(p),T=p<0?T.dropRight(-p):T.take(p-d)),T)},nn.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},nn.prototype.toArray=function(){return this.take(oe)},zo(nn.prototype,function(d,p){var T=/^(?:filter|find|map|reject)|While$/.test(p),j=/^(?:head|last)$/.test(p),z=J[j?"take"+(p=="last"?"Right":""):p],ee=j||/^find/.test(p);z&&(J.prototype[p]=function(){var ce=this.__wrapped__,ve=j?[1]:arguments,Te=ce instanceof nn,We=ve[0],$e=Te||an(ce),Ke=function(mn){var Sn=z.apply(J,Ro([mn],ve));return j&&mt?Sn[0]:Sn};$e&&T&&typeof We=="function"&&We.length!=1&&(Te=$e=!1);var mt=this.__chain__,Nt=!!this.__actions__.length,Yt=ee&&!mt,cn=Te&&!Nt;if(!ee&&$e){ce=cn?ce:new nn(this);var zt=d.apply(ce,ve);return zt.__actions__.push({func:Uh,args:[Ke],thisArg:n}),new ga(zt,mt)}return Yt&&cn?d.apply(this,ve):(zt=this.thru(Ke),Yt?j?zt.value()[0]:zt.value():zt)})}),wr(["pop","push","shift","sort","splice","unshift"],function(d){var p=ws[d],T=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",j=/^(?:pop|shift)$/.test(d);J.prototype[d]=function(){var z=arguments;if(j&&!this.__chain__){var ee=this.value();return p.apply(an(ee)?ee:[],z)}return this[T](function(ce){return p.apply(an(ce)?ce:[],z)})}}),zo(nn.prototype,function(d,p){var T=J[p];if(T){var j=T.name+"";In.call(yc,j)||(yc[j]=[]),yc[j].push({name:p,func:T})}}),yc[Fc(n,M).name]=[{name:"wrapper",func:n}],nn.prototype.clone=th,nn.prototype.reverse=wm,nn.prototype.value=Sc,J.prototype.at=kl,J.prototype.chain=Yh,J.prototype.commit=Au,J.prototype.next=zh,J.prototype.plant=cg,J.prototype.reverse=nS,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=dg,J.prototype.first=J.prototype.head,Ss&&(J.prototype[Ss]=ug),J},fc=B1();Lo?((Lo.exports=fc)._=fc,nl._=fc):zn._=fc}).call(dr)})(Ew,Ew.exports);var vb=Ew.exports;const Cw=qt(vb);function S0(e){const t=e.match(/^#+/);return t?t[0].length:0}function OC(e,t){const n=e.split(`
-`);let r="",a=[],o=!1,i=1;for(let l=0;lS0(t)?a.push(c):(o=!1,a=[])}else o&&a.push(c)}return t?vb.isEmpty(a)?{content:"",startLine:-1}:{content:a.join(`
-`),startLine:i}:{content:e,startLine:0}}function k2(e){const t={};for(const n of e)n.parent&&n.parent>0&&(t[n.position.start.line]=n.parent);return t}function FR(e,t,n){var g;const r={},a=(y,w)=>{for(;y[w]!==void 0&&y[w]!==w;)w=y[w];return w},o=ft.getState().app,i=n.split(`
-`),l=t+i.length-1,c=(g=o.metadataCache.getFileCache(e))==null?void 0:g.listItems,f={};if(!c)return[];c.forEach(y=>{var D,I;const w=y.position.start.line,S=y.position.end.line;if(w>=t&&S<=l){const M=w-t,N=S-t,B=i.slice(M,N+1),k=B.join(`
-`);if(y.parent&&y.parent>0&&(r[y.position.start.line]=y.parent),y.parent&&f[y.parent]){if(w-y.parent===1){const L=(D=i[M])==null?void 0:D.match(/^(\s*)/);L&&(f[y.parent].indent=L[0])}const R=new RegExp("^"+f[y.parent].indent);f[y.parent].content+=`
-`+k.split(`
-`).map(L=>L==null?void 0:L.replace(R,"")).join(`
-`)}else if(y.parent&&f[a(r,y.parent)]){const R=new RegExp("^"+f[a(r,y.parent)].indent);f[a(r,y.parent)].content+=`
-`+k.split(`
-`).map(L=>L==null?void 0:L.replace(R,"")).join(`
-`)}else if(new RegExp(gR).test(k)){f[w]||(f[w]={content:"",blockId:"",indent:""});const R=B.length>1&&((I=B[1])==null?void 0:I.match(/^(\s*)/));R&&(f[w].indent=R[0]),f[w].content=k.split(`
-`).map(L=>L==null?void 0:L.replace(f[w].indent,"")).join(`
-`),f[w].blockId=y.id}}});const h=Object.keys(f).map(y=>({line:f[y].content,blockId:f[y].blockId||"",index:parseInt(y)}));return e.path.includes("2024-04-07"),h}async function OR(e,t){let n=t.vault.getAbstractFileByPath(e);return n||(new x.Notice(E("File not found for the given thino path, is creating a new file")),n=await t.vault.create(e,'{"nodes": [], "edges": []}'),dt.setChangedByMemos(!0)),n}async function PR(e,t){var a;let n;try{n=await t.vault.read(e)}catch(o){console.error(o),n=await t.vault.cachedRead(e)}const r=(a=t.metadataCache.getFileCache(e))==null?void 0:a.frontmatterPosition;return r?n.slice(r.end.offset+1):n}function jR(e){const t=e.split(/\r?\n/),n=[];let r=!1,a=[],o="";for(let i=0;i [!thino]")?(r&&(n.push({metadata:o,content:a.join(`
-`).trim()}),a=[]),r=!0,o=l.replace("> [!thino]","").trim()):r&&l.startsWith(">")?a.push(l.replace(/^> /,"")):r&&!l.startsWith(">")&&(r=!1,n.push({metadata:o,content:a.join(`
-`).trim()}),a=[],o="")}return r&&n.push({metadata:o,content:a.join(`
-`).trim()}),n}const LR=e=>{let t;switch(e){case" ":t="TASK-TODO";break;case"x":case"X":t="TASK-DONE";break;default:t="TASK-"+e;break}return t};async function RR(e,t){if(!t)return 0;const{vault:n}=Le.getState().dailyNotesState.app,r=e==null?void 0:e.DefaultMemoComposition,a=e!=null&&e.ProcessEntriesBelow&&(e==null?void 0:e.ProcessContentTarget)!=="whole"?e==null?void 0:e.ProcessEntriesBelow:"",o=(e==null?void 0:e.ProcessContentTarget)!=="whole"?e!=null&&e.DifferentInsertTarget?e!=null&&e.InsertAfterForTask?e==null?void 0:e.InsertAfterForTask:"":a:"";let i;try{i=await n.read(t)}catch(S){console.error(S),i=await n.cachedRead(t)}let l;r!=""&&/{TIME}/g.test(r)&&/{CONTENT}/g.test(r)?l="(-|\\*) (\\[(.{1})\\]\\s)?"+r.replace(/{TIME}/g,"((\\)?\\d{1,2}:\\d{2}(\\:\\d{2})?)?").replace(/ {CONTENT}/g,""):l="(-|\\*) (\\[(.{1})\\]\\s)?((\\)?\\d{1,2}\\:\\d{2}(\\:\\d{2})?)?";const c=new RegExp(l,"g"),f=(i.match(c)||[]).length,h=new RegExp(a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g"),g=new RegExp(o.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g"),y=(i.match(h)||[]).length,w=(i.match(g)||[]).length;return i=null,y||w?f:0}function PC(e,t,n,r,a){var g,y,w;const o=Le.getState().dailyNotesState.app||window.app,i=hp(a,"day")||x.moment(a.stat.ctime);let l;const c=FR(a,n,t),f=o==null?void 0:o.metadataCache.getFileCache(a),h={frontmatter:(f==null?void 0:f.frontmatter)||{},tags:((g=f==null?void 0:f.frontmatter)==null?void 0:g.tags)||[]};for(const S of c){const D=UR(e.DefaultMemoComposition,S.line),I=YR(e.DefaultMemoComposition,S.line),M=zR(S.line);let N=_R(S.line);if(i.hours(parseInt(D)),i.minutes(parseInt(I)),M&&i.seconds(parseInt(M)),!M&&i.seconds(0),/^\s*[-*]\s(\[(.)\])\s/g.test(S.line)){const Z=VR(S.line);N=BR(S.line),l=LR(Z)}else l="JOURNAL";let B=N.trim().replaceAll(/ /g,`
-`);const k=new RegExp(/\[(pinned|PINNED)::true\]/,"g").test(N),R=new RegExp(/\[(archived|ARCHIVED)::true\]/,"g").test(N),L=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").test(N),_=(y=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").exec(N))==null?void 0:y[2],V=(w=new RegExp(/\[(webId|WEBID)::([^\]]*)\]/,"g").exec(N))==null?void 0:w[2],U=new RegExp(/\[(visibility|VISIBILITY)::("PROTECT"|"PUBLIC")\]/,"g").test(N)?"PUBLIC":"PRIVATE";B=B.replace(/\s\[pinned::[^\]]+\]/g,"").replace(/\s\[visibility::[^\]]+\]/g,"").replace(/\s\[archived::[^\]]+\]/g,"").replace(/\s\[deleted::[^\]]+\]/g,"").replace(/\s\[webId::[^\]]+\]/g,""),S.blockId&&(B=B.replace("^"+(S==null?void 0:S.blockId),"")),r.push({id:i.format("YYYYMMDDHHmmss")+`${S.index}`,content:B.trim(),createdAt:i.format("YYYY/MM/DD HH:mm:ss"),updatedAt:i.format("YYYY/MM/DD HH:mm:ss"),thinoType:l,hasId:S.blockId?S.blockId:"",linkId:"",path:a.path,deletedAt:L?x.moment(_,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",rowStatus:R?"ARCHIVED":"NORMAL",visibility:U,pinned:k,creatorName:"Memo",resourceList:[],sourceType:"DAILY",webId:V,fileInfo:h})}}function _R(e){return e.replace(/^(-|\*|\d\.) (\d{1,2}:\d{2}(:\d{2})?)\s(.*)/g,"$4")}function BR(e){return HR(e)}const HR=e=>{var r;let t;return t="^(-|\\*|\\d\\.)\\s+\\[.\\]\\s(\\d{1,2}:\\d{2}(:\\d{2})?)\\s([\\w\\W]*)",(r=new RegExp(t,"").exec(e))==null?void 0:r[4]},UR=(e,t)=>{var a;let n;return e!=""&&/{TIME}/g.test(e)&&/{CONTENT}/g.test(e)?n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?"+e.replace(/{TIME}/g,"(\\)?(\\d{1,2})\\:(\\d{2})(\\:\\d{2})?").replace(/{CONTENT}/g,"(.*)"):n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\)?(\\d{1,2})\\:(\\d{2})(.*)",(a=new RegExp(n,"").exec(t))==null?void 0:a[6]},YR=(e,t)=>{var a;let n;return e!=""&&/{TIME}/g.test(e)&&/{CONTENT}/g.test(e)?n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?"+e.replace(/{TIME}/g,"(\\)?(\\d{1,2})\\:(\\d{2})(\\:\\d{2})?").replace(/{CONTENT}/g,"(.*)"):n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\)?(\\d{1,2})\\:(\\d{2})(.*)",(a=new RegExp(n,"").exec(t))==null?void 0:a[7]},zR=e=>{var r;const t="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\d{1,2})\\:(\\d{2})\\:(\\d{2})(.*)";return(r=new RegExp(t,"").exec(e))==null?void 0:r[7]},VR=e=>{var t;return(t=/^\s*[\-\*]\s(\[(.{1})\])\s(.*)/.exec(e))==null?void 0:t[2]},mA=()=>Kg()?!0:(new x.Notice(E("Check if you opened Daily Notes Plugin Or Periodic Notes Plugin")),!1);async function gA(e,t){var l;if(!e)return t;const n=Le.getState().dailyNotesState.app||window.app,r=await PR(e,n);let a=x.moment(e.stat.ctime).format("YYYY/MM/DD HH:mm:ss");const o=n==null?void 0:n.metadataCache.getFileCache(e),i={frontmatter:(o==null?void 0:o.frontmatter)||{},tags:((l=o==null?void 0:o.frontmatter)==null?void 0:l.tags)||[]};await n.fileManager.processFrontMatter(e,c=>{if(c.id||(c.id=ut.randomId(16)),c.createdAt?a=x.moment(c.createdAt,"YYYY/MM/DD HH:mm:ss").isValid()?c.createdAt:a:c.createdAt=a,!r.trim())return t;const f=!!c.pinned,h=c.rowStatus&&c.rowStatus==="ARCHIVED",g=!!c.deletedAt,y=c.deletedAt?c.deletedAt:"",w=c.visibility?c.visibility:"PRIVATE",S=c.thinoType?c.thinoType:"JOURNAL",D=c.webId?c.webId:"",I=c.id?c.id:"",M=c.hasId?c.hasId:"",N=c.linkId?c.linkId:"",B=e.path,k="Memo",R="MULTI",L=[];return t.push({id:I,content:r,createdAt:a,updatedAt:a,deletedAt:g?x.moment(y,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",pinned:f,rowStatus:h?"ARCHIVED":"NORMAL",visibility:w,thinoType:S,hasId:M,linkId:N,path:B,creatorName:k,sourceType:R,resourceList:L,webId:D,fileInfo:i}),t})}async function fT(e,t){var I,M,N,B,k,R,L;if(!e)return t;const{vault:n,metadataCache:r}=Le.getState().dailyNotesState.app||window.app;let a;try{a=await n.read(e)}catch(_){console.error(_),a=await n.cachedRead(e)}if(!a)return;const o=x.moment(e.stat.ctime).format("YYYY/MM/DD HH:mm:ss"),i=x.moment(e.stat.mtime).format("YYYY/MM/DD HH:mm:ss"),l=e.path,c="Thino",f="FILE",h="",g="",y=[],w=r.getFileCache(e),S={frontmatter:(w==null?void 0:w.frontmatter)||{},tags:((I=w==null?void 0:w.frontmatter)==null?void 0:I.tags)||[]},D=jR(a);for(const _ of D){const V=_.metadata.match(/\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}/g);if(!V)continue;const U=(N=(M=_.metadata.match(/id::([^\]]*)/g))==null?void 0:M[0])==null?void 0:N.replace("id::","");if(!U)continue;const Z=V?V[0]:o,Q=V?V[0]:i,G=_.metadata.match(/webId::([^\]]*)/g)?(k=(B=_.metadata.match(/webId::([^\]]*)/g))==null?void 0:B[0])==null?void 0:k.replace("webId::",""):"",re=_.metadata.contains("[pinned::true]"),de=_.metadata.contains("[archived::true]"),fe=_.metadata.contains("[deleted::"),$=(R=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").exec(_.metadata))==null?void 0:R[2],he=new RegExp(/\[(visibility|VISIBILITY)::("PROTECT"|"PUBLIC")\]/,"g").test(_.metadata)?"PUBLIC":"PRIVATE",se=(L=new RegExp(/\[(thinoType|THINOTYPE)::([^\]]*)\]/,"g").exec(_.metadata))==null?void 0:L[2];t.push({id:U,content:_.content,createdAt:Z,updatedAt:Q,deletedAt:fe?x.moment($,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",pinned:re,rowStatus:de?"ARCHIVED":"NORMAL",visibility:he,thinoType:se||"JOURNAL",hasId:h,linkId:g,path:l,creatorName:c,sourceType:f,resourceList:y,webId:G,fileInfo:S})}return t}async function vA(e,t){if(!e)return[];const n=Le.getState().dailyNotesState.settings,{vault:r}=Le.getState().dailyNotesState.app||window.app;if(await RR(n,e)===0)return;let o;try{o=await r.read(e)}catch(g){console.error(g),o=await r.cachedRead(e)}const{content:i,startLine:l}=OC(o,(n==null?void 0:n.ProcessContentTarget)==="whole"?"":n.ProcessEntriesBelow);let c="",f=0;if(n.DifferentInsertTarget&&(n==null?void 0:n.ProcessContentTarget)!=="whole"&&n.InsertAfterForTask&&!i.includes(n.InsertAfterForTask)){const{content:g,startLine:y}=OC(o,n.InsertAfterForTask);c=g,f=y}const h=[];PC(n,i,l,h,e),n.DifferentInsertTarget&&c&&PC(n,c,f,h,e),h.length!==0&&t.push(...h.sort((g,y)=>g.createdAt>y.createdAt?-1:1))}async function yA(e,t){const n=Le.getState().dailyNotesState.app||window.app;if(!(e instanceof x.TFile))return;let r;try{r=await n.vault.read(e)}catch(i){console.error(i),r=await n.vault.cachedRead(e)}if(!r)return;const a=JSON.parse(r),o=a==null?void 0:a.nodes;for(const i of o){if(i.type==="group"||i.createdAt===void 0||i.text.trim()==="")continue;const c=x.moment(i==null?void 0:i.createdAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"),f=x.moment(i==null?void 0:i.updatedAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"),h=i!=null&&i.deletedAt?x.moment(i==null?void 0:i.deletedAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",g=!!(i!=null&&i.pinned),y=i!=null&&i.archived?"ARCHIVED":"NORMAL",w=i!=null&&i.visibility?i==null?void 0:i.visibility:"PRIVATE",S=i!=null&&i.thinoType?i==null?void 0:i.thinoType:"JOURNAL",D=i!=null&&i.text?i==null?void 0:i.text:"",I=i!=null&&i.id?i==null?void 0:i.id:"",M=i!=null&&i.hasId?i==null?void 0:i.hasId:"",N=i!=null&&i.linkId?i==null?void 0:i.linkId:"",B=e.path,k="Memo",R="CANVAS",L=[],_=i!=null&&i.webId?i==null?void 0:i.webId:void 0;t.push({id:I,content:D,createdAt:c,updatedAt:f,deletedAt:h,pinned:g,rowStatus:y,visibility:w,thinoType:S,hasId:M,linkId:N,path:B,creatorName:k,sourceType:R,resourceList:L,webId:_,fileInfo:{frontmatter:{},tags:[]}})}}async function jC(e=[]){const t=[],n=[],r=Le.getState().dailyNotesState.app||app,{vault:a}=r,{settings:o}=Le.getState().dailyNotesState,i=r.loadLocalStorage("tokenForSync"),l=async(c,f)=>{for(const h of c)try{await f(h,t,o)}catch(g){console.error(g),new x.Notice(g)}};try{if(e.includes("CANVAS")){const c=WR(a);await l(c,yA)}}catch(c){console.error(c)}try{if(e.includes("MULTI")){const c=$R(a,r,o);await l(c,gA)}}catch(c){console.error(c)}try{if(e.includes("DAILY")){const c=await ZR(a);await l(c,vA)}}catch(c){console.error(c)}try{if(e.includes("FILE")||i){const c=qR(a,r,o);await l(c,fT)}}catch(c){console.error(c)}return{memos:t,commentMemos:n}}function WR(e){return e.getAllLoadedFiles().filter(t=>t instanceof x.TFile&&t.extension==="canvas"&&t.name.includes(".thino"))}function $R(e,t,n){const r=e.getMarkdownFiles(),a=r.filter(i=>{var l,c;return((l=i.parent)==null?void 0:l.path.includes(n.MemoOtherSaveLocation.MemoDefaultMultiFilePath.trim()))&&!((c=i.path)!=null&&c.endsWith("thino.md"))}),o=n.TagForMultiTypeFiles?r.filter(i=>{var l,c,f;return!((l=i.parent)!=null&&l.path.includes(n.MemoOtherSaveLocation.MemoDefaultMultiFilePath.trim())&&!((c=i.path)!=null&&c.endsWith("thino.md")))&&((f=x.getAllTags(t.metadataCache.getFileCache(i)))==null?void 0:f.contains("#"+n.TagForMultiTypeFiles.replace("#","")))}):[];return[...a,...o]}async function ZR(e){const t=mb();t===void 0&&new x.Notice(E("Please check your daily note plugin OR periodic notes plugin settings")+"folder path is empty or undefined"),e.getAbstractFileByPath(x.normalizePath(t))||new x.Notice(E("Failed to find daily notes folder"));const r=Ju();return Object.values(r).filter(a=>a instanceof x.TFile&&a.extension==="md")}function qR(e,t,n){const r=e.getMarkdownFiles(),a=r.filter(i=>i.name.trim().includes("thino")),o=n.TagForFileTypeFiles?r.filter(i=>{var l;return!i.name.trim().includes("thino")&&((l=x.getAllTags(t.metadataCache.getFileCache(i)))==null?void 0:l.contains("#"+n.TagForFileTypeFiles.replace("#","")))}):[];return[...a,...o]}const GR=async(e,t,n)=>{const r=await Rp(Le.getState().dailyNotesState.app)||[],a=r.find(l=>l.id===e),o={...a,title:t,querystring:n},i=r.findIndex(l=>l.id===e);return r[i]=o,await Av(Le.getState().dailyNotesState.app,r),[a]},JR="https://api.thino.pkmer.cn/test",_p=JR,KR="unknown",QR=/!\[(?[^\]]+)\]\((? [^)]+)\)/g;function XR(e){return e.substring(e.lastIndexOf(".")+1)}function e_(e){return{id:e.id,createdAt:Date.now().toString(),filename:e.id,type:`${XR(e.id)}`,size:e.size.toString()}}function t_(e){const t=e==null?void 0:e.matchAll(QR);return t?Array.from(t).map(n=>{var r;return e_({url:(r=n.groups)==null?void 0:r.link,id:KR,size:0,mtime:""})}).filter(n=>n.type!="html"):[]}function Fv(e){var t;return{id:e.id,createdAt:x.moment(e.ctime.toString(),"x").format("YYYY/MM/DD HH:mm:ss"),updatedAt:x.moment(e.mtime.toString(),"x").format("YYYY/MM/DD HH:mm:ss"),deletedAt:(t=e.ttime)!=null&&t.toString()?x.moment(e.ttime.toString(),"x").format("YYYY-MM-DD HH:mm:ss"):"",rowStatus:e.rowStatus,content:e.content,pinned:e.pinned,resourceList:t_(e.content),creatorName:"thino",sourceType:(e==null?void 0:e.thinoType)||"FILE",visibility:"PUBLIC",localId:e.originalId,deleted:!!e.dtime,thinoType:(e==null?void 0:e.thinoStatus)||"JOURNAL"}}async function n_(e){const n={url:`${_p}/thino/getThinos${e?`?since=${e}&includeDeleted=true`:""}`,method:"GET",headers:{Authorization:`Bearer ${Bp()}`}};return x.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to fetch memos: ${r.status}`);try{return r.json.payload.map(o=>Fv(o))}catch(a){console.error(`Error processing memo response: ${a}`)}}).catch(r=>(console.error(r),[]))}function Bp(){const e=Le.getState().dailyNotesState.app||app;return(e==null?void 0:e.loadLocalStorage("tokenForSync"))||""}async function N2(e){const t=`${_p}/thino/createThino`,n={content:e.content,thinoType:(e==null?void 0:e.thinoType)||"FILE",thinoStatus:(e==null?void 0:e.thinoStatus)||"JOURNAL",pinned:!1,rowStatus:"NORMAL",encrypted:!1},r={url:t,method:"POST",contentType:"application/json",body:JSON.stringify(n),headers:{Authorization:`Bearer ${Bp()}`}};return x.requestUrl(r).then(a=>{a.status>=400&&console.error(`Failed to create memo: ${a.status}`);try{const o=a.json;return Fv(o.payload)}catch(o){console.error(`Error processing memo creation response: ${o}`)}}).catch(a=>(console.error(a),null))}function r_(e){return{id:e.id,ctime:x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").valueOf(),mtime:x.moment(e.updatedAt,"YYYY/MM/DD HH:mm:ss").valueOf(),ttime:e.deletedAt?x.moment(e.deletedAt,"YYYY/MM/DD HH:mm:ss").valueOf():void 0,rowStatus:e.rowStatus,content:e.content,pinned:e.pinned,encrypted:!1,thinoType:e.sourceType==="DAILY"?"DAILY":"FILE",thinoStatus:e.thinoType,tags:[]}}async function a_(e){const t=`${_p}/thino/createThinosByData`,n=e.map(a=>r_(a)),r={url:t,method:"POST",contentType:"application/json",body:JSON.stringify(n),headers:{Authorization:`Bearer ${Bp()}`}};return x.requestUrl(r).then(a=>{a.status>=400&&console.error(`Failed to create thinos: ${a.status}`);try{return a.json.payload.map(l=>Fv(l))}catch(o){console.error(`Error processing thinos creation response: ${o}`)}}).catch(a=>(console.error(a),[]))}async function SS(e){const n={url:`${_p}/thino/updateThinoById/${e.id}`,method:"POST",contentType:"application/json",body:JSON.stringify(e),headers:{Authorization:`Bearer ${Bp()}`}};return x.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to update memo: ${r.status}`);try{const a=r.json;return Fv(a.payload)}catch(a){console.error(`Error processing memo update response: ${a}`)}}).catch(r=>(console.error(r),null))}async function Xg(e){const n={url:`${_p}/thino/recoverThinoFromTrash/${e}`,method:"POST",headers:{Authorization:`Bearer ${Bp()}`}};return x.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to recover memo: ${r.status}`);try{const a=r.json;return Fv(a.payload)}catch(a){console.error(`Error processing memo recovery response: ${a}`)}}).catch(r=>(console.error(r),null))}async function A2(e){const n={url:`${_p}/thino/deleteThinoById/${e}`,method:"DELETE",headers:{Authorization:`Bearer ${Bp()}`}};return x.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to delete memo: ${r.status}`)}).catch(r=>(console.error(r),null))}function o_(e){return(e==null?void 0:e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"))||e}function i_(e){const t=[];let n=e;for(;n.contains(`
+"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const N=require("obsidian"),Dx=require("@codemirror/language"),Nm=require("@codemirror/state"),is=require("@codemirror/view");function d$(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var xr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function tt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var g8={exports:{}},Ep={},v8={exports:{}},Lt={},jP;function f$(){if(jP)return Lt;jP=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.iterator;function p(Z){return Z===null||typeof Z!="object"?null:(Z=h&&Z[h]||Z["@@iterator"],typeof Z=="function"?Z:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,v={};function y(Z,q,$){this.props=Z,this.context=q,this.refs=v,this.updater=$||m}y.prototype.isReactComponent={},y.prototype.setState=function(Z,q){if(typeof Z!="object"&&typeof Z!="function"&&Z!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Z,q,"setState")},y.prototype.forceUpdate=function(Z){this.updater.enqueueForceUpdate(this,Z,"forceUpdate")};function S(){}S.prototype=y.prototype;function x(Z,q,$){this.props=Z,this.context=q,this.refs=v,this.updater=$||m}var C=x.prototype=new S;C.constructor=x,b(C,y.prototype),C.isPureReactComponent=!0;var k=Array.isArray,M=Object.prototype.hasOwnProperty,I={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function R(Z,q,$){var re,le={},ie=null,fe=null;if(q!=null)for(re in q.ref!==void 0&&(fe=q.ref),q.key!==void 0&&(ie=""+q.key),q)M.call(q,re)&&!O.hasOwnProperty(re)&&(le[re]=q[re]);var ye=arguments.length-2;if(ye===1)le.children=$;else if(1{const{children:t,store:n,context:r}=e,[o,i]=D.useState(n.getState());return D.useEffect(()=>{const a=n.subscribe(s=>{i(s)});return()=>{a()}},[]),w.jsx(r.Provider,{value:o,children:t})};function m$(e){const t=Object.keys(e),n={};for(const r of t)typeof e[r]=="function"&&(n[r]=e[r]);return(r={},o)=>{let i=!1;const a={};for(const s of t){const l=r[s],u=n[s](l,o);a[s]=u,i=i||u!==l}return i?a:r}}function g$(e,t){const n=[];let r=e;return{dispatch:s=>{const l=t(r,s),u=r;r=l;for(const d of n)d(r,u)},getState:()=>r,subscribe:s=>{let l=!0;return n.push(s),()=>{if(!l)return;const u=n.indexOf(s);n.splice(u,1),l=!1}}}}function v$(e,t){switch(t.type){case"SET_MARK_MEMO_ID":return t.payload.markMemoId===e.markMemoId?e:{...e,markMemoId:t.payload.markMemoId};case"SET_EDIT_MEMO_ID":return t.payload.editMemoId===e.editMemoId?e:{...e,editMemoId:t.payload.editMemoId};case"SET_GLOBAL_EDITOR_SHOWN":return t.payload.globalEditorShown===e.globalEditorShown?e:{...e,globalEditorShown:t.payload.globalEditorShown};case"SET_COMMENT_MEMO_ID":return t.payload.commentMemoId===e.commentMemoId?e:{...e,commentMemoId:t.payload.commentMemoId};case"SET_MOBILE_VIEW":return t.payload.isMobileView===e.isMobileView?e:{...e,isMobileView:t.payload.isMobileView};case"SET_CHANGED_BY_MEMOS":return t.payload.changedByMemos===e.changedByMemos?e:{...e,changedByMemos:t.payload.changedByMemos};case"SET_REFRESH":return t.payload.refresh===e.refresh?e:{...e,refresh:t.payload.refresh};case"SET_INSTANCE":return{...e,instanceList:e.instanceList.set(t.payload.id,t.payload.instance)};case"SET_SHOW_SIDEBAR_IN_MOBILE_VIEW":return t.payload.showSiderbarInMobileView===e.showSiderbarInMobileView?e:{...e,showSiderbarInMobileView:t.payload.showSiderbarInMobileView};case"SET_MEMO_LIST_VIEW":return t.payload.memoListView===e.memoListView?e:{...e,memoListView:t.payload.memoListView};case"SET_MEMO_PLUGIN_MANIFEST":return{...e,manifest:t.payload.manifest};case"SET_LOADED":return{...e,loaded:t.payload.loaded};case"SET_EXIT_STEPS":return{...e,exited:t.payload.exited};case"SET_LOCKED":return{...e,locked:t.payload.locked};case"SET_APP_SETTING":return{...e,...t.payload};default:return e}}const y$={markMemoId:"",editMemoId:"",commentMemoId:"",shouldSplitMemoWord:!0,shouldHideImageUrl:!0,shouldUseMarkdownParser:!0,useTinyUndoHistoryCache:!1,isMobileView:!1,showSiderbarInMobileView:!1,changedByMemos:!1,memoListView:null,manifest:null,refresh:!1,loaded:!1,globalEditorShown:!1,instanceList:new Map,locked:!1,exited:!1};function b$(e,t){switch(t.type){case"RELOAD":return y8;case"SET_LOCATION":return t.payload;case"SET_PATHNAME":return t.payload.pathname===e.pathname?e:{...e,pathname:t.payload.pathname};case"SET_HASH":return t.payload.hash===e.hash?e:{...e,hash:t.payload.hash};case"SET_QUERY":return{...e,query:{...t.payload}};case"SET_TAG_QUERY":return t.payload.tag===e.query.tag?e:{...e,query:{...e.query,tag:t.payload.tag}};case"SET_DURATION_QUERY":return t.payload.duration===e.query.duration?e:{...e,query:{...e.query,duration:{...e.query.duration,...t.payload.duration}}};case"SET_PATH_QUERY":return t.payload.path===e.query.path?e:{...e,query:{...e.query,path:t.payload.path}};case"SET_TYPE":return t.payload.type===e.query.type?e:{...e,query:{...e.query,type:t.payload.type}};case"SET_TEXT":return t.payload.text===e.query.text?e:{...e,query:{...e.query,text:t.payload.text}};case"SET_QUERY_FILTER":return t.payload===e.query.filter?e:{...e,query:{...e.query,filter:t.payload}};default:return e}}const y8={pathname:"/",hash:"",query:{tag:"",duration:null,type:"",path:"",metadata:{},text:"",filter:""}};var Rt={};Object.defineProperty(Rt,"__esModule",{value:!0});var Bn=N;const Wk="YYYY-MM-DD",Gk="gggg-[W]ww",b8="YYYY-MM",w8="YYYY-[Q]Q",S8="YYYY";function zg(e){const t=window.app.plugins.getPlugin("periodic-notes");return t&&t.settings?.[e]?.enabled}function Vg(){try{const{internalPlugins:e,plugins:t}=window.app;if(zg("daily")){const{format:i,folder:a,template:s}=t.getPlugin("periodic-notes")?.settings?.daily||{};return{format:i||Wk,folder:a?.trim()||"",template:s?.trim()||""}}const{folder:n,format:r,template:o}=e.getPluginById("daily-notes")?.instance?.options||{};return{format:r||Wk,folder:n?.trim()||"",template:o?.trim()||""}}catch{}}function Wg(){try{const e=window.app.plugins,t=e.getPlugin("calendar")?.options,n=e.getPlugin("periodic-notes")?.settings?.weekly;if(zg("weekly"))return{format:n.format||Gk,folder:n.folder?.trim()||"",template:n.template?.trim()||""};const r=t||{};return{format:r.weeklyNoteFormat||Gk,folder:r.weeklyNoteFolder?.trim()||"",template:r.weeklyNoteTemplate?.trim()||""}}catch{}}function Gg(){const e=window.app.plugins;try{const t=zg("monthly")&&e.getPlugin("periodic-notes")?.settings?.monthly||{};return{format:t.format||b8,folder:t.folder?.trim()||"",template:t.template?.trim()||""}}catch{}}function Zg(){const e=window.app.plugins;try{const t=zg("quarterly")&&e.getPlugin("periodic-notes")?.settings?.quarterly||{};return{format:t.format||w8,folder:t.folder?.trim()||"",template:t.template?.trim()||""}}catch{}}function $g(){const e=window.app.plugins;try{const t=zg("yearly")&&e.getPlugin("periodic-notes")?.settings?.yearly||{};return{format:t.format||S8,folder:t.folder?.trim()||"",template:t.template?.trim()||""}}catch{}}function T8(...e){let t=[];for(let r=0,o=e.length;r{const x=r(),C=e.clone().set({hour:x.get("hour"),minute:x.get("minute"),second:x.get("second")});return b&&C.add(parseInt(v,10),y),S?C.format(S.substring(1).trim()):C.format(i)}).replace(/{{\s*yesterday\s*}}/gi,e.clone().subtract(1,"day").format(i)).replace(/{{\s*tomorrow\s*}}/gi,e.clone().add(1,"d").format(i)));return t.foldManager.save(h,l),h}catch(h){console.error(`Failed to create file: '${d}'`,h),new Bn.Notice("Unable to create new file.")}}function k$(e,t){return t[Sa(e,"day")]??null}function E$(){const{vault:e}=window.app,{folder:t}=Vg(),n=e.getAbstractFileByPath(Bn.normalizePath(t));if(!n)throw new I$("Failed to find daily notes folder");const r={};return Bn.Vault.recurseChildren(n,o=>{if(o instanceof Bn.TFile){const i=dh(o,"day");if(i){const a=Sa(i,"day");r[a]=o}}}),r}class C$ extends Error{}function M$(){const{moment:e}=window;let t=e.localeData()._week.dow;const n=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;t;)n.push(n.shift()),t--;return n}function D$(e){return M$().indexOf(e.toLowerCase())}async function E8(e){const{vault:t}=window.app,{template:n,format:r,folder:o}=Wg(),[i,a]=await uh(n),s=e.format(r),l=await qg(o,s);try{const u=await t.create(l,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,h,p,m,b,v)=>{const y=window.moment(),S=e.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return p&&S.add(parseInt(m,10),b),v?S.format(v.substring(1).trim()):S.format(r)}).replace(/{{\s*title\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(d,h,p)=>{const m=D$(h);return e.weekday(m).format(p.trim())}));return window.app.foldManager.save(u,a),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Bn.Notice("Unable to create new file.")}}function A$(e,t){return t[Sa(e,"week")]??null}function N$(){const e={};if(!M8())return e;const{vault:t}=window.app,{folder:n}=Wg(),r=t.getAbstractFileByPath(Bn.normalizePath(n));if(!r)throw new C$("Failed to find weekly notes folder");return Bn.Vault.recurseChildren(r,o=>{if(o instanceof Bn.TFile){const i=dh(o,"week");if(i){const a=Sa(i,"week");e[a]=o}}}),e}class O$ extends Error{}async function C8(e){const{vault:t}=window.app,{template:n,format:r,folder:o}=Gg(),[i,a]=await uh(n),s=e.format(r),l=await qg(o,s);try{const u=await t.create(l,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,h,p,m,b,v)=>{const y=window.moment(),S=e.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return p&&S.add(parseInt(m,10),b),v?S.format(v.substring(1).trim()):S.format(r)}).replace(/{{\s*date\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,s));return window.app.foldManager.save(u,a),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Bn.Notice("Unable to create new file.")}}function P$(e,t){return t[Sa(e,"month")]??null}function j$(){const e={};if(!D8())return e;const{vault:t}=window.app,{folder:n}=Gg(),r=t.getAbstractFileByPath(Bn.normalizePath(n));if(!r)throw new O$("Failed to find monthly notes folder");return Bn.Vault.recurseChildren(r,o=>{if(o instanceof Bn.TFile){const i=dh(o,"month");if(i){const a=Sa(i,"month");e[a]=o}}}),e}class L$ extends Error{}async function R$(e){const{vault:t}=window.app,{template:n,format:r,folder:o}=Zg(),[i,a]=await uh(n),s=e.format(r),l=await qg(o,s);try{const u=await t.create(l,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,h,p,m,b,v)=>{const y=window.moment(),S=e.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return p&&S.add(parseInt(m,10),b),v?S.format(v.substring(1).trim()):S.format(r)}).replace(/{{\s*date\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,s));return window.app.foldManager.save(u,a),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Bn.Notice("Unable to create new file.")}}function F$(e,t){return t[Sa(e,"quarter")]??null}function H$(){const e={};if(!A8())return e;const{vault:t}=window.app,{folder:n}=Zg(),r=t.getAbstractFileByPath(Bn.normalizePath(n));if(!r)throw new L$("Failed to find quarterly notes folder");return Bn.Vault.recurseChildren(r,o=>{if(o instanceof Bn.TFile){const i=dh(o,"quarter");if(i){const a=Sa(i,"quarter");e[a]=o}}}),e}class _$ extends Error{}async function B$(e){const{vault:t}=window.app,{template:n,format:r,folder:o}=$g(),[i,a]=await uh(n),s=e.format(r),l=await qg(o,s);try{const u=await t.create(l,i.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,h,p,m,b,v)=>{const y=window.moment(),S=e.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return p&&S.add(parseInt(m,10),b),v?S.format(v.substring(1).trim()):S.format(r)}).replace(/{{\s*date\s*}}/gi,s).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,s));return window.app.foldManager.save(u,a),u}catch(u){console.error(`Failed to create file: '${l}'`,u),new Bn.Notice("Unable to create new file.")}}function Y$(e,t){return t[Sa(e,"year")]??null}function U$(){const e={};if(!N8())return e;const{vault:t}=window.app,{folder:n}=$g(),r=t.getAbstractFileByPath(Bn.normalizePath(n));if(!r)throw new _$("Failed to find yearly notes folder");return Bn.Vault.recurseChildren(r,o=>{if(o instanceof Bn.TFile){const i=dh(o,"year");if(i){const a=Sa(i,"year");e[a]=o}}}),e}function z$(){const{app:e}=window,t=e.internalPlugins.plugins["daily-notes"];if(t&&t.enabled)return!0;const n=e.plugins.getPlugin("periodic-notes");return n&&n.settings?.daily?.enabled}function M8(){const{app:e}=window;if(e.plugins.getPlugin("calendar"))return!0;const t=e.plugins.getPlugin("periodic-notes");return t&&t.settings?.weekly?.enabled}function D8(){const{app:e}=window,t=e.plugins.getPlugin("periodic-notes");return t&&t.settings?.monthly?.enabled}function A8(){const{app:e}=window,t=e.plugins.getPlugin("periodic-notes");return t&&t.settings?.quarterly?.enabled}function N8(){const{app:e}=window,t=e.plugins.getPlugin("periodic-notes");return t&&t.settings?.yearly?.enabled}function V$(e){const t={day:Vg,week:Wg,month:Gg,quarter:Zg,year:$g}[e];return t()}function W$(e,t){return{day:k8,month:C8,week:E8}[e](t)}Rt.DEFAULT_DAILY_NOTE_FORMAT=Wk;Rt.DEFAULT_MONTHLY_NOTE_FORMAT=b8;Rt.DEFAULT_QUARTERLY_NOTE_FORMAT=w8;Rt.DEFAULT_WEEKLY_NOTE_FORMAT=Gk;Rt.DEFAULT_YEARLY_NOTE_FORMAT=S8;var Om=Rt.appHasDailyNotesPluginLoaded=z$;Rt.appHasMonthlyNotesPluginLoaded=D8;Rt.appHasQuarterlyNotesPluginLoaded=A8;Rt.appHasWeeklyNotesPluginLoaded=M8;Rt.appHasYearlyNotesPluginLoaded=N8;var O8=Rt.createDailyNote=k8;Rt.createMonthlyNote=C8;Rt.createPeriodicNote=W$;Rt.createQuarterlyNote=R$;Rt.createWeeklyNote=E8;Rt.createYearlyNote=B$;var Il=Rt.getAllDailyNotes=E$;Rt.getAllMonthlyNotes=j$;Rt.getAllQuarterlyNotes=H$;Rt.getAllWeeklyNotes=N$;Rt.getAllYearlyNotes=U$;var lS=Rt.getDailyNote=k$,uc=Rt.getDailyNoteSettings=Vg,nf=Rt.getDateFromFile=dh;Rt.getDateFromPath=x$;Rt.getDateUID=Sa;Rt.getMonthlyNote=P$;Rt.getMonthlyNoteSettings=Gg;Rt.getPeriodicNoteSettings=V$;Rt.getQuarterlyNote=F$;Rt.getQuarterlyNoteSettings=Zg;Rt.getTemplateInfo=uh;Rt.getWeeklyNote=A$;Rt.getWeeklyNoteSettings=Wg;Rt.getYearlyNote=Y$;Rt.getYearlyNoteSettings=$g;const G$={},Z$={},$$={welcome:"Velkommen til Thino",ribbonIconTitle:"Thino",to:"til",months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan.","Feb.","Mar.","Apr.","Maj","Jun.","Jul.","Aug.","Sep.","Okt.","Nov.","Dec."],weekDays:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"],weekDaysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],year:null,month:null,"Basic Options":"Grundlæggende indstillinger","User name":"Brugernavn","Set your user name here. 'Memos 😏' By default":"Indstil dit brugernavn her. 'Thino 😏' som standard",'You can set target heading like "# Heading" to control data location':'Du kan indstille målrubrik som "# Rubrik" for at kontrollere dataplacering',"Insert after heading":"Indsæt efter rubrik","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Du bør indstille samme rubrik nedenfor, hvis du vil indsætte og behandle thino under samme rubrik.","Allows admonitions to be created using ":"Tillader at advarselsbokse oprettes ved hjælp af ","Process Memos below":"Behandl thino nedenfor","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Hvis tomt, vil Thino-grænsefladen vise alt thino-indhold; hvis en titel er angivet, vil Thino-grænsefladen kun vise indholdet under den titel, og indhold skrevet andetsteds vil ikke blive vist.","Save Memo button label":"Gem thino-knappens etiket","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"Teksten vist på gem thino-knappen i brugergrænsefladen. 'NOTEIT' som standard.","Focus on editor when open memos":"Fokuser på editor når thino åbnes","Focus on editor when open memos. Focus by default.":"Fokuser på editor når thino åbnes. Fokus som standard.","Open daily memos with open memos":"Åbn daglig thino med åben thino","Open daily memos with open memos. Open by default.":"Åbn daglig thino med åben thino. Åben som standard.","Open Memos when obsidian opens":"Åbn Thino når obsidian åbnes","When enable this, Memos will open when Obsidian opens. False by default.":"Når dette er aktiveret, vil Thino åbne når Obsidian åbnes. Deaktiveret som standard.","Hide done tasks in Memo list":"Skjul færdige opgaver i Thino-listen","Hide all done tasks in Memo list. Show done tasks by default.":"Skjul alle færdige opgaver i Thino-listen. Vis færdige opgaver som standard.","Advanced Options":"Avancerede indstillinger","UI language for date":"UI-sprog for dato","Translates the date UI language. Only 'en' and 'zh' are available.":"Oversætter dato UI-sproget. Kun 'en' og 'zh' er tilgængelige.","Default prefix when save thino":"Standard præfiks ved gem thino","Set the default prefix when create memo, 'List' by default.":"Indstil standard præfiks ved oprettelse af thino, 'Liste' som standard.","Default insert date format":"Standard indsæt datoformat","Set the default date format when insert date by @, 'Tasks' by default.":"Indstil standard datoformat ved indsættelse af dato med @, 'Opgaver' som standard.","Default editor position on mobile":"Standard editor position på mobil","Set the default editor position on Mobile, 'Top' by default.":"Indstil standard editor position på mobil, 'Top' som standard.","Use button to show editor on mobile":"Brug knap til at vise editor på mobil","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Indstil en flydende knap til at kalde editor på mobil. Virker kun når editor er placeret i bunden.","Show Time When Copy Results":"Vis tid ved kopiering af resultater","Show time when you copy results, like 12:00. Copy time by default.":"Vis tid når du kopierer resultater, som 12:00. Kopier tid som standard.","Show Date When Copy Results":"Vis dato ved kopiering af resultater","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Vis dato når du kopierer resultater, som [[2022-01-01]]. Kopier dato som standard.","Add Blank Line Between Different Date":"Tilføj tom linje mellem forskellige datoer","Add blank line when copy result with date. No blank line by default.":"Tilføj tom linje når du kopierer resultat med dato. Ingen tom linje som standard.","Share Options":"Delingsindstillinger","Share Memos Image Footer Start":"Del Thino-billede fodtekst start","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Indstil hvad du vil her, brug {ThinoNum} for at vise antal thino, {UsedDay} for dage. '{ThinoNum} Thino {UsedDay} Dage' som standard","Share Memos Image Footer End":"Del Thino-billede fodtekst slut","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Indstil hvad du vil her, brug {UserName} som dit brugernavn. '✍️ Af {UserName}' som standard","Save Shared Image To Folder For Mobile":"Gem delt billede til mappe for mobil","Save image to folder for mobile. False by Default":"Gem billede til mappe for mobil. Deaktiveret som standard","Say Thank You":"Sig tak",Donate:"Donér","If you like this plugin, consider donating to support continued development:":"Hvis du kan lide dette plugin, overvej at donere for at støtte fortsat udvikling:","File Name of Recycle Bin":"Filnavn på papirkurv","Set the filename for recycle bin. 'delete' By default":"Indstil filnavnet for papirkurven. 'slet' som standard","File Name of Query File":"Filnavn på forespørgselsfil","Set the filename for query file. 'query' By default":"Indstil filnavnet for forespørgselsfilen. 'forespørgsel' som standard","Use Tags In Vault":"Brug tags i boks","Use tags in vault rather than only in Memos. False by default.":"Brug tags i boks i stedet for kun i Thino. Deaktiveret som standard.","Ready to convert image into background":"Klar til at konvertere billede til baggrund",List:"Liste",Task:"Opgave",Top:"Top",Bottom:"Bund",TAG:"TAG",DAY:"DAG",QUERY:"FORESPØRGSEL",EDIT:"REDIGER",PIN:"FASTGØR",UNPIN:"FRIGØR",DELETE:"SLET","CONFIRM!":"BEKRÆFT!","CREATE FILTER":"OPRET FILTER","Comment it...":"Kommenter det...",Settings:"Indstillinger","Recycle bin":"Papirkurv","About Me":"Om mig","Fetching data...":"Henter data...","Here is No Memos.":"Her er ingen Thino.","Frequently Used Tags":"Hyppigt brugte tags","What do you think now...":"Hvad tænker du nu...",READ:"LÆS",MARK:"MARKÉR",SHARE:"DEL",SOURCE:"KILDE",RESTORE:"GENDAN",ARCHIVE:"Arkiv","Daily Review":"Daglig gennemgang","DELETE AT":"SLETTET DEN","Noooop!":"Neeej!","All Data is Loaded 🎉":"Alle data er indlæst 🎉","Quick filter":"Hurtig filter",TYPE:"TYPE",LINKED:"LINKET","NO TAGS":"INGEN TAGS","HAS LINKS":"HAR LINKS","HAS IMAGES":"HAR BILLEDER",INCLUDE:"INKLUDER",EXCLUDE:"EKSKLUDER",TEXT:"TEKST",IS:"ER",AND:"OG",OR:"ELLER",LIST:"LISTE",ISNOT:"ER IKKE",PATH:"STI",METADATA:"METADATA",SELECT:"VÆLG","ADD FILTER TERMS":"TILFØJ FILTERBETINGELSER",FILTER:"FILTER",Filter:"Filter",TITLE:"TITEL","CREATE QUERY":"OPRET FORESPØRGSEL","EDIT QUERY":"REDIGER FORESPØRGSEL",MATCH:"MATCH",TIMES:"GANGE","Share Memo Image":"Del Thino-billede","↗Click the button to save":"↗Klik på knappen for at gemme","Image is generating...":"Billede genereres...","Image is loading...":"Billede indlæses...","Loading...":"Indlæser...","😟 Cannot load image, image link maybe broken":"😟 Kan ikke indlæse billede, billedlink er måske brudt","Daily Memos":"Daglige Thino","CANCEL EDIT":"ANNULLER REDIGERING","LINK TO THE":"LINK TIL","Mobile Options":"Mobilindstillinger","Experimental Options":"Eksperimentelle indstillinger","Don't support web image yet, please input image path in vault":"Understøtter ikke webbilleder endnu, indtast venligst billedsti i boksen","Background Image in Dark Theme":"Baggrundsbillede i mørkt tema","Background Image in Light Theme":"Baggrundsbillede i lyst tema",'Set background image in dark theme. Set something like "Daily/one.png"':'Indstil baggrundsbillede i mørkt tema. Indstil noget som "Daglig/et.png"','Set background image in light theme. Set something like "Daily/one.png"':'Indstil baggrundsbillede i lyst tema. Indstil noget som "Daglig/et.png"','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Indstil standard thino-komposition, du bør bruge {TIME} som "TT:mm" og {CONTENT} som indhold. "{TIME} {CONTENT}" som standard',"Default Memo Composition":"[Forældet] Standard Thino-komposition","Show Tasks Label":"Vis opgaveetiket","Show tasks label near the time text. False by default":"Vis opgaveetiket nær tidsteksten. Deaktiveret som standard","Please Open Memos First":"Åbn venligst Thino først",DATE:"DATO",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_IKKE_AKTIVERET",BEFORE:"FØR",AFTER:"EFTER","Allow Comments On Memos":"Tillad kommentarer på Thino","You can comment on memos. False by default":"Du kan kommentere på thino. Deaktiveret som standard",Import:"Importer","TITLE CANNOT BE NULL!":"TITEL KAN IKKE VÆRE TOM!","FILTER CANNOT BE NULL!":"FILTER KAN IKKE VÆRE TOMT!","Comments In Original DailyNotes/Notes":"Kommentarer i originale daglige noter/noter","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"Du bør installere Dataview Plugin ver 0.5.9 eller senere for at bruge denne funktion.","Open Memos Successfully":"Åbn Thino med succes","Fetch Memos Error":"😭 Hentningsfejl","Copied to clipboard Successfully":"Kopieret til udklipsholder med succes","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Kontroller om du har åbnet Daily Notes Plugin eller Periodic Notes Plugin","Please finish the last filter setting first":"Afslut venligst den sidste filterindstilling først","Close Memos Successfully":"Luk Thino med succes","Insert as Memo":"Indsæt som Thino","Insert file as memo content":"Indsæt fil som thino-indhold","Image load failed":"Billedindlæsning mislykkedes","Content cannot be empty":"Indhold kan ikke være tomt","Unable to create new file.":"Kan ikke oprette ny fil.","Failed to fetch deleted memos: ":"Kunne ikke hente slettede thino: ","RESTORE SUCCEED":"GENDANNELSE LYKKEDES","DELETE SUCCEED":"SLETNING LYKKEDES","Save Memo button icon":"Gem Thino-knappens ikon","The icon shown on the save Memo button in the UI.":"Ikonet vist på gem Thino-knappen i brugergrænsefladen.","Fetch Memos From Particular Notes":"Hent Thino fra bestemte noter",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'Du kan indstille enhver Dataview-forespørgsel for thino for at hente det. Alle thino i disse noter vil blive vist på listen. "#memo" som standard',"Allow Memos to Fetch Memo from Notes":"Tillad Thino at hente Thino fra noter","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"Brug Thino til at administrere alle thino i dine noter, ikke kun i daglige noter. Deaktiveret som standard","Always Show Memo Comments":"Vis altid Thino-kommentarer","Always show memo comments on memos. False by default":"Vis altid thino-kommentarer på thino. Deaktiveret som standard","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"Du har ikke indstillet mappe til daglige noter i hverken periodic-notes eller daily-notes plugins.","Please check your daily note plugin OR periodic notes plugin settings":"Kontroller venligst dine indstillinger for daily note plugin ELLER periodic notes plugin","Use which plugin's default configuration":"Brug hvilket plugins standardkonfiguration","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino bruger pluginets standardkonfiguration til at hente thino fra daglig, 'Daglig' som standard.",Daily:"Daglig","Always Show Leaf Sidebar on PC":"Vis altid blad-sidepanel på PC","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"Vis venstre sidepanel på PC/tablet selv når bladbredden er mindre end 875px. Deaktiveret som standard.","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"Du har ikke indstillet format for daglige noter i hverken periodic-notes eller daily-notes plugins.","fetch more":"hent mere","Search all settings":"Søg i alle indstillinger",General:"Generelt",Theme:"Tema",Share:"Del",Advanced:"Avanceret",Thino:"Thino","Random Review":"Tilfældig gennemgang","ARCHIVED AT":"ARKIVERET DEN","Failed to get memos from daily notes":"Kunne ikke hente thino fra daglige noter","Failed to delete memo":"Kunne ikke slette thino","CTRL + ENTER to save":"CTRL + ENTER for at gemme","Started from":"Startet fra","Custom Background Image":"Tilpasset baggrundsbillede","Set custom background image.":"Indstil tilpasset baggrundsbillede.","Custom Memo Footer":"Tilpasset Thino-fodtekst","Set custom memo footer.":"Indstil tilpasset thino-fodtekst.","Heatmap Color Scheme":"Varmekort farveskema","Set different color scheme for heatmap.":"Indstil forskelligt farveskema for varmekort.","Enable Local Http Server":"Aktiver lokal Http-server","Memos Http Server Port":"Thino Http-server port","Set memos http server port to listen. '43999' by default":"Indstil thino http-server port til at lytte. '43999' som standard","Default Editor Mode":"Standard editor-tilstand","Live-Preview Mode OR Source Mode.":"Live-forhåndsvisning tilstand/Kildetilstand.","Save type for Thino":"Gem type for Thino",DAILY:"DAGLIG",MULTI:"MULTI",CANVAS:"LÆRRED",ALL:"ALLE",FILE:"FIL",TODO:"TODO",DONE:"FÆRDIG",JOURNAL:"JOURNAL",OTHER:"ANDET","Failed to create daily note, check if it exists.":"Kunne ikke oprette daglig note, kontroller om den eksisterer.","Failed to create daily note. Please check if you created a folder for daily notes.":"Kunne ikke oprette daglig note. Kontroller venligst om du har oprettet en mappe til daglige noter.","After you verify your account, please refresh this page.":"Efter du har verificeret din konto, opdater venligst denne side.",Verify:"Verificer","Oops! You forget to verify insider account":"Ups! Du glemte at verificere insider-konto","If you have any questions, please contact us.":"Hvis du har spørgsmål, kontakt os venligst.","Delete Thino Directly":"Slet Thino direkte","When delete thino directly, it will not be moved to trash. False by default.":"Når du sletter thino direkte, vil det ikke blive flyttet til papirkurven. Deaktiveret som standard.","Enable opening thino globally":"Aktiver åbning af thino globalt","Enable opening thino globally. False by default.":"Aktiver åbning af thino globalt. Deaktiveret som standard.","Key for opening thino globally":"Tast for at åbne thino globalt","Set key for opening thino globally. CTRL + SHIFT + T by default.":"Indstil tast for at åbne thino globalt. CTRL + SHIFT + T som standard.","Key for showing thino globally":"Tast for at vise thino globalt","Set key for showing thino globally. CTRL + SHIFT + E by default.":"Indstil tast for at vise thino globalt. CTRL + SHIFT + E som standard.","Get activation code":"Få aktiveringskode","Input activation code here":"Indtast aktiveringskode her","Copy Thino id":"Kopier Thino-id","Activate Pro Version":"Aktiver Pro-version","Please copy Thino id first":"Kopier venligst Thino-id først",'You can set folder name with file name like "folder/file"':'Du kan indstille mappenavn med filnavn som "mappe/fil"','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'Du kan indstille mappenavn som "mappe1/mappe2/mappe3" for at oprette undermappe',"Default save type":"Standard gem placering",'Set the default save type for thino. "DAILY" by default':'Indstil standard gem type for thino. "DAGLIG" som standard',"Sync Thino via PKMer":"Synkroniser Thino via PKMer",Unlink:"Fjern link",Link:"Link","Connect to PKMer Sync, you can check it in ":"Forbind til PKMer Sync, du kan tjekke det i ","PKMer Sync":"PKMer Sync","Remove successfully":"Fjernet med succes",Deactivate:"Deaktiver",Remove:"Fjern","Confirm?":"Bekræft?","Sync Status":"Synkroniseringsstatus","Start or stop sync":"Start eller stop synkronisering","Stop sync successfully":"Stop synkronisering med succes","Start sync successfully":"Start synkronisering med succes",Stop:"Stop",Start:"Start","Show thino near mouse":"Vis thino nær mus","Query not found":"Forespørgsel ikke fundet","Send to clipboard successfully":"Sendt til udklipsholder med succes","Thino - Failed to start HTTP server, please check the port is available.":"Thino - Kunne ikke starte HTTP-server, kontroller venligst om porten er tilgængelig.","Thino - Started HTTP server on port":"Thino - Startede HTTP-server på port","Thino - Terminated HTTP server":"Thino - Afsluttede HTTP-server","File not exist":"Fil eksisterer ikke","Thino not found":"Thino ikke fundet","File not found for the given thino path, is creating a new file":"Fil ikke fundet for den angivne thino-sti, opretter en ny fil","Saved sync token successfully":"Gemte synkroniseringstoken med succes","Failed to find daily notes folder":"Kunne ikke finde mappe til daglige noter","Please install obsidian-hover-editor plugin first":"Installer venligst obsidian-hover-editor plugin først","Copied app id successfully":"Kopierede app-id med succes","Please input token first":"Indtast venligst token først","Please enable sync first":"Aktiver venligst synkronisering først","Init Failed":"Initialisering mislykkedes","Verify successfully":"Verificeret med succes","Failed to verify":"Kunne ikke verificere","Folder not found for the given thino path, is creating a new folder":"Mappe ikke fundet for den angivne thino-sti, opretter en ny mappe","File not found for the given thino path":"Fil ikke fundet for den angivne thino-sti","Failed to read current daily note, check if it exists.":"Kunne ikke læse aktuel daglig note, kontroller om den eksisterer.","Failed to save":"Kunne ikke gemme","Failed to login, please login again":"Kunne ikke logge ind, log venligst ind igen","COPY FAILED":"KOPIERING MISLYKKEDES","COPY SUCCEED":"KOPIERING LYKKEDES","Copy selected text":"Kopier valgt tekst","Copy thino":"Kopier thino",COPY:"KOPIER","This is a pro feature, please upgrade to pro version to use it.":"Dette er en pro-funktion, opgrader venligst til pro-versionen for at bruge den.","You can get pro version from: ":"Du kan få pro-versionen fra: ",Save:"Gem",Cancel:"Annuller","Thino Daily Target":"Thino dagligt mål",Input:"Input","#Tag":"#Tag","to create tag":"for at oprette tag","You have verified your account. Congrats!":"Du har verificeret din konto. Tillykke!","Pro features":"Pro-funktioner","Target Thino Count":"Målrettet Thino-antal",on:"på","Switch waterfall view":"Skift vandfald-visning","Switch view":"Skift visning","Switch list view":"Skift listevisning","Set daily target":"Indstil dagligt mål","Thino Save To: ":"Thino gem til: ","Enter fullscreen mode":"Gå til fuldskærmstilstand","Exit fullscreen mode":"Afslut fuldskærmstilstand",words:"ord",word:"ord","Return To Home Page":"Tilbage til hjemmesiden","No thinos to review!":"Ingen thinos at gennemgå!","Thinos to review":"Thinos til gennemgang","Start Review":"Start gennemgang",Hard:"Svær",Good:"God",Easy:"Let",Again:"Igen","Clear all review data":"Ryd alle gennemgangsdata","Daily Progress":"Daglig fremgang","Show stats":"Vis statistik","Hide stats":"Skjul statistik",Remaining:"Resterende","Total Reviews":"Samlede gennemgange","Today, you have reviewed all your thinos!":"I dag har du gennemgået alle dine thinos!","Daily review limit reached! Come back tomorrow.":"Daglig gennemgangsgrænse nået! Kom tilbage i morgen.","Open thino in center window":"Åbn thino i centervindue","Open thino in float window":"Åbn thino i flydende vindue","Open thino in right sidebar":"Åbn thino i højre sidepanel","Open thino in left sidebar":"Åbn thino i venstre sidepanel","Show thino editor":"Vis thino-editor","Toggle minimal mode":"Skift minimal tilstand","Focus on thino editor":"Fokuser på thino-editor","ReSync web thinos to local":"Gensynkroniser web-thinos til lokal","Sync local thinos to web":"Synkroniser lokale thinos til web","Show daily thino":"Vis daglig thino","Focus on search bar":"Fokuser på søgefelt","Show-thino in popover(Hover editor)":"Vis-thino i popover(Hover editor)","Center window":"Centervindue","You should set the same heading below if you want to insert and process thino below the same heading.":"Du bør indstille samme rubrik nedenfor, hvis du vil indsætte og behandle thino under samme rubrik.","Float window":"Flydende vindue","Right sidebar":"Højre sidepanel","Left sidebar":"Venstre sidepanel","Save thino type when sync local":"Gem thino-type når lokal synkronisering","Set the default save thino type when sync local, FILE by default.":"Indstil standard gem type for thino når lokal synkronisering, FILE som standard.","Sync service":"Synkroniseringsservice","Pro verification status":"Pro-verificering status","Live-preview":"Live-preview",Source:"Kilde","Global copy":"Global kopi","Set the folder name":"Indstil mappe-navn","Set the filename":"Indstil filnavn","Set the filename for current location file":"Indstil filnavn for aktuel sti","Switch calendar type":"Skift kalender-type",alphabetical:"alfabetisk",alphabeticalReverse:"alfabetiskReverse",byCount:"byCount",byCountReverse:"byCountReverse","Type here":"Type her",Today:"I dag",Yesterday:"I går","Last 7 days":"Sidste 7 dage","Last 30 days":"Sidste 30 dage","Last 90 days":"Sidste 90 dage","Last 180 days":"Sidste 180 dage","Last 365 days":"Sidste 365 dage",Found:"Fundet","Copy filtered thinos":"Kopier filtrerede thinos","Bulk delete":"Bulk slet","Bulk archive":"Bulk arkiver","Bulk tag operation":"Bulk tag operation","Bulk restore":"Bulk gendan","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"Hvis du deaktiverer daglige notesplugin, kan det være, at thino ikke bliver slettet eller repareret korrekt. Aktiver plugin og prøv igen.",Preview:"Forhåndsvisning","Set and save":"Indstil og gem","Show day mark in thino list":"Vis dagmarke i thino-liste","Show day mark on the top of daily range thino. False by default.":"Vis dagmarke i toppen af daglige thino-rækker. False som standard.","Click to expand or fold, Cmd+Click to show all thinos of the day":"Klik for at udvide eller fold, Cmd+Klik for at vise alle thinos af dagen","You can buy a license from":"Du kan købe en licens fra","No thinos in range":"Ingen thinos i række",Month:"Måned",Week:"Uge",Day:"Dag",Agenda:"Agenda",Tomorrow:"I morgen",Previous:"Forrige",Next:"Næste","Search all columns...":"Søg i alle kolonner...","Basic Info":"Grundlæggende info","Additional Info":"Yderligere info","Created At":"Oprettet den",Content:"Indhold","Thino Type":"Thino-type","Source Type":"Kildetype","Row status":"Række status",Path:"Sti","Pinned Status":"Fastgjort status",Table:"Tabel",Chat:"Chat",Moments:"Øjeblikke",Waterfall:"Vandfald",Calendar:"Kalender","Go to page":"Gå til side",Page:"Side",Show:"Vis",rows:"rækker","Temp Filter":"Midlertidig filter","Open link directly in Thino view":"Åbn link direkte i Thino-visning","Day mark range":"Dagmærke-område","Set the range of day mark. Day by default.":"Indstil området for dagmærke. Dag som standard.","Thino is locked":"Thino er låst","Please unlock Thino by input password":"Lås venligst Thino op ved at indtaste adgangskode","Auto Download Image":"Auto-download billede","Auto download image when save to thino. 'false' by default":"Auto-download billede når der gemmes til thino. 'false' som standard","Thino Http IP Type":"Thino Http IP-type","Set Thino http server ip to listen. 'localhost' by default":"Indstil Thino http-server IP til at lytte. 'localhost' som standard","Password to lock Thino":"Adgangskode til at låse Thino",Unlock:"Lås op",Locked:"Låst","Password is incorrect":"Adgangskoden er forkert",Lock:"Lås","Need password to unlock Thino":"Adgangskode påkrævet for at låse Thino op","You have not set a password or enable this feature yet":"Du har ikke indstillet en adgangskode eller aktiveret denne funktion endnu",Password:"Adgangskode","Password for Thino":"Adgangskode til Thino","Please input your password to change password settings":"Indtast venligst din adgangskode for at ændre adgangskodeindstillinger","Please input your password":"Indtast venligst din adgangskode","Lock thino":"Lås thino",date:"dato",time:"tid",event:"begivenhed","Add tag position":"Tilføj tag-position","Set the position of the tag when adding tag automatically":"Indstil positionen af tagget når der tilføjes tag automatisk","Add tag automatically":"Tilføj tag automatisk","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"Tilføj tag til slutningen eller begyndelsen af thino-indholdet når der oprettes en thino og filtreres tags","Add tag with new line":"Tilføj tag med ny linje","Add tag with new line when adding tag automatically":"Tilføj tag med ny linje når der tilføjes tag automatisk","Input to select more tags":"Indtast for at vælge flere tags","Tag Bulk Edit":"Tag masseredigering","Tag Bulk Select":"Tag massevalg","Exist Tags":"Eksisterende tags","Selected Tags":"Valgte tags","Click to remove exist tag":"Klik for at fjerne eksisterende tag","Click to remove selected tag":"Klik for at fjerne valgt tag","Select tags":"Vælg tags","Input to select exist tag":"Indtast for at vælge eksisterende tag",Beginning:"Begyndelse",End:"Slutning","Set the heading for saving thino":"Indstil overskriften for at gemme thino","# Heading":"# Overskrift","Chat view style":"Chat-visningsstil","Set the style of chat view":"Indstil stilen for chat-visning","Background image for moments view":"Baggrundsbillede for øjeblikke-visning","Set the background image for moments view":"Indstil baggrundsbilledet for øjeblikke-visning","Icon for moments/chat view/share image":"Ikon for øjeblikke/chat-visning/delt billede","Set the icon for moments/chat view/share image":"Indstil ikonet for øjeblikke/chat-visning/delt billede","Quote for moments view/share image":"Citat for øjeblikke-visning/delt billede","Set the quote for moments view/share image":"Indstil citatet for øjeblikke-visning/delt billede","Theme for Thino":"Tema for Thino","Set the theme for Thino":"Indstil temaet for Thino","Interface Details":"Grænsefladedetaljer","Task amount":"Opgavemængde","Thino status":"Thino-status","Used tags":"Brugte tags","Used days":"Brugte dage","Most active day":"Mest aktive dag","Most active hour":"Mest aktive time","Thino amount":"Thino-mængde","No content to generate.":"Intet indhold at generere.","Image generated successfully.":"Billede genereret med succes.","Failed to generate image.":"Kunne ikke generere billede.","Share filtered thinos as image":"Del filtrerede thinos som billede","Latest version":"Seneste version","Previous version":"Tidligere version","Thino update info":"Thino opdateringsinfo","Debug info copied to clipboard":"Fejlfindingsinfo kopieret til udklipsholder","Copy debug info":"Kopier fejlfindingsinfo","Failed to load changelog":"Kunne ikke indlæse ændringslog","View online":"Se online",ChangeLog:"Ændringslog","Please open thino first":"Åbn venligst thino først","Insert editor":"Indsæt editor","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"Indstil venligst forskellige gemmeplacering for multi-fil-indstillinger i Thino. Dagbogsmappen overlapper med multi-fil-gemmeplaceringen, eller der er risiko for at den bliver læst gentagne gange.","Default time prefix for thino in daily notes":"Standard tidspræfiks for thino i daglige noter","Set default time prefix for thino in daily notes.":"Indstil standard tidspræfiks for thino i daglige noter.","Save image successfully":"Gem billede med succes","User quote":"Brugercitat","Set user quote for thino":"Indstil brugercitat for thino","User icon":"Brugerikon","Set user icon for thino. You can input http/https link or file path in vault.":"Indstil brugerikon for thino. Du kan indtaste http/https-link eller filsti i boks.","User info":"Brugerinfo","Copy filtered results":"Kopier filtrerede resultater","Share image":"Del billede",Default:"Standard",Gray:"Grå",Grass:"Græs",Flame:"Flamme",Olive:"Oliven",Ice:"Is",Magenta:"Magenta","Daily notes":"Daglige noter",Editor:"Editor","Append/prepend text when share to Thino":"Tilføj/foranstil tekst når der deles til Thino","Append text when share to Thino":"Tilføj tekst når der deles til Thino","Prepend text when share to Thino":"Foranstil tekst når der deles til Thino","Add newline when append/prepend text":"Tilføj ny linje når der tilføjes/foranstilles tekst","Input anything here":"Indtast hvad som helst her",Prepend:"Foranstil",Append:"Tilføj",Both:"Begge",None:"Ingen","Hide pinned group":"Skjul fastgjort gruppe","Hide pinned group in thino list. False by default.":"Skjul fastgjort gruppe i thino-liste. Falsk som standard.","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Indstil overskriften for opgavetypen af thino, som standard vil det registrerede thino-indhold blive indsat i slutningen af dagbogen; hvis en titel er angivet, vil alt registreret thino-indhold blive ensartet kategoriseret under den titel.","Different insert target for different type":"Forskelligt indsætningsmål for forskellige typer","Toggle this to set different insert target for different type of thino, like task or list type of thino":"Skift dette for at indstille forskellige indsætningsmål for forskellige typer af thino, som opgave- eller listetyper af thino","You can set whole diary or only part of it":"Du kan indstille hele dagbogen eller kun en del af den","Set process target":"Indstil procesmål",Custom:"Tilpasset","Whole diary":"Hele dagbogen","Set thino insert place":"Indstil thino indsætningssted","Set where to insert thino content":"Indstil hvor thino-indhold skal indsættes","End of the diary":"Slutningen af dagbogen","Custom location":"Tilpasset placering","Setting guide":"Indstillingsguide","Details settings":"Detaljerede indstillinger","Start Thino":"Start Thino","About Thino Pro":"Om Thino Pro",Enabled:"Aktiveret",Enable:"Aktiver","Daily notes folder":"Daglige noter-mappe","Set daily notes folder":"Indstil daglige noter-mappe","Daily note name format":"Daglig note navneformat","Set daily note name format":"Indstil daglig note navneformat","Daily note plugin":"Daglig note-plugin","Enable daily note plugin":"Aktiver daglig note-plugin",Selected:"Valgt",Select:"Vælg","A classic theme for Thino with a two-column layout":"Et klassisk tema for Thino med et to-kolonne layout",Classic:"Klassisk","A modern theme for Thino with a three-column layout and some unique features.":"Et moderne tema for Thino med et tre-kolonne layout og nogle unikke funktioner.",Modern:"Moderne","Go and enjoy Thino":"Gå og nyd Thino","Congrats! All settings done":"Tillykke! Alle indstillinger er færdige","Adjust settings that influence your user experience with Thino.":"Juster indstillinger der påvirker din brugeroplevelse med Thino.","Set preferences for using Thino":"Indstil præferencer for brug af Thino","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"Hvis du bruger Thino basisversionen, er aktivering af daglig note-plugin påkrævet. Konfigurer dets indstillinger for at arbejde effektivt med det.","Go with daily note plugin":"Gå med daglig note-plugin","Choose a theme for Thino.":"Vælg et tema til Thino.","Set theme for Thino":"Indstil tema for Thino","Set up your user info for Thino.":"Opsæt din brugerinfo for Thino.","Get started with Thino":"Kom i gang med Thino","Skip and start Thino":"Spring over og start Thino","Next step":"Næste trin","Back to previous step":"Tilbage til forrige trin","Click to enable =>":"Klik for at aktivere =>","This is Thino's sidebar. Navigate to different path or select query filter.":"Dette er Thino's sidepanel. Naviger til forskellige stier eller vælg forespørgselsfilter.","Click here and go to settings page.":"Klik her og gå til indstillingssiden.","Click here and go to different path.":"Klik her og gå til forskellige stier.","Select or create query filter here.":"Vælg eller opret forespørgselsfilter her.","See the status of Thinos here.":"Se status for Thinos her.","Search your thino quickly here.":"Søg hurtigt efter din thino her.","Edit or create your thino here.":"Rediger eller opret din thino her.","See your thinos here.":"Se dine thinos her.","See your time status of thinos here.":"Se din tidsstatus for thinos her.","See your tags here. Tags will be shown when thino contains tags.":"Se dine tags her. Tags vil blive vist når thino indeholder tags.",Done:"Færdig","Thino is ready to use. ":"Thino er klar til brug. ","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"Du kan begynde at bruge Thino nu. Hvis du vil vide mere om Thino Pro, klik på knappen nedenfor.","Default time prefix":"Standard tidspræfiks","Append Text Action":"Tilføj tekst-handling","Prepend Text Action":"Foranstil tekst-handling",Preset:"Forudindstilling","Select Tags":"Vælg Tags","It is not available on small view":"Det er ikke tilgængeligt på lille visning","Append text":"Tilføj tekst","Prepend text":"Foranstil tekst","Your daily note folder is not set correctly, please check your settings":"Din daglige note-mappe er ikke indstillet korrekt, tjek venligst dine indstillinger","Default sharing style":"Standard delingsstil","Set the default style for sharing thino, 'Modern' by default.":'Indstil standardstilen for deling af thino, "Moderne" som standard.',Clean:"Ren",Minimal:"Minimal",Gradient:"Gradient","Thino share":"Thino-deling","Copy to clipboard failed":"Kopiering til udklipsholder mislykkedes","Copy to clipboard successfully":"Kopieret til udklipsholder med succes","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"Dit indhold er blevet kopieret til udklipsholderen og indsat i editoren. Prøv venligst igen","Share thino":"Del thino","Set file name after create thino":"Indstil filnavn efter oprettelse af thino","You can set file name after create thino. A input box will show when you create thino.":"Du kan indstille filnavn efter oprettelse af thino. En inputboks vil blive vist, når du opretter thino.",SPLIT:"OPDEL","Split by Heading 1":"Opdel efter Overskrift 1","Split by Heading 2":"Opdel efter Overskrift 2","Split by Heading 3":"Opdel efter Overskrift 3","Insert task":"Indsæt opgave","All settings have been reset to default.":"Alle indstillinger er blevet nulstillet til standard.","Reset all Thino settings":"Nulstil alle Thino-indstillinger","Reset settings":"Nulstil indstillinger","Reset Thino settings to default settings.":"Nulstil Thino-indstillinger til standardindstillinger.","Task Management":"Opgavestyring","Append completed date when task done in thino":"Tilføj fuldført dato når opgave er udført i thino","Append completed date when task done in thino. False by default":"Tilføj fuldført dato når opgave er udført i thino. Falsk som standard","Set tag for single file that Thino indexes":"Indstil tag for enkelt fil som Thino indekserer","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"Når du indstiller et tag her, vil Thino indeksere denne fil indeholder dette tag og vise det i listen. Behøver ikke at tilføje `#`.","Set tag for file type file":"Indstil tag for filtype-fil","Set tag for multi type file":"Indstil tag for multi-type fil","Please input the tag":"Indtast venligst tagget","Merge thinos in to thino share image":"Flet thinos ind i thino-delingsbillede","Custom height for Thino content":"Tilpasset højde for Thino-indhold","Set custom height for Thino content. Like 200px or 20rem":"Indstil tilpasset højde for Thino-indhold. Som 200px eller 20rem","Input height":"Indtast højde","Submit issue":"Indsend problem","Current version":"Nuværende version","Bug report":"Fejlrapport","Click the button to copy debug info and open the issue page":"Klik på knappen for at kopiere fejlfindingsinfo og åbne problemsiden","Copy and go":"Kopier og gå","Debug info copied":"Fejlfindingsinfo kopieret","Feature request":"Funktionsanmodning","Submit your feature request to the issue page":"Indsend din funktionsanmodning til problemsiden",Go:"Gå","Toggle query list visibility":"Skift synlighed for forespørgselsliste","Toggle tags visibility":"Skift synlighed for tags","Toggle sidebar visibility":"Skift synlighed for sidepanel",Collapse:"Sammenfold",Expand:"Udvid","Max height for collapse":"Maksimal højde for sammenfoldning","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"Den maksimale højde for thino-sammenfoldning, når indstillet til 0, vil thino ikke folde sammen. 0 som standard. (Dette er ikke linjeantal, det er højde i px.)","Render content":"Generer indhold","Optimize for Callout":"Optimer for Callout","Won't render content contains more than 3 callouts automatically. True by default":"Vil ikke automatisk gengive indhold, der indeholder mere end 3 callouts. Sand som standard","The value should be greater than":"Værdien skal være større end","Append Text":"Tilføj tekst","Prepend Text":"Foranstil tekst","Thino height when collapsed":"Thino-højde når sammenfoldet","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"Højden for thino når den er sammenfoldet, når indstillet til 0, vil thino ikke folde sammen. 100 som standard. (Dette er ikke linjeantal, det er højde i px.)","This option will allow you use other views when leaf width is not enough. False by default.":"Denne mulighed vil tillade dig at bruge andre visninger, når bladbredden ikke er tilstrækkelig. Falsk som standard.","Can select other views when leaf width is not enough":"Kan vælge andre visninger, når bladbredden ikke er tilstrækkelig","TRASH BOX":"PAPIRKURV","Wait templater to finish parse before insert thino":"Vent på at skabelonbehandler færdiggør parsing før indsættelse af thino","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"Denne mulighed vil tillade dig at vente på at skabelonbehandleren færdiggør parsing før indsættelse af thino, hvilket kan medføre at du skal bekræfte to gange mellem indsættelse af thino. Falsk som standard.","Get thino capture extension":"Få thino-optagelsesudvidelse","You can capture idea/text from chrome now.":"Du kan nu optage idé/tekst fra Chrome.","Open File":"Åbn fil","Exported CSV file":"Eksporteret CSV-fil","Updated At":"Opdateret den","Export to CSV":"Eksporter til CSV","Quick add button on mobile navbar":"Hurtig tilføj-knap på mobil navigationslinje","Always show status text":"Vis altid statustekst","Support filter by metadata from file":"Understøt filtrering efter metadata fra fil","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"Når dette aktiveres, kan du filtrere via metadata fra fil, som tags i fil. Men thinos fra lærred understøttes ikke. Falsk som standard.","Show source near timestamp in thino":"Vis kilde nær tidsstempel i thino","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"Når dette aktiveres, kan du se kilden nær tidsstemplet i thino. Du kan indstille titel i metadata for at overskrive dette. Falsk som standard.","Show Update Message":"Vis opdateringsbesked","Show update message when Thino is updated. True by default":"Vis opdateringsbesked når Thino opdateres. Sand som standard","Sync manually":"Synkroniser manuelt","Show all scrollbars":"Vis alle rullebjælker","TIME RANGE":"TIDSINTERVAL",WITHIN:"INDEN FOR","7 days":"7 dage","14 days":"14 dage","30 days":"30 dage","3 months":"3 måneder","6 months":"6 måneder","1 year":"1 år","This week":"Denne uge","Last week":"Sidste uge","This month":"Denne måned","Last month":"Sidste måned","This year":"Dette år","Last year":"Sidste år","No history":"Ingen historik","Today Remaining":"Resterende i dag","Today Total":"I alt i dag","Historical Statistics":"Historisk statistik",byTime:"Efter tid",byTimeReverse:"Efter tid omvendt",Stat:"Statistik",Statistics:"Statistikker","Daily Thino Count":"Daglig Thino-antal",Total:"Total",thinos:"thinos","Thino Types":"Thino-typer","Distribution of thino types":"Fordeling af thino-typer","Thino Status":"Thino-status","Distribution of thino status":"Fordeling af thino-status","Popular Tags":"Populære tags","Top 10 most used tags":"Top 10 mest brugte tags","Thino Count":"Thino-antal","Hourly distribution":"Timefordeling","Current month":"Nuværende måned","Monthly distribution":"Månedlig fordeling","30 Days":"Sidste 30 dage",Year:"År","Time Distribution":"Tidsfordeling","When do you write thinos":"Hvornår skriver du thinos","Content Length":"Indholdslængde","Distribution of thino lengths":"Fordeling af thino-længder","Daily Thinos":"Daglige Thinos","Show Time Distribution":"Vis tidsfordeling","Hide date picker":"Skjul datoværktøj","Show date picker":"Vis datoværktøj","Clear filter":"Ryd filter","Copy link":"Kopier link","Copy embed link":"Kopier indlejringslink","Ctrl/Cmd + Enter to save thino":"Ctrl/Cmd + Enter for at gemme thino","Fixed strings for thinos":"Faste strenge for thinos","Use fixed strings for thinos":"Brug faste strenge for thinos","Enable to add fixed strings at the beginning or end of thinos.":"Aktiver for at tilføje faste strenge i begyndelsen eller slutningen af thinos.","Fixed prefix for thinos":"Fast præfiks for thinos","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Tilføj denne streng i begyndelsen af hver thino. Understøtter pladsholdere som {{TIME|YYYYMMDDHHmmss}}.","Fixed suffix for thinos":"Fast suffiks for thinos","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Tilføj denne streng i slutningen af hver thino. Understøtter pladsholdere som {{TIME|YYYYMMDDHHmmss}}.","Word count exceeded":"Ordantal overskredet","Word count feature":"Ordtællingsfunktion","Enable real-time word count display in the editor":"Aktiver realtids ordtælling i editoren","Maximum word count":"Maksimalt ordantal","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"Indstil et maksimalt ordantal for thino. Editoren vil vise en advarsel når det overskrides. Indstil til 0 for ubegrænset.","No linked thinos found":"Ingen linkede thinos fundet","Reference links group":"Referencelinks-gruppe","Enable reference links group in thino.":"Aktiver referencelinks-gruppe i thino.","No reference links found":"Ingen referencelinks fundet","Outgoing Links":"Udgående links","Incoming Links":"Indgående links","Error fetching reference links":"Fejl ved hentning af referencelinks","Double click behavior":"Dobbeltklik-adfærd","Set the behavior when double click on a thino.":"Indstil adfærden ved dobbeltklik på en thino.","Open thino":"Åbn thino","Edit thino":"Rediger thino","Go to source":"Gå til kilde","Do nothing":"Gør ingenting","Use default header in mobile view":"Brug standardoverskrift i mobilvisning","Use default header in mobile view of thino rather than custom header.":"Brug standardoverskrift i mobilvisning af thino i stedet for en custom overskrift."},q$={welcome:"Willkommen bei Thino",ribbonIconTitle:"Thino",to:"zu",months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan.","Feb.","März","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],weekDays:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],weekDaysShort:["So","Mo","Di","Mi","Do","Fr","Sa"],year:null,month:null,"Basic Options":"Grundeinstellungen","User name":"Benutzername","Set your user name here. 'Memos 😏' By default":"Setze deinen Benutzernamen hier. 'Thino 😏' als Standard",'You can set target heading like "# Heading" to control data location':'Du kannst eine Zielüberschrift wie "# Überschrift" setzen, um den Datenspeicherort zu steuern',"Insert after heading":"Nach Überschrift einfügen","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Wenn leer gelassen, wird der aufgezeichnete Thino-Inhalt am Ende des Tagebuchs eingefügt; wenn ein Titel angegeben wird, werden alle aufgezeichneten Thino-Inhalte einheitlich unter diesem Titel kategorisiert.","Allows admonitions to be created using ":"Erlaubt das Erstellen von Hinweisen mit ","Process Memos below":"Thinos unten verarbeiten","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Wenn leer gelassen, zeigt die Thino-Oberfläche alle Thino-Aufzeichnungen an; wenn ein Titel angegeben wird, zeigt die Thino-Oberfläche nur die Inhalte unter diesem Titel an, und anderswo geschriebene Inhalte werden nicht angezeigt.","Save Memo button label":"Beschriftung des Thino-Speichern-Buttons","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"Der Text, der auf dem Thino-Speichern-Button in der Benutzeroberfläche angezeigt wird. 'NOTEIT' als Standard.","Focus on editor when open memos":"Fokus auf Editor beim Öffnen von Thino","Focus on editor when open memos. Focus by default.":"Fokus auf Editor beim Öffnen von Thino. Standardmäßig fokussiert.","Open daily memos with open memos":"Tägliche Thinos beim Öffnen von Thino öffnen","Open daily memos with open memos. Open by default.":"Tägliche Thinos beim Öffnen von Thino öffnen. Standardmäßig geöffnet.","Open Memos when obsidian opens":"Thino beim Öffnen von Obsidian öffnen","When enable this, Memos will open when Obsidian opens. False by default.":"Wenn aktiviert, wird Thino beim Öffnen von Obsidian geöffnet. Standardmäßig deaktiviert.","Hide done tasks in Memo list":"Erledigte Aufgaben in der Thino-Liste ausblenden","Hide all done tasks in Memo list. Show done tasks by default.":"Alle erledigten Aufgaben in der Thino-Liste ausblenden. Standardmäßig werden erledigte Aufgaben angezeigt.","Advanced Options":"Erweiterte Einstellungen","UI language for date":"UI-Sprache für Datum","Translates the date UI language. Only 'en' and 'zh' are available.":"Übersetzt die Datums-UI-Sprache. Nur 'en' und 'zh' sind verfügbar.","Default prefix when save thino":"Standardpräfix beim Speichern von Thino","Set the default prefix when create memo, 'List' by default.":"Setze das Standardpräfix beim Erstellen von Thino, 'Liste' als Standard.","Default insert date format":"Standardformat für Datumseinfügung","Set the default date format when insert date by @, 'Tasks' by default.":"Setze das Standarddatumsformat beim Einfügen von Datum mit @, 'Aufgaben' als Standard.","Default editor position on mobile":"Standardposition des Editors auf Mobilgeräten","Set the default editor position on Mobile, 'Top' by default.":"Setze die Standardposition des Editors auf Mobilgeräten, 'Oben' als Standard.","Use button to show editor on mobile":"Button zum Anzeigen des Editors auf Mobilgeräten verwenden","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Setze einen schwebenden Button, um den Editor auf Mobilgeräten aufzurufen. Funktioniert nur, wenn der Editor unten positioniert ist.","Show Time When Copy Results":"Zeit beim Kopieren der Ergebnisse anzeigen","Show time when you copy results, like 12:00. Copy time by default.":"Zeit beim Kopieren der Ergebnisse anzeigen, wie 12:00. Standardmäßig wird die Zeit kopiert.","Show Date When Copy Results":"Datum beim Kopieren der Ergebnisse anzeigen","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Datum beim Kopieren der Ergebnisse anzeigen, wie [[2022-01-01]]. Standardmäßig wird das Datum kopiert.","Add Blank Line Between Different Date":"Leerzeile zwischen verschiedenen Daten einfügen","Add blank line when copy result with date. No blank line by default.":"Leerzeile beim Kopieren von Ergebnissen mit Datum einfügen. Standardmäßig keine Leerzeile.","Share Options":"Freigabeoptionen","Share Memos Image Footer Start":"Start der Fußzeile beim Teilen von Thino-Bildern","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Setze hier beliebigen Text, verwende {ThinoNum} für die Anzahl der Thinos, {UsedDay} für Tage. '{ThinoNum} Thino {UsedDay} Tage' als Standard","Share Memos Image Footer End":"Ende der Fußzeile beim Teilen von Thino-Bildern","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Setze hier beliebigen Text, verwende {UserName} als deinen Benutzernamen. '✍️ Von {UserName}' als Standard","Save Shared Image To Folder For Mobile":"Geteiltes Bild für Mobilgeräte in Ordner speichern","Save image to folder for mobile. False by Default":"Bild für Mobilgeräte in Ordner speichern. Standardmäßig deaktiviert","Say Thank You":"Danke sagen",Donate:"Spenden","If you like this plugin, consider donating to support continued development:":"Wenn dir dieses Plugin gefällt, erwäge eine Spende zur Unterstützung der weiteren Entwicklung:","File Name of Recycle Bin":"Dateiname des Papierkorbs","Set the filename for recycle bin. 'delete' By default":"Setze den Dateinamen für den Papierkorb. 'delete' als Standard","File Name of Query File":"Dateiname der Abfragedatei","Set the filename for query file. 'query' By default":"Setze den Dateinamen für die Abfragedatei. 'query' als Standard","Use Tags In Vault":"Tags im Vault verwenden","Use tags in vault rather than only in Memos. False by default.":"Tags im Vault anstatt nur in Thino verwenden. Standardmäßig deaktiviert.","Ready to convert image into background":"Bereit, Bild in Hintergrund umzuwandeln",List:"Liste",Task:"Aufgabe",Top:"Oben",Bottom:"Unten",TAG:"TAG",DAY:"TAG",QUERY:"ABFRAGE",EDIT:"BEARBEITEN",PIN:"ANHEFTEN",UNPIN:"LÖSEN",DELETE:"LÖSCHEN","CONFIRM!":"BESTÄTIGEN!","CREATE FILTER":"FILTER ERSTELLEN","Comment it...":"Kommentieren...",Settings:"Einstellungen","Recycle bin":"Papierkorb","About Me":"Über mich","Fetching data...":"Daten werden geladen...","Here is No Memos.":"Keine Thinos vorhanden.","Frequently Used Tags":"Häufig verwendete Tags","What do you think now...":"Was denkst du gerade...",READ:"LESEN",MARK:"MARKIEREN",SHARE:"TEILEN",SOURCE:"QUELLE",RESTORE:"WIEDERHERSTELLEN",ARCHIVE:"ARCHIVIEREN","Daily Review":"Tagesrückblick","DELETE AT":"GELÖSCHT AM","Noooop!":"Nööö!","All Data is Loaded 🎉":"Alle Daten geladen 🎉","Quick filter":"Schnellfilter",TYPE:"TYP",LINKED:"VERLINKT","NO TAGS":"KEINE TAGS","HAS LINKS":"HAT LINKS","HAS IMAGES":"HAT BILDER",INCLUDE:"EINSCHLIESSEN",EXCLUDE:"AUSSCHLIESSEN",TEXT:"TEXT",IS:"IST",AND:"UND",OR:"ODER",LIST:"LISTE",ISNOT:"IST NICHT",PATH:"PFAD",METADATA:"METADATEN",SELECT:"AUSWÄHLEN","ADD FILTER TERMS":"FILTERKRITERIEN HINZUFÜGEN",FILTER:"FILTER",Filter:"Filter",TITLE:"TITEL","CREATE QUERY":"ABFRAGE ERSTELLEN","EDIT QUERY":"ABFRAGE BEARBEITEN",MATCH:"ÜBEREINSTIMMUNG",TIMES:"ZEITEN","Share Memo Image":"Thino-Bild teilen","↗Click the button to save":"↗Klicke den Button zum Speichern","Image is generating...":"Bild wird generiert...","Image is loading...":"Bild wird geladen...","Loading...":"Lädt...","😟 Cannot load image, image link maybe broken":"😟 Bild kann nicht geladen werden, Link ist möglicherweise defekt","Daily Memos":"Tägliche Thinos","CANCEL EDIT":"BEARBEITUNG ABBRECHEN","LINK TO THE":"LINK ZUM","Mobile Options":"Mobile Optionen","Experimental Options":"Experimentelle Optionen","Don't support web image yet, please input image path in vault":"Webbilder werden noch nicht unterstützt, bitte Bildpfad im Vault eingeben","Background Image in Dark Theme":"Hintergrundbild im dunklen Theme","Background Image in Light Theme":"Hintergrundbild im hellen Theme",'Set background image in dark theme. Set something like "Daily/one.png"':'Setze Hintergrundbild im dunklen Theme. Setze etwas wie "Daily/one.png"','Set background image in light theme. Set something like "Daily/one.png"':'Setze Hintergrundbild im hellen Theme. Setze etwas wie "Daily/one.png"','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Setze Standard-Thino-Zusammensetzung, verwende {TIME} als "HH:mm" und {CONTENT} als Inhalt. "{TIME} {CONTENT}" als Standard',"Default Memo Composition":"[Veraltet] Standard-Thino-Zusammensetzung","Show Tasks Label":"Aufgaben-Label anzeigen","Show tasks label near the time text. False by default":"Aufgaben-Label neben dem Zeittext anzeigen. Standardmäßig deaktiviert","Please Open Memos First":"Bitte öffne zuerst Thino",DATE:"DATUM",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NICHT_AKTIVIERT",BEFORE:"VOR",AFTER:"NACH","Allow Comments On Memos":"Kommentare für Thinos erlauben","You can comment on memos. False by default":"Du kannst Thinos kommentieren. Standardmäßig deaktiviert",Import:"Importieren","TITLE CANNOT BE NULL!":"TITEL DARF NICHT LEER SEIN!","FILTER CANNOT BE NULL!":"FILTER DARF NICHT LEER SEIN!","Comments In Original DailyNotes/Notes":"Kommentare in Original-Tagesnotizen/Notizen","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"Du solltest das Dataview Plugin Ver. 0.5.9 oder höher installieren, um diese Funktion zu nutzen.","Open Memos Successfully":"Thino erfolgreich geöffnet","Fetch Memos Error":"😭 Fehler beim Laden","Copied to clipboard Successfully":"Erfolgreich in die Zwischenablage kopiert","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Prüfe, ob du das Daily Notes Plugin oder Periodic Notes Plugin geöffnet hast","Please finish the last filter setting first":"Bitte beende zuerst die letzte Filtereinstellung","Close Memos Successfully":"Thino erfolgreich geschlossen","Insert as Memo":"Als Thino einfügen","Insert file as memo content":"Datei als Thino-Inhalt einfügen","Image load failed":"Bildladung fehlgeschlagen","Content cannot be empty":"Inhalt darf nicht leer sein","Unable to create new file.":"Neue Datei konnte nicht erstellt werden.","Failed to fetch deleted memos: ":"Fehler beim Laden gelöschter Thinos: ","RESTORE SUCCEED":"WIEDERHERSTELLUNG ERFOLGREICH","DELETE SUCCEED":"LÖSCHEN ERFOLGREICH","Save Memo button icon":"Thino-Speichern-Button-Symbol","The icon shown on the save Memo button in the UI.":"Das Symbol auf dem Thino-Speichern-Button in der Benutzeroberfläche.","Fetch Memos From Particular Notes":"Thinos aus bestimmten Notizen laden",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'Du kannst jede Dataview-Abfrage für Thinos setzen. Alle Thinos in diesen Notizen werden in der Liste angezeigt. "#memo" als Standard',"Allow Memos to Fetch Memo from Notes":"Thino erlauben, Thinos aus Notizen zu laden","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"Verwende Thino, um alle Thinos in deinen Notizen zu verwalten, nicht nur in Tagesnotizen. Standardmäßig deaktiviert","Always Show Memo Comments":"Thino-Kommentare immer anzeigen","Always show memo comments on memos. False by default":"Thino-Kommentare immer bei Thinos anzeigen. Standardmäßig deaktiviert","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"Du hast keinen Ordner für Tagesnotizen in beiden Plugins (periodic-notes und daily-notes) festgelegt.","Please check your daily note plugin OR periodic notes plugin settings":"Bitte überprüfe deine Einstellungen für das Daily Note Plugin ODER Periodic Notes Plugin","Use which plugin's default configuration":"Welche Plugin-Standardkonfiguration verwenden","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino verwendet die Plugin-Standardkonfiguration zum Laden von Thinos aus Tagesnotizen, 'Daily' als Standard.",Daily:"Täglich","Always Show Leaf Sidebar on PC":"Seitenleiste auf PC immer anzeigen","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"Linke Seitenleiste auf PC/Tablet auch bei einer Blattbreite unter 875px anzeigen. Standardmäßig deaktiviert.","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"Du hast kein Format für Tagesnotizen in beiden Plugins (periodic-notes und daily-notes) festgelegt.","fetch more":"mehr laden","Search all settings":"Alle Einstellungen durchsuchen",General:"Allgemein",Theme:"Theme",Share:"Teilen",Advanced:"Erweitert",Thino:"Thino","Random Review":"Zufällige Überprüfung","ARCHIVED AT":"ARCHIVIERT AM","Failed to get memos from daily notes":"Fehler beim Laden von Thinos aus Tagesnotizen","Failed to delete memo":"Fehler beim Löschen des Thinos","CTRL + ENTER to save":"STRG + ENTER zum Speichern","Started from":"Gestartet von","Custom Background Image":"Benutzerdefiniertes Hintergrundbild","Set custom background image.":"Benutzerdefiniertes Hintergrundbild festlegen.","Custom Memo Footer":"Benutzerdefinierte Thino-Fußzeile","Set custom memo footer.":"Benutzerdefinierte Thino-Fußzeile festlegen.","Heatmap Color Scheme":"Heatmap-Farbschema","Set different color scheme for heatmap.":"Verschiedene Farbschemata für die Heatmap festlegen.","Enable Local Http Server":"Lokalen HTTP-Server aktivieren","Memos Http Server Port":"Thino HTTP-Server-Port","Set memos http server port to listen. '43999' by default":"Port für den Thino HTTP-Server festlegen. '43999' als Standard","Default Editor Mode":"Standard-Editor-Modus","Live-Preview Mode OR Source Mode.":"Live-Vorschau-Modus ODER Quelltext-Modus.","Save type for Thino":"Speichertyp für Thino",DAILY:"TÄGLICH",MULTI:"MEHRFACH",CANVAS:"LEINWAND",ALL:"ALLE",FILE:"DATEI",TODO:"TODO",DONE:"ERLEDIGT",JOURNAL:"JOURNAL",OTHER:"ANDERE","Failed to create daily note, check if it exists.":"Fehler beim Erstellen der Tagesnotiz, prüfe ob sie existiert.","Failed to create daily note. Please check if you created a folder for daily notes.":"Fehler beim Erstellen der Tagesnotiz. Bitte prüfe, ob du einen Ordner für Tagesnotizen erstellt hast.","After you verify your account, please refresh this page.":"Nach der Verifizierung deines Kontos aktualisiere bitte diese Seite.",Verify:"Verifizieren","Oops! You forget to verify insider account":"Ups! Du hast vergessen, das Insider-Konto zu verifizieren","If you have any questions, please contact us.":"Bei Fragen kontaktiere uns bitte.","Delete Thino Directly":"Thino direkt löschen","When delete thino directly, it will not be moved to trash. False by default.":"Wenn Thino direkt gelöscht wird, wird es nicht in den Papierkorb verschoben. Standardmäßig deaktiviert.","Enable opening thino globally":"Globales Öffnen von Thino aktivieren","Enable opening thino globally. False by default.":"Globales Öffnen von Thino aktivieren. Standardmäßig deaktiviert.","Key for opening thino globally":"Tastenkombination für globales Öffnen von Thino","Set key for opening thino globally. CTRL + SHIFT + T by default.":"Tastenkombination für globales Öffnen von Thino festlegen. STRG + SHIFT + T als Standard.","Key for showing thino globally":"Tastenkombination für globales Anzeigen von Thino","Set key for showing thino globally. CTRL + SHIFT + E by default.":"Tastenkombination für globales Anzeigen von Thino festlegen. STRG + SHIFT + E als Standard.","Get activation code":"Aktivierungscode erhalten","Input activation code here":"Aktivierungscode hier eingeben","Copy Thino id":"Thino-ID kopieren","Activate Pro Version":"Pro-Version aktivieren","Please copy Thino id first":"Bitte kopiere zuerst die Thino-ID",'You can set folder name with file name like "folder/file"':'Du kannst den Ordnernamen mit Dateinamen wie "ordner/datei" festlegen','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'Du kannst Ordnernamen wie "ordner1/ordner2/ordner3" festlegen, um Unterordner zu erstellen',"Default save type":"Standard-Speicherort",'Set the default save type for thino. "DAILY" by default':'Standard-Speichertyp für Thino festlegen. "DAILY" als Standard',"Sync Thino via PKMer":"Thino über PKMer synchronisieren",Unlink:"Verknüpfung aufheben",Link:"Verknüpfen","Connect to PKMer Sync, you can check it in ":"Mit PKMer Sync verbinden, du kannst es überprüfen in ","PKMer Sync":"PKMer Sync","Remove successfully":"Erfolgreich entfernt",Deactivate:"Deaktivieren",Remove:"Entfernen","Confirm?":"Bestätigen?","Sync Status":"Synchronisierungsstatus","Start or stop sync":"Synchronisierung starten oder stoppen","Stop sync successfully":"Synchronisierung erfolgreich gestoppt","Start sync successfully":"Synchronisierung erfolgreich gestartet",Stop:"Stopp",Start:"Start","Show thino near mouse":"Thino in Mausnähe anzeigen","Query not found":"Abfrage nicht gefunden","Send to clipboard successfully":"Erfolgreich in die Zwischenablage kopiert","Thino - Failed to start HTTP server, please check the port is available.":"Thino - HTTP-Server konnte nicht gestartet werden, bitte prüfe ob der Port verfügbar ist.","Thino - Started HTTP server on port":"Thino - HTTP-Server gestartet auf Port","Thino - Terminated HTTP server":"Thino - HTTP-Server beendet","File not exist":"Datei existiert nicht","Thino not found":"Thino nicht gefunden","File not found for the given thino path, is creating a new file":"Datei für den angegebenen Thino-Pfad nicht gefunden, erstelle neue Datei","Saved sync token successfully":"Sync-Token erfolgreich gespeichert","Failed to find daily notes folder":"Tagesnotizen-Ordner konnte nicht gefunden werden","Please install obsidian-hover-editor plugin first":"Bitte installiere zuerst das obsidian-hover-editor Plugin","Copied app id successfully":"App-ID erfolgreich kopiert","Please input token first":"Bitte gib zuerst den Token ein","Please enable sync first":"Bitte aktiviere zuerst die Synchronisierung","Init Failed":"Initialisierung fehlgeschlagen","Verify successfully":"Erfolgreich verifiziert","Failed to verify":"Verifizierung fehlgeschlagen","Folder not found for the given thino path, is creating a new folder":"Ordner für den angegebenen Thino-Pfad nicht gefunden, erstelle neuen Ordner","File not found for the given thino path":"Datei für den angegebenen Thino-Pfad nicht gefunden","Failed to read current daily note, check if it exists.":"Aktuelle Tagesnotiz konnte nicht gelesen werden, prüfe ob sie existiert.","Failed to save":"Speichern fehlgeschlagen","Failed to login, please login again":"Anmeldung fehlgeschlagen, bitte erneut anmelden","COPY FAILED":"KOPIEREN FEHLGESCHLAGEN","COPY SUCCEED":"KOPIEREN ERFOLGREICH","Copy selected text":"Ausgewählten Text kopieren","Copy thino":"Thino kopieren",COPY:"KOPIEREN","This is a pro feature, please upgrade to pro version to use it.":"Dies ist eine Pro-Funktion, bitte upgrade auf die Pro-Version um sie zu nutzen.","You can get pro version from: ":"Du kannst die Pro-Version hier erhalten: ",Save:"Speichern",Cancel:"Abbrechen","Thino Daily Target":"Thino Tagesziel",Input:"Eingabe","#Tag":"#Tag","to create tag":"um Tag zu erstellen","You have verified your account. Congrats!":"Du hast dein Konto verifiziert. Glückwunsch!","Pro features":"Pro-Funktionen","Target Thino Count":"Ziel-Thino-Anzahl",on:"am","Switch waterfall view":"Zur Wasserfall-Ansicht wechseln","Switch view":"Ansicht wechseln","Switch list view":"Zur Listen-Ansicht wechseln","Set daily target":"Tagesziel festlegen","Thino Save To: ":"Thino speichern unter: ","Enter fullscreen mode":"Vollbildmodus aktivieren","Exit fullscreen mode":"Vollbildmodus verlassen",words:"Wörter",word:"Wort","Return To Home Page":"Zur Startseite zurückkehren","No thinos to review!":"Keine Thinos zum Überprüfen!","Thinos to review":"Thinos zum Überprüfen","Start Review":"Überprüfen starten",Hard:"Schwer",Good:"Gut",Easy:"Leicht",Again:"Wiederholen","Clear all review data":"Alle Überprüfungsdaten löschen","Daily Progress":"Täglicher Fortschritt","Show stats":"Stats anzeigen","Hide stats":"Stats ausblenden",Remaining:"Verbleibend","Total Reviews":"Gesamte Überprüfungen","Today, you have reviewed all your thinos!":"Heute hast du alle deine Thinos überprüft!","Daily review limit reached! Come back tomorrow.":"Tägliche Überprüfungslimit erreicht! Komm morgen wieder.","Open thino in center window":"Thino im zentralen Fenster öffnen","Open thino in float window":"Thino im schwebenden Fenster öffnen","Open thino in right sidebar":"Thino in der rechten Seitenleiste öffnen","Open thino in left sidebar":"Thino in der linken Seitenleiste öffnen","Show thino editor":"Thino-Editor anzeigen","Toggle minimal mode":"Minimalen Modus umschalten","Focus on thino editor":"Fokus auf Thino-Editor","ReSync web thinos to local":"Web-Thinos mit lokalen synchronisieren","Sync local thinos to web":"Lokale Thinos mit Web synchronisieren","Show daily thino":"Tägliches Thino anzeigen","Focus on search bar":"Fokus auf Suchleiste","Show-thino in popover(Hover editor)":"Thino in Popover anzeigen (Hover-Editor)","Center window":"Zentrales Fenster","Float window":"Schwebendes Fenster","Right sidebar":"Rechte Seitenleiste","Left sidebar":"Linke Seitenleiste","Save thino type when sync local":"Thino-Typ beim lokalen Synchronisieren speichern","Set the default save thino type when sync local, FILE by default.":"Standardtyp zum Speichern von Thino beim lokalen Synchronisieren festlegen, standardmäßig DATEI.","Sync service":"Synchronisierungsdienst","Pro verification status":"Pro-Verifizierungsstatus","Live-preview":"Live-Vorschau",Source:"Quelle","Global copy":"Globales Kopieren","Set the folder name":"Ordnernamen festlegen","Set the filename":"Dateinamen festlegen","Set the filename for current location file":"Dateinamen für aktuelle Ortsdatei festlegen","Switch calendar type":"Kalendertyp wechseln",alphabetical:"alphabetisch",alphabeticalReverse:"alphabetisch rückwärts",byCount:"nach Anzahl",byCountReverse:"nach Anzahl rückwärts","Type here":"Hier tippen",Today:"Heute",Yesterday:"Gestern","Last 7 days":"Letzte 7 Tage","Last 30 days":"Letzte 30 Tage","Last 90 days":"Letzte 90 Tage","Last 180 days":"Letzte 180 Tage","Last 365 days":"Letzte 365 Tage",Found:"Gefunden","Copy filtered thinos":"Gefilterte Thinos kopieren","Bulk delete":"Massenweise löschen","Bulk archive":"Massenweise archivieren","Bulk tag operation":"Massenhafte Tag-Operation","Bulk restore":"Massenweise wiederherstellen","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"Wenn du das tägliche Notizen-Plugin deaktivierst, könnte es sein, dass das Thino nicht richtig gelöscht oder aktualisiert wird. Bitte aktiviere das Plugin und versuche es erneut.",Preview:"Vorschau","Set and save":"Festlegen und speichern","Show day mark in thino list":"Tagesmarkierung in Thino-Liste anzeigen","Show day mark on the top of daily range thino. False by default.":"Tagesmarkierung oben auf dem täglichen Bereichs-Thino anzeigen. Standardmäßig deaktiviert.","Click to expand or fold, Cmd+Click to show all thinos of the day":"Klicken zum Erweitern oder Falten, Cmd+Klick um alle Thinos des Tages anzuzeigen","You can buy a license from":"Du kannst eine Lizenz kaufen von","No thinos in range":"Keine Thinos im Bereich",Month:"Monat",Week:"Woche",Day:"Tag",Agenda:"Agenda",Tomorrow:"Morgen",Previous:"Vorherige",Next:"Nächste","Search all columns...":"Alle Spalten durchsuchen...","Basic Info":"Grundinformationen","Additional Info":"Zusätzliche Informationen","Created At":"Erstellt am",Content:"Inhalt","Thino Type":"Thino-Typ","Source Type":"Quelltyp","Row status":"Zeilenstatus",Path:"Pfad","Pinned Status":"Angeheftet-Status",Table:"Tabelle",Chat:"Chat",Moments:"Momente",Waterfall:"Wasserfall",Calendar:"Kalender","Go to page":"Zur Seite gehen",Page:"Seite",Show:"Zeigen",rows:"Zeilen","Temp Filter":"Temporärer Filter","Open link directly in Thino view":"Link direkt in Thino-Ansicht öffnen","Day mark range":"Tagesmarkierungsbereich","Set the range of day mark. Day by default.":"Bereich der Tagesmarkierung festlegen. Standardmäßig Tag.","Thino is locked":"Thino ist gesperrt","Please unlock Thino by input password":"Bitte entsperre Thino durch Eingabe des Passworts","Auto Download Image":"Automatischer Bilddownload","Auto download image when save to thino. 'false' by default":"Automatischer Bilddownload beim Speichern in Thino. Standardmäßig 'false'","Thino Http IP Type":"Thino Http IP-Typ","Set Thino http server ip to listen. 'localhost' by default":"Thino-HTTP-Server-IP zum Abhören festlegen. Standardmäßig 'localhost'","Password to lock Thino":"Passwort zum Sperren von Thino",Unlock:"Entsperren",Locked:"Gesperrt","Password is incorrect":"Passwort ist falsch",Lock:"Sperren","Need password to unlock Thino":"Passwort zum Entsperren von Thino erforderlich","You have not set a password or enable this feature yet":"Du hast noch kein Passwort festgelegt oder diese Funktion aktiviert",Password:"Passwort","Password for Thino":"Passwort für Thino","Please input your password to change password settings":"Bitte gib dein Passwort ein, um die Passworteinstellungen zu ändern","Please input your password":"Bitte gib dein Passwort ein","Lock thino":"Thino sperren",date:"Datum",time:"Zeit",event:"Ereignis","Add tag position":"Tag-Position hinzufügen","Set the position of the tag when adding tag automatically":"Position des Tags festlegen, wenn Tags automatisch hinzugefügt werden","Add tag automatically":"Tag automatisch hinzufügen","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"Tag am Ende oder Anfang des Thino-Inhalts hinzufügen, wenn ein Thino erstellt und Tags gefiltert werden","Add tag with new line":"Tag mit neuer Zeile hinzufügen","Add tag with new line when adding tag automatically":"Tag mit neuer Zeile hinzufügen, wenn Tags automatisch hinzugefügt werden","Input to select more tags":"Eingabe, um weitere Tags auszuwählen","Tag Bulk Edit":"Tag-Massenbearbeitung","Tag Bulk Select":"Tag-Massenauswahl","Exist Tags":"Vorhandene Tags","Selected Tags":"Ausgewählte Tags","Click to remove exist tag":"Klicken, um vorhandenes Tag zu entfernen","Click to remove selected tag":"Klicken, um ausgewähltes Tag zu entfernen","Select tags":"Tags auswählen","Input to select exist tag":"Eingabe, um vorhandenes Tag auszuwählen",Beginning:"Anfang",End:"Ende","Set the heading for saving thino":"Überschrift zum Speichern von Thino festlegen","# Heading":"# Überschrift","Chat view style":"Chat-Ansichtsstil","Set the style of chat view":"Stil der Chat-Ansicht festlegen","Background image for moments view":"Hintergrundbild für Momente-Ansicht","Set the background image for moments view":"Hintergrundbild für Momente-Ansicht festlegen","Icon for moments/chat view/share image":"Symbol für Momente/Chat-Ansicht/Freigabebild","Set the icon for moments/chat view/share image":"Symbol für Momente/Chat-Ansicht/Freigabebild festlegen","Quote for moments view/share image":"Zitat für Momente-Ansicht/Freigabebild","Set the quote for moments view/share image":"Zitat für Momente-Ansicht/Freigabebild festlegen","Theme for Thino":"Thema für Thino","Set the theme for Thino":"Thema für Thino festlegen","Interface Details":"Schnittstellendetails","Task amount":"Aufgabenmenge","Thino status":"Thino-Status","Used tags":"Verwendete Tags","Used days":"Verwendete Tage","Most active day":"Aktivster Tag","Most active hour":"Aktivste Stunde","Thino amount":"Thino-Menge","No content to generate.":"Kein Inhalt zum Generieren.","Image generated successfully.":"Bild erfolgreich generiert.","Failed to generate image.":"Fehler beim Generieren des Bildes.","Share filtered thinos as image":"Gefilterte Thinos als Bild teilen","Latest version":"Neueste Version","Previous version":"Vorherige Version","Thino update info":"Thino-Update-Info","Debug info copied to clipboard":"Debug-Informationen in die Zwischenablage kopiert","Copy debug info":"Debug-Informationen kopieren","Failed to load changelog":"Fehler beim Laden des Changelogs","View online":"Online ansehen",ChangeLog:"Änderungsprotokoll","Please open thino first":"Bitte öffne zuerst Thino","Insert editor":"Editor einfügen","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"Bitte lege unterschiedliche Speicherorte für Mehrfachdatei-Einstellungen in Thino fest. Der Tagebuchordner überschneidet sich mit dem Mehrfachdatei-Speicherort, oder es besteht die Gefahr, dass er wiederholt gelesen wird.","Default time prefix for thino in daily notes":"Standard-Zeitpräfix für Thino in täglichen Notizen","Set default time prefix for thino in daily notes.":"Standard-Zeitpräfix für Thino in täglichen Notizen festlegen.","Save image successfully":"Bild erfolgreich gespeichert","User quote":"Benutzerzitat","Set user quote for thino":"Benutzerzitat für Thino festlegen","User icon":"Benutzersymbol","Set user icon for thino. You can input http/https link or file path in vault.":"Benutzersymbol für Thino festlegen. Du kannst einen http/https-Link oder Dateipfad im Tresor eingeben.","User info":"Benutzerinfo","Copy filtered results":"Gefilterte Ergebnisse kopieren","Share image":"Bild teilen",Default:"Standard",Gray:"Grau",Grass:"Gras",Flame:"Flamme",Olive:"Olive",Ice:"Eis",Magenta:"Magenta","Daily notes":"Tägliche Notizen",Editor:"Editor","Append/prepend text when share to Thino":"Text anhängen/voranstellen beim Teilen zu Thino","Append text when share to Thino":"Text anhängen beim Teilen zu Thino","Prepend text when share to Thino":"Text voranstellen beim Teilen zu Thino","Add newline when append/prepend text":"Neue Zeile hinzufügen beim Anhängen/Voranstellen von Text","Input anything here":"Hier etwas eingeben",Prepend:"Voranstellen",Append:"Anhängen",Both:"Beides",None:"Keines","Hide pinned group":"Angeheftete Gruppe ausblenden","Hide pinned group in thino list. False by default.":"Angeheftete Gruppe in Thino-Liste ausblenden. Standardmäßig deaktiviert.","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Überschrift für den Aufgabentyp von Thino festlegen. Standardmäßig wird der aufgezeichnete Thino-Inhalt am Ende des Tagebuchs eingefügt; wenn ein Titel angegeben wird, werden alle aufgezeichneten Thino-Inhalte einheitlich unter diesem Titel kategorisiert.","Different insert target for different type":"Unterschiedliches Einfügeziel für verschiedene Typen","Toggle this to set different insert target for different type of thino, like task or list type of thino":"Aktiviere dies, um unterschiedliche Einfügeziele für verschiedene Thino-Typen festzulegen, wie Aufgaben- oder Listentyp von Thino","You can set whole diary or only part of it":"Du kannst das gesamte Tagebuch oder nur einen Teil davon festlegen","Set process target":"Verarbeitungsziel festlegen",Custom:"Benutzerdefiniert","Whole diary":"Gesamtes Tagebuch","Set thino insert place":"Thino-Einfügeort festlegen","Set where to insert thino content":"Festlegen, wo Thino-Inhalt eingefügt werden soll","End of the diary":"Ende des Tagebuchs","Custom location":"Benutzerdefinierter Ort","Setting guide":"Einstellungsanleitung","Details settings":"Detaileinstellungen","Start Thino":"Thino starten","About Thino Pro":"Über Thino Pro",Enabled:"Aktiviert",Enable:"Aktivieren","Daily notes folder":"Ordner für tägliche Notizen","Set daily notes folder":"Ordner für tägliche Notizen festlegen","Daily note name format":"Namensformat für tägliche Notizen","Set daily note name format":"Namensformat für tägliche Notizen festlegen","Daily note plugin":"Plugin für tägliche Notizen","Enable daily note plugin":"Plugin für tägliche Notizen aktivieren",Selected:"Ausgewählt",Select:"Auswählen","A classic theme for Thino with a two-column layout":"Ein klassisches Thema für Thino mit zweispaltigem Layout",Classic:"Klassisch","A modern theme for Thino with a three-column layout and some unique features.":"Ein modernes Thema für Thino mit dreispaltigem Layout und einigen einzigartigen Funktionen.",Modern:"Modern","Go and enjoy Thino":"Los geht's, viel Spaß mit Thino","Congrats! All settings done":"Glückwunsch! Alle Einstellungen abgeschlossen","Adjust settings that influence your user experience with Thino.":"Passe Einstellungen an, die deine Benutzererfahrung mit Thino beeinflussen.","Set preferences for using Thino":"Präferenzen für die Verwendung von Thino festlegen","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"Wenn du die Thino-Basisversion verwendest, ist die Aktivierung des Plugins für tägliche Notizen erforderlich. Konfiguriere seine Einstellungen, um effektiv damit zu arbeiten.","Go with daily note plugin":"Mit Plugin für tägliche Notizen fortfahren","Choose a theme for Thino.":"Wähle ein Thema für Thino.","Set theme for Thino":"Thema für Thino festlegen","Set up your user info for Thino.":"Richte deine Benutzerinformationen für Thino ein.","Get started with Thino":"Erste Schritte mit Thino","Skip and start Thino":"Überspringen und Thino starten","Next step":"Nächster Schritt","Back to previous step":"Zurück zum vorherigen Schritt","Click to enable =>":"Klicken zum Aktivieren =>","This is Thino's sidebar. Navigate to different path or select query filter.":"Dies ist Thinos Seitenleiste. Navigiere zu verschiedenen Pfaden oder wähle Abfragefilter.","Click here and go to settings page.":"Klicke hier und gehe zur Einstellungsseite.","Click here and go to different path.":"Klicke hier und gehe zu einem anderen Pfad.","Select or create query filter here.":"Wähle oder erstelle hier Abfragefilter.","See the status of Thinos here.":"Siehe hier den Status von Thinos.","Search your thino quickly here.":"Suche dein Thino schnell hier.","Edit or create your thino here.":"Bearbeite oder erstelle dein Thino hier.","See your thinos here.":"Siehe deine Thinos hier.","See your time status of thinos here.":"Siehe hier deinen Zeitstatus von Thinos.","See your tags here. Tags will be shown when thino contains tags.":"Siehe deine Tags hier. Tags werden angezeigt, wenn Thino Tags enthält.",Done:"Fertig","Thino is ready to use. ":"Thino ist einsatzbereit. ","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"Du kannst Thino jetzt verwenden. Wenn du mehr über Thino Pro erfahren möchtest, klicke auf die Schaltfläche unten.","Default time prefix":"Standard-Zeitpräfix","Append Text Action":"Text-Anhänge-Aktion","Prepend Text Action":"Text-Voranstell-Aktion",Preset:"Voreinstellung","Select Tags":"Tags auswählen","It is not available on small view":"Es ist nicht verfügbar in der kleinen Ansicht","Append text":"Text anhängen","Prepend text":"Text voranstellen","Your daily note folder is not set correctly, please check your settings":"Dein Ordner für tägliche Notizen ist nicht korrekt eingestellt, bitte überprüfe deine Einstellungen","Default sharing style":"Standard-Freigabestil","Set the default style for sharing thino, 'Modern' by default.":'Lege den Standardstil für die Freigabe von Thino fest, standardmäßig "Modern".',Clean:"Sauber",Minimal:"Minimal",Gradient:"Farbverlauf","Thino share":"Thino-Freigabe","Copy to clipboard failed":"Kopieren in die Zwischenablage fehlgeschlagen","Copy to clipboard successfully":"Erfolgreich in die Zwischenablage kopiert","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"Dein Inhalt wurde in die Zwischenablage kopiert und in den Editor eingefügt. Bitte versuche es erneut","Share thino":"Thino teilen","Set file name after create thino":"Dateinamen nach Erstellung von Thino festlegen","You can set file name after create thino. A input box will show when you create thino.":"Du kannst den Dateinamen nach der Erstellung von Thino festlegen. Ein Eingabefeld wird angezeigt, wenn du Thino erstellst.",SPLIT:"TEILEN","Split by Heading 1":"Nach Überschrift 1 teilen","Split by Heading 2":"Nach Überschrift 2 teilen","Split by Heading 3":"Nach Überschrift 3 teilen","Insert task":"Aufgabe einfügen","All settings have been reset to default.":"Alle Einstellungen wurden auf die Standardwerte zurückgesetzt.","Reset all Thino settings":"Alle Thino-Einstellungen zurücksetzen","Reset settings":"Einstellungen zurücksetzen","Reset Thino settings to default settings.":"Thino-Einstellungen auf Standardeinstellungen zurücksetzen.","Task Management":"Aufgabenverwaltung","Append completed date when task done in thino":"Abschlussdatum anhängen, wenn Aufgabe in Thino erledigt ist","Append completed date when task done in thino. False by default":"Abschlussdatum anhängen, wenn Aufgabe in Thino erledigt ist. Standardmäßig deaktiviert","Set tag for single file that Thino indexes":"Tag für einzelne Datei festlegen, die Thino indiziert","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"Wenn du hier ein Tag festlegst, wird Thino diese Datei indizieren, die dieses Tag enthält, und es in der Liste anzeigen. Du musst kein `#` hinzufügen.","Set tag for file type file":"Tag für Dateityp-Datei festlegen","Set tag for multi type file":"Tag für Mehrfachtyp-Datei festlegen","Please input the tag":"Bitte gib das Tag ein","Merge thinos in to thino share image":"Thinos in Thino-Freigabebild zusammenführen","Custom height for Thino content":"Benutzerdefinierte Höhe für Thino-Inhalt","Set custom height for Thino content. Like 200px or 20rem":"Benutzerdefinierte Höhe für Thino-Inhalt festlegen. Wie 200px oder 20rem","Input height":"Höhe eingeben","Submit issue":"Problem melden","Current version":"Aktuelle Version","Bug report":"Fehlerbericht","Click the button to copy debug info and open the issue page":"Klicke auf die Schaltfläche, um Debug-Informationen zu kopieren und die Problemseite zu öffnen","Copy and go":"Kopieren und los","Debug info copied":"Debug-Informationen kopiert","Feature request":"Funktionsanfrage","Submit your feature request to the issue page":"Reiche deine Funktionsanfrage auf der Problemseite ein",Go:"Los","Toggle query list visibility":"Abfragelistensichtbarkeit umschalten","Toggle tags visibility":"Tag-Sichtbarkeit umschalten","Toggle sidebar visibility":"Seitenleistensichtbarkeit umschalten",Collapse:"Einklappen",Expand:"Ausklappen","Max height for collapse":"Maximale Höhe für Einklappen","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"Die maximale Höhe für Thino-Einklappen, wenn auf 0 gesetzt, würde Thino nicht einklappen. Standardmäßig 0. (Dies ist keine Zeilenanzahl, sondern die Höhe in px.)","Render content":"Inhalt rendern","Optimize for Callout":"Für Callout optimieren","Won't render content contains more than 3 callouts automatically. True by default":"Rendert Inhalte mit mehr als 3 Callouts nicht automatisch. Standardmäßig aktiviert","The value should be greater than":"Der Wert sollte größer sein als","Append Text":"Text anhängen","Prepend Text":"Text voranstellen","Thino height when collapsed":"Thino-Höhe im eingeklappten Zustand","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"Die Höhe für Thino im eingeklappten Zustand, wenn auf 0 gesetzt, würde Thino nicht einklappen. Standardmäßig 100. (Dies ist keine Zeilenanzahl, sondern die Höhe in px.)","This option will allow you use other views when leaf width is not enough. False by default.":"Diese Option ermöglicht es dir, andere Ansichten zu verwenden, wenn die Blattbreite nicht ausreicht. Standardmäßig deaktiviert.","Can select other views when leaf width is not enough":"Kann andere Ansichten auswählen, wenn Blattbreite nicht ausreicht","TRASH BOX":"PAPIERKORB","Wait templater to finish parse before insert thino":"Warte, bis Templater das Parsen beendet hat, bevor Thino eingefügt wird","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"Diese Option ermöglicht es dir, zu warten, bis Templater das Parsen beendet hat, bevor Thino eingefügt wird, was dazu führen kann, dass du zwischen dem Einfügen von Thino zweimal bestätigen musst. Standardmäßig deaktiviert.","Get thino capture extension":"Thino-Erfassungserweiterung holen","You can capture idea/text from chrome now.":"Du kannst jetzt Ideen/Text aus Chrome erfassen.","Open File":"Datei öffnen","Exported CSV file":"Exportierte CSV-Datei","Updated At":"Aktualisiert am","Export to CSV":"Nach CSV exportieren","Quick add button on mobile navbar":"Schnellhinzufügen-Schaltfläche in der mobilen Navigationsleiste","Always show status text":"Statustext immer anzeigen","Support filter by metadata from file":"Filterung nach Metadaten aus Datei unterstützen","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"Wenn du dies aktivierst, kannst du über Metadaten aus der Datei filtern, wie z.B. Tags in der Datei. Thinos aus Canvas werden jedoch nicht unterstützt. Standardmäßig deaktiviert.","Show source near timestamp in thino":"Quelle neben Zeitstempel in Thino anzeigen","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"Wenn du dies aktivierst, kannst du die Quelle neben dem Zeitstempel in Thino sehen. Du kannst den Titel in den Metadaten festlegen, um dies zu überschreiben. Standardmäßig deaktiviert.","Show Update Message":"Aktualisierungsnachricht anzeigen","Show update message when Thino is updated. True by default":"Aktualisierungsnachricht anzeigen, wenn Thino aktualisiert wird. Standardmäßig aktiviert","Sync manually":"Manuell synchronisieren","Show all scrollbars":"Alle Scrollbalken anzeigen","TIME RANGE":"ZEITRAUM",WITHIN:"INNERHALB","7 days":"7 Tage","14 days":"14 Tage","30 days":"30 Tage","3 months":"3 Monate","6 months":"6 Monate","1 year":"1 Jahr","This week":"Diese Woche","Last week":"Letzte Woche","This month":"Dieser Monat","Last month":"Letzter Monat","This year":"Dieses Jahr","Last year":"Letztes Jahr","No history":"Keine Historie","Today Remaining":"Heute verbleibend","Today Total":"Heute gesamt","Historical Statistics":"Historische Statistiken",byTime:"Nach Zeit",byTimeReverse:"Nach Zeit (umgekehrt)",Stat:"Statistik",Statistics:"Statistiken","Daily Thino Count":"Tägliche Thino-Anzahl",Total:"Gesamt",thinos:"Thinos","Thino Types":"Thino-Typen","Distribution of thino types":"Verteilung der Thino-Typen","Thino Status":"Thino-Status","Distribution of thino status":"Verteilung des Thino-Status","Popular Tags":"Beliebte Tags","Top 10 most used tags":"Top 10 der meistverwendeten Tags","Thino Count":"Thino-Anzahl","Hourly distribution":"Stündliche Verteilung","Current month":"Aktueller Monat","Monthly distribution":"Monatliche Verteilung","30 Days":"Letzte 30 Tage",Year:"Jahr","Time Distribution":"Zeitverteilung","When do you write thinos":"Wann schreibst du Thinos","Content Length":"Inhaltslänge","Distribution of thino lengths":"Verteilung der Thino-Längen","Daily Thinos":"Tägliche Thinos","Show Time Distribution":"Zeitverteilung anzeigen","Hide date picker":"Datumsauswahl ausblenden","Show date picker":"Datumsauswahl anzeigen","Clear filter":"Filter löschen","Copy link":"Link kopieren","Copy embed link":"Einbettungslink kopieren","Ctrl/Cmd + Enter to save thino":"Strg/Cmd + Enter zum Speichern des Thinos","Fixed strings for thinos":"Feste Zeichenketten für Thinos","Use fixed strings for thinos":"Feste Zeichenketten für Thinos verwenden","Enable to add fixed strings at the beginning or end of thinos.":"Aktivieren, um feste Zeichenketten am Anfang oder Ende von Thinos hinzuzufügen.","Fixed prefix for thinos":"Festes Präfix für Thinos","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Füge diese Zeichenkette am Anfang jedes Thinos hinzu. Unterstützt Platzhalter wie {{TIME|YYYYMMDDHHmmss}}.","Fixed suffix for thinos":"Festes Suffix für Thinos","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Füge diese Zeichenkette am Ende jedes Thinos hinzu. Unterstützt Platzhalter wie {{TIME|YYYYMMDDHHmmss}}.","Word count exceeded":"Wortzahl überschritten","Word count feature":"Wortzählfunktion","Enable real-time word count display in the editor":"Echtzeit-Wortzählanzeige im Editor aktivieren","Maximum word count":"Maximale Wortzahl","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"Lege eine maximale Wortzahl für Thino fest. Der Editor zeigt eine Warnung an, wenn diese überschritten wird. Setze auf 0 für unbegrenzt.","No linked thinos found":"Keine verknüpften Thinos gefunden","Reference links group":"Referenzlinks-Gruppe","Enable reference links group in thino.":"Referenzlinks-Gruppe in Thino aktivieren.","No reference links found":"Keine Referenzlinks gefunden","Outgoing Links":"Ausgehende Links","Incoming Links":"Eingehende Links","Error fetching reference links":"Fehler beim Abrufen von Referenzlinks","Double click behavior":"Doppelklick-Verhalten","Set the behavior when double click on a thino.":"Lege das Verhalten fest, wenn du auf ein Thino doppelklickst.","Open thino":"Thino öffnen","Edit thino":"Thino bearbeiten","Go to source":"Zur Quelle gehen","Do nothing":"Nichts tun","Use default header in mobile view":"Standardkopfzeile in der mobilen Ansicht verwenden","Use default header in mobile view of thino rather than custom header.":"Verwende die Standardkopfzeile in der mobilen Ansicht von Thino anstelle einer benutzerdefinierten Kopfzeile."},P8={welcome:"Welcome to Thino",ribbonIconTitle:"Thino",to:"to",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan.","Feb.","Mar.","Apr.","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."],weekDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekDaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],year:null,month:null,"Basic Options":"Basic options","User name":"User name","Set your user name here. 'Memos 😏' By default":"Set your user name here. 'Thino 😏' By default",'You can set target heading like "# Heading" to control data location':'You can set target heading like "# Heading" to control data location',"Insert after heading":"Insert after heading","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"You should set the same heading below if you want to insert and process thino below the same heading.","Allows admonitions to be created using ":"Allows admonitions to be created using ","Process Memos below":"Process thino below","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.","Save Memo button label":"Save thino button label","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"The text shown on the save Thino button in the UI. 'NOTEIT' by default.","Focus on editor when open memos":"Focus on editor when open thino","Focus on editor when open memos. Focus by default.":"Focus on editor when open thino. Focus by default.","Open daily memos with open memos":"Open daily thino with open thino","Open daily memos with open memos. Open by default.":"Open daily thino with open thino. Open by default.","Open Memos when obsidian opens":"Open Thino when obsidian opens","When enable this, Memos will open when Obsidian opens. False by default.":"When enable this, Thino will open when Obsidian opens. False by default.","Hide done tasks in Memo list":"Hide done tasks in Thino list","Hide all done tasks in Memo list. Show done tasks by default.":"Hide all done tasks in Thino list. Show done tasks by default.","Advanced Options":"Advanced Options","UI language for date":"UI language for date","Translates the date UI language. Only 'en' and 'zh' are available.":"Translates the date UI language. Only 'en' and 'zh' are available.","Default prefix when save thino":"Default prefix when save thino","Set the default prefix when create memo, 'List' by default.":"Set the default prefix when create thino, 'List' by default.","Default insert date format":"Default insert date format","Set the default date format when insert date by @, 'Tasks' by default.":"Set the default date format when insert date by @, 'Tasks' by default.","Default editor position on mobile":"Default editor position on mobile","Set the default editor position on Mobile, 'Top' by default.":"Set the default editor position on Mobile, 'Top' by default.","Use button to show editor on mobile":"Use button to show editor on mobile","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Set a float button to call editor on mobile. Only when editor located at the bottom works.","Show Time When Copy Results":"Show Time When Copy Results","Show time when you copy results, like 12:00. Copy time by default.":"Show time when you copy results, like 12:00. Copy time by default.","Show Date When Copy Results":"Show Date When Copy Results","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Show date when you copy results, like [[2022-01-01]]. Copy date by default.","Add Blank Line Between Different Date":"Add Blank Line Between Different Date","Add blank line when copy result with date. No blank line by default.":"Add blank line when copy result with date. No blank line by default.","Share Options":"Share Options","Share Memos Image Footer Start":"Share Thino Image Footer Start","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default","Share Memos Image Footer End":"Share Thino Image Footer End","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default","Save Shared Image To Folder For Mobile":"Save Shared Image To Folder For Mobile","Save image to folder for mobile. False by Default":"Save image to folder for mobile. False by Default","Say Thank You":"Say Thank You",Donate:"Donate","If you like this plugin, consider donating to support continued development:":"If you like this plugin, consider donating to support continued development:","File Name of Recycle Bin":"File Name of Recycle Bin","Set the filename for recycle bin. 'delete' By default":"Set the filename for recycle bin. 'delete' By default","File Name of Query File":"File Name of Query File","Set the filename for query file. 'query' By default":"Set the filename for query file. 'query' By default","Use Tags In Vault":"Use Tags In Vault","Use tags in vault rather than only in Memos. False by default.":"Use tags in vault rather than only in Thino. False by default.","Ready to convert image into background":"Ready to convert image into background",List:"List",Task:"Task",Top:"Top",Bottom:"Bottom",TAG:"TAG",DAY:"DAY",QUERY:"Query",EDIT:"EDIT",PIN:"PIN",UNPIN:"UNPIN",DELETE:"DELETE","CONFIRM!":"CONFIRM!","CREATE FILTER":"CREATE FILTER","Comment it...":"Comment it...",Settings:"Settings","Recycle bin":"Recycle bin","About Me":"About Me","Fetching data...":"Fetching data...","Here is No Memos.":"Here is No Thino.","Frequently Used Tags":"Frequently Used Tags","What do you think now...":"What do you think now...",READ:"READ",MARK:"MARK",SHARE:"SHARE",SOURCE:"SOURCE",RESTORE:"RESTORE",ARCHIVE:"Archive","Daily Review":"Daily Review","DELETE AT":"DELETE AT","Noooop!":"Noooop!","All Data is Loaded 🎉":"All Data is Loaded 🎉","Quick filter":"Quick filter",TYPE:"TYPE",LINKED:"LINKED","NO TAGS":"NO TAGS","HAS LINKS":"HAS LINKS","HAS IMAGES":"HAS IMAGES",INCLUDE:"INCLUDE",EXCLUDE:"EXCLUDE",TEXT:"TEXT",IS:"IS",AND:"AND",OR:"OR",LIST:"LIST",ISNOT:"ISNOT",PATH:"PATH",METADATA:"METADATA",SELECT:"SELECT","ADD FILTER TERMS":"ADD FILTER TERMS",FILTER:"FILTER",Filter:"Filter",TITLE:"TITLE","CREATE QUERY":"CREATE QUERY","EDIT QUERY":"EDIT QUERY",MATCH:"MATCH",TIMES:"TIMES","Share Memo Image":"Share Thino Image","↗Click the button to save":"↗Click the button to save","Image is generating...":"Image is generating...","Image is loading...":"Image is loading...","Loading...":"Loading...","😟 Cannot load image, image link maybe broken":"😟 Cannot load image, image link maybe broken","Daily Memos":"Daily Thino","CANCEL EDIT":"CANCEL EDIT","LINK TO THE":"LINK TO THE","Mobile Options":"Mobile Options","Experimental Options":"Experimental Options","Don't support web image yet, please input image path in vault":"Don't support web image yet, please input image path in vault","Background Image in Dark Theme":"Background Image in Dark Theme","Background Image in Light Theme":"Background Image in Light Theme",'Set background image in dark theme. Set something like "Daily/one.png"':'Set background image in dark theme. Set something like "Daily/one.png"','Set background image in light theme. Set something like "Daily/one.png"':'Set background image in light theme. Set something like "Daily/one.png"','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Set default thino composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default',"Default Memo Composition":"[Deprecated] Default Thino Composition","Show Tasks Label":"Show Tasks Label","Show tasks label near the time text. False by default":"Show tasks label near the time text. False by default","Please Open Memos First":"Please Open Thino First",DATE:"DATE",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED",BEFORE:"BEFORE",AFTER:"AFTER","Allow Comments On Memos":"Allow Comments On Thino","You can comment on memos. False by default":"You can comment on thino. False by default",Import:"Import","TITLE CANNOT BE NULL!":"TITLE CANNOT BE NULL!","FILTER CANNOT BE NULL!":"FILTER CANNOT BE NULL!","Comments In Original DailyNotes/Notes":"Comments In Original DailyNotes/Notes","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"You should install Dataview Plugin ver 0.5.9 or later to use this feature.","Open Memos Successfully":"Open Thino Successfully","Fetch Memos Error":"😭 Fetch Error","Copied to clipboard Successfully":"Copied to clipboard Successfully","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Check if you opened Daily Notes Plugin Or Periodic Notes Plugin","Please finish the last filter setting first":"Please finish the last filter setting first","Close Memos Successfully":"Close Thino Successfully","Insert as Memo":"Insert as Thino","Insert file as memo content":"Insert file as thino content","Image load failed":"Image load failed","Content cannot be empty":"Content cannot be empty","Unable to create new file.":"Unable to create new file.","Failed to fetch deleted memos: ":"Failed to fetch deleted thino: ","RESTORE SUCCEED":"RESTORE SUCCEED","DELETE SUCCEED":"DELETE SUCCEED","Save Memo button icon":"Save Thino button icon","The icon shown on the save Memo button in the UI.":"The icon shown on the save Thino button in the UI.","Fetch Memos From Particular Notes":"Fetch Thino From Particular Notes",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'You can set any Dataview Query for thino to fetch it. All thino in those notes will show on list. "#memo" by default',"Allow Memos to Fetch Memo from Notes":"Allow Thino to Fetch Thino from Notes","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"Use Thino to manage all thino in your notes, not only in daily notes. False by default","Always Show Memo Comments":"Always Show Thino Comments","Always show memo comments on memos. False by default":"Always show thino comments on thino. False by default","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.","Please check your daily note plugin OR periodic notes plugin settings":"Please check your daily note plugin OR periodic notes plugin settings","Use which plugin's default configuration":"Use which plugin's default configuration","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino use the plugin's default configuration to fetch thino from daily, 'Daily' by default.",Daily:"Daily","Always Show Leaf Sidebar on PC":"Always Show Leaf Sidebar on PC","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"You didn't set format for daily notes in both periodic-notes and daily-notes plugins.","fetch more":"fetch more","Search all settings":"Search all settings",General:"General",Theme:"Theme",Share:"Share",Advanced:"Advanced",Thino:"Thino","Random Review":"Random Review","ARCHIVED AT":"ARCHIVED AT","Failed to get memos from daily notes":"Failed to get thino from daily notes","Failed to delete memo":"Failed to delete thino","CTRL + ENTER to save":"CTRL + ENTER to save","Started from":"Started from","Custom Background Image":"Custom Background Image","Set custom background image.":"Set custom background image.","Custom Memo Footer":"Custom Thino Footer","Set custom memo footer.":"Set custom thino footer.","Heatmap Color Scheme":"Heatmap Color Scheme","Set different color scheme for heatmap.":"Set different color scheme for heatmap.","Enable Local Http Server":"Enable Local Http Server","Memos Http Server Port":"Thino Http Server Port","Set memos http server port to listen. '43999' by default":"Set thino http server port to listen. '43999' by default","Default Editor Mode":"Default Editor Mode","Live-Preview Mode OR Source Mode.":"Live-Preview Mode/Source Mode.","Save type for Thino":"Save type for Thino",DAILY:"DAILY",MULTI:"MULTI",CANVAS:"CANVAS",ALL:"ALL",FILE:"FILE",TODO:"TODO",DONE:"DONE",JOURNAL:"JOURNAL",OTHER:"OTHER","Failed to create daily note, check if it exists.":"Failed to create daily note, check if it exists.","Failed to create daily note. Please check if you created a folder for daily notes.":"Failed to create daily note. Please check if you created a folder for daily notes.","After you verify your account, please refresh this page.":"After you verify your account, please refresh this page.",Verify:"Verify","Oops! You forget to verify insider account":"Oops! You forget to verify insider account","If you have any questions, please contact us.":"If you have any questions, please contact us.","Delete Thino Directly":"Delete Thino Directly","When delete thino directly, it will not be moved to trash. False by default.":"When delete thino directly, it will not be moved to trash. False by default.","Enable opening thino globally":"Enable opening thino globally","Enable opening thino globally. False by default.":"Enable opening thino globally. False by default.","Key for opening thino globally":"Key for opening thino globally","Set key for opening thino globally. CTRL + SHIFT + T by default.":"Set key for opening thino globally. CTRL + SHIFT + T by default.","Key for showing thino globally":"Key for showing thino globally","Set key for showing thino globally. CTRL + SHIFT + E by default.":"Set key for showing thino globally. CTRL + SHIFT + E by default.","Get activation code":"Get activation code","Input activation code here":"Input activation code here","Copy Thino id":"Copy Thino id","Activate Pro Version":"Activate Pro Version","Please copy Thino id first":"Please copy Thino id first",'You can set folder name with file name like "folder/file"':'You can set folder name with file name like "folder/file"','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'You can set folder name like "folder1/folder2/folder3" to create sub-folder',"Default save type":"Default save location",'Set the default save type for thino. "DAILY" by default':'Set the default save type for thino. "DAILY" by default',"Sync Thino via PKMer":"Sync Thino via PKMer",Unlink:"Unlink",Link:"Link","Connect to PKMer Sync, you can check it in ":"Connect to PKMer Sync, you can check it in ","PKMer Sync":"PKMer Sync","Remove successfully":"Remove successfully",Deactivate:"Deactivate",Remove:"Remove","Confirm?":"Confirm?","Sync Status":"Sync Status","Start or stop sync":"Start or stop sync","Stop sync successfully":"Stop sync successfully","Start sync successfully":"Start sync successfully",Stop:"Stop",Start:"Start","Show thino near mouse":"Show thino near mouse","Query not found":"Query not found","Send to clipboard successfully":"Send to clipboard successfully","Thino - Failed to start HTTP server, please check the port is available.":"Thino - Failed to start HTTP server, please check the port is available.","Thino - Started HTTP server on port":"Thino - Started HTTP server on port","Thino - Terminated HTTP server":"Thino - Terminated HTTP server","File not exist":"File not exist","Thino not found":"Thino not found","File not found for the given thino path, is creating a new file":"File not found for the given thino path, is creating a new file","Saved sync token successfully":"Saved sync token successfully","Failed to find daily notes folder":"Failed to find daily notes folder","Please install obsidian-hover-editor plugin first":"Please install obsidian-hover-editor plugin first","Copied app id successfully":"Copied app id successfully","Please input token first":"Please input token first","Please enable sync first":"Please enable sync first","Init Failed":"Init Failed","Verify successfully":"Verify successfully","Failed to verify":"Failed to verify","Folder not found for the given thino path, is creating a new folder":"Folder not found for the given thino path, is creating a new folder","File not found for the given thino path":"File not found for the given thino path","Failed to read current daily note, check if it exists.":"Failed to read current daily note, check if it exists.","Failed to save":"Failed to save","Failed to login, please login again":"Failed to login, please login again","COPY FAILED":"COPY FAILED","COPY SUCCEED":"COPY SUCCEED","Copy selected text":"Copy selected text","Copy thino":"Copy thino",COPY:"COPY","This is a pro feature, please upgrade to pro version to use it.":"This is a pro feature, please upgrade to pro version to use it.","You can get pro version from: ":"You can get pro version from: ",Save:"Save",Cancel:"Cancel","Thino Daily Target":"Thino Daily Target",Input:"Input","#Tag":"#Tag","to create tag":"to create tag","You have verified your account. Congrats!":"You have verified your account. Congrats!","Pro features":"Pro features","Target Thino Count":"Target Thino Count",on:"on","Switch waterfall view":"Switch waterfall view","Switch view":"Switch view","Switch list view":"Switch list view","Set daily target":"Set daily target","Thino Save To: ":"Thino Save To: ","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",words:"words",word:"word","Return To Home Page":"Return To Home Page","No thinos to review!":"No thinos to review!","Thinos to review":"Thinos to review","Start Review":"Start Review",Hard:"Hard",Good:"Good",Easy:"Easy",Again:"Again","Clear all review data":"Clear all review data","Daily Progress":"Daily Progress","Show stats":"Show stats","Hide stats":"Hide stats",Remaining:"Remaining","Total Reviews":"Total Reviews","Today, you have reviewed all your thinos!":"Today, you have reviewed all your thinos!","Daily review limit reached! Come back tomorrow.":"Daily review limit reached! Come back tomorrow.","Open thino in center window":"Open thino in center window","Open thino in float window":"Open thino in float window","Open thino in right sidebar":"Open thino in right sidebar","Open thino in left sidebar":"Open thino in left sidebar","Show thino editor":"Show thino editor","Toggle minimal mode":"Toggle minimal mode","Focus on thino editor":"Focus on thino editor","ReSync web thinos to local":"ReSync web thinos to local","Sync local thinos to web":"Sync local thinos to web","Show daily thino":"Show daily thino","Focus on search bar":"Focus on search bar","Show-thino in popover(Hover editor)":"Show-thino in popover(Hover editor)","Center window":"Center window","Float window":"Float window","Right sidebar":"Right sidebar","Left sidebar":"Left sidebar","Save thino type when sync local":"Save thino type when sync local","Set the default save thino type when sync local, FILE by default.":"Set the default save thino type when sync local, FILE by default.","Sync service":"Sync service","Pro verification status":"Pro verification status","Live-preview":"Live-preview",Source:"Source","Global copy":"Global copy","Set the folder name":"Set the folder name","Set the filename":"Set the filename","Set the filename for current location file":"Set the filename for current location file","Switch calendar type":"Switch calendar type",alphabetical:"alphabetical",alphabeticalReverse:"alphabeticalReverse",byCount:"byCount",byCountReverse:"byCountReverse","Type here":"Type here",Today:"Today",Yesterday:"Yesterday","Last 7 days":"Last 7 days","Last 30 days":"Last 30 days","Last 90 days":"Last 90 days","Last 180 days":"Last 180 days","Last 365 days":"Last 365 days",Found:"Found","Copy filtered thinos":"Copy filtered thinos","Bulk delete":"Bulk delete","Bulk archive":"Bulk archive","Bulk tag operation":"Bulk tag operation","Bulk restore":"Bulk restore","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.",Preview:"Preview","Set and save":"Set and save","Show day mark in thino list":"Show day mark in thino list","Show day mark on the top of daily range thino. False by default.":"Show day mark on the top of daily range thino. False by default.","Click to expand or fold, Cmd+Click to show all thinos of the day":"Click to expand or fold, Cmd+Click to show all thinos of the day","You can buy a license from":"You can buy a license from","No thinos in range":"No thinos in range",Month:"Month",Week:"Week",Day:"Day",Agenda:"Agenda",Tomorrow:"Tomorrow",Previous:"Previous",Next:"Next","Search all columns...":"Search all columns...","Basic Info":"Basic Info","Additional Info":"Additional Info","Created At":"Created At",Content:"Content","Thino Type":"Thino Type","Source Type":"Source Type","Row status":"Row status",Path:"Path","Pinned Status":"Pinned Status",Table:"Table",Chat:"Chat",Moments:"Moments",Waterfall:"Waterfall",Calendar:"Calendar","Go to page":"Go to page",Page:"Page",Show:"Show",rows:"rows","Temp Filter":"Temp Filter","Open link directly in Thino view":"Open link directly in Thino view","Day mark range":"Day mark range","Set the range of day mark. Day by default.":"Set the range of day mark. Day by default.","Thino is locked":"Thino is locked","Please unlock Thino by input password":"Please unlock Thino by input password","Auto Download Image":"Auto Download Image","Auto download image when save to thino. 'false' by default":"Auto download image when save to thino. 'false' by default","Thino Http IP Type":"Thino Http IP Type","Set Thino http server ip to listen. 'localhost' by default":"Set Thino http server ip to listen. 'localhost' by default","Password to lock Thino":"Password to lock Thino",Unlock:"Unlock",Locked:"Locked","Password is incorrect":"Password is incorrect",Lock:"Lock","Need password to unlock Thino":"Need password to unlock Thino","You have not set a password or enable this feature yet":"You have not set a password or enable this feature yet",Password:"Password","Password for Thino":"Password for Thino","Please input your password to change password settings":"Please input your password to change password settings","Please input your password":"Please input your password","Lock thino":"Lock thino",date:"date",time:"time",event:"event","Add tag position":"Add tag position","Set the position of the tag when adding tag automatically":"Set the position of the tag when adding tag automatically","Add tag automatically":"Add tag automatically","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"Add tag to the end or beginning of the thino content when creating a thino and filtering tags","Add tag with new line":"Add tag with new line","Add tag with new line when adding tag automatically":"Add tag with new line when adding tag automatically","Input to select more tags":"Input to select more tags","Tag Bulk Edit":"Tag Bulk Edit","Tag Bulk Select":"Tag Bulk Select","Exist Tags":"Exist Tags","Selected Tags":"Selected Tags","Click to remove exist tag":"Click to remove exist tag","Click to remove selected tag":"Click to remove selected tag","Select tags":"Select tags","Input to select exist tag":"Input to select exist tag",Beginning:"Beginning",End:"End","Set the heading for saving thino":"Set the heading for saving thino","# Heading":"# Heading","Chat view style":"Chat view style","Set the style of chat view":"Set the style of chat view","Background image for moments view":"Background image for moments view","Set the background image for moments view":"Set the background image for moments view","Icon for moments/chat view/share image":"Icon for moments/chat view/share image","Set the icon for moments/chat view/share image":"Set the icon for moments/chat view/share image","Quote for moments view/share image":"Quote for moments view/share image","Set the quote for moments view/share image":"Set the quote for moments view/share image","Theme for Thino":"Theme for Thino","Set the theme for Thino":"Set the theme for Thino","Interface Details":"Interface Details","Task amount":"Task amount","Thino status":"Thino status","Used tags":"Used tags","Used days":"Used days","Most active day":"Most active day","Most active hour":"Most active hour","Thino amount":"Thino amount","No content to generate.":"No content to generate.","Image generated successfully.":"Image generated successfully.","Failed to generate image.":"Failed to generate image.","Share filtered thinos as image":"Share filtered thinos as image","Latest version":"Latest version","Previous version":"Previous version","Thino update info":"Thino update info","Debug info copied to clipboard":"Debug info copied to clipboard","Copy debug info":"Copy debug info","Failed to load changelog":"Failed to load changelog","View online":"View online",ChangeLog:"ChangeLog","Please open thino first":"Please open thino first","Insert editor":"Insert editor","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.","Default time prefix for thino in daily notes":"Default time prefix for thino in daily notes","Set default time prefix for thino in daily notes.":"Set default time prefix for thino in daily notes.","Save image successfully":"Save image successfully","User quote":"User quote","Set user quote for thino":"Set user quote for thino","User icon":"User icon","Set user icon for thino. You can input http/https link or file path in vault.":"Set user icon for thino. You can input http/https link or file path in vault.","User info":"User info","Copy filtered results":"Copy filtered results","Share image":"Share image",Default:"Default",Gray:"Gray",Grass:"Grass",Flame:"Flame",Olive:"Olive",Ice:"Ice",Magenta:"Magenta","Daily notes":"Daily notes",Editor:"Editor","Append/prepend text when share to Thino":"Append/prepend text when share to Thino","Append text when share to Thino":"Append text when share to Thino","Prepend text when share to Thino":"Prepend text when share to Thino","Add newline when append/prepend text":"Add newline when append/prepend text","Input anything here":"Input anything here",Prepend:"Prepend",Append:"Append",Both:"Both",None:"None","Hide pinned group":"Hide pinned group","Hide pinned group in thino list. False by default.":"Hide pinned group in thino list. False by default.","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.","Different insert target for different type":"Different insert target for different type","Toggle this to set different insert target for different type of thino, like task or list type of thino":"Toggle this to set different insert target for different type of thino, like task or list type of thino","You can set whole diary or only part of it":"You can set whole diary or only part of it","Set process target":"Set process target",Custom:"Custom","Whole diary":"Whole Diary","Set thino insert place":"Set thino insert place","Set where to insert thino content":"Set where to insert thino content","End of the diary":"End of the diary","Custom location":"Custom location","Setting guide":"User setting guide","Details settings":"Details settings","Start Thino":"Start Thino","About Thino Pro":"About Thino Pro",Enabled:"Enabled",Enable:"Enable","Daily notes folder":"Daily notes folder","Set daily notes folder":"Set daily notes folder","Daily note name format":"Daily note name format","Set daily note name format":"Set daily note name format","Daily note plugin":"Daily note plugin","Enable daily note plugin":"Enable daily note plugin",Selected:"Selected",Select:"Select","A classic theme for Thino with a two-column layout":"A classic theme for Thino with a two-column layout",Classic:"Classic","A modern theme for Thino with a three-column layout and some unique features.":"A modern theme for Thino with a three-column layout and some unique features.",Modern:"Modern","Go and enjoy Thino":"Go and enjoy Thino","Congrats! All settings done":"Congrats! All settings done","Adjust settings that influence your user experience with Thino.":"Adjust settings that influence your user experience with Thino.","Set preferences for using Thino":"Set preferences for using Thino","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.","Go with daily note plugin":"Go with daily note plugin","Choose a theme for Thino.":"Choose a theme for Thino.","Set theme for Thino":"Set theme for Thino","Set up your user info for Thino.":"Set up your user info for Thino.","Get started with Thino":"Get started with Thino","Skip and start Thino":"Skip and start Thino","Next step":"Next step","Back to previous step":"Back to previous step","Click to enable =>":"Click to enable =>","This is Thino's sidebar. Navigate to different path or select query filter.":"This is Thino's sidebar. Navigate to different path or select query filter.","Click here and go to settings page.":"Click here and go to settings page.","Click here and go to different path.":"Click here and go to different path.","Select or create query filter here.":"Select or create query filter here.","See the status of Thinos here.":"See the status of Thinos here.","Search your thino quickly here.":"Search your thino quickly here.","Edit or create your thino here.":"Edit or create your thino here.","See your thinos here.":"See your thinos here.","See your time status of thinos here.":"See your time status of thinos here.","See your tags here. Tags will be shown when thino contains tags.":"See your tags here. Tags will be shown when thino contains tags.",Done:"Done","Thino is ready to use. ":"Thino is ready to use. ","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"You can start using Thino now. If you want to know more about Thino Pro, click the button below.","Default time prefix":"Default time prefix","Append Text Action":"Append Text Action","Prepend Text Action":"Prepend Text Action",Preset:"Preset","Select Tags":"Select Tags","It is not available on small view":"It is not available on small view","Append text":"Append text","Prepend text":"Prepend text","Your daily note folder is not set correctly, please check your settings":"Your daily note folder is not set correctly, please check your settings","Default sharing style":"Default sharing style","Set the default style for sharing thino, 'Modern' by default.":'Set the default style for sharing thino, "Modern" by default.',Clean:"Clean",Minimal:"Minimal",Gradient:"Gradient","Thino share":"Thino share","Copy to clipboard failed":"Copy to clipboard failed","Copy to clipboard successfully":"Copy to clipboard successfully","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"Your content has been copied to clipboard, and inserted into the editor. Please try it again","Share thino":"Share thino","Set file name after create thino":"Set file name after create thino","You can set file name after create thino. A input box will show when you create thino.":"You can set file name after create thino. A input box will show when you create thino.",SPLIT:"SPLIT","Split by Heading 1":"Split by Heading 1","Split by Heading 2":"Split by Heading 2","Split by Heading 3":"Split by Heading 3","Insert task":"Insert task","All settings have been reset to default.":"All settings have been reset to default.","Reset all Thino settings":"Reset all Thino settings","Reset settings":"Reset settings","Reset Thino settings to default settings.":"Reset Thino settings to default settings.","Task Management":"Task Management","Append completed date when task done in thino":"Append completed date when task done in thino","Append completed date when task done in thino. False by default":"Append completed date when task done in thino. False by default","Set tag for single file that Thino indexes":"Set tag for single file that Thino indexes","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.","Set tag for file type file":"Set tag for file type file","Set tag for multi type file":"Set tag for multi type file","Ignore folders for multi type":"Ignore folders for multi type","Set folders to ignore when using multi type. Separate multiple folders with comma (,).":"Set folders to ignore when using multi type. Separate multiple folders with comma (,).","folder1,folder2/subfolder":"folder1,folder2/subfolder",Interface:"Interface","Please input the tag":"Please input the tag","Merge thinos in to thino share image":"Merge thinos in to thino share image","Custom height for Thino content":"Custom height for Thino content","Set custom height for Thino content. Like 200px or 20rem":"Set custom height for Thino content. Like 200px or 20rem","Input height":"Input height","Submit issue":"Submit issue","Current version":"Current version","Bug report":"Bug report","Click the button to copy debug info and open the issue page":"Click the button to copy debug info and open the issue page","Copy and go":"Copy and go","Debug info copied":"Debug info copied","Feature request":"Feature request","Submit your feature request to the issue page":"Submit your feature request to the issue page",Go:"Go","Toggle query list visibility":"Toggle query list visibility","Toggle tags visibility":"Toggle tags visibility","Toggle sidebar visibility":"Toggle sidebar visibility",Collapse:"Collapse",Expand:"Expand","Max height for collapse":"Max height for collapse","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)","Render content":"Render content","Optimize for Callout":"Optimize for Callout","Won't render content contains more than 3 callouts automatically. True by default":"Won't render content contains more than 3 callouts automatically. True by default","The value should be greater than":"The value should be greater than","Append Text":"Append Text","Prepend Text":"Prepend Text","Thino height when collapsed":"Thino height when collapsed","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"The height for thino when it is collapsed, when set 0, thino would not collapse . 100 by default. (This is not lines count, it is height in px.)","This option will allow you use other views when leaf width is not enough. False by default.":"This option will allow you use other views when leaf width is not enough. False by default.","Can select other views when leaf width is not enough":"Can select other views when leaf width is not enough","TRASH BOX":"TRASH BOX","Wait templater to finish parse before insert thino":"Wait templater to finish parse before insert thino","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.","Get thino capture extension":"Get thino capture extension","You can capture idea/text from chrome now.":"You can capture idea/text from chrome now.","Open File":"Open File","Exported CSV file":"Exported CSV file","Updated At":"Updated At","Export to CSV":"Export to CSV","Quick add button on mobile navbar":"Quick add button on mobile navbar","Always show status text":"Always show status text","Support filter by metadata from file":"Support filter by metadata from file","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.","Show source near timestamp in thino":"Show source near timestamp in thino","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.","Show Update Message":"Show Update Message","Show update message when Thino is updated. True by default":"Show update message when Thino is updated. True by default","Sync manually":"Sync manually","Show all scrollbars":"Show all scrollbars","TIME RANGE":"TIME RANGE",WITHIN:"WITHIN","7 days":"7 days","14 days":"14 days","30 days":"30 days","3 months":"3 months","6 months":"6 months","1 year":"1 year","This week":"This week","Last week":"Last week","This month":"This month","Last month":"Last month","This year":"This year","Last year":"Last year","No history":"No history","Today Remaining":"Today Remaining","Today Total":"Today Total","Historical Statistics":"Historical Statistics",byTime:"By Time",byTimeReverse:"By Time Reverse",Stat:"Stat",Statistics:"Statistics","Daily Thino Count":"Daily Thino Count",Total:"Total",thinos:"thinos","Thino Types":"Thino Types","Distribution of thino types":"Distribution of thino types","Thino Status":"Thino Status","Distribution of thino status":"Distribution of thino status","Popular Tags":"Popular Tags","Top 10 most used tags":"Top 10 most used tags","Thino Count":"Thino Count","Hourly distribution":"Hourly distribution","Current month":"Current month","Monthly distribution":"Monthly distribution","30 Days":"Last 30 days",Year:"Year","Time Distribution":"Time Distribution","When do you write thinos":"When do you write thinos","Content Length":"Content Length","Distribution of thino lengths":"Distribution of thino lengths","Daily Thinos":"Daily Thinos","Show Time Distribution":"Show Time Distribution","Hide date picker":"Hide date picker","Show date picker":"Show date picker","Clear filter":"Clear filter","Copy link":"Copy link","Copy embed link":"Copy embed link","Ctrl/Cmd + Enter to save thino":"Ctrl/Cmd + Enter to save thino","Fixed strings for thinos":"Fixed strings for thinos","Use fixed strings for thinos":"Use fixed strings for thinos","Enable to add fixed strings at the beginning or end of thinos.":"Enable to add fixed strings at the beginning or end of thinos.","Fixed prefix for thinos":"Fixed prefix for thinos","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.","Fixed suffix for thinos":"Fixed suffix for thinos","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.","Word count exceeded":"Word count exceeded","Word count feature":"Word count feature","Enable real-time word count display in the editor":"Enable real-time word count display in the editor","Maximum word count":"Maximum word count","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.","No linked thinos found":"No linked thinos found","Reference links group":"Reference links group","Enable reference links group in thino.":"Enable reference links group in thino.","No reference links found":"No reference links found","Outgoing Links":"Outgoing Links","Incoming Links":"Incoming Links","Error fetching reference links":"Error fetching reference links","Double click behavior":"Double click behavior","Set the behavior when double click on a thino.":"Set the behavior when double click on a thino.","Open thino":"Open thino","Edit thino":"Edit thino","Go to source":"Go to source","Do nothing":"Do nothing","Use default header in mobile view":"Use default header in mobile view","Use default header in mobile view of thino rather than custom header.":"Use default header in mobile view of thino rather than custom header.","Using block link when dragging a thino":"Using block link when dragging a thino","Using block link when dragging a thino for daily":"Using block link when dragging a thino for daily","Matched via tag in content":"Matched via tag in content","Matched via tag in file":"Matched via tag in file","Focus on editor when open":"Focus on editor when open","Focus on editor when open. True by default.":"Focus on editor when open. True by default.","Show scroll to top button":"Show scroll to top button","Show scroll to top button. True by default":"Show scroll to top button. True by default.","Zoom image by default":"Zoom image by default","Zoom image by default when viewing image.":"Zoom image by default when viewing image.","View archive in random review":"View archive in random review","View archived thinos in random review. True by default":"View archived thinos in random review. True by default.","Linked by":"Linked by",Linked:"Linked",DUPLICATE:"Duplicate","Show scrollbars in all thino views.":"Show scrollbars in all thino views.","Drag to paste content":"Drag to paste content","You will be able to paste content from other apps to thino by dragging rather than pasting the block link.":"You will be able to paste content from other apps to thino by dragging rather than pasting the block link.","Dragging behavior":"Dragging behavior","Control the behavior when dragging a thino. You will paste the block link by default. Block-link option only works with source type is Daily Note.":"Control the behavior when dragging a thino. You will paste the block link by default. Block-link option only works with source type is Daily Note.","Block link":"Block link",Text:"Text"},K$={welcome:"Welcome to Thino",ribbonIconTitle:"Thino",to:"to",months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan.","Feb.","Mar.","Apr.","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."],weekDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekDaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],year:null,month:null,"Basic Options":"Basic Options","User name":"User Name","Set your user name here. 'Memos 😏' By default":"Set your user name here. 'Thino 😏' By default",'You can set target heading like "# Heading" to control data location':'You can set target heading like "# Heading" to control data location',"Insert after heading":"Insert After Heading","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorised under that title.":"If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorised under that title.","Allows admonitions to be created using ":"Allows admonitions to be created using ","Process Memos below":"Process Thino Below","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.","Save Memo button label":"Save Thino Button Label","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"The text shown on the save Thino button in the UI. 'NOTEIT' by default.","Focus on editor when open memos":"Focus on Editor When Open Thino","Focus on editor when open memos. Focus by default.":"Focus on editor when open thino. Focus by default.","Open daily memos with open memos":"Open Daily Thino with Open Thino","Open daily memos with open memos. Open by default.":"Open daily thino with open thino. Open by default.","Open Memos when obsidian opens":"Open Thino When Obsidian Opens","When enable this, Memos will open when Obsidian opens. False by default.":"When enabled, Thino will open when Obsidian opens. False by default.","Hide done tasks in Memo list":"Hide Done Tasks in Thino List","Hide all done tasks in Memo list. Show done tasks by default.":"Hide all done tasks in Thino list. Show done tasks by default.","Advanced Options":"Advanced Options","UI language for date":"UI Language for Date","Translates the date UI language. Only 'en' and 'zh' are available.":"Translates the date UI language. Only 'en' and 'zh' are available.","Default prefix when save thino":"Default Prefix When Save Thino","Set the default prefix when create memo, 'List' by default.":"Set the default prefix when create thino, 'List' by default.","Default insert date format":"Default Insert Date Format","Set the default date format when insert date by @, 'Tasks' by default.":"Set the default date format when insert date by @, 'Tasks' by default.","Default editor position on mobile":"Default Editor Position on Mobile","Set the default editor position on Mobile, 'Top' by default.":"Set the default editor position on Mobile, 'Top' by default.","Use button to show editor on mobile":"Use Button to Show Editor on Mobile","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Set a float button to call editor on mobile. Only when editor located at the bottom works.","Show Time When Copy Results":"Show Time When Copy Results","Show time when you copy results, like 12:00. Copy time by default.":"Show time when you copy results, like 12:00. Copy time by default.","Show Date When Copy Results":"Show Date When Copy Results","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Show date when you copy results, like [[2022-01-01]]. Copy date by default.","Add Blank Line Between Different Date":"Add Blank Line Between Different Date","Add blank line when copy result with date. No blank line by default.":"Add blank line when copy result with date. No blank line by default.","Share Options":"Share Options","Share Memos Image Footer Start":"Share Thino Image Footer Start","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default","Share Memos Image Footer End":"Share Thino Image Footer End","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default","Save Shared Image To Folder For Mobile":"Save Shared Image To Folder For Mobile","Save image to folder for mobile. False by Default":"Save image to folder for mobile. False by Default","Say Thank You":"Say Thank You",Donate:"Donate","If you like this plugin, consider donating to support continued development:":"If you like this plugin, consider donating to support continued development:","File Name of Recycle Bin":"File Name of Recycle Bin","Set the filename for recycle bin. 'delete' By default":"Set the filename for recycle bin. 'delete' By default","File Name of Query File":"File Name of Query File","Set the filename for query file. 'query' By default":"Set the filename for query file. 'query' By default","Use Tags In Vault":"Use Tags In Vault","Use tags in vault rather than only in Memos. False by default.":"Use tags in vault rather than only in Thino. False by default.","Ready to convert image into background":"Ready to convert image into background",List:"List",Task:"Task",Top:"Top",Bottom:"Bottom",TAG:"TAG",DAY:"DAY",QUERY:"Query",EDIT:"EDIT",PIN:"PIN",UNPIN:"UNPIN",DELETE:"DELETE","CONFIRM!":"CONFIRM!","CREATE FILTER":"CREATE FILTER","Comment it...":"Comment it...",Settings:"Settings","Recycle bin":"Recycle Bin","About Me":"About Me","Fetching data...":"Fetching data...","Here is No Memos.":"Here is No Thino.","Frequently Used Tags":"Frequently Used Tags","What do you think now...":"What do you think now...",READ:"READ",MARK:"MARK",SHARE:"SHARE",SOURCE:"SOURCE",RESTORE:"RESTORE",ARCHIVE:"Archive","Daily Review":"Daily Review","DELETE AT":"DELETE AT","Noooop!":"Noooop!","All Data is Loaded 🎉":"All Data is Loaded 🎉","Quick filter":"Quick Filter",TYPE:"TYPE",LINKED:"LINKED","NO TAGS":"NO TAGS","HAS LINKS":"HAS LINKS","HAS IMAGES":"HAS IMAGES",INCLUDE:"INCLUDE",EXCLUDE:"EXCLUDE",TEXT:"TEXT",IS:"IS",AND:"AND",OR:"OR",LIST:"LIST",ISNOT:"IS NOT",PATH:"PATH",METADATA:"METADATA",SELECT:"SELECT","ADD FILTER TERMS":"ADD FILTER TERMS",FILTER:"FILTER",Filter:"Filter",TITLE:"TITLE","CREATE QUERY":"CREATE QUERY","EDIT QUERY":"EDIT QUERY",MATCH:"MATCH",TIMES:"TIMES","Share Memo Image":"Share Thino Image","↗Click the button to save":"↗Click the button to save","Image is generating...":"Image is generating...","Image is loading...":"Image is loading...","Loading...":"Loading...","😟 Cannot load image, image link maybe broken":"😟 Cannot load image, image link may be broken","Daily Memos":"Daily Thino","CANCEL EDIT":"CANCEL EDIT","LINK TO THE":"LINK TO THE","Mobile Options":"Mobile Options","Experimental Options":"Experimental Options","Don't support web image yet, please input image path in vault":"Don't support web image yet, please input image path in vault","Background Image in Dark Theme":"Background Image in Dark Theme","Background Image in Light Theme":"Background Image in Light Theme",'Set background image in dark theme. Set something like "Daily/one.png"':'Set background image in dark theme. Set something like "Daily/one.png"','Set background image in light theme. Set something like "Daily/one.png"':'Set background image in light theme. Set something like "Daily/one.png"','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Set default thino composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default',"Default Memo Composition":"[Deprecated] Default Thino Composition","Show Tasks Label":"Show Tasks Label","Show tasks label near the time text. False by default":"Show tasks label near the time text. False by default","Please Open Memos First":"Please Open Thino First",DATE:"DATE",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED",BEFORE:"BEFORE",AFTER:"AFTER","Allow Comments On Memos":"Allow Comments On Thino","You can comment on memos. False by default":"You can comment on thino. False by default",Import:"Import","TITLE CANNOT BE NULL!":"TITLE CANNOT BE NULL!","FILTER CANNOT BE NULL!":"FILTER CANNOT BE NULL!","Comments In Original DailyNotes/Notes":"Comments In Original DailyNotes/Notes","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"You should install Dataview Plugin ver 0.5.9 or later to use this feature.","Open Memos Successfully":"Open Thino Successfully","Fetch Memos Error":"😭 Fetch Error","Copied to clipboard Successfully":"Copied to clipboard Successfully","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Check if you opened Daily Notes Plugin Or Periodic Notes Plugin","Please finish the last filter setting first":"Please finish the last filter setting first","Close Memos Successfully":"Close Thino Successfully","Insert as Memo":"Insert as Thino","Insert file as memo content":"Insert file as thino content","Image load failed":"Image load failed","Content cannot be empty":"Content cannot be empty","Unable to create new file.":"Unable to create new file.","Failed to fetch deleted memos: ":"Failed to fetch deleted thino: ","RESTORE SUCCEED":"RESTORE SUCCEED","DELETE SUCCEED":"DELETE SUCCEED","Save Memo button icon":"Save Thino button icon","The icon shown on the save Memo button in the UI.":"The icon shown on the save Thino button in the UI.","Fetch Memos From Particular Notes":"Fetch Thino From Particular Notes",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'You can set any Dataview Query for thino to fetch it. All thino in those notes will show on list. "#memo" by default',"Allow Memos to Fetch Memo from Notes":"Allow Thino to Fetch Thino from Notes","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"Use Thino to manage all thino in your notes, not only in daily notes. False by default","Always Show Memo Comments":"Always Show Thino Comments","Always show memo comments on memos. False by default":"Always show thino comments on thino. False by default","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"You haven't set folder for daily notes in both periodic-notes and daily-notes plugins.","Please check your daily note plugin OR periodic notes plugin settings":"Please check your daily note plugin OR periodic notes plugin settings","Use which plugin's default configuration":"Use which plugin's default configuration","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino use the plugin's default configuration to fetch thino from daily, 'Daily' by default.",Daily:"Daily","Always Show Leaf Sidebar on PC":"Always Show Leaf Sidebar on PC","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"You haven't set format for daily notes in both periodic-notes and daily-notes plugins.","fetch more":"fetch more","Search all settings":"Search all settings",General:"General",Theme:"Theme",Share:"Share",Advanced:"Advanced",Thino:"Thino","Random Review":"Random Review","ARCHIVED AT":"ARCHIVED AT","Failed to get memos from daily notes":"Failed to get thino from daily notes","Failed to delete memo":"Failed to delete thino","CTRL + ENTER to save":"CTRL + ENTER to save","Started from":"Started from","Custom Background Image":"Custom Background Image","Set custom background image.":"Set custom background image.","Custom Memo Footer":"Custom Thino Footer","Set custom memo footer.":"Set custom thino footer.","Heatmap Color Scheme":"Heatmap Colour Scheme","Set different color scheme for heatmap.":"Set different colour scheme for heatmap.","Enable Local Http Server":"Enable Local Http Server","Memos Http Server Port":"Thino Http Server Port","Set memos http server port to listen. '43999' by default":"Set thino http server port to listen. '43999' by default","Default Editor Mode":"Default Editor Mode","Live-Preview Mode OR Source Mode.":"Live-Preview Mode/Source Mode.","Save type for Thino":"Save type for Thino",DAILY:"DAILY",MULTI:"MULTI",CANVAS:"CANVAS",ALL:"ALL",FILE:"FILE",TODO:"TODO",DONE:"DONE",JOURNAL:"JOURNAL",OTHER:"OTHER","Failed to create daily note, check if it exists.":"Failed to create daily note, check if it exists.","Failed to create daily note. Please check if you created a folder for daily notes.":"Failed to create daily note. Please check if you created a folder for daily notes.","After you verify your account, please refresh this page.":"After you verify your account, please refresh this page.",Verify:"Verify","Oops! You forget to verify insider account":"Oops! You forgot to verify insider account","If you have any questions, please contact us.":"If you have any questions, please contact us.","Delete Thino Directly":"Delete Thino Directly","When delete thino directly, it will not be moved to trash. False by default.":"When delete thino directly, it will not be moved to bin. False by default.","Enable opening thino globally":"Enable opening thino globally","Enable opening thino globally. False by default.":"Enable opening thino globally. False by default.","Key for opening thino globally":"Key for opening thino globally","Set key for opening thino globally. CTRL + SHIFT + T by default.":"Set key for opening thino globally. CTRL + SHIFT + T by default.","Key for showing thino globally":"Key for showing thino globally","Set key for showing thino globally. CTRL + SHIFT + E by default.":"Set key for showing thino globally. CTRL + SHIFT + E by default.","Get activation code":"Get activation code","Input activation code here":"Input activation code here","Copy Thino id":"Copy Thino id","Activate Pro Version":"Activate Pro Version","Please copy Thino id first":"Please copy Thino id first",'You can set folder name with file name like "folder/file"':'You can set folder name with file name like "folder/file"','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'You can set folder name like "folder1/folder2/folder3" to create sub-folder',"Default save type":"Default save location",'Set the default save type for thino. "DAILY" by default':'Set the default save type for thino. "DAILY" by default',"Sync Thino via PKMer":"Sync Thino via PKMer",Unlink:"Unlink",Link:"Link","Connect to PKMer Sync, you can check it in ":"Connect to PKMer Sync, you can check it in ","PKMer Sync":"PKMer Sync","Remove successfully":"Remove successfully",Deactivate:"Deactivate",Remove:"Remove","Confirm?":"Confirm?","Sync Status":"Sync Status","Start or stop sync":"Start or stop sync","Stop sync successfully":"Stop sync successfully","Start sync successfully":"Start sync successfully",Stop:"Stop",Start:"Start","Show thino near mouse":"Show thino near mouse","Query not found":"Query not found","Send to clipboard successfully":"Send to clipboard successfully","Thino - Failed to start HTTP server, please check the port is available.":"Thino - Failed to start HTTP server, please check the port is available.","Thino - Started HTTP server on port":"Thino - Started HTTP server on port","Thino - Terminated HTTP server":"Thino - Terminated HTTP server","File not exist":"File does not exist","Thino not found":"Thino not found","File not found for the given thino path, is creating a new file":"File not found for the given thino path, creating a new file","Saved sync token successfully":"Saved sync token successfully","Failed to find daily notes folder":"Failed to find daily notes folder","Please install obsidian-hover-editor plugin first":"Please install obsidian-hover-editor plugin first","Copied app id successfully":"Copied app id successfully","Please input token first":"Please input token first","Please enable sync first":"Please enable sync first","Init Failed":"Init Failed","Verify successfully":"Verify successfully","Failed to verify":"Failed to verify","Folder not found for the given thino path, is creating a new folder":"Folder not found for the given thino path, creating a new folder","File not found for the given thino path":"File not found for the given thino path","Failed to read current daily note, check if it exists.":"Failed to read current daily note, check if it exists.","Failed to save":"Failed to save","Failed to login, please login again":"Failed to login, please login again","COPY FAILED":"COPY FAILED","COPY SUCCEED":"COPY SUCCEED","Copy selected text":"Copy selected text","Copy thino":"Copy thino",COPY:"COPY","This is a pro feature, please upgrade to pro version to use it.":"This is a pro feature, please upgrade to pro version to use it.","You can get pro version from: ":"You can get pro version from: ",Save:"Save",Cancel:"Cancel","Thino Daily Target":"Thino Daily Target",Input:"Input","#Tag":"#Tag","to create tag":"to create tag","You have verified your account. Congrats!":"You have verified your account. Congrats!","Pro features":"Pro features","Target Thino Count":"Target Thino Count",on:"on","Switch waterfall view":"Switch waterfall view","Switch view":"Switch view","Switch list view":"Switch list view","Set daily target":"Set daily target","Thino Save To: ":"Thino Save To: ","Enter fullscreen mode":"Enter fullscreen mode","Exit fullscreen mode":"Exit fullscreen mode",words:"words",word:"word","Return To Home Page":"Return To Home Page","No thinos to review!":"No thinos to review!","Thinos to review":"Thinos to review","Start Review":"Start Review",Hard:"Hard",Good:"Good",Easy:"Easy",Again:"Again","Clear all review data":"Clear all review data","Daily Progress":"Daily Progress","Show stats":"Show stats","Hide stats":"Hide stats",Remaining:"Remaining","Total Reviews":"Total Reviews","Today, you have reviewed all your thinos!":"Today, you have reviewed all your thinos!","Daily review limit reached! Come back tomorrow.":"Daily review limit reached! Come back tomorrow.","Open thino in center window":"Open thino in centre window","Open thino in float window":"Open thino in float window","Open thino in right sidebar":"Open thino in right sidebar","Open thino in left sidebar":"Open thino in left sidebar","Show thino editor":"Show thino editor","Toggle minimal mode":"Toggle minimal mode","Focus on thino editor":"Focus on thino editor","ReSync web thinos to local":"ReSync web thinos to local","Sync local thinos to web":"Sync local thinos to web","Show daily thino":"Show daily thino","Focus on search bar":"Focus on search bar","Show-thino in popover(Hover editor)":"Show-thino in popover(Hover editor)","Center window":"Centre window","Float window":"Float window","Right sidebar":"Right sidebar","Left sidebar":"Left sidebar","Save thino type when sync local":"Save thino type when sync local","Set the default save thino type when sync local, FILE by default.":"Set the default save thino type when sync local, FILE by default.","Sync service":"Sync service","Pro verification status":"Pro verification status","Live-preview":"Live-preview",Source:"Source","Global copy":"Global copy","Set the folder name":"Set the folder name","Set the filename":"Set the filename","Set the filename for current location file":"Set the filename for current location file","Switch calendar type":"Switch calendar type",alphabetical:"alphabetical",alphabeticalReverse:"alphabeticalReverse",byCount:"byCount",byCountReverse:"byCountReverse","Type here":"Type here",Today:"Today",Yesterday:"Yesterday","Last 7 days":"Last 7 days","Last 30 days":"Last 30 days","Last 90 days":"Last 90 days","Last 180 days":"Last 180 days","Last 365 days":"Last 365 days",Found:"Found","Copy filtered thinos":"Copy filtered thinos","Bulk delete":"Bulk delete","Bulk archive":"Bulk archive","Bulk tag operation":"Bulk tag operation","Bulk restore":"Bulk restore","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.",Preview:"Preview","Set and save":"Set and save","Show day mark in thino list":"Show day mark in thino list","Show day mark on the top of daily range thino. False by default.":"Show day mark on the top of daily range thino. False by default.","Click to expand or fold, Cmd+Click to show all thinos of the day":"Click to expand or fold, Cmd+Click to show all thinos of the day","You can buy a license from":"You can buy a licence from","No thinos in range":"No thinos in range",Month:"Month",Week:"Week",Day:"Day",Agenda:"Agenda",Tomorrow:"Tomorrow",Previous:"Previous",Next:"Next","Search all columns...":"Search all columns...","Basic Info":"Basic Info","Additional Info":"Additional Info","Created At":"Created At",Content:"Content","Thino Type":"Thino Type","Source Type":"Source Type","Row status":"Row status",Path:"Path","Pinned Status":"Pinned Status",Table:"Table",Chat:"Chat",Moments:"Moments",Waterfall:"Waterfall",Calendar:"Calendar","Go to page":"Go to page",Page:"Page",Show:"Show",rows:"rows","Temp Filter":"Temp Filter","Open link directly in Thino view":"Open link directly in Thino view","Day mark range":"Day mark range","Set the range of day mark. Day by default.":"Set the range of day mark. Day by default.","Thino is locked":"Thino is locked","Please unlock Thino by input password":"Please unlock Thino by input password","Auto Download Image":"Auto Download Image","Auto download image when save to thino. 'false' by default":"Auto download image when save to thino. 'false' by default","Thino Http IP Type":"Thino Http IP Type","Set Thino http server ip to listen. 'localhost' by default":"Set Thino http server ip to listen. 'localhost' by default","Password to lock Thino":"Password to lock Thino",Unlock:"Unlock",Locked:"Locked","Password is incorrect":"Password is incorrect",Lock:"Lock","Need password to unlock Thino":"Need password to unlock Thino","You have not set a password or enable this feature yet":"You have not set a password or enabled this feature yet",Password:"Password","Password for Thino":"Password for Thino","Please input your password to change password settings":"Please input your password to change password settings","Please input your password":"Please input your password","Lock thino":"Lock thino",date:"date",time:"time",event:"event","Add tag position":"Add tag position","Set the position of the tag when adding tag automatically":"Set the position of the tag when adding tag automatically","Add tag automatically":"Add tag automatically","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"Add tag to the end or beginning of the thino content when creating a thino and filtering tags","Add tag with new line":"Add tag with new line","Add tag with new line when adding tag automatically":"Add tag with new line when adding tag automatically","Input to select more tags":"Input to select more tags","Tag Bulk Edit":"Tag Bulk Edit","Tag Bulk Select":"Tag Bulk Select","Exist Tags":"Exist Tags","Selected Tags":"Selected Tags","Click to remove exist tag":"Click to remove exist tag","Click to remove selected tag":"Click to remove selected tag","Select tags":"Select tags","Input to select exist tag":"Input to select exist tag",Beginning:"Beginning",End:"End","Set the heading for saving thino":"Set the heading for saving thino","# Heading":"# Heading","Chat view style":"Chat view style","Set the style of chat view":"Set the style of chat view","Background image for moments view":"Background image for moments view","Set the background image for moments view":"Set the background image for moments view","Icon for moments/chat view/share image":"Icon for moments/chat view/share image","Set the icon for moments/chat view/share image":"Set the icon for moments/chat view/share image","Quote for moments view/share image":"Quote for moments view/share image","Set the quote for moments view/share image":"Set the quote for moments view/share image","Theme for Thino":"Theme for Thino","Set the theme for Thino":"Set the theme for Thino","Interface Details":"Interface Details","Task amount":"Task amount","Thino status":"Thino status","Used tags":"Used tags","Used days":"Used days","Most active day":"Most active day","Most active hour":"Most active hour","Thino amount":"Thino amount","No content to generate.":"No content to generate.","Image generated successfully.":"Image generated successfully.","Failed to generate image.":"Failed to generate image.","Share filtered thinos as image":"Share filtered thinos as image","Latest version":"Latest version","Previous version":"Previous version","Thino update info":"Thino update info","Debug info copied to clipboard":"Debug info copied to clipboard","Copy debug info":"Copy debug info","Failed to load changelog":"Failed to load changelog","View online":"View online",ChangeLog:"ChangeLog","Please open thino first":"Please open thino first","Insert editor":"Insert editor","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.","Default time prefix for thino in daily notes":"Default time prefix for thino in daily notes","Set default time prefix for thino in daily notes.":"Set default time prefix for thino in daily notes.","Save image successfully":"Save image successfully","User quote":"User quote","Set user quote for thino":"Set user quote for thino","User icon":"User icon","Set user icon for thino. You can input http/https link or file path in vault.":"Set user icon for thino. You can input http/https link or file path in vault.","User info":"User info","Copy filtered results":"Copy filtered results","Share image":"Share image",Default:"Default",Gray:"Gray",Grass:"Grass",Flame:"Flame",Olive:"Olive",Ice:"Ice",Magenta:"Magenta","Daily notes":"Daily notes",Editor:"Editor","Append/prepend text when share to Thino":"Append/prepend text when share to Thino","Append text when share to Thino":"Append text when share to Thino","Prepend text when share to Thino":"Prepend text when share to Thino","Add newline when append/prepend text":"Add newline when append/prepend text","Input anything here":"Input anything here",Prepend:"Prepend",Append:"Append",Both:"Both",None:"None","Hide pinned group":"Hide pinned group","Hide pinned group in thino list. False by default.":"Hide pinned group in thino list. False by default.","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.","Different insert target for different type":"Different insert target for different type","Toggle this to set different insert target for different type of thino, like task or list type of thino":"Toggle this to set different insert target for different type of thino, like task or list type of thino","You can set whole diary or only part of it":"You can set whole diary or only part of it","Set process target":"Set process target",Custom:"Custom","Whole diary":"Whole Diary","Set thino insert place":"Set thino insert place","Set where to insert thino content":"Set where to insert thino content","End of the diary":"End of the diary","Custom location":"Custom location","Setting guide":"User setting guide","Details settings":"Details settings","Start Thino":"Start Thino","About Thino Pro":"About Thino Pro",Enabled:"Enabled",Enable:"Enable","Daily notes folder":"Daily notes folder","Set daily notes folder":"Set daily notes folder","Daily note name format":"Daily note name format","Set daily note name format":"Set daily note name format","Daily note plugin":"Daily note plugin","Enable daily note plugin":"Enable daily note plugin",Selected:"Selected",Select:"Select","A classic theme for Thino with a two-column layout":"A classic theme for Thino with a two-column layout",Classic:"Classic","A modern theme for Thino with a three-column layout and some unique features.":"A modern theme for Thino with a three-column layout and some unique features.",Modern:"Modern","Go and enjoy Thino":"Go and enjoy Thino","Congrats! All settings done":"Congrats! All settings done","Adjust settings that influence your user experience with Thino.":"Adjust settings that influence your user experience with Thino.","Set preferences for using Thino":"Set preferences for using Thino","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.","Go with daily note plugin":"Go with daily note plugin","Choose a theme for Thino.":"Choose a theme for Thino.","Set theme for Thino":"Set theme for Thino","Set up your user info for Thino.":"Set up your user info for Thino.","Get started with Thino":"Get started with Thino","Skip and start Thino":"Skip and start Thino","Next step":"Next step","Back to previous step":"Back to previous step","Click to enable =>":"Click to enable =>","This is Thino's sidebar. Navigate to different path or select query filter.":"This is Thino's sidebar. Navigate to different path or select query filter.","Click here and go to settings page.":"Click here and go to settings page.","Click here and go to different path.":"Click here and go to different path.","Select or create query filter here.":"Select or create query filter here.","See the status of Thinos here.":"See the status of Thinos here.","Search your thino quickly here.":"Search your thino quickly here.","Edit or create your thino here.":"Edit or create your thino here.","See your thinos here.":"See your thinos here.","See your time status of thinos here.":"See your time status of thinos here.","See your tags here. Tags will be shown when thino contains tags.":"See your tags here. Tags will be shown when thino contains tags.",Done:"Done","Thino is ready to use. ":"Thino is ready to use. ","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"You can start using Thino now. If you want to know more about Thino Pro, click the button below.","Default time prefix":"Default time prefix","Append Text Action":"Append Text Action","Prepend Text Action":"Prepend Text Action",Preset:"Preset","Select Tags":"Select Tags","It is not available on small view":"It is not available on small view","Append text":"Append text","Prepend text":"Prepend text","Your daily note folder is not set correctly, please check your settings":"Your daily note folder is not set correctly, please check your settings","Default sharing style":"Default sharing style","Set the default style for sharing thino, 'Modern' by default.":'Set the default style for sharing thino, "Modern" by default.',Clean:"Clean",Minimal:"Minimal",Gradient:"Gradient","Thino share":"Thino share","Copy to clipboard failed":"Copy to clipboard failed","Copy to clipboard successfully":"Copy to clipboard successfully","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"Your content has been copied to clipboard, and inserted into the editor. Please try it again","Share thino":"Share thino","Set file name after create thino":"Set file name after create thino","You can set file name after create thino. A input box will show when you create thino.":"You can set file name after create thino. A input box will show when you create thino.",SPLIT:"SPLIT","Split by Heading 1":"Split by Heading 1","Split by Heading 2":"Split by Heading 2","Split by Heading 3":"Split by Heading 3","Insert task":"Insert task","All settings have been reset to default.":"All settings have been reset to default.","Reset all Thino settings":"Reset all Thino settings","Reset settings":"Reset settings","Reset Thino settings to default settings.":"Reset Thino settings to default settings.","Task Management":"Task Management","Append completed date when task done in thino":"Append completed date when task done in thino","Append completed date when task done in thino. False by default":"Append completed date when task done in thino. False by default","Set tag for single file that Thino indexes":"Set tag for single file that Thino indexes","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.","Set tag for file type file":"Set tag for file type file","Set tag for multi type file":"Set tag for multi type file","Please input the tag":"Please input the tag","Merge thinos in to thino share image":"Merge thinos in to thino share image","Custom height for Thino content":"Custom height for Thino content","Set custom height for Thino content. Like 200px or 20rem":"Set custom height for Thino content. Like 200px or 20rem","Input height":"Input height","Submit issue":"Submit issue","Current version":"Current version","Bug report":"Bug report","Click the button to copy debug info and open the issue page":"Click the button to copy debug info and open the issue page","Copy and go":"Copy and go","Debug info copied":"Debug info copied","Feature request":"Feature request","Submit your feature request to the issue page":"Submit your feature request to the issue page",Go:"Go","Toggle query list visibility":"Toggle query list visibility","Toggle tags visibility":"Toggle tags visibility","Toggle sidebar visibility":"Toggle sidebar visibility",Collapse:"Collapse",Expand:"Expand","Max height for collapse":"Max height for collapse","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)","Render content":"Render content","Optimize for Callout":"Optimize for Callout","Won't render content contains more than 3 callouts automatically. True by default":"Won't render content contains more than 3 callouts automatically. True by default","The value should be greater than":"The value should be greater than","Append Text":"Append Text","Prepend Text":"Prepend Text","Thino height when collapsed":"Thino height when collapsed","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"The height for thino when it is collapsed, when set 0, thino would not collapse . 100 by default. (This is not lines count, it is height in px.)","This option will allow you use other views when leaf width is not enough. False by default.":"This option will allow you use other views when leaf width is not enough. False by default.","Can select other views when leaf width is not enough":"Can select other views when leaf width is not enough","TRASH BOX":"TRASH BOX","Wait templater to finish parse before insert thino":"Wait templater to finish parse before insert thino","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.","Get thino capture extension":"Get thino capture extension","You can capture idea/text from chrome now.":"You can capture idea/text from chrome now.","Open File":"Open File","Exported CSV file":"Exported CSV file","Updated At":"Updated At","Export to CSV":"Export to CSV","Quick add button on mobile navbar":"Quick add button on mobile navbar","Always show status text":"Always show status text","Support filter by metadata from file":"Support filter by metadata from file","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.","Show source near timestamp in thino":"Show source near timestamp in thino","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.","Show Update Message":"Show Update Message","Show update message when Thino is updated. True by default":"Show update message when Thino is updated. True by default","Sync manually":"Sync manually","Show all scrollbars":"Show all scrollbars","TIME RANGE":"TIME RANGE",WITHIN:"WITHIN","7 days":"7 days","14 days":"14 days","30 days":"30 days","3 months":"3 months","6 months":"6 months","1 year":"1 year","This week":"This week","Last week":"Last week","This month":"This month","Last month":"Last month","This year":"This year","Last year":"Last year","No history":"No history","Today Remaining":"Today Remaining","Today Total":"Today Total","Historical Statistics":"Historical Statistics",byTime:"By Time",byTimeReverse:"By Time Reverse",Stat:"Stat",Statistics:"Statistics","Daily Thino Count":"Daily Thino Count",Total:"Total",thinos:"thinos","Thino Types":"Thino Types","Distribution of thino types":"Distribution of thino types","Thino Status":"Thino Status","Distribution of thino status":"Distribution of thino status","Popular Tags":"Popular Tags","Top 10 most used tags":"Top 10 most used tags","Thino Count":"Thino Count","Hourly distribution":"Hourly distribution","Current month":"Current month","Monthly distribution":"Monthly distribution","30 Days":"Last 30 days",Year:"Year","Time Distribution":"Time Distribution","When do you write thinos":"When do you write thinos","Content Length":"Content Length","Distribution of thino lengths":"Distribution of thino lengths","Daily Thinos":"Daily Thinos","Show Time Distribution":"Show Time Distribution","Hide date picker":"Hide date picker","Show date picker":"Show date picker","Clear filter":"Clear filter","Copy link":"Copy link","Copy embed link":"Copy embed link","Ctrl/Cmd + Enter to save thino":"Ctrl/Cmd + Enter to save thino","Fixed strings for thinos":"Fixed strings for thinos","Use fixed strings for thinos":"Use fixed strings for thinos","Enable to add fixed strings at the beginning or end of thinos.":"Enable to add fixed strings at the beginning or end of thinos.","Fixed prefix for thinos":"Fixed prefix for thinos","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.","Fixed suffix for thinos":"Fixed suffix for thinos","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.","Word count exceeded":"Word count exceeded","Word count feature":"Word count feature","Enable real-time word count display in the editor":"Enable real-time word count display in the editor","Maximum word count":"Maximum word count","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.","No linked thinos found":"No linked thinos found","Reference links group":"Reference links group","Enable reference links group in thino.":"Enable reference links group in thino.","No reference links found":"No reference links found","Outgoing Links":"Outgoing Links","Incoming Links":"Incoming Links","Error fetching reference links":"Error fetching reference links","Double click behavior":"Double click behavior","Set the behavior when double click on a thino.":"Set the behavior when double click on a thino.","Open thino":"Open thino","Edit thino":"Edit thino","Go to source":"Go to source","Do nothing":"Do nothing","Use default header in mobile view":"Use default header in mobile view","Use default header in mobile view of thino rather than custom header.":"Use default header in mobile view of thino rather than custom header."},X$={welcome:"¡Bienvenido a Thino!",ribbonIconTitle:"Thino",to:"a",months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],monthsShort:["Ene.","Feb.","Mar.","Abr.","May.","Jun.","Jul.","Ago.","Sep.","Oct.","Nov.","Dic."],weekDays:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"],weekDaysShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],year:null,month:null,"Basic Options":"Opciones básicas","User name":"Nombre de usuario","Set your user name here. 'Memos 😏' By default":"Establece tu nombre de usuario aquí. 'Thino 😏' por defecto",'You can set target heading like "# Heading" to control data location':'Puedes establecer un encabezado objetivo como "# Encabezado" para controlar la ubicación de los datos',"Insert after heading":"Insertar después del encabezado","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Si se deja en blanco, el contenido thino registrado se insertará al final del diario; si se proporciona un título, todo el contenido thino registrado se categorizará uniformemente bajo ese título.","Allows admonitions to be created using ":"Permite crear advertencias usando ","Process Memos below":"Procesar thinos debajo","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Si se deja en blanco, la interfaz de Thino mostrará todos los contenidos de registros thino; si se proporciona un título, la interfaz de Thino solo mostrará los contenidos bajo ese título, y los contenidos escritos en otros lugares no se mostrarán.","Save Memo button label":"Etiqueta del botón Guardar thino","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"El texto mostrado en el botón guardar Thino en la interfaz. 'NOTEIT' por defecto.","Focus on editor when open memos":"Enfocar en el editor al abrir thinos","Focus on editor when open memos. Focus by default.":"Enfocar en el editor al abrir thinos. Enfocado por defecto.","Open daily memos with open memos":"Abrir thinos diarios al abrir thinos","Open daily memos with open memos. Open by default.":"Abrir thinos diarios al abrir thinos. Abierto por defecto.","Open Memos when obsidian opens":"Abrir Thino cuando se abre Obsidian","When enable this, Memos will open when Obsidian opens. False by default.":"Cuando esto está habilitado, Thino se abrirá cuando se abra Obsidian. Deshabilitado por defecto.","Hide done tasks in Memo list":"Ocultar tareas completadas en la lista de thinos","Hide all done tasks in Memo list. Show done tasks by default.":"Ocultar todas las tareas completadas en la lista de thinos. Mostrar tareas completadas por defecto.","Advanced Options":"Opciones avanzadas","UI language for date":"Idioma de la interfaz para fechas","Translates the date UI language. Only 'en' and 'zh' are available.":"Traduce el idioma de la interfaz de fechas. Solo 'en' y 'zh' están disponibles.","Default prefix when save thino":"Prefijo predeterminado al guardar thino","Set the default prefix when create memo, 'List' by default.":"Establece el prefijo predeterminado al crear thino, 'Lista' por defecto.","Default insert date format":"Formato de fecha de inserción predeterminado","Set the default date format when insert date by @, 'Tasks' by default.":"Establece el formato de fecha predeterminado al insertar fecha con @, 'Tareas' por defecto.","Default editor position on mobile":"Posición predeterminada del editor en móvil","Set the default editor position on Mobile, 'Top' by default.":"Establece la posición predeterminada del editor en móvil, 'Arriba' por defecto.","Use button to show editor on mobile":"Usar botón para mostrar editor en móvil","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Establece un botón flotante para llamar al editor en móvil. Solo funciona cuando el editor está ubicado en la parte inferior.","Show Time When Copy Results":"Mostrar hora al copiar resultados","Show time when you copy results, like 12:00. Copy time by default.":"Mostrar hora cuando copias resultados, como 12:00. Copiar hora por defecto.","Show Date When Copy Results":"Mostrar fecha al copiar resultados","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Mostrar fecha cuando copias resultados, como [[2022-01-01]]. Copiar fecha por defecto.","Add Blank Line Between Different Date":"Agregar línea en blanco entre fechas diferentes","Add blank line when copy result with date. No blank line by default.":"Agregar línea en blanco al copiar resultado con fecha. Sin línea en blanco por defecto.","Share Options":"Opciones de compartir","Share Memos Image Footer Start":"Inicio del pie de imagen al compartir Thino","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Establece lo que quieras aquí, usa {ThinoNum} para mostrar el número de thino, {UsedDay} para días. '{ThinoNum} Thino {UsedDay} Días' por defecto","Share Memos Image Footer End":"Final del pie de imagen al compartir Thino","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Establece lo que quieras aquí, usa {UserName} como tu nombre de usuario. '✍️ Por {UserName}' por defecto","Save Shared Image To Folder For Mobile":"Guardar imagen compartida en carpeta para móvil","Save image to folder for mobile. False by Default":"Guardar imagen en carpeta para móvil. Deshabilitado por defecto","Say Thank You":"Dar las gracias",Donate:"Donar","If you like this plugin, consider donating to support continued development:":"Si te gusta este plugin, considera donar para apoyar el desarrollo continuo:","File Name of Recycle Bin":"Nombre del archivo de la papelera de reciclaje","Set the filename for recycle bin. 'delete' By default":"Establece el nombre de archivo para la papelera. 'eliminar' por defecto","File Name of Query File":"Nombre del archivo de consulta","Set the filename for query file. 'query' By default":"Establece el nombre de archivo para consulta. 'consulta' por defecto","Use Tags In Vault":"Usar etiquetas en la bóveda","Use tags in vault rather than only in Memos. False by default.":"Usar etiquetas en la bóveda en lugar de solo en Thino. Deshabilitado por defecto.","Ready to convert image into background":"Listo para convertir imagen en fondo",List:"Lista",Task:"Tarea",Top:"Arriba",Bottom:"Abajo",TAG:"ETIQUETA",DAY:"DÍA",QUERY:"CONSULTA",EDIT:"EDITAR",PIN:"FIJAR",UNPIN:"DESFIJAR",DELETE:"ELIMINAR","CONFIRM!":"¡CONFIRMAR!","CREATE FILTER":"CREAR FILTRO","Comment it...":"Comentar...",Settings:"Ajustes","Recycle bin":"Papelera de reciclaje","About Me":"Sobre mí","Fetching data...":"Obteniendo datos...","Here is No Memos.":"No hay thinos aquí.","Frequently Used Tags":"Etiquetas frecuentes","What do you think now...":"¿Qué piensas ahora...?",READ:"LEER",MARK:"MARCAR",SHARE:"COMPARTIR",SOURCE:"FUENTE",RESTORE:"RESTAURAR",ARCHIVE:"Archivar","Daily Review":"Revisión diaria","DELETE AT":"ELIMINADO EL","Noooop!":"¡Noooop!","All Data is Loaded 🎉":"Todos los datos están cargados 🎉","Quick filter":"Filtro rápido",TYPE:"TIPO",LINKED:"ENLAZADO","NO TAGS":"SIN ETIQUETAS","HAS LINKS":"TIENE ENLACES","HAS IMAGES":"TIENE IMÁGENES",INCLUDE:"INCLUIR",EXCLUDE:"EXCLUIR",TEXT:"TEXTO",IS:"ES",AND:"Y",OR:"O",LIST:"LISTA",ISNOT:"NO ES",PATH:"RUTA",METADATA:"METADATOS",SELECT:"SELECCIONAR","ADD FILTER TERMS":"AGREGAR TÉRMINOS DE FILTRO",FILTER:"FILTRAR",Filter:"Filtro",TITLE:"TÍTULO","CREATE QUERY":"CREAR CONSULTA","EDIT QUERY":"EDITAR CONSULTA",MATCH:"COINCIDE",TIMES:"VECES","Share Memo Image":"Compartir imagen de Thino","↗Click the button to save":"↗Haz clic en el botón para guardar","Image is generating...":"Generando imagen...","Image is loading...":"Cargando imagen...","Loading...":"Cargando...","😟 Cannot load image, image link maybe broken":"😟 No se puede cargar la imagen, el enlace puede estar roto","Daily Memos":"Thinos diarios","CANCEL EDIT":"CANCELAR EDICIÓN","LINK TO THE":"ENLAZAR A","Mobile Options":"Opciones móviles","Experimental Options":"Opciones experimentales","Don't support web image yet, please input image path in vault":"Aún no se admiten imágenes web, por favor ingresa la ruta de la imagen en la bóveda","Background Image in Dark Theme":"Imagen de fondo en tema oscuro","Background Image in Light Theme":"Imagen de fondo en tema claro",'Set background image in dark theme. Set something like "Daily/one.png"':'Establece la imagen de fondo en tema oscuro. Establece algo como "Daily/one.png"','Set background image in light theme. Set something like "Daily/one.png"':'Establece la imagen de fondo en tema claro. Establece algo como "Daily/one.png"','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Establece la composición predeterminada de thino, debes usar {TIME} como "HH:mm" y {CONTENT} como contenido. "{TIME} {CONTENT}" por defecto',"Default Memo Composition":"[Obsoleto] Composición predeterminada de Thino","Show Tasks Label":"Mostrar etiqueta de tareas","Show tasks label near the time text. False by default":"Mostrar etiqueta de tareas cerca del texto de hora. Deshabilitado por defecto","Please Open Memos First":"Por favor abre Thino primero",DATE:"FECHA",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"PLUGIN_NLDATES_DE_OBSIDIAN_NO_HABILITADO",BEFORE:"ANTES",AFTER:"DESPUÉS","Allow Comments On Memos":"Permitir comentarios en Thino","You can comment on memos. False by default":"Puedes comentar en thinos. Deshabilitado por defecto",Import:"Importar","TITLE CANNOT BE NULL!":"¡EL TÍTULO NO PUEDE ESTAR VACÍO!","FILTER CANNOT BE NULL!":"¡EL FILTRO NO PUEDE ESTAR VACÍO!","Comments In Original DailyNotes/Notes":"Comentarios en notas diarias/notas originales","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"Debes instalar el Plugin Dataview ver 0.5.9 o posterior para usar esta función.","Open Memos Successfully":"Thino abierto exitosamente","Fetch Memos Error":"😭 Error al obtener","Copied to clipboard Successfully":"Copiado al portapapeles exitosamente","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Verifica si abriste el Plugin de notas diarias o el Plugin de notas periódicas","Please finish the last filter setting first":"Por favor termina la última configuración de filtro primero","Close Memos Successfully":"Thino cerrado exitosamente","Insert as Memo":"Insertar como Thino","Insert file as memo content":"Insertar archivo como contenido de thino","Image load failed":"Error al cargar la imagen","Content cannot be empty":"El contenido no puede estar vacío","Unable to create new file.":"No se puede crear nuevo archivo.","Failed to fetch deleted memos: ":"Error al obtener thinos eliminados: ","RESTORE SUCCEED":"RESTAURACIÓN EXITOSA","DELETE SUCCEED":"ELIMINACIÓN EXITOSA","Save Memo button icon":"Icono del botón guardar Thino","The icon shown on the save Memo button in the UI.":"El icono mostrado en el botón guardar Thino en la interfaz.","Fetch Memos From Particular Notes":"Obtener Thinos de notas específicas",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'Puedes establecer cualquier consulta Dataview para thinos para obtenerlos. Todos los thinos en esas notas se mostrarán en la lista. "#memo" por defecto',"Allow Memos to Fetch Memo from Notes":"Permitir a Thino obtener Thino de notas","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"Usar Thino para administrar todos los thinos en tus notas, no solo en notas diarias. Deshabilitado por defecto","Always Show Memo Comments":"Mostrar siempre comentarios de Thino","Always show memo comments on memos. False by default":"Mostrar siempre comentarios de thino en thinos. Deshabilitado por defecto","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"No estableciste carpeta para notas diarias en los plugins de notas periódicas y notas diarias.","Please check your daily note plugin OR periodic notes plugin settings":"Por favor verifica la configuración de tu plugin de notas diarias O plugin de notas periódicas","Use which plugin's default configuration":"Usar la configuración predeterminada de qué plugin","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino usa la configuración predeterminada del plugin para obtener thinos de diario, 'Diario' por defecto.",Daily:"Diario","Always Show Leaf Sidebar on PC":"Mostrar siempre barra lateral en PC","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"Mostrar barra lateral izquierda en PC/Tablet incluso cuando el ancho de la hoja es menor a 875px. Deshabilitado por defecto.","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"No estableciste formato para notas diarias en los plugins de notas periódicas y notas diarias.","fetch more":"cargar más","Search all settings":"Buscar todos los ajustes",General:"General",Theme:"Tema",Share:"Compartir",Advanced:"Avanzado",Thino:"Thino","Random Review":"Revisión aleatoria","ARCHIVED AT":"ARCHIVADO EL","Failed to get memos from daily notes":"Error al obtener thinos de notas diarias","Failed to delete memo":"Error al eliminar thino","CTRL + ENTER to save":"CTRL + ENTER para guardar","Started from":"Comenzado desde","Custom Background Image":"Imagen de fondo personalizada","Set custom background image.":"Establecer imagen de fondo personalizada.","Custom Memo Footer":"Pie de Thino personalizado","Set custom memo footer.":"Establecer pie de thino personalizado.","Heatmap Color Scheme":"Esquema de color del mapa de calor","Set different color scheme for heatmap.":"Establecer diferente esquema de color para el mapa de calor.","Enable Local Http Server":"Habilitar servidor Http local","Memos Http Server Port":"Puerto del servidor Http de Thino","Set memos http server port to listen. '43999' by default":"Establecer puerto del servidor http de thino para escuchar. '43999' por defecto","Default Editor Mode":"Modo de editor predeterminado","Live-Preview Mode OR Source Mode.":"Modo vista previa en vivo O modo fuente.","Save type for Thino":"Tipo de guardado para Thino",DAILY:"DIARIO",MULTI:"MÚLTIPLE",CANVAS:"LIENZO",ALL:"TODO",FILE:"ARCHIVO",TODO:"POR HACER",DONE:"HECHO",JOURNAL:"DIARIO",OTHER:"OTRO","Failed to create daily note, check if it exists.":"Error al crear nota diaria, verifica si existe.","Failed to create daily note. Please check if you created a folder for daily notes.":"Error al crear nota diaria. Por favor verifica si creaste una carpeta para notas diarias.","After you verify your account, please refresh this page.":"Después de verificar tu cuenta, por favor actualiza esta página.",Verify:"Verificar","Oops! You forget to verify insider account":"¡Ups! Olvidaste verificar la cuenta insider","If you have any questions, please contact us.":"Si tienes alguna pregunta, por favor contáctanos.","Delete Thino Directly":"Eliminar Thino directamente","When delete thino directly, it will not be moved to trash. False by default.":"Al eliminar thino directamente, no se moverá a la papelera. Deshabilitado por defecto.","Enable opening thino globally":"Habilitar apertura global de thino","Enable opening thino globally. False by default.":"Habilitar apertura global de thino. Deshabilitado por defecto.","Key for opening thino globally":"Tecla para abrir thino globalmente","Set key for opening thino globally. CTRL + SHIFT + T by default.":"Establecer tecla para abrir thino globalmente. CTRL + SHIFT + T por defecto.","Key for showing thino globally":"Tecla para mostrar thino globalmente","Set key for showing thino globally. CTRL + SHIFT + E by default.":"Establecer tecla para mostrar thino globalmente. CTRL + SHIFT + E por defecto.","Get activation code":"Obtener código de activación","Input activation code here":"Ingresa el código de activación aquí","Copy Thino id":"Copiar id de Thino","Activate Pro Version":"Activar versión Pro","Please copy Thino id first":"Por favor copia el id de Thino primero",'You can set folder name with file name like "folder/file"':'Puedes establecer nombre de carpeta con nombre de archivo como "carpeta/archivo"','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'Puedes establecer nombre de carpeta como "carpeta1/carpeta2/carpeta3" para crear subcarpeta',"Default save type":"Ubicación de guardado predeterminada",'Set the default save type for thino. "DAILY" by default':'Establece el tipo de guardado predeterminado para thino. "DIARIO" por defecto',"Sync Thino via PKMer":"Sincronizar Thino vía PKMer",Unlink:"Desvincular",Link:"Vincular","Connect to PKMer Sync, you can check it in ":"Conectar a PKMer Sync, puedes verificarlo en ","PKMer Sync":"PKMer Sync","Remove successfully":"Eliminado exitosamente",Deactivate:"Desactivar",Remove:"Eliminar","Confirm?":"¿Confirmar?","Sync Status":"Estado de sincronización","Start or stop sync":"Iniciar o detener sincronización","Stop sync successfully":"Sincronización detenida exitosamente","Start sync successfully":"Sincronización iniciada exitosamente",Stop:"Detener",Start:"Iniciar","Show thino near mouse":"Mostrar thino cerca del mouse","Query not found":"Consulta no encontrada","Send to clipboard successfully":"Enviado al portapapeles exitosamente","Thino - Failed to start HTTP server, please check the port is available.":"Thino - Error al iniciar servidor HTTP, por favor verifica que el puerto esté disponible.","Thino - Started HTTP server on port":"Thino - Servidor HTTP iniciado en el puerto","Thino - Terminated HTTP server":"Thino - Servidor HTTP terminado","File not exist":"Archivo no existe","Thino not found":"Thino no encontrado","File not found for the given thino path, is creating a new file":"Archivo no encontrado para la ruta de thino dada, creando nuevo archivo","Saved sync token successfully":"Token de sincronización guardado exitosamente","Failed to find daily notes folder":"Error al encontrar carpeta de notas diarias","Please install obsidian-hover-editor plugin first":"Por favor instala primero el plugin obsidian-hover-editor","Copied app id successfully":"ID de aplicación copiado exitosamente","Please input token first":"Por favor ingresa el token primero","Please enable sync first":"Por favor habilita la sincronización primero","Init Failed":"Fallo de inicialización","Verify successfully":"Verificación exitosa","Failed to verify":"Error al verificar","Folder not found for the given thino path, is creating a new folder":"Carpeta no encontrada para la ruta de thino dada, creando nueva carpeta","File not found for the given thino path":"Archivo no encontrado para la ruta de thino dada","Failed to read current daily note, check if it exists.":"Error al leer nota diaria actual, verifica si existe.","Failed to save":"Error al guardar","Failed to login, please login again":"Error al iniciar sesión, por favor inicia sesión nuevamente","COPY FAILED":"ERROR AL COPIAR","COPY SUCCEED":"COPIADO EXITOSO","Copy selected text":"Copiar texto seleccionado","Copy thino":"Copiar thino",COPY:"COPIAR","This is a pro feature, please upgrade to pro version to use it.":"Esta es una función pro, por favor actualiza a la versión pro para usarla.","You can get pro version from: ":"Puedes obtener la versión pro desde: ",Save:"Guardar",Cancel:"Cancelar","Thino Daily Target":"Objetivo diario de Thino",Input:"Entrada","#Tag":"#Etiqueta","to create tag":"para crear etiqueta","You have verified your account. Congrats!":"¡Has verificado tu cuenta. ¡Felicitaciones!","Pro features":"Funciones pro","Target Thino Count":"Contador objetivo de Thino",on:"en","Switch waterfall view":"Cambiar a vista cascada","Switch view":"Cambiar vista","Switch list view":"Cambiar a vista lista","Set daily target":"Establecer objetivo diario","Thino Save To: ":"Guardar Thino en: ","Enter fullscreen mode":"Entrar en modo pantalla completa","Exit fullscreen mode":"Salir del modo pantalla completa",words:"palabras",word:"palabra","Return To Home Page":"Volver a la página principal","No thinos to review!":"¡No hay thinos para revisar!","Thinos to review":"Thinos para revisar","Start Review":"Comenzar revisión",Hard:"Difícil",Good:"Bueno",Easy:"Fácil",Again:"De nuevo","Clear all review data":"Borrar todos los datos de revisión","Daily Progress":"Progreso diario","Show stats":"Mostrar estadísticas","Hide stats":"Ocultar estadísticas",Remaining:"Restante","Total Reviews":"Total de revisiones","Today, you have reviewed all your thinos!":"¡Hoy has revisado todos tus thinos!","Daily review limit reached! Come back tomorrow.":"¡Límite de revisión diaria alcanzado! Vuelve mañana.","Open thino in center window":"Abrir thino en ventana central","Open thino in float window":"Abrir thino en ventana flotante","Open thino in right sidebar":"Abrir thino en barra lateral derecha","Open thino in left sidebar":"Abrir thino en barra lateral izquierda","Show thino editor":"Mostrar editor de thino","Toggle minimal mode":"Alternar modo mínimo","Focus on thino editor":"Enfocar en editor de thino","ReSync web thinos to local":"Resincronizar thinos web a local","Sync local thinos to web":"Sincronizar thinos locales a web","Show daily thino":"Mostrar thino diario","Focus on search bar":"Enfocar en barra de búsqueda","Show-thino in popover(Hover editor)":"Mostrar thino en ventana emergente (Editor flotante)","Center window":"Ventana central","Float window":"Ventana flotante","Right sidebar":"Barra lateral derecha","Left sidebar":"Barra lateral izquierda","Save thino type when sync local":"Guardar tipo de thino al sincronizar local","Set the default save thino type when sync local, FILE by default.":"Establecer el tipo de guardado predeterminado de thino al sincronizar local, ARCHIVO por defecto.","Sync service":"Servicio de sincronización","Pro verification status":"Estado de verificación Pro","Live-preview":"Vista previa en vivo",Source:"Fuente","Global copy":"Copia global","Set the folder name":"Establecer el nombre de la carpeta","Set the filename":"Establecer el nombre del archivo","Set the filename for current location file":"Establecer el nombre del archivo para la ubicación actual","Switch calendar type":"Cambiar tipo de calendario",alphabetical:"alfabético",alphabeticalReverse:"alfabético inverso",byCount:"por conteo",byCountReverse:"por conteo inverso","Type here":"Escribe aquí",Today:"Hoy",Yesterday:"Ayer","Last 7 days":"Últimos 7 días","Last 30 days":"Últimos 30 días","Last 90 days":"Últimos 90 días","Last 180 days":"Últimos 180 días","Last 365 days":"Últimos 365 días",Found:"Encontrado","Copy filtered thinos":"Copiar thinos filtrados","Bulk delete":"Eliminación masiva","Bulk archive":"Archivo masivo","Bulk tag operation":"Operación masiva de etiquetas","Bulk restore":"Restauración masiva","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"Si estás desactivando el complemento de notas diarias, es posible que el thino no se elimine o actualice correctamente. Por favor, activa el complemento e inténtalo de nuevo.",Preview:"Vista previa","Set and save":"Establecer y guardar","Show day mark in thino list":"Mostrar marca de día en la lista de thinos","Show day mark on the top of daily range thino. False by default.":"Mostrar marca de día en la parte superior del rango diario de thino. Falso por defecto.","Click to expand or fold, Cmd+Click to show all thinos of the day":"Clic para expandir o plegar, Cmd+Clic para mostrar todos los thinos del día","You can buy a license from":"Puedes comprar una licencia desde","No thinos in range":"No hay thinos en el rango",Month:"Mes",Week:"Semana",Day:"Día",Agenda:"Agenda",Tomorrow:"Mañana",Previous:"Anterior",Next:"Siguiente","Search all columns...":"Buscar en todas las columnas...","Basic Info":"Información básica","Additional Info":"Información adicional","Created At":"Creado el",Content:"Contenido","Thino Type":"Tipo de Thino","Source Type":"Tipo de fuente","Row status":"Estado de la fila",Path:"Ruta","Pinned Status":"Estado fijado",Table:"Tabla",Chat:"Chat",Moments:"Momentos",Waterfall:"Cascada",Calendar:"Calendario","Go to page":"Ir a la página",Page:"Página",Show:"Mostrar",rows:"filas","Temp Filter":"Filtro temporal","Open link directly in Thino view":"Abrir enlace directamente en vista Thino","Day mark range":"Rango de marca de día","Set the range of day mark. Day by default.":"Establecer el rango de marca de día. Día por defecto.","Thino is locked":"Thino está bloqueado","Please unlock Thino by input password":"Por favor, desbloquea Thino introduciendo la contraseña","Auto Download Image":"Descarga automática de imagen","Auto download image when save to thino. 'false' by default":"Descargar imagen automáticamente al guardar en thino. 'falso' por defecto","Thino Http IP Type":"Tipo de IP Http de Thino","Set Thino http server ip to listen. 'localhost' by default":"Establecer IP del servidor http de Thino para escuchar. 'localhost' por defecto","Password to lock Thino":"Contraseña para bloquear Thino",Unlock:"Desbloquear",Locked:"Bloqueado","Password is incorrect":"La contraseña es incorrecta",Lock:"Bloquear","Need password to unlock Thino":"Se necesita contraseña para desbloquear Thino","You have not set a password or enable this feature yet":"No has establecido una contraseña o habilitado esta función aún",Password:"Contraseña","Password for Thino":"Contraseña para Thino","Please input your password to change password settings":"Por favor, introduce tu contraseña para cambiar la configuración de contraseña","Please input your password":"Por favor, introduce tu contraseña","Lock thino":"Bloquear thino",date:"fecha",time:"hora",event:"evento","Add tag position":"Agregar posición de etiqueta","Set the position of the tag when adding tag automatically":"Establecer la posición de la etiqueta al agregarla automáticamente","Add tag automatically":"Agregar etiqueta automáticamente","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"Agregar etiqueta al final o al principio del contenido del thino al crear un thino y filtrar etiquetas","Add tag with new line":"Agregar etiqueta con nueva línea","Add tag with new line when adding tag automatically":"Agregar etiqueta con nueva línea al agregar etiqueta automáticamente","Input to select more tags":"Ingresa para seleccionar más etiquetas","Tag Bulk Edit":"Edición masiva de etiquetas","Tag Bulk Select":"Selección masiva de etiquetas","Exist Tags":"Etiquetas existentes","Selected Tags":"Etiquetas seleccionadas","Click to remove exist tag":"Clic para eliminar etiqueta existente","Click to remove selected tag":"Clic para eliminar etiqueta seleccionada","Select tags":"Seleccionar etiquetas","Input to select exist tag":"Ingresa para seleccionar etiqueta existente",Beginning:"Inicio",End:"Fin","Set the heading for saving thino":"Establecer el encabezado para guardar thino","# Heading":"# Encabezado","Chat view style":"Estilo de vista de chat","Set the style of chat view":"Establecer el estilo de vista de chat","Background image for moments view":"Imagen de fondo para vista de momentos","Set the background image for moments view":"Establecer la imagen de fondo para vista de momentos","Icon for moments/chat view/share image":"Icono para vista de momentos/chat/imagen compartida","Set the icon for moments/chat view/share image":"Establecer el icono para vista de momentos/chat/imagen compartida","Quote for moments view/share image":"Cita para vista de momentos/imagen compartida","Set the quote for moments view/share image":"Establecer la cita para vista de momentos/imagen compartida","Theme for Thino":"Tema para Thino","Set the theme for Thino":"Establecer el tema para Thino","Interface Details":"Detalles de interfaz","Task amount":"Cantidad de tareas","Thino status":"Estado de Thino","Used tags":"Etiquetas usadas","Used days":"Días usados","Most active day":"Día más activo","Most active hour":"Hora más activa","Thino amount":"Cantidad de Thinos","No content to generate.":"No hay contenido para generar.","Image generated successfully.":"Imagen generada exitosamente.","Failed to generate image.":"Error al generar imagen.","Share filtered thinos as image":"Compartir thinos filtrados como imagen","Latest version":"Última versión","Previous version":"Versión anterior","Thino update info":"Información de actualización de Thino","Debug info copied to clipboard":"Información de depuración copiada al portapapeles","Copy debug info":"Copiar información de depuración","Failed to load changelog":"Error al cargar el registro de cambios","View online":"Ver en línea",ChangeLog:"Registro de cambios","Please open thino first":"Por favor, abre thino primero","Insert editor":"Insertar editor","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"Por favor, establece diferentes ubicaciones de guardado para la configuración multi-archivo en Thino. La carpeta del diario se superpone con la ubicación de guardado multi-archivo, o hay riesgo de que se lea repetidamente.","Default time prefix for thino in daily notes":"Prefijo de tiempo predeterminado para thino en notas diarias","Set default time prefix for thino in daily notes.":"Establecer prefijo de tiempo predeterminado para thino en notas diarias.","Save image successfully":"Imagen guardada exitosamente","User quote":"Cita de usuario","Set user quote for thino":"Establecer cita de usuario para thino","User icon":"Icono de usuario","Set user icon for thino. You can input http/https link or file path in vault.":"Establecer icono de usuario para thino. Puedes ingresar enlace http/https o ruta de archivo en la bóveda.","User info":"Información de usuario","Copy filtered results":"Copiar resultados filtrados","Share image":"Compartir imagen",Default:"Predeterminado",Gray:"Gris",Grass:"Hierba",Flame:"Llama",Olive:"Oliva",Ice:"Hielo",Magenta:"Magenta","Daily notes":"Notas diarias",Editor:"Editor","Append/prepend text when share to Thino":"Agregar texto al principio/final al compartir en Thino","Append text when share to Thino":"Agregar texto al final al compartir en Thino","Prepend text when share to Thino":"Agregar texto al principio al compartir en Thino","Add newline when append/prepend text":"Agregar nueva línea al agregar texto al principio/final","Input anything here":"Ingresa cualquier cosa aquí",Prepend:"Agregar al principio",Append:"Agregar al final",Both:"Ambos",None:"Ninguno","Hide pinned group":"Ocultar grupo fijado","Hide pinned group in thino list. False by default.":"Ocultar grupo fijado en la lista de thino. Falso por defecto.","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Establecer el encabezado para el tipo de tarea de thino, por defecto el contenido de thino grabado se insertará al final del diario; si se proporciona un título, todo el contenido de thino grabado se categorizará uniformemente bajo ese título.","Different insert target for different type":"Diferente objetivo de inserción para diferente tipo","Toggle this to set different insert target for different type of thino, like task or list type of thino":"Activa esto para establecer diferente objetivo de inserción para diferente tipo de thino, como tipo tarea o lista de thino","You can set whole diary or only part of it":"Puedes establecer todo el diario o solo una parte","Set process target":"Establecer objetivo de proceso",Custom:"Personalizado","Whole diary":"Diario completo","Set thino insert place":"Establecer lugar de inserción de thino","Set where to insert thino content":"Establecer dónde insertar contenido de thino","End of the diary":"Final del diario","Custom location":"Ubicación personalizada","Setting guide":"Guía de configuración","Details settings":"Configuraciones detalladas","Start Thino":"Iniciar Thino","About Thino Pro":"Acerca de Thino Pro",Enabled:"Habilitado",Enable:"Habilitar","Daily notes folder":"Carpeta de notas diarias","Set daily notes folder":"Establecer carpeta de notas diarias","Daily note name format":"Formato de nombre de nota diaria","Set daily note name format":"Establecer formato de nombre de nota diaria","Daily note plugin":"Complemento de nota diaria","Enable daily note plugin":"Habilitar complemento de nota diaria",Selected:"Seleccionado",Select:"Seleccionar","A classic theme for Thino with a two-column layout":"Un tema clásico para Thino con diseño de dos columnas",Classic:"Clásico","A modern theme for Thino with a three-column layout and some unique features.":"Un tema moderno para Thino con diseño de tres columnas y algunas características únicas.",Modern:"Moderno","Go and enjoy Thino":"Ve y disfruta Thino","Congrats! All settings done":"¡Felicitaciones! Todas las configuraciones completadas","Adjust settings that influence your user experience with Thino.":"Ajusta las configuraciones que influyen en tu experiencia de usuario con Thino.","Set preferences for using Thino":"Establecer preferencias para usar Thino","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"Si estás usando la versión básica de Thino, se requiere habilitar el complemento de nota diaria. Configura sus ajustes para trabajar efectivamente con él.","Go with daily note plugin":"Ir con complemento de nota diaria","Choose a theme for Thino.":"Elige un tema para Thino.","Set theme for Thino":"Establecer tema para Thino","Set up your user info for Thino.":"Configura tu información de usuario para Thino.","Get started with Thino":"Comenzar con Thino","Skip and start Thino":"Saltar e iniciar Thino","Next step":"Siguiente paso","Back to previous step":"Volver al paso anterior","Click to enable =>":"Clic para habilitar =>","This is Thino's sidebar. Navigate to different path or select query filter.":"Esta es la barra lateral de Thino. Navega a diferentes rutas o selecciona filtro de consulta.","Click here and go to settings page.":"Haz clic aquí y ve a la página de configuración.","Click here and go to different path.":"Haz clic aquí y ve a una ruta diferente.","Select or create query filter here.":"Selecciona o crea filtro de consulta aquí.","See the status of Thinos here.":"Ve el estado de los Thinos aquí.","Search your thino quickly here.":"Busca tu thino rápidamente aquí.","Edit or create your thino here.":"Edita o crea tu thino aquí.","See your thinos here.":"Ve tus thinos aquí.","See your time status of thinos here.":"Ve tu estado de tiempo de thinos aquí.","See your tags here. Tags will be shown when thino contains tags.":"Ve tus etiquetas aquí. Las etiquetas se mostrarán cuando thino contenga etiquetas.",Done:"Hecho","Thino is ready to use. ":"Thino está listo para usar. ","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"Puedes comenzar a usar Thino ahora. Si quieres saber más sobre Thino Pro, haz clic en el botón de abajo.","Default time prefix":"Prefijo de tiempo predeterminado","Append Text Action":"Acción de agregar texto al final","Prepend Text Action":"Acción de agregar texto al principio",Preset:"Preestablecido","Select Tags":"Seleccionar etiquetas","It is not available on small view":"No está disponible en vista pequeña","Append text":"Agregar texto al final","Prepend text":"Agregar texto al principio","Your daily note folder is not set correctly, please check your settings":"Tu carpeta de notas diarias no está configurada correctamente, por favor revisa tu configuración","Default sharing style":"Estilo de compartir predeterminado","Set the default style for sharing thino, 'Modern' by default.":'Establecer el estilo predeterminado para compartir thino, "Moderno" por defecto.',Clean:"Limpio",Minimal:"Mínimo",Gradient:"Gradiente","Thino share":"Compartir Thino","Copy to clipboard failed":"Error al copiar al portapapeles","Copy to clipboard successfully":"Copiado al portapapeles exitosamente","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"Tu contenido ha sido copiado al portapapeles e insertado en el editor. Por favor inténtalo de nuevo","Share thino":"Compartir thino","Set file name after create thino":"Establecer nombre de archivo después de crear thino","You can set file name after create thino. A input box will show when you create thino.":"Puedes establecer el nombre del archivo después de crear thino. Se mostrará una caja de entrada cuando crees thino.",SPLIT:"DIVIDIR","Split by Heading 1":"Dividir por Encabezado 1","Split by Heading 2":"Dividir por Encabezado 2","Split by Heading 3":"Dividir por Encabezado 3","Insert task":"Insertar tarea","All settings have been reset to default.":"Todas las configuraciones han sido restablecidas a los valores predeterminados.","Reset all Thino settings":"Restablecer todas las configuraciones de Thino","Reset settings":"Restablecer configuraciones","Reset Thino settings to default settings.":"Restablecer configuraciones de Thino a valores predeterminados.","Task Management":"Gestión de tareas","Append completed date when task done in thino":"Agregar fecha de completado cuando la tarea se complete en thino","Append completed date when task done in thino. False by default":"Agregar fecha de completado cuando la tarea se complete en thino. Falso por defecto","Set tag for single file that Thino indexes":"Establecer etiqueta para archivo único que Thino indexa","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"Cuando estableces una etiqueta aquí, Thino indexará este archivo que contiene esta etiqueta y lo mostrará en la lista. No necesitas agregar `#`.","Set tag for file type file":"Establecer etiqueta para archivo tipo archivo","Set tag for multi type file":"Establecer etiqueta para archivo multi tipo","Please input the tag":"Por favor ingresa la etiqueta","Merge thinos in to thino share image":"Fusionar thinos en imagen compartida de thino","Custom height for Thino content":"Altura personalizada para contenido de Thino","Set custom height for Thino content. Like 200px or 20rem":"Establecer altura personalizada para contenido de Thino. Como 200px o 20rem","Input height":"Ingresar altura","Submit issue":"Enviar problema","Current version":"Versión actual","Bug report":"Reporte de error","Click the button to copy debug info and open the issue page":"Haz clic en el botón para copiar información de depuración y abrir la página de problemas","Copy and go":"Copiar e ir","Debug info copied":"Información de depuración copiada","Feature request":"Solicitud de función","Submit your feature request to the issue page":"Envía tu solicitud de función a la página de problemas",Go:"Ir","Toggle query list visibility":"Alternar visibilidad de lista de consultas","Toggle tags visibility":"Alternar visibilidad de etiquetas","Toggle sidebar visibility":"Alternar visibilidad de barra lateral",Collapse:"Colapsar",Expand:"Expandir","Max height for collapse":"Altura máxima para colapsar","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"La altura máxima para colapsar thino, cuando se establece en 0, thino no colapsará. 0 por defecto. (Esto no es conteo de líneas, es altura en px.)","Render content":"Renderizar contenido","Optimize for Callout":"Optimizar para Callout","Won't render content contains more than 3 callouts automatically. True by default":"No renderizará automáticamente contenido que contenga más de 3 callouts. Verdadero por defecto","The value should be greater than":"El valor debe ser mayor que","Append Text":"Agregar texto al final","Prepend Text":"Agregar texto al principio","Thino height when collapsed":"Altura de Thino cuando está colapsado","The height for thino when it is collapsed, when set 0, thino would not collapse . 100 by default. (This is not lines count, it is height in px.)":"La altura para thino cuando está colapsado, cuando se establece en 0, thino no colapsará. 100 por defecto. (Esto no es conteo de líneas, es altura en px.)","This option will allow you use other views when leaf width is not enough. False by default.":"Esta opción te permitirá usar otras vistas cuando el ancho de la hoja no sea suficiente. Falso por defecto.","Can select other views when leaf width is not enough":"Puede seleccionar otras vistas cuando el ancho de la hoja no es suficiente","TRASH BOX":"PAPELERA","Wait templater to finish parse before insert thino":"Esperar a que templater termine de analizar antes de insertar thino","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"Esta opción te permitirá esperar a que templater termine de analizar antes de insertar thino, lo que puede hacer que necesites confirmar dos veces entre insertar thino. Falso por defecto.","Get thino capture extension":"Obtener extensión de captura de thino","You can capture idea/text from chrome now.":"Ahora puedes capturar idea/texto desde chrome.","Open File":"Abrir archivo","Exported CSV file":"Archivo CSV exportado","Updated At":"Actualizado el","Export to CSV":"Exportar a CSV","Quick add button on mobile navbar":"Botón de agregar rápido en barra de navegación móvil","Always show status text":"Siempre mostrar texto de estado","Support filter by metadata from file":"Soportar filtro por metadatos desde archivo","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"Cuando habilites esto, podrás filtrar a través de metadatos desde archivo, como etiquetas en archivo. Pero los thinos desde canvas no están soportados. Falso por defecto.","Show source near timestamp in thino":"Mostrar fuente cerca de marca de tiempo en thino","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"Cuando habilites esto, podrás ver la fuente cerca de la marca de tiempo en thino. Puedes establecer título en metadatos para sobrescribir esto. Falso por defecto.","Show Update Message":"Mostrar mensaje de actualización","Show update message when Thino is updated. True by default":"Mostrar mensaje de actualización cuando Thino se actualiza. Verdadero por defecto","Sync manually":"Sincronizar manualmente","Show all scrollbars":"Mostrar todas las barras de desplazamiento","TIME RANGE":"RANGO DE TIEMPO",WITHIN:"DENTRO DE","7 days":"7 días","14 days":"14 días","30 days":"30 días","3 months":"3 meses","6 months":"6 meses","1 year":"1 año","This week":"Esta semana","Last week":"Semana pasada","This month":"Este mes","Last month":"Mes pasado","This year":"Este año","Last year":"Año pasado","No history":"Sin historial","Today Remaining":"Restante hoy","Today Total":"Total hoy","Historical Statistics":"Estadísticas históricas",byTime:"Por tiempo",byTimeReverse:"Por tiempo inverso",Stat:"Estadística",Statistics:"Estadísticas","Daily Thino Count":"Conteo diario de Thino",Total:"Total",thinos:"thinos","Thino Types":"Tipos de Thino","Distribution of thino types":"Distribución de tipos de thino","Thino Status":"Estado de Thino","Distribution of thino status":"Distribución de estado de thino","Popular Tags":"Etiquetas populares","Top 10 most used tags":"Top 10 etiquetas más usadas","Thino Count":"Conteo de Thino","Hourly distribution":"Distribución por hora","Current month":"Mes actual","Monthly distribution":"Distribución mensual","30 Days":"Últimos 30 días",Year:"Año","Time Distribution":"Distribución de tiempo","When do you write thinos":"Cuándo escribes thinos","Content Length":"Longitud de contenido","Distribution of thino lengths":"Distribución de longitudes de thino","Daily Thinos":"Thinos diarios","Show Time Distribution":"Mostrar distribución de tiempo","Hide date picker":"Ocultar selector de fecha","Show date picker":"Mostrar selector de fecha","Clear filter":"Limpiar filtro","Copy link":"Copiar enlace","Copy embed link":"Copiar enlace incrustado","Ctrl/Cmd + Enter to save thino":"Ctrl/Cmd + Enter para guardar thino","Fixed strings for thinos":"Cadenas fijas para thinos","Use fixed strings for thinos":"Usar cadenas fijas para thinos","Enable to add fixed strings at the beginning or end of thinos.":"Habilitar para agregar cadenas fijas al principio o final de los thinos.","Fixed prefix for thinos":"Prefijo fijo para thinos","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Agregar esta cadena al principio de cada thino. Admite marcadores como {{TIME|YYYYMMDDHHmmss}}.","Fixed suffix for thinos":"Sufijo fijo para thinos","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"Agregar esta cadena al final de cada thino. Admite marcadores como {{TIME|YYYYMMDDHHmmss}}.","Word count exceeded":"Conteo de palabras excedido","Word count feature":"Función de conteo de palabras","Enable real-time word count display in the editor":"Habilitar visualización de conteo de palabras en tiempo real en el editor","Maximum word count":"Conteo máximo de palabras","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"Establecer un conteo máximo de palabras para thino. El editor mostrará una advertencia cuando se exceda. Establecer en 0 para ilimitado.","No linked thinos found":"No se encontraron thinos vinculados","Reference links group":"Grupo de enlaces de referencia","Enable reference links group in thino.":"Habilitar grupo de enlaces de referencia en thino.","No reference links found":"No se encontraron enlaces de referencia","Outgoing Links":"Enlaces salientes","Incoming Links":"Enlaces entrantes","Error fetching reference links":"Error al obtener enlaces de referencia","Double click behavior":"Comportamiento de doble clic","Set the behavior when double click on a thino.":"Establecer el comportamiento al hacer doble clic en un thino.","Open thino":"Abrir thino","Edit thino":"Editar thino","Go to source":"Ir a la fuente","Do nothing":"No hacer nada","Use default header in mobile view":"Usar encabezado predeterminado en vista móvil","Use default header in mobile view of thino rather than custom header.":"Usar encabezado predeterminado en vista móvil de thino en lugar de encabezado personalizado."},J$={welcome:"Bienvenue dans Mémo !",ribbonIconTitle:"Mémos",months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Aout","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan.","Feb.","Mar.","Apr.","May","June","July","Aug.","Sept.","Oct.","Nov.","Dec."],weekDays:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"],weekDaysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],to:"à",year:null,month:null,"Basic Options":"Options basique","User name":"Username","Set your user name here. 'Memos 😏' By default":"Définissez votre username ici. Défaut : 'Memo 😏'","Insert after heading":"Insérer après le titre","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Vous devez définir le même titre en-dessous si vous voulez insérer et traiter des mémos sous le même titre.","Allows admonitions to be created using ":"Permet de créer des admonitions en utilisant","Process Memos below":"Insérer Mémo sous","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Seulement les entrée sous cette section/phrase dans vos notes seront considérés. S'il n'existe pas, aucune notes ne sera traité pour ce fichier.","Save Memo button label":"Titre du bouton de sauvegarde","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"Le texte affiché sur le bouton de sauvegarde dans l'UI. Défaut : 'NOTEIT'","Focus on editor when open memos":"Focus sur l'éditeur lors de l'ouverture du mémo.","Focus on editor when open memos. Focus by default.":"Focus sur l'éditeur lors de l'ouverture du mémo. Focus par défaut.","Open daily memos with open memos":"Ouvrir les mémos quotidiens quand mémo est ouvert.","Open daily memos with open memos. Open by default.":"Ouvrir les mémos quotidiens quand mémo est ouvert.","Open Memos when obsidian opens":"Ouvrir Mémo quand Obsidian est ouvert.","When enable this, Memos will open when Obsidian opens. False by default.":"Quand activé, Memo sera ouvert quand Obsidian à l'ouverture d'Obsidian. Désactivé par défaut.","Hide done tasks in Memo list":"Masquer les tâches accomplies dans la liste des mémos.","Hide all done tasks in Memo list. Show done tasks by default.":"Masquer les tâches accomplies dans les mémos. Affiche les tâches accomplies par défaut.","Advanced Options":"Options avancées","UI language for date":"Langue de l'UI pour la date","Translates the date UI language. Only 'en' and 'zh' are available.":"Traduit la langue des dates dans l'UI. Seuls 'en', 'fr' et 'zh' sont disponibles. ","Default prefix":"Préfix par défaut.","Set the default prefix when create memo, 'List' by default.":"Définit le préfix par défaut lors de la création d'un mémo. Défault : 'Liste'","Default insert date format":"Format de la date insérée par défaut.","Default editor position on mobile":"Position par défaut de l'éditeur sur mobile.","Set the default date format when insert date by @, 'Tasks' by default.":"Définit le format de la date par défaut lors de l'insertion de la date par @. Défaut : 'Tâches'.","Set the default editor position on Mobile, 'Top' by default.":"Position par défaut de l'éditeur sur le mobile. Défaut : 'Haut'.","Use button to show editor on mobile":"Utilisation du bouton pour afficher l'éditeur sur le mobile.","Show Time When Copy Results":"Aficher l'heure quand les résultats sont copiés","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Place un bouton flottant pour appeler l'éditeur sur mobile. Fonctionne uniquement quand l'éditeur est placé en bas.","Show time when you copy results, like 12:00. Copy time by default.":"Affiche l'heure quand les résultats sont copiés, comme '12:00'. Copie l'heure par défaut","Show Date When Copy Results":"Affiche la date quand les résultats sont copiés","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"Affiche la date quand les résultats sont copiés, comme [[2022-01-01]]. Par défaut, copie la date.","Add Blank Line Between Different Date":"Ajoute une ligne entre les différentes dates.","Add blank line when copy result with date. No blank line by default.":"Ajoute une ligne lors de la copie du résultat avec la date. Pas de ligne par défaut.","Share Options":"Options de partage","Share Memos Image Footer Start":"Début du pied de page — Partage de mémo de mémos","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Définissez ce que vous voulez ici, utilisez {ThinoNum} pour afficher le nombre de thino, {UsedDay} pour les jours. Par défaut : '{ThinoNum} Thino {UsedDay} Days.","Share Memos Image Footer End":"Fin du pied de page — Partage de mémo","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Définissez ce que vous voulez ici. Utilisez {UserName} comme username. Par défaut : '✍️ By {UserName}'","Save Shared Image To Folder For Mobile":"Sauvegarde des images partagés dans un dossier sur mobile.","Save image to folder for mobile. False by Default":"Sauvegarder les images dans un dossier sur mobile. Désactivé par défaut.","Say Thank You":"Dites Merci",Donate:"Faire un don","If you like this plugin, consider donating to support continued development:":"Si vous aimez ce plugin, envisagez de faire un don pour soutenir le développement continu :","File Name of Recycle Bin":"Nom de la corbeille","Set the filename for recycle bin. 'delete' By default":"Définition du nom de la poubelle. Défaut : 'Delete'","Set the filename for query file. 'query' By default":"Définit le nom de fichier pour les requête. Défaut : 'Query'","Use Tags In Vault":"Utiliser des tags dans le Coffre","Use tags in vault rather than only in Memos. False by default.":"Utiliser des tags du coffre plutôt que ceux que seulement dans Mémo. Désactivé par défaut.","Ready to convert image into background":"Prêt pour convertir des image en arrière-plan.",List:"Liste",Task:"Tâche",Top:"Haut",Bottom:"Bas",TAG:"TAG",DAY:"JOUR",QUERY:"RECHERCHE",EDIT:"EDITER",PIN:"PIN",UNPIN:"ÉPINGLER",DELETE:"DESÉPINGLER","CONFIRM!":"CONFIRMER !","CREATE FILTER":"CRÉER FILTRE",Settings:"Paramètres","Recycle bin":"Corbeille","About Me":"À propos de moi","Fetching data...":"Récupération des données...","Here is No Memos.":"Il n'y a pas de Memos.","Frequently Used Tags":"Tags fréquemment utilisés","What do you think now...":"Que pensez-vous maintenant...",READ:"LU",MARK:"MARQUER",SHARE:"PARTAGER",SOURCE:"SOURCE",RESTORE:"RESTAURER","DELETE AT":"SUPPRIMER","Noooop!":"Noooop!","All Data is Loaded 🎉":"Toutes les données sont chargées 🎉","Quick filter":"Filtre rapide",TYPE:"TYPE",LINKED:"LIEN","NO TAGS":"PAS DE TAGS","HAS LINKS":"A DES LIENS","HAS IMAGES":"A DES IMAGES",INCLUDE:"INCLUS",EXCLUDE:"EXCLUS",TEXT:"TEXTE",IS:"EST",ISNOT:"N'EST PAS",SELECT:"SELECTION","ADD FILTER TERMS":"AJOUTER DES TERMES FILTRÉ",FILTER:"FILTRE",TITLE:"TITRE","CREATE QUERY":"CRÉER UNE RECHERCHE","EDIT QUERY":"ÉDITER UNE RECHERCHE",MATCH:"MATCH",TIMES:"HEURE","Share Memo Image":"Partager un mémo image","↗Click the button to save":"↗Clique pour sauvegarder","Image is generating...":"Génération de l'image...","Image is loading...":"Image en chargement...","Loading...":"Chargement...","😟 Cannot load image, image link maybe broken":"😟 Impossible de charger l'image, le lien peut être brisé","Daily Memos":"Mémo quotidien","CANCEL EDIT":"ANNULER L'ÉDITION","LINK TO THE":"LIENS À","Mobile Options":"Options mobile","Don't support web image yet, please input image path in vault":"Ne supporte pas les images webs. Merci d'insérer le chemin de l'image depuis le coffre.","Background Image in Dark Theme":"Image de fond en thème sombre","Background Image in Light Theme":"Image de fond en thème clair",'Set background image in dark theme. Set something like "Daily/one.png"':"Définir l'image de fond en thème sombre. Définir 'Daily/one.png' par exemple.",'Set background image in light theme. Set something like "Daily/one.png"':"Définir l'image de fond en thème clair. Définir 'Daily/one.png' par exemple.",'Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Définir la composition par défaut du mémo, vous devez utiliser {TIME} comme "HH:mm" et {CONTENT} comme contenu. "{TIME} {CONTENT}" par défaut',"Default Memo Composition":"Composition par défaut du mémo","Show Tasks Label":"Afficher les étiquettes des tâches","Show tasks label near the time text. False by default":"Afficher les étiquettes des tâches à côté du texte horaire. Désactivé par défaut.","Please Open Memos First":"Merci d'ouvrir les mémos en premier"},Q$={},eq={},tq={},nq={},rq={},oq={},iq={},aq={},sq={welcome:"Bem-vindo ao Thino!",ribbonIconTitle:"Thino",months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan.","Fev.","Mar.","Abr.","Maio","Jun.","Jul.","Ago.","Set.","Out.","Nov.","Dez."],weekDays:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],weekDaysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],to:"para",year:null,month:null,"Basic Options":"Opções Básicas","User name":"Nome de Usuário","Set your user name here. 'Memos 😏' By default":"Defina o nome de usuário. Padrão: 'Thino 😏'.","Insert after heading":"Inserir após o cabeçalho","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Deve definir o mesmo cabeçalho na configuração posterior se pretende inserir e processar memorandos abaixo do cabeçalho aqui definido.","Allows admonitions to be created using ":"Permitir que Admonitions sejam criadas usando ","Process Memos below":"Processar Memorandos abaixo do Cabeçalho","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Somente as entradas abaixo deste cabeçalho serão processadas nas suas notas. Se não configurar esta funcionalidade, nenhuma nota será processada para o ficheiro respetivo.","Save Memo button label":"Legenda do Botão de Guardar Memorandos","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":'Define o texto apresentado na UI do botão guardar memorandos. Padrão: "NOTEIT".',"Focus on editor when open memos":"Focar no Editor ao iniciar o Thino","Focus on Editor when open memos. Focus by default.":'Focar no editor ao iniciar o Thino. Padrão: "Focar".',"Open daily memos with open memos":"Abrir memorandos diários ao iniciar o Thino","Open daily memos with open memos. Open by default.":'Abrir memorandos diários ao iniciar o Thino. Padrão: "Abrir".',"Open Memos when obsidian opens":"Abrir Thino quando o Obsidian inicia","When enable this, Memos will open when Obsidian opens. False by default.":'Quando esta opção está activa, o Memos abrirá quando o Obsidian inicia. Padrão: "Falso".',"Hide done tasks in Memo list":"Ocultar tarefas concluídas na lista de memorandos","Hide all done tasks in Memo list. Show done tasks by default.":'Ocultar todas as tarefas concluídas na lista de memorandos. Padrão: "Mostrar tarefas concluídas".',"Advanced Options":"Opções Avançadas","UI language for date":"Idioma na UI da Data ","Translates the date UI language. Only 'en' and 'zh' are available.":"Define o idioma na UI da Data. De momento, apenas 'en', 'fr', 'pt' e 'zh' estão disponíveis.","Default prefix when save thino":"Prefixo Padrão","Set the default prefix when create memo, 'List' by default.":"Define o prefixo padrão quando um memorando é criado. Padrão: 'Lista'.","Default insert date format":"Formato Padrão para Inserção de Data","Set the default date format when insert date by @, 'Tasks' by default.":"Define o formato de Data padrão ao inserir a data usando '@'. Padrão: 'Tarefas'.","Default editor position on mobile":"Posição Padrão do Editor de Memorandos na Versão Móvel","Set the default editor position on Mobile, 'Top' by default.":"Define a posição padrão do editor de memorandos na versão móvel. Padrão: 'Topo'.","Use button to show editor on mobile":"Usar Botão para Mostrar o Editor na Versão Móvel","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Define um botão flutuante para abrir o editor na versão móvel. Opção disponível somente quando a posição do editor está definida para 'Fundo'.","Show Time When Copy Results":"Mostrar a Hora ao Copiar os Resultados","Show time when you copy results, like 12:00. Copy time by default.":"Mostrar a Hora, no formato '12:00', ao copiar os resultados. Padrão: 'Copiar a hora'.","Show Date When Copy Results":"Mostrar a Data ao Copiar os Resultados","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":'Mostrar a Data, no formato [[2022-01-01]], ao copiar os resultados. Padrão: "Copiar a hora".',"Add Blank Line Between Different Date":"Adicionar Linha em Branco entre Datas Diferentes.","Add blank line when copy result with date. No blank line by default.":'Adicionar linha em branco ao copiar resultados com Data. Padrão: "Não adicionar linha."',"Share Options":"Opções de Partilha","Share Memos Image Footer Start":"Partilhar a Imagem de um memorando - Início do Rodapé","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Defina como preferir, use {ThinoNum} para mostrar o número de thinorandos e use {UsedDay} para dias. 'Padrão: {ThinoNum} Thinorandos {UsedDay} Dias'.","Share Memos Image Footer End":"Partilhar a Imagem de um memorando - Fim do Rodapé","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Defina como preferir, use {UserName} como o seu nome de usuário. Padrão: '✍️ Por {UserName}'.","Save Shared Image To Folder For Mobile":"Guardar a Imagem Partilhada para Pasta na Versão Móvel","Save image to folder for mobile. False by Default":'Guardar a imagem partilhada para pasta na versão móvel. Padrão: "Falso".',"Say Thank You":"Agradeça",Donate:"Doar","If you like this plugin, consider donating to support continued development:":"Se gosta deste plugin, considere doar para apoiar o seu desenvolvimento contínuo:","File Name of Recycle Bin":"Nome da Reciclagem","Set the filename for recycle bin. 'delete' By default":"Define o nome do ficheiro para a Reciclagem. Padrão: 'delete'.","File Name of Query File":"Nome do Ficheiro de Query","Set the filename for query file. 'query' By default":"Define o nome do ficheiro de Query. Padrão: 'Query'.","Use Tags In Vault":"Usar Tags no Vault","Use tags in vault rather than only in Memos. False by default.":'Usar as Tags do Vault e não somente dos memorandos. Padrão: "Falso".',"Ready to convert image into background":"Pronto para converter imagem em fundo",List:"Lista",Task:"Tarefa",Top:"Topo",Bottom:"Fundo",TAG:"TAG",DAY:"DIA",QUERY:"QUERY",EDIT:"EDITAR",PIN:"FIXAR",UNPIN:"DESAFIXAR",DELETE:"ELIMINAR","CONFIRM!":"CONFIRMAR!","CREATE FILTER":"CRIAR FILTRO",Settings:"Definições","Recycle bin":"Reciclagem","About Me":"Acerca de mim","Fetching data...":"A obter dados...","Here is No Memos.":"Não existem Thino.","Frequently Used Tags":"Tags Usadas Frequentemente","What do you think now...":"Em que está a pensar...",READ:"LER",MARK:"ASSINALAR",SHARE:"PARTILHAR",SOURCE:"ORIGEM",RESTORE:"RESTAURAR","DELETE AT":"ELIMINADO EM","Noooop!":"Noooop!","All Data is Loaded 🎉":"Todos os Dados foram Carregados 🎉","Quick filter":"Filtro rápido",TYPE:"TIPO",LINKED:"LINKED","NO TAGS":"SEM TAGS","HAS LINKS":"TEM LINKS","HAS IMAGES":"TEM IMAGENS",INCLUDE:"INCLUIR",EXCLUDE:"EXCLUIR",TEXT:"TEXTO",IS:"É",ISNOT:"NÃO É",SELECT:"SELECCIONAR","ADD FILTER TERMS":"ADICIONAR TERMOS DE FILTRAGEM",FILTER:"FILTRAR",TITLE:"TÍTULO","CREATE QUERY":"CRIAR QUERY","EDIT QUERY":"EDITAR QUERY",MATCH:"IGUALA",TIMES:"VEZES","Share Memo Image":"Partilhar Imagem de Memo","↗Click the button to save":"↗Clique no botão para guardar","Image is generating...":"A gerar Imagem..","Image is loading...":"A carregar Imagem...","Loading...":"Carregando...","😟 Cannot load image, image link maybe broken":"😟 Não é possível carregar a imagem, o link da imagem pode estar incorrecto","Daily Memos":"Thino Diários","CANCEL EDIT":"CANCELAR EDIÇÃO","LINK TO THE":"LINK PARA O","Mobile Options":"Opções Móveis","Don't support web image yet, please input image path in vault":"Ainda não existe suporte para imagens de web. Por favor, insira o link para uma imagem do vault","Experimental Options":"Opções Experimentais","Background Image in Dark Theme":"Imagem de Fundo no Tema Escuro","Background Image in Light Theme":"Imagem de Fundo no Tema Claro",'Set background image in dark theme. Set something like "Daily/one.png"':'Defina a imagem de fundo para o tema escuro. Defina da seguinte forma: "Daily/one.png".','Set background image in light theme. Set something like "Daily/one.png"':'Defina a imagem de fundo para o tema claro. Defina da seguinte forma: "Daily/one.png".','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Defina a composição padrão do memorando, deve usar {TIME} como "HH:mm" e {CONTENT} como conteúdo. Padrão: "{TIME} {CONTENT}".',"Default Memo Composition":"Composição Padrão de um Memorando","Show Tasks Label":"Mostrar Etiquetas de Tarefas","Show tasks label near the time text. False by default":'Mostrar etiquetas de tarefas próximas do texto de tempo. Padrão: "Falso".',"Please Open Memos First":"Por favor, abra o Thino primeiro",DATE:"DATA",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED",BEFORE:"ANTES",AFTER:"DEPOIS","Allow Comments On Memos":"Permitir Comentários nos Memorandos","You can comment on memos. False by default":'Permite que comente os memorandos. Padrão: "Falso".',Import:"Importar","TITLE CANNOT BE NULL!":"O TÍTULO NÃO PODE SER NULO!","FILTER CANNOT BE NULL!":"O FILTRO NÃO PODE SER NULO!","Comments In Original DailyNotes/Notes":"Comentários nas Notas/Notas Diárias Originais","You should install Dataview Plug-in ver 0.5.9 or later to use this feature.":"Deve instalar a versão 0.5.9 ou posterior do plugin Dataview para usar esta funcionalidade.","Open Memos Successfully":"Thino Iniciado com Sucesso","Fetch Memos Error":"😭 Erro de Fetch","Copied to clipboard Successfully":"Copiado para a área de transferência com sucesso","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Verifique se abriu o plugin de Notas Diárias ou de Notas Periódicas","Please finish the last filter setting first":"Por favor, termine primeiro a configuração do último filtro","Close Memos Successfully":"Thino Fechado com Sucesso","Insert as Memo":"Inserir como um Memorando","Insert file as memo content":"Inserir ficheiro como conteúdo de um memorando","Image load failed":"Falha no carregamento da imagem","Content cannot be empty":"O Conteúdo não pode estar vazio","Unable to create new file.":"Não foi possível criar um novo ficheiro.","Failed to fetch deleted memos: ":"Falha no fetch dos memorandos removidos: ","RESTORE SUCCEED":"RESTAURO BEM SUCEDIDO","Save Memo button icon":"Ícone do Botão para Guardar Memorandos","The icon shown on the save Memo button in the UI.":"O ícone exibido na UI do botão para guardar memorandos.","Fetch Memos From Particular Notes":"Obter Memorandos de Notas Específicas",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'Pode definir qualquer Query de Dataview para o Memos procurar. Todos os memorandos nessas notas serão mostrados na lista. Padrão: "#memo".',"Allow Memos to Fetch Memo from Notes":"Permitir que o Thino Obtenha memorandos das Notas","Use Memos to manage all memos in your notes, not only in daily notes. False by default":'Use o Memos para gerir todos os memorandos nas suas notas e não apenas nas notas diárias. Padrão: "Falso".',"Always Show Memo Comments":"Mostrar Comentários dos Memorandos","Always show memo comments on memos. False by default":'Mostrar sempre os comentários dos memorandos. Padrão: "Falso".',"You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"Não definiu a pasta para as notas diárias, quer no plugin the Notas Periódicas ou de Notas Diárias.","Please check your daily note plugin OR periodic notes plugin settings":"Por favor, verifique as configurações dos plugins de Notas Diárias OU de Notas Periódicas","Use Which Plugin's Default Configuration":"Usar a Configuração Padrão do Plugin","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"O Memos usa a configuração padrão do plugin seleccionado para obter memorandos diariamente. Padrão: 'Notas Diárias'.",Daily:"Diário"},lq={welcome:"Bem-vindo ao Memos!",ribbonIconTitle:"Thino",months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],monthsShort:["Jan.","Fev.","Mar.","Abr.","Maio","Jun.","Jul.","Ago.","Set.","Out.","Nov.","Dez."],weekDays:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],weekDaysShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],to:"para",year:null,month:null,"Basic Options":"Opções Básicas","User name":"Nome de Usuário","Set your user name here. 'Memos 😏' By default":"Defina o nome de usuário. Padrão: 'Thino 😏'.","Insert after heading":"Inserir após o cabeçalho","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"Deve definir o mesmo cabeçalho na configuração posterior se pretende inserir e processar memorandos abaixo do cabeçalho aqui definido.","Allows admonitions to be created using ":"Permitir que Admonitions sejam criadas usando ","Process Memos below":"Processar Memorandos abaixo do Cabeçalho","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"Somente as entradas abaixo deste cabeçalho serão processadas nas suas notas. Se não configurar esta funcionalidade, nenhuma nota será processada para o ficheiro respetivo.","Save Memo button label":"Legenda do Botão de Guardar Memorandos","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":'Define o texto apresentado na UI do botão guardar memorandos. Padrão: "NOTEIT".',"Focus on editor when open memos":"Focar no Editor ao iniciar o Thino","Focus on Editor when open memos. Focus by default.":'Focar no editor ao iniciar o Thino. Padrão: "Focar".',"Open daily memos with open memos":"Abrir memorandos diários ao iniciar o Thino","Open daily memos with open memos. Open by default.":'Abrir memorandos diários ao iniciar o Thino. Padrão: "Abrir".',"Open Memos when obsidian opens":"Abrir Thino quando o Obsidian inicia","When enable this, Memos will open when Obsidian opens. False by default.":'Quando esta opção está activa, o Memos abrirá quando o Obsidian inicia. Padrão: "Falso".',"Hide done tasks in Memo list":"Ocultar tarefas concluídas na lista de memorandos","Hide all done tasks in Memo list. Show done tasks by default.":'Ocultar todas as tarefas concluídas na lista de memorandos. Padrão: "Mostrar tarefas concluídas".',"Advanced Options":"Opções Avançadas","UI language for date":"Idioma na UI da Data ","Translates the date UI language. Only 'en' and 'zh' are available.":"Define o idioma na UI da Data. De momento, apenas 'en', 'fr', 'pt' e 'zh' estão disponíveis.","Default prefix when save thino":"Prefixo Padrão","Set the default prefix when create memo, 'List' by default.":"Define o prefixo padrão quando um memorando é criado. Padrão: 'Lista'.","Default insert date format":"Formato Padrão para Inserção de Data","Set the default date format when insert date by @, 'Tasks' by default.":"Define o formato de Data padrão ao inserir a data usando '@'. Padrão: 'Tarefas'.","Default editor position on mobile":"Posição Padrão do Editor de Memorandos na Versão Móvel","Set the default editor position on Mobile, 'Top' by default.":"Define a posição padrão do editor de memorandos na versão móvel. Padrão: 'Topo'.","Use button to show editor on mobile":"Usar Botão para Mostrar o Editor na Versão Móvel","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"Define um botão flutuante para abrir o editor na versão móvel. Opção disponível somente quando a posição do editor está definida para 'Fundo'.","Show Time When Copy Results":"Mostrar a Hora ao Copiar os Resultados","Show time when you copy results, like 12:00. Copy time by default.":"Mostrar a Hora, no formato '12:00', ao copiar os resultados. Padrão: 'Copiar a hora'.","Show Date When Copy Results":"Mostrar a Data ao Copiar os Resultados","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":'Mostrar a Data, no formato [[2022-01-01]], ao copiar os resultados. Padrão: "Copiar a hora".',"Add Blank Line Between Different Date":"Adicionar Linha em Branco entre Datas Diferentes.","Add blank line when copy result with date. No blank line by default.":'Adicionar linha em branco ao copiar resultados com Data. Padrão: "Não adicionar linha."',"Share Options":"Opções de Partilha","Share Memos Image Footer Start":"Partilhar a Imagem de um memorando - Início do Rodapé","Set anything you want here, use {ThinoNum} to display Number of memos, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"Defina como preferir, use {ThinoNum} para mostrar o número de thinorandos e use {UsedDay} para dias. 'Padrão: {ThinoNum} Thinorandos {UsedDay} Dias'.","Share Memos Image Footer End":"Partilhar a Imagem de um memorando - Fim do Rodapé","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"Defina como preferir, use {UserName} como o seu nome de usuário. Padrão: '✍️ Por {UserName}'.","Save Shared Image To Folder For Mobile":"Guardar a Imagem Partilhada para Pasta na Versão Móvel","Save image to folder for mobile. False by Default":'Guardar a imagem partilhada para pasta na versão móvel. Padrão: "Falso".',"Say Thank You":"Agradeça",Donate:"Doar","If you like this plugin, consider donating to support continued development:":"Se gosta deste plugin, considere doar para apoiar o seu desenvolvimento contínuo:","File Name of Recycle Bin":"Nome da Reciclagem","Set the filename for recycle bin. 'delete' By default":"Define o nome do ficheiro para a Reciclagem. Padrão: 'delete'.","File Name of Query File":"Nome do Ficheiro de Query","Set the filename for query file. 'query' By default":"Define o nome do ficheiro de Query. Padrão: 'Query'.","Use Tags In Vault":"Usar Tags no Vault","Use tags in vault rather than only in Memos. False by default.":'Usar as Tags do Vault e não somente dos memorandos. Padrão: "Falso".',"Ready to convert image into background":"Pronto para converter imagem em fundo",List:"Lista",Task:"Tarefa",Top:"Topo",Bottom:"Fundo",TAG:"TAG",DAY:"DIA",QUERY:"QUERY",EDIT:"EDITAR",PIN:"FIXAR",UNPIN:"DESAFIXAR",DELETE:"ELIMINAR","CONFIRM!":"CONFIRMAR!","CREATE FILTER":"CRIAR FILTRO",Settings:"Definições","Recycle bin":"Reciclagem","About Me":"Acerca de mim","Fetching data...":"A obter dados...","Here is No Memos.":"Não existem Thino.","Frequently Used Tags":"Tags Usadas Frequentemente","What do you think now...":"Em que está a pensar...",READ:"LER",MARK:"ASSINALAR",SHARE:"PARTILHAR",SOURCE:"ORIGEM",RESTORE:"RESTAURAR","DELETE AT":"ELIMINADO EM","Noooop!":"Noooop!","All Data is Loaded 🎉":"Todos os Dados foram Carregados 🎉","Quick filter":"Filtro rápido",TYPE:"TIPO",LINKED:"LINKED","NO TAGS":"SEM TAGS","HAS LINKS":"TEM LINKS","HAS IMAGES":"TEM IMAGENS",INCLUDE:"INCLUIR",EXCLUDE:"EXCLUIR",TEXT:"TEXTO",IS:"É",ISNOT:"NÃO É",SELECT:"SELECCIONAR","ADD FILTER TERMS":"ADICIONAR TERMOS DE FILTRAGEM",FILTER:"FILTRAR",TITLE:"TÍTULO","CREATE QUERY":"CRIAR QUERY","EDIT QUERY":"EDITAR QUERY",MATCH:"IGUALA",TIMES:"VEZES","Share Memo Image":"Partilhar Imagem de Memo","↗Click the button to save":"↗Clique no botão para guardar","Image is generating...":"A gerar Imagem..","Image is loading...":"A carregar Imagem...","Loading...":"Carregando...","😟 Cannot load image, image link maybe broken":"😟 Não é possível carregar a imagem, o link da imagem pode estar incorrecto","Daily Memos":"Thino Diários","CANCEL EDIT":"CANCELAR EDIÇÃO","LINK TO THE":"LINK PARA O","Mobile Options":"Opções Móveis","Don't support web image yet, please input image path in vault":"Ainda não existe suporte para imagens de web. Por favor, insira o link para uma imagem do vault","Experimental Options":"Opções Experimentais","Background Image in Dark Theme":"Imagem de Fundo no Tema Escuro","Background Image in Light Theme":"Imagem de Fundo no Tema Claro",'Set background image in dark theme. Set something like "Daily/one.png"':'Defina a imagem de fundo para o tema escuro. Defina da seguinte forma: "Daily/one.png".','Set background image in light theme. Set something like "Daily/one.png"':'Defina a imagem de fundo para o tema claro. Defina da seguinte forma: "Daily/one.png".','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'Defina a composição padrão do memorando, deve usar {TIME} como "HH:mm" e {CONTENT} como conteúdo. Padrão: "{TIME} {CONTENT}".',"Default Memo Composition":"Composição Padrão de um Memorando","Show Tasks Label":"Mostrar Etiquetas de Tarefas","Show tasks label near the time text. False by default":'Mostrar etiquetas de tarefas próximas do texto de tempo. Padrão: "Falso".',"Please Open Memos First":"Por favor, abra o Thino primeiro",DATE:"DATA",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED",BEFORE:"ANTES",AFTER:"DEPOIS","Allow Comments On Memos":"Permitir Comentários nos Memorandos","You can comment on memos. False by default":'Permite que comente os memorandos. Padrão: "Falso".',Import:"Importar","TITLE CANNOT BE NULL!":"O TÍTULO NÃO PODE SER NULO!","FILTER CANNOT BE NULL!":"O FILTRO NÃO PODE SER NULO!","Comments In Original DailyNotes/Notes":"Comentários nas Notas/Notas Diárias Originais","You should install Dataview Plug-in ver 0.5.9 or later to use this feature.":"Deve instalar a versão 0.5.9 ou posterior do plugin Dataview para usar esta funcionalidade.","Open Memos Successfully":"Thino Iniciado com Sucesso","Fetch Memos Error":"😭 Erro de Fetch","Copied to clipboard Successfully":"Copiado para a área de transferência com sucesso","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"Verifique se abriu o plugin de Notas Diárias ou de Notas Periódicas","Please finish the last filter setting first":"Por favor, termine primeiro a configuração do último filtro","Close Memos Successfully":"Thino Fechado com Sucesso","Insert as Memo":"Inserir como um Memorando","Insert file as memo content":"Inserir ficheiro como conteúdo de um memorando","Image load failed":"Falha no carregamento da imagem","Content cannot be empty":"O Conteúdo não pode estar vazio","Unable to create new file.":"Não foi possível criar um novo ficheiro.","Failed to fetch deleted memos: ":"Falha no fetch dos memorandos removidos: ","RESTORE SUCCEED":"RESTAURO BEM SUCEDIDO","Save Memo button icon":"Ícone do Botão para Guardar Memorandos","The icon shown on the save Memo button in the UI.":"O ícone exibido na UI do botão para guardar memorandos.","Fetch Memos From Particular Notes":"Obter Memorandos de Notas Específicas",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'Pode definir qualquer Query de Dataview para o Memos procurar. Todos os memorandos nessas notas serão mostrados na lista. Padrão: "#memo".',"Allow Memos to Fetch Memo from Notes":"Permitir que o Thino Obtenha memorandos das Notas","Use Memos to manage all memos in your notes, not only in daily notes. False by default":'Use o Memos para gerir todos os memorandos nas suas notas e não apenas nas notas diárias. Padrão: "Falso".',"Always Show Memo Comments":"Mostrar Comentários dos Memorandos","Always show memo comments on memos. False by default":'Mostrar sempre os comentários dos memorandos. Padrão: "Falso".',"You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"Não definiu a pasta para as notas diárias, quer no plugin the Notas Periódicas ou de Notas Diárias.","Please check your daily note plugin OR periodic notes plugin settings":"Por favor, verifique as configurações dos plugins de Notas Diárias OU de Notas Periódicas","Use Which Plugin's Default Configuration":"Usar a Configuração Padrão do Plugin","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"O Memos usa a configuração padrão do plugin seleccionado para obter memorandos diariamente. Padrão: 'Notas Diárias'.",Daily:"Diário"},cq={},uq={},dq={},fq={welcome:"欢迎使用 Thino ",ribbonIconTitle:"Thino",months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:[null,null,null,null,null,null,null,null,null,null,null,null],weekDays:["周日","周一","周二","周三","周四","周五","周六"],weekDaysShort:["周日","周一","周二","周三","周四","周五","周六"],to:"至",year:"年",month:"月","Basic Options":"基础选项","User name":"用户名","Set your user name here. 'Memos 😏' By default":"在这里设置你喜欢的用户名。 默认为 'Thino 😏'",'You can set target heading like "# Heading" to control data location':'你可以设置目标标题,例如 "# Heading" 来控制数据的位置',"Insert after heading":"在指定标题后插入 Thino","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"若留空,则记录的 thino 内容在日记末尾插入,若填写标题,则记录的 thino 内容统一都记录在该标题下","Process Memos below":"解析指定标题后的 Thino","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"若留空,则在Thino界面会显示所有thino记录内容,若填写标题,则Thino界面只显示该标题下的内容,写入其他位置的内容不显示","Save Memo button label":"保存按钮上的文本","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"在保存按钮上展示的文本。默认为 'NOTEIT'","Focus on editor when open memos":"自动聚焦到 Thino 输入框","Focus on editor when open memos. Focus by default.":"当打开 Thino 的时候自动聚焦到 Thino 输入框。默认开启","Open daily memos with open memos":"打开每日 Thino 的时候打开 Thino 界面","Open daily memos with open memos. Open by default.":"打开每日 Thino 的时候打开 Thino 界面。默认开启","Open Memos when obsidian opens":"当开启 Obsidian 的时候自动打开 Thino","When enable this, Memos will open when Obsidian opens. False by default.":"当开启该选项, Thino 会在 Obsidian 打开时自动打开。默认不开启。","Hide done tasks in Memo list":"在 Thino 列表中隐藏已完成 Thino","Hide all done tasks in Memo list. Show done tasks by default.":"在 Thino 列表中隐藏已完成 Thino。默认不开启","Advanced Options":"进阶选项","UI language for date":"针对日期展示的语言界面","Translates the date UI language. Only 'en' and 'zh' are available.":"对日期的不同翻译。目前只能选择 'en' 和 'zh'(未来会废置)","Default prefix when save thino":"保存 Thino 时的默认前缀","Set the default prefix when create memo, 'List' by default.":"设置默认的前缀样式。默认为列表","Default insert date format":"插入日期附带的样式","Set the default date format when insert date by @, 'Tasks' by default.":"当使用 @ 来快速插入日期时,插入日期附带的样式,默认为 'Tasks' 样式","Default editor position on mobile":"在移动端上的默认编辑器位置","Set the default editor position on Mobile, 'Top' by default.":"设置在移动端上的默认编辑器位置,默认在顶部。","Use button to show editor on mobile":"当编辑器位置在底部时,用按钮来唤出编辑器","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"设置一个浮动按钮来唤出编辑器。当在移动端上启用该选项才会生效","Show Time When Copy Results":"当复制检索结果时附带时间","Show time when you copy results, like 12:00. Copy time by default.":"在复制检索结果时附带其时间,例如 12:00 。默认开启","Show Date When Copy Results":"当复制检索结果时附带日期","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"在复制检索结果时附带其日期,例如 [[2022-01-01]]。默认开启","Add Blank Line Between Different Date":"在复制日期的时候加上空行","Add blank line when copy result with date. No blank line by default.":"在复制日期的时候在相邻的日期之间加上空行。默认无空行","Share Options":"分享选项","Share Memos Image Footer Start":"分享 Thino 图片的左边页脚","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"你可以在这里设置你想要的任意文本,用 {ThinoNum} 来展示你记录的 thino 数量,{UsedDay} 来展示使用日期。默认为'{ThinoNum} Thino {UsedDay} Days'","Share Memos Image Footer End":"分享 Thino 图片的右边页脚","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"你可以在这里设置你想要的任意文本,用 {UserName} 来展示你的用户名。默认为 '✍️ By {UserName}'","Save Shared Image To Folder For Mobile":"当在移动端上时保存图片到文件夹","Save image to folder for mobile. False by Default":"当在移动端上时,保存生成的图片到文件夹","Say Thank You":"感谢开发",Donate:"捐赠","If you like this plugin, consider donating to support continued development:":"如果你喜欢这个插件,而且也希望给我买鸡腿,那么可以考虑 Github 页面右边的 Sponsor~","File Name of Recycle Bin":"回收站的文件名","Set the filename for recycle bin. 'delete' By default":"给回收站设置一个文件名。默认为'delete'","File Name of Query File":"检索文件的文件名","Set the filename for query file. 'query' By default":"设置存放检索式的文件的文件名。默认为'query'","Use Tags In Vault":"使用在库内的所有标签","Use tags in vault rather than only in Memos. False by default.":"使用在库内的而不是 Thino 内的标签。默认关闭","Don't support web image yet, please input image path in vault":"暂不支持网络图片,请使用本地图片","Ready to convert image into background":"正在将图片转换为背景图",List:"列表",Task:"任务",Top:"顶部",Bottom:"底部",TAG:"标签",DAY:"天",QUERY:"检索式",EDIT:"编辑",PIN:"置顶",UNPIN:"取消置顶",DELETE:"删除","CONFIRM!":"确定删除","CREATE FILTER":"创建检索式",Filter:"筛选",Settings:"设置","Recycle bin":"回收站","About Me":"关于","Fetching data...":"获取数据中...","Here is No Memos.":"没有找到 Thino","Frequently Used Tags":"常用标签","What do you think now...":"你现在在想什么?",READ:"阅读",MARK:"引用",SHARE:"分享",SOURCE:"来源",RESTORE:"恢复",ARCHIVE:"归档","Daily Review":"每日回顾","DELETE AT":"删除于","Noooop!":"啥都没有!","All Data is Loaded 🎉":"所有数据都加载好啦 🎉","Quick filter":"快速筛选",TYPE:"类型",LINKED:"有链接","NO TAGS":"无标签","HAS LINKS":"有超链接","HAS IMAGES":"有图片",INCLUDE:"包括",EXCLUDE:"排除",TEXT:"文本",IS:"是",AND:"和",OR:"或",LIST:"状态",ISNOT:"不是",SELECT:"选择",PATH:"路径",METADATA:"元数据","ADD FILTER TERMS":"添加检索条件",FILTER:"筛选器",TITLE:"标题","CREATE QUERY":"创建检索式","EDIT QUERY":"编辑检索式",MATCH:"匹配",TIMES:"次","Share Memo Image":"分享 Thino 图片","↗Click the button to save":"↗点击右上角的按钮来保存","Image is generating...":"图片正在生成中...","Image is loading...":"图片正在加载中...","😟 Cannot load image, image link maybe broken":"😟 无法加载图片,图片链接也许不存在","Loading...":"努力加载中...","Daily Memos":"每日 Thino","CANCEL EDIT":"取消编辑","LINK TO THE":"链接到","Mobile Options":"移动端选项","Experimental Options":"实验性选项","Background Image in Dark Theme":"深色主题的背景图","Background Image in Light Theme":"浅色主题的背景图",'Set background image in dark theme. Set something like "Daily/one.png"':'设置深色主题的背景图。请设置类似"Daily/one.png"的路径','Set background image in light theme. Set something like "Daily/one.png"':'设置浅色主题的背景图。请设置类似"Daily/one.png"的路径','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'设置默认 Thino 组成,你必须要使用 {TIME} 作为 "HH:mm" 而且要设置 {CONTENT} 作为内容识别。默认情况下, Thino 基于 "{TIME} {CONTENT}" 识别',"Default Memo Composition":"【已弃置】默认 Thino 组成","Show Tasks Label":"展示任务标签","Show tasks label near the time text. False by default":"在 Thino 的时间旁展示任务标签。默认情况下不展示","Please Open Memos First":"请先打开 Thino","Comment it...":"评论...",DATE:"日期",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"Obsidian Natrual DATES language 插件没启动",BEFORE:"在之前",AFTER:"在之后","Allow Comments On Memos":"允许在 Thino 上评论","You can comment on memos. False by default":"你可以在 Thino 点击图标进行评论了。默认不开启",Import:"导入","TITLE CANNOT BE NULL!":"标题不可以为空!","FILTER CANNOT BE NULL!":"筛选器不可以为空!","Comments In Original DailyNotes/Notes":"在原文件中进行评论","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"你需要安装 0.5.9 版本以上的 Dataview 插件来使用该功能","Open Memos Successfully":"成功打开 Thino ","Fetch Memos Error":"😭 Thino 获取失败","Copied to clipboard Successfully":"复制成功","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"请检查你有没有开启日记插件或者 Periodic Notes 插件且启用了日记模式","Please finish the last filter setting first":"先完善上一个过滤器吧","Close Memos Successfully":"成功关闭 Thino ","Insert as Memo":"插入内容为 Thino","Insert file as memo content":"插入文件为 Thino","Image load failed":"有个图片加载失败了😟","Content cannot be empty":"内容不能为空呀","Unable to create new file.":"无法新建文件","Failed to fetch deleted memos: ":"无法获取已删除的 Thino :","RESTORE SUCCEED":"成功恢复 Thino","DELETE SUCCEED":"删除成功","Save Memo button icon":"保存按钮上的图标","The icon shown on the save Memo button in the UI.":"你可以设置保存按钮上的图标","Fetch Memos From Particular Notes":"从指定的文件中获取 Thino",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'你可以给笔记设置指定检索式来让 Memos 可以索引到它。默认为 "#memo" ',"Allow Memos to Fetch Memo from Notes":"允许 Thino 从笔记中获取 Thino","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"使用 Memos 来管理你笔记中的 Memos,不单只 DailyNotes 中的内容。默认为关闭","Always Show Memo Comments":"评论将总是可见","Always show memo comments on memos. False by default":"当开启后评论总是会在 Thino 的下方展示。默认为关闭","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"你在 Periodic Notes 插件和日记插件都没设置日记的所在文件夹","Please check your daily note plugin OR periodic notes plugin settings":"请检查你的日记插件和/或 Periodic Notes 插件的设置","Use which plugin's default configuration":"使用哪个插件的默认日记配置","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino 采用指定插件的默认配置来获取 Thino。默认为日记插件。",Daily:"日记插件","Always Show Leaf Sidebar on PC":"在 PC 上总是展示左侧栏","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"在 PC 或平板上即使页面宽度小于 875px 时都展示左侧栏。默认为关闭","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"你在 Periodic Notes 插件和日记插件都没设置日记的格式","fetch more":"加载更多","Search all settings":"搜索所有设置","Random Review":"随机回顾","ARCHIVED AT":"归档于","Failed to get memos from daily notes":"无法从日记中获取 Thino","Failed to delete memo":"无法删除 Thino","CTRL + ENTER to save":"CTRL + ENTER 保存","Started from":"开始于","Custom Background Image":"自定义背景图","Set custom background image.":"设置自定义背景图","Custom Memo Footer":"自定义 Thino 页脚","Set custom memo footer.":"设置自定义 Thino 页脚","Heatmap Color Scheme":"热力图颜色","Set different color scheme for heatmap.":"设置热力图的颜色","Enable Local Http Server":"启用本地 HTTP 服务器","Memos Http Server Port":"Thino HTTP 服务器端口","Set memos http server port to listen. '43999' by default":"设置 Thino HTTP 服务器端口。默认为 '43999'","Live-Preview Mode OR Source Mode.":"基于 Thino 的所见即所得模式(默认) 或者 源码模式,你可以自己选择适合自己的输入体验。","Default Editor Mode":"默认编辑器模式","Save type for Thino":"Thino 保存类型",DAILY:"日记",MULTI:"多文件",CANVAS:"画布",FILE:"单文件",ALL:"所有","Failed to create daily note, check if it exists.":"无法创建日记,请检查是否存在文件夹","Failed to create daily note. Please check if you created a folder for daily notes.":"无法创建日记,请检查是否存在日记文件夹","After you verify your account, please refresh this page.":"验证成功后,请刷新页面。",Verify:"去验证","Oops! You forget to verify insider account":"内测账户验证失败","If you have any questions, please contact us.":"如果你有任何问题,请联系我们。","Delete Thino Directly":"直接删除 Thino","When delete thino directly, it will not be moved to trash. False by default.":"当直接删除 Thino 时,不会移动到回收站。默认为关闭","Get activation code":"获取激活码","Input activation code here":"在这里输入激活码","Copy Thino id":"获取 Thino id","Activate Pro Version":"激活专业版","Please copy Thino id first":"请先获取 Thino id",'You can set folder name with file name like "folder/file"':'你可以设置例如 "folder/file" 的文件夹名+文件名的搭配来存放在指定文件夹','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'你可以设置例如 "folder1/folder2/folder3" 的文件夹名来创建子文件夹',"Default save type":"默认保存类型",'Set the default save type for thino. "DAILY" by default':'设置 Thino 的默认保存类型。默认为 "日记"',"Enable opening thino globally":"全局唤醒 Thino","Enable opening thino globally. False by default.":"全局唤醒 Thino。默认为关闭","Key for opening thino globally":"全局唤醒 Thino 的快捷键","Set key for opening thino globally. CTRL + SHIFT + T by default.":"设置全局唤醒 Thino 的快捷键。默认为 CTRL + SHIFT + T","Sync Thino via PKMer":"通过 PKMer 同步 Thino",Unlink:"取消链接",Link:"链接","Connect to PKMer Sync, you can check it in ":"连接到 PKMer 同步,你可以在该链接中查看:","PKMer Sync":"PKMer 同步","Remove successfully":"移除成功",Deactivate:"取消激活",Remove:"移除","Confirm?":"确认?","Sync Status":"同步状态","Start or stop sync":"开始或停止同步","Stop sync successfully":"停止同步成功","Start sync successfully":"开始同步成功",Stop:"停止",Start:"开始","Show thino near mouse":"在鼠标附近展示 Thino","Query not found":"检索式未找到","Send to clipboard successfully":"发送到剪贴板成功","Thino - Failed to start HTTP server, please check the port is available.":"Thino - 启动 HTTP 服务器失败,请检查端口是否可用。","Thino - Started HTTP server on port":"Thino - 启动 HTTP 服务器成功,端口为","Thino - Terminated HTTP server":"Thino - 终止 HTTP 服务器","File not exist":"文件不存在","Thino not found":"Thino 未找到","File not found for the given thino path, is creating a new file":"未找到承载指定 Thino 的文件,正在创建新文件","Saved sync token successfully":"保存同步令牌成功","Failed to find daily notes folder":"未找到日记文件夹","Please install obsidian-hover-editor plugin first":"请先安装 obsidian-hover-editor 插件","Copied app id successfully":"复制 app id 成功","Please input token first":"请先输入 token","Please enable sync first":"请先启用同步","Init Failed":"初始化失败","Folder not found for the given thino path, is creating a new folder":"未找到承载指定 Thino 的文件夹,正在创建新文件夹","File not found for the given thino path":"未找到承载指定 Thino 的文件","Failed to read current daily note, check if it exists.":"无法读取日记文件,请检查是否存在","Verify successfully":"验证成功","Failed to verify":"验证失败","Failed to save":"保存失败","Failed to login, please login again":"登录已过期,请重新登录","COPY FAILED":"复制失败","COPY SUCCEED":"复制成功","Copy selected text":"复制选中文本","Copy thino":"复制",COPY:"复制","This is a pro feature, please upgrade to pro version to use it.":"这是专业版功能,请升级到专业版来使用它。","You can get pro version from: ":"你可以从这里获取专业版:",Save:"保存",Cancel:"取消","Thino Daily Target":"Thino 每日目标",Input:"输入","#Tag":"#标签","to create tag":"来创建标签","You have verified your account. Congrats!":"你已经验证了你的账户。恭喜!","Pro features":"专业版功能","Target Thino Count":"目标 Thino 数量",on:"在","Switch waterfall view":"切换瀑布流视图","Switch view":"切换视图","Switch list view":"切换列表视图","Set daily target":"设置每日目标","Thino Save To: ":"Thino 保存到:","Enter fullscreen mode":"进入全屏模式","Exit fullscreen mode":"退出全屏模式",words:"字词",word:"字","Return To Home Page":"返回首页","No thinos to review!":"没有 thino 需要回顾!","Thinos to review":"Thino 需要回顾","Start Review":"开始回顾",Hard:"困难",Good:"良好",Easy:"简单",Again:"重来","Daily Progress":"每日进度","Clear all review data":"清除所有回顾数据","Show stats":"显示统计","Hide stats":"隐藏统计",Remaining:"剩余","Total Reviews":"总回顾","Today, you have reviewed all your thinos!":"今天你已经回顾了所有 thino!","Daily review limit reached! Come back tomorrow.":"每日回顾上限已达到!明天再来吧。","Open thino in center window":"在中心窗口打开 thino","Open thino in float window":"在浮动窗口打开 thino","Open thino in right sidebar":"在右侧边栏打开 thino","Open thino in left sidebar":"在左侧边栏打开 thino","Show thino editor":"显示 thino 编辑器","Toggle minimal mode":"切换 Minimal 模式","Focus on thino editor":"聚焦到 thino 编辑器","ReSync web thinos to local":"重新同步 web 上的 thino 到本地","Sync local thinos to web":"同步本地的 thino 到 web","Show daily thino":"显示每日 thino 视图","Focus on search bar":"聚焦到搜索栏","Show-thino in popover(Hover editor)":"在弹出框中显示 thino","Center window":"中心窗口","Float window":"浮动窗口","Right sidebar":"右侧边栏","Left sidebar":"左侧边栏","Save thino type when sync local":"同步本地时保存的 thino 类型","Set the default save thino type when sync local, FILE by default.":"设置同步本地时保存的 thino 类型,默认为单文件。","Sync service":"同步服务","Pro verification status":"专业版激活状态","Live-preview":"所见即所得",Source:"源码",General:"通用",Thino:"Thino",Theme:"主题",Share:"分享",Interface:"界面",Advanced:"进阶","Global copy":"全局复制","Set the folder name":"设置文件夹名","Set the filename":"设置文件名","Set the filename for current location file":"设置当前位置文件的文件名","Switch calendar type":"切换日历类型",alphabetical:"按名称(A-Z)",alphabeticalReverse:"按名称(Z-A)",byCount:"按使用次数(从高到低)",byCountReverse:"按使用次数(从低到高)","Type here":"在这里输入",Today:"今天",Yesterday:"昨天","Last 7 days":"最近 7 天","Last 30 days":"最近 30 天","Last 90 days":"最近 90 天","Last 180 days":"最近 180 天","Last 365 days":"最近 365 天",Found:"被找到","Copy filtered thinos":"复制筛选的 thino","Bulk delete":"批量删除","Bulk archive":"批量归档","Bulk tag operation":"标签编辑","Bulk restore":"批量恢复","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"如果你禁用了日记插件,可能会导致 thino 无法被正确删除。请启用插件后再试一次。",Preview:"预览","Set and save":"设置并保存","Show day mark in thino list":"在 Thino 列中展示日期标记","Show day mark on the top of daily range thino. False by default.":"在 Thino 列中展示日期标记。默认为关闭","Click to expand or fold, Cmd+Click to show all thinos of the day":"点击展开或折叠,Cmd+点击展示当天所有 thino","You can buy a license from":"你可以从这里购买许可证","No thinos in range":"该范围内没有 thino",Month:"月视图",Week:"周视图",Day:"日视图",Agenda:"日程视图",Tomorrow:"明天",Previous:"往前",Next:"往后","Search all columns...":"搜索所有的列...","Basic Info":"基础信息","Additional Info":"附加信息","Created At":"创建于",Content:"内容","Thino Type":"Thino 类型","Source Type":"来源类型","Row status":"归档状态",Path:"路径","Pinned Status":"置顶状态",Table:"表格",Chat:"聊天",Moments:"动态",Waterfall:"瀑布流",Calendar:"日历","Go to page":"跳转到页",Page:"页",Show:"展示",rows:"行","Temp Filter":"临时筛选器","Set the heading for saving thino":"设置保存 Thino 的标题","# Heading":"# 标题","Open link directly in Thino view":"Thino 视图内直接打开双链","Day mark range":"日期标记范围","Set the range of day mark. Day by default.":"设置日期标记的范围,默认为天","Thino is locked":"Thino 已锁定","Please unlock Thino by input password":"请输入密码来解锁 Thino","Auto Download Image":"自动下载图片","Auto download image when save to thino. 'false' by default":"当保存到 Thino 时自动下载图片。默认为 'false'","Thino Http IP Type":"Thino HTTP 服务器 IP 类型","Set Thino http server ip to listen. 'localhost' by default":"设置 Thino HTTP 服务器 IP。默认为 'localhost'","Password to lock Thino":"锁定 Thino 的密码",Unlock:"解锁",Locked:"已锁定","Password is incorrect":"密码错误",Lock:"锁定","Need password to unlock Thino":"需要密码来解锁 Thino","You have not set a password or enable this feature yet":"你还没有设置密码或者启用该功能",Password:"密码","Password for Thino":"Thino 的密码","Please input your password to change password settings":"请输入原来的密码来修改密码设置","Please input your password":"请输入密码","Lock thino":"锁定 Thino",date:"日期",time:"时间",event:"事件","Add tag position":"添加标签位置","Set the position of the tag when adding tag automatically":"设置自动添加标签的位置","Add tag automatically":"自动添加标签","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"在创建 Thino 和筛选标签时,将标签添加到 Thino 内容的末尾或开头","Add tag with new line":"添加标签时换行","Add tag with new line when adding tag automatically":"自动添加标签时换行","Input to select more tags":"输入来选择更多标签","Tag Bulk Edit":"标签批量编辑","Tag Bulk Select":"标签批量选择","Exist Tags":"已有标签","Selected Tags":"已选标签","Click to remove exist tag":"点击移除已有标签","Click to remove selected tag":"点击移除已选标签","Select tags":"选择标签","Input to select exist tag":"输入来选择已有标签",Beginning:"开头",End:"末尾","Chat view style":"聊天视图样式","Set the style of chat view":"设置聊天视图的样式","Background image for moments view":"动态视图的背景图","Set the background image for moments view":"设置动态视图的背景图","Icon for moments/chat view/share image":"动态/聊天视图/分享图的头像","Set the icon for moments/chat view/share image":"设置动态/聊天视图/分享图的头像","Quote for moments view/share image":"动态视图/分享图的个性签名","Set the quote for moments view/share image":"设置动态视图/分享图的个性签名","Theme for Thino":"Thino 主题","Set the theme for Thino":"设置 Thino 的主题","Interface Details":"界面详情","Task amount":"任务数量","Thino status":"Thino 状态","Used tags":"使用的标签","Used days":"使用的天数","Most active day":"最活跃的一天","Most active hour":"最活跃的一小时","Thino amount":"Thino 数量","No content to generate.":"没有内容可以生成。","Image generated successfully.":"图片生成成功。","Failed to generate image.":"图片生成失败。","Share filtered thinos as image":"分享筛选的 Thino 为图片","Latest version":"最新版本","Previous version":"之前版本","Thino update info":"Thino 更新信息","Debug info copied to clipboard":"调试信息已复制到剪贴板","Copy debug info":"复制调试信息","Failed to load changelog":"无法加载更新日志","View online":"在线查看",ChangeLog:"更新日志","Please open thino first":"请先打开 Thino","Insert editor":"插入编辑器","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"请在 Thino 设置中为多文件设置不同的路径,日记文件夹与多文件保存路径重复,或者存在被重复读取可能","Default time prefix for thino in daily notes":"日记中 Thino 的默认时间前缀","Set default time prefix for thino in daily notes.":"设置日记中 Thino 的默认时间前缀","Save image successfully":"保存图片成功","User quote":"用户签名","Set user quote for thino":"设置用户签名","User icon":"用户头像","Set user icon for thino. You can input http/https link or file path in vault.":"设置用户头像。你可以设置 http/https 链接或者 vault 中的文件路径。","User info":"用户信息","Copy filtered results":"复制筛选结果","Share image":"分享图片",Default:"默认",Gray:"灰色",Grass:"草绿",Flame:"火焰",Olive:"橄榄",Ice:"冰",Magenta:"品红","Daily notes":"日记相关",Editor:"编辑器","Append/prepend text when share to Thino":"分享到 Thino 时添加/前置文本","Append text when share to Thino":"分享到 Thino 时添加文本","Prepend text when share to Thino":"分享到 Thino 时前置文本","Add newline when append/prepend text":"添加换行符",Prepend:"前置",Append:"后置",Both:"两者",None:"无","Hide pinned group":"隐藏置顶分组","Hide pinned group in thino list. False by default.":"隐藏置顶的 Thino 分组。默认为关闭","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"设置 Thino 任务类型的标题,如果提供了标题,所有记录的 Thino 内容将统一归类到该标题下。","Different insert target for different type":"不同类型的 Thino 有不同的插入目标","Toggle this to set different insert target for different type of thino, like task or list type of thino":"切换此选项以为不同类型的 Thino 设置不同的插入目标,例如任务或列表类型的 Thino","Set process target":"设置处理目标","You can set whole diary or only part of it":"你可以设置整个日记或者其中的一部分",Custom:"自定义","Whole diary":"整个日记","Set thino insert place":"设置 Thino 插入位置","Set where to insert thino content":"设置 Thino 内容插入位置","End of the diary":"日记的末尾","Custom location":"自定义位置","Setting guide":"设置流程","Details settings":"详细设置","Start Thino":"开始 Thino","About Thino Pro":"关于 Thino 专业版",Enabled:"已启用",Enable:"启用","Daily notes folder":"日记文件夹","Set daily notes folder":"设置日记文件夹","Daily note name format":"日记文件名格式","Set daily note name format":"设置日记文件名格式","Daily note plugin":"日记插件","Enable daily note plugin":"启用日记插件",Selected:"已选择",Select:"选择","A classic theme for Thino with a two-column layout":"Thino 的经典主题,采用两列布局",Classic:"经典","A modern theme for Thino with a three-column layout and some unique features.":"Thino 的现代主题,采用三列布局和一些独特的功能。",Modern:"现代","Go and enjoy Thino":"去享受 Thino 吧","Congrats! All settings done":"恭喜!所有设置已完成","Adjust settings that influence your user experience with Thino.":"调整影响你使用 Thino 的设置。","Set preferences for using Thino":"设置使用 Thino 的偏好","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"如果你使用的是 Thino 基础版,启用日记插件是必须的。配置其设置以有效地使用它。","Go with daily note plugin":"使用日记插件","Choose a theme for Thino.":"选择 Thino 的主题。","Set theme for Thino":"设置 Thino 的主题","Set up your user info for Thino.":"设置你的用户信息。","Get started with Thino":"开始使用 Thino","Skip and start Thino":"跳过并开始 Thino","Next step":"下一步","Back to previous step":"返回上一步","Click to enable =>":"点击启用 =>","This is Thino's sidebar. Navigate to different path or select query filter.":"这是 Thino 的侧边栏。你可以导航到不同的路径或选择查询过滤器。","Click here and go to settings page.":"点击这里并转到设置页面。","Click here and go to different path.":"点击这里并转到不同的路径。","Select or create query filter here.":"在这里选择或创建查询过滤器。","See the status of Thinos here.":"在这里看到 Thino 的状态。","Search your thino quickly here.":"在这里快速搜索你的 Thino。","Edit or create your thino here.":"在这里编辑或创建你的 Thino。","See your thinos here.":"在这里看到你的 Thino。","See your time status of thinos here.":"在这里看到你的 Thino 时间状态。","See your tags here. Tags will be shown when thino contains tags.":"在这里看到你的标签。当 Thino 包含标签时,标签将显示。",Done:"完成","Thino is ready to use. ":"Thino 已准备好使用。","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"你现在可以开始使用 Thino 了。如果你想了解更多关于 Thino 专业版的信息,请点击下面的按钮。","Default time prefix":"默认时间前缀","Append Text Action":"分享到 Thino 时的后置文本动作","Prepend Text Action":"分享到 Thino 时的前置文本动作",Preset:"预设","Select Tags":"选择标签","It is not available on small view":"在窄的视图中不可用","Append text":"在末尾添加文本","Prepend text":"在开头添加文本","Your daily note folder is not set correctly, please check your settings":"你的日记文件夹设置不正确,请检查你的设置","Default sharing style":"默认分享样式","Set the default style for sharing thino, 'Modern' by default.":"设置 Thino 的默认分享样式,默认为“现代”。",Clean:"清爽",Minimal:"极简",Gradient:"渐变","Thino share":"Thino 分享","Copy to clipboard failed":"复制到剪贴板失败","Copy to clipboard successfully":"复制到剪贴板成功","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"你的内容已经复制到剪贴板,并插入到编辑器中。请再试一次","Share thino":"分享 Thino","Set file name after create thino":"创建 Thino 后设置文件名","You can set file name after create thino. A input box will show when you create thino.":"你可以在创建 Thino 后设置文件名。当你创建 Thino 时,会显示一个输入框。",SPLIT:"分割","Split by Heading 1":"按一级标题分割","Split by Heading 2":"按二级标题分割","Split by Heading 3":"按三级标题分割","Insert task":"插入任务","All settings have been reset to default.":"所有设置已重置为默认值。","Reset all Thino settings":"重置所有 Thino 设置","Reset settings":"重置设置","Reset Thino settings to default settings.":"将 Thino 设置重置为默认设置。","Task Management":"任务管理","Append completed date when task done in thino":"在 Thino 中的任务完成时添加完成日期","Append completed date when task done in thino. False by default":"在 Thino 中的任务完成时添加完成日期。默认为关闭","Set tag for single file that Thino indexes":"Thino 会索引被设置标签的单文件","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"当你在这里设置一个标签时,Thino 会索引包含这个标签的文件,并在列表中显示。不需要添加 `#`。","Set tag for file type file":"为单文件类型文件设置标签","Set tag for multi type file":"为多文件类型文件设置标签","Please input the tag":"请输入标签","Merge thinos in to thino share image":"合并 Thino 到 Thino 分享图片","Custom height for Thino content":"自定义 Thino 内容高度","Set custom height for Thino content. Like 200px or 20rem":"设置 Thino 内容的自定义高度。如 200px 或 20rem","Input height":"输入高度","Submit issue":"提交问题","Current version":"当前版本","Bug report":"Bug 报告","Click the button to copy debug info and open the issue page":"点击按钮复制调试信息并打开问题页面","Copy and go":"复制并前往","Debug info copied":"调试信息已复制","Feature request":"功能请求","Submit your feature request to the issue page":"提交你的功能请求到问题页面",Go:"前往","Toggle query list visibility":"切换 Query 列表可见性","Toggle tags visibility":"切换标签可见性","Toggle sidebar visibility":"切换侧边栏可见性",Collapse:"收起",Expand:"展开","Max height for collapse":"折叠的最大高度","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"Thino 折叠的最大高度,设置为 0 时,Thino 不会折叠。默认为 0。(这不是行数,而是像素高度值)","Render content":"渲染内容","Optimize for Callout":"优化 Callout 渲染性能问题","Won't render content contains more than 3 callouts automatically. True by default":"不会自动渲染包含超过 3 个 Callout 的内容。默认为开启","The value should be greater than":"值应大于","Append Text":"后置文本","Prepend Text":"前置文本","Thino height when collapsed":"Thino 折叠时的高度","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"Thino 折叠时的高度,当设置为 0 时,完全折叠。默认为 100。(这不是行数,而是像素高度值)","This option will allow you use other views when leaf width is not enough. False by default.":"当页面宽度不够时,可以选择其他视图。默认为关闭。","Can select other views when leaf width is not enough":"当页面宽度不够时,可以选择其他视图","TRASH BOX":"回收站","Wait templater to finish parse before insert thino":"在插入 Thino 之前等待 Templater 完成解析","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"此选项将允许您在插入 Thino 之前等待 Templater 完成解析,这可能会导致您在插入 Thino 之间需要确认两次。默认为关闭。","Get thino capture extension":"获取 Thino 剪裁扩展","You can capture idea/text from chrome now.":"你现在可以从 Chrome 中捕获想法/文本。","Open File":"打开文件","Exported CSV file":"导出的 CSV 文件","Updated At":"更新于","Export to CSV":"导出为 CSV","Quick add button on mobile navbar":"移动端导航栏的快速添加按钮","Always show status text":"始终显示状态文本","Support filter by metadata from file":"支持通过文件中的元数据进行筛选","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"启用后,你可以通过文件中的元数据进行筛选,例如文件中的标签。但画布中的 Thino 不支持。默认为关闭。","Show source near timestamp in thino":"在 Thino 时间戳旁显示 Thino 的来源","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"启用后,你可以在 Thino 时间戳旁看到 Thino 的来源。你可以在元数据中设置 title 来覆盖文件名。默认为关闭。","Show Update Message":"显示更新消息","Show update message when Thino is updated. True by default":"Thino 更新时显示更新消息。默认为开启","Sync manually":"手动同步","Show all scrollbars":"显示所有滚动条","TIME RANGE":"时间范围",WITHIN:"在内","7 days":"7天","14 days":"14天","30 days":"30天","3 months":"3个月","6 months":"6个月","1 year":"1年","This week":"本周","Last week":"上周","This month":"本月","Last month":"上月","This year":"今年","Last year":"去年","No history":"没有历史记录","Today Remaining":"今日剩余","Today Total":"今日总计","Historical Statistics":"历史统计",byTime:"按时间",byTimeReverse:"按时间反序",Stat:"统计",Statistics:"统计","Daily Thino Count":"每日 Thino 数量",Total:"总计",thinos:"thinos","Thino Types":"Thino 类型","Distribution of thino types":"Thino 类型分布","Thino Status":"Thino 状态","Distribution of thino status":"Thino 状态分布","Popular Tags":"常用标签","Top 10 most used tags":"Top 10 常用标签","Thino Count":"Thino 数量","Hourly distribution":"每小时分布","Current month":"当前月份","Monthly distribution":"每月分布","30 Days":"过去 30 天",Year:"年份","Time Distribution":"时间分布","When do you write thinos":"你什么时候写 Thino","Content Length":"内容长度","Distribution of thino lengths":"Thino 长度分布","Daily Thinos":"每日 Thino","Show Time Distribution":"显示时间分布","Hide date picker":"隐藏日期选择器","Show date picker":"显示日期选择器","Clear filter":"清除筛选","Copy link":"复制链接","Copy embed link":"复制嵌入链接","Ctrl/Cmd + Enter to save thino":"Ctrl/Cmd + Enter 保存 Thino","Fixed strings for thinos":"固定字符串","Use fixed strings for thinos":"使用固定字符串","Enable to add fixed strings at the beginning or end of thinos.":"启用为每个 Thino 添加固定字符串。","Fixed prefix for thinos":"固定前缀","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"在每个 Thino 的开头添加此字符串。支持占位符,如 {{TIME|YYYYMMDDHHmmss}}。","Fixed suffix for thinos":"固定后缀","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"在每个 Thino 的末尾添加此字符串。支持占位符,如 {{TIME|YYYYMMDDHHmmss}}。","Word count exceeded":"字数超出限制","Word count feature":"字数统计","Enable real-time word count display in the editor":"启用实时字数显示","Maximum word count":"最大字数","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"设置 Thino 的最大字数。当超过时,编辑器将显示警告。设置为 0 时,没有限制。","No linked thinos found":"没有找到链接的 Thino","Reference links group":"链接组","Enable reference links group in thino.":"在 Thino 中启用链接组。","No reference links found":"没有找到链接","Error fetching reference links":"获取链接失败","Outgoing Links":"出链","Incoming Links":"入链","Double click behavior":"双击行为","Set the behavior when double click on a thino.":"设置双击 Thino 的行为。","Open thino":"打开 Thino","Edit thino":"编辑 Thino","Go to source":"前往来源","Do nothing":"什么都不做","Use default header in mobile view":"使用默认的移动端头部","Use default header in mobile view of thino rather than custom header.":"使用默认的移动端头部,而不是自定义的头部。","Ignore folders for multi type":"忽略多文件类型文件夹","Set folders to ignore when using multi type. Separate multiple folders with comma (,).":"设置多文件类型时忽略的文件夹。用逗号 (,) 分隔多个文件夹。","folder1,folder2/subfolder":"folder1,folder2/subfolder","Using block link when dragging a thino":"拖动 Thino 以插入连结","Using block link when dragging a thino for daily":"拖动 Thino 以插入连结到日记","Matched via tag in content":"通过内容中的标签匹配","Matched via tag in file":"通过文件中的标签匹配","Focus on editor when open":"打开时聚焦编辑器","Focus on editor when open. True by default.":"打开时聚焦编辑器。默认为开启","Show scroll to top button":"显示滚动到顶部按钮","Show scroll to top button. True by default":"显示滚动到顶部按钮。默认为开启","Zoom image by default":"默认缩放图片","Zoom image by default when viewing image.":"查看图片时默认缩放图片。","View archive in random review":"在随机回顾中查看归档的 Thino","View archived thinos in random review. True by default":"在随机回顾中查看归档的 Thino。默认为开启","Linked by":"链接自",Linked:"链接",DUPLICATE:"复制","Show scrollbars in all thino views.":"在所有 Thino 视图中显示滚动条。","Drag to paste content":"拖动粘贴内容","You will be able to paste content from other apps to thino by dragging rather than pasting the block link.":"你可以通过拖动而不是粘贴块链接来将内容从其他应用粘贴到 Thino 中。","Dragging behavior":"拖动行为","Control the behavior when dragging a thino. You will paste the block link by default. Block-link option only works with source type is Daily Note.":"控制拖动 Thino 的行为。默认粘贴块链接。块链接选项仅在源类型为日记时有效。","Block link":"块链接",Text:"文本"},hq={welcome:"歡迎使用 Thino",ribbonIconTitle:"Thino",to:"至",months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],weekDays:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],weekDaysShort:["日","一","二","三","四","五","六"],year:null,month:null,"Basic Options":"基本選項","User name":"使用者名稱","Set your user name here. 'Memos 😏' By default":"設定您的使用者名稱。預設為 'Thino 😏'",'You can set target heading like "# Heading" to control data location':'您可以設定目標標題如 "# 標題" 來控制資料位置',"Insert after heading":"在標題後插入","If left blank, the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"如果留空,記錄的 thino 內容將插入日記末尾;如果提供標題,所有記錄的 thino 內容將統一歸類在該標題下。","Allows admonitions to be created using ":"允許使用以下方式創建提示 ","Process Memos below":"在以下處理 thino","If left blank, the Thino interface will display all thino record contents; if a title is provided, the Thino interface will only display the contents under that title, and contents written elsewhere will not be shown.":"如果留空,Thino 介面將顯示所有 thino 記錄內容;如果提供標題,Thino 介面將只顯示該標題下的內容,其他地方寫的內容將不會顯示。","Save Memo button label":"儲存 thino 按鈕標籤","The text shown on the save Memo button in the UI. 'NOTEIT' by default.":"UI 中儲存 Thino 按鈕顯示的文字。預設為 'NOTEIT'。","Focus on editor when open memos":"開啟 thino 時聚焦編輯器","Focus on editor when open memos. Focus by default.":"開啟 thino 時聚焦編輯器。預設聚焦。","Open daily memos with open memos":"開啟 thino 時開啟每日 thino","Open daily memos with open memos. Open by default.":"開啟 thino 時開啟每日 thino。預設開啟。","Open Memos when obsidian opens":"Obsidian 開啟時開啟 Thino","When enable this, Memos will open when Obsidian opens. False by default.":"啟用此選項時,Obsidian 開啟時將開啟 Thino。預設為關閉。","Hide done tasks in Memo list":"在 Thino 列表中隱藏已完成的任務","Hide all done tasks in Memo list. Show done tasks by default.":"在 Thino 列表中隱藏所有已完成的任務。預設顯示已完成的任務。","Advanced Options":"進階選項","UI language for date":"日期 UI 語言","Translates the date UI language. Only 'en' and 'zh' are available.":"翻譯日期 UI 語言。僅支援 'en' 和 'zh'。","Default prefix when save thino":"儲存 thino 時的預設前綴","Set the default prefix when create memo, 'List' by default.":"創建 thino 時的預設前綴,預設為 'List'。","Default insert date format":"預設插入日期格式","Set the default date format when insert date by @, 'Tasks' by default.":"使用 @ 插入日期時的預設格式,預設為 'Tasks'。","Default editor position on mobile":"行動裝置上的預設編輯器位置","Set the default editor position on Mobile, 'Top' by default.":"設定行動裝置上的預設編輯器位置,預設為 'Top'。","Use button to show editor on mobile":"在行動裝置上使用按鈕顯示編輯器","Set a float button to call editor on mobile. Only when editor located at the bottom works.":"在行動裝置上設定浮動按鈕來呼叫編輯器。僅當編輯器位於底部時有效。","Show Time When Copy Results":"複製結果時顯示時間","Show time when you copy results, like 12:00. Copy time by default.":"複製結果時顯示時間,如 12:00。預設複製時間。","Show Date When Copy Results":"複製結果時顯示日期","Show date when you copy results, like [[2022-01-01]]. Copy date by default.":"複製結果時顯示日期,如 [[2022-01-01]]。預設複製日期。","Add Blank Line Between Different Date":"不同日期間添加空行","Add blank line when copy result with date. No blank line by default.":"複製帶日期的結果時添加空行。預設不添加空行。","Share Options":"分享選項","Share Memos Image Footer Start":"分享 Thino 圖片頁尾開始","Set anything you want here, use {ThinoNum} to display Number of thino, {UsedDay} for days. '{ThinoNum} Thino {UsedDay} Days' By default":"在此設定任何您想要的內容,使用 {ThinoNum} 顯示 thino 數量,{UsedDay} 顯示天數。預設為 '{ThinoNum} Thino {UsedDay} Days'","Share Memos Image Footer End":"分享 Thino 圖片頁尾結束","Set anything you want here, use {UserName} as your username. '✍️ By {UserName}' By default":"在此設定任何您想要的內容,使用 {UserName} 作為您的使用者名稱。預設為 '✍️ By {UserName}'","Save Shared Image To Folder For Mobile":"為行動裝置將分享的圖片儲存到資料夾","Save image to folder for mobile. False by Default":"為行動裝置將圖片儲存到資料夾。預設為關閉","Say Thank You":"說謝謝",Donate:"贊助","If you like this plugin, consider donating to support continued development:":"如果您喜歡這個外掛,請考慮贊助以支持持續開發:","File Name of Recycle Bin":"回收桶檔案名稱","Set the filename for recycle bin. 'delete' By default":"設定回收桶的檔案名稱。預設為 'delete'","File Name of Query File":"查詢檔案名稱","Set the filename for query file. 'query' By default":"設定查詢檔案的檔案名稱。預設為 'query'","Use Tags In Vault":"使用儲存庫中的標籤","Use tags in vault rather than only in Memos. False by default.":"使用儲存庫中的標籤而不是僅在 Thino 中使用。預設為關閉。","Ready to convert image into background":"準備將圖片轉換為背景",List:"列表",Task:"任務",Top:"頂部",Bottom:"底部",TAG:"標籤",DAY:"日",QUERY:"查詢",EDIT:"編輯",PIN:"釘選",UNPIN:"取消釘選",DELETE:"刪除","CONFIRM!":"確認!","CREATE FILTER":"創建過濾器","Comment it...":"添加評論...",Settings:"設定","Recycle bin":"回收桶","About Me":"關於我","Fetching data...":"獲取資料中...","Here is No Memos.":"這裡沒有 Thino。","Frequently Used Tags":"常用標籤","What do you think now...":"你現在在想什麼...",READ:"閱讀",MARK:"標記",SHARE:"分享",SOURCE:"來源",RESTORE:"還原",ARCHIVE:"封存","Daily Review":"每日回顧","DELETE AT":"刪除於","Noooop!":"不要!","All Data is Loaded 🎉":"所有資料已載入 🎉","Quick filter":"快速過濾",TYPE:"類型",LINKED:"已連結","NO TAGS":"無標籤","HAS LINKS":"有連結","HAS IMAGES":"有圖片",INCLUDE:"包含",EXCLUDE:"排除",TEXT:"文字",IS:"是",AND:"且",OR:"或",LIST:"列表",ISNOT:"不是",PATH:"路徑",METADATA:"元資料",SELECT:"選擇","ADD FILTER TERMS":"添加過濾條件",FILTER:"過濾",Filter:"過濾",TITLE:"標題","CREATE QUERY":"創建查詢","EDIT QUERY":"編輯查詢",MATCH:"匹配",TIMES:"次數","Share Memo Image":"分享 Thino 圖片","↗Click the button to save":"↗點擊按鈕儲存","Image is generating...":"圖片生成中...","Image is loading...":"圖片載入中...","Loading...":"載入中...","😟 Cannot load image, image link maybe broken":"😟 無法載入圖片,圖片連結可能已損壞","Daily Memos":"每日 Thino","CANCEL EDIT":"取消編輯","LINK TO THE":"連結到","Mobile Options":"行動裝置選項","Experimental Options":"實驗性選項","Don't support web image yet, please input image path in vault":"尚不支援網路圖片,請輸入儲存庫中的圖片路徑","Background Image in Dark Theme":"深色主題背景圖片","Background Image in Light Theme":"淺色主題背景圖片",'Set background image in dark theme. Set something like "Daily/one.png"':'設定深色主題的背景圖片。設定類似 "Daily/one.png" 的路徑','Set background image in light theme. Set something like "Daily/one.png"':'設定淺色主題的背景圖片。設定類似 "Daily/one.png" 的路徑','Set default memo composition, you should use {TIME} as "HH:mm" and {CONTENT} as content. "{TIME} {CONTENT}" by default':'設定預設 thino 組成,您應該使用 {TIME} 作為 "HH:mm" 和 {CONTENT} 作為內容。預設為 "{TIME} {CONTENT}"',"Default Memo Composition":"[已棄用] 預設 Thino 組成","Show Tasks Label":"顯示任務標籤","Show tasks label near the time text. False by default":"在時間文字旁顯示任務標籤。預設為關閉","Please Open Memos First":"請先開啟 Thino",DATE:"日期",OBSIDIAN_NLDATES_PLUGIN_NOT_ENABLED:"OBSIDIAN_NLDATES_PLUGIN_未啟用",BEFORE:"之前",AFTER:"之後","Allow Comments On Memos":"允許在 Thino 上評論","You can comment on memos. False by default":"您可以在 thino 上評論。預設為關閉",Import:"匯入","TITLE CANNOT BE NULL!":"標題不能為空!","FILTER CANNOT BE NULL!":"過濾器不能為空!","Comments In Original DailyNotes/Notes":"原始每日筆記/筆記中的評論","You should install Dataview Plugin ver 0.5.9 or later to use this feature.":"您需要安裝 Dataview 外掛 0.5.9 或更新版本才能使用此功能。","Open Memos Successfully":"成功開啟 Thino","Fetch Memos Error":"😭 獲取錯誤","Copied to clipboard Successfully":"成功複製到剪貼簿","Check if you opened Daily Notes Plugin Or Periodic Notes Plugin":"請檢查是否已開啟每日筆記外掛或定期筆記外掛","Please finish the last filter setting first":"請先完成上一個過濾器設定","Close Memos Successfully":"成功關閉 Thino","Insert as Memo":"插入為 Thino","Insert file as memo content":"將檔案插入為 thino 內容","Image load failed":"圖片載入失敗","Content cannot be empty":"內容不能為空","Unable to create new file.":"無法創建新檔案。","Failed to fetch deleted memos: ":"獲取已刪除的 thino 失敗:","RESTORE SUCCEED":"還原成功","DELETE SUCCEED":"刪除成功","Save Memo button icon":"儲存 Thino 按鈕圖示","The icon shown on the save Memo button in the UI.":"UI 中儲存 Thino 按鈕顯示的圖示。","Fetch Memos From Particular Notes":"從特定筆記獲取 Thino",'You can set any Dataview Query for memos to fetch it. All memos in those notes will show on list. "#memo" by default':'您可以為 thino 設定任何 Dataview 查詢來獲取它。這些筆記中的所有 thino 都會顯示在列表中。預設為 "#memo"',"Allow Memos to Fetch Memo from Notes":"允許 Thino 從筆記中獲取 Thino","Use Memos to manage all memos in your notes, not only in daily notes. False by default":"使用 Thino 管理您筆記中的所有 thino,而不僅僅是每日筆記中的。預設為關閉","Always Show Memo Comments":"始終顯示 Thino 評論","Always show memo comments on memos. False by default":"始終在 thino 上顯示評論。預設為關閉","You didn't set folder for daily notes in both periodic-notes and daily-notes plugins.":"您尚未在定期筆記和每日筆記外掛中設定每日筆記的資料夾。","Please check your daily note plugin OR periodic notes plugin settings":"請檢查您的每日筆記外掛或定期筆記外掛設定","Use which plugin's default configuration":"使用哪個外掛的預設配置","Memos use the plugin's default configuration to fetch memos from daily, 'Daily' by default.":"Thino 使用外掛的預設配置從每日筆記中獲取 thino,預設為 'Daily'。",Daily:"每日","Always Show Leaf Sidebar on PC":"在 PC 上始終顯示葉面側邊欄","Show left sidebar on PC/Tablet even when the leaf width is less than 875px. False by default.":"即使葉面寬度小於 875px,也在 PC/平板上顯示左側邊欄。預設為關閉。","You didn't set format for daily notes in both periodic-notes and daily-notes plugins.":"您尚未在定期筆記和每日筆記外掛中設定每日筆記的格式。","fetch more":"獲取更多","Search all settings":"搜尋所有設定",General:"一般",Theme:"主題",Share:"分享",Advanced:"進階",Interface:"介面",Thino:"Thino","Random Review":"隨機回顧","ARCHIVED AT":"封存於","Failed to get memos from daily notes":"從每日筆記獲取 thino 失敗","Failed to delete memo":"刪除 thino 失敗","CTRL + ENTER to save":"CTRL + ENTER 儲存","Started from":"開始於","Custom Background Image":"自訂背景圖片","Set custom background image.":"設定自訂背景圖片。","Custom Memo Footer":"自訂 Thino 頁尾","Set custom memo footer.":"設定自訂 thino 頁尾。","Heatmap Color Scheme":"熱圖顏色方案","Set different color scheme for heatmap.":"為熱圖設定不同的顏色方案。","Enable Local Http Server":"啟用本地 Http 伺服器","Memos Http Server Port":"Thino Http 伺服器埠","Set memos http server port to listen. '43999' by default":"設定 thino http 伺服器監聽埠。預設為 '43999'","Default Editor Mode":"預設編輯器模式","Live-Preview Mode OR Source Mode.":"即時預覽模式或原始碼模式。","Save type for Thino":"Thino 的儲存類型",DAILY:"每日",MULTI:"多個",CANVAS:"畫布",ALL:"全部",FILE:"檔案",TODO:"待辦",DONE:"已完成",JOURNAL:"日誌",OTHER:"其他","Failed to create daily note, check if it exists.":"創建每日筆記失敗,請檢查是否已存在。","Failed to create daily note. Please check if you created a folder for daily notes.":"創建每日筆記失敗。請檢查是否已創建每日筆記的資料夾。","After you verify your account, please refresh this page.":"驗證帳號後,請重新整理此頁面。",Verify:"驗證","Oops! You forget to verify insider account":"糟糕!您忘記驗證內部帳號","If you have any questions, please contact us.":"如果您有任何問題,請聯繫我們。","Delete Thino Directly":"直接刪除 Thino","When delete thino directly, it will not be moved to trash. False by default.":"直接刪除 thino 時,不會移至垃圾桶。預設為關閉。","Enable opening thino globally":"啟用全域開啟 thino","Enable opening thino globally. False by default.":"啟用全域開啟 thino。預設為關閉。","Key for opening thino globally":"全域開啟 thino 的快速鍵","Set key for opening thino globally. CTRL + SHIFT + T by default.":"設定全域開啟 thino 的快速鍵。預設為 CTRL + SHIFT + T。","Key for showing thino globally":"全域顯示 thino 的快速鍵","Set key for showing thino globally. CTRL + SHIFT + E by default.":"設定全域顯示 thino 的快速鍵。預設為 CTRL + SHIFT + E。","Get activation code":"獲取啟用碼","Input activation code here":"在此輸入啟用碼","Copy Thino id":"複製 Thino id","Activate Pro Version":"啟用專業版","Please copy Thino id first":"請先複製 Thino id",'You can set folder name with file name like "folder/file"':'您可以設定帶有檔案名稱的資料夾名稱,如 "folder/file"','You can set folder name like "folder1/folder2/folder3" to create sub-folder':'您可以設定如 "folder1/folder2/folder3" 的資料夾名稱來創建子資料夾',"Default save type":"預設儲存位置",'Set the default save type for thino. "DAILY" by default':'設定 thino 的預設儲存類型。預設為 "DAILY"',"Sync Thino via PKMer":"通過 PKMer 同步 Thino",Unlink:"取消連結",Link:"連結","Connect to PKMer Sync, you can check it in ":"連接到 PKMer 同步,您可以在此檢查 ","PKMer Sync":"PKMer 同步","Remove successfully":"移除成功",Deactivate:"停用",Remove:"移除","Confirm?":"確認?","Sync Status":"同步狀態","Start or stop sync":"開始或停止同步","Stop sync successfully":"成功停止同步","Start sync successfully":"成功開始同步",Stop:"停止",Start:"開始","Show thino near mouse":"在滑鼠附近顯示 thino","Query not found":"未找到查詢","Send to clipboard successfully":"成功發送到剪貼簿","Thino - Failed to start HTTP server, please check the port is available.":"Thino - 啟動 HTTP 伺服器失敗,請檢查埠是否可用。","Thino - Started HTTP server on port":"Thino - 在埠口啟動 HTTP 伺服器","Thino - Terminated HTTP server":"Thino - 終止 HTTP 伺服器","File not exist":"檔案不存在","Thino not found":"未找到 Thino","File not found for the given thino path, is creating a new file":"未找到給定 thino 路徑的檔案,正在創建新檔案","Saved sync token successfully":"成功儲存同步令牌","Failed to find daily notes folder":"找不到每日筆記資料夾","Please install obsidian-hover-editor plugin first":"請先安裝 obsidian-hover-editor 外掛","Copied app id successfully":"成功複製應用程式 id","Please input token first":"請先輸入令牌","Please enable sync first":"請先啟用同步","Init Failed":"初始化失敗","Verify successfully":"驗證成功","Failed to verify":"驗證失敗","Folder not found for the given thino path, is creating a new folder":"未找到給定 thino 路徑的資料夾,正在創建新資料夾","File not found for the given thino path":"未找到給定 thino 路徑的檔案","Failed to read current daily note, check if it exists.":"讀取當前每日筆記失敗,請檢查是否存在。","Failed to save":"儲存失敗","Failed to login, please login again":"登入失敗,請重新登入","COPY FAILED":"複製失敗","COPY SUCCEED":"複製成功","Copy selected text":"複製選定文字","Copy thino":"複製 thino",COPY:"複製","This is a pro feature, please upgrade to pro version to use it.":"這是專業版功能,請升級到專業版以使用。","You can get pro version from: ":"您可以從以下位置獲取專業版:",Save:"儲存",Cancel:"取消","Thino Daily Target":"Thino 每日目標",Input:"輸入","#Tag":"#標籤","to create tag":"創建標籤","You have verified your account. Congrats!":"您已驗證您的帳號。恭喜!","Pro features":"專業版功能","Target Thino Count":"目標 Thino 數量",on:"開啟","Switch waterfall view":"切換瀑布流視圖","Switch view":"切換視圖","Switch list view":"切換列表視圖","Set daily target":"設定每日目標","Thino Save To: ":"Thino 儲存至:","Enter fullscreen mode":"進入全螢幕模式","Exit fullscreen mode":"退出全螢幕模式",words:"字",word:"字","Return To Home Page":"返回首頁","No thinos to review!":"沒有要回顧的 thino!","Thinos to review":"要回顧的 thino","Start Review":"開始回顧",Hard:"困難",Good:"良好",Easy:"簡單",Again:"再次","Clear all review data":"清除所有回顧資料","Daily Progress":"每日進度","Show stats":"顯示統計","Hide stats":"隱藏統計",Remaining:"剩餘","Total Reviews":"總回顧次數","Today, you have reviewed all your thinos!":"今天,您已回顧完所有 thino!","Daily review limit reached! Come back tomorrow.":"已達到每日回顧限制!明天再來。","Open thino in center window":"在中央視窗開啟 thino","Open thino in float window":"在浮動視窗開啟 thino","Open thino in right sidebar":"在右側邊欄開啟 thino","Open thino in left sidebar":"在左側邊欄開啟 thino","Show thino editor":"顯示 thino 編輯器","Toggle minimal mode":"切換最小化模式","Focus on thino editor":"聚焦 thino 編輯器","ReSync web thinos to local":"重新同步網路 thino 到本地","Sync local thinos to web":"同步本地 thino 到網路","Show daily thino":"顯示每日 thino","Focus on search bar":"聚焦搜尋欄","Show-thino in popover(Hover editor)":"在彈出視窗中顯示 thino(懸停編輯器)","Center window":"中央視窗","Float window":"浮動視窗","Right sidebar":"右側邊欄","Left sidebar":"左側邊欄","Save thino type when sync local":"同步本地時儲存 thino 類型","Set the default save thino type when sync local, FILE by default.":"設定同步本地時的預設儲存 thino 類型,預設為檔案。","Sync service":"同步服務","Pro verification status":"專業版驗證狀態","Live-preview":"即時預覽",Source:"來源","Global copy":"全域複製","Set the folder name":"設定資料夾名稱","Set the filename":"設定檔案名稱","Set the filename for current location file":"設定目前位置檔案的檔案名稱","Switch calendar type":"切換日曆類型",alphabetical:"按字母順序",alphabeticalReverse:"按字母倒序",byCount:"按數量",byCountReverse:"按數量倒序","Type here":"在此輸入",Today:"今天",Yesterday:"昨天","Last 7 days":"最近 7 天","Last 30 days":"最近 30 天","Last 90 days":"最近 90 天","Last 180 days":"最近 180 天","Last 365 days":"最近 365 天",Found:"找到","Copy filtered thinos":"複製已篩選的 thinos","Bulk delete":"批量刪除","Bulk archive":"批量歸檔","Bulk tag operation":"批量標籤操作","Bulk restore":"批量還原","If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again.":"如果您停用了每日筆記外掛程式,thino 可能無法正確刪除或修補。請啟用外掛程式後重試。",Preview:"預覽","Set and save":"設定並儲存","Show day mark in thino list":"在 thino 列表中顯示日期標記","Show day mark on the top of daily range thino. False by default.":"在每日範圍 thino 頂部顯示日期標記。預設為否。","Click to expand or fold, Cmd+Click to show all thinos of the day":"點擊展開或摺疊,Cmd+點擊顯示當天所有 thinos","You can buy a license from":"您可以從以下位置購買授權:","No thinos in range":"範圍內沒有 thinos",Month:"月",Week:"週",Day:"日",Agenda:"議程",Tomorrow:"明天",Previous:"上一個",Next:"下一個","Search all columns...":"搜尋所有欄位...","Basic Info":"基本資訊","Additional Info":"額外資訊","Created At":"建立時間",Content:"內容","Thino Type":"Thino 類型","Source Type":"來源類型","Row status":"行狀態",Path:"路徑","Pinned Status":"釘選狀態",Table:"表格",Chat:"聊天",Moments:"動態",Waterfall:"瀑布流",Calendar:"日曆","Go to page":"前往頁面",Page:"頁面",Show:"顯示",rows:"行","Temp Filter":"臨時篩選","Open link directly in Thino view":"在 Thino 視圖中直接開啟連結","Day mark range":"日期標記範圍","Set the range of day mark. Day by default.":"設定日期標記範圍。預設為日。","Thino is locked":"Thino 已鎖定","Please unlock Thino by input password":"請輸入密碼解鎖 Thino","Auto Download Image":"自動下載圖片","Auto download image when save to thino. 'false' by default":"儲存到 thino 時自動下載圖片。預設為否。","Thino Http IP Type":"Thino Http IP 類型","Set Thino http server ip to listen. 'localhost' by default":"設定 Thino http 伺服器監聽的 IP。預設為 localhost。","Password to lock Thino":"鎖定 Thino 的密碼",Unlock:"解鎖",Locked:"已鎖定","Password is incorrect":"密碼錯誤",Lock:"鎖定","Need password to unlock Thino":"需要密碼解鎖 Thino","You have not set a password or enable this feature yet":"您尚未設定密碼或啟用此功能",Password:"密碼","Password for Thino":"Thino 的密碼","Please input your password to change password settings":"請輸入密碼以更改密碼設定","Please input your password":"請輸入密碼","Lock thino":"鎖定 thino",date:"日期",time:"時間",event:"事件","Add tag position":"新增標籤位置","Set the position of the tag when adding tag automatically":"設定自動新增標籤時的位置","Add tag automatically":"自動新增標籤","Add tag to the end or beginning of the thino content when creating a thino and filtering tags":"建立 thino 和篩選標籤時,在 thino 內容的結尾或開頭新增標籤","Add tag with new line":"換行新增標籤","Add tag with new line when adding tag automatically":"自動新增標籤時換行","Input to select more tags":"輸入以選擇更多標籤","Tag Bulk Edit":"標籤批量編輯","Tag Bulk Select":"標籤批量選擇","Exist Tags":"現有標籤","Selected Tags":"已選標籤","Click to remove exist tag":"點擊移除現有標籤","Click to remove selected tag":"點擊移除已選標籤","Select tags":"選擇標籤","Input to select exist tag":"輸入以選擇現有標籤",Beginning:"開頭",End:"結尾","Set the heading for saving thino":"設定儲存 thino 的標題","# Heading":"# 標題","Chat view style":"聊天視圖樣式","Set the style of chat view":"設定聊天視圖的樣式","Background image for moments view":"動態視圖的背景圖片","Set the background image for moments view":"設定動態視圖的背景圖片","Icon for moments/chat view/share image":"動態/聊天視圖/分享圖片的圖示","Set the icon for moments/chat view/share image":"設定動態/聊天視圖/分享圖片的圖示","Quote for moments view/share image":"動態視圖/分享圖片的引言","Set the quote for moments view/share image":"設定動態視圖/分享圖片的引言","Theme for Thino":"Thino 主題","Set the theme for Thino":"設定 Thino 主題","Interface Details":"介面詳情","Task amount":"任務數量","Thino status":"Thino 狀態","Used tags":"已使用標籤","Used days":"已使用天數","Most active day":"最活躍日","Most active hour":"最活躍時段","Thino amount":"Thino 數量","No content to generate.":"沒有內容可生成。","Image generated successfully.":"圖片生成成功。","Failed to generate image.":"圖片生成失敗。","Share filtered thinos as image":"將已篩選的 thinos 分享為圖片","Latest version":"最新版本","Previous version":"上一版本","Thino update info":"Thino 更新資訊","Debug info copied to clipboard":"除錯資訊已複製到剪貼簿","Copy debug info":"複製除錯資訊","Failed to load changelog":"載入更新日誌失敗","View online":"線上檢視",ChangeLog:"更新日誌","Please open thino first":"請先開啟 thino","Insert editor":"插入編輯器","Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly.":"請為 Thino 的多檔案設定設定不同的儲存位置。日記資料夾與多檔案儲存位置重疊,或有重複讀取的風險。","Default time prefix for thino in daily notes":"每日筆記中 thino 的預設時間前綴","Set default time prefix for thino in daily notes.":"設定每日筆記中 thino 的預設時間前綴。","Save image successfully":"圖片儲存成功","User quote":"使用者引言","Set user quote for thino":"設定 thino 的使用者引言","User icon":"使用者圖示","Set user icon for thino. You can input http/https link or file path in vault.":"設定 thino 的使用者圖示。您可以輸入 http/https 連結或儲存庫中的檔案路徑。","User info":"使用者資訊","Copy filtered results":"複製篩選結果","Share image":"分享圖片",Default:"預設",Gray:"灰色",Grass:"草綠",Flame:"火焰",Olive:"橄欖",Ice:"冰藍",Magenta:"洋紅","Daily notes":"每日筆記",Editor:"編輯器","Append/prepend text when share to Thino":"分享到 Thino 時附加/前置文字","Append text when share to Thino":"分享到 Thino 時附加文字","Prepend text when share to Thino":"分享到 Thino 時前置文字","Add newline when append/prepend text":"附加/前置文字時換行","Input anything here":"在此輸入任何內容",Prepend:"前置",Append:"附加",Both:"兩者",None:"無","Hide pinned group":"隱藏釘選群組","Hide pinned group in thino list. False by default.":"在 thino 列表中隱藏釘選群組。預設為否。","Set the heading for the task type of thino, by default the recorded thino content will be inserted at the end of the diary; if a title is provided, all recorded thino content will be uniformly categorized under that title.":"設定任務類型 thino 的標題,預設情況下,記錄的 thino 內容將插入日記末尾;如果提供標題,所有記錄的 thino 內容將統一歸類在該標題下。","Different insert target for different type":"不同類型的不同插入目標","Toggle this to set different insert target for different type of thino, like task or list type of thino":"切換此選項以為不同類型的 thino 設定不同的插入目標,如任務或列表類型的 thino","You can set whole diary or only part of it":"您可以設定整個日記或僅部分內容","Set process target":"設定處理目標",Custom:"自訂","Whole diary":"整個日記","Set thino insert place":"設定 thino 插入位置","Set where to insert thino content":"設定插入 thino 內容的位置","End of the diary":"日記末尾","Custom location":"自訂位置","Setting guide":"設定指南","Details settings":"詳細設定","Start Thino":"開始使用 Thino","About Thino Pro":"關於 Thino Pro",Enabled:"已啟用",Enable:"啟用","Daily notes folder":"每日筆記資料夾","Set daily notes folder":"設定每日筆記資料夾","Daily note name format":"每日筆記名稱格式","Set daily note name format":"設定每日筆記名稱格式","Daily note plugin":"每日筆記外掛程式","Enable daily note plugin":"啟用每日筆記外掛程式",Selected:"已選擇",Select:"選擇","A classic theme for Thino with a two-column layout":"具有雙欄佈局的 Thino 經典主題",Classic:"經典","A modern theme for Thino with a three-column layout and some unique features.":"具有三欄佈局和一些獨特功能的 Thino 現代主題。",Modern:"現代","Go and enjoy Thino":"開始使用並享受 Thino","Congrats! All settings done":"恭喜!所有設定已完成","Adjust settings that influence your user experience with Thino.":"調整影響您使用 Thino 體驗的設定。","Set preferences for using Thino":"設定使用 Thino 的偏好","If you are using the Thino basic version, enabling the daily note plugin is required. Configure its settings to work effectively with it.":"如果您使用的是 Thino 基本版,需要啟用每日筆記外掛程式。配置其設定以有效使用。","Go with daily note plugin":"使用每日筆記外掛程式","Choose a theme for Thino.":"為 Thino 選擇主題。","Set theme for Thino":"設定 Thino 主題","Set up your user info for Thino.":"設定您的 Thino 使用者資訊。","Get started with Thino":"開始使用 Thino","Skip and start Thino":"跳過並開始使用 Thino","Next step":"下一步","Back to previous step":"返回上一步","Click to enable =>":"點擊啟用 =>","This is Thino's sidebar. Navigate to different path or select query filter.":"這是 Thino 的側邊欄。導航到不同路徑或選擇查詢篩選器。","Click here and go to settings page.":"點擊此處前往設定頁面。","Click here and go to different path.":"點擊此處前往不同路徑。","Select or create query filter here.":"在此選擇或建立查詢篩選器。","See the status of Thinos here.":"在此查看 Thinos 的狀態。","Search your thino quickly here.":"在此快速搜尋您的 thino。","Edit or create your thino here.":"在此編輯或建立您的 thino。","See your thinos here.":"在此查看您的 thinos。","See your time status of thinos here.":"在此查看您的 thinos 時間狀態。","See your tags here. Tags will be shown when thino contains tags.":"在此查看您的標籤。當 thino 包含標籤時會顯示標籤。",Done:"完成","Thino is ready to use. ":"Thino 已準備就緒。","You can start using Thino now. If you want to know more about Thino Pro, click the button below.":"您現在可以開始使用 Thino。如果您想了解更多關於 Thino Pro 的資訊,請點擊下方按鈕。","Default time prefix":"預設時間前綴","Append Text Action":"附加文字動作","Prepend Text Action":"前置文字動作",Preset:"預設","Select Tags":"選擇標籤","It is not available on small view":"在小視圖中不可用","Append text":"附加文字","Prepend text":"前置文字","Your daily note folder is not set correctly, please check your settings":"您的每日筆記資料夾設定不正確,請檢查您的設定","Default sharing style":"預設分享樣式","Set the default style for sharing thino, 'Modern' by default.":"設定分享 thino 的預設樣式,預設為「現代」。",Clean:"簡潔",Minimal:"極簡",Gradient:"漸層","Thino share":"Thino 分享","Copy to clipboard failed":"複製到剪貼簿失敗","Copy to clipboard successfully":"成功複製到剪貼簿","Your content has been copied to clipboard, and inserted into the editor. Please try it again":"您的內容已複製到剪貼簿,並插入到編輯器中。請重試","Share thino":"分享 thino","Set file name after create thino":"建立 thino 後設定檔案名稱","You can set file name after create thino. A input box will show when you create thino.":"您可以在建立 thino 後設定檔案名稱。建立 thino 時會顯示輸入框。",SPLIT:"分割","Split by Heading 1":"按一級標題分割","Split by Heading 2":"按二級標題分割","Split by Heading 3":"按三級標題分割","Insert task":"插入任務","All settings have been reset to default.":"所有設定已重設為預設值。","Reset all Thino settings":"重設所有 Thino 設定","Reset settings":"重設設定","Reset Thino settings to default settings.":"將 Thino 設定重設為預設設定。","Task Management":"任務管理","Append completed date when task done in thino":"在 thino 中完成任務時附加完成日期","Append completed date when task done in thino. False by default":"在 thino 中完成任務時附加完成日期。預設為否","Set tag for single file that Thino indexes":"設定 Thino 索引的單一檔案的標籤","When you set a tag here, Thino will index this file contains this tag and show it in the list. Don't need to add `#`.":"當您在此設定標籤時,Thino 將索引包含此標籤的檔案並在列表中顯示。不需要加上 `#`。","Set tag for file type file":"設定檔案類型檔案的標籤","Set tag for multi type file":"設定多類型檔案的標籤","Please input the tag":"請輸入標籤","Merge thinos in to thino share image":"將 thinos 合併到 thino 分享圖片中","Custom height for Thino content":"自訂 Thino 內容高度","Set custom height for Thino content. Like 200px or 20rem":"設定 Thino 內容的自訂高度。如 200px 或 20rem","Input height":"輸入高度","Submit issue":"提交問題","Current version":"目前版本","Bug report":"錯誤回報","Click the button to copy debug info and open the issue page":"點擊按鈕複製除錯資訊並開啟問題頁面","Copy and go":"複製並前往","Debug info copied":"除錯資訊已複製","Feature request":"功能請求","Submit your feature request to the issue page":"將您的功能請求提交到問題頁面",Go:"前往","Toggle query list visibility":"切換查詢列表可見性","Toggle tags visibility":"切換標籤可見性","Toggle sidebar visibility":"切換側邊欄可見性",Collapse:"摺疊",Expand:"展開","Max height for collapse":"摺疊的最大高度","The max height for thino collapse, when set 0, thino would not collapse. 0 by default. (This is not lines count, it is height in px.)":"thino 摺疊的最大高度,設為 0 時 thino 不會摺疊。預設為 0。(這不是行數,而是以像素為單位的高度。)","Render content":"渲染內容","Optimize for Callout":"優化 Callout","Won't render content contains more than 3 callouts automatically. True by default":"不會自動渲染包含超過 3 個 callouts 的內容。預設為是","The value should be greater than":"值應大於","Append Text":"附加文字","Prepend Text":"前置文字","Thino height when collapsed":"Thino 摺疊時的高度","The height for thino when it is collapsed, when set 0, thino would not collapse. 100 by default. (This is not lines count, it is height in px.)":"thino 摺疊時的高度,設為 0 時 thino 不會摺疊。預設為 100。(這不是行數,而是以像素為單位的高度。)","This option will allow you use other views when leaf width is not enough. False by default.":"此選項將允許您在葉寬度不足時使用其他視圖。預設為否。","Can select other views when leaf width is not enough":"當葉寬度不足時可以選擇其他視圖","TRASH BOX":"垃圾箱","Wait templater to finish parse before insert thino":"在插入 thino 前等待模板解析完成","This option will allow you to wait for templater to finish parse before insert thino, which may casue you need to confirm twice between insert thino. False by default.":"此選項將允許您在插入 thino 前等待模板解析完成,這可能導致您需要在插入 thino 時確認兩次。預設為否。","Get thino capture extension":"獲取 thino 擷取擴充功能","You can capture idea/text from chrome now.":"您現在可以從 Chrome 擷取想法/文字。","Open File":"開啟檔案","Exported CSV file":"匯出的 CSV 檔案","Updated At":"更新時間","Export to CSV":"匯出為 CSV","Quick add button on mobile navbar":"行動導航欄上的快速新增按鈕","Always show status text":"始終顯示狀態文字","Support filter by metadata from file":"支援從檔案中的元資料進行篩選","When enable this, you can filter via metadata from file, like tags in file. But thinos from canvas is not supported. False by default.":"啟用此選項後,您可以通過檔案中的元資料進行篩選,如檔案中的標籤。但不支援來自畫布的 thinos。預設為否。","Show source near timestamp in thino":"在 thino 中的時間戳記附近顯示來源","When enable this, you can see the source near timestamp in thino. You can set title in metadata to overwrite this. False by default.":"啟用此選項後,您可以在 thino 中的時間戳記附近看到來源。您可以在元資料中設定標題來覆寫此設定。預設為否。","Show Update Message":"顯示更新訊息","Show update message when Thino is updated. True by default":"Thino 更新時顯示更新訊息。預設為是","Sync manually":"手動同步","Show all scrollbars":"顯示所有捲軸","TIME RANGE":"時間範圍",WITHIN:"在","7 days":"7 天","14 days":"14 天","30 days":"30 天","3 months":"3 個月","6 months":"6 個月","1 year":"1 年","This week":"本週","Last week":"上週","This month":"本月","Last month":"上月","This year":"今年","Last year":"去年","No history":"無歷史記錄","Today Remaining":"今日剩餘","Today Total":"今日總計","Historical Statistics":"歷史統計",byTime:"按時間",byTimeReverse:"按時間倒序",Stat:"統計",Statistics:"統計資料","Daily Thino Count":"每日 Thino 數量",Total:"總計",thinos:"thinos","Thino Types":"Thino 類型","Distribution of thino types":"Thino 類型分佈","Thino Status":"Thino 狀態","Distribution of thino status":"Thino 狀態分佈","Popular Tags":"熱門標籤","Top 10 most used tags":"前 10 個最常用標籤","Thino Count":"Thino 數量","Hourly distribution":"每小時分佈","Current month":"本月","Monthly distribution":"每月分佈","30 Days":"最近 30 天",Year:"年","Time Distribution":"時間分佈","When do you write thinos":"您何時寫 thinos","Content Length":"內容長度","Distribution of thino lengths":"Thino 長度分佈","Daily Thinos":"每日 Thinos","Show Time Distribution":"顯示時間分佈","Hide date picker":"隱藏日期選擇器","Show date picker":"顯示日期選擇器","Clear filter":"清除篩選","Copy link":"複製連結","Copy embed link":"複製嵌入連結","Ctrl/Cmd + Enter to save thino":"Ctrl/Cmd + Enter 儲存 thino","Fixed strings for thinos":"Thinos 的固定字串","Use fixed strings for thinos":"使用 thinos 的固定字串","Enable to add fixed strings at the beginning or end of thinos.":"啟用在 thinos 的開頭或結尾新增固定字串。","Fixed prefix for thinos":"Thinos 的固定前綴","Add this string at the beginning of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"在每個 thino 的開頭添加此字串。支援像 {{TIME|YYYYMMDDHHmmss}} 這樣的佔位符。","Fixed suffix for thinos":"Thinos 的固定後綴","Add this string at the end of each thino. Supports placeholders like {{TIME|YYYYMMDDHHmmss}}.":"在每個 thino 的結尾添加此字串。支援像 {{TIME|YYYYMMDDHHmmss}} 這樣的佔位符。","Word count exceeded":"字數超出限制","Word count feature":"字數統計功能","Enable real-time word count display in the editor":"在編輯器中啟用即時字數顯示","Maximum word count":"最大字數","Set a maximum word count for thino. Editor will display a warning when exceeded. Set to 0 for unlimited.":"為 thino 設定最大字數。超出時編輯器將顯示警告。設為 0 則無限制。","No linked thinos found":"未找到相關連結的 thinos","Reference links group":"參考連結群組","Enable reference links group in thino.":"在 thino 中啟用參考連結群組。","No reference links found":"未找到參考連結","Outgoing Links":"外部連結","Incoming Links":"內部連結","Error fetching reference links":"獲取參考連結時出錯","Double click behavior":"雙擊行為","Set the behavior when double click on a thino.":"設定在 thino 上雙擊時的行為。","Open thino":"開啟 thino","Edit thino":"編輯 thino","Go to source":"前往來源","Do nothing":"不做任何操作","Use default header in mobile view":"在行動裝置視圖中使用預設標頭","Use default header in mobile view of thino rather than custom header.":"在 thino 的行動裝置視圖中使用預設標頭而非自定義標頭。","Ignore folders for multi type":"忽略多文件類型文件夾","Set folders to ignore when using multi type. Separate multiple folders with comma (,).":"設置多文件類型時忽略的文件夾。用逗號 (,) 分隔多個文件夾。","folder1,folder2/subfolder":"folder1,folder2/subfolder","Using block link when dragging a thino":"拖動 thino 以插入連結","Using block link when dragging a thino for daily":"拖動 thino 以插入連結到日記","Matched via tag in content":"通過內容中的標籤匹配","Matched via tag in file":"通過文件中的標籤匹配","Focus on editor when open":"打開時聚焦編輯器","Focus on editor when open. True by default.":"打開時聚焦編輯器。默認為開啟","Show scroll to top button":"顯示滾動到頂部按鈕","Show scroll to top button. True by default":"顯示滾動到頂部按鈕。默認為開啟","Zoom image by default":"預設縮放圖片","Zoom image by default when viewing image.":"查看圖片時預設縮放圖片。","View archive in random review":"在隨機回顧中查看歸檔的 Thino","View archived thinos in random review. True by default":"在隨機回顧中查看歸檔的 Thino。默認為開啟","Linked by":"鏈接自",Linked:"鏈接",DUPLICATE:"複製","Show scrollbars in all thino views.":"在所有 Thino 視圖中顯示滾動條。","Drag to paste content":"拖動粘貼內容","You will be able to paste content from other apps to thino by dragging rather than pasting the block link.":"您將能夠通過拖動而不是粘貼塊鏈接來將內容從其他應用程序粘貼到 Thino 中。","Dragging behavior":"拖動行為","Control the behavior when dragging a thino. You will paste the block link by default. Block-link option only works with source type is Daily Note.":"控制拖動 Thino 的行為。默認粘貼塊鏈接。塊鏈接選項僅在源類型為日記時有效。","Block link":"塊鏈接",Text:"文本"},pq={ar:G$,cs:Z$,da:$$,de:q$,en:P8,"en-gb":K$,es:X$,fr:J$,hi:Q$,id:eq,it:tq,ja:nq,ko:rq,nl:oq,nn:iq,pl:aq,pt:sq,"pt-br":lq,ro:cq,ru:uq,tr:dq,"zh-cn":fq,"zh-tw":hq},RP=pq[N.moment.locale()];function E(e){const t=RP&&RP[e]||P8[e];return t===null?t:t||e}const mq=/```([\s\S]*?)```/g,gq=/\*\*(.+?)\*\*/g,vq=/\*(.+?)\*/g,yq=/\[ \] /g,bq=/\[.{1}\] /g,wq=/^[*-]/g,Sq=/(\d+)\. /g,FP=/\[\[([^\]]+)\]\]/g,Zk=/\[([^\]]+)\]\((([^\]]+).md)\)/g,Tq=(e,t)=>{const n=e.replace(mq,"$1 ").replace(wq,"• ").replace(Sq,"$1. ").replace(yq,"⬜ ").replace(bq,"✅ ").replace(gq,"$1 ").replace(vq,"$1 ").replace(/<br>/g,"
").replace(/&/g,"&");let r=n;if(t){if(FP.test(n)){const o=n.match(FP);for(let i=0;i{const{metadataCache:n}=ke.getState().dailyNotesState.app;return n.getFirstLinkpathDest(decodeURIComponent(e),"")instanceof N.TFile?t?`${t} `:`${e} `:t?`${t} `:`${e} `},xq=e=>/\[\[([^\]]+)\]\]/g.exec(e)?.[1],Iq=e=>Zk.exec(e)?.[1],kq=e=>/\[([^\]]+)\]\((([^\]]+).md)\)/g.exec(e)?.[3],d0=e=>{const t=document.createElement("div");return t.className="memo-content-text",t.innerHTML=e,t.innerText},Eq=e=>e.replace(/\n/g," "),Cq=e=>{const t=document.createElement("div");return t.textContent=e,t.innerHTML},HP="mobile-show-sidebar",j8=200,Uo=3600*24*1e3,Kg=/\s#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/g,cS=/(| )#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/g,UM=/^#([^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+)/gu,zM=/(\s|:|\(|>|^)((http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-]))/g,Mq=/\[([\s\S]*?)\]\(([\s\S]*?)\)/gu,VM=/([^\s<\\*>'(]+\.(jpeg|jpg|gif|png|svg))(\]\])?(\))?/g,fh=/\[@(.+?)\]\((.+?)\)/g,Dq=/[#*"\/\\<>:|\[\]\?]/gim,Aq=/^(-|\*|\d\.)\s(\[.\]\s)?(\d{1,2}:\d{2}(:\d{2})?)(-\d{1,2}:\d{2}(:\d{2})?)?\s(.*)/g,Pm=[{title:"DAILY",icon:"list"},{title:"CANVAS",icon:"layout-dashboard"},{title:"MULTI",icon:"file-text"},{title:"FILE",icon:"edit"}];var $k;(e=>{function t(){return parseInt(N.moment().format("x"))}e.getNowTimeStamp=t;function n(R){const L=/'’A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,B=/\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5/.source,_=/[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5]{1}/.source,H=new RegExp([`(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-${L}])+`,B,_].join("|"),"g");return(R.match(H)||[]).length}e.getWordCount=n;function r(R){Om()&&R?.EnabledLocationList.some(L=>L.value==="DAILY")&&R?.EnabledLocationList.some(L=>L.value==="MULTI")&&uS().contains(R?.MemoOtherSaveLocation.MemoDefaultMultiFilePath)&&new N.Notice(E("Please set different save locations for multi-file settings in Thino. The diary folder overlaps with the multi-file save location, or there is a risk of it being read repeatedly."),5e3)}e.checkDailyInMulti=r;function o(){const R=navigator.userAgent;let L="Unknown";return R.indexOf("Win")!=-1?L="Windows":R.indexOf("Mac")!=-1?L="MacOS":R.indexOf("Linux")!=-1&&(L="Linux"),L}e.getOSVersion=o;function i(R){return typeof R=="string"&&(R=R.replaceAll("-","/")),new Date(R).getTime()}e.getTimeStampByDate=i;function a(R){const L=new Date(i(R));return new Date(L.getFullYear(),L.getMonth(),L.getDate()).getTime()}e.getDateStampByDate=a;function s(R){const L=new Date(i(R)),B=L.getFullYear(),_=L.getMonth()+1,H=L.getDate();return`${B}/${_}/${H}`}e.getDateString=s;function l(R){const L=new Date(i(R)),B=L.getHours(),_=L.getMinutes(),H=B<10?"0"+B:B,U=_<10?"0"+_:_;return`${H}:${U}`}e.getTimeString=l;function u(R){const L=new Date(i(R)),B=L.getFullYear(),_=L.getMonth()+1,H=L.getDate(),U=L.getHours(),G=L.getMinutes(),K=L.getSeconds(),z=_<10?"0"+_:_,ne=H<10?"0"+H:H,J=U<10?"0"+U:U,ee=G<10?"0"+G:G,Z=K<10?"0"+K:K;return`${B}/${z}/${ne} ${J}:${ee}:${Z}`}e.getDateTimeString=u;function d(R){return Array.from(new Set(R))}e.dedupe=d;function h(R){const L=new Set,B=[];for(const _ of R)L.has(_.id)||(L.add(_.id),B.push(_));return B}e.dedupeObjectWithId=h;function p(R,L){let B=null;return()=>{B&&clearTimeout(B),B=setTimeout(R,L)}}e.debounce=p;function m(R,L,B=!1,_){let H=null,U=!1;function G(...K){if(H&&clearTimeout(H),B&&!U){const z=R.apply(this,K);_&&typeof _=="function"&&_(z),U=!0}else H=setTimeout(()=>{const z=R.apply(this,K);_&&typeof _=="function"&&_(z),U=!1,H=null},L)}return G.cancel=function(){H&&clearTimeout(H),H=null,U=!1},G}e.debouncePlus=m;function b(R,L){let B=!0;return()=>{if(!B)return!1;B=!1,setTimeout(()=>{R(),B=!0},L)}}e.throttle=b;function v(R){const L=[],B=Object.keys(R).sort();for(const _ of B){const H=R[_];H&&(typeof H=="object"?L.push(...v(H).split("&")):L.push(`${_}=${H}`))}return L.join("&")}e.transformObjectToParamsString=v;function y(R){const L={},B=R.split("&");for(const _ of B){const[H,U]=_.split("=");H&&U&&(L[H]=U)}return L}e.transformParamsStringToObject=y;function S(R){if(!R)return{};const L={},B=Object.keys(R).sort();for(const _ of B){const H=R[_];if(typeof H=="object"){const U=S(JSON.parse(JSON.stringify(H)));U&&Object.keys(U).length>0&&(L[_]=U)}else H&&(L[_]=H)}return L}e.filterObjectNullKeys=S;async function x(R){if(navigator.clipboard&&navigator.clipboard.writeText)try{await navigator.clipboard.writeText(R)}catch(L){console.warn("Copy to clipboard failed.",L)}else console.warn("Copy to clipboard failed, methods not supports.")}e.copyTextToClipboard=x;function C(R){return new Promise(L=>{const B=new Image;B.onload=()=>{const{width:_,height:H}=B;_>0&&H>0?L({width:_,height:H}):L({width:0,height:0})},B.onerror=()=>{L({width:0,height:0})},B.className="thino-hidden",B.src=R,document.body.appendChild(B),B.remove()})}e.getImageSize=C;async function k(R){let L;const _=app.plugins.getPlugin("obsidian-memos").settings.UseDailyOrPeriodic==="Daily";try{return!_&&window.app.plugins?.getPlugin("periodic-notes")?.calendarSetManager?.getActiveConfig("day")?.enabled?(L=await window.app.plugins.getPlugin("periodic-notes").createPeriodicNote("day",R),L):(L=await app.internalPlugins.getPluginById("daily-notes").instance.getDailyNote(R)||await O8(R),L)}catch(H){return console.error(H),new N.Notice(E("Failed to create daily note. Please check if you created a folder for daily notes.")),null}}e.createDailyNoteCheck=k;function M(R){const L=[];let B=0;for(;B").map(r=>`${r!==""?r:" "}
`).join(""),e=Tq(e,t),e=e.replace(Kg,"#$1 ").replace(cS,"#$2 ").replace(zM,"$1$2 ").replace(Mq,"$1 ").replace(fh,"$1 ").replace(/\^\S{6}/g,"");const n=document.createElement("div");n.innerHTML=e;for(let r=0;r{const n=window.atob(e),r=new ArrayBuffer(n.length),o=new Uint8Array(r);for(let i=0;itypeof t[n]=="object"&&t[n]!==null&&typeof e[n]=="object"&&e[n]!==null?L8(e[n],t[n]):Object.prototype.hasOwnProperty.call(e,n)&&e[n]===t[n])}function Pq(e,t){switch(t.type){case"SET_MEMOS":{const n=t.payload.memos.sort((o,i)=>{const a=Le.getTimeStampByDate(o.createdAt),s=Le.getTimeStampByDate(i.createdAt);return a===s?i.id.localeCompare(o.id):Le.getTimeStampByDate(i.createdAt)-Le.getTimeStampByDate(o.createdAt)}),r=Le.dedupeObjectWithId(n);return{...e,memos:[...r]}}case"SET_COMMENT_MEMOS":{const n=Le.dedupeObjectWithId(t.payload.commentMemos.sort((r,o)=>Le.getTimeStampByDate(o.createdAt)-Le.getTimeStampByDate(r.createdAt)));return{...e,commentMemos:[...n]}}case"SET_TAGS":return{...e,tags:t.payload.tags,tagsNum:t.payload.tagsNum};case"INSERT_MEMO":{const n=Le.dedupeObjectWithId([t.payload.memo,...e.memos].sort((r,o)=>Le.getTimeStampByDate(o.createdAt)-Le.getTimeStampByDate(r.createdAt)));return{...e,memos:n}}case"INSERT_COMMENT_MEMO":{const n=Le.dedupeObjectWithId([t.payload.memo,...e.commentMemos].sort((r,o)=>Le.getTimeStampByDate(o.createdAt)-Le.getTimeStampByDate(r.createdAt)));return{...e,commentMemos:[...n]}}case"DELETE_MEMO_BY_ID":return{...e,memos:[...e.memos].filter(n=>n.id!==t.payload.id)};case"DELETE_MEMO_BY_ID_BATCH":{const n=[...e.memos];return t.payload.ids.forEach(r=>{n.splice(n.findIndex(o=>o.id===r),1)}),{...e,memos:[...n]}}case"REPLACE_MEMO_BY_ID":{const n=e.memos.map(r=>r.id===t.payload.id?t.payload.memo:r);return{...e,memos:[...n]}}case"REMOVE_PREPARE_UPDATE_THINO":return{...e,preparingUpdateMemo:[]};case"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO":return{...e,preparingUpdateMemo:e.preparingUpdateMemo.filter(n=>n.id!==t.payload.id)};case"SET_WAITING_FOR_TEMPLATER":return{...e,preparingUpdateMemo:[...e.preparingUpdateMemo,{origin:t.payload.origin,date:t.payload.date,isList:t.payload.isList,id:t.payload.id,type:t.payload.type}]};case"CLEAR_MEMOS":return{...R8};case"EDIT_MEMO":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"EDIT_MEMO_PATH":{const n=e.memos.map(r=>r.path===t.payload.path?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"UPDATE_MEMO_BATCH":{const n=e.memos.filter(o=>o.path!==t.payload.path),r=Le.dedupeObjectWithId([...t.payload.memos,...n].sort((o,i)=>Le.getTimeStampByDate(i.createdAt)-Le.getTimeStampByDate(o.createdAt)));return{...e,memos:[...r]}}case"ARCHIVE_MEMO_BY_ID":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"ARCHIVE_MEMO_BY_ID_BULK":{const n=e.memos.map(r=>t.payload.some(o=>o.id===r.id)?{...r,...t.payload.filter(o=>o.id===r.id)[0]}:r);return{...e,memos:[...n]}}case"UNARCHIVE_MEMO_BY_ID":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,memos:[...n]}}case"PIN_MEMO":{const n=e.memos.map(r=>r.id===t.payload.id?{...r,pinned:t.payload.pinned}:r);return{...e,memos:[...n]}}case"EDIT_COMMENT_MEMO":{const n=e.commentMemos.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,commentMemos:[...n]}}default:return e}}const R8={memos:[],commentMemos:[],tags:[],tagsNum:{},preparingUpdateMemo:[]};function jq(e,t){switch(t.type){case"SIGN_IN":return{user:t.payload.user};case"SIGN_OUT":return{user:null};default:return e}}const Lq={user:null};function Rq(e,t){switch(t.type){case"SET_QUERIES":{const n=Le.dedupeObjectWithId(t.payload.queries.sort((r,o)=>Le.getTimeStampByDate(o.createdAt)-Le.getTimeStampByDate(r.createdAt)).sort((r,o)=>Le.getTimeStampByDate(o.pinnedAt??0)-Le.getTimeStampByDate(r.pinnedAt??0)));return{...e,queries:n}}case"INSERT_QUERY":{const n=Le.dedupeObjectWithId([t.payload.query,...e.queries].sort((r,o)=>Le.getTimeStampByDate(o.createdAt)-Le.getTimeStampByDate(r.createdAt)));return{...e,queries:n}}case"DELETE_QUERY_BY_ID":return{...e,queries:[...e.queries].filter(n=>n.id!==t.payload.id)};case"UPDATE_QUERY":{const n=e.queries.map(r=>r.id===t.payload.id?{...r,...t.payload}:r);return{...e,queries:n}}default:return e}}const Fq={queries:[]};function Hq(e,t){switch(t.type){case"SET_DAILY_NOTES":return{...e,dailyNotes:t.payload.dailyNotes};case"SET_APP":return e.app?{...e}:{...e,app:t.payload.app};case"SET_PLUGIN":return e.plugin?{...e}:{...e,plugin:t.payload.plugin};case"SET_EDITOR":return e.editor?{...e}:{...e,editor:t.payload.editor};case"SET_SETTINGS":return e.settings&&e.settings===t.payload.settings?{...e}:{...e,settings:t.payload.settings};case"SET_VIEW":return e.view&&e.view?.leaf?.id===t.payload.view?.leaf?.id?{...e}:{...e,view:t.payload.view};case"CLEAR_VIEW":return e.view&&e.view.unload(),{...e,view:null};case"CLEAR_FILES":return{...e,dailyNotes:null};case"SET_VERIFY_STATE":return{...e,verifyState:t.payload.verifyState};default:return e}}const _q={dailyNotes:null,app:null,view:null,settings:null,editor:null,plugin:null,verifyState:null},ke=g$({globalState:y$,locationState:y8,memoState:R8,userState:Lq,queryState:Fq,dailyNotesState:_q},m$({globalState:v$,locationState:b$,memoState:Pq,userState:jq,queryState:Rq,dailyNotesState:Hq})),ct=D.createContext(ke.getState());String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return Object.prototype.toString.call(e).toLowerCase()==="[object regexp]"?this.replace(e,t):this.replace(new RegExp(e,"g"),t)});class Bq{initialized=!1;getState(){return ke.getState().dailyNotesState}setApp(t){return ke.dispatch({type:"SET_APP",payload:{app:t}}),t}setPlugin(t){return ke.dispatch({type:"SET_PLUGIN",payload:{plugin:t}}),t}setSettings(t){return ke.dispatch({type:"SET_SETTINGS",payload:{settings:t}}),this.initialized||(this.initialized=!0),t}setView(t){return ke.dispatch({type:"SET_VIEW",payload:{view:t}}),t}setEditor(t){return ke.dispatch({type:"SET_EDITOR",payload:{editor:t}}),t}async updateDailyNotes(t,n){const r=this.getState().dailyNotes,o=nf(t,"day");return n?delete r[`day-${o.format("YYYY-MM-DD")}T00:00:00+08:00}`]:r[`day-${o.format("YYYY-MM-DD")}T00:00:00+08:00}`]=t,ke.dispatch({type:"SET_DAILY_NOTES",payload:{dailyNotes:r}}),r}setVerifyState(t){return ke.dispatch({type:"SET_VERIFY_STATE",payload:{verifyState:t}}),t}async fechLocalDailyNotes(){try{const t=Il();return ke.dispatch({type:"SET_DAILY_NOTES",payload:{dailyNotes:t}}),t}catch(t){console.error(t)}}}const $e=new Bq;var ur;(e=>{function t(i){const a={};for(const s of i)try{const l=localStorage.getItem(s);if(l!==null){const u=JSON.parse(l);a[s]=u}}catch(l){console.error("Get storage failed in ",s,l)}return a}e.get=t;function n(i){for(const a in i)try{const s=JSON.stringify(i[a]);localStorage.setItem(a,s)}catch(s){console.error("Save storage failed in ",a,s)}}e.set=n;function r(i){for(const a of i)try{localStorage.removeItem(a)}catch(s){console.error("Remove storage failed in ",a,s)}}e.remove=r;function o(){const i=document.createElement("iframe");i.style.display="none",document.body.appendChild(i),i.contentWindow?.localStorage.setItem("t",Date.now().toString()),i.remove()}e.emitStorageChangedEvent=o})(ur||(ur={}));class Yq{constructor(){const t=ur.get(["shouldSplitMemoWord","shouldHideImageUrl","shouldUseMarkdownParser","useTinyUndoHistoryCache"]),n={shouldSplitMemoWord:t.shouldSplitMemoWord||!0,shouldHideImageUrl:t.shouldHideImageUrl||!0,shouldUseMarkdownParser:t.shouldUseMarkdownParser||!0,useTinyUndoHistoryCache:t.useTinyUndoHistoryCache||!1};this.setAppSetting(n)}getState=()=>ke.getState().globalState;setEditMemoId=t=>{ke.dispatch({type:"SET_EDIT_MEMO_ID",payload:{editMemoId:t}})};setRefresh=t=>{ke.dispatch({type:"SET_REFRESH",payload:{refresh:t}})};setCommentMemoId=t=>{ke.dispatch({type:"SET_COMMENT_MEMO_ID",payload:{commentMemoId:t}})};setMarkMemoId=t=>{ke.dispatch({type:"SET_MARK_MEMO_ID",payload:{markMemoId:t}})};setLoaded=t=>{ke.dispatch({type:"SET_LOADED",payload:{loaded:t}})};setGlobalEditorShown=t=>{ke.dispatch({type:"SET_GLOBAL_EDITOR_SHOWN",payload:{globalEditorShown:t}})};setIsMobileView=t=>{ke.dispatch({type:"SET_MOBILE_VIEW",payload:{isMobileView:t}})};setChangedByMemos=t=>{ke.dispatch({type:"SET_CHANGED_BY_MEMOS",payload:{changedByMemos:t}})};setShowSiderbarInMobileView=t=>{ke.dispatch({type:"SET_SHOW_SIDEBAR_IN_MOBILE_VIEW",payload:{showSiderbarInMobileView:t}})};setAppSetting=t=>{ke.dispatch({type:"SET_APP_SETTING",payload:t}),ur.set(t)};setMemoListView=t=>{ke.dispatch({type:"SET_MEMO_LIST_VIEW",payload:{memoListView:t}})};setInstance=(t,n)=>{ke.dispatch({type:"SET_INSTANCE",payload:{id:t,instance:n}})};setLocked=t=>{ke.dispatch({type:"SET_LOCKED",payload:{locked:t}})};setExitSteps=t=>{ke.dispatch({type:"SET_EXIT_STEPS",payload:{exited:t}})};setPluginManifest=t=>{ke.dispatch({type:"SET_MEMO_PLUGIN_MANIFEST",payload:{manifest:t}})}}const Ze=new Yq;class Uq{constructor(){this.updateStateWithLocation(),window.onpopstate=()=>{this.updateStateWithLocation()}}updateStateWithLocation=()=>{const{pathname:t,search:n,hash:r}=window.location,o=new URLSearchParams(n),i={pathname:"/",hash:"",query:{tag:"",duration:null,text:"",type:"",filter:"",path:"",metadata:{}}};i.query.tag=o.get("tag")||"",i.query.type=o.get("type")??"",i.query.text=o.get("text")??"",i.query.filter=o.get("filter")??"";const a=parseInt(o.get("from")??"0"),s=parseInt(o.get("to")??"0");s>a&&s!==0&&(i.query.duration={from:a,to:s}),i.hash=r,i.pathname=this.getValidPathname(t),ke.dispatch({type:"SET_LOCATION",payload:i})};getState=()=>ke.getState().locationState;clearQuery=()=>{ke.dispatch({type:"SET_QUERY",payload:{tag:"",duration:null,text:"",type:"",filter:"",path:"",metadata:{}}})};setQuery=t=>{ke.dispatch({type:"SET_QUERY",payload:t})};reloadApp=()=>{ke.dispatch({type:"RELOAD"})};setHash=t=>{ke.dispatch({type:"SET_HASH",payload:{hash:t}})};setPathname=t=>{ke.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})};pushHistory=t=>{ke.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})};replaceHistory=t=>{ke.dispatch({type:"SET_PATHNAME",payload:{pathname:t}})};setMemoTypeQuery=(t="")=>{ke.dispatch({type:"SET_TYPE",payload:{type:t}})};setMemoFilter=t=>{ke.dispatch({type:"SET_QUERY_FILTER",payload:t})};setTextQuery=t=>{ke.dispatch({type:"SET_TEXT",payload:{text:t}})};setTimeQuery=t=>{ke.dispatch({type:"SET_DURATION_QUERY",payload:{duration:t}})};setPathQuery=t=>{ke.dispatch({type:"SET_PATH_QUERY",payload:{path:t}})};setMetadataQuery=(t,n)=>{ke.dispatch({type:"SET_METADATA_QUERY",payload:{name:t,value:n}})};setTagQuery=t=>{ke.dispatch({type:"SET_TAG_QUERY",payload:{tag:t}})};setFromAndToQuery=(t,n)=>{ke.dispatch({type:"SET_DURATION_QUERY",payload:{duration:{from:t,to:n}}})};getValidPathname=t=>["/","/homeboard","/recycle","/setting"].includes(t)?t:"/"}const Ue=new Uq,Cu=e=>`${e.vault.configDir}/query.json`,F8=async(e,t)=>{try{return await e.vault.adapter.read(t),!0}catch(n){return console.error(n),!1}},hh=async e=>(await F8(e,Cu(e))||await H8(e),JSON.parse(await e.vault.adapter.read(Cu(e))).queries||[]),Xg=async(e,t)=>{await e.vault.adapter.write(Cu(e),JSON.stringify({queries:t},null,2))},H8=async e=>{const t=Ze.getState().manifest,n=e.plugins.getPlugin(t.id||"obsidian-memos").settings,r=e.metadataCache.getFirstLinkpathDest(n.QueryFileName,"");if(!r)await e.vault.adapter.write(Cu(e),JSON.stringify({queries:[]},null,2));else{const i=(await e.vault.read(r)).split(`
+`);i.length===0&&await e.vault.adapter.write(Cu(e),JSON.stringify({queries:[]},null,2));const a=[];for(let s=0;s{const{app:e}=ke.getState().dailyNotesState;return await F8(e,Cu(e))||await H8(e),await hh(e)||[]},Vq=(e,t)=>({createdAt:N.moment().format("YYYY/MM/DD HH:mm:ss"),id:e,pinnedAt:"",querystring:t,title:E("Temp Filter"),updatedAt:N.moment().format("YYYY/MM/DD HH:mm:ss"),userId:"Thino"}),Wq=async(e,t)=>{const n=await hh(ke.getState().dailyNotesState.app)||[],r={createdAt:N.moment().format("YYYY/MM/DD HH:mm:ss"),id:N.moment().format("YYYYMMDDHHmmss")+n.length,pinnedAt:"",querystring:t,title:e,updatedAt:N.moment().format("YYYY/MM/DD HH:mm:ss"),userId:"Thino"};return n.push(r),await Xg(ke.getState().dailyNotesState.app,n),r};var Gq=Object.prototype;function Zq(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Gq;return e===n}var fS=Zq;function $q(e,t){return function(n){return e(t(n))}}var _8=$q,qq=_8,Kq=qq(Object.keys,Object),Xq=Kq,Jq=fS,Qq=Xq,eK=Object.prototype,tK=eK.hasOwnProperty;function nK(e){if(!Jq(e))return Qq(e);var t=[];for(var n in Object(e))tK.call(e,n)&&n!="constructor"&&t.push(n);return t}var B8=nK,rK=typeof xr=="object"&&xr&&xr.Object===Object&&xr,Y8=rK,oK=Y8,iK=typeof self=="object"&&self&&self.Object===Object&&self,aK=oK||iK||Function("return this")(),Ta=aK,sK=Ta,lK=sK.Symbol,ph=lK,_P=ph,U8=Object.prototype,cK=U8.hasOwnProperty,uK=U8.toString,Cp=_P?_P.toStringTag:void 0;function dK(e){var t=cK.call(e,Cp),n=e[Cp];try{e[Cp]=void 0;var r=!0}catch{}var o=uK.call(e);return r&&(t?e[Cp]=n:delete e[Cp]),o}var fK=dK,hK=Object.prototype,pK=hK.toString;function mK(e){return pK.call(e)}var gK=mK,BP=ph,vK=fK,yK=gK,bK="[object Null]",wK="[object Undefined]",YP=BP?BP.toStringTag:void 0;function SK(e){return e==null?e===void 0?wK:bK:YP&&YP in Object(e)?vK(e):yK(e)}var kl=SK;function TK(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Vi=TK;const mh=tt(Vi);var xK=kl,IK=Vi,kK="[object AsyncFunction]",EK="[object Function]",CK="[object GeneratorFunction]",MK="[object Proxy]";function DK(e){if(!IK(e))return!1;var t=xK(e);return t==EK||t==CK||t==kK||t==MK}var hS=DK;const Pt=tt(hS);var AK=Ta,NK=AK["__core-js_shared__"],OK=NK,Nx=OK,UP=function(){var e=/[^.]+$/.exec(Nx&&Nx.keys&&Nx.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function PK(e){return!!UP&&UP in e}var jK=PK,LK=Function.prototype,RK=LK.toString;function FK(e){if(e!=null){try{return RK.call(e)}catch{}try{return e+""}catch{}}return""}var z8=FK,HK=hS,_K=jK,BK=Vi,YK=z8,UK=/[\\^$.*+?()[\]{}|]/g,zK=/^\[object .+?Constructor\]$/,VK=Function.prototype,WK=Object.prototype,GK=VK.toString,ZK=WK.hasOwnProperty,$K=RegExp("^"+GK.call(ZK).replace(UK,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qK(e){if(!BK(e)||_K(e))return!1;var t=HK(e)?$K:zK;return t.test(YK(e))}var KK=qK;function XK(e,t){return e?.[t]}var JK=XK,QK=KK,eX=JK;function tX(e,t){var n=eX(e,t);return QK(n)?n:void 0}var Ju=tX,nX=Ju,rX=Ta,oX=nX(rX,"DataView"),iX=oX,aX=Ju,sX=Ta,lX=aX(sX,"Map"),WM=lX,cX=Ju,uX=Ta,dX=cX(uX,"Promise"),fX=dX,hX=Ju,pX=Ta,mX=hX(pX,"Set"),V8=mX,gX=Ju,vX=Ta,yX=gX(vX,"WeakMap"),bX=yX,qk=iX,Kk=WM,Xk=fX,Jk=V8,Qk=bX,W8=kl,gh=z8,zP="[object Map]",wX="[object Object]",VP="[object Promise]",WP="[object Set]",GP="[object WeakMap]",ZP="[object DataView]",SX=gh(qk),TX=gh(Kk),xX=gh(Xk),IX=gh(Jk),kX=gh(Qk),hu=W8;(qk&&hu(new qk(new ArrayBuffer(1)))!=ZP||Kk&&hu(new Kk)!=zP||Xk&&hu(Xk.resolve())!=VP||Jk&&hu(new Jk)!=WP||Qk&&hu(new Qk)!=GP)&&(hu=function(e){var t=W8(e),n=t==wX?e.constructor:void 0,r=n?gh(n):"";if(r)switch(r){case SX:return ZP;case TX:return zP;case xX:return VP;case IX:return WP;case kX:return GP}return t});var Jg=hu;function EX(e){return e!=null&&typeof e=="object"}var xa=EX,CX=kl,MX=xa,DX="[object Arguments]";function AX(e){return MX(e)&&CX(e)==DX}var NX=AX,$P=NX,OX=xa,G8=Object.prototype,PX=G8.hasOwnProperty,jX=G8.propertyIsEnumerable,LX=$P(function(){return arguments}())?$P:function(e){return OX(e)&&PX.call(e,"callee")&&!jX.call(e,"callee")},pS=LX,RX=Array.isArray,Hr=RX,FX=9007199254740991;function HX(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=FX}var GM=HX,_X=hS,BX=GM;function YX(e){return e!=null&&BX(e.length)&&!_X(e)}var Qu=YX,f0={exports:{}};function UX(){return!1}var zX=UX;f0.exports;(function(e,t){var n=Ta,r=zX,o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===o,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;e.exports=u})(f0,f0.exports);var Qg=f0.exports,VX=kl,WX=GM,GX=xa,ZX="[object Arguments]",$X="[object Array]",qX="[object Boolean]",KX="[object Date]",XX="[object Error]",JX="[object Function]",QX="[object Map]",eJ="[object Number]",tJ="[object Object]",nJ="[object RegExp]",rJ="[object Set]",oJ="[object String]",iJ="[object WeakMap]",aJ="[object ArrayBuffer]",sJ="[object DataView]",lJ="[object Float32Array]",cJ="[object Float64Array]",uJ="[object Int8Array]",dJ="[object Int16Array]",fJ="[object Int32Array]",hJ="[object Uint8Array]",pJ="[object Uint8ClampedArray]",mJ="[object Uint16Array]",gJ="[object Uint32Array]",En={};En[lJ]=En[cJ]=En[uJ]=En[dJ]=En[fJ]=En[hJ]=En[pJ]=En[mJ]=En[gJ]=!0;En[ZX]=En[$X]=En[aJ]=En[qX]=En[sJ]=En[KX]=En[XX]=En[JX]=En[QX]=En[eJ]=En[tJ]=En[nJ]=En[rJ]=En[oJ]=En[iJ]=!1;function vJ(e){return GX(e)&&WX(e.length)&&!!En[VX(e)]}var yJ=vJ;function bJ(e){return function(t){return e(t)}}var mS=bJ,h0={exports:{}};h0.exports;(function(e,t){var n=Y8,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(h0,h0.exports);var ZM=h0.exports,wJ=yJ,SJ=mS,qP=ZM,KP=qP&&qP.isTypedArray,TJ=KP?SJ(KP):wJ,gS=TJ,xJ=B8,IJ=Jg,kJ=pS,EJ=Hr,CJ=Qu,MJ=Qg,DJ=fS,AJ=gS,NJ="[object Map]",OJ="[object Set]",PJ=Object.prototype,jJ=PJ.hasOwnProperty;function LJ(e){if(e==null)return!0;if(CJ(e)&&(EJ(e)||typeof e=="string"||typeof e.splice=="function"||MJ(e)||AJ(e)||kJ(e)))return!e.length;var t=IJ(e);if(t==NJ||t==OJ)return!e.size;if(DJ(e))return!xJ(e).length;for(var n in e)if(jJ.call(e,n))return!1;return!0}var RJ=LJ;const FJ=tt(RJ);function Zy(e){const t=e.match(/^#+/);return t?t[0].length:0}function XP(e,t){const n=e.split(`
+`);let r="",o=[],i=!1,a=1;for(let s=0;sZy(t)?o.push(l):(i=!1,o=[])}else i&&o.push(l)}return t?FJ(o)?{content:"",startLine:-1}:{content:o.join(`
+`),startLine:a}:{content:e,startLine:0}}function $M(e){const t={};for(const n of e)n.parent&&n.parent>0&&(t[n.position.start.line]=n.parent);return t}function HJ(e,t,n){const r={},o=(p,m)=>{for(;p[m]!==void 0&&p[m]!==m;)m=p[m];return m},i=$e.getState().app,a=n.split(`
+`),s=t+a.length-1,l=i.metadataCache.getFileCache(e)?.listItems,u={};if(!l)return[];const d=p=>{const m=/^(-|\*|\d\.)\s/,b=/(\[.\]\s)?/,v=/(\d{1,2}:\d{2}(:\d{2})?)(-\d{1,2}:\d{2}(:\d{2})?)?\s?/;return new RegExp(m.source+b.source+v.source).test(p)};return l.forEach(p=>{const m=p.position.start.line,b=p.position.end.line;if(m>=t&&b<=s){const v=m-t,y=b-t,S=a.slice(v,y+1),x=S.join(`
+`);if(p.parent&&p.parent>0&&(r[p.position.start.line]=p.parent),p.parent&&u[p.parent]){if(m-p.parent===1){const k=a[v]?.match(/^(\s*)/);k&&(u[p.parent].indent=k[0])}const C=new RegExp("^"+u[p.parent].indent);u[p.parent].content+=`
+`+x.split(`
+`).map(k=>k?.replace(C,"")).join(`
+`)}else if(p.parent&&u[o(r,p.parent)]){const C=new RegExp("^"+u[o(r,p.parent)].indent);u[o(r,p.parent)].content+=`
+`+x.split(`
+`).map(k=>k?.replace(C,"")).join(`
+`)}else if(d(x)||new RegExp(Aq).test(x)){u[m]||(u[m]={content:"",blockId:"",indent:""});const C=S.length>1&&S[1]?.match(/^(\s*)/);C&&(u[m].indent=C[0]),u[m].content=x.split(`
+`).map(k=>k?.replace(u[m].indent,"")).join(`
+`),u[m].blockId=p.id}}}),Object.keys(u).map(p=>{const m=parseInt(p);return{line:u[m].content,blockId:u[m].blockId||"",index:m}})}async function _J(e,t){let n=t.vault.getAbstractFileByPath(e);return n||(new N.Notice(E("File not found for the given thino path, is creating a new file")),n=await t.vault.create(e,'{"nodes": [], "edges": []}'),Ze.setChangedByMemos(!0)),n}async function BJ(e,t){let n;try{n=await t.vault.read(e)}catch(o){console.error(o),n=await t.vault.cachedRead(e)}const r=t.metadataCache.getFileCache(e)?.frontmatterPosition;return r?n.slice(r.end.offset+1):n}function YJ(e){const t=e.split(/\r?\n/),n=[];let r=!1,o=[],i="";for(let a=0;a [!thino]")?(r&&(n.push({metadata:i,content:o.join(`
+`).trim()}),o=[]),r=!0,i=s.replace("> [!thino]","").trim()):r&&s.startsWith(">")?o.push(s.replace(/^> /,"")):r&&!s.startsWith(">")&&(r=!1,n.push({metadata:i,content:o.join(`
+`).trim()}),o=[],i="")}return r&&n.push({metadata:i,content:o.join(`
+`).trim()}),n}function UJ(e,t){const n=/%%(.*?)%%/,r=e.match(n);if(!r)return e;const o=r[1].trim(),i={};o.split(" ").forEach(s=>{const[l,u]=s.slice(1,-1).split("::");i[l]=u});for(const s of Object.keys(t))if(s!=="id"&&s!=="content"){if(s==="rowStatus"&&t.rowStatus==="ARCHIVED"){i.archived="true";continue}else if(s==="rowStatus"&&t.rowStatus==="NORMAL"){delete i.archived;continue}if(s==="deleted"&&t.deleted){const l=N.moment().format("YYYYMMDDHHmmss");i.deleted=l}else typeof t[s]=="boolean"?t[s]?i[s]="true":delete i[s]:t[s]&&(typeof t[s]=="string"||typeof t[s]=="boolean")&&(i[s]=t[s])}const a=Object.entries(i).map(([s,l])=>`[${s}::${l}]`).join(" ");return e.replace(n,`%% ${a} %%`)}async function aa(e,t){if(!e.sourceType||e.sourceType!=="MULTI")return e;const{vault:n,fileManager:r}=ke.getState().dailyNotesState.app,o=n.getAbstractFileByPath(e.path);if(!o)return e;const i=N.moment();if(await r.processFrontMatter(o,a=>{(t.pinned!==void 0||t.thinoType||t.rowStatus||t.visibility||t.deleted)&&Ze.setChangedByMemos(!0),t.id&&(a.id=t.id),t.thinoType&&(a.thinoType=t.thinoType),t.rowStatus&&(a.rowStatus=t.rowStatus),t.visibility&&(a.visibility=t.visibility),t.webId&&(a.webId=t.webId),t.pinned!==void 0&&(a.pinned=t.pinned),t.deleted!==void 0&&(a.deletedAt=t.deleted?i.format("YYYY/MM/DD HH:mm:ss"):""),a.createdAt||(a.createdAt=i.format("YYYY/MM/DD HH:mm:ss")),a.updatedAt=i.format("YYYY/MM/DD HH:mm:ss")}),t.content){const a=await n.read(o);let s=a;const l=t.content.replace(/\$/g,"$$$$");s=a.replace(e.content,l),await n.modify(o,s)}return Ze.setChangedByMemos(!0),{...e,id:t.id||e.id,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt||i.format("YYYY/MM/DD HH:mm:ss"),updatedAt:N.moment().format("YYYY/MM/DD HH:mm:ss"),content:t.content||e.content,rowStatus:t.rowStatus||e.rowStatus,visibility:t.visibility||e.visibility,pinned:t.pinned!==void 0?t.pinned:e.pinned,webId:t.webId||e.webId,deletedAt:t.deleted?i.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}async function Ka(e,t){if(!e.sourceType||e.sourceType!=="FILE")return e;const{vault:n}=ke.getState().dailyNotesState.app,r=n.getAbstractFileByPath(e.path);if(!r)return e;const o=N.moment();let i="";try{i=await n.read(r)}catch(S){console.error(S),i=await n.cachedRead(r)}const a=i.split(/\r?\n/),s=a.findIndex(S=>S.includes("id::"+e.id)||S.includes("Id::"+e.id)||e.webId&&S.includes(e.webId)),l=a[s];if(!l)return e;const u=UJ(l,t);if(!l)return e;const d=u+`
+`,h=a.findIndex((S,x)=>x>s&&S.trim()==="");let p="";h===-1&&(p=a.slice(s+1).join(`
+`)),h!==-1&&(p=a.slice(s+1,h).join(`
+`));let m=p;t?.content&&(m=t.content.split(/\r?\n/).map(k=>"> "+k).join(`
+`));const v=(d+m).split(/\r?\n/);a.splice(s,h!==-1?h-s:a.length-s,...v);const y=a.join(`
+`);return await n.modify(r,y),Ze.setChangedByMemos(!0),{...e,id:t.id||e.id,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt||o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:N.moment().format("YYYY/MM/DD HH:mm:ss"),content:t.content||e.content,rowStatus:t.rowStatus||e.rowStatus,visibility:t.visibility||e.visibility,pinned:t.pinned!==void 0?t.pinned:e.pinned,webId:t.webId||e.webId,deletedAt:t.deleted?o.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}async function Xa(e,t){if(!e.sourceType||e.sourceType!=="CANVAS")return e;const{vault:n}=ke.getState().dailyNotesState.app,r=n.getAbstractFileByPath(e.path);if(!r)return e;const o=await n.read(r),i=JSON.parse(o),a=i.nodes.find(u=>u.id===e.id);if(!a)return e;t.content&&(a.text=t.content),t.thinoType&&(a.thinoType=t.thinoType),t.rowStatus&&(a.rowStatus=t.rowStatus),t.visibility&&(a.visibility=t.visibility),t.pinned!==void 0&&(a.pinned=t.pinned),t.webId&&(a.webId=t.webId);const s=N.moment();t.deleted!==void 0&&(a.deletedAt=t.deleted?s.format("YYYY/MM/DD HH:mm:ss"):""),a.updatedAt=s.format("YYYY/MM/DD HH:mm:ss");const l=JSON.stringify(i,null,2);return await n.modify(r,l),Ze.setChangedByMemos(!0),{...e,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt,updatedAt:N.moment().format("YYYY/MM/DD HH:mm:ss"),content:t.content??e.content,rowStatus:t.rowStatus??e.rowStatus,visibility:t.visibility??e.visibility,pinned:t.pinned??e.pinned,webId:t.webId??e.webId,deletedAt:t.deleted?s.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}function Z8(e,t){const n=[];for(const r in t)t[r]===e&&n.push(parseInt(r),...Z8(parseInt(r),t));return n}async function si(e,t){$8()||new N.Notice(E("If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again."));const{vault:n,metadataCache:r}=ke.getState().dailyNotesState.app,o=ke.getState().dailyNotesState.app,{settings:i}=ke.getState().dailyNotesState,a=e.id.toString().slice(0,14),s=N.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(N.moment(a,"YYYYMMDDHHmmss"))?N.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"):N.moment(a,"YYYYMMDDHHmmss"),l=N.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(s,"day"),u=e.path,d=n.getAbstractFileByPath(u)||n.getAbstractFileByPath(e.path);if(!d)return new N.Notice(E("Please check your daily note plugin OR periodic notes plugin settings")),e;const p=(await n.read(d)).split(`
+`),b=r.getFileCache(d)?.listItems||[];if(b.length===0)return new N.Notice(E("Thino not found")),e;const v=parseInt(e.id.slice(14));let y=v;const S=$M(b),x=b.find(J=>J.position.start.line===v);if(!x)return new N.Notice(E("Thino not found")),e;const C=Z8(v,S);if(C.length>0){const J=C.map(ee=>{const Z=b.find(q=>q.position.start.line===ee);return Z?Z.position.end.line:-1});y=Math.max(...J,x.position.end.line)}else y=x.position.end.line;const k=p.slice(v,y+1),M=k.join(`
+`);let I=M;const O=o.vault.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,R=O?1:o.vault.getConfig("tabSize"),L=(O?" ":" ").repeat(R),B=M.match(/\s\^([0-9a-zA-Z-]+)($|\s|\n)/),_=t.hasId!==void 0?t.hasId:B?B[1]:e.hasId||null,H=k[0]||"",U=ed(H);let G;U.fullTimeMatch?G=U.fullTimeMatch:G=l?N.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm"):(parseInt(e.id.toString().slice(10,12))+24).toString()+":"+e.id.toString().slice(12,14);let K=G;!U.fullTimeMatch&&i.DefaultTimePrefix!=="HH:mm"&&(K=N.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format(i.DefaultTimePrefix));const z={pinned:M.includes("[pinned::true]"),deleted:M.match(/\[deleted::([^\]]+)\]/)?.[1]||"",archived:M.includes("[archived::true]"),webId:M.match(/\[webId::([^\]]+)\]/)?.[1]||"",visibility:M.match(/\[visibility::"([^"]+)"\]/)?.[1]||""};if(M.match(/^(- \[.\] |- |(\*|\d{1,2}\.) )/)?.[0],t.content){const J=t.thinoType?t.thinoType==="TASK-TODO"?"- [ ] ":t.thinoType==="TASK-DONE"?"- [x] ":t.thinoType.startsWith("TASK")?`- [${t.thinoType.slice(5)}] `:"- ":e.thinoType==="TASK-TODO"?"- [ ] ":e.thinoType==="TASK-DONE"?"- [x] ":e.thinoType.startsWith("TASK")?`- [${e.thinoType.slice(5)}] `:"- ",ee=[];if((t.pinned!==void 0?t.pinned:z.pinned)&&ee.push("[pinned::true]"),t.deleted||t.deleted!==!1&&z.deleted){const re=t.deleted?N.moment().format("YYYYMMDDHHmmss"):z.deleted;ee.push(`[deleted::${re}]`)}(t.rowStatus==="ARCHIVED"||t.rowStatus!=="NORMAL"&&z.archived)&&ee.push("[archived::true]"),(t.webId!==void 0?t.webId:z.webId)&&ee.push(`[webId::${t.webId!==void 0?t.webId:z.webId}]`),(t.visibility||z.visibility)&&ee.push(`[visibility::"${t.visibility||z.visibility}"]`);const Z=_?`^${_}`:"",q=t.content.trim().split(`
+`).length>1;/^((-|\*|\d\.|>)\s|```)/g.test(t.content);const $=t.content.trim().split(`
+`);if(/(^(-|\*|\d\.|>)\s)/g.test($[$.length-1]),q){const re=$.map(ie=>L+ie);let le=!1;for(let ie=re.length-1;ie>=0;ie--)if(!/(^(-|\*|\d\.|>)\s)/g.test(re[ie].trim())){re[ie]=re[ie]+(_?` ${Z}`:""),le=!0;break}!le&&_&&(re[re.length-1]+=` ${Z}`),I=`${J}${K}
+${re.join(`
+`)} ${ee.join(" ")}`.trim()}else I=`${J}${K} ${t.content.trim()} ${ee.join(" ")}`.trim()+(Z?` ${Z}`:"")}else{if(t.thinoType){const J=t.thinoType==="TASK-TODO"?"- [ ] ":t.thinoType==="TASK-DONE"?"- [x] ":t.thinoType.startsWith("TASK")?`- [${t.thinoType.slice(5)}] `:"- ";I=I.replace(/^((- \[.\] )|((-|\*) ))/,J)}if(t.rowStatus&&(t.rowStatus==="ARCHIVED"?I.includes("[archived::")?I=I.replace(/\[archived::(true|false)\]/,"[archived::true]"):I+=(I.endsWith(" ")?"":" ")+"[archived::true]":t.rowStatus==="NORMAL"&&(I=I.replace(/\s?\[archived::(true|false)\]/,""))),t.visibility){const J=`[visibility::"${t.visibility}"]`;I.includes("[visibility::")?I=I.replace(/\[visibility::"(PUBLIC|PROTECTED)"\]/,J):I+=(I.endsWith(" ")?"":" ")+J}if(t.pinned!==void 0&&(t.pinned?I.includes("[pinned::")?I=I.replace(/\[pinned::(true|false)\]/,"[pinned::true]"):I+=(I.endsWith(" ")?"":" ")+"[pinned::true]":I=I.replace(/\s?\[pinned::(true|false)\]/,"")),t.webId!==void 0&&(I.includes("[webId::")?t.webId===""?I=I.replace(/\s?\[webId::([^\]]+)\]/,""):I=I.replace(/\[webId::([^\]]+)\]/,`[webId::${t.webId}]`):t.webId!==""&&(I+=(I.endsWith(" ")?"":" ")+`[webId::${t.webId}]`)),t.deleted!==void 0){const J=N.moment();if(t.deleted){const ee=`[deleted::${J.format("YYYYMMDDHHmmss")}]`;I.includes("[deleted::")?I=I.replace(/\[deleted::([^\]]+)\]/,ee):I+=(I.endsWith(" ")?"":" ")+ee}else I=I.replace(/\s?\[deleted::([^\]]+)\]/,"")}if(t.hasId!==void 0||_){const J=t.hasId!==void 0?t.hasId:_;I=I.replace(/\s\^([0-9a-zA-Z-]+)($|\s|\n)/g,""),J&&(I=I.trimEnd(),I+=` ^${J}`)}}if(I!==M){p.splice(v,y-v+1,I.trim()),await n.modify(d,p.join(`
+`)),Ze.setChangedByMemos(!0);const J=N.moment();return{...e,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt,updatedAt:N.moment().format("YYYY/MM/DD HH:mm:ss"),content:t.content??e.content,rowStatus:t.rowStatus??e.rowStatus,visibility:t.visibility??e.visibility,pinned:t.pinned??e.pinned,webId:t.webId??e.webId,hasId:t.hasId??e.hasId,deletedAt:t.deleted?J.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}return e}async function zJ(e,t,n){const{vault:r,metadataCache:o}=ke.getState().dailyNotesState.app||window.app,i=r.getFileByPath(e);if(!i)return;const a=o.getFileCache(i)?.listItems||[],s=$M(a),l=[],u=r.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,d=u?1:r.getConfig("tabSize"),h=(u?" ":" ").repeat(d);function p(S,x){const C=[];for(const k in x)x[k]===S&&C.push(parseInt(k),...p(parseInt(k),x));return C}const m=N.moment(),b=t.map(S=>{const x=a.find(I=>I.position.start.line===parseInt(S.id.slice(14))),k=p(parseInt(S.id.slice(14)),s).map(I=>{const O=a.find(R=>R.position.start.line===I);return O?O.position.end.line:-1}),M=Math.max(...k,x.position.end.line);return{id:S.id,start:x.position.start.line,end:M}}),y=(await r.read(i)).split(`
+`);return b.forEach(S=>{const C=y.slice(S.start,S.end+1).join(`
+`),k=C.split(`
+`),M=k.length-1,O=k[M].trim();let R=C;const L=/\[(pinned|archived|deleted|webId|visibility)::[^\]]*\]\s*$/.test(O),B=(_,H)=>_.split(`
+`).length>1&&(/```/g.test(O)||!L)?_+`
+`+h+H:_+(_.endsWith(" ")?"":" ")+H;if(n==="delete"){const _="[deleted::"+m.format("YYYYMMDDHHmmss")+"]";R=R.replace(/\[deleted::([^\]]+)\]/,""),R=B(R,_)}if(n==="restoreFromDelete"&&(R=R.replace(/ ?\[deleted::([^\]]+)\]/,"")),n==="archive"){const _="[archived::true]";R.includes("[archived::")?R=R.replace(/\[archived::(true|false)\]/,_):R=B(R,_)}n==="restoreFromArchive"&&(R=R.replace(/ ?\[archived::(true|false)\]/,"")),n==="deleteForever"?y.splice(S.start,S.end-S.start+1):y.splice(S.start,S.end-S.start+1,R),l.push({...t.find(_=>_.id===S.id),deletedAt:n==="delete"?m.format("YYYY/MM/DD HH:mm:ss"):"",rowStatus:n==="archive"?"ARCHIVED":"NORMAL"})}),await r.modify(i,y.join(`
+`)),Ze.setChangedByMemos(!0),l}const VJ=e=>{switch(e?.sourceType){case"CANVAS":return Xa(e,{id:e.id,pinned:!0});case"DAILY":return si(e,{id:e.id,pinned:!0});case"MULTI":return aa(e,{id:e.id,pinned:!0});case"FILE":return Ka(e,{id:e.id,pinned:!0})}},WJ=e=>{switch(e?.sourceType){case"CANVAS":return Xa(e,{id:e.id,pinned:!1});case"DAILY":return si(e,{id:e.id,pinned:!1});case"MULTI":return aa(e,{id:e.id,pinned:!1});case"FILE":return Ka(e,{id:e.id,pinned:!1})}},GJ=e=>{let t;switch(e){case" ":t="TASK-TODO";break;case"x":case"X":t="TASK-DONE";break;default:t="TASK-"+e;break}return t};async function ZJ(e,t){if(!t)return 0;const{vault:n}=ke.getState().dailyNotesState.app,r=e?.DefaultMemoComposition,o=e?.ProcessEntriesBelow&&e?.ProcessContentTarget!=="whole"?e?.ProcessEntriesBelow:"",i=e?.ProcessContentTarget!=="whole"?e?.DifferentInsertTarget?e?.InsertAfterForTask?e?.InsertAfterForTask:"":o:"";let a;try{a=await n.read(t)}catch(b){console.error(b),a=await n.cachedRead(t)}let s;r!=""&&/{TIME}/g.test(r)&&/{CONTENT}/g.test(r)?s="(-|\\*) (\\[(.{1})\\]\\s)?"+r.replace(/{TIME}/g,"((\\)?\\d{1,2}:\\d{2}(\\:\\d{2})?)?").replace(/ {CONTENT}/g,""):s="(-|\\*) (\\[(.{1})\\]\\s)?((\\)?\\d{1,2}\\:\\d{2}(\\:\\d{2})?)?";const l=new RegExp(s,"g"),u=(a.match(l)||[]).length,d=new RegExp(o.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g"),h=new RegExp(i.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"g"),p=(a.match(d)||[]).length,m=(a.match(h)||[]).length;return a=null,p||m?u:0}function JP(e,t,n,r,o){const i=ke.getState().dailyNotesState.app||window.app,a=nf(o,"day")||N.moment(o.stat.ctime),s=HJ(o,n,t),l=i?.metadataCache.getFileCache(o),u={frontmatter:l?.frontmatter||{},tags:l?.frontmatter?.tags||[]};for(const d of s){$J(a,d,e);const{rawText:h,memoType:p}=qJ(d),{content:m,pinned:b,archived:v,deleted:y,deletedAtStr:S,webId:x,visibility:C}=KJ(h,d),k=vS(m);r.push({id:a.format("YYYYMMDDHHmmss")+`${d.index}`,content:m.trim(),createdAt:a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:a.format("YYYY/MM/DD HH:mm:ss"),thinoType:p,hasId:d.blockId?d.blockId:"",linkId:k,path:o.path,deletedAt:y?N.moment(S,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",rowStatus:v?"ARCHIVED":"NORMAL",visibility:C,pinned:b,creatorName:"Thino",resourceList:[],sourceType:"DAILY",webId:x,fileInfo:u})}}function $J(e,t,n){const r=ed(t.line);if(r.startHour&&r.startMin)e.hours(parseInt(r.startHour)),e.minutes(parseInt(r.startMin)),r.startSec?e.seconds(parseInt(r.startSec)):e.seconds(0);else{const o=XJ(n.DefaultMemoComposition,t.line),i=JJ(n.DefaultMemoComposition,t.line),a=QJ(t.line);e.hours(parseInt(o)),e.minutes(parseInt(i)),a?e.seconds(parseInt(a)):e.seconds(0)}}function qJ(e){let t=tQ(e.line),n;if(/^\s*[-*]\s(\[(.)\])\s/g.test(e.line)){const r=eQ(e.line);t=nQ(e.line),n=GJ(r)}else n="JOURNAL";return{rawText:t,memoType:n}}function KJ(e,t){if(!e)return{content:"",pinned:!1,archived:!1,deleted:!1,deletedAtStr:"",webId:"",visibility:"PRIVATE"};let n=e.trim().replaceAll(/ /g,`
+`);const r=new RegExp(/\[(pinned|PINNED)::true\]/,"g").test(e),o=new RegExp(/\[(archived|ARCHIVED)::true\]/,"g").test(e),i=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").test(e),a=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").exec(e)?.[2],s=new RegExp(/\[(webId|WEBID)::([^\]]*)\]/,"g").exec(e)?.[2],l=new RegExp(/\[(visibility|VISIBILITY)::("PROTECT"|"PUBLIC")\]/,"g").test(e)?"PUBLIC":"PRIVATE";return n=n.replace(/\s?\[pinned::[^\]]+\]/g,"").replace(/\s?\[visibility::[^\]]+\]/g,"").replace(/\s?\[archived::[^\]]+\]/g,"").replace(/\s?\[deleted::[^\]]+\]/g,"").replace(/\s?\[webId::[^\]]+\]/g,""),t.blockId&&(n=n.replace("^"+t.blockId,"")),{content:n,pinned:r,archived:o,deleted:i,deletedAtStr:a,webId:s,visibility:l}}function vS(e){const t=[],n=/(?:\[\[([^\]|]+)#\^([a-zA-Z0-9-]+)(?:\|[^\]]+)?\]\])|(?:\[.+?\]\(([^)]+)#\^([a-zA-Z0-9-]+)\))/g;let r;for(;(r=n.exec(e))!==null;)r[1]&&r[2]?t.push(`${r[1]}#^${r[2]}`):r[3]&&r[4]&&t.push(`${r[3]}#^${r[4]}`);return t}function ed(e){const t=/((\d{1,2}):(\d{2})(:(\d{2}))?)-(\d{1,2}):(\d{2})(:(\d{2}))?/,n=/(\d{1,2}):(\d{2})(:(\d{2}))?/,r=e.match(t);if(r)return{startHour:r[2],startMin:r[3],startSec:r[5],endHour:r[6],endMin:r[7],endSec:r[9],fullTimeMatch:r[0]};const o=e.match(n);return o?{startHour:o[1],startMin:o[2],startSec:o[4],fullTimeMatch:o[0]}:{startHour:"",startMin:"",fullTimeMatch:""}}const XJ=(e,t)=>{const n=ed(t);if(n.startHour)return n.startHour;let r;return e!=""&&/{TIME}/g.test(e)&&/{CONTENT}/g.test(e)?r="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?"+e.replace(/{TIME}/g,"(\\)?(\\d{1,2})\\:(\\d{2})(\\:\\d{2})?").replace(/{CONTENT}/g,"(.*)"):r="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\)?(\\d{1,2})\\:(\\d{2})(.*)",new RegExp(r,"").exec(t)?.[6]},JJ=(e,t)=>{const n=ed(t);if(n.startMin)return n.startMin;let r;return e!=""&&/{TIME}/g.test(e)&&/{CONTENT}/g.test(e)?r="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?"+e.replace(/{TIME}/g,"(\\)?(\\d{1,2})\\:(\\d{2})(\\:\\d{2})?").replace(/{CONTENT}/g,"(.*)"):r="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\)?(\\d{1,2})\\:(\\d{2})(.*)",new RegExp(r,"").exec(t)?.[7]},QJ=e=>{const t=ed(e);if(t.startSec)return t.startSec;const n="^\\s*(\\-|\\*|(\\d{1,}\\.))\\s(\\[(.{1})\\]\\s?)?(\\d{1,2})\\:(\\d{2})\\:(\\d{2})(.*)";return new RegExp(n,"").exec(e)?.[7]},eQ=e=>/^\s*[\-\*]\s(\[(.{1})\])\s(.*)/.exec(e)?.[2],$8=()=>Om()?!0:(new N.Notice(E("Check if you opened Daily Notes Plugin Or Periodic Notes Plugin")),!1);function tQ(e){const t=ed(e);return t.fullTimeMatch?e.replace(new RegExp(`^(-|\\*|\\d\\.) (${t.fullTimeMatch})\\s(.*)`),"$3"):e.replace(/^(-|\*|\d\.) (\d{1,2}:\d{2}(:\d{2})?)\s(.*)/g,"$4")}function nQ(e){return rQ(e)}const rQ=e=>{const t=ed(e);if(t.fullTimeMatch)return new RegExp(`^(-|\\*|\\d\\.)\\s+\\[.\\]\\s(${t.fullTimeMatch})\\s([\\w\\W]*)`).exec(e)?.[3];const n="^(-|\\*|\\d\\.)\\s+\\[.\\]\\s(\\d{1,2}:\\d{2}(:\\d{2})?)\\s([\\w\\W]*)";return new RegExp(n,"").exec(e)?.[4]};async function q8(e,t=!1){const n=ke.getState().dailyNotesState.app,r=n.vault.getFileByPath(e.path);if(r&&e.hasId)return t?"!"+n.fileManager.generateMarkdownLink(r,"","#^"+e.hasId,e.id):e.hasId?n.fileManager.generateMarkdownLink(r,"","#^"+e.hasId,e.id):`[@THINO](${e.id})`;const o=Le.randomId(6);return await si(e,{id:e.id,hasId:o}),r?t?"!"+n.fileManager.generateMarkdownLink(r,"","#^"+o,e.id):n.fileManager.generateMarkdownLink(r,"","#^"+o,e.id):`[@THINO](${e.id})`}async function K8(e,t){if(!e)return t;const n=ke.getState().dailyNotesState.app||window.app,r=ke.getState().dailyNotesState.settings,o=await BJ(e,n),i=r.IgnoreFolderForMultiType;if(new Set(i.filter(h=>h!=="")).has(e.parent?.path))return t;let l=N.moment(e.stat.ctime).format("YYYY/MM/DD HH:mm:ss");const u=n?.metadataCache.getFileCache(e),d={frontmatter:u?.frontmatter||{},tags:u?.frontmatter?.tags||[]};await n.fileManager.processFrontMatter(e,h=>{if(h.id||(h.id=Le.randomId(16)),h.createdAt?l=N.moment(h.createdAt,"YYYY/MM/DD HH:mm:ss").isValid()?h.createdAt:l:h.createdAt=l,!o.trim())return t;const p=!!h.pinned,m=h.rowStatus&&h.rowStatus==="ARCHIVED",b=!!h.deletedAt,v=h.deletedAt?h.deletedAt:"",y=h.visibility?h.visibility:"PRIVATE",S=h.thinoType?h.thinoType:"JOURNAL",x=h.webId?h.webId:"",C=h.id?h.id:"",k=h.hasId?h.hasId:"",M=h.linkId?h.linkId:"",I=e.path,O="Memo",R="MULTI",L=[];return t.push({id:C,content:o,createdAt:l,updatedAt:l,deletedAt:b?N.moment(v,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",pinned:p,rowStatus:m?"ARCHIVED":"NORMAL",visibility:y,thinoType:S,hasId:k,linkId:M,path:I,creatorName:O,sourceType:R,resourceList:L,webId:x,fileInfo:d}),t})}async function eE(e,t){if(!e)return t;const{vault:n,metadataCache:r}=ke.getState().dailyNotesState.app||window.app;let o;try{o=await n.read(e)}catch(y){console.error(y),o=await n.cachedRead(e)}if(!o)return;const i=N.moment(e.stat.ctime).format("YYYY/MM/DD HH:mm:ss"),a=N.moment(e.stat.mtime).format("YYYY/MM/DD HH:mm:ss"),s=e.path,l="Thino",u="FILE",d="",h=[],p=[],m=r.getFileCache(e),b={frontmatter:m?.frontmatter||{},tags:m?.frontmatter?.tags||[]},v=YJ(o);for(const y of v){const S=y.metadata.match(/\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}/g);if(!S)continue;const x=y.metadata.match(/id::([^\]]*)/g)?.[0]?.replace("id::","");if(!x)continue;const C=S?S[0]:i,k=S?S[0]:a,M=y.metadata.match(/webId::([^\]]*)/g)?y.metadata.match(/webId::([^\]]*)/g)?.[0]?.replace("webId::",""):"",I=y.metadata.contains("[pinned::true]"),O=y.metadata.contains("[archived::true]"),R=y.metadata.contains("[deleted::"),L=new RegExp(/\[(deleted|DELETED)::([^\]]*)\]/,"g").exec(y.metadata)?.[2],B=new RegExp(/\[(visibility|VISIBILITY)::("PROTECT"|"PUBLIC")\]/,"g").test(y.metadata)?"PUBLIC":"PRIVATE",_=new RegExp(/\[(thinoType|THINOTYPE)::([^\]]*)\]/,"g").exec(y.metadata)?.[2];t.push({id:x,content:y.content,createdAt:C,updatedAt:k,deletedAt:R?N.moment(L,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",pinned:I,rowStatus:O?"ARCHIVED":"NORMAL",visibility:B,thinoType:_||"JOURNAL",hasId:d,linkId:h,path:s,creatorName:l,sourceType:u,resourceList:p,webId:M,fileInfo:b})}return t}async function X8(e,t){if(!e)return[];const n=ke.getState().dailyNotesState.settings,{vault:r}=ke.getState().dailyNotesState.app||window.app;if(await ZJ(n,e)===0)return;let i;try{i=await r.read(e)}catch(h){console.error(h),i=await r.cachedRead(e)}const{content:a,startLine:s}=XP(i,n?.ProcessContentTarget==="whole"?"":n.ProcessEntriesBelow);let l="",u=0;if(n.DifferentInsertTarget&&n?.ProcessContentTarget!=="whole"&&n.InsertAfterForTask&&!a.includes(n.InsertAfterForTask)){const{content:h,startLine:p}=XP(i,n.InsertAfterForTask);l=h,u=p}const d=[];JP(n,a,s,d,e),n.DifferentInsertTarget&&l&&JP(n,l,u,d,e),d.length!==0&&t.push(...d.sort((h,p)=>h.createdAt>p.createdAt?-1:1))}async function J8(e,t){const n=ke.getState().dailyNotesState.app||window.app;if(!(e instanceof N.TFile))return;let r;try{r=await n.vault.read(e)}catch(a){console.error(a),r=await n.vault.cachedRead(e)}if(!r)return;const i=JSON.parse(r)?.nodes;for(const a of i){if(a.type==="group"||a.createdAt===void 0||a.text.trim()==="")continue;const l=N.moment(a?.createdAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"),u=N.moment(a?.updatedAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"),d=a?.deletedAt?N.moment(a?.deletedAt,"YYYYMMDDHHmmss").format("YYYY/MM/DD HH:mm:SS"):"",h=!!a?.pinned,p=a?.archived?"ARCHIVED":"NORMAL",m=a?.visibility?a?.visibility:"PRIVATE",b=a?.thinoType?a?.thinoType:"JOURNAL",v=a?.text?a?.text:"",y=a?.id?a?.id:"",S=a?.hasId?a?.hasId:"",x=a?.linkId?a?.linkId:"",C=e.path,k="Memo",M="CANVAS",I=[],O=a?.webId?a?.webId:void 0;t.push({id:y,content:v,createdAt:l,updatedAt:u,deletedAt:d,pinned:h,rowStatus:p,visibility:m,thinoType:b,hasId:S,linkId:x,path:C,creatorName:k,sourceType:M,resourceList:I,webId:O,fileInfo:{frontmatter:{},tags:[]}})}}async function QP(e=[]){const t=[],n=[],r=ke.getState().dailyNotesState.app||app,{vault:o}=r,{settings:i}=ke.getState().dailyNotesState,a=r.loadLocalStorage("tokenForSync"),s=async(l,u)=>{for(const d of l)try{await u(d,t,i)}catch(h){console.error(h),new N.Notice(h)}};try{if(e.includes("CANVAS")){const l=oQ(o);await s(l,J8)}}catch(l){console.error(l)}try{if(e.includes("MULTI")){const l=iQ(o,r,i);await s(l,K8)}}catch(l){console.error(l)}try{if(e.includes("DAILY")){const l=await aQ(o);await s(l,X8)}}catch(l){console.error(l)}try{if(e.includes("FILE")||a){const l=sQ(o,r,i);await s(l,eE)}}catch(l){console.error(l)}return{memos:t,commentMemos:n}}function oQ(e){return e.getAllLoadedFiles().filter(t=>t instanceof N.TFile&&t.extension==="canvas"&&t.name.includes(".thino"))}function iQ(e,t,n){const r=e.getMarkdownFiles(),o=r.filter(a=>a.parent?.path.includes(n.MemoOtherSaveLocation.MemoDefaultMultiFilePath.trim())&&!a.path?.endsWith("thino.md")),i=n.TagForMultiTypeFiles?r.filter(a=>!(a.parent?.path.includes(n.MemoOtherSaveLocation.MemoDefaultMultiFilePath.trim())&&!a.path?.endsWith("thino.md"))&&N.getAllTags(t.metadataCache.getFileCache(a))?.contains("#"+n.TagForMultiTypeFiles.replace("#",""))):[];return[...o,...i]}async function aQ(e){const t=uS();t===void 0&&new N.Notice(E("Please check your daily note plugin OR periodic notes plugin settings")+"folder path is empty or undefined"),e.getAbstractFileByPath(N.normalizePath(t))||new N.Notice(E("Failed to find daily notes folder"));const r=Il();return Object.values(r).filter(o=>o instanceof N.TFile&&o.extension==="md")}function sQ(e,t,n){const r=e.getMarkdownFiles(),o=r.filter(a=>a.name.trim().includes("thino")),i=n.TagForFileTypeFiles?r.filter(a=>!a.name.trim().includes("thino")&&N.getAllTags(t.metadataCache.getFileCache(a))?.contains("#"+n.TagForFileTypeFiles.replace("#",""))):[];return[...o,...i]}const lQ=async(e,t,n)=>{const r=await hh(ke.getState().dailyNotesState.app)||[],o=r.find(s=>s.id===e),i={...o,title:t,querystring:n},a=r.findIndex(s=>s.id===e);return r[a]=i,await Xg(ke.getState().dailyNotesState.app,r),[o]},cQ="https://api.thino.pkmer.cn/test",vh=cQ,uQ="unknown",dQ=/!\[(?[^\]]+)\]\((? [^)]+)\)/g;function fQ(e){return e.substring(e.lastIndexOf(".")+1)}function hQ(e){return{id:e.id,createdAt:Date.now().toString(),filename:e.id,type:`${fQ(e.id)}`,size:e.size.toString()}}function pQ(e){const t=e?.matchAll(dQ);return t?Array.from(t).map(n=>hQ({url:n.groups?.link,id:uQ,size:0,mtime:""})).filter(n=>n.type!="html"):[]}function ev(e){return{id:e.id,createdAt:N.moment(e.ctime.toString(),"x").format("YYYY/MM/DD HH:mm:ss"),updatedAt:N.moment(e.mtime.toString(),"x").format("YYYY/MM/DD HH:mm:ss"),deletedAt:e.ttime?.toString()?N.moment(e.ttime.toString(),"x").format("YYYY-MM-DD HH:mm:ss"):"",rowStatus:e.rowStatus,content:e.content,pinned:e.pinned,resourceList:pQ(e.content),creatorName:"thino",sourceType:e?.thinoType||"FILE",visibility:"PUBLIC",localId:e.originalId,deleted:!!e.dtime,thinoType:e?.thinoStatus||"JOURNAL"}}async function mQ(e){const n={url:`${vh}/thino/getThinos${e?`?since=${e}&includeDeleted=true`:""}`,method:"GET",headers:{Authorization:`Bearer ${yh()}`}};return N.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to fetch memos: ${r.status}`);try{return r.json.payload.map(i=>ev(i))}catch(o){console.error(`Error processing memo response: ${o}`)}}).catch(r=>(console.error(r),[]))}function yh(){return(ke.getState().dailyNotesState.app||app)?.loadLocalStorage("tokenForSync")||""}async function qM(e){const t=`${vh}/thino/createThino`,n={content:e.content,thinoType:e?.thinoType||"FILE",thinoStatus:e?.thinoStatus||"JOURNAL",pinned:!1,rowStatus:"NORMAL",encrypted:!1},r={url:t,method:"POST",contentType:"application/json",body:JSON.stringify(n),headers:{Authorization:`Bearer ${yh()}`}};return N.requestUrl(r).then(o=>{o.status>=400&&console.error(`Failed to create memo: ${o.status}`);try{const i=o.json;return ev(i.payload)}catch(i){console.error(`Error processing memo creation response: ${i}`)}}).catch(o=>(console.error(o),null))}function gQ(e){return{id:e.id,ctime:N.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").valueOf(),mtime:N.moment(e.updatedAt,"YYYY/MM/DD HH:mm:ss").valueOf(),ttime:e.deletedAt?N.moment(e.deletedAt,"YYYY/MM/DD HH:mm:ss").valueOf():void 0,rowStatus:e.rowStatus,content:e.content,pinned:e.pinned,encrypted:!1,thinoType:e.sourceType==="DAILY"?"DAILY":"FILE",thinoStatus:e.thinoType,tags:[]}}async function vQ(e){const t=`${vh}/thino/createThinosByData`,n=e.map(o=>gQ(o)),r={url:t,method:"POST",contentType:"application/json",body:JSON.stringify(n),headers:{Authorization:`Bearer ${yh()}`}};return N.requestUrl(r).then(o=>{o.status>=400&&console.error(`Failed to create thinos: ${o.status}`);try{return o.json.payload.map(s=>ev(s))}catch(i){console.error(`Error processing thinos creation response: ${i}`)}}).catch(o=>(console.error(o),[]))}async function Ox(e){const n={url:`${vh}/thino/updateThinoById/${e.id}`,method:"POST",contentType:"application/json",body:JSON.stringify(e),headers:{Authorization:`Bearer ${yh()}`}};return N.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to update memo: ${r.status}`);try{const o=r.json;return ev(o.payload)}catch(o){console.error(`Error processing memo update response: ${o}`)}}).catch(r=>(console.error(r),null))}async function Lm(e){const n={url:`${vh}/thino/recoverThinoFromTrash/${e}`,method:"POST",headers:{Authorization:`Bearer ${yh()}`}};return N.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to recover memo: ${r.status}`);try{const o=r.json;return ev(o.payload)}catch(o){console.error(`Error processing memo recovery response: ${o}`)}}).catch(r=>(console.error(r),null))}async function KM(e){const n={url:`${vh}/thino/deleteThinoById/${e}`,method:"DELETE",headers:{Authorization:`Bearer ${yh()}`}};return N.requestUrl(n).then(r=>{r.status>=400&&console.error(`Failed to delete memo: ${r.status}`)}).catch(r=>(console.error(r),null))}function yQ(e){return e?.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")||e}function p0(e,t){return e&&e.replace(/\{\{TIME\|(.*?)\}\}/g,(n,r)=>{try{return t.format(r)}catch(o){return console.error("Invalid time format:",r,o),n}})}function bQ(e){const t=[];let n=e;for(;n.contains(`
`);){const r=n.indexOf(`
-`);t.push(n.slice(0,r)),n=n.slice(r+1)}return t.push(n),t}async function s_({content:e,isList:t,name:n}){var N;const r=Le.getState().dailyNotesState.settings,a=x.moment(),o=ut.randomId(16),i=(r==null?void 0:r.MemoOtherSaveLocation.MemoDefaultMultiFilePath)||"Thino",l=n||`${a.format("YYYYMMDD")}-${o}`,c=`${i}/${l}.md`,f={id:o,content:e,deletedAt:"",path:c,createdAt:a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:a.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"MULTI",fileInfo:{tags:[],frontmatter:{}}},h=ft.getState().app||window.app,{vault:g,fileManager:y}=h,w=g.getAbstractFileByPath(i);(!w||!(w instanceof x.TFolder))&&(new x.Notice(E("Folder not found for the given thino path, is creating a new folder")),await g.createFolder(i)),dt.setChangedByMemos(!0);let S;const D=h.vault.getFileByPath(c);D?S=await g.create(`${i}/${a.format("YYYYMMDD")}-${o}.md`,e):S=await g.create(c,e),await y.processFrontMatter(S,B=>{B.id=o,B.createdAt=a.format("YYYY/MM/DD HH:mm:ss"),B.updatedAt=a.format("YYYY/MM/DD HH:mm:ss"),B.thinoType=t?"JOURNAL":"TASK-TODO"}),(!n||D)&&(r!=null&&r.SetFileNameAfterCreate)&&h.fileManager.promptForFileRename(S);const I=h.metadataCache.getFileCache(S),M={tags:((N=I==null?void 0:I.frontmatter)==null?void 0:N.tags)||[],frontmatter:(I==null?void 0:I.frontmatter)||{}};return{...f,fileInfo:M}}async function l_({content:e,isList:t}){var B;const n=Le.getState().dailyNotesState.settings,r=x.moment(),a=ut.randomId(16),o=(n==null?void 0:n.MemoOtherSaveLocation.MemoDefaultSingleFilePath)||"basic.thino.md",i={id:a,content:e,deletedAt:"",path:o,createdAt:r.format("YYYY/MM/DD HH:mm:ss"),updatedAt:r.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"FILE",fileInfo:{tags:[],frontmatter:{}}},l=ft.getState().app,{vault:c}=l;let f=c.getAbstractFileByPath(o);(!f||!(f instanceof x.TFile))&&(new x.Notice(E("File not found for the given thino path, is creating a new file")),f=await c.create(o,""));const h=l.metadataCache.getFileCache(f),g={tags:((B=h==null?void 0:h.frontmatter)==null?void 0:B.tags)||[],frontmatter:(h==null?void 0:h.frontmatter)||{}};let y="";try{y=await c.read(f)||await c.cachedRead(f)}catch(k){console.error(k),new x.Notice(E("Failed to read current daily note, check if it exists."))}const w=y.indexOf(`# ${r.format("YYYY-MM-DD")}`);let S=y.indexOf(`
-#`,w+1);S===-1&&(S=y.length);const D=`> [!thino] ${r.format("YYYY/MM/DD HH:mm:ss")} %% [id::${a}] [thinoType::${t?"JOURNAL":"TASK-TODO"}] %%`,I=e.replace(/\n/g,`
-> `),M=`
-${D}
-> ${I}
-`;let N;if(w===-1){const k=`# ${r.format("YYYY-MM-DD")}`;N=`${y.substring(0,S)}
-${k}${M}
-${y.substring(S)}`}else N=`${y.substring(0,S)}${M}${y.substring(S)}`;return setTimeout(async()=>{dt.setChangedByMemos(!0),await c.modify(f,N)},200),{...i,fileInfo:g}}async function LC(e){var N;const t=Le.getState().dailyNotesState.settings,n=x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),r=e.id,a=(t==null?void 0:t.MemoOtherSaveLocation.MemoDefaultSingleFilePath)||"basic.thino.md",o={id:r,content:e.content,deletedAt:e.deletedAt||"",path:a,createdAt:n.format("YYYY/MM/DD HH:mm:ss"),updatedAt:n.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",hasId:"",linkId:"",pinned:e.pinned,visibility:"PUBLIC",rowStatus:e.rowStatus||"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"FILE",webId:e.id,fileInfo:e==null?void 0:e.fileInfo},i=ft.getState().app,{vault:l}=i;let c=l.getAbstractFileByPath(a);(!c||!(c instanceof x.TFile))&&(new x.Notice(E("File not found for the given thino path, is creating a new file")),c=await l.create(a,""));let f="";try{f=await l.read(c)||await l.cachedRead(c)}catch(B){console.error(B),new x.Notice(E("Failed to read current daily note, check if it exists."))}const h=i.metadataCache.getFileCache(c),g={tags:((N=h==null?void 0:h.frontmatter)==null?void 0:N.tags)||[],frontmatter:(h==null?void 0:h.frontmatter)||{}},y=f.indexOf(`# ${n.format("YYYY-MM-DD")}`);let w=f.indexOf(`
-#`,y+1);w===-1&&(w=f.length);const S=`> [!thino] ${n.format("YYYY/MM/DD HH:mm:ss")} %% [id::${r}] [thinoType::JOURNAL]${e.rowStatus==="ARCHIVED"?" [archived::true]":""}${e.pinned===!0?" [pinned::true]":""}${e.deletedAt?` [deleted::${e.deletedAt}]`:""}${e.id?` [webId::${e.id}]`:""} %%`,D=e.content.replace(/\n/g,`
-> `),I=`
-${S}
-> ${D}
-`;let M;if(y===-1){const B=`# ${n.format("YYYY-MM-DD")}`;M=`${f.substring(0,w)}
-${B}${I}
-${f.substring(w)}`}else M=`${f.substring(0,w)}${I}${f.substring(w)}`;return dt.setChangedByMemos(!0),await l.modify(c,M),{...o,fileInfo:g}}async function u_({content:e,isList:t}){const n=Le.getState().dailyNotesState.settings,r=(n==null?void 0:n.MemoOtherSaveLocation.MemoDefaultCanvasPath)||"basic.thino.canvas",a=x.moment(),o=ut.randomId(16),i={id:o,content:e,deletedAt:"",path:r,createdAt:a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:a.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"CANVAS",fileInfo:{tags:[],frontmatter:{}}},l=ft.getState().app,{vault:c}=l,f=await OR(r,l);if(!f||!(f instanceof x.TFile)){new x.Notice(E("File not found for the given thino path, is creating a new file"));return}const h=await c.read(f),g=JSON.parse(h);if(g.nodes.find(I=>I.id===i.id))return;let w;g.nodes.length>0&&(w=[...g.nodes].reduce((I,M)=>{if(!I.createdAt)return M;const N=x.moment(I.createdAt,"YYYY/MM/DD HH:mm:ss"),B=x.moment(M.createdAt,"YYYY/MM/DD HH:mm:ss");return N.isAfter(B)?I:M}));const S=w?{x:w.x,y:w.y+100,width:w.width,height:w.height}:{x:0,y:0,width:200,height:100};g.nodes.push({...S,type:"text",id:o,text:e,deletedAt:"",createdAt:a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:a.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:"",pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[]}),dt.setChangedByMemos(!0);const D=JSON.stringify(g,null,2);return await c.modify(f,D),i}async function DS(e,t,n,r){var $,he;const{vault:a}=Le.getState().dailyNotesState.app||window.app,o=Le.getState().dailyNotesState.app||window.app,i=Le.getState().dailyNotesState.settings,l=o.vault.getConfig("useTab")===void 0||window.app.vault.getConfig("useTab")===!0,c=l?1:o.vault.getConfig("tabSize"),f=(l?" ":" ").repeat(c),h=e.split(`
+`);t.push(n.slice(0,r)),n=n.slice(r+1)}return t.push(n),t}async function wQ({content:e,isList:t,name:n}){const r=ke.getState().dailyNotesState.settings,o=N.moment(),i=Le.randomId(16),a=r?.MemoOtherSaveLocation.MemoDefaultMultiFilePath||"Thino",s=n||`${o.format("YYYYMMDD")}-${i}`,l=`${a}/${s}.md`,u={id:i,content:e,deletedAt:"",path:l,createdAt:o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:o.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:[],pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"MULTI",fileInfo:{tags:[],frontmatter:{}}},d=$e.getState().app||window.app,{vault:h,fileManager:p}=d,m=h.getAbstractFileByPath(a);(!m||!(m instanceof N.TFolder))&&(new N.Notice(E("Folder not found for the given thino path, is creating a new folder")),await h.createFolder(a)),Ze.setChangedByMemos(!0);let b;const v=d.vault.getFileByPath(l);v?b=await h.create(`${a}/${o.format("YYYYMMDD")}-${i}.md`,e):b=await h.create(l,e),await p.processFrontMatter(b,x=>{x.id=i,x.createdAt=o.format("YYYY/MM/DD HH:mm:ss"),x.updatedAt=o.format("YYYY/MM/DD HH:mm:ss"),x.thinoType=t?"JOURNAL":"TASK-TODO"}),(!n||v)&&r?.SetFileNameAfterCreate&&d.fileManager.promptForFileRename(b);const y=d.metadataCache.getFileCache(b),S={tags:y?.frontmatter?.tags||[],frontmatter:y?.frontmatter||{}};return{...u,fileInfo:S}}async function SQ({content:e,isList:t}){const n=ke.getState().dailyNotesState.settings,r=N.moment(),o=Le.randomId(16),i=n?.MemoOtherSaveLocation.MemoDefaultSingleFilePath||"basic.thino.md",a={id:o,content:e,deletedAt:"",path:i,createdAt:r.format("YYYY/MM/DD HH:mm:ss"),updatedAt:r.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:[],pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"FILE",fileInfo:{tags:[],frontmatter:{}}},s=$e.getState().app,{vault:l}=s;let u=l.getAbstractFileByPath(i);(!u||!(u instanceof N.TFile))&&(new N.Notice(E("File not found for the given thino path, is creating a new file")),u=await l.create(i,""));const d=s.metadataCache.getFileCache(u),h={tags:d?.frontmatter?.tags||[],frontmatter:d?.frontmatter||{}};let p="";try{p=await l.read(u)||await l.cachedRead(u)}catch(C){console.error(C),new N.Notice(E("Failed to read current daily note, check if it exists."))}const m=p.indexOf(`# ${r.format("YYYY-MM-DD")}`);let b=p.indexOf(`
+#`,m+1);b===-1&&(b=p.length);const v=`> [!thino] ${r.format("YYYY/MM/DD HH:mm:ss")} %% [id::${o}] [thinoType::${t?"JOURNAL":"TASK-TODO"}] %%`,y=e.replace(/\n/g,`
+> `),S=`
+${v}
+> ${y}
+`;let x;if(m===-1){const C=`# ${r.format("YYYY-MM-DD")}`;x=`${p.substring(0,b)}
+${C}${S}
+${p.substring(b)}`}else x=`${p.substring(0,b)}${S}${p.substring(b)}`;return setTimeout(async()=>{Ze.setChangedByMemos(!0),await l.modify(u,x)},200),{...a,fileInfo:h}}async function e3(e){const t=ke.getState().dailyNotesState.settings,n=N.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),r=e.id,o=t?.MemoOtherSaveLocation.MemoDefaultSingleFilePath||"basic.thino.md",i={id:r,content:e.content,deletedAt:e.deletedAt||"",path:o,createdAt:n.format("YYYY/MM/DD HH:mm:ss"),updatedAt:n.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",hasId:"",linkId:[],pinned:e.pinned,visibility:"PUBLIC",rowStatus:e.rowStatus||"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"FILE",webId:e.id,fileInfo:e?.fileInfo},a=$e.getState().app,{vault:s}=a;let l=s.getAbstractFileByPath(o);(!l||!(l instanceof N.TFile))&&(new N.Notice(E("File not found for the given thino path, is creating a new file")),l=await s.create(o,""));let u="";try{u=await s.read(l)||await s.cachedRead(l)}catch(x){console.error(x),new N.Notice(E("Failed to read current daily note, check if it exists."))}const d=a.metadataCache.getFileCache(l),h={tags:d?.frontmatter?.tags||[],frontmatter:d?.frontmatter||{}},p=u.indexOf(`# ${n.format("YYYY-MM-DD")}`);let m=u.indexOf(`
+#`,p+1);m===-1&&(m=u.length);const b=`> [!thino] ${n.format("YYYY/MM/DD HH:mm:ss")} %% [id::${r}] [thinoType::JOURNAL]${e.rowStatus==="ARCHIVED"?" [archived::true]":""}${e.pinned===!0?" [pinned::true]":""}${e.deletedAt?` [deleted::${e.deletedAt}]`:""}${e.id?` [webId::${e.id}]`:""} %%`,v=e.content.replace(/\n/g,`
+> `),y=`
+${b}
+> ${v}
+`;let S;if(p===-1){const x=`# ${n.format("YYYY-MM-DD")}`;S=`${u.substring(0,m)}
+${x}${y}
+${u.substring(m)}`}else S=`${u.substring(0,m)}${y}${u.substring(m)}`;return Ze.setChangedByMemos(!0),await s.modify(l,S),{...i,fileInfo:h}}async function TQ({content:e,isList:t}){const r=ke.getState().dailyNotesState.settings?.MemoOtherSaveLocation.MemoDefaultCanvasPath||"basic.thino.canvas",o=N.moment(),i=Le.randomId(16),a={id:i,content:e,deletedAt:"",path:r,createdAt:o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:o.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:[],pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"CANVAS",fileInfo:{tags:[],frontmatter:{}}},s=$e.getState().app,{vault:l}=s,u=await _J(r,s);if(!u||!(u instanceof N.TFile)){new N.Notice(E("File not found for the given thino path, is creating a new file"));return}const d=await l.read(u),h=JSON.parse(d);if(h.nodes.find(y=>y.id===a.id))return;let m;h.nodes.length>0&&(m=[...h.nodes].reduce((y,S)=>{if(!y.createdAt)return S;const x=N.moment(y.createdAt,"YYYY/MM/DD HH:mm:ss"),C=N.moment(S.createdAt,"YYYY/MM/DD HH:mm:ss");return x.isAfter(C)?y:S}));const b=m?{x:m.x,y:m.y+100,width:m.width,height:m.height}:{x:0,y:0,width:200,height:100};h.nodes.push({...b,type:"text",id:i,text:e,deletedAt:"",createdAt:o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:o.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",hasId:"",linkId:[],pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[]}),Ze.setChangedByMemos(!0);const v=JSON.stringify(h,null,2);return await l.modify(u,v),a}async function Px(e,t,n,r){const{vault:o}=ke.getState().dailyNotesState.app||window.app,i=ke.getState().dailyNotesState.app||window.app,a=ke.getState().dailyNotesState.settings,s=i.vault.getConfig("useTab")===void 0||window.app.vault.getConfig("useTab")===!0,l=s?1:i.vault.getConfig("tabSize"),u=(s?" ":" ").repeat(l),d=e.split(`
`).join(`
-`+f),g=n||x.moment(),{DifferentInsertTarget:y,InsertAfterForTask:w,InsertType:S}=i,D=g.format(i.DefaultTimePrefix||"HH:mm"),I=S==="end"?"":t?i.InsertAfter:y&&w||i.InsertAfter,M=o==null?void 0:o.loadLocalStorage("tokenForSync");let N="";try{!r&&e&&M&&i.startSync&&(N=(await N2({content:e,thinoType:"DAILY",thinoStatus:t?"JOURNAL":"TASK-TODO"})).id)}catch(se){console.error(se)}const B=t?"- ":"- [ ] ",k=i!=null&&i.DefaultMemoComposition?`${B}${($=i==null?void 0:i.DefaultMemoComposition)==null?void 0:$.replace(/{TIME}/g,D).replace(/{CONTENT}/g,(h.split(`
-`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(h)?`
-`+f:"")+h)}${h.split(`
-`).length>1&&/((-|\*|\d\.|>)\s|```)/g.test(h.split(`
-`)[h.split(`
-`).length-1])&&N?`
-`+f:" "}${N?`[webId::${N}]`:""}`:`${B}${D} ${h.split(`
-`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(h)?`
-`+f:""}${h}${h.split(`
-`).length>1&&/((-|\*|\d\.|>)\s|```)/g.test(h.split(`
-`)[h.split(`
-`).length-1])&&N?`
-`+f:" "}${N?`[webId::${N}]`:""}`,R=Ju(),L=pb(g,R),_="fake"+ut.randomId(16);let V=!1;const U=o.plugins.getPlugin("templater-obsidian");let Z;if(L?Z=L:(U!=null&&U.templater&&(U!=null&&U.settings.trigger_on_file_creation)&&(we.setWaitingForTemplater({origin:e,date:g,isList:t,id:_,type:N?"web":"local"}),V=!0),Z=await ut.createDailyNoteCheck(g)),!Z){new x.Notice(E("Failed to create daily note, check if it exists."));return}if(L||await ft.fechLocalDailyNotes(),U&&(U!=null&&U.templater)&&(U!=null&&U.settings.trigger_on_file_creation)&&V)return dt.setChangedByMemos(!0),{id:_,content:e,deletedAt:"",createdAt:g.format("YYYY/MM/DD HH:mm:ss"),updatedAt:g.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",path:Z.path,hasId:"",linkId:"",webId:N,pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:{tags:[],frontmatter:{}}};let Q="";try{Q=await a.read(Z)||await a.cachedRead(Z)}catch(se){console.error(se),new x.Notice(E("Failed to read current daily note, check if it exists."))}const G=o.metadataCache.getFileCache(Z),re={tags:((he=G==null?void 0:G.frontmatter)==null?void 0:he.tags)||[],frontmatter:(G==null?void 0:G.frontmatter)||{}},de=await wA(I,k,Q);await a.modify(Z,de.content);const fe=de.posNum===-1?bA(de.content).length-(k.split(`
-`).length-1)-1:de.posNum+1;return dt.setChangedByMemos(!0),{id:g.format("YYYYMMDDHHmm")+"00"+fe,content:e,deletedAt:"",createdAt:g.format("YYYY/MM/DD HH:mm:ss"),updatedAt:g.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",path:Z.path,hasId:"",linkId:"",webId:N,pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:re}}async function RC(e){var fe;const{vault:t}=Le.getState().dailyNotesState.app||window.app,n=Le.getState().dailyNotesState.app||window.app,{DefaultMemoComposition:r,InsertAfter:a,DefaultTimePrefix:o,DifferentInsertTarget:i,InsertAfterForTask:l,InsertType:c}=Le.getState().dailyNotesState.settings;let f=(e.pinned?" [pinned::true]":"")+(e.rowStatus==="ARCHIVED"?" [archived::true]":"")+(e.visibility==="PRIVATE"?' [visibility::"PRIVATE"]':"");if(e.id){const $=" [webId::"+e.id+"]";f+=$}const h=x.moment();if(e.deletedAt){const $=" [deleted::"+h.format("YYYYMMDDHHmmss")+"]";f+=$}const g=n.vault.getConfig("useTab")===void 0||n.vault.getConfig("useTab")===!0,y=g?1:n.vault.getConfig("tabSize"),w=(g?" ":" ").repeat(y),S=e.content.split(`
+`+u),h=n||N.moment(),{DifferentInsertTarget:p,InsertAfterForTask:m,InsertType:b}=a,v=h.format(a.DefaultTimePrefix||"HH:mm");let y="",S="";a.UseMemoFixedStrings&&(y=p0(a.MemoFixedPrefix||"",h),S=p0(a.MemoFixedSuffix||"",h));const x=b==="end"?"":t?a.InsertAfter:p&&m||a.InsertAfter,C=i?.loadLocalStorage("tokenForSync");let k="";try{!r&&e&&C&&a.startSync&&(k=(await qM({content:e,thinoType:"DAILY",thinoStatus:t?"JOURNAL":"TASK-TODO"})).id)}catch(Z){console.error(Z)}const M=y?y+(y.endsWith(" ")?"":" ")+d:d,I=S?M+(M.endsWith(" ")?"":" ")+S:M,O=t?"- ":"- [ ] ",R=a?.DefaultMemoComposition?`${O}${a?.DefaultMemoComposition?.replace(/{TIME}/g,v).replace(/{CONTENT}/g,(I.split(`
+`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(I)?`
+`+u:"")+I)}${I.split(`
+`).length>1&&/((-|\*|\d\.|>)\s|```)/g.test(I.split(`
+`)[I.split(`
+`).length-1])&&k?`
+`+u:" "}${k?`[webId::${k}]`:""}`:`${O}${v} ${I.split(`
+`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(I)?`
+`+u:""}${I}${I.split(`
+`).length>1&&/((-|\*|\d\.|>)\s|```)/g.test(I.split(`
+`)[I.split(`
+`).length-1])&&k?`
+`+u:" "}${k?`[webId::${k}]`:""}`,L=Il(),B=lS(h,L),_="fake"+Le.randomId(16);let H=!1;const U=i.plugins.getPlugin("templater-obsidian");let G;if(B?G=B:(U?.templater&&U?.settings.trigger_on_file_creation&&(de.setWaitingForTemplater({origin:e,date:h,isList:t,id:_,type:k?"web":"local"}),H=!0),G=await Le.createDailyNoteCheck(h)),!G){new N.Notice(E("Failed to create daily note, check if it exists."));return}if(B||await $e.fechLocalDailyNotes(),U&&U?.templater&&U?.settings.trigger_on_file_creation&&H)return Ze.setChangedByMemos(!0),{id:_,content:I,deletedAt:"",createdAt:h.format("YYYY/MM/DD HH:mm:ss"),updatedAt:h.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",path:G.path,hasId:"",linkId:[],webId:k,pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:{tags:[],frontmatter:{}}};let K="";try{K=await o.read(G)||await o.cachedRead(G)}catch(Z){console.error(Z),new N.Notice(E("Failed to read current daily note, check if it exists."))}const z=i.metadataCache.getFileCache(G),ne={tags:z?.frontmatter?.tags||[],frontmatter:z?.frontmatter||{}},J=await Q8(x,R,K);await o.modify(G,J.content);const ee=J.posNum===-1?eH(J.content).length-(R.split(`
+`).length-1)-1:J.posNum+1;return Ze.setChangedByMemos(!0),{id:h.format("YYYYMMDDHHmm")+"00"+ee,content:I,deletedAt:"",createdAt:h.format("YYYY/MM/DD HH:mm:ss"),updatedAt:h.format("YYYY/MM/DD HH:mm:ss"),thinoType:t?"JOURNAL":"TASK-TODO",path:G.path,hasId:"",linkId:[],webId:k,pinned:!1,visibility:"PUBLIC",rowStatus:"NORMAL",creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:ne}}async function t3(e){const{vault:t}=ke.getState().dailyNotesState.app||window.app,n=ke.getState().dailyNotesState.app||window.app,{DefaultMemoComposition:r,InsertAfter:o,DefaultTimePrefix:i,DifferentInsertTarget:a,InsertAfterForTask:s,InsertType:l,UseMemoFixedStrings:u,MemoFixedPrefix:d,MemoFixedSuffix:h}=ke.getState().dailyNotesState.settings;let p=(e.pinned?" [pinned::true]":"")+(e.rowStatus==="ARCHIVED"?" [archived::true]":"")+(e.visibility==="PRIVATE"?' [visibility::"PRIVATE"]':"");if(e.id){const $=" [webId::"+e.id+"]";p+=$}const m=N.moment();if(e.deletedAt){const $=" [deleted::"+m.format("YYYYMMDDHHmmss")+"]";p+=$}const b=n.vault.getConfig("useTab")===void 0||n.vault.getConfig("useTab")===!0,v=b?1:n.vault.getConfig("tabSize"),y=(b?" ":" ").repeat(v),S=e.content.split(`
`).join(`
-`+w),D=x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),I=D.format(o||"HH:mm"),M=!e.thinoType||e.thinoType==="JOURNAL"?"- ":e.thinoType==="TASK-TODO"?"- [ ] ":"- [x] ",N=r?`${M}${r==null?void 0:r.replace(/{TIME}/g,I).replace(/{CONTENT}/g,(S.split(`
-`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(S)?`
-`+w:"")+S)}${S.split(`
-`).length>1&&/```/g.test(S.split(`
-`)[S.split(`
-`).length-1])&&f.trim()?`
-`+w:" "}${f}`:`${M}${I} ${S.split(`
-`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(S)?`
-`+w:""}${S}${S.split(`
-`).length>1&&/```/g.test(S.split(`
-`)[S.split(`
-`).length-1])&&f.trim()?`
-`+w:" "}${f}`,B=Ju(),k=pb(D,B),R="fake"+ut.randomId(16);let L=!1;const _=n.plugins.getPlugin("templater-obsidian");let V;if(k?V=k:(_!=null&&_.templater&&(_!=null&&_.settings.trigger_on_file_creation)&&(we.setWaitingForTemplater({origin:e.content,date:D,isList:e.thinoType&&e.thinoType==="JOURNAL",id:R,type:"local"}),L=!0),V=await ut.createDailyNoteCheck(D)),!V){new x.Notice(E("Failed to create daily note, check if it exists.")),new x.Notice(E("Your content has been copied to clipboard, and inserted into the editor. Please try it again")),await navigator.clipboard.writeText(e.content);const $=n.workspace.getLeavesOfType("thino_view").first();n.workspace.trigger("send-to-thino",e.content,$);return}if(k||await ft.fechLocalDailyNotes(),_&&(_!=null&&_.templater)&&(_!=null&&_.settings.trigger_on_file_creation)&&L)return dt.setChangedByMemos(!0),{id:R,content:e.content,deletedAt:e.deletedAt??"",createdAt:D.format("YYYY/MM/DD HH:mm:ss"),updatedAt:D.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",path:V.path,hasId:"",linkId:"",pinned:e.pinned??!1,visibility:"PUBLIC",rowStatus:e.rowStatus??"NORMAL",webId:e.webId||e.id,creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:(e==null?void 0:e.fileInfo)||{tags:[],frontmatter:{}}};const U=n.metadataCache.getFileCache(V),Z={tags:((fe=U==null?void 0:U.frontmatter)==null?void 0:fe.tags)||[],frontmatter:(U==null?void 0:U.frontmatter)||{}};let Q="";try{Q=await t.read(V)||await t.cachedRead(V)}catch($){console.error($),new x.Notice(E("Failed to read current daily note, check if it exists."))}const G=c==="end"?"":e.thinoType&&i&&l||a,re=await wA(G,N,Q);await t.modify(V,re.content);const de=re.posNum===-1?bA(re.content).length-1:re.posNum+1;return dt.setChangedByMemos(!0),{id:D.format("YYYYMMDDHHmm")+"00"+de,content:e.content,deletedAt:e.deletedAt??"",createdAt:D.format("YYYY/MM/DD HH:mm:ss"),updatedAt:D.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",path:V.path,hasId:"",linkId:"",pinned:e.pinned??!1,visibility:"PUBLIC",rowStatus:e.rowStatus??"NORMAL",webId:e.id,creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:Z}}async function wA(e,t,n){const r=new RegExp(`(s*?)${await o_(e)}(s*?)`),a=i_(n),o=a.findIndex(f=>r.test(f)),i=(e==null?void 0:e.trim())===""?!0:o===-1;i&&console.error("unable to find insert after line in file.");const l=a.slice(o+1).findIndex(f=>/(^#+ |---|^\^[a-zA-Z0-9-]{2,}$)/.test(f)),c=l!==-1;if(c){let f;for(let h=l+o;h>o;h--)if(!/^[\s\n ]*$/.test(a[h])){f=h;break}return f||(f=o),await _C(t,n,i?-1:f,c)}else return await _C(t,n,a.length-1,c)}async function _C(e,t,n,r){if(n<-1)throw new Error("Invalid position");if(n===-1)return{content:`${t}
-${e}`,posNum:-1};const a=t.split(`
-`),o=a.slice(0,n+1).join(`
-`),i=a.slice(n+1).join(`
-`),l=i.trim().length>0;return{content:`${o}${!l&&!r||!o.endsWith(`
+`+y),x=N.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss");let C="",k="";u&&(C=p0(d||"",x),k=p0(h||"",x));const M=C?C+(C.endsWith(" ")?"":" ")+S:S,I=k?M+(M.endsWith(" ")?"":" ")+k:M,O=x.format(i||"HH:mm"),R=!e.thinoType||e.thinoType==="JOURNAL"?"- ":e.thinoType==="TASK-TODO"?"- [ ] ":"- [x] ",L=r?`${R}${r?.replace(/{TIME}/g,O).replace(/{CONTENT}/g,(I.split(`
+`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(I)?`
+`+y:"")+I)}${I.split(`
+`).length>1&&/```/g.test(I.split(`
+`)[I.split(`
+`).length-1])&&p.trim()?`
+`+y:" "}${p}`:`${R}${O} ${I.split(`
+`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(I)?`
+`+y:""}${I}${I.split(`
+`).length>1&&/```/g.test(I.split(`
+`)[I.split(`
+`).length-1])&&p.trim()?`
+`+y:" "}${p}`,B=Il(),_=lS(x,B),H="fake"+Le.randomId(16);let U=!1;const G=n.plugins.getPlugin("templater-obsidian");let K;if(_?K=_:(G?.templater&&G?.settings.trigger_on_file_creation&&(de.setWaitingForTemplater({origin:e.content,date:x,isList:e.thinoType&&e.thinoType==="JOURNAL",id:H,type:"local"}),U=!0),K=await Le.createDailyNoteCheck(x)),!K){new N.Notice(E("Failed to create daily note, check if it exists.")),new N.Notice(E("Your content has been copied to clipboard, and inserted into the editor. Please try it again")),await navigator.clipboard.writeText(e.content);const $=n.workspace.getLeavesOfType("thino_view").first();n.workspace.trigger("send-to-thino",e.content,$);return}if(_||await $e.fechLocalDailyNotes(),G&&G?.templater&&G?.settings.trigger_on_file_creation&&U)return Ze.setChangedByMemos(!0),{id:H,content:e.content,deletedAt:e.deletedAt??"",createdAt:x.format("YYYY/MM/DD HH:mm:ss"),updatedAt:x.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",path:K.path,hasId:"",linkId:[],pinned:e.pinned??!1,visibility:"PUBLIC",rowStatus:e.rowStatus??"NORMAL",webId:e.webId||e.id,creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:e?.fileInfo||{tags:[],frontmatter:{}}};const z=n.metadataCache.getFileCache(K),ne={tags:z?.frontmatter?.tags||[],frontmatter:z?.frontmatter||{}};let J="";try{J=await t.read(K)||await t.cachedRead(K)}catch($){console.error($),new N.Notice(E("Failed to read current daily note, check if it exists."))}const ee=l==="end"?"":e.thinoType&&a&&s||o,Z=await Q8(ee,L,J);await t.modify(K,Z.content);const q=Z.posNum===-1?eH(Z.content).length-1:Z.posNum+1;return Ze.setChangedByMemos(!0),{id:x.format("YYYYMMDDHHmm")+"00"+q,content:e.content,deletedAt:e.deletedAt??"",createdAt:x.format("YYYY/MM/DD HH:mm:ss"),updatedAt:x.format("YYYY/MM/DD HH:mm:ss"),thinoType:e.thinoType||"JOURNAL",path:K.path,hasId:"",linkId:[],pinned:e.pinned??!1,visibility:"PUBLIC",rowStatus:e.rowStatus??"NORMAL",webId:e.id,creatorName:"Thino",resourceList:[],sourceType:"DAILY",fileInfo:ne}}async function Q8(e,t,n){const r=new RegExp(`(s*?)${await yQ(e)}(s*?)`),o=bQ(n),i=o.findIndex(u=>r.test(u)),a=e?.trim()===""?!0:i===-1,s=o.slice(i+1).findIndex(u=>/(^#+ |---|^\^[a-zA-Z0-9-]{2,}$)/.test(u)),l=s!==-1;if(l){let u;for(let d=s+i;d>i;d--)if(!/^[\s\n ]*$/.test(o[d])){u=d;break}return u||(u=i),await n3(t,n,a?-1:u,l)}else return await n3(t,n,o.length-1,l)}async function n3(e,t,n,r){if(n<-1)throw new Error("Invalid position");if(n===-1)return{content:`${t}
+${e}`,posNum:-1};const o=t.split(`
+`),i=o.slice(0,n+1).join(`
+`),a=o.slice(n+1).join(`
+`),s=a.trim().length>0;return{content:`${i}${!s&&!r||!i.endsWith(`
`)?`
-`:""}${e}${(l||r?`
-`:"")+i}`,posNum:n}}const bA=e=>e.split(/\r?\n/);async function c_(e){const t=Le.getState().dailyNotesState.app,n=t.vault.getAbstractFileByPath(e.path);if(!(n instanceof x.TFile)){new x.Notice(E("File not found for the given thino path"));return}await t.vault.delete(n)}async function d_(e){const t=Le.getState().dailyNotesState.app,n=t.vault.getAbstractFileByPath(e.path);if(!(n instanceof x.TFile)){new x.Notice(E("File not found for the given thino path"));return}const a=(await t.vault.read(n)).split(`
-`),o=a.findIndex(c=>c.includes(e.id));if(o===-1){new x.Notice(E("Thino not found"));return}const i=a.findIndex((c,f)=>f>o&&c.trim()==="");i===-1?a.splice(o,a.length-o):a.splice(o,i-o);const l=a.join(`
-`);if(!l){new x.Notice(E("Thino not found"));return}dt.setChangedByMemos(!0),await t.vault.modify(n,l)}async function f_(e){const t=Le.getState().dailyNotesState.app,n=t.metadataCache.getFirstLinkpathDest("",e.path);if(!n){new x.Notice(E("File not found for the given thino path"));return}const r=await t.vault.read(n),a=JSON.parse(r),o=a.nodes,i=o.findIndex(h=>h.id===e.id);if(i===-1){new x.Notice(E("Thino not found"));return}o.splice(i,1);const l=a.edges;l.filter(h=>h.fromNode===e.id||h.toNode===e.id).forEach(h=>{const g=l.findIndex(y=>y.id===h.id);g!==-1&&l.splice(g,1)}),dt.setChangedByMemos(!0);const f=JSON.stringify(a,null,2);await t.vault.modify(n,f)}async function h_(e){mA()||new x.Notice(E("If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again."),5e3);const{vault:t,metadataCache:n}=Le.getState().dailyNotesState.app,r=e.path,a=t.getAbstractFileByPath(r);if(!a){new x.Notice(E("Please check your daily note plugin OR periodic notes plugin settings"));return}const o=await t.read(a),i=o.split(`
-`),l=n.getFileCache(a),c=(l==null?void 0:l.listItems)||[],f=parseInt(e.id.slice(14));let h=f;function g(D,I){const M=[];for(const N in I)I[N]===D&&M.push(parseInt(N),...g(parseInt(N),I));return M}const y=k2(c),w=c.find(D=>D.position.start.line===f),S=g(f,y);if(S.length>0){const D=S.map(I=>{const M=c.find(N=>N.position.start.line===I);return M?M.position.end.line:-1});h=Math.max(...D,w.position.end.line)}else h=w.position.end.line;if(!o){new x.Notice(E("Thino not found"));return}dt.setChangedByMemos(!0),i.splice(f,h-f+1),await t.modify(a,i.join(`
-`))}async function p_(){const{vault:e,metadataCache:t}=Le.getState().dailyNotesState.app,n=Le.getState().dailyNotesState.settings,a=mb()+"/"+n.DeleteFileName+".md",o=[],i=t.getFirstLinkpathDest("",a);if(i instanceof x.TFile){let l=await e.read(i),c=m_(l);if(c.length===0)return o;for(let f=0;fe.split(/\r?\n/),g_=e=>{var t;return(t=/^- (\d{14})(\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e))==null?void 0:t[1]},v_=e=>{var t;return(t=/^- (\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e))==null?void 0:t[2]},y_=e=>{var t;return(t=/^- (\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e))==null?void 0:t[4]};async function w_(e){const t=await Rp(Le.getState().dailyNotesState.app)||[],n=t.findIndex(r=>r.id===e);t.splice(n,1),await Av(Le.getState().dailyNotesState.app,t)}const b_=async e=>{const{app:t}=Le.getState().dailyNotesState,n=await Rp(t)||[],r=n.find(a=>a.id===e);if(r){const a=x.moment().format("YYYY/MM/DD HH:mm:ss");return r.pinnedAt=a,await Av(t,n),a}else{new x.Notice(E("Query not found"));return}},S_=async e=>{const{app:t}=Le.getState().dailyNotesState,n=await Rp(t)||[],r=n.find(a=>a.id===e);if(r){r.pinnedAt="",await Av(t,n);return}else{new x.Notice(E("Query not found"));return}};function D_(e,t){const n=/%%(.*?)%%/,r=e.match(n);if(!r)return e;const a=r[1].trim(),o={};a.split(" ").forEach(l=>{const[c,f]=l.slice(1,-1).split("::");o[c]=f});for(const l of Object.keys(t))if(l!=="id"&&l!=="content"){if(l==="rowStatus"&&t.rowStatus==="ARCHIVED"){o.archived="true";continue}else if(l==="rowStatus"&&t.rowStatus==="NORMAL"){delete o.archived;continue}if(l==="deleted"&&t.deleted){const c=x.moment().format("YYYYMMDDHHmmss");o.deleted=c}else typeof t[l]=="boolean"?t[l]?o[l]="true":delete o[l]:t[l]&&(typeof t[l]=="string"||typeof t[l]=="boolean")&&(o[l]=t[l])}const i=Object.entries(o).map(([l,c])=>`[${l}::${c}]`).join(" ");return e.replace(n,`%% ${i} %%`)}async function js(e,t){if(!e.sourceType||e.sourceType!=="MULTI")return e;const{vault:n,fileManager:r}=Le.getState().dailyNotesState.app,a=n.getAbstractFileByPath(e.path);if(!a)return e;const o=x.moment();if(await r.processFrontMatter(a,i=>{(t.pinned!==void 0||t.thinoType||t.rowStatus||t.visibility||t.deleted)&&dt.setChangedByMemos(!0),t.id&&(i.id=t.id),t.thinoType&&(i.thinoType=t.thinoType),t.rowStatus&&(i.rowStatus=t.rowStatus),t.visibility&&(i.visibility=t.visibility),t.webId&&(i.webId=t.webId),t.pinned!==void 0&&(i.pinned=t.pinned),t.deleted!==void 0&&(i.deletedAt=t.deleted?o.format("YYYY/MM/DD HH:mm:ss"):""),i.createdAt||(i.createdAt=o.format("YYYY/MM/DD HH:mm:ss")),i.updatedAt=o.format("YYYY/MM/DD HH:mm:ss")}),t.content){const i=await n.read(a);let l=i;const c=t.content.replace(/\$/g,"$$$$");l=i.replace(e.content,c),await n.modify(a,l)}return dt.setChangedByMemos(!0),{...e,id:t.id||e.id,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt||o.format("YYYY/MM/DD HH:mm:ss"),updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),content:t.content||e.content,rowStatus:t.rowStatus||e.rowStatus,visibility:t.visibility||e.visibility,pinned:t.pinned!==void 0?t.pinned:e.pinned,webId:t.webId||e.webId,deletedAt:t.deleted?o.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}async function Rl(e,t){if(!e.sourceType||e.sourceType!=="FILE")return e;const{vault:n}=Le.getState().dailyNotesState.app,r=n.getAbstractFileByPath(e.path);if(!r)return e;const a=x.moment();let o="";try{o=await n.read(r)}catch(M){console.error(M),o=await n.cachedRead(r)}const i=o.split(/\r?\n/),l=i.findIndex(M=>M.includes("id::"+e.id)||M.includes("Id::"+e.id)||e.webId&&M.includes(e.webId)),c=i[l];if(!c)return e;const f=D_(c,t);if(!c)return e;const h=f+`
-`,g=i.findIndex((M,N)=>N>l&&M.trim()==="");let y="";g===-1&&(y=i.slice(l+1).join(`
-`)),g!==-1&&(y=i.slice(l+1,g).join(`
-`));let w=y;t!=null&&t.content&&(w=t.content.split(/\r?\n/).map(k=>"> "+k).join(`
-`));const D=(h+w).split(/\r?\n/);i.splice(l,g!==-1?g-l:i.length-l,...D);const I=i.join(`
-`);return await n.modify(r,I),dt.setChangedByMemos(!0),{...e,id:t.id||e.id,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt||a.format("YYYY/MM/DD HH:mm:ss"),updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),content:t.content||e.content,rowStatus:t.rowStatus||e.rowStatus,visibility:t.visibility||e.visibility,pinned:t.pinned!==void 0?t.pinned:e.pinned,webId:t.webId||e.webId,deletedAt:t.deleted?a.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}async function _l(e,t){if(!e.sourceType||e.sourceType!=="CANVAS")return e;const{vault:n}=Le.getState().dailyNotesState.app,r=n.getAbstractFileByPath(e.path);if(!r)return e;const a=await n.read(r),o=JSON.parse(a),i=o.nodes.find(f=>f.id===e.id);if(!i)return e;t.content&&(i.text=t.content),t.thinoType&&(i.thinoType=t.thinoType),t.rowStatus&&(i.rowStatus=t.rowStatus),t.visibility&&(i.visibility=t.visibility),t.pinned!==void 0&&(i.pinned=t.pinned),t.webId&&(i.webId=t.webId);const l=x.moment();t.deleted!==void 0&&(i.deletedAt=t.deleted?l.format("YYYY/MM/DD HH:mm:ss"):""),i.updatedAt=l.format("YYYY/MM/DD HH:mm:ss");const c=JSON.stringify(o,null,2);return await n.modify(r,c),dt.setChangedByMemos(!0),{...e,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt,updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),content:t.content??e.content,rowStatus:t.rowStatus??e.rowStatus,visibility:t.visibility??e.visibility,pinned:t.pinned??e.pinned,webId:t.webId??e.webId,deletedAt:t.deleted?l.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}}function SA(e,t){const n=[];for(const r in t)t[r]===e&&n.push(parseInt(r),...SA(parseInt(r),t));return n}async function Bl(e,t){var G;mA()||new x.Notice(E("If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again."));const{vault:n,metadataCache:r}=Le.getState().dailyNotesState.app,a=Le.getState().dailyNotesState.app,{settings:o}=Le.getState().dailyNotesState,i=e.id.toString().slice(0,14),l=x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(x.moment(i,"YYYYMMDDHHmmss"))?x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"):x.moment(i,"YYYYMMDDHHmmss"),c=x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(l,"day"),f=e.path,h=n.getAbstractFileByPath(f)||n.getAbstractFileByPath(e.path);if(!h)return new x.Notice(E("Please check your daily note plugin OR periodic notes plugin settings")),e;const y=(await n.read(h)).split(`
-`),w=r.getFileCache(h),S=(w==null?void 0:w.listItems)||[];if(S.length===0)return new x.Notice(E("Thino not found")),e;const D=parseInt(e.id.slice(14));let I=D;const M=k2(S),N=S.find(re=>re.position.start.line===D);if(!N)return new x.Notice(E("Thino not found")),e;const B=SA(D,M);if(B.length>0){const re=B.map(de=>{const fe=S.find($=>$.position.start.line===de);return fe?fe.position.end.line:-1});I=Math.max(...re,N.position.end.line)}else I=N.position.end.line;const k=y.slice(D,I+1);let R=k.join(`
-`);const L=c?x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format("HH:mm"):(parseInt(e.id.toString().slice(10,12))+24).toString()+":"+e.id.toString().slice(12,14);if(!R)return new x.Notice(E("Thino not found")),e;const _=a.vault.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,V=_?1:a.vault.getConfig("tabSize"),U=(_?" ":" ").repeat(V);let Z=L;if(o.DefaultTimePrefix!=="HH:mm"&&(Z=x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss").format(o.DefaultTimePrefix)),t.content){const re=e.thinoType==="TASK-TODO"?"- [ ] ":e.thinoType==="TASK-DONE"?"- [x] ":e.thinoType.startsWith("TASK")?`- [${e.thinoType.slice(5)}] `:"- ",de=(e.pinned?" [pinned::true]":"")+(e.deletedAt?` [deleted::${e.deletedAt}]`:"")+(e.rowStatus==="ARCHIVED"?" [archived::true]":"")+(e.webId?" [webId::"+e.webId+"]":""),fe=t.content.trim().split(`
-`)[t.content.trim().split(`
-`).length-1].trim(),$=e.hasId&&t.content.trim().split(`
-`).length>1&&new RegExp(/(-|\*|\d{1,2}\.)\s/g).test(fe)?" ^"+e.hasId:" ";R=`${re}${Z}${$}${t.content.trim().split(`
-`).length>1||/^((-|\*|\d\.|>)\s|```)/g.test(t.content)?`
-`+U:""}${t.content.trim().split(`
-`).join(`
-`+U)}${/((-|\*|\d\.|>)\s|```)/g.test(t.content.split(`
-`)[t.content.split(`
-`).length-1])?`
-`+U:" "}${de.trim()}`}if(t.thinoType){const re=t.thinoType==="TASK-TODO"?"- [ ] ":t.thinoType==="TASK-DONE"?"- [x] ":t.thinoType.startsWith("TASK")?`- [${t.thinoType.slice(5)}] `:"- ";R=R.replace(/^((- \[.\] )|((-|\*) ))/,re)}if(t.rowStatus){const re=t.rowStatus==="ARCHIVED"?"[archived::"+(t.rowStatus==="ARCHIVED"?"true":"false")+"]":"";R=R.includes("[archived::")?R.replace(/\[archived::(true|false)\]/,re):R+`${/((-|\*|\d\.|>)\s|```)/g.test(R.split(`
-`)[R.split(`
-`).length-1])?`
-`+U:" "}`+re}if(t.visibility){const re='[visibility::"'+t.visibility+'"]';R=R.includes("[visibility::")?R.replace(/\[visibility::"(PUBLIC|PROTECTED)"\]/g,re):R+`${/((-|\*|\d\.|>)\s|```)/g.test(R.split(`
-`)[R.split(`
-`).length-1])?`
-`+U:" "}`+re}if(t.pinned!==void 0){const re=t.pinned?"[pinned::"+(t.pinned?"true":"false")+"]":"";R=R.includes("[pinned::")?R.replace(/\[pinned::(true|false)\]/,t.pinned===!1?"":re):R+`${/((-|\*|\d\.|>)\s|```)/g.test(R.split(`
-`)[R.split(`
-`).length-1])?`
-`+U:" "}`+re}if(t.webId!==void 0){const re="[webId::"+t.webId+"]";R=R.includes("[webId::")?R.replace(/\[webId::([^\]]+)\]/,t.webId===""?"":re):R+`${/((-|\*|\d\.|>)\s|```)/g.test(R.split(`
-`)[R.split(`
-`).length-1])?`
-`+U:" "}`+re}const Q=x.moment();if(t.deleted!==void 0){const re="[deleted::"+Q.format("YYYYMMDDHHmmss")+"]";t.deleted?(R=R.replace(/\[deleted::([^\]]+)\]/,""),R=R+`${/((-|\*|\d\.|>)\s|```)/g.test(R.split(`
-`)[R.split(`
-`).length-1])?`
-`+U:" "}`+re):t.deleted===!1&&(R=R.replace(/\[deleted::([^\]]+)\]/,""))}if(e.hasId&&((G=t.content)==null?void 0:G.split(`
-`).length)===1){const re=" ^"+e.hasId;R=R.trim().replace(/\s\^([0-9a-zA-Z-]+)($|\n)/g,"")+`${/((-|\*|\d\.|>)\s|```)/g.test(R.split(`
-`)[R.split(`
-`).length-1])?`
-`+U:" "}`+re}return R!==k.join(`
-`)?(y.splice(D,I-N.position.start.line+1,R.trim()),await n.modify(h,y.join(`
-`)),dt.setChangedByMemos(!0),{...e,thinoType:t.thinoType||e.thinoType,createdAt:e.createdAt,updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),content:t.content??e.content,rowStatus:t.rowStatus??e.rowStatus,visibility:t.visibility??e.visibility,pinned:t.pinned??e.pinned,webId:t.webId??e.webId,deletedAt:t.deleted?Q.format("YYYY/MM/DD HH:mm:ss"):t.deleted===!1?"":e.deletedAt?e.deletedAt:""}):e}async function T_(e,t,n){var M;const{vault:r,metadataCache:a}=Le.getState().dailyNotesState.app||window.app,o=r.getFileByPath(e);if(!o)return;const i=((M=a.getFileCache(o))==null?void 0:M.listItems)||[],l=k2(i),c=[],f=r.getConfig("useTab")===void 0||app.vault.getConfig("useTab")===!0,h=f?1:r.getConfig("tabSize"),g=(f?" ":" ").repeat(h);function y(N,B){const k=[];for(const R in B)B[R]===N&&k.push(parseInt(R),...y(parseInt(R),B));return k}const w=x.moment(),S=t.map(N=>{const B=i.find(_=>_.position.start.line===parseInt(N.id.slice(14))),R=y(parseInt(N.id.slice(14)),l).map(_=>{const V=i.find(U=>U.position.start.line===_);return V?V.position.end.line:-1}),L=Math.max(...R,B.position.end.line);return{id:N.id,start:B.position.start.line,end:L}}),I=(await r.read(o)).split(`
-`);return S.forEach(N=>{const k=I.slice(N.start,N.end+1).join(`
-`),L=k.split(`
-`)[k.split(`
-`).length-1].trim();let _=k;if(n==="delete"){const V="[deleted::"+w.format("YYYYMMDDHHmmss")+"]";_=_.replace(/\[deleted::([^\]]+)\]/,""),_=k+`${k.split(`
-`).length>1&&/```/g.test(L)?`
-`+g:" "}`+V}if(n==="restoreFromDelete"&&(_=_.replace(/ ?\[deleted::([^\]]+)\]/,"")),n==="archive"){const V="[archived::true]";_=_.includes("[archived::")?_.replace(/\[archived::(true|false)\]/,V):_+`${_.split(`
-`).length>1&&/```/g.test(L)?`
-`+g:" "}`+V}n==="restoreFromArchive"&&(_=_.replace(/ ?\[archived::(true|false)\]/,"")),n==="deleteForever"?I.splice(N.start,N.end-N.start+1):I.splice(N.start,N.end-N.start+1,_),c.push({...t.find(V=>V.id===N.id),deletedAt:n==="delete"?w.format("YYYY/MM/DD HH:mm:ss"):"",rowStatus:n==="archive"?"ARCHIVED":"NORMAL"})}),await r.modify(o,I.join(`
-`)),dt.setChangedByMemos(!0),c}const I_=e=>{switch(e==null?void 0:e.sourceType){case"CANVAS":return _l(e,{id:e.id,pinned:!0});case"DAILY":return Bl(e,{id:e.id,pinned:!0});case"MULTI":return js(e,{id:e.id,pinned:!0});case"FILE":return Rl(e,{id:e.id,pinned:!0})}},E_=e=>{switch(e==null?void 0:e.sourceType){case"CANVAS":return _l(e,{id:e.id,pinned:!1});case"DAILY":return Bl(e,{id:e.id,pinned:!1});case"MULTI":return js(e,{id:e.id,pinned:!1});case"FILE":return Rl(e,{id:e.id,pinned:!1})}};var hT;(e=>{async function t(D){return await jC(D)}e.getMyMemos=t;async function n(D){return await jC([D])}e.updateSpecificTypeMemo=n;function r(){return p_()}e.getMyDeletedMemos=r;function a(D){const I=we.getMemoById(D);if(I)switch(I==null?void 0:I.sourceType){case"DAILY":return Bl(I,{id:I.id,deleted:!1});case"CANVAS":return _l(I,{id:I.id,deleted:!1});case"MULTI":return js(I,{id:I.id,deleted:!1});case"FILE":return Rl(I,{id:I.id,deleted:!1})}}e.restoreMemo=a;function o(D){return d_(D)}e.deleteMemoInSingleFile=o;function i(D){return c_(D)}e.deleteMemoInMultiFiles=i;function l(D){return h_(D)}e.deleteMemoInDailyNote=l;function c(D){return f_(D)}e.deleteMemoInCanvas=c;function f(){return kR()}e.getMyQueries=f;async function h(D,I){return await AR(D,I)}e.createQuery=h;function g(D,I,M){return GR(D,I,M)}e.updateQuery=g;function y(D){return w_(D)}e.deleteQueryById=y;function w(D){return b_(D)}e.pinQuery=w;function S(D){return S_(D)}e.unpinQuery=S})(hT||(hT={}));const Ko=hT;var Ku={};Object.defineProperty(Ku,"__esModule",{value:!0});class Of extends Error{}class C_ extends Of{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class x_ extends Of{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class M_ extends Of{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class jg extends Of{}class DA extends Of{constructor(t){super(`Invalid unit ${t}`)}}class Xi extends Of{}class Uc extends Of{constructor(){super("Zone is an abstract class")}}const gt="numeric",zs="short",Mi="long",xw={year:gt,month:gt,day:gt},TA={year:gt,month:zs,day:gt},k_={year:gt,month:zs,day:gt,weekday:zs},IA={year:gt,month:Mi,day:gt},EA={year:gt,month:Mi,day:gt,weekday:Mi},CA={hour:gt,minute:gt},xA={hour:gt,minute:gt,second:gt},MA={hour:gt,minute:gt,second:gt,timeZoneName:zs},kA={hour:gt,minute:gt,second:gt,timeZoneName:Mi},NA={hour:gt,minute:gt,hourCycle:"h23"},AA={hour:gt,minute:gt,second:gt,hourCycle:"h23"},FA={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:zs},OA={hour:gt,minute:gt,second:gt,hourCycle:"h23",timeZoneName:Mi},PA={year:gt,month:gt,day:gt,hour:gt,minute:gt},jA={year:gt,month:gt,day:gt,hour:gt,minute:gt,second:gt},LA={year:gt,month:zs,day:gt,hour:gt,minute:gt},RA={year:gt,month:zs,day:gt,hour:gt,minute:gt,second:gt},N_={year:gt,month:zs,day:gt,weekday:zs,hour:gt,minute:gt},_A={year:gt,month:Mi,day:gt,hour:gt,minute:gt,timeZoneName:zs},BA={year:gt,month:Mi,day:gt,hour:gt,minute:gt,second:gt,timeZoneName:zs},HA={year:gt,month:Mi,day:gt,weekday:Mi,hour:gt,minute:gt,timeZoneName:Mi},UA={year:gt,month:Mi,day:gt,weekday:Mi,hour:gt,minute:gt,second:gt,timeZoneName:Mi};class Ov{get type(){throw new Uc}get name(){throw new Uc}get ianaName(){return this.name}get isUniversal(){throw new Uc}offsetName(t,n){throw new Uc}formatOffset(t,n){throw new Uc}offset(t){throw new Uc}equals(t){throw new Uc}get isValid(){throw new Uc}}let TS=null;class yb extends Ov{static get instance(){return TS===null&&(TS=new yb),TS}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return zA(t,n,r)}formatOffset(t,n){return zg(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let aw={};function A_(e){return aw[e]||(aw[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),aw[e]}const F_={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function O_(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,a,o,i,l,c,f,h]=r;return[i,a,o,l,c,f,h]}function P_(e,t){const n=e.formatToParts(t),r=[];for(let a=0;a=0?S:1e3+S,(y-w)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let BC={};function j_(e,t={}){const n=JSON.stringify([e,t]);let r=BC[n];return r||(r=new Intl.ListFormat(e,t),BC[n]=r),r}let pT={};function mT(e,t={}){const n=JSON.stringify([e,t]);let r=pT[n];return r||(r=new Intl.DateTimeFormat(e,t),pT[n]=r),r}let gT={};function L_(e,t={}){const n=JSON.stringify([e,t]);let r=gT[n];return r||(r=new Intl.NumberFormat(e,t),gT[n]=r),r}let vT={};function R_(e,t={}){const{base:n,...r}=t,a=JSON.stringify([e,r]);let o=vT[a];return o||(o=new Intl.RelativeTimeFormat(e,t),vT[a]=o),o}let Lg=null;function __(){return Lg||(Lg=new Intl.DateTimeFormat().resolvedOptions().locale,Lg)}function B_(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,a;try{r=mT(e).resolvedOptions(),a=e}catch{const c=e.substring(0,n);r=mT(c).resolvedOptions(),a=c}const{numberingSystem:o,calendar:i}=r;return[a,o,i]}}function H_(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function U_(e){const t=[];for(let n=1;n<=12;n++){const r=At.utc(2016,n,1);t.push(e(r))}return t}function Y_(e){const t=[];for(let n=1;n<=7;n++){const r=At.utc(2016,11,13+n);t.push(e(r))}return t}function T0(e,t,n,r,a){const o=e.listingMode(n);return o==="error"?null:o==="en"?r(t):a(t)}function z_(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class V_{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:a,floor:o,...i}=r;if(!n||Object.keys(i).length>0){const l={useGrouping:!1,...r};r.padTo>0&&(l.minimumIntegerDigits=r.padTo),this.inf=L_(t,l)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):O2(t,3);return Xr(n,this.padTo)}}}class W_{constructor(t,n,r){this.opts=r;let a;if(t.zone.isUniversal){const i=-1*(t.offset/60),l=i>=0?`Etc/GMT+${i}`:`Etc/GMT${i}`;t.offset!==0&&zu.create(l).valid?(a=l,this.dt=t):(a="UTC",r.timeZoneName?this.dt=t:this.dt=t.offset===0?t:At.fromMillis(t.ts+t.offset*60*1e3))}else t.zone.type==="system"?this.dt=t:(this.dt=t,a=t.zone.name);const o={...this.opts};o.timeZone=o.timeZone||a,this.dtf=mT(n,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class $_{constructor(t,n,r){this.opts={style:"long",...r},!n&&YA()&&(this.rtf=R_(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):uB(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}class ur{static fromOpts(t){return ur.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,n,r,a=!1){const o=t||Qr.defaultLocale,i=o||(a?"en-US":__()),l=n||Qr.defaultNumberingSystem,c=r||Qr.defaultOutputCalendar;return new ur(i,l,c,o)}static resetCache(){Lg=null,pT={},gT={},vT={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r}={}){return ur.create(t,n,r)}constructor(t,n,r,a){const[o,i,l]=B_(t);this.locale=o,this.numberingSystem=n||i||null,this.outputCalendar=r||l||null,this.intl=H_(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=z_(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:ur.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1,r=!0){return T0(this,t,r,$A,()=>{const a=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=U_(i=>this.extract(i,a,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1,r=!0){return T0(this,t,r,GA,()=>{const a=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=Y_(i=>this.extract(i,a,"weekday"))),this.weekdaysCache[o][t]})}meridiems(t=!0){return T0(this,void 0,t,()=>JA,()=>{if(!this.meridiemCache){const n={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[At.utc(2016,11,13,9),At.utc(2016,11,13,19)].map(r=>this.extract(r,n,"dayperiod"))}return this.meridiemCache})}eras(t,n=!0){return T0(this,t,n,KA,()=>{const r={era:t};return this.eraCache[t]||(this.eraCache[t]=[At.utc(-40,1,1),At.utc(2017,1,1)].map(a=>this.extract(a,r,"era"))),this.eraCache[t]})}extract(t,n,r){const a=this.dtFormatter(t,n),o=a.formatToParts(),i=o.find(l=>l.type.toLowerCase()===r);return i?i.value:null}numberFormatter(t={}){return new V_(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new W_(t,this.intl,n)}relFormatter(t={}){return new $_(this.intl,this.isEnglish(),t)}listFormatter(t={}){return j_(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}let IS=null;class ko extends Ov{static get utcInstance(){return IS===null&&(IS=new ko(0)),IS}static instance(t){return t===0?ko.utcInstance:new ko(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new ko(bb(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${zg(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${zg(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return zg(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class Z_ extends Ov{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Gc(e,t){if(xn(e)||e===null)return t;if(e instanceof Ov)return e;if(q_(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?yb.instance:n==="utc"||n==="gmt"?ko.utcInstance:ko.parseSpecifier(n)||zu.create(e)}else return hf(e)?ko.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new Z_(e)}let HC=()=>Date.now(),UC="system",YC=null,zC=null,VC=null,WC=60,$C;class Qr{static get now(){return HC}static set now(t){HC=t}static set defaultZone(t){UC=t}static get defaultZone(){return Gc(UC,yb.instance)}static get defaultLocale(){return YC}static set defaultLocale(t){YC=t}static get defaultNumberingSystem(){return zC}static set defaultNumberingSystem(t){zC=t}static get defaultOutputCalendar(){return VC}static set defaultOutputCalendar(t){VC=t}static get twoDigitCutoffYear(){return WC}static set twoDigitCutoffYear(t){WC=t%100}static get throwOnInvalid(){return $C}static set throwOnInvalid(t){$C=t}static resetCaches(){ur.resetCache(),zu.resetCache()}}function xn(e){return typeof e>"u"}function hf(e){return typeof e=="number"}function wb(e){return typeof e=="number"&&e%1===0}function q_(e){return typeof e=="string"}function G_(e){return Object.prototype.toString.call(e)==="[object Date]"}function YA(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function J_(e){return Array.isArray(e)?e:[e]}function ZC(e,t,n){if(e.length!==0)return e.reduce((r,a)=>{const o=[t(a),a];return r&&n(r[0],o[0])===r[0]?r:o},null)[1]}function K_(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function bp(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Uu(e,t,n){return wb(e)&&e>=t&&e<=n}function Q_(e,t){return e-t*Math.floor(e/t)}function Xr(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function qc(e){if(!(xn(e)||e===null||e===""))return parseInt(e,10)}function Xd(e){if(!(xn(e)||e===null||e===""))return parseFloat(e)}function F2(e){if(!(xn(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function O2(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function Pv(e){return e%4===0&&(e%100!==0||e%400===0)}function Yg(e){return Pv(e)?366:365}function Mw(e,t){const n=Q_(t-1,12)+1,r=e+(t-n)/12;return n===2?Pv(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function P2(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function kw(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return t===4||r===3?53:52}function yT(e){return e>99?e:e>Qr.twoDigitCutoffYear?1900+e:2e3+e}function zA(e,t,n,r=null){const a=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);const i={timeZoneName:t,...o},l=new Intl.DateTimeFormat(n,i).formatToParts(a).find(c=>c.type.toLowerCase()==="timezonename");return l?l.value:null}function bb(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,a=n<0||Object.is(n,-0)?-r:r;return n*60+a}function VA(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new Xi(`Invalid unit value ${e}`);return t}function Nw(e,t){const n={};for(const r in e)if(bp(e,r)){const a=e[r];if(a==null)continue;n[t(r)]=VA(a)}return n}function zg(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),a=e>=0?"+":"-";switch(t){case"short":return`${a}${Xr(n,2)}:${Xr(r,2)}`;case"narrow":return`${a}${n}${r>0?`:${r}`:""}`;case"techie":return`${a}${Xr(n,2)}${Xr(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Sb(e){return K_(e,["hour","minute","second","millisecond"])}const X_=["January","February","March","April","May","June","July","August","September","October","November","December"],WA=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],eB=["J","F","M","A","M","J","J","A","S","O","N","D"];function $A(e){switch(e){case"narrow":return[...eB];case"short":return[...WA];case"long":return[...X_];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const ZA=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],qA=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],tB=["M","T","W","T","F","S","S"];function GA(e){switch(e){case"narrow":return[...tB];case"short":return[...qA];case"long":return[...ZA];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const JA=["AM","PM"],nB=["Before Christ","Anno Domini"],rB=["BC","AD"],aB=["B","A"];function KA(e){switch(e){case"narrow":return[...aB];case"short":return[...rB];case"long":return[...nB];default:return null}}function oB(e){return JA[e.hour<12?0:1]}function iB(e,t){return GA(t)[e.weekday-1]}function sB(e,t){return $A(t)[e.month-1]}function lB(e,t){return KA(t)[e.year<0?0:1]}function uB(e,t,n="always",r=!1){const a={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&o){const g=e==="days";switch(t){case 1:return g?"tomorrow":`next ${a[e][0]}`;case-1:return g?"yesterday":`last ${a[e][0]}`;case 0:return g?"today":`this ${a[e][0]}`}}const i=Object.is(t,-0)||t<0,l=Math.abs(t),c=l===1,f=a[e],h=r?c?f[1]:f[2]||f[1]:c?a[e][0]:e;return i?`${l} ${h} ago`:`in ${l} ${h}`}function qC(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const cB={D:xw,DD:TA,DDD:IA,DDDD:EA,t:CA,tt:xA,ttt:MA,tttt:kA,T:NA,TT:AA,TTT:FA,TTTT:OA,f:PA,ff:LA,fff:_A,ffff:HA,F:jA,FF:RA,FFF:BA,FFFF:UA};class uo{static create(t,n={}){return new uo(t,n)}static parseFormat(t){let n=null,r="",a=!1;const o=[];for(let i=0;i0&&o.push({literal:a,val:r}),n=null,r="",a=!a):a||l===n?r+=l:(r.length>0&&o.push({literal:!1,val:r}),r=l,n=l)}return r.length>0&&o.push({literal:a,val:r}),o}static macroTokenToFormatOpts(t){return cB[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}formatDateTime(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).format()}formatDateTimeParts(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).formatToParts()}formatInterval(t,n={}){return this.loc.dtFormatter(t.start,{...this.opts,...n}).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n}).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return Xr(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",a=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(w,S)=>this.loc.extract(t,w,S),i=w=>t.isOffsetFixed&&t.offset===0&&w.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,w.format):"",l=()=>r?oB(t):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(w,S)=>r?sB(t,w):o(S?{month:w}:{month:w,day:"numeric"},"month"),f=(w,S)=>r?iB(t,w):o(S?{weekday:w}:{weekday:w,month:"long",day:"numeric"},"weekday"),h=w=>{const S=uo.macroTokenToFormatOpts(w);return S?this.formatWithSystemDefault(t,S):w},g=w=>r?lB(t,w):o({era:w},"era"),y=w=>{switch(w){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return l();case"d":return a?o({day:"numeric"},"day"):this.num(t.day);case"dd":return a?o({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return f("short",!0);case"cccc":return f("long",!0);case"ccccc":return f("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return f("short",!1);case"EEEE":return f("long",!1);case"EEEEE":return f("narrow",!1);case"L":return a?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return a?o({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return a?o({month:"numeric"},"month"):this.num(t.month);case"MM":return a?o({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return a?o({year:"numeric"},"year"):this.num(t.year);case"yy":return a?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return a?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return a?o({year:"numeric"},"year"):this.num(t.year,6);case"G":return g("short");case"GG":return g("long");case"GGGGG":return g("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return h(w)}};return qC(uo.parseFormat(n),y)}formatDurationFromString(t,n){const r=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},a=c=>f=>{const h=r(f);return h?this.num(c.get(h),f.length):f},o=uo.parseFormat(n),i=o.reduce((c,{literal:f,val:h})=>f?c:c.concat(h),[]),l=t.shiftTo(...i.map(r).filter(c=>c));return qC(o,a(l))}}class Bs{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const QA=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Hp(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function Up(...e){return t=>e.reduce(([n,r,a],o)=>{const[i,l,c]=o(t,a);return[{...n,...i},l||r,c]},[{},null,1]).slice(0,2)}function Yp(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const a=n.exec(e);if(a)return r(a)}return[null,null]}function XA(...e){return(t,n)=>{const r={};let a;for(a=0;aw!==void 0&&(S||w&&h)?-w:w;return[{years:y(Xd(n)),months:y(Xd(r)),weeks:y(Xd(a)),days:y(Xd(o)),hours:y(Xd(i)),minutes:y(Xd(l)),seconds:y(Xd(c),c==="-0"),milliseconds:y(F2(f),g)}]}const TB={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function R2(e,t,n,r,a,o,i){const l={year:t.length===2?yT(qc(t)):qc(t),month:WA.indexOf(n)+1,day:qc(r),hour:qc(a),minute:qc(o)};return i&&(l.second=qc(i)),e&&(l.weekday=e.length>3?ZA.indexOf(e)+1:qA.indexOf(e)+1),l}const IB=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function EB(e){const[,t,n,r,a,o,i,l,c,f,h,g]=e,y=R2(t,a,r,n,o,i,l);let w;return c?w=TB[c]:f?w=0:w=bb(h,g),[y,new ko(w)]}function CB(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const xB=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,MB=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,kB=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function GC(e){const[,t,n,r,a,o,i,l]=e;return[R2(t,a,r,n,o,i,l),ko.utcInstance]}function NB(e){const[,t,n,r,a,o,i,l]=e;return[R2(t,l,n,r,a,o,i),ko.utcInstance]}const AB=Hp(fB,L2),FB=Hp(hB,L2),OB=Hp(pB,L2),PB=Hp(t6),r6=Up(wB,zp,jv,Lv),jB=Up(mB,zp,jv,Lv),LB=Up(gB,zp,jv,Lv),RB=Up(zp,jv,Lv);function _B(e){return Yp(e,[AB,r6],[FB,jB],[OB,LB],[PB,RB])}function BB(e){return Yp(CB(e),[IB,EB])}function HB(e){return Yp(e,[xB,GC],[MB,GC],[kB,NB])}function UB(e){return Yp(e,[SB,DB])}const YB=Up(zp);function zB(e){return Yp(e,[bB,YB])}const VB=Hp(vB,yB),WB=Hp(n6),$B=Up(zp,jv,Lv);function ZB(e){return Yp(e,[VB,r6],[WB,$B])}const qB="Invalid Duration",a6={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},GB={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...a6},Qi=146097/400,ep=146097/4800,JB={years:{quarters:4,months:12,weeks:Qi/7,days:Qi,hours:Qi*24,minutes:Qi*24*60,seconds:Qi*24*60*60,milliseconds:Qi*24*60*60*1e3},quarters:{months:3,weeks:Qi/28,days:Qi/4,hours:Qi*24/4,minutes:Qi*24*60/4,seconds:Qi*24*60*60/4,milliseconds:Qi*24*60*60*1e3/4},months:{weeks:ep/7,days:ep,hours:ep*24,minutes:ep*24*60,seconds:ep*24*60*60,milliseconds:ep*24*60*60*1e3},...a6},af=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],KB=af.slice(0).reverse();function Yc(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new bt(r)}function QB(e){return e<0?Math.floor(e):Math.ceil(e)}function o6(e,t,n,r,a){const o=e[a][n],i=t[n]/o,l=Math.sign(i)===Math.sign(r[a]),c=!l&&r[a]!==0&&Math.abs(i)<=1?QB(i):Math.trunc(i);r[a]+=c,t[n]-=c*o}function XB(e,t){KB.reduce((n,r)=>xn(t[r])?n:(n&&o6(e,t,n,t,r),r),null)}function eH(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class bt{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?JB:GB;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||ur.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return bt.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new Xi(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new bt({values:Nw(t,bt.normalizeUnit),loc:ur.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(hf(t))return bt.fromMillis(t);if(bt.isDuration(t))return t;if(typeof t=="object")return bt.fromObject(t);throw new Xi(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=UB(t);return r?bt.fromObject(r,n):bt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=zB(t);return r?bt.fromObject(r,n):bt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new Xi("need to specify a reason the Duration is invalid");const r=t instanceof Bs?t:new Bs(t,n);if(Qr.throwOnInvalid)throw new M_(r);return new bt({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new DA(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?uo.create(this.loc,r).formatDurationFromString(this,t):qB}toHuman(t={}){const n=af.map(r=>{const a=this.values[r];return xn(a)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(a)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=O2(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();if(n<0||n>=864e5)return null;t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t};const r=this.shiftTo("hours","minutes","seconds","milliseconds");let a=t.format==="basic"?"hhmm":"hh:mm";(!t.suppressSeconds||r.seconds!==0||r.milliseconds!==0)&&(a+=t.format==="basic"?"ss":":ss",(!t.suppressMilliseconds||r.milliseconds!==0)&&(a+=".SSS"));let o=r.toFormat(a);return t.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=bt.fromDurationLike(t),r={};for(const a of af)(bp(n.values,a)||bp(this.values,a))&&(r[a]=n.get(a)+this.get(a));return Yc(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=bt.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=VA(t(this.values[r],r));return Yc(this,{values:n},!0)}get(t){return this[bt.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...Nw(t,bt.normalizeUnit)};return Yc(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:a}={}){const i={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:a,conversionAccuracy:r};return Yc(this,i)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return XB(this.matrix,t),Yc(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=eH(this.normalize().shiftToAll().toObject());return Yc(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(i=>bt.normalizeUnit(i));const n={},r={},a=this.toObject();let o;for(const i of af)if(t.indexOf(i)>=0){o=i;let l=0;for(const f in r)l+=this.matrix[f][i]*r[f],r[f]=0;hf(a[i])&&(l+=a[i]);const c=Math.trunc(l);n[i]=c,r[i]=(l*1e3-c*1e3)/1e3;for(const f in a)af.indexOf(f)>af.indexOf(i)&&o6(this.matrix,a,f,n,i)}else hf(a[i])&&(r[i]=a[i]);for(const i in r)r[i]!==0&&(n[o]+=i===o?r[i]:r[i]/this.matrix[o][i]);return Yc(this,{values:n},!0).normalize()}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Yc(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,a){return r===void 0||r===0?a===void 0||a===0:r===a}for(const r of af)if(!n(this.values[r],t.values[r]))return!1;return!0}}const tp="Invalid Interval";function tH(e,t){return!e||!e.isValid?Or.invalid("missing or invalid start"):!t||!t.isValid?Or.invalid("missing or invalid end"):tt:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Or.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(wg).filter(i=>this.contains(i)).sort(),r=[];let{s:a}=this,o=0;for(;a+this.e?this.e:i;r.push(Or.fromDateTimes(a,l)),a=l,o+=1}return r}splitBy(t){const n=bt.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,a=1,o;const i=[];for(;rc*a));o=+l>+this.e?this.e:l,i.push(Or.fromDateTimes(r,o)),r=o,a+=1}return i}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e=r?null:Or.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.st.e?this.e:t.e;return Or.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((a,o)=>a.s-o.s).reduce(([a,o],i)=>o?o.overlaps(i)||o.abutsStart(i)?[a,o.union(i)]:[a.concat([o]),i]:[a,i],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const a=[],o=t.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),i=Array.prototype.concat(...o),l=i.sort((c,f)=>c.time-f.time);for(const c of l)r+=c.type==="s"?1:-1,r===1?n=c.time:(n&&+n!=+c.time&&a.push(Or.fromDateTimes(n,c.time)),n=null);return Or.merge(a)}difference(...t){return Or.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:tp}toLocaleString(t=xw,n={}){return this.isValid?uo.create(this.s.loc.clone(n),t).formatInterval(this):tp}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:tp}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:tp}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:tp}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:tp}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):bt.invalid(this.invalidReason)}mapEndpoints(t){return Or.fromDateTimes(t(this.s),t(this.e))}}class I0{static hasDST(t=Qr.defaultZone){const n=At.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return zu.isValidZone(t)}static normalizeZone(t){return Gc(t,Qr.defaultZone)}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null,outputCalendar:o="gregory"}={}){return(a||ur.create(n,r,o)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null,outputCalendar:o="gregory"}={}){return(a||ur.create(n,r,o)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null}={}){return(a||ur.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:a=null}={}){return(a||ur.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return ur.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return ur.create(n,null,"gregory").eras(t)}static features(){return{relative:YA()}}}function JC(e,t){const n=a=>a.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(bt.fromMillis(r).as("days"))}function nH(e,t,n){const r=[["years",(c,f)=>f.year-c.year],["quarters",(c,f)=>f.quarter-c.quarter+(f.year-c.year)*4],["months",(c,f)=>f.month-c.month+(f.year-c.year)*12],["weeks",(c,f)=>{const h=JC(c,f);return(h-h%7)/7}],["days",JC]],a={},o=e;let i,l;for(const[c,f]of r)n.indexOf(c)>=0&&(i=c,a[c]=f(e,t),l=o.plus(a),l>t?(a[c]--,e=o.plus(a)):e=l);return[e,a,l,i]}function rH(e,t,n,r){let[a,o,i,l]=nH(e,t,n);const c=t-a,f=n.filter(g=>["hours","minutes","seconds","milliseconds"].indexOf(g)>=0);f.length===0&&(i0?bt.fromMillis(c,r).shiftTo(...f).plus(h):h}const _2={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},KC={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},aH=_2.hanidec.replace(/[\[|\]]/g,"").split("");function oH(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=o&&r<=i&&(t+=r-o)}}return parseInt(t,10)}else return t}function Fs({numberingSystem:e},t=""){return new RegExp(`${_2[e||"latn"]}${t}`)}const iH="missing Intl.DateTimeFormat.formatToParts support";function Ln(e,t=n=>n){return{regex:e,deser:([n])=>t(oH(n))}}const sH=" ",i6=`[ ${sH}]`,s6=new RegExp(i6,"g");function lH(e){return e.replace(/\./g,"\\.?").replace(s6,i6)}function QC(e){return e.replace(/\./g,"").replace(s6," ").toLowerCase()}function Os(e,t){return e===null?null:{regex:RegExp(e.map(lH).join("|")),deser:([n])=>e.findIndex(r=>QC(n)===QC(r))+t}}function XC(e,t){return{regex:e,deser:([,n,r])=>bb(n,r),groups:t}}function ES(e){return{regex:e,deser:([t])=>t}}function uH(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function cH(e,t){const n=Fs(t),r=Fs(t,"{2}"),a=Fs(t,"{3}"),o=Fs(t,"{4}"),i=Fs(t,"{6}"),l=Fs(t,"{1,2}"),c=Fs(t,"{1,3}"),f=Fs(t,"{1,6}"),h=Fs(t,"{1,9}"),g=Fs(t,"{2,4}"),y=Fs(t,"{4,6}"),w=I=>({regex:RegExp(uH(I.val)),deser:([M])=>M,literal:!0}),D=(I=>{if(e.literal)return w(I);switch(I.val){case"G":return Os(t.eras("short",!1),0);case"GG":return Os(t.eras("long",!1),0);case"y":return Ln(f);case"yy":return Ln(g,yT);case"yyyy":return Ln(o);case"yyyyy":return Ln(y);case"yyyyyy":return Ln(i);case"M":return Ln(l);case"MM":return Ln(r);case"MMM":return Os(t.months("short",!0,!1),1);case"MMMM":return Os(t.months("long",!0,!1),1);case"L":return Ln(l);case"LL":return Ln(r);case"LLL":return Os(t.months("short",!1,!1),1);case"LLLL":return Os(t.months("long",!1,!1),1);case"d":return Ln(l);case"dd":return Ln(r);case"o":return Ln(c);case"ooo":return Ln(a);case"HH":return Ln(r);case"H":return Ln(l);case"hh":return Ln(r);case"h":return Ln(l);case"mm":return Ln(r);case"m":return Ln(l);case"q":return Ln(l);case"qq":return Ln(r);case"s":return Ln(l);case"ss":return Ln(r);case"S":return Ln(c);case"SSS":return Ln(a);case"u":return ES(h);case"uu":return ES(l);case"uuu":return Ln(n);case"a":return Os(t.meridiems(),0);case"kkkk":return Ln(o);case"kk":return Ln(g,yT);case"W":return Ln(l);case"WW":return Ln(r);case"E":case"c":return Ln(n);case"EEE":return Os(t.weekdays("short",!1,!1),1);case"EEEE":return Os(t.weekdays("long",!1,!1),1);case"ccc":return Os(t.weekdays("short",!0,!1),1);case"cccc":return Os(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return XC(new RegExp(`([+-]${l.source})(?::(${r.source}))?`),2);case"ZZZ":return XC(new RegExp(`([+-]${l.source})(${r.source})?`),2);case"z":return ES(/[a-z_+-/]{1,256}?/i);default:return w(I)}})(e)||{invalidReason:iH};return D.token=e,D}const dH={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function fH(e,t){const{type:n,value:r}=e;if(n==="literal")return{literal:!0,val:r};const a=t[n];let o=dH[n];if(typeof o=="object"&&(o=o[a]),o)return{literal:!1,val:o}}function hH(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function pH(e,t,n){const r=e.match(t);if(r){const a={};let o=1;for(const i in n)if(bp(n,i)){const l=n[i],c=l.groups?l.groups+1:1;!l.literal&&l.token&&(a[l.token.val[0]]=l.deser(r.slice(o,o+c))),o+=c}return[r,a]}else return[r,{}]}function mH(e){const t=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return xn(e.z)||(n=zu.create(e.z)),xn(e.Z)||(n||(n=new ko(e.Z)),r=e.Z),xn(e.q)||(e.M=(e.q-1)*3+1),xn(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),xn(e.u)||(e.S=F2(e.u)),[Object.keys(e).reduce((o,i)=>{const l=t(i);return l&&(o[l]=e[i]),o},{}),n,r]}let CS=null;function gH(){return CS||(CS=At.fromMillis(1555555555555)),CS}function vH(e,t){if(e.literal)return e;const n=uo.macroTokenToFormatOpts(e.val),r=c6(n,t);return r==null||r.includes(void 0)?e:r}function l6(e,t){return Array.prototype.concat(...e.map(n=>vH(n,t)))}function u6(e,t,n){const r=l6(uo.parseFormat(n),e),a=r.map(i=>cH(i,e)),o=a.find(i=>i.invalidReason);if(o)return{input:t,tokens:r,invalidReason:o.invalidReason};{const[i,l]=hH(a),c=RegExp(i,"i"),[f,h]=pH(t,c,l),[g,y,w]=h?mH(h):[null,null,void 0];if(bp(h,"a")&&bp(h,"H"))throw new jg("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:c,rawMatches:f,matches:h,result:g,zone:y,specificOffset:w}}}function yH(e,t,n){const{result:r,zone:a,specificOffset:o,invalidReason:i}=u6(e,t,n);return[r,a,o,i]}function c6(e,t){return e?uo.create(t,e).formatDateTimeParts(gH()).map(a=>fH(a,e)):null}const d6=[0,31,59,90,120,151,181,212,243,273,304,334],f6=[0,31,60,91,121,152,182,213,244,274,305,335];function es(e,t){return new Bs("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function h6(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const a=r.getUTCDay();return a===0?7:a}function p6(e,t,n){return n+(Pv(e)?f6:d6)[t-1]}function m6(e,t){const n=Pv(e)?f6:d6,r=n.findIndex(o=>okw(t)?(l=t+1,i=1):l=t,{weekYear:l,weekNumber:i,weekday:o,...Sb(e)}}function ex(e){const{weekYear:t,weekNumber:n,weekday:r}=e,a=h6(t,1,4),o=Yg(t);let i=n*7+r-a-3,l;i<1?(l=t-1,i+=Yg(l)):i>o?(l=t+1,i-=Yg(t)):l=t;const{month:c,day:f}=m6(l,i);return{year:l,month:c,day:f,...Sb(e)}}function xS(e){const{year:t,month:n,day:r}=e,a=p6(t,n,r);return{year:t,ordinal:a,...Sb(e)}}function tx(e){const{year:t,ordinal:n}=e,{month:r,day:a}=m6(t,n);return{year:t,month:r,day:a,...Sb(e)}}function wH(e){const t=wb(e.weekYear),n=Uu(e.weekNumber,1,kw(e.weekYear)),r=Uu(e.weekday,1,7);return t?n?r?!1:es("weekday",e.weekday):es("week",e.week):es("weekYear",e.weekYear)}function bH(e){const t=wb(e.year),n=Uu(e.ordinal,1,Yg(e.year));return t?n?!1:es("ordinal",e.ordinal):es("year",e.year)}function g6(e){const t=wb(e.year),n=Uu(e.month,1,12),r=Uu(e.day,1,Mw(e.year,e.month));return t?n?r?!1:es("day",e.day):es("month",e.month):es("year",e.year)}function v6(e){const{hour:t,minute:n,second:r,millisecond:a}=e,o=Uu(t,0,23)||t===24&&n===0&&r===0&&a===0,i=Uu(n,0,59),l=Uu(r,0,59),c=Uu(a,0,999);return o?i?l?c?!1:es("millisecond",a):es("second",r):es("minute",n):es("hour",t)}const MS="Invalid DateTime",nx=864e13;function E0(e){return new Bs("unsupported zone",`the zone "${e.name}" is not supported`)}function kS(e){return e.weekData===null&&(e.weekData=wT(e.c)),e.weekData}function vg(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new At({...n,...t,old:n})}function y6(e,t,n){let r=e-t*60*1e3;const a=n.offset(r);if(t===a)return[r,t];r-=(a-t)*60*1e3;const o=n.offset(r);return a===o?[r,a]:[e-Math.min(a,o)*60*1e3,Math.max(a,o)]}function rx(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function ow(e,t,n){return y6(P2(e),t,n)}function ax(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),a=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,o={...e.c,year:r,month:a,day:Math.min(e.c.day,Mw(r,a))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},i=bt.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),l=P2(o);let[c,f]=y6(l,n,e.zone);return i!==0&&(c+=i,f=e.zone.offset(c)),{ts:c,o:f}}function yg(e,t,n,r,a,o){const{setZone:i,zone:l}=n;if(e&&Object.keys(e).length!==0){const c=t||l,f=At.fromObject(e,{...n,zone:c,specificOffset:o});return i?f:f.setZone(l)}else return At.invalid(new Bs("unparsable",`the input "${a}" can't be parsed as ${r}`))}function C0(e,t,n=!0){return e.isValid?uo.create(ur.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function NS(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Xr(e.c.year,n?6:4),t?(r+="-",r+=Xr(e.c.month),r+="-",r+=Xr(e.c.day)):(r+=Xr(e.c.month),r+=Xr(e.c.day)),r}function ox(e,t,n,r,a,o){let i=Xr(e.c.hour);return t?(i+=":",i+=Xr(e.c.minute),(e.c.second!==0||!n)&&(i+=":")):i+=Xr(e.c.minute),(e.c.second!==0||!n)&&(i+=Xr(e.c.second),(e.c.millisecond!==0||!r)&&(i+=".",i+=Xr(e.c.millisecond,3))),a&&(e.isOffsetFixed&&e.offset===0&&!o?i+="Z":e.o<0?(i+="-",i+=Xr(Math.trunc(-e.o/60)),i+=":",i+=Xr(Math.trunc(-e.o%60))):(i+="+",i+=Xr(Math.trunc(e.o/60)),i+=":",i+=Xr(Math.trunc(e.o%60)))),o&&(i+="["+e.zone.ianaName+"]"),i}const w6={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},SH={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},DH={ordinal:1,hour:0,minute:0,second:0,millisecond:0},b6=["year","month","day","hour","minute","second","millisecond"],TH=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],IH=["year","ordinal","hour","minute","second","millisecond"];function ix(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new DA(e);return t}function sx(e,t){const n=Gc(t.zone,Qr.defaultZone),r=ur.fromObject(t),a=Qr.now();let o,i;if(xn(e.year))o=a;else{for(const f of b6)xn(e[f])&&(e[f]=w6[f]);const l=g6(e)||v6(e);if(l)return At.invalid(l);const c=n.offset(a);[o,i]=ow(e,c,n)}return new At({ts:o,zone:n,loc:r,o:i})}function lx(e,t,n){const r=xn(n.round)?!0:n.round,a=(i,l)=>(i=O2(i,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(i,l)),o=i=>n.calendary?t.hasSame(e,i)?0:t.startOf(i).diff(e.startOf(i),i).get(i):t.diff(e,i).get(i);if(n.unit)return a(o(n.unit),n.unit);for(const i of n.units){const l=o(i);if(Math.abs(l)>=1)return a(l,i)}return a(e>t?-0:0,n.units[n.units.length-1])}function ux(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}class At{constructor(t){const n=t.zone||Qr.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new Bs("invalid input"):null)||(n.isValid?null:E0(n));this.ts=xn(t.ts)?Qr.now():t.ts;let a=null,o=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[a,o]=[t.old.c,t.old.o];else{const l=n.offset(this.ts);a=rx(this.ts,l),r=Number.isNaN(a.year)?new Bs("invalid input"):null,a=r?null:a,o=r?null:l}this._zone=n,this.loc=t.loc||ur.create(),this.invalid=r,this.weekData=null,this.c=a,this.o=o,this.isLuxonDateTime=!0}static now(){return new At({})}static local(){const[t,n]=ux(arguments),[r,a,o,i,l,c,f]=n;return sx({year:r,month:a,day:o,hour:i,minute:l,second:c,millisecond:f},t)}static utc(){const[t,n]=ux(arguments),[r,a,o,i,l,c,f]=n;return t.zone=ko.utcInstance,sx({year:r,month:a,day:o,hour:i,minute:l,second:c,millisecond:f},t)}static fromJSDate(t,n={}){const r=G_(t)?t.valueOf():NaN;if(Number.isNaN(r))return At.invalid("invalid input");const a=Gc(n.zone,Qr.defaultZone);return a.isValid?new At({ts:r,zone:a,loc:ur.fromObject(n)}):At.invalid(E0(a))}static fromMillis(t,n={}){if(hf(t))return t<-nx||t>nx?At.invalid("Timestamp out of range"):new At({ts:t,zone:Gc(n.zone,Qr.defaultZone),loc:ur.fromObject(n)});throw new Xi(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(hf(t))return new At({ts:t*1e3,zone:Gc(n.zone,Qr.defaultZone),loc:ur.fromObject(n)});throw new Xi("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Gc(n.zone,Qr.defaultZone);if(!r.isValid)return At.invalid(E0(r));const a=Qr.now(),o=xn(n.specificOffset)?r.offset(a):n.specificOffset,i=Nw(t,ix),l=!xn(i.ordinal),c=!xn(i.year),f=!xn(i.month)||!xn(i.day),h=c||f,g=i.weekYear||i.weekNumber,y=ur.fromObject(n);if((h||l)&&g)throw new jg("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&l)throw new jg("Can't mix ordinal dates with month/day");const w=g||i.weekday&&!h;let S,D,I=rx(a,o);w?(S=TH,D=SH,I=wT(I)):l?(S=IH,D=DH,I=xS(I)):(S=b6,D=w6);let M=!1;for(const V of S){const U=i[V];xn(U)?M?i[V]=D[V]:i[V]=I[V]:M=!0}const N=w?wH(i):l?bH(i):g6(i),B=N||v6(i);if(B)return At.invalid(B);const k=w?ex(i):l?tx(i):i,[R,L]=ow(k,o,r),_=new At({ts:R,zone:r,o:L,loc:y});return i.weekday&&h&&t.weekday!==_.weekday?At.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${_.toISO()}`):_}static fromISO(t,n={}){const[r,a]=_B(t);return yg(r,a,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,a]=BB(t);return yg(r,a,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,a]=HB(t);return yg(r,a,n,"HTTP",n)}static fromFormat(t,n,r={}){if(xn(t)||xn(n))throw new Xi("fromFormat requires an input string and a format");const{locale:a=null,numberingSystem:o=null}=r,i=ur.fromOpts({locale:a,numberingSystem:o,defaultToEN:!0}),[l,c,f,h]=yH(i,t,n);return h?At.invalid(h):yg(l,c,r,`format ${n}`,t,f)}static fromString(t,n,r={}){return At.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,a]=ZB(t);return yg(r,a,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new Xi("need to specify a reason the DateTime is invalid");const r=t instanceof Bs?t:new Bs(t,n);if(Qr.throwOnInvalid)throw new C_(r);return new At({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=c6(t,ur.fromObject(n));return r?r.map(a=>a?a.val:null).join(""):null}static expandFormat(t,n={}){return l6(uo.parseFormat(t),ur.fromObject(n)).map(a=>a.val).join("")}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?kS(this).weekYear:NaN}get weekNumber(){return this.isValid?kS(this).weekNumber:NaN}get weekday(){return this.isValid?kS(this).weekday:NaN}get ordinal(){return this.isValid?xS(this.c).ordinal:NaN}get monthShort(){return this.isValid?I0.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?I0.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?I0.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?I0.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Pv(this.year)}get daysInMonth(){return Mw(this.year,this.month)}get daysInYear(){return this.isValid?Yg(this.year):NaN}get weeksInWeekYear(){return this.isValid?kw(this.weekYear):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:a}=uo.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:a}}toUTC(t=0,n={}){return this.setZone(ko.instance(t),n)}toLocal(){return this.setZone(Qr.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Gc(t,Qr.defaultZone),t.equals(this.zone))return this;if(t.isValid){let a=this.ts;if(n||r){const o=t.offset(this.ts),i=this.toObject();[a]=ow(i,o,t)}return vg(this,{ts:a,zone:t})}else return At.invalid(E0(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const a=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return vg(this,{loc:a})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Nw(t,ix),r=!xn(n.weekYear)||!xn(n.weekNumber)||!xn(n.weekday),a=!xn(n.ordinal),o=!xn(n.year),i=!xn(n.month)||!xn(n.day),l=o||i,c=n.weekYear||n.weekNumber;if((l||a)&&c)throw new jg("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(i&&a)throw new jg("Can't mix ordinal dates with month/day");let f;r?f=ex({...wT(this.c),...n}):xn(n.ordinal)?(f={...this.toObject(),...n},xn(n.day)&&(f.day=Math.min(Mw(f.year,f.month),f.day))):f=tx({...xS(this.c),...n});const[h,g]=ow(f,this.o,this.zone);return vg(this,{ts:h,o:g})}plus(t){if(!this.isValid)return this;const n=bt.fromDurationLike(t);return vg(this,ax(this,n))}minus(t){if(!this.isValid)return this;const n=bt.fromDurationLike(t).negate();return vg(this,ax(this,n))}startOf(t){if(!this.isValid)return this;const n={},r=bt.normalizeUnit(t);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(r==="weeks"&&(n.weekday=1),r==="quarters"){const a=Math.ceil(this.month/3);n.month=(a-1)*3+1}return this.set(n)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,n={}){return this.isValid?uo.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):MS}toLocaleString(t=xw,n={}){return this.isValid?uo.create(this.loc.clone(n),t).formatDateTime(this):MS}toLocaleParts(t={}){return this.isValid?uo.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO({format:t="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:a=!0,extendedZone:o=!1}={}){if(!this.isValid)return null;const i=t==="extended";let l=NS(this,i);return l+="T",l+=ox(this,i,n,r,a,o),l}toISODate({format:t="extended"}={}){return this.isValid?NS(this,t==="extended"):null}toISOWeekDate(){return C0(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:a=!1,extendedZone:o=!1,format:i="extended"}={}){return this.isValid?(a?"T":"")+ox(this,i==="extended",n,t,r,o):null}toRFC2822(){return C0(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return C0(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?NS(this,!0):null}toSQLTime({includeOffset:t=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let a="HH:mm:ss.SSS";return(n||t)&&(r&&(a+=" "),n?a+="z":t&&(a+="ZZ")),C0(this,a,!0)}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():MS}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n={...this.c};return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return bt.invalid("created by diffing an invalid DateTime");const a={locale:this.locale,numberingSystem:this.numberingSystem,...r},o=J_(n).map(bt.normalizeUnit),i=t.valueOf()>this.valueOf(),l=i?this:t,c=i?t:this,f=rH(l,c,o,a);return i?f.negate():f}diffNow(t="milliseconds",n={}){return this.diff(At.now(),t,n)}until(t){return this.isValid?Or.fromDateTimes(this,t):this}hasSame(t,n){if(!this.isValid)return!1;const r=t.valueOf(),a=this.setZone(t.zone,{keepLocalTime:!0});return a.startOf(n)<=r&&r<=a.endOf(n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||At.fromObject({},{zone:this.zone}),r=t.padding?thisn.valueOf(),Math.min)}static max(...t){if(!t.every(At.isDateTime))throw new Xi("max requires all arguments be DateTimes");return ZC(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:a=null,numberingSystem:o=null}=r,i=ur.fromOpts({locale:a,numberingSystem:o,defaultToEN:!0});return u6(i,t,n)}static fromStringExplain(t,n,r={}){return At.fromFormatExplain(t,n,r)}static get DATE_SHORT(){return xw}static get DATE_MED(){return TA}static get DATE_MED_WITH_WEEKDAY(){return k_}static get DATE_FULL(){return IA}static get DATE_HUGE(){return EA}static get TIME_SIMPLE(){return CA}static get TIME_WITH_SECONDS(){return xA}static get TIME_WITH_SHORT_OFFSET(){return MA}static get TIME_WITH_LONG_OFFSET(){return kA}static get TIME_24_SIMPLE(){return NA}static get TIME_24_WITH_SECONDS(){return AA}static get TIME_24_WITH_SHORT_OFFSET(){return FA}static get TIME_24_WITH_LONG_OFFSET(){return OA}static get DATETIME_SHORT(){return PA}static get DATETIME_SHORT_WITH_SECONDS(){return jA}static get DATETIME_MED(){return LA}static get DATETIME_MED_WITH_SECONDS(){return RA}static get DATETIME_MED_WITH_WEEKDAY(){return N_}static get DATETIME_FULL(){return _A}static get DATETIME_FULL_WITH_SECONDS(){return BA}static get DATETIME_HUGE(){return HA}static get DATETIME_HUGE_WITH_SECONDS(){return UA}}function wg(e){if(At.isDateTime(e))return e;if(e&&e.valueOf&&hf(e.valueOf()))return At.fromJSDate(e);if(e&&typeof e=="object")return At.fromObject(e);throw new Xi(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const B2={renderNullAs:"\\-",taskCompletionTracking:!1,taskCompletionUseEmojiShorthand:!1,taskCompletionText:"completion",taskCompletionDateFormat:"yyyy-MM-dd",recursiveSubTaskCompletion:!1,warnOnEmptyResult:!0,refreshEnabled:!0,refreshInterval:2500,defaultDateFormat:"MMMM dd, yyyy",defaultDateTimeFormat:"h:mm a - MMMM dd, yyyy",maxRecursiveRenderDepth:4,tableIdColumnName:"File",tableGroupColumnName:"Group",showResultCount:!0},EH={allowHtml:!0};({...B2,...EH});class H2{constructor(t){this.value=t,this.successful=!0}map(t){return new H2(t(this.value))}flatMap(t){return t(this.value)}mapErr(t){return this}bimap(t,n){return this.map(t)}orElse(t){return this.value}cast(){return this}orElseThrow(t){return this.value}}class U2{constructor(t){this.error=t,this.successful=!1}map(t){return this}flatMap(t){return this}mapErr(t){return new U2(t(this.error))}bimap(t,n){return this.mapErr(n)}orElse(t){return t}cast(){return this}orElseThrow(t){throw t?new Error(t(this.error)):new Error(""+this.error)}}var Aw;(function(e){function t(o){return new H2(o)}e.success=t;function n(o){return new U2(o)}e.failure=n;function r(o,i,l){return o.successful?i.successful?l(o.value,i.value):n(i.error):n(o.error)}e.flatMap2=r;function a(o,i,l){return r(o,i,(c,f)=>t(l(c,f)))}e.map2=a})(Aw||(Aw={}));var CH=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof dr<"u"?dr:typeof self<"u"?self:{},pe={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof self<"u"?self:CH,function(){return function(n){var r={};function a(o){if(r[o])return r[o].exports;var i=r[o]={i:o,l:!1,exports:{}};return n[o].call(i.exports,i,i.exports,a),i.l=!0,i.exports}return a.m=n,a.c=r,a.d=function(o,i,l){a.o(o,i)||Object.defineProperty(o,i,{configurable:!1,enumerable:!0,get:l})},a.r=function(o){Object.defineProperty(o,"__esModule",{value:!0})},a.n=function(o){var i=o&&o.__esModule?function(){return o.default}:function(){return o};return a.d(i,"a",i),i},a.o=function(o,i){return Object.prototype.hasOwnProperty.call(o,i)},a.p="",a(a.s=0)}([function(n,r,a){function o(te){if(!(this instanceof o))return new o(te);this._=te}var i=o.prototype;function l(te,me){for(var xe=0;xe>7),buf:function(He){var Qe=c(function(tt,kt,Ut,On){return tt.concat(Ut===On.length-1?Buffer.from([kt,0]).readUInt16BE(0):On.readUInt16BE(Ut))},[],He);return Buffer.from(f(function(tt){return(tt<<1&65535)>>8},Qe))}(xe.buf)}}),xe}function g(){return typeof Buffer<"u"}function y(){if(!g())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function w(te){y();var me=c(function(Qe,tt){return Qe+tt},0,te);if(me%8!=0)throw new Error("The bits ["+te.join(", ")+"] add up to "+me+" which is not an even number of bytes; the total should be divisible by 8");var xe,Ue=me/8,He=(xe=function(Qe){return Qe>48},c(function(Qe,tt){return Qe||(xe(tt)?tt:Qe)},null,te));if(He)throw new Error(He+" bit range requested exceeds 48 bit (6 byte) Number max.");return new o(function(Qe,tt){var kt=Ue+tt;return kt>Qe.length?V(tt,Ue.toString()+" bytes"):_(kt,c(function(Ut,On){var yn=h(On,Ut.buf);return{coll:Ut.coll.concat(yn.v),buf:yn.buf}},{coll:[],buf:Qe.slice(tt,kt)},te).coll)})}function S(te,me){return new o(function(xe,Ue){return y(),Ue+me>xe.length?V(Ue,me+" bytes for "+te):_(Ue+me,xe.slice(Ue,Ue+me))})}function D(te,me){if(typeof(xe=me)!="number"||Math.floor(xe)!==xe||me<0||me>6)throw new Error(te+" requires integer length in range [0, 6].");var xe}function I(te){return D("uintBE",te),S("uintBE("+te+")",te).map(function(me){return me.readUIntBE(0,te)})}function M(te){return D("uintLE",te),S("uintLE("+te+")",te).map(function(me){return me.readUIntLE(0,te)})}function N(te){return D("intBE",te),S("intBE("+te+")",te).map(function(me){return me.readIntBE(0,te)})}function B(te){return D("intLE",te),S("intLE("+te+")",te).map(function(me){return me.readIntLE(0,te)})}function k(te){return te instanceof o}function R(te){return{}.toString.call(te)==="[object Array]"}function L(te){return g()&&Buffer.isBuffer(te)}function _(te,me){return{status:!0,index:te,value:me,furthest:-1,expected:[]}}function V(te,me){return R(me)||(me=[me]),{status:!1,index:-1,value:null,furthest:te,expected:me}}function U(te,me){if(!me||te.furthest>me.furthest)return te;var xe=te.furthest===me.furthest?function(Ue,He){if(function(){if(o._supportsSet!==void 0)return o._supportsSet;var yr=typeof Set<"u";return o._supportsSet=yr,yr}()&&Array.from){for(var Qe=new Set(Ue),tt=0;tt=0;){if(tt in xe){Ue=xe[tt].line,Qe===0&&(Qe=xe[tt].lineStart);break}(te.charAt(tt)===`
-`||te.charAt(tt)==="\r"&&te.charAt(tt+1)!==`
-`)&&(He++,Qe===0&&(Qe=tt+1)),tt--}var kt=Ue+He,Ut=me-Qe;return xe[me]={line:kt,lineStart:Qe},{offset:me,line:kt+1,column:Ut+1}}function G(te){if(!k(te))throw new Error("not a parser: "+te)}function re(te,me){return typeof te=="string"?te.charAt(me):te[me]}function de(te){if(typeof te!="number")throw new Error("not a number: "+te)}function fe(te){if(typeof te!="function")throw new Error("not a function: "+te)}function $(te){if(typeof te!="string")throw new Error("not a string: "+te)}var he=2,se=3,ue=8,X=5*ue,oe=4*ue,De=" ";function je(te,me){return new Array(me+1).join(te)}function Re(te,me,xe){var Ue=me-te.length;return Ue<=0?te:je(xe,Ue)+te}function Fe(te,me,xe,Ue){return{from:te-me>0?te-me:0,to:te+xe>Ue?Ue:te+xe}}function Be(te,me){var xe,Ue,He,Qe,tt,kt=me.index,Ut=kt.offset,On=1;if(Ut===te.length)return"Got the end of the input";if(L(te)){var yn=Ut-Ut%ue,Cr=Ut-yn,Jn=Fe(yn,X,oe+ue,te.length),yr=f(function(Nn){return f(function(Aa){return Re(Aa.toString(16),2,"0")},Nn)},function(Nn,Aa){var Fa=Nn.length,Zr=[],fo=0;if(Fa<=Aa)return[Nn.slice()];for(var Oa=0;Oa=4&&(xe+=1),On=2,He=f(function(Nn){return Nn.length<=4?Nn.join(" "):Nn.slice(0,4).join(" ")+" "+Nn.slice(4).join(" ")},yr),(tt=(8*(Qe.to>0?Qe.to-1:Qe.to)).toString(16).length)<2&&(tt=2)}else{var ta=te.split(/\r\n|[\n\r\u2028\u2029]/);xe=kt.column-1,Ue=kt.line-1,Qe=Fe(Ue,he,se,ta.length),He=ta.slice(Qe.from,Qe.to),tt=Qe.to.toString().length}var Pi=Ue-Qe.from;return L(te)&&(tt=(8*(Qe.to>0?Qe.to-1:Qe.to)).toString(16).length)<2&&(tt=2),c(function(Nn,Aa,Fa){var Zr,fo=Fa===Pi,Oa=fo?"> ":De;return Zr=L(te)?Re((8*(Qe.from+Fa)).toString(16),tt,"0"):Re((Qe.from+Fa+1).toString(),tt," "),[].concat(Nn,[Oa+Zr+" | "+Aa],fo?[De+je(" ",tt)+" | "+Re("",xe," ")+je("^",On)]:[])},[],He).join(`
-`)}function Xe(te,me){return[`
-`,"-- PARSING FAILED "+je("-",50),`
-
-`,Be(te,me),`
-
-`,(xe=me.expected,xe.length===1?`Expected:
-
-`+xe[0]:`Expected one of the following:
-
-`+xe.join(", ")),`
-`].join("");var xe}function Ze(te){return te.flags!==void 0?te.flags:[te.global?"g":"",te.ignoreCase?"i":"",te.multiline?"m":"",te.unicode?"u":"",te.sticky?"y":""].join("")}function st(){for(var te=[].slice.call(arguments),me=te.length,xe=0;xe=2?de(me):me=0;var xe=function(He){return RegExp("^(?:"+He.source+")",Ze(He))}(te),Ue=""+te;return o(function(He,Qe){var tt=xe.exec(He.slice(Qe));if(tt){if(0<=me&&me<=tt.length){var kt=tt[0],Ut=tt[me];return _(Qe+kt.length,Ut)}return V(Qe,"valid match group (0 to "+tt.length+") in "+Ue)}return V(Qe,Ue)})}function St(te){return o(function(me,xe){return _(xe,te)})}function Tt(te){return o(function(me,xe){return V(xe,te)})}function Gt(te){if(k(te))return o(function(me,xe){var Ue=te._(me,xe);return Ue.index=xe,Ue.value="",Ue});if(typeof te=="string")return Gt(nt(te));if(te instanceof RegExp)return Gt(ht(te));throw new Error("not a string, regexp, or parser: "+te)}function _t(te){return G(te),o(function(me,xe){var Ue=te._(me,xe),He=me.slice(xe,Ue.index);return Ue.status?V(xe,'not "'+He+'"'):_(xe,null)})}function Vt(te){return fe(te),o(function(me,xe){var Ue=re(me,xe);return xe=te.length?V(me,"any character/byte"):_(me+1,re(te,me))}),Dn=o(function(te,me){return _(te.length,te.slice(me))}),Er=o(function(te,me){return me=0}).desc(me)},o.optWhitespace=ln,o.Parser=o,o.range=function(te,me){return Vt(function(xe){return te<=xe&&xe<=me}).desc(te+"-"+me)},o.regex=ht,o.regexp=ht,o.sepBy=_e,o.sepBy1=et,o.seq=st,o.seqMap=Ct,o.seqObj=function(){for(var te,me={},xe=0,Ue=(te=arguments,Array.prototype.slice.call(te)),He=Ue.length,Qe=0;Qe255)throw new Error("Value specified to byte constructor ("+te+"=0x"+te.toString(16)+") is larger in value than a single byte.");var me=(te>15?"0x":"0x0")+te.toString(16);return o(function(xe,Ue){var He=re(xe,Ue);return He===te?_(Ue+1,He):V(Ue,me)})},buffer:function(te){return S("buffer",te).map(function(me){return Buffer.from(me)})},encodedString:function(te,me){return S("string",me).map(function(xe){return xe.toString(te)})},uintBE:I,uint8BE:I(1),uint16BE:I(2),uint32BE:I(4),uintLE:M,uint8LE:M(1),uint16LE:M(2),uint32LE:M(4),intBE:N,int8BE:N(1),int16BE:N(2),int32BE:N(4),intLE:B,int8LE:B(1),int16LE:B(2),int32LE:B(4),floatBE:S("floatBE",4).map(function(te){return te.readFloatBE(0)}),floatLE:S("floatLE",4).map(function(te){return te.readFloatLE(0)}),doubleBE:S("doubleBE",8).map(function(te){return te.readDoubleBE(0)}),doubleLE:S("doubleLE",8).map(function(te){return te.readDoubleLE(0)})},n.exports=o}])})})(pe);var Y2=()=>/(?:[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDD-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF6](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC2\uDED0-\uDED9\uDEE0-\uDEE7]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?))/g;function S6(e){return e==null?e:e.shiftToAll().normalize()}function cx(e){return e.includes("/")&&(e=e.substring(e.lastIndexOf("/")+1)),e.endsWith(".md")&&(e=e.substring(0,e.length-3)),e}pe.exports.alt(pe.exports.regex(new RegExp(Y2(),"")),pe.exports.regex(/[0-9\p{Letter}_-]+/u).map(e=>e.toLocaleLowerCase()),pe.exports.whitespace.map(e=>"-"),pe.exports.any.map(e=>"")).many().map(e=>e.join(""));const xH=pe.exports.alt(pe.exports.regex(new RegExp(Y2(),"")),pe.exports.regex(/[0-9\p{Letter}_-]+/u),pe.exports.whitespace.map(e=>" "),pe.exports.any.map(e=>" ")).many().map(e=>e.join("").split(/\s+/).join(" ").trim());function MH(e){return xH.tryParse(e)}function kH(e){return e=S6(e),e=bt.fromObject(Object.fromEntries(Object.entries(e.toObject()).filter(([,t])=>t>0))),e.toHuman()}var ev;(function(e){function t(k,R=B2,L=!1){let _=n(k);if(!_)return R.renderNullAs;switch(_.type){case"null":return R.renderNullAs;case"string":return _.value;case"number":case"boolean":return""+_.value;case"html":return _.value.outerHTML;case"widget":return _.value.markdown();case"link":return _.value.markdown();case"function":return"";case"array":let V="";return L&&(V+="["),V+=_.value.map(U=>t(U,R,!0)).join(", "),L&&(V+="]"),V;case"object":return"{ "+Object.entries(_.value).map(U=>U[0]+": "+t(U[1],R,!0)).join(", ")+" }";case"date":return _.value.second==0&&_.value.hour==0&&_.value.minute==0?_.value.toFormat(R.defaultDateFormat):_.value.toFormat(R.defaultDateTimeFormat);case"duration":return kH(_.value)}}e.toString=t;function n(k){return y(k)?{type:"null",value:k}:f(k)?{type:"number",value:k}:c(k)?{type:"string",value:k}:S(k)?{type:"boolean",value:k}:g(k)?{type:"duration",value:k}:h(k)?{type:"date",value:k}:I(k)?{type:"widget",value:k}:w(k)?{type:"array",value:k}:D(k)?{type:"link",value:k}:B(k)?{type:"function",value:k}:M(k)?{type:"html",value:k}:N(k)?{type:"object",value:k}:void 0}e.wrapValue=n;function r(k,R){if(N(k)){let L={};for(let[_,V]of Object.entries(k))L[_]=r(V,R);return L}else if(w(k)){let L=[];for(let _ of k)L.push(r(_,R));return L}else return R(k)}e.mapLeaves=r;function a(k,R,L){var _,V;if(k===void 0&&(k=null),R===void 0&&(R=null),k===null&&R===null)return 0;if(k===null)return-1;if(R===null)return 1;let U=n(k),Z=n(R);if(U===void 0&&Z===void 0)return 0;if(U===void 0)return-1;if(Z===void 0)return 1;if(U.type!=Z.type)return U.type.localeCompare(Z.type);if(U.value===Z.value)return 0;switch(U.type){case"string":return U.value.localeCompare(Z.value);case"number":return U.valueje),de=re(Q.path).localeCompare(re(G.path));if(de!=0)return de;let fe=Q.type.localeCompare(G.type);return fe!=0?fe:Q.subpath&&!G.subpath?1:!Q.subpath&&G.subpath?-1:!Q.subpath&&!G.subpath?0:((_=Q.subpath)!==null&&_!==void 0?_:"").localeCompare((V=G.subpath)!==null&&V!==void 0?V:"");case"date":return U.value0;case"boolean":return R.value;case"link":return!!R.value.path;case"date":return R.value.toMillis()!=0;case"duration":return R.value.as("seconds")!=0;case"object":return Object.keys(R.value).length>0;case"array":return R.value.length>0;case"null":return!1;case"html":case"widget":case"function":return!0}}e.isTruthy=i;function l(k){if(k==null)return k;if(e.isArray(k))return[].concat(k.map(R=>l(R)));if(e.isObject(k)){let R={};for(let[L,_]of Object.entries(k))R[L]=l(_);return R}else return k}e.deepCopy=l;function c(k){return typeof k=="string"}e.isString=c;function f(k){return typeof k=="number"}e.isNumber=f;function h(k){return k instanceof At}e.isDate=h;function g(k){return k instanceof bt}e.isDuration=g;function y(k){return k==null}e.isNull=y;function w(k){return Array.isArray(k)}e.isArray=w;function S(k){return typeof k=="boolean"}e.isBoolean=S;function D(k){return k instanceof so}e.isLink=D;function I(k){return k instanceof z2}e.isWidget=I;function M(k){return typeof HTMLElement<"u"?k instanceof HTMLElement:!1}e.isHtml=M;function N(k){return typeof k=="object"&&!M(k)&&!I(k)&&!w(k)&&!g(k)&&!h(k)&&!D(k)&&k!==void 0&&!y(k)}e.isObject=N;function B(k){return typeof k=="function"}e.isFunction=B})(ev||(ev={}));var dx;(function(e){function t(a){return ev.isObject(a)&&Object.keys(a).length==2&&"key"in a&&"rows"in a}e.isElementGroup=t;function n(a){for(let o of a)if(!t(o))return!1;return!0}e.isGrouping=n;function r(a){if(n(a)){let o=0;for(let i of a)o+=r(i.rows);return o}else return a.length}e.count=r})(dx||(dx={}));class so{constructor(t){Object.assign(this,t)}static file(t,n=!1,r){return new so({path:t,embed:n,display:r,subpath:void 0,type:"file"})}static infer(t,n=!1,r){if(t.includes("#^")){let a=t.split("#^");return so.block(a[0],a[1],n,r)}else if(t.includes("#")){let a=t.split("#");return so.header(a[0],a[1],n,r)}else return so.file(t,n,r)}static header(t,n,r,a){return new so({path:t,embed:r,display:a,subpath:MH(n),type:"header"})}static block(t,n,r,a){return new so({path:t,embed:r,display:a,subpath:n,type:"block"})}static fromObject(t){return new so(t)}equals(t){return t==null||t==null?!1:this.path==t.path&&this.type==t.type&&this.subpath==t.subpath}toString(){return this.markdown()}toObject(){return{path:this.path,type:this.type,subpath:this.subpath,display:this.display,embed:this.embed}}withPath(t){return new so(Object.assign({},this,{path:t}))}withDisplay(t){return new so(Object.assign({},this,{display:t}))}withHeader(t){return so.header(this.path,t,this.embed,this.display)}toFile(){return so.file(this.path,this.embed,this.display)}toEmbed(){if(this.embed)return this;{let t=new so(this);return t.embed=!0,t}}fromEmbed(){if(this.embed){let t=new so(this);return t.embed=!1,t}else return this}markdown(){let t=(this.embed?"!":"")+"[["+this.obsidianLink();return this.display?t+="|"+this.display:(t+="|"+cx(this.path),(this.type=="header"||this.type=="block")&&(t+=" > "+this.subpath)),t+="]]",t}obsidianLink(){var t,n;const r=this.path.replace("|","\\|");return this.type=="header"?r+"#"+((t=this.subpath)===null||t===void 0?void 0:t.replace("|","\\|")):this.type=="block"?r+"#^"+((n=this.subpath)===null||n===void 0?void 0:n.replace("|","\\|")):r}fileName(){return cx(this.path).replace(".md","")}}class z2{constructor(t){this.$widget=t}}class NH extends z2{constructor(t,n){super("dataview:list-pair"),this.key=t,this.value=n}markdown(){return`${ev.toString(this.key)}: ${ev.toString(this.value)}`}}class AH extends z2{constructor(t,n){super("dataview:external-link"),this.url=t,this.display=n}markdown(){var t;return`[${(t=this.display)!==null&&t!==void 0?t:this.url}](${this.url})`}}var fx;(function(e){function t(i,l){return new NH(i,l)}e.listPair=t;function n(i,l){return new AH(i,l)}e.externalLink=n;function r(i){return i.$widget==="dataview:list-pair"}e.isListPair=r;function a(i){return i.$widget==="dataview:external-link"}e.isExternalLink=a;function o(i){return r(i)||a(i)}e.isBuiltin=o})(fx||(fx={}));var Fr;(function(e){function t(y){return{type:"variable",name:y}}e.variable=t;function n(y){return{type:"literal",value:y}}e.literal=n;function r(y,w,S){return{type:"binaryop",left:y,op:w,right:S}}e.binaryOp=r;function a(y,w){return{type:"index",object:y,index:w}}e.index=a;function o(y){let w=y.split("."),S=e.variable(w[0]);for(let D=1;D"||y==">="||y=="!="||y=="="}e.isCompareOp=g,e.NULL=e.literal(null)})(Fr||(Fr={}));var Hl;(function(e){function t(h){return{type:"tag",tag:h}}e.tag=t;function n(h){return{type:"csv",path:h}}e.csv=n;function r(h){return{type:"folder",folder:h}}e.folder=r;function a(h,g){return{type:"link",file:h,direction:g?"incoming":"outgoing"}}e.link=a;function o(h,g,y){return{type:"binaryop",left:h,op:g,right:y}}e.binaryOp=o;function i(h,g){return{type:"binaryop",left:h,op:"&",right:g}}e.and=i;function l(h,g){return{type:"binaryop",left:h,op:"|",right:g}}e.or=l;function c(h){return{type:"negate",child:h}}e.negate=c;function f(){return{type:"empty"}}e.empty=f})(Hl||(Hl={}));const hx=new RegExp(Y2(),""),bT={year:bt.fromObject({years:1}),years:bt.fromObject({years:1}),yr:bt.fromObject({years:1}),yrs:bt.fromObject({years:1}),month:bt.fromObject({months:1}),months:bt.fromObject({months:1}),mo:bt.fromObject({months:1}),mos:bt.fromObject({months:1}),week:bt.fromObject({weeks:1}),weeks:bt.fromObject({weeks:1}),wk:bt.fromObject({weeks:1}),wks:bt.fromObject({weeks:1}),w:bt.fromObject({weeks:1}),day:bt.fromObject({days:1}),days:bt.fromObject({days:1}),d:bt.fromObject({days:1}),hour:bt.fromObject({hours:1}),hours:bt.fromObject({hours:1}),hr:bt.fromObject({hours:1}),hrs:bt.fromObject({hours:1}),h:bt.fromObject({hours:1}),minute:bt.fromObject({minutes:1}),minutes:bt.fromObject({minutes:1}),min:bt.fromObject({minutes:1}),mins:bt.fromObject({minutes:1}),m:bt.fromObject({minutes:1}),second:bt.fromObject({seconds:1}),seconds:bt.fromObject({seconds:1}),sec:bt.fromObject({seconds:1}),secs:bt.fromObject({seconds:1}),s:bt.fromObject({seconds:1})},ST={now:()=>At.local(),today:()=>At.local().startOf("day"),yesterday:()=>At.local().startOf("day").minus(bt.fromObject({days:1})),tomorrow:()=>At.local().startOf("day").plus(bt.fromObject({days:1})),sow:()=>At.local().startOf("week"),"start-of-week":()=>At.local().startOf("week"),eow:()=>At.local().endOf("week"),"end-of-week":()=>At.local().endOf("week"),soy:()=>At.local().startOf("year"),"start-of-year":()=>At.local().startOf("year"),eoy:()=>At.local().endOf("year"),"end-of-year":()=>At.local().endOf("year"),som:()=>At.local().startOf("month"),"start-of-month":()=>At.local().startOf("month"),eom:()=>At.local().endOf("month"),"end-of-month":()=>At.local().endOf("month")},DT=["FROM","WHERE","LIMIT","GROUP","FLATTEN"];function FH(e){let t=-1;for(;(t=e.indexOf("|",t+1))>=0;)if(!(t>0&&e[t-1]=="\\"))return[e.substring(0,t).replace(/\\\|/g,"|"),e.substring(t+1)];return[e.replace(/\\\|/g,"|"),void 0]}function OH(e){let[t,n]=FH(e);return so.infer(t,!1,n)}function bg(e,t,n){return pe.exports.seqMap(e,pe.exports.seq(pe.exports.optWhitespace,t,pe.exports.optWhitespace,e).many(),(r,a)=>{if(a.length==0)return r;let o=n(r,a[0][1],a[0][3]);for(let i=1;i(a,o)=>{let i=e._(a,o);if(!i.status)return i;for(let l of t){let c=l(i.value)._(a,i.index);if(!c.status)return i;i=c}return i})}const Ps=pe.exports.createLanguage({number:e=>pe.exports.regexp(/-?[0-9]+(\.[0-9]+)?/).map(t=>Number.parseFloat(t)).desc("number"),string:e=>pe.exports.string('"').then(pe.exports.alt(e.escapeCharacter,pe.exports.noneOf('"\\')).atLeast(0).map(t=>t.join(""))).skip(pe.exports.string('"')).desc("string"),escapeCharacter:e=>pe.exports.string("\\").then(pe.exports.any).map(t=>t==='"'?'"':t==="\\"?"\\":"\\"+t),bool:e=>pe.exports.regexp(/true|false|True|False/).map(t=>t.toLowerCase()=="true").desc("boolean ('true' or 'false')"),tag:e=>pe.exports.seqMap(pe.exports.string("#"),pe.exports.alt(pe.exports.regexp(/[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]/).desc("text")).many(),(t,n)=>t+n.join("")).desc("tag ('#hello/stuff')"),identifier:e=>pe.exports.seqMap(pe.exports.alt(pe.exports.regexp(new RegExp("\\p{Letter}","u")),pe.exports.regexp(hx).desc("text")),pe.exports.alt(pe.exports.regexp(/[0-9\p{Letter}_-]/u),pe.exports.regexp(hx).desc("text")).many(),(t,n)=>t+n.join("")).desc("variable identifier"),link:e=>pe.exports.regexp(/\[\[([^\[\]]*?)\]\]/u,1).map(t=>OH(t)).desc("file link"),embedLink:e=>pe.exports.seqMap(pe.exports.string("!").atMost(1),e.link,(t,n)=>(t.length>0&&(n.embed=!0),n)).desc("file link"),binaryPlusMinus:e=>pe.exports.regexp(/\+|-/).map(t=>t).desc("'+' or '-'"),binaryMulDiv:e=>pe.exports.regexp(/\*|\/|%/).map(t=>t).desc("'*' or '/' or '%'"),binaryCompareOp:e=>pe.exports.regexp(/>=|<=|!=|>|<|=/).map(t=>t).desc("'>=' or '<=' or '!=' or '=' or '>' or '<'"),binaryBooleanOp:e=>pe.exports.regexp(/and|or|&|\|/i).map(t=>t.toLowerCase()=="and"?"&":t.toLowerCase()=="or"?"|":t).desc("'and' or 'or'"),rootDate:e=>pe.exports.seqMap(pe.exports.regexp(/\d{4}/),pe.exports.string("-"),pe.exports.regexp(/\d{2}/),(t,n,r)=>At.fromObject({year:Number.parseInt(t),month:Number.parseInt(r)})).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),dateShorthand:e=>pe.exports.alt(...Object.keys(ST).sort((t,n)=>n.length-t.length).map(pe.exports.string)),date:e=>PH(e.rootDate,t=>pe.exports.seqMap(pe.exports.string("-"),pe.exports.regexp(/\d{2}/),(n,r)=>t.set({day:Number.parseInt(r)})),t=>pe.exports.seqMap(pe.exports.string("T"),pe.exports.regexp(/\d{2}/),(n,r)=>t.set({hour:Number.parseInt(r)})),t=>pe.exports.seqMap(pe.exports.string(":"),pe.exports.regexp(/\d{2}/),(n,r)=>t.set({minute:Number.parseInt(r)})),t=>pe.exports.seqMap(pe.exports.string(":"),pe.exports.regexp(/\d{2}/),(n,r)=>t.set({second:Number.parseInt(r)})),t=>pe.exports.alt(pe.exports.seqMap(pe.exports.string("."),pe.exports.regexp(/\d{3}/),(n,r)=>t.set({millisecond:Number.parseInt(r)})),pe.exports.succeed(t)),t=>pe.exports.alt(pe.exports.seqMap(pe.exports.string("+").or(pe.exports.string("-")),pe.exports.regexp(/\d{1,2}(:\d{2})?/),(n,r)=>t.setZone("UTC"+n+r,{keepLocalTime:!0})),pe.exports.seqMap(pe.exports.string("Z"),()=>t.setZone("utc",{keepLocalTime:!0})),pe.exports.seqMap(pe.exports.string("["),pe.exports.regexp(/[0-9A-Za-z+-\/]+/u),pe.exports.string("]"),(n,r,a)=>t.setZone(r,{keepLocalTime:!0})))).assert(t=>t.isValid,"valid date").desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),datePlus:e=>pe.exports.alt(e.dateShorthand.map(t=>ST[t]()),e.date).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS] or in shorthand"),durationType:e=>pe.exports.alt(...Object.keys(bT).sort((t,n)=>n.length-t.length).map(pe.exports.string)),duration:e=>pe.exports.seqMap(e.number,pe.exports.optWhitespace,e.durationType,(t,n,r)=>bT[r].mapUnits(a=>a*t)).sepBy1(pe.exports.string(",").trim(pe.exports.optWhitespace).or(pe.exports.optWhitespace)).map(t=>t.reduce((n,r)=>n.plus(r))).desc("duration like 4hr2min"),rawNull:e=>pe.exports.string("null"),tagSource:e=>e.tag.map(t=>Hl.tag(t)),csvSource:e=>pe.exports.seqMap(pe.exports.string("csv(").skip(pe.exports.optWhitespace),e.string,pe.exports.string(")"),(t,n,r)=>Hl.csv(n)),linkIncomingSource:e=>e.link.map(t=>Hl.link(t.path,!0)),linkOutgoingSource:e=>pe.exports.seqMap(pe.exports.string("outgoing(").skip(pe.exports.optWhitespace),e.link,pe.exports.string(")"),(t,n,r)=>Hl.link(n.path,!1)),folderSource:e=>e.string.map(t=>Hl.folder(t)),parensSource:e=>pe.exports.seqMap(pe.exports.string("("),pe.exports.optWhitespace,e.source,pe.exports.optWhitespace,pe.exports.string(")"),(t,n,r,a,o)=>r),negateSource:e=>pe.exports.seqMap(pe.exports.alt(pe.exports.string("-"),pe.exports.string("!")),e.atomSource,(t,n)=>Hl.negate(n)),atomSource:e=>pe.exports.alt(e.parensSource,e.negateSource,e.linkOutgoingSource,e.linkIncomingSource,e.folderSource,e.tagSource,e.csvSource),binaryOpSource:e=>bg(e.atomSource,e.binaryBooleanOp.map(t=>t),Hl.binaryOp),source:e=>e.binaryOpSource,variableField:e=>e.identifier.chain(t=>DT.includes(t.toUpperCase())?pe.exports.fail("Variable fields cannot be a keyword ("+DT.join(" or ")+")"):pe.exports.succeed(Fr.variable(t))).desc("variable"),numberField:e=>e.number.map(t=>Fr.literal(t)).desc("number"),stringField:e=>e.string.map(t=>Fr.literal(t)).desc("string"),boolField:e=>e.bool.map(t=>Fr.literal(t)).desc("boolean"),dateField:e=>pe.exports.seqMap(pe.exports.string("date("),pe.exports.optWhitespace,e.datePlus,pe.exports.optWhitespace,pe.exports.string(")"),(t,n,r,a,o)=>Fr.literal(r)).desc("date"),durationField:e=>pe.exports.seqMap(pe.exports.string("dur("),pe.exports.optWhitespace,e.duration,pe.exports.optWhitespace,pe.exports.string(")"),(t,n,r,a,o)=>Fr.literal(r)).desc("duration"),nullField:e=>e.rawNull.map(t=>Fr.NULL),linkField:e=>e.link.map(t=>Fr.literal(t)),listField:e=>e.field.sepBy(pe.exports.string(",").trim(pe.exports.optWhitespace)).wrap(pe.exports.string("[").skip(pe.exports.optWhitespace),pe.exports.optWhitespace.then(pe.exports.string("]"))).map(t=>Fr.list(t)).desc("list ('[1, 2, 3]')"),objectField:e=>pe.exports.seqMap(e.identifier.or(e.string),pe.exports.string(":").trim(pe.exports.optWhitespace),e.field,(t,n,r)=>({name:t,value:r})).sepBy(pe.exports.string(",").trim(pe.exports.optWhitespace)).wrap(pe.exports.string("{").skip(pe.exports.optWhitespace),pe.exports.optWhitespace.then(pe.exports.string("}"))).map(t=>{let n={};for(let r of t)n[r.name]=r.value;return Fr.object(n)}).desc("object ('{ a: 1, b: 2 }')"),atomInlineField:e=>pe.exports.alt(e.date,e.duration.map(t=>S6(t)),e.string,e.tag,e.embedLink,e.bool,e.number,e.rawNull),inlineFieldList:e=>e.atomInlineField.sepBy(pe.exports.string(",").trim(pe.exports.optWhitespace).lookahead(e.atomInlineField)),inlineField:e=>pe.exports.alt(pe.exports.seqMap(e.atomInlineField,pe.exports.string(",").trim(pe.exports.optWhitespace),e.inlineFieldList,(t,n,r)=>[t].concat(r)),e.atomInlineField),atomField:e=>pe.exports.alt(e.embedLink.map(t=>Fr.literal(t)),e.negatedField,e.linkField,e.listField,e.objectField,e.lambdaField,e.parensField,e.boolField,e.numberField,e.stringField,e.dateField,e.durationField,e.nullField,e.variableField),indexField:e=>pe.exports.seqMap(e.atomField,pe.exports.alt(e.dotPostfix,e.indexPostfix,e.functionPostfix).many(),(t,n)=>{let r=t;for(let a of n)switch(a.type){case"dot":r=Fr.index(r,Fr.literal(a.field));break;case"index":r=Fr.index(r,a.field);break;case"function":r=Fr.func(r,a.fields);break}return r}),negatedField:e=>pe.exports.seqMap(pe.exports.string("!"),e.indexField,(t,n)=>Fr.negate(n)).desc("negated field"),parensField:e=>pe.exports.seqMap(pe.exports.string("("),pe.exports.optWhitespace,e.field,pe.exports.optWhitespace,pe.exports.string(")"),(t,n,r,a,o)=>r),lambdaField:e=>pe.exports.seqMap(e.identifier.sepBy(pe.exports.string(",").trim(pe.exports.optWhitespace)).wrap(pe.exports.string("(").trim(pe.exports.optWhitespace),pe.exports.string(")").trim(pe.exports.optWhitespace)),pe.exports.string("=>").trim(pe.exports.optWhitespace),e.field,(t,n,r)=>({type:"lambda",arguments:t,value:r})),dotPostfix:e=>pe.exports.seqMap(pe.exports.string("."),e.identifier,(t,n)=>({type:"dot",field:n})),indexPostfix:e=>pe.exports.seqMap(pe.exports.string("["),pe.exports.optWhitespace,e.field,pe.exports.optWhitespace,pe.exports.string("]"),(t,n,r,a,o)=>({type:"index",field:r})),functionPostfix:e=>pe.exports.seqMap(pe.exports.string("("),pe.exports.optWhitespace,e.field.sepBy(pe.exports.string(",").trim(pe.exports.optWhitespace)),pe.exports.optWhitespace,pe.exports.string(")"),(t,n,r,a,o)=>({type:"function",fields:r})),binaryMulDivField:e=>bg(e.indexField,e.binaryMulDiv,Fr.binaryOp),binaryPlusMinusField:e=>bg(e.binaryMulDivField,e.binaryPlusMinus,Fr.binaryOp),binaryCompareField:e=>bg(e.binaryPlusMinusField,e.binaryCompareOp,Fr.binaryOp),binaryBooleanField:e=>bg(e.binaryCompareField,e.binaryBooleanOp,Fr.binaryOp),binaryOpField:e=>e.binaryBooleanField,field:e=>e.binaryOpField});function jH(e){try{return Aw.success(Ps.field.tryParse(e))}catch(t){return Aw.failure(""+t)}}var Fw;(function(e){function t(r,a){return{name:r,field:a}}e.named=t;function n(r,a){return{field:r,direction:a}}e.sortBy=n})(Fw||(Fw={}));function LH(e){return pe.exports.custom((t,n)=>(r,a)=>{let o=e._(r,a);return o.status?Object.assign({},o,{value:[o.value,r.substring(a,o.index)]}):o})}function RH(e){return e.split(/[\r\n]+/).map(t=>t.trim()).join("")}const _H=pe.exports.createLanguage({queryType:e=>pe.exports.alt(pe.exports.regexp(/TABLE|LIST|TASK|CALENDAR/i)).map(t=>t.toLowerCase()).desc("query type ('TABLE', 'LIST', 'TASK', or 'CALENDAR')"),explicitNamedField:e=>pe.exports.seqMap(Ps.field.skip(pe.exports.whitespace),pe.exports.regexp(/AS/i).skip(pe.exports.whitespace),Ps.identifier.or(Ps.string),(t,n,r)=>Fw.named(r,t)),namedField:e=>pe.exports.alt(e.explicitNamedField,LH(Ps.field).map(([t,n])=>Fw.named(RH(n),t))),sortField:e=>pe.exports.seqMap(Ps.field.skip(pe.exports.optWhitespace),pe.exports.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1),(t,n)=>{let r=n.length==0?"ascending":n[0].toLowerCase();return r=="desc"&&(r="descending"),r=="asc"&&(r="ascending"),{field:t,direction:r}}),headerClause:e=>e.queryType.skip(pe.exports.whitespace).chain(t=>{switch(t){case"table":return pe.exports.seqMap(pe.exports.regexp(/WITHOUT\s+ID/i).skip(pe.exports.optWhitespace).atMost(1),pe.exports.sepBy(e.namedField,pe.exports.string(",").trim(pe.exports.optWhitespace)),(n,r)=>({type:"table",fields:r,showId:n.length==0}));case"list":return pe.exports.seqMap(pe.exports.regexp(/WITHOUT\s+ID/i).skip(pe.exports.optWhitespace).atMost(1),Ps.field.atMost(1),(n,r)=>({type:"list",format:r.length==1?r[0]:void 0,showId:n.length==0}));case"task":return pe.exports.succeed({type:"task"});case"calendar":return pe.exports.seqMap(e.namedField,n=>({type:"calendar",showId:!0,field:n}));default:return pe.exports.fail(`Unrecognized query type '${t}'`)}}).desc("TABLE or LIST or TASK or CALENDAR"),fromClause:e=>pe.exports.seqMap(pe.exports.regexp(/FROM/i),pe.exports.whitespace,Ps.source,(t,n,r)=>r),whereClause:e=>pe.exports.seqMap(pe.exports.regexp(/WHERE/i),pe.exports.whitespace,Ps.field,(t,n,r)=>({type:"where",clause:r})).desc("WHERE "),sortByClause:e=>pe.exports.seqMap(pe.exports.regexp(/SORT/i),pe.exports.whitespace,e.sortField.sepBy1(pe.exports.string(",").trim(pe.exports.optWhitespace)),(t,n,r)=>({type:"sort",fields:r})).desc("SORT field [ASC/DESC]"),limitClause:e=>pe.exports.seqMap(pe.exports.regexp(/LIMIT/i),pe.exports.whitespace,Ps.field,(t,n,r)=>({type:"limit",amount:r})).desc("LIMIT "),flattenClause:e=>pe.exports.seqMap(pe.exports.regexp(/FLATTEN/i).skip(pe.exports.whitespace),e.namedField,(t,n)=>({type:"flatten",field:n})).desc("FLATTEN [AS ]"),groupByClause:e=>pe.exports.seqMap(pe.exports.regexp(/GROUP BY/i).skip(pe.exports.whitespace),e.namedField,(t,n)=>({type:"group",field:n})).desc("GROUP BY [AS ]"),clause:e=>pe.exports.alt(e.fromClause,e.whereClause,e.sortByClause,e.limitClause,e.groupByClause,e.flattenClause),query:e=>pe.exports.seqMap(e.headerClause.trim(pe.exports.optWhitespace),e.fromClause.trim(pe.exports.optWhitespace).atMost(1),e.clause.trim(pe.exports.optWhitespace).many(),(t,n,r)=>({header:t,source:n.length==0?Hl.folder(""):n[0],operations:r,settings:B2}))}),BH=e=>{var t;return e?(t=e.plugins.plugins.dataview)===null||t===void 0?void 0:t.api:window.DataviewAPI},HH=e=>e.plugins.enabledPlugins.has("dataview");Ku.DATE_SHORTHANDS=ST;Ku.DURATION_TYPES=bT;Ku.EXPRESSION=Ps;Ku.KEYWORDS=DT;Ku.QUERY_LANGUAGE=_H;var UH=Ku.getAPI=BH;Ku.isPluginEnabled=HH;Ku.parseField=jH;async function YH(e,t,n,r,a){var I,M;const{vault:o,metadataCache:i}=Le.getState().dailyNotesState.app===void 0?app:Le.getState().dailyNotesState.app,l=Le.getState().dailyNotesState.settings,c=e.replace(/\n/g," ");if(n===void 0)return;const f=i.getFirstLinkpathDest("",n),h=x.moment(),g=h.format("YYYYMMDDHHmmss"),y=r.slice(14),w=" ",S=g+" "+c.trim(),D=w+"- "+g+" "+c.trim();if(f){let N;if(l!=null&&l.CommentOnMemos&&(l!=null&&l.CommentsInOriginalNotes)){const L=UH();if(L!==void 0)try{N=(M=(I=L.page(f.path))==null?void 0:I.file.lists.values)==null?void 0:M.filter(_=>_.line===parseInt(y))}catch(_){console.error(_)}}const B=await o.read(f);let k=0;N[0].children.values.length>0?k=N[0].children.values[N[0].children.values.length-1].line:k=N[0].line;const R=await zH(D,B,k);if(await o.modify(f,R.content),t)return{id:g+(k+1),content:S,deletedAt:"",createdAt:h.format("YYYY/MM/DD HH:mm:ss"),updatedAt:x.moment().format("YYYY/MM/DD HH:mm:ss"),thinoType:"JOURNAL",path:f.path,hasId:"",linkId:a}}}async function zH(e,t,n){if(n===-1)return{content:`${t}
+`:""}${e}${(s||r?`
+`:"")+a}`,posNum:n}}const eH=e=>e.split(/\r?\n/);async function xQ(e){const t=ke.getState().dailyNotesState.app,n=t.vault.getAbstractFileByPath(e.path);if(!(n instanceof N.TFile)){new N.Notice(E("File not found for the given thino path"));return}await t.vault.delete(n)}async function IQ(e){const t=ke.getState().dailyNotesState.app,n=t.vault.getAbstractFileByPath(e.path);if(!(n instanceof N.TFile)){new N.Notice(E("File not found for the given thino path"));return}const o=(await t.vault.read(n)).split(`
+`),i=o.findIndex(l=>l.includes(e.id));if(i===-1){new N.Notice(E("Thino not found"));return}const a=o.findIndex((l,u)=>u>i&&l.trim()==="");a===-1?o.splice(i,o.length-i):o.splice(i,a-i);const s=o.join(`
+`);if(!s){new N.Notice(E("Thino not found"));return}Ze.setChangedByMemos(!0),await t.vault.modify(n,s)}async function kQ(e){const t=ke.getState().dailyNotesState.app,n=t.metadataCache.getFirstLinkpathDest("",e.path);if(!n){new N.Notice(E("File not found for the given thino path"));return}const r=await t.vault.read(n),o=JSON.parse(r),i=o.nodes,a=i.findIndex(d=>d.id===e.id);if(a===-1){new N.Notice(E("Thino not found"));return}i.splice(a,1);const s=o.edges;s.filter(d=>d.fromNode===e.id||d.toNode===e.id).forEach(d=>{const h=s.findIndex(p=>p.id===d.id);h!==-1&&s.splice(h,1)}),Ze.setChangedByMemos(!0);const u=JSON.stringify(o,null,2);await t.vault.modify(n,u)}async function EQ(e){$8()||new N.Notice(E("If you are disabling the daily note plugin, it would be possible that the thino will not be deleted or patched properly. Please enable the plugin and try again."),5e3);const{vault:t,metadataCache:n}=ke.getState().dailyNotesState.app,r=e.path,o=t.getAbstractFileByPath(r);if(!o){new N.Notice(E("Please check your daily note plugin OR periodic notes plugin settings"));return}const i=await t.read(o),a=i.split(`
+`),l=n.getFileCache(o)?.listItems||[],u=parseInt(e.id.slice(14));let d=u;function h(v,y){const S=[];for(const x in y)y[x]===v&&S.push(parseInt(x),...h(parseInt(x),y));return S}const p=$M(l),m=l.find(v=>v.position.start.line===u),b=h(u,p);if(b.length>0){const v=b.map(y=>{const S=l.find(x=>x.position.start.line===y);return S?S.position.end.line:-1});d=Math.max(...v,m.position.end.line)}else d=m.position.end.line;if(!i){new N.Notice(E("Thino not found"));return}Ze.setChangedByMemos(!0),a.splice(u,d-u+1),await t.modify(o,a.join(`
+`))}async function CQ(){const{vault:e,metadataCache:t}=ke.getState().dailyNotesState.app,n=ke.getState().dailyNotesState.settings,o=uS()+"/"+n.DeleteFileName+".md",i=[],a=t.getFirstLinkpathDest("",o);if(a instanceof N.TFile){let s=await e.read(a),l=MQ(s);if(l.length===0)return i;for(let u=0;ue.split(/\r?\n/),DQ=e=>/^- (\d{14})(\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e)?.[1],AQ=e=>/^- (\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e)?.[2],NQ=e=>/^- (\d+)\s(.+)\s(deletedAt: )(.+)$/.exec(e)?.[4];async function OQ(e){const t=await hh(ke.getState().dailyNotesState.app)||[],n=t.findIndex(r=>r.id===e);t.splice(n,1),await Xg(ke.getState().dailyNotesState.app,t)}const PQ=async e=>{const{app:t}=ke.getState().dailyNotesState,n=await hh(t)||[],r=n.find(o=>o.id===e);if(r){const o=N.moment().format("YYYY/MM/DD HH:mm:ss");return r.pinnedAt=o,await Xg(t,n),o}else{new N.Notice(E("Query not found"));return}},jQ=async e=>{const{app:t}=ke.getState().dailyNotesState,n=await hh(t)||[],r=n.find(o=>o.id===e);if(r){r.pinnedAt="",await Xg(t,n);return}else{new N.Notice(E("Query not found"));return}};var tE;(e=>{async function t(v){return await QP(v)}e.getMyMemos=t;async function n(v){return await QP([v])}e.updateSpecificTypeMemo=n;function r(){return CQ()}e.getMyDeletedMemos=r;function o(v){const y=de.getMemoById(v);if(y)switch(y?.sourceType){case"DAILY":return si(y,{id:y.id,deleted:!1});case"CANVAS":return Xa(y,{id:y.id,deleted:!1});case"MULTI":return aa(y,{id:y.id,deleted:!1});case"FILE":return Ka(y,{id:y.id,deleted:!1})}}e.restoreMemo=o;function i(v){return IQ(v)}e.deleteMemoInSingleFile=i;function a(v){return xQ(v)}e.deleteMemoInMultiFiles=a;function s(v){return EQ(v)}e.deleteMemoInDailyNote=s;function l(v){return kQ(v)}e.deleteMemoInCanvas=l;function u(){return zq()}e.getMyQueries=u;async function d(v,y){return await Wq(v,y)}e.createQuery=d;function h(v,y,S){return lQ(v,y,S)}e.updateQuery=h;function p(v){return OQ(v)}e.deleteQueryById=p;function m(v){return PQ(v)}e.pinQuery=m;function b(v){return jQ(v)}e.unpinQuery=b})(tE||(tE={}));const Lo=tE;async function LQ(e,t,n,r,o){const{vault:i,metadataCache:a}=ke.getState().dailyNotesState.app===void 0?app:ke.getState().dailyNotesState.app;ke.getState().dailyNotesState.settings;const s=e.replace(/\n/g," ");if(n===void 0)return;const l=a.getFirstLinkpathDest("",n),u=N.moment(),d=u.format("YYYYMMDDHHmmss");r.slice(14);const h=" ",p=d+" "+s.trim(),m=h+"- "+d+" "+s.trim();if(l){const b=await i.read(l),v=0,y=await RQ(m,b,v);if(await i.modify(l,y.content),t)return{id:d+(v+1),content:p,deletedAt:"",createdAt:u.format("YYYY/MM/DD HH:mm:ss"),updatedAt:N.moment().format("YYYY/MM/DD HH:mm:ss"),thinoType:"JOURNAL",path:l.path,hasId:"",linkId:[o]}}}async function RQ(e,t,n){if(n===-1)return{content:`${t}
${e}`,posNum:-1};const r=t.split(`
-`),a=r.slice(0,n+1).join(`
-`),o=r.slice(n+1).join(`
-`);return/^\s*$/g.test(r[n+1])?{content:`${a}
+`),o=r.slice(0,n+1).join(`
+`),i=r.slice(n+1).join(`
+`);return/^\s*$/g.test(r[n+1])?{content:`${o}
${e}
-${o}`,posNum:n}:{content:`${a}
+${i}`,posNum:n}:{content:`${o}
${e}
-${o}`,posNum:n}}function VH(e,t,n){var a;const r=t.workspace.getLeavesOfType("markdown");for(const o of r){const i=o.view;if(((a=i==null?void 0:i.file)==null?void 0:a.path)===e){t.workspace.revealLeaf(o);try{return o.view.setEphemeralState({line:n}),!0}catch(l){return console.error(l),!1}}}return!1}const V2=async e=>{var o;const t=ft.getState().app,n=t.workspace.getLeavesOfType("markdown");for(const i of n){const l=i.view;if(((o=l==null?void 0:l.file)==null?void 0:o.path)===e){t.workspace.revealLeaf(i);return}}const r=t.metadataCache.getFirstLinkpathDest("",e);if(!r){new x.Notice(E("File not found for the given thino path"));return}await t.workspace.getLeaf(!0).openFile(r)},W2=async(e,t)=>{const{app:n}=ft.getState(),r=parseInt(e.slice(14));if(VH(t,n,r))return;const a=n.metadataCache.getFirstLinkpathDest("",t);if(!x.Platform.isMobile)await n.workspace.getLeaf(!0).openFile(a,{eState:{line:r}});else{let o=n.workspace.activeLeaf;o===null&&(o=n.workspace.getLeaf(!0)),await o.openFile(a,{eState:{line:r}})}},$2=async(e,t)=>{var f,h,g;const n=ft.getState().app,r=n.metadataCache.getFirstLinkpathDest("",t);if(!r){new x.Notice(E("File not found for the given thino path"));return}let a="";try{a=await n.vault.read(r)}catch(y){console.error(y),a=await n.vault.cachedRead(r)}const i=a.split(/\r?\n/).findIndex(y=>y.contains(e)),l=n.workspace.getLeavesOfType("markdown");for(const y of l){const w=y.view;if(((f=w==null?void 0:w.file)==null?void 0:f.path)===r.path){n.workspace.revealLeaf(y);try{(h=y.view.editor)==null||h.setCursor({line:i,ch:1});return}catch(S){console.error(S)}}}const c=n.workspace.getLeaf(!0);await c.openFile(r,{eState:{line:i}});try{(g=c.view.editor)==null||g.setCursor({line:i,ch:1})}catch(y){console.error(y)}},Z2=async(e,t)=>{var l;const n=ft.getState().app,r=(c,f)=>{var g;const h=(g=Array.from(c.nodes.values()))==null?void 0:g.find(y=>y.id===f);return h?(c.selectOnly(h),c.zoomToSelection(),!0):!1},a=n.workspace.getLeavesOfType("canvas");for(const c of a){const f=c.view;if(((l=f==null?void 0:f.file)==null?void 0:l.path)===t&&(n.workspace.revealLeaf(c),r(f.canvas,e)))return}const o=n.metadataCache.getFirstLinkpathDest("",t);if(!o){new x.Notice(E("File not found for the given thino path"));return}const i=n.workspace.getLeaf(!0);await i.openFile(o),setTimeout(()=>{var c;r((c=i.view)==null?void 0:c.canvas,e)},10)};class WH{constructor(){Se(this,"initialized",!1)}getState(){return Le.getState().memoState}async fetchAllMemos(){const t=ft.getState().settings;ut.checkDailyInMulti(t);const n=await Ko.getMyMemos(t.EnabledLocationList.map(o=>o.value)),r=[...n.memos],a=[...n.commentMemos];return Le.dispatch({type:"SET_MEMOS",payload:{memos:r}}),Le.dispatch({type:"SET_COMMENT_MEMOS",payload:{commentMemos:a}}),this.initialized||(this.initialized=!0,dt.setLoaded(!0)),r}async updateTypeMemos(t){const n=await Ko.updateSpecificTypeMemo(t),r=this.getState().memos.filter(a=>a.sourceType!==t);Le.dispatch({type:"SET_MEMOS",payload:{memos:[...r,...n.memos]}})}async removeTypeMemos(t){const n=this.getState().memos.filter(r=>r.sourceType!==t);Le.dispatch({type:"SET_MEMOS",payload:{memos:[...n]}})}async fetchDeletedMemos(){const t=await Ko.getMyDeletedMemos();return t.sort((n,r)=>ut.getTimeStampByDate(r.deletedAt)-ut.getTimeStampByDate(n.deletedAt)),t}pushMemo(t){Le.dispatch({type:"INSERT_MEMO",payload:{memo:{...t}}})}pushCommentMemo(t){Le.dispatch({type:"INSERT_COMMENT_MEMO",payload:{memo:{...t}}})}getMemoById(t){for(const n of this.getState().memos)if(n.id===t)return n;return null}getCommentMemoById(t){for(const n of this.getState().commentMemos)if(n.id===t)return n;return null}getMemoByWebId(t){for(const n of this.getState().memos)if(n.webId===t||n.id===t)return n;return null}async finishWaitingForTemplaterThinos(){const t=this.getState().preparingUpdateMemo;if(t.length!==0)for(const n of t){const r=this.getMemoById(n.id),a=n.type==="local"?await DS(n.origin,n.isList,n.date,!0):await RC(r);await this.replaceOldThinoWithNewThino(n.id,a),Le.dispatch({type:"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO",payload:{id:n.id}})}}async replaceOldThinoWithNewThino(t,n){this.getMemoById(t)&&Le.dispatch({type:"REPLACE_MEMO_BY_ID",payload:{id:t,memo:n}})}async updateMemoById(t,n,r){const a=this.getMemoByWebId(t);if(!a)return;let o=null;const i=r?{}:{content:n.content,rowStatus:n.rowStatus,pinned:n.pinned,deleted:!!n.deletedAt,thinoType:n.thinoType||"JOURNAL"};if(dA({...a,deleted:!!n.deletedAt},{...i,webId:n.id}))return a;switch(a.sourceType){case"DAILY":o=await Bl(a,{id:a.id,webId:n.id,...i});break;case"CANVAS":o=await _l(a,{id:a.id,webId:n.id,...i});break;case"MULTI":o=await js(a,{id:a.id,webId:n.id,...i});break;case"FILE":o=await Rl(a,{id:a.id,webId:n.id,...i});break}if(!o)return a;Le.dispatch({type:"EDIT_MEMO",payload:o})}async archiveThinoBulk(t){const n=[];for(const r of t){let a;switch(r.sourceType){case"DAILY":a=await Bl(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(a);break;case"CANVAS":a=await _l(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(a);break;case"MULTI":a=await js(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(a);break;case"FILE":a=await Rl(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(a);break}}return n.length>0?(Le.dispatch({type:"ARCHIVE_MEMO_BY_ID_BULK",payload:n}),n):t}async dealWithDailyThinoBulk(t,n,r){const a=await T_(t,n,r);return r==="deleteForever"?await this.deleteThinosWithIdBulk(a.map(o=>o.id)):this.editMemoBulk(a),a}async deleteThinosWithIdBulk(t){for(const n of t)Le.dispatch({type:"DELETE_MEMO_BY_ID",payload:{id:n}})}async archiveMemo(t){let n=null;switch(t.sourceType){case"DAILY":n=await Bl(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"CANVAS":n=await _l(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"MULTI":n=await js(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"FILE":n=await Rl(t,{id:t.id,rowStatus:"ARCHIVED"});break}return n?(Le.dispatch({type:"ARCHIVE_MEMO_BY_ID",payload:n}),n):t}async pushToUpdateList(t,n){Le.dispatch({type:"PREPARE_UPDATE_THINO",payload:{thino:t,originalId:n}})}async removePrepareUpdateThinoById(t){Le.dispatch({type:"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO",payload:{id:t}})}async removePrepareUpdateThino(){Le.dispatch({type:"REMOVE_PREPARE_UPDATE_THINO",payload:null})}async unarchiveThinoBulk(t){const n=[];for(const r of t){let a;switch(r.sourceType){case"DAILY":a=await Bl(r,{id:r.id,rowStatus:"NORMAL"}),n.push(a);break;case"CANVAS":a=await _l(r,{id:r.id,rowStatus:"NORMAL"}),n.push(a);break;case"MULTI":a=await js(r,{id:r.id,rowStatus:"NORMAL"}),n.push(a);break;case"FILE":a=await Rl(r,{id:r.id,rowStatus:"NORMAL"}),n.push(a);break}}return n.length>0?(Le.dispatch({type:"ARCHIVE_MEMO_BY_ID_BULK",payload:n}),n):t}async unarchiveMemo(t){let n=null;switch(t.sourceType){case"DAILY":n=await Bl(t,{id:t.id,rowStatus:"NORMAL"});break;case"CANVAS":n=await _l(t,{id:t.id,rowStatus:"NORMAL"});break;case"MULTI":n=await js(t,{id:t.id,rowStatus:"NORMAL"});break;case"FILE":n=await Rl(t,{id:t.id,rowStatus:"NORMAL"});break}return Le.dispatch({type:"UNARCHIVE_MEMO_BY_ID",payload:n}),n}async hideMemoById(t){const n=this.getMemoById(t);if(!n)return n;let r=null;switch(n.sourceType){case"DAILY":r=await Bl(n,{id:n.id,deleted:!0});break;case"CANVAS":r=await _l(n,{id:n.id,deleted:!0});break;case"MULTI":r=await js(n,{id:n.id,deleted:!0});break;case"FILE":r=await Rl(n,{id:n.id,deleted:!0});break}if(!r)return n;if(r)return r}async restoreMemoById(t){return await Ko.restoreMemo(t)}async deleteMemoById(t,n){const r=this.getMemoById(t);try{switch(r.sourceType){case"DAILY":await Ko.deleteMemoInDailyNote(r);break;case"CANVAS":await Ko.deleteMemoInCanvas(r);break;case"MULTI":await Ko.deleteMemoInMultiFiles(r);break;case"FILE":await Ko.deleteMemoInSingleFile(r);break}Le.dispatch({type:"DELETE_MEMO_BY_ID",payload:{id:t}})}catch(l){console.error(l),new x.Notice(E("Failed to delete memo"))}if(n&&n==="local")return;const a=ft.getState().settings,o=ft.getState().app;!(o!=null&&o.loadLocalStorage("tokenForSync"))||!a.startSync||r.webId&&await A2(r.webId)}async removeMemosInFile(t,n){var a,o;const r=[];try{if(t.path.endsWith(".md")&&!t.path.contains(".thino")&&!n){const l=this.getState().memos.filter(c=>c.path.trim()===t.path.trim());r.push(...l)}else if(t.path.contains("thino.canvas")){const l=this.getState().memos.filter(c=>c.path.trim()===t.path.trim());r.push(...l)}else if((a=t==null?void 0:t.parent)!=null&&a.path.contains(n)||!(t!=null&&t.parent)&&!((o=t==null?void 0:t.parent)!=null&&o.path)){const l=this.getState().memos.filter(c=>c.path.trim()===t.path.trim());l.length>0&&r.push(...l)}else t.path.endsWith(".md")&&t.path.contains(".thino")&&await fT(t,r);const i=r.map(l=>l.id);Le.dispatch({type:"DELETE_MEMO_BY_ID_BATCH",payload:{ids:i}})}catch(i){console.error(i)}}async removeThinosByPath(t){const r=this.getState().memos.filter(a=>a.path===t).map(a=>a.id);Le.dispatch({type:"DELETE_MEMO_BY_ID_BATCH",payload:{ids:r}})}async updateMemosInFile(t,n){const r=[],a=async()=>{var o;if(t.path.endsWith(".md")&&!t.path.contains(".thino")&&!n){await vA(t,r);return}else if(t.path.contains("thino.canvas")){await yA(t,r);return}else if((o=t==null?void 0:t.parent)!=null&&o.path.contains(n)&&!t.path.endsWith(".thino.md")){await gA(t,r);return}else if(t.path.endsWith(".thino.md")){await fT(t,r);return}};try{await a(),Le.dispatch({type:"UPDATE_MEMO_BATCH",payload:{memos:r,path:t.path}})}catch(o){console.error(o)}}async updateMemoProperty(t){const n=ut.randomId(16),r=await js(t,{id:n});Le.dispatch({type:"EDIT_MEMO_PATH",payload:r})}editMemo(t){const n=t.webId;Le.dispatch({type:"EDIT_MEMO",payload:t});const r=ft.getState().settings,a=ft.getState().app;if(!(!(a!=null&&a.loadLocalStorage("tokenForSync"))||!r.startSync))try{t&&n&&SS({id:n,content:t.content,rowStatus:t.rowStatus,pinned:t.pinned,ttime:t.deletedAt?x.moment(t.deletedAt,"YYYY/MM/DD HH:mm:ss").valueOf():0,thinoType:t.sourceType==="DAILY"?"DAILY":"FILE",thinoStatus:t.thinoType==="JOURNAL"?"JOURNAL":t.thinoType==="TASK-TODO"?"TASK-TODO":"TASK-DONE"})}catch(i){console.error(i)}}editMemoBulk(t){for(const n of t)this.editMemo(n);this.updateTagsState()}editCommentMemo(t){Le.dispatch({type:"EDIT_COMMENT_MEMO",payload:t})}getThinoViaKeyword(t){const{memos:n}=this.getState();return n.filter(a=>a.content.toLowerCase().includes(t==null?void 0:t.toLowerCase()))}updateTagsState(){var o,i,l,c;const{memos:t}=this.getState(),n=new Set,r={},a=new Map;for(const f of t){if(f.deletedAt!==""&&f.deletedAt||f.rowStatus==="ARCHIVED")continue;const h=[];if(!a.has(f.path)&&f.sourceType!=="FILE"){const S=(Array.isArray((o=f==null?void 0:f.fileInfo)==null?void 0:o.tags)?f.fileInfo.tags:[]).filter(D=>D).map(D=>D.toString().trim());a.set(f.path,S),h.push(...S)}const g=f.content.replace(/<[^>]*>/g,"").replace(/\`\`\`(.*)?\n[\s\S]*?\n\`\`\`/gm,"").replace(/\`([^\`].*?)\`/g,""),y=[...Array.from(g.match($r)||[]),...Array.from(g.match(ua)||[]),...Array.from(g.match(Wa)||[])];h.push(...y);for(const w of h){if(!w||w==="undefined"||!w)continue;let S=w;typeof w!="string"&&(S=w==null?void 0:w.toString());const D=(c=(l=(i=S==null?void 0:S.replace($r,"$1"))==null?void 0:i.replace(ua,"$1"))==null?void 0:l.replace(Wa,"$2"))==null?void 0:c.trim();/^\d+$/.test(D)||(n.add(D),r[D]=(r[D]||0)+1)}}Le.dispatch({type:"SET_TAGS",payload:{tags:Array.from(n),tagsNum:r}})}clearMemos(){Le.dispatch({type:"SET_MEMOS",payload:{memos:[]}})}async getLinkedMemos(t){const{memos:n}=this.getState();return n.filter(r=>r.content.includes(t))}async getCommentMemos(t){const{memos:n}=this.getState();return n.filter(r=>r.content.includes("comment: "+t))}async createMemoMultiFile({content:t,isList:n,name:r}){return await s_({content:t,isList:n,name:r})}async createMemoSingleFile({content:t,isList:n}){return await l_({content:t,isList:n})}async createOrPatchThinoFromWeb(t){const n=this.getState().memos;if(t.localId&&(n!=null&&n.some(o=>o.id===t.localId)))return await this.updateMemoById(t.localId,t,!0),null;if(n!=null&&n.some(o=>o.id===t.id)||n!=null&&n.some(o=>o.webId===t.id))return await this.updateMemoById(t.id,t,!1),null;let r=t.sourceType;const a=ft.getState().settings;switch(a&&(a!=null&&a.saveThinoType)&&(r=a.saveThinoType!=="FILE"?a.saveThinoType:t.sourceType),r){case"FILE":case"MULTI":case"CANVAS":return await LC(t);case"DAILY":return await RC(t);default:return await LC(t)}}async initSync(){const n=this.getState().memos.filter(a=>!a.webId),r=await a_(n);for(const a of r)await this.createOrPatchThinoFromWeb(a)}async createMemoCanvas({text:t,isList:n}){return await u_({content:t,isList:n})}async createMemoDaily(t,n){return await DS(t,n)}setWaitingForTemplater({origin:t,date:n,isList:r,id:a,type:o}){Le.dispatch({type:"SET_WAITING_FOR_TEMPLATER",payload:{origin:t,date:n,isList:r,id:a,type:o}})}async pinMemoById(t){const n=this.getMemoById(t),r=await I_(n);Le.dispatch({type:"PIN_MEMO",payload:r});try{const a=ft.getState().settings,o=ft.getState().app;if((o==null?void 0:o.loadLocalStorage("tokenForSync"))&&a.startSync){const l=await SS({id:r.webId,pinned:!0});this.editMemo(l)}}catch(a){console.error(a)}}async unpinMemoById(t){const n=this.getMemoById(t),r=await E_(n);Le.dispatch({type:"PIN_MEMO",payload:r});try{const a=ft.getState().settings,o=ft.getState().app;if((o==null?void 0:o.loadLocalStorage("tokenForSync"))&&a.startSync){const l=await SS({id:r.webId,pinned:!1});this.editMemo(l)}}catch(a){console.error(a)}}async createCommentMemo(t,n,r,a,o){return await YH(t,n,r,a,o)}async importMemos(t,n,r){return await DS(t,n,r)}async createThino({content:t,isList:n,type:r,name:a}){let o=null;switch(r.toLowerCase()){case"canvas":o=await we.createMemoCanvas({text:t,isList:n});break;case"multi":o=await we.createMemoMultiFile({content:t,isList:n,name:a});break;case"daily":o=await we.createMemoDaily(t,n);break;case"file":o=await we.createMemoSingleFile({content:t,isList:n});break;default:o=await we.createMemoDaily(t,n);break}const i=ft.getState().settings,l=ft.getState().app,c=l==null?void 0:l.loadLocalStorage("tokenForSync");return o&&c&&i.startSync&&r!=="DAILY"&&setTimeout(async()=>{try{const f=await N2({content:t,thinoType:"FILE",thinoStatus:n?"JOURNAL":"TASK-TODO"});await this.updateMemoById(o.id,f,!0)}catch(f){console.error(f)}},200),o}async openThinoByID(t){const n=this.getMemoById(t);if(n)switch(n.sourceType){case"DAILY":await W2(n.id,n.path);break;case"CANVAS":await Z2(n.id,n.path);break;case"MULTI":await V2(n.path);break;case"FILE":await $2(n.id,n.path);break}}async updateMemo(t,n,r){const a=this.getMemoById(t);if(a){let o=null;switch(a.sourceType){case"DAILY":o=await Bl(a,{id:a.id,content:n,thinoType:r||a.thinoType});break;case"CANVAS":o=await _l(a,{id:a.id,content:n,thinoType:r||a.thinoType});break;case"MULTI":o=await js(a,{id:a.id,content:n,thinoType:r||a.thinoType});break;case"FILE":o=await Rl(a,{id:a.id,content:n,thinoType:r||a.thinoType})}if(o)return o}return a}}const we=new WH;class $H{getState(){return Le.getState().queryState}async getMyAllQueries(){const t=at.getState().query.filter,n=this.getQueryById(t),r=await Ko.getMyQueries();return Le.dispatch({type:"SET_QUERIES",payload:{queries:[...r,...n?[n]:[]]}}),r}getQueryById(t){return this.getState().queries.find(n=>n.id===t)}pushQuery(t){Le.dispatch({type:"INSERT_QUERY",payload:{query:{...t}}})}editQuery(t){Le.dispatch({type:"UPDATE_QUERY",payload:t})}async deleteQuery(t){await Ko.deleteQueryById(t),Le.dispatch({type:"DELETE_QUERY_BY_ID",payload:{id:t}})}async createQuery(t,n){return await Ko.createQuery(t,n)}createTempQuery(t,n){return NR(t,n)}async updateQuery(t,n,r){return await Ko.updateQuery(t,n,r)}async pinQuery(t){await Ko.pinQuery(t)}async unpinQuery(t){await Ko.unpinQuery(t)}}const on=new $H;class ZH{async upload(t){const{vault:n,fileManager:r}=Le.getState().dailyNotesState.app,a=await t.arrayBuffer(),o=qH(t.type),i=Ju(),l=x.moment(),c=pb(l,i);let f;if(c)c instanceof x.TFile&&(f=await n.createBinary(await n.getAvailablePathForAttachments(`Pasted Image ${x.moment().format("YYYYMMDDHHmmss")}`,o,c),a));else{const h=await lA(l);f=await n.createBinary(await n.getAvailablePathForAttachments(`Pasted Image ${x.moment().format("YYYYMMDDHHmmss")}`,o,h),a)}return r.generateMarkdownLink(f,f.path,"","")}async parseHtml(t){const n=await t.text(),r=document.createElement("html");r.innerHTML=n;const a=Array.from(r.getElementsByClassName("memo"));for(const o of a){const i=o.getElementsByClassName("content")[0],l=x.htmlToMarkdown(i.innerHTML),c=await we.importMemos(l,!0,x.moment(o.getElementsByClassName("time")[0].innerHTML));we.pushMemo(c)}}}const qH=e=>{var t;return(t=/^image\/(.+)$/.exec(e))==null?void 0:t[1]},q2=new ZH;var rs={},D6={exports:{}},Jo={},AS={exports:{}},FS={},px;function GH(){return px||(px=1,function(e){function t(se,ue){var X=se.length;se.push(ue);e:for(;0>>1,De=se[oe];if(0>>1;oea(Fe,X))Bea(Xe,Fe)?(se[oe]=Xe,se[Be]=X,oe=Be):(se[oe]=Fe,se[Re]=X,oe=Re);else if(Bea(Xe,X))se[oe]=Xe,se[Be]=X,oe=Be;else break e}}return ue}function a(se,ue){var X=se.sortIndex-ue.sortIndex;return X!==0?X:se.id-ue.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,l=i.now();e.unstable_now=function(){return i.now()-l}}var c=[],f=[],h=1,g=null,y=3,w=!1,S=!1,D=!1,I=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function B(se){for(var ue=n(f);ue!==null;){if(ue.callback===null)r(f);else if(ue.startTime<=se)r(f),ue.sortIndex=ue.expirationTime,t(c,ue);else break;ue=n(f)}}function k(se){if(D=!1,B(se),!S)if(n(c)!==null)S=!0,$(R);else{var ue=n(f);ue!==null&&he(k,ue.startTime-se)}}function R(se,ue){S=!1,D&&(D=!1,M(V),V=-1),w=!0;var X=y;try{for(B(ue),g=n(c);g!==null&&(!(g.expirationTime>ue)||se&&!Q());){var oe=g.callback;if(typeof oe=="function"){g.callback=null,y=g.priorityLevel;var De=oe(g.expirationTime<=ue);ue=e.unstable_now(),typeof De=="function"?g.callback=De:g===n(c)&&r(c),B(ue)}else r(c);g=n(c)}if(g!==null)var je=!0;else{var Re=n(f);Re!==null&&he(k,Re.startTime-ue),je=!1}return je}finally{g=null,y=X,w=!1}}var L=!1,_=null,V=-1,U=5,Z=-1;function Q(){return!(e.unstable_now()-Zse||125oe?(se.sortIndex=X,t(f,se),n(c)===null&&se===n(f)&&(D?(M(V),V=-1):D=!0,he(k,X-oe))):(se.sortIndex=De,t(c,se),S||w||(S=!0,$(R))),se},e.unstable_shouldYield=Q,e.unstable_wrapCallback=function(se){var ue=y;return function(){var X=y;y=ue;try{return se.apply(this,arguments)}finally{y=X}}}}(FS)),FS}var mx;function JH(){return mx||(mx=1,AS.exports=GH()),AS.exports}var gx;function KH(){if(gx)return Jo;gx=1;var e=P,t=JH();function n(s){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+s,m=1;m"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},g={};function y(s){return c.call(g,s)?!0:c.call(h,s)?!1:f.test(s)?g[s]=!0:(h[s]=!0,!1)}function w(s,u,m,b){if(m!==null&&m.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return b?!1:m!==null?!m.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function S(s,u,m,b){if(u===null||typeof u>"u"||w(s,u,m,b))return!0;if(b)return!1;if(m!==null)switch(m.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function D(s,u,m,b,C,O,W){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=b,this.attributeNamespace=C,this.mustUseProperty=m,this.propertyName=s,this.type=u,this.sanitizeURL=O,this.removeEmptyString=W}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){I[s]=new D(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var u=s[0];I[u]=new D(u,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){I[s]=new D(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){I[s]=new D(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){I[s]=new D(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){I[s]=new D(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){I[s]=new D(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){I[s]=new D(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){I[s]=new D(s,5,!1,s.toLowerCase(),null,!1,!1)});var M=/[\-:]([a-z])/g;function N(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var u=s.replace(M,N);I[u]=new D(u,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var u=s.replace(M,N);I[u]=new D(u,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var u=s.replace(M,N);I[u]=new D(u,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){I[s]=new D(s,1,!1,s.toLowerCase(),null,!1,!1)}),I.xlinkHref=new D("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){I[s]=new D(s,1,!1,s.toLowerCase(),null,!0,!0)});function B(s,u,m,b){var C=I.hasOwnProperty(u)?I[u]:null;(C!==null?C.type!==0:b||!(2le||C[W]!==O[le]){var ge=`
-`+C[W].replace(" at new "," at ");return s.displayName&&ge.includes("")&&(ge=ge.replace("",s.displayName)),ge}while(1<=W&&0<=le);break}}}finally{je=!1,Error.prepareStackTrace=m}return(s=s?s.displayName||s.name:"")?De(s):""}function Fe(s){switch(s.tag){case 5:return De(s.type);case 16:return De("Lazy");case 13:return De("Suspense");case 19:return De("SuspenseList");case 0:case 2:case 15:return s=Re(s.type,!1),s;case 11:return s=Re(s.type.render,!1),s;case 1:return s=Re(s.type,!0),s;default:return""}}function Be(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case _:return"Fragment";case L:return"Portal";case U:return"Profiler";case V:return"StrictMode";case re:return"Suspense";case de:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case Q:return(s.displayName||"Context")+".Consumer";case Z:return(s._context.displayName||"Context")+".Provider";case G:var u=s.render;return s=s.displayName,s||(s=u.displayName||u.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case fe:return u=s.displayName||null,u!==null?u:Be(s.type)||"Memo";case $:u=s._payload,s=s._init;try{return Be(s(u))}catch{}}return null}function Xe(s){var u=s.type;switch(s.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=u.render,s=s.displayName||s.name||"",u.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Be(u);case 8:return u===V?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function Ze(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function st(s){var u=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function Ct(s){var u=st(s)?"checked":"value",m=Object.getOwnPropertyDescriptor(s.constructor.prototype,u),b=""+s[u];if(!s.hasOwnProperty(u)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var C=m.get,O=m.set;return Object.defineProperty(s,u,{configurable:!0,get:function(){return C.call(this)},set:function(W){b=""+W,O.call(this,W)}}),Object.defineProperty(s,u,{enumerable:m.enumerable}),{getValue:function(){return b},setValue:function(W){b=""+W},stopTracking:function(){s._valueTracker=null,delete s[u]}}}}function tn(s){s._valueTracker||(s._valueTracker=Ct(s))}function _e(s){if(!s)return!1;var u=s._valueTracker;if(!u)return!0;var m=u.getValue(),b="";return s&&(b=st(s)?s.checked?"true":"false":s.value),s=b,s!==m?(u.setValue(s),!0):!1}function et(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function nt(s,u){var m=u.checked;return X({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:m??s._wrapperState.initialChecked})}function ht(s,u){var m=u.defaultValue==null?"":u.defaultValue,b=u.checked!=null?u.checked:u.defaultChecked;m=Ze(u.value!=null?u.value:m),s._wrapperState={initialChecked:b,initialValue:m,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function St(s,u){u=u.checked,u!=null&&B(s,"checked",u,!1)}function Tt(s,u){St(s,u);var m=Ze(u.value),b=u.type;if(m!=null)b==="number"?(m===0&&s.value===""||s.value!=m)&&(s.value=""+m):s.value!==""+m&&(s.value=""+m);else if(b==="submit"||b==="reset"){s.removeAttribute("value");return}u.hasOwnProperty("value")?_t(s,u.type,m):u.hasOwnProperty("defaultValue")&&_t(s,u.type,Ze(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(s.defaultChecked=!!u.defaultChecked)}function Gt(s,u,m){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var b=u.type;if(!(b!=="submit"&&b!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+s._wrapperState.initialValue,m||u===s.value||(s.value=u),s.defaultValue=u}m=s.name,m!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,m!==""&&(s.name=m)}function _t(s,u,m){(u!=="number"||et(s.ownerDocument)!==s)&&(m==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+m&&(s.defaultValue=""+m))}var Vt=Array.isArray;function Xt(s,u,m,b){if(s=s.options,u){u={};for(var C=0;C"+u.valueOf().toString()+"",u=Mt.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;u.firstChild;)s.appendChild(u.firstChild)}});function sn(s,u){if(u){var m=s.firstChild;if(m&&m===s.lastChild&&m.nodeType===3){m.nodeValue=u;return}}s.textContent=u}var ln={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vr=["Webkit","ms","Moz","O"];Object.keys(ln).forEach(function(s){vr.forEach(function(u){u=u+s.charAt(0).toUpperCase()+s.substring(1),ln[u]=ln[s]})});function fr(s,u,m){return u==null||typeof u=="boolean"||u===""?"":m||typeof u!="number"||u===0||ln.hasOwnProperty(s)&&ln[s]?(""+u).trim():u+"px"}function ha(s,u){s=s.style;for(var m in u)if(u.hasOwnProperty(m)){var b=m.indexOf("--")===0,C=fr(m,u[m],b);m==="float"&&(m="cssFloat"),b?s.setProperty(m,C):s[m]=C}}var jr=X({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function nr(s,u){if(u){if(jr[s]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(n(137,s));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(n(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(n(61))}if(u.style!=null&&typeof u.style!="object")throw Error(n(62))}}function Lr(s,u){if(s.indexOf("-")===-1)return typeof u.is=="string";switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var te=null;function me(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var xe=null,Ue=null,He=null;function Qe(s){if(s=ga(s)){if(typeof xe!="function")throw Error(n(280));var u=s.stateNode;u&&(u=th(u),xe(s.stateNode,s.type,u))}}function tt(s){Ue?He?He.push(s):He=[s]:Ue=s}function kt(){if(Ue){var s=Ue,u=He;if(He=Ue=null,Qe(s),u)for(s=0;s>>=0,s===0?32:31-(Js(s)/Ks|0)|0}var po=64,hs=4194304;function ci(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function mo(s,u){var m=s.pendingLanes;if(m===0)return 0;var b=0,C=s.suspendedLanes,O=s.pingedLanes,W=m&268435455;if(W!==0){var le=W&~C;le!==0?b=ci(le):(O&=W,O!==0&&(b=ci(O)))}else W=m&~C,W!==0?b=ci(W):O!==0&&(b=ci(O));if(b===0)return 0;if(u!==0&&u!==b&&!(u&C)&&(C=b&-b,O=u&-u,C>=O||C===16&&(O&4194240)!==0))return u;if(b&4&&(b|=m&16),u=s.entangledLanes,u!==0)for(s=s.entanglements,u&=b;0m;m++)u.push(s);return u}function Ie(s,u,m){s.pendingLanes|=u,u!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,u=31-Rr(u),s[u]=m}function Ye(s,u){var m=s.pendingLanes&~u;s.pendingLanes=u,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=u,s.mutableReadLanes&=u,s.entangledLanes&=u,u=s.entanglements;var b=s.eventTimes;for(s=s.expirationTimes;0=Rt),Ka=" ",Qa=!1;function pu(s,u){switch(s){case"keyup":return It.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vd(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Bi=!1;function dc(s,u){switch(s){case"compositionend":return vd(u);case"keypress":return u.which!==32?null:(Qa=!0,Ka);case"textInput":return s=u.data,s===Ka&&Qa?null:s;default:return null}}function P1(s,u){if(Bi)return s==="compositionend"||!Kt&&pu(s,u)?(s=hd(),Lo=nl=zn=null,Bi=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1=u)return{node:m,offset:u-s};s=b}e:{for(;m;){if(m.nextSibling){m=m.nextSibling;break e}m=m.parentNode}m=void 0}m=Qt(m)}}function Mr(s,u){return s&&u?s===u?!0:s&&s.nodeType===3?!1:u&&u.nodeType===3?Mr(s,u.parentNode):"contains"in s?s.contains(u):s.compareDocumentPosition?!!(s.compareDocumentPosition(u)&16):!1:!1}function Un(){for(var s=window,u=et();u instanceof s.HTMLIFrameElement;){try{var m=typeof u.contentWindow.location.href=="string"}catch{m=!1}if(m)s=u.contentWindow;else break;u=et(s.document)}return u}function yd(s){var u=s&&s.nodeName&&s.nodeName.toLowerCase();return u&&(u==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||u==="textarea"||s.contentEditable==="true")}function H1(s){var u=Un(),m=s.focusedElem,b=s.selectionRange;if(u!==m&&m&&m.ownerDocument&&Mr(m.ownerDocument.documentElement,m)){if(b!==null&&yd(m)){if(u=b.start,s=b.end,s===void 0&&(s=u),"selectionStart"in m)m.selectionStart=u,m.selectionEnd=Math.min(s,m.value.length);else if(s=(u=m.ownerDocument||document)&&u.defaultView||window,s.getSelection){s=s.getSelection();var C=m.textContent.length,O=Math.min(b.start,C);b=b.end===void 0?O:Math.min(b.end,C),!s.extend&&O>b&&(C=b,b=O,O=C),C=Tn(m,O);var W=Tn(m,b);C&&W&&(s.rangeCount!==1||s.anchorNode!==C.node||s.anchorOffset!==C.offset||s.focusNode!==W.node||s.focusOffset!==W.offset)&&(u=u.createRange(),u.setStart(C.node,C.offset),s.removeAllRanges(),O>b?(s.addRange(u),s.extend(W.node,W.offset)):(u.setEnd(W.node,W.offset),s.addRange(u)))}}for(u=[],s=m;s=s.parentNode;)s.nodeType===1&&u.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m=document.documentMode,ws=null,pm=null,Hi=null,hc=!1;function wd(s,u,m){var b=m.window===m?m.document:m.nodeType===9?m:m.ownerDocument;hc||ws==null||ws!==et(b)||(b=ws,"selectionStart"in b&&yd(b)?b={start:b.selectionStart,end:b.selectionEnd}:(b=(b.ownerDocument&&b.ownerDocument.defaultView||window).getSelection(),b={anchorNode:b.anchorNode,anchorOffset:b.anchorOffset,focusNode:b.focusNode,focusOffset:b.focusOffset}),Hi&&vt(Hi,b)||(Hi=b,b=Kf(pm,"onSelect"),0Sc||(s.current=wm[Sc],wm[Sc]=null,Sc--)}function qn(s,u){Sc++,wm[Sc]=s.current,s.current=u}var fl={},va=Xa(fl),eo=Xa(!1),_a=fl;function Dc(s,u){var m=s.type.contextTypes;if(!m)return fl;var b=s.stateNode;if(b&&b.__reactInternalMemoizedUnmaskedChildContext===u)return b.__reactInternalMemoizedMaskedChildContext;var C={},O;for(O in m)C[O]=u[O];return b&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=u,s.__reactInternalMemoizedMaskedChildContext=C),C}function to(s){return s=s.childContextTypes,s!=null}function nh(){Qn(eo),Qn(va)}function My(s,u,m){if(va.current!==fl)throw Error(n(168));qn(va,u),qn(eo,m)}function ky(s,u,m){var b=s.stateNode;if(u=u.childContextTypes,typeof b.getChildContext!="function")return m;b=b.getChildContext();for(var C in b)if(!(C in u))throw Error(n(108,Xe(s)||"Unknown",C));return X({},m,b)}function Ho(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||fl,_a=va.current,qn(va,s),qn(eo,eo.current),!0}function Ny(s,u,m){var b=s.stateNode;if(!b)throw Error(n(169));m?(s=ky(s,u,_a),b.__reactInternalMemoizedMergedChildContext=s,Qn(eo),Qn(va),qn(va,s)):Qn(eo),qn(eo,m)}var Ds=null,rh=!1,bm=!1;function Ay(s){Ds===null?Ds=[s]:Ds.push(s)}function wu(s){rh=!0,Ay(s)}function hl(){if(!bm&&Ds!==null){bm=!0;var s=0,u=ct;try{var m=Ds;for(ct=1;s>=W,C-=W,zi=1<<32-Rr(u)+C|m<Wt?(Kr=jt,jt=null):Kr=jt.sibling;var En=qe(Ce,jt,Me[Wt],lt);if(En===null){jt===null&&(jt=Kr);break}s&&jt&&En.alternate===null&&u(Ce,jt),ye=O(En,ye,Wt),Pt===null?xt=En:Pt.sibling=En,Pt=En,jt=Kr}if(Wt===Me.length)return m(Ce,jt),Xn&&Su(Ce,Wt),xt;if(jt===null){for(;WtWt?(Kr=jt,jt=null):Kr=jt.sibling;var Nl=qe(Ce,jt,En.value,lt);if(Nl===null){jt===null&&(jt=Kr);break}s&&jt&&Nl.alternate===null&&u(Ce,jt),ye=O(Nl,ye,Wt),Pt===null?xt=Nl:Pt.sibling=Nl,Pt=Nl,jt=Kr}if(En.done)return m(Ce,jt),Xn&&Su(Ce,Wt),xt;if(jt===null){for(;!En.done;Wt++,En=Me.next())En=rt(Ce,En.value,lt),En!==null&&(ye=O(En,ye,Wt),Pt===null?xt=En:Pt.sibling=En,Pt=En);return Xn&&Su(Ce,Wt),xt}for(jt=b(Ce,jt);!En.done;Wt++,En=Me.next())En=yt(jt,Ce,Wt,En.value,lt),En!==null&&(s&&En.alternate!==null&&jt.delete(En.key===null?Wt:En.key),ye=O(En,ye,Wt),Pt===null?xt=En:Pt.sibling=En,Pt=En);return s&&jt.forEach(function(sS){return u(Ce,sS)}),Xn&&Su(Ce,Wt),xt}function br(Ce,ye,Me,lt){if(typeof Me=="object"&&Me!==null&&Me.type===_&&Me.key===null&&(Me=Me.props.children),typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case R:e:{for(var xt=Me.key,Pt=ye;Pt!==null;){if(Pt.key===xt){if(xt=Me.type,xt===_){if(Pt.tag===7){m(Ce,Pt.sibling),ye=C(Pt,Me.props.children),ye.return=Ce,Ce=ye;break e}}else if(Pt.elementType===xt||typeof xt=="object"&&xt!==null&&xt.$$typeof===$&&hh(xt)===Pt.type){m(Ce,Pt.sibling),ye=C(Pt,Me.props),ye.ref=Ad(Ce,Pt,Me),ye.return=Ce,Ce=ye;break e}m(Ce,Pt);break}else u(Ce,Pt);Pt=Pt.sibling}Me.type===_?(ye=Au(Me.props.children,Ce.mode,lt,Me.key),ye.return=Ce,Ce=ye):(lt=Yh(Me.type,Me.key,Me.props,null,Ce.mode,lt),lt.ref=Ad(Ce,ye,Me),lt.return=Ce,Ce=lt)}return W(Ce);case L:e:{for(Pt=Me.key;ye!==null;){if(ye.key===Pt)if(ye.tag===4&&ye.stateNode.containerInfo===Me.containerInfo&&ye.stateNode.implementation===Me.implementation){m(Ce,ye.sibling),ye=C(ye,Me.children||[]),ye.return=Ce,Ce=ye;break e}else{m(Ce,ye);break}else u(Ce,ye);ye=ye.sibling}ye=cg(Me,Ce.mode,lt),ye.return=Ce,Ce=ye}return W(Ce);case $:return Pt=Me._init,br(Ce,ye,Pt(Me._payload),lt)}if(Vt(Me))return Dt(Ce,ye,Me,lt);if(ue(Me))return Et(Ce,ye,Me,lt);Fd(Ce,Me)}return typeof Me=="string"&&Me!==""||typeof Me=="number"?(Me=""+Me,ye!==null&&ye.tag===6?(m(Ce,ye.sibling),ye=C(ye,Me),ye.return=Ce,Ce=ye):(m(Ce,ye),ye=ug(Me,Ce.mode,lt),ye.return=Ce,Ce=ye),W(Ce)):m(Ce,ye)}return br}var yl=_y(!0),xm=_y(!1),Ec={},yi=Xa(Ec),wl=Xa(Ec),Od=Xa(Ec);function bl(s){if(s===Ec)throw Error(n(174));return s}function ph(s,u){switch(qn(Od,u),qn(wl,s),qn(yi,Ec),s=u.nodeType,s){case 9:case 11:u=(u=u.documentElement)?u.namespaceURI:pt(null,"");break;default:s=s===8?u.parentNode:u,u=s.namespaceURI||null,s=s.tagName,u=pt(u,s)}Qn(yi),qn(yi,u)}function Cc(){Qn(yi),Qn(wl),Qn(Od)}function Mm(s){bl(Od.current);var u=bl(yi.current),m=pt(u,s.type);u!==m&&(qn(wl,s),qn(yi,m))}function km(s){wl.current===s&&(Qn(yi),Qn(wl))}var er=Xa(0);function Pd(s){for(var u=s;u!==null;){if(u.tag===13){var m=u.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||m.data==="$?"||m.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var jd=[];function Nm(){for(var s=0;sm?m:4,s(!0);var b=rn.transition;rn.transition={};try{s(!1),u()}finally{ct=m,rn.transition=b}}function _d(){return Ur().memoizedState}function Ac(s,u,m){var b=Cl(s);if(m={lane:b,action:m,hasEagerState:!1,eagerState:null,next:null},_m(s))Vy(u,m);else if(m=ba(s,u,m,b),m!==null){var C=Ya();Si(m,s,b,C),Bm(m,u,b)}}function zy(s,u,m){var b=Cl(s),C={lane:b,action:m,hasEagerState:!1,eagerState:null,next:null};if(_m(s))Vy(u,C);else{var O=s.alternate;if(s.lanes===0&&(O===null||O.lanes===0)&&(O=u.lastRenderedReducer,O!==null))try{var W=u.lastRenderedState,le=O(W,m);if(C.hasEagerState=!0,C.eagerState=le,Oe(le,W)){var ge=u.interleaved;ge===null?(C.next=C,uh(u)):(C.next=ge.next,ge.next=C),u.interleaved=C;return}}catch{}m=ba(s,u,C,b),m!==null&&(C=Ya(),Si(m,s,b,C),Bm(m,u,b))}}function _m(s){var u=s.alternate;return s===or||u!==null&&u===or}function Vy(s,u){Ld=mh=!0;var m=s.pending;m===null?u.next=u:(u.next=m.next,m.next=u),s.pending=u}function Bm(s,u,m){if(m&4194240){var b=u.lanes;b&=s.pendingLanes,m|=b,u.lanes=m,it(s,m)}}var Cs={readContext:Ba,useCallback:Hr,useContext:Hr,useEffect:Hr,useImperativeHandle:Hr,useInsertionEffect:Hr,useLayoutEffect:Hr,useMemo:Hr,useReducer:Hr,useRef:Hr,useState:Hr,useDebugValue:Hr,useDeferredValue:Hr,useTransition:Hr,useMutableSource:Hr,useSyncExternalStore:Hr,useId:Hr,unstable_isNewReconciler:!1},Bd={readContext:Ba,useCallback:function(s,u){return hr().memoizedState=[s,u===void 0?null:u],s},useContext:Ba,useEffect:Hy,useImperativeHandle:function(s,u,m){return m=m!=null?m.concat([s]):null,Nc(4194308,4,Uy.bind(null,u,s),m)},useLayoutEffect:function(s,u){return Nc(4194308,4,s,u)},useInsertionEffect:function(s,u){return Nc(4,2,s,u)},useMemo:function(s,u){var m=hr();return u=u===void 0?null:u,s=s(),m.memoizedState=[s,u],s},useReducer:function(s,u,m){var b=hr();return u=m!==void 0?m(u):u,b.memoizedState=b.baseState=u,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:u},b.queue=s,s=s.dispatch=Ac.bind(null,or,s),[b.memoizedState,s]},useRef:function(s){var u=hr();return s={current:s},u.memoizedState=s},useState:Es,useDebugValue:Th,useDeferredValue:function(s){return hr().memoizedState=s},useTransition:function(){var s=Es(!1),u=s[0];return s=z1.bind(null,s[1]),hr().memoizedState=s,[u,s]},useMutableSource:function(){},useSyncExternalStore:function(s,u,m){var b=or,C=hr();if(Xn){if(m===void 0)throw Error(n(407));m=m()}else{if(m=u(),Jr===null)throw Error(n(349));Eu&30||Fm(b,u,m)}C.memoizedState=m;var O={value:m,getSnapshot:u};return C.queue=O,Hy(Sh.bind(null,b,O,s),[s]),b.flags|=2048,kc(9,bh.bind(null,b,O,m,u),void 0,null),m},useId:function(){var s=hr(),u=Jr.identifierPrefix;if(Xn){var m=Vi,b=zi;m=(b&~(1<<32-Rr(b)-1)).toString(32)+m,u=":"+u+"R"+m,m=Sa++,0<\/script>",s=s.removeChild(s.firstChild)):typeof b.is=="string"?s=W.createElement(m,{is:b.is}):(s=W.createElement(m),m==="select"&&(W=s,b.multiple?W.multiple=!0:b.size&&(W.size=b.size))):s=W.createElementNS(s,m),s[Ui]=u,s[dl]=b,Ky(s,u,!1,!1),u.stateNode=s;e:{switch(W=Lr(m,b),m){case"dialog":Kn("cancel",s),Kn("close",s),C=b;break;case"iframe":case"object":case"embed":Kn("load",s),C=b;break;case"video":case"audio":for(C=0;CBc&&(u.flags|=128,b=!0,Pc(O,!1),u.lanes=4194304)}else{if(!b)if(s=Pd(W),s!==null){if(u.flags|=128,b=!0,m=s.updateQueue,m!==null&&(u.updateQueue=m,u.flags|=4),Pc(O,!0),O.tail===null&&O.tailMode==="hidden"&&!W.alternate&&!Xn)return Ia(u),null}else 2*An()-O.renderingStartTime>Bc&&m!==1073741824&&(u.flags|=128,b=!0,Pc(O,!1),u.lanes=4194304);O.isBackwards?(W.sibling=u.child,u.child=W):(m=O.last,m!==null?m.sibling=W:u.child=W,O.last=W)}return O.tail!==null?(u=O.tail,O.rendering=u,O.tail=u.sibling,O.renderingStartTime=An(),u.sibling=null,m=er.current,qn(er,b?m&1|2:m&1),u):(Ia(u),null);case 22:case 23:return og(),b=u.memoizedState!==null,s!==null&&s.memoizedState!==null!==b&&(u.flags|=8192),b&&u.mode&1?Io&1073741824&&(Ia(u),u.subtreeFlags&6&&(u.flags|=8192)):Ia(u),null;case 24:return null;case 25:return null}throw Error(n(156,u.tag))}function $1(s,u){switch(Du(u),u.tag){case 1:return to(u.type)&&nh(),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return Cc(),Qn(eo),Qn(va),Nm(),s=u.flags,s&65536&&!(s&128)?(u.flags=s&-65537|128,u):null;case 5:return km(u),null;case 13:if(Qn(er),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(n(340));$i()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return Qn(er),null;case 4:return Cc(),null;case 10:return lh(u.type._context),null;case 22:case 23:return og(),null;case 24:return null;default:return null}}var Vo=!1,Fn=!1,Zm=typeof WeakSet=="function"?WeakSet:Set,wt=null;function Dl(s,u){var m=s.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(b){pr(s,u,b)}else m.current=null}function qm(s,u,m){try{m()}catch(b){pr(s,u,b)}}var Xy=!1;function Wd(s,u){if(Ed=vo,s=Un(),yd(s)){if("selectionStart"in s)var m={start:s.selectionStart,end:s.selectionEnd};else e:{m=(m=s.ownerDocument)&&m.defaultView||window;var b=m.getSelection&&m.getSelection();if(b&&b.rangeCount!==0){m=b.anchorNode;var C=b.anchorOffset,O=b.focusNode;b=b.focusOffset;try{m.nodeType,O.nodeType}catch{m=null;break e}var W=0,le=-1,ge=-1,Pe=0,Ge=0,rt=s,qe=null;t:for(;;){for(var yt;rt!==m||C!==0&&rt.nodeType!==3||(le=W+C),rt!==O||b!==0&&rt.nodeType!==3||(ge=W+b),rt.nodeType===3&&(W+=rt.nodeValue.length),(yt=rt.firstChild)!==null;)qe=rt,rt=yt;for(;;){if(rt===s)break t;if(qe===m&&++Pe===C&&(le=W),qe===O&&++Ge===b&&(ge=W),(yt=rt.nextSibling)!==null)break;rt=qe,qe=rt.parentNode}rt=yt}m=le===-1||ge===-1?null:{start:le,end:ge}}else m=null}m=m||{start:0,end:0}}else m=null;for(yu={focusedElem:s,selectionRange:m},vo=!1,wt=u;wt!==null;)if(u=wt,s=u.child,(u.subtreeFlags&1028)!==0&&s!==null)s.return=u,wt=s;else for(;wt!==null;){u=wt;try{var Dt=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(Dt!==null){var Et=Dt.memoizedProps,br=Dt.memoizedState,Ce=u.stateNode,ye=Ce.getSnapshotBeforeUpdate(u.elementType===u.type?Et:mi(u.type,Et),br);Ce.__reactInternalSnapshotBeforeUpdate=ye}break;case 3:var Me=u.stateNode.containerInfo;Me.nodeType===1?Me.textContent="":Me.nodeType===9&&Me.documentElement&&Me.removeChild(Me.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(lt){pr(u,u.return,lt)}if(s=u.sibling,s!==null){s.return=u.return,wt=s;break}wt=u.return}return Dt=Xy,Xy=!1,Dt}function jc(s,u,m){var b=u.updateQueue;if(b=b!==null?b.lastEffect:null,b!==null){var C=b=b.next;do{if((C.tag&s)===s){var O=C.destroy;C.destroy=void 0,O!==void 0&&qm(u,m,O)}C=C.next}while(C!==b)}}function $d(s,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var m=u=u.next;do{if((m.tag&s)===s){var b=m.create;m.destroy=b()}m=m.next}while(m!==u)}}function Gm(s){var u=s.ref;if(u!==null){var m=s.stateNode;switch(s.tag){case 5:s=m;break;default:s=m}typeof u=="function"?u(s):u.current=s}}function e0(s){var u=s.alternate;u!==null&&(s.alternate=null,e0(u)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(u=s.stateNode,u!==null&&(delete u[Ui],delete u[dl],delete u[eh],delete u[J],delete u[bc])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function t0(s){return s.tag===5||s.tag===3||s.tag===4}function n0(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||t0(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Ah(s,u,m){var b=s.tag;if(b===5||b===6)s=s.stateNode,u?m.nodeType===8?m.parentNode.insertBefore(s,u):m.insertBefore(s,u):(m.nodeType===8?(u=m.parentNode,u.insertBefore(s,m)):(u=m,u.appendChild(s)),m=m._reactRootContainer,m!=null||u.onclick!==null||(u.onclick=Qf));else if(b!==4&&(s=s.child,s!==null))for(Ah(s,u,m),s=s.sibling;s!==null;)Ah(s,u,m),s=s.sibling}function Fh(s,u,m){var b=s.tag;if(b===5||b===6)s=s.stateNode,u?m.insertBefore(s,u):m.appendChild(s);else if(b!==4&&(s=s.child,s!==null))for(Fh(s,u,m),s=s.sibling;s!==null;)Fh(s,u,m),s=s.sibling}var ia=null,Do=!1;function Ms(s,u,m){for(m=m.child;m!==null;)Lc(s,u,m),m=m.sibling}function Lc(s,u,m){if(Pa&&typeof Pa.onCommitFiberUnmount=="function")try{Pa.onCommitFiberUnmount(ho,m)}catch{}switch(m.tag){case 5:Fn||Dl(m,u);case 6:var b=ia,C=Do;ia=null,Ms(s,u,m),ia=b,Do=C,ia!==null&&(Do?(s=ia,m=m.stateNode,s.nodeType===8?s.parentNode.removeChild(m):s.removeChild(m)):ia.removeChild(m.stateNode));break;case 18:ia!==null&&(Do?(s=ia,m=m.stateNode,s.nodeType===8?ym(s.parentNode,m):s.nodeType===1&&ym(s,m),pn(s)):ym(ia,m.stateNode));break;case 4:b=ia,C=Do,ia=m.stateNode.containerInfo,Do=!0,Ms(s,u,m),ia=b,Do=C;break;case 0:case 11:case 14:case 15:if(!Fn&&(b=m.updateQueue,b!==null&&(b=b.lastEffect,b!==null))){C=b=b.next;do{var O=C,W=O.destroy;O=O.tag,W!==void 0&&(O&2||O&4)&&qm(m,u,W),C=C.next}while(C!==b)}Ms(s,u,m);break;case 1:if(!Fn&&(Dl(m,u),b=m.stateNode,typeof b.componentWillUnmount=="function"))try{b.props=m.memoizedProps,b.state=m.memoizedState,b.componentWillUnmount()}catch(le){pr(m,u,le)}Ms(s,u,m);break;case 21:Ms(s,u,m);break;case 22:m.mode&1?(Fn=(b=Fn)||m.memoizedState!==null,Ms(s,u,m),Fn=b):Ms(s,u,m);break;default:Ms(s,u,m)}}function Oh(s){var u=s.updateQueue;if(u!==null){s.updateQueue=null;var m=s.stateNode;m===null&&(m=s.stateNode=new Zm),u.forEach(function(b){var C=eS.bind(null,s,b);m.has(b)||(m.add(b),b.then(C,C))})}}function Wo(s,u){var m=u.deletions;if(m!==null)for(var b=0;bC&&(C=W),b&=~O}if(b=C,b=An()-b,b=(120>b?120:480>b?480:1080>b?1080:1920>b?1920:3e3>b?3e3:4320>b?4320:1960*Z1(b/1960))-b,10s?16:s,zr===null)var b=!1;else{if(s=zr,zr=null,_h=0,bn&6)throw Error(n(331));var C=bn;for(bn|=4,wt=s.current;wt!==null;){var O=wt,W=O.child;if(wt.flags&16){var le=O.deletions;if(le!==null){for(var ge=0;geAn()-jh?ku(s,0):Xm|=m),Ea(s,u)}function d0(s,u){u===0&&(s.mode&1?(u=hs,hs<<=1,!(hs&130023424)&&(hs=4194304)):u=1);var m=Ya();s=gi(s,u),s!==null&&(Ie(s,u,m),Ea(s,m))}function X1(s){var u=s.memoizedState,m=0;u!==null&&(m=u.retryLane),d0(s,m)}function eS(s,u){var m=0;switch(s.tag){case 13:var b=s.stateNode,C=s.memoizedState;C!==null&&(m=C.retryLane);break;case 19:b=s.stateNode;break;default:throw Error(n(314))}b!==null&&b.delete(u),d0(s,m)}var f0;f0=function(s,u,m){if(s!==null)if(s.memoizedProps!==u.pendingProps||eo.current)Da=!0;else{if(!(s.lanes&m)&&!(u.flags&128))return Da=!1,Ta(s,u,m);Da=!!(s.flags&131072)}else Da=!1,Xn&&u.flags&1048576&&Fy(u,oh,u.index);switch(u.lanes=0,u.tag){case 2:var b=u.type;Oc(s,u),s=u.pendingProps;var C=Dc(u,va.current);pl(u,m),C=gh(null,u,b,s,C,m);var O=vh();return u.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,to(b)?(O=!0,Ho(u)):O=!1,u.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,Dm(u),C.updater=dh,u.stateNode=C,C._reactInternals=u,Cm(u,b,s,m),u=Vm(null,u,b,!0,O,m)):(u.tag=0,Xn&&O&&Md(u),Ua(null,u,C,m),u=u.child),u;case 16:b=u.elementType;e:{switch(Oc(s,u),s=u.pendingProps,C=b._init,b=C(b._payload),u.type=b,C=u.tag=Uh(b),s=mi(b,s),C){case 0:u=xh(null,u,b,s,m);break e;case 1:u=Gy(null,u,b,s,m);break e;case 11:u=Um(null,u,b,s,m);break e;case 14:u=qi(null,u,b,mi(b.type,s),m);break e}throw Error(n(306,b,""))}return u;case 0:return b=u.type,C=u.pendingProps,C=u.elementType===b?C:mi(b,C),xh(s,u,b,C,m);case 1:return b=u.type,C=u.pendingProps,C=u.elementType===b?C:mi(b,C),Gy(s,u,b,C,m);case 3:e:{if(Gi(u),s===null)throw Error(n(387));b=u.pendingProps,O=u.memoizedState,C=O.element,jy(s,u),ch(u,b,null,m);var W=u.memoizedState;if(b=W.element,O.isDehydrated)if(O={element:b,isDehydrated:!1,cache:W.cache,pendingSuspenseBoundaries:W.pendingSuspenseBoundaries,transitions:W.transitions},u.updateQueue.baseState=O,u.memoizedState=O,u.flags&256){C=xu(Error(n(423)),u),u=Mh(s,u,b,m,C);break e}else if(b!==C){C=xu(Error(n(424)),u),u=Mh(s,u,b,m,C);break e}else for(bo=cl(u.stateNode.containerInfo.firstChild),wa=u,Xn=!0,pi=null,m=xm(u,null,b,m),u.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if($i(),b===C){u=Ji(s,u,m);break e}Ua(s,u,b,m)}u=u.child}return u;case 5:return Mm(u),s===null&&no(u),b=u.type,C=u.pendingProps,O=s!==null?s.memoizedProps:null,W=C.children,Cd(b,C)?W=null:O!==null&&Cd(b,O)&&(u.flags|=32),qy(s,u),Ua(s,u,W,m),u.child;case 6:return s===null&&no(u),null;case 13:return Vd(s,u,m);case 4:return ph(u,u.stateNode.containerInfo),b=u.pendingProps,s===null?u.child=yl(u,null,b,m):Ua(s,u,b,m),u.child;case 11:return b=u.type,C=u.pendingProps,C=u.elementType===b?C:mi(b,C),Um(s,u,b,C,m);case 7:return Ua(s,u,u.pendingProps,m),u.child;case 8:return Ua(s,u,u.pendingProps.children,m),u.child;case 12:return Ua(s,u,u.pendingProps.children,m),u.child;case 10:e:{if(b=u.type._context,C=u.pendingProps,O=u.memoizedProps,W=C.value,qn(Tu,b._currentValue),b._currentValue=W,O!==null)if(Oe(O.value,W)){if(O.children===C.children&&!eo.current){u=Ji(s,u,m);break e}}else for(O=u.child,O!==null&&(O.return=u);O!==null;){var le=O.dependencies;if(le!==null){W=O.child;for(var ge=le.firstContext;ge!==null;){if(ge.context===b){if(O.tag===1){ge=vi(-1,m&-m),ge.tag=2;var Pe=O.updateQueue;if(Pe!==null){Pe=Pe.shared;var Ge=Pe.pending;Ge===null?ge.next=ge:(ge.next=Ge.next,Ge.next=ge),Pe.pending=ge}}O.lanes|=m,ge=O.alternate,ge!==null&&(ge.lanes|=m),zo(O.return,m,u),le.lanes|=m;break}ge=ge.next}}else if(O.tag===10)W=O.type===u.type?null:O.child;else if(O.tag===18){if(W=O.return,W===null)throw Error(n(341));W.lanes|=m,le=W.alternate,le!==null&&(le.lanes|=m),zo(W,m,u),W=O.sibling}else W=O.child;if(W!==null)W.return=O;else for(W=O;W!==null;){if(W===u){W=null;break}if(O=W.sibling,O!==null){O.return=W.return,W=O;break}W=W.return}O=W}Ua(s,u,C.children,m),u=u.child}return u;case 9:return C=u.type,b=u.pendingProps.children,pl(u,m),C=Ba(C),b=b(C),u.flags|=1,Ua(s,u,b,m),u.child;case 14:return b=u.type,C=mi(b,u.pendingProps),C=mi(b.type,C),qi(s,u,b,C,m);case 15:return Ym(s,u,u.type,u.pendingProps,m);case 17:return b=u.type,C=u.pendingProps,C=u.elementType===b?C:mi(b,C),Oc(s,u),u.tag=1,to(b)?(s=!0,Ho(u)):s=!1,pl(u,m),Em(u,b,C),Cm(u,b,C,m),Vm(null,u,b,!0,s,m);case 19:return Jy(s,u,m);case 22:return zm(s,u,m)}throw Error(n(156,u.tag))};function h0(s,u){return cs(s,u)}function tS(s,u,m,b){this.tag=s,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=b,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Eo(s,u,m,b){return new tS(s,u,m,b)}function lg(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Uh(s){if(typeof s=="function")return lg(s)?1:0;if(s!=null){if(s=s.$$typeof,s===G)return 11;if(s===fe)return 14}return 2}function kl(s,u){var m=s.alternate;return m===null?(m=Eo(s.tag,u,s.key,s.mode),m.elementType=s.elementType,m.type=s.type,m.stateNode=s.stateNode,m.alternate=s,s.alternate=m):(m.pendingProps=u,m.type=s.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=s.flags&14680064,m.childLanes=s.childLanes,m.lanes=s.lanes,m.child=s.child,m.memoizedProps=s.memoizedProps,m.memoizedState=s.memoizedState,m.updateQueue=s.updateQueue,u=s.dependencies,m.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},m.sibling=s.sibling,m.index=s.index,m.ref=s.ref,m}function Yh(s,u,m,b,C,O){var W=2;if(b=s,typeof s=="function")lg(s)&&(W=1);else if(typeof s=="string")W=5;else e:switch(s){case _:return Au(m.children,C,O,u);case V:W=8,C|=8;break;case U:return s=Eo(12,m,u,C|2),s.elementType=U,s.lanes=O,s;case re:return s=Eo(13,m,u,C),s.elementType=re,s.lanes=O,s;case de:return s=Eo(19,m,u,C),s.elementType=de,s.lanes=O,s;case he:return zh(m,C,O,u);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case Z:W=10;break e;case Q:W=9;break e;case G:W=11;break e;case fe:W=14;break e;case $:W=16,b=null;break e}throw Error(n(130,s==null?s:typeof s,""))}return u=Eo(W,m,u,C),u.elementType=s,u.type=b,u.lanes=O,u}function Au(s,u,m,b){return s=Eo(7,s,b,u),s.lanes=m,s}function zh(s,u,m,b){return s=Eo(22,s,b,u),s.elementType=he,s.lanes=m,s.stateNode={isHidden:!1},s}function ug(s,u,m){return s=Eo(6,s,null,u),s.lanes=m,s}function cg(s,u,m){return u=Eo(4,s.children!==null?s.children:[],s.key,u),u.lanes=m,u.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},u}function nS(s,u,m,b,C){this.tag=u,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ne(0),this.expirationTimes=Ne(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ne(0),this.identifierPrefix=b,this.onRecoverableError=C,this.mutableSourceEagerHydrationData=null}function dg(s,u,m,b,C,O,W,le,ge){return s=new nS(s,u,m,le,ge),u===1?(u=1,O===!0&&(u|=8)):u=0,O=Eo(3,null,null,u),s.current=O,O.stateNode=s,O.memoizedState={element:b,isDehydrated:m,cache:null,transitions:null,pendingSuspenseBoundaries:null},Dm(O),s}function rS(s,u,m){var b=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(T6)}catch(e){console.error(e)}}T6();D6.exports=KH();var G2=D6.exports;const J2=qt(G2);var Rv,I6=G2;Rv=rs.createRoot=I6.createRoot;rs.hydrateRoot=I6.hydrateRoot;const QH=e=>{const{children:t,className:n,clickSpaceDestroy:r,destroy:a}=e,o=()=>{r&&a()},i=l=>{(l.key==="Escape"||(l.ctrlKey||l.metaKey)&&l.key.toLowerCase()==="w")&&a()};return v.jsx("div",{className:`dialog-wrapper ${n}`,onClick:o,onKeyDown:l=>i(l),children:v.jsx("div",{className:"dialog-container",onClick:l=>l.stopPropagation(),children:t})})};function Db(e,t,n){const r=document.createElement("div");document.body.append(r),setTimeout(()=>{var c;(c=r.firstElementChild)==null||c.classList.add("showup")},0);const a={destroy:()=>{var c,f;(c=r.firstElementChild)==null||c.classList.remove("showup"),(f=r.firstElementChild)==null||f.classList.add("showoff"),setTimeout(()=>{r.detach(),l.unmount(),document.body.find(".domtoimage-thino")&&document.body.findAll(".domtoimage-thino").forEach(g=>{g.detach()})},cA)}},o={...n,destroy:a.destroy};let i=v.jsx(QH,{destroy:a.destroy,clickSpaceDestroy:!0,...e,children:v.jsx(t,{...o})});i=v.jsx(is,{store:Le,context:Lt,children:i});const l=rs.createRoot(r);return l.render(i),a}class XH extends x.Modal{constructor(n,r,a){super(n);Se(this,"plugin");this.version=a,this.plugin=r}onOpen(){super.onOpen(),this.titleEl.setText(E("Submit issue")),new x.Setting(this.contentEl).setName(E("Current version")+": "+this.version),new x.Setting(this.contentEl).setName(E("Bug report")).setDesc(E("Click the button to copy debug info and open the issue page")).addButton(n=>{n.setButtonText(E("Copy and go")).onClick(async()=>{await sC(this.plugin),new x.Notice(E("Debug info copied")),setTimeout(()=>{window.open("https://github.com/Quorafind/Obsidian-Thino/issues/new/choose","_blank"),this.close()},100)})}),new x.Setting(this.contentEl).setName(E("Feature request")).setDesc(E("Submit your feature request to the issue page")).addButton(n=>{n.setButtonText(E("Go")).onClick(async()=>{window.open("https://github.com/Quorafind/Obsidian-Thino/issues/new/choose","_blank"),this.close()})})}}function E6(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t{const t={};return e.forEach(n=>{const r=n.createdAt.split(" ")[0];t[r]?t[r]++:t[r]=1}),Object.keys(t).sort((n,r)=>t[r]-t[n])[0]},tU=e=>{const t={};return e.forEach(n=>{const r=n.createdAt.slice(11,13);t[r]?t[r]++:t[r]=1}),Object.keys(t).sort((n,r)=>t[r]-t[n])[0]};function vx(e,t,n){const r=P.useRef(),a=P.useRef();P.useEffect(()=>{const i=t-e,l=c=>{a.current||(a.current=c);const f=c-a.current;if(f<1e3){const h=f/1e3;n(e+i*h),r.current=requestAnimationFrame(l)}else n(t)};return r.current=requestAnimationFrame(l),()=>cancelAnimationFrame(r.current)},[t,n,e])}const K2=({statusType:e})=>{const{memoState:{memos:t,tags:n},locationState:{pathname:r},dailyNotesState:{settings:a,app:o}}=P.useContext(Lt),[i,l]=P.useState(0),[c,f]=P.useState(0),[h,g]=P.useState(0),[y,w]=P.useState(null),[S,D]=P.useState(!1),I=ne.useRef(null),[M,N]=P.useState(0),[B,k]=P.useState(0),[R,L]=P.useState(0),[_,V]=P.useState(""),[U,Z]=P.useState(""),[Q,G]=P.useState(!1),[re,de]=P.useState(null);P.useEffect(()=>{if(e==="banner")return;const se=t.filter(ue=>!ue.deletedAt&&ue.rowStatus!=="ARCHIVED");L(se.filter(ue=>{var X;return(X=ue.thinoType)==null?void 0:X.startsWith("TASK")}).length),V(eU(t)),Z(tU(t))},[t]),P.useLayoutEffect(()=>{if(!o)return;const{tags:se,memos:ue,days:X}=nU(o);g(se),l(ue),f(X)},[o]),P.useEffect(()=>{!a||!o||(D(i>9999||h>999||c>999),rU({tags:h,memos:i,days:c},o))},[i,h,c]),P.useEffect(()=>{we.initialized&&t&&r==="/"&&(g(n.length),l(t.filter(se=>!(se.deletedAt!==""&&se.deletedAt)).length),w(t.length>0?t[t.length-1]:null))},[n,t,r]),P.useEffect(()=>{if(!we.initialized)return;if(!y){f(0);return}if(!I.current||!(y!=null&&y.createdAt))return;x.requireApiVersion("1.4.4")&&x.setTooltip(I.current,E("Started from")+" "+ut.getDateTimeString((y==null?void 0:y.createdAt)??""));const se=x.moment().diff(x.moment(y.createdAt,"YYYY/MM/DD HH:mm:ss"),"days")+1;f(t?se:0)},[y]);const fe=(se,ue)=>{if(Q&&ue===re){at.setMemoFilter(""),G(!1);return}const X=on.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([se]));on.pushQuery(X),at.setMemoFilter(X.id),G(!0),de(ue)},$=()=>{fe({type:"LIST",value:{operator:"IS_NOT",value:"LIST"},relation:"AND"},"LIST")},he=()=>{fe({type:"TYPE",value:{operator:"IS_NOT",value:"NOT_TAGGED"},relation:"AND"},"TYPE")};return vx(M,i,N),vx(B,c,k),v.jsx("div",{className:ar("status-text-container",S?"text-overflow":"",e),children:e==="banner"?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"status-text memos-text",children:[v.jsx("span",{className:"amount-text",children:Math.round(M)}),v.jsx("span",{className:"type-text",children:"THINO"})]}),v.jsxs("div",{className:"status-text tags-text",children:[v.jsx("span",{className:"amount-text",children:h}),v.jsx("span",{className:"type-text",children:E("TAG")})]}),v.jsxs("div",{ref:I,className:"status-text duration-text",onClick:()=>{dt.setShowSiderbarInMobileView(!1),at.setPathname("/daily")},children:[v.jsx("span",{className:"amount-text",children:Math.round(B)??0}),v.jsx("span",{className:"type-text",children:E("DAY")})]})]}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"status-sidebar-header title-text",children:v.jsx("span",{className:"normal-text",children:E("Thino status")})}),v.jsxs("div",{className:"status-sidebar-wrapper",children:[v.jsxs("div",{className:"status-text memos-text",children:[v.jsx("span",{className:"type-text",children:E("Thino amount")}),v.jsx("span",{className:"amount-text",children:Math.round(M)})]}),v.jsxs("div",{className:"status-text memos-text",onClick:$,children:[v.jsx("span",{className:"type-text",children:E("Task amount")}),v.jsx("span",{className:"amount-text",children:Math.round(R)??0})]}),v.jsxs("div",{className:"status-text tags-text",onClick:he,children:[v.jsx("span",{className:"type-text",children:E("Used tags")}),v.jsx("span",{className:"amount-text",children:h})]}),v.jsxs("div",{ref:I,className:"status-text duration-text",onClick:()=>{dt.setShowSiderbarInMobileView(!1),at.setPathname("/daily")},children:[v.jsx("span",{className:"type-text",children:E("Used days")}),v.jsx("span",{className:"amount-text",children:Math.round(B)??0})]}),v.jsxs("div",{className:"status-text most-active-day-text",onClick:()=>{const se=x.moment(_,"YYYY/MM/DD").startOf("day").valueOf(),ue=x.moment(_,"YYYY/MM/DD").endOf("day").valueOf();at.setFromAndToQuery(se,ue)},children:[v.jsx("span",{className:"type-text",children:E("Most active day")}),v.jsx("span",{className:"amount-text",children:_})]}),v.jsxs("div",{className:"status-text most-active-hour-text",children:[v.jsx("span",{className:"type-text",children:E("Most active hour")}),v.jsx("span",{className:"amount-text",children:U})]})]})]})})};function C6(e){return`userBannerCache:${e}`}function nU(e){try{const t=C6(e==null?void 0:e.appId),n=la.get([t])[t];return n?JSON.parse(n):{tags:0,memos:0,days:0}}catch(t){return console.error(t),{tags:0,memos:0,days:0}}}function rU({tags:e,memos:t,days:n},r){try{const a={tags:e,memos:t,days:n},o=C6(r==null?void 0:r.appId);la.set({[o]:JSON.stringify(a)})}catch(a){console.error(a)}}function Gl(e){const t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function x6(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function aU(e,t){const n=Gl(e);return isNaN(t)?x6(e,NaN):(t&&n.setDate(n.getDate()+t),n)}let oU={};function M6(){return oU}function yx(e,t){var l,c,f,h;const n=M6(),r=(t==null?void 0:t.weekStartsOn)??((c=(l=t==null?void 0:t.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((h=(f=n.locale)==null?void 0:f.options)==null?void 0:h.weekStartsOn)??0,a=Gl(e),o=a.getDay(),i=(oo-i);return n>=r&&n<=a}function np(e,t){return aU(e,-t)}const cU=[{text:E("AND"),value:"AND"},{text:E("OR"),value:"OR"}],jl={TAG:{value:"TAG",text:E("TAG"),operators:[{text:E("INCLUDE"),value:"CONTAIN"},{text:E("EXCLUDE"),value:"NOT_CONTAIN"}]},TYPE:{value:"TYPE",text:E("TYPE"),operators:[{value:"IS",text:E("IS")},{value:"IS_NOT",text:E("ISNOT")}],values:[{value:"CONNECTED",text:E("LINKED")},{value:"NOT_TAGGED",text:E("NO TAGS")},{value:"LINKED",text:E("HAS LINKS")},{value:"IMAGED",text:E("HAS IMAGES")}]},TEXT:{value:"TEXT",text:E("TEXT"),operators:[{value:"CONTAIN",text:E("INCLUDE")},{value:"NOT_CONTAIN",text:E("EXCLUDE")}]},DATE:{value:"DATE",text:E("DATE"),operators:[{value:"NOT_CONTAIN",text:E("BEFORE")},{value:"CONTAIN",text:E("AFTER")}]},LIST:{value:"LIST",text:E("LIST"),operators:[{value:"IS",text:E("IS")},{value:"IS_NOT",text:E("ISNOT")}],values:[{value:"TODO",text:E("TODO")},{value:"DONE",text:E("DONE")},{value:"LIST",text:E("JOURNAL")},{value:"OTHER",text:E("OTHER")}]},SOURCE:{value:"SOURCE",text:E("SOURCE"),operators:[{value:"IS",text:E("IS")},{value:"IS_NOT",text:E("ISNOT")}],values:[{value:"DAILY",text:E("DAILY")},{value:"MULTI",text:E("MULTI")},{value:"FILE",text:E("FILE")},{value:"CANVAS",text:E("CANVAS")}]},PATH:{value:"PATH",text:E("PATH"),operators:[{value:"CONTAIN",text:E("INCLUDE")},{value:"NOT_CONTAIN",text:E("EXCLUDE")}]},METADATA:{value:"METADATA",text:E("METADATA"),operators:[{value:"CONTAIN",text:E("INCLUDE")},{value:"NOT_CONTAIN",text:E("EXCLUDE")}]},TIME_RANGE:{value:"TIME_RANGE",text:E("TIME RANGE"),operators:[{value:"WITHIN",text:E("WITHIN")},{value:"BEFORE",text:E("BEFORE")}],values:[{value:"7d",text:E("7 days")},{value:"14d",text:E("14 days")},{value:"30d",text:E("30 days")},{value:"90d",text:E("3 months")},{value:"180d",text:E("6 months")},{value:"365d",text:E("1 year")},{value:"thisWeek",text:E("This week")},{value:"thisMonth",text:E("This month")},{value:"thisYear",text:E("This year")},{value:"lastWeek",text:E("Last week")},{value:"lastMonth",text:E("Last month")},{value:"lastYear",text:E("Last year")}]}},TT=jl.TYPE.values,dU=e=>{for(const t of TT)if(t.value===e)return t.text;return""},Sx=()=>({type:"TAG",value:{operator:"CONTAIN",value:""},relation:"AND"}),Vp=(e,t)=>{let n=!0;for(const r of t){const{relation:a}=r,o=fU(e,r);a==="OR"?n=n||o:n=n&&o}return n},fU=(e,t)=>{var i,l;const{type:n,value:{operator:r,value:a}}=t;if(a==="")return!0;let o=!0;if(n==="TAG"){let c=!0;const f=new Set;for(const h of Array.from(e.content.match($r)||[])){const y=h.replace($r,"$1").trim().split("/");let w="";for(const S of y)w+=S,f.add(w),w+="/"}for(const h of Array.from(e.content.match(ua)||[])){const y=h.replace(ua,"$1").trim().split("/");let w="";for(const S of y)w+=S,f.add(w),w+="/"}f.has(a)||(c=!1),r==="NOT_CONTAIN"&&(c=!c),o=c}else if(n==="TYPE"){let c=!1;(a==="NOT_TAGGED"&&e.content.match($r)===null&&e.content.match(Wa)===null||a==="LINKED"&&e.content.match(Af)!==null||a==="IMAGED"&&e.content.match(Ff)!==null||a==="CONNECTED"&&e.content.match(ad)!==null)&&(c=!0),r==="IS_NOT"&&(c=!c),o=c}else if(n==="TEXT"){let c=!1;x.prepareSimpleSearch(a.toLowerCase())(e.content.toLowerCase())&&(c=!0),r==="NOT_CONTAIN"&&(c=!c),o=c}else if(n==="LIST"){let f=(e.thinoType==="JOURNAL"?"LIST":e.thinoType==="TASK-TODO"?"TODO":e.thinoType==="TASK-DONE"?"DONE":"OTHER").contains(a);r==="IS_NOT"&&(f=!f),o=f}else if(n==="PATH"){let c=e.path.toLowerCase().includes(a.toLowerCase());r==="NOT_CONTAIN"&&(c=!c),o=c}else if(n==="METADATA"){let c=!1;const f=(i=e==null?void 0:e.fileInfo)==null?void 0:i.frontmatter;a.name?f&&Object.keys(f).length>0&&a.name&&(f[a.name]?c=f[a.name]&&((l=f[a.name])==null?void 0:l.toString().contains(a.value)):c=!1):c=!0,r==="NOT_CONTAIN"&&(c=!c),o=c}else if(n==="SOURCE"){let c=e.sourceType===a;r==="IS_NOT"&&(c=!c),o=c}else if(n==="TIME_RANGE"){let c=!1;if(["7d","14d","30d","90d","180d","365d"].includes(a)){const f=new Date(e.createdAt).valueOf(),h=Date.now(),g=t.value.value.slice(0,-1),y=parseInt(g)*(24*60*60*1e3);r==="WITHIN"?c=h-f<=y:r==="BEFORE"&&(c=h-f>y)}else{const f=new Date(e.createdAt),h=new Date,{value:g,operator:y}=t.value;let w;switch(g){case"thisWeek":w={start:yx(h),end:h};break;case"thisMonth":w={start:wx(h),end:h};break;case"thisYear":w={start:bx(h),end:h};break;case"lastWeek":w={start:yx(np(h,7)),end:lU(np(h,7))};break;case"lastMonth":w={start:wx(np(h,30)),end:iU(np(h,30))};break;case"lastYear":w={start:bx(np(h,365)),end:sU(np(h,365))};break}w&&(c=uU(f,w)),y==="BEFORE"&&(c=!c)}o=c}else if(n==="DATE"){const c=x.moment(a,"YYYY-MM-DD").isValid();let f,h;if(c)f=x.moment(a,"YYYY-MM-DD"),h=f.isBefore(x.moment(e.createdAt,"YYYY/MM/DD HH:mm:ss"),"day");else{const y=(app.plugins.enabledPlugins.has("nldates-obsidian")&&app.plugins.getPlugin("nldates-obsidian")).parseDate(a);y.date!==null&&(h=y.moment.isBefore(x.moment(e.createdAt),"day"))}r==="NOT_CONTAIN"&&(h=!h),o=h}return o=e.linkId===""?o:!1,o};function Xl(e){const[t,n]=P.useState(()=>!!e),r=P.useCallback(a=>{n(typeof a=="boolean"?a:o=>!o)},[]);return[t,r]}const _v=()=>{const{dailyNotesState:{app:e,view:t},locationState:{query:{type:n}}}=P.useContext(Lt),r=ne.useRef(null),a=ne.useRef(null),[o,i]=Xl(!1);P.useEffect(()=>{!r||!t||!e||(t.registerEvent(e.workspace.on("blur-on-memos",()=>{var g;(g=r.current)==null||g.blur()})),t.registerEvent(e.workspace.on("focus-on-searchBar",()=>{var g;(g=r.current)==null||g.focus()})))},[r,e,t]),P.useEffect(()=>{a&&x.setIcon(a.current,"search")},[a]);const l=g=>{const{type:y}=at.getState().query;g===y&&(g=""),at.setMemoTypeQuery(g)},c=g=>{const y=g.currentTarget.value;if(!y.contains(" -time: ")){at.setTextQuery(y);return}const w=y.split(" -time: ")[1],S=w.length>10?w.match(/\d{4}-\d{2}-\d{2}/g):null;if(S==null){at.setTextQuery(y.split(" -time: ")[0]);return}if(S.length===1){const D=x.moment(S[0]);at.setTimeQuery({from:D.startOf("day").valueOf(),to:D.endOf("day").valueOf()})}else if(S.length===2){const D=x.moment(S[0]),I=x.moment(S[1]);at.setTimeQuery({from:D.startOf("day").valueOf(),to:I.endOf("day").valueOf()})}at.setTextQuery(y.split(" -time: ")[0])},f=()=>{i(!0)},h=()=>{i(!1)};return v.jsxs("div",{className:"search-bar-container",children:[v.jsxs("div",{className:"search-bar-inputer",children:[v.jsx("span",{ref:a,className:"btn icon-img"}),v.jsx("input",{ref:r,className:"text-input",type:"text",onMouseOver:f,onMouseOut:h,placeholder:o?E("Type here"):"",onChange:c})]}),v.jsx("div",{className:"quickly-action-wrapper",children:v.jsxs("div",{className:"quickly-action-container",children:[v.jsx("span",{className:"title-text",children:E("Quick filter")}),v.jsxs("div",{className:"section-container types-container",children:[v.jsxs("span",{className:"section-text",children:[E("TYPE"),":"]}),v.jsx("div",{className:"values-container",children:TT.map((g,y)=>v.jsxs("div",{children:[v.jsx("span",{className:`type-item ${n===g.value?"selected":""}`,onClick:()=>{l(g.value)},children:g.text}),y+1{const{children:t,when:n}=e;return n?v.jsx(v.Fragment,{children:t}):null},ts=hU;function fn(){const e=document.createDocumentFragment();e.createEl("div",{cls:"thino-info"}).createEl("div",{text:E("This is a pro feature, please upgrade to pro version to use it.")});const r=e.createEl("div",{cls:"thino-link"}).createEl("div",{text:E("You can get pro version from: ")}),a=localStorage.getItem("language");let o="https://pkmer.cn/products/UserProfile/";a&&a==="zh"?o="https://pkmer.cn/products/thino/":o="https://thino.pkmer.net/en/",r.createEl("a",{text:"PKMer",attr:{href:o}}),new x.Notice(e,5e3)}const{exec:pU,execSync:mke}=x.Platform.isDesktop&&require("child_process"),{createHash:mU}=x.Platform.isDesktop&&require("crypto"),gU={native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"},vU=x.Platform.isDesktop&&{darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:`${gU[yU()]}\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`,linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"};function yU(){return process.platform!=="win32"?"":process.arch==="ia32"&&Object.hasOwnProperty.call(process.env,"PROCESSOR_ARCHITEW6432")?"mixed":"native"}function wU(e){return mU("sha256").update(e).digest("hex")}function bU(e){switch(process.platform){case"darwin":return e.split("IOPlatformUUID")[1].split(`
-`)[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return e.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"freebsd":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error(`Unsupported platform: ${process.platform}`)}}function cr(e=!1){return new Promise((t,n)=>{pU(vU[process.platform],{},(r,a)=>{if(r)return n(new Error(`Error while obtaining machine id: ${r.stack}`));const o=bU(a.toString());return t(e?o:wU(o))})})}const Dx={list:"align-left",waterfall:"layout-grid",calendar:"calendar",minimal:"list",table:"table",chat:"message-square",moments:"chrome"},SU=e=>{const{dailyNotesState:{app:t,view:n,verifyState:r,settings:a},globalState:{manifest:o,isMobileView:i}}=P.useContext(Lt),l=P.useRef(null),c=P.useRef(null),[f,h]=P.useState((window.app||t).loadLocalStorage("thinoListView")),[g,y]=P.useState(null);P.useEffect(()=>{if(!o||!t)return;const S=t==null?void 0:t.plugins.getPlugin(o.id);y(S),h(S==null?void 0:S.settings.MemoListView),dt.setMemoListView(S==null?void 0:S.settings.MemoListView)},[o,t]),P.useEffect(()=>{if(!t||!n||!g||!g.settings)return;const S=()=>{var I,M;if(n.leaf.height===0)return;const D=(I=g==null?void 0:g.settings)==null?void 0:I.MemoListView;(M=g==null?void 0:g.settings)!=null&&M.SupportSelectOtherView||D==="chat"||D==="moments"||(n.leaf.width>950?(h(D),dt.setMemoListView(D)):n.leaf.width<=950&&(dt.setMemoListView("list"),h("list")))};S(),c.current||(c.current=t.workspace.on("resize",S),n.registerEvent(c.current))},[t,n,g]),P.useEffect(()=>{l&&(x.setIcon(l.current,Dx[f||"list"]),dt.setMemoListView(f),x.requireApiVersion("1.4.4")&&x.setTooltip(l.current,E("Switch view")))},[f]);const w=async S=>{var k;const D=!x.Platform.isDesktop&&await((k=window.Capacitor)==null?void 0:k.Plugins.Device.getId()),I=x.Platform.isDesktop?await cr():D.identifier||D.uuid;if(!r||(r==null?void 0:r.appId)!==I){fn();return}const M=async R=>{dt.setMemoListView(R),g&&(g.settings.MemoListView=R,await g.saveSettings()),h(R)},N=[{view:"list",title:E("List")},{view:"chat",title:E("Chat")},{view:"moments",title:E("Moments")}];(!i||a!=null&&a.SupportSelectOtherView)&&N.push({view:"waterfall",title:E("Waterfall")},{view:"calendar",title:E("Calendar")},{view:"table",title:E("Table")});const B=new x.Menu;N.forEach(({view:R,title:L})=>{B.addItem(_=>{_.setChecked(f===R).setIcon(Dx[R]).setTitle(L).onClick(()=>{f!==R&&M(R)})})}),B.showAtMouseEvent(S.nativeEvent)};return v.jsx("div",{className:`memos-view-switcher-wrapper ${e.className?e.className:""} pro`,ref:l,onClick:w})},DU=()=>{const e=P.useRef(null);return P.useEffect(()=>{e&&(x.setIcon(e.current,"calendar-check"),x.setTooltip&&x.setTooltip(e.current,E("Daily Memos")))},[e]),v.jsx("div",{className:"memos-review-entry-wrapper",ref:e,onClick:()=>{at.setPathname("/daily")}})},OS=()=>({type:"initialText",value:"",timestamp:Date.now(),selectionStart:0,selectionEnd:0}),Tx={initialValue:"",interval:300};class TU{constructor(t,n=Tx){this.listeners=[],this.runUndo=()=>{const r=this.actions[this.currentIndex].selectionStart;this.currentIndex>0&&this.currentIndex--,this.element.value=this.actions[this.currentIndex].value,this.element.setSelectionRange(r,r),this.dispatchChange()},this.runRedo=()=>{this.currentIndexthis.actions,this.setState=(r,a)=>{this.actions=[...r],this.currentIndex=a{this.actions=[OS()],this.currentIndex=0,this.dispatchChange()},this.destroy=()=>{this.rmEventListeners()},this.subscribe=r=>{this.listeners.push(r)},this.handleElementKeydown=r=>{const a=r;a.key==="z"&&!a.shiftKey&&(a.metaKey||a.ctrlKey)?(r.preventDefault(),this.runUndo()):(a.key==="z"&&a.shiftKey&&(a.metaKey||a.ctrlKey)||a.key==="y"&&(a.metaKey||a.ctrlKey))&&(r.preventDefault(),this.runRedo())},this.handleElementInput=r=>{const a=r,o=this.actions[this.currentIndex];this.pushNewAction({type:a.inputType,value:this.element.value,timestamp:Date.now(),selectionStart:this.element.selectionEnd-(this.element.value.length-o.value.length),selectionEnd:this.element.selectionEnd})},this.addEventListeners=()=>{this.element.addEventListener("keydown",this.handleElementKeydown),this.element.addEventListener("input",this.handleElementInput)},this.rmEventListeners=()=>{this.element.removeEventListener("keydown",this.handleElementKeydown),this.element.removeEventListener("input",this.handleElementInput)},this.pushNewAction=r=>{const a=this.actions[this.currentIndex];a&&a.type===r.type&&r.timestamp-a.timestamp=this.config.maxSize?(this.actions.shift(),this.actions[0]=OS()):this.currentIndex++,this.actions[this.currentIndex]=r,this.actions=this.actions.slice(0,this.currentIndex+1)),this.dispatchChange()},this.dispatchChange=()=>{for(const r of this.listeners)r([...this.actions],this.currentIndex)},this.element=t,this.config=Object.assign(Object.assign({},Tx),n),this.config.initialActions&&this.config.initialActions.length>0?(this.actions=this.config.initialActions,this.config.initialIndex!==void 0&&this.config.initialIndex{e(n=>!n)},[])}var k6={exports:{}};(function(e){(function(){var t=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n=typeof window<"u",r=n&&window.mozInnerScreenX!=null;function a(o,i,l){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var c=l&&l.debug||!1;if(c){var f=document.querySelector("#input-textarea-caret-position-mirror-div");f&&f.parentNode.removeChild(f)}var h=document.createElement("div");h.id="input-textarea-caret-position-mirror-div",document.body.appendChild(h);var g=h.style,y=window.getComputedStyle?getComputedStyle(o):o.currentStyle;g.whiteSpace="pre-wrap",o.nodeName!=="INPUT"&&(g.wordWrap="break-word"),g.position="absolute",c||(g.visibility="hidden"),t.forEach(function(D){g[D]=y[D]}),r?o.scrollHeight>parseInt(y.height)&&(g.overflowY="scroll"):g.overflow="hidden",h.textContent=o.value.substring(0,i),o.nodeName==="INPUT"&&(h.textContent=h.textContent.replace(/\s/g," "));var w=document.createElement("span");w.textContent=o.value.substring(i)||".",h.appendChild(w);var S={top:w.offsetTop+parseInt(y.borderTopWidth),left:w.offsetLeft+parseInt(y.borderLeftWidth)};return c?w.style.backgroundColor="#aaa":document.body.removeChild(h),S}e.exports=a})()})(k6);var EU=k6.exports;const CU=qt(EU);var N6=dr.CustomEvent;function xU(){try{var e=new N6("cat",{detail:{foo:"bar"}});return e.type==="cat"&&e.detail.foo==="bar"}catch{}return!1}var MU=xU()?N6:typeof document<"u"&&typeof document.createEvent=="function"?function(t,n){var r=document.createEvent("CustomEvent");return n?r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail):r.initCustomEvent(t,!1,!1,void 0),r}:function(t,n){var r=document.createEventObject();return r.type=t,n?(r.bubbles=!!n.bubbles,r.cancelable=!!n.cancelable,r.detail=n.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r};const kU=qt(MU);function NU(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AU(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:!1,f=r.props.onItemHighlighted;r.state.selectedItem!==l&&r.setState({selectedItem:l},function(){f(l),c&&r.props.dropdownScroll(r.itemsRef[r.getId(l)])})},r.scroll=function(l){l.preventDefault();var c=r.props.values,f=l.keyCode||l.which,h=r.getPositionInList(),g;switch(f){case xi.DOWN:g=h+1;break;case xi.UP:g=h-1;break;default:g=h;break}g=(g%c.length+c.length)%c.length,r.selectItem(c[g],[xi.DOWN,xi.UP].includes(f))},r.isSelected=function(l){var c=r.state.selectedItem;return c?r.getId(c)===r.getId(l):!1},r}return Tb(t,[{key:"componentDidMount",value:function(){this.listeners.push(df.add([xi.DOWN,xi.UP],this.scroll),df.add([xi.ENTER,xi.TAB],this.onPressEnter));var r=this.props.values;r&&r[0]&&this.selectItem(r[0])}},{key:"componentDidUpdate",value:function(r){var a=this,o=r.values,i=this.props.values,l=o.map(function(f){return a.getId(f)}).join(""),c=i.map(function(f){return a.getId(f)}).join("");l!==c&&i&&i[0]&&this.selectItem(i[0])}},{key:"componentWillUnmount",value:function(){for(var r;this.listeners.length;)r=this.listeners.pop(),df.remove(r)}},{key:"render",value:function(){var r=this,a=this.props,o=a.values,i=a.component,l=a.style,c=a.itemClassName,f=a.className,h=a.itemStyle;return ne.createElement("ul",{className:"rta__list ".concat(f||""),style:l},o.map(function(g){return ne.createElement(_U,{key:r.getId(g),innerRef:function(w){r.itemsRef[r.getId(g)]=w},selected:r.isSelected(g),item:g,className:c,style:h,onClickHandler:r.onPressEnter,onSelectHandler:r.selectItem,component:i})}))}}]),t}(ne.Component);function HU(e,t){var n=parseInt(getComputedStyle(t).getPropertyValue("height"),10),r=parseInt(getComputedStyle(e).getPropertyValue("height"),10)-n,a=t.offsetTop,o=e.scrollTop;a{const t=$e.getState().app,n=t.workspace.getLeavesOfType("markdown");for(const i of n)if(i.view?.file?.path===e){t.workspace.revealLeaf(i);return}const r=t.metadataCache.getFirstLinkpathDest("",e);if(!r){new N.Notice(E("File not found for the given thino path"));return}await t.workspace.getLeaf(!0).openFile(r)},JM=async(e,t)=>{const{app:n}=$e.getState(),r=parseInt(e.slice(14));if(FQ(t,n,r))return;const o=n.metadataCache.getFirstLinkpathDest("",t);if(!N.Platform.isMobile)await n.workspace.getLeaf(!0).openFile(o,{eState:{line:r}});else{let i=n.workspace.activeLeaf;i===null&&(i=n.workspace.getLeaf(!0)),await i.openFile(o,{eState:{line:r}})}},QM=async(e,t)=>{const n=$e.getState().app,r=n.metadataCache.getFirstLinkpathDest("",t);if(!r){new N.Notice(E("File not found for the given thino path"));return}let o="";try{o=await n.vault.read(r)}catch(u){console.error(u),o=await n.vault.cachedRead(r)}const a=o.split(/\r?\n/).findIndex(u=>u.contains(e)),s=n.workspace.getLeavesOfType("markdown");for(const u of s)if(u.view?.file?.path===r.path){n.workspace.revealLeaf(u);try{u.view.editor?.setCursor({line:a,ch:1});return}catch(h){console.error(h)}}const l=n.workspace.getLeaf(!0);await l.openFile(r,{eState:{line:a}});try{l.view.editor?.setCursor({line:a,ch:1})}catch(u){console.error(u)}},eD=async(e,t)=>{const n=$e.getState().app,r=(s,l)=>{const u=Array.from(s.nodes.values())?.find(d=>d.id===l);return u?(s.selectOnly(u),s.zoomToSelection(),!0):!1},o=n.workspace.getLeavesOfType("canvas");for(const s of o){const l=s.view;if(l?.file?.path===t&&(n.workspace.revealLeaf(s),r(l.canvas,e)))return}const i=n.metadataCache.getFirstLinkpathDest("",t);if(!i){new N.Notice(E("File not found for the given thino path"));return}const a=n.workspace.getLeaf(!0);await a.openFile(i),setTimeout(()=>{r(a.view?.canvas,e)},10)};class HQ{initialized=!1;getState(){return ke.getState().memoState}async fetchAllMemos(){const t=$e.getState().settings;Le.checkDailyInMulti(t);const n=await Lo.getMyMemos(t.EnabledLocationList.map(i=>i.value)),r=[...n.memos],o=[...n.commentMemos];return ke.dispatch({type:"SET_MEMOS",payload:{memos:r}}),ke.dispatch({type:"SET_COMMENT_MEMOS",payload:{commentMemos:o}}),this.initialized||(this.initialized=!0,Ze.setLoaded(!0)),r}async updateTypeMemos(t){const n=await Lo.updateSpecificTypeMemo(t),r=this.getState().memos.filter(o=>o.sourceType!==t);ke.dispatch({type:"SET_MEMOS",payload:{memos:[...r,...n.memos]}})}async removeTypeMemos(t){const n=this.getState().memos.filter(r=>r.sourceType!==t);ke.dispatch({type:"SET_MEMOS",payload:{memos:[...n]}})}async fetchDeletedMemos(){const t=await Lo.getMyDeletedMemos();return t.sort((n,r)=>Le.getTimeStampByDate(r.deletedAt)-Le.getTimeStampByDate(n.deletedAt)),t}pushMemo(t){ke.dispatch({type:"INSERT_MEMO",payload:{memo:{...t}}})}pushCommentMemo(t){ke.dispatch({type:"INSERT_COMMENT_MEMO",payload:{memo:{...t}}})}getMemoById(t){for(const n of this.getState().memos)if(n.id===t)return n;return null}getCommentMemoById(t){for(const n of this.getState().commentMemos)if(n.id===t)return n;return null}getMemoByWebId(t){for(const n of this.getState().memos)if(n.webId===t||n.id===t)return n;return null}async finishWaitingForTemplaterThinos(){const t=this.getState().preparingUpdateMemo;if(t.length!==0)for(const n of t){const r=this.getMemoById(n.id),o=n.type==="local"?await Px(n.origin,n.isList,n.date,!0):await t3(r);await this.replaceOldThinoWithNewThino(n.id,o),ke.dispatch({type:"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO",payload:{id:n.id}})}}async replaceOldThinoWithNewThino(t,n){this.getMemoById(t)&&ke.dispatch({type:"REPLACE_MEMO_BY_ID",payload:{id:t,memo:n}})}async updateMemoById(t,n,r){const o=this.getMemoByWebId(t);if(!o)return;let i=null;const a=r?{}:{content:n.content,rowStatus:n.rowStatus,pinned:n.pinned,deleted:!!n.deletedAt,thinoType:n.thinoType||"JOURNAL"};if(L8({...o,deleted:!!n.deletedAt},{...a,webId:n.id}))return o;switch(o.sourceType){case"DAILY":i=await si(o,{id:o.id,webId:n.id,...a});break;case"CANVAS":i=await Xa(o,{id:o.id,webId:n.id,...a});break;case"MULTI":i=await aa(o,{id:o.id,webId:n.id,...a});break;case"FILE":i=await Ka(o,{id:o.id,webId:n.id,...a});break}if(!i)return o;ke.dispatch({type:"EDIT_MEMO",payload:i})}async archiveThinoBulk(t){const n=[];for(const r of t){let o;switch(r.sourceType){case"DAILY":o=await si(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(o);break;case"CANVAS":o=await Xa(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(o);break;case"MULTI":o=await aa(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(o);break;case"FILE":o=await Ka(r,{id:r.id,rowStatus:"ARCHIVED"}),n.push(o);break}}return n.length>0?(ke.dispatch({type:"ARCHIVE_MEMO_BY_ID_BULK",payload:n}),n):t}async dealWithDailyThinoBulk(t,n,r){const o=await zJ(t,n,r);return r==="deleteForever"?await this.deleteThinosWithIdBulk(o.map(i=>i.id)):this.editMemoBulk(o),o}async deleteThinosWithIdBulk(t){for(const n of t)ke.dispatch({type:"DELETE_MEMO_BY_ID",payload:{id:n}})}async archiveMemo(t){let n=null;switch(t.sourceType){case"DAILY":n=await si(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"CANVAS":n=await Xa(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"MULTI":n=await aa(t,{id:t.id,rowStatus:"ARCHIVED"});break;case"FILE":n=await Ka(t,{id:t.id,rowStatus:"ARCHIVED"});break}return n?(ke.dispatch({type:"ARCHIVE_MEMO_BY_ID",payload:n}),n):t}async pushToUpdateList(t,n){ke.dispatch({type:"PREPARE_UPDATE_THINO",payload:{thino:t,originalId:n}})}async removePrepareUpdateThinoById(t){ke.dispatch({type:"REMOVE_PARTICULAR_PREPARE_UPDATE_THINO",payload:{id:t}})}async removePrepareUpdateThino(){ke.dispatch({type:"REMOVE_PREPARE_UPDATE_THINO",payload:null})}async unarchiveThinoBulk(t){const n=[];for(const r of t){let o;switch(r.sourceType){case"DAILY":o=await si(r,{id:r.id,rowStatus:"NORMAL"}),n.push(o);break;case"CANVAS":o=await Xa(r,{id:r.id,rowStatus:"NORMAL"}),n.push(o);break;case"MULTI":o=await aa(r,{id:r.id,rowStatus:"NORMAL"}),n.push(o);break;case"FILE":o=await Ka(r,{id:r.id,rowStatus:"NORMAL"}),n.push(o);break}}return n.length>0?(ke.dispatch({type:"ARCHIVE_MEMO_BY_ID_BULK",payload:n}),n):t}async unarchiveMemo(t){let n=null;switch(t.sourceType){case"DAILY":n=await si(t,{id:t.id,rowStatus:"NORMAL"});break;case"CANVAS":n=await Xa(t,{id:t.id,rowStatus:"NORMAL"});break;case"MULTI":n=await aa(t,{id:t.id,rowStatus:"NORMAL"});break;case"FILE":n=await Ka(t,{id:t.id,rowStatus:"NORMAL"});break}return ke.dispatch({type:"UNARCHIVE_MEMO_BY_ID",payload:n}),n}async hideMemoById(t){const n=this.getMemoById(t);if(!n)return n;let r=null;switch(n.sourceType){case"DAILY":r=await si(n,{id:n.id,deleted:!0});break;case"CANVAS":r=await Xa(n,{id:n.id,deleted:!0});break;case"MULTI":r=await aa(n,{id:n.id,deleted:!0});break;case"FILE":r=await Ka(n,{id:n.id,deleted:!0});break}if(!r)return n;if(r)return r}async restoreMemoById(t){return await Lo.restoreMemo(t)}async deleteMemoById(t,n){const r=this.getMemoById(t);try{switch(r.sourceType){case"DAILY":await Lo.deleteMemoInDailyNote(r);break;case"CANVAS":await Lo.deleteMemoInCanvas(r);break;case"MULTI":await Lo.deleteMemoInMultiFiles(r);break;case"FILE":await Lo.deleteMemoInSingleFile(r);break}ke.dispatch({type:"DELETE_MEMO_BY_ID",payload:{id:t}})}catch(s){console.error(s),new N.Notice(E("Failed to delete memo"))}if(n&&n==="local")return;const o=$e.getState().settings;!$e.getState().app?.loadLocalStorage("tokenForSync")||!o.startSync||r.webId&&await KM(r.webId)}async removeMemosInFile(t,n){const r=[];try{if(t.path.endsWith(".md")&&!t.path.contains(".thino")&&!n){const i=this.getState().memos.filter(a=>a.path.trim()===t.path.trim());r.push(...i)}else if(t.path.contains("thino.canvas")){const i=this.getState().memos.filter(a=>a.path.trim()===t.path.trim());r.push(...i)}else if(t?.parent?.path.contains(n)||!t?.parent&&!t?.parent?.path){const i=this.getState().memos.filter(a=>a.path.trim()===t.path.trim());i.length>0&&r.push(...i)}else t.path.endsWith(".md")&&t.path.contains(".thino")&&await eE(t,r);const o=r.map(i=>i.id);ke.dispatch({type:"DELETE_MEMO_BY_ID_BATCH",payload:{ids:o}})}catch(o){console.error(o)}}async removeThinosByPath(t){const r=this.getState().memos.filter(o=>o.path===t).map(o=>o.id);ke.dispatch({type:"DELETE_MEMO_BY_ID_BATCH",payload:{ids:r}})}async updateMemosInFile(t,n){const r=[],o=async()=>{if(t.path.endsWith(".md")&&!t.path.contains(".thino")&&!n){await X8(t,r);return}else if(t.path.contains("thino.canvas")){await J8(t,r);return}else if(t?.parent?.path.contains(n)&&!t.path.endsWith(".thino.md")){await K8(t,r);return}else if(t.path.endsWith(".thino.md")){await eE(t,r);return}};try{await o(),ke.dispatch({type:"UPDATE_MEMO_BATCH",payload:{memos:r,path:t.path}}),this.editMemoBulk(r)}catch(i){console.error(i)}}async updateMemoProperty(t){const n=Le.randomId(16),r=await aa(t,{id:n});ke.dispatch({type:"EDIT_MEMO_PATH",payload:r})}editMemo(t,n=!1){const r=t.webId;ke.dispatch({type:"EDIT_MEMO",payload:t});const o=$e.getState().plugin;o&&!n&&o.thinoWorkerManager.memoUpdated(t.id);const i=$e.getState().settings;if(!(!$e.getState().app?.loadLocalStorage("tokenForSync")||!i.startSync))try{t&&r&&Ox({id:r,content:t.content,rowStatus:t.rowStatus,pinned:t.pinned,ttime:t.deletedAt?N.moment(t.deletedAt,"YYYY/MM/DD HH:mm:ss").valueOf():0,thinoType:t.sourceType==="DAILY"?"DAILY":"FILE",thinoStatus:t.thinoType==="JOURNAL"?"JOURNAL":t.thinoType==="TASK-TODO"?"TASK-TODO":"TASK-DONE"})}catch(l){console.error(l)}}editMemoBulk(t){const n=$e.getState().plugin;n&&n.thinoWorkerManager.memosUpdated(t.map(r=>r.id));for(const r of t)this.editMemo(r,!0);this.updateTagsState()}editCommentMemo(t){ke.dispatch({type:"EDIT_COMMENT_MEMO",payload:t})}getThinoViaKeyword(t){const{memos:n}=this.getState();return n.filter(o=>o.content.toLowerCase().includes(t?.toLowerCase()))}updateTagsStateThrottled=Le.throttle(()=>{const{memos:t}=this.getState(),{plugin:n}=$e.getState();!n||!t||t.length===0||n.thinoWorkerManager.buildTagTree(t).then(({tagsSet:r,counts:o})=>{ke.dispatch({type:"SET_TAGS",payload:{tags:Array.from(r),tagsNum:o}})})},300);async throttleUpdateTagsState(){this.updateTagsStateThrottled()}updateTagsState(){this.updateTagsStateThrottled()}clearMemos(){ke.dispatch({type:"SET_MEMOS",payload:{memos:[]}})}async getLinkedMemos(t){const{memos:n}=this.getState();return n.filter(r=>r.content.includes(t))}async getLinkedMemoByBlockId(t,n){const{memos:r}=this.getState();return r.find(o=>o.hasId===t?n&&o.path?o.path.includes(n)||n.includes(o.path):!0:!1)}async getLinkedMemosByLinkId(t,n){const{memos:r}=this.getState(),o=`${n}#^${t}`;return r.filter(i=>i.linkId?i.linkId.some(a=>a===o||n&&a.endsWith(`#^${t}`)):!1)}async getCommentMemos(t){const{memos:n}=this.getState();return n.filter(r=>r.content.includes("comment: "+t))}async createMemoMultiFile({content:t,isList:n,name:r}){return await wQ({content:t,isList:n,name:r})}async createMemoSingleFile({content:t,isList:n}){return await SQ({content:t,isList:n})}async createOrPatchThinoFromWeb(t){const n=this.getState().memos;if(t.localId&&n?.some(i=>i.id===t.localId))return await this.updateMemoById(t.localId,t,!0),null;if(n?.some(i=>i.id===t.id)||n?.some(i=>i.webId===t.id))return await this.updateMemoById(t.id,t,!1),null;let r=t.sourceType;const o=$e.getState().settings;switch(o&&o?.saveThinoType&&(r=o.saveThinoType!=="FILE"?o.saveThinoType:t.sourceType),r){case"FILE":case"MULTI":case"CANVAS":return await e3(t);case"DAILY":return await t3(t);default:return await e3(t)}}async initSync(){const n=this.getState().memos.filter(o=>!o.webId),r=await vQ(n);for(const o of r)await this.createOrPatchThinoFromWeb(o)}async createMemoCanvas({text:t,isList:n}){return await TQ({content:t,isList:n})}async createMemoDaily(t,n){return await Px(t,n)}setWaitingForTemplater({origin:t,date:n,isList:r,id:o,type:i}){ke.dispatch({type:"SET_WAITING_FOR_TEMPLATER",payload:{origin:t,date:n,isList:r,id:o,type:i}})}async pinMemoById(t){const n=this.getMemoById(t),r=await VJ(n);ke.dispatch({type:"PIN_MEMO",payload:r});try{const o=$e.getState().settings;if($e.getState().app?.loadLocalStorage("tokenForSync")&&o.startSync){const s=await Ox({id:r.webId,pinned:!0});this.editMemo(s)}}catch(o){console.error(o)}}async unpinMemoById(t){const n=this.getMemoById(t),r=await WJ(n);ke.dispatch({type:"PIN_MEMO",payload:r});try{const o=$e.getState().settings;if($e.getState().app?.loadLocalStorage("tokenForSync")&&o.startSync){const s=await Ox({id:r.webId,pinned:!1});this.editMemo(s)}}catch(o){console.error(o)}}async createCommentMemo(t,n,r,o,i){return await LQ(t,n,r,o,i)}async importMemos(t,n,r){return await Px(t,n,r)}async createThino({content:t,isList:n,type:r,name:o}){let i=null;switch(r.toLowerCase()){case"canvas":i=await de.createMemoCanvas({text:t,isList:n});break;case"multi":i=await de.createMemoMultiFile({content:t,isList:n,name:o});break;case"daily":i=await de.createMemoDaily(t,n);break;case"file":i=await de.createMemoSingleFile({content:t,isList:n});break;default:i=await de.createMemoDaily(t,n);break}const a=$e.getState().settings,s=$e.getState().app,l=$e.getState().plugin;l&&l.thinoWorkerManager.memoUpdated(i.id);const u=s?.loadLocalStorage("tokenForSync");return i&&u&&a.startSync&&r!=="DAILY"&&setTimeout(async()=>{try{const d=await qM({content:t,thinoType:"FILE",thinoStatus:n?"JOURNAL":"TASK-TODO"});await this.updateMemoById(i.id,d,!0)}catch(d){console.error(d)}},200),i}async openThinoByID(t){const n=this.getMemoById(t);if(n)switch(n.sourceType){case"DAILY":await JM(n.id,n.path);break;case"CANVAS":await eD(n.id,n.path);break;case"MULTI":await XM(n.path);break;case"FILE":await QM(n.id,n.path);break}}async updateMemo(t,n,r){const o=this.getMemoById(t);if(o){let i=null;switch(o.sourceType){case"DAILY":i=await si(o,{id:o.id,content:n,thinoType:r||o.thinoType});break;case"CANVAS":i=await Xa(o,{id:o.id,content:n,thinoType:r||o.thinoType});break;case"MULTI":i=await aa(o,{id:o.id,content:n,thinoType:r||o.thinoType});break;case"FILE":i=await Ka(o,{id:o.id,content:n,thinoType:r||o.thinoType})}if(i)return i}return o}}const de=new HQ;class _Q{getState(){return ke.getState().queryState}async getMyAllQueries(){const t=Ue.getState().query.filter,n=this.getQueryById(t),r=await Lo.getMyQueries();return ke.dispatch({type:"SET_QUERIES",payload:{queries:[...r,...n?[n]:[]]}}),r}getQueryById(t){return this.getState().queries.find(n=>n.id===t)}pushQuery(t){ke.dispatch({type:"INSERT_QUERY",payload:{query:{...t}}})}editQuery(t){ke.dispatch({type:"UPDATE_QUERY",payload:t})}async deleteQuery(t){await Lo.deleteQueryById(t),ke.dispatch({type:"DELETE_QUERY_BY_ID",payload:{id:t}})}async createQuery(t,n){return await Lo.createQuery(t,n)}createTempQuery(t,n){return Vq(t,n)}async updateQuery(t,n,r){return await Lo.updateQuery(t,n,r)}async pinQuery(t){await Lo.pinQuery(t)}async unpinQuery(t){await Lo.unpinQuery(t)}}const Ct=new _Q;class BQ{async upload(t){const{vault:n,fileManager:r}=ke.getState().dailyNotesState.app,o=await t.arrayBuffer(),i=YQ(t.type),a=Il(),s=N.moment(),l=lS(s,a);let u;if(l)l instanceof N.TFile&&(u=await n.createBinary(await n.getAvailablePathForAttachments(`Pasted Image ${N.moment().format("YYYYMMDDHHmmss")}`,i,l),o));else{const d=await O8(s);u=await n.createBinary(await n.getAvailablePathForAttachments(`Pasted Image ${N.moment().format("YYYYMMDDHHmmss")}`,i,d),o)}return r.generateMarkdownLink(u,u.path,"","")}async parseHtml(t){const n=await t.text(),r=document.createElement("html");r.innerHTML=n;const o=Array.from(r.getElementsByClassName("memo"));for(const i of o){const a=i.getElementsByClassName("content")[0],s=N.htmlToMarkdown(a.innerHTML),l=await de.importMemos(s,!0,N.moment(i.getElementsByClassName("time")[0].innerHTML));de.pushMemo(l)}}}const YQ=e=>/^image\/(.+)$/.exec(e)?.[1],tD=new BQ;var Fi={},tH={exports:{}},jo={},jx={exports:{}},Lx={},r3;function UQ(){return r3||(r3=1,function(e){function t(J,ee){var Z=J.length;J.push(ee);e:for(;0>>1,$=J[q];if(0>>1;qo(ie,Z))fe<$&&0>o(ye,ie)?(J[q]=ye,J[fe]=Z,q=fe):(J[q]=ie,J[le]=Z,q=le);else if(fe<$&&0>o(ye,Z))J[q]=ye,J[fe]=Z,q=fe;else break e}}return ee}function o(J,ee){var Z=J.sortIndex-ee.sortIndex;return Z!==0?Z:J.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],d=1,h=null,p=3,m=!1,b=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,S=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(J){for(var ee=n(u);ee!==null;){if(ee.callback===null)r(u);else if(ee.startTime<=J)r(u),ee.sortIndex=ee.expirationTime,t(l,ee);else break;ee=n(u)}}function k(J){if(v=!1,C(J),!b)if(n(l)!==null)b=!0,z(M);else{var ee=n(u);ee!==null&&ne(k,ee.startTime-J)}}function M(J,ee){b=!1,v&&(v=!1,S(R),R=-1),m=!0;var Z=p;try{for(C(ee),h=n(l);h!==null&&(!(h.expirationTime>ee)||J&&!_());){var q=h.callback;if(typeof q=="function"){h.callback=null,p=h.priorityLevel;var $=q(h.expirationTime<=ee);ee=e.unstable_now(),typeof $=="function"?h.callback=$:h===n(l)&&r(l),C(ee)}else r(l);h=n(l)}if(h!==null)var re=!0;else{var le=n(u);le!==null&&ne(k,le.startTime-ee),re=!1}return re}finally{h=null,p=Z,m=!1}}var I=!1,O=null,R=-1,L=5,B=-1;function _(){return!(e.unstable_now()-BJ||125q?(J.sortIndex=Z,t(u,J),n(l)===null&&J===n(u)&&(v?(S(R),R=-1):v=!0,ne(k,Z-q))):(J.sortIndex=$,t(l,J),b||m||(b=!0,z(M))),J},e.unstable_shouldYield=_,e.unstable_wrapCallback=function(J){var ee=p;return function(){var Z=p;p=ee;try{return J.apply(this,arguments)}finally{p=Z}}}}(Lx)),Lx}var o3;function zQ(){return o3||(o3=1,jx.exports=UQ()),jx.exports}var i3;function VQ(){if(i3)return jo;i3=1;var e=D,t=zQ();function n(c){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+c,g=1;g"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,u=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},h={};function p(c){return l.call(h,c)?!0:l.call(d,c)?!1:u.test(c)?h[c]=!0:(d[c]=!0,!1)}function m(c,f,g,T){if(g!==null&&g.type===0)return!1;switch(typeof f){case"function":case"symbol":return!0;case"boolean":return T?!1:g!==null?!g.acceptsBooleans:(c=c.toLowerCase().slice(0,5),c!=="data-"&&c!=="aria-");default:return!1}}function b(c,f,g,T){if(f===null||typeof f>"u"||m(c,f,g,T))return!0;if(T)return!1;if(g!==null)switch(g.type){case 3:return!f;case 4:return f===!1;case 5:return isNaN(f);case 6:return isNaN(f)||1>f}return!1}function v(c,f,g,T,A,F,X){this.acceptsBooleans=f===2||f===3||f===4,this.attributeName=T,this.attributeNamespace=A,this.mustUseProperty=g,this.propertyName=c,this.type=f,this.sanitizeURL=F,this.removeEmptyString=X}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(c){y[c]=new v(c,0,!1,c,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(c){var f=c[0];y[f]=new v(f,1,!1,c[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(c){y[c]=new v(c,2,!1,c.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(c){y[c]=new v(c,2,!1,c,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(c){y[c]=new v(c,3,!1,c.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(c){y[c]=new v(c,3,!0,c,null,!1,!1)}),["capture","download"].forEach(function(c){y[c]=new v(c,4,!1,c,null,!1,!1)}),["cols","rows","size","span"].forEach(function(c){y[c]=new v(c,6,!1,c,null,!1,!1)}),["rowSpan","start"].forEach(function(c){y[c]=new v(c,5,!1,c.toLowerCase(),null,!1,!1)});var S=/[\-:]([a-z])/g;function x(c){return c[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(c){var f=c.replace(S,x);y[f]=new v(f,1,!1,c,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(c){var f=c.replace(S,x);y[f]=new v(f,1,!1,c,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(c){var f=c.replace(S,x);y[f]=new v(f,1,!1,c,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(c){y[c]=new v(c,1,!1,c.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(c){y[c]=new v(c,1,!1,c.toLowerCase(),null,!0,!0)});function C(c,f,g,T){var A=y.hasOwnProperty(f)?y[f]:null;(A!==null?A.type!==0:T||!(2se||A[X]!==F[se]){var ue=`
+`+A[X].replace(" at new "," at ");return c.displayName&&ue.includes("")&&(ue=ue.replace("",c.displayName)),ue}while(1<=X&&0<=se);break}}}finally{re=!1,Error.prepareStackTrace=g}return(c=c?c.displayName||c.name:"")?$(c):""}function ie(c){switch(c.tag){case 5:return $(c.type);case 16:return $("Lazy");case 13:return $("Suspense");case 19:return $("SuspenseList");case 0:case 2:case 15:return c=le(c.type,!1),c;case 11:return c=le(c.type.render,!1),c;case 1:return c=le(c.type,!0),c;default:return""}}function fe(c){if(c==null)return null;if(typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case O:return"Fragment";case I:return"Portal";case L:return"Profiler";case R:return"StrictMode";case U:return"Suspense";case G:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case _:return(c.displayName||"Context")+".Consumer";case B:return(c._context.displayName||"Context")+".Provider";case H:var f=c.render;return c=c.displayName,c||(c=f.displayName||f.name||"",c=c!==""?"ForwardRef("+c+")":"ForwardRef"),c;case K:return f=c.displayName||null,f!==null?f:fe(c.type)||"Memo";case z:f=c._payload,c=c._init;try{return fe(c(f))}catch{}}return null}function ye(c){var f=c.type;switch(c.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return c=f.render,c=c.displayName||c.name||"",f.displayName||(c!==""?"ForwardRef("+c+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return fe(f);case 8:return f===R?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function ge(c){switch(typeof c){case"boolean":case"number":case"string":case"undefined":return c;case"object":return c;default:return""}}function me(c){var f=c.type;return(c=c.nodeName)&&c.toLowerCase()==="input"&&(f==="checkbox"||f==="radio")}function Ce(c){var f=me(c)?"checked":"value",g=Object.getOwnPropertyDescriptor(c.constructor.prototype,f),T=""+c[f];if(!c.hasOwnProperty(f)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var A=g.get,F=g.set;return Object.defineProperty(c,f,{configurable:!0,get:function(){return A.call(this)},set:function(X){T=""+X,F.call(this,X)}}),Object.defineProperty(c,f,{enumerable:g.enumerable}),{getValue:function(){return T},setValue:function(X){T=""+X},stopTracking:function(){c._valueTracker=null,delete c[f]}}}}function je(c){c._valueTracker||(c._valueTracker=Ce(c))}function Ie(c){if(!c)return!1;var f=c._valueTracker;if(!f)return!0;var g=f.getValue(),T="";return c&&(T=me(c)?c.checked?"true":"false":c.value),c=T,c!==g?(f.setValue(c),!0):!1}function Fe(c){if(c=c||(typeof document<"u"?document:void 0),typeof c>"u")return null;try{return c.activeElement||c.body}catch{return c.body}}function ce(c,f){var g=f.checked;return Z({},f,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:g??c._wrapperState.initialChecked})}function Ne(c,f){var g=f.defaultValue==null?"":f.defaultValue,T=f.checked!=null?f.checked:f.defaultChecked;g=ge(f.value!=null?f.value:g),c._wrapperState={initialChecked:T,initialValue:g,controlled:f.type==="checkbox"||f.type==="radio"?f.checked!=null:f.value!=null}}function Pe(c,f){f=f.checked,f!=null&&C(c,"checked",f,!1)}function _e(c,f){Pe(c,f);var g=ge(f.value),T=f.type;if(g!=null)T==="number"?(g===0&&c.value===""||c.value!=g)&&(c.value=""+g):c.value!==""+g&&(c.value=""+g);else if(T==="submit"||T==="reset"){c.removeAttribute("value");return}f.hasOwnProperty("value")?Xe(c,f.type,g):f.hasOwnProperty("defaultValue")&&Xe(c,f.type,ge(f.defaultValue)),f.checked==null&&f.defaultChecked!=null&&(c.defaultChecked=!!f.defaultChecked)}function qe(c,f,g){if(f.hasOwnProperty("value")||f.hasOwnProperty("defaultValue")){var T=f.type;if(!(T!=="submit"&&T!=="reset"||f.value!==void 0&&f.value!==null))return;f=""+c._wrapperState.initialValue,g||f===c.value||(c.value=f),c.defaultValue=f}g=c.name,g!==""&&(c.name=""),c.defaultChecked=!!c._wrapperState.initialChecked,g!==""&&(c.name=g)}function Xe(c,f,g){(f!=="number"||Fe(c.ownerDocument)!==c)&&(g==null?c.defaultValue=""+c._wrapperState.initialValue:c.defaultValue!==""+g&&(c.defaultValue=""+g))}var Qe=Array.isArray;function it(c,f,g,T){if(c=c.options,f){f={};for(var A=0;A"+f.valueOf().toString()+"",f=ut.firstChild;c.firstChild;)c.removeChild(c.firstChild);for(;f.firstChild;)c.appendChild(f.firstChild)}});function It(c,f){if(f){var g=c.firstChild;if(g&&g===c.lastChild&&g.nodeType===3){g.nodeValue=f;return}}c.textContent=f}var Ot={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Zn=["Webkit","ms","Moz","O"];Object.keys(Ot).forEach(function(c){Zn.forEach(function(f){f=f+c.charAt(0).toUpperCase()+c.substring(1),Ot[f]=Ot[c]})});function $n(c,f,g){return f==null||typeof f=="boolean"||f===""?"":g||typeof f!="number"||f===0||Ot.hasOwnProperty(c)&&Ot[c]?(""+f).trim():f+"px"}function io(c,f){c=c.style;for(var g in f)if(f.hasOwnProperty(g)){var T=g.indexOf("--")===0,A=$n(g,f[g],T);g==="float"&&(g="cssFloat"),T?c.setProperty(g,A):c[g]=A}}var Tn=Z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Pn(c,f){if(f){if(Tn[c]&&(f.children!=null||f.dangerouslySetInnerHTML!=null))throw Error(n(137,c));if(f.dangerouslySetInnerHTML!=null){if(f.children!=null)throw Error(n(60));if(typeof f.dangerouslySetInnerHTML!="object"||!("__html"in f.dangerouslySetInnerHTML))throw Error(n(61))}if(f.style!=null&&typeof f.style!="object")throw Error(n(62))}}function er(c,f){if(c.indexOf("-")===-1)return typeof f.is=="string";switch(c){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ir=null;function Gt(c){return c=c.target||c.srcElement||window,c.correspondingUseElement&&(c=c.correspondingUseElement),c.nodeType===3?c.parentNode:c}var gr=null,Un=null,Et=null;function Yr(c){if(c=dp(c)){if(typeof gr!="function")throw Error(n(280));var f=c.stateNode;f&&(f=ly(f),gr(c.stateNode,c.type,f))}}function Mr(c){Un?Et?Et.push(c):Et=[c]:Un=c}function wo(){if(Un){var c=Un,f=Et;if(Et=Un=null,Yr(c),f)for(c=0;c>>=0,c===0?32:31-(Hc(c)/_c|0)|0}var qi=64,Os=4194304;function Oa(c){switch(c&-c){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function Pa(c,f){var g=c.pendingLanes;if(g===0)return 0;var T=0,A=c.suspendedLanes,F=c.pingedLanes,X=g&268435455;if(X!==0){var se=X&~A;se!==0?T=Oa(se):(F&=X,F!==0&&(T=Oa(F)))}else X=g&~A,X!==0?T=Oa(X):F!==0&&(T=Oa(F));if(T===0)return 0;if(f!==0&&f!==T&&!(f&A)&&(A=T&-T,F=f&-f,A>=F||A===16&&(F&4194240)!==0))return f;if(T&4&&(T|=g&16),f=c.entangledLanes,f!==0)for(c=c.entanglements,f&=T;0g;g++)f.push(c);return f}function ve(c,f,g){c.pendingLanes|=f,f!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,f=31-ar(f),c[f]=g}function De(c,f){var g=c.pendingLanes&~f;c.pendingLanes=f,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=f,c.mutableReadLanes&=f,c.entangledLanes&=f,f=c.entanglements;var T=c.eventTimes;for(c=c.expirationTimes;0=Tt),Co=" ",Mo=!1;function $c(c,f){switch(c){case"keyup":return gt.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function np(c){return c=c.detail,typeof c=="object"&&"data"in c?c.data:null}var Ha=!1;function lZ(c,f){switch(c){case"compositionend":return np(f);case"keypress":return f.which!==32?null:(Mo=!0,Co);case"textInput":return c=f.data,c===Co&&Mo?null:c;default:return null}}function cZ(c,f){if(Ha)return c==="compositionend"||!Dt&&$c(c,f)?(c=$v(),vd=gd=Ji=null,Ha=!1,c):null;switch(c){case"paste":return null;case"keypress":if(!(f.ctrlKey||f.altKey||f.metaKey)||f.ctrlKey&&f.altKey){if(f.char&&1=f)return{node:g,offset:f-c};c=T}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=RN(g)}}function HN(c,f){return c&&f?c===f?!0:c&&c.nodeType===3?!1:f&&f.nodeType===3?HN(c,f.parentNode):"contains"in c?c.contains(f):c.compareDocumentPosition?!!(c.compareDocumentPosition(f)&16):!1:!1}function _N(){for(var c=window,f=Fe();f instanceof c.HTMLIFrameElement;){try{var g=typeof f.contentWindow.location.href=="string"}catch{g=!1}if(g)c=f.contentWindow;else break;f=Fe(c.document)}return f}function f1(c){var f=c&&c.nodeName&&c.nodeName.toLowerCase();return f&&(f==="input"&&(c.type==="text"||c.type==="search"||c.type==="tel"||c.type==="url"||c.type==="password")||f==="textarea"||c.contentEditable==="true")}function yZ(c){var f=_N(),g=c.focusedElem,T=c.selectionRange;if(f!==g&&g&&g.ownerDocument&&HN(g.ownerDocument.documentElement,g)){if(T!==null&&f1(g)){if(f=T.start,c=T.end,c===void 0&&(c=f),"selectionStart"in g)g.selectionStart=f,g.selectionEnd=Math.min(c,g.value.length);else if(c=(f=g.ownerDocument||document)&&f.defaultView||window,c.getSelection){c=c.getSelection();var A=g.textContent.length,F=Math.min(T.start,A);T=T.end===void 0?F:Math.min(T.end,A),!c.extend&&F>T&&(A=T,T=F,F=A),A=FN(g,F);var X=FN(g,T);A&&X&&(c.rangeCount!==1||c.anchorNode!==A.node||c.anchorOffset!==A.offset||c.focusNode!==X.node||c.focusOffset!==X.offset)&&(f=f.createRange(),f.setStart(A.node,A.offset),c.removeAllRanges(),F>T?(c.addRange(f),c.extend(X.node,X.offset)):(f.setEnd(X.node,X.offset),c.addRange(f)))}}for(f=[],c=g;c=c.parentNode;)c.nodeType===1&&f.push({element:c,left:c.scrollLeft,top:c.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;g=document.documentMode,xd=null,h1=null,ap=null,p1=!1;function BN(c,f,g){var T=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;p1||xd==null||xd!==Fe(T)||(T=xd,"selectionStart"in T&&f1(T)?T={start:T.selectionStart,end:T.selectionEnd}:(T=(T.ownerDocument&&T.ownerDocument.defaultView||window).getSelection(),T={anchorNode:T.anchorNode,anchorOffset:T.anchorOffset,focusNode:T.focusNode,focusOffset:T.focusOffset}),ap&&ip(ap,T)||(ap=T,T=iy(h1,"onSelect"),0Md||(c.current=E1[Md],E1[Md]=null,Md--)}function vn(c,f){Md++,E1[Md]=c.current,c.current=f}var zl={},Gr=Ul(zl),Do=Ul(!1),Kc=zl;function Dd(c,f){var g=c.type.contextTypes;if(!g)return zl;var T=c.stateNode;if(T&&T.__reactInternalMemoizedUnmaskedChildContext===f)return T.__reactInternalMemoizedMaskedChildContext;var A={},F;for(F in g)A[F]=f[F];return T&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=f,c.__reactInternalMemoizedMaskedChildContext=A),A}function Ao(c){return c=c.childContextTypes,c!=null}function cy(){In(Do),In(Gr)}function tO(c,f,g){if(Gr.current!==zl)throw Error(n(168));vn(Gr,f),vn(Do,g)}function nO(c,f,g){var T=c.stateNode;if(f=f.childContextTypes,typeof T.getChildContext!="function")return g;T=T.getChildContext();for(var A in T)if(!(A in f))throw Error(n(108,ye(c)||"Unknown",A));return Z({},g,T)}function uy(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||zl,Kc=Gr.current,vn(Gr,c),vn(Do,Do.current),!0}function rO(c,f,g){var T=c.stateNode;if(!T)throw Error(n(169));g?(c=nO(c,f,Kc),T.__reactInternalMemoizedMergedChildContext=c,In(Do),In(Gr),vn(Gr,c)):In(Do),vn(Do,g)}var Hs=null,dy=!1,C1=!1;function oO(c){Hs===null?Hs=[c]:Hs.push(c)}function AZ(c){dy=!0,oO(c)}function Vl(){if(!C1&&Hs!==null){C1=!0;var c=0,f=Ke;try{var g=Hs;for(Ke=1;c>=X,A-=X,_s=1<<32-ar(f)+A|g<xt?(br=ft,ft=null):br=ft.sibling;var Zt=Re(be,ft,Te[xt],We);if(Zt===null){ft===null&&(ft=br);break}c&&ft&&Zt.alternate===null&&f(be,ft),he=F(Zt,he,xt),dt===null?lt=Zt:dt.sibling=Zt,dt=Zt,ft=br}if(xt===Te.length)return g(be,ft),Dn&&Jc(be,xt),lt;if(ft===null){for(;xtxt?(br=ft,ft=null):br=ft.sibling;var Ql=Re(be,ft,Zt.value,We);if(Ql===null){ft===null&&(ft=br);break}c&&ft&&Ql.alternate===null&&f(be,ft),he=F(Ql,he,xt),dt===null?lt=Ql:dt.sibling=Ql,dt=Ql,ft=br}if(Zt.done)return g(be,ft),Dn&&Jc(be,xt),lt;if(ft===null){for(;!Zt.done;xt++,Zt=Te.next())Zt=Be(be,Zt.value,We),Zt!==null&&(he=F(Zt,he,xt),dt===null?lt=Zt:dt.sibling=Zt,dt=Zt);return Dn&&Jc(be,xt),lt}for(ft=T(be,ft);!Zt.done;xt++,Zt=Te.next())Zt=et(ft,be,xt,Zt.value,We),Zt!==null&&(c&&Zt.alternate!==null&&ft.delete(Zt.key===null?xt:Zt.key),he=F(Zt,he,xt),dt===null?lt=Zt:dt.sibling=Zt,dt=Zt);return c&&ft.forEach(function(u$){return f(be,u$)}),Dn&&Jc(be,xt),lt}function Kn(be,he,Te,We){if(typeof Te=="object"&&Te!==null&&Te.type===O&&Te.key===null&&(Te=Te.props.children),typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case M:e:{for(var lt=Te.key,dt=he;dt!==null;){if(dt.key===lt){if(lt=Te.type,lt===O){if(dt.tag===7){g(be,dt.sibling),he=A(dt,Te.props.children),he.return=be,be=he;break e}}else if(dt.elementType===lt||typeof lt=="object"&<!==null&<.$$typeof===z&&yO(lt)===dt.type){g(be,dt.sibling),he=A(dt,Te.props),he.ref=fp(be,dt,Te),he.return=be,be=he;break e}g(be,dt);break}else f(be,dt);dt=dt.sibling}Te.type===O?(he=au(Te.props.children,be.mode,We,Te.key),he.return=be,be=he):(We=_y(Te.type,Te.key,Te.props,null,be.mode,We),We.ref=fp(be,he,Te),We.return=be,be=We)}return X(be);case I:e:{for(dt=Te.key;he!==null;){if(he.key===dt)if(he.tag===4&&he.stateNode.containerInfo===Te.containerInfo&&he.stateNode.implementation===Te.implementation){g(be,he.sibling),he=A(he,Te.children||[]),he.return=be,be=he;break e}else{g(be,he);break}else f(be,he);he=he.sibling}he=Ix(Te,be.mode,We),he.return=be,be=he}return X(be);case z:return dt=Te._init,Kn(be,he,dt(Te._payload),We)}if(Qe(Te))return ot(be,he,Te,We);if(ee(Te))return st(be,he,Te,We);wy(be,Te)}return typeof Te=="string"&&Te!==""||typeof Te=="number"?(Te=""+Te,he!==null&&he.tag===6?(g(be,he.sibling),he=A(he,Te),he.return=be,be=he):(g(be,he),he=xx(Te,be.mode,We),he.return=be,be=he),X(be)):g(be,he)}return Kn}var Ld=bO(!0),wO=bO(!1),hp={},Ba=Ul(hp),pp=Ul(hp),mp=Ul(hp);function eu(c){if(c===hp)throw Error(n(174));return c}function Y1(c,f){switch(vn(mp,f),vn(pp,c),vn(Ba,hp),c=f.nodeType,c){case 9:case 11:f=(f=f.documentElement)?f.namespaceURI:Ge(null,"");break;default:c=c===8?f.parentNode:f,f=c.namespaceURI||null,c=c.tagName,f=Ge(f,c)}In(Ba),vn(Ba,f)}function Rd(){In(Ba),In(pp),In(mp)}function SO(c){eu(mp.current);var f=eu(Ba.current),g=Ge(f,c.type);f!==g&&(vn(pp,c),vn(Ba,g))}function U1(c){pp.current===c&&(In(Ba),In(pp))}var Ln=Ul(0);function Sy(c){for(var f=c;f!==null;){if(f.tag===13){var g=f.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||g.data==="$?"||g.data==="$!"))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if(f.flags&128)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===c)break;for(;f.sibling===null;){if(f.return===null||f.return===c)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var z1=[];function V1(){for(var c=0;cg?g:4,c(!0);var T=W1.transition;W1.transition={};try{c(!1),f()}finally{Ke=g,W1.transition=T}}function _O(){return Ei().memoizedState}function jZ(c,f,g){var T=Kl(c);if(g={lane:T,action:g,hasEagerState:!1,eagerState:null,next:null},BO(c))YO(f,g);else if(g=uO(c,f,g,T),g!==null){var A=fo();oa(g,c,T,A),UO(g,f,T)}}function LZ(c,f,g){var T=Kl(c),A={lane:T,action:g,hasEagerState:!1,eagerState:null,next:null};if(BO(c))YO(f,A);else{var F=c.alternate;if(c.lanes===0&&(F===null||F.lanes===0)&&(F=f.lastRenderedReducer,F!==null))try{var X=f.lastRenderedState,se=F(X,g);if(A.hasEagerState=!0,A.eagerState=se,Qi(se,X)){var ue=f.interleaved;ue===null?(A.next=A,F1(f)):(A.next=ue.next,ue.next=A),f.interleaved=A;return}}catch{}g=uO(c,f,A,T),g!==null&&(A=fo(),oa(g,c,T,A),UO(g,f,T))}}function BO(c){var f=c.alternate;return c===Rn||f!==null&&f===Rn}function YO(c,f){gp=xy=!0;var g=c.pending;g===null?f.next=f:(f.next=g.next,g.next=f),c.pending=f}function UO(c,f,g){if(g&4194240){var T=f.lanes;T&=c.pendingLanes,g|=T,f.lanes=g,Ve(c,g)}}var Ey={readContext:ki,useCallback:Zr,useContext:Zr,useEffect:Zr,useImperativeHandle:Zr,useInsertionEffect:Zr,useLayoutEffect:Zr,useMemo:Zr,useReducer:Zr,useRef:Zr,useState:Zr,useDebugValue:Zr,useDeferredValue:Zr,useTransition:Zr,useMutableSource:Zr,useSyncExternalStore:Zr,useId:Zr,unstable_isNewReconciler:!1},RZ={readContext:ki,useCallback:function(c,f){return Ya().memoizedState=[c,f===void 0?null:f],c},useContext:ki,useEffect:NO,useImperativeHandle:function(c,f,g){return g=g!=null?g.concat([c]):null,Iy(4194308,4,jO.bind(null,f,c),g)},useLayoutEffect:function(c,f){return Iy(4194308,4,c,f)},useInsertionEffect:function(c,f){return Iy(4,2,c,f)},useMemo:function(c,f){var g=Ya();return f=f===void 0?null:f,c=c(),g.memoizedState=[c,f],c},useReducer:function(c,f,g){var T=Ya();return f=g!==void 0?g(f):f,T.memoizedState=T.baseState=f,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:f},T.queue=c,c=c.dispatch=jZ.bind(null,Rn,c),[T.memoizedState,c]},useRef:function(c){var f=Ya();return c={current:c},f.memoizedState=c},useState:DO,useDebugValue:J1,useDeferredValue:function(c){return Ya().memoizedState=c},useTransition:function(){var c=DO(!1),f=c[0];return c=PZ.bind(null,c[1]),Ya().memoizedState=c,[f,c]},useMutableSource:function(){},useSyncExternalStore:function(c,f,g){var T=Rn,A=Ya();if(Dn){if(g===void 0)throw Error(n(407));g=g()}else{if(g=f(),yr===null)throw Error(n(349));tu&30||IO(T,f,g)}A.memoizedState=g;var F={value:g,getSnapshot:f};return A.queue=F,NO(EO.bind(null,T,F,c),[c]),T.flags|=2048,bp(9,kO.bind(null,T,F,g,f),void 0,null),g},useId:function(){var c=Ya(),f=yr.identifierPrefix;if(Dn){var g=Bs,T=_s;g=(T&~(1<<32-ar(T)-1)).toString(32)+g,f=":"+f+"R"+g,g=vp++,0<\/script>",c=c.removeChild(c.firstChild)):typeof T.is=="string"?c=X.createElement(g,{is:T.is}):(c=X.createElement(g),g==="select"&&(X=c,T.multiple?X.multiple=!0:T.size&&(X.size=T.size))):c=X.createElementNS(c,g),c[_a]=f,c[up]=T,iP(c,f,!1,!1),f.stateNode=c;e:{switch(X=er(g,T),g){case"dialog":xn("cancel",c),xn("close",c),A=T;break;case"iframe":case"object":case"embed":xn("load",c),A=T;break;case"video":case"audio":for(A=0;ABd&&(f.flags|=128,T=!0,wp(F,!1),f.lanes=4194304)}else{if(!T)if(c=Sy(X),c!==null){if(f.flags|=128,T=!0,g=c.updateQueue,g!==null&&(f.updateQueue=g,f.flags|=4),wp(F,!0),F.tail===null&&F.tailMode==="hidden"&&!X.alternate&&!Dn)return $r(f),null}else 2*fn()-F.renderingStartTime>Bd&&g!==1073741824&&(f.flags|=128,T=!0,wp(F,!1),f.lanes=4194304);F.isBackwards?(X.sibling=f.child,f.child=X):(g=F.last,g!==null?g.sibling=X:f.child=X,F.last=X)}return F.tail!==null?(f=F.tail,F.rendering=f,F.tail=f.sibling,F.renderingStartTime=fn(),f.sibling=null,g=Ln.current,vn(Ln,T?g&1|2:g&1),f):($r(f),null);case 22:case 23:return wx(),T=f.memoizedState!==null,c!==null&&c.memoizedState!==null!==T&&(f.flags|=8192),T&&f.mode&1?Qo&1073741824&&($r(f),f.subtreeFlags&6&&(f.flags|=8192)):$r(f),null;case 24:return null;case 25:return null}throw Error(n(156,f.tag))}function VZ(c,f){switch(D1(f),f.tag){case 1:return Ao(f.type)&&cy(),c=f.flags,c&65536?(f.flags=c&-65537|128,f):null;case 3:return Rd(),In(Do),In(Gr),V1(),c=f.flags,c&65536&&!(c&128)?(f.flags=c&-65537|128,f):null;case 5:return U1(f),null;case 13:if(In(Ln),c=f.memoizedState,c!==null&&c.dehydrated!==null){if(f.alternate===null)throw Error(n(340));Od()}return c=f.flags,c&65536?(f.flags=c&-65537|128,f):null;case 19:return In(Ln),null;case 4:return Rd(),null;case 10:return L1(f.type._context),null;case 22:case 23:return wx(),null;case 24:return null;default:return null}}var Dy=!1,qr=!1,WZ=typeof WeakSet=="function"?WeakSet:Set,nt=null;function Hd(c,f){var g=c.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(T){zn(c,f,T)}else g.current=null}function lx(c,f,g){try{g()}catch(T){zn(c,f,T)}}var lP=!1;function GZ(c,f){if(w1=Ko,c=_N(),f1(c)){if("selectionStart"in c)var g={start:c.selectionStart,end:c.selectionEnd};else e:{g=(g=c.ownerDocument)&&g.defaultView||window;var T=g.getSelection&&g.getSelection();if(T&&T.rangeCount!==0){g=T.anchorNode;var A=T.anchorOffset,F=T.focusNode;T=T.focusOffset;try{g.nodeType,F.nodeType}catch{g=null;break e}var X=0,se=-1,ue=-1,Ee=0,He=0,Be=c,Re=null;t:for(;;){for(var et;Be!==g||A!==0&&Be.nodeType!==3||(se=X+A),Be!==F||T!==0&&Be.nodeType!==3||(ue=X+T),Be.nodeType===3&&(X+=Be.nodeValue.length),(et=Be.firstChild)!==null;)Re=Be,Be=et;for(;;){if(Be===c)break t;if(Re===g&&++Ee===A&&(se=X),Re===F&&++He===T&&(ue=X),(et=Be.nextSibling)!==null)break;Be=Re,Re=Be.parentNode}Be=et}g=se===-1||ue===-1?null:{start:se,end:ue}}else g=null}g=g||{start:0,end:0}}else g=null;for(S1={focusedElem:c,selectionRange:g},Ko=!1,nt=f;nt!==null;)if(f=nt,c=f.child,(f.subtreeFlags&1028)!==0&&c!==null)c.return=f,nt=c;else for(;nt!==null;){f=nt;try{var ot=f.alternate;if(f.flags&1024)switch(f.tag){case 0:case 11:case 15:break;case 1:if(ot!==null){var st=ot.memoizedProps,Kn=ot.memoizedState,be=f.stateNode,he=be.getSnapshotBeforeUpdate(f.elementType===f.type?st:ta(f.type,st),Kn);be.__reactInternalSnapshotBeforeUpdate=he}break;case 3:var Te=f.stateNode.containerInfo;Te.nodeType===1?Te.textContent="":Te.nodeType===9&&Te.documentElement&&Te.removeChild(Te.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(We){zn(f,f.return,We)}if(c=f.sibling,c!==null){c.return=f.return,nt=c;break}nt=f.return}return ot=lP,lP=!1,ot}function Sp(c,f,g){var T=f.updateQueue;if(T=T!==null?T.lastEffect:null,T!==null){var A=T=T.next;do{if((A.tag&c)===c){var F=A.destroy;A.destroy=void 0,F!==void 0&&lx(f,g,F)}A=A.next}while(A!==T)}}function Ay(c,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&c)===c){var T=g.create;g.destroy=T()}g=g.next}while(g!==f)}}function cx(c){var f=c.ref;if(f!==null){var g=c.stateNode;switch(c.tag){case 5:c=g;break;default:c=g}typeof f=="function"?f(c):f.current=c}}function cP(c){var f=c.alternate;f!==null&&(c.alternate=null,cP(f)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(f=c.stateNode,f!==null&&(delete f[_a],delete f[up],delete f[k1],delete f[MZ],delete f[DZ])),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function uP(c){return c.tag===5||c.tag===3||c.tag===4}function dP(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||uP(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function ux(c,f,g){var T=c.tag;if(T===5||T===6)c=c.stateNode,f?g.nodeType===8?g.parentNode.insertBefore(c,f):g.insertBefore(c,f):(g.nodeType===8?(f=g.parentNode,f.insertBefore(c,g)):(f=g,f.appendChild(c)),g=g._reactRootContainer,g!=null||f.onclick!==null||(f.onclick=sy));else if(T!==4&&(c=c.child,c!==null))for(ux(c,f,g),c=c.sibling;c!==null;)ux(c,f,g),c=c.sibling}function dx(c,f,g){var T=c.tag;if(T===5||T===6)c=c.stateNode,f?g.insertBefore(c,f):g.appendChild(c);else if(T!==4&&(c=c.child,c!==null))for(dx(c,f,g),c=c.sibling;c!==null;)dx(c,f,g),c=c.sibling}var Nr=null,na=!1;function Zl(c,f,g){for(g=g.child;g!==null;)fP(c,f,g),g=g.sibling}function fP(c,f,g){if(lo&&typeof lo.onCommitFiberUnmount=="function")try{lo.onCommitFiberUnmount($o,g)}catch{}switch(g.tag){case 5:qr||Hd(g,f);case 6:var T=Nr,A=na;Nr=null,Zl(c,f,g),Nr=T,na=A,Nr!==null&&(na?(c=Nr,g=g.stateNode,c.nodeType===8?c.parentNode.removeChild(g):c.removeChild(g)):Nr.removeChild(g.stateNode));break;case 18:Nr!==null&&(na?(c=Nr,g=g.stateNode,c.nodeType===8?I1(c.parentNode,g):c.nodeType===1&&I1(c,g),Ra(c)):I1(Nr,g.stateNode));break;case 4:T=Nr,A=na,Nr=g.stateNode.containerInfo,na=!0,Zl(c,f,g),Nr=T,na=A;break;case 0:case 11:case 14:case 15:if(!qr&&(T=g.updateQueue,T!==null&&(T=T.lastEffect,T!==null))){A=T=T.next;do{var F=A,X=F.destroy;F=F.tag,X!==void 0&&(F&2||F&4)&&lx(g,f,X),A=A.next}while(A!==T)}Zl(c,f,g);break;case 1:if(!qr&&(Hd(g,f),T=g.stateNode,typeof T.componentWillUnmount=="function"))try{T.props=g.memoizedProps,T.state=g.memoizedState,T.componentWillUnmount()}catch(se){zn(g,f,se)}Zl(c,f,g);break;case 21:Zl(c,f,g);break;case 22:g.mode&1?(qr=(T=qr)||g.memoizedState!==null,Zl(c,f,g),qr=T):Zl(c,f,g);break;default:Zl(c,f,g)}}function hP(c){var f=c.updateQueue;if(f!==null){c.updateQueue=null;var g=c.stateNode;g===null&&(g=c.stateNode=new WZ),f.forEach(function(T){var A=t$.bind(null,c,T);g.has(T)||(g.add(T),T.then(A,A))})}}function ra(c,f){var g=f.deletions;if(g!==null)for(var T=0;TA&&(A=X),T&=~F}if(T=A,T=fn()-T,T=(120>T?120:480>T?480:1080>T?1080:1920>T?1920:3e3>T?3e3:4320>T?4320:1960*$Z(T/1960))-T,10c?16:c,ql===null)var T=!1;else{if(c=ql,ql=null,Ly=0,zt&6)throw Error(n(331));var A=zt;for(zt|=4,nt=c.current;nt!==null;){var F=nt,X=F.child;if(nt.flags&16){var se=F.deletions;if(se!==null){for(var ue=0;uefn()-px?ou(c,0):hx|=g),Po(c,f)}function EP(c,f){f===0&&(c.mode&1?(f=Os,Os<<=1,!(Os&130023424)&&(Os=4194304)):f=1);var g=fo();c=Ys(c,f),c!==null&&(ve(c,f,g),Po(c,g))}function e$(c){var f=c.memoizedState,g=0;f!==null&&(g=f.retryLane),EP(c,g)}function t$(c,f){var g=0;switch(c.tag){case 13:var T=c.stateNode,A=c.memoizedState;A!==null&&(g=A.retryLane);break;case 19:T=c.stateNode;break;default:throw Error(n(314))}T!==null&&T.delete(f),EP(c,g)}var CP;CP=function(c,f,g){if(c!==null)if(c.memoizedProps!==f.pendingProps||Do.current)No=!0;else{if(!(c.lanes&g)&&!(f.flags&128))return No=!1,UZ(c,f,g);No=!!(c.flags&131072)}else No=!1,Dn&&f.flags&1048576&&iO(f,hy,f.index);switch(f.lanes=0,f.tag){case 2:var T=f.type;My(c,f),c=f.pendingProps;var A=Dd(f,Gr.current);jd(f,g),A=Z1(null,f,T,c,A,g);var F=$1();return f.flags|=1,typeof A=="object"&&A!==null&&typeof A.render=="function"&&A.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Ao(T)?(F=!0,uy(f)):F=!1,f.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,H1(f),A.updater=by,f.stateNode=A,A._reactInternals=f,B1(f,T,c,g),f=nx(null,f,T,!0,F,g)):(f.tag=0,Dn&&F&&M1(f),uo(null,f,A,g),f=f.child),f;case 16:T=f.elementType;e:{switch(My(c,f),c=f.pendingProps,A=T._init,T=A(T._payload),f.type=T,A=f.tag=r$(T),c=ta(T,c),A){case 0:f=tx(null,f,T,c,g);break e;case 1:f=QO(null,f,T,c,g);break e;case 11:f=$O(null,f,T,c,g);break e;case 14:f=qO(null,f,T,ta(T.type,c),g);break e}throw Error(n(306,T,""))}return f;case 0:return T=f.type,A=f.pendingProps,A=f.elementType===T?A:ta(T,A),tx(c,f,T,A,g);case 1:return T=f.type,A=f.pendingProps,A=f.elementType===T?A:ta(T,A),QO(c,f,T,A,g);case 3:e:{if(eP(f),c===null)throw Error(n(387));T=f.pendingProps,F=f.memoizedState,A=F.element,dO(c,f),yy(f,T,null,g);var X=f.memoizedState;if(T=X.element,F.isDehydrated)if(F={element:T,isDehydrated:!1,cache:X.cache,pendingSuspenseBoundaries:X.pendingSuspenseBoundaries,transitions:X.transitions},f.updateQueue.baseState=F,f.memoizedState=F,f.flags&256){A=Fd(Error(n(423)),f),f=tP(c,f,T,g,A);break e}else if(T!==A){A=Fd(Error(n(424)),f),f=tP(c,f,T,g,A);break e}else for(Jo=Yl(f.stateNode.containerInfo.firstChild),Xo=f,Dn=!0,ea=null,g=wO(f,null,T,g),f.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(Od(),T===A){f=zs(c,f,g);break e}uo(c,f,T,g)}f=f.child}return f;case 5:return SO(f),c===null&&N1(f),T=f.type,A=f.pendingProps,F=c!==null?c.memoizedProps:null,X=A.children,T1(T,A)?X=null:F!==null&&T1(T,F)&&(f.flags|=32),JO(c,f),uo(c,f,X,g),f.child;case 6:return c===null&&N1(f),null;case 13:return nP(c,f,g);case 4:return Y1(f,f.stateNode.containerInfo),T=f.pendingProps,c===null?f.child=Ld(f,null,T,g):uo(c,f,T,g),f.child;case 11:return T=f.type,A=f.pendingProps,A=f.elementType===T?A:ta(T,A),$O(c,f,T,A,g);case 7:return uo(c,f,f.pendingProps,g),f.child;case 8:return uo(c,f,f.pendingProps.children,g),f.child;case 12:return uo(c,f,f.pendingProps.children,g),f.child;case 10:e:{if(T=f.type._context,A=f.pendingProps,F=f.memoizedProps,X=A.value,vn(my,T._currentValue),T._currentValue=X,F!==null)if(Qi(F.value,X)){if(F.children===A.children&&!Do.current){f=zs(c,f,g);break e}}else for(F=f.child,F!==null&&(F.return=f);F!==null;){var se=F.dependencies;if(se!==null){X=F.child;for(var ue=se.firstContext;ue!==null;){if(ue.context===T){if(F.tag===1){ue=Us(-1,g&-g),ue.tag=2;var Ee=F.updateQueue;if(Ee!==null){Ee=Ee.shared;var He=Ee.pending;He===null?ue.next=ue:(ue.next=He.next,He.next=ue),Ee.pending=ue}}F.lanes|=g,ue=F.alternate,ue!==null&&(ue.lanes|=g),R1(F.return,g,f),se.lanes|=g;break}ue=ue.next}}else if(F.tag===10)X=F.type===f.type?null:F.child;else if(F.tag===18){if(X=F.return,X===null)throw Error(n(341));X.lanes|=g,se=X.alternate,se!==null&&(se.lanes|=g),R1(X,g,f),X=F.sibling}else X=F.child;if(X!==null)X.return=F;else for(X=F;X!==null;){if(X===f){X=null;break}if(F=X.sibling,F!==null){F.return=X.return,X=F;break}X=X.return}F=X}uo(c,f,A.children,g),f=f.child}return f;case 9:return A=f.type,T=f.pendingProps.children,jd(f,g),A=ki(A),T=T(A),f.flags|=1,uo(c,f,T,g),f.child;case 14:return T=f.type,A=ta(T,f.pendingProps),A=ta(T.type,A),qO(c,f,T,A,g);case 15:return KO(c,f,f.type,f.pendingProps,g);case 17:return T=f.type,A=f.pendingProps,A=f.elementType===T?A:ta(T,A),My(c,f),f.tag=1,Ao(T)?(c=!0,uy(f)):c=!1,jd(f,g),gO(f,T,A),B1(f,T,A,g),nx(null,f,T,!0,c,g);case 19:return oP(c,f,g);case 22:return XO(c,f,g)}throw Error(n(156,f.tag))};function MP(c,f){return As(c,f)}function n$(c,f,g,T){this.tag=c,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=T,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mi(c,f,g,T){return new n$(c,f,g,T)}function Tx(c){return c=c.prototype,!(!c||!c.isReactComponent)}function r$(c){if(typeof c=="function")return Tx(c)?1:0;if(c!=null){if(c=c.$$typeof,c===H)return 11;if(c===K)return 14}return 2}function Jl(c,f){var g=c.alternate;return g===null?(g=Mi(c.tag,f,c.key,c.mode),g.elementType=c.elementType,g.type=c.type,g.stateNode=c.stateNode,g.alternate=c,c.alternate=g):(g.pendingProps=f,g.type=c.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=c.flags&14680064,g.childLanes=c.childLanes,g.lanes=c.lanes,g.child=c.child,g.memoizedProps=c.memoizedProps,g.memoizedState=c.memoizedState,g.updateQueue=c.updateQueue,f=c.dependencies,g.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},g.sibling=c.sibling,g.index=c.index,g.ref=c.ref,g}function _y(c,f,g,T,A,F){var X=2;if(T=c,typeof c=="function")Tx(c)&&(X=1);else if(typeof c=="string")X=5;else e:switch(c){case O:return au(g.children,A,F,f);case R:X=8,A|=8;break;case L:return c=Mi(12,g,f,A|2),c.elementType=L,c.lanes=F,c;case U:return c=Mi(13,g,f,A),c.elementType=U,c.lanes=F,c;case G:return c=Mi(19,g,f,A),c.elementType=G,c.lanes=F,c;case ne:return By(g,A,F,f);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case B:X=10;break e;case _:X=9;break e;case H:X=11;break e;case K:X=14;break e;case z:X=16,T=null;break e}throw Error(n(130,c==null?c:typeof c,""))}return f=Mi(X,g,f,A),f.elementType=c,f.type=T,f.lanes=F,f}function au(c,f,g,T){return c=Mi(7,c,T,f),c.lanes=g,c}function By(c,f,g,T){return c=Mi(22,c,T,f),c.elementType=ne,c.lanes=g,c.stateNode={isHidden:!1},c}function xx(c,f,g){return c=Mi(6,c,null,f),c.lanes=g,c}function Ix(c,f,g){return f=Mi(4,c.children!==null?c.children:[],c.key,f),f.lanes=g,f.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},f}function o$(c,f,g,T,A){this.tag=f,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Se(0),this.expirationTimes=Se(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Se(0),this.identifierPrefix=T,this.onRecoverableError=A,this.mutableSourceEagerHydrationData=null}function kx(c,f,g,T,A,F,X,se,ue){return c=new o$(c,f,g,se,ue),f===1?(f=1,F===!0&&(f|=8)):f=0,F=Mi(3,null,null,f),c.current=F,F.stateNode=c,F.memoizedState={element:T,isDehydrated:g,cache:null,transitions:null,pendingSuspenseBoundaries:null},H1(F),c}function i$(c,f,g){var T=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nH)}catch(e){console.error(e)}}nH();tH.exports=VQ();var nD=tH.exports;const rD=tt(nD);var tv,rH=nD;tv=Fi.createRoot=rH.createRoot;Fi.hydrateRoot=rH.hydrateRoot;const WQ=e=>{const{children:t,className:n,clickSpaceDestroy:r,destroy:o}=e,i=()=>{r&&o()},a=s=>{(s.key==="Escape"||(s.ctrlKey||s.metaKey)&&s.key.toLowerCase()==="w")&&o()};return w.jsx("div",{className:`dialog-wrapper ${n}`,onClick:i,onKeyDown:s=>a(s),children:w.jsx("div",{className:"dialog-container",onClick:s=>s.stopPropagation(),children:t})})};function yS(e,t,n){const r=document.createElement("div");document.body.append(r),setTimeout(()=>{r.firstElementChild?.classList.add("showup")},0);const o={destroy:()=>{r.firstElementChild?.classList.remove("showup"),r.firstElementChild?.classList.add("showoff"),setTimeout(()=>{r.detach(),s.unmount(),document.body.find(".domtoimage-thino")&&document.body.findAll(".domtoimage-thino").forEach(u=>{u.detach()})},j8)}},i={...n,destroy:o.destroy};let a=w.jsx(WQ,{destroy:o.destroy,clickSpaceDestroy:!0,...e,children:w.jsx(t,{...i})});a=w.jsx(zi,{store:ke,context:ct,children:a});const s=Fi.createRoot(r);return s.render(a),o}class GQ extends N.Modal{constructor(t,n,r){super(t),this.version=r,this.plugin=n}plugin;onOpen(){super.onOpen(),this.titleEl.setText(E("Submit issue")),new N.Setting(this.contentEl).setName(E("Current version")+": "+this.version),new N.Setting(this.contentEl).setName(E("Bug report")).setDesc(E("Click the button to copy debug info and open the issue page")).addButton(t=>{t.setButtonText(E("Copy and go")).onClick(async()=>{await MN(this.plugin),new N.Notice(E("Debug info copied")),setTimeout(()=>{window.open("https://github.com/Quorafind/Obsidian-Thino/issues/new/choose","_blank"),this.close()},100)})}),new N.Setting(this.contentEl).setName(E("Feature request")).setDesc(E("Submit your feature request to the issue page")).addButton(t=>{t.setButtonText(E("Go")).onClick(async()=>{window.open("https://github.com/Quorafind/Obsidian-Thino/issues/new/choose","_blank"),this.close()})})}}function oH(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t=i?o:(n.setFullYear(o.getFullYear(),o.getMonth(),r),n)}const aH=6048e5,ZQ=864e5,$Q=6e4,qQ=36e5,KQ=1e3;let XQ={};function bh(){return XQ}function Hi(e,t){const n=bh(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=an(e),i=o.getDay(),a=(i=o.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function m0(e){const t=an(e);return t.setHours(0,0,0,0),t}function g0(e){const t=an(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function QQ(e,t){const n=m0(e),r=m0(t),o=+n-g0(n),i=+r-g0(r);return Math.round((o-i)/ZQ)}function eee(e){const t=JQ(e),n=An(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),xf(n)}function tee(e,t){return iH(e,t*12)}function sH(e,t){const n=an(e),r=an(t),o=a3(n,r),i=Math.abs(QQ(n,r));n.setDate(n.getDate()-o*i);const a=+(a3(n,r)===-o),s=o*(i-a);return s===0?0:s}function a3(e,t){const n=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return n<0?-1:n>0?1:n}function nee(e){const t=an(e);return t.setHours(23,59,59,999),t}function v0(e){const t=an(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}function y0(e){const t=an(e);return t.setDate(1),t.setHours(0,0,0,0),t}function b0(e){const t=an(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}function w0(e){const t=an(e),n=An(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}function S0(e,t){const n=bh(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=an(e),i=o.getDay(),a=(i{let r;const o=ree[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Rx(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const iee={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},aee={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},see={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},lee={date:Rx({formats:iee,defaultWidth:"full"}),time:Rx({formats:aee,defaultWidth:"full"}),dateTime:Rx({formats:see,defaultWidth:"full"})},cee={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},uee=(e,t,n,r)=>cee[e];function Mp(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;o=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return o[i]}}const dee={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},fee={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},hee={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},pee={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mee={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gee={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},vee=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yee={ordinalNumber:vee,era:Mp({values:dee,defaultWidth:"wide"}),quarter:Mp({values:fee,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Mp({values:hee,defaultWidth:"wide"}),day:Mp({values:pee,defaultWidth:"wide"}),dayPeriod:Mp({values:mee,defaultWidth:"wide",formattingValues:gee,defaultFormattingWidth:"wide"})};function Dp(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;const a=i[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?wee(s,h=>h.test(a)):bee(s,h=>h.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function bee(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function wee(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(o.length);return{value:a,rest:s}}}const Tee=/^(\d+)(th|st|nd|rd)?/i,xee=/\d+/i,Iee={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kee={any:[/^b/i,/^(a|c)/i]},Eee={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Cee={any:[/1/i,/2/i,/3/i,/4/i]},Mee={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Dee={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Aee={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Nee={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Oee={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Pee={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},jee={ordinalNumber:See({matchPattern:Tee,parsePattern:xee,valueCallback:e=>parseInt(e,10)}),era:Dp({matchPatterns:Iee,defaultMatchWidth:"wide",parsePatterns:kee,defaultParseWidth:"any"}),quarter:Dp({matchPatterns:Eee,defaultMatchWidth:"wide",parsePatterns:Cee,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Dp({matchPatterns:Mee,defaultMatchWidth:"wide",parsePatterns:Dee,defaultParseWidth:"any"}),day:Dp({matchPatterns:Aee,defaultMatchWidth:"wide",parsePatterns:Nee,defaultParseWidth:"any"}),dayPeriod:Dp({matchPatterns:Oee,defaultMatchWidth:"any",parsePatterns:Pee,defaultParseWidth:"any"})},Lee={code:"en-US",formatDistance:oee,formatLong:lee,formatRelative:uee,localize:yee,match:jee,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ree(e){const t=an(e),n=+xf(t)-+eee(t);return Math.round(n/aH)+1}function lH(e,t){const n=an(e),r=n.getFullYear(),o=bh(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=An(e,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const s=Hi(a,t),l=An(e,0);l.setFullYear(r,0,i),l.setHours(0,0,0,0);const u=Hi(l,t);return n.getTime()>=s.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function Fee(e,t){const n=bh(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=lH(e,t),i=An(e,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),Hi(i,t)}function Hee(e,t){const n=an(e),r=+Hi(n,t)-+Fee(n,t);return Math.round(r/aH)+1}const s3=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},cH=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},_ee=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return s3(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",s3(r,t)).replace("{{time}}",cH(o,t))},l3={p:cH,P:_ee},Bee=/^D+$/,Yee=/^Y+$/,Uee=["D","DD","YY","YYYY"];function zee(e){return Bee.test(e)}function Vee(e){return Yee.test(e)}function c3(e,t,n){const r=Wee(e,t,n);if(console.warn(r),Uee.includes(e))throw new RangeError(r)}function Wee(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}function Gee(){return Object.assign({},bh())}function Zee(e){let n=an(e).getDay();return n===0&&(n=7),n}function $ee(e,t){const n=an(e),r=an(t);return n.getTime()>r.getTime()}function qee(e,t){const n=t instanceof Date?An(t,0):new t(0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}const Kee=10;class uH{subPriority=0;validate(t,n){return!0}}class Xee extends uH{constructor(t,n,r,o,i){super(),this.value=t,this.validateValue=n,this.setValue=r,this.priority=o,i&&(this.subPriority=i)}validate(t,n){return this.validateValue(t,this.value,n)}set(t,n,r){return this.setValue(t,n,this.value,r)}}class Jee extends uH{priority=Kee;subPriority=-1;set(t,n){return n.timestampIsSet?t:An(t,qee(t,Date))}}class Qt{run(t,n,r,o){const i=this.parse(t,n,r,o);return i?{setter:new Xee(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(t,n,r){return!0}}class Qee extends Qt{priority=140;parse(t,n,r){switch(n){case"G":case"GG":case"GGG":return r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"});case"GGGGG":return r.era(t,{width:"narrow"});case"GGGG":default:return r.era(t,{width:"wide"})||r.era(t,{width:"abbreviated"})||r.era(t,{width:"narrow"})}}set(t,n,r){return n.era=r,t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["R","u","t","T"]}const Jn={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},as={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function Qn(e,t){return e&&{value:t(e.value),rest:e.rest}}function Hn(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function ss(e,t){const n=t.match(e);if(!n)return null;if(n[0]==="Z")return{value:0,rest:t.slice(1)};const r=n[1]==="+"?1:-1,o=n[2]?parseInt(n[2],10):0,i=n[3]?parseInt(n[3],10):0,a=n[5]?parseInt(n[5],10):0;return{value:r*(o*qQ+i*$Q+a*KQ),rest:t.slice(n[0].length)}}function dH(e){return Hn(Jn.anyDigitsSigned,e)}function Gn(e,t){switch(e){case 1:return Hn(Jn.singleDigit,t);case 2:return Hn(Jn.twoDigits,t);case 3:return Hn(Jn.threeDigits,t);case 4:return Hn(Jn.fourDigits,t);default:return Hn(new RegExp("^\\d{1,"+e+"}"),t)}}function T0(e,t){switch(e){case 1:return Hn(Jn.singleDigitSigned,t);case 2:return Hn(Jn.twoDigitsSigned,t);case 3:return Hn(Jn.threeDigitsSigned,t);case 4:return Hn(Jn.fourDigitsSigned,t);default:return Hn(new RegExp("^-?\\d{1,"+e+"}"),t)}}function iD(e){switch(e){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function fH(e,t){const n=t>0,r=n?t:1-t;let o;if(r<=50)o=e||100;else{const i=r+50,a=Math.trunc(i/100)*100,s=e>=i%100;o=e+a-(s?100:0)}return n?o:1-o}function hH(e){return e%400===0||e%4===0&&e%100!==0}class ete extends Qt{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="yy"});switch(n){case"y":return Qn(Gn(4,t),o);case"yo":return Qn(r.ordinalNumber(t,{unit:"year"}),o);default:return Qn(Gn(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r){const o=t.getFullYear();if(r.isTwoDigitYear){const a=fH(r.year,o);return t.setFullYear(a,0,1),t.setHours(0,0,0,0),t}const i=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(i,0,1),t.setHours(0,0,0,0),t}}class tte extends Qt{priority=130;parse(t,n,r){const o=i=>({year:i,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Qn(Gn(4,t),o);case"Yo":return Qn(r.ordinalNumber(t,{unit:"year"}),o);default:return Qn(Gn(n.length,t),o)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,o){const i=lH(t,o);if(r.isTwoDigitYear){const s=fH(r.year,i);return t.setFullYear(s,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Hi(t,o)}const a=!("era"in n)||n.era===1?r.year:1-r.year;return t.setFullYear(a,0,o.firstWeekContainsDate),t.setHours(0,0,0,0),Hi(t,o)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class nte extends Qt{priority=130;parse(t,n){return T0(n==="R"?4:n.length,t)}set(t,n,r){const o=An(t,0);return o.setFullYear(r,0,4),o.setHours(0,0,0,0),xf(o)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class rte extends Qt{priority=130;parse(t,n){return T0(n==="u"?4:n.length,t)}set(t,n,r){return t.setFullYear(r,0,1),t.setHours(0,0,0,0),t}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]}class ote extends Qt{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return Gn(n.length,t);case"Qo":return r.ordinalNumber(t,{unit:"quarter"});case"QQQ":return r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return r.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(t,{width:"wide",context:"formatting"})||r.quarter(t,{width:"abbreviated",context:"formatting"})||r.quarter(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]}class ite extends Qt{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return Gn(n.length,t);case"qo":return r.ordinalNumber(t,{unit:"quarter"});case"qqq":return r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return r.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(t,{width:"wide",context:"standalone"})||r.quarter(t,{width:"abbreviated",context:"standalone"})||r.quarter(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=1&&n<=4}set(t,n,r){return t.setMonth((r-1)*3,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]}class ate extends Qt{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"M":return Qn(Hn(Jn.month,t),o);case"MM":return Qn(Gn(2,t),o);case"Mo":return Qn(r.ordinalNumber(t,{unit:"month"}),o);case"MMM":return r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return r.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(t,{width:"wide",context:"formatting"})||r.month(t,{width:"abbreviated",context:"formatting"})||r.month(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}}class ste extends Qt{priority=110;parse(t,n,r){const o=i=>i-1;switch(n){case"L":return Qn(Hn(Jn.month,t),o);case"LL":return Qn(Gn(2,t),o);case"Lo":return Qn(r.ordinalNumber(t,{unit:"month"}),o);case"LLL":return r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return r.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(t,{width:"wide",context:"standalone"})||r.month(t,{width:"abbreviated",context:"standalone"})||r.month(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.setMonth(r,1),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]}function lte(e,t,n){const r=an(e),o=Hee(r,n)-t;return r.setDate(r.getDate()-o*7),r}class cte extends Qt{priority=100;parse(t,n,r){switch(n){case"w":return Hn(Jn.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Gn(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,o){return Hi(lte(t,r,o),o)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function ute(e,t){const n=an(e),r=Ree(n)-t;return n.setDate(n.getDate()-r*7),n}class dte extends Qt{priority=100;parse(t,n,r){switch(n){case"I":return Hn(Jn.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Gn(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return xf(ute(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const fte=[31,28,31,30,31,30,31,31,30,31,30,31],hte=[31,29,31,30,31,30,31,31,30,31,30,31];class pte extends Qt{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return Hn(Jn.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Gn(n.length,t)}}validate(t,n){const r=t.getFullYear(),o=hH(r),i=t.getMonth();return o?n>=1&&n<=hte[i]:n>=1&&n<=fte[i]}set(t,n,r){return t.setDate(r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]}class mte extends Qt{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return Hn(Jn.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Gn(n.length,t)}}validate(t,n){const r=t.getFullYear();return hH(r)?n>=1&&n<=366:n>=1&&n<=365}set(t,n,r){return t.setMonth(0,r),t.setHours(0,0,0,0),t}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]}function aD(e,t,n){const r=bh(),o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=an(e),a=i.getDay(),l=(t%7+7)%7,u=7-o,d=t<0||t>6?t-(a+u)%7:(l+u)%7-(a+u)%7;return oD(i,d)}class gte extends Qt{priority=90;parse(t,n,r){switch(n){case"E":case"EE":case"EEE":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return r.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=aD(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class vte extends Qt{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"e":case"ee":return Qn(Gn(n.length,t),i);case"eo":return Qn(r.ordinalNumber(t,{unit:"day"}),i);case"eee":return r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeeee":return r.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=aD(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]}class yte extends Qt{priority=90;parse(t,n,r,o){const i=a=>{const s=Math.floor((a-1)/7)*7;return(a+o.weekStartsOn+6)%7+s};switch(n){case"c":case"cc":return Qn(Gn(n.length,t),i);case"co":return Qn(r.ordinalNumber(t,{unit:"day"}),i);case"ccc":return r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"ccccc":return r.day(t,{width:"narrow",context:"standalone"});case"cccccc":return r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return r.day(t,{width:"wide",context:"standalone"})||r.day(t,{width:"abbreviated",context:"standalone"})||r.day(t,{width:"short",context:"standalone"})||r.day(t,{width:"narrow",context:"standalone"})}}validate(t,n){return n>=0&&n<=6}set(t,n,r,o){return t=aD(t,r,o),t.setHours(0,0,0,0),t}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]}function bte(e,t){const n=an(e),r=Zee(n),o=t-r;return oD(n,o)}class wte extends Qt{priority=90;parse(t,n,r){const o=i=>i===0?7:i;switch(n){case"i":case"ii":return Gn(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Qn(r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return Qn(r.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return Qn(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o);case"iiii":default:return Qn(r.day(t,{width:"wide",context:"formatting"})||r.day(t,{width:"abbreviated",context:"formatting"})||r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),o)}}validate(t,n){return n>=1&&n<=7}set(t,n,r){return t=bte(t,r),t.setHours(0,0,0,0),t}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]}class Ste extends Qt{priority=80;parse(t,n,r){switch(n){case"a":case"aa":case"aaa":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(iD(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class Tte extends Qt{priority=80;parse(t,n,r){switch(n){case"b":case"bb":case"bbb":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(iD(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class xte extends Qt{priority=80;parse(t,n,r){switch(n){case"B":case"BB":case"BBB":return r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return r.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(t,{width:"wide",context:"formatting"})||r.dayPeriod(t,{width:"abbreviated",context:"formatting"})||r.dayPeriod(t,{width:"narrow",context:"formatting"})}}set(t,n,r){return t.setHours(iD(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class Ite extends Qt{priority=70;parse(t,n,r){switch(n){case"h":return Hn(Jn.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Gn(n.length,t)}}validate(t,n){return n>=1&&n<=12}set(t,n,r){const o=t.getHours()>=12;return o&&r<12?t.setHours(r+12,0,0,0):!o&&r===12?t.setHours(0,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["H","K","k","t","T"]}class kte extends Qt{priority=70;parse(t,n,r){switch(n){case"H":return Hn(Jn.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Gn(n.length,t)}}validate(t,n){return n>=0&&n<=23}set(t,n,r){return t.setHours(r,0,0,0),t}incompatibleTokens=["a","b","h","K","k","t","T"]}class Ete extends Qt{priority=70;parse(t,n,r){switch(n){case"K":return Hn(Jn.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Gn(n.length,t)}}validate(t,n){return n>=0&&n<=11}set(t,n,r){return t.getHours()>=12&&r<12?t.setHours(r+12,0,0,0):t.setHours(r,0,0,0),t}incompatibleTokens=["h","H","k","t","T"]}class Cte extends Qt{priority=70;parse(t,n,r){switch(n){case"k":return Hn(Jn.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Gn(n.length,t)}}validate(t,n){return n>=1&&n<=24}set(t,n,r){const o=r<=24?r%24:r;return t.setHours(o,0,0,0),t}incompatibleTokens=["a","b","h","H","K","t","T"]}class Mte extends Qt{priority=60;parse(t,n,r){switch(n){case"m":return Hn(Jn.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Gn(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setMinutes(r,0,0),t}incompatibleTokens=["t","T"]}class Dte extends Qt{priority=50;parse(t,n,r){switch(n){case"s":return Hn(Jn.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Gn(n.length,t)}}validate(t,n){return n>=0&&n<=59}set(t,n,r){return t.setSeconds(r,0),t}incompatibleTokens=["t","T"]}class Ate extends Qt{priority=30;parse(t,n){const r=o=>Math.trunc(o*Math.pow(10,-n.length+3));return Qn(Gn(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class Nte extends Qt{priority=10;parse(t,n){switch(n){case"X":return ss(as.basicOptionalMinutes,t);case"XX":return ss(as.basic,t);case"XXXX":return ss(as.basicOptionalSeconds,t);case"XXXXX":return ss(as.extendedOptionalSeconds,t);case"XXX":default:return ss(as.extended,t)}}set(t,n,r){return n.timestampIsSet?t:An(t,t.getTime()-g0(t)-r)}incompatibleTokens=["t","T","x"]}class Ote extends Qt{priority=10;parse(t,n){switch(n){case"x":return ss(as.basicOptionalMinutes,t);case"xx":return ss(as.basic,t);case"xxxx":return ss(as.basicOptionalSeconds,t);case"xxxxx":return ss(as.extendedOptionalSeconds,t);case"xxx":default:return ss(as.extended,t)}}set(t,n,r){return n.timestampIsSet?t:An(t,t.getTime()-g0(t)-r)}incompatibleTokens=["t","T","X"]}class Pte extends Qt{priority=40;parse(t){return dH(t)}set(t,n,r){return[An(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class jte extends Qt{priority=20;parse(t){return dH(t)}set(t,n,r){return[An(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const Lte={G:new Qee,y:new ete,Y:new tte,R:new nte,u:new rte,Q:new ote,q:new ite,M:new ate,L:new ste,w:new cte,I:new dte,d:new pte,D:new mte,E:new gte,e:new vte,c:new yte,i:new wte,a:new Ste,b:new Tte,B:new xte,h:new Ite,H:new kte,K:new Ete,k:new Cte,m:new Mte,s:new Dte,S:new Ate,X:new Nte,x:new Ote,t:new Pte,T:new jte},Rte=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Fte=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Hte=/^'([^]*?)'?$/,_te=/''/g,Bte=/\S/,Yte=/[a-zA-Z]/;function nE(e,t,n,r){const o=Gee(),i=r?.locale??o.locale??Lee,a=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,s=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0;if(t==="")return e===""?an(n):An(n,NaN);const l={firstWeekContainsDate:a,weekStartsOn:s,locale:i},u=[new Jee],d=t.match(Fte).map(v=>{const y=v[0];if(y in l3){const S=l3[y];return S(v,i.formatLong)}return v}).join("").match(Rte),h=[];for(let v of d){!r?.useAdditionalWeekYearTokens&&Vee(v)&&c3(v,t,e),!r?.useAdditionalDayOfYearTokens&&zee(v)&&c3(v,t,e);const y=v[0],S=Lte[y];if(S){const{incompatibleTokens:x}=S;if(Array.isArray(x)){const k=h.find(M=>x.includes(M.token)||M.token===y);if(k)throw new RangeError(`The format string mustn't contain \`${k.fullToken}\` and \`${v}\` at the same time`)}else if(S.incompatibleTokens==="*"&&h.length>0)throw new RangeError(`The format string mustn't contain \`${v}\` and any other token at the same time`);h.push({token:y,fullToken:v});const C=S.run(e,v,i.match,l);if(!C)return An(n,NaN);u.push(C.setter),e=C.rest}else{if(y.match(Yte))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(v==="''"?v="'":y==="'"&&(v=Ute(v)),e.indexOf(v)===0)e=e.slice(v.length);else return An(n,NaN)}}if(e.length>0&&Bte.test(e))return An(n,NaN);const p=u.map(v=>v.priority).sort((v,y)=>y-v).filter((v,y,S)=>S.indexOf(v)===y).map(v=>u.filter(y=>y.priority===v).sort((y,S)=>S.subPriority-y.subPriority)).map(v=>v[0]);let m=an(n);if(isNaN(m.getTime()))return An(n,NaN);const b={};for(const v of p){if(!v.validate(m,l))return An(n,NaN);const y=v.set(m,b,l);Array.isArray(y)?(m=y[0],Object.assign(b,y[1])):m=y}return An(n,m)}function Ute(e){return e.match(Hte)[1].replace(_te,"'")}function pH(e,t){const n=+an(e),[r,o]=[+an(t.start),+an(t.end)].sort((i,a)=>i-a);return n>=r&&n<=o}function Fo(e,t){return oD(e,-t)}function mH(e,t){return iH(e,-t)}function gH(e,t){return tee(e,-t)}const zte=(e,t,n)=>{console.warn("This function is deprecated, use ThinoWorkerManager.calculateStatsBanner() instead");const r={memosLength:0,tagsLength:0,createdDays:0,taskAmount:0,mostActiveDay:"",mostActiveHour:"",earliestMemo:null,lengthOverflow:!1};if(r.memosLength=e.filter(i=>!(i.deletedAt!==""&&i.deletedAt)).length,r.tagsLength=t.length,r.earliestMemo=e.length>0?e[e.length-1]:null,r.earliestMemo&&r.earliestMemo.createdAt){const i=nE(r.earliestMemo.createdAt,"yyyy/MM/dd HH:mm:ss",new Date);r.createdDays=sH(new Date,i)+1}const o=e.filter(i=>!i.deletedAt&&i.rowStatus!=="ARCHIVED");return r.taskAmount=o.filter(i=>i.thinoType?.startsWith("TASK")).length,r.mostActiveDay=Vte(e),r.mostActiveHour=Wte(e),r.lengthOverflow=r.memosLength>9999||r.tagsLength>999||r.createdDays>999,n&&yH(n)&&bH({tags:r.tagsLength,memos:r.memosLength,days:r.createdDays},n),r},Vte=e=>{const t={};return e.forEach(n=>{const r=n.createdAt.split(" ")[0];t[r]?t[r]++:t[r]=1}),Object.keys(t).sort((n,r)=>t[r]-t[n])[0]},Wte=e=>{const t={};return e.forEach(n=>{const r=n.createdAt.slice(11,13);t[r]?t[r]++:t[r]=1}),Object.keys(t).sort((n,r)=>t[r]-t[n])[0]};function u3(e,t,n){const r=D.useRef(),o=D.useRef();D.useEffect(()=>{const a=t-e,s=l=>{o.current||(o.current=l);const u=l-o.current;if(u<1e3){const d=u/1e3;n(e+a*d),r.current=requestAnimationFrame(s)}else n(t)};return r.current=requestAnimationFrame(s),()=>{r.current&&cancelAnimationFrame(r.current)}},[t,n,e])}const sD=({statusType:e})=>{const{memoState:{memos:t,tags:n},locationState:{pathname:r},dailyNotesState:{settings:o,app:i,plugin:a}}=D.useContext(ct);if(!de.initialized)return null;const[s,l]=D.useState(0),[u,d]=D.useState(0),[h,p]=D.useState(0),[m,b]=D.useState(null),[v,y]=D.useState(!1),S=Y.useRef(null),[x,C]=D.useState(0),[k,M]=D.useState(0),[I,O]=D.useState(0),[R,L]=D.useState(""),[B,_]=D.useState(""),[H,U]=D.useState(!1),[G,K]=D.useState(null);D.useEffect(()=>{if(e==="banner"||!a.thinoWorkerManager)return;(async()=>{try{const Z=await a.thinoWorkerManager.calculateStatsBanner(t,n);O(Z.taskAmount),L(Z.mostActiveDay),_(Z.mostActiveHour)}catch(Z){console.error("Failed to calculate stats banner:",Z)}})()},[t,n]),D.useLayoutEffect(()=>{if(!i)return;const{tags:ee,memos:Z,days:q}=yH(i);p(ee),l(Z),d(q)},[i]),D.useEffect(()=>{!o||!i||(y(s>9999||h>999||u>999),bH({tags:h,memos:s,days:u},i))},[s,h,u]),D.useEffect(()=>{!de.initialized||!a.thinoWorkerManager||t&&r==="/"&&(async()=>{try{const Z=await a.thinoWorkerManager.calculateStatsBanner(t,n);p(Math.max(Z.tagsLength,n.length)),l(Z.memosLength),b(Z.earliestMemo),y(Z.lengthOverflow),Z.earliestMemo&&Z.createdDays&&d(Z.createdDays)}catch(Z){console.error("Failed to calculate stats banner:",Z);const q=zte(t,n,a.app);p(q.tagsLength),l(q.memosLength),b(q.earliestMemo)}})()},[n,t,r]),D.useEffect(()=>{if(!de.initialized)return;if(!m){d(0);return}if(!S.current||!m?.createdAt)return;N.requireApiVersion("1.4.4")&&N.setTooltip(S.current,E("Started from")+" "+Le.getDateTimeString(m?.createdAt??""));const ee=nE(m.createdAt,"yyyy/MM/dd HH:mm:ss",new Date),Z=sH(new Date,ee)+1;d(t?Z:0)},[m]);const z=(ee,Z)=>{if(H&&Z===G){Ue.setMemoFilter(""),U(!1);return}const q=Ct.createTempQuery(`Filter [Temp] ${Math.random().toString(36).substring(7)}`,JSON.stringify([ee]));Ct.pushQuery(q),Ue.setMemoFilter(q.id),U(!0),K(Z)},ne=()=>{z({type:"LIST",value:{operator:"IS_NOT",value:"LIST"},relation:"AND"},"LIST")},J=()=>{z({type:"TYPE",value:{operator:"IS_NOT",value:"NOT_TAGGED"},relation:"AND"},"TYPE")};return u3(x,s,C),u3(k,u,M),w.jsx("div",{className:tn("status-text-container",v?"text-overflow":"",e),children:e==="banner"?w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:"status-text memos-text",children:[w.jsx("span",{className:"amount-text",children:Math.round(x)}),w.jsx("span",{className:"type-text",children:"THINO"})]}),w.jsxs("div",{className:"status-text tags-text",children:[w.jsx("span",{className:"amount-text",children:h}),w.jsx("span",{className:"type-text",children:E("TAG")})]}),w.jsxs("div",{ref:S,className:"status-text duration-text",onClick:()=>{Ze.setShowSiderbarInMobileView(!1),Ue.setPathname("/daily")},children:[w.jsx("span",{className:"amount-text",children:Math.round(k)??0}),w.jsx("span",{className:"type-text",children:E("DAY")})]})]}):w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"status-sidebar-header title-text",children:w.jsx("span",{className:"normal-text",children:E("Thino status")})}),w.jsxs("div",{className:"status-sidebar-wrapper",children:[w.jsxs("div",{className:"status-text memos-text",children:[w.jsx("span",{className:"type-text",children:E("Thino amount")}),w.jsx("span",{className:"amount-text",children:Math.round(x)})]}),w.jsxs("div",{className:"status-text memos-text",onClick:ne,children:[w.jsx("span",{className:"type-text",children:E("Task amount")}),w.jsx("span",{className:"amount-text",children:Math.round(I)??0})]}),w.jsxs("div",{className:"status-text tags-text",onClick:J,children:[w.jsx("span",{className:"type-text",children:E("Used tags")}),w.jsx("span",{className:"amount-text",children:h})]}),w.jsxs("div",{ref:S,className:"status-text duration-text",onClick:()=>{Ze.setShowSiderbarInMobileView(!1),Ue.setPathname("/daily")},children:[w.jsx("span",{className:"type-text",children:E("Used days")}),w.jsx("span",{className:"amount-text",children:Math.round(k)??0})]}),w.jsxs("div",{className:"status-text most-active-day-text",onClick:()=>{const ee=nE(R,"yyyy/MM/dd",new Date),Z=m0(ee).getTime(),q=nee(ee).getTime();Ue.setFromAndToQuery(Z,q)},children:[w.jsx("span",{className:"type-text",children:E("Most active day")}),w.jsx("span",{className:"amount-text",children:R})]}),w.jsxs("div",{className:"status-text most-active-hour-text",children:[w.jsx("span",{className:"type-text",children:E("Most active hour")}),w.jsx("span",{className:"amount-text",children:B})]})]})]})})};function vH(e){return`userBannerCache:${e}`}function yH(e){try{const t=vH(e?.appId),n=ur.get([t])[t];return n?JSON.parse(n):{tags:0,memos:0,days:0}}catch(t){return console.error(t),{tags:0,memos:0,days:0}}}function bH({tags:e,memos:t,days:n},r){try{const o={tags:e,memos:t,days:n},i=vH(r?.appId);ur.set({[i]:JSON.stringify(o)})}catch(o){console.error(o)}}const wH="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIEQoZSl7Y29uc3QgdD1PYmplY3QucHJvdG90eXBlLnRvU3RyaW5nLmNhbGwoZSk7cmV0dXJuIGUgaW5zdGFuY2VvZiBEYXRlfHx0eXBlb2YgZT09Im9iamVjdCImJnQ9PT0iW29iamVjdCBEYXRlXSI/bmV3IGUuY29uc3RydWN0b3IoK2UpOnR5cGVvZiBlPT0ibnVtYmVyInx8dD09PSJbb2JqZWN0IE51bWJlcl0ifHx0eXBlb2YgZT09InN0cmluZyJ8fHQ9PT0iW29iamVjdCBTdHJpbmddIj9uZXcgRGF0ZShlKTpuZXcgRGF0ZShOYU4pfWZ1bmN0aW9uIE4oZSx0KXtyZXR1cm4gZSBpbnN0YW5jZW9mIERhdGU/bmV3IGUuY29uc3RydWN0b3IodCk6bmV3IERhdGUodCl9ZnVuY3Rpb24gVShlLHQpe2NvbnN0IG49RChlKTtyZXR1cm4gaXNOYU4odCk/TihlLE5hTik6KHQmJm4uc2V0RGF0ZShuLmdldERhdGUoKSt0KSxuKX1mdW5jdGlvbiBNKGUsdCl7Y29uc3Qgbj1EKGUpO2lmKGlzTmFOKHQpKXJldHVybiBOKGUsTmFOKTtpZighdClyZXR1cm4gbjtjb25zdCBzPW4uZ2V0RGF0ZSgpLGk9TihlLG4uZ2V0VGltZSgpKTtpLnNldE1vbnRoKG4uZ2V0TW9udGgoKSt0KzEsMCk7Y29uc3Qgbz1pLmdldERhdGUoKTtyZXR1cm4gcz49bz9pOihuLnNldEZ1bGxZZWFyKGkuZ2V0RnVsbFllYXIoKSxpLmdldE1vbnRoKCkscyksbil9bGV0IFc9e307ZnVuY3Rpb24gRigpe3JldHVybiBXfWZ1bmN0aW9uIEwoZSx0KXtjb25zdCBuPUYoKSxzPXQ/LndlZWtTdGFydHNPbj8/dD8ubG9jYWxlPy5vcHRpb25zPy53ZWVrU3RhcnRzT24/P24ud2Vla1N0YXJ0c09uPz9uLmxvY2FsZT8ub3B0aW9ucz8ud2Vla1N0YXJ0c09uPz8wLGk9RChlKSxvPWkuZ2V0RGF5KCksYT0obzxzPzc6MCkrby1zO3JldHVybiBpLnNldERhdGUoaS5nZXREYXRlKCktYSksaS5zZXRIb3VycygwLDAsMCwwKSxpfWZ1bmN0aW9uIFYoZSx0KXtyZXR1cm4gTShlLHQqMTIpfWZ1bmN0aW9uIHYoZSl7Y29uc3QgdD1EKGUpLG49dC5nZXRNb250aCgpO3JldHVybiB0LnNldEZ1bGxZZWFyKHQuZ2V0RnVsbFllYXIoKSxuKzEsMCksdC5zZXRIb3VycygyMyw1OSw1OSw5OTkpLHR9ZnVuY3Rpb24gJChlKXtjb25zdCB0PUQoZSk7cmV0dXJuIHQuc2V0RGF0ZSgxKSx0LnNldEhvdXJzKDAsMCwwLDApLHR9ZnVuY3Rpb24gaihlKXtjb25zdCB0PUQoZSksbj10LmdldEZ1bGxZZWFyKCk7cmV0dXJuIHQuc2V0RnVsbFllYXIobisxLDAsMCksdC5zZXRIb3VycygyMyw1OSw1OSw5OTkpLHR9ZnVuY3Rpb24gSChlKXtjb25zdCB0PUQoZSksbj1OKGUsMCk7cmV0dXJuIG4uc2V0RnVsbFllYXIodC5nZXRGdWxsWWVhcigpLDAsMSksbi5zZXRIb3VycygwLDAsMCwwKSxufWZ1bmN0aW9uIFkoZSx0KXtjb25zdCBuPUYoKSxzPXQ/LndlZWtTdGFydHNPbj8/dD8ubG9jYWxlPy5vcHRpb25zPy53ZWVrU3RhcnRzT24/P24ud2Vla1N0YXJ0c09uPz9uLmxvY2FsZT8ub3B0aW9ucz8ud2Vla1N0YXJ0c09uPz8wLGk9RChlKSxvPWkuZ2V0RGF5KCksYT0obzxzPy03OjApKzYtKG8tcyk7cmV0dXJuIGkuc2V0RGF0ZShpLmdldERhdGUoKSthKSxpLnNldEhvdXJzKDIzLDU5LDU5LDk5OSksaX1mdW5jdGlvbiBQKGUsdCl7Y29uc3Qgbj0rRChlKSxbcyxpXT1bK0QodC5zdGFydCksK0QodC5lbmQpXS5zb3J0KChvLGEpPT5vLWEpO3JldHVybiBuPj1zJiZuPD1pfWZ1bmN0aW9uIE8oZSx0KXtyZXR1cm4gVShlLC10KX1mdW5jdGlvbiBxKGUsdCl7cmV0dXJuIE0oZSwtdCl9ZnVuY3Rpb24gSihlLHQpe3JldHVybiBWKGUsLXQpfWZ1bmN0aW9uIF8oZSl7cmV0dXJuWy8jKFteXHMjXSspL2csL1xuIyhbXlxzI10rKS9nLC9eIyhbXlxzI10rKS9nXS5yZWR1Y2UoKGksbyk9PigoZS5tYXRjaChvKXx8W10pLmZvckVhY2goYT0+e2NvbnN0IGM9YS5yZXBsYWNlKG8sIiQxIikudHJpbSgpLnNwbGl0KCIvIik7bGV0IGw9IiI7Yy5mb3JFYWNoKGc9PntsKz1nLGkuYWRkKGwpLGwrPSIvIn0pfSksaSksbmV3IFNldCl9ZnVuY3Rpb24gQihlKXtpZighQXJyYXkuaXNBcnJheShlKXx8ZS5sZW5ndGg9PT0wKXJldHVybiBuZXcgU2V0O2NvbnN0IHQ9ZS5maWx0ZXIocz0+ISFzKS5tYXAocz0+cy50b1N0cmluZygpLnRyaW0oKSk7aWYodC5sZW5ndGg9PT0wKXJldHVybiBuZXcgU2V0O2NvbnN0IG49bmV3IFNldDtyZXR1cm4gdC5mb3JFYWNoKHM9Pntjb25zdCBpPXMuc3BsaXQoIi8iKTtsZXQgbz0iIjtpLmZvckVhY2goKGEscik9PntvKz0ocj4wPyIvIjoiIikrYSxuLmFkZChvKX0pfSksbn1mdW5jdGlvbiBYKGUpe2NvbnN0IHQ9ZS50b0xvd2VyQ2FzZSgpO3JldHVybiBuPT5uLmluY2x1ZGVzKHQpfWZ1bmN0aW9uIHooZSx0LG4pe2NvbnN0e29ubHlGaWx0ZXJUeXBlOnMsZmlsdGVyQXJjaGl2ZWQ6aT0hMCxmaWx0ZXJEZWxldGVkOm89ITAsZmlsdGVyRG9uZVRhc2tzOmE9ITEsZmlsdGVyQ29tbWVudHM6cj0hMCxmaWx0ZXJUYWdzSW5GaWxlOmM9ITF9PW58fHt9LGw9LyMoW15ccyNdKykvZyxnPS9eIyhbXlxzI10rKS9nLHA9L1xuIyhbXlxzI10rKS9nLEU9L1xbKC4rPylcXVwoKC4rPylcKS9nLG09LyFcWyguKz8pXF1cKCguKz8pXCkvZyxoPS9cW1xbKC4rPylcXVxdL2c7bGV0IFM9ZTtpZihzJiZzIT09ImFsbCIpc3dpdGNoKHMpe2Nhc2UiYXJjaGl2ZWQiOlM9ZS5maWx0ZXIodT0+dS5yb3dTdGF0dXM9PT0iQVJDSElWRUQiJiYhdS5kZWxldGVkQXQpO2JyZWFrO2Nhc2UiZGVsZXRlZCI6Uz1lLmZpbHRlcih1PT51LmRlbGV0ZWRBdCE9PSIiJiZ1LmRlbGV0ZWRBdCk7YnJlYWs7Y2FzZSJkb25lVGFza3MiOlM9ZS5maWx0ZXIodT0+dS50aGlub1R5cGU9PT0iVEFTSy1ET05FIik7YnJlYWs7Y2FzZSJjb21tZW50cyI6Uz1lLmZpbHRlcih1PT51LmNvbnRlbnQuaW5jbHVkZXMoImNvbW1lbnQ6IikpO2JyZWFrfWVsc2UgUz1lLmZpbHRlcih1PT4hKGkmJnUucm93U3RhdHVzPT09IkFSQ0hJVkVEInx8byYmdS5kZWxldGVkQXR8fHImJnUuY29udGVudC5pbmNsdWRlcygiY29tbWVudDoiKXx8YSYmdS50aGlub1R5cGU9PT0iVEFTSy1ET05FIikpO2lmKFEodCkpcmV0dXJuIFM7Y29uc3R7dGFnOnksZHVyYXRpb246Zix0eXBlOmQsdGV4dDpULGZpbHRlcjp3LHBhdGg6YixtZXRhZGF0YTpJfT10LEM9VD8udG9Mb3dlckNhc2UoKXx8IiIsb3Q9IUl8fE9iamVjdC5rZXlzKEkpLmxlbmd0aD09PTAsRz1DP1goQyk6bnVsbDtyZXR1cm4gUy5maWx0ZXIodT0+e2lmKHcpdHJ5e2NvbnN0IEE9dC5maWx0ZXJDb250ZW50O2lmKEFycmF5LmlzQXJyYXkoQSkmJiF0dCh1LEEpKXJldHVybiExfWNhdGNoKEEpe2NvbnNvbGUuZXJyb3IoIkZhaWxlZCB0byBwYXJzZSBxdWVyeSBmaWx0ZXJzOiIsQSl9aWYoIW90JiZPYmplY3Qua2V5cyhJKS5zb21lKGs9PnUuZmlsZUluZm8/LmZyb250bWF0dGVyW2tdIT09SVtrXSl8fGImJnUucGF0aCYmIXUucGF0aC50b0xvd2VyQ2FzZSgpLmluY2x1ZGVzKGIudG9Mb3dlckNhc2UoKSkpcmV0dXJuITE7aWYoRyl7Y29uc3QgQT1HKHUuY29udGVudC50b0xvd2VyQ2FzZSgpKSxrPXUucGF0aD91LnBhdGgudG9Mb3dlckNhc2UoKS5pbmNsdWRlcyhDKTohMTtpZih1LnRoaW5vVHlwZT09PSJNVUxUSSImJnUucGF0aCl7aWYoIUEmJiFrKXJldHVybiExfWVsc2UgaWYoIUEpcmV0dXJuITF9aWYoeSl7Y29uc3QgQT1fKHUuY29udGVudCksaz1jP0IodS5maWxlSW5mbz8udGFnc3x8W10pOm5ldyBTZXQ7aWYoIUEuaGFzKHkpJiYhay5oYXMoeSkpcmV0dXJuITF9aWYoZiYmZi5mcm9tIT09MCYmZi50byE9PTApe2NvbnN0IEE9Wih1LmNyZWF0ZWRBdCk7aWYoQTxmLmZyb218fEE+Zi50bylyZXR1cm4hMX1pZihkKXN3aXRjaChkKXtjYXNlIk5PVF9UQUdHRUQiOmlmKHUuY29udGVudC5tYXRjaChsKXx8dS5jb250ZW50Lm1hdGNoKGcpfHx1LmNvbnRlbnQubWF0Y2gocCkpcmV0dXJuITE7YnJlYWs7Y2FzZSJMSU5LRUQiOmlmKCF1LmNvbnRlbnQubWF0Y2goRSkpcmV0dXJuITE7YnJlYWs7Y2FzZSJJTUFHRUQiOmlmKCF1LmNvbnRlbnQubWF0Y2gobSkpcmV0dXJuITE7YnJlYWs7Y2FzZSJDT05ORUNURUQiOmlmKCF1LmNvbnRlbnQubWF0Y2goaCkpcmV0dXJuITE7YnJlYWt9cmV0dXJuITB9KX1mdW5jdGlvbiBRKGUpe2lmKCFlKXJldHVybiEwO2NvbnN0e3RhZzp0LGR1cmF0aW9uOm4sdHlwZTpzLHRleHQ6aSxmaWx0ZXI6byxwYXRoOmEsbWV0YWRhdGE6cn09ZSxjPSFyfHxPYmplY3Qua2V5cyhyKS5sZW5ndGg9PT0wO3JldHVybiEodHx8biYmbi5mcm9tPG4udG98fHN8fGl8fG98fGF8fCFjKX1mdW5jdGlvbiBaKGUpe3JldHVybiBuZXcgRGF0ZShlKS5nZXRUaW1lKCl9ZnVuY3Rpb24gdHQoZSx0KXtyZXR1cm4hQXJyYXkuaXNBcnJheSh0KXx8dC5sZW5ndGg9PT0wPyEwOnQuZXZlcnkobj0+e2lmKCFufHx0eXBlb2YgbiE9Im9iamVjdCJ8fCFuLnR5cGV8fCFuLnZhbHVlfHx0eXBlb2Ygbi52YWx1ZSE9Im9iamVjdCIpcmV0dXJuITA7Y29uc3R7dHlwZTpzLHZhbHVlOml9PW4sbz1pLm9wZXJhdG9yLGE9aS52YWx1ZTtzd2l0Y2gocyl7Y2FzZSJUQUciOntjb25zdCByPXR5cGVvZiBhPT0ic3RyaW5nIj9hOiIiLGM9ZS5jb250ZW50LmluY2x1ZGVzKGAjJHtyfWApO3JldHVybiBvPT09IkNPTlRBSU4iP2M6IWN9Y2FzZSJURVhUIjp7Y29uc3Qgcj10eXBlb2YgYT09InN0cmluZyI/YS50b0xvd2VyQ2FzZSgpOiIiLGM9ZS5jb250ZW50LnRvTG93ZXJDYXNlKCkuaW5jbHVkZXMocik7cmV0dXJuIG89PT0iQ09OVEFJTiI/YzohY31jYXNlIlRZUEUiOnJldHVybiBvPT09IklTIj9lLnRoaW5vVHlwZT09PWE6ZS50aGlub1R5cGUhPT1hO2Nhc2UiREFURSI6e2NvbnN0IHI9dHlwZW9mIGE9PSJzdHJpbmciP25ldyBEYXRlKGEpOnR5cGVvZiBhPT0ib2JqZWN0IiYmYSE9PW51bGwmJiJ2YWx1ZSJpbiBhP25ldyBEYXRlKGEudmFsdWUpOm51bGw7aWYoIXIpcmV0dXJuITA7Y29uc3QgYz1uZXcgRGF0ZShlLmNyZWF0ZWRBdCk7cmV0dXJuIG89PT0iQ09OVEFJTiI/Yz49cjpjPHJ9Y2FzZSJMSVNUIjpzd2l0Y2goYSl7Y2FzZSJUT0RPIjp7Y29uc3Qgcj1lLnRoaW5vVHlwZT09PSJUQVNLLVRPRE8iO3JldHVybiBvPT09IklTIj9yOiFyfWNhc2UiRE9ORSI6e2NvbnN0IHI9ZS50aGlub1R5cGU9PT0iVEFTSy1ET05FIjtyZXR1cm4gbz09PSJJUyI/cjohcn1jYXNlIkxJU1QiOntjb25zdCByPWUudGhpbm9UeXBlPT09IkpPVVJOQUwiO3JldHVybiBvPT09IklTIj9yOiFyfWNhc2UiT1RIRVIiOntjb25zdCByPSFbIlRBU0stVE9ETyIsIlRBU0stRE9ORSIsIkpPVVJOQUwiXS5pbmNsdWRlcyhlLnRoaW5vVHlwZSk7cmV0dXJuIG89PT0iSVMiP3I6IXJ9ZGVmYXVsdDpyZXR1cm4hMH1jYXNlIlNPVVJDRSI6cmV0dXJuIG89PT0iSVMiP2UudGhpbm9UeXBlPT09YTplLnRoaW5vVHlwZSE9PWE7Y2FzZSJQQVRIIjp7aWYoIWUucGF0aClyZXR1cm4gbyE9PSJDT05UQUlOIjtjb25zdCByPXR5cGVvZiBhPT0ic3RyaW5nIj9hLnRvTG93ZXJDYXNlKCk6IiIsYz1lLnBhdGgudG9Mb3dlckNhc2UoKS5pbmNsdWRlcyhyKTtyZXR1cm4gbz09PSJDT05UQUlOIj9jOiFjfWNhc2UiTUVUQURBVEEiOntpZighZS5maWxlSW5mbz8uZnJvbnRtYXR0ZXIpcmV0dXJuIG8hPT0iQ09OVEFJTiI7Y29uc3Qgcj10eXBlb2YgYT09Im9iamVjdCImJmEhPT1udWxsP2E6e25hbWU6IiIsdmFsdWU6IiJ9LGM9Im5hbWUiaW4gcj9yLm5hbWU6IiIsbD0idmFsdWUiaW4gcj9yLnZhbHVlOiIiO2lmKCFjKXJldHVybiEwO2NvbnN0IGc9ZS5maWxlSW5mby5mcm9udG1hdHRlcltjXT09PWw7cmV0dXJuIG89PT0iQ09OVEFJTiI/ZzohZ31jYXNlIlRJTUVfUkFOR0UiOntjb25zdCByPW5ldyBEYXRlO2xldCBjLGw9cjtpZih0eXBlb2YgYSE9InN0cmluZyIpcmV0dXJuITA7c3dpdGNoKGEpe2Nhc2UiN2QiOmM9TyhyLDcpO2JyZWFrO2Nhc2UiMTRkIjpjPU8ociwxNCk7YnJlYWs7Y2FzZSIzMGQiOmM9TyhyLDMwKTticmVhaztjYXNlIjkwZCI6Yz1PKHIsOTApO2JyZWFrO2Nhc2UiMTgwZCI6Yz1PKHIsMTgwKTticmVhaztjYXNlIjM2NWQiOmM9TyhyLDM2NSk7YnJlYWs7Y2FzZSJ0aGlzV2VlayI6Yz1MKHIpLGw9WShyKTticmVhaztjYXNlInRoaXNNb250aCI6Yz0kKHIpLGw9dihyKTticmVhaztjYXNlInRoaXNZZWFyIjpjPUgociksbD1qKHIpO2JyZWFrO2Nhc2UibGFzdFdlZWsiOntjb25zdCBwPU8ociw3KTtjPUwocCksbD1ZKHApO2JyZWFrfWNhc2UibGFzdE1vbnRoIjp7Y29uc3QgcD1xKHIsMSk7Yz0kKHApLGw9dihwKTticmVha31jYXNlImxhc3RZZWFyIjp7Y29uc3QgcD1KKHIsMSk7Yz1IKHApLGw9aihwKTticmVha31kZWZhdWx0OnJldHVybiEwfWNvbnN0IGc9bmV3IERhdGUoZS5jcmVhdGVkQXQpO3JldHVybiBvPT09IldJVEhJTiI/UChnLHtzdGFydDpjLGVuZDpsfSk6bz09PSJCRUZPUkUiP2c8YzohMH1kZWZhdWx0OnJldHVybiEwfX0pfWNvbnN0IGV0PWU9Pntjb25zdCB0PXt9O3JldHVybiBlLmZvckVhY2gobj0+e2NvbnN0IHM9bi5jcmVhdGVkQXQuc3BsaXQoIiAiKVswXTt0W3NdP3Rbc10rKzp0W3NdPTF9KSxPYmplY3Qua2V5cyh0KS5zb3J0KChuLHMpPT50W3NdLXRbbl0pWzBdfHwiIn0sbnQ9ZT0+e2NvbnN0IHQ9e307cmV0dXJuIGUuZm9yRWFjaChuPT57Y29uc3Qgcz1uLmNyZWF0ZWRBdC5zbGljZSgxMSwxMyk7dFtzXT90W3NdKys6dFtzXT0xfSksT2JqZWN0LmtleXModCkuc29ydCgobixzKT0+dFtzXS10W25dKVswXXx8IiJ9LHJ0PShlLHQpPT57Y29uc3Qgcz1NYXRoLmFicyh0LmdldFRpbWUoKS1lLmdldFRpbWUoKSk7cmV0dXJuIE1hdGgucm91bmQocy84NjRlNSkrMX0seD0vXHMjKFteXHUyMDAwLVx1MjA2Rlx1MkUwMC1cdTJFN0YnISIjJCUmKCkqKywuOjs8PT4/QF5ge3x9flxbXF1cXFxzXSspL2csUj0vKDxwPnw8YnI+KSMoW15cdTIwMDAtXHUyMDZGXHUyRTAwLVx1MkU3RichIiMkJSYoKSorLC46Ozw9Pj9AXmB7fH1+XFtcXVxcXHNdKykvZyxLPS9eIyhbXlx1MjAwMC1cdTIwNkZcdTJFMDAtXHUyRTdGJyEiIyQlJigpKissLjo7PD0+P0BeYHt8fX5cW1xdXFxcc10rKS9ndTtmdW5jdGlvbiBzdChlLHQpe2NvbnN0IG49bmV3IFNldCxzPXt9LGk9bmV3IE1hcDtmb3IoY29uc3QgbyBvZiBlKXtpZihvLmRlbGV0ZWRBdCE9PSIiJiZvLmRlbGV0ZWRBdHx8by5yb3dTdGF0dXM9PT0iQVJDSElWRUQiKWNvbnRpbnVlO2NvbnN0IGE9W107aWYoIWkuaGFzKG8ucGF0aCkmJm8uc291cmNlVHlwZSE9PSJGSUxFIil7Y29uc3QgbD10LmZpbHRlclRhZ3NJbkZpbGU/QXJyYXkuaXNBcnJheShvPy5maWxlSW5mbz8udGFncyk/by5maWxlSW5mby50YWdzOltdOltdLGc9dC5maWx0ZXJUYWdzSW5GaWxlP2w6bC5maWx0ZXIocD0+cCkubWFwKHA9PnAudG9TdHJpbmcoKS50cmltKCkpO2kuc2V0KG8ucGF0aCxnKSxhLnB1c2goLi4uZyl9Y29uc3Qgcj1vLmNvbnRlbnQucmVwbGFjZSgvPFtePl0qPi9nLCIiKS5yZXBsYWNlKC9cYFxgXGAoLiopP1xuW1xzXFNdKj9cblxgXGBcYC9nbSwiIikucmVwbGFjZSgvXGAoW15cYF0uKj8pXGAvZywiIiksYz1bLi4uQXJyYXkuZnJvbShyLm1hdGNoKHgpfHxbXSksLi4uQXJyYXkuZnJvbShyLm1hdGNoKEspfHxbXSksLi4uQXJyYXkuZnJvbShyLm1hdGNoKFIpfHxbXSldO2EucHVzaCguLi5jKTtmb3IoY29uc3QgbCBvZiBhKXtpZighbHx8bD09PSJ1bmRlZmluZWQifHwhbCljb250aW51ZTtsZXQgZz1sO3R5cGVvZiBsIT0ic3RyaW5nIiYmKGc9bD8udG9TdHJpbmcoKSk7Y29uc3QgcD1nPy5yZXBsYWNlKHgsIiQxIik/LnJlcGxhY2UoSywiJDEiKT8ucmVwbGFjZShSLCIkMiIpPy50cmltKCk7L15cZCskLy50ZXN0KHApfHwobi5hZGQocCksc1twXT0oc1twXXx8MCkrMSl9fXJldHVybnt0YWdzU2V0Om4sY291bnRzOnN9fXNlbGYuYWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsZT0+e1Byb21pc2UucmVzb2x2ZSgpLnRoZW4oYXN5bmMoKT0+e3RyeXtjb25zdHt0eXBlOnQsZGF0YTpufT1lLmRhdGE7aWYodD09PSJmaWx0ZXItbWVtb3MiKXtjb25zdHttZW1vczpzLHF1ZXJ5OmksZmlsdGVyT3B0aW9uczpvfT1uLGE9eihzLGksbyk7cG9zdE1lc3NhZ2Uoe3R5cGU6ImZpbHRlci1yZXN1bHQiLGRhdGE6YX0pfWVsc2UgaWYodD09PSJidWlsZC10YWctdHJlZSIpe2NvbnN0e21lbW9zOnMsZmlsdGVyT3B0aW9uczppfT1uLHt0YWdzU2V0Om8sY291bnRzOmF9PXN0KHMsaSk7cG9zdE1lc3NhZ2Uoe3R5cGU6ImJ1aWxkLXRhZy10cmVlLXJlc3VsdCIsZGF0YTp7dGFnc1NldDpvLGNvdW50czphfX0pfWVsc2UgaWYodD09PSJjYWxjdWxhdGUtc3RhdHMtYmFubmVyIil7Y29uc3R7bWVtb3M6cyx0YWdzOml9PW4sbz1zLmZpbHRlcihoPT4hKGguZGVsZXRlZEF0IT09IiImJmguZGVsZXRlZEF0KSkubGVuZ3RoLGE9aS5sZW5ndGgscj1zLmxlbmd0aD4wP3Nbcy5sZW5ndGgtMV06bnVsbDtsZXQgYz0wO2lmKHImJnIuY3JlYXRlZEF0KXtjb25zdCBoPXIuY3JlYXRlZEF0LnNwbGl0KCIgIilbMF0uc3BsaXQoIi8iKSxTPW5ldyBEYXRlKHBhcnNlSW50KGhbMF0pLHBhcnNlSW50KGhbMV0pLTEscGFyc2VJbnQoaFsyXSkpO2M9cnQoUyxuZXcgRGF0ZSl9Y29uc3QgZz1zLmZpbHRlcihoPT4haC5kZWxldGVkQXQmJmgucm93U3RhdHVzIT09IkFSQ0hJVkVEIikuZmlsdGVyKGg9PmgudGhpbm9UeXBlPy5zdGFydHNXaXRoKCJUQVNLIikpLmxlbmd0aCxwPWV0KHMpLEU9bnQocyksbT1vPjk5OTl8fGE+OTk5fHxjPjk5OTtwb3N0TWVzc2FnZSh7dHlwZToic3RhdHMtYmFubmVyLXJlc3VsdCIsZGF0YTp7bWVtb3NMZW5ndGg6byx0YWdzTGVuZ3RoOmEsY3JlYXRlZERheXM6Yyx0YXNrQW1vdW50OmcsbW9zdEFjdGl2ZURheTpwLG1vc3RBY3RpdmVIb3VyOkUsZWFybGllc3RNZW1vOnIsbGVuZ3RoT3ZlcmZsb3c6bX19KX1lbHNlIGlmKHQ9PT0iY2FsY3VsYXRlLXN0YXRzIil7Y29uc3R7bWVtb3M6c309bixpPW5ldyBEYXRlLG89bmV3IERhdGUoaSksYT1bLi4uQXJyYXkoMzApXS5tYXAoKHksZik9Pntjb25zdCBkPW5ldyBEYXRlKG8pO2Quc2V0RGF0ZShvLmdldERhdGUoKS0oMjktZikpO2NvbnN0IFQ9ZC50b0lTT1N0cmluZygpLnNwbGl0KCJUIilbMF0ucmVwbGFjZSgvLS9nLCIvIiksdz1zLmZpbHRlcihiPT5iLmNyZWF0ZWRBdC5zcGxpdCgiICIpWzBdPT09VCkubGVuZ3RoO3JldHVybntkYXRlOmAkeyhkLmdldE1vbnRoKCkrMSkudG9TdHJpbmcoKS5wYWRTdGFydCgyLCIwIil9LyR7ZC5nZXREYXRlKCkudG9TdHJpbmcoKS5wYWRTdGFydCgyLCIwIil9YCxjb3VudDp3fX0pLHI9aS5nZXRNb250aCgpLGM9aS5nZXRGdWxsWWVhcigpLGw9bmV3IERhdGUoYyxyKzEsMCkuZ2V0RGF0ZSgpLGc9Wy4uLkFycmF5KGwpXS5tYXAoKHksZik9Pntjb25zdCBkPW5ldyBEYXRlKGMscixmKzEpLFQ9ZC50b0lTT1N0cmluZygpLnNwbGl0KCJUIilbMF0ucmVwbGFjZSgvLS9nLCIvIiksdz1zLmZpbHRlcihiPT5iLmNyZWF0ZWRBdC5zcGxpdCgiICIpWzBdPT09VCkubGVuZ3RoO3JldHVybntkYXRlOmAkeyhkLmdldE1vbnRoKCkrMSkudG9TdHJpbmcoKS5wYWRTdGFydCgyLCIwIil9LyR7ZC5nZXREYXRlKCkudG9TdHJpbmcoKS5wYWRTdGFydCgyLCIwIil9YCxjb3VudDp3fX0pLHA9Wy4uLkFycmF5KDEyKV0ubWFwKCh5LGYpPT57Y29uc3QgZD1uZXcgRGF0ZShjLGYsMSksVD1kLnRvSVNPU3RyaW5nKCkuc2xpY2UoMCw3KS5yZXBsYWNlKC8tL2csIi8iKSx3PXMuZmlsdGVyKGI9PmIuY3JlYXRlZEF0LnNsaWNlKDAsNyk9PT1UKS5sZW5ndGg7cmV0dXJue2RhdGU6YCR7KGQuZ2V0TW9udGgoKSsxKS50b1N0cmluZygpLnBhZFN0YXJ0KDIsIjAiKX1gLGNvdW50Ond9fSksRT1bLi4uQXJyYXkoMjQpXS5tYXAoKHksZik9Pntjb25zdCBkPXMuZmlsdGVyKFQ9PnBhcnNlSW50KFQuY3JlYXRlZEF0LnNwbGl0KCIgIilbMV0uc3BsaXQoIjoiKVswXSk9PT1mKS5sZW5ndGg7cmV0dXJue2hvdXI6YCR7Zi50b1N0cmluZygpLnBhZFN0YXJ0KDIsIjAiKX06MDBgLGNvdW50OmR9fSksbT1be3BlcmlvZDoiMDA6MDAtMDM6MDAiLGNvdW50OjB9LHtwZXJpb2Q6IjAzOjAwLTA2OjAwIixjb3VudDowfSx7cGVyaW9kOiIwNjowMC0wOTowMCIsY291bnQ6MH0se3BlcmlvZDoiMDk6MDAtMTI6MDAiLGNvdW50OjB9LHtwZXJpb2Q6IjEyOjAwLTE1OjAwIixjb3VudDowfSx7cGVyaW9kOiIxNTowMC0xODowMCIsY291bnQ6MH0se3BlcmlvZDoiMTg6MDAtMjE6MDAiLGNvdW50OjB9LHtwZXJpb2Q6IjIxOjAwLTI0OjAwIixjb3VudDowfV07cy5mb3JFYWNoKHk9Pntjb25zdCBmPXBhcnNlSW50KHkuY3JlYXRlZEF0LnNwbGl0KCIgIilbMV0uc3BsaXQoIjoiKVswXSk7ZjwzP21bMF0uY291bnQrKzpmPDY/bVsxXS5jb3VudCsrOmY8OT9tWzJdLmNvdW50Kys6ZjwxMj9tWzNdLmNvdW50Kys6ZjwxNT9tWzRdLmNvdW50Kys6ZjwxOD9tWzVdLmNvdW50Kys6ZjwyMT9tWzZdLmNvdW50Kys6bVs3XS5jb3VudCsrfSk7Y29uc3QgUz1be21pbjowLG1heDoyNSxsYWJlbDoiMC0yNSJ9LHttaW46MjYsbWF4OjUwLGxhYmVsOiIyNi01MCJ9LHttaW46NTEsbWF4Ojc1LGxhYmVsOiI1MS03NSJ9LHttaW46NzYsbWF4OjEwMCxsYWJlbDoiNzYtMTAwIn0se21pbjoxMDEsbWF4OjIwMCxsYWJlbDoiMTAxLTIwMCJ9LHttaW46MjAxLG1heDo1MDAsbGFiZWw6IjIwMS01MDAifSx7bWluOjUwMSxtYXg6MS8wLGxhYmVsOiI1MDArIn1dLm1hcCh5PT4oe3JhbmdlOnkubGFiZWwsY291bnQ6cy5maWx0ZXIoZj0+e2NvbnN0IGQ9Zi5jb250ZW50Lmxlbmd0aDtyZXR1cm4gZD49eS5taW4mJmQ8PXkubWF4fSkubGVuZ3RofSkpO3Bvc3RNZXNzYWdlKHt0eXBlOiJzdGF0cy1yZXN1bHQiLGRhdGE6e2RhaWx5RGF0YTphLG1vbnRobHlEYXRhOmcseWVhcmx5RGF0YTpwLGhvdXJseURhdGE6RSx0aW1lRGlzdERhdGE6bSxsZW5ndGhEYXRhOlN9fSl9fWNhdGNoKHQpe2NvbnNvbGUuZXJyb3IoIldvcmtlciBmYWlsZWQgdG8gcHJvY2VzczoiLHQpLHBvc3RNZXNzYWdlKHt0eXBlOiJlcnJvciIsZXJyb3I6dC5tZXNzYWdlfHwiVW5rbm93biBlcnJvciBpbiB3b3JrZXIifSl9fSl9KX0pKCk7Cg==",d3=typeof window<"u"&&window.Blob&&new Blob([atob(wH)],{type:"text/javascript;charset=utf-8"});function Gte(e){let t;try{if(t=d3&&(window.URL||window.webkitURL).createObjectURL(d3),!t)throw"";const n=new Worker(t,{name:e?.name});return n.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker("data:application/javascript;base64,"+wH,{name:e?.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}function Ap(){let e,t;const r=new Promise((o,i)=>{e=o,t=i});return r.resolve=e,r.reject=t,r}const f3={workers:8,utilization:.75,workerName:"Thino Parser Worker"},$y={BUILD_TAG_TREE:0,CALCULATE_STATS:0,CALCULATE_STATS_BANNER:0,FILTER_MEMOS:2},Zte=e=>{const t={...e};if(e.filter){const n=Ct.getQueryById(e.filter);n&&n.querystring&&(t.filterContent=JSON.parse(n.querystring))}return t};class SH extends N.Component{workers;nextWorkerId;shutdown;taskQueue;outstanding;throttle;cacheVersion=0;memoVersions=new Map;app;plugin;constructor(t,n,r,o){super(),this.workers=new Map,this.shutdown=!1,this.nextWorkerId=0,this.throttle=r??(()=>({...f3,workerName:o??f3.workerName})),this.taskQueue=[],this.outstanding=new Map,this.app=t,this.plugin=n}import(t){const n=t.map(i=>i.id).join(","),r=this.outstanding.get(n);if(r)return r;const o=Ap();return this.outstanding.set(n,o),this.addToQueue({type:"FILTER_MEMOS",memos:t,promise:o,priority:2,timestamp:Date.now()}),this.schedule(),o}addToQueue(t){this.taskQueue.push(t),this.taskQueue.sort((n,r)=>n.priority!==r.priority?n.priority-r.priority:n.timestamp-r.timestamp)}getNextTask(){if(this.taskQueue.length!==0)return this.taskQueue.shift()}unthrottle(){for(const t of this.workers.values())t.availableAt=Date.now()}async schedule(){if(this.taskQueue.length===0||this.shutdown)return;const t=this.availableWorker();if(!t)return;const n=this.getNextTask();if(n){t.active=[n.memos,n.promise,Date.now()];try{switch(n.type){case"CALCULATE_STATS":t.worker.postMessage({type:"calculate-stats",data:{memos:n.memos}});break;case"CALCULATE_STATS_BANNER":t.worker.postMessage({type:"calculate-stats-banner",data:{memos:n.memos,tags:n.tags||[]}});break;case"FILTER_MEMOS":t.worker.postMessage({type:"filter-memos",data:{memos:n.memos,query:Zte(n.query),filterOptions:n.filterOptions}});break;case"BUILD_TAG_TREE":t.worker.postMessage({type:"build-tag-tree",data:{memos:n.memos,filterOptions:n.filterOptions}});break}}catch{t.active=void 0,setTimeout(this.schedule.bind(this),0)}}}finish(t,n){if(!t.active)return;const[r,o,i]=t.active;"error"in n?o.reject(n.error):o.resolve(n);const a=r.map(s=>s.id).join(",");if(this.outstanding.delete(a),this.workers.size>this.throttle().workers)this.workers.delete(t.id),h3(t);else{const s=Date.now(),l=Math.max(.1,this.throttle().utilization)-1,u=(s-i)*l;t.active=void 0,u<=1e-10?(t.availableAt=s,this.schedule()):(t.availableAt=s+u,setTimeout(this.schedule.bind(this),u))}}availableWorker(){const t=Date.now();for(const n of this.workers.values())if(!n.active&&n.availableAt<=t)return n;if(this.workers.sizeawait this.handleWorkerMessage(t,n.data),t}onunload(){for(const t of this.workers.values())h3(t);for(;this.taskQueue.length>0;){const t=this.taskQueue.shift();t&&t.promise.reject("Terminated")}this.shutdown=!0}invalidateCache(t){if(!t||t.length===0){this.cacheVersion++;return}for(const r of t){const o=this.memoVersions.get(r)||0;this.memoVersions.set(r,o+1)}const n=[];this.outstanding.forEach((r,o)=>{const i=o.split("_");t.some(s=>i.includes(s))&&n.push(o)}),n.forEach(r=>this.outstanding.delete(r))}getVersionString(t){let n=`_v${this.cacheVersion}`;if(t&&t.length>0){const r=t.map(o=>`${o.id}:${this.memoVersions.get(o.id)||0}`).join(";");n+=`_m${r}`}return n}async calculateStats(t,n=!1){try{if(!t||t.length===0)return{};const r=n?`_force${Date.now()}`:this.getVersionString(t),o=t.map(s=>s.id).join(",")+"_stats"+r,i=this.outstanding.get(o);if(i&&!n)return i;const a=Ap();return this.outstanding.set(o,a),this.addToQueue({type:"CALCULATE_STATS",memos:t,promise:a,priority:$y.CALCULATE_STATS,timestamp:Date.now()}),this.schedule(),a}catch(r){return console.error("Obsidian-Thino: Failed to calculate stats. "+r),Promise.reject(r)}}async calculateStatsBanner(t,n,r=!1){try{if(!t||t.length===0)return{memosLength:0,tagsLength:n?.length||0,createdDays:0,taskAmount:0,mostActiveDay:"",mostActiveHour:"",earliestMemo:null,lengthOverflow:!1};const o=r?`_force${Date.now()}`:this.getVersionString(t),i=t.map(l=>l.id).join(",")+"_banner"+o,a=this.outstanding.get(i);if(a&&!r)return a;const s=Ap();return this.outstanding.set(i,s),this.addToQueue({type:"CALCULATE_STATS_BANNER",memos:t,tags:n,promise:s,priority:$y.CALCULATE_STATS_BANNER,timestamp:Date.now()}),this.schedule(),s}catch(o){return console.error("Obsidian-Thino: Failed to calculate banner stats. "+o),Promise.reject(o)}}async filterMemos(t,n,r={},o=!1){try{if(!t||t.length===0)return[];const i=JSON.stringify(n),a=JSON.stringify({...r,filterTagsInFile:this.plugin.settings.FilterByMetadata}),s=o?`_force${Date.now()}`:this.getVersionString(t),l=t.map(h=>h.id).join(",")+"_filter_"+i+"_"+a+s,u=this.outstanding.get(l);if(u&&!o)return u;const d=Ap();return this.outstanding.set(l,d),this.addToQueue({type:"FILTER_MEMOS",memos:t,promise:d,query:n,filterOptions:r,priority:$y.FILTER_MEMOS,timestamp:Date.now()}),this.schedule(),d}catch(i){return console.error("Obsidian-Thino: Failed to filter memos. "+i),Promise.reject(i)}}async buildTagTree(t,n=!1){try{if(!t||t.length===0)return{};const r={filterTagsInFile:this.plugin.settings.FilterByMetadata},o=n?`_force${Date.now()}`:this.getVersionString(t),i=t.map(l=>l.id).join(",")+"_tags_"+JSON.stringify(r)+o,a=this.outstanding.get(i);if(a&&!n)return a;const s=Ap();return this.outstanding.set(i,s),this.addToQueue({type:"BUILD_TAG_TREE",memos:t,promise:s,filterOptions:r,priority:$y.BUILD_TAG_TREE,timestamp:Date.now()}),this.schedule(),s}catch(r){return console.error("Obsidian-Thino: Failed to build tag tree. "+r),Promise.reject(r)}}async handleWorkerMessage(t,n){if(n.type==="stats-result"){t.active&&this.finish(t,n.data);return}if(n.type==="stats-banner-result"){t.active&&this.finish(t,n.data);return}if(n.type==="filter-result"){t.active&&this.finish(t,n.data);return}if(n.type==="build-tag-tree-result"){t.active&&this.finish(t,n.data);return}if(n.type==="error"){t.active&&this.finish(t,{error:n.error});return}}memoUpdated(t){const n=this.memoVersions.get(t)||0;this.memoVersions.set(t,n+1);const r=[];this.outstanding.forEach((o,i)=>{i.includes(t)&&r.push(i)}),r.forEach(o=>this.outstanding.delete(o))}memosUpdated(t){if(!t||t.length===0)return;for(const r of t){const o=this.memoVersions.get(r)||0;this.memoVersions.set(r,o+1)}const n=[];this.outstanding.forEach((r,o)=>{const i=o.split(",")[0].split("_");t.some(s=>i.includes(s))&&n.push(o)}),n.forEach(r=>this.outstanding.delete(r))}}function h3(e){e.worker.terminate(),e.active&&e.active[1].reject("Terminated"),e.active=void 0}function $te(e){return e.thinoWorkerManager||(e.thinoWorkerManager=new SH(e.app,e),e.addChild(e.thinoWorkerManager)),e.thinoWorkerManager}const hc=async({memos:e,query:t={},filterOptions:n={},plugin:r})=>{const o={onlyFilterType:"all",filterArchived:!0,filterDeleted:!0,filterDoneTasks:!!n.filterDoneTasks,filterComments:!0,...n},i={...t};try{return await $te(r).filterMemos(e,i,o)}catch(a){return console.error("Failed to filter memos using worker, falling back to synchronous filtering",a),qte(e,i,o)}};function qte(e,t,n){const{filterArchived:r=!0,filterDeleted:o=!0,filterDoneTasks:i=!1,filterComments:a=!0}=n,s=e.filter(x=>!(r&&x.rowStatus==="ARCHIVED"||o&&x.deletedAt||a&&x.content.includes("comment:")||i&&x.thinoType==="TASK-DONE"));if(Kte(t))return s;const{tag:l,duration:u,type:d,text:h,filter:p,path:m,metadata:b}=t,v=h?.toLowerCase()||"",y=!b||Object.keys(b).length===0,S=v?N.prepareSimpleSearch(v):null;return s.filter(x=>{if(p){const C=Ct.getQueryById(p);if(C){const k=JSON.parse(C.querystring);if(Array.isArray(k)&&!Jte(x,k))return!1}}if(!y&&Object.keys(b).some(k=>x.fileInfo?.frontmatter[k]!==b[k])||m&&x.path&&!x.path.toLowerCase().includes(m.toLowerCase()))return!1;if(S){const C=S(x.content.toLowerCase()),k=x.path?x.path.toLowerCase().includes(v):!1;if(x.thinoType==="MULTI"&&x.path){if(!C&&!k)return!1}else if(!C)return!1}if(l){const C=TH(x.content),k=x?.fileInfo?.tags?Xte(x.fileInfo.tags):new Set;if(!C.has(l)&&!k.has(l))return!1}if(u&&u.from!==0&&u.to!==0){const C=Le.getTimeStampByDate(x.createdAt);if(Cu.to)return!1}if(d)switch(d){case"NOT_TAGGED":if(x.content.match(Kg)||x.content.match(cS)||x.content.match(UM))return!1;break;case"LINKED":if(!x.content.match(zM))return!1;break;case"IMAGED":if(!x.content.match(VM))return!1;break;case"CONNECTED":if(!x.content.match(fh))return!1;break}return!0})}function Kte(e){if(!e)return!0;const{tag:t,duration:n,type:r,text:o,filter:i,path:a,metadata:s}=e,l=!s||Object.keys(s).length===0;return!(t||n&&n.from((e.match(r)||[]).forEach(o=>{const a=(o?.replace(r,"$1").trim()).split("/");let s="";a.forEach(l=>{s+=l,n.add(s),s+="/"})}),n),new Set)}function Xte(e){if(!Array.isArray(e)||e.length===0)return new Set;const t=e.filter(r=>!!r).map(r=>r.toString().trim());if(t.length===0)return new Set;const n=new Set;return t.forEach(r=>{const o=r.split("/");let i="";o.forEach((a,s)=>{i+=(s>0?"/":"")+a,n.add(i)})}),n}function Jte(e,t){return!Array.isArray(t)||t.length===0?!0:t.every(n=>{if(!n||typeof n!="object"||!n.type||!n.value||typeof n.value!="object")return!0;const{type:r,value:o}=n,i=o.operator,a=o.value;switch(r){case"TAG":{const s=typeof a=="string"?a:"",l=e.content.includes(`#${s}`);return i==="CONTAIN"?l:!l}case"TEXT":{const s=typeof a=="string"?a.toLowerCase():"",l=e.content.toLowerCase().includes(s);return i==="CONTAIN"?l:!l}case"TYPE":return i==="IS"?e.thinoType===a:e.thinoType!==a;case"DATE":{const s=typeof a=="string"?new Date(a):typeof a=="object"&&a!==null&&"value"in a?new Date(a.value):null;if(!s)return!0;const l=new Date(e.createdAt);return i==="CONTAIN"?l>=s:l{for(const t of rE)if(t.value===e)return t.text;return""},p3=()=>({type:"TAG",value:{operator:"CONTAIN",value:""},relation:"AND"}),tne=(e,t)=>{let n=!0;for(const r of t){const{relation:o}=r,i=nne(e,r);o==="OR"?n=n||i:n=n&&i}return n},nne=(e,t)=>{if(!t||typeof t!="object"||!t.type||!t.value||typeof t.value!="object")return!0;const{type:n,value:r}=t,o=r.operator,i=r.value;if(i===""&&n!=="TYPE"&&n!=="LIST")return!0;switch(n){case"TAG":{const a=TH(e.content),s=typeof i=="string"?i:"",l=a.has(s);return o==="CONTAIN"?l:!l}case"TEXT":{const a=typeof i=="string"?i.toLowerCase():"",l=N.prepareSimpleSearch(a)(e.content.toLowerCase());return o==="CONTAIN"?l:!l}case"TYPE":{let a=!1;return(i==="NOT_TAGGED"&&e.content.match(Kg)===null&&e.content.match(cS)===null||i==="LINKED"&&e.content.match(zM)!==null||i==="IMAGED"&&e.content.match(VM)!==null||i==="CONNECTED"&&e.content.match(fh)!==null)&&(a=!0),o==="IS"?a:!a}case"LIST":{const s=(e.thinoType==="JOURNAL"?"LIST":e.thinoType==="TASK-TODO"?"TODO":e.thinoType==="TASK-DONE"?"DONE":"OTHER")===i;return o==="IS"?s:!s}case"SOURCE":return o==="IS"?e.sourceType===i:e.sourceType!==i;case"PATH":{if(!e.path)return o!=="CONTAIN";const a=typeof i=="string"?i.toLowerCase():"",s=e.path.toLowerCase().includes(a);return o==="CONTAIN"?s:!s}case"METADATA":{if(!e.fileInfo?.frontmatter)return o!=="CONTAIN";const a=typeof i=="object"&&i!==null?i:{name:"",value:""},s="name"in a?a.name:"",l="value"in a?a.value:"";if(!s)return!0;const u=e.fileInfo.frontmatter,d=u[s]&&u[s]?.toString().includes(l);return o==="CONTAIN"?d:!d}case"TIME_RANGE":{const a=new Date;let s,l=a;if(typeof i!="string")return!0;switch(i){case"7d":s=Fo(a,7);break;case"14d":s=Fo(a,14);break;case"30d":s=Fo(a,30);break;case"90d":s=Fo(a,90);break;case"180d":s=Fo(a,180);break;case"365d":s=Fo(a,365);break;case"thisWeek":s=Hi(a),l=S0(a);break;case"thisMonth":s=y0(a),l=v0(a);break;case"thisYear":s=w0(a),l=b0(a);break;case"lastWeek":{const d=Fo(a,7);s=Hi(d),l=S0(d);break}case"lastMonth":{const d=mH(a,1);s=y0(d),l=v0(d);break}case"lastYear":{const d=gH(a,1);s=w0(d),l=b0(d);break}default:return!0}const u=new Date(e.createdAt);return o==="WITHIN"?pH(u,{start:s,end:l}):o==="BEFORE"?u!!e),r=D.useCallback(o=>{n(typeof o=="boolean"?o:i=>!i)},[]);return[t,r]}const nv=()=>{const{dailyNotesState:{app:e,view:t},locationState:{query:{type:n}}}=D.useContext(ct),r=Y.useRef(null),o=Y.useRef(null),[i,a]=wh(!1);D.useEffect(()=>{!r||!t||!e||(t.registerEvent(e.workspace.on("blur-on-memos",()=>{r.current?.blur()})),t.registerEvent(e.workspace.on("focus-on-searchBar",()=>{r.current?.focus()})))},[r,e,t]),D.useEffect(()=>{o&&N.setIcon(o.current,"search")},[o]);const s=h=>{const{type:p}=Ue.getState().query;h===p&&(h=""),Ue.setMemoTypeQuery(h)},l=h=>{const p=h.currentTarget.value;if(!p.contains(" -time: ")){Ue.setTextQuery(p);return}const m=p.split(" -time: ")[1],b=m.length>10?m.match(/\d{4}-\d{2}-\d{2}/g):null;if(b==null){Ue.setTextQuery(p.split(" -time: ")[0]);return}if(b.length===1){const v=N.moment(b[0]);Ue.setTimeQuery({from:v.startOf("day").valueOf(),to:v.endOf("day").valueOf()})}else if(b.length===2){const v=N.moment(b[0]),y=N.moment(b[1]);Ue.setTimeQuery({from:v.startOf("day").valueOf(),to:y.endOf("day").valueOf()})}Ue.setTextQuery(p.split(" -time: ")[0])},u=()=>{a(!0)},d=()=>{a(!1)};return w.jsxs("div",{className:"search-bar-container",children:[w.jsxs("div",{className:"search-bar-inputer",children:[w.jsx("span",{ref:o,className:"btn icon-img"}),w.jsx("input",{ref:r,className:"text-input",type:"text",onMouseOver:u,onMouseOut:d,placeholder:i?E("Type here"):"",onChange:l})]}),w.jsx("div",{className:"quickly-action-wrapper",children:w.jsxs("div",{className:"quickly-action-container",children:[w.jsx("span",{className:"title-text",children:E("Quick filter")}),w.jsxs("div",{className:"section-container types-container",children:[w.jsxs("span",{className:"section-text",children:[E("TYPE"),":"]}),w.jsx("div",{className:"values-container",children:rE.map((h,p)=>w.jsxs("div",{children:[w.jsx("span",{className:`type-item ${n===h.value?"selected":""}`,onClick:()=>{s(h.value)},children:h.text}),p+1{const{children:t,when:n}=e;return n?w.jsx(w.Fragment,{children:t}):null},il=rne;function Nt(){const e=document.createDocumentFragment();e.createEl("div",{cls:"thino-info"}).createEl("div",{text:E("This is a pro feature, please upgrade to pro version to use it.")});const r=e.createEl("div",{cls:"thino-link"}).createEl("div",{text:E("You can get pro version from: ")}),o=localStorage.getItem("language");let i="https://pkmer.cn/products/UserProfile/";o&&o==="zh"?i="https://pkmer.cn/products/thino/":i="https://thino.pkmer.net/en/",r.createEl("a",{text:"PKMer",attr:{href:i}}),new N.Notice(e,5e3)}const{exec:one,execSync:yet}=N.Platform.isDesktop&&require("child_process"),{createHash:ine}=N.Platform.isDesktop&&require("crypto"),ane={native:"%windir%\\System32",mixed:"%windir%\\sysnative\\cmd.exe /c %windir%\\System32"},sne=N.Platform.isDesktop&&{darwin:"ioreg -rd1 -c IOPlatformExpertDevice",win32:`${ane[lne()]}\\REG.exe QUERY HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography /v MachineGuid`,linux:"( cat /var/lib/dbus/machine-id /etc/machine-id 2> /dev/null || hostname ) | head -n 1 || :",freebsd:"kenv -q smbios.system.uuid || sysctl -n kern.hostuuid"};function lne(){return process.platform!=="win32"?"":process.arch==="ia32"&&Object.hasOwnProperty.call(process.env,"PROCESSOR_ARCHITEW6432")?"mixed":"native"}function cne(e){return ine("sha256").update(e).digest("hex")}function une(e){switch(process.platform){case"darwin":return e.split("IOPlatformUUID")[1].split(`
+`)[0].replace(/\=|\s+|\"/gi,"").toLowerCase();case"win32":return e.toString().split("REG_SZ")[1].replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"linux":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();case"freebsd":return e.toString().replace(/\r+|\n+|\s+/gi,"").toLowerCase();default:throw new Error(`Unsupported platform: ${process.platform}`)}}function Sn(e=!1){return new Promise((t,n)=>{one(sne[process.platform],{},(r,o)=>{if(r)return n(new Error(`Error while obtaining machine id: ${r.stack}`));const i=une(o.toString());return t(e?i:cne(i))})})}const m3={list:"align-left",waterfall:"layout-grid",calendar:"calendar",minimal:"list",table:"table",chat:"message-square",moments:"chrome"},dne=e=>{const{dailyNotesState:{app:t,view:n,verifyState:r,settings:o},globalState:{manifest:i,isMobileView:a}}=D.useContext(ct),s=D.useRef(null),l=D.useRef(null),[u,d]=D.useState((window.app||t).loadLocalStorage("thinoListView")),[h,p]=D.useState(null);D.useEffect(()=>{if(!i||!t)return;const b=t?.plugins.getPlugin(i.id);p(b),d(b?.settings.MemoListView),Ze.setMemoListView(b?.settings.MemoListView)},[i,t]),D.useEffect(()=>{if(!t||!n||!h||!h.settings)return;const b=()=>{if(n.leaf.height===0)return;const v=h?.settings?.MemoListView;h?.settings?.SupportSelectOtherView||v==="chat"||v==="moments"||(n.leaf.width>950?(d(v),Ze.setMemoListView(v)):n.leaf.width<=950&&(Ze.setMemoListView("list"),d("list")))};b(),l.current||(l.current=t.workspace.on("resize",b),n.registerEvent(l.current))},[t,n,h]),D.useEffect(()=>{s&&(N.setIcon(s.current,m3[u||"list"]),Ze.setMemoListView(u),N.requireApiVersion("1.4.4")&&N.setTooltip(s.current,E("Switch view")))},[u]);const m=async b=>{const v=!N.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),y=N.Platform.isDesktop?await Sn():v.identifier||v.uuid;if(!r||r?.appId!==y){Nt();return}const S=async k=>{Ze.setMemoListView(k),h&&(h.settings.MemoListView=k,await h.saveSettings()),d(k)},x=[{view:"list",title:E("List")},{view:"chat",title:E("Chat")},{view:"moments",title:E("Moments")}];(!a||o?.SupportSelectOtherView)&&x.push({view:"waterfall",title:E("Waterfall")},{view:"calendar",title:E("Calendar")},{view:"table",title:E("Table")});const C=new N.Menu;x.forEach(({view:k,title:M})=>{C.addItem(I=>{I.setChecked(u===k).setIcon(m3[k]).setTitle(M).onClick(()=>{u!==k&&S(k)})})}),C.showAtMouseEvent(b.nativeEvent)};return w.jsx("div",{className:`memos-view-switcher-wrapper ${e.className?e.className:""} pro`,ref:s,onClick:m})},fne=()=>{const e=D.useRef(null);return D.useEffect(()=>{e&&(N.setIcon(e.current,"calendar-check"),N.setTooltip&&N.setTooltip(e.current,E("Daily Memos")))},[e]),w.jsx("div",{className:"memos-review-entry-wrapper",ref:e,onClick:()=>{Ue.setPathname("/daily")}})},Fx=()=>({type:"initialText",value:"",timestamp:Date.now(),selectionStart:0,selectionEnd:0}),g3={initialValue:"",interval:300};class hne{constructor(t,n=g3){this.listeners=[],this.runUndo=()=>{const r=this.actions[this.currentIndex].selectionStart;this.currentIndex>0&&this.currentIndex--,this.element.value=this.actions[this.currentIndex].value,this.element.setSelectionRange(r,r),this.dispatchChange()},this.runRedo=()=>{this.currentIndexthis.actions,this.setState=(r,o)=>{this.actions=[...r],this.currentIndex=o{this.actions=[Fx()],this.currentIndex=0,this.dispatchChange()},this.destroy=()=>{this.rmEventListeners()},this.subscribe=r=>{this.listeners.push(r)},this.handleElementKeydown=r=>{const o=r;o.key==="z"&&!o.shiftKey&&(o.metaKey||o.ctrlKey)?(r.preventDefault(),this.runUndo()):(o.key==="z"&&o.shiftKey&&(o.metaKey||o.ctrlKey)||o.key==="y"&&(o.metaKey||o.ctrlKey))&&(r.preventDefault(),this.runRedo())},this.handleElementInput=r=>{const o=r,i=this.actions[this.currentIndex];this.pushNewAction({type:o.inputType,value:this.element.value,timestamp:Date.now(),selectionStart:this.element.selectionEnd-(this.element.value.length-i.value.length),selectionEnd:this.element.selectionEnd})},this.addEventListeners=()=>{this.element.addEventListener("keydown",this.handleElementKeydown),this.element.addEventListener("input",this.handleElementInput)},this.rmEventListeners=()=>{this.element.removeEventListener("keydown",this.handleElementKeydown),this.element.removeEventListener("input",this.handleElementInput)},this.pushNewAction=r=>{const o=this.actions[this.currentIndex];o&&o.type===r.type&&r.timestamp-o.timestamp=this.config.maxSize?(this.actions.shift(),this.actions[0]=Fx()):this.currentIndex++,this.actions[this.currentIndex]=r,this.actions=this.actions.slice(0,this.currentIndex+1)),this.dispatchChange()},this.dispatchChange=()=>{for(const r of this.listeners)r([...this.actions],this.currentIndex)},this.element=t,this.config=Object.assign(Object.assign({},g3),n),this.config.initialActions&&this.config.initialActions.length>0?(this.actions=this.config.initialActions,this.config.initialIndex!==void 0&&this.config.initialIndex{e(n=>!n)},[])}var xH={exports:{}};(function(e){(function(){var t=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n=typeof window<"u",r=n&&window.mozInnerScreenX!=null;function o(i,a,s){if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var l=s&&s.debug||!1;if(l){var u=document.querySelector("#input-textarea-caret-position-mirror-div");u&&u.parentNode.removeChild(u)}var d=document.createElement("div");d.id="input-textarea-caret-position-mirror-div",document.body.appendChild(d);var h=d.style,p=window.getComputedStyle?getComputedStyle(i):i.currentStyle;h.whiteSpace="pre-wrap",i.nodeName!=="INPUT"&&(h.wordWrap="break-word"),h.position="absolute",l||(h.visibility="hidden"),t.forEach(function(v){h[v]=p[v]}),r?i.scrollHeight>parseInt(p.height)&&(h.overflowY="scroll"):h.overflow="hidden",d.textContent=i.value.substring(0,a),i.nodeName==="INPUT"&&(d.textContent=d.textContent.replace(/\s/g," "));var m=document.createElement("span");m.textContent=i.value.substring(a)||".",d.appendChild(m);var b={top:m.offsetTop+parseInt(p.borderTopWidth),left:m.offsetLeft+parseInt(p.borderLeftWidth)};return l?m.style.backgroundColor="#aaa":document.body.removeChild(d),b}e.exports=o})()})(xH);var mne=xH.exports;const gne=tt(mne);var IH=xr.CustomEvent;function vne(){try{var e=new IH("cat",{detail:{foo:"bar"}});return e.type==="cat"&&e.detail.foo==="bar"}catch{}return!1}var yne=vne()?IH:typeof document<"u"&&typeof document.createEvent=="function"?function(t,n){var r=document.createEvent("CustomEvent");return n?r.initCustomEvent(t,n.bubbles,n.cancelable,n.detail):r.initCustomEvent(t,!1,!1,void 0),r}:function(t,n){var r=document.createEventObject();return r.type=t,n?(r.bubbles=!!n.bubbles,r.cancelable=!!n.cancelable,r.detail=n.detail):(r.bubbles=!1,r.cancelable=!1,r.detail=void 0),r};const bne=tt(yne);function wne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sne(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:!1,u=r.props.onItemHighlighted;r.state.selectedItem!==s&&r.setState({selectedItem:s},function(){u(s),l&&r.props.dropdownScroll(r.itemsRef[r.getId(s)])})},r.scroll=function(s){s.preventDefault();var l=r.props.values,u=s.keyCode||s.which,d=r.getPositionInList(),h;switch(u){case oi.DOWN:h=d+1;break;case oi.UP:h=d-1;break;default:h=d;break}h=(h%l.length+l.length)%l.length,r.selectItem(l[h],[oi.DOWN,oi.UP].includes(u))},r.isSelected=function(s){var l=r.state.selectedItem;return l?r.getId(l)===r.getId(s):!1},r}return bS(t,[{key:"componentDidMount",value:function(){this.listeners.push(wu.add([oi.DOWN,oi.UP],this.scroll),wu.add([oi.ENTER,oi.TAB],this.onPressEnter));var r=this.props.values;r&&r[0]&&this.selectItem(r[0])}},{key:"componentDidUpdate",value:function(r){var o=this,i=r.values,a=this.props.values,s=i.map(function(u){return o.getId(u)}).join(""),l=a.map(function(u){return o.getId(u)}).join("");s!==l&&a&&a[0]&&this.selectItem(a[0])}},{key:"componentWillUnmount",value:function(){for(var r;this.listeners.length;)r=this.listeners.pop(),wu.remove(r)}},{key:"render",value:function(){var r=this,o=this.props,i=o.values,a=o.component,s=o.style,l=o.itemClassName,u=o.className,d=o.itemStyle;return Y.createElement("ul",{className:"rta__list ".concat(u||""),style:s},i.map(function(h){return Y.createElement(Mne,{key:r.getId(h),innerRef:function(m){r.itemsRef[r.getId(h)]=m},selected:r.isSelected(h),item:h,className:l,style:d,onClickHandler:r.onPressEnter,onSelectHandler:r.selectItem,component:a})}))}}]),t}(Y.Component);function Ane(e,t){var n=parseInt(getComputedStyle(t).getPropertyValue("height"),10),r=parseInt(getComputedStyle(e).getPropertyValue("height"),10)-n,o=t.offsetTop,i=e.scrollTop;og.right&&w.left+i>y.width?(h=i-y.width,l.push(zc.X.LEFT),c.push(zc.X.RIGHT)):(h=i,l.push(zc.X.RIGHT),c.push(zc.X.LEFT)),B>g.bottom&&w.top+o>y.height?(f=o-y.height,l.push(zc.Y.TOP),c.push(zc.Y.BOTTOM)):(f=o,l.push(zc.Y.BOTTOM),c.push(zc.Y.TOP)),this.props.renderToBody&&(f+=w.top,h+=w.left),this.ref.style.top="".concat(f,"px"),this.ref.style.left="".concat(h,"px"),(r=this.ref.classList).remove.apply(r,c),(a=this.ref.classList).add.apply(a,l)}},{key:"render",value:function(){var r=this,a=this.props,o=a.style,i=a.className,l=a.innerRef,c=a.children,f=a.renderToBody,h=document.body,g=ne.createElement("div",{ref:function(w){r.ref=w,l(w)},className:"rta__autocomplete ".concat(i||""),style:o},c);return f&&h!==null?J2.createPortal(g,h):g}}]),t}(ne.Component),A6=function(e){Eb(t,e);function t(n){var r;Bv(this,t),r=Ib(this,Sp(t).call(this,n)),r.state={top:null,left:null,currentTrigger:null,actualToken:"",data:null,value:"",dataLoading:!1,selectionEnd:0,component:null,textToReplace:null},r.escListenerInit=function(){r.escListener||(r.escListener=df.add(xi.ESC,r._closeAutocomplete))},r.escListenerDestroy=function(){r.escListener&&(df.remove(r.escListener),r.escListener=null)},r.getSelectionPosition=function(){return r.textareaRef?{selectionStart:r.textareaRef.selectionStart,selectionEnd:r.textareaRef.selectionEnd}:null},r.getSelectedText=function(){if(!r.textareaRef)return null;var c=r.textareaRef,f=c.selectionStart,h=c.selectionEnd;return f===h?null:r.state.value.substr(f,h-f)},r.setCaretPosition=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;r.textareaRef&&(r.textareaRef.focus(),r.textareaRef.setSelectionRange(c,c))},r.getCaretPosition=function(){if(!r.textareaRef)return 0;var c=r.textareaRef.selectionEnd;return c},r._handleCaretChange=function(c){var f=function(){var y=r.getCaretPosition()-1;r.lastTrigger=r.lastTrigger?y:0};if(c.type==="keydown"){var h=c.keyCode||c.which;switch(h){case xi.UP:case xi.DOWN:r._isAutocompleteOpen()||f();break;case xi.LEFT:case xi.RIGHT:f();break}return}f()},r._onSelect=function(c){var f=r.state,h=f.selectionEnd,g=f.currentTrigger,y=f.value,w=r.props.onItemSelected;if(g){var S=r._getTextToReplace(g);if(!S){r._closeAutocomplete();return}var D=S(c);if(!D){r._closeAutocomplete();return}w&&w({currentTrigger:g,item:c});var I=function(Z,Q,G){switch(Z){case"start":return G;case"next":case"end":return G+Q.length;default:if(!Number.isInteger(Z))throw new Error('RTA: caretPosition should be "start", "next", "end" or number.');return Z}},M=y.slice(0,h),N=x0(g),B=M.length-M.lastIndexOf(g),k=M.search(new RegExp("(?!".concat(N,")$")))-B,R=D.caretPosition==="next"?"".concat(D.text," "):D.text,L=I(D.caretPosition,R,k),_=M.substring(0,k)+R,V=y.replace(M,_);r.setState({value:V,dataLoading:!1},function(){var U=r.tokenRegExpEnding.exec(R),Z=U?U[0].length:1;r.lastTrigger=L&&L-Z,r.textareaRef.value=V,r.textareaRef.selectionEnd=L,r._changeHandler();var Q=r.textareaRef.scrollTop;r.setCaretPosition(L),window.chrome&&(r.textareaRef.scrollTop=Q)})}},r._getTextToReplace=function(c){var f=r.props.trigger[c];if(!c||!f)return null;var h=f.output;return function(g){if(typeof g=="object"&&(!h||typeof h!="function"))throw new Error('Output functor is not defined! If you are using items as object you have to define "output" function. https://github.com/webscopeio/react-textarea-autocomplete#trigger-type');if(h){var y=h(g,c);if(y===void 0||typeof y=="number")throw new Error(`Output functor should return string or object in shape {text: string, caretPosition: string | number}.
-Got "`.concat(String(y),'". Check the implementation for trigger "').concat(c,`"
+Check the documentation or create issue if you think it's bug. https://github.com/webscopeio/react-textarea-autocomplete/issues`))},Nne=[".","^","$","*","+","-","?","(",")","[","]","{","}","\\","|"],qy=function(t){return Ene(t).map(function(n){return Nne.includes(n)?"\\".concat(n):n}).join("")},One=function(e){SS(t,e);function t(){return rv(this,t),wS(this,If(t).apply(this,arguments))}return bS(t,[{key:"componentDidMount",value:function(){var r=this.props.boundariesElement;if(typeof r=="string"){var o=document.querySelector(r);if(!o)throw new Error("RTA: Invalid prop boundariesElement: it has to be string or HTMLElement.");this.containerElem=o}else if(r instanceof HTMLElement)this.containerElem=r;else throw new Error("RTA: Invalid prop boundariesElement: it has to be string or HTMLElement.");if(!this.containerElem||!this.containerElem.contains(this.ref))throw new Error("RTA: Invalid prop boundariesElement: it has to be one of the parents of the RTA.")}},{key:"componentDidUpdate",value:function(){var r,o,i=this.props.top||0,a=this.props.left||0,s=[],l=[],u=0,d=0,h=this.containerElem.getBoundingClientRect(),p=this.ref.getBoundingClientRect(),m=this.props.textareaRef.getBoundingClientRect(),b=window.getComputedStyle(this.ref),v=parseInt(b.getPropertyValue("margin-top"),10),y=parseInt(b.getPropertyValue("margin-bottom"),10),S=parseInt(b.getPropertyValue("margin-left"),10),x=parseInt(b.getPropertyValue("margin-right"),10),C=v+y+m.top+i+p.height,k=S+x+m.left+a+p.width;k>h.right&&m.left+a>p.width?(d=a-p.width,s.push(ec.X.LEFT),l.push(ec.X.RIGHT)):(d=a,s.push(ec.X.RIGHT),l.push(ec.X.LEFT)),C>h.bottom&&m.top+i>p.height?(u=i-p.height,s.push(ec.Y.TOP),l.push(ec.Y.BOTTOM)):(u=i,s.push(ec.Y.BOTTOM),l.push(ec.Y.TOP)),this.props.renderToBody&&(u+=m.top,d+=m.left),this.ref.style.top="".concat(u,"px"),this.ref.style.left="".concat(d,"px"),(r=this.ref.classList).remove.apply(r,l),(o=this.ref.classList).add.apply(o,s)}},{key:"render",value:function(){var r=this,o=this.props,i=o.style,a=o.className,s=o.innerRef,l=o.children,u=o.renderToBody,d=document.body,h=Y.createElement("div",{ref:function(m){r.ref=m,s(m)},className:"rta__autocomplete ".concat(a||""),style:i},l);return u&&d!==null?rD.createPortal(h,d):h}}]),t}(Y.Component),kH=function(e){SS(t,e);function t(n){var r;rv(this,t),r=wS(this,If(t).call(this,n)),r.state={top:null,left:null,currentTrigger:null,actualToken:"",data:null,value:"",dataLoading:!1,selectionEnd:0,component:null,textToReplace:null},r.escListenerInit=function(){r.escListener||(r.escListener=wu.add(oi.ESC,r._closeAutocomplete))},r.escListenerDestroy=function(){r.escListener&&(wu.remove(r.escListener),r.escListener=null)},r.getSelectionPosition=function(){return r.textareaRef?{selectionStart:r.textareaRef.selectionStart,selectionEnd:r.textareaRef.selectionEnd}:null},r.getSelectedText=function(){if(!r.textareaRef)return null;var l=r.textareaRef,u=l.selectionStart,d=l.selectionEnd;return u===d?null:r.state.value.substr(u,d-u)},r.setCaretPosition=function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;r.textareaRef&&(r.textareaRef.focus(),r.textareaRef.setSelectionRange(l,l))},r.getCaretPosition=function(){if(!r.textareaRef)return 0;var l=r.textareaRef.selectionEnd;return l},r._handleCaretChange=function(l){var u=function(){var p=r.getCaretPosition()-1;r.lastTrigger=r.lastTrigger?p:0};if(l.type==="keydown"){var d=l.keyCode||l.which;switch(d){case oi.UP:case oi.DOWN:r._isAutocompleteOpen()||u();break;case oi.LEFT:case oi.RIGHT:u();break}return}u()},r._onSelect=function(l){var u=r.state,d=u.selectionEnd,h=u.currentTrigger,p=u.value,m=r.props.onItemSelected;if(h){var b=r._getTextToReplace(h);if(!b){r._closeAutocomplete();return}var v=b(l);if(!v){r._closeAutocomplete();return}m&&m({currentTrigger:h,item:l});var y=function(B,_,H){switch(B){case"start":return H;case"next":case"end":return H+_.length;default:if(!Number.isInteger(B))throw new Error('RTA: caretPosition should be "start", "next", "end" or number.');return B}},S=p.slice(0,d),x=qy(h),C=S.length-S.lastIndexOf(h),k=S.search(new RegExp("(?!".concat(x,")$")))-C,M=v.caretPosition==="next"?"".concat(v.text," "):v.text,I=y(v.caretPosition,M,k),O=S.substring(0,k)+M,R=p.replace(S,O);r.setState({value:R,dataLoading:!1},function(){var L=r.tokenRegExpEnding.exec(M),B=L?L[0].length:1;r.lastTrigger=I&&I-B,r.textareaRef.value=R,r.textareaRef.selectionEnd=I,r._changeHandler();var _=r.textareaRef.scrollTop;r.setCaretPosition(I),window.chrome&&(r.textareaRef.scrollTop=_)})}},r._getTextToReplace=function(l){var u=r.props.trigger[l];if(!l||!u)return null;var d=u.output;return function(h){if(typeof h=="object"&&(!d||typeof d!="function"))throw new Error('Output functor is not defined! If you are using items as object you have to define "output" function. https://github.com/webscopeio/react-textarea-autocomplete#trigger-type');if(d){var p=d(h,l);if(p===void 0||typeof p=="number")throw new Error(`Output functor should return string or object in shape {text: string, caretPosition: string | number}.
+Got "`.concat(String(p),'". Check the implementation for trigger "').concat(l,`"
See https://github.com/webscopeio/react-textarea-autocomplete#trigger-type for more information.
-`));if(y===null)return null;if(typeof y=="string")return{text:y,caretPosition:Ex};if(!y.text&&typeof y.text!="string")throw new Error('Output "text" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "'.concat(c,`"
-`));if(!y.caretPosition)throw new Error('Output "caretPosition" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "'.concat(c,`"
-`));return y}if(typeof g!="string")throw new Error(`Output item should be string
-`);return{text:"".concat(c).concat(g).concat(c),caretPosition:Ex}}},r._getCurrentTriggerSettings=function(){var c=r.state.currentTrigger;return c?r.props.trigger[c]:null},r._getValuesFromProvider=function(){var c=r.state,f=c.currentTrigger,h=c.actualToken,g=r._getCurrentTriggerSettings();if(!(!f||!g)){var y=g.dataProvider,w=g.component;if(typeof y!="function")throw new Error("Trigger provider has to be a function!");r.setState({dataLoading:!0});var S=y(h);S instanceof Promise||(S=Promise.resolve(S)),S.then(function(D){if(!Array.isArray(D))throw new Error("Trigger provider has to provide an array!");if(typeof w!="function")throw new Error("Component should be defined!");if(f===r.state.currentTrigger){if(!D.length){r._closeAutocomplete();return}r.setState({dataLoading:!1,data:D,component:w})}}).catch(function(D){return Cx(D.message)})}},r._getSuggestions=function(){var c=r.state,f=c.currentTrigger,h=c.data;return!f||!h||h&&!h.length?null:h},r._createRegExp=function(){var c=r.props.trigger;r.tokenRegExp=new RegExp("(".concat(Object.keys(c).sort(function(f,h){return fh?-1:0}).map(function(f){return x0(f)}).join("|"),")((?:(?!\\1)[^\\s])*$)")),r.tokenRegExpEnding=new RegExp("(".concat(Object.keys(c).sort(function(f,h){return fh?-1:0}).map(function(f){return x0(f)}).join("|"),")$"))},r._closeAutocomplete=function(){var c=r.state.currentTrigger;r.escListenerDestroy(),r.setState({data:null,dataLoading:!1,currentTrigger:null},function(){c&&r._onItemHighlightedHandler(null)})},r._cleanUpProps=function(){var c=AU({},r.props),f=["loadingComponent","boundariesElement","containerStyle","minChar","scrollToItem","ref","innerRef","onChange","onCaretPositionChange","className","value","trigger","listStyle","itemStyle","containerStyle","loaderStyle","className","containerClassName","listClassName","itemClassName","loaderClassName","dropdownStyle","dropdownClassName","movePopupAsYouType","textAreaComponent","renderToBody","onItemSelected","onItemHighlighted"];for(var h in c)f.includes(h)&&delete c[h];return c},r._changeHandler=function(c){var f=r.props,h=f.trigger,g=f.onChange,y=f.minChar,w=f.onCaretPositionChange,S=f.movePopupAsYouType,D=r.state,I=D.top,M=D.left,N=c;N||(N=new kU("change",{bubbles:!0}),r.textareaRef.dispatchEvent(N));var B=N.target||r.textareaRef,k=B.selectionEnd,R=B.value;if(r.lastValueBubbledEvent=R,g&&N&&(N.persist&&N.persist(),g(new Proxy(N,{get:function(X,oe,De){return oe==="target"?B:Reflect.get(X,oe,De)}}))),w){var L=r.getCaretPosition();w(L)}r.setState({value:R});var _=function(){var X=CU(B,k),oe=X.top,De=X.left;r.setState({top:oe-r.textareaRef.scrollTop||0,left:De})},V=function(X){r.lastTrigger=k-X,r._closeAutocomplete(),_()};if(k<=r.lastTrigger){var U=R.slice(0,k),Z=r.tokenRegExp.exec(U);V(Z?Z[0].length:0)}var Q=R.slice(r.lastTrigger,k),G=r.tokenRegExp.exec(Q),re=G&&G[0],de=G&&G[1]||null,fe=de?de.length-1:0,$=r.tokenRegExpEnding.exec(Q);if($?V($[0].length):r._isAutocompleteOpen()||r._closeAutocomplete(),(!re||re.length<=y+fe)&&(r.state.currentTrigger&&!h[r.state.currentTrigger].allowWhitespace||!r.state.currentTrigger)){r._closeAutocomplete();return}if(de&&h[de].afterWhitespace&&!/\s/.test(R[k-re.length-1])&&R[k-re.length-1]!==void 0){r._closeAutocomplete();return}if(r.state.currentTrigger&&h[r.state.currentTrigger].allowWhitespace){if(G=new RegExp("".concat(x0(r.state.currentTrigger),".*$")).exec(R.slice(0,k)),re=G&&G[0],!re){r._closeAutocomplete();return}de=Object.keys(h).find(function(ue){return ue.slice(0,fe+1)===re.slice(0,fe+1)})||null}var he=re.slice(1);if(de){(S||I===null&&M===null||r.state.currentTrigger!==de)&&_(),r.escListenerInit();var se=r._getTextToReplace(de);r.setState({selectionEnd:k,currentTrigger:de,textToReplace:se,actualToken:he},function(){try{r._getValuesFromProvider()}catch(ue){Cx(ue.message)}})}},r._selectHandler=function(c){var f=r.props,h=f.onCaretPositionChange,g=f.onSelect;if(h){var y=r.getCaretPosition();h(y)}g&&(c.persist(),g(c))},r._shouldStayOpen=function(c){var f=c.relatedTarget;return f===null&&(f=document.activeElement),!!(r.dropdownRef&&f instanceof Node&&r.dropdownRef.contains(f))},r._onClick=function(c){var f=r.props.onClick;f&&(c.persist(),f(c)),!r._shouldStayOpen(c)&&r._closeAutocomplete()},r._onBlur=function(c){var f=r.props.onBlur;f&&(c.persist(),f(c)),!r._shouldStayOpen(c)&&r._closeAutocomplete()},r._onScrollHandler=function(){r._closeAutocomplete()},r._onItemHighlightedHandler=function(c){var f=r.props.onItemHighlighted,h=r.state.currentTrigger;if(f)if(typeof f=="function")f({currentTrigger:h,item:c});else throw new Error("`onItemHighlighted` has to be a function")},r._dropdownScroll=function(c){var f=r.props.scrollToItem;if(f){if(f===!0){HU(r.dropdownRef,c);return}if(typeof f!="function"||f.length!==2)throw new Error("`scrollToItem` has to be boolean (true for default implementation) or function with two parameters: container, item.");f(r.dropdownRef,c)}},r._isAutocompleteOpen=function(){var c=r.state,f=c.dataLoading,h=c.currentTrigger,g=r._getSuggestions();return!!((f||g)&&h)},r._textareaRef=function(c){r.props.innerRef&&r.props.innerRef(c),r.textareaRef=c},r.lastTrigger=0,r.escListener=null;var a=r.props,o=a.loadingComponent,i=a.trigger,l=a.value;if(l&&(r.state.value=l),r._createRegExp(),!o)throw new Error("RTA: loadingComponent is not defined");if(!i)throw new Error("RTA: trigger is not defined");return r}return Tb(t,[{key:"componentDidMount",value:function(){df.startListen(this.textareaRef),this.textareaRef&&this.textareaRef.addEventListener("focus",this._handleCaretChange),this.textareaRef&&this.textareaRef.addEventListener("click",this._handleCaretChange),this.textareaRef&&this.textareaRef.addEventListener("keydown",this._handleCaretChange)}},{key:"componentDidUpdate",value:function(r){var a=r.trigger,o=r.value,i=this.props,l=i.trigger,c=i.value;Object.keys(l).join("")!==Object.keys(a).join("")&&this._createRegExp(),o!==c&&this.lastValueBubbledEvent!==c&&(this.lastTrigger=0,this._changeHandler())}},{key:"componentWillUnmount",value:function(){this.escListenerDestroy(),df.stopListen(this.textareaRef),this.textareaRef&&this.textareaRef.removeEventListener("focus",this._handleCaretChange),this.textareaRef&&this.textareaRef.removeEventListener("click",this._handleCaretChange),this.textareaRef&&this.textareaRef.removeEventListener("keydown",this._handleCaretChange)}},{key:"render",value:function(){var r=this,a=this.props,o=a.loadingComponent,i=a.style,l=a.className,c=a.listStyle,f=a.itemStyle,h=a.boundariesElement,g=a.movePopupAsYouType,y=a.listClassName,w=a.itemClassName,S=a.dropdownClassName,D=a.dropdownStyle,I=a.containerStyle,M=a.containerClassName,N=a.loaderStyle,B=a.loaderClassName,k=a.textAreaComponent,R=a.renderToBody,L=this.state,_=L.left,V=L.top,U=L.dataLoading,Z=L.component,Q=L.value,G=L.textToReplace,re=this._isAutocompleteOpen(),de=this._getSuggestions(),fe={},$;return k.component?($=k.component,fe[k.ref]=this._textareaRef):($=k,fe.ref=this._textareaRef),ne.createElement("div",{className:"rta ".concat(U===!0?"rta--loading":""," ").concat(M||""),style:I},ne.createElement($,Object.assign({},this._cleanUpProps(),{className:"rta__textarea ".concat(l||""),onChange:this._changeHandler,onSelect:this._selectHandler,onScroll:this._onScrollHandler,onClick:this._onClick,onBlur:this._onBlur,value:Q,style:i},fe)),re&&ne.createElement(YU,{innerRef:function(se){r.dropdownRef=se},top:V,left:_,style:D,className:S,movePopupAsYouType:g,boundariesElement:h,textareaRef:this.textareaRef,renderToBody:R},de&&Z&&G&&ne.createElement(BU,{values:de,component:Z,style:c,className:y,itemClassName:w,itemStyle:f,getTextToReplace:G,onItemHighlighted:this._onItemHighlightedHandler,onSelect:this._onSelect,dropdownScroll:this._dropdownScroll}),U&&ne.createElement("div",{className:"rta__loader ".concat(de!==null?"rta__loader--suggestion-data":"rta__loader--empty-suggestion-data"," ").concat(B||""),style:N},ne.createElement(o,{data:de}))))}}],[{key:"getDerivedStateFromProps",value:function(r){var a=r.value;return a==null?null:{value:a}}}]),t}(ne.Component);A6.defaultProps={movePopupAsYouType:!1,value:null,minChar:1,boundariesElement:"body",scrollToItem:!0,textAreaComponent:"textarea",renderToBody:!1};const zU=()=>{const{app:e}=ft.getState(),t=e.metadataCache.getTags();return[...Object.keys(t)].map(n=>n.split("#").pop())},VU=e=>{let t=[];const n=ft.getState().settings;if(n&&(n!=null&&n.UseVaultTags))t=zU();else{const{tags:o}=we.getState();t=o}const r=e.toLowerCase(),a=[];return t.forEach(o=>{o&&o.toLowerCase().contains(r)&&a.push({name:o,char:o})}),a},WU=e=>{const{app:t}=ft.getState(),n=t.vault.getAllLoadedFiles(),r=[];let a;return n.forEach(o=>{e==="["?a="":e.contains("[")&&(a=e.slice(1));const i=a.toLowerCase();o instanceof x.TFile&&["md","png","jpg","canvas","jpeg","gif"].contains(o.extension)&&o.path.toLowerCase().contains(i)&&r.push({name:o.basename,char:o.name,file:o})}),r};var PS=P,$U=function(e){return typeof e=="function"},ZU=function(e){var t=PS.useState(e),n=t[0],r=t[1],a=PS.useRef(n),o=PS.useCallback(function(i){a.current=$U(i)?i(a.current):i,r(a.current)},[]);return[n,o,a]},qU=ZU;const xo=qt(qU);function GU(e){return e.containerEl.matches(".memos-list-view")}function jS(){}function JU(e){const n=e.app.workspace.getLeavesOfType("thino_view")[0];return{app:e.app,showSearch:jS,toggleMode:jS,onMarkdownScroll:jS,getMode:()=>"source",getViewType:()=>"thino_view",id:(n==null?void 0:n.id)||ut.randomId(6),scroll:0,editMode:null,get file(){var r;return((r=n==null?void 0:n.view)==null?void 0:r.file)||null},get path(){var r,a;return((a=(r=n==null?void 0:n.view)==null?void 0:r.file)==null?void 0:a.path)||""}}}const KU=(e,t)=>{const{dailyNotesState:{app:n,plugin:r,view:a,dailyNotes:o}}=P.useContext(Lt),[i,l]=P.useState(null),[c,f]=P.useState(!1),[h,g]=P.useState(""),[y,w]=P.useState(null),S=P.useRef(x.debounce((_,V,U)=>{XU(_,V,U)},100)),D=P.useRef();P.useEffect(()=>{var _;if(!y){if(!o&&!(n&&window.app)){const V=(_=n||window.app)==null?void 0:_.vault.getMarkdownFiles();w(V[0]);return}for(const V in o)if(o[V]instanceof x.TFile){w(o[V]);break}}},[o]),P.useEffect(()=>{var G;if(!(r!=null&&r.MarkdownEditor)||!e)return;class _ extends r.MarkdownEditor{updateBottomPadding(){}onUpdate(de,fe){super.onUpdate(de,fe),M&&M(this.get())}}const V=JU(r),U=r.addChild(new _(n,e,V));U&&!t&&a&&dt.setInstance(`${(G=a.leaf)==null?void 0:G.id}`,U),V.editMode=U,U.owner.editor=U.editor;const Z=QU(n,t?"modal":"view");U.set&&U.set(Z||"",!0),n.workspace.trigger("thino-editor-created",e,U.editor);const Q=U.cm;return D.current=Q,f(!0),l(U),()=>{f(!1),i==null||i.destroy(),r.removeChild(U),D.current=null}},[e,r]),P.useEffect(()=>{!i||!n||S.current(h,n,t?"modal":"view")},[h,n]);const I=()=>{i&&i.toggleSource()},M=x.debounce(_=>N(_),500,!0),N=_=>{g(_)};return{instance:i,value:h,set:_=>{try{i&&((i==null?void 0:i.editor).replaceSelection(_),g(_))}catch(V){console.error(V)}},get:()=>i?i.get():"",append:(_,V)=>{if(!i||V&&V!==i.owner.id)return;const Z=(i.get()||"")+_;(i==null?void 0:i.editor).replaceSelection(_),g(Z)},clear:()=>{i&&(i.clear(),g(""))},toggleSource:I}};function F6(e,t){return`thinoEditorContentCache:${e}:${t||"view"}`}function QU(e,t){try{const n=F6(e==null?void 0:e.appId,t);return la.get([n])[n]||""}catch(n){return console.error(n),""}}function XU(e,t,n){try{const r=F6(t==null?void 0:t.appId,n);la.set({[r]:e})}catch(r){console.error(r)}}function eY(e,t){return{line:e.line,ch:e.ch+t}}const xx=({entity:{name:e,char:t,file:n}})=>v.jsx("div",{children:`${t}`}),tY=({data:e})=>v.jsx("div",{children:"Loading"});let Al;const nY=P.forwardRef((e,t)=>{var Re;const{globalState:{useTinyUndoHistoryCache:n,globalEditorShown:r,memoListView:a},dailyNotesState:{settings:o,app:i}}=P.useContext(Lt),{SaveMemoButtonLabel:l,SaveMemoButtonIcon:c}=o,{className:f,inputerType:h,initialContent:g,placeholder:y,showConfirmBtn:w,showCancelBtn:S,onConfirmBtnClick:D,onCancelBtnClick:I,onContentChange:M}=e,N=P.useRef(null),B=P.useRef(null),k=P.useRef(null),R=IU(),{instance:L,value:_,set:V,get:U,append:Z,clear:Q,toggleSource:G}=KU(B.current,e.modal),[,re,de]=xo(0),[fe,$]=xo(!1);P.useEffect(()=>{var Fe,Be;if(o&&o.FocusOnEditor)switch(h){case"minimal":case"memos":(Fe=N.current)==null||Fe.focus();break;case"obsidian":L&&((Be=L.editor)==null||Be.focus())}},[o,L]),P.useEffect(()=>{if(!i)return;const Fe=i.workspace.getLeavesOfType(lo);let Be,Xe;Fe.length>0?(Xe=Fe[0].view.containerEl,Be=Xe.offsetHeight):(Xe=document,Be=window.outerHeight),re(Be)},[i]),P.useEffect(()=>{!N.current||h==="obsidian"||g&&(N.current.value=g,R())},[]),P.useEffect(()=>{var Fe;if(h!=="obsidian")if(n){if(!N.current)return;const{tinyUndoActionsCache:Be,tinyUndoIndexCache:Xe}=la.get(["tinyUndoActionsCache","tinyUndoIndexCache"]);return k.current=new TU(N.current,{interval:5e3,initialActions:Be,initialIndex:Xe}),k.current.subscribe((Ze,st)=>{la.set({tinyUndoActionsCache:Ze,tinyUndoIndexCache:st})}),()=>{var Ze;(Ze=k.current)==null||Ze.destroy()}}else(Fe=k.current)==null||Fe.destroy(),k.current=null,la.remove(["tinyUndoActionsCache","tinyUndoIndexCache"])},[n]),P.useEffect(()=>{N.current&&(N.current.style.height="auto",N.current.style.height=(N.current.scrollHeight??0)+"px")},[(Re=N.current)==null?void 0:Re.value]),P.useImperativeHandle(t,()=>({element:N.current,blur:()=>{var Fe,Be;switch(h){case"minimal":case"memos":(Fe=N.current)==null||Fe.blur();break;case"obsidian":L&&((Be=L.editor)==null||Be.blur())}},focus:Fe=>{var Be,Xe,Ze,st,Ct;switch(h){case"minimal":case"memos":(Be=N.current)==null||Be.focus();break;case"obsidian":if(L){if(Fe&&Fe!==((st=(Ze=(Xe=L==null?void 0:L.owner)==null?void 0:Xe.view)==null?void 0:Ze.leaf)==null?void 0:st.id))return;(Ct=L.editor)==null||Ct.focus()}}},insertTag:Fe=>{var Be,Xe,Ze;switch(h){case"minimal":case"memos":{if(!N.current)return;const st=N.current.value;N.current.value=st.slice(0,N.current.selectionStart)+"# "+st.slice(N.current.selectionStart),M(N.current.value),R();break}case"obsidian":if(Fe&&Fe!==((Ze=(Xe=(Be=L==null?void 0:L.owner)==null?void 0:Be.view)==null?void 0:Xe.leaf)==null?void 0:Ze.id))return;if(L){const st=L.editor,Ct=st.getCursor("from");st.replaceRange("#",Ct),st.setSelection(eY(Ct,1))}break}},insertText:(Fe,Be)=>{switch(h){case"minimal":case"memos":{if(!N.current)return;const Xe=N.current.value;N.current.value=Xe.slice(0,N.current.selectionStart)+Fe+Xe.slice(N.current.selectionStart),M(N.current.value),R()}break;case"obsidian":L&&Z(Fe,Be);break}},setContent:Fe=>{switch(h){case"minimal":case"memos":N.current&&(N.current.value=Fe,M(N.current.value),R());break;case"obsidian":L&&V(Fe);break}},getContent:()=>{switch(h){case"minimal":case"memos":return N.current?N.current.value:"";case"obsidian":return U()}},toggleSource:()=>{switch(h){case"minimal":case"memos":break;case"obsidian":G();break}},clear:()=>{switch(h){case"minimal":case"memos":N.current&&(N.current.value="",M(N.current.value),R());break;case"obsidian":Q();break}}}),[L,h]);const he=Fe=>{if(!N.current)return;const{fileManager:Be}=Le.getState().dailyNotesState.app;if(Fe.currentTrigger==="#"){const Xe=N.current.value;let Ze;Al!=null?Ze=Al.length:Ze=0;let st=N.current.selectionStart;for(let Ct=0;Ct{var Fe;M(((Fe=N.current)==null?void 0:Fe.value)||""),R()},[]),ue=()=>{var Fe;switch(h){case"minimal":case"memos":if(!N.current)return;N.current.value=oe(),D(N.current.value),N.current.value="",R(),(Fe=k.current)==null||Fe.resetState();break;case"obsidian":D(U()),Q(),R();break}},X=P.useCallback(()=>{switch(h){case"minimal":case"memos":N.current&&(N.current.value="",M(N.current.value),R());break;case"obsidian":Q();break}I()},[h,L,N]),oe=()=>la.get(["thinoEditorContentCache"]).thinoEditorContentCache||"",De=()=>{if(N.current)return N.current.value=oe(),N.current.value},je=Fe=>{switch(Fe){case"memos":return v.jsx(A6,{className:`common-editor-inputer scroll ${fe?" editing":""}`,loadingComponent:tY,placeholder:y,movePopupAsYouType:!0,value:De(),innerRef:Be=>{N.current=Be},onFocus:()=>{$(!0)},onBlur:()=>{$(!1)},onInput:se,style:{maxHeight:`${de.current>400?de.current-400:100}px`},dropdownStyle:{minWidth:180,maxHeight:250,overflowY:"auto"},minChar:0,onItemSelected:he,scrollToItem:!0,trigger:{"#":{dataProvider:Be=>(Al=Be,VU(Be).map(({name:Xe,char:Ze})=>({name:Xe,char:Ze}))),component:xx,afterWhitespace:!0,output:Be=>Be.char},"[[":{dataProvider:Be=>(Al=Be,WU(Be).slice(0,10).map(({name:Xe,char:Ze,file:st})=>({name:Xe,char:Ze,file:st}))),component:xx,afterWhitespace:!0,output:Be=>Be.char}}});case"minimal":return v.jsx("textarea",{style:{minHeight:48},className:"common-editor-inputer scroll",rows:1,placeholder:y,ref:N,onInput:se});case"obsidian":return v.jsx("div",{className:"common-editor-inputer common-editor-mod-cm6",onClick:()=>{var Be;(Be=L==null?void 0:L.editor)==null||Be.focus()},ref:B});default:return v.jsx("div",{className:"common-editor-inputer common-editor-mod-cm6",ref:B})}};return v.jsxs("div",{className:"common-editor-wrapper "+f,children:[je(h),v.jsxs("div",{className:"common-tools-wrapper",children:[v.jsx("div",{className:"common-tools-container",children:v.jsx(ts,{when:e.tools!==void 0,children:e.tools})}),v.jsxs("div",{className:"btns-container",children:[v.jsx(ts,{when:S,children:v.jsx("button",{className:"action-btn cancel-btn",onClick:()=>{o&&o.DefaultEditorLocation==="Top"&&!r&&X()},onPointerDown:()=>{(o&&o.DefaultEditorLocation==="Bottom"||r)&&X()},children:at.getState().pathname==="/"&&a==="chat"&&((o==null?void 0:o.chatViewStyle)==="fluent"||(o==null?void 0:o.chatViewStyle)==="inline")?"":E("CANCEL EDIT")})}),v.jsx(ts,{when:w,children:v.jsxs("button",{title:"Ctrl/Cmd + Enter to save thino",className:"action-btn confirm-btn",onClick:()=>{o&&o.DefaultEditorLocation==="Top"&&!r&&ue()},onPointerDown:()=>{(o&&o.DefaultEditorLocation==="Bottom"||r)&&ue()},children:[a==="chat"&&((o==null?void 0:o.chatViewStyle)==="fluent"||(o==null?void 0:o.chatViewStyle)==="inline")?"":l,v.jsx("span",{className:"icon-text",children:null})]})})]})]})]})}),rY=typeof window<"u"?P.useLayoutEffect:P.useEffect;function aY(e,t,n,r){const a=P.useRef(t);rY(()=>{a.current=t},[t]),P.useEffect(()=>{const o=(n==null?void 0:n.current)||window;if(!(o&&o.addEventListener))return;const i=l=>{a.current(l)};return o.addEventListener(e,i,r),()=>{o.removeEventListener(e,i,r)}},[e,n,r])}function Hv(e,t,n="mousedown"){aY(n,r=>{const a=r.target;if(!a||!a.isConnected||a.closest(".suggestion-container")||a.closest(".menu"))return;(Array.isArray(e)?e.every(i=>i.current&&!i.current.contains(a)):e.current&&!e.current.contains(a))&&t(r)})}const O6=e=>{const{year:t,handleYearChange:n}=e,[r,a]=P.useState([]),[o,i]=P.useState(t),l=P.useRef(null),c=P.useRef(null),[f,h]=ne.useState(!1),g=ne.useRef(null);Hv(g,()=>{h(!1)}),P.useEffect(()=>{l.current&&x.setIcon(l.current,"chevron-left"),c.current&&x.setIcon(c.current,"chevron-right")},[l,c,f]),P.useEffect(()=>{w(o)},[t]);const w=S=>{const D=parseInt(S),I=D-D%10,M=[];for(let N=0;N<10;N++)M.push(`${I+N}`);a(M)};return v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"btn year-btn",onClick:()=>{h(!f)},children:[v.jsx("span",{children:t}),v.jsx("span",{children:E("year")})]}),f&&v.jsxs("div",{ref:g,className:"year-picker-wrapper",children:[v.jsxs("div",{className:"year-picker-header",children:[v.jsxs("div",{className:"year-picker-header-title",children:[o," "+(E("year")||"")]}),v.jsxs("div",{className:"year-picker-header-btns",children:[v.jsx("span",{className:"btn",ref:l,onClick:()=>{const S=parseInt(o)-10;i(S.toString()),w(S.toString())}}),v.jsx("span",{className:"btn",ref:c,onClick:()=>{const S=parseInt(o)+10;i(S.toString()),w(S.toString())}})]})]}),v.jsx("div",{className:"year-picker-body",children:v.jsx("div",{className:"year-picker-body-list",children:r.map(S=>v.jsx("div",{className:`year-picker-body-item ${S===o?"selected":""}`,onClick:()=>{i(S),n(S),h(!1)},children:S},S))})})]})]})},P6=e=>{const{month:t,handleMonthChange:n}=e,[r,a]=P.useState([]),[o,i]=P.useState((parseInt(t)+1).toString()),[l,c]=ne.useState(!1),f=ne.useRef(null);Hv(f,()=>{c(!1)}),P.useEffect(()=>{g()},[t]);const g=()=>{const y=[];for(let w=1;w<=12;w++)y.push(`${w}`);a(y)};return v.jsxs(v.Fragment,{children:[v.jsxs("span",{className:"btn month-btn",onClick:()=>{c(!l)},children:[v.jsxs("span",{children:[E("monthsShort")[parseInt(t)]||parseInt(t)+1," "]}),v.jsx("span",{children:E("month")||""})]}),l&&v.jsxs("div",{ref:f,className:"month-picker-wrapper",children:[v.jsxs("div",{className:"month-picker-header",children:[v.jsxs("div",{className:"month-picker-header-title",children:[o," "+(E("month")||"")]}),v.jsx("div",{className:"month-picker-header-btns"})]}),v.jsx("div",{className:"month-picker-body",children:v.jsx("div",{className:"month-picker-body-list",children:r.map(y=>v.jsx("div",{className:`month-picker-body-item ${y===o?"selected":""}`,onClick:()=>{i(y),n(y),c(!1)},children:y},y))})})]})]})},Cb=e=>{const{className:t,datestamp:n,handleDateStampChange:r}=e,[a,o]=P.useState(Sg(n)),[i,l]=P.useState(n);P.useEffect(()=>{o(Sg(n))},[n]);const c=new Date(a),f=c.getDay(),h=[];for(let S=0;S{r(D,S.nativeEvent),l(D)},w=S=>{const D=c.getFullYear(),I=c.getMonth()+1;let M=0;I===1&&S===-1?M=new Date(`${D-1}/12/1`).getTime():I===12&&S===1?M=new Date(`${D+1}/1/1`).getTime():M=new Date(`${D}/${I+S}/1`).getTime(),o(Sg(M))};return v.jsxs("div",{className:`date-picker-wrapper ${t}`,children:[v.jsxs("div",{className:"date-picker-header",children:[v.jsx("span",{ref:S=>{S&&x.setIcon(S,"chevron-left")},className:"btn btn-text",onClick:()=>w(-1)}),v.jsxs("span",{className:"normal-text",children:[v.jsx(O6,{year:c.getFullYear().toString(),handleYearChange:S=>{o(Sg(new Date(`${S}/${c.getMonth()+1}/1`).getTime()))}}),v.jsx(P6,{month:c.getMonth().toString(),handleMonthChange:S=>{o(Sg(new Date(`${c.getFullYear()}/${parseInt(S)}/1`).getTime()))}})]}),v.jsx("span",{ref:S=>{S&&x.setIcon(S,"chevron-right")},className:"btn btn-text",onClick:()=>w(1)})]}),v.jsxs("div",{className:"date-picker-day-container",children:[v.jsx("div",{className:"date-picker-day-header",children:E("weekDaysShort").map(S=>v.jsx("span",{className:"day-item",children:S},S))}),v.jsx("div",{className:"date-picker-day-content",children:h.map(S=>S.date===0?v.jsx("span",{className:"day-item null",children:""},S.datestamp):v.jsx("span",{className:`day-item ${S.datestamp===n?"current":""} ${S.datestamp===i?"selected":""}`,onClick:D=>y(D,S.datestamp),children:v.jsx("span",{className:"day-item-text",children:S.date})},S.datestamp))})]})]})};function oY(e){const t=new Date(e),n=new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`);return((n.getMonth()===11?new Date(`${n.getFullYear()+1}/1/1`):new Date(`${n.getFullYear()}/${n.getMonth()+2}/1`)).getTime()-n.getTime())/ei}function Sg(e){const t=new Date(e);return new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`).getTime()}var Mx=function(t){return t.reduce(function(n,r){var a=r[0],o=r[1];return n[a]=o,n},{})},kx=typeof window<"u"&&window.document&&window.document.createElement?P.useLayoutEffect:P.useEffect,ti="top",as="bottom",os="right",ni="left",Q2="auto",Uv=[ti,as,os,ni],Dp="start",tv="end",iY="clippingParents",j6="viewport",Dg="popper",sY="reference",Nx=Uv.reduce(function(e,t){return e.concat([t+"-"+Dp,t+"-"+tv])},[]),X2=[].concat(Uv,[Q2]).reduce(function(e,t){return e.concat([t,t+"-"+Dp,t+"-"+tv])},[]),lY="beforeRead",uY="read",cY="afterRead",dY="beforeMain",fY="main",hY="afterMain",pY="beforeWrite",mY="write",gY="afterWrite",vY=[lY,uY,cY,dY,fY,hY,pY,mY,gY];function eu(e){return e?(e.nodeName||"").toLowerCase():null}function Ni(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function bf(e){var t=Ni(e).Element;return e instanceof t||e instanceof Element}function ns(e){var t=Ni(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function eI(e){if(typeof ShadowRoot>"u")return!1;var t=Ni(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function yY(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},a=t.attributes[n]||{},o=t.elements[n];!ns(o)||!eu(o)||(Object.assign(o.style,r),Object.keys(a).forEach(function(i){var l=a[i];l===!1?o.removeAttribute(i):o.setAttribute(i,l===!0?"":l)}))})}function wY(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var a=t.elements[r],o=t.attributes[r]||{},i=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),l=i.reduce(function(c,f){return c[f]="",c},{});!ns(a)||!eu(a)||(Object.assign(a.style,l),Object.keys(o).forEach(function(c){a.removeAttribute(c)}))})}}const bY={name:"applyStyles",enabled:!0,phase:"write",fn:yY,effect:wY,requires:["computeStyles"]};function Jl(e){return e.split("-")[0]}var pf=Math.max,Ow=Math.min,Tp=Math.round;function ET(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function L6(){return!/^((?!chrome|android).)*safari/i.test(ET())}function Ip(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),a=1,o=1;t&&ns(e)&&(a=e.offsetWidth>0&&Tp(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Tp(r.height)/e.offsetHeight||1);var i=bf(e)?Ni(e):window,l=i.visualViewport,c=!L6()&&n,f=(r.left+(c&&l?l.offsetLeft:0))/a,h=(r.top+(c&&l?l.offsetTop:0))/o,g=r.width/a,y=r.height/o;return{width:g,height:y,top:h,right:f+g,bottom:h+y,left:f,x:f,y:h}}function tI(e){var t=Ip(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function R6(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&eI(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Vu(e){return Ni(e).getComputedStyle(e)}function SY(e){return["table","td","th"].indexOf(eu(e))>=0}function od(e){return((bf(e)?e.ownerDocument:e.document)||window.document).documentElement}function xb(e){return eu(e)==="html"?e:e.assignedSlot||e.parentNode||(eI(e)?e.host:null)||od(e)}function Ax(e){return!ns(e)||Vu(e).position==="fixed"?null:e.offsetParent}function DY(e){var t=/firefox/i.test(ET()),n=/Trident/i.test(ET());if(n&&ns(e)){var r=Vu(e);if(r.position==="fixed")return null}var a=xb(e);for(eI(a)&&(a=a.host);ns(a)&&["html","body"].indexOf(eu(a))<0;){var o=Vu(a);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return a;a=a.parentNode}return null}function Yv(e){for(var t=Ni(e),n=Ax(e);n&&SY(n)&&Vu(n).position==="static";)n=Ax(n);return n&&(eu(n)==="html"||eu(n)==="body"&&Vu(n).position==="static")?t:n||DY(e)||t}function nI(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Vg(e,t,n){return pf(e,Ow(t,n))}function TY(e,t,n){var r=Vg(e,t,n);return r>n?n:r}function _6(){return{top:0,right:0,bottom:0,left:0}}function B6(e){return Object.assign({},_6(),e)}function H6(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var IY=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,B6(typeof t!="number"?t:H6(t,Uv))};function EY(e){var t,n=e.state,r=e.name,a=e.options,o=n.elements.arrow,i=n.modifiersData.popperOffsets,l=Jl(n.placement),c=nI(l),f=[ni,os].indexOf(l)>=0,h=f?"height":"width";if(!(!o||!i)){var g=IY(a.padding,n),y=tI(o),w=c==="y"?ti:ni,S=c==="y"?as:os,D=n.rects.reference[h]+n.rects.reference[c]-i[c]-n.rects.popper[h],I=i[c]-n.rects.reference[c],M=Yv(o),N=M?c==="y"?M.clientHeight||0:M.clientWidth||0:0,B=D/2-I/2,k=g[w],R=N-y[h]-g[S],L=N/2-y[h]/2+B,_=Vg(k,L,R),V=c;n.modifiersData[r]=(t={},t[V]=_,t.centerOffset=_-L,t)}}function CY(e){var t=e.state,n=e.options,r=n.element,a=r===void 0?"[data-popper-arrow]":r;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||R6(t.elements.popper,a)&&(t.elements.arrow=a))}const U6={name:"arrow",enabled:!0,phase:"main",fn:EY,effect:CY,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ep(e){return e.split("-")[1]}var xY={top:"auto",right:"auto",bottom:"auto",left:"auto"};function MY(e,t){var n=e.x,r=e.y,a=t.devicePixelRatio||1;return{x:Tp(n*a)/a||0,y:Tp(r*a)/a||0}}function Fx(e){var t,n=e.popper,r=e.popperRect,a=e.placement,o=e.variation,i=e.offsets,l=e.position,c=e.gpuAcceleration,f=e.adaptive,h=e.roundOffsets,g=e.isFixed,y=i.x,w=y===void 0?0:y,S=i.y,D=S===void 0?0:S,I=typeof h=="function"?h({x:w,y:D}):{x:w,y:D};w=I.x,D=I.y;var M=i.hasOwnProperty("x"),N=i.hasOwnProperty("y"),B=ni,k=ti,R=window;if(f){var L=Yv(n),_="clientHeight",V="clientWidth";if(L===Ni(n)&&(L=od(n),Vu(L).position!=="static"&&l==="absolute"&&(_="scrollHeight",V="scrollWidth")),a===ti||(a===ni||a===os)&&o===tv){k=as;var U=g&&L===R&&R.visualViewport?R.visualViewport.height:L[_];D-=U-r.height,D*=c?1:-1}if(a===ni||(a===ti||a===as)&&o===tv){B=os;var Z=g&&L===R&&R.visualViewport?R.visualViewport.width:L[V];w-=Z-r.width,w*=c?1:-1}}var Q=Object.assign({position:l},f&&xY),G=h===!0?MY({x:w,y:D},Ni(n)):{x:w,y:D};if(w=G.x,D=G.y,c){var re;return Object.assign({},Q,(re={},re[k]=N?"0":"",re[B]=M?"0":"",re.transform=(R.devicePixelRatio||1)<=1?"translate("+w+"px, "+D+"px)":"translate3d("+w+"px, "+D+"px, 0)",re))}return Object.assign({},Q,(t={},t[k]=N?D+"px":"",t[B]=M?w+"px":"",t.transform="",t))}function kY(e){var t=e.state,n=e.options,r=n.gpuAcceleration,a=r===void 0?!0:r,o=n.adaptive,i=o===void 0?!0:o,l=n.roundOffsets,c=l===void 0?!0:l,f={placement:Jl(t.placement),variation:Ep(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Fx(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Fx(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Y6={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:kY,data:{}};var M0={passive:!0};function NY(e){var t=e.state,n=e.instance,r=e.options,a=r.scroll,o=a===void 0?!0:a,i=r.resize,l=i===void 0?!0:i,c=Ni(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&f.forEach(function(h){h.addEventListener("scroll",n.update,M0)}),l&&c.addEventListener("resize",n.update,M0),function(){o&&f.forEach(function(h){h.removeEventListener("scroll",n.update,M0)}),l&&c.removeEventListener("resize",n.update,M0)}}const z6={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:NY,data:{}};var AY={left:"right",right:"left",bottom:"top",top:"bottom"};function sw(e){return e.replace(/left|right|bottom|top/g,function(t){return AY[t]})}var FY={start:"end",end:"start"};function Ox(e){return e.replace(/start|end/g,function(t){return FY[t]})}function rI(e){var t=Ni(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function aI(e){return Ip(od(e)).left+rI(e).scrollLeft}function OY(e,t){var n=Ni(e),r=od(e),a=n.visualViewport,o=r.clientWidth,i=r.clientHeight,l=0,c=0;if(a){o=a.width,i=a.height;var f=L6();(f||!f&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}return{width:o,height:i,x:l+aI(e),y:c}}function PY(e){var t,n=od(e),r=rI(e),a=(t=e.ownerDocument)==null?void 0:t.body,o=pf(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=pf(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),l=-r.scrollLeft+aI(e),c=-r.scrollTop;return Vu(a||n).direction==="rtl"&&(l+=pf(n.clientWidth,a?a.clientWidth:0)-o),{width:o,height:i,x:l,y:c}}function oI(e){var t=Vu(e),n=t.overflow,r=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+a+r)}function V6(e){return["html","body","#document"].indexOf(eu(e))>=0?e.ownerDocument.body:ns(e)&&oI(e)?e:V6(xb(e))}function Wg(e,t){var n;t===void 0&&(t=[]);var r=V6(e),a=r===((n=e.ownerDocument)==null?void 0:n.body),o=Ni(r),i=a?[o].concat(o.visualViewport||[],oI(r)?r:[]):r,l=t.concat(i);return a?l:l.concat(Wg(xb(i)))}function CT(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function jY(e,t){var n=Ip(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Px(e,t,n){return t===j6?CT(OY(e,n)):bf(t)?jY(t,n):CT(PY(od(e)))}function LY(e){var t=Wg(xb(e)),n=["absolute","fixed"].indexOf(Vu(e).position)>=0,r=n&&ns(e)?Yv(e):e;return bf(r)?t.filter(function(a){return bf(a)&&R6(a,r)&&eu(a)!=="body"}):[]}function RY(e,t,n,r){var a=t==="clippingParents"?LY(e):[].concat(t),o=[].concat(a,[n]),i=o[0],l=o.reduce(function(c,f){var h=Px(e,f,r);return c.top=pf(h.top,c.top),c.right=Ow(h.right,c.right),c.bottom=Ow(h.bottom,c.bottom),c.left=pf(h.left,c.left),c},Px(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function W6(e){var t=e.reference,n=e.element,r=e.placement,a=r?Jl(r):null,o=r?Ep(r):null,i=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,c;switch(a){case ti:c={x:i,y:t.y-n.height};break;case as:c={x:i,y:t.y+t.height};break;case os:c={x:t.x+t.width,y:l};break;case ni:c={x:t.x-n.width,y:l};break;default:c={x:t.x,y:t.y}}var f=a?nI(a):null;if(f!=null){var h=f==="y"?"height":"width";switch(o){case Dp:c[f]=c[f]-(t[h]/2-n[h]/2);break;case tv:c[f]=c[f]+(t[h]/2-n[h]/2);break}}return c}function nv(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=r===void 0?e.placement:r,o=n.strategy,i=o===void 0?e.strategy:o,l=n.boundary,c=l===void 0?iY:l,f=n.rootBoundary,h=f===void 0?j6:f,g=n.elementContext,y=g===void 0?Dg:g,w=n.altBoundary,S=w===void 0?!1:w,D=n.padding,I=D===void 0?0:D,M=B6(typeof I!="number"?I:H6(I,Uv)),N=y===Dg?sY:Dg,B=e.rects.popper,k=e.elements[S?N:y],R=RY(bf(k)?k:k.contextElement||od(e.elements.popper),c,h,i),L=Ip(e.elements.reference),_=W6({reference:L,element:B,strategy:"absolute",placement:a}),V=CT(Object.assign({},B,_)),U=y===Dg?V:L,Z={top:R.top-U.top+M.top,bottom:U.bottom-R.bottom+M.bottom,left:R.left-U.left+M.left,right:U.right-R.right+M.right},Q=e.modifiersData.offset;if(y===Dg&&Q){var G=Q[a];Object.keys(Z).forEach(function(re){var de=[os,as].indexOf(re)>=0?1:-1,fe=[ti,as].indexOf(re)>=0?"y":"x";Z[re]+=G[fe]*de})}return Z}function _Y(e,t){t===void 0&&(t={});var n=t,r=n.placement,a=n.boundary,o=n.rootBoundary,i=n.padding,l=n.flipVariations,c=n.allowedAutoPlacements,f=c===void 0?X2:c,h=Ep(r),g=h?l?Nx:Nx.filter(function(S){return Ep(S)===h}):Uv,y=g.filter(function(S){return f.indexOf(S)>=0});y.length===0&&(y=g);var w=y.reduce(function(S,D){return S[D]=nv(e,{placement:D,boundary:a,rootBoundary:o,padding:i})[Jl(D)],S},{});return Object.keys(w).sort(function(S,D){return w[S]-w[D]})}function BY(e){if(Jl(e)===Q2)return[];var t=sw(e);return[Ox(e),t,Ox(t)]}function HY(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var a=n.mainAxis,o=a===void 0?!0:a,i=n.altAxis,l=i===void 0?!0:i,c=n.fallbackPlacements,f=n.padding,h=n.boundary,g=n.rootBoundary,y=n.altBoundary,w=n.flipVariations,S=w===void 0?!0:w,D=n.allowedAutoPlacements,I=t.options.placement,M=Jl(I),N=M===I,B=c||(N||!S?[sw(I)]:BY(I)),k=[I].concat(B).reduce(function(Re,Fe){return Re.concat(Jl(Fe)===Q2?_Y(t,{placement:Fe,boundary:h,rootBoundary:g,padding:f,flipVariations:S,allowedAutoPlacements:D}):Fe)},[]),R=t.rects.reference,L=t.rects.popper,_=new Map,V=!0,U=k[0],Z=0;Z=0,fe=de?"width":"height",$=nv(t,{placement:Q,boundary:h,rootBoundary:g,altBoundary:y,padding:f}),he=de?re?os:ni:re?as:ti;R[fe]>L[fe]&&(he=sw(he));var se=sw(he),ue=[];if(o&&ue.push($[G]<=0),l&&ue.push($[he]<=0,$[se]<=0),ue.every(function(Re){return Re})){U=Q,V=!1;break}_.set(Q,ue)}if(V)for(var X=S?3:1,oe=function(Fe){var Be=k.find(function(Xe){var Ze=_.get(Xe);if(Ze)return Ze.slice(0,Fe).every(function(st){return st})});if(Be)return U=Be,"break"},De=X;De>0;De--){var je=oe(De);if(je==="break")break}t.placement!==U&&(t.modifiersData[r]._skip=!0,t.placement=U,t.reset=!0)}}const $6={name:"flip",enabled:!0,phase:"main",fn:HY,requiresIfExists:["offset"],data:{_skip:!1}};function jx(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Lx(e){return[ti,os,as,ni].some(function(t){return e[t]>=0})}function UY(e){var t=e.state,n=e.name,r=t.rects.reference,a=t.rects.popper,o=t.modifiersData.preventOverflow,i=nv(t,{elementContext:"reference"}),l=nv(t,{altBoundary:!0}),c=jx(i,r),f=jx(l,a,o),h=Lx(c),g=Lx(f);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:f,isReferenceHidden:h,hasPopperEscaped:g},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":g})}const Z6={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:UY};function YY(e,t,n){var r=Jl(e),a=[ni,ti].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=o[0],l=o[1];return i=i||0,l=(l||0)*a,[ni,os].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}function zY(e){var t=e.state,n=e.options,r=e.name,a=n.offset,o=a===void 0?[0,0]:a,i=X2.reduce(function(h,g){return h[g]=YY(g,t.rects,o),h},{}),l=i[t.placement],c=l.x,f=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=i}const q6={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:zY};function VY(e){var t=e.state,n=e.name;t.modifiersData[n]=W6({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const G6={name:"popperOffsets",enabled:!0,phase:"read",fn:VY,data:{}};function WY(e){return e==="x"?"y":"x"}function $Y(e){var t=e.state,n=e.options,r=e.name,a=n.mainAxis,o=a===void 0?!0:a,i=n.altAxis,l=i===void 0?!1:i,c=n.boundary,f=n.rootBoundary,h=n.altBoundary,g=n.padding,y=n.tether,w=y===void 0?!0:y,S=n.tetherOffset,D=S===void 0?0:S,I=nv(t,{boundary:c,rootBoundary:f,padding:g,altBoundary:h}),M=Jl(t.placement),N=Ep(t.placement),B=!N,k=nI(M),R=WY(k),L=t.modifiersData.popperOffsets,_=t.rects.reference,V=t.rects.popper,U=typeof D=="function"?D(Object.assign({},t.rects,{placement:t.placement})):D,Z=typeof U=="number"?{mainAxis:U,altAxis:U}:Object.assign({mainAxis:0,altAxis:0},U),Q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,G={x:0,y:0};if(L){if(o){var re,de=k==="y"?ti:ni,fe=k==="y"?as:os,$=k==="y"?"height":"width",he=L[k],se=he+I[de],ue=he-I[fe],X=w?-V[$]/2:0,oe=N===Dp?_[$]:V[$],De=N===Dp?-V[$]:-_[$],je=t.elements.arrow,Re=w&&je?tI(je):{width:0,height:0},Fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:_6(),Be=Fe[de],Xe=Fe[fe],Ze=Vg(0,_[$],Re[$]),st=B?_[$]/2-X-Ze-Be-Z.mainAxis:oe-Ze-Be-Z.mainAxis,Ct=B?-_[$]/2+X+Ze+Xe+Z.mainAxis:De+Ze+Xe+Z.mainAxis,tn=t.elements.arrow&&Yv(t.elements.arrow),_e=tn?k==="y"?tn.clientTop||0:tn.clientLeft||0:0,et=(re=Q==null?void 0:Q[k])!=null?re:0,nt=he+st-et-_e,ht=he+Ct-et,St=Vg(w?Ow(se,nt):se,he,w?pf(ue,ht):ue);L[k]=St,G[k]=St-he}if(l){var Tt,Gt=k==="x"?ti:ni,_t=k==="x"?as:os,Vt=L[R],Xt=R==="y"?"height":"width",dn=Vt+I[Gt],en=Vt-I[_t],Zn=[ti,ni].indexOf(M)!==-1,Dn=(Tt=Q==null?void 0:Q[R])!=null?Tt:0,Er=Zn?dn:Vt-_[Xt]-V[Xt]-Dn+Z.altAxis,pt=Zn?Vt+_[Xt]+V[Xt]-Dn-Z.altAxis:en,Mt=w&&Zn?TY(Er,Vt,pt):Vg(w?Er:dn,Vt,w?pt:en);L[R]=Mt,G[R]=Mt-Vt}t.modifiersData[r]=G}}const J6={name:"preventOverflow",enabled:!0,phase:"main",fn:$Y,requiresIfExists:["offset"]};function ZY(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function qY(e){return e===Ni(e)||!ns(e)?rI(e):ZY(e)}function GY(e){var t=e.getBoundingClientRect(),n=Tp(t.width)/e.offsetWidth||1,r=Tp(t.height)/e.offsetHeight||1;return n!==1||r!==1}function JY(e,t,n){n===void 0&&(n=!1);var r=ns(t),a=ns(t)&&GY(t),o=od(t),i=Ip(e,a,n),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((eu(t)!=="body"||oI(o))&&(l=qY(t)),ns(t)?(c=Ip(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=aI(o))),{x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}}function KY(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function a(o){n.add(o.name);var i=[].concat(o.requires||[],o.requiresIfExists||[]);i.forEach(function(l){if(!n.has(l)){var c=t.get(l);c&&a(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||a(o)}),r}function QY(e){var t=KY(e);return vY.reduce(function(n,r){return n.concat(t.filter(function(a){return a.phase===r}))},[])}function XY(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function ez(e){var t=e.reduce(function(n,r){var a=n[r.name];return n[r.name]=a?Object.assign({},a,r,{options:Object.assign({},a.options,r.options),data:Object.assign({},a.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Rx={placement:"bottom",modifiers:[],strategy:"absolute"};function _x(){for(var e=arguments.length,t=new Array(e),n=0;n({placement:e,modifiers:[{name:"flip",options:{allowedAutoPlacements:t,rootBoundary:"document"}},{name:"preventOverflow",options:{rootBoundary:"document"}}]}),hz=e=>{const n=P.useRef(null),[r,a]=P.useState(null),[o,i]=P.useState(0);let l,c;const f=()=>{if(x.Platform.isMobile){l="right-end",c=["bottom"];return}const g=window.innerWidth-o>280*1.2,y=window.innerWidth-o<280,w=window.innerWidth>280*1.5;if(e.DefaultEditorLocation!=="Bottom"){g?(l="right-end",c=["left-end"]):y&&w?(l="left-end",c=["right-end"]):(l="bottom",c=["bottom"]);return}g?(l="top-end",c=["top-start"]):y&&o>280?(l="top-start",c=["top-end"]):(l="top",c=["top"])};P.useEffect(()=>{e&&f()},[o,e==null?void 0:e.DefaultEditorLocation]);const h=Mb(n.current,r,fz(l,c));return{setPosX:i,popperRef:n,setPopperElement:a,popper:h}},pz=()=>{const e=new Set,t=at.getState().query.filter,n=at.getState().query.tag,r=on.getQueryById(t||"");if(r&&r.querystring){const a=JSON.parse(r.querystring);if(Array.isArray(a))for(const o of a)o.type==="TAG"&&o.value&&o.value.operator==="CONTAIN"&&e.add(o.value.value)}return n&&e.add(n),Array.from(e)},mz=e=>{const{offsetLeft:t,offsetTop:n,offsetHeight:r,offsetWidth:a,selectionEnd:o}=e,i=document.createElement("div"),l=window.getComputedStyle(e);for(const D of l)i.style.setProperty(D,l.getPropertyValue(D));i.style.position="fixed",i.style.visibility="hidden",i.style.whiteSpace="pre-wrap";const f=e.tagName==="INPUT"?e.value.replace(/ /g,"."):e.value;i.textContent=f.substring(0,o||0),e.tagName==="TEXTAREA"&&(i.style.height="auto");const h=document.createElement("span");h.textContent=f.substring(o||0)||".",i.appendChild(h),document.body.appendChild(i);const{offsetLeft:g,offsetTop:y,offsetHeight:w,offsetWidth:S}=h;return document.body.removeChild(i),{x:t+g,y:n+y,h:r+w,w:a+S}},mf=({className:e,editorType:t,destroy:n,modal:r})=>{const{globalState:a,dailyNotesState:{app:o,settings:i,view:l,verifyState:c}}=P.useContext(Lt),[f,h]=Xl(!0),g=P.useRef(f),[y,w]=xo(!0),S=P.useRef(null),D=P.useRef(null),I=P.useRef(a),[M,N]=xo(!1),[B,k]=xo(!1),{setPosX:R,popperRef:L,setPopperElement:_,popper:V}=hz(i),[U]=xo(parseInt(x.moment().format("x"))),Z=P.useRef(null),[Q,G]=xo((i==null?void 0:i.EnabledLocationList.length)===1?i==null?void 0:i.EnabledLocationList[0].value:(i==null?void 0:i.MemoSaveLocation)||"DAILY"),re=P.useRef(i.MemoSaveLocation||"DAILY");P.useEffect(()=>{g.current=f},[f]),P.useEffect(()=>{!D.current||!o||!l||(l.registerEvent(o.workspace.on("focus-on-textarea",_e=>{var et;(et=D.current)==null||et.focus(_e==null?void 0:_e.id)})),l.registerEvent(o.workspace.on("blur-on-memos",()=>{var _e;(_e=D.current)==null||_e.blur()})),l.registerEvent(o.workspace.on("send-to-thino",async(_e,et)=>{var nt,ht;if(typeof _e=="string")(nt=D.current)==null||nt.insertText(_e+`
-`,et.id);else{const St=_e.toPNG(),Tt=new Blob([St],{type:"image/png"}),Gt=new File([Tt],"image.png",{type:"image/png",lastModified:Date.now()});if(!Gt)return;const _t=await ue(Gt);_t&&((ht=D.current)==null||ht.insertText(_t+`
-`,et.id))}})))},[D,l,o]),P.useEffect(()=>{i&&h(i.DefaultPrefix==="List")},[i==null?void 0:i.DefaultPrefix]),P.useEffect(()=>{if(i){if(i.EnabledLocationList.length===1){G(i.EnabledLocationList[0].value);return}G(i.MemoSaveLocation||"DAILY")}},[i==null?void 0:i.MemoSaveLocation,i==null?void 0:i.EnabledLocationList]),P.useEffect(()=>{var nt;if(!i||!Z.current)return;const _e=(nt=Qg.find(ht=>ht.title===Q))==null?void 0:nt.icon;x.setIcon(Z.current,_e),x.requireApiVersion("1.4.4")&&x.setTooltip(Z.current,E("Thino Save To: ")+Q),re.current=Q;const et=a.manifest;if(et){const ht=o==null?void 0:o.plugins.getPlugin(et.id);if(ht){if(ht.settings.MemoSaveLocation===Q)return;ht.settings.MemoSaveLocation=Q,ht.saveSettings()}}},[Q,y]),P.useEffect(()=>{D.current&&i.MemoSaveLocation&&G(i.MemoSaveLocation)},[Z,i]),P.useEffect(()=>{if(!D.current||!i||x.Platform.isDesktop||a.globalEditorShown)return;const _e=i.UseButtonToShowEditor&&i.DefaultEditorLocation==="Bottom";if(x.Platform.isDesktop){w(!0);return}if(t&&t==="inline"){w(!0);return}if(w(x.Platform.isMobile&&!_e),!_e||a.memoListView==="chat")return;const et=document.body.find(".memolist-scrollview");et&&(et.onscroll=()=>{if(a.globalEditorShown)return;if(!a.memoListView&&dt.getState().memoListView==="chat"){et.onscroll=null;return}const nt=D.current.getContent();x.Platform.isMobile&&_e&&!nt&&w(!1)})},[a.globalEditorShown,t,D]);const de=()=>{k(!1)};P.useEffect(()=>{var _e,et,nt,ht,St,Tt,Gt,_t,Vt;if(o&&(a.markMemoId||(_e=a.editMemoId)!=null&&_e.trim()&&a.editMemoId!==I.current.editMemoId)){const Xt=o.workspace.getLeavesOfType("thino_view");Xt.length>0&&o.workspace.revealLeaf(Xt[0])}if(a.markMemoId){const Xt=`${E("MARK")}: [@THINO](${a.markMemoId})`;(et=D.current)==null||et.insertText(Xt),(nt=D.current)==null||nt.focus(),dt.setMarkMemoId("");return}if((ht=a.editMemoId)!=null&&ht.trim()&&a.editMemoId!==I.current.editMemoId){const Xt=we.getMemoById(a.editMemoId);if(Xt)switch(h(Xt.thinoType==="JOURNAL"),i.EditorType){case"memos":(St=D.current)==null||St.setContent(Xt.content.replace(/ \^\S{6}$/,"")||""),(Tt=D.current)==null||Tt.focus();break;case"obsidian":(Gt=D.current)==null||Gt.clear(),(_t=D.current)==null||_t.setContent(Xt.content.replace(/ \^\S{6}$/,"")||""),(Vt=D.current)==null||Vt.focus();break}}I.current=a},[a.markMemoId,a.editMemoId]),P.useEffect(()=>{var _e,et,nt;!D.current||M||i.EditorType==="memos"&&((_e=D.current)==null||_e.element.addEventListener("paste",fe),(et=D.current)==null||et.element.addEventListener("drop",$),(nt=D.current)==null||nt.element.addEventListener("click",he),N(!0))},[D.current]);const fe=async _e=>{var et;if(_e.clipboardData&&_e.clipboardData.files.length>0){_e.preventDefault();const nt=_e.clipboardData.files;for(const ht of nt){const St=await ue(ht);St&&((et=D.current)==null||et.insertText(St))}}},$=async _e=>{var et;if(_e.dataTransfer&&_e.dataTransfer.files.length>0){_e.preventDefault();const nt=_e.dataTransfer.files;for(const ht of nt){const St=await ue(ht);St&&((et=D.current)==null||et.insertText(St))}}},he=()=>{var _e;De(((_e=D.current)==null?void 0:_e.element.value)||"")},se=async(_e,et)=>{var St,Tt,Gt;const nt=_e.ctrlKey||_e.metaKey,ht=_e.altKey;if(_e.key==="Escape"&&a.globalEditorShown&&(dt.setGlobalEditorShown(!1),_e.preventDefault()),nt&&_e.key==="Enter"){_e.preventDefault(),_e.stopPropagation(),et?(await X((Tt=D.current)==null?void 0:Tt.getContent()),(Gt=D.current)==null||Gt.clear()):await X((St=D.current)==null?void 0:St.element.value);return}if(ht)for(let _t=0;_t{var _t;et||De(((_t=D.current)==null?void 0:_t.element.value)||"")})},ue=P.useCallback(async _e=>{const{type:et}=_e;if(et.startsWith("image"))try{return`${await q2.upload(_e)}`}catch(nt){new x.Notice(nt)}},[]),X=async _e=>{if(!_e||_e.trim()===""){new x.Notice(E("Content cannot be empty"));return}const et=ft.getState().settings,nt=et==null?void 0:et.addTagAutomatically,ht=et==null?void 0:et.addTagWithNewline,St=et==null?void 0:et.addTagPosition,Gt=(pz()||[]).filter(dn=>!_e.includes(`#${dn}`)),_t=async(dn,en)=>{en=en.replaceAll(" "," "),k0("");try{if(!dn){let Dn;switch(re.current){case"CANVAS":Dn=await we.createMemoCanvas({text:en,isList:g.current});break;case"MULTI":Dn=await we.createMemoMultiFile({content:en,isList:g.current});break;case"DAILY":Dn=await we.createMemoDaily(en,g.current);break;case"FILE":Dn=await we.createMemoSingleFile({content:en,isList:g.current});break}if(!Dn)return;we.pushMemo(Dn),(!nt||Gt.length===0)&&at.clearQuery();const Er=o||ft.getState().app,pt=Er==null?void 0:Er.loadLocalStorage("tokenForSync");Dn&&pt&&i.startSync&&setTimeout(async()=>{try{if(re.current!=="DAILY"){const Mt=await N2({content:en,thinoType:"FILE",thinoStatus:Dn.thinoType==="JOURNAL"?"JOURNAL":Dn.thinoType==="TASK-TODO"?"TASK-TODO":"TASK-DONE"});await we.updateMemoById(Dn.id,Mt,!0)}}catch(Mt){console.error(Mt)}},200);return}const Zn=we.getMemoById(dn);if(Zn&&(Zn.content!==en||Zn.thinoType!==(g.current?"JOURNAL":"TASK-TODO"))){const Dn=await we.updateMemo(Zn.id,en,g.current?"JOURNAL":Zn.thinoType.startsWith("TASK")?Zn.thinoType:"TASK-TODO");Dn.updatedAt=ut.getDateTimeString(Date.now()),we.editMemo(Dn)}dt.setEditMemoId("")}catch(Zn){new x.Notice(Zn.message)}};n&&n();const{editMemoId:Vt}=dt.getState(),Xt=Gt&&Gt.length>0&&nt&&!Vt?St==="Beginning"?`${Gt.map(dn=>`#${dn}`).join(" ")} ${ht?`
-`:""}${_e}`:`${_e} ${ht?`
-`:""}${Gt.map(dn=>`#${dn}`).join(" ")}`:_e;await _t(Vt,Xt),k0("")},oe=P.useCallback(()=>{var _e;dt.setEditMemoId(""),(_e=D.current)==null||_e.setContent(""),k0("")},[]),De=P.useCallback(_e=>{if(k0(_e??""),!D.current)return;const et=D.current.getContent(),nt=D.current.element.selectionStart,ht=et.slice(0,nt),St=et.slice(nt);(ht.endsWith("@")||ht.endsWith("📆"))&&St.startsWith(" ")||(ht.endsWith("@")||ht.endsWith("📆"))&&St===""?(Ze(),k(!0)):k(!1),setTimeout(()=>{var Tt;(Tt=D.current)==null||Tt.focus()})},[i.EditorType]),je=_e=>{if(!D.current||!i)return;_e&&(de(),h(!1));const et=D.current.getContent(),nt=D.current.element.selectionStart,ht=et.slice(0,nt),St=et.slice(nt),Tt=x.moment(_e);if(ht.endsWith("@"))switch(i.InsertDateFormat){case"Dataview":D.current.element.value=et.slice(0,D.current.element.selectionStart-1)+"[due:: "+Tt.format("YYYY-MM-DD")+"]"+St,D.current.element.setSelectionRange(nt+17,nt+17),D.current.focus(),De(D.current.element.value);break;case"Tasks":D.current.element.value=et.slice(0,D.current.element.selectionStart-1)+"📅 "+Tt.format("YYYY-MM-DD")+St,D.current.element.setSelectionRange(nt+11,nt+11),D.current.focus(),De(D.current.element.value)}else{D.current.element.value=ht+Tt.format("YYYY-MM-DD")+St,D.current.element.setSelectionRange(nt+10,nt+10),D.current.focus(),De(D.current.element.value);return}},Re=()=>{D.current&&h()},Fe=async()=>{var nt;const _e=!x.Platform.isDesktop&&await((nt=window.Capacitor)==null?void 0:nt.Plugins.Device.getId()),et=x.Platform.isDesktop?await cr():_e.identifier||_e.uuid;return!c||(c==null?void 0:c.appId)!==et?(fn(),!1):!0},Be=async _e=>{if(!await Fe())return;const et=new x.Menu;i.EnabledLocationList.forEach(Tt=>{et.addItem(Gt=>{var _t;Gt.setTitle(E(Tt.value)).setIcon(((_t=Qg.find(Vt=>Vt.title===Tt.value))==null?void 0:_t.icon)??"file").setChecked(Q===Tt.value).onClick(()=>{G(Tt.value)})})});let nt=_e.target,ht=null;for(;!nt.hasClass("location-wrapper")&&(ht=nt.parentElement,ht);)nt=ht;const St=nt.getBoundingClientRect();setTimeout(()=>{et.showAtPosition({x:St.x,y:St.bottom,width:St.width,left:!1,overlap:!0})},200)},Xe=P.useCallback(()=>{var _e,et;if(!(!D.current&&i.EditorType==="memos"))switch(i.EditorType){case"obsidian":(_e=D.current)==null||_e.focus(),(et=D.current)==null||et.insertTag();break;case"memos":{const nt=D.current.getContent(),ht=D.current.element.selectionStart,St=nt.slice(0,ht),Tt=nt.slice(ht);let Gt=St+"# "+Tt,_t=St.length+1;St.endsWith("#")&&Tt.startsWith(" ")&&(Gt=St.slice(0,St.length-1)+Tt.slice(1),_t=St.length-1),D.current.element.value=Gt,D.current.element.setSelectionRange(_t,_t),D.current.focus();const Vt=new Event("input",{bubbles:!0,cancelable:!0});D.current.element.dispatchEvent(Vt),De(D.current.element.value)}}},[o]),Ze=P.useCallback(()=>{if(!D.current||!L.current||!i||!o)return;const nt=o.workspace.getLeavesOfType(lo)[0].view.containerEl,ht=280,St=nt.clientWidth,{x:Tt,y:Gt}=mz(D.current.element);let _t,Vt;x.Platform.isMobile?(window.innerWidth-Tt>ht?_t=(Tt+ht+16>St,Tt+18):window.innerWidth-TtSt,Tt+34):_t=D.current.element.clientWidth/2,i.DefaultEditorLocation==="Bottom"&&window.innerWidth>875?Vt=Gt+4:i.DefaultEditorLocation==="Bottom"&&window.innerWidth<=875?Vt=Gt+19:i.DefaultEditorLocation==="Top"&&window.innerWidth<=875&&(Vt=Gt+36)):(_t=(Tt+ht+16>St,Tt+18),Vt=Gt+34),R(Tt),L.current.style.left=`${_t}px`,L.current.style.top=`${Vt}px`},[i,o]),st=P.useCallback(()=>{const _e=document.createElement("input");document.body.appendChild(_e),_e.type="file",_e.multiple=!1,_e.accept="image/png, image/gif, image/jpeg",_e.onchange=async()=>{var ht;if(!_e.files||_e.files.length===0)return;const et=_e.files[0],nt=await ue(et);nt&&((ht=D.current)==null||ht.insertText(nt)),document.body.removeChild(_e)},_e.click()},[]),Ct=!!a.editMemoId,tn=P.useMemo(()=>({className:"memo-editor",inputerType:i.EditorType||"obsidian",modal:r,initialContent:gz(),placeholder:E("What do you think now..."),showConfirmBtn:!0,showCancelBtn:Ct,showTools:!0,onConfirmBtnClick:X,onCancelBtnClick:oe,onContentChange:De}),[Ct,i.EditorType]);return v.jsxs(v.Fragment,{children:[!a.globalEditorShown&&t==="block"&&v.jsx("div",{ref:_e=>{S.current=_e,_e&&x.setIcon&&x.setIcon(_e,"plus-circle")},className:`memo-show-editor-button ${y?"thino-hidden":""}`,onClick:()=>{var _e;(_e=S.current.firstElementChild)==null||_e.toggleClass("rotate-hidden",!0),setTimeout(()=>{w(!0),S.current.firstElementChild.toggleClass("rotate-hidden",!1)},500),setTimeout(()=>{var et;(et=D.current)==null||et.focus()},600)}}),v.jsxs("div",{className:`memo-editor-wrapper ${e||""} ${Ct?"edit-ing":""} ${a.globalEditorShown?"fullscreen-editor":""} ${y?"":"thino-hidden"}`,onKeyDownCapture:_e=>se(_e,!0),children:[v.jsx("span",{className:`tip-text ${Ct?"":"thino-hidden"}`,children:"Modifying..."}),v.jsx(nY,{ref:D,...tn,tools:v.jsxs(v.Fragment,{children:[v.jsx("span",{ref:_e=>{_e&&x.setIcon(_e,"hash")},className:"btn action-btn add-tag",onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!a.globalEditorShown&&Xe()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||a.globalEditorShown)&&Xe()}}),v.jsx("span",{ref:_e=>{_e&&x.setIcon(_e,"paperclip")},className:"btn action-btn file-upload",onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!a.globalEditorShown&&st()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||a.globalEditorShown)&&st()}}),a.editMemoId===""&&v.jsx("span",{ref:_e=>{_e&&x.setIcon(_e,f?"layout-list":"check-square")},className:ar("btn action-btn list-or-task",f?"list":"task"),onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!a.globalEditorShown&&Re()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||a.globalEditorShown)&&Re()}}),v.jsx("div",{ref:_e=>{_e&&(x.setIcon&&x.setIcon(_e,a.globalEditorShown?"shrink":"expand"),x.setTooltip&&x.setTooltip(_e,a.globalEditorShown?E("Exit fullscreen mode"):E("Enter fullscreen mode")))},className:"action-btn show-editor pro",onPointerDown:async()=>{await Fe()&&(w(!0),dt.setGlobalEditorShown(!a.globalEditorShown))}}),v.jsx("div",{className:"action-btn split-line pro"}),v.jsx("div",{className:"action-btn location-wrapper pro",onClick:async _e=>{i&&i.DefaultEditorLocation==="Top"&&!a.globalEditorShown&&await Be(_e)},onPointerDown:async _e=>{(i&&i.DefaultEditorLocation==="Bottom"||a.globalEditorShown)&&await Be(_e)},children:v.jsx("div",{ref:Z,className:"action-btn file-location-btn"})})]})}),v.jsx("div",{ref:L,className:"date-picker",children:B&&v.jsx("div",{tabIndex:-1,style:V.styles.popper,...V.attributes.popper,ref:_,role:"dialog",children:v.jsx(Cb,{className:`editor-date-picker ${B?"":"thino-hidden"}`,datestamp:U,handleDateStampChange:je})})})]})]})};function gz(){return la.get(["thinoEditorContentCache"]).thinoEditorContentCache??""}function k0(e){la.set({thinoEditorContentCache:e})}const vz=e=>{const t=[];return e.map(n=>{t.length==0?t.push({date:x.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),have:[n]}):t.some(a=>{if(a.date==x.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"))return a.have.push(n),!0})||t.push({date:x.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),have:[n]})}),t},yz=e=>we.getState().commentMemos.filter(t=>t.linkId===e.hasId).sort((t,n)=>ut.getTimeStampByDate(t.createdAt)-ut.getTimeStampByDate(n.createdAt)).map(t=>({...t,createdAtStr:ut.getDateTimeString(t.createdAt),dateStr:ut.getDateString(t.createdAt)})),wz=e=>{const t=ft.getState().settings,n=vR(),r=t!=null&&t.ShowDate?" ":"",a="YYYY/MM/DD HH:mm:ss",o=/comment:(.*)$/g,i=/^\d{14}/g,l=(g,y,w)=>{const S=x.moment(g.createdAt,a).format("HH:mm");return w?w.replace(/{TIME}/g,S).replace(/{CONTENT}/g,y):`${S} ${y}`},c=g=>{const y=g.match(/TASK-(.*)?/g);return y?y[1]:""},f=g=>g==="TASK-TODO"?"- [ ] ":g==="TASK-DONE"?"- [x] ":g.match(/TASK-(.*)?/g)?`- [${c(g)}] `:"- ",h=g=>g.reduce((y,w)=>{const S=w.sourceType!=="MULTI"?`${w.content}`:`[[${w.path}]]`,D=t!=null&&t.ShowTime?l(w,S,t==null?void 0:t.DefaultMemoComposition):S,I=`${f(w.thinoType)}${D}`;let M="";return t.CommentOnMemos&&w.hasId!==void 0&&w.hasId!==""&&(M=yz(w).reduce((B,k)=>{const R=f(k.thinoType),L=k.content.replace(o,"").replace(i,""),_=t!=null&&t.ShowDate?`${R}[[${x.moment(k.createdAt).format(n)}]] ${x.moment(k.createdAt).format("HH:mm")} ${L}`:`${R}${L}`;return B+r+" "+_+`
-`},"")),y+r+I.replace(/ \^\S{6}/g,"")+`
-`+M},"");return e.reduce((g,y)=>{const w=t!=null&&t.ShowDate?`- [[${x.moment(y.date,"YYYY-MM-DD").format(n)}]]
-`:"",S=h(y.have),D=t!=null&&t.ShowDate&&(t!=null&&t.AddBlankLineWhenDate)&&!(t!=null&&t.CommentOnMemos)?`
-`:"";return g+w+S+D},"").replace(/ /g,`
- `)},bz=[{label:E("Today"),value:x.moment().format("YYYY-MM-DD")},{label:E("Yesterday"),value:x.moment().subtract(1,"days").format("YYYY-MM-DD")},{label:E("Last 7 days"),value:x.moment().subtract(7,"days").format("YYYY-MM-DD")},{label:E("Last 30 days"),value:x.moment().subtract(30,"days").format("YYYY-MM-DD")},{label:E("Last 90 days"),value:x.moment().subtract(90,"days").format("YYYY-MM-DD")},{label:E("Last 180 days"),value:x.moment().subtract(180,"days").format("YYYY-MM-DD")},{label:E("Last 365 days"),value:x.moment().subtract(365,"days").format("YYYY-MM-DD")}],X6=e=>{const{handleValueChange:t,setShownStatus:n}=e;return v.jsxs(v.Fragment,{children:[e.type==="icon"&&v.jsx("div",{className:"quick-date-btn-group",children:bz.map((r,a)=>v.jsx("div",{className:"btn action-btn quick-date-btn",onClick:()=>{t(r.value),n&&n(!1)},children:r.label},a))}),v.jsx(Cb,{className:"calendar-date-picker",datestamp:(e==null?void 0:e.defaultValue)||x.moment().startOf("day").valueOf(),handleDateStampChange:(r,a)=>{t(e.type==="icon"?x.moment(r).format("YYYY-MM-DD"):r.toString()),n&&n(!1)}})]})},Pw=e=>{const{handleValueChange:t}=e,[n,r]=ne.useState(!1),a=ne.useRef(null),o=ne.useRef(null),i=Mb(o.current,a.current,{placement:"bottom-start"});return Hv(a,()=>{r(!1)}),v.jsxs(v.Fragment,{children:[v.jsx("span",{ref:c=>{o.current=c,c&&e.type==="icon"&&x.setIcon(c,"calendar")},className:`btn calendar-btn ${e.type==="icon"?"icon-btn":"text-btn"}`,onClick:()=>{!x.Platform.isMobile&&r(!n),!x.Platform.isMobile&&(i!=null&&i.update)&&(i==null||i.update()),x.Platform.isMobile&&new e9(ft.getState().app,e.type,t).open()},children:e.type==="text"&&e.defaultValue?e.defaultText?e.defaultText:x.moment(e.defaultValue,"x").subtract(e.startOrEnd==="end"?1:0,"days").format("YYYY/MM/DD"):""}),v.jsx("div",{className:`menu-btns-popup ${n?"":"thino-hidden"}`,ref:a,style:i.styles.popper,children:v.jsx(X6,{type:e.defaultText?"icon":e.type,handleValueChange:t,setShownStatus:r})})]})};class e9 extends x.Modal{constructor(n,r,a){super(n);Se(this,"root");Se(this,"type");Se(this,"handleValueChange");this.type=r,this.handleValueChange=a}onOpen(){const{contentEl:n}=this;this.root=Rv(n),this.root.render(v.jsx(X6,{type:this.type,handleValueChange:this.handleValueChange.bind(this),setShownStatus:r=>{!r&&this.close()}}))}onClose(){var n;(n=this.root)==null||n.unmount()}}const Sz=(e,t)=>(e%t+t)%t;class Dz{constructor(t,n,r){Se(this,"owner");Se(this,"values");Se(this,"suggestions");Se(this,"selectedItem");Se(this,"containerEl");this.owner=t,this.containerEl=n,n.on("click",".suggestion-item",this.onSuggestionClick.bind(this)),n.on("mousemove",".suggestion-item",this.onSuggestionMouseover.bind(this)),r.register([],"ArrowUp",a=>{if(!a.isComposing)return this.setSelectedItem(this.selectedItem-1,!0),!1}),r.register([],"ArrowDown",a=>{if(!a.isComposing)return this.setSelectedItem(this.selectedItem+1,!0),!1}),r.register([],"Enter",a=>{if(!a.isComposing)return this.useSelectedItem(a),!1})}onSuggestionClick(t,n){t.preventDefault();const r=this.suggestions.indexOf(n);this.setSelectedItem(r,!1),this.useSelectedItem(t)}onSuggestionMouseover(t,n){const r=this.suggestions.indexOf(n);this.setSelectedItem(r,!1)}setSuggestions(t){this.containerEl.empty();const n=[];t.forEach(r=>{const a=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(r,a),n.push(a)}),this.values=t,this.suggestions=n,this.setSelectedItem(0,!1)}useSelectedItem(t){const n=this.values[this.selectedItem];n&&this.owner.selectSuggestion(n,t)}setSelectedItem(t,n){const r=Sz(t,this.suggestions.length),a=this.suggestions[this.selectedItem],o=this.suggestions[r];a==null||a.removeClass("is-selected"),o==null||o.addClass("is-selected"),this.selectedItem=r,n&&o.scrollIntoView(!1)}}class t9{constructor(t,n){Se(this,"inputEl");Se(this,"popper");Se(this,"scope");Se(this,"suggestEl");Se(this,"suggest");Se(this,"cb");this.inputEl=t,this.scope=new x.Scope,this.cb=n,this.suggestEl=createDiv("suggestion-container");const r=this.suggestEl.createDiv("suggestion");this.suggest=new Dz(this,r,this.scope),this.scope.register([],"Escape",this.close.bind(this)),this.inputEl.addEventListener("input",this.onInputChanged.bind(this)),this.inputEl.addEventListener("focus",this.onInputChanged.bind(this)),this.inputEl.addEventListener("click",this.onInputChanged.bind(this)),this.inputEl.addEventListener("blur",this.close.bind(this)),this.suggestEl.on("mousedown",".suggestion-container",a=>{a.preventDefault()})}clearInput(){this.inputEl.value="",this.inputEl.trigger("blur"),this.inputEl.trigger("focus"),this.inputEl.trigger("input"),this.onInputChanged()}onInputChanged(){const t=this.inputEl.value,n=this.getSuggestions(t);if(!n){this.close();return}n.length>0?(this.suggest.setSuggestions(n),this.open(app.dom.appContainerEl,this.inputEl)):this.close()}open(t,n){app.keymap.pushScope(this.scope),t.appendChild(this.suggestEl),this.popper=Q6(n,this.suggestEl,{placement:"bottom-start",modifiers:[{name:"sameWidth",enabled:!0,fn:({state:r,instance:a})=>{const o=`${r.rects.reference.width}px`;r.styles.popper.width!==o&&(r.styles.popper.width=o,a.update())},phase:"beforeWrite",requires:["computeStyles"]}]})}close(){app.keymap.popScope(this.scope),this.suggest.setSuggestions([]),this.popper&&this.popper.destroy(),this.suggestEl.detach()}destroy(){this.inputEl.removeEventListener("input",this.onInputChanged.bind(this)),this.inputEl.removeEventListener("focus",this.onInputChanged.bind(this)),this.inputEl.removeEventListener("blur",this.close.bind(this)),this.close()}updateCb(t){this.cb=t}}const Tz=e=>{const t=e.metadataCache.getTags();return[...Object.keys(t)].map(n=>n.split("#").pop())};let rv=class extends t9{fuzzySearchItemsOptimized(t,n){const r=x.prepareFuzzySearch(t);return n.map(a=>{const o=r(a);return o?{item:a,match:o,score:o.score}:null}).sort((a,o)=>(o==null?void 0:o.score)-(a==null?void 0:a.score)).filter(Boolean)}getSuggestions(t){const{settings:n,app:r}=ft.getState(),a=t.toLocaleLowerCase(),o=n.UseVaultTags?Tz(r):we.getState().tags;return this.fuzzySearchItemsOptimized(a,o).map(i=>i.item)}renderSuggestion(t,n){n.toggleClass("thino-image-suggest-item",!0),n.createSpan({cls:"suggestion-name",text:t})}selectSuggestion(t){this.inputEl.value=t,this.cb&&this.cb(t),this.inputEl.dispatchEvent(new Event("change")),this.inputEl.trigger("change"),this.close()}};const Iz=e=>{const t=new Set;return e.forEach(n=>{const r=new RegExp($r).exec(n.content),a=new RegExp(ua).exec(n.content);if(r)for(let o=1;o{const[t,n]=ne.useState([]),r=ne.useRef(null),a=ne.useRef(null);P.useEffect(()=>{if(a.current){if(r.current){r.current.updateCb(o);return}r.current=new rv(a.current,o)}},[a.current,t]);const o=l=>{if(!l)return;const c=new Set(t);c.add(l),n(Array.from(c)),r.current.clearInput()},i=()=>{e(t)};return v.jsxs("div",{className:"thino-tag-operation",children:[v.jsx("div",{className:"tag-operation-title",children:E("Tag Bulk Select")}),v.jsxs("div",{className:"tag-operation-content",children:[v.jsxs("div",{className:"tag-operation-content-title selected-tags",children:[v.jsx("div",{className:"name",children:E("Selected Tags")}),v.jsx("div",{className:"desc",children:E("Click to remove selected tag")})]}),v.jsx("div",{className:"tag-operation-content-tags selected-tags",children:t.map(l=>v.jsx("div",{className:"tag-operation-content-tag",onClick:()=>{n(t.filter(c=>c!==l))},children:l},l))}),v.jsx("div",{className:"tag-operation-content-inputer",children:v.jsx("input",{placeholder:E("Input to select exist tag"),ref:a,onKeyDown:l=>{l.key==="Enter"&&o(a.current.value)}})}),v.jsxs("div",{className:"tag-operation-content-btn-group",children:[v.jsx("button",{className:"cancel-btn",onClick:()=>{e([])},children:E("Cancel")}),v.jsx("button",{className:"save-btn",onClick:i,children:E("Save")})]})]})]})},xz=({app:e,thinos:t,closeDialog:n})=>{const[r,a]=ne.useState([]),[o,i]=ne.useState([]),[l,c]=ne.useState([]),f=ne.useRef(null),h=ne.useRef(null),g=ne.useRef(null),y=ne.useRef("End"),w=ne.useRef(!1),S=ne.useRef(null);P.useEffect(()=>{t&&t.length&&a(Iz(t))},[t]),P.useEffect(()=>{!g.current||!h.current||(new x.Setting(h.current).setName(E("Add tag position")).addDropdown(N=>{N.addOption("End",E("End")),N.addOption("Beginning",E("Beginning")),N.setValue("End").onChange(async B=>{y.current=B})}),new x.Setting(g.current).setName(E("Add tag with new line")).addToggle(N=>{N.setValue(!1).onChange(async B=>{w.current=B})}))},[]);const D=N=>{if(!N)return;const B=new Set(o);B.add(N),i(Array.from(B)),f.current.clearInput()};P.useEffect(()=>{if(S.current){if(f.current){f.current.updateCb(D);return}f.current=new rv(S.current,D)}},[S.current,o]);const I=()=>{n(),M({remove:l,add:o,targetThinos:t})},M=async({remove:N,add:B,targetThinos:k})=>{const R=w.current||!1,L=[];for(const _ of k){let V=_.content;for(const U of N)V=V.replace(new RegExp(`#${U}`,"g"),"");if(V=V.trim(),B.length>0&&(V=y.current==="Beginning"?`${B.map(U=>`#${U}`).join(" ")} ${R?`
-`:""}${V}`:`${V} ${R?`
-`:""}${B.map(U=>`#${U}`).join(" ")}`),_&&_.content!==V){const U=await we.updateMemo(_.id,V==null?void 0:V.trim());L.push(U)}}L.length>0&&we.editMemoBulk(L),L.length>0&&at.clearQuery()};return v.jsxs("div",{className:"thino-tag-operation",children:[v.jsx("div",{className:"tag-operation-title",children:E("Tag Bulk Edit")}),v.jsxs("div",{className:"tag-operation-content",children:[r.length>0&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"tag-operation-content-title exist-tags",children:[v.jsx("div",{className:"name",children:E("Exist Tags")}),v.jsx("div",{className:"desc",children:E("Click to remove exist tag")})]}),v.jsx("div",{className:"tag-operation-content-tags exist-tags",children:r.map(N=>v.jsx("div",{className:ar("tag-operation-content-tag",l.includes(N)&&"tag-operation-content-tag-removed"),onClick:()=>{l.includes(N)||c([...l,N]),l.includes(N)&&c(l.filter(B=>B!==N)),o.includes(N)&&i(o.filter(B=>B!==N))},children:N},N))})]}),v.jsxs("div",{className:"tag-operation-content-title selected-tags",children:[v.jsx("div",{className:"name",children:E("Selected Tags")}),v.jsx("div",{className:"desc",children:E("Click to remove selected tag")})]}),v.jsx("div",{className:"tag-operation-content-tags selected-tags",children:o.map(N=>v.jsx("div",{className:"tag-operation-content-tag",onClick:()=>{i(o.filter(B=>B!==N))},children:N},N))}),v.jsx("div",{className:"tag-operation-content-inputer",children:v.jsx("input",{placeholder:E("Input to select exist tag"),ref:S,onKeyDown:N=>{N.key==="Enter"&&D(S.current.value)}})}),v.jsxs("div",{className:"tag-operation-settings",children:[v.jsx("div",{ref:h}),v.jsx("div",{ref:g})]}),v.jsxs("div",{className:"tag-operation-content-btn-group",children:[v.jsx("button",{className:"cancel-btn",onClick:n,children:E("Cancel")}),v.jsx("button",{className:"save-btn",onClick:I,children:E("Save")})]})]})]})},xT=new Map,Sf=async(e,t=!0)=>{const{vault:n,metadataCache:r}=ft.getState().app;if(t&&xT.has(e))return Promise.resolve(xT.get(e));if(e.contains("data:image"))return e;let a;const o=await n.adapter.exists(x.normalizePath(e));let i="";try{if(!o&&!/(http|https)/g.test(e)&&!e.includes("data:image")){let l;if(e.startsWith("app://")){const c=x.normalizePath(decodeURIComponent(e).replace(x.Platform.resourcePathPrefix,"").replace(/\?(.*)$/,"").replace(x.normalizePath(app==null?void 0:app.vault.adapter.basePath),""));i=x.normalizePath(decodeURIComponent(c))}else{if(l=r.getFirstLinkpathDest(e,""),!l){new x.Notice(E("File not exist"));return}i=l.path}}else i=e}catch(l){console.error(l)}if(i){if(/(http|https)/g.test(i))if(i.startsWith("http://localhost")){let l=i;l=l.replace("http://localhost/_capacitor_file_",""),l=decodeURIComponent(l).replace(/\?(.*)$/,"").replace(app==null?void 0:app.vault.adapter.basePath,""),l=x.normalizePath(decodeURIComponent(l));const c=await n.adapter.readBinary(l),f=new Uint8Array(c);a=new Blob([f],{type:"image/png"})}else try{const l=await x.requestUrl(e),c=new Uint8Array(l.arrayBuffer);a=new Blob([c],{type:"image/png"})}catch{}else if(i){const l=await n.adapter.readBinary(i),c=new Uint8Array(l);a=new Blob([c],{type:"image/png"})}return a?await Mz(a,e):""}},Mz=(e,t)=>new Promise(n=>{const r=new FileReader;r.onloadend=()=>{const a=r.result;xT.set(t,a),n(a)},r.readAsDataURL(e)}),Rg=async e=>{if(!e.style.backgroundImage.includes("url(")&&!e.style.backgroundImage.includes("http"))return;let t=e.style.backgroundImage.includes("url(")?e.style.backgroundImage.slice(5,-2):e.style.backgroundImage;return t?(t.startsWith("http://localhost")&&(t=t.replace("http://localhost/_capacitor_file_",""),t=decodeURIComponent(t).replace(/\?(.*)$/,"").replace(app==null?void 0:app.vault.adapter.basePath,""),t=x.normalizePath(decodeURIComponent(t))),await Sf(t)):void 0},kz=async e=>{var n;return e.getAttribute("src")?(n=e==null?void 0:e.src)!=null&&n.startsWith("http://localhost")?await Sf(e.getAttribute("path")||x.normalizePath(e==null?void 0:e.parentElement.getAttribute("src"))):await Sf(e.getAttribute("src")):void 0},Zt=Bz(),jw=Hz(),n9=Uz(),r9=Yz(),ef={copyDefaultStyles:!0,imagePlaceholder:void 0,cacheBust:!1,useCredentials:!1,httpTimeout:3e4,styleCaching:"strict",corsImg:void 0},wn={toSvg:a9,toPng:Fz,toJpeg:Oz,toBlob:Pz,toPixelData:Az,toCanvas:jz,impl:{fontFaces:n9,images:r9,util:Zt,inliner:jw,urlCache:[],options:{}}},iI=(typeof Node<"u"?Node.ELEMENT_NODE:void 0)||1,uw=(typeof global<"u"?global.getComputedStyle:void 0)||(typeof window<"u"?window.getComputedStyle:void 0)||globalThis.getComputedStyle,Nz=(typeof global<"u"?global.atob:void 0)||(typeof window<"u"?window.atob:void 0)||globalThis.atob;function a9(e,t){wn.impl.util.getWindow(e),t=t||{},Lz(t);let n=[];return Promise.resolve(e).then(r).then(function(c){return o9(c,t,null)}).then(Rz).then(_z).then(i).then(l).then(a).then(o);function r(c){if(c.nodeType===iI)return c;const f=c,h=c.parentNode,g=document.createElement("span");return h.replaceChild(g,f),g.append(c),n.push({parent:h,child:f,wrapper:g}),g}function a(c){for(;n.length>0;){const f=n.pop();f.parent.replaceChild(f.child,f.wrapper)}return c}function o(c){return wn.impl.urlCache=[],qz(),c}function i(c){t.bgcolor&&(c.style.backgroundColor=t.bgcolor),t.width&&(c.style.width=`${t.width}px`),t.height&&(c.style.height=`${t.height}px`),t.style&&Object.keys(t.style).forEach(function(h){c.style[h]=t.style[h]});let f=null;return typeof t.onclone=="function"&&(f=t.onclone(c)),Promise.resolve(f).then(function(){return c})}function l(c){let f=t.width||Zt.width(c),h=t.height||Zt.height(c);return Promise.resolve(c).then(function(g){return g.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(g)}).then(Zt.escapeXhtml).then(function(g){const y=(Zt.isDimensionMissing(f)?' width="100%"':` width="${f}"`)+(Zt.isDimensionMissing(h)?' height="100%"':` height="${h}"`);return`${g} `}).then(function(g){return`data:image/svg+xml;charset=utf-8,${g}`})}}function Az(e,t){return zv(e,t).then(function(n){return n.getContext("2d").getImageData(0,0,Zt.width(e),Zt.height(e)).data})}function Fz(e,t){return zv(e,t).then(function(n){return n.toDataURL()})}function Oz(e,t){return zv(e,t).then(function(n){return n.toDataURL("image/jpeg",(t?t.quality:void 0)||1)})}function Pz(e,t){return zv(e,t).then(Zt.canvasToBlob)}function jz(e,t){return zv(e,t)}function Lz(e){typeof e.copyDefaultStyles>"u"?wn.impl.options.copyDefaultStyles=ef.copyDefaultStyles:wn.impl.options.copyDefaultStyles=e.copyDefaultStyles,typeof e.imagePlaceholder>"u"?wn.impl.options.imagePlaceholder=ef.imagePlaceholder:wn.impl.options.imagePlaceholder=e.imagePlaceholder,typeof e.cacheBust>"u"?wn.impl.options.cacheBust=ef.cacheBust:wn.impl.options.cacheBust=e.cacheBust,typeof e.corsImg>"u"?wn.impl.options.corsImg=ef.corsImg:wn.impl.options.corsImg=e.corsImg,typeof e.useCredentials>"u"?wn.impl.options.useCredentials=ef.useCredentials:wn.impl.options.useCredentials=e.useCredentials,typeof e.httpTimeout>"u"?wn.impl.options.httpTimeout=ef.httpTimeout:wn.impl.options.httpTimeout=e.httpTimeout,typeof e.styleCaching>"u"?wn.impl.options.styleCaching=ef.styleCaching:wn.impl.options.styleCaching=e.styleCaching,wn.impl.options.requestUrl=e.requestUrl,wn.impl.options.type=e.type||"image/png"}function zv(e,t){return t=t||{},a9(e,t).then(Zt.makeImage).then(function(r){const a=typeof t.scale!="number"?1:t.scale,o=n(e,a),i=o.getContext("2d");return i.msImageSmoothingEnabled=!1,i.imageSmoothingEnabled=!1,r&&(i.scale(a,a),i.drawImage(r,0,0)),o});function n(r,a){let o=t.width||Zt.width(r),i=t.height||Zt.height(r);Zt.isDimensionMissing(o)&&(o=Zt.isDimensionMissing(i)?300:i*2),Zt.isDimensionMissing(i)&&(i=o/2);const l=document.createElement("canvas");if(l.width=o*a,l.height=i*a,t.bgcolor){const c=l.getContext("2d");c.fillStyle=t.bgcolor,c.fillRect(0,0,l.width,l.height)}return l}}let Ci=null;function o9(e,t,n,r){const a=t.filter;if(e===Ci||Zt.isHTMLScriptElement(e)||Zt.isHTMLStyleElement(e)||Zt.isHTMLLinkElement(e)||n!==null&&a&&!a(e))return Promise.resolve();return Promise.resolve(e).then(o).then(function(f){return l(f,i(e))}).then(function(f){return c(f,e)});function o(f){return Zt.isHTMLCanvasElement(f)?Zt.makeImage(f.toDataURL()):f.cloneNode(!1)}function i(f){return Zt.isElementHostForOpenShadowRoot(f)?f.shadowRoot:f}function l(f,h){const g=S(h);let y=Promise.resolve();if(g.length!==0){const D=uw(w(h));Zt.asArray(g).forEach(function(I){y=y.then(function(){return o9(I,t,D).then(function(M){M&&f.appendChild(M)})})})}return y.then(function(){return f});function w(D){return Zt.isShadowRoot(D)?D.host:D}function S(D){return Zt.isShadowSlotElement(D)?D.assignedNodes():D.childNodes}}function c(f,h){if(!Zt.isElement(f)||Zt.isShadowSlotElement(h))return Promise.resolve(f);return Promise.resolve().then(g).then(y).then(w).then(S).then(function(){return f});function g(){I(h,f);function D(M,N){N.font=M.font,N.fontFamily=M.fontFamily,N.fontFeatureSettings=M.fontFeatureSettings,N.fontKerning=M.fontKerning,N.fontSize=M.fontSize,N.fontStretch=M.fontStretch,N.fontStyle=M.fontStyle,N.fontVariant=M.fontVariant,N.fontVariantCaps=M.fontVariantCaps,N.fontVariantEastAsian=M.fontVariantEastAsian,N.fontVariantLigatures=M.fontVariantLigatures,N.fontVariantNumeric=M.fontVariantNumeric,N.fontVariationSettings=M.fontVariationSettings,N.fontWeight=M.fontWeight}function I(M,N){const B=uw(M);B.cssText?(N.style.cssText=B.cssText,D(B,N.style)):(Vz(t,M,B,n,N),n===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(k=>N.style.removeProperty(k)),["left","right","top","bottom"].forEach(k=>{N.style.getPropertyValue(k)&&N.style.setProperty(k,"0px")})))}}function y(){const D=Zt.uid();[":before",":after"].forEach(function(M){I(M)});function I(M){const N=uw(h,M),B=N.getPropertyValue("content");if(B===""||B==="none")return;const k=f.getAttribute("class")||"";f.setAttribute("class",`${k} ${D}`);const R=document.createElement("style");R.appendChild(L()),f.appendChild(R);function L(){const _=`.${D}:${M}`,V=N.cssText?U():Z();return document.createTextNode(`${_}{${V}}`);function U(){return`${N.cssText} content: ${B};`}function Z(){return`${Zt.asArray(N).map(G).join("; ")};`;function G(re){const de=N.getPropertyValue(re),fe=N.getPropertyPriority(re)?" !important":"";return`${re}: ${de}${fe}`}}}}}function w(){Zt.isHTMLTextAreaElement(h)&&(f.innerHTML=h.value),Zt.isHTMLInputElement(h)&&f.setAttribute("value",h.value)}function S(){Zt.isSVGElement(f)&&(f.setAttribute("xmlns","http://www.w3.org/2000/svg"),Zt.isSVGRectElement(f)&&["width","height"].forEach(function(D){const I=f.getAttribute(D);I&&f.style.setProperty(D,I)}))}}}function Rz(e){return n9.resolveAll().then(function(t){if(t!==""){const n=document.createElement("style");e.appendChild(n),n.appendChild(document.createTextNode(t))}return e})}function _z(e){return r9.inlineAll(e).then(function(){return e})}function Bz(){let e=0;return{escape:U,isDataUrl:M,canvasToBlob:k,resolveUrl:R,getAndEncode:V,uid:L,delay:Z,asArray:Q,escapeXhtml:G,makeImage:_,width:re,height:de,getWindow:t,isElement:o,isElementHostForOpenShadowRoot:n,isShadowRoot:r,isInShadowRoot:a,isHTMLElement:l,isHTMLCanvasElement:i,isHTMLInputElement:f,isHTMLImageElement:c,isHTMLLinkElement:h,isHTMLScriptElement:g,isHTMLStyleElement:y,isHTMLTextAreaElement:w,isShadowSlotElement:S,isSVGElement:D,isSVGRectElement:I,isDimensionMissing:N};function t($){const he=$?$.ownerDocument:void 0;return(he?he.defaultView:void 0)||global||window}function n($){return o($)&&$.shadowRoot!==null}function r($){return $ instanceof t($).ShadowRoot}function a($){return $!==null&&Object.prototype.hasOwnProperty.call($,"getRootNode")&&r($.getRootNode())}function o($){return $ instanceof t($).Element}function i($){return $ instanceof t($).HTMLCanvasElement}function l($){return $ instanceof t($).HTMLElement}function c($){return $ instanceof t($).HTMLImageElement}function f($){return $ instanceof t($).HTMLInputElement}function h($){return $ instanceof t($).HTMLLinkElement}function g($){return $ instanceof t($).HTMLScriptElement}function y($){return $ instanceof t($).HTMLStyleElement}function w($){return $ instanceof t($).HTMLTextAreaElement}function S($){return a($)&&$ instanceof t($).HTMLSlotElement}function D($){return $ instanceof t($).SVGElement}function I($){return $ instanceof t($).SVGRectElement}function M($){return $.search(/^(data:)/)!==-1}function N($){return isNaN($)||$<=0}function B($){return new Promise(function(he){const se=Nz($.toDataURL().split(",")[1]),ue=se.length,X=new Uint8Array(ue);for(let oe=0;oenew Promise(ue=>{const X=new FileReader;X.onload=function(oe){ue(oe.target.result)},X.readAsDataURL(new Blob([se.arrayBuffer],{type:se.headers["content-type"]}))})).catch(se=>(console.error("cannot fetch resource: "+$+", error: "+se),"")):he.promise=new Promise(function(se){const ue=wn.impl.options.httpTimeout,X=new XMLHttpRequest;if(X.onreadystatechange=De,X.ontimeout=je,X.responseType="blob",X.timeout=ue,wn.impl.options.useCredentials&&(X.withCredentials=!0),wn.impl.options.corsImg&&$.indexOf("http")===0&&$.indexOf(window.location.origin)===-1){const Be=(wn.impl.options.corsImg.method||"GET").toUpperCase()==="POST"?"POST":"GET";X.open(Be,(wn.impl.options.corsImg.url||"").replace("#{cors}",$),!0);let Xe=!1;const Ze=wn.impl.options.corsImg.headers||{};Object.keys(Ze).forEach(function(Ct){Ze[Ct].indexOf("application/json")!==-1&&(Xe=!0),X.setRequestHeader(Ct,Ze[Ct])});const st=Re(wn.impl.options.corsImg.data||"");Object.keys(st).forEach(function(Ct){typeof st[Ct]=="string"&&(st[Ct]=st[Ct].replace("#{cors}",$))}),X.send(Xe?JSON.stringify(st):st)}else X.open("GET",$,!0),X.send();let oe;if(wn.impl.options.imagePlaceholder){const Be=wn.impl.options.imagePlaceholder.split(/,/);Be&&Be[1]&&(oe=Be[1])}function De(){if(X.readyState!==4)return;if(X.status>=300){oe?se(oe):Fe(`cannot fetch resource: ${$}, status: ${X.status}`);return}const Be=new FileReader;Be.onloadend=function(){se(Be.result)},Be.readAsDataURL(X.response)}function je(){oe?se(oe):Fe(`timeout of ${ue}ms occured while fetching resource: ${$}`)}function Re(Be){try{return JSON.parse(JSON.stringify(Be))}catch{Fe("corsImg.data is missing or invalid");return}}function Fe(Be){console.error(Be),se("")}})),he.promise}function U($){return $.replace(/([.*+?^${}()|[]\/\\])/g,"\\$1")}function Z($){return function(he){return new Promise(function(se){setTimeout(function(){se(he)},$)})}}function Q($){const he=[],se=$.length;for(let ue=0;ue=0;r?(e.setProperty(t,n,r),a&&e.setProperty(`-webkit-${t}`,n,r)):(e.setProperty(t,n),a&&e.setProperty(`-webkit-${t}`,n))}function Vz(e,t,n,r,a){const o=wn.impl.options.copyDefaultStyles?$z(e,t):{},i=a.style;Zt.asArray(n).forEach(function(l){const c=n.getPropertyValue(l),f=o[l],h=r?r.getPropertyValue(l):void 0;if(c!==f||r&&c!==h){const g=n.getPropertyPriority(l);zz(i,l,c,g)}})}let N0=null,cw={};const Wz=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"];function $z(e,t){const n=l(t),r=c(n);if(cw[r])return cw[r];const a=Zz(),o=f(a.document,n),i=h(a,o);return g(o),cw[r]=i,i;function l(y){const w=[];do{if(y.nodeType===iI){const S=y.tagName;if(w.push(S),Wz.includes(S))break}y=y.parentNode}while(y);return w}function c(y){return e.styleCaching==="relaxed"?y.filter((w,S,D)=>S===0||S===D.length-1).join(">"):y.join(">")}function f(y,w){let S=y.body;do{const D=w.pop(),I=y.createElement(D);S.appendChild(I),S=I}while(w.length>0);return S.textContent="",S}function h(y,w){const S={},D=y.getComputedStyle(w);return Zt.asArray(D).forEach(function(I){S[I]=I==="width"||I==="height"?"auto":D.getPropertyValue(I)}),S}function g(y){do{const w=y.parentElement;w!==null&&w.removeChild(y),y=w}while(y&&y.tagName!=="BODY")}}function Zz(){if(Ci)return Ci.contentWindow;const e=document.characterSet||"UTF-8",t=document.doctype,n=t?`":"";return Ci=document.createElement("iframe"),Ci.id="domtoimage-sandbox-"+Zt.uid(),Ci.className="domtoimage-thino",Ci.style.visibility="hidden",Ci.style.position="fixed",document.body.appendChild(Ci),a(Ci,n,e,"domtoimage-sandbox");function r(o){if(o){const i=document.createElement("div");return i.innerText=o,i.innerHTML}else return""}function a(o,i,l,c){try{return o.contentWindow.document.write(`${i}${c} `),o.contentWindow}catch{}const f=document.createElement("meta");f.setAttribute("charset",l);try{const h=document.implementation.createHTMLDocument(c);h.head.appendChild(f);const g=i+h.documentElement.outerHTML;return o.setAttribute("srcdoc",g),o.contentWindow}catch{}return o.contentDocument.head.appendChild(f),o.contentDocument.title=c,o.contentWindow}}function qz(){Ci&&(document.body.removeChild(Ci),Ci=null),N0&&clearTimeout(N0),N0=setTimeout(()=>{N0=null,cw={}},20*1e3)}async function Gz(e,t,n){return await wn.toCanvas(e,{width:e.clientWidth,height:e.clientHeight,quality:1,scale:t?2:1,requestUrl:x.requestUrl,type:n})}const kb=async(e,t)=>(await Gz(e,!0,"image/jpeg")).toDataURL(),Bx=async e=>{e.startsWith("http")&&(e=await Sf(e));const t=e.split("base64,")[1],n=gb(t,"image/png");await i9(n),new x.Notice(E("Send to clipboard successfully"))},Jz=async(e,t)=>{const n=await e.vault.adapter.exists(t);let r="";if(n)r=t;else{const l=e.metadataCache.getFirstLinkpathDest(t,"");if(!l){new x.Notice(E("File not exist"));return}r=l.path}const a=await e.vault.adapter.readBinary(r),o=new Uint8Array(a),i=new Blob([o],{type:"image/png"});await i9(i)},i9=async e=>{const t=new ClipboardItem({"image/png":e});await window.navigator.clipboard.write([t])},Hx=1.1,Ux=300,Yx=20,Kz=({destroy:e,imgUrl:t,filepath:n,otherIMGEls:r,currentIndex:a})=>{const o=P.useRef(null),[i,l]=P.useState(-1),c=Le.getState().dailyNotesState.app,[f,h]=P.useState(a),[g,y]=P.useState(t),w={close:P.useRef(null),previous:P.useRef(null),next:P.useRef(null),decrease:P.useRef(null),increase:P.useRef(null),zoom:P.useRef(null),copy:P.useRef(null)};P.useEffect(()=>{!n&&!t||(x.setIcon(w.close.current,"x"),w.previous.current&&x.setIcon(w.previous.current,"arrow-left"),w.next.current&&x.setIcon(w.next.current,"arrow-right"),x.setIcon(w.decrease.current,"zoom-out"),x.setIcon(w.increase.current,"zoom-in"),x.setIcon(w.zoom.current,"circle"),x.setIcon(w.copy.current,"clipboard"))},[w]),P.useEffect(()=>{ut.getImageSize(g).then(({width:L})=>{l(L!==0?40:0)})},[g]);const S=()=>{let L=f-1;L<0&&(L=r.length-1),h(L),y(r[L].src)},D=()=>{let L=f+1;L>=r.length&&(L=0),h(L),y(r[L].src)},I=()=>{e()},M=()=>{i>30&&l(i-10)},N=()=>{l(i+10)},B=L=>{L.target!==o.current&&L.target===o.current.parentElement&&I()},k=L=>{if(L.ctrlKey){L.preventDefault();const _=o.current,V=L.nativeEvent.offsetX,U=L.nativeEvent.offsetY,Z=V/_.clientWidth,Q=U/_.clientHeight;let G;L.deltaY>0?G=i/Hx:G=i*Hx,G>Ux?G=Ux:G{if(g&&!n)await Bx(t);else if(n){const _=r[f].parentElement.getAttribute("src");if(!_){await Bx(g);return}await Jz(c,_)}};return v.jsxs(v.Fragment,{children:[v.jsx("button",{ref:w.close,className:"btn close-btn",onClick:I}),v.jsxs("div",{className:"img-container internal-embed image-embed is-loaded",onClick:B,onWheel:k,children:[v.jsx("img",{className:i<=0?"thino-hidden":"",ref:o,height:i+"%",src:g}),v.jsx("span",{className:"loading-text "+(i===-1?"":"thino-hidden"),children:E("Image is loading...")}),v.jsx("span",{className:"loading-text "+(i===0?"":"thino-hidden"),children:E("😟 Cannot load image, image link maybe broken")})]}),v.jsxs("div",{className:"action-btns-container",children:[r&&(r==null?void 0:r.length)>1&&v.jsxs(v.Fragment,{children:[v.jsx("button",{ref:w.previous,className:"btn",onClick:S}),v.jsx("button",{ref:w.next,className:"btn",onClick:D})]}),v.jsx("button",{ref:w.decrease,className:"btn",onClick:M}),v.jsx("button",{ref:w.increase,className:"btn",onClick:N}),v.jsx("button",{ref:w.zoom,className:"btn",onClick:()=>l(80)}),v.jsx("button",{ref:w.copy,className:"btn",onClick:R})]})]})};function Nb({imgUrl:e,filepath:t,otherIMGEls:n,currentIndex:r}){Db({className:"preview-image-dialog"},Kz,{...{imgUrl:e,otherIMGEls:n,currentIndex:r},filepath:t})}var Qz=class extends Error{constructor(e){super(`react-collapsed: ${e}`)}},Lw=(...e)=>(e[0],`${e[1]}`,void 0);function s9(e){const t=P.useRef(e);return P.useEffect(()=>{t.current=e}),P.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Xz(e,t,n){const[r,a]=P.useState(t),o=P.useRef(typeof e<"u"),i=o.current?e:r,l=s9(n),c=P.useCallback(f=>{const g=typeof f=="function"?f(i):f;o.current||a(g),l==null||l(g)},[l,i]);return P.useEffect(()=>{Lw(!(o.current&&e==null),"`isExpanded` state is changing from controlled to uncontrolled. useCollapse should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled collapse for the lifetime of the component. Check the `isExpanded` prop."),Lw(!(!o.current&&e!=null),"`isExpanded` state is changing from uncontrolled to controlled. useCollapse should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled collapse for the lifetime of the component. Check the `isExpanded` prop.")},[e]),[i,c]}var eV="(prefers-reduced-motion: reduce)";function tV(){const[e,t]=P.useState(!1);return P.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const n=window.matchMedia(eV);t(n.matches);const r=a=>{t(a.matches)};if(n.addEventListener)return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)};if(n.addListener)return n.addListener(r),()=>{n.removeListener(r)}},[]),e}var nV=XL.useId||(()=>{});function rV(){return nV()??""}var aV=typeof window<"u"?P.useLayoutEffect:P.useEffect,LS=!1,oV=0,zx=()=>++oV;function iV(e){const t=e||(LS?zx():null),[n,r]=P.useState(t);return aV(()=>{n===null&&r(zx())},[]),P.useEffect(()=>{LS===!1&&(LS=!0)},[]),n!=null?String(n):void 0}function sV(e){const t=rV(),n=iV(e);return typeof e=="string"?e:typeof t=="string"?t:n}function lV(e,t){const n=performance.now(),r={};function a(){r.id=requestAnimationFrame(o=>{o-n>t?e():a()})}return a(),r}function Vx(e){e.id&&cancelAnimationFrame(e.id)}function Wx(e){return e!=null&&e.current?e.current.scrollHeight:(Lw(!0,"Was not able to find a ref to the collapse element via `getCollapseProps`. Ensure that the element exposes its `ref` prop. If it exposes the ref prop under a different name (like `innerRef`), use the `refKey` property to change it. Example:\n\nconst collapseProps = getCollapseProps({refKey: 'innerRef'})"),0)}function uV(e){if(!e||typeof e=="string")return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function cV(e,t){if(e!=null)if(typeof e=="function")e(t);else try{e.current=t}catch{throw new Qz(`Cannot assign value "${t}" to ref "${e}"`)}}function $x(...e){return e.every(t=>t==null)?null:t=>{e.forEach(n=>{cV(n,t)})}}function dV(e){let t=n=>{};t=n=>{if(!(n!=null&&n.current))return;const{paddingTop:r,paddingBottom:a}=window.getComputedStyle(n.current);Lw(!(r&&r!=="0px"||a&&a!=="0px"),`Padding applied to the collapse element will cause the animation to break and not perform as expected. To fix, apply equivalent padding to the direct descendent of the collapse element. Example:
+`));if(p===null)return null;if(typeof p=="string")return{text:p,caretPosition:y3};if(!p.text&&typeof p.text!="string")throw new Error('Output "text" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "'.concat(l,`"
+`));if(!p.caretPosition)throw new Error('Output "caretPosition" is not defined! Object should has shape {text: string, caretPosition: string | number}. Check the implementation for trigger "'.concat(l,`"
+`));return p}if(typeof h!="string")throw new Error(`Output item should be string
+`);return{text:"".concat(l).concat(h).concat(l),caretPosition:y3}}},r._getCurrentTriggerSettings=function(){var l=r.state.currentTrigger;return l?r.props.trigger[l]:null},r._getValuesFromProvider=function(){var l=r.state,u=l.currentTrigger,d=l.actualToken,h=r._getCurrentTriggerSettings();if(!(!u||!h)){var p=h.dataProvider,m=h.component;if(typeof p!="function")throw new Error("Trigger provider has to be a function!");r.setState({dataLoading:!0});var b=p(d);b instanceof Promise||(b=Promise.resolve(b)),b.then(function(v){if(!Array.isArray(v))throw new Error("Trigger provider has to provide an array!");if(typeof m!="function")throw new Error("Component should be defined!");if(u===r.state.currentTrigger){if(!v.length){r._closeAutocomplete();return}r.setState({dataLoading:!1,data:v,component:m})}}).catch(function(v){return b3(v.message)})}},r._getSuggestions=function(){var l=r.state,u=l.currentTrigger,d=l.data;return!u||!d||d&&!d.length?null:d},r._createRegExp=function(){var l=r.props.trigger;r.tokenRegExp=new RegExp("(".concat(Object.keys(l).sort(function(u,d){return ud?-1:0}).map(function(u){return qy(u)}).join("|"),")((?:(?!\\1)[^\\s])*$)")),r.tokenRegExpEnding=new RegExp("(".concat(Object.keys(l).sort(function(u,d){return ud?-1:0}).map(function(u){return qy(u)}).join("|"),")$"))},r._closeAutocomplete=function(){var l=r.state.currentTrigger;r.escListenerDestroy(),r.setState({data:null,dataLoading:!1,currentTrigger:null},function(){l&&r._onItemHighlightedHandler(null)})},r._cleanUpProps=function(){var l=Sne({},r.props),u=["loadingComponent","boundariesElement","containerStyle","minChar","scrollToItem","ref","innerRef","onChange","onCaretPositionChange","className","value","trigger","listStyle","itemStyle","containerStyle","loaderStyle","className","containerClassName","listClassName","itemClassName","loaderClassName","dropdownStyle","dropdownClassName","movePopupAsYouType","textAreaComponent","renderToBody","onItemSelected","onItemHighlighted"];for(var d in l)u.includes(d)&&delete l[d];return l},r._changeHandler=function(l){var u=r.props,d=u.trigger,h=u.onChange,p=u.minChar,m=u.onCaretPositionChange,b=u.movePopupAsYouType,v=r.state,y=v.top,S=v.left,x=l;x||(x=new bne("change",{bubbles:!0}),r.textareaRef.dispatchEvent(x));var C=x.target||r.textareaRef,k=C.selectionEnd,M=C.value;if(r.lastValueBubbledEvent=M,h&&x&&(x.persist&&x.persist(),h(new Proxy(x,{get:function(Z,q,$){return q==="target"?C:Reflect.get(Z,q,$)}}))),m){var I=r.getCaretPosition();m(I)}r.setState({value:M});var O=function(){var Z=gne(C,k),q=Z.top,$=Z.left;r.setState({top:q-r.textareaRef.scrollTop||0,left:$})},R=function(Z){r.lastTrigger=k-Z,r._closeAutocomplete(),O()};if(k<=r.lastTrigger){var L=M.slice(0,k),B=r.tokenRegExp.exec(L);R(B?B[0].length:0)}var _=M.slice(r.lastTrigger,k),H=r.tokenRegExp.exec(_),U=H&&H[0],G=H&&H[1]||null,K=G?G.length-1:0,z=r.tokenRegExpEnding.exec(_);if(z?R(z[0].length):r._isAutocompleteOpen()||r._closeAutocomplete(),(!U||U.length<=p+K)&&(r.state.currentTrigger&&!d[r.state.currentTrigger].allowWhitespace||!r.state.currentTrigger)){r._closeAutocomplete();return}if(G&&d[G].afterWhitespace&&!/\s/.test(M[k-U.length-1])&&M[k-U.length-1]!==void 0){r._closeAutocomplete();return}if(r.state.currentTrigger&&d[r.state.currentTrigger].allowWhitespace){if(H=new RegExp("".concat(qy(r.state.currentTrigger),".*$")).exec(M.slice(0,k)),U=H&&H[0],!U){r._closeAutocomplete();return}G=Object.keys(d).find(function(ee){return ee.slice(0,K+1)===U.slice(0,K+1)})||null}var ne=U.slice(1);if(G){(b||y===null&&S===null||r.state.currentTrigger!==G)&&O(),r.escListenerInit();var J=r._getTextToReplace(G);r.setState({selectionEnd:k,currentTrigger:G,textToReplace:J,actualToken:ne},function(){try{r._getValuesFromProvider()}catch(ee){b3(ee.message)}})}},r._selectHandler=function(l){var u=r.props,d=u.onCaretPositionChange,h=u.onSelect;if(d){var p=r.getCaretPosition();d(p)}h&&(l.persist(),h(l))},r._shouldStayOpen=function(l){var u=l.relatedTarget;return u===null&&(u=document.activeElement),!!(r.dropdownRef&&u instanceof Node&&r.dropdownRef.contains(u))},r._onClick=function(l){var u=r.props.onClick;u&&(l.persist(),u(l)),!r._shouldStayOpen(l)&&r._closeAutocomplete()},r._onBlur=function(l){var u=r.props.onBlur;u&&(l.persist(),u(l)),!r._shouldStayOpen(l)&&r._closeAutocomplete()},r._onScrollHandler=function(){r._closeAutocomplete()},r._onItemHighlightedHandler=function(l){var u=r.props.onItemHighlighted,d=r.state.currentTrigger;if(u)if(typeof u=="function")u({currentTrigger:d,item:l});else throw new Error("`onItemHighlighted` has to be a function")},r._dropdownScroll=function(l){var u=r.props.scrollToItem;if(u){if(u===!0){Ane(r.dropdownRef,l);return}if(typeof u!="function"||u.length!==2)throw new Error("`scrollToItem` has to be boolean (true for default implementation) or function with two parameters: container, item.");u(r.dropdownRef,l)}},r._isAutocompleteOpen=function(){var l=r.state,u=l.dataLoading,d=l.currentTrigger,h=r._getSuggestions();return!!((u||h)&&d)},r._textareaRef=function(l){r.props.innerRef&&r.props.innerRef(l),r.textareaRef=l},r.lastTrigger=0,r.escListener=null;var o=r.props,i=o.loadingComponent,a=o.trigger,s=o.value;if(s&&(r.state.value=s),r._createRegExp(),!i)throw new Error("RTA: loadingComponent is not defined");if(!a)throw new Error("RTA: trigger is not defined");return r}return bS(t,[{key:"componentDidMount",value:function(){wu.startListen(this.textareaRef),this.textareaRef&&this.textareaRef.addEventListener("focus",this._handleCaretChange),this.textareaRef&&this.textareaRef.addEventListener("click",this._handleCaretChange),this.textareaRef&&this.textareaRef.addEventListener("keydown",this._handleCaretChange)}},{key:"componentDidUpdate",value:function(r){var o=r.trigger,i=r.value,a=this.props,s=a.trigger,l=a.value;Object.keys(s).join("")!==Object.keys(o).join("")&&this._createRegExp(),i!==l&&this.lastValueBubbledEvent!==l&&(this.lastTrigger=0,this._changeHandler())}},{key:"componentWillUnmount",value:function(){this.escListenerDestroy(),wu.stopListen(this.textareaRef),this.textareaRef&&this.textareaRef.removeEventListener("focus",this._handleCaretChange),this.textareaRef&&this.textareaRef.removeEventListener("click",this._handleCaretChange),this.textareaRef&&this.textareaRef.removeEventListener("keydown",this._handleCaretChange)}},{key:"render",value:function(){var r=this,o=this.props,i=o.loadingComponent,a=o.style,s=o.className,l=o.listStyle,u=o.itemStyle,d=o.boundariesElement,h=o.movePopupAsYouType,p=o.listClassName,m=o.itemClassName,b=o.dropdownClassName,v=o.dropdownStyle,y=o.containerStyle,S=o.containerClassName,x=o.loaderStyle,C=o.loaderClassName,k=o.textAreaComponent,M=o.renderToBody,I=this.state,O=I.left,R=I.top,L=I.dataLoading,B=I.component,_=I.value,H=I.textToReplace,U=this._isAutocompleteOpen(),G=this._getSuggestions(),K={},z;return k.component?(z=k.component,K[k.ref]=this._textareaRef):(z=k,K.ref=this._textareaRef),Y.createElement("div",{className:"rta ".concat(L===!0?"rta--loading":""," ").concat(S||""),style:y},Y.createElement(z,Object.assign({},this._cleanUpProps(),{className:"rta__textarea ".concat(s||""),onChange:this._changeHandler,onSelect:this._selectHandler,onScroll:this._onScrollHandler,onClick:this._onClick,onBlur:this._onBlur,value:_,style:a},K)),U&&Y.createElement(One,{innerRef:function(J){r.dropdownRef=J},top:R,left:O,style:v,className:b,movePopupAsYouType:h,boundariesElement:d,textareaRef:this.textareaRef,renderToBody:M},G&&B&&H&&Y.createElement(Dne,{values:G,component:B,style:l,className:p,itemClassName:m,itemStyle:u,getTextToReplace:H,onItemHighlighted:this._onItemHighlightedHandler,onSelect:this._onSelect,dropdownScroll:this._dropdownScroll}),L&&Y.createElement("div",{className:"rta__loader ".concat(G!==null?"rta__loader--suggestion-data":"rta__loader--empty-suggestion-data"," ").concat(C||""),style:x},Y.createElement(i,{data:G}))))}}],[{key:"getDerivedStateFromProps",value:function(r){var o=r.value;return o==null?null:{value:o}}}]),t}(Y.Component);kH.defaultProps={movePopupAsYouType:!1,value:null,minChar:1,boundariesElement:"body",scrollToItem:!0,textAreaComponent:"textarea",renderToBody:!1};const Pne=()=>{const{app:e}=$e.getState(),t=e.metadataCache.getTags();return[...Object.keys(t)].map(n=>n.split("#").pop())},jne=e=>{let t=[];const n=$e.getState().settings;if(n&&n?.UseVaultTags)t=Pne();else{const{tags:i}=de.getState();t=i}const r=e.toLowerCase(),o=[];return t.forEach(i=>{i&&i.toLowerCase().contains(r)&&o.push({name:i,char:i})}),o},Lne=e=>{const{app:t}=$e.getState(),n=t.vault.getAllLoadedFiles(),r=[];let o;return n.forEach(i=>{e==="["?o="":e.contains("[")&&(o=e.slice(1));const a=o.toLowerCase();i instanceof N.TFile&&["md","png","jpg","canvas","jpeg","gif"].contains(i.extension)&&i.path.toLowerCase().contains(a)&&r.push({name:i.basename,char:i.name,file:i})}),r};var Hx=D,Rne=function(e){return typeof e=="function"},Fne=function(e){var t=Hx.useState(e),n=t[0],r=t[1],o=Hx.useRef(n),i=Hx.useCallback(function(a){o.current=Rne(a)?a(o.current):a,r(o.current)},[]);return[n,i,o]},Hne=Fne;const Ho=tt(Hne);function td(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function TS(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=td(n);return(o,i)=>r.then(a=>i(a.transaction(t,o).objectStore(t)))}let _x;function ov(){return _x||(_x=TS("keyval-store","keyval")),_x}function al(e,t=ov()){return t("readonly",n=>td(n.get(e)))}function hl(e,t,n=ov()){return n("readwrite",r=>(r.put(t,e),td(r.transaction)))}function EH(e,t=ov()){return t("readwrite",n=>(n.delete(e),td(n.transaction)))}function _ne(e=ov()){return e("readwrite",t=>(t.clear(),td(t.transaction)))}function Bne(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},td(e.transaction)}function CH(e=ov()){return e("readonly",t=>{if(t.getAllKeys)return td(t.getAllKeys());const n=[];return Bne(t,r=>n.push(r.key)).then(()=>n)})}const x0=TS("editor-history-db","editor-history-store"),Yne=50;function lD(e,t){return`thinoEditorHistory:${e}:${t||"view"}`}async function Une(e,t,n){try{const r=lD(t?.appId,n),o=await al(r,x0)||[];if(o.some(l=>l.content===e))return;const s=[{content:e,timestamp:Date.now()},...o].slice(0,Yne);await hl(r,s,x0)}catch(r){console.error("Failed to save editor history:",r)}}const zne=N.debounce((e,t,n)=>{Une(e,t,n)},1e3);async function MH(e,t){try{const n=lD(e?.appId,t);return await al(n,x0)||[]}catch(n){return console.error("Failed to get editor history:",n),[]}}async function Vne(e,t){try{const n=lD(e?.appId,t);await EH(n,x0)}catch(n){console.error("Failed to clear editor history:",n)}}function Wne(e){return e.containerEl.matches(".memos-list-view")}function Bx(){}function Gne(e){const n=e.app.workspace.getLeavesOfType("thino_view")[0];return{app:e.app,showSearch:Bx,toggleMode:Bx,onMarkdownScroll:Bx,getMode:()=>"source",getViewType:()=>"thino_view",id:n?.id||Le.randomId(6),scroll:0,editMode:null,get file(){return n?.view?.file||null},get path(){return n?.view?.file?.path||""}}}const Zne=(e,t)=>{const{dailyNotesState:{app:n,plugin:r,view:o,dailyNotes:i}}=D.useContext(ct),[a,s]=D.useState(null),[l,u]=D.useState(!1),[d,h]=D.useState(""),[p,m]=D.useState(null),[b,v]=D.useState(!0),[y,S]=D.useState(!1),x=D.useRef(null),C=D.useRef(N.debounce(async(G,K,z)=>{w3(G,K,z),G.trim()&&!y&&await zne(G,K,z)},100)),k=D.useRef();D.useEffect(()=>{if(!p){if(!i&&!(n&&window.app)){const G=(n||window.app)?.vault.getMarkdownFiles();m(G[0]);return}for(const G in i)if(i[G]instanceof N.TFile){m(i[G]);break}}},[i]),D.useEffect(()=>{if(!r?.MarkdownEditor||!e)return;class G extends r.MarkdownEditor{updateBottomPadding(){}onUpdate(Z,q){super.onUpdate(Z,q),I&&I(this.get())}}const K=Gne(r),z=r.addChild(new G(n,e,K));z&&!t&&o&&Ze.setInstance(`${o.leaf?.id}`,z),K.editMode=z,z.owner.editor=z.editor;const ne=$ne(n,t?"modal":"view");z.set&&z.set(ne||"",!0),n.workspace.trigger("thino-editor-created",e,z.editor);const J=z.cm;return k.current=J,u(!0),s(z),()=>{u(!1),a?.destroy(),r.removeChild(z),k.current=null}},[e,r]),D.useEffect(()=>{!a||!n||(C.current(d,n,t?"modal":"view"),b&&v(!1),x.current&&x.current(d))},[d,n]);const M=()=>{a&&a.toggleSource()},I=N.debounce(G=>O(G),500,!0),O=G=>{h(G)};return{instance:a,value:d,set:G=>{try{a&&((a?.editor).replaceSelection(G),h(G))}catch(K){console.error(K)}},get:()=>a?a.get():"",append:(G,K)=>{if(!a||K&&K!==o?.leaf?.id)return;const ne=(a.get()||"")+G;(a?.editor).replaceSelection(G),h(ne)},clear:async(G=!1)=>{a&&(a.clear(),h(""),w3("",n,t?"modal":"view"),G&&await Vne(n,t?"modal":"view"))},toggleSource:M,getHistoryEntries:async()=>!a||!n?[]:await MH(n,t?"modal":"view"),setFullContent:(G,K=!1)=>{a&&(S(K),a.set(G),C.current(G,n,t?"modal":"view"),S(!1))}}};function DH(e,t){return`thinoEditorContentCache:${e}:${t||"view"}`}function $ne(e,t){try{const n=DH(e?.appId,t);return ur.get([n])[n]||""}catch(n){return console.error(n),""}}function w3(e,t,n){try{const r=DH(t?.appId,n);ur.set({[r]:e})}catch(r){console.error(r)}}const qne=D.memo(({value:e,maxCount:t=100})=>{const[n,r]=D.useState(0);D.useEffect(()=>{const i=e.replace(/```[^\S\r\n]*[a-z]*\n.*?\n```/g,""),a=Le.getWordCount(i);r(a)},[e]);const o=n>t&&t>0;return w.jsxs("div",{className:tn("thino-editor-word-count",o&&"exceeded"),children:[n," ",t>0&&w.jsxs("span",{children:[" / ",t]})," ",E("word")]})},(e,t)=>e.value===t.value&&e.maxCount===t.maxCount);function Kne(e,t){return{line:e.line,ch:e.ch+t}}const S3=({entity:{name:e,char:t,file:n}})=>w.jsx("div",{children:`${t}`}),Xne=({data:e})=>w.jsx("div",{children:"Loading"});let za;const Jne=D.forwardRef((e,t)=>{const{globalState:{useTinyUndoHistoryCache:n,globalEditorShown:r,memoListView:o},dailyNotesState:{settings:i,app:a}}=D.useContext(ct),{SaveMemoButtonLabel:s,SaveMemoButtonIcon:l}=i,{className:u,inputerType:d,initialContent:h,placeholder:p,showConfirmBtn:m,showCancelBtn:b,onConfirmBtnClick:v,onCancelBtnClick:y,onContentChange:S,onCheckCount:x}=e,C=D.useRef(null),k=D.useRef(null),M=D.useRef(null),I=pne(),{instance:O,value:R,set:L,get:B,append:_,clear:H,toggleSource:U,setFullContent:G}=Zne(k.current,e.modal),[,K,z]=Ho(0),[ne,J]=Ho(!1);D.useEffect(()=>{if(i&&i.FocusOnEditor)switch(d){case"minimal":case"memos":C.current?.focus();break;case"obsidian":O&&O.editor?.focus()}},[i,O]),D.useEffect(()=>{if(!a)return;const fe=a.workspace.getLeavesOfType(Qr);let ye,ge;fe.length>0?(ge=fe[0].view.containerEl,ye=ge.offsetHeight):(ge=document,ye=window.outerHeight),K(ye)},[a]),D.useEffect(()=>{!C.current||d==="obsidian"||h&&(C.current.value=h,I())},[]),D.useEffect(()=>{if(d!=="obsidian")if(n){if(!C.current)return;const{tinyUndoActionsCache:fe,tinyUndoIndexCache:ye}=ur.get(["tinyUndoActionsCache","tinyUndoIndexCache"]);return M.current=new hne(C.current,{interval:5e3,initialActions:fe,initialIndex:ye}),M.current.subscribe((ge,me)=>{ur.set({tinyUndoActionsCache:ge,tinyUndoIndexCache:me})}),()=>{M.current?.destroy()}}else M.current?.destroy(),M.current=null,ur.remove(["tinyUndoActionsCache","tinyUndoIndexCache"])},[n]),D.useEffect(()=>{C.current&&(C.current.style.height="auto",C.current.style.height=(C.current.scrollHeight??0)+"px")},[C.current?.value]),D.useImperativeHandle(t,()=>({element:C.current,blur:()=>{switch(d){case"minimal":case"memos":C.current?.blur();break;case"obsidian":O&&O.editor?.blur()}},focus:fe=>{switch(d){case"minimal":case"memos":C.current?.focus();break;case"obsidian":if(O){if(fe&&fe!==O?.owner?.view?.leaf?.id)return;O.editor?.focus()}}},insertTag:fe=>{switch(d){case"minimal":case"memos":{if(!C.current)return;const ye=C.current.value;C.current.value=ye.slice(0,C.current.selectionStart)+"# "+ye.slice(C.current.selectionStart),S(C.current.value),I();break}case"obsidian":if(fe&&fe!==O?.owner?.view?.leaf?.id)return;if(O){const ye=O.editor,ge=ye.getCursor("from");ye.replaceRange("#",ge),ye.setSelection(Kne(ge,1))}break}},insertText:(fe,ye)=>{switch(d){case"minimal":case"memos":{if(!C.current)return;const ge=C.current.value;C.current.value=ge.slice(0,C.current.selectionStart)+fe+ge.slice(C.current.selectionStart),S(C.current.value),I()}break;case"obsidian":O&&_(fe,ye);break}},setContent:fe=>{switch(d){case"minimal":case"memos":C.current&&(C.current.value=fe,S(C.current.value),I());break;case"obsidian":O&&L(fe);break}},updateContent:fe=>{switch(d){case"minimal":case"memos":C.current&&(C.current.value=fe);break;case"obsidian":O&&G(fe);break}},getContent:()=>{switch(d){case"minimal":case"memos":return C.current?C.current.value:"";case"obsidian":return B()}},toggleSource:()=>{switch(d){case"minimal":case"memos":break;case"obsidian":U();break}},clear:(fe=!1)=>{switch(d){case"minimal":case"memos":C.current&&(C.current.value="",S(C.current.value),I());break;case"obsidian":H(fe);break}}}),[O,d]);const ee=fe=>{if(!C.current)return;const{fileManager:ye}=ke.getState().dailyNotesState.app;if(fe.currentTrigger==="#"){const ge=C.current.value;let me;za!=null?me=za.length:me=0;let Ce=C.current.selectionStart;for(let je=0;je{S(C.current?.value||""),I()},[]),q=async()=>{switch(d){case"minimal":case"memos":if(!C.current)return;C.current.value=re(),v(C.current.value),C.current.value="",I(),M.current?.resetState();break;case"obsidian":await x(B())?(v(B()),H(!0),I()):new Notice(E("Word count exceeded"));break}},$=D.useCallback(()=>{switch(d){case"minimal":case"memos":C.current&&(C.current.value="",S(C.current.value),I());break;case"obsidian":H(!1);break}y()},[d,O,C]),re=()=>ur.get(["thinoEditorContentCache"]).thinoEditorContentCache||"",le=()=>{if(C.current)return C.current.value=re(),C.current.value},ie=fe=>{switch(fe){case"memos":return w.jsx(kH,{className:`common-editor-inputer scroll ${ne?" editing":""}`,loadingComponent:Xne,placeholder:p,movePopupAsYouType:!0,value:le(),innerRef:ye=>{C.current=ye},onFocus:()=>{J(!0)},onBlur:()=>{J(!1)},onInput:Z,style:{maxHeight:`${z.current>400?z.current-400:100}px`},dropdownStyle:{minWidth:180,maxHeight:250,overflowY:"auto"},minChar:0,onItemSelected:ee,scrollToItem:!0,trigger:{"#":{dataProvider:ye=>(za=ye,jne(ye).map(({name:ge,char:me})=>({name:ge,char:me}))),component:S3,afterWhitespace:!0,output:ye=>ye.char},"[[":{dataProvider:ye=>(za=ye,Lne(ye).slice(0,10).map(({name:ge,char:me,file:Ce})=>({name:ge,char:me,file:Ce}))),component:S3,afterWhitespace:!0,output:ye=>ye.char}}});case"minimal":return w.jsx("textarea",{style:{minHeight:48},className:"common-editor-inputer scroll",rows:1,placeholder:p,ref:C,onInput:Z});case"obsidian":return w.jsx("div",{className:"common-editor-inputer common-editor-mod-cm6",onClick:()=>{O?.editor?.focus()},ref:k});default:return w.jsx("div",{className:"common-editor-inputer common-editor-mod-cm6",ref:k})}};return w.jsxs("div",{className:"common-editor-wrapper "+u,children:[ie(d),w.jsxs("div",{className:"common-tools-wrapper",children:[w.jsx("div",{className:"common-tools-container",children:w.jsx(il,{when:e.tools!==void 0,children:e.tools})}),w.jsxs("div",{className:"btns-container",children:[i.enableWordCount&&w.jsx(qne,{value:R,maxCount:i.maxWordCount}),w.jsx(il,{when:b,children:w.jsx("button",{className:"action-btn cancel-btn",onClick:()=>{i&&i.DefaultEditorLocation==="Top"&&!r&&$()},onPointerDown:()=>{(i&&i.DefaultEditorLocation==="Bottom"||r)&&$()},children:Ue.getState().pathname==="/"&&o==="chat"&&(i?.chatViewStyle==="fluent"||i?.chatViewStyle==="inline")?"":E("CANCEL EDIT")})}),w.jsx(il,{when:m,children:w.jsxs("button",{"aria-label":E("Ctrl/Cmd + Enter to save thino"),className:"action-btn confirm-btn",onClick:async()=>{i&&i.DefaultEditorLocation==="Top"&&!r&&await q()},onPointerDown:async()=>{(i&&i.DefaultEditorLocation==="Bottom"||r)&&await q()},children:[o==="chat"&&(i?.chatViewStyle==="fluent"||i?.chatViewStyle==="inline")?"":s,w.jsx("span",{className:"icon-text",children:null})]})})]})]})]})}),Qne=typeof window<"u"?D.useLayoutEffect:D.useEffect;function ere(e,t,n,r){const o=D.useRef(t);Qne(()=>{o.current=t},[t]),D.useEffect(()=>{const i=n?.current||window;if(!(i&&i.addEventListener))return;const a=s=>{o.current(s)};return i.addEventListener(e,a,r),()=>{i.removeEventListener(e,a,r)}},[e,n,r])}function iv(e,t,n="mousedown"){ere(n,r=>{const o=r.target;if(!o||!o.isConnected||o.closest(".suggestion-container")||o.closest(".menu"))return;(Array.isArray(e)?e.every(a=>a.current&&!a.current.contains(o)):e.current&&!e.current.contains(o))&&t(r)})}const AH=e=>{const{year:t,handleYearChange:n}=e,[r,o]=D.useState([]),[i,a]=D.useState(t),s=D.useRef(null),l=D.useRef(null),[u,d]=Y.useState(!1),h=Y.useRef(null);iv(h,()=>{d(!1)}),D.useEffect(()=>{s.current&&N.setIcon(s.current,"chevron-left"),l.current&&N.setIcon(l.current,"chevron-right")},[s,l,u]),D.useEffect(()=>{m(i)},[t]);const m=b=>{const v=parseInt(b),y=v-v%10,S=[];for(let x=0;x<10;x++)S.push(`${y+x}`);o(S)};return w.jsxs(w.Fragment,{children:[w.jsxs("span",{className:"btn year-btn",onClick:()=>{d(!u)},children:[w.jsx("span",{children:t}),w.jsx("span",{children:E("year")})]}),u&&w.jsxs("div",{ref:h,className:"year-picker-wrapper",children:[w.jsxs("div",{className:"year-picker-header",children:[w.jsxs("div",{className:"year-picker-header-title",children:[i," "+(E("year")||"")]}),w.jsxs("div",{className:"year-picker-header-btns",children:[w.jsx("span",{className:"btn",ref:s,onClick:()=>{const b=parseInt(i)-10;a(b.toString()),m(b.toString())}}),w.jsx("span",{className:"btn",ref:l,onClick:()=>{const b=parseInt(i)+10;a(b.toString()),m(b.toString())}})]})]}),w.jsx("div",{className:"year-picker-body",children:w.jsx("div",{className:"year-picker-body-list",children:r.map(b=>w.jsx("div",{className:`year-picker-body-item ${b===i?"selected":""}`,onClick:()=>{a(b),n(b),d(!1)},children:b},b))})})]})]})},NH=e=>{const{month:t,handleMonthChange:n}=e,[r,o]=D.useState([]),[i,a]=D.useState((parseInt(t)+1).toString()),[s,l]=Y.useState(!1),u=Y.useRef(null);iv(u,()=>{l(!1)}),D.useEffect(()=>{h()},[t]);const h=()=>{const p=[];for(let m=1;m<=12;m++)p.push(`${m}`);o(p)};return w.jsxs(w.Fragment,{children:[w.jsxs("span",{className:"btn month-btn",onClick:()=>{l(!s)},children:[w.jsxs("span",{children:[E("monthsShort")[parseInt(t)]||parseInt(t)+1," "]}),w.jsx("span",{children:E("month")||""})]}),s&&w.jsxs("div",{ref:u,className:"month-picker-wrapper",children:[w.jsxs("div",{className:"month-picker-header",children:[w.jsxs("div",{className:"month-picker-header-title",children:[i," "+(E("month")||"")]}),w.jsx("div",{className:"month-picker-header-btns"})]}),w.jsx("div",{className:"month-picker-body",children:w.jsx("div",{className:"month-picker-body-list",children:r.map(p=>w.jsx("div",{className:`month-picker-body-item ${p===i?"selected":""}`,onClick:()=>{a(p),n(p),l(!1)},children:p},p))})})]})]})},xS=e=>{const{className:t,datestamp:n,handleDateStampChange:r}=e,[o,i]=D.useState(Np(n)),[a,s]=D.useState(n);D.useEffect(()=>{i(Np(n))},[n]);const l=new Date(o),u=l.getDay(),d=[];for(let b=0;b{r(v,b.nativeEvent),s(v)},m=b=>{const v=l.getFullYear(),y=l.getMonth()+1;let S=0;y===1&&b===-1?S=new Date(`${v-1}/12/1`).getTime():y===12&&b===1?S=new Date(`${v+1}/1/1`).getTime():S=new Date(`${v}/${y+b}/1`).getTime(),i(Np(S))};return w.jsxs("div",{className:`date-picker-wrapper ${t}`,children:[w.jsxs("div",{className:"date-picker-header",children:[w.jsx("span",{ref:b=>{b&&N.setIcon(b,"chevron-left")},className:"btn btn-text",onClick:()=>m(-1)}),w.jsxs("span",{className:"normal-text",children:[w.jsx(AH,{year:l.getFullYear().toString(),handleYearChange:b=>{i(Np(new Date(`${b}/${l.getMonth()+1}/1`).getTime()))}}),w.jsx(NH,{month:l.getMonth().toString(),handleMonthChange:b=>{i(Np(new Date(`${l.getFullYear()}/${parseInt(b)}/1`).getTime()))}})]}),w.jsx("span",{ref:b=>{b&&N.setIcon(b,"chevron-right")},className:"btn btn-text",onClick:()=>m(1)})]}),w.jsxs("div",{className:"date-picker-day-container",children:[w.jsx("div",{className:"date-picker-day-header",children:E("weekDaysShort").map(b=>w.jsx("span",{className:"day-item",children:b},b))}),w.jsx("div",{className:"date-picker-day-content",children:d.map(b=>b.date===0?w.jsx("span",{className:"day-item null",children:""},b.datestamp):w.jsx("span",{className:`day-item ${b.datestamp===n?"current":""} ${b.datestamp===a?"selected":""}`,onClick:v=>p(v,b.datestamp),children:w.jsx("span",{className:"day-item-text",children:b.date})},b.datestamp))})]})]})};function tre(e){const t=new Date(e),n=new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`);return((n.getMonth()===11?new Date(`${n.getFullYear()+1}/1/1`):new Date(`${n.getFullYear()}/${n.getMonth()+2}/1`)).getTime()-n.getTime())/Uo}function Np(e){const t=new Date(e);return new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`).getTime()}var T3=function(t){return t.reduce(function(n,r){var o=r[0],i=r[1];return n[o]=i,n},{})},x3=typeof window<"u"&&window.document&&window.document.createElement?D.useLayoutEffect:D.useEffect,zo="top",_i="bottom",Bi="right",Vo="left",cD="auto",av=[zo,_i,Bi,Vo],kf="start",Rm="end",nre="clippingParents",OH="viewport",Op="popper",rre="reference",I3=av.reduce(function(e,t){return e.concat([t+"-"+kf,t+"-"+Rm])},[]),uD=[].concat(av,[cD]).reduce(function(e,t){return e.concat([t,t+"-"+kf,t+"-"+Rm])},[]),ore="beforeRead",ire="read",are="afterRead",sre="beforeMain",lre="main",cre="afterMain",ure="beforeWrite",dre="write",fre="afterWrite",hre=[ore,ire,are,sre,lre,cre,ure,dre,fre];function bs(e){return e?(e.nodeName||"").toLowerCase():null}function hi(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ru(e){var t=hi(e).Element;return e instanceof t||e instanceof Element}function ji(e){var t=hi(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function dD(e){if(typeof ShadowRoot>"u")return!1;var t=hi(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function pre(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!ji(i)||!bs(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function mre(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!ji(o)||!bs(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const gre={name:"applyStyles",enabled:!0,phase:"write",fn:pre,effect:mre,requires:["computeStyles"]};function ds(e){return e.split("-")[0]}var Mu=Math.max,I0=Math.min,Ef=Math.round;function iE(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function PH(){return!/^((?!chrome|android).)*safari/i.test(iE())}function Cf(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&ji(e)&&(o=e.offsetWidth>0&&Ef(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Ef(r.height)/e.offsetHeight||1);var a=Ru(e)?hi(e):window,s=a.visualViewport,l=!PH()&&n,u=(r.left+(l&&s?s.offsetLeft:0))/o,d=(r.top+(l&&s?s.offsetTop:0))/i,h=r.width/o,p=r.height/i;return{width:h,height:p,top:d,right:u+h,bottom:d+p,left:u,x:u,y:d}}function fD(e){var t=Cf(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function jH(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&dD(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function pl(e){return hi(e).getComputedStyle(e)}function vre(e){return["table","td","th"].indexOf(bs(e))>=0}function Ic(e){return((Ru(e)?e.ownerDocument:e.document)||window.document).documentElement}function IS(e){return bs(e)==="html"?e:e.assignedSlot||e.parentNode||(dD(e)?e.host:null)||Ic(e)}function k3(e){return!ji(e)||pl(e).position==="fixed"?null:e.offsetParent}function yre(e){var t=/firefox/i.test(iE()),n=/Trident/i.test(iE());if(n&&ji(e)){var r=pl(e);if(r.position==="fixed")return null}var o=IS(e);for(dD(o)&&(o=o.host);ji(o)&&["html","body"].indexOf(bs(o))<0;){var i=pl(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function sv(e){for(var t=hi(e),n=k3(e);n&&vre(n)&&pl(n).position==="static";)n=k3(n);return n&&(bs(n)==="html"||bs(n)==="body"&&pl(n).position==="static")?t:n||yre(e)||t}function hD(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function mm(e,t,n){return Mu(e,I0(t,n))}function bre(e,t,n){var r=mm(e,t,n);return r>n?n:r}function LH(){return{top:0,right:0,bottom:0,left:0}}function RH(e){return Object.assign({},LH(),e)}function FH(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var wre=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,RH(typeof t!="number"?t:FH(t,av))};function Sre(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=ds(n.placement),l=hD(s),u=[Vo,Bi].indexOf(s)>=0,d=u?"height":"width";if(!(!i||!a)){var h=wre(o.padding,n),p=fD(i),m=l==="y"?zo:Vo,b=l==="y"?_i:Bi,v=n.rects.reference[d]+n.rects.reference[l]-a[l]-n.rects.popper[d],y=a[l]-n.rects.reference[l],S=sv(i),x=S?l==="y"?S.clientHeight||0:S.clientWidth||0:0,C=v/2-y/2,k=h[m],M=x-p[d]-h[b],I=x/2-p[d]/2+C,O=mm(k,I,M),R=l;n.modifiersData[r]=(t={},t[R]=O,t.centerOffset=O-I,t)}}function Tre(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||jH(t.elements.popper,o)&&(t.elements.arrow=o))}const HH={name:"arrow",enabled:!0,phase:"main",fn:Sre,effect:Tre,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Mf(e){return e.split("-")[1]}var xre={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ire(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Ef(n*o)/o||0,y:Ef(r*o)/o||0}}function E3(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,d=e.roundOffsets,h=e.isFixed,p=a.x,m=p===void 0?0:p,b=a.y,v=b===void 0?0:b,y=typeof d=="function"?d({x:m,y:v}):{x:m,y:v};m=y.x,v=y.y;var S=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),C=Vo,k=zo,M=window;if(u){var I=sv(n),O="clientHeight",R="clientWidth";if(I===hi(n)&&(I=Ic(n),pl(I).position!=="static"&&s==="absolute"&&(O="scrollHeight",R="scrollWidth")),o===zo||(o===Vo||o===Bi)&&i===Rm){k=_i;var L=h&&I===M&&M.visualViewport?M.visualViewport.height:I[O];v-=L-r.height,v*=l?1:-1}if(o===Vo||(o===zo||o===_i)&&i===Rm){C=Bi;var B=h&&I===M&&M.visualViewport?M.visualViewport.width:I[R];m-=B-r.width,m*=l?1:-1}}var _=Object.assign({position:s},u&&xre),H=d===!0?Ire({x:m,y:v},hi(n)):{x:m,y:v};if(m=H.x,v=H.y,l){var U;return Object.assign({},_,(U={},U[k]=x?"0":"",U[C]=S?"0":"",U.transform=(M.devicePixelRatio||1)<=1?"translate("+m+"px, "+v+"px)":"translate3d("+m+"px, "+v+"px, 0)",U))}return Object.assign({},_,(t={},t[k]=x?v+"px":"",t[C]=S?m+"px":"",t.transform="",t))}function kre(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:ds(t.placement),variation:Mf(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,E3(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,E3(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const _H={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:kre,data:{}};var Ky={passive:!0};function Ere(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=hi(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(d){d.addEventListener("scroll",n.update,Ky)}),s&&l.addEventListener("resize",n.update,Ky),function(){i&&u.forEach(function(d){d.removeEventListener("scroll",n.update,Ky)}),s&&l.removeEventListener("resize",n.update,Ky)}}const BH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ere,data:{}};var Cre={left:"right",right:"left",bottom:"top",top:"bottom"};function Ub(e){return e.replace(/left|right|bottom|top/g,function(t){return Cre[t]})}var Mre={start:"end",end:"start"};function C3(e){return e.replace(/start|end/g,function(t){return Mre[t]})}function pD(e){var t=hi(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function mD(e){return Cf(Ic(e)).left+pD(e).scrollLeft}function Dre(e,t){var n=hi(e),r=Ic(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var u=PH();(u||!u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+mD(e),y:l}}function Are(e){var t,n=Ic(e),r=pD(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Mu(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Mu(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+mD(e),l=-r.scrollTop;return pl(o||n).direction==="rtl"&&(s+=Mu(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function gD(e){var t=pl(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function YH(e){return["html","body","#document"].indexOf(bs(e))>=0?e.ownerDocument.body:ji(e)&&gD(e)?e:YH(IS(e))}function gm(e,t){var n;t===void 0&&(t=[]);var r=YH(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=hi(r),a=o?[i].concat(i.visualViewport||[],gD(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(gm(IS(a)))}function aE(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Nre(e,t){var n=Cf(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function M3(e,t,n){return t===OH?aE(Dre(e,n)):Ru(t)?Nre(t,n):aE(Are(Ic(e)))}function Ore(e){var t=gm(IS(e)),n=["absolute","fixed"].indexOf(pl(e).position)>=0,r=n&&ji(e)?sv(e):e;return Ru(r)?t.filter(function(o){return Ru(o)&&jH(o,r)&&bs(o)!=="body"}):[]}function Pre(e,t,n,r){var o=t==="clippingParents"?Ore(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,u){var d=M3(e,u,r);return l.top=Mu(d.top,l.top),l.right=I0(d.right,l.right),l.bottom=I0(d.bottom,l.bottom),l.left=Mu(d.left,l.left),l},M3(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function UH(e){var t=e.reference,n=e.element,r=e.placement,o=r?ds(r):null,i=r?Mf(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case zo:l={x:a,y:t.y-n.height};break;case _i:l={x:a,y:t.y+t.height};break;case Bi:l={x:t.x+t.width,y:s};break;case Vo:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var u=o?hD(o):null;if(u!=null){var d=u==="y"?"height":"width";switch(i){case kf:l[u]=l[u]-(t[d]/2-n[d]/2);break;case Rm:l[u]=l[u]+(t[d]/2-n[d]/2);break}}return l}function Fm(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?nre:s,u=n.rootBoundary,d=u===void 0?OH:u,h=n.elementContext,p=h===void 0?Op:h,m=n.altBoundary,b=m===void 0?!1:m,v=n.padding,y=v===void 0?0:v,S=RH(typeof y!="number"?y:FH(y,av)),x=p===Op?rre:Op,C=e.rects.popper,k=e.elements[b?x:p],M=Pre(Ru(k)?k:k.contextElement||Ic(e.elements.popper),l,d,a),I=Cf(e.elements.reference),O=UH({reference:I,element:C,strategy:"absolute",placement:o}),R=aE(Object.assign({},C,O)),L=p===Op?R:I,B={top:M.top-L.top+S.top,bottom:L.bottom-M.bottom+S.bottom,left:M.left-L.left+S.left,right:L.right-M.right+S.right},_=e.modifiersData.offset;if(p===Op&&_){var H=_[o];Object.keys(B).forEach(function(U){var G=[Bi,_i].indexOf(U)>=0?1:-1,K=[zo,_i].indexOf(U)>=0?"y":"x";B[U]+=H[K]*G})}return B}function jre(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?uD:l,d=Mf(r),h=d?s?I3:I3.filter(function(b){return Mf(b)===d}):av,p=h.filter(function(b){return u.indexOf(b)>=0});p.length===0&&(p=h);var m=p.reduce(function(b,v){return b[v]=Fm(e,{placement:v,boundary:o,rootBoundary:i,padding:a})[ds(v)],b},{});return Object.keys(m).sort(function(b,v){return m[b]-m[v]})}function Lre(e){if(ds(e)===cD)return[];var t=Ub(e);return[C3(e),t,C3(t)]}function Rre(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,u=n.padding,d=n.boundary,h=n.rootBoundary,p=n.altBoundary,m=n.flipVariations,b=m===void 0?!0:m,v=n.allowedAutoPlacements,y=t.options.placement,S=ds(y),x=S===y,C=l||(x||!b?[Ub(y)]:Lre(y)),k=[y].concat(C).reduce(function(le,ie){return le.concat(ds(ie)===cD?jre(t,{placement:ie,boundary:d,rootBoundary:h,padding:u,flipVariations:b,allowedAutoPlacements:v}):ie)},[]),M=t.rects.reference,I=t.rects.popper,O=new Map,R=!0,L=k[0],B=0;B=0,K=G?"width":"height",z=Fm(t,{placement:_,boundary:d,rootBoundary:h,altBoundary:p,padding:u}),ne=G?U?Bi:Vo:U?_i:zo;M[K]>I[K]&&(ne=Ub(ne));var J=Ub(ne),ee=[];if(i&&ee.push(z[H]<=0),s&&ee.push(z[ne]<=0,z[J]<=0),ee.every(function(le){return le})){L=_,R=!1;break}O.set(_,ee)}if(R)for(var Z=b?3:1,q=function(ie){var fe=k.find(function(ye){var ge=O.get(ye);if(ge)return ge.slice(0,ie).every(function(me){return me})});if(fe)return L=fe,"break"},$=Z;$>0;$--){var re=q($);if(re==="break")break}t.placement!==L&&(t.modifiersData[r]._skip=!0,t.placement=L,t.reset=!0)}}const zH={name:"flip",enabled:!0,phase:"main",fn:Rre,requiresIfExists:["offset"],data:{_skip:!1}};function D3(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function A3(e){return[zo,Bi,_i,Vo].some(function(t){return e[t]>=0})}function Fre(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Fm(t,{elementContext:"reference"}),s=Fm(t,{altBoundary:!0}),l=D3(a,r),u=D3(s,o,i),d=A3(l),h=A3(u);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:d,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}const VH={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Fre};function Hre(e,t,n){var r=ds(e),o=[Vo,zo].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[Vo,Bi].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function _re(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=uD.reduce(function(d,h){return d[h]=Hre(h,t.rects,i),d},{}),s=a[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[r]=a}const WH={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:_re};function Bre(e){var t=e.state,n=e.name;t.modifiersData[n]=UH({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const GH={name:"popperOffsets",enabled:!0,phase:"read",fn:Bre,data:{}};function Yre(e){return e==="x"?"y":"x"}function Ure(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,u=n.rootBoundary,d=n.altBoundary,h=n.padding,p=n.tether,m=p===void 0?!0:p,b=n.tetherOffset,v=b===void 0?0:b,y=Fm(t,{boundary:l,rootBoundary:u,padding:h,altBoundary:d}),S=ds(t.placement),x=Mf(t.placement),C=!x,k=hD(S),M=Yre(k),I=t.modifiersData.popperOffsets,O=t.rects.reference,R=t.rects.popper,L=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,B=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,H={x:0,y:0};if(I){if(i){var U,G=k==="y"?zo:Vo,K=k==="y"?_i:Bi,z=k==="y"?"height":"width",ne=I[k],J=ne+y[G],ee=ne-y[K],Z=m?-R[z]/2:0,q=x===kf?O[z]:R[z],$=x===kf?-R[z]:-O[z],re=t.elements.arrow,le=m&&re?fD(re):{width:0,height:0},ie=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:LH(),fe=ie[G],ye=ie[K],ge=mm(0,O[z],le[z]),me=C?O[z]/2-Z-ge-fe-B.mainAxis:q-ge-fe-B.mainAxis,Ce=C?-O[z]/2+Z+ge+ye+B.mainAxis:$+ge+ye+B.mainAxis,je=t.elements.arrow&&sv(t.elements.arrow),Ie=je?k==="y"?je.clientTop||0:je.clientLeft||0:0,Fe=(U=_?.[k])!=null?U:0,ce=ne+me-Fe-Ie,Ne=ne+Ce-Fe,Pe=mm(m?I0(J,ce):J,ne,m?Mu(ee,Ne):ee);I[k]=Pe,H[k]=Pe-ne}if(s){var _e,qe=k==="x"?zo:Vo,Xe=k==="x"?_i:Bi,Qe=I[M],it=M==="y"?"height":"width",at=Qe+y[qe],vt=Qe-y[Xe],Mt=[zo,Vo].indexOf(S)!==-1,Kt=(_e=_?.[M])!=null?_e:0,gn=Mt?at:Qe-O[it]-R[it]-Kt+B.altAxis,Ge=Mt?Qe+O[it]+R[it]-Kt-B.altAxis:vt,ut=m&&Mt?bre(gn,Qe,Ge):mm(m?gn:at,Qe,m?Ge:vt);I[M]=ut,H[M]=ut-Qe}t.modifiersData[r]=H}}const ZH={name:"preventOverflow",enabled:!0,phase:"main",fn:Ure,requiresIfExists:["offset"]};function zre(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Vre(e){return e===hi(e)||!ji(e)?pD(e):zre(e)}function Wre(e){var t=e.getBoundingClientRect(),n=Ef(t.width)/e.offsetWidth||1,r=Ef(t.height)/e.offsetHeight||1;return n!==1||r!==1}function Gre(e,t,n){n===void 0&&(n=!1);var r=ji(t),o=ji(t)&&Wre(t),i=Ic(t),a=Cf(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((bs(t)!=="body"||gD(i))&&(s=Vre(t)),ji(t)?(l=Cf(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=mD(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Zre(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function $re(e){var t=Zre(e);return hre.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function qre(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Kre(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var N3={placement:"bottom",modifiers:[],strategy:"absolute"};function O3(){for(var e=arguments.length,t=new Array(e),n=0;n({placement:e,modifiers:[{name:"flip",options:{allowedAutoPlacements:t,rootBoundary:"document"}},{name:"preventOverflow",options:{rootBoundary:"document"}}]}),coe=e=>{const n=D.useRef(null),[r,o]=D.useState(null),[i,a]=D.useState(0);let s,l;const u=()=>{if(N.Platform.isMobile){s="right-end",l=["bottom"];return}const h=window.innerWidth-i>280*1.2,p=window.innerWidth-i<280,m=window.innerWidth>280*1.5;if(e.DefaultEditorLocation!=="Bottom"){h?(s="right-end",l=["left-end"]):p&&m?(s="left-end",l=["right-end"]):(s="bottom",l=["bottom"]);return}h?(s="top-end",l=["top-start"]):p&&i>280?(s="top-start",l=["top-end"]):(s="top",l=["top"])};D.useEffect(()=>{e&&u()},[i,e?.DefaultEditorLocation]);const d=kS(n.current,r,loe(s,l));return{setPosX:a,popperRef:n,setPopperElement:o,popper:d}},uoe=()=>{const e=new Set,t=Ue.getState().query.filter,n=Ue.getState().query.tag,r=Ct.getQueryById(t||"");if(r&&r.querystring){const o=JSON.parse(r.querystring);if(Array.isArray(o))for(const i of o)i.type==="TAG"&&i.value&&i.value.operator==="CONTAIN"&&e.add(i.value.value)}return n&&e.add(n),Array.from(e)},doe=e=>{const{offsetLeft:t,offsetTop:n,offsetHeight:r,offsetWidth:o,selectionEnd:i}=e,a=document.createElement("div"),s=window.getComputedStyle(e);for(const v of s)a.style.setProperty(v,s.getPropertyValue(v));a.style.position="fixed",a.style.visibility="hidden",a.style.whiteSpace="pre-wrap";const u=e.tagName==="INPUT"?e.value.replace(/ /g,"."):e.value;a.textContent=u.substring(0,i||0),e.tagName==="TEXTAREA"&&(a.style.height="auto");const d=document.createElement("span");d.textContent=u.substring(i||0)||".",a.appendChild(d),document.body.appendChild(a);const{offsetLeft:h,offsetTop:p,offsetHeight:m,offsetWidth:b}=d;return document.body.removeChild(a),{x:t+h,y:n+p,h:r+m,w:o+b}},Du=({className:e,editorType:t,destroy:n,modal:r})=>{const{globalState:o,dailyNotesState:{app:i,settings:a,view:s,verifyState:l}}=D.useContext(ct),[u,d]=wh(!0),h=D.useRef(u),[p,m]=Ho(!0),b=D.useRef(null),v=D.useRef(null),y=D.useRef(o),[S,x]=Ho(!1),[C,k]=Ho(!1),{setPosX:M,popperRef:I,setPopperElement:O,popper:R}=coe(a),[L]=Ho(parseInt(N.moment().format("x"))),B=D.useRef(null),[_,H]=Ho(a?.EnabledLocationList.length===1?a?.EnabledLocationList[0].value:a?.MemoSaveLocation||"DAILY"),U=D.useRef(a.MemoSaveLocation||"DAILY");D.useEffect(()=>{h.current=u},[u]),D.useEffect(()=>{!v.current||!i||!s||(s.registerEvent(i.workspace.on("focus-on-textarea",ce=>{v.current?.focus(ce?.id)})),s.registerEvent(i.workspace.on("blur-on-memos",()=>{v.current?.blur()})),s.registerEvent(i.workspace.on("send-to-thino",async(ce,Ne)=>{if(typeof ce=="string")v.current?.insertText(ce+`
+`,Ne.id);else{const Pe=ce.toPNG(),_e=new Blob([Pe],{type:"image/png"}),qe=new File([_e],"image.png",{type:"image/png",lastModified:Date.now()});if(!qe)return;const Xe=await ee(qe);Xe&&v.current?.insertText(Xe+`
+`,Ne.id)}})))},[v,s,i]),D.useEffect(()=>{a&&d(a.DefaultPrefix==="List")},[a?.DefaultPrefix]),D.useEffect(()=>{if(a){if(a.EnabledLocationList.length===1){H(a.EnabledLocationList[0].value);return}H(a.MemoSaveLocation||"DAILY")}},[a?.MemoSaveLocation,a?.EnabledLocationList]),D.useEffect(()=>{if(!a||!B.current)return;const ce=Pm.find(Pe=>Pe.title===_)?.icon;N.setIcon(B.current,ce),N.requireApiVersion("1.4.4")&&N.setTooltip(B.current,E("Thino Save To: ")+_),U.current=_;const Ne=o.manifest;if(Ne){const Pe=i?.plugins.getPlugin(Ne.id);if(Pe){if(Pe.settings.MemoSaveLocation===_)return;Pe.settings.MemoSaveLocation=_,Pe.saveSettings()}}},[_,p]),D.useEffect(()=>{v.current&&a&&a.MemoSaveLocation&&H(a.MemoSaveLocation)},[B,a]),D.useEffect(()=>{if(!v.current||!a||N.Platform.isDesktop||o.globalEditorShown)return;const ce=a.UseButtonToShowEditor&&a.DefaultEditorLocation==="Bottom";if(N.Platform.isDesktop){m(!0);return}if(t&&t==="inline"){m(!0);return}if(m(N.Platform.isMobile&&!ce),!ce||o.memoListView==="chat")return;const Ne=document.body.find(".memolist-scrollview");Ne&&(Ne.onscroll=()=>{if(o.globalEditorShown)return;if(!o.memoListView&&Ze.getState().memoListView==="chat"){Ne.onscroll=null;return}const Pe=v.current.getContent();N.Platform.isMobile&&ce&&!Pe&&m(!1)})},[o.globalEditorShown,t,v]);const G=()=>{k(!1)};D.useEffect(()=>{if(i&&(o.markMemoId||o.editMemoId?.trim()&&o.editMemoId!==y.current.editMemoId)){const ce=i.workspace.getLeavesOfType("thino_view");ce.length>0&&i.workspace.revealLeaf(ce[0])}if(o.markMemoId){const ce=de.getMemoById(o.markMemoId);if(ce&&ce.sourceType==="DAILY")q8(ce).then(Ne=>{const Pe=`${E("MARK")}: ${Ne}`;v.current?.insertText(Pe),v.current?.focus(),Ze.setMarkMemoId("")});else{const Ne=`${E("MARK")}: [@THINO](${o.markMemoId})`;v.current?.insertText(Ne),v.current?.focus(),Ze.setMarkMemoId("")}return}if(o.editMemoId?.trim()&&o.editMemoId!==y.current.editMemoId){const ce=de.getMemoById(o.editMemoId);if(ce)switch(d(ce.thinoType==="JOURNAL"),a.EditorType){case"memos":v.current?.setContent(ce.content.replace(/ \^\S{6}$/,"")||""),v.current?.focus();break;case"obsidian":v.current?.clear(!1),v.current?.setContent(ce.content.replace(/ \^\S{6}$/,"")||""),v.current?.focus();break}}y.current=o},[o.markMemoId,o.editMemoId]),D.useEffect(()=>{!v.current||S||a.EditorType==="memos"&&(v.current?.element.addEventListener("paste",K),v.current?.element.addEventListener("drop",z),v.current?.element.addEventListener("click",ne),x(!0))},[v.current]);const K=async ce=>{if(ce.clipboardData&&ce.clipboardData.files.length>0){ce.preventDefault();const Ne=ce.clipboardData.files;for(const Pe of Ne){const _e=await ee(Pe);_e&&v.current?.insertText(_e)}}},z=async ce=>{if(ce.dataTransfer&&ce.dataTransfer.files.length>0){ce.preventDefault();const Ne=ce.dataTransfer.files;for(const Pe of Ne){const _e=await ee(Pe);_e&&v.current?.insertText(_e)}}},ne=()=>{re(v.current?.element.value||"")},J=async(ce,Ne)=>{const Pe=ce.ctrlKey||ce.metaKey,_e=ce.altKey;if(ce.key==="Escape"&&o.globalEditorShown&&(Ze.setGlobalEditorShown(!1),ce.preventDefault()),Pe&&ce.key==="Enter"){ce.preventDefault(),ce.stopPropagation(),Ne?(await q(v.current?.getContent()),v.current?.clear(!0)):await q(v.current?.element.value);return}if(_e)for(let qe=0;qe{Ne||re(v.current?.element.value||"")})},ee=D.useCallback(async ce=>{const{type:Ne}=ce;if(Ne.startsWith("image"))try{return`${await tD.upload(ce)}`}catch(Pe){new N.Notice(Pe)}},[]),Z=D.useCallback(async ce=>{if(a.enableWordCount){const Ne=!N.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),Pe=N.Platform.isDesktop?await Sn():Ne.identifier||Ne.uuid;if(!(l&&l?.appId===Pe))return Nt(),!1;const qe=ce.replace(/```[^\S\r\n]*[a-z]*\n.*?\n```/g,""),Xe=Le.getWordCount(qe),Qe=a.maxWordCount||1e3;return!(Xe>Qe&&Qe>0)}return!0},[a.enableWordCount,a.maxWordCount]),q=async ce=>{if(!ce||ce.trim()===""){new N.Notice(E("Content cannot be empty"));return}const Ne=$e.getState().settings,Pe=Ne?.addTagAutomatically,_e=Ne?.addTagWithNewline,qe=Ne?.addTagPosition,Qe=(uoe()||[]).filter(Mt=>!ce.includes(`#${Mt}`)),it=async(Mt,Kt)=>{Kt=Kt.replaceAll(" "," "),Xy("");try{if(!Mt){let Ge;switch(U.current){case"CANVAS":Ge=await de.createMemoCanvas({text:Kt,isList:h.current});break;case"MULTI":Ge=await de.createMemoMultiFile({content:Kt,isList:h.current});break;case"DAILY":Ge=await de.createMemoDaily(Kt,h.current);break;case"FILE":Ge=await de.createMemoSingleFile({content:Kt,isList:h.current});break}if(!Ge)return;de.pushMemo(Ge),(!Pe||Qe.length===0)&&Ue.clearQuery();const mt=(i||$e.getState().app)?.loadLocalStorage("tokenForSync");Ge&&mt&&a.startSync&&setTimeout(async()=>{try{if(U.current!=="DAILY"){const It=await qM({content:Kt,thinoType:"FILE",thinoStatus:Ge.thinoType==="JOURNAL"?"JOURNAL":Ge.thinoType==="TASK-TODO"?"TASK-TODO":"TASK-DONE"});await de.updateMemoById(Ge.id,It,!0)}}catch(It){console.error(It)}},200);return}const gn=de.getMemoById(Mt);if(gn&&(gn.content!==Kt||gn.thinoType!==(h.current?"JOURNAL":"TASK-TODO"))){const Ge=await de.updateMemo(gn.id,Kt,h.current?"JOURNAL":gn.thinoType.startsWith("TASK")?gn.thinoType:"TASK-TODO");Ge.updatedAt=Le.getDateTimeString(Date.now()),de.editMemo(Ge)}Ze.setEditMemoId("")}catch(gn){new N.Notice(gn.message)}};n&&n(),n&&v.current?.clear(!0);const{editMemoId:at}=Ze.getState(),vt=Qe&&Qe.length>0&&Pe&&!at?qe==="Beginning"?`${Qe.map(Mt=>`#${Mt}`).join(" ")} ${_e?`
+`:""}${ce}`:`${ce} ${_e?`
+`:""}${Qe.map(Mt=>`#${Mt}`).join(" ")}`:ce;await it(at,vt),Xy("")},$=D.useCallback(()=>{Ze.setEditMemoId(""),v.current?.setContent(""),Xy("")},[]),re=D.useCallback(ce=>{if(Xy(ce??""),!v.current)return;const Ne=v.current.getContent(),Pe=v.current.element.selectionStart,_e=Ne.slice(0,Pe),qe=Ne.slice(Pe);(_e.endsWith("@")||_e.endsWith("📆"))&&qe.startsWith(" ")||(_e.endsWith("@")||_e.endsWith("📆"))&&qe===""?(Ce(),k(!0)):k(!1),setTimeout(()=>{v.current?.focus()})},[a.EditorType]),le=ce=>{if(!v.current||!a)return;ce&&(G(),d(!1));const Ne=v.current.getContent(),Pe=v.current.element.selectionStart,_e=Ne.slice(0,Pe),qe=Ne.slice(Pe),Xe=N.moment(ce);if(_e.endsWith("@"))switch(a.InsertDateFormat){case"Dataview":v.current.element.value=Ne.slice(0,v.current.element.selectionStart-1)+"[due:: "+Xe.format("YYYY-MM-DD")+"]"+qe,v.current.element.setSelectionRange(Pe+17,Pe+17),v.current.focus(),re(v.current.element.value);break;case"Tasks":v.current.element.value=Ne.slice(0,v.current.element.selectionStart-1)+"📅 "+Xe.format("YYYY-MM-DD")+qe,v.current.element.setSelectionRange(Pe+11,Pe+11),v.current.focus(),re(v.current.element.value)}else{v.current.element.value=_e+Xe.format("YYYY-MM-DD")+qe,v.current.element.setSelectionRange(Pe+10,Pe+10),v.current.focus(),re(v.current.element.value);return}},ie=()=>{v.current&&d()},fe=async()=>{const ce=!N.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),Ne=N.Platform.isDesktop?await Sn():ce.identifier||ce.uuid;return!l||l?.appId!==Ne?(Nt(),!1):!0},ye=async ce=>{if(!await fe())return;const Ne=new N.Menu;a.EnabledLocationList.forEach(Xe=>{Ne.addItem(Qe=>{Qe.setTitle(E(Xe.value)).setIcon(Pm.find(it=>it.title===Xe.value)?.icon??"file").setChecked(_===Xe.value).onClick(()=>{H(Xe.value)})})});let Pe=ce.target,_e=null;for(;!Pe.hasClass("location-wrapper")&&(_e=Pe.parentElement,_e);)Pe=_e;const qe=Pe.getBoundingClientRect();setTimeout(()=>{Ne.showAtPosition({x:qe.x,y:qe.bottom,width:qe.width,left:!1,overlap:!0})},200)},ge=D.useCallback(async ce=>{const Ne=await MH(i,r?"modal":"view"),Pe=new N.Menu;if(Pe.dom.addClass("history-menu"),Ne.length===0){Pe.addItem(_e=>{_e.setTitle(E("No history")),_e.setIcon("file-clock"),_e.setDisabled(!0)}),Pe.showAtMouseEvent(ce.nativeEvent);return}Ne.forEach(_e=>{Pe.addItem(qe=>{qe.titleEl.addClass("history-item"),qe.titleEl.createEl("span",{text:`${_e.content.length} chars`}),qe.titleEl.createEl("span",{text:N.moment(_e.timestamp).format("YYYY-MM-DD HH:mm:ss")}),qe.onClick(()=>{v.current?.updateContent(_e.content)}),qe.dom.onmouseover=Xe=>{const Qe=new N.HoverPopover(s,qe.dom,1e3);Qe.hoverEl.createEl("div",{text:"History content:",cls:"history-popover-title"}),Qe.hoverEl.createEl("div",{cls:"history-popover-content"},it=>{N.MarkdownRenderer.render(i,_e.content,it,"",s)}),Qe.hoverEl.addClass("history-popover"),Qe.load(),s.addChild(Qe),setTimeout(()=>{Qe.unload()},1e3)}})}),Pe.showAtMouseEvent(ce.nativeEvent)},[i]),me=D.useCallback(()=>{if(!(!v.current&&a.EditorType==="memos"))switch(a.EditorType){case"obsidian":v.current?.focus(),v.current?.insertTag();break;case"memos":{const ce=v.current.getContent(),Ne=v.current.element.selectionStart,Pe=ce.slice(0,Ne),_e=ce.slice(Ne);let qe=Pe+"# "+_e,Xe=Pe.length+1;Pe.endsWith("#")&&_e.startsWith(" ")&&(qe=Pe.slice(0,Pe.length-1)+_e.slice(1),Xe=Pe.length-1),v.current.element.value=qe,v.current.element.setSelectionRange(Xe,Xe),v.current.focus();const Qe=new Event("input",{bubbles:!0,cancelable:!0});v.current.element.dispatchEvent(Qe),re(v.current.element.value)}}},[i]),Ce=D.useCallback(()=>{if(!v.current||!I.current||!a||!i)return;const Pe=i.workspace.getLeavesOfType(Qr)[0].view.containerEl,_e=280,qe=Pe.clientWidth,{x:Xe,y:Qe}=doe(v.current.element);let it,at;N.Platform.isMobile?(window.innerWidth-Xe>_e?it=(Xe+_e+16>qe,Xe+18):window.innerWidth-Xe<_e?it=(Xe+_e+16>qe,Xe+34):it=v.current.element.clientWidth/2,a.DefaultEditorLocation==="Bottom"&&window.innerWidth>875?at=Qe+4:a.DefaultEditorLocation==="Bottom"&&window.innerWidth<=875?at=Qe+19:a.DefaultEditorLocation==="Top"&&window.innerWidth<=875&&(at=Qe+36)):(it=(Xe+_e+16>qe,Xe+18),at=Qe+34),M(Xe),I.current.style.left=`${it}px`,I.current.style.top=`${at}px`},[a,i]),je=D.useCallback(()=>{const ce=document.createElement("input");document.body.appendChild(ce),ce.type="file",ce.multiple=!1,ce.accept="image/png, image/gif, image/jpeg",ce.onchange=async()=>{if(!ce.files||ce.files.length===0)return;const Ne=ce.files[0],Pe=await ee(Ne);Pe&&v.current?.insertText(Pe),document.body.removeChild(ce)},ce.click()},[]),Ie=!!o.editMemoId,Fe=D.useMemo(()=>({className:"memo-editor",inputerType:a.EditorType||"obsidian",modal:r,initialContent:foe(),placeholder:E("What do you think now..."),showConfirmBtn:!0,showCancelBtn:Ie,showTools:!0,onConfirmBtnClick:q,onCancelBtnClick:$,onContentChange:re,onCheckCount:Z}),[Ie,a.EditorType]);return w.jsxs(w.Fragment,{children:[!o.globalEditorShown&&t==="block"&&w.jsx("div",{ref:ce=>{b.current=ce,ce&&N.setIcon&&N.setIcon(ce,"plus-circle")},className:`memo-show-editor-button ${p?"thino-hidden":""}`,onClick:()=>{b.current.firstElementChild?.toggleClass("rotate-hidden",!0),setTimeout(()=>{m(!0),b.current.firstElementChild.toggleClass("rotate-hidden",!1)},500),setTimeout(()=>{v.current?.focus()},600)}}),w.jsxs("div",{className:`memo-editor-wrapper ${e||""} ${Ie?"edit-ing":""} ${o.globalEditorShown?"fullscreen-editor":""} ${p?"":"thino-hidden"}`,onKeyDownCapture:ce=>J(ce,!0),children:[w.jsx("span",{className:`tip-text ${Ie?"":"thino-hidden"}`,children:"Modifying..."}),w.jsx(Jne,{ref:v,...Fe,tools:w.jsxs(w.Fragment,{children:[w.jsx("span",{ref:ce=>{ce&&N.setIcon(ce,"hash")},className:"btn action-btn add-tag",onClick:()=>{a&&a.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&me()},onPointerDown:()=>{(a&&a.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&me()}}),w.jsx("span",{ref:ce=>{ce&&N.setIcon(ce,"paperclip")},className:"btn action-btn file-upload",onClick:()=>{a&&a.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&je()},onPointerDown:()=>{(a&&a.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&je()}}),o.editMemoId===""&&w.jsx("span",{ref:ce=>{ce&&N.setIcon(ce,u?"layout-list":"check-square")},className:tn("btn action-btn list-or-task",u?"list":"task"),onClick:()=>{a&&a.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&ie()},onPointerDown:()=>{(a&&a.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&ie()}}),w.jsx("div",{ref:ce=>{ce&&(N.setIcon&&N.setIcon(ce,o.globalEditorShown?"shrink":"expand"),N.setTooltip&&N.setTooltip(ce,o.globalEditorShown?E("Exit fullscreen mode"):E("Enter fullscreen mode")))},className:"action-btn show-editor pro",onPointerDown:async()=>{await fe()&&(m(!0),Ze.setGlobalEditorShown(!o.globalEditorShown))}}),w.jsx("div",{className:"action-btn split-line pro"}),w.jsx("div",{className:"action-btn location-wrapper pro",onClick:async ce=>{a&&a.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&await ye(ce)},onPointerDown:async ce=>{(a&&a.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&await ye(ce)},children:w.jsx("div",{ref:B,className:"action-btn file-location-btn"})}),w.jsx("div",{className:"action-btn history-btn",onClick:ce=>{a&&a.DefaultEditorLocation==="Top"&&!o.globalEditorShown&&ge(ce)},onPointerDown:ce=>{(a&&a.DefaultEditorLocation==="Bottom"||o.globalEditorShown)&&ge(ce)},ref:ce=>{ce&&N.setIcon(ce,"file-clock")}})]})}),w.jsx("div",{ref:I,className:"date-picker",children:C&&w.jsx("div",{tabIndex:-1,style:R.styles.popper,...R.attributes.popper,ref:O,role:"dialog",children:w.jsx(xS,{className:`editor-date-picker ${C?"":"thino-hidden"}`,datestamp:L,handleDateStampChange:le})})})]})]})};function foe(){return ur.get(["thinoEditorContentCache"]).thinoEditorContentCache??""}function Xy(e){ur.set({thinoEditorContentCache:e})}const hoe=e=>{const t=[];return e.map(n=>{t.length==0?t.push({date:N.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),have:[n]}):t.some(o=>{if(o.date==N.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"))return o.have.push(n),!0})||t.push({date:N.moment(n.createdAt,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD"),have:[n]})}),t},poe=e=>de.getState().commentMemos.filter(t=>t.linkId===e.hasId).sort((t,n)=>Le.getTimeStampByDate(t.createdAt)-Le.getTimeStampByDate(n.createdAt)).map(t=>({...t,createdAtStr:Le.getDateTimeString(t.createdAt),dateStr:Le.getDateString(t.createdAt)})),moe=e=>{const t=$e.getState().settings,n=Nq(),r=t?.ShowDate?" ":"",o="YYYY/MM/DD HH:mm:ss",i=/comment:(.*)$/g,a=/^\d{14}/g,s=(h,p,m)=>{const b=N.moment(h.createdAt,o).format("HH:mm");return m?m.replace(/{TIME}/g,b).replace(/{CONTENT}/g,p):`${b} ${p}`},l=h=>{const p=h.match(/TASK-(.*)?/g);return p?p[1]:""},u=h=>h==="TASK-TODO"?"- [ ] ":h==="TASK-DONE"?"- [x] ":h.match(/TASK-(.*)?/g)?`- [${l(h)}] `:"- ",d=h=>h.reduce((p,m)=>{const b=m.sourceType!=="MULTI"?`${m.content}`:`[[${m.path}]]`,v=t?.ShowTime?s(m,b,t?.DefaultMemoComposition):b,y=`${u(m.thinoType)}${v}`;let S="";return t.CommentOnMemos&&m.hasId!==void 0&&m.hasId!==""&&(S=poe(m).reduce((C,k)=>{const M=u(k.thinoType),I=k.content.replace(i,"").replace(a,""),O=t?.ShowDate?`${M}[[${N.moment(k.createdAt).format(n)}]] ${N.moment(k.createdAt).format("HH:mm")} ${I}`:`${M}${I}`;return C+r+" "+O+`
+`},"")),p+r+y.replace(/ \^\S{6}/g,"")+`
+`+S},"");return e.reduce((h,p)=>{const m=t?.ShowDate?`- [[${N.moment(p.date,"YYYY-MM-DD").format(n)}]]
+`:"",b=d(p.have),v=t?.ShowDate&&t?.AddBlankLineWhenDate&&!t?.CommentOnMemos?`
+`:"";return h+m+b+v},"").replace(/ /g,`
+ `)},goe=[{label:E("Today"),value:N.moment().format("YYYY-MM-DD")},{label:E("Yesterday"),value:N.moment().subtract(1,"days").format("YYYY-MM-DD")},{label:E("Last 7 days"),value:N.moment().subtract(7,"days").format("YYYY-MM-DD")},{label:E("Last 30 days"),value:N.moment().subtract(30,"days").format("YYYY-MM-DD")},{label:E("Last 90 days"),value:N.moment().subtract(90,"days").format("YYYY-MM-DD")},{label:E("Last 180 days"),value:N.moment().subtract(180,"days").format("YYYY-MM-DD")},{label:E("Last 365 days"),value:N.moment().subtract(365,"days").format("YYYY-MM-DD")}],KH=e=>{const{handleValueChange:t,setShownStatus:n}=e;return w.jsxs(w.Fragment,{children:[e.type==="icon"&&w.jsx("div",{className:"quick-date-btn-group",children:goe.map((r,o)=>w.jsx("div",{className:"btn action-btn quick-date-btn",onClick:()=>{t(r.value),n&&n(!1)},children:r.label},o))}),w.jsx(xS,{className:"calendar-date-picker",datestamp:e?.defaultValue||N.moment().startOf("day").valueOf(),handleDateStampChange:(r,o)=>{t(e.type==="icon"?N.moment(r).format("YYYY-MM-DD"):r.toString()),n&&n(!1)}})]})},k0=e=>{const{handleValueChange:t}=e,[n,r]=Y.useState(!1),o=Y.useRef(null),i=Y.useRef(null),a=kS(i.current,o.current,{placement:"bottom-start"});return iv(o,()=>{r(!1)}),w.jsxs(w.Fragment,{children:[w.jsx("span",{ref:l=>{i.current=l,l&&e.type==="icon"&&N.setIcon(l,"calendar")},className:`btn calendar-btn ${e.type==="icon"?"icon-btn":"text-btn"}`,onClick:()=>{!N.Platform.isMobile&&r(!n),!N.Platform.isMobile&&a?.update&&a?.update(),N.Platform.isMobile&&new XH($e.getState().app,e.type,t).open()},children:e.type==="text"&&e.defaultValue?e.defaultText?e.defaultText:N.moment(e.defaultValue,"x").subtract(e.startOrEnd==="end"?1:0,"days").format("YYYY/MM/DD"):""}),w.jsx("div",{className:`menu-btns-popup ${n?"":"thino-hidden"}`,ref:o,style:a.styles.popper,children:w.jsx(KH,{type:e.defaultText?"icon":e.type,handleValueChange:t,setShownStatus:r})})]})};class XH extends N.Modal{root;type;handleValueChange;constructor(t,n,r){super(t),this.type=n,this.handleValueChange=r}onOpen(){const{contentEl:t}=this;this.root=tv(t),this.root.render(w.jsx(KH,{type:this.type,handleValueChange:this.handleValueChange.bind(this),setShownStatus:n=>{!n&&this.close()}}))}onClose(){this.root?.unmount()}}const voe=(e,t)=>(e%t+t)%t;class yoe{owner;values;suggestions;selectedItem;containerEl;constructor(t,n,r){this.owner=t,this.containerEl=n,n.on("click",".suggestion-item",this.onSuggestionClick.bind(this)),n.on("mousemove",".suggestion-item",this.onSuggestionMouseover.bind(this)),r.register([],"ArrowUp",o=>{if(!o.isComposing)return this.setSelectedItem(this.selectedItem-1,!0),!1}),r.register([],"ArrowDown",o=>{if(!o.isComposing)return this.setSelectedItem(this.selectedItem+1,!0),!1}),r.register([],"Enter",o=>{if(!o.isComposing)return this.useSelectedItem(o),!1})}onSuggestionClick(t,n){t.preventDefault();const r=this.suggestions.indexOf(n);this.setSelectedItem(r,!1),this.useSelectedItem(t)}onSuggestionMouseover(t,n){const r=this.suggestions.indexOf(n);this.setSelectedItem(r,!1)}setSuggestions(t){this.containerEl.empty();const n=[];t.forEach(r=>{const o=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(r,o),n.push(o)}),this.values=t,this.suggestions=n,this.setSelectedItem(0,!1)}useSelectedItem(t){const n=this.values[this.selectedItem];n&&this.owner.selectSuggestion(n,t)}setSelectedItem(t,n){const r=voe(t,this.suggestions.length),o=this.suggestions[this.selectedItem],i=this.suggestions[r];o?.removeClass("is-selected"),i?.addClass("is-selected"),this.selectedItem=r,n&&i.scrollIntoView(!1)}}class JH{inputEl;popper;scope;suggestEl;suggest;cb;constructor(t,n){this.inputEl=t,this.scope=new N.Scope,this.cb=n,this.suggestEl=createDiv("suggestion-container");const r=this.suggestEl.createDiv("suggestion");this.suggest=new yoe(this,r,this.scope),this.scope.register([],"Escape",this.close.bind(this)),this.inputEl.addEventListener("input",this.onInputChanged.bind(this)),this.inputEl.addEventListener("focus",this.onInputChanged.bind(this)),this.inputEl.addEventListener("click",this.onInputChanged.bind(this)),this.inputEl.addEventListener("blur",this.close.bind(this)),this.suggestEl.on("mousedown",".suggestion-container",o=>{o.preventDefault()})}clearInput(){this.inputEl.value="",this.inputEl.trigger("blur"),this.inputEl.trigger("focus"),this.inputEl.trigger("input"),this.onInputChanged()}onInputChanged(){const t=this.inputEl.value,n=this.getSuggestions(t);if(!n){this.close();return}n.length>0?(this.suggest.setSuggestions(n),this.open(app.dom.appContainerEl,this.inputEl)):this.close()}open(t,n){app.keymap.pushScope(this.scope),t.appendChild(this.suggestEl),this.popper=qH(n,this.suggestEl,{placement:"bottom-start",modifiers:[{name:"sameWidth",enabled:!0,fn:({state:r,instance:o})=>{const i=`${r.rects.reference.width}px`;r.styles.popper.width!==i&&(r.styles.popper.width=i,o.update())},phase:"beforeWrite",requires:["computeStyles"]}]})}close(){app.keymap.popScope(this.scope),this.suggest.setSuggestions([]),this.popper&&this.popper.destroy(),this.suggestEl.detach()}destroy(){this.inputEl.removeEventListener("input",this.onInputChanged.bind(this)),this.inputEl.removeEventListener("focus",this.onInputChanged.bind(this)),this.inputEl.removeEventListener("blur",this.close.bind(this)),this.close()}updateCb(t){this.cb=t}}const boe=e=>{const t=e.metadataCache.getTags();return[...Object.keys(t)].map(n=>n.split("#").pop())};let Hm=class extends JH{fuzzySearchItemsOptimized(t,n){const r=N.prepareFuzzySearch(t);return n.map(o=>{const i=r(o);return i?{item:o,match:i,score:i.score}:null}).sort((o,i)=>i?.score-o?.score).filter(Boolean)}getSuggestions(t){const{settings:n,app:r}=$e.getState(),o=t.toLocaleLowerCase(),i=n.UseVaultTags?boe(r):de.getState().tags;return this.fuzzySearchItemsOptimized(o,i).map(a=>a.item)}renderSuggestion(t,n){n.toggleClass("thino-image-suggest-item",!0),n.createSpan({cls:"suggestion-name",text:t})}selectSuggestion(t){this.inputEl.value=t,this.cb&&this.cb(t),this.inputEl.dispatchEvent(new Event("change")),this.inputEl.trigger("change"),this.close()}};const woe=e=>{const t=new Set;return e.forEach(n=>{const r=new RegExp(Kg).exec(n.content),o=new RegExp(UM).exec(n.content);if(r)for(let i=1;i{const[t,n]=Y.useState([]),r=Y.useRef(null),o=Y.useRef(null);D.useEffect(()=>{if(o.current){if(r.current){r.current.updateCb(i);return}r.current=new Hm(o.current,i)}},[o.current,t]);const i=s=>{if(!s)return;const l=new Set(t);l.add(s),n(Array.from(l)),r.current.clearInput()},a=()=>{e(t)};return w.jsxs("div",{className:"thino-tag-operation",children:[w.jsx("div",{className:"tag-operation-title",children:E("Tag Bulk Select")}),w.jsxs("div",{className:"tag-operation-content",children:[w.jsxs("div",{className:"tag-operation-content-title selected-tags",children:[w.jsx("div",{className:"name",children:E("Selected Tags")}),w.jsx("div",{className:"desc",children:E("Click to remove selected tag")})]}),w.jsx("div",{className:"tag-operation-content-tags selected-tags",children:t.map(s=>w.jsx("div",{className:"tag-operation-content-tag",onClick:()=>{n(t.filter(l=>l!==s))},children:s},s))}),w.jsx("div",{className:"tag-operation-content-inputer",children:w.jsx("input",{placeholder:E("Input to select exist tag"),ref:o,onKeyDown:s=>{s.key==="Enter"&&i(o.current.value)}})}),w.jsxs("div",{className:"tag-operation-content-btn-group",children:[w.jsx("button",{className:"cancel-btn",onClick:()=>{e([])},children:E("Cancel")}),w.jsx("button",{className:"save-btn",onClick:a,children:E("Save")})]})]})]})},xoe=({app:e,thinos:t,closeDialog:n})=>{const[r,o]=Y.useState([]),[i,a]=Y.useState([]),[s,l]=Y.useState([]),u=Y.useRef(null),d=Y.useRef(null),h=Y.useRef(null),p=Y.useRef("End"),m=Y.useRef(!1),b=Y.useRef(null);D.useEffect(()=>{t&&t.length&&o(woe(t))},[t]),D.useEffect(()=>{!h.current||!d.current||(new N.Setting(d.current).setName(E("Add tag position")).addDropdown(x=>{x.addOption("End",E("End")),x.addOption("Beginning",E("Beginning")),x.setValue("End").onChange(async C=>{p.current=C})}),new N.Setting(h.current).setName(E("Add tag with new line")).addToggle(x=>{x.setValue(!1).onChange(async C=>{m.current=C})}))},[]);const v=x=>{if(!x)return;const C=new Set(i);C.add(x),a(Array.from(C)),u.current.clearInput()};D.useEffect(()=>{if(b.current){if(u.current){u.current.updateCb(v);return}u.current=new Hm(b.current,v)}},[b.current,i]);const y=()=>{n(),S({remove:s,add:i,targetThinos:t})},S=async({remove:x,add:C,targetThinos:k})=>{const M=m.current||!1,I=[];for(const O of k){let R=O.content;for(const L of x)R=R.replace(new RegExp(`#${L}`,"g"),"");if(R=R.trim(),C.length>0&&(R=p.current==="Beginning"?`${C.map(L=>`#${L}`).join(" ")} ${M?`
+`:""}${R}`:`${R} ${M?`
+`:""}${C.map(L=>`#${L}`).join(" ")}`),O&&O.content!==R){const L=await de.updateMemo(O.id,R?.trim());I.push(L)}}I.length>0&&de.editMemoBulk(I),I.length>0&&Ue.clearQuery()};return w.jsxs("div",{className:"thino-tag-operation",children:[w.jsx("div",{className:"tag-operation-title",children:E("Tag Bulk Edit")}),w.jsxs("div",{className:"tag-operation-content",children:[r.length>0&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:"tag-operation-content-title exist-tags",children:[w.jsx("div",{className:"name",children:E("Exist Tags")}),w.jsx("div",{className:"desc",children:E("Click to remove exist tag")})]}),w.jsx("div",{className:"tag-operation-content-tags exist-tags",children:r.map(x=>w.jsx("div",{className:tn("tag-operation-content-tag",s.includes(x)&&"tag-operation-content-tag-removed"),onClick:()=>{s.includes(x)||l([...s,x]),s.includes(x)&&l(s.filter(C=>C!==x)),i.includes(x)&&a(i.filter(C=>C!==x))},children:x},x))})]}),w.jsxs("div",{className:"tag-operation-content-title selected-tags",children:[w.jsx("div",{className:"name",children:E("Selected Tags")}),w.jsx("div",{className:"desc",children:E("Click to remove selected tag")})]}),w.jsx("div",{className:"tag-operation-content-tags selected-tags",children:i.map(x=>w.jsx("div",{className:"tag-operation-content-tag",onClick:()=>{a(i.filter(C=>C!==x))},children:x},x))}),w.jsx("div",{className:"tag-operation-content-inputer",children:w.jsx("input",{placeholder:E("Input to select exist tag"),ref:b,onKeyDown:x=>{x.key==="Enter"&&v(b.current.value)}})}),w.jsxs("div",{className:"tag-operation-settings",children:[w.jsx("div",{ref:d}),w.jsx("div",{ref:h})]}),w.jsxs("div",{className:"tag-operation-content-btn-group",children:[w.jsx("button",{className:"cancel-btn",onClick:n,children:E("Cancel")}),w.jsx("button",{className:"save-btn",onClick:y,children:E("Save")})]})]})]})},sE=new Map,Fu=async(e,t=!0)=>{const{vault:n,metadataCache:r}=$e.getState().app;if(t&&sE.has(e))return Promise.resolve(sE.get(e));if(e.contains("data:image"))return e;let o;const i=await n.adapter.exists(N.normalizePath(e));let a="";try{if(!i&&!/(http|https)/g.test(e)&&!e.includes("data:image")){let s;if(e.startsWith("app://")){const l=N.normalizePath(decodeURIComponent(e).replace(N.Platform.resourcePathPrefix,"").replace(/\?(.*)$/,"").replace(N.normalizePath(app?.vault.adapter.basePath),""));a=N.normalizePath(decodeURIComponent(l))}else{if(s=r.getFirstLinkpathDest(e,""),!s){new N.Notice(E("File not exist"));return}a=s.path}}else a=e}catch(s){console.error(s)}if(a){if(/(http|https)/g.test(a))if(a.startsWith("http://localhost")){let s=a;s=s.replace("http://localhost/_capacitor_file_",""),s=decodeURIComponent(s).replace(/\?(.*)$/,"").replace(app?.vault.adapter.basePath,""),s=N.normalizePath(decodeURIComponent(s));const l=await n.adapter.readBinary(s),u=new Uint8Array(l);o=new Blob([u],{type:"image/png"})}else try{const s=await N.requestUrl(e),l=new Uint8Array(s.arrayBuffer);o=new Blob([l],{type:"image/png"})}catch{}else if(a){const s=await n.adapter.readBinary(a),l=new Uint8Array(s);o=new Blob([l],{type:"image/png"})}return o?await Ioe(o,e):""}},Ioe=(e,t)=>new Promise(n=>{const r=new FileReader;r.onloadend=()=>{const o=r.result;sE.set(t,o),n(o)},r.readAsDataURL(e)}),tm=async e=>{if(!e.style.backgroundImage.includes("url(")&&!e.style.backgroundImage.includes("http"))return;let t=e.style.backgroundImage.includes("url(")?e.style.backgroundImage.slice(5,-2):e.style.backgroundImage;return t?(t.startsWith("http://localhost")&&(t=t.replace("http://localhost/_capacitor_file_",""),t=decodeURIComponent(t).replace(/\?(.*)$/,"").replace(app?.vault.adapter.basePath,""),t=N.normalizePath(decodeURIComponent(t))),await Fu(t)):void 0},koe=async e=>e.getAttribute("src")?e?.src?.startsWith("http://localhost")?await Fu(e.getAttribute("path")||N.normalizePath(e?.parentElement.getAttribute("src"))):await Fu(e.getAttribute("src")):void 0,St=Loe(),E0=Roe(),QH=Foe(),e7=Hoe(),su={copyDefaultStyles:!0,imagePlaceholder:void 0,cacheBust:!1,useCredentials:!1,httpTimeout:3e4,styleCaching:"strict",corsImg:void 0},Ft={toSvg:t7,toPng:Moe,toJpeg:Doe,toBlob:Aoe,toPixelData:Coe,toCanvas:Noe,impl:{fontFaces:QH,images:e7,util:St,inliner:E0,urlCache:[],options:{}}},vD=(typeof Node<"u"?Node.ELEMENT_NODE:void 0)||1,Vb=(typeof global<"u"?global.getComputedStyle:void 0)||(typeof window<"u"?window.getComputedStyle:void 0)||globalThis.getComputedStyle,Eoe=(typeof global<"u"?global.atob:void 0)||(typeof window<"u"?window.atob:void 0)||globalThis.atob;function t7(e,t){Ft.impl.util.getWindow(e),t=t||{},Ooe(t);let n=[];return Promise.resolve(e).then(r).then(function(l){return n7(l,t,null)}).then(Poe).then(joe).then(a).then(s).then(o).then(i);function r(l){if(l.nodeType===vD)return l;const u=l,d=l.parentNode,h=document.createElement("span");return d.replaceChild(h,u),h.append(l),n.push({parent:d,child:u,wrapper:h}),h}function o(l){for(;n.length>0;){const u=n.pop();u.parent.replaceChild(u.child,u.wrapper)}return l}function i(l){return Ft.impl.urlCache=[],Voe(),l}function a(l){t.bgcolor&&(l.style.backgroundColor=t.bgcolor),t.width&&(l.style.width=`${t.width}px`),t.height&&(l.style.height=`${t.height}px`),t.style&&Object.keys(t.style).forEach(function(d){l.style[d]=t.style[d]});let u=null;return typeof t.onclone=="function"&&(u=t.onclone(l)),Promise.resolve(u).then(function(){return l})}function s(l){let u=t.width||St.width(l),d=t.height||St.height(l);return Promise.resolve(l).then(function(h){return h.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(h)}).then(St.escapeXhtml).then(function(h){const p=(St.isDimensionMissing(u)?' width="100%"':` width="${u}"`)+(St.isDimensionMissing(d)?' height="100%"':` height="${d}"`);return`${h} `}).then(function(h){return`data:image/svg+xml;charset=utf-8,${h}`})}}function Coe(e,t){return lv(e,t).then(function(n){return n.getContext("2d").getImageData(0,0,St.width(e),St.height(e)).data})}function Moe(e,t){return lv(e,t).then(function(n){return n.toDataURL()})}function Doe(e,t){return lv(e,t).then(function(n){return n.toDataURL("image/jpeg",(t?t.quality:void 0)||1)})}function Aoe(e,t){return lv(e,t).then(St.canvasToBlob)}function Noe(e,t){return lv(e,t)}function Ooe(e){typeof e.copyDefaultStyles>"u"?Ft.impl.options.copyDefaultStyles=su.copyDefaultStyles:Ft.impl.options.copyDefaultStyles=e.copyDefaultStyles,typeof e.imagePlaceholder>"u"?Ft.impl.options.imagePlaceholder=su.imagePlaceholder:Ft.impl.options.imagePlaceholder=e.imagePlaceholder,typeof e.cacheBust>"u"?Ft.impl.options.cacheBust=su.cacheBust:Ft.impl.options.cacheBust=e.cacheBust,typeof e.corsImg>"u"?Ft.impl.options.corsImg=su.corsImg:Ft.impl.options.corsImg=e.corsImg,typeof e.useCredentials>"u"?Ft.impl.options.useCredentials=su.useCredentials:Ft.impl.options.useCredentials=e.useCredentials,typeof e.httpTimeout>"u"?Ft.impl.options.httpTimeout=su.httpTimeout:Ft.impl.options.httpTimeout=e.httpTimeout,typeof e.styleCaching>"u"?Ft.impl.options.styleCaching=su.styleCaching:Ft.impl.options.styleCaching=e.styleCaching,Ft.impl.options.requestUrl=e.requestUrl,Ft.impl.options.type=e.type||"image/png"}function lv(e,t){return t=t||{},t7(e,t).then(St.makeImage).then(function(r){const o=typeof t.scale!="number"?1:t.scale,i=n(e,o),a=i.getContext("2d");return a.msImageSmoothingEnabled=!1,a.imageSmoothingEnabled=!1,r&&(a.scale(o,o),a.drawImage(r,0,0)),i});function n(r,o){let i=t.width||St.width(r),a=t.height||St.height(r);St.isDimensionMissing(i)&&(i=St.isDimensionMissing(a)?300:a*2),St.isDimensionMissing(a)&&(a=i/2);const s=document.createElement("canvas");if(s.width=i*o,s.height=a*o,t.bgcolor){const l=s.getContext("2d");l.fillStyle=t.bgcolor,l.fillRect(0,0,s.width,s.height)}return s}}let ri=null;function n7(e,t,n,r){const o=t.filter;if(e===ri||St.isHTMLScriptElement(e)||St.isHTMLStyleElement(e)||St.isHTMLLinkElement(e)||n!==null&&o&&!o(e))return Promise.resolve();return Promise.resolve(e).then(i).then(function(u){return s(u,a(e))}).then(function(u){return l(u,e)});function i(u){return St.isHTMLCanvasElement(u)?St.makeImage(u.toDataURL()):u.cloneNode(!1)}function a(u){return St.isElementHostForOpenShadowRoot(u)?u.shadowRoot:u}function s(u,d){const h=b(d);let p=Promise.resolve();if(h.length!==0){const v=Vb(m(d));St.asArray(h).forEach(function(y){p=p.then(function(){return n7(y,t,v).then(function(S){S&&u.appendChild(S)})})})}return p.then(function(){return u});function m(v){return St.isShadowRoot(v)?v.host:v}function b(v){return St.isShadowSlotElement(v)?v.assignedNodes():v.childNodes}}function l(u,d){if(!St.isElement(u)||St.isShadowSlotElement(d))return Promise.resolve(u);return Promise.resolve().then(h).then(p).then(m).then(b).then(function(){return u});function h(){y(d,u);function v(S,x){x.font=S.font,x.fontFamily=S.fontFamily,x.fontFeatureSettings=S.fontFeatureSettings,x.fontKerning=S.fontKerning,x.fontSize=S.fontSize,x.fontStretch=S.fontStretch,x.fontStyle=S.fontStyle,x.fontVariant=S.fontVariant,x.fontVariantCaps=S.fontVariantCaps,x.fontVariantEastAsian=S.fontVariantEastAsian,x.fontVariantLigatures=S.fontVariantLigatures,x.fontVariantNumeric=S.fontVariantNumeric,x.fontVariationSettings=S.fontVariationSettings,x.fontWeight=S.fontWeight}function y(S,x){const C=Vb(S);C.cssText?(x.style.cssText=C.cssText,v(C,x.style)):(Boe(t,S,C,n,x),n===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(k=>x.style.removeProperty(k)),["left","right","top","bottom"].forEach(k=>{x.style.getPropertyValue(k)&&x.style.setProperty(k,"0px")})))}}function p(){const v=St.uid();[":before",":after"].forEach(function(S){y(S)});function y(S){const x=Vb(d,S),C=x.getPropertyValue("content");if(C===""||C==="none")return;const k=u.getAttribute("class")||"";u.setAttribute("class",`${k} ${v}`);const M=document.createElement("style");M.appendChild(I()),u.appendChild(M);function I(){const O=`.${v}:${S}`,R=x.cssText?L():B();return document.createTextNode(`${O}{${R}}`);function L(){return`${x.cssText} content: ${C};`}function B(){return`${St.asArray(x).map(H).join("; ")};`;function H(U){const G=x.getPropertyValue(U),K=x.getPropertyPriority(U)?" !important":"";return`${U}: ${G}${K}`}}}}}function m(){St.isHTMLTextAreaElement(d)&&(u.innerHTML=d.value),St.isHTMLInputElement(d)&&u.setAttribute("value",d.value)}function b(){St.isSVGElement(u)&&(u.setAttribute("xmlns","http://www.w3.org/2000/svg"),St.isSVGRectElement(u)&&["width","height"].forEach(function(v){const y=u.getAttribute(v);y&&u.style.setProperty(v,y)}))}}}function Poe(e){return QH.resolveAll().then(function(t){if(t!==""){const n=document.createElement("style");e.appendChild(n),n.appendChild(document.createTextNode(t))}return e})}function joe(e){return e7.inlineAll(e).then(function(){return e})}function Loe(){let e=0;return{escape:L,isDataUrl:S,canvasToBlob:k,resolveUrl:M,getAndEncode:R,uid:I,delay:B,asArray:_,escapeXhtml:H,makeImage:O,width:U,height:G,getWindow:t,isElement:i,isElementHostForOpenShadowRoot:n,isShadowRoot:r,isInShadowRoot:o,isHTMLElement:s,isHTMLCanvasElement:a,isHTMLInputElement:u,isHTMLImageElement:l,isHTMLLinkElement:d,isHTMLScriptElement:h,isHTMLStyleElement:p,isHTMLTextAreaElement:m,isShadowSlotElement:b,isSVGElement:v,isSVGRectElement:y,isDimensionMissing:x};function t(z){const ne=z?z.ownerDocument:void 0;return(ne?ne.defaultView:void 0)||global||window}function n(z){return i(z)&&z.shadowRoot!==null}function r(z){return z instanceof t(z).ShadowRoot}function o(z){return z!==null&&Object.prototype.hasOwnProperty.call(z,"getRootNode")&&r(z.getRootNode())}function i(z){return z instanceof t(z).Element}function a(z){return z instanceof t(z).HTMLCanvasElement}function s(z){return z instanceof t(z).HTMLElement}function l(z){return z instanceof t(z).HTMLImageElement}function u(z){return z instanceof t(z).HTMLInputElement}function d(z){return z instanceof t(z).HTMLLinkElement}function h(z){return z instanceof t(z).HTMLScriptElement}function p(z){return z instanceof t(z).HTMLStyleElement}function m(z){return z instanceof t(z).HTMLTextAreaElement}function b(z){return o(z)&&z instanceof t(z).HTMLSlotElement}function v(z){return z instanceof t(z).SVGElement}function y(z){return z instanceof t(z).SVGRectElement}function S(z){return z.search(/^(data:)/)!==-1}function x(z){return isNaN(z)||z<=0}function C(z){return new Promise(function(ne){const J=Eoe(z.toDataURL().split(",")[1]),ee=J.length,Z=new Uint8Array(ee);for(let q=0;qnew Promise(ee=>{const Z=new FileReader;Z.onload=function(q){ee(q.target.result)},Z.readAsDataURL(new Blob([J.arrayBuffer],{type:J.headers["content-type"]}))})).catch(J=>(console.error("cannot fetch resource: "+z+", error: "+J),"")):ne.promise=new Promise(function(J){const ee=Ft.impl.options.httpTimeout,Z=new XMLHttpRequest;if(Z.onreadystatechange=$,Z.ontimeout=re,Z.responseType="blob",Z.timeout=ee,Ft.impl.options.useCredentials&&(Z.withCredentials=!0),Ft.impl.options.corsImg&&z.indexOf("http")===0&&z.indexOf(window.location.origin)===-1){const fe=(Ft.impl.options.corsImg.method||"GET").toUpperCase()==="POST"?"POST":"GET";Z.open(fe,(Ft.impl.options.corsImg.url||"").replace("#{cors}",z),!0);let ye=!1;const ge=Ft.impl.options.corsImg.headers||{};Object.keys(ge).forEach(function(Ce){ge[Ce].indexOf("application/json")!==-1&&(ye=!0),Z.setRequestHeader(Ce,ge[Ce])});const me=le(Ft.impl.options.corsImg.data||"");Object.keys(me).forEach(function(Ce){typeof me[Ce]=="string"&&(me[Ce]=me[Ce].replace("#{cors}",z))}),Z.send(ye?JSON.stringify(me):me)}else Z.open("GET",z,!0),Z.send();let q;if(Ft.impl.options.imagePlaceholder){const fe=Ft.impl.options.imagePlaceholder.split(/,/);fe&&fe[1]&&(q=fe[1])}function $(){if(Z.readyState!==4)return;if(Z.status>=300){q?J(q):ie(`cannot fetch resource: ${z}, status: ${Z.status}`);return}const fe=new FileReader;fe.onloadend=function(){J(fe.result)},fe.readAsDataURL(Z.response)}function re(){q?J(q):ie(`timeout of ${ee}ms occured while fetching resource: ${z}`)}function le(fe){try{return JSON.parse(JSON.stringify(fe))}catch{ie("corsImg.data is missing or invalid");return}}function ie(fe){console.error(fe),J("")}})),ne.promise}function L(z){return z.replace(/([.*+?^${}()|[]\/\\])/g,"\\$1")}function B(z){return function(ne){return new Promise(function(J){setTimeout(function(){J(ne)},z)})}}function _(z){const ne=[],J=z.length;for(let ee=0;ee=0;r?(e.setProperty(t,n,r),o&&e.setProperty(`-webkit-${t}`,n,r)):(e.setProperty(t,n),o&&e.setProperty(`-webkit-${t}`,n))}function Boe(e,t,n,r,o){const i=Ft.impl.options.copyDefaultStyles?Uoe(e,t):{},a=o.style;St.asArray(n).forEach(function(s){const l=n.getPropertyValue(s),u=i[s],d=r?r.getPropertyValue(s):void 0;if(l!==u||r&&l!==d){const h=n.getPropertyPriority(s);_oe(a,s,l,h)}})}let Jy=null,Wb={};const Yoe=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"];function Uoe(e,t){const n=s(t),r=l(n);if(Wb[r])return Wb[r];const o=zoe(),i=u(o.document,n),a=d(o,i);return h(i),Wb[r]=a,a;function s(p){const m=[];do{if(p.nodeType===vD){const b=p.tagName;if(m.push(b),Yoe.includes(b))break}p=p.parentNode}while(p);return m}function l(p){return e.styleCaching==="relaxed"?p.filter((m,b,v)=>b===0||b===v.length-1).join(">"):p.join(">")}function u(p,m){let b=p.body;do{const v=m.pop(),y=p.createElement(v);b.appendChild(y),b=y}while(m.length>0);return b.textContent="",b}function d(p,m){const b={},v=p.getComputedStyle(m);return St.asArray(v).forEach(function(y){b[y]=y==="width"||y==="height"?"auto":v.getPropertyValue(y)}),b}function h(p){do{const m=p.parentElement;m!==null&&m.removeChild(p),p=m}while(p&&p.tagName!=="BODY")}}function zoe(){if(ri)return ri.contentWindow;const e=document.characterSet||"UTF-8",t=document.doctype,n=t?`":"";return ri=document.createElement("iframe"),ri.id="domtoimage-sandbox-"+St.uid(),ri.className="domtoimage-thino",ri.style.visibility="hidden",ri.style.position="fixed",document.body.appendChild(ri),o(ri,n,e,"domtoimage-sandbox");function r(i){if(i){const a=document.createElement("div");return a.innerText=i,a.innerHTML}else return""}function o(i,a,s,l){try{return i.contentWindow.document.write(`${a}${l} `),i.contentWindow}catch{}const u=document.createElement("meta");u.setAttribute("charset",s);try{const d=document.implementation.createHTMLDocument(l);d.head.appendChild(u);const h=a+d.documentElement.outerHTML;return i.setAttribute("srcdoc",h),i.contentWindow}catch{}return i.contentDocument.head.appendChild(u),i.contentDocument.title=l,i.contentWindow}}function Voe(){ri&&(document.body.removeChild(ri),ri=null),Jy&&clearTimeout(Jy),Jy=setTimeout(()=>{Jy=null,Wb={}},20*1e3)}async function Woe(e,t,n){return await Ft.toCanvas(e,{width:e.clientWidth,height:e.clientHeight,quality:1,scale:t?2:1,requestUrl:N.requestUrl,type:n})}const ES=async(e,t)=>(await Woe(e,!0,"image/jpeg")).toDataURL(),P3=async e=>{e.startsWith("http")&&(e=await Fu(e));const t=e.split("base64,")[1],n=dS(t,"image/png");await r7(n),new N.Notice(E("Send to clipboard successfully"))},Goe=async(e,t)=>{const n=await e.vault.adapter.exists(t);let r="";if(n)r=t;else{const s=e.metadataCache.getFirstLinkpathDest(t,"");if(!s){new N.Notice(E("File not exist"));return}r=s.path}const o=await e.vault.adapter.readBinary(r),i=new Uint8Array(o),a=new Blob([i],{type:"image/png"});await r7(a)},r7=async e=>{const t=new ClipboardItem({"image/png":e});await window.navigator.clipboard.write([t])},j3=1.1,L3=300,R3=20,Zoe=({destroy:e,imgUrl:t,filepath:n,otherIMGEls:r,currentIndex:o})=>{const i=ke.getState().dailyNotesState.settings.ZoomImageWhenViewing,a=D.useRef(null),[s,l]=D.useState(-1),u=ke.getState().dailyNotesState.app,[d,h]=D.useState(o),[p,m]=D.useState(t),[b,v]=D.useState(!1),y={close:D.useRef(null),previous:D.useRef(null),next:D.useRef(null),decrease:D.useRef(null),increase:D.useRef(null),zoom:D.useRef(null),copy:D.useRef(null)};D.useEffect(()=>{!n&&!t||(N.setIcon(y.close.current,"x"),y.previous.current&&N.setIcon(y.previous.current,"arrow-left"),y.next.current&&N.setIcon(y.next.current,"arrow-right"),N.setIcon(y.decrease.current,"zoom-out"),N.setIcon(y.increase.current,"zoom-in"),N.setIcon(y.zoom.current,"circle"),N.setIcon(y.copy.current,"clipboard"))},[y]),D.useEffect(()=>{Le.getImageSize(p).then(({width:L})=>{L!==0?(l(40),i&&!b&&(l(80),v(!0))):l(0)})},[p,i,b]);const S=()=>{let L=d-1;L<0&&(L=r.length-1),h(L),m(r[L].src)},x=()=>{let L=d+1;L>=r.length&&(L=0),h(L),m(r[L].src)},C=()=>{e()},k=()=>{s>30&&l(s-10)},M=()=>{l(s+10)},I=L=>{L.target!==a.current&&L.target===a.current.parentElement&&C()},O=L=>{if(L.ctrlKey){L.preventDefault();const B=a.current,_=L.nativeEvent.offsetX,H=L.nativeEvent.offsetY,U=_/B.clientWidth,G=H/B.clientHeight;let K;L.deltaY>0?K=s/j3:K=s*j3,K>L3?K=L3:K{if(p&&!n)await P3(t);else if(n){const B=r[d].parentElement.getAttribute("src");if(!B){await P3(p);return}await Goe(u,B)}};return w.jsxs(w.Fragment,{children:[w.jsx("button",{ref:y.close,className:"btn close-btn",onClick:C}),w.jsxs("div",{className:"img-container internal-embed image-embed is-loaded",onClick:I,onWheel:O,children:[w.jsx("img",{className:s<=0?"thino-hidden":"",ref:a,height:s+"%",src:p}),w.jsx("span",{className:"loading-text "+(s===-1?"":"thino-hidden"),children:E("Image is loading...")}),w.jsx("span",{className:"loading-text "+(s===0?"":"thino-hidden"),children:E("😟 Cannot load image, image link maybe broken")})]}),w.jsxs("div",{className:"action-btns-container",children:[r&&r?.length>1&&w.jsxs(w.Fragment,{children:[w.jsx("button",{ref:y.previous,className:"btn",onClick:S}),w.jsx("button",{ref:y.next,className:"btn",onClick:x})]}),w.jsx("button",{ref:y.decrease,className:"btn",onClick:k}),w.jsx("button",{ref:y.increase,className:"btn",onClick:M}),w.jsx("button",{ref:y.zoom,className:"btn",onClick:()=>l(80)}),w.jsx("button",{ref:y.copy,className:"btn",onClick:R})]})]})};function CS({imgUrl:e,filepath:t,otherIMGEls:n,currentIndex:r}){yS({className:"preview-image-dialog"},Zoe,{...{imgUrl:e,otherIMGEls:n,currentIndex:r},filepath:t})}var $oe=class extends Error{constructor(e){super(`react-collapsed: ${e}`)}},C0=(...e)=>(e[0],`${e[1]}`,void 0);function o7(e){const t=D.useRef(e);return D.useEffect(()=>{t.current=e}),D.useCallback((...n)=>t.current?.(...n),[])}function qoe(e,t,n){const[r,o]=D.useState(t),i=D.useRef(typeof e<"u"),a=i.current?e:r,s=o7(n),l=D.useCallback(u=>{const h=typeof u=="function"?u(a):u;i.current||o(h),s?.(h)},[s,a]);return D.useEffect(()=>{C0(!(i.current&&e==null),"`isExpanded` state is changing from controlled to uncontrolled. useCollapse should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled collapse for the lifetime of the component. Check the `isExpanded` prop."),C0(!(!i.current&&e!=null),"`isExpanded` state is changing from uncontrolled to controlled. useCollapse should not switch from uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled collapse for the lifetime of the component. Check the `isExpanded` prop.")},[e]),[a,l]}var Koe="(prefers-reduced-motion: reduce)";function Xoe(){const[e,t]=D.useState(!1);return D.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const n=window.matchMedia(Koe);t(n.matches);const r=o=>{t(o.matches)};if(n.addEventListener)return n.addEventListener("change",r),()=>{n.removeEventListener("change",r)};if(n.addListener)return n.addListener(r),()=>{n.removeListener(r)}},[]),e}var Joe=h$.useId||(()=>{});function Qoe(){return Joe()??""}var eie=typeof window<"u"?D.useLayoutEffect:D.useEffect,Yx=!1,tie=0,F3=()=>++tie;function nie(e){const t=e||(Yx?F3():null),[n,r]=D.useState(t);return eie(()=>{n===null&&r(F3())},[]),D.useEffect(()=>{Yx===!1&&(Yx=!0)},[]),n!=null?String(n):void 0}function rie(e){const t=Qoe(),n=nie(e);return typeof e=="string"?e:typeof t=="string"?t:n}function oie(e,t){const n=performance.now(),r={};function o(){r.id=requestAnimationFrame(i=>{i-n>t?e():o()})}return o(),r}function H3(e){e.id&&cancelAnimationFrame(e.id)}function _3(e){return e?.current?e.current.scrollHeight:(C0(!0,"Was not able to find a ref to the collapse element via `getCollapseProps`. Ensure that the element exposes its `ref` prop. If it exposes the ref prop under a different name (like `innerRef`), use the `refKey` property to change it. Example:\n\nconst collapseProps = getCollapseProps({refKey: 'innerRef'})"),0)}function iie(e){if(!e||typeof e=="string")return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function aie(e,t){if(e!=null)if(typeof e=="function")e(t);else try{e.current=t}catch{throw new $oe(`Cannot assign value "${t}" to ref "${e}"`)}}function B3(...e){return e.every(t=>t==null)?null:t=>{e.forEach(n=>{aie(n,t)})}}function sie(e){let t=n=>{};t=n=>{if(!n?.current)return;const{paddingTop:r,paddingBottom:o}=window.getComputedStyle(n.current);C0(!(r&&r!=="0px"||o&&o!=="0px"),`Padding applied to the collapse element will cause the animation to break and not perform as expected. To fix, apply equivalent padding to the direct descendent of the collapse element. Example:
Before: {children}
@@ -197,68 +134,136 @@ After: `)},P.useEffect(()=>{t(e)},[e])}var fV=typeof window>"u"?P.useEffect:P.useLayoutEffect;function hV({duration:e,easing:t="cubic-bezier(0.4, 0, 0.2, 1)",onTransitionStateChange:n=()=>{},isExpanded:r,defaultExpanded:a=!1,hasDisabledAnimation:o,id:i,...l}={}){const c=s9(n),f=sV(i?`${i}`:void 0),[h,g]=Xz(r,a),y=P.useRef(h),[w,S]=P.useState(!1),D=tV(),I=o??D,M=P.useRef(),N=P.useRef(),B=P.useRef(null),[k,R]=P.useState(null);dV(B);const L=`${l.collapsedHeight||0}px`;function _(V){if(!B.current)return;const U=B.current;for(const Z in V){const Q=V[Z];Q?U.style[Z]=Q:U.style.removeProperty(Z)}}return fV(()=>{if(!B.current||h===y.current)return;y.current=h;function U(G){return I?0:e??uV(G)}const Z=G=>`height ${U(G)}ms ${t}`,Q=G=>{function re(){h?(_({height:"",overflow:"",transition:"",display:""}),c("expandEnd")):(_({transition:""}),c("collapseEnd")),S(!1)}N.current&&Vx(N.current),N.current=lV(re,G)};return S(!0),h?M.current=requestAnimationFrame(()=>{c("expandStart"),_({display:"block",overflow:"hidden",height:L}),M.current=requestAnimationFrame(()=>{c("expanding");const G=Wx(B);Q(U(G)),B.current&&(B.current.style.transition=Z(G),B.current.style.height=`${G}px`)})}):M.current=requestAnimationFrame(()=>{c("collapseStart");const G=Wx(B);Q(U(G)),_({transition:Z(G),height:`${G}px`}),M.current=requestAnimationFrame(()=>{c("collapsing"),_({height:L,overflow:"hidden"})})}),()=>{M.current&&cancelAnimationFrame(M.current),N.current&&Vx(N.current)}},[h,L,I,e,t,c]),{isExpanded:h,setExpanded:g,getToggleProps(V){const{disabled:U,onClick:Z,refKey:Q,...G}={refKey:"ref",onClick(){},disabled:!1,...V},re=k?k.tagName==="BUTTON":void 0,de=V==null?void 0:V[Q||"ref"],fe={id:`react-collapsed-toggle-${f}`,"aria-controls":`react-collapsed-panel-${f}`,"aria-expanded":h,onClick(se){U||(Z==null||Z(se),g(ue=>!ue))},[Q||"ref"]:$x(de,R)},$={type:"button",disabled:U?!0:void 0},he={"aria-disabled":U?!0:void 0,role:"button",tabIndex:U?-1:0};return re===!1?{...fe,...he,...G}:re===!0?{...fe,...$,...G}:{...fe,...$,...he,...G}},getCollapseProps(V){const{style:U,refKey:Z}={refKey:"ref",style:{},...V},Q=V==null?void 0:V[Z||"ref"];return{id:`react-collapsed-panel-${f}`,"aria-hidden":!h,"aria-labelledby":`react-collapsed-toggle-${f}`,role:"region",...V,[Z||"ref"]:$x(B,Q),style:{boxSizing:"border-box",...!w&&!h?{display:L==="0px"?"none":"block",height:L,overflow:"hidden"}:{},...U}}}}}const pV=e=>{const{dailyNotesState:{app:t,view:n,settings:r},globalState:{memoListView:a}}=P.useContext(Lt),{getCollapseProps:o,getToggleProps:i,isExpanded:l,setExpanded:c}=hV({defaultExpanded:!0,collapsedHeight:(r==null?void 0:r.ThinoCollapsedHeight)??100}),{memo:f,handleMemoContentClick:h,handleMemoDoubleClick:g}=e,y=ne.useRef(null),[w,S]=ne.useState(""),D=ne.useRef(w),I=ne.useRef(0),[M,N]=ne.useState(!1),[B,k]=ne.useState(!1),R=x.debounce((_,V,U)=>{for(const Z of _){const{height:Q}=Z.contentRect,G=(V==null?void 0:V.ThinoMaxHeight)||340,re=Q>G;N(re),c(!re),U.disconnect()}},500);P.useEffect(()=>{var _;if(f.content!==D.current){if(r!=null&&r.OptimizeForCallout&&f.content.split("> [!").length>3&&f.content.split(`
-`).length>10&&!B){const V=y.current.createEl("button");V.setText(E("Render content")),V.onclick=async()=>{k(!0),await L()};const U=y.current.createEl("textarea");U.setText(f.content),U.disabled=!0,(_=y.current)==null||_.toggleClass(["raw-content"],!0),c(!0),N(!1);return}L()}},[f.content]),P.useEffect(()=>{B&&I.current!==(r==null?void 0:r.ThinoMaxHeight)&&(y!=null&&y.current.hasChildNodes()&&k(!1),L())},[r==null?void 0:r.ThinoMaxHeight]),P.useEffect(()=>{if(!B)return;const _=y.current;if(!_)return;if(!(r!=null&&r.ThinoMaxHeight)){c(!0),N(!1);return}const V=new ResizeObserver(U=>{R(U,r,V)});return V.observe(_),()=>V.disconnect()},[B]);const L=async()=>{var _,V,U;if(y.current&&n&&t&&f.content!==D.current){y.current.empty(),await x.MarkdownRenderer.render(t,f.content,y.current,f.path,n);const Z=(_=y.current)==null?void 0:_.querySelectorAll(".internal-link");Z==null||Z.forEach(Q=>{const G=Q,re=G.getAttribute("data-href");if(!re)return;t.metadataCache.getFirstLinkpathDest(re,f.path)||Q.classList.add("is-unresolved"),G.addEventListener("mouseover",fe=>{fe.stopPropagation(),t.workspace.trigger("hover-link",{event:fe,source:"thino",hoverParent:n.containerEl,targetEl:G,linktext:re,sourcePath:G.href})})})}D.current=f.content,(V=y.current)==null||V.toggleClass(["markdown-rendered"],!0),(U=y.current)==null||U.toggleClass(["raw-content"],!1),k&&k(!0),I.current=(r==null?void 0:r.ThinoMaxHeight)||340};return v.jsxs(v.Fragment,{children:[M&&a==="moments"&&v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"thino-collapse-button",...i({style:{display:"block",marginTop:2}}),children:E(l?"Collapse":"Expand")}),!l&&(r==null?void 0:r.ThinoCollapsedHeight)!==0&&v.jsx("div",{className:"thino-collapse-shadowOverlay",onDoubleClick:g})]}),v.jsx("div",{...o({style:{margin:0}}),ref:y,className:"memo-content-text",onClick:_=>h(_,f),onDoubleClick:g,onContextMenu:_=>{_.preventDefault()}}),M&&a!=="moments"&&v.jsxs(v.Fragment,{children:[!l&&(r==null?void 0:r.ThinoCollapsedHeight)!==0&&v.jsx("div",{className:"thino-collapse-shadowOverlay",onDoubleClick:g}),v.jsx("button",{className:"thino-collapse-button",...i({style:{display:"block",marginTop:2}}),children:E(l?"Collapse":"Expand")})]})]})},l9=P.memo(pV,(e,t)=>e.memo.content===t.memo.content),mV=e=>{const[t,n]=P.useState({...e.memo,createdAtStr:ut.getDateTimeString(e.memo.createdAt)}),[r,a]=P.useState([]),[o,i]=P.useState([]);P.useEffect(()=>{(async()=>{try{const g=[],y=[...t.content.matchAll(ad)];for(const S of y)if(S&&S.length===3){const D=S[2],I=we.getMemoById(D);I&&g.push({...I,createdAtStr:ut.getDateTimeString(I.createdAt),dateStr:ut.getDateString(I.createdAt)})}a([...g]);const w=await we.getLinkedMemos(t.id);i(w.sort((S,D)=>ut.getTimeStampByDate(D.createdAt)-ut.getTimeStampByDate(S.createdAt)).map(S=>({...S,createdAtStr:ut.getDateTimeString(S.createdAt),dateStr:ut.getDateString(S.createdAt)})))}catch(g){console.error(g)}})()},[t.id]);const l=P.useCallback(async h=>{var y;const g=h.target;if(g.className==="memo-link-text"){const w=(y=g.dataset)==null?void 0:y.value,S=we.getMemoById(w??"");if(S){const D={...S,createdAtStr:ut.getDateTimeString(S.createdAt)};a([]),i([]),n(D)}else new x.Notice(E("Thino not found")),g.classList.remove("memo-link-text")}},[]),c=P.useCallback(h=>{a([]),i([]),n({...h,createdAtStr:ut.getDateTimeString(h.createdAt)})},[t.id]),f=P.useCallback(()=>{e.destroy(),dt.setEditMemoId(t.id)},[t.id]);return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"memo-card-container",children:[v.jsxs("div",{className:"header-container",children:[v.jsx("span",{className:"time-text",children:t.createdAtStr}),v.jsxs("div",{className:"btns-container",children:[v.jsx("button",{ref:h=>{h&&x.setIcon(h,"edit")},className:"btn edit-btn",onClick:f}),v.jsx("button",{ref:h=>{h&&x.setIcon(h,"x")},className:"btn close-btn",onClick:e.destroy})]})]}),v.jsx("div",{className:"memo-container",children:v.jsx("div",{className:"memo-content-text",children:v.jsx(l9,{memo:t,handleMemoContentClick:l,handleMemoDoubleClick:()=>{}})})}),v.jsx("div",{className:"layer-container"})]}),r.length>0?v.jsxs("div",{className:"linked-memos-wrapper",children:[v.jsxs("span",{className:"normal-text",children:[E("LINKED")," ",r.length," THINO"," "]}),r.map(h=>{const g=AC(dT(h.content)).replaceAll(`
-`," ");return v.jsxs("div",{className:"linked-memo-container",onClick:()=>c(h),children:[v.jsxs("span",{className:"time-text",children:[h.dateStr," "]}),g]},h.id)})]}):null,o.length>0?v.jsxs("div",{className:"linked-memos-wrapper",children:[v.jsxs("span",{className:"normal-text",children:[o.length," THINO ",E("LINK TO THE")," THINO"]}),o.map(h=>{const g=AC(dT(h.content)).replaceAll(`
-`," ");return v.jsxs("div",{className:"linked-memo-container",onClick:()=>c(h),children:[v.jsxs("span",{className:"time-text",children:[h.dateStr," "]}),g]},h.id)})]}):null]})};function Df(e){Db({className:"memo-card-dialog"},mV,{memo:e})}function gV({mouseEnterDelayMS:e=0,mouseLeaveDelayMS:t=0}={}){const[n,r]=P.useState(!1);let a,o;return[n,{onMouseEnter:()=>{clearTimeout(o),a=window.setTimeout(()=>r(!0),e)},onMouseLeave:()=>{clearTimeout(a),o=window.setTimeout(()=>r(!1),t)}}]}const vV=e=>{const{memo:t,handlePinMemoClick:n,handleFixMemoClick:r,handleSourceMemoClick:a,handleShowMemoStoryDialog:o,handleCopyMemoClick:i,handleEditMemoClick:l,handleGenMemoImageBtnClick:c,handleMarkMemoClick:f,handleArchiveMemo:h,handleDeleteMemoClick:g,handleSplitMemoClick:y}=e,w=Le.getState().dailyNotesState.settings,S=w.EnabledLocationList.find(U=>U.value==="MULTI"),[D,I]=Xl(!1),M=P.useRef(null),N={pinRef:P.useRef(null),fixRef:P.useRef(null),typeRef:P.useRef(null),moreRef:P.useRef(null)},[B,k]=gV({mouseEnterDelayMS:500}),R=P.useRef();P.useEffect(()=>{if(!N.typeRef)return;const U=Qg.find(Z=>Z.title===t.sourceType);x.setIcon(N.typeRef.current,U.icon),x.requireApiVersion("1.4.4")&&x.setTooltip(N.typeRef.current,t.path),N.fixRef&&(x.setIcon(N.fixRef.current,"shield-alert"),x.requireApiVersion("1.4.4")&&x.setTooltip(N.fixRef.current,"Update Thino property"))},[N.typeRef]),P.useEffect(()=>{N.pinRef&&(t.pinned?(x.setIcon(N.pinRef.current,"pin-off"),x.requireApiVersion("1.4.4")&&x.setTooltip(N.pinRef.current,E("UNPIN"))):(x.setIcon(N.pinRef.current,"pin"),x.requireApiVersion("1.4.4")&&x.setTooltip(N.pinRef.current,E("PIN"))))},[N.pinRef,t.pinned]);const L=x.debounce(()=>{var U;if(B&&N.moreRef.current){if(R.current&&R.current._loaded||(U=R.current)!=null&&U.useNativeMenu||document.body.find(".more-action-btns-wrapper"))return;const Z=_(),Q=N.moreRef.current.getBoundingClientRect();Z.showAtPosition({x:Q.left,y:Q.bottom})}},200);P.useEffect(()=>{L()},[B]);const _=()=>{var Z;const U=new x.Menu;return U.dom.toggleClass(["more-action-btns-wrapper"],!0),U.useNativeMenu?(U.setNoIcon(),U.addItem(Q=>{Q.setTitle(E("COPY")).onClick(i)}),U.addItem(Q=>{Q.setTitle(E("EDIT")).onClick(l)}),U.addItem(Q=>{Q.setTitle(E("SHARE")).onClick(c)})):U.addItem(Q=>{const G=Q.dom;Q.dom.empty(),Q.dom.toggleClass(["more-action-btn-group","more-action-menu-item"],!0);const re=G.createEl("span");new x.ExtraButtonComponent(re).setIcon("copy"),re.toggleClass(["menu-item-icon","more-action-item-icon"],!0),re.onclick=$=>{$.stopPropagation(),$.preventDefault(),i(),U.close()};const de=G.createEl("span");de.toggleClass(["menu-item-icon","more-action-item-icon"],!0),de.onclick=$=>{$.stopPropagation(),$.preventDefault(),l(),U.close()},new x.ExtraButtonComponent(de).setIcon("pencil");const fe=G.createEl("span");fe.toggleClass(["menu-item-icon","more-action-item-icon"],!0),fe.onclick=$=>{$.stopPropagation(),$.preventDefault(),c(),U.close()},new x.ExtraButtonComponent(fe).setIcon("share-2")}),U.addSeparator(),U.addItem(Q=>{Q.setIcon("book-open").setTitle(E("READ")).onClick(o)}),U.addItem(Q=>{Q.setIcon("bookmark").setTitle(E("MARK")).onClick(f)}),((Z=/(^|\n)#{1,6}\s/g.exec(t.content))==null?void 0:Z.length)>1&&S&&U.addItem(Q=>{Q.setIcon("separator-horizontal").setTitle(E("SPLIT")).onClick(y)}),U.addItem(Q=>{Q.setIcon("home").setTitle(E("SOURCE")).onClick(()=>a(t))}),U.addSeparator(),U.addItem(Q=>{Q.setWarning(!0).setIcon("archive").setTitle(E("ARCHIVE").toUpperCase()).onClick(()=>h(t))}),U.addItem(Q=>{Q.setWarning(!0).setIcon("trash").setTitle(w.DeleteThinoDirectly?E("DELETE"):E("TRASH BOX").toUpperCase().toUpperCase()).onClick(G=>{if(U.useNativeMenu)g(G),U.close();else if(G.stopPropagation(),G.preventDefault(),!D){I(!0),Q.setTitle(E("CONFIRM!")).onClick(re=>{g(re),U.close()});return}})}),U.addSeparator(),U.addItem(Q=>{Q.setDisabled(!0).setTitle(ut.getWordCount(t.content.replace(/```[^\S\r\n]*[a-z]*\n.*?\n```/g,""))+` ${E("words")}`)}),U.onHide(()=>{I(!1)}),R.current=U,U},V=U=>{_().showAtMouseEvent(U.nativeEvent)};return v.jsx("div",{ref:M,className:"memo-top-right-wrapper",children:v.jsxs("div",{className:"btns-container",children:[v.jsx("span",{ref:N.fixRef,className:`btn ${t.sourceType!=="MULTI"||t.id!==""?"thino-hidden":""} fix-memo-btn`,onClick:()=>r(t)}),v.jsx("span",{ref:N.typeRef,className:`btn ${t.sourceType==="DAILY"?"thino-hidden":""} source-type-btn`,onClick:()=>a(t)}),v.jsx("span",{ref:N.pinRef,className:`btn ${e.memo.pinned?"pinned-btn":"unpinned-btn"} pro`,onClick:n}),v.jsx("span",{...k,ref:U=>{N.moreRef.current=U,U&&x.setIcon(U,"more-horizontal")},onClick:V,className:"btn more-action-btn"})]})})},yV=e=>{var i,l,c;const{memo:t,handleMemoTypeToggle:n,handleShowMemoStoryDialog:r,settings:a}=e,o=((l=(i=t.fileInfo)==null?void 0:i.frontmatter)==null?void 0:l.title)||t.path.split("/").pop().split(".").shift();return v.jsxs("div",{className:"memo-top-left-wrapper",children:[e.children,v.jsx("span",{title:t.createdAt,className:"time-text",onClick:r,children:t.createdAt}),v.jsx("div",{className:`btn memo-type-img ${a!=null&&a.ShowTaskLabel?"":"thino-hidden"}`,onClick:n,children:t.thinoType!=="JOURNAL"&&v.jsx("input",{className:"task-list-item-checkbox",type:"checkbox",checked:t.thinoType!=="TASK-TODO","data-task":t.thinoType==="TASK-TODO"?"":t.thinoType==="TASK-DONE"?"x":(c=t.thinoType)==null?void 0:c.slice(5)})}),(a==null?void 0:a.ShowSourcePath)&&(t.sourceType==="FILE"||t.sourceType==="MULTI")&&v.jsx("span",{className:"time-text source-path","aria-label":o,onClick:()=>{at.setPathQuery(o)},children:o})]})};class wV extends x.SuggestModal{constructor(t,n){super(t),this.thino=n}sanitisedFileName(t){const n=mR;return t.replace(n,"").trim().slice(0,255)}ensureUniqueFileNames(t){const n=[];return t.map(a=>{const o=this.sanitisedFileName(a[0]),i=n.filter(l=>l==o);return n.push(o),i.length>=1?`${o}${i.length+1}`:o})}contentSplitByHeading(t,n){const r=t.split(`
-`),a=new Array(n).join("#")+" ",o=new Array(n+1).join("#")+" ",i=[];let l=[];return r.forEach((c,f)=>{c.startsWith(o)?(l.length>0&&(i.push(l),l=[]),l.push(c)):l.length>0&&!c.startsWith(a)?l.push(c):l.length>0&&(i.push(l),l=[]),f===r.length-1&&l.length>0&&i.push(l)}),i}onChooseSuggestion(t,n){this.selectSuggestion(t,n)}renderSuggestion(t,n){n.setText(t.title)}getSuggestions(){return[{id:"splitByHeading1",title:E("Split by Heading 1")},{id:"splitByHeading2",title:E("Split by Heading 2")},{id:"splitByHeading3",title:E("Split by Heading 3")}]}async selectSuggestion(t,n){let r=[];if(t.id==="splitByHeading1"?r=this.contentSplitByHeading(this.thino.content,1):t.id==="splitByHeading2"?r=this.contentSplitByHeading(this.thino.content,2):t.id==="splitByHeading3"&&(r=this.contentSplitByHeading(this.thino.content,3)),r.length===0){new x.Notice("No headings found"),this.close();return}const a=this.ensureUniqueFileNames(r);for(const l of r){const c=r.indexOf(l),f=await we.createThino({content:l.join(`
-`),name:a[c],type:"MULTI",isList:!0});we.pushMemo(f)}let o=this.thino.content;r.forEach((l,c)=>{o=o.replace(l.join(`
-`),`[[${a[c]}]]`)});const i=await we.updateMemo(this.thino.id,o);i&&we.editMemo(i),this.close()}}const bV=async(e,t,n)=>{const r=n.getAttribute("href"),a=n.className;if(a.contains("tag"))SV(n.innerText.slice(1));else if(a.contains("internal-link")){const o=n.getAttribute("data-href"),i=we.getMemoById(o??"");i?Df(i):await e.workspace.openLinkText(o,o,!x.Platform.isMobile&&t.navigation!==!0)}else r&&window.open(r,"_blank")},SV=e=>{const t=at.getState().query.tag;at.setTagQuery(t.contains(",")?t.split(",").includes(e)?t.split(",").filter(n=>n!==e).join(","):t+","+e:t===e?"":e)},DV=(e,t)=>{const n=t==null?void 0:t.getAttribute("src"),r=t==null?void 0:t.parentElement.getAttribute("src"),a=[...(e==null?void 0:e.querySelectorAll("img"))||[]],o=a.indexOf(t);Nb({imgUrl:n,filepath:n.startsWith("app")?r:void 0,otherIMGEls:a,currentIndex:o})},TV=e=>{var r;const t=(r=e.dataset)==null?void 0:r.value,n=we.getMemoById(t??"");n?Df(n):(new x.Notice("Thino Not Found"),e.classList.remove("memo-link-text"))},IV=async(e,t,n,r)=>{var l;const a=e!=null&&e.AppendDateWhenTaskDone?" ✅ "+x.moment().format("YYYY-MM-DD"):"",o=((l=r.parentElement.dataset)==null?void 0:l.task)==="x"?"DONE":"TODO",i=[...(n==null?void 0:n.querySelectorAll("li.task-list-item"))||[]];for(const c of i)if(c===r||c===r.closest("li.task-list-item")){const f=i.indexOf(c),h=t.content.split(/\n/),g=[];for(let M=0;M{const{globalState:{editMemoId:t},dailyNotesState:{app:n,view:r,settings:a,verifyState:o},locationState:{pathname:i}}=P.useContext(Lt),{memo:l,type:c="inline"}=e,f=P.useRef(null),h=P.useRef(null),[g,y]=P.useState(!1);P.useEffect(()=>{g&&setTimeout(()=>{dt.setEditMemoId(l.id)},100)},[g]),P.useEffect(()=>{(i==="/review"||i==="/daily")&&t!==l.id&&g&&y(!1)},[t]);const w=$=>{if($.ctrlKey||$.metaKey){const he=x.moment(l.createdAt,"YYYY/MM/DD HH:mm:ss");at.setFromAndToQuery(he.startOf("day").valueOf(),he.endOf("day").valueOf());return}Df(l)},S=()=>{if(a!=null&&a.UseButtonToShowEditor&&(a==null?void 0:a.DefaultEditorLocation)==="Bottom"){const $=document.querySelector("div[data-type='thino_view'] .view-content .memo-show-editor-button:not(.thino-hidden)");$&&$.trigger("click")}dt.setMarkMemoId(l.id)},D=async()=>{var se;const $=!x.Platform.isDesktop&&await((se=window.Capacitor)==null?void 0:se.Plugins.Device.getId()),he=x.Platform.isDesktop?await cr():$.identifier||$.uuid;if(!o||(o==null?void 0:o.appId)!==he){fn();return}l.pinned?await we.unpinMemoById(l.id):await we.pinMemoById(l.id)},I=()=>{if(a!=null&&a.UseButtonToShowEditor&&(a==null?void 0:a.DefaultEditorLocation)==="Bottom"&&x.Platform.isMobile){const $=document.querySelector("div[data-type='thino_view'] .view-content .memo-show-editor-button:not(.thino-hidden)");$&&$.trigger("click")}(i==="/review"||i==="/daily")&&y(!0),i!=="/review"&&i!=="/daily"&&dt.setEditMemoId(l.id)},M=async $=>{$.sourceType==="MULTI"&&$.id.trim()===""&&await we.updateMemoProperty($)},N=async $=>{await we.openThinoByID($.id)},B=async $=>{try{const he=await we.archiveMemo($);he&&we.editMemo(he)}catch(he){console.error(he),new x.Notice(he.message)}},k=async()=>{try{if(a.DeleteThinoDirectly)await we.deleteMemoById(l.id);else{const $=await we.hideMemoById(l.id);$&&we.editMemo($)}}catch($){new x.Notice($.message)}dt.getState().editMemoId===l.id&&dt.setEditMemoId("")},R=()=>{if(h.current&&!h.current.confirmStatus){h.current&&h.current.toggleConfirm(!1);return}},L=()=>{uf(l)},_=async()=>{const $=await we.updateMemo(l.id,l.content,l.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");$&&we.editMemo($)},V=async()=>{navigator.clipboard.writeText(l.content).then(()=>{new x.Notice(E("COPY SUCCEED"))}).catch(()=>{new x.Notice(E("COPY FAILED"))})},U=async()=>{new wV(n,l).open()},Z=$=>{$&&$.target.tagName!=="INPUT"&&I()},Q=async($,he)=>{$.preventDefault(),$.stopPropagation();const se=$.target;if($.ctrlKey||$.metaKey){await N(he);return}if(se.tagName==="A"){await bV(n,r,se);return}if(se.tagName==="IMG"){DV(f.current,se);return}if(se.tagName==="A"&&se.getAttribute("href")){const ue=se.getAttribute("href");window.open(ue,"_blank");return}if(se.className==="memo-link-text"){TV(se);return}if(se.tagName==="INPUT"&&se.hasClass("task-list-item-checkbox")){await IV(a,he,f.current,se);return}},G=$=>{const he=new x.Menu;he.dom.toggleClass("memo-context-menu",!0);const se=window.getSelection();(se==null?void 0:se.toString().length)>0&&he.addItem(ue=>{ue.setIcon("copy").setTitle(E("Copy selected text")).onClick(()=>{navigator.clipboard.writeText(se.toString()).then(()=>{new x.Notice(E("COPY SUCCEED"))}).catch(()=>{new x.Notice(E("COPY FAILED"))})})}).addSeparator(),he.addItem(ue=>{ue.setIcon("copy").setTitle(E("Copy thino").toLocaleUpperCase()).onClick(async()=>{await V(),he.close()})}).addItem(ue=>{ue.setIcon("book-open").setTitle(E("READ")).onClick(w)}).addItem(ue=>{ue.setIcon(l.pinned?"pin-off":"pin").setTitle(l.pinned?E("UNPIN"):E("PIN")).onClick(D)}).addItem(ue=>{ue.setIcon("bookmark").setTitle(E("MARK")).onClick(S)}).addItem(ue=>{ue.setIcon("share-2").setTitle(E("SHARE")).onClick(L)}).addItem(ue=>{ue.setIcon("pencil").setTitle(E("EDIT")).onClick(I)}).addItem(ue=>{ue.setIcon("home").setTitle(E("SOURCE")).onClick(()=>N(l))}).addSeparator().addItem(ue=>{ue.setIcon("archive").setTitle(E("ARCHIVE").toLocaleUpperCase()).onClick(()=>B(l))}).addItem(ue=>{ue.setIcon("trash").setTitle(E("DELETE")).onClick(async()=>{await k()})}),he.showAtMouseEvent($.nativeEvent)},re=P.useMemo(()=>({memo:l,handlePinMemoClick:D,handleFixMemoClick:M,handleSourceMemoClick:N,handleArchiveMemo:B,handleDeleteMemoClick:k,handleGenMemoImageBtnClick:L,handleMarkMemoClick:S,handleEditMemoClick:I,handleCopyMemoClick:V,handleShowMemoStoryDialog:w,handleSplitMemoClick:U}),[l]),de=P.useMemo(()=>({memo:l,handleMemoTypeToggle:_,handleShowMemoStoryDialog:w,settings:a}),[l,a]),fe=P.useMemo(()=>v.jsxs("div",{ref:f,className:`memo-wrapper ${l.pinned?"pinned":""}`,"data-source-type":l.sourceType,"data-thino-type":l.thinoType,"data-thino-id":l.id,onMouseLeave:R,onMouseOver:$=>{$.shiftKey&&($.stopPropagation(),n.workspace.trigger("hover-link",{event:$,source:"thino",hoverParent:r.containerEl,targetEl:f.current,linktext:l.path,sourcePath:l.path,state:{scroll:l.sourceType==="DAILY"?parseInt(l.id.slice(14)):0}}))},onContextMenu:G,children:[g&&v.jsx(mf,{editorType:"inline"}),!g&&v.jsxs(v.Fragment,{children:[c==="inline"&&v.jsxs("div",{className:"memo-top-wrapper",draggable:!0,onDragStart:$=>{$.target.classList.add("dragging"),$.dataTransfer.setDragImage(f.current,0,0),$.dataTransfer.setData("text/plain",l.content)},onDragEnd:$=>{$.target.classList.remove("dragging")},children:[v.jsx(yV,{...de}),v.jsx(vV,{...re})]}),v.jsx(l9,{memo:l,handleMemoContentClick:Q,handleMemoDoubleClick:Z})]})]}),[l,g]);return v.jsx(v.Fragment,{children:fe})},ai=P.memo(EV,(e,t)=>Cw.isEqual(e.memo,t.memo));class Je extends x.Setting{constructor(n,r){super(n);Se(this,"settingTab");Se(this,"name","");Se(this,"desc","");this.settingTab=r}setName(n){return super.setName(n),this.name=n,this}setDesc(n){return super.setDesc(n),this.desc=n,this}setTab(n){const r=typeof this.name=="string"?this.name:this.name.textContent||"",a=typeof this.desc=="string"?this.desc:this.desc.textContent||"";return this.settingTab.addSettingToMasterSettingsList(n,this.settingEl,r,a),this}}class CV extends x.Modal{constructor(n,r,a,o,i){super(n);Se(this,"plugin");Se(this,"settingTab");Se(this,"target",5);Se(this,"cb");this.app=n,this.settingTab=r,this.plugin=a,this.target=o,this.cb=i}onOpen(){var l;const{contentEl:n}=this;(l=n.parentElement)==null||l.classList.add("memo-save-location-modal"),n.createEl("h3",{text:E("Thino Daily Target")});const r=n.createDiv("modal-setting");new Je(r,this.settingTab).setName(E("Target Thino Count")).addSlider(c=>{c.setDynamicTooltip().setValue(this.target).setLimits(1,30,1).onChange(async f=>{this.target=f})});const a=n.createDiv("button-group"),o=a.createEl("button",{text:E("Cancel")}),i=a.createEl("button",{text:E("Save")});i.onclick=async()=>{this.plugin.settings.MemoDailyTarget=this.target,this.settingTab.applySettingsUpdate(),this.cb(this.target),this.close()},o.onclick=async()=>{this.close()}}onClose(){const{contentEl:n}=this;n.empty()}}const xV=({allStat:e,todayTimeStamp:t,calendarType:n,handleCalendarTypeChange:r})=>{const{dailyNotesState:{app:a,settings:o},globalState:{manifest:i}}=P.useContext(Lt),[l,c]=P.useState(),[f,h]=P.useState(5),[g,y]=P.useState(0),[w,S]=P.useState(0),[D,I]=P.useState(o.HeatmapColorScheme||"default"),M=P.useRef(null),N=P.useRef(null);P.useEffect(()=>{o.HeatmapColorScheme&&I(o.HeatmapColorScheme)},[o.HeatmapColorScheme]),P.useEffect(()=>{let k,R=5;i&&a&&(k=a==null?void 0:a.plugins.getPlugin(i.id),R=k==null?void 0:k.settings.MemoDailyTarget,c(k)),h(R)},[i,a]),P.useEffect(()=>{const k=e.find(_=>_.timestamp===t),R=k?k.count:0;S(R);const L=Math.min(100,R/f*100);y(L)},[e,f]),P.useEffect(()=>{x.requireApiVersion("1.4.4")&&(x.setTooltip(N.current,g.toFixed(2)+"%"),x.setTooltip(M.current,E("Set daily target")+` (${w}/${f})`))},[g,w]),P.useEffect(()=>{M.current&&(M.current.hasChildNodes()||x.setIcon(M.current,"crosshair"),x.requireApiVersion("1.4.4")&&x.setTooltip(N.current,g+"%"))},[M,f]);const B=P.useCallback(()=>{if(!l)return;new CV(a,l==null?void 0:l.settingTab,l,f,R=>{h(R)}).open()},[l,f]);return v.jsx(v.Fragment,{children:v.jsxs("div",{className:`usage-daily-progress-wrapper heatmap-${D}`,children:[v.jsx("div",{ref:N,className:"daily-progress-bar",children:v.jsx("div",{className:"daily-progress-bar-inner",style:{width:`${g}%`}})}),v.jsx("div",{ref:M,className:"daily-progress-target",onClick:B}),v.jsx("div",{ref:k=>{k&&x.setIcon(k,n==="basic"?"layout-grid":"calendar"),k&&x.setTooltip&&x.setTooltip(k,E("Switch calendar type"))},className:"switch-calendar-type-btn",onClick:()=>r&&r(n==="basic"?"heatmap":"basic")})]})})},MV=(e,t)=>{const n=[],r=Math.floor((e-t)/ei);for(let a=0;a<=r;a++)n.push({timestamp:t+ei*a,count:0,list:0});return n},kV=e=>{const{className:t,view:n,datestamp:r,handleDateStampChange:a,handleDateItemClick:o,handleMonthChange:i,dailyStat:l}=e,c=x.moment().startOf("day").valueOf(),[f,h]=P.useState(rp(r)),[g,y]=P.useState(null),[w,S]=P.useState(e.dailyStat);P.useEffect(()=>{h(rp(r));const k=MV(AV(r),rp(r)),R=e.thinos.filter(L=>!L.deletedAt&&L.rowStatus!=="ARCHIVED");for(const L of R){const V=x.moment(L.createdAt,"YYYY/MM/DD HH:mm:ss").startOf("day").diff(x.moment(f).startOf("day"),"days");V>=0&&V{const R=D.getFullYear(),L=D.getMonth()+1;let _=0;L===1&&k===-1?_=new Date(`${R-1}/12/1`).getTime():L===12&&k===1?_=new Date(`${R+1}/1/1`).getTime():_=new Date(`${R}/${L+k}/1`).getTime(),h(rp(_)),i&&i(_)};return v.jsxs("div",{className:`heatmap-date-picker-wrapper ${t}`,children:[v.jsxs("div",{className:"date-picker-header",children:[v.jsx("span",{ref:k=>{k&&x.setIcon(k,"chevron-left")},className:"btn btn-text",onClick:()=>B(-1)}),v.jsxs("span",{className:"normal-text",children:[v.jsx(O6,{year:D.getFullYear().toString(),handleYearChange:k=>{h(rp(new Date(`${k}/${D.getMonth()+1}/1`).getTime()))}}),v.jsx(P6,{month:D.getMonth().toString(),handleMonthChange:k=>{h(rp(new Date(`${D.getFullYear()}/${parseInt(k)}/1`).getTime()))}})]}),v.jsx("span",{ref:k=>{k&&x.setIcon(k,"chevron-right")},className:"btn btn-text",onClick:()=>B(1)})]}),v.jsxs("div",{className:"date-picker-day-container",children:[v.jsx("div",{className:"date-picker-day-header",children:E("weekDaysShort").map(k=>v.jsx("span",{className:"day-item",children:k},k))}),v.jsx("div",{className:"date-picker-day-content",children:M.map(k=>{if(k.date===0)return v.jsx("span",{className:"day-item null",children:""},k.datestamp);const R=w.find(V=>V.timestamp===k.datestamp)||{count:0,timestamp:k.datestamp,list:0},L=R.count-R.list,_=R.list;return v.jsxs("span",{className:`day-item ${k.datestamp===c?"current":""} ${k.datestamp===g?"selected":""} ${RS(R.count)}`,onClick:V=>{a(r,V.nativeEvent),y(k.datestamp===g?null:k.datestamp),o&&o(V,R)},onMouseOver:V=>{if(!R||!R.count)return;const U=new x.HoverPopover(n,V.currentTarget,100);u9(U,{d:k,list:_,task:L})},children:[v.jsx("span",{className:"day-item-text",children:k.date}),v.jsx(v.Fragment,{children:R&&R.count!==0&&v.jsxs("span",{className:"day-item-dots",children:[L>0&&v.jsx("div",{className:`day-item-dot thino-task-dot ${RS(L)}`}),_>0&&v.jsx("div",{className:`day-item-dot thino-list-dot ${RS(_)}`})]})})]},k.datestamp)})})]})]})};function u9(e,{d:t,list:n,task:r}){e.hoverEl.toggleClass("thino-hover-popover",!0);const a=e.hoverEl.createDiv({cls:"thino-hover-popover-content"});a.createDiv({cls:"thino-date-item",text:`${x.moment(t.datestamp).format("YYYY-MM-DD")}`});const o=a.createDiv({cls:"thino-task-item"});o.createSpan({cls:"thino-task-item-title-text",text:`${E("Task")}: `}),o.createSpan({cls:"thino-task-item-title-count",text:`${r}`});const i=a.createDiv({cls:"thino-list-item"});i.createSpan({cls:"thino-list-item-title-text",text:`${E("List")}: `}),i.createSpan({cls:"thino-list-item-title-count",text:`${n}`})}function NV(e){const t=new Date(e),n=new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`);return((n.getMonth()===11?new Date(`${n.getFullYear()+1}/1/1`):new Date(`${n.getFullYear()}/${n.getMonth()+2}/1`)).getTime()-n.getTime())/ei}function rp(e){const t=new Date(e);return new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`).getTime()}function AV(e){const t=new Date(e),n=new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`);return(n.getMonth()===11?new Date(`${n.getFullYear()+1}/1/1`):new Date(`${n.getFullYear()}/${n.getMonth()+2}/1`)).getTime()-ei}function RS(e){return e<=0?"":e<=1?"stat-day-L1-bg":e<=2?"stat-day-L2-bg":e<=4?"stat-day-L3-bg":"stat-day-L4-bg"}const Zx={width:12,height:7},qx=(e,t)=>{const n=[];for(let r=0;r<=e;r++)n.push({timestamp:t+ei*r,count:0,list:0});return n},av=({initThinos:e,basicType:t})=>{const n=parseInt(x.moment().endOf("day").format("x"));new Date(n).getDay();const r=parseInt(x.moment().startOf("day").format("x")),a=new Array(6-new Date(n).getDay()).fill(0),o=Zx.width*Zx.height,i=parseInt(x.moment().startOf("day").subtract(o,"days").format("x")),l=x.moment().startOf("day").subtract(o,"days"),{memoState:{memos:c},dailyNotesState:{view:f,app:h,settings:g,verifyState:y}}=P.useContext(Lt),[w,S]=xo(t||OV(h||window.app)||"heatmap"),[D,I]=xo(x.moment().startOf("day").valueOf()),[M,N]=xo(g.HeatmapColorScheme||"default"),[B,k]=xo(qx(o,i)),[R,L]=xo(null),[_,V,U]=xo(""),Z=P.useRef(null);P.useEffect(()=>{const fe=qx(o,i),$=(e||c).filter(he=>!he.deletedAt&&he.rowStatus!=="ARCHIVED");for(const he of $){const ue=x.moment(he.createdAt.replaceAll("/","-"),"YYYY-MM-DD HH:mm:ss").startOf("day").diff(l,"days");ue>=0&&ue{g.HeatmapColorScheme&&N(g.HeatmapColorScheme)},[g.HeatmapColorScheme]);const Q=P.useCallback((fe,$)=>{if(!$||!$.count)return;const he=$.count-$.list,se=$.list,ue={date:$.timestamp,datestamp:$.timestamp},X=new x.HoverPopover(f,fe.currentTarget,100);u9(X,{d:ue,list:se,task:he})},[]),G=()=>{S(w==="heatmap"?"basic":"heatmap"),FV(h,w==="heatmap"?"basic":"heatmap"),I(x.moment().startOf("day").valueOf())},re=P.useCallback(async(fe,$)=>{if($.count===0)return;const he=at.getState().query.duration,se=he==null?void 0:he.from,ue=he==null?void 0:he.to,X=x.moment(se).diff(ue,"day")==0;if(se===$.timestamp&&X)at.setFromAndToQuery(0,0),L(null),V(null);else if(se!==$.timestamp&&se>0&&fe.shiftKey){const oe=x.moment($.timestamp).endOf("day").diff(ue,"day");se===0&&fe.shiftKey?V("from"):oe<0&&X&&V("to"),x.moment(se).isBefore($.timestamp)?U.current==="to"?oe<0?at.setFromAndToQuery($.timestamp,ue):(at.setFromAndToQuery(parseInt(x.moment(ue).startOf("day").format("x")),parseInt(x.moment($.timestamp).endOf("day").format("x"))),V("from")):U.current==="from"&&(oe<0,at.setFromAndToQuery(se,parseInt(x.moment($.timestamp).endOf("day").format("x")))):U.current==="to"?at.setFromAndToQuery($.timestamp,ue):U.current==="from"&&(at.setFromAndToQuery($.timestamp,parseInt(x.moment(se).endOf("day").format("x"))),V("to"))}else if(se===0&&fe.shiftKey)at.setFromAndToQuery($.timestamp,parseInt(x.moment().endOf("day").format("x")));else if($.count>0&&(fe.ctrlKey||fe.metaKey)){const{app:oe,dailyNotes:De}=ft.getState(),je=pb(x.moment($.timestamp),De);if(!x.Platform.isMobile)await oe.workspace.getLeaf(!0).openFile(je);else{let Re=oe.workspace.activeLeaf;Re===null&&(Re=oe.workspace.getLeaf(!0)),Re.openFile(je)}}else $.count>0&&!fe.shiftKey&&!fe.ctrlKey&&!fe.metaKey&&(["/","/recycle"].includes(at.getState().pathname)||at.setPathname("/"),at.setFromAndToQuery($.timestamp,ut.getTimeStampByDate(x.moment($.timestamp+ei).subtract(1,"days").endOf("day").format("YYYY-MM-DD HH:mm:ss"))),L($))},[]),de=P.useMemo(()=>v.jsx(kV,{className:`heatmap-${M}`,view:f,datestamp:D,dailyStat:B,thinos:e||c,handleMonthChange:fe=>{I(fe)},handleDateStampChange:fe=>{},handleDateItemClick:(fe,$)=>re(fe,$)}),[JSON.stringify(B),e,c,f,D,M]);return v.jsxs(v.Fragment,{children:[w==="basic"&&de,w==="heatmap"&&v.jsxs("div",{className:`usage-heat-map-wrapper heatmap-${M}`,ref:Z,children:[v.jsxs("div",{className:"day-tip-text-container",children:[v.jsx("span",{className:"tip-text",children:E("weekDaysShort")[0]}),v.jsx("span",{className:"tip-text"}),v.jsx("span",{className:"tip-text",children:E("weekDaysShort")[2]}),v.jsx("span",{className:"tip-text"}),v.jsx("span",{className:"tip-text",children:E("weekDaysShort")[4]}),v.jsx("span",{className:"tip-text"}),v.jsx("span",{className:"tip-text",children:E("weekDaysShort")[6]})]}),v.jsxs("div",{className:"usage-heat-map",children:[B.slice(B.length-84+a.length,B.length).map((fe,$)=>{const he=fe.count,se=he<=0?"":he<=1?"stat-day-L1-bg":he<=2?"stat-day-L2-bg":he<=4?"stat-day-L3-bg":"stat-day-L4-bg";return v.jsx("span",{"data-timestamp":fe.timestamp,"data-count":fe.count,"data-list-count":fe.list,"data-task-count":fe.count-fe.list,className:`stat-container ${se} ${R===fe?"current":""} ${r===fe.timestamp?"today":""}`,onMouseOver:ue=>Q(ue,fe),onClick:ue=>re(ue,fe)},$)}),a.map((fe,$)=>v.jsx("span",{className:"stat-container null"},$))]})]}),!t&&v.jsx(xV,{allStat:B,todayTimeStamp:r,calendarType:w,handleCalendarTypeChange:G})]})};function FV(e,t){try{e==null||e.saveLocalStorage("calendarType",t)}catch(n){console.error(n)}}function OV(e){try{return(e==null?void 0:e.loadLocalStorage("calendarType"))||"heatmap"}catch(t){return console.error(t),"heatmap"}}const c9=({type:e,timestamp:t})=>{const{memoState:{memos:n}}=P.useContext(Lt),[r,a]=P.useState([]),o=ne.useRef(null);return P.useEffect(()=>{if(e==="daily"){if(t){const l=n.filter(c=>x.moment(c.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(x.moment(t,"YYYY/MM/DD HH:mm:ss"),"day"));a(l);return}const i=n.filter(l=>x.moment(l.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(x.moment(),"day"));a(i)}else if(e==="latest"){const i=n.filter(f=>!f.deletedAt&&f.rowStatus!=="ARCHIVED"),l=i.filter(f=>f.pinned),c=i.filter(f=>!f.pinned).slice(0,5);a([...l,...c])}},[n]),P.useEffect(()=>{o.current&&(o.current.scrollTop=0)},[n]),r.length>0?v.jsx("div",{ref:o,className:"thino-list-container",children:r.map(i=>v.jsx(ai,{memo:i}))}):v.jsx("div",{className:"tip-text-container",children:v.jsx("span",{className:"tip-text",children:E("Here is No Memos.")})})},PV=(e,t)=>{rs.createRoot(e).render(v.jsx(ne.StrictMode,{children:v.jsx(is,{store:Le,context:Lt,children:v.jsx(jV,{plugin:t})})}))},jV=({plugin:e})=>v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"thino-error-code-block",children:E("Please open thino first")}),v.jsx("button",{className:"thino-open-view",onClick:()=>e.openMemos("center"),children:E("Open thino in center window")})]}),LV=(e,t)=>{rs.createRoot(e).render(v.jsx(ne.StrictMode,{children:v.jsx(is,{store:Le,context:Lt,children:v.jsx(RV,{yaml:t})})}))},RV=({yaml:e})=>{const t=Object.keys(e).filter(a=>e[a]),n=e.daily?e.daily:"",r=a=>{switch(a){case"editor":return Gx;case"heatmap":return BV;case"calendar":return HV;case"daily":return YV;case"list":return zV;case"status":return UV;default:return Gx}};return v.jsx(v.Fragment,{children:t.map(a=>v.jsx("div",{"data-embed-type":a,className:ar("thino-embed-container",a==="editor"?"thino-editor-modal":""),children:a==="daily"?r(a)(n):r(a)()}))})};function Gx(){return v.jsx(mf,{editorType:"inline",modal:!0})}function _V(e,t,n){try{const r=rs.createRoot(e);return r.render(v.jsx(ne.StrictMode,{children:v.jsx(is,{store:Le,context:Lt,children:v.jsx(mf,{editorType:"inline",destroy:t,modal:n})})})),r}catch(r){console.error(r)}}function BV(){return v.jsx(av,{basicType:"heatmap"})}function HV(){return v.jsx(av,{basicType:"basic"})}function UV(){return v.jsx(K2,{statusType:"banner"})}function YV(e){return v.jsx(c9,{type:"daily",timestamp:e})}function zV(){return v.jsx(c9,{type:"latest"})}class MT extends x.Modal{constructor(n){super(n);Se(this,"root")}getViewType(){return"thino_view"}onOpen(){const{contentEl:n,modalEl:r}=this;try{this.root=_V(n,this.close.bind(this),this),r.toggleClass("thino-editor-modal",!0),setTimeout(()=>{var a;(a=n.querySelector("textarea"))==null||a.focus(),this.app.workspace.trigger("focus-on-textarea")},10)}catch(a){console.error(a)}}onClose(){this.root.unmount(),this.containerEl&&this.containerEl.empty()}}function VV(e,t){if(e==null)return{};var n=WV(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WV(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,o;for(o=0;o=0)&&(n[a]=e[a]);return n}function Rw(){return Rw=Object.assign||function(e){for(var t=1;t{this.reCalculateColumnCount()})}reCalculateColumnCount(){const t=window&&window.innerWidth||1/0;let n=this.props.breakpointCols;typeof n!="object"&&(n={default:parseInt(n)||_S});let r=1/0,a=n.default||_S;for(let o in n){const i=parseInt(o);i>0&&t<=i&&i"u"&&(i="my-masonry-grid_column"));const l=Tg(Tg(Tg({},t),n),{},{style:Tg(Tg({},n.style),{},{width:o}),className:i});return a.map((c,f)=>ne.createElement("div",Rw({},l,{key:f}),c))}logDeprecated(t){console.error("[Masonry]",t)}render(){const t=this.props,{children:n,breakpointCols:r,columnClassName:a,columnAttrs:o,column:i,className:l}=t,c=VV(t,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let f=l;return typeof l!="string"&&(this.logDeprecated('The property "className" requires a string'),typeof l>"u"&&(f="my-masonry-grid")),ne.createElement("div",Rw({},c,{className:f}),this.renderColumns())}}_w.defaultProps=ZV;const kT=e=>{P.useContext(Lt);const t=Le.getState().dailyNotesState.settings,{thinos:n,dayMark:r,dayMarkRange:a="day",thinoWrapper:o}=e,[i,l]=ne.useState(!(t!=null&&t.hidePinnedGroup&&r==="PINNED")),c=ne.useRef(null);P.useEffect(()=>{c&&x.setTooltip&&x.setTooltip(c.current,E("Click to expand or fold, Cmd+Click to show all thinos of the day"))},[c]);const f=h=>{if(x.Keymap.isModifier(h.nativeEvent,"Mod")){const g={day:"YYYY-MM-DD",week:"YYYY-[W]WW",month:"YYYY-MM",quarter:"YYYY-[Q]Q",year:"YYYY"},y=x.moment(r,g[a]);at.setFromAndToQuery(y.startOf(a).valueOf(),y.endOf(a).valueOf());return}l(!i)};return v.jsx(v.Fragment,{children:e.type==="list"?v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:c,className:`day-mark ${i?"":"folded"} PINNED`,onClick:f,children:v.jsxs("span",{className:"day-mark-text",children:[i?"▼ ":"▶ ",r==="PINNED"?r+" 📌":r]})},r),i&&n.map((h,g)=>o?v.jsx("div",{children:o({thino:h})},`${h.id}-${x.moment(h.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`):v.jsx(ai,{memo:h},`${h.id}-${x.moment(h.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`))]}):v.jsxs(v.Fragment,{children:[v.jsx("div",{ref:c,className:`day-mark ${i?"":"folded"}`,onClick:f,children:v.jsxs("span",{className:"day-mark-text",children:[i?"▼ ":"▶ ",r==="PINNED"?r+" 📌":r]})},r),v.jsx(_w,{breakpointCols:e.type==="waterfall"?3:1,className:`${e.type}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:i&&n.map((h,g)=>o?v.jsx("div",{children:o({thino:h})},`${h.id}-${x.moment(h.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`):v.jsx(ai,{memo:h},`${h.id}-${x.moment(h.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${g}`))})]})})};function Wu(e){"@babel/helpers - typeof";return Wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wu(e)}function qV(e,t){if(Wu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Wu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function d9(e){var t=qV(e,"string");return Wu(t)=="symbol"?t:String(t)}function lf(e,t,n){return t=d9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function tr(e){for(var t=1;t=0)&&(n[a]=e[a]);return n}function tu(e,t){if(e==null)return{};var n=Ab(e,t),r,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ma(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qx(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n`)},D.useEffect(()=>{t(e)},[e])}var lie=typeof window>"u"?D.useEffect:D.useLayoutEffect;function cie({duration:e,easing:t="cubic-bezier(0.4, 0, 0.2, 1)",onTransitionStateChange:n=()=>{},isExpanded:r,defaultExpanded:o=!1,hasDisabledAnimation:i,id:a,...s}={}){const l=o7(n),u=rie(a?`${a}`:void 0),[d,h]=qoe(r,o),p=D.useRef(d),[m,b]=D.useState(!1),v=Xoe(),y=i??v,S=D.useRef(),x=D.useRef(),C=D.useRef(null),[k,M]=D.useState(null);sie(C);const I=`${s.collapsedHeight||0}px`;function O(R){if(!C.current)return;const L=C.current;for(const B in R){const _=R[B];_?L.style[B]=_:L.style.removeProperty(B)}}return lie(()=>{if(!C.current||d===p.current)return;p.current=d;function L(H){return y?0:e??iie(H)}const B=H=>`height ${L(H)}ms ${t}`,_=H=>{function U(){d?(O({height:"",overflow:"",transition:"",display:""}),l("expandEnd")):(O({transition:""}),l("collapseEnd")),b(!1)}x.current&&H3(x.current),x.current=oie(U,H)};return b(!0),d?S.current=requestAnimationFrame(()=>{l("expandStart"),O({display:"block",overflow:"hidden",height:I}),S.current=requestAnimationFrame(()=>{l("expanding");const H=_3(C);_(L(H)),C.current&&(C.current.style.transition=B(H),C.current.style.height=`${H}px`)})}):S.current=requestAnimationFrame(()=>{l("collapseStart");const H=_3(C);_(L(H)),O({transition:B(H),height:`${H}px`}),S.current=requestAnimationFrame(()=>{l("collapsing"),O({height:I,overflow:"hidden"})})}),()=>{S.current&&cancelAnimationFrame(S.current),x.current&&H3(x.current)}},[d,I,y,e,t,l]),{isExpanded:d,setExpanded:h,getToggleProps(R){const{disabled:L,onClick:B,refKey:_,...H}={refKey:"ref",onClick(){},disabled:!1,...R},U=k?k.tagName==="BUTTON":void 0,G=R?.[_||"ref"],K={id:`react-collapsed-toggle-${u}`,"aria-controls":`react-collapsed-panel-${u}`,"aria-expanded":d,onClick(J){L||(B?.(J),h(ee=>!ee))},[_||"ref"]:B3(G,M)},z={type:"button",disabled:L?!0:void 0},ne={"aria-disabled":L?!0:void 0,role:"button",tabIndex:L?-1:0};return U===!1?{...K,...ne,...H}:U===!0?{...K,...z,...H}:{...K,...z,...ne,...H}},getCollapseProps(R){const{style:L,refKey:B}={refKey:"ref",style:{},...R},_=R?.[B||"ref"];return{id:`react-collapsed-panel-${u}`,"aria-hidden":!d,"aria-labelledby":`react-collapsed-toggle-${u}`,role:"region",...R,[B||"ref"]:B3(C,_),style:{boxSizing:"border-box",...!m&&!d?{display:I==="0px"?"none":"block",height:I,overflow:"hidden"}:{},...L}}}}}const i7=D.memo(({memoId:e,showOutgoingLinks:t=!0,showIncomingLinks:n=!0})=>{const[r,o]=D.useState([]),[i,a]=D.useState([]),[s,l]=D.useState(null),[u,d]=D.useState(!1),[h,p]=D.useState(!1),m=D.useRef(null);D.useEffect(()=>{!s&&!u&&!h&&(d(!0),(async()=>{const y=de.getMemoById(e);y&&l(y),d(!1)})())},[e,s,u,h]),D.useEffect(()=>{s&&!h&&!u&&(d(!0),(async()=>{try{if(t){const y=[],S=[...s.content.matchAll(fh)];for(const C of S)if(C&&C.length===3){const k=C[2],M=de.getMemoById(k);M&&y.push({...M,createdAtStr:Le.getDateTimeString(M.createdAt),dateStr:Le.getDateString(M.createdAt)})}const x=vS(s.content);for(const C of x){const[k,M]=C.split("#^"),I=M;if(k&&I){const O=await de.getLinkedMemoByBlockId(I,k);O&&(y.some(R=>R.id===O.id)||y.push({...O,createdAtStr:Le.getDateTimeString(O.createdAt),dateStr:Le.getDateString(O.createdAt)}))}}o([...y])}if(n){const y=await de.getLinkedMemos(s.id);let S=[];s.hasId&&s.path&&(S=await de.getLinkedMemosByLinkId(s.hasId,s.path));const x=[...y,...S],C=Array.from(new Map(x.map(k=>[k.id,k])).values());a(C.sort((k,M)=>Le.getTimeStampByDate(M.createdAt)-Le.getTimeStampByDate(k.createdAt)).map(k=>({...k,createdAtStr:Le.getDateTimeString(k.createdAt),dateStr:Le.getDateString(k.createdAt)})))}p(!0)}catch(y){console.error("Error fetching linked memos:",y)}d(!1)})())},[s,t,n,h,u]);const b=D.useCallback(v=>{pa(v)},[]);return w.jsxs("div",{className:tn("reference-links-group",u?"loading":"loaded"),ref:m,children:[u&&w.jsx("div",{className:"links-loading",children:w.jsx("span",{className:"loading-text",children:E("Loading...")})}),h&&w.jsxs(w.Fragment,{children:[t&&r.length>0&&w.jsx("div",{className:"links-section outgoing-links",children:w.jsx("div",{className:"links-list",children:r.map(v=>{const y=d0(jm(v.content)).replaceAll(`
+`," ");return w.jsxs("div",{"aria-label":`${E("Linked")} ${v.content}`,className:"link-item",onClick:()=>b(v),children:[w.jsx("div",{className:"link-icon",ref:S=>S&&N.setIcon(S,"circle-dot")}),w.jsxs("div",{className:"link-date",children:[v.dateStr,":"]}),w.jsx("div",{className:"link-content",children:y})]},v.id)})})}),n&&i.length>0&&w.jsx("div",{className:"links-section incoming-links",children:w.jsx("div",{className:"links-list",children:i.map(v=>{const y=d0(jm(v.content)).replaceAll(`
+`," ");return w.jsxs("div",{"aria-label":`${E("Linked by")} ${v.content}`,className:"link-item",onClick:()=>b(v),children:[w.jsx("div",{className:"link-icon",ref:S=>S&&N.setIcon(S,"circle-dot-dashed")}),w.jsxs("div",{className:"link-date",children:[v.dateStr,":"]}),w.jsx("div",{className:"link-content",children:y})]},v.id)})})}),h&&!u&&r.length===0&&i.length===0&&null]})]})},(e,t)=>e.memoId===t.memoId&&e.showIncomingLinks===t.showIncomingLinks&&e.showOutgoingLinks===t.showOutgoingLinks),uie=e=>{const{dailyNotesState:{app:t,view:n,settings:r},globalState:{memoListView:o}}=D.useContext(ct),{getCollapseProps:i,getToggleProps:a,isExpanded:s,setExpanded:l}=cie({defaultExpanded:!0,collapsedHeight:r?.ThinoCollapsedHeight??100}),{memo:u,handleMemoContentClick:d,handleMemoDoubleClick:h}=e,p=Y.useRef(null),[m,b]=Y.useState(""),v=Y.useRef(m),y=Y.useRef(0),[S,x]=Y.useState(!1),[C,k]=Y.useState(!1),M=N.debounce((O,R,L)=>{for(const B of O){const{height:_}=B.contentRect,H=R?.ThinoMaxHeight||340,U=_>H;x(U),l(!U),L.disconnect()}},500);D.useEffect(()=>{if(u.content!==v.current){if(r?.OptimizeForCallout&&u.content.split("> [!").length>3&&u.content.split(`
+`).length>10&&!C){const O=p.current.createEl("button");O.setText(E("Render content")),O.onclick=async()=>{k(!0),await I()};const R=p.current.createEl("textarea");R.setText(u.content),R.disabled=!0,p.current?.toggleClass(["raw-content"],!0),l(!0),x(!1);return}I()}},[u.content]),D.useEffect(()=>{C&&y.current!==r?.ThinoMaxHeight&&(p?.current.hasChildNodes()&&k(!1),I())},[r?.ThinoMaxHeight]),D.useEffect(()=>{if(!C)return;const O=p.current;if(!O)return;if(!r?.ThinoMaxHeight){l(!0),x(!1);return}const R=new ResizeObserver(L=>{M(L,r,R)});return R.observe(O),()=>R.disconnect()},[C]);const I=async()=>{p.current&&n&&t&&u.content!==v.current&&(p.current.empty(),await N.MarkdownRenderer.render(t,u.content,p.current,u.path,n),p.current?.querySelectorAll(".internal-link")?.forEach(R=>{const L=R,B=L.getAttribute("data-href");if(!B)return;t.metadataCache.getFirstLinkpathDest(B,u.path)||R.classList.add("is-unresolved"),L.addEventListener("mouseover",H=>{H.stopPropagation(),t.workspace.trigger("hover-link",{event:H,source:"thino",hoverParent:n.containerEl,targetEl:L,linktext:B,sourcePath:L.href})})})),v.current=u.content,p.current?.toggleClass(["markdown-rendered"],!0),p.current?.toggleClass(["raw-content"],!1),k&&k(!0),y.current=r?.ThinoMaxHeight||340};return w.jsxs(w.Fragment,{children:[S&&o==="moments"&&w.jsxs(w.Fragment,{children:[w.jsx("button",{className:"thino-collapse-button",...a({style:{display:"block",marginTop:2}}),children:E(s?"Collapse":"Expand")}),!s&&r?.ThinoCollapsedHeight!==0&&w.jsx("div",{className:"thino-collapse-shadowOverlay",onDoubleClick:h})]}),w.jsx("div",{...i({style:{margin:0}}),ref:p,className:"memo-content-text",onClick:O=>d(O,u),onDoubleClick:h,onContextMenu:O=>{O.preventDefault()}}),o==="list"&&r?.enableReferenceLinksGroup&&w.jsx(i7,{memoId:u.id}),S&&o!=="moments"&&w.jsxs(w.Fragment,{children:[!s&&r?.ThinoCollapsedHeight!==0&&w.jsx("div",{className:"thino-collapse-shadowOverlay",onDoubleClick:h}),w.jsx("button",{className:"thino-collapse-button",...a({style:{display:"block",marginTop:2}}),children:E(s?"Collapse":"Expand")})]})]})},a7=D.memo(uie,(e,t)=>e.memo.content===t.memo.content),die=e=>{const[t,n]=D.useState({...e.memo,createdAtStr:Le.getDateTimeString(e.memo.createdAt)}),[r,o]=D.useState([]),[i,a]=D.useState([]);D.useEffect(()=>{(async()=>{try{const h=[],p=[...t.content.matchAll(fh)];for(const x of p)if(x&&x.length===3){const C=x[2],k=de.getMemoById(C);k&&h.push({...k,createdAtStr:Le.getDateTimeString(k.createdAt),dateStr:Le.getDateString(k.createdAt)})}const m=vS(t.content);for(const x of m){const[C,k]=x.split("#^"),M=k;if(C&&M){const I=await de.getLinkedMemoByBlockId(M,C);I&&(h.some(O=>O.id===I.id)||h.push({...I,createdAtStr:Le.getDateTimeString(I.createdAt),dateStr:Le.getDateString(I.createdAt)}))}}o([...h]);const b=await de.getLinkedMemos(t.id);let v=[];t.hasId&&t.path&&(v=await de.getLinkedMemosByLinkId(t.hasId,t.path));const y=[...b,...v],S=Array.from(new Map(y.map(x=>[x.id,x])).values());a(S.sort((x,C)=>Le.getTimeStampByDate(C.createdAt)-Le.getTimeStampByDate(x.createdAt)).map(x=>({...x,createdAtStr:Le.getDateTimeString(x.createdAt),dateStr:Le.getDateString(x.createdAt)})))}catch(h){console.error("Error fetching linked memos:",h)}})()},[t.id,t.hasId,t.path]);const s=D.useCallback(async d=>{const h=d.target;if(h.className==="memo-link-text"){const p=h.dataset?.value,m=de.getMemoById(p??"");if(m){const b={...m,createdAtStr:Le.getDateTimeString(m.createdAt)};o([]),a([]),n(b)}else new N.Notice(E("Thino not found")),h.classList.remove("memo-link-text")}},[]),l=D.useCallback(d=>{o([]),a([]),n({...d,createdAtStr:Le.getDateTimeString(d.createdAt)})},[t.id]),u=D.useCallback(()=>{e.destroy(),Ze.setEditMemoId(t.id)},[t.id]);return w.jsxs(w.Fragment,{children:[w.jsxs("div",{className:"memo-card-container",children:[w.jsxs("div",{className:"header-container",children:[w.jsx("span",{className:"time-text",children:t.createdAtStr}),w.jsxs("div",{className:"btns-container",children:[w.jsx("button",{ref:d=>{d&&N.setIcon(d,"edit")},className:"btn edit-btn",onClick:u}),w.jsx("button",{ref:d=>{d&&N.setIcon(d,"x")},className:"btn close-btn",onClick:e.destroy})]})]}),w.jsx("div",{className:"memo-container",children:w.jsx("div",{className:"memo-content-text",children:w.jsx(a7,{memo:t,handleMemoContentClick:s,handleMemoDoubleClick:()=>{}})})}),w.jsx("div",{className:"layer-container"})]}),r.length>0?w.jsxs("div",{className:"linked-memos-wrapper",children:[w.jsxs("span",{className:"normal-text",children:[E("LINKED")," ",r.length," THINO"," "]}),r.map(d=>{const h=d0(jm(d.content)).replaceAll(`
+`," ");return w.jsxs("div",{className:"linked-memo-container",onClick:()=>l(d),children:[w.jsxs("span",{className:"time-text",children:[d.dateStr," "]}),h]},d.id)})]}):null,i.length>0?w.jsxs("div",{className:"linked-memos-wrapper",children:[w.jsxs("span",{className:"normal-text",children:[i.length," THINO ",E("LINK TO THE")," THINO"]}),i.map(d=>{const h=d0(jm(d.content)).replaceAll(`
+`," ");return w.jsxs("div",{className:"linked-memo-container",onClick:()=>l(d),children:[w.jsxs("span",{className:"time-text",children:[d.dateStr," "]}),h]},d.id)})]}):null]})};function pa(e){yS({className:"memo-card-dialog"},die,{memo:e})}function fie({mouseEnterDelayMS:e=0,mouseLeaveDelayMS:t=0}={}){const[n,r]=D.useState(!1);let o,i;return[n,{onMouseEnter:()=>{clearTimeout(i),o=window.setTimeout(()=>r(!0),e)},onMouseLeave:()=>{clearTimeout(o),i=window.setTimeout(()=>r(!1),t)}}]}const hie=e=>{const{memo:t,memoListView:n,handlePinMemoClick:r,handleFixMemoClick:o,handleSourceMemoClick:i,handleShowMemoStoryDialog:a,handleCopyMemoClick:s,handleEditMemoClick:l,handleGenMemoImageBtnClick:u,handleMarkMemoClick:d,handleArchiveMemo:h,handleDeleteMemoClick:p,handleSplitMemoClick:m,handleCopyEmbedLink:b,handleReferenceLinksGroupClick:v}=e,y=Ue.getState().query.tag,S=ke.getState().dailyNotesState.settings,x=S.EnabledLocationList.find(U=>U.value==="MULTI"),[C,k]=wh(!1),M=D.useRef(null),I={pinRef:D.useRef(null),fixRef:D.useRef(null),typeRef:D.useRef(null),referenceLinksGroupRef:D.useRef(null),moreRef:D.useRef(null)},[O,R]=fie({mouseEnterDelayMS:500}),L=D.useRef();D.useEffect(()=>{if(!I.typeRef)return;const U=Pm.find(G=>G.title===t.sourceType);N.setIcon(I.typeRef.current,U.icon),N.requireApiVersion("1.4.4")&&N.setTooltip(I.typeRef.current,t.path),I.fixRef&&(N.setIcon(I.fixRef.current,"shield-alert"),N.requireApiVersion("1.4.4")&&N.setTooltip(I.fixRef.current,"Update Thino property")),I.referenceLinksGroupRef&&S?.enableReferenceLinksGroup&&(N.setIcon(I.referenceLinksGroupRef.current,"link"),N.requireApiVersion("1.4.4")&&N.setTooltip(I.referenceLinksGroupRef.current,"Reference links group"))},[I.typeRef,I.referenceLinksGroupRef]),D.useEffect(()=>{I.pinRef&&(t.pinned?(N.setIcon(I.pinRef.current,"pin-off"),N.requireApiVersion("1.4.4")&&N.setTooltip(I.pinRef.current,E("UNPIN"))):(N.setIcon(I.pinRef.current,"pin"),N.requireApiVersion("1.4.4")&&N.setTooltip(I.pinRef.current,E("PIN"))))},[I.pinRef,t.pinned]);const B=N.debounce(()=>{if(O&&I.moreRef.current){if(L.current&&L.current._loaded||L.current?.useNativeMenu||document.body.find(".more-action-btns-wrapper"))return;const U=_(),G=I.moreRef.current.getBoundingClientRect();U.showAtPosition({x:G.left,y:G.bottom})}},200);D.useEffect(()=>{B()},[O]);const _=()=>{const U=new N.Menu;return U.dom.toggleClass(["more-action-btns-wrapper"],!0),U.useNativeMenu?(U.setNoIcon(),U.addItem(G=>{G.setTitle(E("COPY")).onClick(s)}),U.addItem(G=>{G.setTitle(E("EDIT")).onClick(l)}),U.addItem(G=>{G.setTitle(E("SHARE")).onClick(u)})):U.addItem(G=>{const K=G.dom;G.dom.empty(),G.dom.toggleClass(["more-action-btn-group","more-action-menu-item"],!0);const z=K.createEl("span");new N.ExtraButtonComponent(z).setIcon("copy"),z.toggleClass(["menu-item-icon","more-action-item-icon"],!0),z.onclick=ee=>{ee.stopPropagation(),ee.preventDefault(),s(),U.close()};const ne=K.createEl("span");ne.toggleClass(["menu-item-icon","more-action-item-icon"],!0),ne.onclick=ee=>{ee.stopPropagation(),ee.preventDefault(),l(),U.close()},new N.ExtraButtonComponent(ne).setIcon("pencil");const J=K.createEl("span");J.toggleClass(["menu-item-icon","more-action-item-icon"],!0),J.onclick=ee=>{ee.stopPropagation(),ee.preventDefault(),u(),U.close()},new N.ExtraButtonComponent(J).setIcon("share-2")}),U.addSeparator(),t.sourceType==="DAILY"&&(U.addItem(G=>{G.setIcon("copy").setTitle(E("Copy embed link")).onClick(()=>{b(!0)})}),U.addItem(G=>{G.setIcon("copy").setTitle(E("Copy link")).onClick(()=>{b(!1)})}),U.addSeparator()),U.addItem(G=>{G.setIcon("book-open").setTitle(E("READ")).onClick(()=>a(new MouseEvent("click")))}),U.addItem(G=>{G.setIcon("bookmark").setTitle(E("MARK")).onClick(d)}),/(^|\n)#{1,6}\s/g.exec(t.content)?.length>1&&x&&U.addItem(G=>{G.setIcon("separator-horizontal").setTitle(E("SPLIT")).onClick(m)}),U.addItem(G=>{G.setIcon("home").setTitle(E("SOURCE")).onClick(()=>i(t))}),U.addSeparator(),U.addItem(G=>{G.setWarning(!0).setIcon("archive").setTitle(E("ARCHIVE").toUpperCase()).onClick(()=>h(t))}),U.addItem(G=>{G.setWarning(!0).setIcon("trash").setTitle(S.DeleteThinoDirectly?E("DELETE"):E("TRASH BOX").toUpperCase().toUpperCase()).onClick(K=>{if(U.useNativeMenu)p(),U.close();else if(K.stopPropagation(),K.preventDefault(),!C){k(!0),G.setTitle(E("CONFIRM!")).onClick(z=>{p(),U.close()});return}})}),U.addSeparator(),U.addItem(G=>{G.setDisabled(!0).setTitle(Le.getWordCount(t.content.replace(/```[^\S\r\n]*[a-z]*\n.*?\n```/g,""))+` ${E("words")}`)}),U.onHide(()=>{k(!1)}),L.current=U,U},H=U=>{_().showAtMouseEvent(U.nativeEvent)};return w.jsxs("div",{ref:M,className:"memo-top-right-wrapper",children:[y&&S.FilterByMetadata?t.content.includes(y)?w.jsx("span",{className:"tag-text tag-in-content",children:E("Matched via tag in content")}):t.fileInfo?.tags.includes(y)?w.jsx("span",{className:"tag-text tag-in-file",children:E("Matched via tag in file")}):null:null,w.jsxs("div",{className:"btns-container",children:[w.jsx("span",{ref:I.fixRef,className:`btn ${t.sourceType!=="MULTI"||t.id!==""?"thino-hidden":""} fix-memo-btn`,onClick:()=>o(t)}),S?.enableReferenceLinksGroup&&w.jsx("span",{ref:I.referenceLinksGroupRef,className:`btn ${n==="list"||n==="moments"?"thino-hidden":""} reference-links-group-btn`,onClick:v}),w.jsx("span",{ref:I.typeRef,className:`btn ${t.sourceType==="DAILY"?"thino-hidden":""} source-type-btn`,onClick:()=>i(t)}),w.jsx("span",{ref:I.pinRef,className:`btn ${e.memo.pinned?"pinned-btn":"unpinned-btn"} pro`,onClick:r}),w.jsx("span",{...R,ref:U=>{I.moreRef.current=U,U&&N.setIcon(U,"more-horizontal")},onClick:H,className:"btn more-action-btn"})]})]})},pie=e=>{const{memo:t,handleMemoTypeToggle:n,handleShowMemoStoryDialog:r,settings:o}=e,i=t.fileInfo?.frontmatter?.title||t.path.split("/").pop().split(".").shift();return w.jsxs("div",{className:"memo-top-left-wrapper",children:[e.children,w.jsx("span",{title:t.createdAt,className:"time-text",onClick:a=>r(a),children:t.createdAt}),w.jsx("div",{className:`btn memo-type-img ${o?.ShowTaskLabel?"":"thino-hidden"}`,onClick:n,children:t.thinoType!=="JOURNAL"&&w.jsx("input",{className:"task-list-item-checkbox",type:"checkbox",checked:t.thinoType!=="TASK-TODO","data-task":t.thinoType==="TASK-TODO"?"":t.thinoType==="TASK-DONE"?"x":t.thinoType?.slice(5)})}),o?.ShowSourcePath&&(t.sourceType==="FILE"||t.sourceType==="MULTI")&&w.jsx("span",{className:"time-text source-path","aria-label":i,onClick:()=>{Ue.setPathQuery(i)},children:i})]})};function mie(){this.__data__=[],this.size=0}var gie=mie;function vie(e,t){return e===t||e!==e&&t!==t}var cv=vie,yie=cv;function bie(e,t){for(var n=e.length;n--;)if(yie(e[n][0],t))return n;return-1}var MS=bie,wie=MS,Sie=Array.prototype,Tie=Sie.splice;function xie(e){var t=this.__data__,n=wie(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Tie.call(t,n,1),--this.size,!0}var Iie=xie,kie=MS;function Eie(e){var t=this.__data__,n=kie(t,e);return n<0?void 0:t[n][1]}var Cie=Eie,Mie=MS;function Die(e){return Mie(this.__data__,e)>-1}var Aie=Die,Nie=MS;function Oie(e,t){var n=this.__data__,r=Nie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var Pie=Oie,jie=gie,Lie=Iie,Rie=Cie,Fie=Aie,Hie=Pie;function Sh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var h=-1,p=!0,m=n&yse?new pse:void 0;for(i.set(e,t),i.set(t,e);++h-1&&e%1==0&&e{const i=this.sanitisedFileName(o[0]),a=n.filter(s=>s==i);return n.push(i),a.length>=1?`${i}${a.length+1}`:i})}contentSplitByHeading(t,n){const r=t.split(`
+`),o=new Array(n).join("#")+" ",i=new Array(n+1).join("#")+" ",a=[];let s=[];return r.forEach((l,u)=>{l.startsWith(i)?(s.length>0&&(a.push(s),s=[]),s.push(l)):s.length>0&&!l.startsWith(o)?s.push(l):s.length>0&&(a.push(s),s=[]),u===r.length-1&&s.length>0&&a.push(s)}),a}onChooseSuggestion(t,n){this.selectSuggestion(t,n)}renderSuggestion(t,n){n.setText(t.title)}getSuggestions(){return[{id:"splitByHeading1",title:E("Split by Heading 1")},{id:"splitByHeading2",title:E("Split by Heading 2")},{id:"splitByHeading3",title:E("Split by Heading 3")}]}async selectSuggestion(t,n){let r=[];if(t.id==="splitByHeading1"?r=this.contentSplitByHeading(this.thino.content,1):t.id==="splitByHeading2"?r=this.contentSplitByHeading(this.thino.content,2):t.id==="splitByHeading3"&&(r=this.contentSplitByHeading(this.thino.content,3)),r.length===0){new N.Notice("No headings found"),this.close();return}const o=this.ensureUniqueFileNames(r);for(const s of r){const l=r.indexOf(s),u=await de.createThino({content:s.join(`
+`),name:o[l],type:"MULTI",isList:!0});de.pushMemo(u)}let i=this.thino.content;r.forEach((s,l)=>{i=i.replace(s.join(`
+`),`[[${o[l]}]]`)});const a=await de.updateMemo(this.thino.id,i);a&&de.editMemo(a),this.close()}}const Ule=async(e,t,n)=>{const r=n.getAttribute("href"),o=n.className;if(o.contains("tag"))zle(n.innerText.slice(1));else if(o.contains("internal-link")){const i=n.getAttribute("data-href"),a=de.getMemoById(i??"");a?pa(a):await e.workspace.openLinkText(i,i,!N.Platform.isMobile&&t.navigation!==!0)}else r&&window.open(r,"_blank")},zle=e=>{const t=Ue.getState().query.tag;Ue.setTagQuery(t.contains(",")?t.split(",").includes(e)?t.split(",").filter(n=>n!==e).join(","):t+","+e:t===e?"":e)},Vle=(e,t)=>{const n=t?.getAttribute("src"),r=t?.parentElement.getAttribute("src"),o=[...e?.querySelectorAll("img")||[]],i=o.indexOf(t);CS({imgUrl:n,filepath:n.startsWith("app")?r:void 0,otherIMGEls:o,currentIndex:i})},Wle=e=>{const t=e.dataset?.value,n=de.getMemoById(t??"");n?pa(n):(new N.Notice("Thino Not Found"),e.classList.remove("memo-link-text"))},Gle=async(e,t,n,r)=>{const o=e?.AppendDateWhenTaskDone?" ✅ "+N.moment().format("YYYY-MM-DD"):"",i=r.parentElement.dataset?.task==="x"?"DONE":"TODO",a=[...n?.querySelectorAll("li.task-list-item")||[]];for(const s of a)if(s===r||s===r.closest("li.task-list-item")){const l=a.indexOf(s),u=t.content.split(/\n/),d=[];for(let y=0;y{const{globalState:{editMemoId:t,memoListView:n},dailyNotesState:{app:r,view:o,settings:i,verifyState:a},locationState:{pathname:s}}=D.useContext(ct),{memo:l,type:u="inline"}=e,d=D.useRef(null),h=D.useRef(null),[p,m]=D.useState(!1),b=D.useRef(null),[v,y]=D.useState(!1);D.useEffect(()=>{p&&setTimeout(()=>{Ze.setEditMemoId(l.id)},100)},[p]),D.useEffect(()=>{(s==="/review"||s==="/daily")&&t!==l.id&&p&&m(!1)},[t]),D.useEffect(()=>{b.current&&!v&&d.current&&(r.dragManager.handleDrag(b.current,$=>{r.dragManager.updateSource([d.current],"is-dragging");const re=de.getMemoById(l.id);if($.dataTransfer.setData("text/plain",l.content),$.dataTransfer.setData("text/uri-list",l.content),$.dataTransfer.setData("Text",l.content),i?.DraggingBehavior==="block-link")if(re?.sourceType==="DAILY"){const le=r.vault.getFileByPath(re.path);let ie=re.hasId;return re.hasId||(ie=Le.randomId(6),si(re,{id:re.id,hasId:ie})),{type:"link",icon:"lucide-link",title:le.basename,linktext:`${re.path}#^${ie}`,sourcePath:re.path,file:le,memo:re,blockId:ie,source:"thino-plugin"}}else return null;else if(i?.DraggingBehavior==="text")return null}),y(!0))},[b.current,d.current,i?.DraggingBehavior]);const S=$=>{if($.ctrlKey||$.metaKey){const re=N.moment(l.createdAt,"YYYY/MM/DD HH:mm:ss");Ue.setFromAndToQuery(re.startOf("day").valueOf(),re.endOf("day").valueOf());return}pa(l)},x=()=>{if(i?.UseButtonToShowEditor&&i?.DefaultEditorLocation==="Bottom"){const $=document.querySelector("div[data-type='thino_view'] .view-content .memo-show-editor-button:not(.thino-hidden)");$&&$.trigger("click")}Ze.setMarkMemoId(l.id)},C=async()=>{const $=!N.Platform.isDesktop&&await window.Capacitor?.Plugins.Device.getId(),re=N.Platform.isDesktop?await Sn():$.identifier||$.uuid;if(!a||a?.appId!==re){Nt();return}l.pinned?await de.unpinMemoById(l.id):await de.pinMemoById(l.id)},k=()=>{if(i?.UseButtonToShowEditor&&i?.DefaultEditorLocation==="Bottom"&&N.Platform.isMobile){const $=document.querySelector("div[data-type='thino_view'] .view-content .memo-show-editor-button:not(.thino-hidden)");$&&$.trigger("click")}(s==="/review"||s==="/daily")&&m(!0),s!=="/review"&&s!=="/daily"&&Ze.setEditMemoId(l.id)},M=async $=>{$.sourceType==="MULTI"&&$.id.trim()===""&&await de.updateMemoProperty($)},I=async $=>{await de.openThinoByID($.id)},O=async $=>{try{const re=await de.archiveMemo($);re&&de.editMemo(re)}catch(re){console.error(re),new N.Notice(re.message)}},R=async()=>{try{if(i.DeleteThinoDirectly)await de.deleteMemoById(l.id);else{const $=await de.hideMemoById(l.id);$&&de.editMemo($)}}catch($){new N.Notice($.message)}Ze.getState().editMemoId===l.id&&Ze.setEditMemoId("")},L=()=>{if(h.current&&!h.current.confirmStatus){h.current&&h.current.toggleConfirm(!1);return}},B=()=>{yu(l)},_=async()=>{const $=await de.updateMemo(l.id,l.content,l.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");$&&de.editMemo($)},H=async()=>{navigator.clipboard.writeText(l.content).then(()=>{new N.Notice(E("COPY SUCCEED"))}).catch(()=>{new N.Notice(E("COPY FAILED"))})},U=async()=>{new Yle(r,l).open()},G=$=>{if(!$||$.target.tagName==="INPUT")return;switch(i?.doubleClickBehavior||"edit-thino"){case"open-thino":pa(l);break;case"edit-thino":k();break;case"go-to-source":I(l);break;case"do-nothing":break;default:k();break}},K=async($,re)=>{$.preventDefault(),$.stopPropagation();const le=$.target;if($.ctrlKey||$.metaKey){await I(re);return}if(le.tagName==="A"){await Ule(r,o,le);return}if(le.tagName==="IMG"){Vle(d.current,le);return}if(le.tagName==="A"&&le.getAttribute("href")){const ie=le.getAttribute("href");window.open(ie,"_blank");return}if(le.className==="memo-link-text"){Wle(le);return}if(le.tagName==="INPUT"&&le.hasClass("task-list-item-checkbox")){await Gle(i,re,d.current,le);return}},z=async $=>{const re=await q8(l,$);navigator.clipboard.writeText(re),new N.Notice(E("COPY SUCCEED"))},ne=$=>{const re=new N.Menu;re.dom.toggleClass("memo-context-menu",!0);const le=window.getSelection();le?.toString().length>0&&re.addItem(ie=>{ie.setIcon("copy").setTitle(E("Copy selected text")).onClick(()=>{navigator.clipboard.writeText(le.toString()).then(()=>{new N.Notice(E("COPY SUCCEED"))}).catch(()=>{new N.Notice(E("COPY FAILED"))})})}).addSeparator(),l.sourceType==="DAILY"&&(re.addItem(ie=>{ie.setIcon("link").setTitle(E("Copy embed link")).onClick(()=>{z(!0)})}),re.addItem(ie=>{ie.setIcon("link").setTitle(E("Copy link")).onClick(()=>{z(!1)})}),re.addSeparator()),i?.enableReferenceLinksGroup&&n!=="list"&&re.addItem(ie=>{ie.setIcon("link").setTitle(E("Reference links group")).onClick(()=>J($))}),re.addItem(ie=>{ie.setIcon("copy").setTitle(E("Copy thino").toLocaleUpperCase()).onClick(async()=>{await H(),re.close()})}).addItem(ie=>{ie.setIcon("book-open").setTitle(E("READ")).onClick(()=>S($))}).addItem(ie=>{ie.setIcon(l.pinned?"pin-off":"pin").setTitle(l.pinned?E("UNPIN"):E("PIN")).onClick(C)}).addItem(ie=>{ie.setIcon("bookmark").setTitle(E("MARK")).onClick(x)}).addItem(ie=>{ie.setIcon("share-2").setTitle(E("SHARE")).onClick(B)}).addItem(ie=>{ie.setIcon("pencil").setTitle(E("EDIT")).onClick(k)}).addItem(ie=>{ie.setIcon("home").setTitle(E("SOURCE")).onClick(()=>I(l))}).addSeparator().addItem(ie=>{ie.setIcon("archive").setWarning(!0).setTitle(E("ARCHIVE").toLocaleUpperCase()).onClick(()=>O(l))}).addItem(ie=>{ie.setIcon("trash").setWarning(!0).setTitle(E("DELETE")).onClick(async()=>{await R()})}),re.showAtMouseEvent($.nativeEvent)},J=$=>{$.stopPropagation(),$.preventDefault();const re=new N.Menu;(async()=>{try{const ie=[],fe=[],ye=[...l.content.matchAll(fh)];for(const Fe of ye)if(Fe&&Fe.length===3){const ce=Fe[2],Ne=de.getMemoById(ce);Ne&&ie.push({...Ne,createdAtStr:Le.getDateTimeString(Ne.createdAt),dateStr:Le.getDateString(Ne.createdAt)})}const ge=vS(l.content);for(const Fe of ge){const[ce,Ne]=Fe.split("#^"),Pe=Ne;if(ce&&Pe){const _e=await de.getLinkedMemoByBlockId(Pe,ce);_e&&(ie.some(qe=>qe.id===_e.id)||ie.push({..._e,createdAtStr:Le.getDateTimeString(_e.createdAt),dateStr:Le.getDateString(_e.createdAt)}))}}const me=await de.getLinkedMemos(l.id);let Ce=[];l.hasId&&l.path&&(Ce=await de.getLinkedMemosByLinkId(l.hasId,l.path));const je=[...me,...Ce];Array.from(new Map(je.map(Fe=>[Fe.id,Fe])).values()).sort((Fe,ce)=>Le.getTimeStampByDate(ce.createdAt)-Le.getTimeStampByDate(Fe.createdAt)).forEach(Fe=>{fe.push({...Fe,createdAtStr:Le.getDateTimeString(Fe.createdAt),dateStr:Le.getDateString(Fe.createdAt)})}),re.addSections(["Outgoing","Incoming"]),ie.length>0&&ie.forEach(Fe=>{re.addItem(ce=>{const Ne=Fe.content.length>10?Fe.content.substring(0,10)+"...":Fe.content;ce.setTitle(Ne).setIcon("arrow-right").onClick(()=>{pa(Fe)})})}),fe.length>0&&fe.forEach(Fe=>{re.addItem(ce=>{const Ne=Fe.content.length>10?Fe.content.substring(0,10)+"...":Fe.content;ce.setTitle(Ne).setSection("Incoming").setIcon("arrow-left").onClick(()=>{pa(Fe)})})}),ie.length===0&&fe.length===0&&re.addItem(Fe=>{Fe.setDisabled(!0).setTitle(E("No reference links found"))}),re.showAtMouseEvent($.nativeEvent)}catch(ie){console.error("Error fetching linked memos:",ie),new N.Notice(E("Error fetching reference links"))}})()},ee=D.useMemo(()=>({memo:l,memoListView:n,handlePinMemoClick:C,handleFixMemoClick:M,handleSourceMemoClick:I,handleArchiveMemo:O,handleDeleteMemoClick:R,handleGenMemoImageBtnClick:B,handleMarkMemoClick:x,handleEditMemoClick:k,handleCopyMemoClick:H,handleShowMemoStoryDialog:S,handleSplitMemoClick:U,handleCopyEmbedLink:z,handleReferenceLinksGroupClick:J}),[l]),Z=D.useMemo(()=>({memo:l,handleMemoTypeToggle:_,handleShowMemoStoryDialog:S,settings:i}),[l,i]),q=D.useMemo(()=>w.jsxs("div",{ref:d,className:`memo-wrapper ${l.pinned?"pinned":""}`,"data-source-type":l.sourceType,"data-thino-type":l.thinoType,"data-thino-id":l.id,onMouseLeave:L,onMouseOver:$=>{$.shiftKey&&($.stopPropagation(),r.workspace.trigger("hover-link",{event:$,source:"thino",hoverParent:o.containerEl,targetEl:d.current,linktext:l.path,sourcePath:l.path,state:{scroll:l.sourceType==="DAILY"?parseInt(l.id.slice(14)):0}}))},onContextMenu:ne,children:[p&&w.jsx(Du,{editorType:"inline"}),!p&&w.jsxs(w.Fragment,{children:[u==="inline"&&w.jsxs("div",{ref:b,className:"memo-top-wrapper",draggable:!0,children:[w.jsx(pie,{...Z}),w.jsx(hie,{...ee})]}),w.jsx(a7,{memo:l,handleMemoContentClick:K,handleMemoDoubleClick:G})]})]}),[l,p]);return w.jsx(w.Fragment,{children:q})},vo=D.memo(Zle,(e,t)=>ws(e.memo,t.memo));class Oe extends N.Setting{settingTab;name="";desc="";constructor(t,n){super(t),this.settingTab=n}setName(t){return super.setName(t),this.name=t,this}setDesc(t){return super.setDesc(t),this.desc=t,this}setTab(t){const n=typeof this.name=="string"?this.name:this.name.textContent||"",r=typeof this.desc=="string"?this.desc:this.desc.textContent||"";return this.settingTab.addSettingToMasterSettingsList(t,this.settingEl,n,r),this}}class $le extends N.Modal{plugin;settingTab;target=5;cb;constructor(t,n,r,o,i){super(t),this.app=t,this.settingTab=n,this.plugin=r,this.target=o,this.cb=i}onOpen(){const{contentEl:t}=this;t.parentElement?.classList.add("memo-save-location-modal"),t.createEl("h3",{text:E("Thino Daily Target")});const n=t.createDiv("modal-setting");new Oe(n,this.settingTab).setName(E("Target Thino Count")).addSlider(a=>{a.setDynamicTooltip().setValue(this.target).setLimits(1,30,1).onChange(async s=>{this.target=s})});const r=t.createDiv("button-group"),o=r.createEl("button",{text:E("Cancel")}),i=r.createEl("button",{text:E("Save")});i.onclick=async()=>{this.plugin.settings.MemoDailyTarget=this.target,this.settingTab.applySettingsUpdate(),this.cb(this.target),this.close()},o.onclick=async()=>{this.close()}}onClose(){const{contentEl:t}=this;t.empty()}}const qle=({allStat:e,todayTimeStamp:t,calendarType:n,handleCalendarTypeChange:r})=>{const{dailyNotesState:{app:o,settings:i},globalState:{manifest:a}}=D.useContext(ct),[s,l]=D.useState(),[u,d]=D.useState(5),[h,p]=D.useState(0),[m,b]=D.useState(0),[v,y]=D.useState(i.HeatmapColorScheme||"default"),S=D.useRef(null),x=D.useRef(null);D.useEffect(()=>{i.HeatmapColorScheme&&y(i.HeatmapColorScheme)},[i.HeatmapColorScheme]),D.useEffect(()=>{let k,M=5;a&&o&&(k=o?.plugins.getPlugin(a.id),M=k?.settings.MemoDailyTarget,l(k)),d(M)},[a,o]),D.useEffect(()=>{const k=e.find(O=>O.timestamp===t),M=k?k.count:0;b(M);const I=Math.min(100,M/u*100);p(I)},[e,u]),D.useEffect(()=>{N.requireApiVersion("1.4.4")&&(N.setTooltip(x.current,h.toFixed(2)+"%"),N.setTooltip(S.current,E("Set daily target")+` (${m}/${u})`))},[h,m]),D.useEffect(()=>{S.current&&(S.current.hasChildNodes()||N.setIcon(S.current,"crosshair"),N.requireApiVersion("1.4.4")&&N.setTooltip(x.current,h+"%"))},[S,u]);const C=D.useCallback(()=>{if(!s)return;new $le(o,s?.settingTab,s,u,M=>{d(M)}).open()},[s,u]);return w.jsx(w.Fragment,{children:w.jsxs("div",{className:`usage-daily-progress-wrapper heatmap-${v}`,children:[w.jsx("div",{ref:x,className:"daily-progress-bar",children:w.jsx("div",{className:"daily-progress-bar-inner",style:{width:`${h}%`}})}),w.jsx("div",{ref:S,className:"daily-progress-target",onClick:C}),w.jsx("div",{ref:k=>{k&&N.setIcon(k,n==="basic"?"layout-grid":"calendar"),k&&N.setTooltip&&N.setTooltip(k,E("Switch calendar type"))},className:"switch-calendar-type-btn",onClick:()=>r&&r(n==="basic"?"heatmap":"basic")})]})})},Kle=(e,t)=>{const n=[],r=Math.floor((e-t)/Uo);for(let o=0;o<=r;o++)n.push({timestamp:t+Uo*o,count:0,list:0});return n},Xle=e=>{const{className:t,view:n,datestamp:r,handleDateStampChange:o,handleDateItemClick:i,handleMonthChange:a,dailyStat:s}=e,l=N.moment().startOf("day").valueOf(),[u,d]=D.useState(Ud(r)),[h,p]=D.useState(null),[m,b]=D.useState(e.dailyStat);D.useEffect(()=>{d(Ud(r));const k=Kle(Qle(r),Ud(r)),M=e.thinos.filter(I=>!I.deletedAt&&I.rowStatus!=="ARCHIVED");for(const I of M){const R=N.moment(I.createdAt,"YYYY/MM/DD HH:mm:ss").startOf("day").diff(N.moment(u).startOf("day"),"days");R>=0&&R{const M=v.getFullYear(),I=v.getMonth()+1;let O=0;I===1&&k===-1?O=new Date(`${M-1}/12/1`).getTime():I===12&&k===1?O=new Date(`${M+1}/1/1`).getTime():O=new Date(`${M}/${I+k}/1`).getTime(),d(Ud(O)),a&&a(O)};return w.jsxs("div",{className:`heatmap-date-picker-wrapper ${t}`,children:[w.jsxs("div",{className:"date-picker-header",children:[w.jsx("span",{ref:k=>{k&&N.setIcon(k,"chevron-left")},className:"btn btn-text",onClick:()=>C(-1)}),w.jsxs("span",{className:"normal-text",children:[w.jsx(AH,{year:v.getFullYear().toString(),handleYearChange:k=>{d(Ud(new Date(`${k}/${v.getMonth()+1}/1`).getTime()))}}),w.jsx(NH,{month:v.getMonth().toString(),handleMonthChange:k=>{d(Ud(new Date(`${v.getFullYear()}/${parseInt(k)}/1`).getTime()))}})]}),w.jsx("span",{ref:k=>{k&&N.setIcon(k,"chevron-right")},className:"btn btn-text",onClick:()=>C(1)})]}),w.jsxs("div",{className:"date-picker-day-container",children:[w.jsx("div",{className:"date-picker-day-header",children:E("weekDaysShort").map(k=>w.jsx("span",{className:"day-item",children:k},k))}),w.jsx("div",{className:"date-picker-day-content",children:S.map(k=>{if(k.date===0)return w.jsx("span",{className:"day-item null",children:""},k.datestamp);const M=m.find(R=>R.timestamp===k.datestamp)||{count:0,timestamp:k.datestamp,list:0},I=M.count-M.list,O=M.list;return w.jsxs("span",{className:`day-item ${k.datestamp===l?"current":""} ${k.datestamp===h?"selected":""} ${Vx(M.count)}`,onClick:R=>{o(r,R.nativeEvent),p(k.datestamp===h?null:k.datestamp),i&&i(R,M)},onMouseOver:R=>{if(!M||!M.count)return;const L=new N.HoverPopover(n,R.currentTarget,100);v7(L,{d:k,list:O,task:I})},children:[w.jsx("span",{className:"day-item-text",children:k.date}),w.jsx(w.Fragment,{children:M&&M.count!==0&&w.jsxs("span",{className:"day-item-dots",children:[I>0&&w.jsx("div",{className:`day-item-dot thino-task-dot ${Vx(I)}`}),O>0&&w.jsx("div",{className:`day-item-dot thino-list-dot ${Vx(O)}`})]})})]},k.datestamp)})})]})]})};function v7(e,{d:t,list:n,task:r}){e.hoverEl.toggleClass("thino-hover-popover",!0);const o=e.hoverEl.createDiv({cls:"thino-hover-popover-content"});o.createDiv({cls:"thino-date-item",text:`${N.moment(t.datestamp).format("YYYY-MM-DD")}`});const i=o.createDiv({cls:"thino-task-item"});i.createSpan({cls:"thino-task-item-title-text",text:`${E("Task")}: `}),i.createSpan({cls:"thino-task-item-title-count",text:`${r}`});const a=o.createDiv({cls:"thino-list-item"});a.createSpan({cls:"thino-list-item-title-text",text:`${E("List")}: `}),a.createSpan({cls:"thino-list-item-title-count",text:`${n}`})}function Jle(e){const t=new Date(e),n=new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`);return((n.getMonth()===11?new Date(`${n.getFullYear()+1}/1/1`):new Date(`${n.getFullYear()}/${n.getMonth()+2}/1`)).getTime()-n.getTime())/Uo}function Ud(e){const t=new Date(e);return new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`).getTime()}function Qle(e){const t=new Date(e),n=new Date(`${t.getFullYear()}/${t.getMonth()+1}/1`);return(n.getMonth()===11?new Date(`${n.getFullYear()+1}/1/1`):new Date(`${n.getFullYear()}/${n.getMonth()+2}/1`)).getTime()-Uo}function Vx(e){return e<=0?"":e<=1?"stat-day-L1-bg":e<=2?"stat-day-L2-bg":e<=4?"stat-day-L3-bg":"stat-day-L4-bg"}const tj={width:12,height:7},nj=(e,t)=>{const n=[];for(let r=0;r<=e;r++)n.push({timestamp:t+Uo*r,count:0,list:0});return n},_m=({initThinos:e,basicType:t})=>{const n=parseInt(N.moment().endOf("day").format("x"));new Date(n).getDay();const r=parseInt(N.moment().startOf("day").format("x")),o=new Array(6-new Date(n).getDay()).fill(0),i=tj.width*tj.height,a=parseInt(N.moment().startOf("day").subtract(i,"days").format("x")),s=N.moment().startOf("day").subtract(i,"days"),{memoState:{memos:l},dailyNotesState:{view:u,app:d,settings:h,verifyState:p}}=D.useContext(ct),[m,b]=Ho(t||tce(d||window.app)||"heatmap"),[v,y]=Ho(N.moment().startOf("day").valueOf()),[S,x]=Ho(h.HeatmapColorScheme||"default"),[C,k]=Ho(nj(i,a)),[M,I]=Ho(null),[O,R,L]=Ho(""),B=D.useRef(null);D.useEffect(()=>{const J=nj(i,a),ee=(e||l).filter(Z=>!Z.deletedAt&&Z.rowStatus!=="ARCHIVED");for(const Z of ee){const $=N.moment(Z.createdAt.replaceAll("/","-"),"YYYY-MM-DD HH:mm:ss").startOf("day").diff(s,"days");$>=0&&${h.HeatmapColorScheme&&x(h.HeatmapColorScheme)},[h.HeatmapColorScheme]);const _=D.useCallback((J,ee)=>{if(!ee||!ee.count)return;const Z=ee.count-ee.list,q=ee.list,$={date:ee.timestamp,datestamp:ee.timestamp},re=new N.HoverPopover(u,J.currentTarget,100);v7(re,{d:$,list:q,task:Z})},[]),H=()=>{b(m==="heatmap"?"basic":"heatmap"),ece(d,m==="heatmap"?"basic":"heatmap"),y(N.moment().startOf("day").valueOf())},U=D.useCallback(async(J,ee)=>{if(ee.count===0){z(ee);return}const Z=Ue.getState().query.duration,q=Z?.from,$=Z?.to,re=N.moment(q).diff($,"day")===0;if(q===ee.timestamp&&re){Ue.setFromAndToQuery(0,0),I(null),R(null);return}if(J.shiftKey){G(ee,q,$);return}if(J.ctrlKey||J.metaKey){await K(ee.timestamp);return}z(ee)},[]),G=(J,ee,Z,q)=>{const $=J.timestamp;if(ee===0){Ue.setFromAndToQuery($,parseInt(N.moment().endOf("day").format("x"))),R("from");return}const re=N.moment($).endOf("day").diff(Z,"day");N.moment(ee).isBefore($)?L.current==="to"?re<0?Ue.setFromAndToQuery($,Z):(Ue.setFromAndToQuery(parseInt(N.moment(Z).startOf("day").format("x")),parseInt(N.moment($).endOf("day").format("x"))),R("from")):L.current==="from"&&Ue.setFromAndToQuery(ee,parseInt(N.moment($).endOf("day").format("x"))):L.current==="to"?Ue.setFromAndToQuery($,Z):L.current==="from"&&(Ue.setFromAndToQuery($,parseInt(N.moment(ee).endOf("day").format("x"))),R("to"))},K=async J=>{const{app:ee,dailyNotes:Z}=$e.getState(),q=lS(N.moment(J),Z);if(q)if(!N.Platform.isMobile)await ee.workspace.getLeaf(!0).openFile(q);else{let $=ee.workspace.activeLeaf;$===null&&($=ee.workspace.getLeaf(!0)),$.openFile(q)}},z=J=>{["/","/recycle"].includes(Ue.getState().pathname)||Ue.setPathname("/"),Ue.setFromAndToQuery(J.timestamp,Le.getTimeStampByDate(N.moment(J.timestamp+Uo).subtract(1,"days").endOf("day").format("YYYY-MM-DD HH:mm:ss"))),I(J)},ne=D.useMemo(()=>w.jsx(Xle,{className:`heatmap-${S}`,view:u,datestamp:v,dailyStat:C,thinos:e||l,handleMonthChange:J=>{y(J)},handleDateStampChange:J=>{},handleDateItemClick:(J,ee)=>U(J,ee)}),[JSON.stringify(C),e,l,u,v,S]);return w.jsxs(w.Fragment,{children:[m==="basic"&&ne,m==="heatmap"&&w.jsxs("div",{className:`usage-heat-map-wrapper heatmap-${S}`,ref:B,children:[w.jsxs("div",{className:"day-tip-text-container",children:[w.jsx("span",{className:"tip-text",children:E("weekDaysShort")[0]}),w.jsx("span",{className:"tip-text"}),w.jsx("span",{className:"tip-text",children:E("weekDaysShort")[2]}),w.jsx("span",{className:"tip-text"}),w.jsx("span",{className:"tip-text",children:E("weekDaysShort")[4]}),w.jsx("span",{className:"tip-text"}),w.jsx("span",{className:"tip-text",children:E("weekDaysShort")[6]})]}),w.jsxs("div",{className:"usage-heat-map",children:[C.slice(C.length-84+o.length,C.length).map((J,ee)=>{const Z=J.count,q=Z<=0?"":Z<=1?"stat-day-L1-bg":Z<=2?"stat-day-L2-bg":Z<=4?"stat-day-L3-bg":"stat-day-L4-bg";return w.jsx("span",{"data-timestamp":J.timestamp,"data-count":J.count,"data-list-count":J.list,"data-task-count":J.count-J.list,className:`stat-container ${q} ${M===J?"current":""} ${r===J.timestamp?"today":""}`,onMouseOver:$=>_($,J),onClick:$=>U($,J)},ee)}),o.map((J,ee)=>w.jsx("span",{className:"stat-container null"},ee))]})]}),!t&&w.jsx(qle,{allStat:C,todayTimeStamp:r,calendarType:m,handleCalendarTypeChange:H})]})};function ece(e,t){try{e?.saveLocalStorage("calendarType",t)}catch(n){console.error(n)}}function tce(e){try{return e?.loadLocalStorage("calendarType")||"heatmap"}catch(t){return console.error(t),"heatmap"}}const y7=({type:e,timestamp:t})=>{const{memoState:{memos:n}}=D.useContext(ct),[r,o]=D.useState([]),i=Y.useRef(null);return D.useEffect(()=>{if(e==="daily"){if(t){const s=n.filter(l=>N.moment(l.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(N.moment(t,"YYYY/MM/DD HH:mm:ss"),"day"));o(s);return}const a=n.filter(s=>N.moment(s.createdAt,"YYYY/MM/DD HH:mm:ss").isSame(N.moment(),"day"));o(a)}else if(e==="latest"){const a=n.filter(u=>!u.deletedAt&&u.rowStatus!=="ARCHIVED"),s=a.filter(u=>u.pinned),l=a.filter(u=>!u.pinned).slice(0,5);o([...s,...l])}},[n]),D.useEffect(()=>{i.current&&(i.current.scrollTop=0)},[n]),r.length>0?w.jsx("div",{ref:i,className:"thino-list-container",children:r.map(a=>w.jsx(vo,{memo:a}))}):w.jsx("div",{className:"tip-text-container",children:w.jsx("span",{className:"tip-text",children:E("Here is No Memos.")})})},nce=(e,t)=>{Fi.createRoot(e).render(w.jsx(Y.StrictMode,{children:w.jsx(zi,{store:ke,context:ct,children:w.jsx(rce,{plugin:t})})}))},rce=({plugin:e})=>w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"thino-error-code-block",children:E("Please open thino first")}),w.jsx("button",{className:"thino-open-view",onClick:()=>e.openMemos("center"),children:E("Open thino in center window")})]}),oce=(e,t)=>{Fi.createRoot(e).render(w.jsx(Y.StrictMode,{children:w.jsx(zi,{store:ke,context:ct,children:w.jsx(ice,{yaml:t})})}))},ice=({yaml:e})=>{const t=Object.keys(e).filter(o=>e[o]),n=e.daily?e.daily:"",r=o=>{switch(o){case"editor":return rj;case"heatmap":return sce;case"calendar":return lce;case"daily":return uce;case"list":return dce;case"status":return cce;default:return rj}};return w.jsx(w.Fragment,{children:t.map(o=>w.jsx("div",{"data-embed-type":o,className:tn("thino-embed-container",o==="editor"?"thino-editor-modal":""),children:o==="daily"?r(o)(n):r(o)()}))})};function rj(){return w.jsx(Du,{editorType:"inline",modal:!0})}function ace(e,t,n){try{const r=Fi.createRoot(e);return r.render(w.jsx(Y.StrictMode,{children:w.jsx(zi,{store:ke,context:ct,children:w.jsx(Du,{editorType:"inline",destroy:t,modal:n})})})),r}catch(r){console.error(r)}}function sce(){return w.jsx(_m,{basicType:"heatmap"})}function lce(){return w.jsx(_m,{basicType:"basic"})}function cce(){return w.jsx(sD,{statusType:"banner"})}function uce(e){return w.jsx(y7,{type:"daily",timestamp:e})}function dce(){return w.jsx(y7,{type:"latest"})}class lE extends N.Modal{root;constructor(t){super(t)}getViewType(){return"thino_view"}onOpen(){const{contentEl:t,modalEl:n}=this;try{this.root=ace(t,this.close.bind(this),this),n.toggleClass("thino-editor-modal",!0),setTimeout(()=>{t.querySelector("textarea")?.focus(),this.app.workspace.trigger("focus-on-textarea")},10)}catch(r){console.error(r)}}onClose(){this.root.unmount(),this.containerEl&&this.containerEl.empty()}}function fce(e,t){if(e==null)return{};var n=hce(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hce(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function D0(){return D0=Object.assign||function(e){for(var t=1;t{this.reCalculateColumnCount()})}reCalculateColumnCount(){const t=window&&window.innerWidth||1/0;let n=this.props.breakpointCols;typeof n!="object"&&(n={default:parseInt(n)||Wx});let r=1/0,o=n.default||Wx;for(let i in n){const a=parseInt(i);a>0&&t<=a&&a"u"&&(a="my-masonry-grid_column"));const s=Pp(Pp(Pp({},t),n),{},{style:Pp(Pp({},n.style),{},{width:i}),className:a});return o.map((l,u)=>Y.createElement("div",D0({},s,{key:u}),l))}logDeprecated(t){console.error("[Masonry]",t)}render(){const t=this.props,{children:n,breakpointCols:r,columnClassName:o,columnAttrs:i,column:a,className:s}=t,l=fce(t,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let u=s;return typeof s!="string"&&(this.logDeprecated('The property "className" requires a string'),typeof s>"u"&&(u="my-masonry-grid")),Y.createElement("div",D0({},l,{className:u}),this.renderColumns())}}A0.defaultProps=mce;const cE=e=>{D.useContext(ct);const t=ke.getState().dailyNotesState.settings,{thinos:n,dayMark:r,dayMarkRange:o="day",thinoWrapper:i}=e,[a,s]=Y.useState(!(t?.hidePinnedGroup&&r==="PINNED")),l=Y.useRef(null);D.useEffect(()=>{l&&N.setTooltip&&N.setTooltip(l.current,E("Click to expand or fold, Cmd+Click to show all thinos of the day"))},[l]);const u=d=>{if(N.Keymap.isModifier(d.nativeEvent,"Mod")){const h={day:"YYYY-MM-DD",week:"YYYY-[W]WW",month:"YYYY-MM",quarter:"YYYY-[Q]Q",year:"YYYY"},p=N.moment(r,h[o]);Ue.setFromAndToQuery(p.startOf(o).valueOf(),p.endOf(o).valueOf());return}s(!a)};return w.jsx(w.Fragment,{children:e.type==="list"?w.jsxs(w.Fragment,{children:[w.jsx("div",{ref:l,className:`day-mark ${a?"":"folded"} PINNED`,onClick:u,children:w.jsxs("span",{className:"day-mark-text",children:[a?"▼ ":"▶ ",r==="PINNED"?r+" 📌":r]})},r),a&&n.map((d,h)=>i?w.jsx("div",{children:i({thino:d})},`${d.id}-${N.moment(d.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${h}`):w.jsx(vo,{memo:d},`${d.id}-${N.moment(d.createdAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${h}`))]}):w.jsxs(w.Fragment,{children:[w.jsx("div",{ref:l,className:`day-mark ${a?"":"folded"}`,onClick:u,children:w.jsxs("span",{className:"day-mark-text",children:[a?"▼ ":"▶ ",r==="PINNED"?r+" 📌":r]})},r),w.jsx(A0,{breakpointCols:e.type==="waterfall"?3:1,className:`${e.type}-view masonry-memolist`,columnClassName:"masonry-memolist-grid_column",children:a&&n.map((d,h)=>i?w.jsx("div",{children:i({thino:d})},`${d.id}-${N.moment(d.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${h}`):w.jsx(vo,{memo:d},`${d.id}-${N.moment(d.updatedAt,"YYYY/MM/DD HH:mm:ss").format("x")}-${h}`))})]})})};function ml(e){"@babel/helpers - typeof";return ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ml(e)}function gce(e,t){if(ml(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(ml(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function b7(e){var t=gce(e,"string");return ml(t)=="symbol"?t:String(t)}function vu(e,t,n){return t=b7(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ij(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function pn(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function Ss(e,t){if(e==null)return{};var n=OS(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ir(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aj(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?_-1:0),U=1;U<_;U++)V[U-1]=arguments[U];(L=y.props)[N].apply(L,[R].concat(V)),y._notifying=!1}y.unmounted||y.setState(function(Z){var Q,G=Z.values;return{values:Pr(Object.create(null),G,(Q={},Q[M]=R,Q))}})};y.handlers[N]=B}),n.length&&(y.attachRef=function(M){y.inner=M});var I=Object.create(null);return o.forEach(function(M){I[M]=y.props[dw(M)]}),y.state={values:I,prevProps:{}},y}var g=h.prototype;return g.shouldComponentUpdate=function(){return!this._notifying},h.getDerivedStateFromProps=function(w,S){var D=S.values,I=S.prevProps,M={values:Pr(Object.create(null),D),prevProps:{}};return o.forEach(function(N){M.prevProps[N]=w[N],!Xx(w,N)&&Xx(I,N)&&(M.values[N]=w[dw(N)])}),M},g.componentWillUnmount=function(){this.unmounted=!0},g.render=function(){var w=this,S=this.props,D=S.innerRef,I=Ab(S,["innerRef"]);i.forEach(function(N){delete I[N]});var M={};return o.forEach(function(N){var B=w.props[N];M[N]=B!==void 0?B:w.state.values[N]}),ne.createElement(e,Pr({},I,M,this.handlers,{ref:D||this.attachRef}))},h}(ne.Component);rW(l),l.displayName="Uncontrolled("+r+")",l.propTypes=Pr({innerRef:function(){}},eW(t)),n.forEach(function(f){l.prototype[f]=function(){var g;return(g=this.inner)[f].apply(g,arguments)}});var c=l;return ne.forwardRef&&(c=ne.forwardRef(function(f,h){return ne.createElement(l,Pr({},f,{innerRef:h,__source:{fileName:aW,lineNumber:128},__self:this}))}),c.propTypes=l.propTypes),c.ControlledComponent=e,c.deferControlTo=function(f,h,g){return h===void 0&&(h={}),w9(f,Pr({},t,h),g)},c}function b9(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tt}),Wv=$p(function(e,t){return e>=t}),uI=$p(function(e,t){return e=t&&a.getHours()-n.getHours()a?0:a+t),n=n>a?a:n,n<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(a);++r-1&&e%1==0&&e<=qW}var dI=GW,JW=cI,KW=dI;function QW(e){return e!=null&&KW(e.length)&&!JW(e)}var Zv=QW,XW=9007199254740991,e$=/^(?:0|[1-9]\d*)$/;function t$(e,t){var n=typeof e;return t=t??XW,!!t&&(n=="number"||n!="symbol"&&e$.test(e))&&e>-1&&e%1==0&&e{t.current=e},[e]),t}function fM(e){const t=rZ(e);return P.useCallback(function(...n){return t.current&&t.current(...n)},[t])}function hM(){return P.useState(null)}function aZ(){const e=P.useRef(!0),t=P.useRef(()=>e.current);return P.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),t.current}function oZ(e){const t=aZ();return[e[0],P.useCallback(n=>{if(t())return e[1](n)},[t,e[1]])]}var iZ=K6({defaultModifiers:[Z6,G6,Y6,z6,q6,$6,J6,U6]}),pM=function(t){return{position:t,top:"0",left:"0",opacity:"0",pointerEvents:"none"}},sZ={name:"applyStyles",enabled:!1},lZ={name:"ariaDescribedBy",enabled:!0,phase:"afterWrite",effect:function(t){var n=t.state;return function(){var r=n.elements,a=r.reference,o=r.popper;if("removeAttribute"in a){var i=(a.getAttribute("aria-describedby")||"").split(",").filter(function(l){return l.trim()!==o.id});i.length?a.setAttribute("aria-describedby",i.join(",")):a.removeAttribute("aria-describedby")}}},fn:function(t){var n,r=t.state,a=r.elements,o=a.popper,i=a.reference,l=(n=o.getAttribute("role"))==null?void 0:n.toLowerCase();if(o.id&&l==="tooltip"&&"setAttribute"in i){var c=i.getAttribute("aria-describedby");if(c&&c.split(",").indexOf(o.id)!==-1)return;i.setAttribute("aria-describedby",c?c+","+o.id:o.id)}}},uZ=[];function cZ(e,t,n){var r=n===void 0?{}:n,a=r.enabled,o=a===void 0?!0:a,i=r.placement,l=i===void 0?"bottom":i,c=r.strategy,f=c===void 0?"absolute":c,h=r.modifiers,g=h===void 0?uZ:h,y=Ab(r,["enabled","placement","strategy","modifiers"]),w=P.useRef(),S=P.useCallback(function(){var k;(k=w.current)==null||k.update()},[]),D=P.useCallback(function(){var k;(k=w.current)==null||k.forceUpdate()},[]),I=oZ(P.useState({placement:l,update:S,forceUpdate:D,attributes:{},styles:{popper:pM(f),arrow:{}}})),M=I[0],N=I[1],B=P.useMemo(function(){return{name:"updateStateModifier",enabled:!0,phase:"write",requires:["computeStyles"],fn:function(R){var L=R.state,_={},V={};Object.keys(L.elements).forEach(function(U){_[U]=L.styles[U],V[U]=L.attributes[U]}),N({state:L,styles:_,attributes:V,update:S,forceUpdate:D,placement:L.placement})}}},[S,D,N]);return P.useEffect(function(){!w.current||!o||w.current.setOptions({placement:l,strategy:f,modifiers:[].concat(g,[B,sZ])})},[f,l,B,o]),P.useEffect(function(){if(!(!o||e==null||t==null))return w.current=iZ(e,t,Pr({},y,{placement:l,strategy:f,modifiers:[].concat(g,[lZ,B])})),function(){w.current!=null&&(w.current.destroy(),w.current=void 0,N(function(k){return Pr({},k,{attributes:{},styles:{popper:pM(f)}})}))}},[o,e,t]),M}function dZ(e,t,n,r){var a=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(t,n,a),n.__once&&e.removeEventListener(t,n.__once,a)}function _g(e,t,n,r){return nZ(e,t,n,r),function(){dZ(e,t,n,r)}}function fZ(e){return e&&"setState"in e?J2.findDOMNode(e):e??null}const hZ=function(e){return Gv(fZ(e))};var pZ=27,mM=function(){};function mZ(e){return e.button===0}function gZ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var gM=function(t){return t&&("current"in t?t.current:t)};function vZ(e,t,n){var r=n===void 0?{}:n,a=r.disabled,o=r.clickTrigger,i=o===void 0?"click":o,l=P.useRef(!1),c=t||mM,f=P.useCallback(function(y){var w,S=gM(e);dz(!!S,"RootClose captured a close event but does not have a ref to compare it to. useRootClose(), should be passed a ref that resolves to a DOM node"),l.current=!S||gZ(y)||!mZ(y)||!!pv(S,(w=y.composedPath==null?void 0:y.composedPath()[0])!=null?w:y.target)},[e]),h=fM(function(y){l.current||c(y)}),g=fM(function(y){y.keyCode===pZ&&c(y)});P.useEffect(function(){if(!(a||e==null)){var y=window.event,w=hZ(gM(e)),S=_g(w,i,f,!0),D=_g(w,i,function(N){if(N===y){y=void 0;return}h(N)}),I=_g(w,"keyup",function(N){if(N===y){y=void 0;return}g(N)}),M=[];return"ontouchstart"in w.documentElement&&(M=[].slice.call(w.body.children).map(function(N){return _g(N,"mousemove",mM)})),function(){S(),D(),I(),M.forEach(function(N){return N()})}}},[e,a,i,f,h,g])}function yZ(e){var t={};return Array.isArray(e)?(e==null||e.forEach(function(n){t[n.name]=n}),t):e||t}function wZ(e){return e===void 0&&(e={}),Array.isArray(e)?e:Object.keys(e).map(function(t){return e[t].name=t,e[t]})}function bZ(e){var t,n,r,a,o=e.enabled,i=e.enableEvents,l=e.placement,c=e.flip,f=e.offset,h=e.fixed,g=e.containerPadding,y=e.arrowElement,w=e.popperConfig,S=w===void 0?{}:w,D=yZ(S.modifiers);return Pr({},S,{placement:l,enabled:o,strategy:h?"fixed":S.strategy,modifiers:wZ(Pr({},D,{eventListeners:{enabled:i},preventOverflow:Pr({},D.preventOverflow,{options:g?Pr({padding:g},(t=D.preventOverflow)==null?void 0:t.options):(n=D.preventOverflow)==null?void 0:n.options}),offset:{options:Pr({offset:f},(r=D.offset)==null?void 0:r.options)},arrow:Pr({},D.arrow,{enabled:!!y,options:Pr({},(a=D.arrow)==null?void 0:a.options,{element:y})}),flip:Pr({enabled:!!c},D.flip)}))})}function SZ(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function DZ(e,t){e.classList?e.classList.add(t):SZ(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function vM(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function TZ(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=vM(e.className,t):e.setAttribute("class",vM(e.className&&e.className.baseVal||"",t))}var F0;function H9(e){if((!F0&&F0!==0||e)&&pI){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),F0=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return F0}var zS=function(t){var n;return typeof document>"u"?null:t==null?Gv().body:(typeof t=="function"&&(t=t()),t&&"current"in t&&(t=t.current),(n=t)!=null&&n.nodeType&&t||null)};function yM(e,t){var n=P.useState(function(){return zS(e)}),r=n[0],a=n[1];if(!r){var o=zS(e);o&&a(o)}return P.useEffect(function(){t&&r&&t(r)},[t,r]),P.useEffect(function(){var i=zS(e);i!==r&&a(i)},[e,r]),r}const wM=e=>!e||typeof e=="function"?e:t=>{e.current=t};function IZ(e,t){const n=wM(e),r=wM(t);return a=>{n&&n(a),r&&r(a)}}function EZ(e,t){return P.useMemo(()=>IZ(e,t),[e,t])}var mI=ne.forwardRef(function(e,t){var n=e.flip,r=e.offset,a=e.placement,o=e.containerPadding,i=o===void 0?5:o,l=e.popperConfig,c=l===void 0?{}:l,f=e.transition,h=hM(),g=h[0],y=h[1],w=hM(),S=w[0],D=w[1],I=EZ(y,t),M=yM(e.container),N=yM(e.target),B=P.useState(!e.show),k=B[0],R=B[1],L=cZ(N,g,bZ({placement:a,enableEvents:!!e.show,containerPadding:i||5,flip:n,offset:r,arrowElement:S,popperConfig:c})),_=L.styles,V=L.attributes,U=Ab(L,["styles","attributes"]);e.show?k&&R(!1):!e.transition&&!k&&R(!0);var Z=function(){R(!0),e.onExited&&e.onExited.apply(e,arguments)},Q=e.show||f&&!k;if(vZ(g,e.onHide,{disabled:!e.rootClose||e.rootCloseDisabled,clickTrigger:e.rootCloseEvent}),!Q)return null;var G=e.children(Pr({},U,{show:!!e.show,props:Pr({},V.popper,{style:_.popper,ref:I}),arrowProps:Pr({},V.arrow,{style:_.arrow,ref:D})}));if(f){var re=e.onExit,de=e.onExiting,fe=e.onEnter,$=e.onEntering,he=e.onEntered;G=ne.createElement(f,{in:e.show,appear:!0,onExit:re,onExiting:de,onExited:Z,onEnter:fe,onEntering:$,onEntered:he},G)}return M?J2.createPortal(G,M):null});mI.displayName="Overlay";mI.propTypes={show:ke.bool,placement:ke.oneOf(X2),target:ke.any,container:ke.any,flip:ke.bool,children:ke.func.isRequired,containerPadding:ke.number,popperConfig:ke.object,rootClose:ke.bool,rootCloseEvent:ke.oneOf(["click","mousedown"]),rootCloseDisabled:ke.bool,onHide:function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a-1}var UZ=HZ,YZ=Pb;function zZ(e,t){var n=this.__data__,r=YZ(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var VZ=zZ,WZ=MZ,$Z=jZ,ZZ=_Z,qZ=UZ,GZ=VZ;function Gp(e){var t=-1,n=e==null?0:e.length;for(this.clear();++tl))return!1;var f=o.get(e),h=o.get(t);if(f&&h)return f==t&&h==e;var g=-1,y=!0,w=n&sJ?new rJ:void 0;for(o.set(e,t),o.set(t,e);++g0&&n(l)?t>1?aF(l,t-1,n,r,a):wte(a,l):r||(a[a.length]=l)}return a}var oF=aF;function Ste(e){return function(t,n,r){for(var a=-1,o=Object(t),i=r(t),l=i.length;l--;){var c=i[e?l:++a];if(n(o[c],c,o)===!1)break}return t}}var Dte=Ste,Tte=Dte,Ite=Tte(),Ete=Ite,Cte=Ete,xte=Jv;function Mte(e,t){return e&&Cte(e,t,xte)}var kI=Mte,kte=Zv;function Nte(e,t){return function(n,r){if(n==null)return n;if(!kte(n))return e(n,r);for(var a=n.length,o=t?a:-1,i=Object(n);(t?o--:++ot||o&&i&&c&&!l&&!f||r&&i&&c||!n&&c||!a)return 1;if(!r&&!o&&!f&&e=l)return c;var f=n[r];return c*(f=="desc"?-1:1)}}return e.index-t.index}var $te=Wte,GS=MI,Zte=Yb,qte=Vb,Gte=Bte,Jte=Ute,Kte=Bb,Qte=$te,Xte=zb,ene=ss;function tne(e,t,n){t.length?t=GS(t,function(o){return ene(o)?function(i){return Zte(i,o.length===1?o[0]:o)}:o}):t=[Xte];var r=-1;t=GS(t,Kte(qte));var a=Gte(e,function(o,i,l){var c=GS(t,function(f){return f(o)});return{criteria:c,index:++r,value:o}});return Jte(a,function(o,i){return Qte(o,i,n)})}var nne=tne;function rne(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var ane=rne,one=ane,JM=Math.max;function ine(e,t,n){return t=JM(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=JM(r.length-t,0),i=Array(o);++a0){if(++t>=mne)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var wne=yne,bne=pne,Sne=wne,Dne=Sne(bne),lF=Dne,Tne=zb,Ine=iF,Ene=lF;function Cne(e,t){return Ene(Ine(e,t,Tne),e+"")}var uF=Cne,xne=oF,Mne=nne,kne=uF,QM=Ob,Nne=kne(function(e,t){if(e==null)return[];var n=t.length;return n>1&&QM(e,t[0],t[1])?t=[]:n>2&&QM(t[0],t[1],t[2])&&(t=[t[0]]),Mne(e,xne(t,1),[])}),Ane=Nne;const Fne=qt(Ane);function HT(e,t){var n=hI(e);return n?n.innerWidth:t?e.clientWidth:gf(e).width}function cF(e){return p9(e)||k9(e)||sI(e)||m9()}function One(e,t){for(var n=-1,r=e==null?0:e.length;++n1),o}),Iie(e,xie(e),n),r&&(n=Sie(n,Mie|kie|Nie,Eie));for(var a=t.length;a--;)Die(n,t[a]);return n}),Fie=Aie;const Oie=qt(Fie);var Pie=uF,jie=$v,Lie=Ob,Rie=Wb,bF=Object.prototype,_ie=bF.hasOwnProperty,Bie=Pie(function(e,t){e=Object(e);var n=-1,r=t.length,a=r>2?t[2]:void 0;for(a&&Lie(t[0],t[1],a)&&(r=1);++n0&&(l=l[0]),c=(l=l.filter(function(h){return h}))[0];for(var f=1;f2?r-2:0),o=2;o2&&arguments[2]!==void 0?arguments[2]:"day",r=e,a=[];Wp(r,t,n);)a.push(r),r=Vs(r,1,n);return a}function vse(e,t){return t==null&&e==null?null:(t==null&&(t=new Date),e==null&&(e=new Date),e=$a(e,"day"),e=hv(e,hv(t)),e=xp(e,xp(t)),e=fv(e,fv(t)),dv(e,dv(t)))}function d3(e){return hv(e)===0&&xp(e)===0&&fv(e)===0&&dv(e)===0}function yse(e,t,n,r){return n==="day"&&(n="date"),Math.abs(nM[n](e,void 0,r)-nM[n](t,void 0,r))}function FI(e,t,n){return!n||n==="milliseconds"?Math.abs(+e-+t):Math.round(Math.abs(+$a(e,n)/c3[n]-+$a(t,n)/c3[n]))}var wse=ke.oneOfType([ke.string,ke.func]);function bse(e,t,n,r,a){var o=typeof r=="function"?r(n,a,e):t.call(e,n,r,a);return ov(o==null||typeof o=="string","`localizer format(..)` must return a string, null, or undefined"),o}function Sse(e,t,n){return new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,t+n,0,0)}function OI(e,t){return e.getTimezoneOffset()-t.getTimezoneOffset()}function Dse(e,t){return FI(e,t,"minutes")+OI(e,t)}function Tse(e){var t=$a(e,"day");return FI(t,e,"minutes")+OI(t,e)}function Ise(e,t){return uI(e,t,"day")}function Ese(e,t,n){var r=Vv(e,t,"minutes");return r?Wv(t,n,"minutes"):Fb(t,n,"minutes")}function UT(e,t){return yse(e,t,"day")}function Cse(e){var t=e.evtA,n=t.start,r=t.end,a=t.allDay,o=e.evtB,i=o.start,l=o.end,c=o.allDay,f=+$a(n,"day")-+$a(i,"day"),h=UT(n,r),g=UT(i,l);return f||g-h||!!c-!!a||+n-+i||+r-+l}function xse(e){var t=e.event,n=t.start,r=t.end,a=e.range,o=a.start,i=a.end,l=$a(n,"day"),c=Wp(l,i,"day"),f=lI(l,r,"minutes"),h=f?Fb(r,o,"minutes"):Wv(r,o,"minutes");return c&&h}function Mse(e,t){return Vv(e,t,"day")}function kse(e,t){return d3(e)&&d3(t)}var Nse=ka(function e(t){var n=this;Ma(this,e),ov(typeof t.format=="function","date localizer `format(..)` must be a function"),ov(typeof t.firstOfWeek=="function","date localizer `firstOfWeek(..)` must be a function"),this.propType=t.propType||wse,this.formats=t.formats,this.format=function(){for(var r=arguments.length,a=new Array(r),o=0;o1,de=I.eventProp(i,Q,Z,l),fe=ne.createElement("div",{className:"rbc-event-content",title:U||void 0},B?ne.createElement(B,{event:i,continuesPrior:w,continuesAfter:S,title:V,isAllDay:G,localizer:y,slotStart:R,slotEnd:L}):V);return ne.createElement(k,Object.assign({},this.props,{type:"date"}),ne.createElement("div",Object.assign({},_,{style:tr(tr({},de.style),a),className:ca("rbc-event",o,de.className,{"rbc-selected":l,"rbc-event-allday":re,"rbc-event-continues-prior":w,"rbc-event-continues-after":S}),onClick:function(he){return f&&f(i,he)},onDoubleClick:function(he){return h&&h(i,he)},onKeyDown:function(he){return g&&g(i,he)}}),typeof M=="function"?M(fe):fe))}}]),t}(ne.Component);function Zb(e,t){return!e||t==null?!1:XQ(e,t)}function IF(e,t){var n=e.right-e.left,r=n/t;return r}function EF(e,t,n,r){var a=IF(e,r);return n?r-1-Math.floor((t-e.left)/a):Math.floor((t-e.left)/a)}function Lse(e,t){var n=t.x,r=t.y;return r>=e.top&&r<=e.bottom&&n>=e.left&&n<=e.right}function Rse(e,t,n,r,a){var o=-1,i=-1,l=r-1,c=IF(t,r),f=EF(t,n.x,a,r),h=t.topn.y,g=t.tope.y,y=e.y>t.bottom,w=t.top>e.y,S=n.topt.bottom;return S&&(o=0,i=l),h&&(w?(o=0,i=f):y&&(o=f,i=l)),g&&(o=i=a?l-Math.floor((e.x-t.left)/c):Math.floor((e.x-t.left)/c),h?fN?i-M-_:i+_+f,U=R>B?l+L-I+c:l+L;return{topOffset:V,leftOffset:U}}function Bse(e){var t=e.containerRef,n=e.accessors,r=e.getters,a=e.selected,o=e.components,i=e.localizer,l=e.position,c=e.show,f=e.events,h=e.slotStart,g=e.slotEnd,y=e.onSelect,w=e.onDoubleClick,S=e.onKeyPress,D=e.handleDragStart,I=e.popperRef,M=e.target,N=e.offset;Pse({ref:I,callback:c}),P.useLayoutEffect(function(){var R=_se({target:M,offset:N,container:t.current,box:I.current}),L=R.topOffset,_=R.leftOffset;I.current.style.top="".concat(L,"px"),I.current.style.left="".concat(_,"px")},[N.x,N.y,M]);var B=l.width,k={minWidth:B+B/2};return ne.createElement("div",{style:k,className:"rbc-overlay",ref:I},ne.createElement("div",{className:"rbc-overlay-header"},i.format(h,"dayHeaderFormat")),f.map(function(R,L){return ne.createElement(TF,{key:L,type:"popup",localizer:i,event:R,getters:r,onSelect:y,accessors:n,components:o,onDoubleClick:w,onKeyPress:S,continuesPrior:i.lt(n.end(R),h,"day"),continuesAfter:i.gte(n.start(R),g,"day"),slotStart:h,slotEnd:g,selected:Zb(R,a),draggable:!0,onDragStart:function(){return D(R)},onDragEnd:function(){return c()}})}))}var CF=ne.forwardRef(function(e,t){return ne.createElement(Bse,Object.assign({},e,{popperRef:t}))});CF.propTypes={accessors:ke.object.isRequired,getters:ke.object.isRequired,selected:ke.object,components:ke.object.isRequired,localizer:ke.object.isRequired,position:ke.object.isRequired,show:ke.func.isRequired,events:ke.array.isRequired,slotStart:ke.instanceOf(Date).isRequired,slotEnd:ke.instanceOf(Date),onSelect:ke.func,onDoubleClick:ke.func,onKeyPress:ke.func,handleDragStart:ke.func,style:ke.object,offset:ke.shape({x:ke.number,y:ke.number})};function Hse(e){var t=e.containerRef,n=e.popupOffset,r=n===void 0?5:n,a=e.overlay,o=e.accessors,i=e.localizer,l=e.components,c=e.getters,f=e.selected,h=e.handleSelectEvent,g=e.handleDoubleClickEvent,y=e.handleKeyPressEvent,w=e.handleDragStart,S=e.onHide,D=e.overlayDisplay,I=P.useRef(null);if(!a.position)return null;var M=r;isNaN(r)||(M={x:r,y:r});var N=a.position,B=a.events,k=a.date,R=a.end;return ne.createElement(CZ,{rootClose:!0,flip:!0,show:!0,placement:"bottom",onHide:S,target:a.target},function(L){var _=L.props;return ne.createElement(CF,Object.assign({},_,{containerRef:t,ref:I,target:a.target,offset:M,accessors:o,getters:c,selected:f,components:l,localizer:i,position:N,show:D,events:B,slotStart:k,slotEnd:R,onSelect:h,onDoubleClick:g,onKeyPress:y,handleDragStart:w}))})}var PI=ne.forwardRef(function(e,t){return ne.createElement(Hse,Object.assign({},e,{containerRef:t}))});PI.propTypes={popupOffset:ke.oneOfType([ke.number,ke.shape({x:ke.number,y:ke.number})]),overlay:ke.shape({position:ke.object,events:ke.array,date:ke.instanceOf(Date),end:ke.instanceOf(Date)}),accessors:ke.object.isRequired,localizer:ke.object.isRequired,components:ke.object.isRequired,getters:ke.object.isRequired,selected:ke.object,handleSelectEvent:ke.func,handleDoubleClickEvent:ke.func,handleKeyPressEvent:ke.func,handleDragStart:ke.func,onHide:ke.func,overlayDisplay:ke.func};function ao(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:document;return _g(n,e,t,{passive:!1})}function Use(e,t,n){return!e||pv(e,document.elementFromPoint(t,n))}function Yse(e,t){var n=t.clientX,r=t.clientY,a=document.elementFromPoint(n,r);return Q9(a,".rbc-event",e)}function zse(e,t){var n=t.clientX,r=t.clientY,a=document.elementFromPoint(n,r);return Q9(a,".rbc-show-more",e)}function qw(e,t){return!!Yse(e,t)}function Vse(e,t){return!!zse(e,t)}function ap(e){var t=e;return e.touches&&e.touches.length&&(t=e.touches[0]),{clientX:t.clientX,clientY:t.clientY,pageX:t.pageX,pageY:t.pageY}}var f3=5,Wse=250,xF=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.global,a=r===void 0?!1:r,o=n.longPressThreshold,i=o===void 0?250:o,l=n.validContainers,c=l===void 0?[]:l;Ma(this,e),this.isDetached=!1,this.container=t,this.globalMouse=!t||a,this.longPressThreshold=i,this.validContainers=c,this._listeners=Object.create(null),this._handleInitialEvent=this._handleInitialEvent.bind(this),this._handleMoveEvent=this._handleMoveEvent.bind(this),this._handleTerminatingEvent=this._handleTerminatingEvent.bind(this),this._keyListener=this._keyListener.bind(this),this._dropFromOutsideListener=this._dropFromOutsideListener.bind(this),this._dragOverFromOutsideListener=this._dragOverFromOutsideListener.bind(this),this._removeTouchMoveWindowListener=ao("touchmove",function(){},window),this._removeKeyDownListener=ao("keydown",this._keyListener),this._removeKeyUpListener=ao("keyup",this._keyListener),this._removeDropFromOutsideListener=ao("drop",this._dropFromOutsideListener),this._removeDragOverFromOutsideListener=ao("dragover",this._dragOverFromOutsideListener),this._addInitialEventListener()}return ka(e,[{key:"on",value:function(n,r){var a=this._listeners[n]||(this._listeners[n]=[]);return a.push(r),{remove:function(){var i=a.indexOf(r);i!==-1&&a.splice(i,1)}}}},{key:"emit",value:function(n){for(var r=arguments.length,a=new Array(r>1?r-1:0),o=1;o0&&arguments[0]!==void 0?arguments[0]:0;return Wu(e)!=="object"&&(e={top:e,left:e,right:e,bottom:e}),e}function h3(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=Mf(e),a=r.top,o=r.left,i=r.right,l=i===void 0?o:i,c=r.bottom,f=c===void 0?a:c,h=Mf(t),g=h.top,y=h.left,w=h.right,S=w===void 0?y:w,D=h.bottom,I=D===void 0?g:D;return!(f-nI||l-nS)}function Mf(e){if(!e.getBoundingClientRect)return e;var t=e.getBoundingClientRect(),n=t.left+p3("left"),r=t.top+p3("top");return{top:r,left:n,right:(e.offsetWidth||0)+n,bottom:(e.offsetHeight||0)+r}}function p3(e){if(e==="left")return window.pageXOffset||document.body.scrollLeft||0;if(e==="top")return window.pageYOffset||document.body.scrollTop||0}var Zse=function(e){Ao(t,e);function t(n,r){var a;return Ma(this,t),a=No(this,t,[n,r]),a.state={selecting:!1},a.containerRef=P.createRef(),a}return ka(t,[{key:"componentDidMount",value:function(){this.props.selectable&&this._selectable()}},{key:"componentWillUnmount",value:function(){this._teardownSelectable()}},{key:"componentDidUpdate",value:function(r){!r.selectable&&this.props.selectable&&this._selectable(),r.selectable&&!this.props.selectable&&this._teardownSelectable()}},{key:"render",value:function(){var r=this.props,a=r.range,o=r.getNow,i=r.getters,l=r.date,c=r.components.dateCellWrapper,f=r.localizer,h=this.state,g=h.selecting,y=h.startIdx,w=h.endIdx,S=o();return ne.createElement("div",{className:"rbc-row-bg",ref:this.containerRef},a.map(function(D,I){var M=g&&I>=y&&I<=w,N=i.dayProp(D),B=N.className,k=N.style;return ne.createElement(c,{key:I,value:D,range:a},ne.createElement("div",{style:k,className:ca("rbc-day-bg",B,M&&"rbc-selected-cell",f.isSameDate(D,S)&&"rbc-today",l&&f.neq(l,D,"month")&&"rbc-off-range-bg")}))}))}},{key:"_selectable",value:function(){var r=this,a=this.containerRef.current,o=this._selector=new xF(this.props.container,{longPressThreshold:this.props.longPressThreshold}),i=function(c,f){if(!qw(a,c)&&!Vse(a,c)){var h=Mf(a),g=r.props,y=g.range,w=g.rtl;if(Lse(h,c)){var S=EF(h,c.x,w,y.length);r._selectSlot({startIdx:S,endIdx:S,action:f,box:c})}}r._initial={},r.setState({selecting:!1})};o.on("selecting",function(l){var c=r.props,f=c.range,h=c.rtl,g=-1,y=-1;if(r.state.selecting||(gr(r.props.onSelectStart,[l]),r._initial={x:l.x,y:l.y}),o.isSelected(a)){var w=Mf(a),S=Rse(r._initial,w,l,f.length,h);g=S.startIdx,y=S.endIdx}r.setState({selecting:!0,startIdx:g,endIdx:y})}),o.on("beforeSelect",function(l){if(r.props.selectable==="ignoreEvents")return!qw(r.containerRef.current,l)}),o.on("click",function(l){return i(l,"click")}),o.on("doubleClick",function(l){return i(l,"doubleClick")}),o.on("select",function(l){r._selectSlot(tr(tr({},r.state),{},{action:"select",bounds:l})),r._initial={},r.setState({selecting:!1}),gr(r.props.onSelectEnd,[r.state])})}},{key:"_teardownSelectable",value:function(){this._selector&&(this._selector.teardown(),this._selector=null)}},{key:"_selectSlot",value:function(r){var a=r.endIdx,o=r.startIdx,i=r.action,l=r.bounds,c=r.box;a!==-1&&o!==-1&&this.props.onSelectSlot&&this.props.onSelectSlot({start:o,end:a,action:i,bounds:l,box:c,resourceId:this.props.resourceId})}}]),t}(ne.Component),Zl={propTypes:{slotMetrics:ke.object.isRequired,selected:ke.object,isAllDay:ke.bool,accessors:ke.object.isRequired,localizer:ke.object.isRequired,components:ke.object.isRequired,getters:ke.object.isRequired,onSelect:ke.func,onDoubleClick:ke.func,onKeyPress:ke.func},defaultProps:{segments:[],selected:{}},renderEvent:function(t,n){var r=t.selected;t.isAllDay;var a=t.accessors,o=t.getters,i=t.onSelect,l=t.onDoubleClick,c=t.onKeyPress,f=t.localizer,h=t.slotMetrics,g=t.components,y=t.resizable,w=h.continuesPrior(n),S=h.continuesAfter(n);return ne.createElement(TF,{event:n,getters:o,localizer:f,accessors:a,components:g,onSelect:i,onDoubleClick:l,onKeyPress:c,continuesPrior:w,continuesAfter:S,slotStart:h.first,slotEnd:h.last,selected:Zb(n,r),resizable:y})},renderSpan:function(t,n,r){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:" ",o=Math.abs(n)/t*100+"%";return ne.createElement("div",{key:r,className:"rbc-row-segment",style:{WebkitFlexBasis:o,flexBasis:o,maxWidth:o}},a)}},MF=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this,a=this.props,o=a.segments,i=a.slotMetrics.slots,l=a.className,c=1;return ne.createElement("div",{className:ca(l,"rbc-row")},o.reduce(function(f,h,g){var y=h.event,w=h.left,S=h.right,D=h.span,I="_lvl_"+g,M=w-c,N=Zl.renderEvent(r.props,y);return M&&f.push(Zl.renderSpan(i,M,"".concat(I,"_gap"))),f.push(Zl.renderSpan(i,D,I,N)),c=S+1,f},[]))}}]),t}(ne.Component);MF.defaultProps=tr({},Zl.defaultProps);function kF(e){var t=e.dateRange,n=e.unit,r=n===void 0?"day":n,a=e.localizer;return{first:t[0],last:a.add(t[t.length-1],1,r)}}function qse(e,t,n,r){var a=kF({dateRange:t,localizer:r}),o=a.first,i=a.last,l=r.diff(o,i,"day"),c=r.max(r.startOf(n.start(e),"day"),o),f=r.min(r.ceil(n.end(e),"day"),i),h=ete(t,function(y){return r.isSameDate(y,c)}),g=r.diff(c,f,"day");return g=Math.min(g,l),g=Math.max(g-r.segmentOffset,1),{event:e,span:g,left:h+1,right:Math.max(h+g,1)}}function NF(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1/0,n,r,a,o=[],i=[];for(n=0;n=t?i.push(a):(o[r]||(o[r]=[])).push(a)}for(n=0;n=e.left})}function Jse(e,t,n){var r=fw(e),a=[],o=[];r.forEach(function(c){var f=t.start(c),h=t.end(c);n.daySpan(f,h)>1?a.push(c):o.push(c)});var i=a.sort(function(c,f){return YT(c,f,t,n)}),l=o.sort(function(c,f){return YT(c,f,t,n)});return[].concat(fw(i),fw(l))}function YT(e,t,n,r){var a={start:n.start(e),end:n.end(e),allDay:n.allDay(e)},o={start:n.start(t),end:n.end(t),allDay:n.allDay(t)};return r.sortEvents({evtA:a,evtB:o})}var AF=function(t,n){return t.left<=n&&t.right>=n},m3=function(t,n){return t.filter(function(r){return AF(r,n)}).map(function(r){return r.event})},FF=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){for(var r=this.props,a=r.segments,o=r.slotMetrics.slots,i=NF(a).levels[0],l=1,c=1,f=[];l<=o;){var h="_lvl_"+l,g=i.filter(function(N){return AF(N,l)})[0]||{},y=g.event,w=g.left,S=g.right,D=g.span;if(!y){l++;continue}var I=Math.max(0,w-c);if(this.canRenderSlotEvent(w,D)){var M=Zl.renderEvent(this.props,y);I&&f.push(Zl.renderSpan(o,I,h+"_gap")),f.push(Zl.renderSpan(o,D,h,M)),c=l=S+1}else I&&f.push(Zl.renderSpan(o,I,h+"_gap")),f.push(Zl.renderSpan(o,1,h,this.renderShowMore(a,l))),c=l+=1}return ne.createElement("div",{className:"rbc-row"},f)}},{key:"canRenderSlotEvent",value:function(r,a){var o=this.props.segments;return fte(r,r+a).every(function(i){var l=m3(o,i).length;return l===1})}},{key:"renderShowMore",value:function(r,a){var o=this,i=this.props,l=i.localizer,c=i.slotMetrics,f=c.getEventsForSlot(a),h=m3(r,a),g=h.length;return g?ne.createElement("button",{type:"button",key:"sm_"+a,className:ca("rbc-button-link","rbc-show-more"),onClick:function(w){return o.showMore(a,w)}},l.messages.showMore(g,h,f)):!1}},{key:"showMore",value:function(r,a){a.preventDefault(),a.stopPropagation(),this.props.onShowMore(r,a.target)}}]),t}(ne.Component);FF.defaultProps=tr({},Zl.defaultProps);var Kse=function(t){var n=t.children;return ne.createElement("div",{className:"rbc-row-content-scroll-container"},n)},Qse=function(t,n){return t.left<=n&&t.right>=n},Xse=function(t,n){return t[0].range===n[0].range&&t[0].events===n[0].events};function OF(){return rF(function(e){for(var t=e.range,n=e.events,r=e.maxRows,a=e.minRows,o=e.accessors,i=e.localizer,l=kF({dateRange:t,localizer:i}),c=l.first,f=l.last,h=n.map(function(D){return qse(D,t,o,i)}),g=NF(h,Math.max(r-1,1)),y=g.levels,w=g.extra,S=w.length>0?a-1:a;y.length1&&arguments[1]!==void 0?arguments[1]:0;if(o.lt(k,t,"minutes"))return y[0];if(o.gt(k,n,"minutes"))return y[y.length-1];var L=o.diff(t,k,"minutes");return y[(L-L%r)/r+R]},startsBeforeDay:function(k){return o.lt(k,t,"day")},startsAfterDay:function(k){return o.gt(k,n,"day")},startsBefore:function(k){return o.lt(o.merge(t,k),t,"minutes")},startsAfter:function(k){return o.gt(o.merge(n,k),n,"minutes")},getRange:function(k,R,L,_){L||(k=o.min(n,o.max(t,k))),_||(R=o.min(n,o.max(t,R)));var V=N(k),U=N(R),Z=U>r*h&&!o.eq(n,R)?(V-r)/(r*h)*100:V/(r*h)*100;return{top:Z,height:U/(r*h)*100-Z,start:N(k),startDate:k,end:N(R),endDate:R}},getCurrentTimePosition:function(k){var R=N(k),L=R/(r*h)*100;return L}}}var rle=function(){function e(t,n){var r=n.accessors,a=n.slotMetrics;Ma(this,e);var o=a.getRange(r.start(t),r.end(t)),i=o.start,l=o.startDate,c=o.end,f=o.endDate,h=o.top,g=o.height;this.start=i,this.end=c,this.startMs=+l,this.endMs=+f,this.top=h,this.height=g,this.data=t}return ka(e,[{key:"_width",get:function(){if(this.rows){var n=this.rows.reduce(function(a,o){return Math.max(a,o.leaves.length+1)},0)+1;return 100/n}if(this.leaves){var r=100-this.container._width;return r/(this.leaves.length+1)}return this.row._width}},{key:"width",get:function(){var n=this._width,r=Math.min(100,this._width*1.7);if(this.rows)return r;if(this.leaves)return this.leaves.length>0?r:n;var a=this.row.leaves,o=a.indexOf(this);return o===a.length-1?n:r}},{key:"xOffset",get:function(){if(this.rows)return 0;if(this.leaves)return this.container._width;var n=this.row,r=n.leaves,a=n.xOffset,o=n._width,i=r.indexOf(this)+1;return a+i*o}}]),e}();function ale(e,t,n){return Math.abs(t.start-e.start)e.start&&t.start0;){var r=t.shift();n.push(r);for(var a=0;ao.startMs)){if(a>0){var i=t.splice(a,1)[0];n.push(i)}break}}}return n}function jF(e){for(var t=e.events,n=e.minimumStartDifference,r=e.slotMetrics,a=e.accessors,o=t.map(function(h){return new rle(h,{slotMetrics:r,accessors:a})}),i=ole(o),l=[],c=function(){var g=i[f],y=l.find(function(D){return D.end>g.start||Math.abs(g.start-D.start)=0;S--)ale(y.rows[S],g,n)&&(w=y.rows[S]);w?(w.leaves.push(g),g.row=w):(g.leaves=[],y.rows.push(g))},f=0;f-1)){t=t>e.friends[r].idx?t:e.friends[r].idx,n.push(e.friends[r]);var a=LF(e.friends[r],t,n);t=t>a?t:a}return t}function ile(e){var t=e.events,n=e.minimumStartDifference,r=e.slotMetrics,a=e.accessors,o=jF({events:t,minimumStartDifference:n,slotMetrics:r,accessors:a});o.sort(function(fe,$){return fe=fe.style,$=$.style,fe.top!==$.top?fe.top>$.top?1:-1:fe.height!==$.height?fe.top+fe.height<$.top+$.height?1:-1:0});for(var i=0;i=f&&S<=h||S>f&&S<=h||w>=f&&wre?Q:re}Q<=Z.idx&&(Z.size=100-Z.idx*Z.size);var de=Z.idx===0?0:3;Z.style.width="calc(".concat(Z.size,"% - ").concat(de,"px)"),Z.style.height="calc(".concat(Z.style.height,"% - 2px)"),Z.style.xOffset="calc(".concat(Z.style.left,"% + ").concat(de,"px)")}return o}var v3={overlap:jF,"no-overlap":ile};function sle(e){return!!(e&&e.constructor&&e.call&&e.apply)}function lle(e){e.events,e.minimumStartDifference,e.slotMetrics,e.accessors;var t=e.dayLayoutAlgorithm,n=t;return t in v3&&(n=v3[t]),sle(n)?n.apply(this,arguments):[]}var RF=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.renderSlot,o=r.resource,i=r.group,l=r.getters,c=r.components,f=c===void 0?{}:c,h=f.timeSlotWrapper,g=h===void 0?Ru:h,y=l?l.slotGroupProp(i):{};return ne.createElement("div",Object.assign({className:"rbc-timeslot-group"},y),i.map(function(w,S){var D=l?l.slotProp(w,o):{};return ne.createElement(g,{key:S,value:w,resource:o},ne.createElement("div",Object.assign({},D,{className:ca("rbc-time-slot",D.className)}),a&&a(w,S)))}))}}]),t}(P.Component);function P0(e){return typeof e=="string"?e:e+"%"}function ule(e){var t=e.style,n=e.className,r=e.event,a=e.accessors,o=e.rtl,i=e.selected,l=e.label,c=e.continuesPrior,f=e.continuesAfter,h=e.getters,g=e.onClick,y=e.onDoubleClick,w=e.isBackgroundEvent,S=e.onKeyPress,D=e.components,I=D.event,M=D.eventWrapper,N=a.title(r),B=a.tooltip(r),k=a.end(r),R=a.start(r),L=h.eventProp(r,R,k,i),_=[ne.createElement("div",{key:"1",className:"rbc-event-label"},l),ne.createElement("div",{key:"2",className:"rbc-event-content"},I?ne.createElement(I,{event:r,title:N}):N)],V=t.height,U=t.top,Z=t.width,Q=t.xOffset,G=tr(tr({},L.style),{},lf({top:P0(U),height:P0(V),width:P0(Z)},o?"right":"left",P0(Q)));return ne.createElement(M,Object.assign({type:"time"},e),ne.createElement("div",{role:"button",tabIndex:0,onClick:g,onDoubleClick:y,style:G,onKeyDown:S,title:B?(typeof l=="string"?l+": ":"")+B:void 0,className:ca(w?"rbc-background-event":"rbc-event",n,L.className,{"rbc-selected":i,"rbc-event-continues-earlier":c,"rbc-event-continues-later":f})},_))}var cle=function(t){var n=t.children,r=t.className,a=t.style,o=t.innerRef;return ne.createElement("div",{className:r,style:a,ref:o},n)},dle=ne.forwardRef(function(e,t){return ne.createElement(cle,Object.assign({},e,{innerRef:t}))}),fle=["dayProp"],hle=["eventContainerWrapper"],_F=function(e){Ao(t,e);function t(){var n;Ma(this,t);for(var r=arguments.length,a=new Array(r),o=0;o0&&arguments[0]!==void 0?arguments[0]:!1;!this.intervalTriggered&&!a&&this.positionTimeIndicator(),this._timeIndicatorTimeout=window.setTimeout(function(){r.intervalTriggered=!0,r.positionTimeIndicator(),r.setTimeIndicatorPositionUpdateInterval()},6e4)}},{key:"clearTimeIndicatorInterval",value:function(){this.intervalTriggered=!1,window.clearTimeout(this._timeIndicatorTimeout)}},{key:"positionTimeIndicator",value:function(){var r=this.props,a=r.min,o=r.max,i=r.getNow,l=i();if(l>=a&&l<=o){var c=this.slotMetrics.getCurrentTimePosition(l);this.intervalTriggered=!0,this.setState({timeIndicatorPosition:c})}else this.clearTimeIndicatorInterval()}},{key:"render",value:function(){var r=this.props,a=r.date,o=r.max,i=r.rtl,l=r.isNow,c=r.resource,f=r.accessors,h=r.localizer,g=r.getters,y=g.dayProp,w=tu(g,fle),S=r.components,D=S.eventContainerWrapper,I=tu(S,hle),M=this.slotMetrics,N=this.state,B=N.selecting,k=N.top,R=N.height,L=N.startDate,_=N.endDate,V={start:L,end:_},U=y(o),Z=U.className,Q=U.style,G=I.dayColumnWrapper||dle;return ne.createElement(G,{ref:this.containerRef,date:a,style:Q,className:ca(Z,"rbc-day-slot","rbc-time-column",l&&"rbc-now",l&&"rbc-today",B&&"rbc-slot-selecting"),slotMetrics:M},M.groups.map(function(re,de){return ne.createElement(RF,{key:de,group:re,resource:c,getters:w,components:I})}),ne.createElement(D,{localizer:h,resource:c,accessors:f,getters:w,components:I,slotMetrics:M},ne.createElement("div",{className:ca("rbc-events-container",i&&"rtl")},this.renderEvents({events:this.props.backgroundEvents,isBackgroundEvent:!0}),this.renderEvents({events:this.props.events}))),B&&ne.createElement("div",{className:"rbc-slot-selection",style:{top:k,height:R}},ne.createElement("span",null,h.format(V,"selectRangeFormat"))),l&&this.intervalTriggered&&ne.createElement("div",{className:"rbc-current-time-indicator",style:{top:"".concat(this.state.timeIndicatorPosition,"%")}}))}}]),t}(ne.Component);_F.defaultProps={dragThroughEvents:!0,timeslots:2};function ple(e){var t=e.min,n=e.max,r=e.localizer;return r.getTimezoneOffset(t)!==r.getTimezoneOffset(n)?{start:r.add(t,-1,"day"),end:r.add(n,-1,"day")}:{start:t,end:n}}var mle=function(t){var n=t.min,r=t.max,a=t.timeslots,o=t.step,i=t.localizer,l=t.getNow,c=t.resource,f=t.components,h=t.getters,g=t.gutterRef,y=f.timeGutterWrapper,w=P.useMemo(function(){return ple({min:n,max:r,localizer:i})},[n==null?void 0:n.toISOString(),r==null?void 0:r.toISOString(),i]),S=w.start,D=w.end,I=P.useState(jI({min:S,max:D,timeslots:a,step:o,localizer:i})),M=_u(I,2),N=M[0],B=M[1];P.useEffect(function(){N&&B(N.update({min:S,max:D,timeslots:a,step:o,localizer:i}))},[S==null?void 0:S.toISOString(),D==null?void 0:D.toISOString(),a,o]);var k=P.useCallback(function(R,L){if(L)return null;var _=N.dateIsInGroup(l(),L);return ne.createElement("span",{className:ca("rbc-label",_&&"rbc-now")},i.format(R,"timeGutterFormat"))},[N,i,l]);return ne.createElement(y,{slotMetrics:N},ne.createElement("div",{className:"rbc-time-gutter rbc-time-column",ref:g},N.groups.map(function(R,L){return ne.createElement(RF,{key:L,group:R,resource:c,components:f,renderSlot:k,getters:h})})))},gle=ne.forwardRef(function(e,t){return ne.createElement(mle,Object.assign({gutterRef:t},e))}),vle=function(t){var n=t.label;return ne.createElement(ne.Fragment,null,n)},yle=function(e){Ao(t,e);function t(){var n;Ma(this,t);for(var r=arguments.length,a=new Array(r),o=0;oa.clientHeight;r.state.isOverflowing!==o&&(r._updatingOverflow=!0,r.setState({isOverflowing:o},function(){r._updatingOverflow=!1}))}}},r.memoizedResources=rF(function(a,o){return wle(a,o)}),r.state={gutterWidth:void 0,isOverflowing:null},r.scrollRef=ne.createRef(),r.contentRef=ne.createRef(),r.containerRef=ne.createRef(),r._scrollRatio=null,r.gutterRef=P.createRef(),r}return ka(t,[{key:"getSnapshotBeforeUpdate",value:function(){return this.checkOverflow(),null}},{key:"componentDidMount",value:function(){this.props.width==null&&this.measureGutter(),this.calculateScroll(),this.applyScroll(),window.addEventListener("resize",this.handleResize)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("resize",this.handleResize),dM(this.rafHandle),this.measureGutterAnimationFrameRequest&&window.cancelAnimationFrame(this.measureGutterAnimationFrameRequest)}},{key:"componentDidUpdate",value:function(){this.applyScroll()}},{key:"renderEvents",value:function(r,a,o,i){var l=this,c=this.props,f=c.min,h=c.max,g=c.components,y=c.accessors,w=c.localizer,S=c.dayLayoutAlgorithm,D=this.memoizedResources(this.props.resources,y),I=D.groupEvents(a),M=D.groupEvents(o);return D.map(function(N,B){var k=_u(N,2),R=k[0],L=k[1];return r.map(function(_,V){var U=(I.get(R)||[]).filter(function(Q){return w.inRange(_,y.start(Q),y.end(Q),"day")}),Z=(M.get(R)||[]).filter(function(Q){return w.inRange(_,y.start(Q),y.end(Q),"day")});return ne.createElement(_F,Object.assign({},l.props,{localizer:w,min:w.merge(_,f),max:w.merge(_,h),resource:L&&R,components:g,isNow:w.isSameDate(_,i),key:B+"-"+V,date:_,events:U,backgroundEvents:Z,dayLayoutAlgorithm:S}))})})}},{key:"render",value:function(){var r,a=this.props,o=a.events,i=a.backgroundEvents,l=a.range,c=a.width,f=a.rtl,h=a.selected,g=a.getNow,y=a.resources,w=a.components,S=a.accessors,D=a.getters,I=a.localizer,M=a.min,N=a.max,B=a.showMultiDayTimes,k=a.longPressThreshold,R=a.resizable;c=c||this.state.gutterWidth;var L=l[0],_=l[l.length-1];this.slots=l.length;var V=[],U=[],Z=[];return o.forEach(function(Q){if(mv(Q,L,_,S,I)){var G=S.start(Q),re=S.end(Q);S.allDay(Q)||I.startAndEndAreDateOnly(G,re)||!B&&!I.isSameDate(G,re)?V.push(Q):U.push(Q)}}),i.forEach(function(Q){mv(Q,L,_,S,I)&&Z.push(Q)}),V.sort(function(Q,G){return YT(Q,G,S,I)}),ne.createElement("div",{className:ca("rbc-time-view",y&&"rbc-time-view-resources"),ref:this.containerRef},ne.createElement(yle,{range:l,events:V,width:c,rtl:f,getNow:g,localizer:I,selected:h,allDayMaxRows:this.props.showAllEvents?1/0:(r=this.props.allDayMaxRows)!==null&&r!==void 0?r:1/0,resources:this.memoizedResources(y,S),selectable:this.props.selectable,accessors:S,getters:D,components:w,scrollRef:this.scrollRef,isOverflowing:this.state.isOverflowing,longPressThreshold:k,onSelectSlot:this.handleSelectAllDaySlot,onSelectEvent:this.handleSelectEvent,onShowMore:this.handleShowMore,onDoubleClickEvent:this.props.onDoubleClickEvent,onKeyPressEvent:this.props.onKeyPressEvent,onDrillDown:this.props.onDrillDown,getDrilldownView:this.props.getDrilldownView,resizable:R}),this.props.popup&&this.renderOverlay(),ne.createElement("div",{ref:this.contentRef,className:"rbc-time-content",onScroll:this.handleScroll},ne.createElement(gle,{date:L,ref:this.gutterRef,localizer:I,min:I.merge(L,M),max:I.merge(L,N),step:this.props.step,getNow:this.props.getNow,timeslots:this.props.timeslots,components:w,className:"rbc-time-gutter",getters:D}),this.renderEvents(l,U,Z,g())))}},{key:"renderOverlay",value:function(){var r,a,o=this,i=(r=(a=this.state)===null||a===void 0?void 0:a.overlay)!==null&&r!==void 0?r:{},l=this.props,c=l.accessors,f=l.localizer,h=l.components,g=l.getters,y=l.selected,w=l.popupOffset,S=l.handleDragStart,D=function(){return o.setState({overlay:null})};return ne.createElement(PI,{overlay:i,accessors:c,localizer:f,components:h,getters:g,selected:y,popupOffset:w,ref:this.containerRef,handleKeyPressEvent:this.handleKeyPressEvent,handleSelectEvent:this.handleSelectEvent,handleDoubleClickEvent:this.handleDoubleClickEvent,handleDragStart:S,show:!!i.position,overlayDisplay:this.overlayDisplay,onHide:D})}},{key:"clearSelection",value:function(){clearTimeout(this._selectTimer),this._pendingSelection=[]}},{key:"measureGutter",value:function(){var r=this;this.measureGutterAnimationFrameRequest&&window.cancelAnimationFrame(this.measureGutterAnimationFrameRequest),this.measureGutterAnimationFrameRequest=window.requestAnimationFrame(function(){var a,o=(a=r.gutterRef)!==null&&a!==void 0&&a.current?HT(r.gutterRef.current):void 0;o&&r.state.gutterWidth!==o&&r.setState({gutterWidth:o})})}},{key:"applyScroll",value:function(){if(this._scrollRatio!=null&&this.props.enableAutoScroll===!0){var r=this.contentRef.current;r.scrollTop=r.scrollHeight*this._scrollRatio,this._scrollRatio=null}}},{key:"calculateScroll",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props,a=r.min,o=r.max,i=r.scrollToTime,l=r.localizer,c=l.diff(l.merge(i,a),i,"milliseconds"),f=l.diff(a,o,"milliseconds");this._scrollRatio=c/f}}]),t}(P.Component);em.defaultProps={step:30,timeslots:2};var ble=["date","localizer","min","max","scrollToTime","enableAutoScroll"],Gb=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.date,o=r.localizer,i=r.min,l=i===void 0?o.startOf(new Date,"day"):i,c=r.max,f=c===void 0?o.endOf(new Date,"day"):c,h=r.scrollToTime,g=h===void 0?o.startOf(new Date,"day"):h,y=r.enableAutoScroll,w=y===void 0?!0:y,S=tu(r,ble),D=t.range(a,{localizer:o});return ne.createElement(em,Object.assign({},S,{range:D,eventOffset:10,localizer:o,min:l,max:f,scrollToTime:g,enableAutoScroll:w}))}}]),t}(ne.Component);Gb.range=function(e,t){var n=t.localizer;return[n.startOf(e,"day")]};Gb.navigate=function(e,t,n){var r=n.localizer;switch(t){case ri.PREVIOUS:return r.add(e,-1,"day");case ri.NEXT:return r.add(e,1,"day");default:return e}};Gb.title=function(e,t){var n=t.localizer;return n.format(e,"dayHeaderFormat")};var Sle=["date","localizer","min","max","scrollToTime","enableAutoScroll"],ed=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.date,o=r.localizer,i=r.min,l=i===void 0?o.startOf(new Date,"day"):i,c=r.max,f=c===void 0?o.endOf(new Date,"day"):c,h=r.scrollToTime,g=h===void 0?o.startOf(new Date,"day"):h,y=r.enableAutoScroll,w=y===void 0?!0:y,S=tu(r,Sle),D=t.range(a,this.props);return ne.createElement(em,Object.assign({},S,{range:D,eventOffset:15,localizer:o,min:l,max:f,scrollToTime:g,enableAutoScroll:w}))}}]),t}(ne.Component);ed.defaultProps=em.defaultProps;ed.navigate=function(e,t,n){var r=n.localizer;switch(t){case ri.PREVIOUS:return r.add(e,-1,"week");case ri.NEXT:return r.add(e,1,"week");default:return e}};ed.range=function(e,t){var n=t.localizer,r=n.startOfWeek(),a=n.startOf(e,"week",r),o=n.endOf(e,"week",r);return n.range(a,o)};ed.title=function(e,t){var n=t.localizer,r=ed.range(e,{localizer:n}),a=cF(r),o=a[0],i=a.slice(1);return n.format({start:o,end:i.pop()},"dayRangeHeaderFormat")};var Dle=["date","localizer","min","max","scrollToTime","enableAutoScroll"];function LI(e,t){return ed.range(e,t).filter(function(n){return[6,0].indexOf(n.getDay())===-1})}var Xv=function(e){Ao(t,e);function t(){return Ma(this,t),No(this,t,arguments)}return ka(t,[{key:"render",value:function(){var r=this.props,a=r.date,o=r.localizer,i=r.min,l=i===void 0?o.startOf(new Date,"day"):i,c=r.max,f=c===void 0?o.endOf(new Date,"day"):c,h=r.scrollToTime,g=h===void 0?o.startOf(new Date,"day"):h,y=r.enableAutoScroll,w=y===void 0?!0:y,S=tu(r,Dle),D=LI(a,this.props);return ne.createElement(em,Object.assign({},S,{range:D,eventOffset:15,localizer:o,min:l,max:f,scrollToTime:g,enableAutoScroll:w}))}}]),t}(ne.Component);Xv.defaultProps=em.defaultProps;Xv.range=LI;Xv.navigate=ed.navigate;Xv.title=function(e,t){var n=t.localizer,r=LI(e,{localizer:n}),a=cF(r),o=a[0],i=a.slice(1);return n.format({start:o,end:i.pop()},"dayRangeHeaderFormat")};function td(e){var t=e.accessors,n=e.components,r=e.date,a=e.events,o=e.getters,i=e.length,l=e.localizer,c=e.onDoubleClickEvent,f=e.onSelectEvent,h=e.selected,g=P.useRef(null),y=P.useRef(null),w=P.useRef(null),S=P.useRef(null),D=P.useRef(null);P.useEffect(function(){N()});var I=function(_,V,U){var Z=n.event,Q=n.date;return V=V.filter(function(G){return mv(G,l.startOf(_,"day"),l.endOf(_,"day"),t,l)}),V.map(function(G,re){var de=t.title(G),fe=t.end(G),$=t.start(G),he=o.eventProp(G,$,fe,Zb(G,h)),se=re===0&&l.format(_,"agendaDateFormat"),ue=re===0?ne.createElement("td",{rowSpan:V.length,className:"rbc-agenda-date-cell"},Q?ne.createElement(Q,{day:_,label:se}):se):!1;return ne.createElement("tr",{key:U+"_"+re,className:he.className,style:he.style},ue,ne.createElement("td",{className:"rbc-agenda-time-cell"},M(_,G)),ne.createElement("td",{className:"rbc-agenda-event-cell",onClick:function(oe){return f&&f(G,oe)},onDoubleClick:function(oe){return c&&c(G,oe)}},Z?ne.createElement(Z,{event:G,title:de}):de))},[])},M=function(_,V){var U="",Z=n.time,Q=l.messages.allDay,G=t.end(V),re=t.start(V);return t.allDay(V)||(l.eq(re,G)?Q=l.format(re,"agendaTimeFormat"):l.isSameDate(re,G)?Q=l.format({start:re,end:G},"agendaTimeRangeFormat"):l.isSameDate(_,re)?Q=l.format(re,"agendaTimeFormat"):l.isSameDate(_,G)&&(Q=l.format(G,"agendaTimeFormat"))),l.gt(_,re,"day")&&(U="rbc-continues-prior"),l.lt(_,G,"day")&&(U+=" rbc-continues-after"),ne.createElement("span",{className:U.trim()},Z?ne.createElement(Z,{event:V,day:_,label:Q}):Q)},N=function(){if(D.current){var _=g.current,V=D.current.firstChild;if(V){var U=S.current.scrollHeight>S.current.clientHeight,Z=[],Q=Z;Z=[HT(V.children[0]),HT(V.children[1])],(Q[0]!==Z[0]||Q[1]!==Z[1])&&(y.current.style.width=Z[0]+"px",w.current.style.width=Z[1]+"px"),U?(DZ(_,"rbc-header-overflowing"),_.style.marginRight=H9()+"px"):TZ(_,"rbc-header-overflowing")}}},B=l.messages,k=l.add(r,i,"day"),R=l.range(r,k,"day");return a=a.filter(function(L){return mv(L,l.startOf(r,"day"),l.endOf(k,"day"),t,l)}),a.sort(function(L,_){return+t.start(L)-+t.start(_)}),ne.createElement("div",{className:"rbc-agenda-view"},a.length!==0?ne.createElement(ne.Fragment,null,ne.createElement("table",{ref:g,className:"rbc-agenda-table"},ne.createElement("thead",null,ne.createElement("tr",null,ne.createElement("th",{className:"rbc-header",ref:y},B.date),ne.createElement("th",{className:"rbc-header",ref:w},B.time),ne.createElement("th",{className:"rbc-header"},B.event)))),ne.createElement("div",{className:"rbc-agenda-content",ref:S},ne.createElement("table",{className:"rbc-agenda-table"},ne.createElement("tbody",{ref:D},R.map(function(L,_){return I(L,a,_)}))))):ne.createElement("span",{className:"rbc-agenda-empty"},B.noEventsInRange))}td.defaultProps={length:30};td.range=function(e,t){var n=t.length,r=n===void 0?td.defaultProps.length:n,a=t.localizer,o=a.add(e,r,"day");return{start:e,end:o}};td.navigate=function(e,t,n){var r=n.length,a=r===void 0?td.defaultProps.length:r,o=n.localizer;switch(t){case ri.PREVIOUS:return o.add(e,-a,"day");case ri.NEXT:return o.add(e,a,"day");default:return e}};td.title=function(e,t){var n=t.length,r=n===void 0?td.defaultProps.length:n,a=t.localizer,o=a.add(e,r,"day");return a.format({start:e,end:o},"agendaHeaderFormat")};var pw=lf(lf(lf(lf(lf({},Mo.MONTH,qb),Mo.WEEK,ed),Mo.WORK_WEEK,Xv),Mo.DAY,Gb),Mo.AGENDA,td),Tle=["action","date","today"];function Ile(e,t){var n=t.action,r=t.date,a=t.today,o=tu(t,Tle);switch(e=typeof e=="string"?pw[e]:e,n){case ri.TODAY:r=a||new Date;break;case ri.DATE:break;default:ov(e&&typeof e.navigate=="function","Calendar View components must implement a static `.navigate(date, action)` method.s"),r=e.navigate(r,n,o)}return r}var Ele=function(e){Ao(t,e);function t(){var n;Ma(this,t);for(var r=arguments.length,a=new Array(r),o=0;o1)return o.map(function(l){return ne.createElement("button",{type:"button",key:l,className:ca({"rbc-active":i===l}),onClick:a.view.bind(null,l)},r[l])})}}]),t}(ne.Component);function Cle(e,t){var n=null;return typeof t=="function"?n=t(e):typeof t=="string"&&Wu(e)==="object"&&e!=null&&t in e&&(n=e[t]),n}var Vc=function(t){return function(n){return Cle(n,t)}},xle=["view","date","getNow","onNavigate"],Mle=["view","toolbar","events","backgroundEvents","style","className","elementProps","date","getNow","length","showMultiDayTimes","onShowMore","doShowMoreDrillDown","components","formats","messages","culture"];function BF(e){if(Array.isArray(e))return e;for(var t=[],n=0,r=Object.entries(e);n0&&arguments[0]!==void 0?arguments[0]:null,De=arguments.length>1?arguments[1]:void 0,je=Wc(De);return je?e(oe).startOf(je).toDate():e(oe).toDate()}function l(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,De=arguments.length>1?arguments[1]:void 0,je=Wc(De);return je?e(oe).endOf(je).toDate():e(oe).toDate()}function c(oe,De,je){var Re=o(oe,De,je),Fe=_u(Re,3),Be=Fe[0],Xe=Fe[1],Ze=Fe[2];return Be.isSame(Xe,Ze)}function f(oe,De,je){return!c(oe,De,je)}function h(oe,De,je){var Re=o(oe,De,je),Fe=_u(Re,3),Be=Fe[0],Xe=Fe[1],Ze=Fe[2];return Be.isAfter(Xe,Ze)}function g(oe,De,je){var Re=o(oe,De,je),Fe=_u(Re,3),Be=Fe[0],Xe=Fe[1],Ze=Fe[2];return Be.isBefore(Xe,Ze)}function y(oe,De,je){var Re=o(oe,De,je),Fe=_u(Re,3),Be=Fe[0],Xe=Fe[1],Ze=Fe[2];return Be.isSameOrBefore(Xe,Ze)}function w(oe,De,je){var Re=o(oe,De,je),Fe=_u(Re,3),Be=Fe[0],Xe=Fe[1],Ze=Fe[2];return Be.isSameOrBefore(Xe,Ze)}function S(oe,De,je){var Re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"day",Fe=Wc(Re),Be=e(oe),Xe=e(De),Ze=e(je);return Be.isBetween(Xe,Ze,Fe,"[]")}function D(oe,De){var je=e(oe),Re=e(De),Fe=e.min(je,Re);return Fe.toDate()}function I(oe,De){var je=e(oe),Re=e(De),Fe=e.max(je,Re);return Fe.toDate()}function M(oe,De){if(!oe&&!De)return null;var je=e(De).format("HH:mm:ss"),Re=e(oe).startOf("day").format("MM/DD/YYYY");return e("".concat(Re," ").concat(je),"MM/DD/YYYY HH:mm:ss").toDate()}function N(oe,De,je){var Re=Wc(je);return e(oe).add(De,Re).toDate()}function B(oe,De){for(var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",Re=Wc(je),Fe=e(oe).toDate(),Be=[];w(Fe,De);)Be.push(Fe),Fe=N(Fe,1,Re);return Be}function k(oe,De){var je=Wc(De),Re=i(oe,je);return c(Re,oe)?Re:N(Re,1,je)}function R(oe,De){var je=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"day",Re=Wc(je),Fe=e(oe),Be=e(De);return Be.diff(Fe,Re)}function L(oe){var De=e(oe);return De.minutes()}function _(oe){var De=oe?e.localeData(oe):e.localeData();return De?De.firstDayOfWeek():0}function V(oe){return e(oe).startOf("month").startOf("week").toDate()}function U(oe){return e(oe).endOf("month").endOf("week").toDate()}function Z(oe){for(var De=V(oe),je=U(oe),Re=[];w(De,je);)Re.push(De),De=N(De,1,"d");return Re}function Q(oe,De,je){return e(oe).startOf("day").minute(De+je).toDate()}function G(oe,De){return R(oe,De,"minutes")}function re(oe){var De=e(oe).startOf("day"),je=e(oe);return je.diff(De,"minutes")+a(oe)}function de(oe,De){var je=e(oe),Re=e(De);return je.isBefore(Re,"day")}function fe(oe,De,je){var Re=e(De),Fe=e(je);return Re.isSameOrAfter(Fe,"minutes")}function $(oe,De){var je=e(oe),Re=e(De),Fe=e.duration(Re.diff(je));return Fe.days()}function he(oe){var De=oe.evtA,je=De.start,Re=De.end,Fe=De.allDay,Be=oe.evtB,Xe=Be.start,Ze=Be.end,st=Be.allDay,Ct=+i(je,"day")-+i(Xe,"day"),tn=$(je,Re),_e=$(Xe,Ze);return Ct||_e-tn||!!st-!!Fe||+je-+Xe||+Re-+Ze}function se(oe){var De=oe.event,je=De.start,Re=De.end,Fe=oe.range,Be=Fe.start,Xe=Fe.end,Ze=e(je).startOf("day"),st=e(Re),Ct=e(Be),tn=e(Xe),_e=Ze.isSameOrBefore(tn,"day"),et=!Ze.isSame(st,"minutes"),nt=et?st.isAfter(Ct,"minutes"):st.isSameOrAfter(Ct,"minutes");return _e&&nt}function ue(oe,De){var je=e(oe),Re=e(De);return je.isSame(Re,"day")}function X(){var oe=new Date,De=/-/.test(oe.toString())?"-":"",je=oe.getTimezoneOffset(),Re=Number("".concat(De).concat(Math.abs(je))),Fe=e().utcOffset();return Fe>Re?1:0}return new Nse({formats:jle,firstOfWeek:_,firstVisibleDay:V,lastVisibleDay:U,visibleDays:Z,format:function(De,je,Re){return t(e(De),Re).format(je)},lt:g,lte:w,gt:h,gte:y,eq:c,neq:f,merge:M,inRange:S,startOf:i,endOf:l,range:B,add:N,diff:R,ceil:k,min:D,max:I,minutes:L,getSlotDate:Q,getTimezoneOffset:n,getDstOffset:r,getTotalMin:G,getMinutesFromMidnight:re,continuesPrior:de,continuesAfter:fe,sortEvents:he,inEventRange:se,isSameDate:ue,daySpan:$,browserTZOffset:X})}function y3(e,t,n,r,a){const o={start:r.start(e),end:r.end(e)},i={start:t,end:n};return a.inEventRange({event:o,range:i})}function Rle(e,t){return!e||t==null?!1:vb.isEqual(e,t)}const pp={PREVIOUS:"PREV",NEXT:"NEXT",TODAY:"TODAY",DATE:"DATE"};function $u({accessors:e,components:t,date:n,events:r,getters:a,length:o,localizer:i,onDoubleClickEvent:l,onSelectEvent:c,selected:f}){P.useRef(null);const h=P.useRef(null),g=P.useRef(null),y=P.useRef(null),w=P.useRef(null),[S,D]=P.useState(!1),[I,M]=P.useState(!1),N=(Z,Q,G)=>{const{event:re,date:de}=t;return Q=Q.filter(fe=>y3(fe,i.startOf(Z,"day"),i.endOf(Z,"day"),e,i)),Q.map((fe,$)=>{const he=e.title(fe),se=e.end(fe),ue=e.start(fe),X=a.eventProp(fe,ue,se,Rle(fe,f)),oe=$===0&&i.format(Z,"agendaDateFormat"),De=$===0?v.jsx("td",{rowSpan:Q.length,className:"rbc-agenda-date-cell",children:de?v.jsx(de,{day:Z,label:oe}):oe}):!1;return v.jsxs("tr",{className:X.className,style:X.style,children:[De,v.jsx("td",{className:"rbc-agenda-time-cell",children:B(Z,fe)}),v.jsx("td",{className:"rbc-agenda-event-cell",onClick:je=>c&&c(fe,je),onDoubleClick:je=>l&&l(fe,je),children:re?v.jsx(re,{event:fe,title:he}):he})]},G+"_"+$)},[])},B=(Z,Q)=>{const G=t.time;let re="",de=i.messages.allDay;const fe=e.end(Q),$=e.start(Q);return e.allDay(Q)||(i.eq($,fe)?de=i.format($,"agendaTimeFormat"):i.isSameDate($,fe)?de=i.format({start:$,end:fe},"agendaTimeRangeFormat"):i.isSameDate(Z,$)?de=i.format($,"agendaTimeFormat"):i.isSameDate(Z,fe)&&(de=i.format(fe,"agendaTimeFormat"))),i.gt(Z,$,"day")&&(re="rbc-continues-prior"),i.lt(Z,fe,"day")&&(re+=" rbc-continues-after"),v.jsx("span",{className:re.trim(),children:G?v.jsx(G,{event:Q,day:Z,label:de}):de})},{messages:k}=i,R=i.add(n,-o/2,"day"),L=i.add(n,o/2,"day"),_=i.range(R,L,"day");S&&_.reverse(),r=r.filter(Z=>y3(Z,i.startOf(R,"day"),i.endOf(L,"day"),e,i)),r.sort((Z,Q)=>+e.start(Z)-+e.start(Q)),I&&r.reverse();const V=P.useCallback(()=>setTimeout(()=>{w.current&&kb(w.current,{backgroundColor:"#ffffff",pixelRatio:window.devicePixelRatio*2}).then(Z=>{new x.Notice(E("Image is generating..."));const Q=ft.getState().settings.AutoSaveWhenOnMobile,G=ft.getState().app.vault;if(Q&&x.Platform.isMobile){const re=Z.split("base64,")[1];gb(re,"image/png").arrayBuffer().then(async fe=>{let $;const he="png",se=Ju();for(const ue in se)if(se[ue]instanceof x.TFile){$=se[ue];break}$!==void 0&&await G.createBinary(await G.getAvailablePathForAttachments(`Pasted Image ${x.moment().format("YYYYMMDDHHmmss")}`,he,$),fe)})}Nb({imgUrl:Z})}).catch(Z=>{console.error(Z)})},0),[w.current,_]),U=P.useCallback(Z=>{const Q=new x.Menu;Q.addItem(G=>{G.setIcon("share-2").setTitle(E("Share")).onClick(()=>{V()})}),Q.showAtMouseEvent(Z.nativeEvent)},[w.current,_,V]);return v.jsx("div",{className:"rbc-agenda-view",children:r.length!==0?v.jsx(ne.Fragment,{children:v.jsxs("table",{ref:w,className:"rbc-agenda-table",children:[v.jsx("thead",{onContextMenu:U,children:v.jsxs("tr",{children:[v.jsx("th",{className:"rbc-header",ref:h,onClick:()=>{D(!S)},children:k.date+(S?" 🔼":" 🔽")}),v.jsx("th",{className:"rbc-header",ref:g,onClick:()=>{M(!I)},children:k.time+(I?" 🔼":" 🔽")}),v.jsx("th",{className:"rbc-header",children:k.event})]})}),v.jsx("tbody",{ref:y,children:_.map((Z,Q)=>N(Z,r,Q))})]})}):v.jsx("span",{className:"rbc-agenda-empty",children:k.noEventsInRange})})}$u.propTypes={accessors:ke.object.isRequired,components:ke.object.isRequired,date:ke.instanceOf(Date),events:ke.array,getters:ke.object.isRequired,length:ke.number.isRequired,localizer:ke.object.isRequired,onSelectEvent:ke.func,onDoubleClickEvent:ke.func,selected:ke.object};$u.defaultProps={length:30};$u.range=(e,{length:t=$u.defaultProps.length,localizer:n})=>{const r=n.add(e,-t/2,"day"),a=n.add(e,t/2,"day");return{customStart:r,customEnd:a}};$u.navigate=(e,t,{length:n=$u.defaultProps.length,localizer:r})=>{switch(t){case pp.PREVIOUS:return r.add(e,-n,"day");case pp.NEXT:return r.add(e,n,"day");default:return e}};$u.title=(e,{length:t=$u.defaultProps.length,localizer:n})=>{const r=n.add(e,-t/2,"day"),a=n.add(e,t/2,"day");return n.format({start:r,end:a},"agendaHeaderFormat")};function _le(e,t){e.hoverEl.toggleClass("thino-hover-popover",!0);const n=Rv(e.hoverEl);return n.render(v.jsx(is,{store:Le,context:Lt,children:v.jsx(ai,{memo:t})})),n}function Ble({event:e}){const t=e.resource,n=t.content.split(`
-`)[0].slice(0,20),r=ne.useRef(null),a=ne.useRef(null),o=ne.useRef(null);P.useEffect(()=>{if(a.current)return x.setIcon(a.current,"calendar"),()=>{r.current&&(r.current=null)}},[r]);const i=P.useCallback(c=>{o.current&&(o.current.unmount(),o.current=null),o.current=c},[]),l=P.useCallback(c=>{if(!r.current||!x.Keymap.isModifier(c.nativeEvent,"Mod"))return;const f=new x.HoverPopover(ft.getState().view,r.current,100),h=_le(f,t);i(h)},[r.current]);return v.jsxs("span",{className:"rbc-event-renderer","data-source-type":t.sourceType,"data-thino-type":t.thinoType,"data-thino-id":t.id,ref:r,"aria-label":t.path,onMouseOver:l,children:[v.jsx(Hle,{event:e}),v.jsx("span",{children:n})]})}const Hle=({event:e})=>{const t=ne.useRef(null),n=e.resource;P.useEffect(()=>{t.current&&x.setIcon(t.current,n.thinoType==="JOURNAL"?"calendar":n.thinoType==="TASK-TODO"?"square":"check-square")},[n==null?void 0:n.thinoType,t]);const r=P.useCallback(async a=>{a.stopPropagation(),a.preventDefault(),await(async()=>{const i=await we.updateMemo(n.id,n.content,n.thinoType==="TASK-TODO"?"TASK-DONE":"TASK-TODO");i&&we.editMemo(i)})()},[n==null?void 0:n.thinoType,n==null?void 0:n.id,n==null?void 0:n.content]);return v.jsx(v.Fragment,{children:v.jsxs("span",{className:"rbc-event-icon-group",children:[v.jsx("span",{className:"rbc-event-icon",ref:t,onClick:r}),v.jsx("span",{className:ar("rbc-event-time","thino-hidden"),children:v.jsx("span",{className:"rbc-event-time-text",children:x.moment(e.start).format("HH:mm")})})]})})};function UF({views:e,view:t,messages:n,onView:r}){return e.map(a=>v.jsx("button",{type:"button",className:ar({"rbc-active":t===a}),onClick:()=>r(a),children:n[a]},a))}UF.propTypes={messages:ke.object,onView:ke.func,view:ke.string,views:ke.array};function YF({date:e,label:t,localizer:{messages:n},onNavigate:r,onView:a,view:o,views:i}){const l={previous:P.useRef(null),today:P.useRef(null),next:P.useRef(null)};P.useEffect(()=>{l&&(x.setIcon(l.previous.current,"chevron-left"),x.setIcon(l.today.current,"dot"),x.setIcon(l.next.current,"chevron-right"))},[l]);const c=P.useMemo(()=>v.jsxs(v.Fragment,{children:[v.jsx("button",{ref:l.previous,type:"button",onClick:()=>r(pp.PREVIOUS),"aria-label":n.previous,children:"<"}),v.jsx("button",{ref:l.today,type:"button",onClick:()=>r(pp.TODAY),"aria-label":n.today,children:"•"}),v.jsx("button",{ref:l.next,type:"button",onClick:()=>r(pp.NEXT),"aria-label":n.next,children:">"})]}),[n]);return v.jsxs("div",{className:"rbc-toolbar",children:[v.jsx("span",{className:ar("rbc-btn-group","thino-view-custom-toolbar"),children:c}),v.jsx("span",{className:"rbc-toolbar-label",children:v.jsx(Pw,{type:"text",handleValueChange:f=>{r(pp.DATE,x.moment(f,"YYYY-MM-DD").format("YYYY-MM-DDTHH:mm:ssZ"))},defaultText:t+(o==="week"?x.moment(e.valueOf(),"x").format(" [W]WW"):""),defaultValue:x.moment(e.valueOf(),"x").valueOf()})}),v.jsx("span",{className:"rbc-btn-group",children:v.jsx(UF,{view:o,views:i,messages:n,onView:a})})]})}YF.propTypes={date:ke.instanceOf(Date),label:ke.string,localizer:ke.object,messages:ke.object,onNavigate:ke.func,onView:ke.func,view:ke.string,views:ke.array};function Ule({event:e,children:t,showPopup:n,callRender:r,...a}){const o=P.useRef(null),i=P.useRef(null),l=P.useCallback(c=>{if(!c.isTrusted){r();return}i.current=c.nativeEvent.target,i.current&&(i.current.hasClass("rbc-event")||(i.current=i.current.closest(".rbc-event")),o.current!==null?(window.clearTimeout(o.current),o.current=null):o.current=window.setTimeout(()=>{n(e,i.current),o.current=null},250))},[e,n]);return v.jsx(v.Fragment,{children:v.jsx("div",{className:"rbc-event-wrapper","aria-describedby":"thino",onClick:l,children:t})})}const Yle=Lle(x.moment),zle=({event:e})=>{const t=e.resource;return v.jsx(v.Fragment,{children:v.jsx(ai,{memo:t})})},Vle=e=>{var G;const{thinos:t}=e,[n,r]=ne.useState([]),[a,o]=ne.useState((app==null?void 0:app.loadLocalStorage("thino-calendar-view"))||"month"),[i,l]=ne.useState(null),c=ne.useRef(null),f=ne.useRef(null),[h,g]=ne.useState(!1),y=P.useRef(null),[w,S]=P.useState(new Date);P.useEffect(()=>()=>{c.current&&(c.current=null),f.current&&(f.current=null),y.current&&(y.current=null)},[]),P.useEffect(()=>{const re=t.map(de=>{const fe=x.moment(de.createdAt,"YYYY/MM/DD HH:mm:ss"),$=fe.clone().add(1,"minute");return{title:de.content,start:new Date(fe.format("YYYY-MM-DDTHH:mm:ss")),end:new Date($.format("YYYY-MM-DDTHH:mm:ss")),resource:de}});r(re)},[t]),P.useEffect(()=>{app==null||app.saveLocalStorage("thino-calendar-view",a)},[a]),P.useEffect(()=>{i&&h&&l(t.find(re=>re.id===i.id))},[t,i,h]),P.useEffect(()=>{i&&y.current.update()},[i]),y.current=Mb(c.current,f.current,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,4]}}]});const D=P.useCallback(()=>{y.current.update(),y.current.update()},[]),I=P.useCallback((re,de)=>{l(null),k(),y.current.state.elements.reference=de,l(re.resource),R()},[]),M=P.useCallback(()=>{k(),l(null)},[]),N=P.useCallback((re,de,fe)=>{var $;if(B(re),de==="week"||de==="day"){const he=c.current.find(".rbc-event-wrapper");if(c.current.closest(".memolist-wrapper"),he){($=he.children[0])==null||$.click();return}else{setTimeout(()=>{var ue,X;const se=c.current.find(".rbc-event-wrapper");(X=(ue=se==null?void 0:se.children)==null?void 0:ue[0])==null||X.click()},0);return}}},[]),B=P.useCallback(re=>{S(re)},[S]);Hv(f,M);const k=P.useCallback(()=>{g(!1)},[g]),R=P.useCallback(()=>{y.current.update(),g(!0)},[g]),L=P.useCallback(re=>{const de=re.resource;dt.setEditMemoId(de.id)},[]),_=P.useCallback(re=>{o(re)},[o]),{components:V,views:U,messages:Z}=P.useMemo(()=>({components:{toolbar:YF,eventWrapper:re=>v.jsx(Ule,{...re,callRender:D,showPopup:I}),agenda:{event:zle},event:Ble},views:{month:!0,agenda:$u,week:!0,day:!0},messages:{month:E("Month"),day:E("Day"),next:E("Next"),previous:E("Previous"),today:E("Today"),agenda:E("Agenda"),week:E("Week"),yesterday:E("Yesterday"),tomorrow:E("Tomorrow"),noEventsInRange:E("No thinos in range"),date:E("date"),time:E("time"),event:E("event")}}),[]),Q=P.useMemo(()=>({timeGutterFormat:(re,de,fe)=>fe.format(re,"HH:mm",de),agendaTimeRangeFormat:({start:re,end:de},fe,$)=>$.format(re,"HH:mm",fe)+" — "+$.format(de,"HH:mm",fe),agendaHeaderFormat:({start:re,end:de},fe,$)=>$.format(re,"YYYY-MM-DD")+" — "+$.format(de,"YYYY-MM-DD")}),[]);return v.jsxs("div",{ref:c,className:"calendar-view",children:[v.jsx(Nle,{date:w,messages:Z,components:V,localizer:Yle,events:n,views:U,onView:_,onDoubleClickEvent:L,onNavigate:N,formats:Q,defaultView:a,tooltipAccessor:null,startAccessor:"start",endAccessor:"end"}),v.jsx("div",{ref:f,style:(G=y.current)==null?void 0:G.styles.popper,className:ar("thino-popup-container",h?"":"thino-hidden"),children:i&&v.jsx(ai,{memo:i})})]})};function Kc(e,t){return typeof e=="function"?e(t):e}function Ai(e,t){return n=>{t.setState(r=>({...r,[e]:Kc(n,r[e])}))}}function Jw(e){return e instanceof Function}function Wle(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function $le(e,t){const n=[],r=a=>{a.forEach(o=>{n.push(o);const i=t(o);i!=null&&i.length&&r(i)})};return r(e),n}function Bt(e,t,n){let r=[],a;return o=>{let i;n.key&&n.debug&&(i=Date.now());const l=e(o);if(!(l.length!==r.length||l.some((h,g)=>r[g]!==h)))return a;r=l;let f;if(n.key&&n.debug&&(f=Date.now()),a=t(...l),n==null||n.onChange==null||n.onChange(a),n.key&&n.debug&&n!=null&&n.debug()){const h=Math.round((Date.now()-i)*100)/100,y=Math.round((Date.now()-f)*100)/100/16,w=(S,D)=>{for(S=String(S);S.length{var a;return(a=e==null?void 0:e.debugAll)!=null?a:e[t]},key:!1,onChange:r}}function Zle(e,t,n,r){var a,o;const l={...e._getDefaultColumnDef(),...t},c=l.accessorKey;let f=(a=(o=l.id)!=null?o:c?c.replace(".","_"):void 0)!=null?a:typeof l.header=="string"?l.header:void 0,h;if(l.accessorFn?h=l.accessorFn:c&&(c.includes(".")?h=y=>{let w=y;for(const D of c.split(".")){var S;w=(S=w)==null?void 0:S[D]}return w}:h=y=>y[l.accessorKey]),!f)throw new Error;let g={id:`${String(f)}`,accessorFn:h,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:Bt(()=>[!0],()=>{var y;return[g,...(y=g.columns)==null?void 0:y.flatMap(w=>w.getFlatColumns())]},Ht(e.options,"debugColumns")),getLeafColumns:Bt(()=>[e._getOrderColumnsFn()],y=>{var w;if((w=g.columns)!=null&&w.length){let S=g.columns.flatMap(D=>D.getLeafColumns());return y(S)}return[g]},Ht(e.options,"debugColumns"))};for(const y of e._features)y.createColumn==null||y.createColumn(g,e);return g}const oo="debugHeaders";function w3(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const i=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),i.push(c)};return l(o),i},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(o,e)}),o}const qle={createTable:e=>{e.getHeaderGroups=Bt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,a)=>{var o,i;const l=(o=r==null?void 0:r.map(g=>n.find(y=>y.id===g)).filter(Boolean))!=null?o:[],c=(i=a==null?void 0:a.map(g=>n.find(y=>y.id===g)).filter(Boolean))!=null?i:[],f=n.filter(g=>!(r!=null&&r.includes(g.id))&&!(a!=null&&a.includes(g.id)));return j0(t,[...l,...f,...c],e)},Ht(e.options,oo)),e.getCenterHeaderGroups=Bt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,a)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(a!=null&&a.includes(o.id))),j0(t,n,e,"center")),Ht(e.options,oo)),e.getLeftHeaderGroups=Bt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var a;const o=(a=r==null?void 0:r.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?a:[];return j0(t,o,e,"left")},Ht(e.options,oo)),e.getRightHeaderGroups=Bt(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var a;const o=(a=r==null?void 0:r.map(i=>n.find(l=>l.id===i)).filter(Boolean))!=null?a:[];return j0(t,o,e,"right")},Ht(e.options,oo)),e.getFooterGroups=Bt(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ht(e.options,oo)),e.getLeftFooterGroups=Bt(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ht(e.options,oo)),e.getCenterFooterGroups=Bt(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ht(e.options,oo)),e.getRightFooterGroups=Bt(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ht(e.options,oo)),e.getFlatHeaders=Bt(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ht(e.options,oo)),e.getLeftFlatHeaders=Bt(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ht(e.options,oo)),e.getCenterFlatHeaders=Bt(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ht(e.options,oo)),e.getRightFlatHeaders=Bt(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ht(e.options,oo)),e.getCenterLeafHeaders=Bt(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ht(e.options,oo)),e.getLeftLeafHeaders=Bt(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ht(e.options,oo)),e.getRightLeafHeaders=Bt(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ht(e.options,oo)),e.getLeafHeaders=Bt(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var a,o,i,l,c,f;return[...(a=(o=t[0])==null?void 0:o.headers)!=null?a:[],...(i=(l=n[0])==null?void 0:l.headers)!=null?i:[],...(c=(f=r[0])==null?void 0:f.headers)!=null?c:[]].map(h=>h.getLeafHeaders()).flat()},Ht(e.options,oo))}};function j0(e,t,n,r){var a,o;let i=0;const l=function(y,w){w===void 0&&(w=1),i=Math.max(i,w),y.filter(S=>S.getIsVisible()).forEach(S=>{var D;(D=S.columns)!=null&&D.length&&l(S.columns,w+1)},0)};l(e);let c=[];const f=(y,w)=>{const S={depth:w,id:[r,`${w}`].filter(Boolean).join("_"),headers:[]},D=[];y.forEach(I=>{const M=[...D].reverse()[0],N=I.column.depth===S.depth;let B,k=!1;if(N&&I.column.parent?B=I.column.parent:(B=I.column,k=!0),M&&(M==null?void 0:M.column)===B)M.subHeaders.push(I);else{const R=w3(n,B,{id:[r,w,B.id,I==null?void 0:I.id].filter(Boolean).join("_"),isPlaceholder:k,placeholderId:k?`${D.filter(L=>L.column===B).length}`:void 0,depth:w,index:D.length});R.subHeaders.push(I),D.push(R)}S.headers.push(I),I.headerGroup=S}),c.push(S),w>0&&f(D,w-1)},h=t.map((y,w)=>w3(n,y,{depth:i,index:w}));f(h,i-1),c.reverse();const g=y=>y.filter(S=>S.column.getIsVisible()).map(S=>{let D=0,I=0,M=[0];S.subHeaders&&S.subHeaders.length?(M=[],g(S.subHeaders).forEach(B=>{let{colSpan:k,rowSpan:R}=B;D+=k,M.push(R)})):D=1;const N=Math.min(...M);return I+=N,S.colSpan=D,S.rowSpan=I,{colSpan:D,rowSpan:I}});return g((a=(o=c[0])==null?void 0:o.headers)!=null?a:[]),c}const L0={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},QS=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Gle={getDefaultColumnDef:()=>L0,getInitialState:e=>({columnSizing:{},columnSizingInfo:QS(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ai("columnSizing",e),onColumnSizingInfoChange:Ai("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,a;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:L0.minSize,(r=o??e.columnDef.size)!=null?r:L0.size),(a=e.columnDef.maxSize)!=null?a:L0.maxSize)},e.getStart=Bt(n=>[n,$g(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((a,o)=>a+o.getSize(),0),Ht(t.options,"debugColumns")),e.getAfter=Bt(n=>[n,$g(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((a,o)=>a+o.getSize(),0),Ht(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...a}=n;return a})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=a=>{if(a.subHeaders.length)a.subHeaders.forEach(r);else{var o;n+=(o=a.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),a=r==null?void 0:r.getCanResize();return o=>{if(!r||!a||(o.persist==null||o.persist(),XS(o)&&o.touches&&o.touches.length>1))return;const i=e.getSize(),l=e?e.getLeafHeaders().map(M=>[M.column.id,M.column.getSize()]):[[r.id,r.getSize()]],c=XS(o)?Math.round(o.touches[0].clientX):o.clientX,f={},h=(M,N)=>{typeof N=="number"&&(t.setColumnSizingInfo(B=>{var k,R;const L=t.options.columnResizeDirection==="rtl"?-1:1,_=(N-((k=B==null?void 0:B.startOffset)!=null?k:0))*L,V=Math.max(_/((R=B==null?void 0:B.startSize)!=null?R:0),-.999999);return B.columnSizingStart.forEach(U=>{let[Z,Q]=U;f[Z]=Math.round(Math.max(Q+Q*V,0)*100)/100}),{...B,deltaOffset:_,deltaPercentage:V}}),(t.options.columnResizeMode==="onChange"||M==="end")&&t.setColumnSizing(B=>({...B,...f})))},g=M=>h("move",M),y=M=>{h("end",M),t.setColumnSizingInfo(N=>({...N,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},w=n||typeof document<"u"?document:null,S={moveHandler:M=>g(M.clientX),upHandler:M=>{w==null||w.removeEventListener("mousemove",S.moveHandler),w==null||w.removeEventListener("mouseup",S.upHandler),y(M.clientX)}},D={moveHandler:M=>(M.cancelable&&(M.preventDefault(),M.stopPropagation()),g(M.touches[0].clientX),!1),upHandler:M=>{var N;w==null||w.removeEventListener("touchmove",D.moveHandler),w==null||w.removeEventListener("touchend",D.upHandler),M.cancelable&&(M.preventDefault(),M.stopPropagation()),y((N=M.touches[0])==null?void 0:N.clientX)}},I=Jle()?{passive:!1}:!1;XS(o)?(w==null||w.addEventListener("touchmove",D.moveHandler,I),w==null||w.addEventListener("touchend",D.upHandler,I)):(w==null||w.addEventListener("mousemove",S.moveHandler,I),w==null||w.addEventListener("mouseup",S.upHandler,I)),t.setColumnSizingInfo(M=>({...M,startOffset:c,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?QS():(n=e.initialState.columnSizingInfo)!=null?n:QS())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0}}};let R0=null;function Jle(){if(typeof R0=="boolean")return R0;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return R0=e,R0}function XS(e){return e.type==="touchstart"}const Kle={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ai("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var a,o;e.setExpanded(r?{}:(a=(o=e.initialState)==null?void 0:o.expanded)!=null?a:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(a=>!a.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const i=o.split(".");r=Math.max(r,i.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var a;const o=r===!0?!0:!!(r!=null&&r[e.id]);let i={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{i[l]=!0}):i=r,n=(a=n)!=null?a:!o,!o&&n)return{...i,[e.id]:!0};if(o&&!n){const{[e.id]:l,...c}=i;return c}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,a;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((a=e.subRows)!=null&&a.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},zF=(e,t,n)=>{var r;const a=n.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(a))};zF.autoRemove=e=>Us(e);const VF=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};VF.autoRemove=e=>Us(e);const WF=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};WF.autoRemove=e=>Us(e);const $F=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};$F.autoRemove=e=>Us(e)||!(e!=null&&e.length);const ZF=(e,t,n)=>!n.some(r=>{var a;return!((a=e.getValue(t))!=null&&a.includes(r))});ZF.autoRemove=e=>Us(e)||!(e!=null&&e.length);const qF=(e,t,n)=>n.some(r=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(r)});qF.autoRemove=e=>Us(e)||!(e!=null&&e.length);const GF=(e,t,n)=>e.getValue(t)===n;GF.autoRemove=e=>Us(e);const JF=(e,t,n)=>e.getValue(t)==n;JF.autoRemove=e=>Us(e);const RI=(e,t,n)=>{let[r,a]=n;const o=e.getValue(t);return o>=r&&o<=a};RI.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,a=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,i=n===null||Number.isNaN(a)?1/0:a;if(o>i){const l=o;o=i,i=l}return[o,i]};RI.autoRemove=e=>Us(e)||Us(e[0])&&Us(e[1]);const ju={includesString:zF,includesStringSensitive:VF,equalsString:WF,arrIncludes:$F,arrIncludesAll:ZF,arrIncludesSome:qF,equals:GF,weakEquals:JF,inNumberRange:RI};function Us(e){return e==null||e===""}const Qle={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ai("columnFilters",e),onGlobalFilterChange:Ai("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?ju.includesString:typeof r=="number"?ju.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?ju.equals:Array.isArray(r)?ju.arrIncludes:ju.weakEquals},e.getFilterFn=()=>{var n,r;return Jw(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:ju[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,a;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,r,a,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(a=>a.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const a=e.getFilterFn(),o=r==null?void 0:r.find(h=>h.id===e.id),i=Kc(n,o?o.value:void 0);if(b3(a,i,e)){var l;return(l=r==null?void 0:r.filter(h=>h.id!==e.id))!=null?l:[]}const c={id:e.id,value:i};if(o){var f;return(f=r==null?void 0:r.map(h=>h.id===e.id?c:h))!=null?f:[]}return r!=null&&r.length?[...r,c]:[c]})},e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>ju.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Jw(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:ju[r]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=a=>{var o;return(o=Kc(t,a))==null?void 0:o.filter(i=>{const l=n.find(c=>c.id===i.id);if(l){const c=l.getFilterFn();if(b3(c,i.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}};function b3(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Xle=(e,t,n)=>n.reduce((r,a)=>{const o=a.getValue(e);return r+(typeof o=="number"?o:0)},0),eue=(e,t,n)=>{let r;return n.forEach(a=>{const o=a.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},tue=(e,t,n)=>{let r;return n.forEach(a=>{const o=a.getValue(e);o!=null&&(r=o)&&(r=o)}),r},nue=(e,t,n)=>{let r,a;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r===void 0?i>=i&&(r=a=i):(r>i&&(r=i),a{let n=0,r=0;if(t.forEach(a=>{let o=a.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},aue=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!Wle(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),a=n.sort((o,i)=>o-i);return n.length%2!==0?a[r]:(a[r-1]+a[r])/2},oue=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),iue=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,sue=(e,t)=>t.length,eD={sum:Xle,min:eue,max:tue,extent:nue,mean:rue,median:aue,unique:oue,uniqueCount:iue,count:sue},lue={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ai("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r,a,o;return(n=(r=(a=(o=e.columnDef.enableGrouping)!=null?o:!0)!=null?a:t.options.enableGrouping)!=null?r:!0)!=null?n:!!e.accessorFn},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return eD.sum;if(Object.prototype.toString.call(r)==="[object Date]")return eD.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Jw(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:eD[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var a;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((a=n.subRows)!=null&&a.length)}}};function uue(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(i=>i.id===o)).filter(Boolean),...r]}const cue={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ai("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Bt(n=>[$g(t,n)],n=>n.findIndex(r=>r.id===e.id),Ht(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=$g(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const a=$g(t,n);return((r=a[a.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Bt(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>a=>{let o=[];if(!(t!=null&&t.length))o=a;else{const i=[...t],l=[...a];for(;l.length&&i.length;){const c=i.shift(),f=l.findIndex(h=>h.id===c);f>-1&&o.push(l.splice(f,1)[0])}o=[...o,...l]}return uue(o,n,r)},Ht(e.options,"debugTable"))}},zT=0,VT=10,tD=()=>({pageIndex:zT,pageSize:VT}),due={getInitialState:e=>({...e,pagination:{...tD(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ai("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const a=o=>Kc(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(a)},e.resetPagination=r=>{var a;e.setPagination(r?tD():(a=e.initialState.pagination)!=null?a:tD())},e.setPageIndex=r=>{e.setPagination(a=>{let o=Kc(r,a.pageIndex);const i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,i)),{...a,pageIndex:o}})},e.resetPageIndex=r=>{var a,o;e.setPageIndex(r?zT:(a=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?a:zT)},e.resetPageSize=r=>{var a,o;e.setPageSize(r?VT:(a=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?a:VT)},e.setPageSize=r=>{e.setPagination(a=>{const o=Math.max(1,Kc(r,a.pageSize)),i=a.pageSize*a.pageIndex,l=Math.floor(i/o);return{...a,pageIndex:l,pageSize:o}})},e.setPageCount=r=>e.setPagination(a=>{var o;let i=Kc(r,(o=e.options.pageCount)!=null?o:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...a,pageCount:i}}),e.getPageOptions=Bt(()=>[e.getPageCount()],r=>{let a=[];return r&&r>0&&(a=[...new Array(r)].fill(null).map((o,i)=>i)),a},Ht(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,a=e.getPageCount();return a===-1?!0:a===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},nD=()=>({left:[],right:[]}),rD=()=>({top:[],bottom:[]}),fue={getInitialState:e=>({columnPinning:nD(),rowPinning:rD(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ai("columnPinning",e),onRowPinningChange:Ai("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(a=>a.id).filter(Boolean);t.setColumnPinning(a=>{var o,i;if(n==="right"){var l,c;return{left:((l=a==null?void 0:a.left)!=null?l:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((c=a==null?void 0:a.right)!=null?c:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(n==="left"){var f,h;return{left:[...((f=a==null?void 0:a.left)!=null?f:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((h=a==null?void 0:a.right)!=null?h:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((o=a==null?void 0:a.left)!=null?o:[]).filter(g=>!(r!=null&&r.includes(g))),right:((i=a==null?void 0:a.right)!=null?i:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var a,o,i;return((a=r.columnDef.enablePinning)!=null?a:!0)&&((o=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:r,right:a}=t.getState().columnPinning,o=n.some(l=>r==null?void 0:r.includes(l)),i=n.some(l=>a==null?void 0:a.includes(l));return o?"left":i?"right":!1},e.getPinnedIndex=()=>{var n,r;const a=e.getIsPinned();return a?(n=(r=t.getState().columnPinning)==null||(r=r[a])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.pin=(n,r,a)=>{const o=r?e.getLeafRows().map(c=>{let{id:f}=c;return f}):[],i=a?e.getParentRows().map(c=>{let{id:f}=c;return f}):[],l=new Set([...i,e.id,...o]);t.setRowPinning(c=>{var f,h;if(n==="bottom"){var g,y;return{top:((g=c==null?void 0:c.top)!=null?g:[]).filter(D=>!(l!=null&&l.has(D))),bottom:[...((y=c==null?void 0:c.bottom)!=null?y:[]).filter(D=>!(l!=null&&l.has(D))),...Array.from(l)]}}if(n==="top"){var w,S;return{top:[...((w=c==null?void 0:c.top)!=null?w:[]).filter(D=>!(l!=null&&l.has(D))),...Array.from(l)],bottom:((S=c==null?void 0:c.bottom)!=null?S:[]).filter(D=>!(l!=null&&l.has(D)))}}return{top:((f=c==null?void 0:c.top)!=null?f:[]).filter(D=>!(l!=null&&l.has(D))),bottom:((h=c==null?void 0:c.bottom)!=null?h:[]).filter(D=>!(l!=null&&l.has(D)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:a}=t.options;return typeof r=="function"?r(e):(n=r??a)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:a}=t.getState().rowPinning,o=n.some(l=>r==null?void 0:r.includes(l)),i=n.some(l=>a==null?void 0:a.includes(l));return o?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const a=e.getIsPinned();if(!a)return-1;const o=(n=t._getPinnedRows(a))==null?void 0:n.map(i=>{let{id:l}=i;return l});return(r=o==null?void 0:o.indexOf(e.id))!=null?r:-1},e.getCenterVisibleCells=Bt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,a)=>{const o=[...r??[],...a??[]];return n.filter(i=>!o.includes(i.column.id))},Ht(t.options,"debugRows")),e.getLeftVisibleCells=Bt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(i=>i.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ht(t.options,"debugRows")),e.getRightVisibleCells=Bt(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(i=>i.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ht(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?nD():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:nD())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var a,o;return!!((a=r.left)!=null&&a.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Bt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),Ht(e.options,"debugColumns")),e.getRightLeafColumns=Bt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),Ht(e.options,"debugColumns")),e.getCenterLeafColumns=Bt(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const a=[...n??[],...r??[]];return t.filter(o=>!a.includes(o.id))},Ht(e.options,"debugColumns")),e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?rD():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:rD())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var a,o;return!!((a=r.top)!=null&&a.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=Bt(t=>[e.getRowModel().rows,e.getState().rowPinning[t],t],(t,n,r)=>{var a;return((a=e.options.keepPinnedRows)==null||a?(n??[]).map(i=>{const l=e.getRow(i,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(i=>t.find(l=>l.id===i))).filter(Boolean).map(i=>({...i,position:r}))},Ht(e.options,"debugRows")),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=Bt(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const a=new Set([...n??[],...r??[]]);return t.filter(o=>!a.has(o.id))},Ht(e.options,"debugRows"))}},hue={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ai("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},a=e.getPreGroupedRowModel().flatRows;return t?a.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):a.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),a={...n};return e.getRowModel().rows.forEach(o=>{WT(a,o.id,r,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Bt(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?aD(e,n):{rows:[],flatRows:[],rowsById:{}},Ht(e.options,"debugTable")),e.getFilteredSelectedRowModel=Bt(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?aD(e,n):{rows:[],flatRows:[],rowsById:{}},Ht(e.options,"debugTable")),e.getGroupedSelectedRowModel=Bt(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?aD(e,n):{rows:[],flatRows:[],rowsById:{}},Ht(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(a=>a.getCanSelect()&&!n[a.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(a=>a.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(a=>!n[a.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const a=e.getIsSelected();t.setRowSelection(o=>{var i;if(n=typeof n<"u"?n:!a,e.getCanSelect()&&a===n)return o;const l={...o};return WT(l,e.id,n,(i=r==null?void 0:r.selectChildren)!=null?i:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return _I(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return $T(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return $T(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var a;n&&e.toggleSelected((a=r.target)==null?void 0:a.checked)}}}},WT=(e,t,n,r,a)=>{var o;const i=a.getRow(t,!0);n?(i.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),i.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=i.subRows)!=null&&o.length&&i.getCanSelectSubRows()&&i.subRows.forEach(l=>WT(e,l.id,n,r,a))};function aD(e,t){const n=e.getState().rowSelection,r=[],a={},o=function(i,l){return i.map(c=>{var f;const h=_I(c,n);if(h&&(r.push(c),a[c.id]=c),(f=c.subRows)!=null&&f.length&&(c={...c,subRows:o(c.subRows)}),h)return c}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:a}}function _I(e,t){var n;return(n=t[e.id])!=null?n:!1}function $T(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let a=!0,o=!1;return e.subRows.forEach(i=>{if(!(o&&!a)&&(i.getCanSelect()&&(_I(i,t)?o=!0:a=!1),i.subRows&&i.subRows.length)){const l=$T(i,t);l==="all"?o=!0:(l==="some"&&(o=!0),a=!1)}}),a?"all":o?"some":!1}const ZT=/([0-9]+)/gm,pue=(e,t,n)=>KF(nd(e.getValue(n)).toLowerCase(),nd(t.getValue(n)).toLowerCase()),mue=(e,t,n)=>KF(nd(e.getValue(n)),nd(t.getValue(n))),gue=(e,t,n)=>BI(nd(e.getValue(n)).toLowerCase(),nd(t.getValue(n)).toLowerCase()),vue=(e,t,n)=>BI(nd(e.getValue(n)),nd(t.getValue(n))),yue=(e,t,n)=>{const r=e.getValue(n),a=t.getValue(n);return r>a?1:rBI(e.getValue(n),t.getValue(n));function BI(e,t){return e===t?0:e>t?1:-1}function nd(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function KF(e,t){const n=e.split(ZT).filter(Boolean),r=t.split(ZT).filter(Boolean);for(;n.length&&r.length;){const a=n.shift(),o=r.shift(),i=parseInt(a,10),l=parseInt(o,10),c=[i,l].sort();if(isNaN(c[0])){if(a>o)return 1;if(o>a)return-1;continue}if(isNaN(c[1]))return isNaN(i)?-1:1;if(i>l)return 1;if(l>i)return-1}return n.length-r.length}const fp={alphanumeric:pue,alphanumericCaseSensitive:mue,text:gue,textCaseSensitive:vue,datetime:yue,basic:wue},bue={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ai("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const a of n){const o=a==null?void 0:a.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return fp.datetime;if(typeof o=="string"&&(r=!0,o.split(ZT).length>1))return fp.alphanumeric}return r?fp.text:fp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Jw(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:fp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const a=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(i=>{const l=i==null?void 0:i.find(w=>w.id===e.id),c=i==null?void 0:i.findIndex(w=>w.id===e.id);let f=[],h,g=o?n:a==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&r?l?h="toggle":h="add":i!=null&&i.length&&c!==i.length-1?h="replace":l?h="toggle":h="replace",h==="toggle"&&(o||a||(h="remove")),h==="add"){var y;f=[...i,{id:e.id,desc:g}],f.splice(0,f.length-((y=t.options.maxMultiSortColCount)!=null?y:Number.MAX_SAFE_INTEGER))}else h==="toggle"?f=i.map(w=>w.id===e.id?{...w,desc:g}:w):h==="remove"?f=i.filter(w=>w.id!==e.id):f=[{id:e.id,desc:g}];return f})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,a;const o=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(a=t.options.enableMultiRemove)!=null)||a)?!1:i==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(a=>a.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(a=>a.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Sue={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ai("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const a=e.columns;return(n=a.length?a.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Bt(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ht(t.options,"debugRows")),e.getVisibleCells=Bt(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,a)=>[...n,...r,...a],Ht(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Bt(()=>[r(),r().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ht(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((a,o)=>({...a,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function $g(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const S3=[qle,Sue,cue,fue,Qle,bue,lue,Kle,due,hue,Gle];function Due(e){var t;e.debugAll||e.debugTable;let n={_features:S3};const r=n._features.reduce((h,g)=>Object.assign(h,g.getDefaultOptions==null?void 0:g.getDefaultOptions(n)),{}),a=h=>n.options.mergeOptions?n.options.mergeOptions(r,h):{...r,...h};let i={...{},...(t=e.initialState)!=null?t:{}};n._features.forEach(h=>{var g;i=(g=h.getInitialState==null?void 0:h.getInitialState(i))!=null?g:i});const l=[];let c=!1;const f={_features:S3,options:{...r,...e},initialState:i,_queue:h=>{l.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(g=>setTimeout(()=>{throw g})))},reset:()=>{n.setState(n.initialState)},setOptions:h=>{const g=Kc(h,n.options);n.options=a(g)},getState:()=>n.options.state,setState:h=>{n.options.onStateChange==null||n.options.onStateChange(h)},_getRowId:(h,g,y)=>{var w;return(w=n.options.getRowId==null?void 0:n.options.getRowId(h,g,y))!=null?w:`${y?[y.id,g].join("."):g}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(h,g)=>{let y=(g?n.getPrePaginationRowModel():n.getRowModel()).rowsById[h];if(!y&&(y=n.getCoreRowModel().rowsById[h],!y))throw new Error;return y},_getDefaultColumnDef:Bt(()=>[n.options.defaultColumn],h=>{var g;return h=(g=h)!=null?g:{},{header:y=>{const w=y.header.column.columnDef;return w.accessorKey?w.accessorKey:w.accessorFn?w.id:null},cell:y=>{var w,S;return(w=(S=y.renderValue())==null||S.toString==null?void 0:S.toString())!=null?w:null},...n._features.reduce((y,w)=>Object.assign(y,w.getDefaultColumnDef==null?void 0:w.getDefaultColumnDef()),{}),...h}},Ht(e,"debugColumns")),_getColumnDefs:()=>n.options.columns,getAllColumns:Bt(()=>[n._getColumnDefs()],h=>{const g=function(y,w,S){return S===void 0&&(S=0),y.map(D=>{const I=Zle(n,D,S,w),M=D;return I.columns=M.columns?g(M.columns,I,S+1):[],I})};return g(h)},Ht(e,"debugColumns")),getAllFlatColumns:Bt(()=>[n.getAllColumns()],h=>h.flatMap(g=>g.getFlatColumns()),Ht(e,"debugColumns")),_getAllFlatColumnsById:Bt(()=>[n.getAllFlatColumns()],h=>h.reduce((g,y)=>(g[y.id]=y,g),{}),Ht(e,"debugColumns")),getAllLeafColumns:Bt(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(h,g)=>{let y=h.flatMap(w=>w.getLeafColumns());return g(y)},Ht(e,"debugColumns")),getColumn:h=>n._getAllFlatColumnsById()[h]};Object.assign(n,f);for(let h=0;h{var i;return(i=o.getValue())!=null?i:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:a,getContext:Bt(()=>[e,n,t,o],(i,l,c,f)=>({table:i,column:l,row:c,cell:f,getValue:f.getValue,renderValue:f.renderValue}),Ht(e.options,"debugCells"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(o,n,t,e)},{}),o}const HI=(e,t,n,r,a,o,i)=>{let l={id:t,index:r,original:n,depth:a,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const f=e.getColumn(c);if(f!=null&&f.accessorFn)return l._valuesCache[c]=f.accessorFn(l.original,r),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const f=e.getColumn(c);if(f!=null&&f.accessorFn)return f.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=f.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var f;return(f=l.getValue(c))!=null?f:e.options.renderFallbackValue},subRows:o??[],getLeafRows:()=>$le(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],f=l;for(;;){const h=f.getParentRow();if(!h)break;c.push(h),f=h}return c.reverse()},getAllCells:Bt(()=>[e.getAllLeafColumns()],c=>c.map(f=>Tue(e,l,f,f.id)),Ht(e.options,"debugRows")),_getAllCellsByColumnId:Bt(()=>[l.getAllCells()],c=>c.reduce((f,h)=>(f[h.column.id]=h,f),{}),Ht(e.options,"debugRows"))};for(let c=0;cBt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(a,o,i){o===void 0&&(o=0);const l=[];for(let f=0;fe._autoResetPageIndex()))}function QF(e,t,n){return n.options.filterFromLeafRows?Eue(e,t,n):Cue(e,t,n)}function Eue(e,t,n){var r;const a=[],o={},i=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,l=function(c,f){f===void 0&&(f=0);const h=[];for(let y=0;yBt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let y=0;y