Files
CrazyJasonwell fb40c9b109 add all
2025-10-25 20:35:10 +08:00

53 lines
226 KiB
JavaScript
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use strict';
var obsidian = require('obsidian');
function __awaiter(e,t,r,n){return new(r||(r=Promise))((function(o,a){function i(e){try{s(n.next(e));}catch(e){a(e);}}function c(e){try{s(n.throw(e));}catch(e){a(e);}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t);}))).then(i,c);}s((n=n.apply(e,t||[])).next());}))}"function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};
class StatusBar{constructor(_0x4e8f0c){this['messages']=[],this['statusBarEl']=_0x4e8f0c;}['displayMessage'](_0x3354b3,_0x277e78,_0x4605bc=!0x1){this['messages'][0x0]&&this['messages'][0x0]['message']===_0x3354b3||(this['messages']['push']({'message':'希果壳五彩:\x20'+_0x3354b3['slice'](0x0,0x64),'timeout':0x3e8*_0x277e78}),_0x4605bc&&(this['currentMessage']=null,this['lastMessageTimestamp']=null,this['statusBarEl']['setText']('')),this['display']());}['display'](){if(this['currentMessage'])Date['now']()-this['lastMessageTimestamp']>=this['currentMessage']['timeout']&&(this['currentMessage']=null,this['lastMessageTimestamp']=null);else {if(this['messages']['length'])return this['currentMessage']=this['messages']['shift'](),this['statusBarEl']['setText'](this['currentMessage']['message']),void(this['lastMessageTimestamp']=Date['now']());this['statusBarEl']['setText']('');}}}
class BGCONSTS{}BGCONSTS['APPID']=0x14,BGCONSTS['API']='prod',BGCONSTS['SID']=0x7,BGCONSTS['MKT']='obsidian-plugin',BGCONSTS['EP']='obsidianwucai',BGCONSTS['VERSION']='25.2.17',BGCONSTS['VERSION_NUM']=0x3d169,BGCONSTS['IS_DEBUG']=!0x1;
function logger(_0x3e68cf,_0x322909=0x1){(0x1!==_0x322909||BGCONSTS['IS_DEBUG'])&&console['log'](_0x3e68cf);}
function getDefaultExportFromCjs (x) {
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
}
function createCommonjsModule(fn, basedir, module) {
return module = {
path: basedir,
exports: {},
require: function (path, base) {
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
}
}, fn(module, module.exports), module.exports;
}
function commonjsRequire () {
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
}
var moment=createCommonjsModule((function(e,t){var n;n=function(){var t,n;function s(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function r(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return !1;return !0}function u(e){return void 0===e}function l(e){return "number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function h(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,s=[],i=e.length;for(n=0;n<i;++n)s.push(t(e[n],n));return s}function c(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,s){return Wt(e,t,n,s,!0).utc()}function m(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),e._pf}function _(e){if(null==e._isValid){var t=m(e),s=n.call(t.parsedDateParts,(function(e){return null!=e})),i=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&s);if(e._strict&&(i=i&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour),null!=Object.isFrozen&&Object.isFrozen(e))return i;e._isValid=i;}return e._isValid}function y(e){var t=f(NaN);return null!=e?c(m(t),e):m(t).userInvalidated=!0,t}n=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),s=n.length>>>0;for(t=0;t<s;t++)if(t in n&&e.call(this,n[t],t,n))return !0;return !1};var g=s.momentProperties=[],p=!1;function w(e,t){var n,s,i,r=g.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=m(t)),u(t._locale)||(e._locale=t._locale),r>0)for(n=0;n<r;n++)u(i=t[s=g[n]])||(e[s]=i);return e}function v(e){w(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===p&&(p=!0,s.updateOffset(this),p=!1);}function k(e){return e instanceof v||null!=e&&null!=e._isAMomentObject}function M(e){!1===s.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e);}function D(e,t){var n=!0;return c((function(){if(null!=s.deprecationHandler&&s.deprecationHandler(null,e),n){var i,r,o,u=[],l=arguments.length;for(r=0;r<l;r++){if(i="","object"==typeof arguments[r]){for(o in i+="\n["+r+"] ",arguments[0])a(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2);}else i=arguments[r];u.push(i);}M(e+"\nArguments: "+Array.prototype.slice.call(u).join("")+"\n"+(new Error).stack),n=!1;}return t.apply(this,arguments)}),t)}var S,Y={};function O(e,t){null!=s.deprecationHandler&&s.deprecationHandler(e,t),Y[e]||(M(t),Y[e]=!0);}function b(e){return "undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function x(e,t){var n,s=c({},e);for(n in t)a(t,n)&&(r(e[n])&&r(t[n])?(s[n]={},c(s[n],e[n]),c(s[n],t[n])):null!=t[n]?s[n]=t[n]:delete s[n]);for(n in e)a(e,n)&&!a(t,n)&&r(e[n])&&(s[n]=c({},s[n]));return s}function T(e){null!=e&&this.set(e);}function N(e,t,n){var s=""+Math.abs(e),i=t-s.length;return (e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}s.suppressDeprecationWarnings=!1,s.deprecationHandler=null,S=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};var P=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,R=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,W={},C={};function H(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(C[e]=i),t&&(C[t[0]]=function(){return N(i.apply(this,arguments),t[1],t[2])}),n&&(C[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)});}function U(e,t){return e.isValid()?(t=F(t,e.localeData()),W[t]=W[t]||function(e){var t,n,s,i=e.match(P);for(t=0,n=i.length;t<n;t++)C[i[t]]?i[t]=C[i[t]]:i[t]=(s=i[t]).match(/\[[\s\S]/)?s.replace(/^\[|\]$/g,""):s.replace(/\\/g,"");return function(t){var s,r="";for(s=0;s<n;s++)r+=b(i[s])?i[s].call(t,e):i[s];return r}}(t),W[t](e)):e.localeData().invalidDate()}function F(e,t){var n=5;function s(e){return t.longDateFormat(e)||e}for(R.lastIndex=0;n>=0&&R.test(e);)e=e.replace(R,s),R.lastIndex=0,n-=1;return e}var L={};function V(e,t){var n=e.toLowerCase();L[n]=L[n+"s"]=L[t]=e;}function G(e){return "string"==typeof e?L[e]||L[e.toLowerCase()]:void 0}function E(e){var t,n,s={};for(n in e)a(e,n)&&(t=G(n))&&(s[t]=e[n]);return s}var j={};function A(e,t){j[e]=t;}function I(e){return e%4==0&&e%100!=0||e%400==0}function Z(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function z(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Z(t)),n}function $(e,t){return function(n){return null!=n?(B(this,e,n),s.updateOffset(this,t),this):q(this,e)}}function q(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function B(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&I(e.year())&&1===e.month()&&29===e.date()?(n=z(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),Ne(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n));}var J,Q=/\d/,X=/\d\d/,K=/\d{3}/,ee=/\d{4}/,te=/[+-]?\d{6}/,ne=/\d\d?/,se=/\d\d\d\d?/,ie=/\d\d\d\d\d\d?/,re=/\d{1,3}/,ae=/\d{1,4}/,oe=/[+-]?\d{1,6}/,ue=/\d+/,le=/[+-]?\d+/,he=/Z|[+-]\d\d:?\d\d/gi,de=/Z|[+-]\d\d(?::?\d\d)?/gi,ce=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function fe(e,t,n){J[e]=b(t)?t:function(e,s){return e&&n?n:t};}function me(e,t){return a(J,e)?J[e](t._strict,t._locale):new RegExp(_e(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,s,i){return t||n||s||i}))))}function _e(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}J={};var ye={};function ge(e,t){var n,s,i=t;for("string"==typeof e&&(e=[e]),l(t)&&(i=function(e,n){n[t]=z(e);}),s=e.length,n=0;n<s;n++)ye[e[n]]=i;}function pe(e,t){ge(e,(function(e,n,s,i){s._w=s._w||{},t(e,s._w,s,i);}));}function we(e,t,n){null!=t&&a(ye,e)&&ye[e](t,n._a,n,e);}var ve,ke=0,Me=1,De=2,Se=3,Ye=4,Oe=5,be=6,xe=7,Te=8;function Ne(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?I(e)?29:28:31-s%7%2}ve=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return -1},H("M",["MM",2],"Mo",(function(){return this.month()+1})),H("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),H("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),V("month","M"),A("month",8),fe("M",ne),fe("MM",ne,X),fe("MMM",(function(e,t){return t.monthsShortRegex(e)})),fe("MMMM",(function(e,t){return t.monthsRegex(e)})),ge(["M","MM"],(function(e,t){t[Me]=z(e)-1;})),ge(["MMM","MMMM"],(function(e,t,n,s){var i=n._locale.monthsParse(e,s,n._strict);null!=i?t[Me]=i:m(n).invalidMonth=e;}));var Pe="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Re="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),We=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ce=ce,He=ce;function Ue(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=f([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=ve.call(this._shortMonthsParse,a))?i:null:-1!==(i=ve.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=ve.call(this._shortMonthsParse,a))||-1!==(i=ve.call(this._longMonthsParse,a))?i:null:-1!==(i=ve.call(this._longMonthsParse,a))||-1!==(i=ve.call(this._shortMonthsParse,a))?i:null}function Fe(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=z(t);else if(!l(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Ne(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Le(e){return null!=e?(Fe(this,e),s.updateOffset(this,!0),this):q(this,"Month")}function Ve(){function e(e,t){return t.length-e.length}var t,n,s=[],i=[],r=[];for(t=0;t<12;t++)n=f([2e3,t]),s.push(this.monthsShort(n,"")),i.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(s.sort(e),i.sort(e),r.sort(e),t=0;t<12;t++)s[t]=_e(s[t]),i[t]=_e(i[t]);for(t=0;t<24;t++)r[t]=_e(r[t]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i");}function Ge(e){return I(e)?366:365}H("Y",0,0,(function(){var e=this.year();return e<=9999?N(e,4):"+"+e})),H(0,["YY",2],0,(function(){return this.year()%100})),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),V("year","y"),A("year",1),fe("Y",le),fe("YY",ne,X),fe("YYYY",ae,ee),fe("YYYYY",oe,te),fe("YYYYYY",oe,te),ge(["YYYYY","YYYYYY"],ke),ge("YYYY",(function(e,t){t[ke]=2===e.length?s.parseTwoDigitYear(e):z(e);})),ge("YY",(function(e,t){t[ke]=s.parseTwoDigitYear(e);})),ge("Y",(function(e,t){t[ke]=parseInt(e,10);})),s.parseTwoDigitYear=function(e){return z(e)+(z(e)>68?1900:2e3)};var Ee=$("FullYear",!0);function je(e,t,n,s,i,r,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}function Ae(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ie(e,t,n){var s=7+t-n;return -(7+Ae(e,0,s).getUTCDay()-t)%7+s-1}function Ze(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ie(e,s,i);return o<=0?a=Ge(r=e-1)+o:o>Ge(e)?(r=e+1,a=o-Ge(e)):(r=e,a=o),{year:r,dayOfYear:a}}function ze(e,t,n){var s,i,r=Ie(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+$e(i=e.year()-1,t,n):a>$e(e.year(),t,n)?(s=a-$e(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function $e(e,t,n){var s=Ie(e,t,n),i=Ie(e+1,t,n);return (Ge(e)-s+i)/7}function qe(e,t){return e.slice(t,7).concat(e.slice(0,t))}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),V("week","w"),V("isoWeek","W"),A("week",5),A("isoWeek",5),fe("w",ne),fe("ww",ne,X),fe("W",ne),fe("WW",ne,X),pe(["w","ww","W","WW"],(function(e,t,n,s){t[s.substr(0,1)]=z(e);})),H("d",0,"do","day"),H("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),H("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),H("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),V("day","d"),V("weekday","e"),V("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),fe("d",ne),fe("e",ne),fe("E",ne),fe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),fe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),fe("dddd",(function(e,t){return t.weekdaysRegex(e)})),pe(["dd","ddd","dddd"],(function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:m(n).invalidWeekday=e;})),pe(["d","e","E"],(function(e,t,n,s){t[s]=z(e);}));var Be="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Je="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Qe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Xe=ce,Ke=ce,et=ce;function tt(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=f([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=ve.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ve.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=ve.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=ve.call(this._weekdaysParse,a))||-1!==(i=ve.call(this._shortWeekdaysParse,a))||-1!==(i=ve.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=ve.call(this._shortWeekdaysParse,a))||-1!==(i=ve.call(this._weekdaysParse,a))||-1!==(i=ve.call(this._minWeekdaysParse,a))?i:null:-1!==(i=ve.call(this._minWeekdaysParse,a))||-1!==(i=ve.call(this._weekdaysParse,a))||-1!==(i=ve.call(this._shortWeekdaysParse,a))?i:null}function nt(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],l=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),s=_e(this.weekdaysMin(n,"")),i=_e(this.weekdaysShort(n,"")),r=_e(this.weekdays(n,"")),a.push(s),o.push(i),u.push(r),l.push(s),l.push(i),l.push(r);a.sort(e),o.sort(e),u.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i");}function st(){return this.hours()%12||12}function it(e,t){H(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}));}function rt(e,t){return t._meridiemParse}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,st),H("k",["kk",2],0,(function(){return this.hours()||24})),H("hmm",0,0,(function(){return ""+st.apply(this)+N(this.minutes(),2)})),H("hmmss",0,0,(function(){return ""+st.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)})),H("Hmm",0,0,(function(){return ""+this.hours()+N(this.minutes(),2)})),H("Hmmss",0,0,(function(){return ""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)})),it("a",!0),it("A",!1),V("hour","h"),A("hour",13),fe("a",rt),fe("A",rt),fe("H",ne),fe("h",ne),fe("k",ne),fe("HH",ne,X),fe("hh",ne,X),fe("kk",ne,X),fe("hmm",se),fe("hmmss",ie),fe("Hmm",se),fe("Hmmss",ie),ge(["H","HH"],Se),ge(["k","kk"],(function(e,t,n){var s=z(e);t[Se]=24===s?0:s;})),ge(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e;})),ge(["h","hh"],(function(e,t,n){t[Se]=z(e),m(n).bigHour=!0;})),ge("hmm",(function(e,t,n){var s=e.length-2;t[Se]=z(e.substr(0,s)),t[Ye]=z(e.substr(s)),m(n).bigHour=!0;})),ge("hmmss",(function(e,t,n){var s=e.length-4,i=e.length-2;t[Se]=z(e.substr(0,s)),t[Ye]=z(e.substr(s,2)),t[Oe]=z(e.substr(i)),m(n).bigHour=!0;})),ge("Hmm",(function(e,t,n){var s=e.length-2;t[Se]=z(e.substr(0,s)),t[Ye]=z(e.substr(s));})),ge("Hmmss",(function(e,t,n){var s=e.length-4,i=e.length-2;t[Se]=z(e.substr(0,s)),t[Ye]=z(e.substr(s,2)),t[Oe]=z(e.substr(i));}));var at,ot=$("Hours",!0),ut={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Pe,monthsShort:Re,week:{dow:0,doy:6},weekdays:Be,weekdaysMin:Qe,weekdaysShort:Je,meridiemParse:/[ap]\.?m?\.?/i},lt={},ht={};function dt(e,t){var n,s=Math.min(e.length,t.length);for(n=0;n<s;n+=1)if(e[n]!==t[n])return n;return s}function ct(e){return e?e.toLowerCase().replace("_","-"):e}function ft(t){var n=null;if(void 0===lt[t]&&e&&e.exports&&function(e){return null!=e.match("^[^/\\\\]*$")}(t))try{n=at._abbr,(0,commonjsRequire)("./locale/"+t),mt(n);}catch(e){lt[t]=null;}return lt[t]}function mt(e,t){var n;return e&&((n=u(t)?yt(e):_t(e,t))?at=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),at._abbr}function _t(e,t){if(null!==t){var n,s=ut;if(t.abbr=e,null!=lt[e])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=lt[e]._config;else if(null!=t.parentLocale)if(null!=lt[t.parentLocale])s=lt[t.parentLocale]._config;else {if(null==(n=ft(t.parentLocale)))return ht[t.parentLocale]||(ht[t.parentLocale]=[]),ht[t.parentLocale].push({name:e,config:t}),null;s=n._config;}return lt[e]=new T(x(s,t)),ht[e]&&ht[e].forEach((function(e){_t(e.name,e.config);})),mt(e),lt[e]}return delete lt[e],null}function yt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return at;if(!i(e)){if(t=ft(e))return t;e=[e];}return function(e){for(var t,n,s,i,r=0;r<e.length;){for(t=(i=ct(e[r]).split("-")).length,n=(n=ct(e[r+1]))?n.split("-"):null;t>0;){if(s=ft(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&dt(i,n)>=t-1)break;t--;}r++;}return at}(e)}function gt(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[Me]<0||n[Me]>11?Me:n[De]<1||n[De]>Ne(n[ke],n[Me])?De:n[Se]<0||n[Se]>24||24===n[Se]&&(0!==n[Ye]||0!==n[Oe]||0!==n[be])?Se:n[Ye]<0||n[Ye]>59?Ye:n[Oe]<0||n[Oe]>59?Oe:n[be]<0||n[be]>999?be:-1,m(e)._overflowDayOfYear&&(t<ke||t>De)&&(t=De),m(e)._overflowWeeks&&-1===t&&(t=xe),m(e)._overflowWeekday&&-1===t&&(t=Te),m(e).overflow=t),e}var pt=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vt=/Z|[+-]\d\d(?::?\d\d)?/,kt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Mt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Dt=/^\/?Date\((-?\d+)/i,St=/^(?:(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{4}))$/,Yt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ot(e){var t,n,s,i,r,a,o=e._i,u=pt.exec(o)||wt.exec(o),l=kt.length,h=Mt.length;if(u){for(m(e).iso=!0,t=0,n=l;t<n;t++)if(kt[t][1].exec(u[1])){i=kt[t][0],s=!1!==kt[t][2];break}if(null==i)return void(e._isValid=!1);if(u[3]){for(t=0,n=h;t<n;t++)if(Mt[t][1].exec(u[3])){r=(u[2]||" ")+Mt[t][0];break}if(null==r)return void(e._isValid=!1)}if(!s&&null!=r)return void(e._isValid=!1);if(u[4]){if(!vt.exec(u[4]))return void(e._isValid=!1);a="Z";}e._f=i+(r||"")+(a||""),Pt(e);}else e._isValid=!1;}function bt(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function xt(e){var t,n,s,i,r,a,o,u,l=St.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(l){if(n=l[4],s=l[3],i=l[2],r=l[5],a=l[6],o=l[7],u=[bt(n),Re.indexOf(s),parseInt(i,10),parseInt(r,10),parseInt(a,10)],o&&u.push(parseInt(o,10)),t=u,!function(e,t,n){return !e||Je.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(n).weekdayMismatch=!0,n._isValid=!1,!1)}(l[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return Yt[e];if(t)return 0;var s=parseInt(n,10),i=s%100;return (s-i)/100*60+i}(l[8],l[9],l[10]),e._d=Ae.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0;}else e._isValid=!1;}function Tt(e,t,n){return null!=e?e:null!=t?t:n}function Nt(e){var t,n,i,r,a,o=[];if(!e._d){for(i=function(e){var t=new Date(s.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[De]&&null==e._a[Me]&&function(e){var t,n,s,i,r,a,o,u,l;null!=(t=e._w).GG||null!=t.W||null!=t.E?(r=1,a=4,n=Tt(t.GG,e._a[ke],ze(Ct(),1,4).year),s=Tt(t.W,1),((i=Tt(t.E,1))<1||i>7)&&(u=!0)):(r=e._locale._week.dow,a=e._locale._week.doy,l=ze(Ct(),r,a),n=Tt(t.gg,e._a[ke],l.year),s=Tt(t.w,l.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||t.e>6)&&(u=!0)):i=r),s<1||s>$e(n,r,a)?m(e)._overflowWeeks=!0:null!=u?m(e)._overflowWeekday=!0:(o=Ze(n,s,i,r,a),e._a[ke]=o.year,e._dayOfYear=o.dayOfYear);}(e),null!=e._dayOfYear&&(a=Tt(e._a[ke],i[ke]),(e._dayOfYear>Ge(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=Ae(a,0,e._dayOfYear),e._a[Me]=n.getUTCMonth(),e._a[De]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Se]&&0===e._a[Ye]&&0===e._a[Oe]&&0===e._a[be]&&(e._nextDay=!0,e._a[Se]=0),e._d=(e._useUTC?Ae:je).apply(null,o),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Se]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(m(e).weekdayMismatch=!0);}}function Pt(e){if(e._f!==s.ISO_8601)if(e._f!==s.RFC_2822){e._a=[],m(e).empty=!0;var t,n,i,r,a,o,u,l=""+e._i,h=l.length,d=0;for(u=(i=F(e._f,e._locale).match(P)||[]).length,t=0;t<u;t++)r=i[t],(n=(l.match(me(r,e))||[])[0])&&((a=l.substr(0,l.indexOf(n))).length>0&&m(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),d+=n.length),C[r]?(n?m(e).empty=!1:m(e).unusedTokens.push(r),we(r,n,e)):e._strict&&!n&&m(e).unusedTokens.push(r);m(e).charsLeftOver=h-d,l.length>0&&m(e).unusedInput.push(l),e._a[Se]<=12&&!0===m(e).bigHour&&e._a[Se]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[Se]=function(e,t,n){var s;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0),t):t}(e._locale,e._a[Se],e._meridiem),null!==(o=m(e).era)&&(e._a[ke]=e._locale.erasConvertYear(o,e._a[ke])),Nt(e),gt(e);}else xt(e);else Ot(e);}function Rt(e){var t=e._i,n=e._f;return e._locale=e._locale||yt(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),k(t)?new v(gt(t)):(h(t)?e._d=t:i(n)?function(e){var t,n,s,i,r,a,o=!1,u=e._f.length;if(0===u)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<u;i++)r=0,a=!1,t=w({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Pt(t),_(t)&&(a=!0),r+=m(t).charsLeftOver,r+=10*m(t).unusedTokens.length,m(t).score=r,o?r<s&&(s=r,n=t):(null==s||r<s||a)&&(s=r,n=t,a&&(o=!0));c(e,n||t);}(e):n?Pt(e):function(e){var t=e._i;u(t)?e._d=new Date(s.now()):h(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=Dt.exec(e._i);null===t?(Ot(e),!1===e._isValid&&(delete e._isValid,xt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:s.createFromInputFallback(e)))):e._d=new Date(+t[1]);}(e):i(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),Nt(e)):r(t)?function(e){if(!e._d){var t=E(e._i),n=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Nt(e);}}(e):l(t)?e._d=new Date(t):s.createFromInputFallback(e);}(e),_(e)||(e._d=null),e))}function Wt(e,t,n,s,a){var u,l={};return !0!==t&&!1!==t||(s=t,t=void 0),!0!==n&&!1!==n||(s=n,n=void 0),(r(e)&&o(e)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=n,l._i=e,l._f=t,l._strict=s,(u=new v(gt(Rt(l))))._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function Ct(e,t,n,s){return Wt(e,t,n,s,!1)}s.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""));})),s.ISO_8601=function(){},s.RFC_2822=function(){};var Ht=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),Ut=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Ct.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function Ft(e,t){var n,s;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Ct();for(n=t[0],s=1;s<t.length;++s)t[s].isValid()&&!t[s][e](n)||(n=t[s]);return n}var Lt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Vt(e){var t=E(e),n=t.year||0,s=t.quarter||0,i=t.month||0,r=t.week||t.isoWeek||0,o=t.day||0,u=t.hour||0,l=t.minute||0,h=t.second||0,d=t.millisecond||0;this._isValid=function(e){var t,n,s=!1,i=Lt.length;for(t in e)if(a(e,t)&&(-1===ve.call(Lt,t)||null!=e[t]&&isNaN(e[t])))return !1;for(n=0;n<i;++n)if(e[Lt[n]]){if(s)return !1;parseFloat(e[Lt[n]])!==z(e[Lt[n]])&&(s=!0);}return !0}(t),this._milliseconds=+d+1e3*h+6e4*l+1e3*u*60*60,this._days=+o+7*r,this._months=+i+3*s+12*n,this._data={},this._locale=yt(),this._bubble();}function Gt(e){return e instanceof Vt}function Et(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function jt(e,t){H(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+N(~~(e/60),2)+t+N(~~e%60,2)}));}jt("Z",":"),jt("ZZ",""),fe("Z",de),fe("ZZ",de),ge(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=It(de,e);}));var At=/([\+\-]|\d\d)/gi;function It(e,t){var n,s,i=(t||"").match(e);return null===i?null:0===(s=60*(n=((i[i.length-1]||[])+"").match(At)||["-",0,0])[1]+z(n[2]))?0:"+"===n[0]?s:-s}function Zt(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(k(e)||h(e)?e.valueOf():Ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),s.updateOffset(n,!1),n):Ct(e).local()}function zt(e){return -Math.round(e._d.getTimezoneOffset())}function $t(){return !!this.isValid()&&this._isUTC&&0===this._offset}s.updateOffset=function(){};var qt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Bt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Jt(e,t){var n,s,i,r,o,u,h=e,d=null;return Gt(e)?h={ms:e._milliseconds,d:e._days,M:e._months}:l(e)||!isNaN(+e)?(h={},t?h[t]=+e:h.milliseconds=+e):(d=qt.exec(e))?(n="-"===d[1]?-1:1,h={y:0,d:z(d[De])*n,h:z(d[Se])*n,m:z(d[Ye])*n,s:z(d[Oe])*n,ms:z(Et(1e3*d[be]))*n}):(d=Bt.exec(e))?(n="-"===d[1]?-1:1,h={y:Qt(d[2],n),M:Qt(d[3],n),w:Qt(d[4],n),d:Qt(d[5],n),h:Qt(d[6],n),m:Qt(d[7],n),s:Qt(d[8],n)}):null==h?h={}:"object"==typeof h&&("from"in h||"to"in h)&&(r=Ct(h.from),o=Ct(h.to),i=r.isValid()&&o.isValid()?(o=Zt(o,r),r.isBefore(o)?u=Xt(r,o):((u=Xt(o,r)).milliseconds=-u.milliseconds,u.months=-u.months),u):{milliseconds:0,months:0},(h={}).ms=i.milliseconds,h.M=i.months),s=new Vt(h),Gt(e)&&a(e,"_locale")&&(s._locale=e._locale),Gt(e)&&a(e,"_isValid")&&(s._isValid=e._isValid),s}function Qt(e,t){var n=e&&parseFloat(e.replace(",","."));return (isNaN(n)?0:n)*t}function Xt(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Kt(e,t){return function(n,s){var i;return null===s||isNaN(+s)||(O(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=s,s=i),en(this,Jt(n,s),e),this}}function en(e,t,n,i){var r=t._milliseconds,a=Et(t._days),o=Et(t._months);e.isValid()&&(i=null==i||i,o&&Fe(e,q(e,"Month")+o*n),a&&B(e,"Date",q(e,"Date")+a*n),r&&e._d.setTime(e._d.valueOf()+r*n),i&&s.updateOffset(e,a||o));}Jt.fn=Vt.prototype,Jt.invalid=function(){return Jt(NaN)};var tn=Kt(1,"add"),nn=Kt(-1,"subtract");function sn(e){return "string"==typeof e||e instanceof String}function rn(e){return k(e)||h(e)||sn(e)||l(e)||function(e){var t=i(e),n=!1;return t&&(n=0===e.filter((function(t){return !l(t)&&sn(e)})).length),t&&n}(e)||function(e){var t,n,s=r(e)&&!o(e),i=!1,u=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],l=u.length;for(t=0;t<l;t+=1)n=u[t],i=i||a(e,n);return s&&i}(e)||null==e}function an(e,t){if(e.date()<t.date())return -an(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(n,"months");return -(n+(t-s<0?(t-s)/(s-e.clone().add(n-1,"months")):(t-s)/(e.clone().add(n+1,"months")-s)))||0}function on(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yt(e))&&(this._locale=t),this)}s.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",s.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var un=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ln(){return this._locale}var hn=1e3,dn=6e4,cn=36e5,fn=126227808e5;function mn(e,t){return (e%t+t)%t}function _n(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-fn:new Date(e,t,n).valueOf()}function yn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-fn:Date.UTC(e,t,n)}function gn(e,t){return t.erasAbbrRegex(e)}function pn(){var e,t,n=[],s=[],i=[],r=[],a=this.eras();for(e=0,t=a.length;e<t;++e)s.push(_e(a[e].name)),n.push(_e(a[e].abbr)),i.push(_e(a[e].narrow)),r.push(_e(a[e].name)),r.push(_e(a[e].abbr)),r.push(_e(a[e].narrow));this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+i.join("|")+")","i");}function wn(e,t){H(0,[e,e.length],0,t);}function vn(e,t,n,s,i){var r;return null==e?ze(this,s,i).year:(t>(r=$e(e,s,i))&&(t=r),kn.call(this,e,t,n,s,i))}function kn(e,t,n,s,i){var r=Ze(e,t,n,s,i),a=Ae(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}H("N",0,0,"eraAbbr"),H("NN",0,0,"eraAbbr"),H("NNN",0,0,"eraAbbr"),H("NNNN",0,0,"eraName"),H("NNNNN",0,0,"eraNarrow"),H("y",["y",1],"yo","eraYear"),H("y",["yy",2],0,"eraYear"),H("y",["yyy",3],0,"eraYear"),H("y",["yyyy",4],0,"eraYear"),fe("N",gn),fe("NN",gn),fe("NNN",gn),fe("NNNN",(function(e,t){return t.erasNameRegex(e)})),fe("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),ge(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,s){var i=n._locale.erasParse(e,s,n._strict);i?m(n).era=i:m(n).invalidEra=e;})),fe("y",ue),fe("yy",ue),fe("yyy",ue),fe("yyyy",ue),fe("yo",(function(e,t){return t._eraYearOrdinalRegex||ue})),ge(["y","yy","yyy","yyyy"],ke),ge(["yo"],(function(e,t,n,s){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[ke]=n._locale.eraYearOrdinalParse(e,i):t[ke]=parseInt(e,10);})),H(0,["gg",2],0,(function(){return this.weekYear()%100})),H(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),wn("gggg","weekYear"),wn("ggggg","weekYear"),wn("GGGG","isoWeekYear"),wn("GGGGG","isoWeekYear"),V("weekYear","gg"),V("isoWeekYear","GG"),A("weekYear",1),A("isoWeekYear",1),fe("G",le),fe("g",le),fe("GG",ne,X),fe("gg",ne,X),fe("GGGG",ae,ee),fe("gggg",ae,ee),fe("GGGGG",oe,te),fe("ggggg",oe,te),pe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,s){t[s.substr(0,2)]=z(e);})),pe(["gg","GG"],(function(e,t,n,i){t[i]=s.parseTwoDigitYear(e);})),H("Q",0,"Qo","quarter"),V("quarter","Q"),A("quarter",7),fe("Q",Q),ge("Q",(function(e,t){t[Me]=3*(z(e)-1);})),H("D",["DD",2],"Do","date"),V("date","D"),A("date",9),fe("D",ne),fe("DD",ne,X),fe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),ge(["D","DD"],De),ge("Do",(function(e,t){t[De]=z(e.match(ne)[0]);}));var Mn=$("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),V("dayOfYear","DDD"),A("dayOfYear",4),fe("DDD",re),fe("DDDD",K),ge(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=z(e);})),H("m",["mm",2],0,"minute"),V("minute","m"),A("minute",14),fe("m",ne),fe("mm",ne,X),ge(["m","mm"],Ye);var Dn=$("Minutes",!1);H("s",["ss",2],0,"second"),V("second","s"),A("second",15),fe("s",ne),fe("ss",ne,X),ge(["s","ss"],Oe);var Sn,Yn,On=$("Seconds",!1);for(H("S",0,0,(function(){return ~~(this.millisecond()/100)})),H(0,["SS",2],0,(function(){return ~~(this.millisecond()/10)})),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),H(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),H(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),H(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),H(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),H(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),V("millisecond","ms"),A("millisecond",16),fe("S",re,Q),fe("SS",re,X),fe("SSS",re,K),Sn="SSSS";Sn.length<=9;Sn+="S")fe(Sn,ue);function bn(e,t){t[be]=z(1e3*("0."+e));}for(Sn="S";Sn.length<=9;Sn+="S")ge(Sn,bn);Yn=$("Milliseconds",!1),H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var xn=v.prototype;function Tn(e){return e}xn.add=tn,xn.calendar=function(e,t){1===arguments.length&&(arguments[0]?rn(arguments[0])?(e=arguments[0],t=void 0):function(e){var t,n=r(e)&&!o(e),s=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<i.length;t+=1)s=s||a(e,i[t]);return n&&s}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Ct(),i=Zt(n,this).startOf("day"),u=s.calendarFormat(this,i)||"sameElse",l=t&&(b(t[u])?t[u].call(this,n):t[u]);return this.format(l||this.localeData().calendar(u,this,Ct(n)))},xn.clone=function(){return new v(this)},xn.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Zt(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=G(t)){case"year":r=an(this,s)/12;break;case"month":r=an(this,s);break;case"quarter":r=an(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s;}return n?r:Z(r)},xn.endOf=function(e){var t,n;if(void 0===(e=G(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?yn:_n,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=cn-mn(t+(this._isUTC?0:this.utcOffset()*dn),cn)-1;break;case"minute":t=this._d.valueOf(),t+=dn-mn(t,dn)-1;break;case"second":t=this._d.valueOf(),t+=hn-mn(t,hn)-1;}return this._d.setTime(t),s.updateOffset(this,!0),this},xn.format=function(e){e||(e=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var t=U(this,e);return this.localeData().postformat(t)},xn.from=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Ct(e).isValid())?Jt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},xn.fromNow=function(e){return this.from(Ct(),e)},xn.to=function(e,t){return this.isValid()&&(k(e)&&e.isValid()||Ct(e).isValid())?Jt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},xn.toNow=function(e){return this.to(Ct(),e)},xn.get=function(e){return b(this[e=G(e)])?this[e]():this},xn.invalidAt=function(){return m(this).overflow},xn.isAfter=function(e,t){var n=k(e)?e:Ct(e);return !(!this.isValid()||!n.isValid())&&("millisecond"===(t=G(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},xn.isBefore=function(e,t){var n=k(e)?e:Ct(e);return !(!this.isValid()||!n.isValid())&&("millisecond"===(t=G(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},xn.isBetween=function(e,t,n,s){var i=k(e)?e:Ct(e),r=k(t)?t:Ct(t);return !!(this.isValid()&&i.isValid()&&r.isValid())&&("("===(s=s||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===s[1]?this.isBefore(r,n):!this.isAfter(r,n))},xn.isSame=function(e,t){var n,s=k(e)?e:Ct(e);return !(!this.isValid()||!s.isValid())&&("millisecond"===(t=G(t)||"millisecond")?this.valueOf()===s.valueOf():(n=s.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},xn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},xn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},xn.isValid=function(){return _(this)},xn.lang=un,xn.locale=on,xn.localeData=ln,xn.max=Ut,xn.min=Ht,xn.parsingFlags=function(){return c({},m(this))},xn.set=function(e,t){if("object"==typeof e){var n,s=function(e){var t,n=[];for(t in e)a(e,t)&&n.push({unit:t,priority:j[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=E(e)),i=s.length;for(n=0;n<i;n++)this[s[n].unit](e[s[n].unit]);}else if(b(this[e=G(e)]))return this[e](t);return this},xn.startOf=function(e){var t,n;if(void 0===(e=G(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?yn:_n,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=mn(t+(this._isUTC?0:this.utcOffset()*dn),cn);break;case"minute":t=this._d.valueOf(),t-=mn(t,dn);break;case"second":t=this._d.valueOf(),t-=mn(t,hn);}return this._d.setTime(t),s.updateOffset(this,!0),this},xn.subtract=nn,xn.toArray=function(){var e=this;return [e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},xn.toObject=function(){var e=this;return {years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}},xn.toDate=function(){return new Date(this.valueOf())},xn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?U(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):b(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",U(n,"Z")):U(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},xn.inspect=function(){if(!this.isValid())return "moment.invalid(/* "+this._i+" */)";var e,t,n,s="moment",i="";return this.isLocal()||(s=0===this.utcOffset()?"moment.utc":"moment.parseZone",i="Z"),e="["+s+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=i+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(xn[Symbol.for("nodejs.util.inspect.custom")]=function(){return "Moment<"+this.format()+">"}),xn.toJSON=function(){return this.isValid()?this.toISOString():null},xn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},xn.unix=function(){return Math.floor(this.valueOf()/1e3)},xn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},xn.creationData=function(){return {input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},xn.eraName=function(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until)return s[e].name;if(s[e].until<=n&&n<=s[e].since)return s[e].name}return ""},xn.eraNarrow=function(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until)return s[e].narrow;if(s[e].until<=n&&n<=s[e].since)return s[e].narrow}return ""},xn.eraAbbr=function(){var e,t,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until)return s[e].abbr;if(s[e].until<=n&&n<=s[e].since)return s[e].abbr}return ""},xn.eraYear=function(){var e,t,n,i,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=r[e].since<=r[e].until?1:-1,i=this.clone().startOf("day").valueOf(),r[e].since<=i&&i<=r[e].until||r[e].until<=i&&i<=r[e].since)return (this.year()-s(r[e].since).year())*n+r[e].offset;return this.year()},xn.year=Ee,xn.isLeapYear=function(){return I(this.year())},xn.weekYear=function(e){return vn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},xn.isoWeekYear=function(e){return vn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},xn.quarter=xn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},xn.month=Le,xn.daysInMonth=function(){return Ne(this.year(),this.month())},xn.week=xn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},xn.isoWeek=xn.isoWeeks=function(e){var t=ze(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},xn.weeksInYear=function(){var e=this.localeData()._week;return $e(this.year(),e.dow,e.doy)},xn.weeksInWeekYear=function(){var e=this.localeData()._week;return $e(this.weekYear(),e.dow,e.doy)},xn.isoWeeksInYear=function(){return $e(this.year(),1,4)},xn.isoWeeksInISOWeekYear=function(){return $e(this.isoWeekYear(),1,4)},xn.date=Mn,xn.day=xn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return "string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},xn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},xn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return "string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},xn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},xn.hour=xn.hours=ot,xn.minute=xn.minutes=Dn,xn.second=xn.seconds=On,xn.millisecond=xn.milliseconds=Yn,xn.utcOffset=function(e,t,n){var i,r=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=It(de,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return !this._isUTC&&t&&(i=zt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?en(this,Jt(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,s.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:zt(this)},xn.utc=function(e){return this.utcOffset(0,e)},xn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(zt(this),"m")),this},xn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=It(he,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0);}return this},xn.hasAlignedHourOffset=function(e){return !!this.isValid()&&(e=e?Ct(e).utcOffset():0,(this.utcOffset()-e)%60==0)},xn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},xn.isLocal=function(){return !!this.isValid()&&!this._isUTC},xn.isUtcOffset=function(){return !!this.isValid()&&this._isUTC},xn.isUtc=$t,xn.isUTC=$t,xn.zoneAbbr=function(){return this._isUTC?"UTC":""},xn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},xn.dates=D("dates accessor is deprecated. Use date instead.",Mn),xn.months=D("months accessor is deprecated. Use month instead",Le),xn.years=D("years accessor is deprecated. Use year instead",Ee),xn.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),xn.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=Rt(t))._a?(e=t._isUTC?f(t._a):Ct(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s<i;s++)(n&&e[s]!==t[s]||!n&&z(e[s])!==z(t[s]))&&a++;return a+r}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var Nn=T.prototype;function Pn(e,t,n,s){var i=yt(),r=f().set(s,t);return i[n](r,e)}function Rn(e,t,n){if(l(e)&&(t=e,e=void 0),e=e||"",null!=t)return Pn(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=Pn(e,s,n,"month");return i}function Wn(e,t,n,s){"boolean"==typeof e?(l(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,l(t)&&(n=t,t=void 0),t=t||"");var i,r=yt(),a=e?r._week.dow:0,o=[];if(null!=n)return Pn(t,(n+a)%7,s,"day");for(i=0;i<7;i++)o[i]=Pn(t,(i+a)%7,s,"day");return o}Nn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return b(s)?s.call(t,n):s},Nn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(P).map((function(e){return "MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},Nn.invalidDate=function(){return this._invalidDate},Nn.ordinal=function(e){return this._ordinal.replace("%d",e)},Nn.preparse=Tn,Nn.postformat=Tn,Nn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return b(i)?i(e,t,n,s):i.replace(/%d/i,e)},Nn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return b(n)?n(t):n.replace(/%s/i,t)},Nn.set=function(e){var t,n;for(n in e)a(e,n)&&(b(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source);},Nn.eras=function(e,t){var n,i,r,a=this._eras||yt("en")._eras;for(n=0,i=a.length;n<i;++n)switch("string"==typeof a[n].since&&(r=s(a[n].since).startOf("day"),a[n].since=r.valueOf()),typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":r=s(a[n].until).startOf("day").valueOf(),a[n].until=r.valueOf();}return a},Nn.erasParse=function(e,t,n){var s,i,r,a,o,u=this.eras();for(e=e.toUpperCase(),s=0,i=u.length;s<i;++s)if(r=u[s].name.toUpperCase(),a=u[s].abbr.toUpperCase(),o=u[s].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(a===e)return u[s];break;case"NNNN":if(r===e)return u[s];break;case"NNNNN":if(o===e)return u[s]}else if([r,a,o].indexOf(e)>=0)return u[s]},Nn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?s(e.since).year():s(e.since).year()+(t-e.offset)*n},Nn.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||pn.call(this),e?this._erasAbbrRegex:this._erasRegex},Nn.erasNameRegex=function(e){return a(this,"_erasNameRegex")||pn.call(this),e?this._erasNameRegex:this._erasRegex},Nn.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||pn.call(this),e?this._erasNarrowRegex:this._erasRegex},Nn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||We).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},Nn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[We.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},Nn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return Ue.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=f([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},Nn.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ve.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=He),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},Nn.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Ve.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=Ce),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},Nn.week=function(e){return ze(e,this._week.dow,this._week.doy).week},Nn.firstDayOfYear=function(){return this._week.doy},Nn.firstDayOfWeek=function(){return this._week.dow},Nn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return !0===e?qe(n,this._week.dow):e?n[e.day()]:n},Nn.weekdaysMin=function(e){return !0===e?qe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},Nn.weekdaysShort=function(e){return !0===e?qe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},Nn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return tt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=f([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},Nn.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Xe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},Nn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ke),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},Nn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||nt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=et),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},Nn.isPM=function(e){return "p"===(e+"").toLowerCase().charAt(0)},Nn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},mt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===z(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),s.lang=D("moment.lang is deprecated. Use moment.locale instead.",mt),s.langData=D("moment.langData is deprecated. Use moment.localeData instead.",yt);var Cn=Math.abs;function Hn(e,t,n,s){var i=Jt(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function Un(e){return e<0?Math.floor(e):Math.ceil(e)}function Fn(e){return 4800*e/146097}function Ln(e){return 146097*e/4800}function Vn(e){return function(){return this.as(e)}}var Gn=Vn("ms"),En=Vn("s"),jn=Vn("m"),An=Vn("h"),In=Vn("d"),Zn=Vn("w"),zn=Vn("M"),$n=Vn("Q"),qn=Vn("y");function Bn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Jn=Bn("milliseconds"),Qn=Bn("seconds"),Xn=Bn("minutes"),Kn=Bn("hours"),es=Bn("days"),ts=Bn("months"),ns=Bn("years"),ss=Math.round,is={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function rs(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}var as=Math.abs;function os(e){return (e>0)-(e<0)||+e}function us(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,s,i,r,a,o,u=as(this._milliseconds)/1e3,l=as(this._days),h=as(this._months),d=this.asSeconds();return d?(e=Z(u/60),t=Z(e/60),u%=60,e%=60,n=Z(h/12),h%=12,s=u?u.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",r=os(this._months)!==os(d)?"-":"",a=os(this._days)!==os(d)?"-":"",o=os(this._milliseconds)!==os(d)?"-":"",i+"P"+(n?r+n+"Y":"")+(h?r+h+"M":"")+(l?a+l+"D":"")+(t||e||u?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(u?o+s+"S":"")):"P0D"}var ls=Vt.prototype;return ls.isValid=function(){return this._isValid},ls.abs=function(){var e=this._data;return this._milliseconds=Cn(this._milliseconds),this._days=Cn(this._days),this._months=Cn(this._months),e.milliseconds=Cn(e.milliseconds),e.seconds=Cn(e.seconds),e.minutes=Cn(e.minutes),e.hours=Cn(e.hours),e.months=Cn(e.months),e.years=Cn(e.years),this},ls.add=function(e,t){return Hn(this,e,t,1)},ls.subtract=function(e,t){return Hn(this,e,t,-1)},ls.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=G(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+Fn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ln(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},ls.asMilliseconds=Gn,ls.asSeconds=En,ls.asMinutes=jn,ls.asHours=An,ls.asDays=In,ls.asWeeks=Zn,ls.asMonths=zn,ls.asQuarters=$n,ls.asYears=qn,ls.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*z(this._months/12):NaN},ls._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return r>=0&&a>=0&&o>=0||r<=0&&a<=0&&o<=0||(r+=864e5*Un(Ln(o)+a),a=0,o=0),u.milliseconds=r%1e3,e=Z(r/1e3),u.seconds=e%60,t=Z(e/60),u.minutes=t%60,n=Z(t/60),u.hours=n%24,a+=Z(n/24),o+=i=Z(Fn(a)),a-=Un(Ln(i)),s=Z(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},ls.clone=function(){return Jt(this)},ls.get=function(e){return e=G(e),this.isValid()?this[e+"s"]():NaN},ls.milliseconds=Jn,ls.seconds=Qn,ls.minutes=Xn,ls.hours=Kn,ls.days=es,ls.weeks=function(){return Z(this.days()/7)},ls.months=ts,ls.years=ns,ls.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,s,i=!1,r=is;return "object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(r=Object.assign({},is,t),null!=t.s&&null==t.ss&&(r.ss=t.s-1)),s=function(e,t,n,s){var i=Jt(e).abs(),r=ss(i.as("s")),a=ss(i.as("m")),o=ss(i.as("h")),u=ss(i.as("d")),l=ss(i.as("M")),h=ss(i.as("w")),d=ss(i.as("y")),c=r<=n.ss&&["s",r]||r<n.s&&["ss",r]||a<=1&&["m"]||a<n.m&&["mm",a]||o<=1&&["h"]||o<n.h&&["hh",o]||u<=1&&["d"]||u<n.d&&["dd",u];return null!=n.w&&(c=c||h<=1&&["w"]||h<n.w&&["ww",h]),(c=c||l<=1&&["M"]||l<n.M&&["MM",l]||d<=1&&["y"]||["yy",d])[2]=t,c[3]=+e>0,c[4]=s,rs.apply(null,c)}(this,!i,r,n=this.localeData()),i&&(s=n.pastFuture(+this,s)),n.postformat(s)},ls.toISOString=us,ls.toString=us,ls.toJSON=us,ls.locale=on,ls.localeData=ln,ls.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",us),ls.lang=un,H("X",0,0,"unix"),H("x",0,0,"valueOf"),fe("x",le),fe("X",/[+-]?\d+(\.\d{1,3})?/),ge("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e));})),ge("x",(function(e,t,n){n._d=new Date(z(e));})),
//! moment.js
s.version="2.29.4",t=Ct,s.fn=xn,s.min=function(){return Ft("isBefore",[].slice.call(arguments,0))},s.max=function(){return Ft("isAfter",[].slice.call(arguments,0))},s.now=function(){return Date.now?Date.now():+new Date},s.utc=f,s.unix=function(e){return Ct(1e3*e)},s.months=function(e,t){return Rn(e,t,"months")},s.isDate=h,s.locale=mt,s.invalid=y,s.duration=Jt,s.isMoment=k,s.weekdays=function(e,t,n){return Wn(e,t,n,"weekdays")},s.parseZone=function(){return Ct.apply(null,arguments).parseZone()},s.localeData=yt,s.isDuration=Gt,s.monthsShort=function(e,t){return Rn(e,t,"monthsShort")},s.weekdaysMin=function(e,t,n){return Wn(e,t,n,"weekdaysMin")},s.defineLocale=_t,s.updateLocale=function(e,t){if(null!=t){var n,s,i=ut;null!=lt[e]&&null!=lt[e].parentLocale?lt[e].set(x(lt[e]._config,t)):(null!=(s=ft(e))&&(i=s._config),t=x(i,t),null==s&&(t.abbr=e),(n=new T(t)).parentLocale=lt[e],lt[e]=n),mt(e);}else null!=lt[e]&&(null!=lt[e].parentLocale?(lt[e]=lt[e].parentLocale,e===mt()&&mt(e)):null!=lt[e]&&delete lt[e]);return lt[e]},s.locales=function(){return S(lt)},s.weekdaysShort=function(e,t,n){return Wn(e,t,n,"weekdaysShort")},s.normalizeUnits=G,s.relativeTimeRounding=function(e){return void 0===e?ss:"function"==typeof e&&(ss=e,!0)},s.relativeTimeThreshold=function(e,t){return void 0!==is[e]&&(void 0===t?is[e]:(is[e]=t,"s"===e&&(is.ss=t-1),!0))},s.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},s.prototype=xn,s.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},s},e.exports=n();}));
const _hasBuffer="function"==typeof Buffer,_TD="function"==typeof TextDecoder?new TextDecoder:void 0;"function"==typeof TextEncoder?new TextEncoder:void 0;const b64ch="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b64chs=Array.prototype.slice.call(b64ch),b64tab=(()=>{let e={};return b64chs.forEach(((t,r)=>e[t]=r)),e})(),b64re=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,_fromCC=String.fromCharCode.bind(String),_U8Afrom="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),_tidyB64=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),re_btou=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,cb_btou=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return _fromCC(55296+(t>>>10))+_fromCC(56320+(1023&t));case 3:return _fromCC((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return _fromCC((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},btou=e=>e.replace(re_btou,cb_btou),atobPolyfill=e=>{if(e=e.replace(/\s+/g,""),!b64re.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,o,n="";for(let a=0;a<e.length;)t=b64tab[e.charAt(a++)]<<18|b64tab[e.charAt(a++)]<<12|(r=b64tab[e.charAt(a++)])<<6|(o=b64tab[e.charAt(a++)]),n+=64===r?_fromCC(t>>16&255):64===o?_fromCC(t>>16&255,t>>8&255):_fromCC(t>>16&255,t>>8&255,255&t);return n},_atob="function"==typeof atob?e=>atob(_tidyB64(e)):_hasBuffer?e=>Buffer.from(e,"base64").toString("binary"):atobPolyfill,_toUint8Array=_hasBuffer?e=>_U8Afrom(Buffer.from(e,"base64")):e=>_U8Afrom(_atob(e).split("").map((e=>e.charCodeAt(0)))),_decode=_hasBuffer?e=>Buffer.from(e,"base64").toString("utf8"):_TD?e=>_TD.decode(_toUint8Array(e)):e=>btou(_atob(e)),_unURI=e=>_tidyB64(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),decode=e=>_decode(_unURI(e));
class Utils{static['getBlocks'](_0x3f5dd0){let _0x55f58c=(_0x3f5dd0||'')['matchAll'](this['fetchBlocksRegExp']),_0x5b53e5={'highlights':'','pagenote':'','mdcontent':''};if(!_0x55f58c)return _0x5b53e5;for(const _0x540e47 of _0x55f58c){switch((_0x540e47[0x1]||'')['toLowerCase']()){case'pagenote':_0x5b53e5['pagenote']['length']<=0x0&&(_0x5b53e5['pagenote']=_0x540e47[0x0]||'');break;case'highlights':_0x5b53e5['highlights']['length']<=0x0&&(_0x5b53e5['highlights']=_0x540e47[0x0]||'');break;case'mdcontent':_0x5b53e5['mdcontent']['length']<=0x0&&(_0x5b53e5['mdcontent']=_0x540e47[0x0]||'');}}return _0x5b53e5;}static['getDiffDay'](_0xa68cba,_0x15b0f8){if(_0x15b0f8<=0x0||_0xa68cba<=0x0)return 0x0;return this['formatDateTime'](new Date(0x3e8*_0xa68cba),'YYYY-MM-DD')!==this['formatDateTime'](new Date(0x3e8*_0x15b0f8),'YYYY-MM-DD')?_0x15b0f8:0x0;}static['formatText'](_0x3d31ca='',_0x2df509='\x0d'){return _0x3d31ca?_0x3d31ca['split']('\x0a')['filter'](_0x269a36=>Utils['trimString'](_0x269a36))['join'](_0x2df509):'';}static['formatPageTitle'](_0x5cd3e0){return (_0x5cd3e0=_0x5cd3e0||_0x5cd3e0)['length']<=0x0?_0x5cd3e0:(_0x5cd3e0=_0x5cd3e0['replace'](/["]/g,''))['replace'](/(:\s+)/g,':');}static['replaceHolders'](_0x587b1d,_0x56d6b2){return _0x587b1d=_0x587b1d||'',(Object['keys'](_0x56d6b2||{})['forEach'](_0x288e4e=>{let _0x4f8773=this['holdersRegExpMap'][_0x288e4e];if(!_0x4f8773)return;let _0xd827a8=(_0x56d6b2[_0x288e4e]||'')['replace'](/(^[\r\n]+|[\r\n]+$)/g,'');if(!_0xd827a8||_0xd827a8['length']<=0x0)return;let _0x39b936=_0x587b1d['matchAll'](_0x4f8773);if(!_0x39b936)return _0x587b1d+=this['wrapBlock'](_0xd827a8,_0x288e4e);let _0x267240=0x0;for(const _0x1f1e71 of _0x39b936){let _0x47f7a8=_0x1f1e71[0x1]['length'],_0x4c0395=_0x587b1d['substring'](_0x1f1e71['index']+_0x47f7a8);_0x587b1d=_0x587b1d['substring'](0x0,_0x1f1e71['index'])+this['wrapBlockNoBreak'](_0xd827a8,_0x288e4e)+_0x4c0395,_0x267240++;break;}_0x267240<=0x0&&(_0x587b1d+=this['wrapBlock'](_0xd827a8,_0x288e4e));}),_0x587b1d);}static['replaceBlocks'](_0x320c91,_0x26dc36){return _0x320c91=_0x320c91||'',(Object['keys'](_0x26dc36||{})['forEach'](_0x186f71=>{let _0x25cef1=this['blocksRegExpMap'][_0x186f71];if(!_0x25cef1)return;let _0x248a3f=(_0x26dc36[_0x186f71]||'')['replace'](/(^[\r\n]+|[\r\n]+$)/g,'');if(!_0x248a3f||_0x248a3f['length']<=0x0)return;let _0x31538d=_0x320c91['matchAll'](_0x25cef1);if(_0x31538d)for(const _0x1289ca of _0x31538d){let _0x345090=_0x1289ca[0x0]||'';_0x320c91=_0x320c91['replace'](_0x345090,_0x248a3f);break;}}),_0x320c91);}static['formatDateTime'](_0x10ef06,_0x27bd29='YYYY-MM-DD\x20HH:mm'){return _0x10ef06?moment(_0x10ef06)['format'](_0x27bd29):'';}static['trimString'](_0xb7c909){return !_0xb7c909||_0xb7c909['length']<=0x0?'':_0xb7c909['replace'](/^\s+|\s+$/g,'');}static['truncateFileName'](_0x2afbf5,_0x1b73ca,_0x15c37f){let _0x4d21b9=_0x2afbf5['lastIndexOf']('/');return (_0x15c37f<=0x40||_0x15c37f>=0xff)&&(_0x15c37f=0x40),_0x2afbf5['length']-(_0x4d21b9+0x1)+_0x1b73ca<=_0x15c37f?_0x2afbf5:_0x2afbf5['substring'](0x0,_0x4d21b9+0x1+(_0x15c37f-_0x1b73ca));}static['removeNoteIdFromName'](_0xba3e5f){return _0xba3e5f;}static['lmfn'](_0x50ab19,_0x407d83,_0x101daf,_0x40a755,_0x176205){var _0x1741b5;return __awaiter(this,void 0x0,void 0x0,function*(){let _0x51bb7c=0x1e,_0x290668=-0x1;const _0x175597=('-'+_0x407d83+'.md')['length'],_0x48dd4b=_0x101daf['substring'](0x0,_0x101daf['length']-_0x175597);for(;_0x51bb7c-->0x0;){_0x290668++;const _0x3364a4=_0x48dd4b+(_0x290668>0x0?'\x20('+_0x290668+').md':'.md');if(_0x3364a4===_0x101daf)return '';const _0x8edea8=yield _0x50ab19['getAbstractFileByPath'](_0x3364a4);if(!(_0x8edea8&&_0x8edea8 instanceof obsidian.TFile))return _0x3364a4;const _0x1bc2b0=(null===(_0x1741b5=_0x40a755['getFileCache'](_0x8edea8))||void 0x0===_0x1741b5?void 0x0:_0x1741b5['frontmatter'])||{};if(this['isEmptyObj'](_0x1bc2b0))return _0x3364a4;for(let _0x453613 of _0x176205)if(_0x1bc2b0[_0x453613]===_0x407d83)return _0x3364a4;}return '';});}static['lffnw'](_0x7e366,_0x3e8982,_0x116206,_0x1907ed,_0x4d0e35,_0x502f39,_0x4ba158,_0x31a232,_0x1e2a4b,_0x93b539){var _0x5e8124;return __awaiter(this,void 0x0,void 0x0,function*(){let _0x31dbc8=0x64,_0x558bde=-0x1;for(;_0x31dbc8-->0x0;){_0x558bde++;const _0x581a57=_0x558bde>0x0?'\x20('+_0x558bde+').md':'.md',_0x4b0e98=this['getFitFileName'](_0x1907ed,_0x581a57,_0x4d0e35,_0x502f39,_0x4ba158),_0xbbfb79=_0x93b539(_0x4b0e98,_0x581a57);if(!_0xbbfb79)continue;if(_0xbbfb79===_0x116206)return _0xbbfb79;const _0x4c8d6a=yield _0x7e366['getAbstractFileByPath'](_0xbbfb79);if(!(_0x4c8d6a&&_0x4c8d6a instanceof obsidian.TFile))return _0xbbfb79;const _0xe706bf=(null===(_0x5e8124=_0x31a232['getFileCache'](_0x4c8d6a))||void 0x0===_0x5e8124?void 0x0:_0x5e8124['frontmatter'])||{};if(this['isEmptyObj'](_0xe706bf))return _0xbbfb79;for(let _0x772684 of _0x1e2a4b)if(_0xe706bf[_0x772684]===_0x3e8982)return _0xbbfb79;}return '';});}static['getFitFileName'](_0xa3b877,_0x325109,_0x18d227,_0x5a300f,_0x597086){let _0x4c48af=_0x597086['render'](_0x18d227);if(_0x5a300f<=0x0)return _0x4c48af;const _0x111508=_0x325109['length'];let _0x1c7006=_0x4c48af['lastIndexOf']('/'),_0x3dcfd6=_0x4c48af['length']-(_0x1c7006+0x1)+_0x111508-_0x5a300f;return _0x3dcfd6>0x0&&(_0x18d227['title']=this['normalTitle'](_0xa3b877,_0xa3b877['length']-_0x3dcfd6),_0x4c48af=_0x597086['render'](_0x18d227)),this['truncateFileName'](_0x4c48af,_0x111508,_0x5a300f);}static['getPrefxFromAnnoPrefix'](_0x2164c0){if(!_0x2164c0||_0x2164c0['length']<=0x0)return '';let _0x1277de=_0x2164c0['indexOf']('\x20');return _0x1277de>0x0?_0x2164c0['substring'](0x0,_0x1277de+0x1):'';}static['trimWithLine'](_0x202bad){if(!_0x202bad||_0x202bad['length']<=0x0)return '';let _0x284b93=_0x202bad['split']('\x0a'),_0x4847d7=[];if(_0x284b93['length']>0x1){for(let _0x59b14a=0x0;_0x59b14a<_0x284b93['length'];_0x59b14a++){let _0x49e38f=_0x284b93[_0x59b14a]['replace'](/[\s\t]+/,'\x20')['replace'](/[\r\n]+/g,'')['trim']();_0x49e38f['length']>0x0&&_0x4847d7['push'](_0x49e38f);}_0x202bad=_0x4847d7['join']('\x0a');}else _0x202bad=_0x202bad['trim']();return _0x202bad;}static['removeEmojis'](_0x4be55a){if(!_0x4be55a||_0x4be55a['length']<=0x0)return '';return _0x4be55a['replace'](/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F1E0}-\u{1F1FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}]/gu,'');}static['normalTitle'](_0x2149e5,_0x5e7f0a=0x0){return _0x2149e5=(_0x2149e5=(_0x2149e5=_0x2149e5||'')['replace'](/[\s\t\n]+/g,'\x20'))['replace'](/[\~\\、\/\*"'<>%\$#&;;:??。,!!\|]/g,''),(_0x2149e5=this['removeEmojis'](_0x2149e5))['length']<=0x0?'No\x20title':_0x5e7f0a>0x0?_0x2149e5['substring'](0x0,_0x5e7f0a):_0x2149e5;}static['isWhiteSpaceForTagParser'](_0x2f422f){return 0xff0c==_0x2f422f||0x3002==_0x2f422f||0xff1b==_0x2f422f||0xff1f==_0x2f422f||(0xa==_0x2f422f||0xd==_0x2f422f||0x20<=_0x2f422f&&_0x2f422f<=0x22||0x24<=_0x2f422f&&_0x2f422f<=0x2c||0x2e==_0x2f422f||0x3a<=_0x2f422f&&_0x2f422f<=0x3f||0x3b==_0x2f422f||0x40==_0x2f422f||0x5b<=_0x2f422f&&_0x2f422f<=0x5e||0x7b<=_0x2f422f&&_0x2f422f<=0x7e||0xff0c==_0x2f422f);}static['convert2backlink'](_0x3ea1b1){if((_0x3ea1b1=_0x3ea1b1||'')['length']<=0x0)return _0x3ea1b1;if(_0x3ea1b1['indexOf']('#')<0x0)return _0x3ea1b1;const _0x4eebcd=_0x3ea1b1['length'];let _0x5947aa=-0x1;const _0x327984=_0x4eebcd-0x1,_0x27ea29=[];for(let _0x38a8c0=0x0;_0x38a8c0<_0x4eebcd;_0x38a8c0++){const _0x107be1=_0x3ea1b1['charCodeAt'](_0x38a8c0),_0x23a1a6=_0x38a8c0==_0x327984,_0x45e4a3=this['isWhiteSpaceForTagParser'](_0x107be1),_0x1059e6=_0x38a8c0-_0x5947aa;0x23===_0x107be1?(_0x5947aa>-0x1&&_0x1059e6>0x1&&_0x27ea29['push']([_0x5947aa,_0x38a8c0]),_0x5947aa=_0x38a8c0):_0x5947aa>-0x1&&(_0x45e4a3||_0x23a1a6)&&_0x1059e6>=0x1&&(_0x23a1a6&&!_0x45e4a3&&_0x1059e6>=0x1?_0x27ea29['push']([_0x5947aa,_0x38a8c0+0x1]):_0x1059e6>0x1&&_0x27ea29['push']([_0x5947aa,_0x38a8c0]),_0x5947aa=-0x1);}if(_0x27ea29['length']<=0x0)return _0x3ea1b1;const _0x22268f=[];let _0x12292a=0x0;for(const _0x4ba3dc of _0x27ea29){const _0x1cf24c=_0x4ba3dc[0x0],_0x364eef=_0x4ba3dc[0x1];_0x1cf24c-_0x12292a>0x0&&_0x22268f['push'](_0x3ea1b1['substring'](_0x12292a,_0x1cf24c)),_0x22268f['push']('[['+_0x3ea1b1['substring'](_0x1cf24c+0x1,_0x364eef)+']]'),_0x12292a=_0x364eef;}return _0x12292a>0x0&&_0x12292a<_0x3ea1b1['length']&&_0x22268f['push'](_0x3ea1b1['substring'](_0x12292a,_0x3ea1b1['length'])),_0x22268f['join']('');}static['gnpfte'](_0x7ddef5){if(!_0x7ddef5||_0x7ddef5['indexOf'](this['noteidxprop'])<0x0)return '';let _0x4c69b2=(_0x7ddef5=_0x7ddef5['trim']())['split']('\x0a')['filter'](_0x16d97f=>_0x16d97f),_0x392fe6=0x0,_0x13cf3f=[];for(let _0x536e7d of _0x4c69b2){if(_0x536e7d=_0x536e7d['trim'](),_0x392fe6>=0x2)break;'---'===_0x536e7d?_0x392fe6++:_0x536e7d&&_0x13cf3f['push'](_0x536e7d['trim']());}return _0x13cf3f=_0x13cf3f['filter'](_0x384941=>{if(!_0x384941)return !0x1;let _0xfc021=_0x384941['split'](':')['map'](_0x78f792=>_0x78f792['trim']());return 0x2===_0xfc021['length']&&(_0xfc021[0x1]=_0xfc021[0x1]['replace'](/['"]/g,''),_0xfc021[0x1]===this['noteidxprop']);})['map'](_0x4cceef=>{let _0x4315e5=_0x4cceef['split'](':')['map'](_0x150e30=>_0x150e30['trim']());return _0x4315e5[0x1]=_0x4315e5[0x1]['replace'](/['"]/g,''),_0x4315e5;}),_0x13cf3f['length']>0x0?_0x13cf3f[0x0][0x0]:'';}static['isIgnoreSync'](_0x30a377,_0x387d80){if(!_0x30a377||this['isEmptyObj'](_0x387d80))return !0x1;const _0x185d64=_0x30a377['split']('::');if(0x2!==_0x185d64['length'])return !0x1;const _0x2cddb9=_0x185d64[0x0]['trim'](),_0x2df725=_0x185d64[0x1]['trim']();if(_0x2cddb9&&_0x2df725&&void 0x0!==_0x387d80[_0x2cddb9]&&'object'!=typeof _0x387d80[_0x2cddb9]){const _0x279395=''+(_0x387d80[_0x2cddb9]||'');if(_0x2df725&&_0x279395===_0x2df725)return !0x0;}return !0x1;}static['isFileExists'](_0x269c4c,_0x43037a){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x117a5c=yield _0x269c4c['getAbstractFileByPath'](_0x43037a);return !!(_0x117a5c&&_0x117a5c instanceof obsidian.TFile);});}static['getNoteIdxByFile'](_0x4b6f8e,_0xed5ea9,_0x49b771,_0x4252ff){var _0x4e3c9c;return __awaiter(this,void 0x0,void 0x0,function*(){if(!_0x49b771||!_0x4252ff||_0x4252ff['length']<=0x0)return '';const _0x3fe3b7=yield _0x4b6f8e['getAbstractFileByPath'](_0x49b771);if(!(_0x3fe3b7&&_0x3fe3b7 instanceof obsidian.TFile))return '';const _0x869c88=(null===(_0x4e3c9c=_0xed5ea9['getFileCache'](_0x3fe3b7))||void 0x0===_0x4e3c9c?void 0x0:_0x4e3c9c['frontmatter'])||{};if(this['isEmptyObj'](_0x869c88))return '';for(let _0x5cf772 of _0x4252ff){const _0x109aa0=_0x869c88[_0x5cf772];if('string'==typeof _0x109aa0&&_0x109aa0&&_0x109aa0['length']>0x0)return _0x109aa0;}return '';});}static['cnfoOl'](_0x2090fc,_0x24c4de,_0x25f0f0){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x41355a=!0x1,_0x3243e7=!0x1;const _0xb8534d=this['getDirFromPath'](_0x25f0f0);if(_0x24c4de&&_0x24c4de!==_0x25f0f0){const _0x3bb315=yield _0x2090fc['getAbstractFileByPath'](_0x24c4de);if(_0x3bb315&&_0x3bb315 instanceof obsidian.TFile){if(_0xb8534d){const _0x4041db=yield _0x2090fc['getAbstractFileByPath'](_0xb8534d);_0x4041db&&_0x4041db instanceof obsidian.TFolder||(yield _0x2090fc['createFolder'](_0xb8534d)),_0x41355a=!0x0;}(yield this['isFileExists'](_0x2090fc,_0x25f0f0))||(yield _0x2090fc['rename'](_0x3bb315,_0x25f0f0)),_0x3243e7=!0x0;}}if(_0x41355a||!_0xb8534d)return _0x3243e7;const _0x3798ed=yield _0x2090fc['getAbstractFileByPath'](_0xb8534d);if(!(_0x3798ed&&_0x3798ed instanceof obsidian.TFile))try{yield _0x2090fc['createFolder'](_0xb8534d);}catch(_0x106184){if(!this['isErrorX'](_0x106184,'already\x20exists'))throw logger({'error':_0x106184}),_0x106184;}return _0x3243e7;});}static['formatTime'](_0x4ad86e,_0x512969='YYYY-MM-DD\x20HH:mm'){if(_0x4ad86e<=0x0)return '';let _0x45c03f=new Date(0x3e8*_0x4ad86e);return this['formatDateTime'](_0x45c03f,_0x512969);}static['isOnlyDateTimeLine'](_0xed0a71){return /^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/['test'](_0xed0a71)&&!0x0;}static['repeatStr'](_0x6b20b8,_0x5478b8){if(_0x5478b8<=0x0||!_0x6b20b8||_0x6b20b8['length']<=0x0)return '';let _0xc97bf4=[];for(let _0x36d855=0x0;_0x36d855<_0x5478b8;_0x36d855++)_0xc97bf4['push'](_0x6b20b8);return _0xc97bf4['join']('');}static['formatPageNote'](_0x59e325,_0x818644){return _0x818644?_0x59e325||'':this['convert2backlink'](_0x59e325)||'';}static['countAnnoCount'](_0x59ebd4){let _0x315fc6=0x0;if(!_0x59ebd4||_0x59ebd4['length']<=0x0)return 0x0;for(let _0x406d2b of _0x59ebd4)_0x406d2b&&_0x406d2b['annonation']&&_0x315fc6++;return _0x315fc6;}static['isEmptyObj'](_0x270adf){if(!_0x270adf)return !0x0;for(let _0x36d83f in _0x270adf)return !0x1;return !0x0;}static['getRemainData'](_0x382bc3,_0x39d8b1){if(!_0x382bc3||_0x382bc3['length']<=0x0||!_0x39d8b1||this['isEmptyObj'](_0x39d8b1))return;const _0x5d4516=(_0x382bc3||'')['split'](',')['map'](_0x2f41d2=>_0x2f41d2['trim']())['filter'](_0x39fbdc=>_0x39fbdc);if(_0x5d4516['length']<=0x0)return;let _0x3c645b={};for(let _0x9dd075 of _0x5d4516)void 0x0!==_0x39d8b1[_0x9dd075]&&(_0x3c645b[_0x9dd075]=_0x39d8b1[_0x9dd075]);return _0x3c645b;}static['allTagsV2'](_0x5943a6,_0x13fee7){_0x5943a6=_0x5943a6||[],_0x13fee7=_0x13fee7||[];let _0x2dc2df={};for(let _0x21d456 of _0x5943a6)_0x21d456=this['trimTag'](_0x21d456),_0x21d456&&(_0x2dc2df[_0x21d456]=0x1);for(let _0x1d84de of _0x13fee7){let _0x1eadf0=(_0x1d84de['tags']||'')['split'](',')['map'](_0x4fda86=>_0x4fda86['trim']())['filter'](_0x5894d4=>_0x5894d4);for(let _0x526fe2 of _0x1eadf0)_0x526fe2=this['trimTag'](_0x526fe2),_0x526fe2&&(_0x2dc2df[_0x526fe2]=0x1);}return Object['keys'](_0x2dc2df)['sort']();}static['formatNoteLinks'](_0x50255c){if(!_0x50255c||_0x50255c['length']<=0x0||'{}'===_0x50255c)return [];let _0x4036f6=JSON['parse'](_0x50255c),_0x204702=[];for(let _0x1d0767 in _0x4036f6)_0x204702['push']({'url':_0x1d0767,'title':_0x4036f6[_0x1d0767],'_rndstr':''});return _0x204702;}static['joinStr'](_0xa2575a,_0x3b53d0,_0x20f3c0='\x20'){return [_0xa2575a||'',_0x3b53d0||'']['filter'](_0x76a2b3=>_0x76a2b3)['join'](_0x20f3c0);}static['formatHighlights'](_0xe0f9f9,_0xa1c9e3,_0x5c7dff){var _0x273edb,_0x47134c;if(!_0xa1c9e3)return [];const _0x3d576b=0x1===_0x5c7dff['tagStyle'];let _0x3f18a4=[];for(let _0x25b32d of _0xa1c9e3){if(!_0x25b32d)continue;const _0x9f6e1c=_0x25b32d['highlighttype']||0x1;let _0x46a160={'note':_0x25b32d['note']||_0x25b32d['imageUrl']||'','notelinks':this['formatNoteLinks'](_0x25b32d['notelinks']),'imageurl':_0x25b32d['imageUrl'],'updateat_ts':_0x25b32d['updateat'],'createat_ts':_0x25b32d['createat'],'type':this['highlightTypeMaps'][_0x9f6e1c]||'highlight','annotation':_0x25b32d['annonation']||'','color':_0x25b32d['color'],'slotid':_0x25b32d['slotid'],'refid':_0x25b32d['refid'],'refurl':Utils['getHighlightRefUrl'](_0xe0f9f9,_0x25b32d['refurl']||''),'tags':_0x25b32d['tags']||'','remaintags':''};if(_0x46a160['tags']){let _0x428596=_0x46a160['tags']['split'](',')['filter'](_0x475dd3=>_0x475dd3)['map'](_0x5a33a9=>_0x5a33a9['trim']()),_0x1cf5af=[];for(let _0x4e9a32 of _0x428596)(null===(_0x273edb=_0x25b32d['note'])||void 0x0===_0x273edb?void 0x0:_0x273edb['indexOf'](_0x4e9a32))<0x0&&(null===(_0x47134c=_0x25b32d['annonation'])||void 0x0===_0x47134c?void 0x0:_0x47134c['indexOf'](_0x4e9a32))<0x0&&_0x1cf5af['push'](_0x4e9a32);_0x46a160['remaintags']=_0x1cf5af['map'](_0x2b5086=>Utils['formatTag'](_0x2b5086,_0x3d576b))['join']('\x20'),_0x46a160['tags']=_0x428596['map'](_0x31b2cd=>Utils['formatTag'](_0x31b2cd,_0x3d576b))['filter'](_0x548b50=>_0x548b50)['join']('\x20');}_0x3d576b||(_0x46a160['annotation']&&(_0x46a160['annotation']=this['convert2backlink'](_0x46a160['annotation'])),_0x46a160['note']&&(_0x46a160['note']=this['convert2backlink'](_0x46a160['note']))),_0x3f18a4['push'](_0x46a160);}return _0x3f18a4;}static['mergeLinksToNote'](_0x4a4aa4,_0x2903a5){if(!_0x4a4aa4||_0x4a4aa4['length']<=0x0||!_0x2903a5||_0x2903a5['length']<=0x0)return;let _0x33dd0f=0x0;for(let _0x41fb3b of _0x2903a5)_0x41fb3b['_rndstr']='wucailinkbhn69k-'+_0x33dd0f+',',_0x33dd0f++,_0x4a4aa4=_0x4a4aa4['replace'](_0x41fb3b['title'],_0x41fb3b['_rndstr']);for(let _0x39b6fb of _0x2903a5)_0x4a4aa4=_0x4a4aa4['replace'](_0x39b6fb['_rndstr'],'['+_0x39b6fb['title']+']('+_0x39b6fb['url']+')'),_0x39b6fb['_rndstr']='';return _0x4a4aa4;}static['toYAMLList'](_0x36ac07){return !_0x36ac07||_0x36ac07['length']<=0x0?'':'\x0a\x20\x20-\x20'+_0x36ac07['join']('\x0a\x20\x20-\x20');}static['mergeTags'](_0x34e775,_0x566a5b,_0x3f11a7){_0x566a5b=_0x566a5b||'';let _0x106163=(_0x34e775=_0x34e775||[])['concat'](_0x566a5b['split'](','))['map'](_0x2aeee1=>Utils['formatTag'](_0x2aeee1,_0x3f11a7));return this['removeDupAndSort'](_0x106163)['join']('\x20');}static['trimTags'](_0x2c919a,_0xb6501e='\x20'){return _0x2c919a?(_0x2c919a=_0x2c919a||'')['split'](_0xb6501e)['filter'](_0xf4b458=>_0xf4b458)['map'](_0x2da353=>_0x2da353['replace'](/[#\[\]]/g,'')['replace'](/\s+/g,'-'))['filter'](_0x2733a5=>_0x2733a5):[];}static['trimTag'](_0x2c5cc5){return (_0x2c5cc5=(_0x2c5cc5||'')['trim']())['replace'](/[#\[\]]/g,'')['replace'](/\s+/g,'-');}static['formatPageMirror'](_0xfa2bb0){return (_0xfa2bb0=_0xfa2bb0||'')?_0xfa2bb0['replace'](/g1proxy\.nostrabc\.com/g,'g1proxy.wimg.site'):'';}static['removeDupAndSort'](_0x2ba94e){if(!_0x2ba94e||_0x2ba94e['length']<=0x1)return _0x2ba94e;let _0x3f58fe={};for(let _0x4e304c of _0x2ba94e)_0x4e304c&&void 0x0===_0x3f58fe[_0x4e304c]&&(_0x3f58fe[_0x4e304c]=0x1);return Object['keys'](_0x3f58fe)['sort']();}static['formatTag'](_0xb3aa69,_0x28c2b2){if(!(_0xb3aa69=_0xb3aa69['trim']()))return;if(!(_0xb3aa69=_0xb3aa69['replace'](/\s+/g,'-')))return _0xb3aa69;let _0x2e596f='#'===_0xb3aa69[0x0],_0x563958='['===_0xb3aa69[0x0];if(!_0x2e596f&&!_0x563958)return _0x28c2b2?'#'+_0xb3aa69:'[['+_0xb3aa69+']]';if(_0x563958)return _0xb3aa69;if(_0x2e596f&&_0x28c2b2)return _0xb3aa69;let _0x5f255b='';return _0x2e596f&&(_0x5f255b=_0xb3aa69['substring'](0x1)['trim']()),_0x5f255b?'[['+_0x5f255b+']]':'';}static['formatTags'](_0x3fa26f,_0x2422cc){let _0x5711bc=[];return _0x5711bc=(_0x3fa26f=_0x3fa26f||[])['map'](_0x1da33a=>Utils['formatTag'](_0x1da33a,_0x2422cc))['filter'](_0x3d965d=>_0x3d965d),_0x5711bc['join']('\x20');}static['wrapBlock'](_0x40179c,_0x5b1b99,_0x44bf42='\x0a'){return '\x0a%%begin\x20'+_0x5b1b99+'%%\x0a'+_0x40179c+'\x0a%%end\x20'+_0x5b1b99+'%%\x0a';}static['wrapBlockNoBreak'](_0x11d522,_0x46e583){return '%%begin\x20'+_0x46e583+'%%\x0a'+_0x11d522+'\x0a%%end\x20'+_0x46e583+'%%';}static['renderTemplate'](_0x5b9f7c,_0x4dfa9a){return _0x4dfa9a['pageEngine']['render'](_0x5b9f7c);}static['renderTemplateWithEditable'](_0xaa5a43,_0x5766ab,_0x5ee355){let _0x3855c6={};if(_0x5ee355['blocks']['pagenote']){let _0x13727e=_0x5ee355['pagenoteEngine']['render'](_0xaa5a43);_0x13727e&&(_0x3855c6['pagenote']=_0x13727e);}if(_0x5ee355['blocks']['highlights']){let _0xdcbb6c=_0x5ee355['highlightsEngine']['render'](_0xaa5a43);_0xdcbb6c&&(_0x3855c6['highlights']=_0xdcbb6c);}if(_0x5ee355['blocks']['mdcontent']){let _0x1da319=_0x5ee355['mdcontentEngine']['render'](_0xaa5a43);_0x1da319&&(_0x3855c6['mdcontent']=_0x1da319);}return this['replaceHolders'](_0x5766ab,_0x3855c6);}static['getDirFromPath'](_0x225e22){if(!_0x225e22)return '';const _0x45e145=_0x225e22['lastIndexOf']('/');return _0x45e145<=0x0?'':_0x225e22['substring'](0x0,_0x45e145);}static['getDomain'](_0x5225b5){if(!_0x5225b5)return '';/^www\./['test'](_0x5225b5)&&(_0x5225b5='https://'+_0x5225b5);try{let _0x4c75c7=new URL(_0x5225b5);return _0x4c75c7?_0x4c75c7['hostname']['toLocaleLowerCase']():'';}catch(_0x1093ea){return '';}}static['getDomain2'](_0x325370){if(!_0x325370||_0x325370['length']<=0x0)return '';let _0x240c54=_0x325370['split']('.');const _0x275660=_0x240c54['length'];return _0x275660<=0x2?_0x325370:_0x240c54[_0x275660-0x2]+'.'+_0x240c54[_0x275660-0x1];}static['isMardownFormat'](_0x3b5c8d){return !(!_0x3b5c8d||_0x3b5c8d['length']<=0x0)&&(!!(/^- \[[ x]\] +/['test'](_0x3b5c8d)&&_0x3b5c8d['indexOf']('\x0a')<0x0)||!(!/^\`\`\`/['test'](_0x3b5c8d)||!/\`\`\`\s*$/['test'](_0x3b5c8d)));}static['getNoteIdxFromFilePath'](_0x34fa3d){if(!_0x34fa3d||_0x34fa3d['length']<=0x0)return '';if(!/-([a-z0-9_]+)\.md$/i['test'](_0x34fa3d))return '';const _0x1eb5f1=_0x34fa3d['lastIndexOf']('-');return _0x1eb5f1<0x0?'':_0x34fa3d['substring'](_0x1eb5f1+0x1,_0x34fa3d['length']-0x3);}static['getHighlightRefUrl'](_0x20a16a,_0x4168c3){if(!_0x4168c3)return _0x20a16a;let _0x1bc941='';if(_0x4168c3['indexOf']('#')>=0x0&&(_0x1bc941=_0x4168c3['split']('-')[0x1]),!_0x1bc941)return _0x20a16a;let _0xd17436=_0x20a16a['indexOf']('#');if(_0xd17436<0x0)return _0x20a16a+('#WCREFX-'+_0x1bc941);let _0x49c686=_0x20a16a['substring'](_0xd17436+0x1);if(!_0x49c686)return (_0x20a16a=_0x20a16a['substring'](0x0,_0xd17436))+('#WCREFX-'+_0x1bc941);if(_0x20a16a['indexOf']('WCREFX-')>0x0)return _0x20a16a['replace'](/WCREFX-([a-z\d]+)/g,'WCREFX-'+_0x1bc941);if(_0x49c686['indexOf']('/')>=0x0||_0x49c686['indexOf']('?')>=0x0){if(_0x49c686['indexOf']('?')>=0x0||_0x49c686['indexOf']('=')>=0x0){let _0x1f427e=encodeURIComponent('WCREFX-'+_0x1bc941);return (_0x20a16a=_0x20a16a['replace'](/&+$/,''))+'&wucairefx='+_0x1f427e;}return _0x20a16a;}return _0x20a16a['substring'](0x0,_0xd17436)+('#WCREFX-'+_0x1bc941);}static['isErrorX'](_0x9625e1,_0x47c2c7){return !(!_0x9625e1||!_0x47c2c7)&&(_0x9625e1&&_0x9625e1['message']&&_0x9625e1['message']['indexOf'](_0x47c2c7)>=0x0);}static['getRegionFromToken'](_0x2d85b5){const _0x50da9f=(_0x2d85b5||'')['trim']();if(!_0x50da9f)return '';const _0x36f1b0=_0x50da9f['split']('.');if(0x2!==_0x36f1b0['length'])return '';let _0x21e89c=_0x36f1b0[0x0]||'';if(!_0x21e89c)return '';_0x21e89c=_0x21e89c['replaceAll']('%3D','='),_0x21e89c=_0x21e89c['replaceAll']('%3d','=');const _0x4dcb50=decode(_0x21e89c);if(!_0x4dcb50)return '';try{const _0xf8495d=JSON['parse'](_0x4dcb50);if(_0xf8495d)return _0xf8495d['rgn']||'chn';}catch(_0x46bb94){}return '';}static['getPageMirror'](_0x1ff2a0){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x4b8cd5=yield fetch(_0x1ff2a0,{'method':'GET'});return _0x4b8cd5&&0xc8===_0x4b8cd5['status']&&_0x4b8cd5['ok']?new Promise((_0x2dafa9,_0x1eb76f)=>{try{_0x4b8cd5['text']()['then'](_0x520332=>{if(!_0x520332||_0x520332['length']<=0x0)return '';let _0x18f7d6=_0x520332['indexOf'](':');if(_0x18f7d6<=0x0)return void _0x2dafa9('');let _0x22a2a2=parseInt(_0x520332['substring'](0x0,_0x18f7d6));_0x2dafa9(_0x520332['substring'](_0x22a2a2+_0x18f7d6+0x1));})['catch'](_0x49094c=>{_0x2dafa9('');});}catch(_0x392524){_0x2dafa9('');}}):new Promise((_0x50b98d,_0x224beb)=>{_0x50b98d('');});});}}Utils['allowedBlock']=['highlights','pagenote'],Utils['fetchBlocksRegExp']=new RegExp('\x5c{%\x5cs*block\x5cs+([a-z0-9-_]+)\x5cs*%\x5c}[\x5cs\x5cS]*?\x5c{%\x5cs*endblock\x5cs*%\x5c}','ig'),Utils['blocksRegExpMap']={'highlights':new RegExp('\x5c{%\x5cs*block\x5cs+highlights\x5cs*%\x5c}[\x5cs\x5cS]*?\x5c{%\x5cs*endblock\x5cs*%\x5c}','img'),'pagenote':new RegExp('\x5c{%\x5cs*block\x5cs+pagenote\x5cs*%\x5c}[\x5cs\x5cS]*?\x5c{%\x5cs*endblock\x5cs*%\x5c}','img'),'mdcontent':new RegExp('\x5c{%\x5cs*block\x5cs+mdcontent\x5cs*%\x5c}[\x5cs\x5cS]*?\x5c{%\x5cs*endblock\x5cs*%\x5c}','img')},Utils['holdersRegExpMap']={'highlights':new RegExp('(%%\x5cs*begin\x5cs+highlights\x5cs*%%([\x5cs\x5cS]*?)%%\x5cs*end\x5cs+highlights\x5cs*%%)','ig'),'pagenote':new RegExp('(%%\x5cs*begin\x5cs+pagenote\x5cs*%%([\x5cs\x5cS]*?)%%\x5cs*end\x5cs+pagenote\x5cs*%%)','ig'),'mdcontent':new RegExp('(%%\x5cs*begin\x5cs+mdcontent\x5cs*%%([\x5cs\x5cS]*?)%%\x5cs*end\x5cs+mdcontent\x5cs*%%)','ig')},Utils['noteidxprop']='{{noteid}}',Utils['highlightTypeMaps']={0x1:'highlight',0x2:'image',0x3:'math',0x4:'quote'};
var nunjucks=createCommonjsModule((function(e,t){
/*! Browser bundle of nunjucks 3.2.4 */
var n;n=function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:i});},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=11)}([function(e,t,n){var i=Array.prototype,r=Object.prototype,o={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","\\":"&#92;"},s=/[&"'<>\\]/g;function a(e,t){return r.hasOwnProperty.call(e,t)}function c(e){return o[e]}function l(e,t,n){var i,r,o;if(e instanceof Error&&(e=(r=e).name+": "+r.message),Object.setPrototypeOf?(i=new Error(e),Object.setPrototypeOf(i,l.prototype)):(i=this,Object.defineProperty(i,"message",{enumerable:!1,writable:!0,value:e})),Object.defineProperty(i,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(i,this.constructor),r){var s=Object.getOwnPropertyDescriptor(r,"stack");(o=s&&(s.get||function(){return s.value}))||(o=function(){return r.stack});}else {var a=new Error(e).stack;o=function(){return a};}return Object.defineProperty(i,"stack",{get:function(){return o.call(i)}}),Object.defineProperty(i,"cause",{value:r}),i.lineno=t,i.colno=n,i.firstUpdate=!0,i.Update=function(e){var t="("+(e||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?t+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(t+=" [Line "+this.lineno+"]")),t+="\n ",this.firstUpdate&&(t+=" "),this.message=t+(this.message||""),this.firstUpdate=!1,this},i}function u(e){return "[object Function]"===r.toString.call(e)}function h(e){return "[object Array]"===r.toString.call(e)}function f(e){return "[object String]"===r.toString.call(e)}function p(e){return "[object Object]"===r.toString.call(e)}function m(e){var t,n=(t=e)?"string"==typeof t?t.split("."):[t]:[];return function(e){for(var t=e,i=0;i<n.length;i++){var r=n[i];if(!a(t,r))return;t=t[r];}return t}}function d(e){return Array.prototype.slice.call(e)}function v(e,t,n){return Array.prototype.indexOf.call(e||[],t,n)}function _(e){var t=[];for(var n in e)a(e,n)&&t.push(n);return t}(t=e.exports={}).hasOwnProp=a,t._prettifyError=function(e,n,i){if(i.Update||(i=new t.TemplateError(i)),i.Update(e),!n){var r=i;(i=new Error(r.message)).name=r.name;}return i},Object.setPrototypeOf?Object.setPrototypeOf(l.prototype,Error.prototype):l.prototype=Object.create(Error.prototype,{constructor:{value:l}}),t.TemplateError=l,t.escape=function(e){return e.replace(s,c)},t.isFunction=u,t.isArray=h,t.isString=f,t.isObject=p,t.getAttrGetter=m,t.groupBy=function(e,t,n){for(var i={},r=u(t)?t:m(t),o=0;o<e.length;o++){var s=e[o],a=r(s,o);if(void 0===a&&!0===n)throw new TypeError('groupby: attribute "'+t+'" resolved to undefined');(i[a]||(i[a]=[])).push(s);}return i},t.toArray=d,t.without=function(e){var t=[];if(!e)return t;for(var n=e.length,i=d(arguments).slice(1),r=-1;++r<n;)-1===v(i,e[r])&&t.push(e[r]);return t},t.repeat=function(e,t){for(var n="",i=0;i<t;i++)n+=e;return n},t.each=function(e,t,n){if(null!=e)if(i.forEach&&e.forEach===i.forEach)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,o=e.length;r<o;r++)t.call(n,e[r],r,e);},t.map=function(e,t){var n=[];if(null==e)return n;if(i.map&&e.map===i.map)return e.map(t);for(var r=0;r<e.length;r++)n[n.length]=t(e[r],r);return e.length===+e.length&&(n.length=e.length),n},t.asyncIter=function(e,t,n){var i=-1;!function r(){++i<e.length?t(e[i],i,r,n):n();}();},t.asyncFor=function(e,t,n){var i=_(e||{}),r=i.length,o=-1;!function s(){o++;var a=i[o];o<r?t(a,e[a],o,r,s):n();}();},t.indexOf=v,t.keys=_,t._entries=function(e){return _(e).map((function(t){return [t,e[t]]}))},t._values=function(e){return _(e).map((function(t){return e[t]}))},t._assign=t.extend=function(e,t){return e=e||{},_(t).forEach((function(n){e[n]=t[n];})),e},t.inOperator=function(e,t){if(h(t)||f(t))return -1!==t.indexOf(e);if(p(t))return e in t;throw new Error('Cannot use "in" operator to search for "'+e+'" in unexpected types.')};},function(e,t,n){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(r=i.key,o=void 0,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===t?String:Number)(e)}(r,"string"))?o:String(o)),i);}var r,o;}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t);}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var a=n(16),c=n(0);function l(e,t,n){n=n||{},c.keys(n).forEach((function(t){var i,r;n[t]=(i=e.prototype[t],r=n[t],"function"!=typeof i||"function"!=typeof r?r:function(){var e=this.parent;this.parent=i;var t=r.apply(this,arguments);return this.parent=e,t});}));var i=function(e){function n(){return e.apply(this,arguments)||this}return o(n,e),r(n,[{key:"typename",get:function(){return t}}]),n}(e);return c._assign(i.prototype,n),i}var u=function(){function e(){this.init.apply(this,arguments);}return e.prototype.init=function(){},e.extend=function(e,t){return "object"==typeof e&&(t=e,e="anonymous"),l(this,e,t)},r(e,[{key:"typename",get:function(){return this.constructor.name}}]),e}(),h=function(e){function t(){var t,n;return (t=n=e.call(this)||this).init.apply(t,arguments),n}return o(t,e),t.prototype.init=function(){},t.extend=function(e,t){return "object"==typeof e&&(t=e,e="anonymous"),l(this,e,t)},r(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(a);e.exports={Obj:u,EmitterObj:h};},function(e,t,n){var i=n(0),r=Array.from,o="function"==typeof Symbol&&Symbol.iterator&&"function"==typeof r,s=function(){function e(e,t){this.variables=Object.create(null),this.parent=e,this.topLevel=!1,this.isolateWrites=t;}var t=e.prototype;return t.set=function(e,t,n){var i=e.split("."),r=this.variables,o=this;if(n&&(o=this.resolve(i[0],!0)))o.set(e,t);else {for(var s=0;s<i.length-1;s++){var a=i[s];r[a]||(r[a]={}),r=r[a];}r[i[i.length-1]]=t;}},t.get=function(e){var t=this.variables[e];return void 0!==t?t:null},t.lookup=function(e){var t=this.parent,n=this.variables[e];return void 0!==n?n:t&&t.lookup(e)},t.resolve=function(e,t){var n=t&&this.isolateWrites?void 0:this.parent;return void 0!==this.variables[e]?this:n&&n.resolve(e)},t.push=function(t){return new e(this,t)},t.pop=function(){return this.parent},e}();function a(e){return e&&Object.prototype.hasOwnProperty.call(e,"__keywords")}function c(e){var t=e.length;return 0===t?0:a(e[t-1])?t-1:t}function l(e){if("string"!=typeof e)return e;this.val=e,this.length=e.length;}l.prototype=Object.create(String.prototype,{length:{writable:!0,configurable:!0,value:0}}),l.prototype.valueOf=function(){return this.val},l.prototype.toString=function(){return this.val},e.exports={Frame:s,makeMacro:function(e,t,n){return function(){for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];var s,l=c(r),u=function(e){var t=e.length;if(t){var n=e[t-1];if(a(n))return n}return {}}(r);if(l>e.length)s=r.slice(0,e.length),r.slice(s.length,l).forEach((function(e,n){n<t.length&&(u[t[n]]=e);})),s.push(u);else if(l<e.length){s=r.slice(0,l);for(var h=l;h<e.length;h++){var f=e[h];s.push(u[f]),delete u[f];}s.push(u);}else s=r;return n.apply(this,s)}},makeKeywordArgs:function(e){return e.__keywords=!0,e},numArgs:c,suppressValue:function(e,t){return e=null!=e?e:"",!t||e instanceof l||(e=i.escape(e.toString())),e},ensureDefined:function(e,t,n){if(null==e)throw new i.TemplateError("attempted to output null or undefined value",t+1,n+1);return e},memberLookup:function(e,t){if(null!=e)return "function"==typeof e[t]?function(){for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e[t].apply(e,i)}:e[t]},contextOrFrameLookup:function(e,t,n){var i=t.lookup(n);return void 0!==i?i:e.lookup(n)},callWrap:function(e,t,n,i){if(!e)throw new Error("Unable to call `"+t+"`, which is undefined or falsey");if("function"!=typeof e)throw new Error("Unable to call `"+t+"`, which is not a function");return e.apply(n,i)},handleError:function(e,t,n){return e.lineno?e:new i.TemplateError(e,t,n)},isArray:i.isArray,keys:i.keys,SafeString:l,copySafeness:function(e,t){return e instanceof l?new l(t):t.toString()},markSafe:function(e){var t=typeof e;return "string"===t?new l(e):"function"!==t?e:function(t){var n=e.apply(this,arguments);return "string"==typeof n?new l(n):n}},asyncEach:function(e,t,n,r){if(i.isArray(e)){var o=e.length;i.asyncIter(e,(function(e,i,r){switch(t){case 1:n(e,i,o,r);break;case 2:n(e[0],e[1],i,o,r);break;case 3:n(e[0],e[1],e[2],i,o,r);break;default:e.push(i,o,r),n.apply(this,e);}}),r);}else i.asyncFor(e,(function(e,t,i,r,o){n(e,t,i,r,o);}),r);},asyncAll:function(e,t,n,r){var o,s,a=0;function c(e,t){a++,s[e]=t,a===o&&r(null,s.join(""));}if(i.isArray(e))if(o=e.length,s=new Array(o),0===o)r(null,"");else for(var l=0;l<e.length;l++){var u=e[l];switch(t){case 1:n(u,l,o,c);break;case 2:n(u[0],u[1],l,o,c);break;case 3:n(u[0],u[1],u[2],l,o,c);break;default:u.push(l,o,c),n.apply(this,u);}}else {var h=i.keys(e||{});if(o=h.length,s=new Array(o),0===o)r(null,"");else for(var f=0;f<h.length;f++){var p=h[f];n(p,e[p],f,o,c);}}},inOperator:i.inOperator,fromIterator:function(e){return "object"!=typeof e||null===e||i.isArray(e)?e:o&&Symbol.iterator in e?r(e):e}};},function(e,t,n){function i(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(r=i.key,o=void 0,"symbol"==typeof(o=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return ("string"===t?String:Number)(e)}(r,"string"))?o:String(o)),i);}var r,o;}function r(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t);}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function a(e,t,n){e instanceof t&&n.push(e),e instanceof c&&e.findAll(t,n);}var c=function(e){function t(){return e.apply(this,arguments)||this}o(t,e);var n=t.prototype;return n.init=function(e,t){for(var n=arguments,i=this,r=arguments.length,o=new Array(r>2?r-2:0),s=2;s<r;s++)o[s-2]=arguments[s];this.lineno=e,this.colno=t,this.fields.forEach((function(e,t){var r=n[t+2];void 0===r&&(r=null),i[e]=r;}));},n.findAll=function(e,t){var n=this;return t=t||[],this instanceof u?this.children.forEach((function(n){return a(n,e,t)})):this.fields.forEach((function(i){return a(n[i],e,t)})),t},n.iterFields=function(e){var t=this;this.fields.forEach((function(n){e(t[n],n);}));},t}(n(1).Obj),l=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),r(t,[{key:"typename",get:function(){return "Value"}},{key:"fields",get:function(){return ["value"]}}]),t}(c),u=function(e){function t(){return e.apply(this,arguments)||this}o(t,e);var n=t.prototype;return n.init=function(t,n,i){e.prototype.init.call(this,t,n,i||[]);},n.addChild=function(e){this.children.push(e);},r(t,[{key:"typename",get:function(){return "NodeList"}},{key:"fields",get:function(){return ["children"]}}]),t}(c),h=u.extend("Root"),f=l.extend("Literal"),p=l.extend("Symbol"),m=u.extend("Group"),d=u.extend("Array"),v=c.extend("Pair",{fields:["key","value"]}),_=u.extend("Dict"),y=c.extend("LookupVal",{fields:["target","val"]}),g=c.extend("If",{fields:["cond","body","else_"]}),b=g.extend("IfAsync"),k=c.extend("InlineIf",{fields:["cond","body","else_"]}),E=c.extend("For",{fields:["arr","name","body","else_"]}),w=E.extend("AsyncEach"),x=E.extend("AsyncAll"),O=c.extend("Macro",{fields:["name","args","body"]}),L=O.extend("Caller"),T=c.extend("Import",{fields:["template","target","withContext"]}),S=function(e){function t(){return e.apply(this,arguments)||this}return o(t,e),t.prototype.init=function(t,n,i,r,o){e.prototype.init.call(this,t,n,i,r||new u,o);},r(t,[{key:"typename",get:function(){return "FromImport"}},{key:"fields",get:function(){return ["template","names","withContext"]}}]),t}(c),A=c.extend("FunCall",{fields:["name","args"]}),N=A.extend("Filter"),C=N.extend("FilterAsync",{fields:["name","args","symbol"]}),B=_.extend("KeywordArgs"),F=c.extend("Block",{fields:["name","body"]}),j=c.extend("Super",{fields:["blockName","symbol"]}),R=c.extend("TemplateRef",{fields:["template"]}).extend("Extends"),P=c.extend("Include",{fields:["template","ignoreMissing"]}),K=c.extend("Set",{fields:["targets","value"]}),I=c.extend("Switch",{fields:["expr","cases","default"]}),M=c.extend("Case",{fields:["cond","body"]}),D=u.extend("Output"),U=c.extend("Capture",{fields:["body"]}),V=f.extend("TemplateData"),G=c.extend("UnaryOp",{fields:["target"]}),W=c.extend("BinOp",{fields:["left","right"]}),H=W.extend("In"),Y=W.extend("Is"),$=W.extend("Or"),q=W.extend("And"),z=G.extend("Not"),J=W.extend("Add"),X=W.extend("Concat"),Q=W.extend("Sub"),Z=W.extend("Mul"),ee=W.extend("Div"),te=W.extend("FloorDiv"),ne=W.extend("Mod"),ie=W.extend("Pow"),re=G.extend("Neg"),oe=G.extend("Pos"),se=c.extend("Compare",{fields:["expr","ops"]}),ae=c.extend("CompareOperand",{fields:["expr","type"]}),ce=c.extend("CallExtension",{init:function(e,t,n,i){this.parent(),this.extName=e.__name||e,this.prop=t,this.args=n||new u,this.contentArgs=i||[],this.autoescape=e.autoescape;},fields:["extName","prop","args","contentArgs"]}),le=ce.extend("CallExtensionAsync");function ue(e,t,n){var i=e.split("\n");i.forEach((function(e,r){e&&(n&&r>0||!n)&&process.stdout.write(" ".repeat(t));var o=r===i.length-1?"":"\n";process.stdout.write(""+e+o);}));}e.exports={Node:c,Root:h,NodeList:u,Value:l,Literal:f,Symbol:p,Group:m,Array:d,Pair:v,Dict:_,Output:D,Capture:U,TemplateData:V,If:g,IfAsync:b,InlineIf:k,For:E,AsyncEach:w,AsyncAll:x,Macro:O,Caller:L,Import:T,FromImport:S,FunCall:A,Filter:N,FilterAsync:C,KeywordArgs:B,Block:F,Super:j,Extends:R,Include:P,Set:K,Switch:I,Case:M,LookupVal:y,BinOp:W,In:H,Is:Y,Or:$,And:q,Not:z,Add:J,Concat:X,Sub:Q,Mul:Z,Div:ee,FloorDiv:te,Mod:ne,Pow:ie,Neg:re,Pos:oe,Compare:se,CompareOperand:ae,CallExtension:ce,CallExtensionAsync:le,printNodes:function e(t,n){if(n=n||0,ue(t.typename+": ",n),t instanceof u)ue("\n"),t.children.forEach((function(t){e(t,n+2);}));else if(t instanceof ce)ue(t.extName+"."+t.prop+"\n"),t.args&&e(t.args,n+2),t.contentArgs&&t.contentArgs.forEach((function(t){e(t,n+2);}));else {var i=[],r=null;t.iterFields((function(e,t){e instanceof c?i.push([t,e]):(r=r||{})[t]=e;})),r?ue(JSON.stringify(r,null,2)+"\n",null,!0):ue("\n"),i.forEach((function(t){var i=t[0],r=t[1];ue("["+i+"] =>",n+2),e(r,n+4);}));}}};},function(e,t){},function(e,t,n){function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}var r=n(8),o=n(17),s=n(3),a=n(0).TemplateError,c=n(2).Frame,l=n(1).Obj,u={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},h=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var o=r.prototype;return o.init=function(e,t){this.templateName=e,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this._scopeClosers="",this.inBlock=!1,this.throwOnUndefined=t;},o.fail=function(e,t,n){throw void 0!==t&&(t+=1),void 0!==n&&(n+=1),new a(e,t,n)},o._pushBuffer=function(){var e=this._tmpid();return this.bufferStack.push(this.buffer),this.buffer=e,this._emit("var "+this.buffer+' = "";'),e},o._popBuffer=function(){this.buffer=this.bufferStack.pop();},o._emit=function(e){this.codebuf.push(e);},o._emitLine=function(e){this._emit(e+"\n");},o._emitLines=function(){for(var e=this,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];n.forEach((function(t){return e._emitLine(t)}));},o._emitFuncBegin=function(e,t){this.buffer="output",this._scopeClosers="",this._emitLine("function "+t+"(env, context, frame, runtime, cb) {"),this._emitLine("var lineno = "+e.lineno+";"),this._emitLine("var colno = "+e.colno+";"),this._emitLine("var "+this.buffer+' = "";'),this._emitLine("try {");},o._emitFuncEnd=function(e){e||this._emitLine("cb(null, "+this.buffer+");"),this._closeScopeLevels(),this._emitLine("} catch (e) {"),this._emitLine(" cb(runtime.handleError(e, lineno, colno));"),this._emitLine("}"),this._emitLine("}"),this.buffer=null;},o._addScopeLevel=function(){this._scopeClosers+="})";},o._closeScopeLevels=function(){this._emitLine(this._scopeClosers+";"),this._scopeClosers="";},o._withScopedSyntax=function(e){var t=this._scopeClosers;this._scopeClosers="",e.call(this),this._closeScopeLevels(),this._scopeClosers=t;},o._makeCallback=function(e){var t=this._tmpid();return "function("+t+(e?","+e:"")+") {\nif("+t+") { cb("+t+"); return; }"},o._tmpid=function(){return this.lastId++,"t_"+this.lastId},o._templateName=function(){return null==this.templateName?"undefined":JSON.stringify(this.templateName)},o._compileChildren=function(e,t){var n=this;e.children.forEach((function(e){n.compile(e,t);}));},o._compileAggregate=function(e,t,n,i){var r=this;n&&this._emit(n),e.children.forEach((function(e,n){n>0&&r._emit(","),r.compile(e,t);})),i&&this._emit(i);},o._compileExpression=function(e,t){this.assertType(e,s.Literal,s.Symbol,s.Group,s.Array,s.Dict,s.FunCall,s.Caller,s.Filter,s.LookupVal,s.Compare,s.InlineIf,s.In,s.Is,s.And,s.Or,s.Not,s.Add,s.Concat,s.Sub,s.Mul,s.Div,s.FloorDiv,s.Mod,s.Pow,s.Neg,s.Pos,s.Compare,s.NodeList),this.compile(e,t);},o.assertType=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];n.some((function(t){return e instanceof t}))||this.fail("assertType: invalid type: "+e.typename,e.lineno,e.colno);},o.compileCallExtension=function(e,t,n){var i=this,r=e.args,o=e.contentArgs,a="boolean"!=typeof e.autoescape||e.autoescape;if(n||this._emit(this.buffer+" += runtime.suppressValue("),this._emit('env.getExtension("'+e.extName+'")["'+e.prop+'"]('),this._emit("context"),(r||o)&&this._emit(","),r&&(r instanceof s.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),r.children.forEach((function(e,n){i._compileExpression(e,t),(n!==r.children.length-1||o.length)&&i._emit(",");}))),o.length&&o.forEach((function(e,n){if(n>0&&i._emit(","),e){i._emitLine("function(cb) {"),i._emitLine("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var r=i._pushBuffer();i._withScopedSyntax((function(){i.compile(e,t),i._emitLine("cb(null, "+r+");");})),i._popBuffer(),i._emitLine("return "+r+";"),i._emitLine("}");}else i._emit("null");})),n){var c=this._tmpid();this._emitLine(", "+this._makeCallback(c)),this._emitLine(this.buffer+" += runtime.suppressValue("+c+", "+a+" && env.opts.autoescape);"),this._addScopeLevel();}else this._emit(")"),this._emit(", "+a+" && env.opts.autoescape);\n");},o.compileCallExtensionAsync=function(e,t){this.compileCallExtension(e,t,!0);},o.compileNodeList=function(e,t){this._compileChildren(e,t);},o.compileLiteral=function(e){if("string"==typeof e.value){var t=e.value.replace(/\\/g,"\\\\");t=(t=(t=(t=(t=t.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this._emit('"'+t+'"');}else null===e.value?this._emit("null"):this._emit(e.value.toString());},o.compileSymbol=function(e,t){var n=e.value,i=t.lookup(n);i?this._emit(i):this._emit('runtime.contextOrFrameLookup(context, frame, "'+n+'")');},o.compileGroup=function(e,t){this._compileAggregate(e,t,"(",")");},o.compileArray=function(e,t){this._compileAggregate(e,t,"[","]");},o.compileDict=function(e,t){this._compileAggregate(e,t,"{","}");},o.compilePair=function(e,t){var n=e.key,i=e.value;n instanceof s.Symbol?n=new s.Literal(n.lineno,n.colno,n.value):n instanceof s.Literal&&"string"==typeof n.value||this.fail("compilePair: Dict keys must be strings or names",n.lineno,n.colno),this.compile(n,t),this._emit(": "),this._compileExpression(i,t);},o.compileInlineIf=function(e,t){this._emit("("),this.compile(e.cond,t),this._emit("?"),this.compile(e.body,t),this._emit(":"),null!==e.else_?this.compile(e.else_,t):this._emit('""'),this._emit(")");},o.compileIn=function(e,t){this._emit("runtime.inOperator("),this.compile(e.left,t),this._emit(","),this.compile(e.right,t),this._emit(")");},o.compileIs=function(e,t){var n=e.right.name?e.right.name.value:e.right.value;this._emit('env.getTest("'+n+'").call(context, '),this.compile(e.left,t),e.right.args&&(this._emit(","),this.compile(e.right.args,t)),this._emit(") === true");},o._binOpEmitter=function(e,t,n){this.compile(e.left,t),this._emit(n),this.compile(e.right,t);},o.compileOr=function(e,t){return this._binOpEmitter(e,t," || ")},o.compileAnd=function(e,t){return this._binOpEmitter(e,t," && ")},o.compileAdd=function(e,t){return this._binOpEmitter(e,t," + ")},o.compileConcat=function(e,t){return this._binOpEmitter(e,t,' + "" + ')},o.compileSub=function(e,t){return this._binOpEmitter(e,t," - ")},o.compileMul=function(e,t){return this._binOpEmitter(e,t," * ")},o.compileDiv=function(e,t){return this._binOpEmitter(e,t," / ")},o.compileMod=function(e,t){return this._binOpEmitter(e,t," % ")},o.compileNot=function(e,t){this._emit("!"),this.compile(e.target,t);},o.compileFloorDiv=function(e,t){this._emit("Math.floor("),this.compile(e.left,t),this._emit(" / "),this.compile(e.right,t),this._emit(")");},o.compilePow=function(e,t){this._emit("Math.pow("),this.compile(e.left,t),this._emit(", "),this.compile(e.right,t),this._emit(")");},o.compileNeg=function(e,t){this._emit("-"),this.compile(e.target,t);},o.compilePos=function(e,t){this._emit("+"),this.compile(e.target,t);},o.compileCompare=function(e,t){var n=this;this.compile(e.expr,t),e.ops.forEach((function(e){n._emit(" "+u[e.type]+" "),n.compile(e.expr,t);}));},o.compileLookupVal=function(e,t){this._emit("runtime.memberLookup(("),this._compileExpression(e.target,t),this._emit("),"),this._compileExpression(e.val,t),this._emit(")");},o._getNodeName=function(e){switch(e.typename){case"Symbol":return e.value;case"FunCall":return "the return value of ("+this._getNodeName(e.name)+")";case"LookupVal":return this._getNodeName(e.target)+'["'+this._getNodeName(e.val)+'"]';case"Literal":return e.value.toString();default:return "--expression--"}},o.compileFunCall=function(e,t){this._emit("(lineno = "+e.lineno+", colno = "+e.colno+", "),this._emit("runtime.callWrap("),this._compileExpression(e.name,t),this._emit(', "'+this._getNodeName(e.name).replace(/"/g,'\\"')+'", context, '),this._compileAggregate(e.args,t,"[","])"),this._emit(")");},o.compileFilter=function(e,t){var n=e.name;this.assertType(n,s.Symbol),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emit(")");},o.compileFilterAsync=function(e,t){var n=e.name,i=e.symbol.value;this.assertType(n,s.Symbol),t.set(i,i),this._emit('env.getFilter("'+n.value+'").call(context, '),this._compileAggregate(e.args,t),this._emitLine(", "+this._makeCallback(i)),this._addScopeLevel();},o.compileKeywordArgs=function(e,t){this._emit("runtime.makeKeywordArgs("),this.compileDict(e,t),this._emit(")");},o.compileSet=function(e,t){var n=this,i=[];e.targets.forEach((function(e){var r=e.value,o=t.lookup(r);null==o&&(o=n._tmpid(),n._emitLine("var "+o+";")),i.push(o);})),e.value?(this._emit(i.join(" = ")+" = "),this._compileExpression(e.value,t),this._emitLine(";")):(this._emit(i.join(" = ")+" = "),this.compile(e.body,t),this._emitLine(";")),e.targets.forEach((function(e,t){var r=i[t],o=e.value;n._emitLine('frame.set("'+o+'", '+r+", true);"),n._emitLine("if(frame.topLevel) {"),n._emitLine('context.setVariable("'+o+'", '+r+");"),n._emitLine("}"),"_"!==o.charAt(0)&&(n._emitLine("if(frame.topLevel) {"),n._emitLine('context.addExport("'+o+'", '+r+");"),n._emitLine("}"));}));},o.compileSwitch=function(e,t){var n=this;this._emit("switch ("),this.compile(e.expr,t),this._emit(") {"),e.cases.forEach((function(e,i){n._emit("case "),n.compile(e.cond,t),n._emit(": "),n.compile(e.body,t),e.body.children.length&&n._emitLine("break;");})),e.default&&(this._emit("default:"),this.compile(e.default,t)),this._emit("}");},o.compileIf=function(e,t,n){var i=this;this._emit("if("),this._compileExpression(e.cond,t),this._emitLine(") {"),this._withScopedSyntax((function(){i.compile(e.body,t),n&&i._emit("cb()");})),e.else_?(this._emitLine("}\nelse {"),this._withScopedSyntax((function(){i.compile(e.else_,t),n&&i._emit("cb()");}))):n&&(this._emitLine("}\nelse {"),this._emit("cb()")),this._emitLine("}");},o.compileIfAsync=function(e,t){this._emit("(function(cb) {"),this.compileIf(e,t,!0),this._emit("})("+this._makeCallback()),this._addScopeLevel();},o._emitLoopBindings=function(e,t,n,i){var r=this;[{name:"index",val:n+" + 1"},{name:"index0",val:n},{name:"revindex",val:i+" - "+n},{name:"revindex0",val:i+" - "+n+" - 1"},{name:"first",val:n+" === 0"},{name:"last",val:n+" === "+i+" - 1"},{name:"length",val:i}].forEach((function(e){r._emitLine('frame.set("loop.'+e.name+'", '+e.val+");");}));},o.compileFor=function(e,t){var n=this,i=this._tmpid(),r=this._tmpid(),o=this._tmpid();if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+o+" = "),this._compileExpression(e.arr,t),this._emitLine(";"),this._emit("if("+o+") {"),this._emitLine(o+" = runtime.fromIterator("+o+");"),e.name instanceof s.Array){this._emitLine("var "+i+";"),this._emitLine("if(runtime.isArray("+o+")) {"),this._emitLine("var "+r+" = "+o+".length;"),this._emitLine("for("+i+"=0; "+i+" < "+o+".length; "+i+"++) {"),e.name.children.forEach((function(r,s){var a=n._tmpid();n._emitLine("var "+a+" = "+o+"["+i+"]["+s+"];"),n._emitLine('frame.set("'+r+'", '+o+"["+i+"]["+s+"]);"),t.set(e.name.children[s].value,a);})),this._emitLoopBindings(e,o,i,r),this._withScopedSyntax((function(){n.compile(e.body,t);})),this._emitLine("}"),this._emitLine("} else {");var a=e.name.children,c=a[0],l=a[1],u=this._tmpid(),h=this._tmpid();t.set(c.value,u),t.set(l.value,h),this._emitLine(i+" = -1;"),this._emitLine("var "+r+" = runtime.keys("+o+").length;"),this._emitLine("for(var "+u+" in "+o+") {"),this._emitLine(i+"++;"),this._emitLine("var "+h+" = "+o+"["+u+"];"),this._emitLine('frame.set("'+c.value+'", '+u+");"),this._emitLine('frame.set("'+l.value+'", '+h+");"),this._emitLoopBindings(e,o,i,r),this._withScopedSyntax((function(){n.compile(e.body,t);})),this._emitLine("}"),this._emitLine("}");}else {var f=this._tmpid();t.set(e.name.value,f),this._emitLine("var "+r+" = "+o+".length;"),this._emitLine("for(var "+i+"=0; "+i+" < "+o+".length; "+i+"++) {"),this._emitLine("var "+f+" = "+o+"["+i+"];"),this._emitLine('frame.set("'+e.name.value+'", '+f+");"),this._emitLoopBindings(e,o,i,r),this._withScopedSyntax((function(){n.compile(e.body,t);})),this._emitLine("}");}this._emitLine("}"),e.else_&&(this._emitLine("if (!"+r+") {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();");},o._compileAsyncLoop=function(e,t,n){var i=this,r=this._tmpid(),o=this._tmpid(),a=this._tmpid(),c=n?"asyncAll":"asyncEach";if(t=t.push(),this._emitLine("frame = frame.push();"),this._emit("var "+a+" = runtime.fromIterator("),this._compileExpression(e.arr,t),this._emitLine(");"),e.name instanceof s.Array){var l=e.name.children.length;this._emit("runtime."+c+"("+a+", "+l+", function("),e.name.children.forEach((function(e){i._emit(e.value+",");})),this._emit(r+","+o+",next) {"),e.name.children.forEach((function(e){var n=e.value;t.set(n,n),i._emitLine('frame.set("'+n+'", '+n+");");}));}else {var u=e.name.value;this._emitLine("runtime."+c+"("+a+", 1, function("+u+", "+r+", "+o+",next) {"),this._emitLine('frame.set("'+u+'", '+u+");"),t.set(u,u);}this._emitLoopBindings(e,a,r,o),this._withScopedSyntax((function(){var o;n&&(o=i._pushBuffer()),i.compile(e.body,t),i._emitLine("next("+r+(o?","+o:"")+");"),n&&i._popBuffer();}));var h=this._tmpid();this._emitLine("}, "+this._makeCallback(h)),this._addScopeLevel(),n&&this._emitLine(this.buffer+" += "+h+";"),e.else_&&(this._emitLine("if (!"+a+".length) {"),this.compile(e.else_,t),this._emitLine("}")),this._emitLine("frame = frame.pop();");},o.compileAsyncEach=function(e,t){this._compileAsyncLoop(e,t);},o.compileAsyncAll=function(e,t){this._compileAsyncLoop(e,t,!0);},o._compileMacro=function(e,t){var n=this,i=[],r=null,o="macro_"+this._tmpid(),a=void 0!==t;e.args.children.forEach((function(t,o){o===e.args.children.length-1&&t instanceof s.Dict?r=t:(n.assertType(t,s.Symbol),i.push(t));}));var l,u=[].concat(i.map((function(e){return "l_"+e.value})),["kwargs"]),h=i.map((function(e){return '"'+e.value+'"'})),f=(r&&r.children||[]).map((function(e){return '"'+e.key.value+'"'}));l=a?t.push(!0):new c,this._emitLines("var "+o+" = runtime.makeMacro(","["+h.join(", ")+"], ","["+f.join(", ")+"], ","function ("+u.join(", ")+") {","var callerFrame = frame;","frame = "+(a?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),i.forEach((function(e){n._emitLine('frame.set("'+e.value+'", l_'+e.value+");"),l.set(e.value,"l_"+e.value);})),r&&r.children.forEach((function(e){var t=e.key.value;n._emit('frame.set("'+t+'", '),n._emit('Object.prototype.hasOwnProperty.call(kwargs, "'+t+'")'),n._emit(' ? kwargs["'+t+'"] : '),n._compileExpression(e.value,l),n._emit(");");}));var p=this._pushBuffer();return this._withScopedSyntax((function(){n.compile(e.body,l);})),this._emitLine("frame = "+(a?"frame.pop();":"callerFrame;")),this._emitLine("return new runtime.SafeString("+p+");"),this._emitLine("});"),this._popBuffer(),o},o.compileMacro=function(e,t){var n=this._compileMacro(e),i=e.name.value;t.set(i,n),t.parent?this._emitLine('frame.set("'+i+'", '+n+");"):("_"!==e.name.value.charAt(0)&&this._emitLine('context.addExport("'+i+'");'),this._emitLine('context.setVariable("'+i+'", '+n+");"));},o.compileCaller=function(e,t){this._emit("(function (){");var n=this._compileMacro(e,t);this._emit("return "+n+";})()");},o._compileGetTemplate=function(e,t,n,i){var r=this._tmpid(),o=this._templateName(),s=this._makeCallback(r),a=n?"true":"false",c=i?"true":"false";return this._emit("env.getTemplate("),this._compileExpression(e.template,t),this._emitLine(", "+a+", "+o+", "+c+", "+s),r},o.compileImport=function(e,t){var n=e.target.value,i=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(i+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(i)),this._addScopeLevel(),t.set(n,i),t.parent?this._emitLine('frame.set("'+n+'", '+i+");"):this._emitLine('context.setVariable("'+n+'", '+i+");");},o.compileFromImport=function(e,t){var n=this,i=this._compileGetTemplate(e,t,!1,!1);this._addScopeLevel(),this._emitLine(i+".getExported("+(e.withContext?"context.getVariables(), frame, ":"")+this._makeCallback(i)),this._addScopeLevel(),e.names.children.forEach((function(e){var r,o,a=n._tmpid();e instanceof s.Pair?(r=e.key.value,o=e.value.value):o=r=e.value,n._emitLine("if(Object.prototype.hasOwnProperty.call("+i+', "'+r+'")) {'),n._emitLine("var "+a+" = "+i+"."+r+";"),n._emitLine("} else {"),n._emitLine("cb(new Error(\"cannot import '"+r+"'\")); return;"),n._emitLine("}"),t.set(o,a),t.parent?n._emitLine('frame.set("'+o+'", '+a+");"):n._emitLine('context.setVariable("'+o+'", '+a+");");}));},o.compileBlock=function(e){var t=this._tmpid();this.inBlock||this._emit('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this._emit('context.getBlock("'+e.name.value+'")'),this.inBlock||this._emit(")"),this._emitLine("(env, context, frame, runtime, "+this._makeCallback(t)),this._emitLine(this.buffer+" += "+t+";"),this._addScopeLevel();},o.compileSuper=function(e,t){var n=e.blockName.value,i=e.symbol.value,r=this._makeCallback(i);this._emitLine('context.getSuper(env, "'+n+'", b_'+n+", frame, runtime, "+r),this._emitLine(i+" = runtime.markSafe("+i+");"),this._addScopeLevel(),t.set(i,i);},o.compileExtends=function(e,t){var n=this._tmpid(),i=this._compileGetTemplate(e,t,!0,!1);this._emitLine("parentTemplate = "+i),this._emitLine("for(var "+n+" in parentTemplate.blocks) {"),this._emitLine("context.addBlock("+n+", parentTemplate.blocks["+n+"]);"),this._emitLine("}"),this._addScopeLevel();},o.compileInclude=function(e,t){this._emitLine("var tasks = [];"),this._emitLine("tasks.push("),this._emitLine("function(callback) {");var n=this._compileGetTemplate(e,t,!1,e.ignoreMissing);this._emitLine("callback(null,"+n+");});"),this._emitLine("});");var i=this._tmpid();this._emitLine("tasks.push("),this._emitLine("function(template, callback){"),this._emitLine("template.render(context.getVariables(), frame, "+this._makeCallback(i)),this._emitLine("callback(null,"+i+");});"),this._emitLine("});"),this._emitLine("tasks.push("),this._emitLine("function(result, callback){"),this._emitLine(this.buffer+" += result;"),this._emitLine("callback(null);"),this._emitLine("});"),this._emitLine("env.waterfall(tasks, function(){"),this._addScopeLevel();},o.compileTemplateData=function(e,t){this.compileLiteral(e,t);},o.compileCapture=function(e,t){var n=this,i=this.buffer;this.buffer="output",this._emitLine("(function() {"),this._emitLine('var output = "";'),this._withScopedSyntax((function(){n.compile(e.body,t);})),this._emitLine("return output;"),this._emitLine("})()"),this.buffer=i;},o.compileOutput=function(e,t){var n=this;e.children.forEach((function(i){i instanceof s.TemplateData?i.value&&(n._emit(n.buffer+" += "),n.compileLiteral(i,t),n._emitLine(";")):(n._emit(n.buffer+" += runtime.suppressValue("),n.throwOnUndefined&&n._emit("runtime.ensureDefined("),n.compile(i,t),n.throwOnUndefined&&n._emit(","+e.lineno+","+e.colno+")"),n._emit(", env.opts.autoescape);\n"));}));},o.compileRoot=function(e,t){var n=this;t&&this.fail("compileRoot: root node can't have frame"),t=new c,this._emitFuncBegin(e,"root"),this._emitLine("var parentTemplate = null;"),this._compileChildren(e,t),this._emitLine("if(parentTemplate) {"),this._emitLine("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this._emitLine("} else {"),this._emitLine("cb(null, "+this.buffer+");"),this._emitLine("}"),this._emitFuncEnd(!0),this.inBlock=!0;var i=[],r=e.findAll(s.Block);r.forEach((function(e,t){var r=e.name.value;if(-1!==i.indexOf(r))throw new Error('Block "'+r+'" defined more than once.');i.push(r),n._emitFuncBegin(e,"b_"+r);var o=new c;n._emitLine("var frame = frame.push(true);"),n.compile(e.body,o),n._emitFuncEnd();})),this._emitLine("return {"),r.forEach((function(e,t){var i="b_"+e.name.value;n._emitLine(i+": "+i+",");})),this._emitLine("root: root\n};");},o.compile=function(e,t){var n=this["compile"+e.typename];n?n.call(this,e,t):this.fail("compile: Cannot compile node: "+e.typename,e.lineno,e.colno);},o.getCode=function(){return this.codebuf.join("")},r}(l);e.exports={compile:function(e,t,n,i,s){void 0===s&&(s={});var a=new h(i,s.throwOnUndefined),c=(n||[]).map((function(e){return e.preprocess})).filter((function(e){return !!e})).reduce((function(e,t){return t(e)}),e);return a.compile(o.transform(r.parse(c,n,s),t,i)),a.getCode()},Compiler:h};},function(e,t,n){function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}var r=n(4),o=n(1).EmitterObj;e.exports=function(e){var t,n;function o(){return e.apply(this,arguments)||this}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var s=o.prototype;return s.resolve=function(e,t){return r.resolve(r.dirname(e),t)},s.isRelative=function(e){return 0===e.indexOf("./")||0===e.indexOf("../")},o}(o);},function(e,t,n){function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,r(e,t);}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}var o=n(12),s=n(15),a=n(0),c=n(5),l=n(18),u=n(10),h=u.FileSystemLoader,f=u.WebLoader,p=u.PrecompiledLoader,m=n(20),d=n(21),v=n(1),_=v.Obj,y=v.EmitterObj,g=n(2),b=g.handleError,k=g.Frame,E=n(22);function w(e,t,n){o((function(){e(t,n);}));}var x={type:"code",obj:{root:function(e,t,n,i,r){try{r(null,"");}catch(e){r(b(e,null,null));}}}},O=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.init=function(e,t){var n=this;t=this.opts=t||{},this.opts.dev=!!t.dev,this.opts.autoescape=null==t.autoescape||t.autoescape,this.opts.throwOnUndefined=!!t.throwOnUndefined,this.opts.trimBlocks=!!t.trimBlocks,this.opts.lstripBlocks=!!t.lstripBlocks,this.loaders=[],e?this.loaders=a.isArray(e)?e:[e]:h?this.loaders=[new h("views")]:f&&(this.loaders=[new f("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new p(window.nunjucksPrecompiled)),this._initLoaders(),this.globals=d(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],a._entries(l).forEach((function(e){var t=e[0],i=e[1];return n.addFilter(t,i)})),a._entries(m).forEach((function(e){var t=e[0],i=e[1];return n.addTest(t,i)}));},n._initLoaders=function(){var e=this;this.loaders.forEach((function(t){t.cache={},"function"==typeof t.on&&(t.on("update",(function(n,i){t.cache[n]=null,e.emit("update",n,i,t);})),t.on("load",(function(n,i){e.emit("load",n,i,t);})));}));},n.invalidateCache=function(){this.loaders.forEach((function(e){e.cache={};}));},n.addExtension=function(e,t){return t.__name=e,this.extensions[e]=t,this.extensionsList.push(t),this},n.removeExtension=function(e){var t=this.getExtension(e);t&&(this.extensionsList=a.without(this.extensionsList,t),delete this.extensions[e]);},n.getExtension=function(e){return this.extensions[e]},n.hasExtension=function(e){return !!this.extensions[e]},n.addGlobal=function(e,t){return this.globals[e]=t,this},n.getGlobal=function(e){if(void 0===this.globals[e])throw new Error("global not found: "+e);return this.globals[e]},n.addFilter=function(e,t,n){var i=t;return n&&this.asyncFilters.push(e),this.filters[e]=i,this},n.getFilter=function(e){if(!this.filters[e])throw new Error("filter not found: "+e);return this.filters[e]},n.addTest=function(e,t){return this.tests[e]=t,this},n.getTest=function(e){if(!this.tests[e])throw new Error("test not found: "+e);return this.tests[e]},n.resolveTemplate=function(e,t,n){return e.isRelative&&t&&e.isRelative(n)&&e.resolve?e.resolve(t,n):n},n.getTemplate=function(e,t,n,i,r){var o,s=this,c=this,l=null;if(e&&e.raw&&(e=e.raw),a.isFunction(n)&&(r=n,n=null,t=t||!1),a.isFunction(t)&&(r=t,t=!1),e instanceof T)l=e;else {if("string"!=typeof e)throw new Error("template names must be a string: "+e);for(var u=0;u<this.loaders.length;u++){var h=this.loaders[u];if(l=h.cache[this.resolveTemplate(h,n,e)])break}}return l?(t&&l.compile(),r?void r(null,l):l):(a.asyncIter(this.loaders,(function(t,i,r,o){function s(e,n){e?o(e):n?(n.loader=t,o(null,n)):r();}e=c.resolveTemplate(t,n,e),t.async?t.getSource(e,s):s(null,t.getSource(e));}),(function(n,a){if(a||n||i||(n=new Error("template not found: "+e)),n){if(r)return void r(n);throw n}var c;a?(c=new T(a.src,s,a.path,t),a.noCache||(a.loader.cache[e]=c)):c=new T(x,s,"",t),r?r(null,c):o=c;})),o)},n.express=function(e){return E(this,e)},n.render=function(e,t,n){a.isFunction(t)&&(n=t,t=null);var i=null;return this.getTemplate(e,(function(e,r){if(e&&n)w(n,e);else {if(e)throw e;i=r.render(t,n);}})),i},n.renderString=function(e,t,n,i){return a.isFunction(n)&&(i=n,n={}),new T(e,this,(n=n||{}).path).render(t,i)},n.waterfall=function(e,t,n){return s(e,t,n)},t}(y),L=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.init=function(e,t,n){var i=this;this.env=n||new O,this.ctx=a.extend({},e),this.blocks={},this.exported=[],a.keys(t).forEach((function(e){i.addBlock(e,t[e]);}));},n.lookup=function(e){return e in this.env.globals&&!(e in this.ctx)?this.env.globals[e]:this.ctx[e]},n.setVariable=function(e,t){this.ctx[e]=t;},n.getVariables=function(){return this.ctx},n.addBlock=function(e,t){return this.blocks[e]=this.blocks[e]||[],this.blocks[e].push(t),this},n.getBlock=function(e){if(!this.blocks[e])throw new Error('unknown block "'+e+'"');return this.blocks[e][0]},n.getSuper=function(e,t,n,i,r,o){var s=a.indexOf(this.blocks[t]||[],n),c=this.blocks[t][s+1];if(-1===s||!c)throw new Error('no super block available for "'+t+'"');c(e,this,i,r,o);},n.addExport=function(e){this.exported.push(e);},n.getExported=function(){var e=this,t={};return this.exported.forEach((function(n){t[n]=e.ctx[n];})),t},t}(_),T=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.init=function(e,t,n,i){if(this.env=t||new O,a.isObject(e))switch(e.type){case"code":this.tmplProps=e.obj;break;case"string":this.tmplStr=e.obj;break;default:throw new Error("Unexpected template object type "+e.type+"; expected 'code', or 'string'")}else {if(!a.isString(e))throw new Error("src must be a string or an object describing the source");this.tmplStr=e;}if(this.path=n,i)try{this._compile();}catch(e){throw a._prettifyError(this.path,this.env.opts.dev,e)}else this.compiled=!1;},n.render=function(e,t,n){var i=this;"function"==typeof e?(n=e,e={}):"function"==typeof t&&(n=t,t=null);var r=!t;try{this.compile();}catch(e){var o=a._prettifyError(this.path,this.env.opts.dev,e);if(n)return w(n,o);throw o}var s=new L(e||{},this.blocks,this.env),c=t?t.push(!0):new k;c.topLevel=!0;var l=null,u=!1;return this.rootRenderFunc(this.env,s,c,g,(function(e,t){if(!u||!n||void 0===t)if(e&&(e=a._prettifyError(i.path,i.env.opts.dev,e),u=!0),n)r?w(n,e,t):n(e,t);else {if(e)throw e;l=t;}})),l},n.getExported=function(e,t,n){"function"==typeof e&&(n=e,e={}),"function"==typeof t&&(n=t,t=null);try{this.compile();}catch(e){if(n)return n(e);throw e}var i=t?t.push():new k;i.topLevel=!0;var r=new L(e||{},this.blocks,this.env);this.rootRenderFunc(this.env,r,i,g,(function(e){e?n(e,null):n(null,r.getExported());}));},n.compile=function(){this.compiled||this._compile();},n._compile=function(){var e;if(this.tmplProps)e=this.tmplProps;else {var t=c.compile(this.tmplStr,this.env.asyncFilters,this.env.extensionsList,this.path,this.env.opts);e=new Function(t)();}this.blocks=this._getBlocks(e),this.rootRenderFunc=e.root,this.compiled=!0;},n._getBlocks=function(e){var t={};return a.keys(e).forEach((function(n){"b_"===n.slice(0,2)&&(t[n.slice(2)]=e[n]);})),t},t}(_);e.exports={Environment:O,Template:T};},function(e,t,n){function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}var r=n(9),o=n(3),s=n(1).Obj,a=n(0),c=function(e){var t,n;function s(){return e.apply(this,arguments)||this}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var c=s.prototype;return c.init=function(e){this.tokens=e,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[];},c.nextToken=function(e){var t;if(this.peeked){if(e||this.peeked.type!==r.TOKEN_WHITESPACE)return t=this.peeked,this.peeked=null,t;this.peeked=null;}if(t=this.tokens.nextToken(),!e)for(;t&&t.type===r.TOKEN_WHITESPACE;)t=this.tokens.nextToken();return t},c.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},c.pushToken=function(e){if(this.peeked)throw new Error("pushToken: can only push one token on between reads");this.peeked=e;},c.error=function(e,t,n){if(void 0===t||void 0===n){var i=this.peekToken()||{};t=i.lineno,n=i.colno;}return void 0!==t&&(t+=1),void 0!==n&&(n+=1),new a.TemplateError(e,t,n)},c.fail=function(e,t,n){throw this.error(e,t,n)},c.skip=function(e){var t=this.nextToken();return !(!t||t.type!==e)||(this.pushToken(t),!1)},c.expect=function(e){var t=this.nextToken();return t.type!==e&&this.fail("expected "+e+", got "+t.type,t.lineno,t.colno),t},c.skipValue=function(e,t){var n=this.nextToken();return !(!n||n.type!==e||n.value!==t)||(this.pushToken(n),!1)},c.skipSymbol=function(e){return this.skipValue(r.TOKEN_SYMBOL,e)},c.advanceAfterBlockEnd=function(e){var t;return e||((t=this.peekToken())||this.fail("unexpected end of file"),t.type!==r.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),e=this.nextToken().value),(t=this.nextToken())&&t.type===r.TOKEN_BLOCK_END?"-"===t.value.charAt(0)&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+e+" statement"),t},c.advanceAfterVariableEnd=function(){var e=this.nextToken();e&&e.type===r.TOKEN_VARIABLE_END?this.dropLeadingWhitespace="-"===e.value.charAt(e.value.length-this.tokens.tags.VARIABLE_END.length-1):(this.pushToken(e),this.fail("expected variable end"));},c.parseFor=function(){var e,t,n=this.peekToken();if(this.skipSymbol("for")?(e=new o.For(n.lineno,n.colno),t="endfor"):this.skipSymbol("asyncEach")?(e=new o.AsyncEach(n.lineno,n.colno),t="endeach"):this.skipSymbol("asyncAll")?(e=new o.AsyncAll(n.lineno,n.colno),t="endall"):this.fail("parseFor: expected for{Async}",n.lineno,n.colno),e.name=this.parsePrimary(),e.name instanceof o.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===r.TOKEN_COMMA){var i=e.name;for(e.name=new o.Array(i.lineno,i.colno),e.name.addChild(i);this.skip(r.TOKEN_COMMA);){var s=this.parsePrimary();e.name.addChild(s);}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',n.lineno,n.colno),e.arr=this.parseExpression(),this.advanceAfterBlockEnd(n.value),e.body=this.parseUntilBlocks(t,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),e.else_=this.parseUntilBlocks(t)),this.advanceAfterBlockEnd(),e},c.parseMacro=function(){var e=this.peekToken();this.skipSymbol("macro")||this.fail("expected macro");var t=this.parsePrimary(!0),n=this.parseSignature(),i=new o.Macro(e.lineno,e.colno,t,n);return this.advanceAfterBlockEnd(e.value),i.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),i},c.parseCall=function(){var e=this.peekToken();this.skipSymbol("call")||this.fail("expected call");var t=this.parseSignature(!0)||new o.NodeList,n=this.parsePrimary();this.advanceAfterBlockEnd(e.value);var i=this.parseUntilBlocks("endcall");this.advanceAfterBlockEnd();var r=new o.Symbol(e.lineno,e.colno,"caller"),s=new o.Caller(e.lineno,e.colno,r,t,i),a=n.args.children;return a[a.length-1]instanceof o.KeywordArgs||a.push(new o.KeywordArgs),a[a.length-1].addChild(new o.Pair(e.lineno,e.colno,r,s)),new o.Output(e.lineno,e.colno,[n])},c.parseWithContext=function(){var e=this.peekToken(),t=null;return this.skipSymbol("with")?t=!0:this.skipSymbol("without")&&(t=!1),null!==t&&(this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",e.lineno,e.colno)),t},c.parseImport=function(){var e=this.peekToken();this.skipSymbol("import")||this.fail("parseImport: expected import",e.lineno,e.colno);var t=this.parseExpression();this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword',e.lineno,e.colno);var n=this.parseExpression(),i=this.parseWithContext(),r=new o.Import(e.lineno,e.colno,t,n,i);return this.advanceAfterBlockEnd(e.value),r},c.parseFrom=function(){var e=this.peekToken();this.skipSymbol("from")||this.fail("parseFrom: expected from");var t=this.parseExpression();this.skipSymbol("import")||this.fail("parseFrom: expected import",e.lineno,e.colno);for(var n,i=new o.NodeList;;){var s=this.peekToken();if(s.type===r.TOKEN_BLOCK_END){i.children.length||this.fail("parseFrom: Expected at least one import name",e.lineno,e.colno),"-"===s.value.charAt(0)&&(this.dropLeadingWhitespace=!0),this.nextToken();break}i.children.length>0&&!this.skip(r.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",e.lineno,e.colno);var a=this.parsePrimary();if("_"===a.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",a.lineno,a.colno),this.skipSymbol("as")){var c=this.parsePrimary();i.addChild(new o.Pair(a.lineno,a.colno,a,c));}else i.addChild(a);n=this.parseWithContext();}return new o.FromImport(e.lineno,e.colno,t,i,n)},c.parseBlock=function(){var e=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",e.lineno,e.colno);var t=new o.Block(e.lineno,e.colno);t.name=this.parsePrimary(),t.name instanceof o.Symbol||this.fail("parseBlock: variable name expected",e.lineno,e.colno),this.advanceAfterBlockEnd(e.value),t.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(t.name.value);var n=this.peekToken();return n||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(n.value),t},c.parseExtends=function(){var e="extends",t=this.peekToken();this.skipSymbol(e)||this.fail("parseTemplateRef: expected "+e);var n=new o.Extends(t.lineno,t.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(t.value),n},c.parseInclude=function(){var e="include",t=this.peekToken();this.skipSymbol(e)||this.fail("parseInclude: expected "+e);var n=new o.Include(t.lineno,t.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(t.value),n},c.parseIf=function(){var e,t=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?e=new o.If(t.lineno,t.colno):this.skipSymbol("ifAsync")?e=new o.IfAsync(t.lineno,t.colno):this.fail("parseIf: expected if, elif, or elseif",t.lineno,t.colno),e.cond=this.parseExpression(),this.advanceAfterBlockEnd(t.value),e.body=this.parseUntilBlocks("elif","elseif","else","endif");var n=this.peekToken();switch(n&&n.value){case"elseif":case"elif":e.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),e.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":e.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file");}return e},c.parseSet=function(){var e=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",e.lineno,e.colno);for(var t,n=new o.Set(e.lineno,e.colno,[]);(t=this.parsePrimary())&&(n.targets.push(t),this.skip(r.TOKEN_COMMA)););return this.skipValue(r.TOKEN_OPERATOR,"=")?(n.value=this.parseExpression(),this.advanceAfterBlockEnd(e.value)):this.skip(r.TOKEN_BLOCK_END)?(n.body=new o.Capture(e.lineno,e.colno,this.parseUntilBlocks("endset")),n.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",e.lineno,e.colno),n},c.parseSwitch=function(){var e="switch",t="endswitch",n="case",i="default",r=this.peekToken();this.skipSymbol(e)||this.skipSymbol(n)||this.skipSymbol(i)||this.fail('parseSwitch: expected "switch," "case" or "default"',r.lineno,r.colno);var s=this.parseExpression();this.advanceAfterBlockEnd(e),this.parseUntilBlocks(n,i,t);var a,c=this.peekToken(),l=[];do{this.skipSymbol(n);var u=this.parseExpression();this.advanceAfterBlockEnd(e);var h=this.parseUntilBlocks(n,i,t);l.push(new o.Case(c.line,c.col,u,h)),c=this.peekToken();}while(c&&c.value===n);switch(c.value){case i:this.advanceAfterBlockEnd(),a=this.parseUntilBlocks(t),this.advanceAfterBlockEnd();break;case t:this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.');}return new o.Switch(r.lineno,r.colno,s,l,a)},c.parseStatement=function(){var e=this.peekToken();if(e.type!==r.TOKEN_SYMBOL&&this.fail("tag name expected",e.lineno,e.colno),this.breakOnBlocks&&-1!==a.indexOf(this.breakOnBlocks,e.value))return null;switch(e.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var t=0;t<this.extensions.length;t++){var n=this.extensions[t];if(-1!==a.indexOf(n.tags||[],e.value))return n.parse(this,o,r)}this.fail("unknown block tag: "+e.value,e.lineno,e.colno);}},c.parseRaw=function(e){for(var t="end"+(e=e||"raw"),n=new RegExp("([\\s\\S]*?){%\\s*("+e+"|"+t+")\\s*(?=%})%}"),i=1,r="",s=null,a=this.advanceAfterBlockEnd();(s=this.tokens._extractRegex(n))&&i>0;){var c=s[0],l=s[1],u=s[2];u===e?i+=1:u===t&&(i-=1),0===i?(r+=l,this.tokens.backN(c.length-l.length)):r+=c;}return new o.Output(a.lineno,a.colno,[new o.TemplateData(a.lineno,a.colno,r)])},c.parsePostfix=function(e){for(var t,n=this.peekToken();n;){if(n.type===r.TOKEN_LEFT_PAREN)e=new o.FunCall(n.lineno,n.colno,e,this.parseSignature());else if(n.type===r.TOKEN_LEFT_BRACKET)(t=this.parseAggregate()).children.length>1&&this.fail("invalid index"),e=new o.LookupVal(n.lineno,n.colno,e,t.children[0]);else {if(n.type!==r.TOKEN_OPERATOR||"."!==n.value)break;this.nextToken();var i=this.nextToken();i.type!==r.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+i.value,i.lineno,i.colno),t=new o.Literal(i.lineno,i.colno,i.value),e=new o.LookupVal(n.lineno,n.colno,e,t);}n=this.peekToken();}return e},c.parseExpression=function(){return this.parseInlineIf()},c.parseInlineIf=function(){var e=this.parseOr();if(this.skipSymbol("if")){var t=this.parseOr(),n=e;(e=new o.InlineIf(e.lineno,e.colno)).body=n,e.cond=t,this.skipSymbol("else")?e.else_=this.parseOr():e.else_=null;}return e},c.parseOr=function(){for(var e=this.parseAnd();this.skipSymbol("or");){var t=this.parseAnd();e=new o.Or(e.lineno,e.colno,e,t);}return e},c.parseAnd=function(){for(var e=this.parseNot();this.skipSymbol("and");){var t=this.parseNot();e=new o.And(e.lineno,e.colno,e,t);}return e},c.parseNot=function(){var e=this.peekToken();return this.skipSymbol("not")?new o.Not(e.lineno,e.colno,this.parseNot()):this.parseIn()},c.parseIn=function(){for(var e=this.parseIs();;){var t=this.nextToken();if(!t)break;var n=t.type===r.TOKEN_SYMBOL&&"not"===t.value;if(n||this.pushToken(t),!this.skipSymbol("in")){n&&this.pushToken(t);break}var i=this.parseIs();e=new o.In(e.lineno,e.colno,e,i),n&&(e=new o.Not(e.lineno,e.colno,e));}return e},c.parseIs=function(){var e=this.parseCompare();if(this.skipSymbol("is")){var t=this.skipSymbol("not"),n=this.parseCompare();e=new o.Is(e.lineno,e.colno,e,n),t&&(e=new o.Not(e.lineno,e.colno,e));}return e},c.parseCompare=function(){for(var e=["==","===","!=","!==","<",">","<=",">="],t=this.parseConcat(),n=[];;){var i=this.nextToken();if(!i)break;if(-1===e.indexOf(i.value)){this.pushToken(i);break}n.push(new o.CompareOperand(i.lineno,i.colno,this.parseConcat(),i.value));}return n.length?new o.Compare(n[0].lineno,n[0].colno,t,n):t},c.parseConcat=function(){for(var e=this.parseAdd();this.skipValue(r.TOKEN_TILDE,"~");){var t=this.parseAdd();e=new o.Concat(e.lineno,e.colno,e,t);}return e},c.parseAdd=function(){for(var e=this.parseSub();this.skipValue(r.TOKEN_OPERATOR,"+");){var t=this.parseSub();e=new o.Add(e.lineno,e.colno,e,t);}return e},c.parseSub=function(){for(var e=this.parseMul();this.skipValue(r.TOKEN_OPERATOR,"-");){var t=this.parseMul();e=new o.Sub(e.lineno,e.colno,e,t);}return e},c.parseMul=function(){for(var e=this.parseDiv();this.skipValue(r.TOKEN_OPERATOR,"*");){var t=this.parseDiv();e=new o.Mul(e.lineno,e.colno,e,t);}return e},c.parseDiv=function(){for(var e=this.parseFloorDiv();this.skipValue(r.TOKEN_OPERATOR,"/");){var t=this.parseFloorDiv();e=new o.Div(e.lineno,e.colno,e,t);}return e},c.parseFloorDiv=function(){for(var e=this.parseMod();this.skipValue(r.TOKEN_OPERATOR,"//");){var t=this.parseMod();e=new o.FloorDiv(e.lineno,e.colno,e,t);}return e},c.parseMod=function(){for(var e=this.parsePow();this.skipValue(r.TOKEN_OPERATOR,"%");){var t=this.parsePow();e=new o.Mod(e.lineno,e.colno,e,t);}return e},c.parsePow=function(){for(var e=this.parseUnary();this.skipValue(r.TOKEN_OPERATOR,"**");){var t=this.parseUnary();e=new o.Pow(e.lineno,e.colno,e,t);}return e},c.parseUnary=function(e){var t,n=this.peekToken();return t=this.skipValue(r.TOKEN_OPERATOR,"-")?new o.Neg(n.lineno,n.colno,this.parseUnary(!0)):this.skipValue(r.TOKEN_OPERATOR,"+")?new o.Pos(n.lineno,n.colno,this.parseUnary(!0)):this.parsePrimary(),e||(t=this.parseFilter(t)),t},c.parsePrimary=function(e){var t,n=this.nextToken(),i=null;if(n?n.type===r.TOKEN_STRING?t=n.value:n.type===r.TOKEN_INT?t=parseInt(n.value,10):n.type===r.TOKEN_FLOAT?t=parseFloat(n.value):n.type===r.TOKEN_BOOLEAN?"true"===n.value?t=!0:"false"===n.value?t=!1:this.fail("invalid boolean: "+n.value,n.lineno,n.colno):n.type===r.TOKEN_NONE?t=null:n.type===r.TOKEN_REGEX&&(t=new RegExp(n.value.body,n.value.flags)):this.fail("expected expression, got end of file"),void 0!==t?i=new o.Literal(n.lineno,n.colno,t):n.type===r.TOKEN_SYMBOL?i=new o.Symbol(n.lineno,n.colno,n.value):(this.pushToken(n),i=this.parseAggregate()),e||(i=this.parsePostfix(i)),i)return i;throw this.error("unexpected token: "+n.value,n.lineno,n.colno)},c.parseFilterName=function(){for(var e=this.expect(r.TOKEN_SYMBOL),t=e.value;this.skipValue(r.TOKEN_OPERATOR,".");)t+="."+this.expect(r.TOKEN_SYMBOL).value;return new o.Symbol(e.lineno,e.colno,t)},c.parseFilterArgs=function(e){return this.peekToken().type===r.TOKEN_LEFT_PAREN?this.parsePostfix(e).args.children:[]},c.parseFilter=function(e){for(;this.skip(r.TOKEN_PIPE);){var t=this.parseFilterName();e=new o.Filter(t.lineno,t.colno,t,new o.NodeList(t.lineno,t.colno,[e].concat(this.parseFilterArgs(e))));}return e},c.parseFilterStatement=function(){var e=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var t=this.parseFilterName(),n=this.parseFilterArgs(t);this.advanceAfterBlockEnd(e.value);var i=new o.Capture(t.lineno,t.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var r=new o.Filter(t.lineno,t.colno,t,new o.NodeList(t.lineno,t.colno,[i].concat(n)));return new o.Output(t.lineno,t.colno,[r])},c.parseAggregate=function(){var e,t=this.nextToken();switch(t.type){case r.TOKEN_LEFT_PAREN:e=new o.Group(t.lineno,t.colno);break;case r.TOKEN_LEFT_BRACKET:e=new o.Array(t.lineno,t.colno);break;case r.TOKEN_LEFT_CURLY:e=new o.Dict(t.lineno,t.colno);break;default:return null}for(;;){var n=this.peekToken().type;if(n===r.TOKEN_RIGHT_PAREN||n===r.TOKEN_RIGHT_BRACKET||n===r.TOKEN_RIGHT_CURLY){this.nextToken();break}if(e.children.length>0&&(this.skip(r.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",t.lineno,t.colno)),e instanceof o.Dict){var i=this.parsePrimary();this.skip(r.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",t.lineno,t.colno);var s=this.parseExpression();e.addChild(new o.Pair(i.lineno,i.colno,i,s));}else {var a=this.parseExpression();e.addChild(a);}}return e},c.parseSignature=function(e,t){var n=this.peekToken();if(!t&&n.type!==r.TOKEN_LEFT_PAREN){if(e)return null;this.fail("expected arguments",n.lineno,n.colno);}n.type===r.TOKEN_LEFT_PAREN&&(n=this.nextToken());for(var i=new o.NodeList(n.lineno,n.colno),s=new o.KeywordArgs(n.lineno,n.colno),a=!1;;){if(n=this.peekToken(),!t&&n.type===r.TOKEN_RIGHT_PAREN){this.nextToken();break}if(t&&n.type===r.TOKEN_BLOCK_END)break;if(a&&!this.skip(r.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",n.lineno,n.colno);else {var c=this.parseExpression();this.skipValue(r.TOKEN_OPERATOR,"=")?s.addChild(new o.Pair(c.lineno,c.colno,c,this.parseExpression())):i.addChild(c);}a=!0;}return s.children.length&&i.addChild(s),i},c.parseUntilBlocks=function(){for(var e=this.breakOnBlocks,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];this.breakOnBlocks=n;var r=this.parse();return this.breakOnBlocks=e,r},c.parseNodes=function(){for(var e,t=[];e=this.nextToken();)if(e.type===r.TOKEN_DATA){var n=e.value,i=this.peekToken(),s=i&&i.value;this.dropLeadingWhitespace&&(n=n.replace(/^\s*/,""),this.dropLeadingWhitespace=!1),i&&(i.type===r.TOKEN_BLOCK_START&&"-"===s.charAt(s.length-1)||i.type===r.TOKEN_VARIABLE_START&&"-"===s.charAt(this.tokens.tags.VARIABLE_START.length)||i.type===r.TOKEN_COMMENT&&"-"===s.charAt(this.tokens.tags.COMMENT_START.length))&&(n=n.replace(/\s*$/,"")),t.push(new o.Output(e.lineno,e.colno,[new o.TemplateData(e.lineno,e.colno,n)]));}else if(e.type===r.TOKEN_BLOCK_START){this.dropLeadingWhitespace=!1;var a=this.parseStatement();if(!a)break;t.push(a);}else if(e.type===r.TOKEN_VARIABLE_START){var c=this.parseExpression();this.dropLeadingWhitespace=!1,this.advanceAfterVariableEnd(),t.push(new o.Output(e.lineno,e.colno,[c]));}else e.type===r.TOKEN_COMMENT?this.dropLeadingWhitespace="-"===e.value.charAt(e.value.length-this.tokens.tags.COMMENT_END.length-1):this.fail("Unexpected token at top-level: "+e.type,e.lineno,e.colno);return t},c.parse=function(){return new o.NodeList(0,0,this.parseNodes())},c.parseAsRoot=function(){return new o.Root(0,0,this.parseNodes())},s}(s);e.exports={parse:function(e,t,n){var i=new c(r.lex(e,n));return void 0!==t&&(i.extensions=t),i.parseAsRoot()},Parser:c};},function(e,t,n){var i=n(0),r=" \n\t\r ",o="()[]{}%*-+~/#,:|.<>=!",s="string",a="whitespace",c="data",l="block-start",u="block-end",h="variable-start",f="variable-end",p="comment",m="left-paren",d="right-paren",v="left-bracket",_="right-bracket",y="left-curly",g="right-curly",b="operator",k="comma",E="colon",w="tilde",x="pipe",O="float",L="boolean",T="none",S="symbol",A="regex";function N(e,t,n,i){return {type:e,value:t,lineno:n,colno:i}}var C=function(){function e(e,t){this.str=e,this.index=0,this.len=e.length,this.lineno=0,this.colno=0,this.in_code=!1;var n=(t=t||{}).tags||{};this.tags={BLOCK_START:n.blockStart||"{%",BLOCK_END:n.blockEnd||"%}",VARIABLE_START:n.variableStart||"{{",VARIABLE_END:n.variableEnd||"}}",COMMENT_START:n.commentStart||"{#",COMMENT_END:n.commentEnd||"#}"},this.trimBlocks=!!t.trimBlocks,this.lstripBlocks=!!t.lstripBlocks;}var t=e.prototype;return t.nextToken=function(){var e,t=this.lineno,n=this.colno;if(this.in_code){var C=this.current();if(this.isFinished())return null;if('"'===C||"'"===C)return N(s,this._parseString(C),t,n);if(e=this._extract(r))return N(a,e,t,n);if((e=this._extractString(this.tags.BLOCK_END))||(e=this._extractString("-"+this.tags.BLOCK_END)))return this.in_code=!1,this.trimBlocks&&("\n"===(C=this.current())?this.forward():"\r"===C&&(this.forward(),"\n"===(C=this.current())?this.forward():this.back())),N(u,e,t,n);if((e=this._extractString(this.tags.VARIABLE_END))||(e=this._extractString("-"+this.tags.VARIABLE_END)))return this.in_code=!1,N(f,e,t,n);if("r"===C&&"/"===this.str.charAt(this.index+1)){this.forwardN(2);for(var B="";!this.isFinished();){if("/"===this.current()&&"\\"!==this.previous()){this.forward();break}B+=this.current(),this.forward();}for(var F=["g","i","m","y"],j="";!this.isFinished()&&-1!==F.indexOf(this.current());)j+=this.current(),this.forward();return N(A,{body:B,flags:j},t,n)}if(-1!==o.indexOf(C)){this.forward();var R,P=["==","===","!=","!==","<=",">=","//","**"],K=C+this.current();switch(-1!==i.indexOf(P,K)&&(this.forward(),C=K,-1!==i.indexOf(P,K+this.current())&&(C=K+this.current(),this.forward())),C){case"(":R=m;break;case")":R=d;break;case"[":R=v;break;case"]":R=_;break;case"{":R=y;break;case"}":R=g;break;case",":R=k;break;case":":R=E;break;case"~":R=w;break;case"|":R=x;break;default:R=b;}return N(R,C,t,n)}if((e=this._extractUntil(r+o)).match(/^[-+]?[0-9]+$/)){if("."===this.current()){this.forward();var I=this._extract("0123456789");return N(O,e+"."+I,t,n)}return N("int",e,t,n)}if(e.match(/^(true|false)$/))return N(L,e,t,n);if("none"===e)return N(T,e,t,n);if("null"===e)return N(T,e,t,n);if(e)return N(S,e,t,n);throw new Error("Unexpected value while parsing: "+e)}var M,D=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((e=this._extractString(this.tags.BLOCK_START+"-"))||(e=this._extractString(this.tags.BLOCK_START)))return this.in_code=!0,N(l,e,t,n);if((e=this._extractString(this.tags.VARIABLE_START+"-"))||(e=this._extractString(this.tags.VARIABLE_START)))return this.in_code=!0,N(h,e,t,n);e="";var U=!1;for(this._matches(this.tags.COMMENT_START)&&(U=!0,e=this._extractString(this.tags.COMMENT_START));null!==(M=this._extractUntil(D));){if(e+=M,(this._matches(this.tags.BLOCK_START)||this._matches(this.tags.VARIABLE_START)||this._matches(this.tags.COMMENT_START))&&!U){if(this.lstripBlocks&&this._matches(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=e.length){var V=e.slice(-this.colno);if(/^\s+$/.test(V)&&!(e=e.slice(0,-this.colno)).length)return this.nextToken()}break}if(this._matches(this.tags.COMMENT_END)){if(!U)throw new Error("unexpected end of comment");e+=this._extractString(this.tags.COMMENT_END);break}e+=this.current(),this.forward();}if(null===M&&U)throw new Error("expected end of comment, got end of file");return N(U?p:c,e,t,n)},t._parseString=function(e){this.forward();for(var t="";!this.isFinished()&&this.current()!==e;){var n=this.current();if("\\"===n){switch(this.forward(),this.current()){case"n":t+="\n";break;case"t":t+="\t";break;case"r":t+="\r";break;default:t+=this.current();}this.forward();}else t+=n,this.forward();}return this.forward(),t},t._matches=function(e){return this.index+e.length>this.len?null:this.str.slice(this.index,this.index+e.length)===e},t._extractString=function(e){return this._matches(e)?(this.forwardN(e.length),e):null},t._extractUntil=function(e){return this._extractMatching(!0,e||"")},t._extract=function(e){return this._extractMatching(!1,e)},t._extractMatching=function(e,t){if(this.isFinished())return null;var n=t.indexOf(this.current());if(e&&-1===n||!e&&-1!==n){var i=this.current();this.forward();for(var r=t.indexOf(this.current());(e&&-1===r||!e&&-1!==r)&&!this.isFinished();)i+=this.current(),this.forward(),r=t.indexOf(this.current());return i}return ""},t._extractRegex=function(e){var t=this.currentStr().match(e);return t?(this.forwardN(t[0].length),t):null},t.isFinished=function(){return this.index>=this.len},t.forwardN=function(e){for(var t=0;t<e;t++)this.forward();},t.forward=function(){this.index++,"\n"===this.previous()?(this.lineno++,this.colno=0):this.colno++;},t.backN=function(e){for(var t=0;t<e;t++)this.back();},t.back=function(){if(this.index--,"\n"===this.current()){this.lineno--;var e=this.src.lastIndexOf("\n",this.index-1);this.colno=-1===e?this.index:this.index-e;}else this.colno--;},t.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},t.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},t.previous=function(){return this.str.charAt(this.index-1)},e}();e.exports={lex:function(e,t){return new C(e,t)},TOKEN_STRING:s,TOKEN_WHITESPACE:a,TOKEN_DATA:c,TOKEN_BLOCK_START:l,TOKEN_BLOCK_END:u,TOKEN_VARIABLE_START:h,TOKEN_VARIABLE_END:f,TOKEN_COMMENT:p,TOKEN_LEFT_PAREN:m,TOKEN_RIGHT_PAREN:d,TOKEN_LEFT_BRACKET:v,TOKEN_RIGHT_BRACKET:_,TOKEN_LEFT_CURLY:y,TOKEN_RIGHT_CURLY:g,TOKEN_OPERATOR:b,TOKEN_COMMA:k,TOKEN_COLON:E,TOKEN_TILDE:w,TOKEN_PIPE:x,TOKEN_INT:"int",TOKEN_FLOAT:O,TOKEN_BOOLEAN:L,TOKEN_NONE:T,TOKEN_SYMBOL:S,TOKEN_SPECIAL:"special",TOKEN_REGEX:A};},function(e,t,n){function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}var r=n(6),o=n(19).PrecompiledLoader,s=function(e){var t,n;function r(t,n){var i;return (i=e.call(this)||this).baseURL=t||".",n=n||{},i.useCache=!!n.useCache,i.async=!!n.async,i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n);var o=r.prototype;return o.resolve=function(e,t){throw new Error("relative templates not support in the browser yet")},o.getSource=function(e,t){var n,i=this,r=this.useCache;return this.fetch(this.baseURL+"/"+e,(function(o,s){if(o)if(t)t(o.content);else {if(404!==o.status)throw o.content;n=null;}else n={src:s,path:e,noCache:!r},i.emit("load",e,n),t&&t(null,n);})),n},o.fetch=function(e,t){if("undefined"==typeof window)throw new Error("WebLoader can only by used in a browser");var n=new XMLHttpRequest,i=!0;n.onreadystatechange=function(){4===n.readyState&&i&&(i=!1,0===n.status||200===n.status?t(null,n.responseText):t({status:n.status,content:n.responseText}));},e+=(-1===e.indexOf("?")?"?":"&")+"s="+(new Date).getTime(),n.open("GET",e,this.async),n.send();},r}(r);e.exports={WebLoader:s,PrecompiledLoader:o};},function(e,t,n){var i,r=n(0),o=n(7),s=o.Environment,a=o.Template,c=n(6),l=n(10),u=n(23),h=n(5),f=n(8),p=n(9),m=n(2),d=n(3),v=n(25);function _(e,t){var n;return t=t||{},r.isObject(e)&&(t=e,e=null),l.FileSystemLoader?n=new l.FileSystemLoader(e,{watch:t.watch,noCache:t.noCache}):l.WebLoader&&(n=new l.WebLoader(e,{useCache:t.web&&t.web.useCache,async:t.web&&t.web.async})),i=new s(n,t),t&&t.express&&i.express(t.express),i}e.exports={Environment:s,Template:a,Loader:c,FileSystemLoader:l.FileSystemLoader,NodeResolveLoader:l.NodeResolveLoader,PrecompiledLoader:l.PrecompiledLoader,WebLoader:l.WebLoader,compiler:h,parser:f,lexer:p,runtime:m,lib:r,nodes:d,installJinjaCompat:v,configure:_,reset:function(){i=void 0;},compile:function(e,t,n,r){return i||_(),new a(e,t,n,r)},render:function(e,t,n){return i||_(),i.render(e,t,n)},renderString:function(e,t,n){return i||_(),i.renderString(e,t,n)},precompile:u?u.precompile:void 0,precompileString:u?u.precompileString:void 0};},function(e,t,n){var i=n(13),r=[],o=[],s=i.makeRequestCallFromTimer((function(){if(o.length)throw o.shift()}));function a(e){var t;(t=r.length?r.pop():new c).task=e,i(t);}function c(){this.task=null;}e.exports=a,c.prototype.call=function(){try{this.task.call();}catch(e){a.onerror?a.onerror(e):(o.push(e),s());}finally{this.task=null,r[r.length]=this;}};},function(e,t,n){(function(t){function n(e){r.length||i(),r[r.length]=e;}e.exports=n;var i,r=[],o=0;function s(){for(;o<r.length;){var e=o;if(o+=1,r[e].call(),o>1024){for(var t=0,n=r.length-o;t<n;t++)r[t]=r[t+o];r.length-=o,o=0;}}r.length=0,o=0;}var a,c,l,u=void 0!==t?t:self,h=u.MutationObserver||u.WebKitMutationObserver;function f(e){return function(){var t=setTimeout(i,0),n=setInterval(i,50);function i(){clearTimeout(t),clearInterval(n),e();}}}"function"==typeof h?(a=1,c=new h(s),l=document.createTextNode(""),c.observe(l,{characterData:!0}),i=function(){a=-a,l.data=a;}):i=f(s),n.requestFlush=i,n.makeRequestCallFromTimer=f;}).call(t,n(14));},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this");}catch(e){"object"==typeof window&&(n=window);}e.exports=n;},function(e,t,n){var i;!function(){var n=function(){var e=Array.prototype.slice.call(arguments);"function"==typeof e[0]&&e[0].apply(null,e.splice(1));},r=function(e){"function"==typeof setImmediate?setImmediate(e):"undefined"!=typeof process&&process.nextTick?process.nextTick(e):setTimeout(e,0);},o=Array.isArray||function(e){return "[object Array]"===Object.prototype.toString.call(e)},s=function(e,t,i){var s=i?r:n;if(t=t||function(){},!o(e)){var a=new Error("First argument to waterfall must be an array of functions");return t(a)}if(!e.length)return t();var c=function(e){return function(n){if(n)t.apply(null,arguments),t=function(){};else {var i=Array.prototype.slice.call(arguments,1),r=e.next();r?i.push(c(r)):i.push(t),s((function(){e.apply(null,i);}));}}};c(function(e){var t=function(n){var i=function(){return e.length&&e[n].apply(null,arguments),i.next()};return i.next=function(){return n<e.length-1?t(n+1):null},i};return t(0)}(e))();};void 0===(i=function(){return s}.apply(t,[]))||(e.exports=i);}();},function(e,t,n){var i,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};i=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this);}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,i){function r(n){e.removeListener(t,o),i(n);}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments));}_(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&_(e,"error",t,n);}(e,r,{once:!0});}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var c=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function h(e,t,n,i){var r,o,s,a;if(l(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=u(e))>0&&s.length>r&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a);}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=f.bind(i);return r.listener=n,i.wrapFn=r,r}function m(e,t,n){var i=e._events;if(void 0===i)return [];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):v(r,r.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function _(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else {if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(o){i.once&&e.removeEventListener(t,r),n(o);}));}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e;}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0;},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,r=this._events;if(void 0!==r)i=i&&void 0===r.error;else if(!i)return !1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=r[e];if(void 0===c)return !1;if("function"==typeof c)o(c,this,t);else {var l=c.length,u=v(c,l);for(n=0;n<l;++n)o(u[n],this,t);}return !0},a.prototype.addListener=function(e,t){return h(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return h(this,e,t,!0)},a.prototype.once=function(e,t){return l(t),this.on(e,p(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,p(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,i,r,o,s;if(l(t),void 0===(i=this._events))return this;if(void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop();}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t);}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},a.prototype.listeners=function(e){return m(this,e,!0)},a.prototype.rawListeners=function(e){return m(this,e,!1)},a.listenerCount=function(e,t){return "function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},a.prototype.listenerCount=d,a.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};},function(e,t,n){var i=n(3),r=n(0),o=0;function s(){return "hole_"+o++}function a(e,t){for(var n=null,i=0;i<e.length;i++){var r=t(e[i]);r!==e[i]&&(n||(n=e.slice()),n[i]=r);}return n||e}function c(e,t,n){if(!(e instanceof i.Node))return e;if(!n){var r=t(e);if(r&&r!==e)return r}if(e instanceof i.NodeList){var o=a(e.children,(function(e){return c(e,t,n)}));o!==e.children&&(e=new i[e.typename](e.lineno,e.colno,o));}else if(e instanceof i.CallExtension){var s=c(e.args,t,n),l=a(e.contentArgs,(function(e){return c(e,t,n)}));s===e.args&&l===e.contentArgs||(e=new i[e.typename](e.extName,e.prop,s,l));}else {var u=e.fields.map((function(t){return e[t]})),h=a(u,(function(e){return c(e,t,n)}));h!==u&&(e=new i[e.typename](e.lineno,e.colno),h.forEach((function(t,n){e[e.fields[n]]=t;})));}return n&&t(e)||e}function l(e,t){return c(e,t,!0)}function u(e,t,n){var o=[],a=l(n?e[n]:e,(function(e){var n;return e instanceof i.Block?e:((e instanceof i.Filter&&-1!==r.indexOf(t,e.name.value)||e instanceof i.CallExtensionAsync)&&(n=new i.Symbol(e.lineno,e.colno,s()),o.push(new i.FilterAsync(e.lineno,e.colno,e.name,e.args,n))),n)}));return n?e[n]=a:e=a,o.length?(o.push(e),new i.NodeList(e.lineno,e.colno,o)):e}function h(e,t){return function(e){return l(e,(function(e){if(e instanceof i.If||e instanceof i.For){var t=!1;if(c(e,(function(e){if(e instanceof i.FilterAsync||e instanceof i.IfAsync||e instanceof i.AsyncEach||e instanceof i.AsyncAll||e instanceof i.CallExtensionAsync)return t=!0,e})),t){if(e instanceof i.If)return new i.IfAsync(e.lineno,e.colno,e.cond,e.body,e.else_);if(e instanceof i.For&&!(e instanceof i.AsyncAll))return new i.AsyncEach(e.lineno,e.colno,e.arr,e.name,e.body,e.else_)}}}))}(function(e){return c(e,(function(e){if(e instanceof i.Block){var t=!1,n=s();e.body=c(e.body,(function(e){if(e instanceof i.FunCall&&"super"===e.name.value)return t=!0,new i.Symbol(e.lineno,e.colno,n)})),t&&e.body.children.unshift(new i.Super(0,0,e.name,new i.Symbol(0,0,n)));}}))}(function(e,t){return l(e,(function(e){return e instanceof i.Output?u(e,t):e instanceof i.Set?u(e,t,"value"):e instanceof i.For?u(e,t,"arr"):e instanceof i.If?u(e,t,"cond"):e instanceof i.CallExtension?u(e,t,"args"):void 0}))}(e,t)))}e.exports={transform:function(e,t){return h(e,t||[])}};},function(e,t,n){var i=n(0),r=n(2);function o(e,t){return null==e||!1===e?t:e}function s(e){return e!=e}function a(e){var t=(e=o(e,"")).toLowerCase();return r.copySafeness(e,t.charAt(0).toUpperCase()+t.slice(1))}function c(e){if(i.isString(e))return e.split("");if(i.isObject(e))return i._entries(e||{}).map((function(e){return {key:e[0],value:e[1]}}));if(i.isArray(e))return e;throw new i.TemplateError("list filter: type not iterable")}function l(e){return function(t,n,r){void 0===n&&(n="truthy");var o=this,s=o.env.getTest(n);return i.toArray(t).filter((function(t){return s.call(o,t,r)===e}))}}function u(e){return r.copySafeness(e,e.replace(/^\s*|\s*$/g,""))}(t=e.exports={}).abs=Math.abs,t.batch=function(e,t,n){var i,r=[],o=[];for(i=0;i<e.length;i++)i%t==0&&o.length&&(r.push(o),o=[]),o.push(e[i]);if(o.length){if(n)for(i=o.length;i<t;i++)o.push(n);r.push(o);}return r},t.capitalize=a,t.center=function(e,t){if(t=t||80,(e=o(e,"")).length>=t)return e;var n=t-e.length,s=i.repeat(" ",n/2-n%2),a=i.repeat(" ",n/2);return r.copySafeness(e,s+e+a)},t.default=function(e,t,n){return n?e||t:void 0!==e?e:t},t.dictsort=function(e,t,n){if(!i.isObject(e))throw new i.TemplateError("dictsort filter: val must be an object");var r,o=[];for(var s in e)o.push([s,e[s]]);if(void 0===n||"key"===n)r=0;else {if("value"!==n)throw new i.TemplateError("dictsort filter: You can only sort by either key or value");r=1;}return o.sort((function(e,n){var o=e[r],s=n[r];return t||(i.isString(o)&&(o=o.toUpperCase()),i.isString(s)&&(s=s.toUpperCase())),o>s?1:o===s?0:-1})),o},t.dump=function(e,t){return JSON.stringify(e,null,t)},t.escape=function(e){return e instanceof r.SafeString?e:(e=null==e?"":e,r.markSafe(i.escape(e.toString())))},t.safe=function(e){return e instanceof r.SafeString?e:(e=null==e?"":e,r.markSafe(e.toString()))},t.first=function(e){return e[0]},t.forceescape=function(e){return e=null==e?"":e,r.markSafe(i.escape(e.toString()))},t.groupby=function(e,t){return i.groupBy(e,t,this.env.opts.throwOnUndefined)},t.indent=function(e,t,n){if(""===(e=o(e,"")))return "";t=t||4;var s=e.split("\n"),a=i.repeat(" ",t),c=s.map((function(e,t){return 0!==t||n?""+a+e:e})).join("\n");return r.copySafeness(e,c)},t.join=function(e,t,n){return t=t||"",n&&(e=i.map(e,(function(e){return e[n]}))),e.join(t)},t.last=function(e){return e[e.length-1]},t.length=function(e){var t=o(e,"");return void 0!==t?"function"==typeof Map&&t instanceof Map||"function"==typeof Set&&t instanceof Set?t.size:!i.isObject(t)||t instanceof r.SafeString?t.length:i.keys(t).length:0},t.list=c,t.lower=function(e){return (e=o(e,"")).toLowerCase()},t.nl2br=function(e){return null==e?"":r.copySafeness(e,e.replace(/\r\n|\n/g,"<br />\n"))},t.random=function(e){return e[Math.floor(Math.random()*e.length)]},t.reject=l(!1),t.rejectattr=function(e,t){return e.filter((function(e){return !e[t]}))},t.select=l(!0),t.selectattr=function(e,t){return e.filter((function(e){return !!e[t]}))},t.replace=function(e,t,n,i){var o=e;if(t instanceof RegExp)return e.replace(t,n);void 0===i&&(i=-1);var s="";if("number"==typeof t)t=""+t;else if("string"!=typeof t)return e;if("number"==typeof e&&(e=""+e),"string"!=typeof e&&!(e instanceof r.SafeString))return e;if(""===t)return s=n+e.split("").join(n)+n,r.copySafeness(e,s);var a=e.indexOf(t);if(0===i||-1===a)return e;for(var c=0,l=0;a>-1&&(-1===i||l<i);)s+=e.substring(c,a)+n,c=a+t.length,l++,a=e.indexOf(t,c);return c<e.length&&(s+=e.substring(c)),r.copySafeness(o,s)},t.reverse=function(e){var t;return (t=i.isString(e)?c(e):i.map(e,(function(e){return e}))).reverse(),i.isString(e)?r.copySafeness(e,t.join("")):t},t.round=function(e,t,n){t=t||0;var i=Math.pow(10,t);return ("ceil"===n?Math.ceil:"floor"===n?Math.floor:Math.round)(e*i)/i},t.slice=function(e,t,n){for(var i=Math.floor(e.length/t),r=e.length%t,o=[],s=0,a=0;a<t;a++){var c=s+a*i;a<r&&s++;var l=s+(a+1)*i,u=e.slice(c,l);n&&a>=r&&u.push(n),o.push(u);}return o},t.sum=function(e,t,n){return void 0===n&&(n=0),t&&(e=i.map(e,(function(e){return e[t]}))),n+e.reduce((function(e,t){return e+t}),0)},t.sort=r.makeMacro(["value","reverse","case_sensitive","attribute"],[],(function(e,t,n,r){var o=this,s=i.map(e,(function(e){return e})),a=i.getAttrGetter(r);return s.sort((function(e,s){var c=r?a(e):e,l=r?a(s):s;if(o.env.opts.throwOnUndefined&&r&&(void 0===c||void 0===l))throw new TypeError('sort: attribute "'+r+'" resolved to undefined');return !n&&i.isString(c)&&i.isString(l)&&(c=c.toLowerCase(),l=l.toLowerCase()),c<l?t?1:-1:c>l?t?-1:1:0})),s})),t.string=function(e){return r.copySafeness(e,e)},t.striptags=function(e,t){var n=u((e=o(e,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),i="";return i=t?n.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):n.replace(/\s+/gi," "),r.copySafeness(e,i)},t.title=function(e){var t=(e=o(e,"")).split(" ").map((function(e){return a(e)}));return r.copySafeness(e,t.join(" "))},t.trim=u,t.truncate=function(e,t,n,i){var s=e;if(t=t||255,(e=o(e,"")).length<=t)return e;if(n)e=e.substring(0,t);else {var a=e.lastIndexOf(" ",t);-1===a&&(a=t),e=e.substring(0,a);}return e+=null!=i?i:"...",r.copySafeness(s,e)},t.upper=function(e){return (e=o(e,"")).toUpperCase()},t.urlencode=function(e){var t=encodeURIComponent;return i.isString(e)?t(e):(i.isArray(e)?e:i._entries(e)).map((function(e){var n=e[0],i=e[1];return t(n)+"="+t(i)})).join("&")};var h=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,f=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,p=/^https?:\/\/.*$/,m=/^www\./,d=/\.(?:org|net|com)(?:\:|\/|$)/;t.urlize=function(e,t,n){s(t)&&(t=1/0);var i=!0===n?' rel="nofollow"':"";return e.split(/(\s+)/).filter((function(e){return e&&e.length})).map((function(e){var n=e.match(h),r=n?n[1]:e,o=r.substr(0,t);return p.test(r)?'<a href="'+r+'"'+i+">"+o+"</a>":m.test(r)?'<a href="http://'+r+'"'+i+">"+o+"</a>":f.test(r)?'<a href="mailto:'+r+'">'+r+"</a>":d.test(r)?'<a href="http://'+r+'"'+i+">"+o+"</a>":e})).join("")},t.wordcount=function(e){var t=(e=o(e,""))?e.match(/\w+/g):null;return t?t.length:null},t.float=function(e,t){var n=parseFloat(e);return s(n)?t:n};var v=r.makeMacro(["value","default","base"],[],(function(e,t,n){void 0===n&&(n=10);var i=parseInt(e,n);return s(i)?t:i}));t.int=v,t.d=t.default,t.e=t.escape;},function(e,t,n){function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}var r=function(e){var t,n;function r(t){var n;return (n=e.call(this)||this).precompiled=t||{},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,i(t,n),r.prototype.getSource=function(e){return this.precompiled[e]?{src:{type:"code",obj:this.precompiled[e]},path:e}:null},r}(n(6));e.exports={PrecompiledLoader:r};},function(e,t,n){var i=n(2).SafeString;t.callable=function(e){return "function"==typeof e},t.defined=function(e){return void 0!==e},t.divisibleby=function(e,t){return e%t==0},t.escaped=function(e){return e instanceof i},t.equalto=function(e,t){return e===t},t.eq=t.equalto,t.sameas=t.equalto,t.even=function(e){return e%2==0},t.falsy=function(e){return !e},t.ge=function(e,t){return e>=t},t.greaterthan=function(e,t){return e>t},t.gt=t.greaterthan,t.le=function(e,t){return e<=t},t.lessthan=function(e,t){return e<t},t.lt=t.lessthan,t.lower=function(e){return e.toLowerCase()===e},t.ne=function(e,t){return e!==t},t.null=function(e){return null===e},t.number=function(e){return "number"==typeof e},t.odd=function(e){return e%2==1},t.string=function(e){return "string"==typeof e},t.truthy=function(e){return !!e},t.undefined=function(e){return void 0===e},t.upper=function(e){return e.toUpperCase()===e},t.iterable=function(e){return "undefined"!=typeof Symbol?!!e[Symbol.iterator]:Array.isArray(e)||"string"==typeof e},t.mapping=function(e){var t=null!=e&&"object"==typeof e&&!Array.isArray(e);return Set?t&&!(e instanceof Set):t};},function(e,t,n){e.exports=function(){return {range:function(e,t,n){void 0===t?(t=e,e=0,n=1):n||(n=1);var i=[];if(n>0)for(var r=e;r<t;r+=n)i.push(r);else for(var o=e;o>t;o+=n)i.push(o);return i},cycler:function(){return e=Array.prototype.slice.call(arguments),t=-1,{current:null,reset:function(){t=-1,this.current=null;},next:function(){return ++t>=e.length&&(t=0),this.current=e[t],this.current}};var e,t;},joiner:function(e){return function(e){e=e||",";var t=!0;return function(){var n=t?"":e;return t=!1,n}}(e)}}};},function(e,t,n){var i=n(4);e.exports=function(e,t){function n(e,t){if(this.name=e,this.path=e,this.defaultEngine=t.defaultEngine,this.ext=i.extname(e),!this.ext&&!this.defaultEngine)throw new Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine);}return n.prototype.render=function(t,n){e.render(this.name,t,n);},t.set("view",n),t.set("nunjucksEnv",e),e};},function(e,t,n){var i=n(4),r=n(4),o=n(0)._prettifyError,s=n(5),a=n(7).Environment,c=n(24);function l(e,t){return !!Array.isArray(t)&&t.some((function(t){return e.match(t)}))}function u(e,t){(t=t||{}).isString=!0;var n=t.env||new a([]),i=t.wrapper||c;if(!t.name)throw new Error('the "name" option is required when compiling a string');return i([h(e,t.name,n)],t)}function h(e,t,n){var i,r=(n=n||new a([])).asyncFilters,c=n.extensionsList;t=t.replace(/\\/g,"/");try{i=s.compile(e,r,c,t,n.opts);}catch(e){throw o(t,!1,e)}return {name:t,template:i}}e.exports={precompile:function(e,t){var n=(t=t||{}).env||new a([]),o=t.wrapper||c;if(t.isString)return u(e,t);var s=i.existsSync(e)&&i.statSync(e),f=[],p=[];if(s.isFile())f.push(h(i.readFileSync(e,"utf-8"),t.name||e,n));else if(s.isDirectory()){!function n(o){i.readdirSync(o).forEach((function(s){var a=r.join(o,s),c=a.substr(r.join(e,"/").length),u=i.statSync(a);u&&u.isDirectory()?l(c+="/",t.exclude)||n(a):l(c,t.include)&&p.push(a);}));}(e);for(var m=0;m<p.length;m++){var d=p[m].replace(r.join(e,"/"),"");try{f.push(h(i.readFileSync(p[m],"utf-8"),d,n));}catch(e){if(!t.force)throw e;console.error(e);}}}return o(f,t)},precompileString:u};},function(e,t,n){e.exports=function(e,t){var n="";t=t||{};for(var i=0;i<e.length;i++){var r=JSON.stringify(e[i].name);n+="(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["+r+"] = (function() {\n"+e[i].template+"\n})();\n",t.asFunction&&(n+="return function(ctx, cb) { return nunjucks.render("+r+", ctx, cb); }\n"),n+="})();\n";}return n};},function(e,t,n){e.exports=function(){var e,t,n=this.runtime,i=this.lib,r=this.compiler.Compiler,o=this.parser.Parser,s=this.nodes,a=this.lexer,c=n.contextOrFrameLookup,l=n.memberLookup;function u(e){return {index:e.index,lineno:e.lineno,colno:e.colno}}if(r&&(e=r.prototype.assertType),o&&(t=o.prototype.parseAggregate),n.contextOrFrameLookup=function(e,t,n){var i=c.apply(this,arguments);if(void 0!==i)return i;switch(n){case"True":return !0;case"False":return !1;case"None":return null;default:return}},s&&r&&o){var h=s.Node.extend("Slice",{fields:["start","stop","step"],init:function(e,t,n,i,r){n=n||new s.Literal(e,t,null),i=i||new s.Literal(e,t,null),r=r||new s.Literal(e,t,1),this.parent(e,t,n,i,r);}});r.prototype.assertType=function(t){t instanceof h||e.apply(this,arguments);},r.prototype.compileSlice=function(e,t){this._emit("("),this._compileExpression(e.start,t),this._emit("),("),this._compileExpression(e.stop,t),this._emit("),("),this._compileExpression(e.step,t),this._emit(")");},o.prototype.parseAggregate=function(){var e=this,n=u(this.tokens);n.colno--,n.index--;try{return t.apply(this)}catch(t){var r=u(this.tokens),o=function(){return i._assign(e.tokens,r),t};i._assign(this.tokens,n),this.peeked=!1;var c=this.peekToken();if(c.type!==a.TOKEN_LEFT_BRACKET)throw o();this.nextToken();for(var l=new h(c.lineno,c.colno),f=!1,p=0;p<=l.fields.length&&!this.skip(a.TOKEN_RIGHT_BRACKET);p++){if(p===l.fields.length){if(!f)break;this.fail("parseSlice: too many slice components",c.lineno,c.colno);}this.skip(a.TOKEN_COLON)?f=!0:(l[l.fields[p]]=this.parseExpression(),f=this.skip(a.TOKEN_COLON)||f);}if(!f)throw o();return new s.Array(c.lineno,c.colno,[l])}};}function f(e,t,i,r){e=e||[],null===t&&(t=r<0?e.length-1:0),null===i?i=r<0?-1:e.length:i<0&&(i+=e.length),t<0&&(t+=e.length);for(var o=[],s=t;!(s<0||s>e.length||r>0&&s>=i||r<0&&s<=i);s+=r)o.push(n.memberLookup(e,s));return o}function p(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var m={pop:function(e){if(void 0===e)return this.pop();if(e>=this.length||e<0)throw new Error("KeyError");return this.splice(e,1)},append:function(e){return this.push(e)},remove:function(e){for(var t=0;t<this.length;t++)if(this[t]===e)return this.splice(t,1);throw new Error("ValueError")},count:function(e){for(var t=0,n=0;n<this.length;n++)this[n]===e&&t++;return t},index:function(e){var t;if(-1===(t=this.indexOf(e)))throw new Error("ValueError");return t},find:function(e){return this.indexOf(e)},insert:function(e,t){return this.splice(e,0,t)}},d={items:function(){return i._entries(this)},values:function(){return i._values(this)},keys:function(){return i.keys(this)},get:function(e,t){var n=this[e];return void 0===n&&(n=t),n},has_key:function(e){return p(this,e)},pop:function(e,t){var n=this[e];if(void 0===n&&void 0!==t)n=t;else {if(void 0===n)throw new Error("KeyError");delete this[e];}return n},popitem:function(){var e=i.keys(this);if(!e.length)throw new Error("KeyError");var t=e[0],n=this[t];return delete this[t],[t,n]},setdefault:function(e,t){return void 0===t&&(t=null),e in this||(this[e]=t),this[e]},update:function(e){return i._assign(this,e),null}};return d.iteritems=d.items,d.itervalues=d.values,d.iterkeys=d.keys,n.memberLookup=function(e,t,n){return 4===arguments.length?f.apply(this,arguments):(e=e||{},i.isArray(e)&&p(m,t)?m[t].bind(e):i.isObject(e)&&p(d,t)?d[t].bind(e):l.apply(this,arguments))},function(){n.contextOrFrameLookup=c,n.memberLookup=l,r&&(r.prototype.assertType=e),o&&(o.prototype.parseAggregate=t);}};}])},e.exports=n();}));var _0x57995a = getDefaultExportFromCjs(nunjucks);
class TestData{}TestData['ViewOfObsidianTemplate']={'title':'test\x20title\x202','url':'https://doc.wucai.site/','wucaiurl':'','readurl':'','tags':'','alltags':'','alltagsv2':[],'trimtags':'','mergedtags':'','notetype':'page','pagenote':'','pagescore':0x1,'isstar':!0x1,'ispagemirror':!0x1,'isdailynote':!0x1,'highlights':[{'note':'','notelinks':[],'imageurl':'','updateat_ts':0x6580f8db,'createat_ts':0x6580f8db,'type':'highlight','annotation':'好的','color':'','slotid':0x1,'refid':'323aef','refurl':'','tags':'','remaintags':''}],'highlightcount':0xc,'createat':'','createat_ts':0x6580f8db,'updateat':'','updateat_ts':0x6580f8db,'noteid':'232ad','citekey':'','author':'','orgauthor':'','orgname':'','publishat':'','publishat_ts':0x6580f8db,'diffupdateat_ts':0x0,'domain2':'','domain':'','mdcontent':'','folder':'','annotationcount':0x0},TestData['ViewOfObsidianTitle']={'title':'网页标题','createat_ts':Math['floor'](+new Date()/0x3e8),'updateat_ts':Math['floor'](+new Date()/0x3e8),'domain2':'aa.com','domain':'bb.aa.com','notetype':'page','isdailynote':!0x1},TestData['templateObStyle1']='---\x0a标题:\x20\x22{{title}}\x22\x0a笔记ID:\x20{{noteid}}\x0a笔记类型:\x20{{notetype}}\x0a星标:\x20{{isstar}}\x0atags:\x20{{mergedtags}}\x0a{%\x20if\x20not\x20isdailynote\x20%}\x0a域名:\x20{{domain}}\x0a域名2:\x20{{domain2}}\x0a作者:\x20\x22{{author}}\x22\x0a原文链接:\x20\x22{{url}}\x22\x0a{%\x20endif\x20%}\x0a五彩链接:\x20\x22{{wucaiurl}}\x22\x0a划线数量:\x20{{highlightcount}}\x0a创建时间:\x20{{createat}}\x0a更新时间:\x20{{updateat}}\x0a---\x0a\x0a##\x20{{title}}\x20\x0a{{alltags}}\x0a\x0a##\x20页面笔记\x0a{%\x20block\x20pagenote\x20%}\x0a{{pagenote}}\x0a{%\x20endblock\x20%}\x0a\x0a##\x20划线列表\x0a{%\x20block\x20highlights\x20%}\x0a{%\x20for\x20item\x20in\x20highlights\x20%}\x0a{%\x20set\x20suffix\x20=\x20\x22[Link](\x22+item.refurl+\x22)\x22\x20%}\x0a{{\x20item\x20|\x20style1({prefix:\x22-\x20\x22,\x20suffix:suffix,\x20anno:\x22\x09-\x20\x22\x20})\x20}}\x0a{%\x20endfor\x20%}\x0a{%\x20endblock\x20%}\x0a\x0a##\x20全文剪藏\x0a{%\x20block\x20mdcontent\x20%}\x0a{{mdcontent}}\x0a{%\x20endblock\x20%}';
const strref='string';class Templates{constructor(){this['templateEnv']=_0x57995a['configure']({'autoescape':!0x1,'trimBlocks':!0x0,'lstripBlocks':!0x0}),this['templateEnv']['addFilter']('date',function(_0x5aef0c,_0x56e18f){if(_0x5aef0c<=0x0)return '';let _0x38e363=new Date(0x3e8*_0x5aef0c);return Utils['formatDateTime'](_0x38e363,_0x56e18f);}),this['templateEnv']['addFilter']('pretty',function(_0xa52a1e,_0x2f78a6){let _0x14aaa7=(_0x2f78a6=_0x2f78a6||{})['prefix']||'',_0x2c0425=void 0x0===_0x2f78a6['trim']||_0x2f78a6['trim'];if((_0xa52a1e=_0xa52a1e||'')['length']<=0x0)return '';let _0x8876b0=_0xa52a1e['split'](/\n/),_0x55af0a=[];for(let _0x1efb52=0x0;_0x1efb52<_0x8876b0['length'];_0x1efb52++){let _0x33b7c4=_0x8876b0[_0x1efb52]||'';_0x2c0425&&(_0x33b7c4=_0x33b7c4['replace'](/^\s+|\s+$/g,'')),_0x33b7c4['length']<=0x0||_0x55af0a['push'](_0x14aaa7+_0x33b7c4+'\x0a');}return _0x55af0a['join']('\x0a');}),this['templateEnv']['addFilter']('yaml_text',function(_0x14c2a5){return _0x14c2a5?typeof _0x14c2a5!==strref?'error\x20type':'\x20|-\x0a\x20\x20'+_0x14c2a5['replace'](/\n/g,'\x0a\x20\x20'):'';}),this['templateEnv']['addFilter']('yaml_field',function(_0xb58e3d,_0x586e34){return _0x586e34&&_0xb58e3d?(_0x586e34['indexOf'](':')<0x0&&(_0x586e34+=':'),_0x586e34+'\x20'+_0xb58e3d):'';}),this['templateEnv']['addFilter']('yaml_list',function(_0x410308,_0x432144=',',_0x543197=!0x1){if(!_0x410308)return '';let _0x2a269f=[];return typeof _0x410308===strref?(_0x432144||(_0x432144=','),_0x2a269f=_0x410308['split'](_0x432144)):Array['isArray'](_0x410308)&&(_0x2a269f=_0x410308),_0x2a269f=_0x2a269f['filter'](_0x32ed0a=>_0x32ed0a),!_0x2a269f||_0x2a269f['length']<=0x0?'':Utils['toYAMLList'](_0x2a269f);}),this['templateEnv']['addFilter']('tobacklink',function(_0x248db2){if(!_0x248db2)return _0x248db2;let _0x29a0e4=_0x248db2['split']('\x20');return Utils['formatTags'](_0x29a0e4,!0x1);}),this['templateEnv']['addFilter']('anno_lines',function(_0x5ea43e){let _0x409e99=0x0;if(!_0x5ea43e||_0x5ea43e['length']<=0x0)return _0x409e99;for(let _0x244959 of _0x5ea43e)_0x409e99+=(_0x244959['annotation']||'')['split']('\x0a')['filter'](_0x2585ef=>_0x2585ef)['length'];return _0x409e99;}),this['templateEnv']['addFilter']('style_dailynote',function(_0x1eb80b,_0xec07cd){let _0x1a0f5b=[],_0x5709ad=(_0xec07cd=_0xec07cd||{})['groupby']||'YYYY-MM-DD\x20HH:mm',_0x20d9f7={},_0x32733b=[];for(let _0x12658e of _0x1eb80b){let _0x4239ad=Utils['formatTime'](_0x12658e['createat_ts']||_0x12658e['updateat_ts']||0x0,_0x5709ad);null==_0x20d9f7[_0x4239ad]&&(_0x32733b['push'](_0x4239ad),_0x20d9f7[_0x4239ad]=[]),_0x20d9f7[_0x4239ad]['push'](_0x12658e);}_0x1eb80b=void 0x0;for(let _0x1fde93 of _0x32733b){_0x1a0f5b['push']('-\x20'+_0x1fde93);let _0xfd1e67=0x1,_0x4521b9=Utils['repeatStr']('\x09',_0xfd1e67),_0x28bbf9=Utils['repeatStr']('\x09',_0xfd1e67+0x1);for(let _0x588ca1 of _0x20d9f7[_0x1fde93]){let _0x14eb16='',_0x579ce1=_0x588ca1['remaintags']||'';if(_0x588ca1['imageurl'])_0x14eb16='![]('+_0x588ca1['imageurl']+')',_0x579ce1&&(_0x14eb16+='\x0d'+_0x579ce1);else {if(_0x588ca1['note']){let _0x50e957=Utils['formatText'](_0x588ca1['note']||'','\x0d\x09\x09');_0x50e957=''+_0x4521b9+(Utils['isMardownFormat'](_0x50e957)?'':'-\x20')+_0x50e957+'\x20'+_0x579ce1,_0x1a0f5b['push'](_0x50e957);}}if(_0x588ca1['annotation']){let _0x3fff6f=(_0x588ca1['annotation']||'')['split']('\x0a');for(let _0x13eed9 of _0x3fff6f){if(!_0x13eed9||Utils['isOnlyDateTimeLine'](_0x13eed9))continue;let _0xbead8c=Utils['isMardownFormat'](_0x13eed9)?'':'-\x20';_0x14eb16?_0x1a0f5b['push'](''+_0x4521b9+_0xbead8c+_0x13eed9):_0x1a0f5b['push'](''+_0x28bbf9+_0xbead8c+_0x13eed9);}}_0x14eb16&&_0x1a0f5b['push'](_0x14eb16);}}return _0x1a0f5b['join']('\x0a');}),this['templateEnv']['addFilter']('style1',function(_0x48b3ac,_0x6ac7d8){_0x6ac7d8=_0x6ac7d8||{};let _0x48db22=_0x48b3ac['note']||'',_0x48e9c3=_0x6ac7d8['prefix']||'';const _0xc6e60d=_0x48e9c3['startsWith']('-\x20'),_0x2e8f95=_0x48e9c3['startsWith']('>\x20'),_0x294d6b=!_0xc6e60d&&!_0x2e8f95,_0x22adf1=_0xc6e60d?'\x09':'';let _0x599854=(_0x6ac7d8['suffix']||'')['trim'](),_0xb7bc08=_0x48b3ac['annotation']||'',_0x160a9c=_0x6ac7d8['anno']||'',_0x122b70=_0x6ac7d8['annosuffix']||'',_0x4d610c=_0x48b3ac['type']||'highlight',_0x2cda6e=_0x6ac7d8['color_tags']||[],_0x523377=_0x6ac7d8['color']||'',_0x396c3f=_0x6ac7d8['color_line']||_0x6ac7d8['colorline']||!0x1,_0x28714f=_0x48b3ac['slotid']||0x1,_0x5bea56=_0x6ac7d8['refid']&&!0x0,_0x1427fd=_0x6ac7d8['links']&&!0x0,_0x3a6b81=_0x48b3ac['remaintags']||'',_0x283724=[],_0x1d1e25=!0x1;if(_0x1427fd&&['math','image']['indexOf'](_0x4d610c)<0x0&&(_0x48db22=Utils['mergeLinksToNote'](_0x48db22,_0x48b3ac['notelinks'])||_0x48db22),'math'===_0x4d610c)_0x283724['push']('\x0a$$\x0a'+_0x48db22+'\x0a$$\x0a'),_0x3a6b81&&_0x283724['push'](_0x3a6b81),_0x1d1e25=!0x0;else {if('image'===_0x4d610c)_0x283724['push'](_0x48e9c3+'![]('+_0x48db22+')\x20'+_0x3a6b81),_0x1d1e25=!0x0;else {if(Utils['isMardownFormat'](_0x48db22))_0x283724['push'](_0x48db22+'\x20'+_0x3a6b81),_0x1d1e25=!0x0;else {if(_0xc6e60d){let _0x3cd6c9=Utils['formatText'](_0x48db22,'\x0d\x09');_0x523377?(_0x2cda6e&&_0x2cda6e['length']>0x0&&(_0x523377=_0x2cda6e[_0x28714f-0x1]),_0x3cd6c9='<font\x20color=\x22'+_0x48b3ac['color']+'\x22>'+_0x523377+'</font>'+_0x3cd6c9):_0x396c3f&&(_0x3cd6c9='<font\x20color=\x22'+_0x48b3ac['color']+'\x22>'+_0x3cd6c9+'</font>'),_0x1d1e25=!0x0,_0x283724['push'](_0x48e9c3+_0x3cd6c9+'\x20'+_0x3a6b81);}else {if(_0x2e8f95||_0x294d6b){let _0x519bc4=(_0x48db22+'\x20'+_0x3a6b81)['split'](/\n/),_0x3fe2d7=0x0;for(let _0x7279df of _0x519bc4)_0x7279df=Utils['trimString'](_0x7279df),_0x7279df&&(0x0==_0x3fe2d7&&_0x2cda6e&&_0x2cda6e['length']>0x0&&(_0x523377=_0x2cda6e[_0x28714f-0x1]),_0x523377&&0x0==_0x3fe2d7?_0x283724['push'](_0x48e9c3+'<font\x20color=\x22'+_0x48b3ac['color']+'\x22>'+_0x523377+'</font>'+_0x7279df):_0x396c3f?_0x283724['push'](_0x48e9c3+'<font\x20color=\x22'+_0x48b3ac['color']+'\x22>'+_0x7279df+'</font>'):_0x283724['push'](_0x48e9c3+_0x7279df),_0x3fe2d7++,_0x1d1e25=!0x0);}}}}}if(_0x1d1e25&&_0x599854&&_0x283724['length']>0x0&&(_0x599854='\x20'+_0x599854['trim'](),_0x283724[_0x283724['length']-0x1]+=_0x599854),_0xb7bc08){if(_0x1d1e25=!0x1,Utils['isMardownFormat'](_0xb7bc08))_0x283724['push'](_0x22adf1+_0xb7bc08),_0x1d1e25=!0x0;else {let _0x4a4ded=Utils['getPrefxFromAnnoPrefix'](_0x160a9c),_0x245199=_0xb7bc08['split'](/\n/),_0x5aaba2=0x0;for(let _0x3926db of _0x245199)_0x3926db=Utils['trimString'](_0x3926db),_0x3926db['length']<=0x0||(_0x160a9c&&(/^#/['test'](_0x3926db)&&(_0x3926db='\x20'+_0x3926db),_0x3926db=0x0==_0x5aaba2?_0x160a9c+_0x3926db:_0x4a4ded+_0x3926db),_0x283724['push'](_0x22adf1+_0x3926db),_0x5aaba2++,_0x1d1e25=!0x0);}_0x1d1e25&&_0x122b70&&_0x283724['length']>0x0&&(_0x122b70='\x20'+_0x122b70,_0x283724[_0x283724['length']-0x1]+=_0x122b70);}let _0x4179d6=_0x283724['length'];return _0x5bea56&&_0x4179d6>0x0&&(_0x283724[_0x4179d6-0x1]+='\x20^'+_0x48b3ac['refid']),!_0xc6e60d&&_0x4179d6>0x0&&_0x283724['push'](''),_0x283724['join']('\x0a');});}['precompile'](_0x1afff1){let _0x41c126=_0x1afff1['obTemplate']||TestData['templateObStyle1'];if(_0x41c126=_0x41c126['replace'](/annonation/g,'annotation'),_0x41c126=_0x41c126['replace'](/imageUrl/g,'imageurl'),this['pageTemplateStr']=_0x41c126,this['isHaveAnnoCountVar']=_0x41c126['indexOf']('annotationcount')>0x0,this['isHaveAllTagsVar']=_0x41c126['indexOf']('alltagsv2')>0x0,this['isHavePageMirrorVar']=_0x41c126['indexOf']('mdcontent')>0x0,this['obNoteProps']=this['detectNoteIDProp'](_0x1afff1['obNoteProps'],this['pageTemplateStr']),0x2===_0x1afff1['writeStyle']){const _0x21e249=Utils['getBlocks'](_0x41c126);let _0xb9c978={};_0x21e249['pagenote']&&(_0xb9c978['pagenote']=Utils['wrapBlock'](_0x21e249['pagenote'],'pagenote')),_0x21e249['highlights']&&(_0xb9c978['highlights']=Utils['wrapBlock'](_0x21e249['highlights'],'highlights')),_0x21e249['mdcontent']&&(_0xb9c978['mdcontent']=Utils['wrapBlock'](_0x21e249['mdcontent'],'mdcontent')),this['pagenoteEngine']=_0x57995a['compile'](_0x21e249['pagenote'],this['templateEnv']),this['highlightsEngine']=_0x57995a['compile'](_0x21e249['highlights'],this['templateEnv']),this['mdcontentEngine']=_0x57995a['compile'](_0x21e249['mdcontent'],this['templateEnv']),this['blocks']=_0x21e249;let _0x23c70a=Utils['replaceBlocks'](_0x41c126,_0xb9c978);this['pageEngine']=_0x57995a['compile'](_0x23c70a,this['templateEnv']);}else this['pageEngine']=_0x57995a['compile'](this['pageTemplateStr'],this['templateEnv']);let _0x8d530e=_0x1afff1['titleTemplate'];_0x8d530e=_0x8d530e||'wucai-{{\x20createat_ts\x20|\x20date(\x22YYYY-MM-DD\x22)\x20}}',_0x8d530e=_0x8d530e['replace'](/[\n]+/,'')['trim'](),this['titleTemplateStr']=_0x8d530e,this['titleEngine']=_0x57995a['compile'](_0x8d530e,this['templateEnv']);let _0x597622='',_0x1962b2=[{'name':'Template','tpl':this['pageEngine'],'view':TestData['ViewOfObsidianTemplate']},{'name':'Title\x20Template','tpl':this['titleEngine'],'view':TestData['ViewOfObsidianTitle']}];for(let _0x4970e9 of _0x1962b2)try{_0x4970e9['tpl']['render'](_0x4970e9['view']);}catch(_0x16c112){_0x597622+='Template\x20Error:\x20'+_0x16c112;break;}return _0x597622;}['detectNoteIDProp'](_0x28a6f5,_0x1ad861){const _0x43e99f=[],_0x2087c5=[_0x28a6f5=(_0x28a6f5||'')['trim'](),Utils['gnpfte'](_0x1ad861),'笔记ID'];for(let _0x128b6a of _0x2087c5)_0x128b6a&&_0x43e99f['indexOf'](_0x128b6a)<0x0&&_0x43e99f['push'](_0x128b6a);return _0x43e99f['filter'](_0x254cd1=>_0x254cd1);}['isHaveNoteIdProp'](){return this['obNoteProps']&&this['obNoteProps']['length']>0x0;}}Templates['leftHolder']='{{',Templates['rightHolder']='}}';
const usHost='us.wucainote.com',euHost='eu.wucainote.com',chnHost='marker.dotalk.cn',chnHosts=[chnHost,'my.wucai.site'],usHosts=[usHost],euHosts=[euHost],Regions={'chn':{'id':'chn','name':'Asia\x20-\x20亚洲','apis':{'beta':'https://syncbeta.wucai.site/apix/openapi/wucai/sync','prod':'https://sync.wucai.site/apix/openapi/wucai/sync'},'my':'https://'+chnHost,'hosts':chnHosts},'us':{'id':'us','name':'America','apis':{'prod':'https://'+usHost+'/apix/openapi/wucai/sync'},'my':'https://'+usHost,'hosts':usHosts},'euro':{'id':'euro','name':'Europe','apis':{'prod':'https://'+euHost+'/apix/openapi/wucai/sync'},'my':'https://'+euHost,'hosts':euHosts}};
const WAITING_STATUSES=['PENDING','RECEIVED','STARTED','RETRY'],DefaultSettings={'token':'','region':'','useridx':'','wuCaiDir':'WuCai','frequency':'0','triggerOnLoad':!0x0,'lastSyncFailed':!0x1,'refreshNotes':!0x1,'notesToRefresh':[],'reimportShowConfirmation':!0x0,'lastCursor':'','dataVersion':0x0,'notePaths':{},'exportConfig':{'pageMirrorStyle':0x2,'truncateTile255':0x0,'writeStyle':0x2,'highlightStyle':0x1,'annotationStyle':0x1,'tagStyle':0x1,'obTemplate':'','titleTemplate':'','obQuery':'','obExcludeCondition':'','obDailyPath':'','obNoteProps':'','obNotSyncProps':'','obRemainProps':''}};function localize(_0x23ddbd){return _0x23ddbd;}class WuCaiPlugin extends obsidian.Plugin{constructor(){super(...arguments),this['scheduleInterval']=null,this['isInitDone']=!0x1,this['apiurl']='',this['myurl']='';}['initRegion'](_0x3432f1){if(!_0x3432f1)return;this['settings']['lastSyncFailed']=!0x1;const _0x441eed=this['settings']['region'];if(!_0x441eed||_0x3432f1&&_0x441eed!==_0x3432f1){const _0x74cb59=_0x3432f1||'chn';this['region']=_0x74cb59,this['settings']['region']=_0x74cb59,this['saveSettings']();}const _0x36708f=Regions[_0x3432f1||'chn'];_0x36708f&&(this['region']=_0x3432f1,this['apiurl']=_0x36708f['apis'][BGCONSTS['API']]||'',this['myurl']=_0x36708f['my']);}['resetRegion'](){this['region']='',this['apiurl']='',this['myurl']='';}['checkResponseBody'](_0x27e5fd,_0x14b6f0){if(!_0x14b6f0)return !0x1;if(_0x14b6f0&&0x1===_0x14b6f0['code'])return !0x1;let _0x3eafa1=_0x14b6f0['code'];0x2710===_0x3eafa1&&(this['settings']['token']='',this['settings']['useridx']='');let _0x18e1f9=localize(_0x14b6f0['message']||'call\x20api\x20failed');return _0x3eafa1&&(_0x18e1f9+=',\x20error:'+_0x3eafa1),this['handleSyncError'](_0x27e5fd,_0x18e1f9),!0x0;}['getErrorFromRsp'](_0x1d2224){return _0x1d2224&&0x199===_0x1d2224['status']?'Sync\x20in\x20progress\x20initiated\x20by\x20different\x20client':_0x1d2224&&0x1a1===_0x1d2224['status']?'Obsidian\x20export\x20is\x20locked.\x20Wait\x20for\x20an\x20hour.':''+(_0x1d2224?_0x1d2224['statusText']:'Can\x27t\x20connect\x20to\x20server');}['handleSyncError'](_0x4c1319,_0x5980e8){this['settings']['lastSyncFailed']=!0x0,this['saveSettings'](),_0x4c1319?(this['showInfoStatus'](_0x4c1319['buttonEl']['parentElement'],_0x5980e8,'wc-error'),_0x4c1319['buttonEl']['setText'](localize('Run\x20sync'))):this['notice'](_0x5980e8,!0x0,0x4,!0x0);}['handleSyncSuccess'](_0x5110f5,_0x4fd3af='Synced',_0x1c44a3=''){this['settings']['lastSyncFailed']=!0x1;let _0x255b13=this['getLastCursor'](_0x1c44a3,this['settings']['lastCursor']);_0x255b13&&(this['settings']['lastCursor']=_0x255b13),this['saveSettings'](),_0x5110f5&&(this['showInfoStatus'](_0x5110f5['buttonEl']['parentNode']['parentElement'],_0x4fd3af,'wc-success'),_0x5110f5['buttonEl']['setText']('Run\x20sync'));}['callApi'](_0x243b7f,_0x5c8192){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x5b0173=Math['floor'](+new Date()/0x3e8);return _0x5c8192['v']=BGCONSTS['VERSION_NUM'],_0x5c8192['serviceId']=BGCONSTS['SID'],_0x243b7f+='?appid='+BGCONSTS['APPID']+'&ep='+BGCONSTS['EP']+'&version='+BGCONSTS['VERSION']+'&reqtime='+_0x5b0173,fetch(this['apiurl']+_0x243b7f,{'headers':Object['assign'](Object['assign']({},this['getAuthHeaders']()),{'Content-Type':'application/json'}),'method':'POST','body':JSON['stringify'](_0x5c8192)});});}['exportInit'](_0x47216d,_0x86dcc6,_0x5c0090='',_0x16b178=''){return __awaiter(this,void 0x0,void 0x0,function*(){if(this['stopSyncing'])return void logger({'msg':'WuCai\x20sync\x20stoped,\x20because\x20of\x20stopSyncing\x20status'});const _0x5bf49d=this['app']['vault']['getAbstractFileByPath'](this['settings']['wuCaiDir']),_0x4a94e2=!(_0x5bf49d&&_0x5bf49d instanceof obsidian.TFolder);_0x4a94e2&&(this['settings']['lastCursor']='',this['settings']['notePaths']={}),this['settings']['notesToRefresh']=[],logger({'msg':'onload\x20last\x20cursor','lastCursor':this['settings']['lastCursor'],'flagx':_0x5c0090,'isDirDeleted':_0x4a94e2,'isSync':this['isSyncing']});let _0x31fb0b,_0x48f452=this['settings']['lastCursor'],_0x58bb53={'noteDirDeleted':_0x4a94e2,'lastCursor2':_0x48f452};try{_0x31fb0b=yield this['callApi']('/init',_0x58bb53);}catch(_0x2a8745){logger({'msg':'WuCai\x20Official\x20plugin:\x20fetch\x20failed\x20in\x20exportInit:\x20','e':_0x2a8745});}if(!_0x31fb0b||!_0x31fb0b['ok'])return logger({'msg':'WuCai\x20Official\x20plugin:\x20bad\x20response\x20in\x20exportInit:\x20','rsp':_0x31fb0b}),this['handleSyncError'](_0x47216d,this['getErrorFromRsp'](_0x31fb0b)),void(this['isSyncing']=!0x1);let _0xb5df77=yield _0x31fb0b['json']();if(this['checkResponseBody'](_0x47216d,_0xb5df77))return void(this['isSyncing']=!0x1);let _0x486a55=_0xb5df77['data']||{};logger({'msg':'in\x20exportInit','initRet':_0x486a55,'lastCursor2':_0x48f452,'flagx':_0x5c0090}),this['settings']['exportConfig']=_0x486a55['exportConfig'];const _0x152421={'obTemplate':_0x486a55['exportConfig']['obTemplate'],'titleTemplate':_0x486a55['exportConfig']['titleTemplate'],'writeStyle':_0x486a55['exportConfig']['writeStyle'],'obNoteProps':_0x486a55['exportConfig']['obNoteProps']},_0x117dd6=this['template']['precompile'](_0x152421);if(_0x117dd6)return logger({'msg':'compile\x20template\x20error','err':_0x117dd6}),this['handleSyncError'](_0x47216d,_0x117dd6),void(this['isSyncing']=!0x1);if(_0x48f452=this['getLastCursor'](_0x486a55['lastCursor2'],_0x48f452),_0x48f452&&(this['settings']['lastCursor']=_0x48f452),yield this['saveSettings'](),'onlyinit'!==_0x16b178){if('SYNCED'===_0x486a55['taskStatus']){this['handleSyncSuccess'](_0x47216d,'Synced',_0x48f452);let _0x21a40a='Latest\x20WuCai\x20sync\x20already\x20happened\x20on\x20your\x20other\x20device.\x20Data\x20should\x20be\x20up\x20to\x20date';this['notice'](_0x21a40a,!0x1,0x4,!0x0),logger({'msg':'syncing\x20->\x20false','flagx':_0x5c0090+'\x20init+ck+synced'}),this['isSyncing']=!0x1;}else {if('EXPIRED'==_0x486a55['taskStatus'])this['handleSyncError'](_0x47216d,'sync\x20service\x20expried'),logger({'msg':'syncing\x20->\x20false','flagx':_0x5c0090+'\x20init+ck+expired'}),this['isSyncing']=!0x1;else {if(WAITING_STATUSES['includes'](_0x486a55['taskStatus'])){if(_0x486a55['notesExported']>0x0){const _0x1dafb7=localize('Exporting\x20WuCai\x20data')+('\x20('+_0x486a55['notesExported']+'\x20/\x20'+_0x486a55['totalNotes']+')\x20...');this['notice'](_0x1dafb7);}else this['notice']('Building\x20export...');yield new Promise(_0x2c7ab4=>setTimeout(_0x2c7ab4,0xbb8)),yield this['exportInit'](_0x47216d,!0x1,'exportInit\x20timeout');}else 'SYNCING'===_0x486a55['taskStatus']?(this['notice']('Syncing\x20WuCai\x20data'),yield this['downloadArchive'](_0x48f452,[],_0x47216d,_0x5c0090+'\x20init+ck')):(this['handleSyncError'](_0x47216d,'Sync\x20failed,'+_0x486a55['taskStatus']),logger({'msg':'syncing\x20->\x20false','flagx':_0x5c0090+'\x20init+ck+exception'}),this['isSyncing']=!0x1);}}}else this['isSyncing']=!0x1;});}['notice'](_0x10c2cd,_0x31237a=!0x1,_0x511a93=0x0,_0x5b7d15=!0x1){_0x31237a&&new obsidian.Notice(_0x10c2cd),obsidian.Platform['isMobileApp']?_0x31237a||new obsidian.Notice(_0x10c2cd):this['statusBar']['displayMessage'](_0x10c2cd['toLowerCase'](),_0x511a93,_0x5b7d15);}['showInfoStatus'](_0x26ded1,_0x11ab4c,_0x2e9ab8=''){let _0x583500=_0x26ded1['find']('.wc-info-container');_0x583500&&(_0x583500['setText'](_0x11ab4c),_0x583500['addClass'](_0x2e9ab8));}['clearInfoStatus'](_0x1d4d47){_0x1d4d47['find']('.wc-info-container')['empty']();}['getAuthHeaders'](){return {'AUTHORIZATION':'Token\x20'+(this['settings']['token']||''),'Obsidian-Client':''+this['getClientID']()};}['getLastCursor'](_0x3e3e5f,_0x2615c8){return _0x3e3e5f||_0x2615c8||'';}['isRejectByCondition'](_0x1902e9,_0x3e9b7a){if(!_0x1902e9)return !0x1;if(_0x3e9b7a['forceupdate'])return !0x1;if(0x3===_0x3e9b7a['noteType'])return !0x1;if(_0x3e9b7a['pageNote'])return !0x1;if((_0x1902e9['indexOf']('unread')>=0x0?0x1:0x0)>0x0){if(0x2===_0x3e9b7a['readstatus'])return !0x0;if(_0x3e9b7a['highlights']=_0x3e9b7a['highlights']||[],_0x3e9b7a['highlights']['length']<=0x0)return !0x0;}return !0x1;}['processEntry'](_0x48388c){var _0x545b22,_0x3b0abe;return __awaiter(this,void 0x0,void 0x0,function*(){const _0xae2d91=this['app']['vault'],_0x43f041=this['settings']['exportConfig'],_0x5256ee=_0x48388c['noteIdX'],_0x281ca1=Utils['getDomain'](_0x48388c['url']),_0x24ec69=Utils['getDomain2'](_0x281ca1)||'',_0x35dc6c=0x3===_0x48388c['noteType'],_0xff4ec2=_0x35dc6c?'dailynote':'page',_0x59271a=Utils['normalTitle'](_0x48388c['title'],0x0),_0x116fec={'title':_0x59271a,'createat_ts':_0x48388c['createAt'],'updateat_ts':Math['max'](_0x48388c['updateAt'],_0x48388c['createAt']),'domain2':_0x24ec69,'domain':_0x281ca1||'','notetype':_0xff4ec2,'isdailynote':_0x35dc6c};let _0x449baa=this['settings']['notePaths'][_0x5256ee]||'';const _0x856583=yield Utils['lffnw'](_0xae2d91,_0x5256ee,_0x449baa,_0x59271a,_0x116fec,_0x43f041['truncateTile255'],this['template']['titleEngine'],this['app']['metadataCache'],this['template']['obNoteProps'],(_0x102e8c,_0x2e997d)=>{const _0x56a508=this['settings']['wuCaiDir']+'/'+_0x102e8c+_0x2e997d;return obsidian.normalizePath(_0x56a508)['replace'](/[\/ \s]+$/,'');});if(!_0x856583||_0x856583['length']<=0x0)logger({'msg':'generate\x20file\x20name\x20error','noteid':_0x5256ee,'entry':_0x48388c,'oldPath':_0x449baa});else try{let _0x5e9317=yield this['app']['vault']['getAbstractFileByPath'](_0x856583),_0x1d3324=_0x5e9317&&_0x5e9317 instanceof obsidian.TFile,_0x2c9c8e={};_0x1d3324&&(_0x2c9c8e=(null===(_0x545b22=this['app']['metadataCache']['getFileCache'](_0x5e9317))||void 0x0===_0x545b22?void 0x0:_0x545b22['frontmatter'])||{});if(_0x1d3324&&Utils['isIgnoreSync'](_0x43f041['obNotSyncProps'],_0x2c9c8e))return void logger({'msg':'skip,\x20because\x20of\x20not-sync-prop','outFilename':_0x856583},0x2);try{(yield Utils['cnfoOl'](_0xae2d91,_0x449baa,_0x856583))&&(_0x5e9317=yield this['app']['vault']['getAbstractFileByPath'](_0x856583),_0x1d3324=_0x5e9317&&_0x5e9317 instanceof obsidian.TFile);}catch(_0x2a9e4a){return void logger({'error':_0x2a9e4a,'outFilename':_0x856583});}this['settings']['notePaths'][_0x5256ee]=_0x856583;const _0x526cf6=this['template']['obNoteProps'][0x0];_0x48388c['highlights']=_0x48388c['highlights']||[],_0x48388c['pageScore']=_0x48388c['pageScore']||0x0,_0x48388c['sou']=_0x48388c['sou']||'';const _0x2b31d5=0x1===_0x43f041['tagStyle'],_0xaad7df=_0x48388c['pageScore']>0x0,_0x39f2ad=Utils['formatTags'](_0x48388c['tags'],_0x2b31d5),_0x331031=Utils['mergeTags'](_0x48388c['tags'],_0x48388c['notetags'],_0x2b31d5),_0x4e458e=Utils['toYAMLList'](Utils['trimTags'](_0x39f2ad)),_0xcf7c84=Utils['toYAMLList'](Utils['trimTags'](_0x331031));let _0x251626='',_0x259605=!0x1;0x2!==_0x43f041['pageMirrorStyle']&&_0x48388c['sou']&&this['template']['isHavePageMirrorVar']&&(_0x251626=yield Utils['getPageMirror'](_0x48388c['sou']),_0x251626=Utils['formatPageMirror'](_0x251626),_0x259605=!0x0);let _0x8ac021=0x0;this['template']['isHaveAnnoCountVar']&&(_0x8ac021=Utils['countAnnoCount'](_0x48388c['highlights']));let _0x5b105a=[];this['template']['isHaveAllTagsVar']&&(_0x5b105a=Utils['allTagsV2'](_0x48388c['tags'],_0x48388c['highlights']));const _0x18a6cc={'title':Utils['formatPageTitle'](_0x48388c['title']),'url':_0x48388c['url'],'wucaiurl':_0x48388c['wucaiurl']||'','readurl':_0x48388c['readurl']||'','folder':_0x48388c['folder']||'','tags':_0x39f2ad,'alltags':_0x331031,'alltagsv2':_0x5b105a,'trimtags':_0x4e458e,'mergedtags':_0xcf7c84,'notetype':_0xff4ec2,'pagenote':Utils['formatPageNote'](_0x48388c['pageNote'],_0x2b31d5),'pagescore':_0x48388c['pageScore'],'isstar':_0xaad7df,'ispagemirror':_0x259605,'isdailynote':_0x35dc6c,'highlights':Utils['formatHighlights'](_0x48388c['url']||'',_0x48388c['highlights'],_0x43f041),'highlightcount':_0x48388c['highlights']['length'],'annotationcount':_0x8ac021,'createat':Utils['formatTime'](_0x48388c['createAt']),'createat_ts':_0x48388c['createAt'],'updateat':Utils['formatTime'](_0x48388c['updateAt']),'updateat_ts':_0x48388c['updateAt'],'noteid':_0x5256ee,'citekey':_0x48388c['citekey']||'','author':_0x48388c['author']||'','orgauthor':_0x48388c['orgauthor']||'','orgname':_0x48388c['orgname']||'','publishat':Utils['formatTime'](_0x48388c['publishat']),'publishat_ts':_0x48388c['publishat']||0x0,'diffupdateat_ts':Utils['getDiffDay'](_0x48388c['createAt'],_0x48388c['updateAt']),'domain':_0x281ca1,'domain2':_0x24ec69,'mdcontent':_0x251626};if(_0x1d3324&&0x1!==_0x43f041['writeStyle']){if(0x2===_0x43f041['writeStyle']){const _0x4d8969=yield this['app']['vault']['read'](_0x5e9317),_0x14d8a7=Utils['renderTemplateWithEditable'](_0x18a6cc,_0x4d8969,this['template']);yield this['app']['vault']['modify'](_0x5e9317,_0x14d8a7),_0x1d3324&&_0x2c9c8e[_0x526cf6]!==_0x5256ee&&(yield this['app']['fileManager']['processFrontMatter'](_0x5e9317,_0x42f6f0=>{_0x42f6f0[_0x526cf6]=_0x5256ee;}));}else this['notice']('WuCai:\x20error\x20writeStyle\x20'+_0x43f041['writeStyle'],!0x0,0x4,!0x0);}else {const _0xe8f27c=Utils['renderTemplate'](_0x18a6cc,this['template']);let _0x3bdd7c={};_0x1d3324?(yield _0xae2d91['modify'](_0x5e9317,_0xe8f27c),_0x3bdd7c=Utils['getRemainData'](_0x43f041['obRemainProps'],_0x2c9c8e)||{}):(yield _0xae2d91['create'](_0x856583,_0xe8f27c),_0x5e9317=yield _0xae2d91['getAbstractFileByPath'](_0x856583),_0x2c9c8e=(null===(_0x3b0abe=this['app']['metadataCache']['getFileCache'](_0x5e9317))||void 0x0===_0x3b0abe?void 0x0:_0x3b0abe['frontmatter'])||{}),_0x2c9c8e[_0x526cf6]!==_0x5256ee&&(_0x3bdd7c[_0x526cf6]=_0x5256ee),Utils['isEmptyObj'](_0x3bdd7c)||(yield this['app']['fileManager']['processFrontMatter'](_0x5e9317,_0x1f2763=>{for(let _0x20c338 in _0x3bdd7c)_0x1f2763[_0x20c338]=_0x3bdd7c[_0x20c338];}));}}catch(_0x6760fa){logger(['WuCai\x20Official\x20plugin:\x20error\x20writing\x20'+_0x856583+':',_0x6760fa]),this['notice']('WuCai:\x20error\x20while\x20writing\x20'+_0x856583+':\x20'+_0x6760fa,!0x0,0x4,!0x0),_0x48388c['noteIdX']&&(yield this['saveSettings']());}});}['downloadArchive'](_0x2bfae2,_0x3c9ef5,_0x2f7f43,_0x35f9d0=''){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x459434;const {writeStyle:_0x41b6f7,obQuery:_0x36d505,obExcludeCondition:_0x2f1fdd}=this['settings']['exportConfig'];logger({'msg':'download','flagx':_0x35f9d0,'lastCursor2':_0x2bfae2,'obQuery':_0x36d505});try{_0x459434=yield this['callApi']('/download',{'lastCursor2':_0x2bfae2,'noteIdXs':_0x3c9ef5,'flagx':_0x35f9d0,'writeStyle':_0x41b6f7,'q':_0x36d505||''});}catch(_0x1a7f07){logger({'msg':'WuCai\x20Official\x20plugin:\x20fetch\x20failed\x20in\x20downloadArchive:\x20','e':_0x1a7f07});}if(!_0x459434||!_0x459434['ok'])return logger({'msg':'WuCai,\x20bad\x20rsp\x20in\x20download\x20','response':_0x459434,'flagx':_0x35f9d0+'\x20download+exception'}),this['handleSyncError'](_0x2f7f43,this['getErrorFromRsp'](_0x459434)),void(this['isSyncing']=!0x1);const _0x4a7990=yield _0x459434['json']();if(this['checkResponseBody'](_0x2f7f43,_0x4a7990))return logger({'msg':'syncing\x20->\x20false','flagx':_0x35f9d0+'\x20download+nil'}),void(this['isSyncing']=!0x1);const _0x3cdc3c=_0x4a7990['data'],_0x18f261=_0x3cdc3c['notes']||[],_0x42ee50=(_0x2f1fdd||'')['split'](',')['filter'](_0x2d2885=>_0x2d2885);for(const _0x57a11c of _0x18f261)if(_0x57a11c&&(!_0x42ee50||!this['isRejectByCondition'](_0x42ee50,_0x57a11c)))try{yield this['processEntry'](_0x57a11c);}catch(_0x33c8dc){logger({'msg':'process\x20entry\x20err','err2':_0x33c8dc,'entry':_0x57a11c});}(_0x2bfae2=this['getLastCursor'](_0x3cdc3c['lastCursor2'],_0x2bfae2))&&(this['settings']['lastCursor']=_0x2bfae2),yield this['saveSettings'](),_0x18f261['length']<=0x0?(logger({'msg':'syncing\x20->\x20false','flagx':_0x35f9d0+'\x20download+done'}),this['isSyncing']=!0x1,yield this['acknowledgeSyncCompleted'](_0x2f7f43),this['handleSyncSuccess'](_0x2f7f43,'Synced!',_0x2bfae2),this['notice']('WuCai\x20sync\x20completed',!0x0,0x1,!0x0)):this['stopSyncing']?(this['isSyncing']=!0x1,this['notice']('WuCai\x20sync\x20stoped,\x20because\x20of\x20stopSyncing',!0x0,0x1,!0x0)):(this['handleSyncSuccess'](_0x2f7f43,'Syncing',_0x2bfae2),yield new Promise(_0x1c1fa4=>setTimeout(_0x1c1fa4,0x1388)),this['downloadArchive'](_0x2bfae2,[],_0x2f7f43,_0x35f9d0));});}['acknowledgeSyncCompleted'](_0x429508){return __awaiter(this,void 0x0,void 0x0,function*(){let _0x3cc38a;try{let _0x3fcfb6={'lastCursor2':this['settings']['lastCursor']};_0x3cc38a=yield this['callApi']('/ack',_0x3fcfb6);}catch(_0x2411d2){logger(['WuCai\x20Official\x20plugin:\x20fetch\x20failed\x20to\x20acknowledged\x20sync:\x20',_0x2411d2]);}_0x3cc38a&&!_0x3cc38a['ok']&&(logger(['WuCai\x20Official\x20plugin:\x20bad\x20response\x20in\x20acknowledge\x20sync:\x20',_0x3cc38a]),this['handleSyncError'](_0x429508,this['getErrorFromRsp'](_0x3cc38a)));});}['configureSchedule'](){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x1b1d75=Math['max'](parseInt(this['settings']['frequency']),0xb4);let _0x551a02=0x3c*_0x1b1d75*0x3e8;logger(['WuCai\x20Official\x20plugin:\x20setting\x20interval\x20to\x20',_0x1b1d75,'minutes']),window['clearInterval'](this['scheduleInterval']),this['scheduleInterval']=null,_0x551a02&&(this['scheduleInterval']=window['setInterval'](()=>{this['isSyncing']||this['stopSyncing']||(this['isSyncing']=!0x0,logger(['start\x20sync,\x20schedule',this['settings']['lastCursor'],this['isSyncing']]),this['exportInit'](null,!0x0,'schedule\x20init'));},_0x551a02),this['registerInterval'](this['scheduleInterval']));});}['startSync'](_0x44e766='',_0x252cbd=null){return __awaiter(this,void 0x0,void 0x0,function*(){if(this['isSyncing'])this['notice']('WuCai\x20sync\x20already\x20in\x20progress',!0x0);else {this['isSyncing']=!0x0,yield new Promise(_0x519fca=>setTimeout(_0x519fca,0x3e8)),this['saveSettings']();try{yield this['exportInit'](_0x252cbd,!0x1,_0x44e766||'startSync\x20init');}catch(_0x236639){return this['notice']('WuCai\x20sync\x20error,\x20'+_0x236639),void(this['isSyncing']=!0x1);}}});}['logout'](_0x3c7745){this['stopSyncing']=!0x0,this['settings']['lastSyncFailed']=!0x1,this['settings']['lastCursor']='',this['settings']['token']='',this['settings']['region']='',this['settings']['useridx']='',this['resetRegion'](),this['resetClientID'](),this['saveSettings'](),_0x3c7745&&_0x3c7745();}['checkInitDone'](){return __awaiter(this,void 0x0,void 0x0,function*(){this['isInitDone']||(yield this['exportInit'](null,!0x1,'migrate\x20init','onlyinit'),this['isInitDone']=!0x0);});}['tryGetNoteIdX'](_0x1f0511){return __awaiter(this,void 0x0,void 0x0,function*(){const _0x375767=yield Utils['getNoteIdxByFile'](this['app']['vault'],this['app']['metadataCache'],_0x1f0511,this['template']['obNoteProps']);return _0x375767||this['isInitDone']?_0x375767:(yield this['checkInitDone'](),yield Utils['getNoteIdxByFile'](this['app']['vault'],this['app']['metadataCache'],_0x1f0511,this['template']['obNoteProps']));});}['checkLogin'](){return !(!this['settings']['token']||!this['apiurl'])||(this['notice']('Please\x20Login\x20WuCai',!0x0),!0x1);}['onload'](){return __awaiter(this,void 0x0,void 0x0,function*(){logger({'msg':'load\x20WuCai\x20plugin'}),this['stopSyncing']=!0x1,obsidian.Platform['isMobileApp']||(this['statusBar']=new StatusBar(this['addStatusBarItem']()),this['registerInterval'](window['setInterval'](()=>this['statusBar']['display'](),0x3e8)));let _0x793954=this;if(yield this['loadSettings'](),this['addCommand']({'id':'sync','name':'Sync\x20your\x20data\x20now','callback':()=>{this['checkLogin']()&&this['startSync']();}}),this['addCommand']({'id':'migratetitle','name':'Migrate\x20title\x20to\x20new\x20format','callback'(){var _0x1b66b1;return __awaiter(this,void 0x0,void 0x0,function*(){if(_0x793954['isSyncing'])return void _0x793954['notice']('Sync\x20in\x20progress,\x20migrate\x20is\x20not\x20ALLOWED');if(!_0x793954['checkLogin']())return;if(yield _0x793954['checkInitDone'](),!_0x793954['template']['isHaveNoteIdProp']())return void _0x793954['notice']('Not\x20found\x20noteid\x20property\x20in\x20template');const _0x408001=_0x793954['template']['obNoteProps'][0x0],_0x39d38e=_0x793954['settings']['notePaths']||{};let _0x1ee30f=!0x1,_0x2986b6=0x0;for(let _0x5df9e9 in _0x39d38e){if(_0x793954['stopSyncing'])break;const _0x76170e=_0x39d38e[_0x5df9e9];if(!_0x76170e){_0x1ee30f=!0x0,delete _0x39d38e[_0x5df9e9];continue;}const _0x1ac487='-'+_0x5df9e9+'.md';if(!_0x76170e['endsWith'](_0x1ac487))continue;let _0x5089c1=yield _0x793954['app']['vault']['getAbstractFileByPath'](_0x76170e);if(!(_0x5089c1&&_0x5089c1 instanceof obsidian.TFile)){_0x1ee30f=!0x0,delete _0x39d38e[_0x5df9e9];continue;}const _0x5f564c=yield Utils['lmfn'](_0x793954['app']['vault'],_0x5df9e9,_0x76170e,_0x793954['app']['metadataCache'],_0x793954['template']['obNoteProps']);if(!_0x5f564c)continue;((yield Utils['isFileExists'](_0x793954['app']['vault'],_0x5f564c))||(yield _0x793954['app']['vault']['rename'](_0x5089c1,_0x5f564c),_0x5089c1=yield _0x793954['app']['vault']['getAbstractFileByPath'](_0x5f564c)),_0x5089c1&&_0x5089c1 instanceof obsidian.TFile)&&(((null===(_0x1b66b1=_0x793954['app']['metadataCache']['getFileCache'](_0x5089c1))||void 0x0===_0x1b66b1?void 0x0:_0x1b66b1['frontmatter'])||{})[_0x408001]!==_0x5df9e9&&(yield _0x793954['app']['fileManager']['processFrontMatter'](_0x5089c1,_0x458f37=>{_0x458f37[_0x408001]=_0x5df9e9;}))),_0x1ee30f=!0x0,_0x2986b6++,_0x793954['settings']['notePaths'][_0x5df9e9]=_0x5f564c,logger({'msg':'migrate\x20file','filePath':_0x76170e,'fp':_0x5df9e9,'fnReal':_0x5f564c});}_0x1ee30f&&_0x793954['saveSettings'](),_0x793954['notice']('Migrate\x20done,\x20move\x20'+_0x2986b6+'\x20files',!0x0,0x4,!0x0);});}}),this['addCommand']({'id':'openinwucai','name':'Open\x20this\x20Note\x20in\x20WuCai','editorCallback':(_0x33b8dd,_0x55a136)=>__awaiter(this,void 0x0,void 0x0,function*(){if(!_0x793954['checkLogin']())return;const _0x52cdaf=yield _0x793954['tryGetNoteIdX'](_0x55a136['file']['path']);if(!_0x52cdaf)return void _0x793954['notice']('error,\x20noteid\x20is\x20EMPTY',!0x0,0x4,!0x0);const _0x4092ea=_0x793954['myurl']+('/#/?noteidx='+_0x52cdaf);window['open'](_0x4092ea);})}),this['addCommand']({'id':'syncoff','name':'Turn\x20off\x20sync\x20for\x20this\x20file','editorCallback':(_0x11987d,_0x3d4cec)=>__awaiter(this,void 0x0,void 0x0,function*(){if(!_0x793954['checkLogin']())return;const _0x573e00=yield _0x793954['tryGetNoteIdX'](_0x3d4cec['file']['path']);if(_0x573e00)try{_0x793954['callApi']('/syncstatus',{'noteid':_0x573e00,'status':0x2})['then'](function(_0x1d78aa){return __awaiter(this,void 0x0,void 0x0,function*(){if(!_0x1d78aa||!_0x1d78aa['ok'])return logger({'msg':'WuCai\x20Official\x20plugin:\x20bad\x20response\x20in\x20delete\x20server\x20note:\x20','rsp':_0x1d78aa}),void _0x793954['handleSyncError'](null,_0x793954['getErrorFromRsp'](_0x1d78aa));let _0x397257=yield _0x1d78aa['json']();_0x793954['checkResponseBody'](null,_0x397257)||_0x793954['notice']('update\x20sync\x20status\x20success,\x20Now\x20is\x20OFF',!0x0,0x4,!0x0);});});}catch(_0x4717d0){logger({'msg':'WuCai\x20Official\x20plugin:\x20update\x20sync\x20status\x20error\x20','e':_0x4717d0});}else _0x793954['notice']('error,\x20noteid\x20is\x20EMPTY',!0x0,0x4,!0x0);})}),this['addCommand']({'id':'syncon','name':'Turn\x20on\x20sync\x20for\x20this\x20file','editorCallback':(_0xb878c4,_0xafeebb)=>__awaiter(this,void 0x0,void 0x0,function*(){if(!_0x793954['checkLogin']())return;const _0x1fc033=yield _0x793954['tryGetNoteIdX'](_0xafeebb['file']['path']);if(_0x1fc033)try{_0x793954['callApi']('/syncstatus',{'noteid':_0x1fc033,'status':0x1})['then'](function(_0x5c1012){return __awaiter(this,void 0x0,void 0x0,function*(){if(!_0x5c1012||!_0x5c1012['ok'])return logger({'msg':'WuCai\x20Official\x20plugin:\x20bad\x20response\x20in\x20delete\x20server\x20note:\x20','rsp':_0x5c1012}),void _0x793954['handleSyncError'](null,_0x793954['getErrorFromRsp'](_0x5c1012));let _0x4ca548=yield _0x5c1012['json']();_0x793954['checkResponseBody'](null,_0x4ca548)||_0x793954['notice']('update\x20sync\x20status\x20success,\x20Now\x20is\x20ON',!0x0,0x4,!0x0);});});}catch(_0xe8c675){logger({'msg':'WuCai\x20Official\x20plugin:\x20update\x20sync\x20status\x20error\x20','e':_0xe8c675});}else _0x793954['notice']('error,\x20noteid\x20is\x20EMPTY',!0x0,0x4,!0x0);})}),this['addCommand']({'id':'archive','name':'Archive\x20this\x20file','editorCallback':(_0xdd7975,_0x1283b5)=>__awaiter(this,void 0x0,void 0x0,function*(){if(!_0x793954['checkLogin']())return;const _0x312d72=yield _0x793954['tryGetNoteIdX'](_0x1283b5['file']['path']);if(_0x312d72)try{_0x793954['callApi']('/archive',{'noteid':_0x312d72})['then'](function(_0x5beb10){return __awaiter(this,void 0x0,void 0x0,function*(){if(!_0x5beb10||!_0x5beb10['ok'])return logger({'msg':'WuCai\x20Official\x20plugin:\x20bad\x20response\x20in\x20delete\x20server\x20note:\x20','rsp':_0x5beb10}),void _0x793954['handleSyncError'](null,_0x793954['getErrorFromRsp'](_0x5beb10));let _0x46b631=yield _0x5beb10['json']();_0x793954['checkResponseBody'](null,_0x46b631)||_0x793954['notice']('archive\x20file\x20success',!0x0,0x4,!0x0);});});}catch(_0x58f23a){logger({'msg':'WuCai\x20Official\x20plugin:\x20archive\x20note,\x20error\x20','e':_0x58f23a});}else _0x793954['notice']('error,\x20noteid\x20is\x20EMPTY',!0x0,0x4,!0x0);})}),this['addCommand']({'id':'deletefromserver','name':'Delete\x20this\x20file\x20from\x20server','editorCallback':(_0x429e9b,_0x2ab8b9)=>__awaiter(this,void 0x0,void 0x0,function*(){if(!_0x793954['checkLogin']())return;const _0x13198b=yield _0x793954['tryGetNoteIdX'](_0x2ab8b9['file']['path']);if(_0x13198b)try{_0x793954['callApi']('/delete',{'noteid':_0x13198b})['then'](function(_0x36fd5b){return __awaiter(this,void 0x0,void 0x0,function*(){if(!_0x36fd5b||!_0x36fd5b['ok'])return logger({'msg':'WuCai\x20Official\x20plugin:\x20bad\x20response\x20in\x20delete\x20server\x20note:\x20','rsp':_0x36fd5b}),void _0x793954['handleSyncError'](null,_0x793954['getErrorFromRsp'](_0x36fd5b));let _0x387d19=yield _0x36fd5b['json']();_0x793954['checkResponseBody'](null,_0x387d19)||_0x793954['notice']('delete\x20file\x20success',!0x0,0x4,!0x0);});});}catch(_0xaa727e){logger({'msg':'WuCai\x20Official\x20plugin:\x20delete\x20server\x20note,\x20error\x20','e':_0xaa727e});}else _0x793954['notice']('error,\x20noteid\x20is\x20EMPTY',!0x0,0x4,!0x0);})}),this['addRibbonIcon']('zap','Start\x20WuCai\x20syncing',_0x5b6593=>{this['checkLogin']()&&this['startSync']();}),this['addSettingTab'](new WuCaiSettingTab(this['app'],this)),yield this['configureSchedule'](),this['isSyncing']=!0x1,this['settings']['token']&&this['settings']['triggerOnLoad']&&!this['isSyncing']){const _0x2e52e7=this['app']['vault']['getAbstractFileByPath'](this['settings']['wuCaiDir']);!(_0x2e52e7&&_0x2e52e7 instanceof obsidian.TFolder)?this['app']['workspace']['onLayoutReady'](()=>{logger(['onload\x20last\x20cursor\x201',this['settings']['lastCursor'],this['isSyncing']]),this['startSync']('onload\x20+\x20not\x20exists');}):this['startSync']('onload\x20+\x20exists\x202');}});}['onunload'](){this['stopSyncing']=!0x0,logger({'msg':'unload\x20WuCai\x20plugin'});}['loadSettings'](){return __awaiter(this,void 0x0,void 0x0,function*(){this['settings']=Object['assign']({},DefaultSettings,yield this['loadData']()),this['template']=new Templates();let _0xb87ddd=this['settings']['region'];!_0xb87ddd&&this['settings']['token']&&(_0xb87ddd=Utils['getRegionFromToken'](this['settings']['token'])),this['initRegion'](_0xb87ddd);});}['saveSettings'](){return __awaiter(this,void 0x0,void 0x0,function*(){yield this['saveData'](this['settings']);});}['resetClientID'](){return window['localStorage']['setItem']('wc-ObsidianClientId',''),this['getClientID']();}['getClientID'](){let _0x322a41=window['localStorage']['getItem']('wc-ObsidianClientId')||'';return _0x322a41&&_0x322a41['length']>0x0||(_0x322a41=Math['random']()['toString'](0x24)['substring'](0x2,0xf)+Math['random']()['toString'](0x24)['substring'](0x2,0xf),window['localStorage']['setItem']('wc-ObsidianClientId',_0x322a41)),_0x322a41;}['updateProfile'](_0x39fc2b,_0x4a5921,_0x28c89e){return __awaiter(this,void 0x0,void 0x0,function*(){this['settings']['token']=_0x39fc2b||'',this['initRegion'](_0x4a5921);const _0x484939=yield this['callApi']('/profile',{'serviceId':BGCONSTS['SID']});if(!_0x484939||!_0x484939['ok'])return this['settings']['token']='',void this['resetRegion']();const _0x558cee=yield _0x484939['json']();_0x558cee&&_0x558cee['data']&&_0x558cee['data']['useridx']?(this['settings']['useridx']=_0x558cee['data']['useridx']||'',this['saveSettings'](),_0x28c89e&&_0x28c89e()):(this['settings']['token']='',this['resetRegion'](),this['saveSettings'](),new obsidian.Notice(_0x558cee?_0x558cee['message']:'Login\x20failed'));});}}class ConfirmDialog extends obsidian.Modal{constructor(_0x2871fa,_0x5316a3){super(_0x2871fa),this['args']=_0x5316a3;}['onOpen'](){const {contentEl:_0xdeeb}=this;_0xdeeb['createEl']('h2',{'text':this['args']['title']}),_0xdeeb['createEl']('p',{'text':this['args']['msg']});const _0x6f434d=_0xdeeb['createDiv']();_0x6f434d['addClass']('dialogbtns');const _0x204753=_0x6f434d['createEl']('button',{'text':'Cancel'});_0x6f434d['createEl']('button',{'text':'OK'})['onclick']=()=>{this['args']['onok']&&this['args']['onok'](),this['close']();},_0x204753['onclick']=()=>{this['args']['oncancel']&&this['args']['oncancel'](),this['close']();};}['onClose'](){const {contentEl:_0x296dce}=this;_0x296dce['empty']();}}class WuCaiSettingTab extends obsidian.PluginSettingTab{constructor(_0x1e2f7c,_0x2206bf){super(_0x1e2f7c,_0x2206bf),this['plugin']=_0x2206bf,this['plugin']['isSyncing']=!0x1;}['display'](){let _0x50445c=this['plugin']['getClientID']()||'',{containerEl:_0x5b2bfa}=this;_0x5b2bfa['empty'](),_0x5b2bfa['createEl']('h1',{'text':'WuCai\x20Highlights\x20Official'}),_0x5b2bfa['createEl']('p',{'text':'Created\x20by\x20WuCai'}),_0x5b2bfa['getElementsByTagName']('p')[0x0]['appendText'](',\x20version\x20'+BGCONSTS['VERSION']),_0x5b2bfa['createEl']('h2',{'text':'Settings'});let _0xfff0a8=this['plugin']['settings']['token'];if(_0xfff0a8&&_0xfff0a8['length']>0x0){const _0x54d8b9=Utils['getRegionFromToken'](_0xfff0a8);this['plugin']['initRegion'](_0x54d8b9);let _0xdfadcd='Start\x20Syncing';this['plugin']['isSyncing']&&(_0xdfadcd='Syncing\x20...'),new obsidian.Setting(_0x5b2bfa)['setName']('Sync\x20your\x20WuCai\x20data\x20with\x20Obsidian')['setDesc']('On\x20first\x20sync,\x20the\x20WuCai\x20plugin\x20will\x20create\x20a\x20new\x20folder\x20containing\x20all\x20your\x20highlights')['setClass']('wc-setting-sync')['addButton'](_0x1d795a=>{_0x1d795a['setCta']()['setTooltip']('Once\x20the\x20sync\x20begins,\x20you\x20can\x20close\x20this\x20plugin\x20page')['setButtonText'](_0xdfadcd)['onClick'](()=>__awaiter(this,void 0x0,void 0x0,function*(){this['plugin']['isSyncing']?new obsidian.Notice('WuCai\x20sync\x20already\x20in\x20progress'):(this['plugin']['stopSyncing']=!0x1,this['plugin']['clearInfoStatus'](_0x5b2bfa),yield this['plugin']['saveData'](this['plugin']['settings']),_0x1d795a['setButtonText']('Syncing...'),this['plugin']['startSync']('click\x20sync',_0x1d795a));}));});let _0x2d5f43=_0x5b2bfa['createEl']('div',{'cls':'wc-info-container'});_0x5b2bfa['find']('.wc-setting-sync\x20>\x20.setting-item-control\x20')['prepend'](_0x2d5f43),new obsidian.Setting(_0x5b2bfa)['setName']('Customize\x20formatting\x20options')['setDesc']('You\x20can\x20customize\x20which\x20items\x20export\x20to\x20Obsidian\x20and\x20how\x20they\x20appear\x20from\x20the\x20WuCai\x20website')['addButton'](_0x2e1e16=>{_0x2e1e16['setButtonText']('Customize')['onClick'](()=>{window['open'](this['plugin']['myurl']+'/page/plugins/obsidian/preferences');});}),new obsidian.Setting(_0x5b2bfa)['setName']('Customize\x20base\x20folder')['setDesc']('By\x20default,\x20the\x20plugin\x20will\x20save\x20all\x20your\x20highlights\x20into\x20a\x20folder\x20named\x20WuCai')['addText'](_0x4ba2db=>_0x4ba2db['setPlaceholder']('Defaults\x20to:\x20WuCai')['setValue'](this['plugin']['settings']['wuCaiDir'])['onChange'](_0x356292=>__awaiter(this,void 0x0,void 0x0,function*(){this['plugin']['isSyncing']?new obsidian.Notice('WuCai\x20sync\x20already\x20in\x20progress'):(this['plugin']['settings']['wuCaiDir']=obsidian.normalizePath(_0x356292||'WuCai'),yield this['plugin']['saveSettings']());}))),new obsidian.Setting(_0x5b2bfa)['setName']('Configure\x20resync\x20frequency')['setDesc']('If\x20not\x20set\x20to\x20Manual,\x20WuCai\x20will\x20automatically\x20resync\x20with\x20Obsidian\x20when\x20the\x20app\x20is\x20open\x20at\x20the\x20specified\x20interval')['addDropdown'](_0x2bd8c9=>{_0x2bd8c9['addOption']('0','Manual'),_0x2bd8c9['addOption']('180','Every\x203\x20hour'),_0x2bd8c9['addOption'](0x2d0['toString'](),'Every\x2012\x20hours'),_0x2bd8c9['addOption'](0x5a0['toString'](),'Every\x2024\x20hours'),_0x2bd8c9['setValue'](this['plugin']['settings']['frequency']),_0x2bd8c9['onChange'](_0x56094f=>{this['plugin']['settings']['frequency']=_0x56094f,this['plugin']['saveSettings'](),this['plugin']['configureSchedule']();});}),new obsidian.Setting(_0x5b2bfa)['setName']('Sync\x20automatically\x20when\x20Obsidian\x20opens')['setDesc']('If\x20enabled,\x20WuCai\x20will\x20automatically\x20resync\x20with\x20Obsidian\x20each\x20time\x20you\x20open\x20the\x20app')['addToggle'](_0x5c8766=>{_0x5c8766['setValue'](this['plugin']['settings']['triggerOnLoad']),_0x5c8766['onChange'](_0x54c076=>{this['plugin']['settings']['triggerOnLoad']=_0x54c076,this['plugin']['saveSettings']();});}),this['plugin']['settings']['lastSyncFailed']&&this['plugin']['showInfoStatus'](_0x5b2bfa['find']('.wc-setting-sync\x20.wc-info-container')['parentElement'],'Last\x20sync\x20failed','wc-error');const _0x8861d4=this['plugin']['settings']['useridx']||'',_0xacd917=Regions[this['plugin']['settings']['region']||'']||{'name':''};new obsidian.Setting(_0x5b2bfa)['setName']('Client\x20ID')['setDesc']('Client\x20id\x20is\x20'+_0x50445c)['addButton'](_0x3e73bd=>{_0x3e73bd['setButtonText']('Dashboard')['setCta']()['onClick'](()=>window['open'](this['plugin']['myurl']));}),new obsidian.Setting(_0x5b2bfa)['setName']('Logout')['setDesc']('Account\x20is\x20'+_0x8861d4+'\x20,\x20region\x20is\x20'+_0xacd917['name'])['addButton'](_0x26ebab=>{_0x26ebab['setButtonText']('Logout')['setClass']('wucai-danger')['setCta']()['onClick'](()=>{const _0x4f1076={'title':'Logout\x20Account','msg':'Sure\x20to\x20logout?','onok':()=>{this['plugin']['logout'](()=>{this['display']();}),new obsidian.Notice('Logout\x20success');}};new ConfirmDialog(this['app'],_0x4f1076)['open']();});});}else {_0x50445c=this['plugin']['resetClientID']();const _0x1b5b14=['为了拥有最快的访问速度,我们在全球部署了多个独立服务,建议选择离你最近的区域,以便获得最佳使用体验。','To\x20achieve\x20the\x20fastest\x20access\x20speed,\x20we\x20have\x20deployed\x20multiple\x20independent\x20services\x20worldwide.\x20It\x20is\x20recommended\x20that\x20you\x20choose\x20the\x20region\x20closest\x20to\x20you\x20to\x20enjoy\x20the\x20optimal\x20user\x20experience.'];new obsidian.Setting(_0x5b2bfa)['setName']('Description')['setDesc'](_0x1b5b14['join']('\x0a\x0a')),new obsidian.Setting(_0x5b2bfa)['setName']('Get\x20your\x20WuCai\x20Sync\x20Token')['setDesc']('Open\x20page,\x20then\x20copy\x20your\x20token')['addDropdown'](_0x12faef=>{_0x12faef['addOption']('','Choose\x20Region'),_0x12faef['addOption']('chn','Asia\x20-\x20亚洲\x20-\x20dotalk.cn'),_0x12faef['addOption']('euro','Europe\x20-\x20欧洲\x20-\x20wucainote.com'),_0x12faef['addOption']('us','America\x20-\x20北美\x20-\x20wucainote.com'),_0x12faef['onChange'](_0x49a1a7=>{if(!_0x49a1a7)return;const _0x5bce81=Regions[_0x49a1a7];if(!_0x5bce81||!_0x5bce81['my'])return;const _0x582076=_0x5bce81['my']+'/#/personSetting/synctoken?type='+BGCONSTS['SID'];window['open'](_0x582076,'_blank');});});let _0x5a7e8c='';new obsidian.Setting(_0x5b2bfa)['setName']('Paste\x20your\x20Token')['addTextArea'](_0xff18ca=>{_0xff18ca['inputEl']['rows']=0x6,_0xff18ca['inputEl']['cols']=0x30,_0xff18ca['setValue'](_0xfff0a8),_0xff18ca['onChange'](_0x4189a4=>{_0x5a7e8c=_0x4189a4;});}),new obsidian.Setting(_0x5b2bfa)['setName']('Login\x20to\x20WuCai\x20Highlight')['setClass']('wc-setting-connect')['addButton'](_0x57d68c=>{_0x57d68c['setButtonText']('Login')['setCta']()['onClick'](_0x29a5a6=>__awaiter(this,void 0x0,void 0x0,function*(){if(!_0x5a7e8c)return void new obsidian.Notice('Please\x20input\x20your\x20token');const _0x16fd7f=Utils['getRegionFromToken'](_0x5a7e8c);_0x16fd7f?(this['plugin']['initRegion'](_0x16fd7f),this['plugin']['updateProfile'](_0x5a7e8c,_0x16fd7f,()=>{this['display']();})):new obsidian.Notice('Error\x20Sync\x20Token');}));});let _0x31b3d9=_0x5b2bfa['createEl']('div',{'cls':'wc-info-container'});_0x5b2bfa['find']('.wc-setting-connect\x20>\x20.setting-item-control\x20')['prepend'](_0x31b3d9);}_0x5b2bfa['createEl']('p')['innerHTML']='Question?\x20Please\x20see\x20our\x20<a\x20href=\x27https://feedback.dotalk.cn/note/AAbe7f4782.html\x27>feedback</a>\x20or\x20view\x20<a\x20href=\x27https://feedback.dotalk.cn/note/OlA9f2ef3ee.html\x27>changelog</a></b>';}}
module.exports = WuCaiPlugin;
/* nosourcemap */