index.js 85 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690
  1. /**
  2. * codes from crontab.guru
  3. * copyright by crontab.guru
  4. */
  5. let crontabGuruStarter = function () {
  6. !function a(u, i, s) {
  7. function c(t, e) {
  8. if (!i[t]) {
  9. if (!u[t]) {
  10. var n = "function" == typeof require && require;
  11. if (!e && n) return n(t, !0);
  12. if (l) return l(t, !0);
  13. var r = new Error("Cannot find module '" + t + "'");
  14. throw r.code = "MODULE_NOT_FOUND", r
  15. }
  16. var o = i[t] = {exports: {}};
  17. u[t][0].call(o.exports, function (e) {
  18. return c(u[t][1][e] || e)
  19. }, o, o.exports, a, u, i, s)
  20. }
  21. return i[t].exports
  22. }
  23. for (var l = "function" == typeof require && require, e = 0; e < s.length; e++) c(s[e]);
  24. return c
  25. }({
  26. 1: [function (r, e, t) {
  27. r("string.prototype.startswith"), r("string.prototype.endswith"), Number.isInteger || (Number.isInteger = r("is-integer")), Array.prototype.includes || (Array.prototype.includes = function (e) {
  28. return 0 <= this.indexOf(e)
  29. }), String.prototype.includes || (String.prototype.includes = r("string-includes"));
  30. var o = r("choo");
  31. window.start = function () {
  32. var e = document.getElementById("contabContentBox");
  33. if (["flexBasis", "webkitFlexBasis", "msFlexAlign"].some(function (e) {
  34. return e in document.body.style
  35. })) {
  36. var t = o();
  37. t.model(r("./models/app")), t.router(function (e) {
  38. return [e("/", r("./pages/home"))]
  39. });
  40. var n = t.start({history: !1, href: !1});
  41. e.replaceChild(n, e.firstChild)
  42. } else e.innerHTML = "Your browser is not supported."
  43. }
  44. }, {
  45. "./models/app": 16,
  46. "./pages/home": 49,
  47. choo: 21,
  48. "is-integer": 28,
  49. "string-includes": 39,
  50. "string.prototype.endswith": 40,
  51. "string.prototype.startswith": 41
  52. }], 2: [function (r, e, t) {
  53. r("choo/html");
  54. e.exports = function (e, t, n) {
  55. return function () {
  56. var e = r("./yo-yoify/lib/appendChild.js"),
  57. t = document.createElement("span");
  58. return e(t, [arguments[0]]), t
  59. }(e.commonBlurb)
  60. }
  61. }, {
  62. "./yo-yoify/lib/appendChild.js": 48,
  63. "choo/html": 20
  64. }], 3: [function (d, e, t) {
  65. d("choo/html");
  66. function o(e, t) {
  67. return t.selectedPart === e ? "active" : ""
  68. }
  69. e.exports = function (e, t, n) {
  70. if (e.description) {
  71. var r = e.description;
  72. return r.special ? function () {
  73. var e = d("./yo-yoify/lib/appendChild.js"),
  74. t = document.createElement("div");
  75. t.setAttribute("id", "hr"), t.setAttribute("class", "human-readable");
  76. var n = document.createElement("i"), r = document.createElement("span");
  77. return e(r, [arguments[0]]), e(n, ["\n “", r, "”\n "]), e(t, ["\n ", n, "\n "]), t
  78. }(r.special) : (setTimeout(function () {
  79. var e = document.getElementById("hr");
  80. e.style.display = "none", e.offsetHeight, e.style.display = ""
  81. }, 0), r.isTime ? function () {
  82. var e = d("./yo-yoify/lib/appendChild.js"),
  83. t = document.createElement("div");
  84. t.setAttribute("id", "hr"), t.setAttribute("class", "human-readable");
  85. var n = document.createElement("i"), r = document.createElement("span");
  86. e(r, [arguments[0]]);
  87. var o = document.createElement("span");
  88. o.setAttribute("class", arguments[1]), e(o, [arguments[2]]);
  89. var a = document.createElement("span");
  90. a.setAttribute("class", arguments[3]), e(a, [arguments[4]]);
  91. var u = document.createElement("span");
  92. u.setAttribute("class", arguments[5]), e(u, [arguments[6]]);
  93. var i = document.createElement("span");
  94. e(i, [arguments[7]]);
  95. var s = document.createElement("span");
  96. s.setAttribute("class", arguments[8]), e(s, [arguments[9]]);
  97. var c = document.createElement("span");
  98. c.setAttribute("class", arguments[10]), e(c, [arguments[11]]);
  99. var l = document.createElement("span");
  100. return e(l, [arguments[12]]), e(n, ["\n “", r, " ", o, ":", a, arguments[13], u, arguments[14], i, arguments[15], s, arguments[16], c, l, "”\n "]), e(t, ["\n ", n, "\n "]), t
  101. }(r.start, o(2, e), r.hours, o(1, e), r.minutes, o(3, e), r.dates, r.datesWeekdays, o(5, e), r.weekdays, o(4, e), r.months, r.end, r.dates ? " " : "", r.datesWeekdays ? " " : "", r.weekdays ? " " : "", r.months ? " " : "") : function () {
  102. var e = d("./yo-yoify/lib/appendChild.js"),
  103. t = document.createElement("div");
  104. t.setAttribute("id", "hr"), t.setAttribute("class", "human-readable");
  105. var n = document.createElement("i"), r = document.createElement("span");
  106. e(r, [arguments[0]]);
  107. var o = document.createElement("span");
  108. o.setAttribute("class", arguments[1]), e(o, [arguments[2]]);
  109. var a = document.createElement("span");
  110. a.setAttribute("class", arguments[3]), e(a, [arguments[4]]);
  111. var u = document.createElement("span");
  112. u.setAttribute("class", arguments[5]), e(u, [arguments[6]]);
  113. var i = document.createElement("span");
  114. e(i, [arguments[7]]);
  115. var s = document.createElement("span");
  116. s.setAttribute("class", arguments[8]), e(s, [arguments[9]]);
  117. var c = document.createElement("span");
  118. c.setAttribute("class", arguments[10]), e(c, [arguments[11]]);
  119. var l = document.createElement("span");
  120. return e(l, [arguments[12]]), e(n, ["\n “", r, arguments[13], o, arguments[14], a, arguments[15], u, arguments[16], i, arguments[17], s, arguments[18], c, l, "”\n "]), e(t, ["\n ", n, "\n "]), t
  121. }(r.start, o(1, e), r.minutes, o(2, e), r.hours, o(3, e), r.dates, r.datesWeekdays, o(5, e), r.weekdays, o(4, e), r.months, r.end, r.minutes ? " " : "", r.hours ? " " : "", r.dates ? " " : "", r.datesWeekdays ? " " : "", r.weekdays ? " " : "", r.months ? " " : ""))
  122. }
  123. return function () {
  124. var e = d("./yo-yoify/lib/appendChild.js"),
  125. t = document.createElement("div");
  126. t.setAttribute("id", "hr"), t.setAttribute("class", "human-readable");
  127. var n = document.createElement("i");
  128. return e(n, [arguments[0]]), e(t, [n]), t
  129. }(" ")
  130. }
  131. }, {
  132. "./yo-yoify/lib/appendChild.js": 48,
  133. "choo/html": 20
  134. }], 4: [function (i, e, t) {
  135. i("choo/html");
  136. var s = i("../lib/index"), c = i("../lib/dateFormatter");
  137. e.exports = function (e, t, a) {
  138. var n = e.moreNextDates ? 5 : 1, r = [];
  139. if (e.schedule && !e.schedule.errors) {
  140. var o = e.date;
  141. if (o = new Date(Date.UTC(o.getFullYear(), o.getMonth(), o.getDate(), o.getHours(), o.getMinutes(), o.getSeconds())), o = s.nextDate(e.schedule, o)) {
  142. for (var u = [o]; 0 < --n;) o = s.nextDate(e.schedule, new Date(o.getTime() + 1)), u.push(o);
  143. return function () {
  144. var e = i("./yo-yoify/lib/appendChild.js"),
  145. t = document.createElement("div");
  146. return t.setAttribute("class", "next-date"), e(t, ["\n ", arguments[0], "\n "]), t
  147. }(r = u.map(function (e, t) {
  148. var n, r = 0 === t ? function () {
  149. var e = i("./yo-yoify/lib/appendChild.js"),
  150. t = document.createElement("span");
  151. return t.onclick = arguments[0], t.setAttribute("class", "clickable"), e(t, ["next"]), t
  152. }(function (e) {
  153. return a("toggleMoreNextDates")
  154. }) : (i("./yo-yoify/lib/appendChild.js")(n = document.createElement("span"), ["then"]), n),
  155. o = c(e).utc;
  156. return function () {
  157. var e = i("./yo-yoify/lib/appendChild.js"),
  158. t = document.createElement("div");
  159. return e(t, ["\n ", arguments[0], " at ", arguments[1], "-", arguments[2], "-", arguments[3], " ", arguments[4], ":", arguments[5], ":00\n "]), t
  160. }(r, o.year, o.month, o.date, o.hour, o.minute)
  161. }))
  162. }
  163. }
  164. for (; 0 < n--;) r.push(function () {
  165. var e = i("./yo-yoify/lib/appendChild.js"),
  166. t = document.createElement("div");
  167. return e(t, [arguments[0]]), t
  168. }(" "));
  169. return function () {
  170. var e = i("./yo-yoify/lib/appendChild.js"),
  171. t = document.createElement("div");
  172. return t.setAttribute("class", "next-date"), e(t, ["\n ", arguments[0], "\n "]), t
  173. }(r)
  174. }
  175. }, {
  176. "../lib/dateFormatter": 9,
  177. "../lib/index": 11,
  178. "./yo-yoify/lib/appendChild.js": 48,
  179. "choo/html": 20
  180. }], 5: [function (Se, e, t) {
  181. Se("choo/html");
  182. var o = function (e, t) {
  183. var n = ["clickable"];
  184. e.selectedPart === t && n.push("active");
  185. var r = [null, "minutes", "hours", "dates", "months", "weekdays"];
  186. return e.schedule.errors && e.schedule.errors.includes(r[t]) ? n.push("invalid") : e.schedule.warnings && e.schedule.warnings.includes(r[t]) && n.push("warning"), n.join(" ")
  187. }, a = function (e, t) {
  188. return e.selectedPart === t ? "" : "display: none"
  189. };
  190. e.exports = function (e, t, n) {
  191. function r(e, t) {
  192. e.preventDefault(), n("selectPart", t)
  193. }
  194. return function () {
  195. var e = Se("./yo-yoify/lib/appendChild.js"),
  196. t = document.createElement("div");
  197. t.setAttribute("class", "part-explanation");
  198. var n = document.createElement("p");
  199. n.setAttribute("class", "cron-parts");
  200. var r = document.createElement("div"), o = document.createElement("span");
  201. o.onmousedown = arguments[0], o.setAttribute("class", arguments[1]), e(o, ["minute"]), e(r, ["\n ", o]);
  202. var a = document.createElement("div"), u = document.createElement("span");
  203. u.onmousedown = arguments[2], u.setAttribute("class", arguments[3]), e(u, ["hour"]), e(a, [u]);
  204. var i = document.createElement("div"), s = document.createElement("span");
  205. s.onmousedown = arguments[4], s.setAttribute("class", arguments[5]), e(s, ["day"]), e(i, [s]);
  206. var c = document.createElement("div"), l = document.createElement("span");
  207. l.onmousedown = arguments[6], l.setAttribute("class", arguments[7]), e(l, ["month"]), e(c, [l]);
  208. var d = document.createElement("div"), m = document.createElement("span");
  209. m.onmousedown = arguments[8], m.setAttribute("class", arguments[9]), e(m, ["week"]), e(d, [m]), e(n, ["\n ", r, a, i, c, d, "\n "]);
  210. var f = document.createElement("table"), p = document.createElement("tbody"),
  211. h = document.createElement("tr"), v = document.createElement("th");
  212. e(v, ["*"]);
  213. var y = document.createElement("td");
  214. e(y, ["any value"]), e(h, [v, y]);
  215. var b = document.createElement("tr"), g = document.createElement("th");
  216. e(g, [","]);
  217. var w = document.createElement("td");
  218. e(w, ["value list separator"]), e(b, [g, w]);
  219. var E = document.createElement("tr"), x = document.createElement("th");
  220. e(x, ["-"]);
  221. var A = document.createElement("td");
  222. e(A, ["range of values"]), e(E, [x, A]);
  223. var S = document.createElement("tr"), N = document.createElement("th");
  224. e(N, ["/"]);
  225. var C = document.createElement("td");
  226. e(C, ["step values"]), e(S, [N, C]), e(p, ["\n ", h, "\n ", b, "\n ", E, "\n ", S, "\n "]);
  227. var j = document.createElement("tbody");
  228. j.setAttribute("style", arguments[10]);
  229. var D = document.createElement("tr"), T = document.createElement("th");
  230. e(T, ["@yearly"]);
  231. var U = document.createElement("td");
  232. e(U, ["(non-standard)"]), e(D, [T, U]);
  233. var k = document.createElement("tr"), _ = document.createElement("th");
  234. e(_, ["@annually"]);
  235. var O = document.createElement("td");
  236. e(O, ["(non-standard)"]), e(k, [_, O]);
  237. var I = document.createElement("tr"), M = document.createElement("th");
  238. e(M, ["@monthly"]);
  239. var P = document.createElement("td");
  240. e(P, ["(non-standard)"]), e(I, [M, P]);
  241. var L = document.createElement("tr"), F = document.createElement("th");
  242. e(F, ["@weekly"]);
  243. var R = document.createElement("td");
  244. e(R, ["(non-standard)"]), e(L, [F, R]);
  245. var z = document.createElement("tr"), $ = document.createElement("th");
  246. e($, ["@daily"]);
  247. var B = document.createElement("td");
  248. e(B, ["(non-standard)"]), e(z, [$, B]);
  249. var H = document.createElement("tr"), V = document.createElement("th");
  250. e(V, ["@hourly"]);
  251. var W = document.createElement("td");
  252. e(W, ["(non-standard)"]), e(H, [V, W]);
  253. var q = document.createElement("tr"), Y = document.createElement("th");
  254. e(Y, ["@reboot"]);
  255. var J = document.createElement("td");
  256. e(J, ["(non-standard)"]), e(q, [Y, J]), e(j, ["\n ", D, "\n ", k, "\n ", I, "\n ", L, "\n ", z, "\n ", H, "\n ", q, "\n "]);
  257. var K = document.createElement("tbody");
  258. K.setAttribute("style", arguments[11]);
  259. var X = document.createElement("tr"), G = document.createElement("th");
  260. e(G, ["0-59"]);
  261. var Z = document.createElement("td");
  262. e(Z, ["allowed values"]), e(X, [G, Z]), e(K, ["\n ", X, "\n "]);
  263. var Q = document.createElement("tbody");
  264. Q.setAttribute("style", arguments[12]);
  265. var ee = document.createElement("tr"), te = document.createElement("th");
  266. e(te, ["0-23"]);
  267. var ne = document.createElement("td");
  268. e(ne, ["allowed values"]), e(ee, [te, ne]), e(Q, ["\n ", ee, "\n "]);
  269. var re = document.createElement("tbody");
  270. re.setAttribute("style", arguments[13]);
  271. var oe = document.createElement("tr"), ae = document.createElement("th");
  272. e(ae, ["1-31"]);
  273. var ue = document.createElement("td");
  274. e(ue, ["allowed values"]), e(oe, [ae, ue]), e(re, ["\n ", oe, "\n "]);
  275. var ie = document.createElement("tbody");
  276. ie.setAttribute("style", arguments[14]);
  277. var se = document.createElement("tr"), ce = document.createElement("th");
  278. e(ce, ["1-12"]);
  279. var le = document.createElement("td");
  280. e(le, ["allowed values"]), e(se, [ce, le]);
  281. var de = document.createElement("tr"), me = document.createElement("th");
  282. e(me, ["JAN-DEC"]);
  283. var fe = document.createElement("td");
  284. e(fe, ["alternative single values"]), e(de, [me, fe]), e(ie, ["\n ", se, "\n ", de, "\n "]);
  285. var pe = document.createElement("tbody");
  286. pe.setAttribute("style", arguments[15]);
  287. var he = document.createElement("tr"), ve = document.createElement("th");
  288. e(ve, ["0-6"]);
  289. var ye = document.createElement("td");
  290. e(ye, ["allowed values"]), e(he, [ve, ye]);
  291. var be = document.createElement("tr"), ge = document.createElement("th");
  292. e(ge, ["SUN-SAT"]);
  293. var we = document.createElement("td");
  294. e(we, ["alternative single values"]), e(be, [ge, we]);
  295. var Ee = document.createElement("tr"), xe = document.createElement("th");
  296. e(xe, ["7"]);
  297. var Ae = document.createElement("td");
  298. return e(Ae, ["sunday (non-standard)"]), e(Ee, [xe, Ae]), e(pe, ["\n ", he, "\n ", be, "\n ", Ee, "\n "]), e(f, ["\n ", p, "\n ", j, "\n ", K, "\n ", Q, "\n ", re, "\n ", ie, "\n ", pe, "\n "]), e(t, ["\n ", n, "\n ", f, "\n "]), t
  299. }(function (e) {
  300. return r(e, 1)
  301. }, o(e, 1), function (e) {
  302. return r(e, 2)
  303. }, o(e, 2), function (e) {
  304. return r(e, 3)
  305. }, o(e, 3), function (e) {
  306. return r(e, 4)
  307. }, o(e, 4), function (e) {
  308. return r(e, 5)
  309. }, o(e, 5), a(e, null), a(e, 1), a(e, 2), a(e, 3), a(e, 4), a(e, 5))
  310. }
  311. }, {
  312. "./yo-yoify/lib/appendChild.js": 48,
  313. "choo/html": 20
  314. }], 6: [function (r, e, t) {
  315. r("choo/html");
  316. e.exports = function (e, t, n) {
  317. return function () {
  318. var e = r("./yo-yoify/lib/appendChild.js"),
  319. t = document.createElement("div");
  320. t.setAttribute("class", "example");
  321. var n = document.createElement("span");
  322. return n.onclick = arguments[0], n.setAttribute("class", "clickable"), e(n, ["Random Example"]), e(t, ["\n ", n, "\n "]), t
  323. }(function (e) {
  324. return n("showNextExample")
  325. })
  326. }
  327. }, {
  328. "./yo-yoify/lib/appendChild.js": 48,
  329. "choo/html": 20
  330. }], 7: [function (a, e, t) {
  331. a("choo/html");
  332. var n = a("debounce");
  333. var o = n(function (e, t) {
  334. t("inputSelect", e.target)
  335. }, 20), u = n(function (e, t) {
  336. t("inputEnter", e.target.value)
  337. }, 100);
  338. e.exports = function (t, e, n) {
  339. setTimeout(function () {
  340. return function (e, t) {
  341. if (e.selectedPart && e.selectedPart !== t.selectedPart && !e.selectedDirectly) {
  342. var n = e.text.split(" ").slice(0, e.selectedPart), r = n.pop().length,
  343. o = n.join(" ").length;
  344. 0 < o && (o += 1);
  345. var a = document.getElementById("input");
  346. a.selectionStart = o, a.selectionEnd = o + r, a.focus()
  347. }
  348. }(t, e)
  349. }, 0);
  350. var r = "";
  351. return t.schedule.errors ? r = "invalid" : t.schedule.warnings && (r = "warning"), t.focussed ? function () {
  352. var e = a("./on-load/server.js"),
  353. t = a("./yo-yoify/lib/appendChild.js"),
  354. n = document.createElement("div");
  355. n.setAttribute("class", "text-editor");
  356. var r = document.createElement("input"), o = arguments;
  357. return e(r, function () {
  358. o[0](r)
  359. }, function () {
  360. }, "o0"), r.setAttribute("id", "input"), r.setAttribute("type", "text"), r.setAttribute("autocomplete", "off"), r.oninput = arguments[1], r.onblur = arguments[2], r.onfocus = arguments[3], r.onselect = arguments[4], r.onkeydown = arguments[5], r.onmousedown = arguments[6], r.setAttribute("class", arguments[7]), t(n, ["\n ", r, "\n "]), n
  361. }(function (e) {
  362. e.value = t.text
  363. }, function (e) {
  364. n("inputUpdate", e.target.value), u(e, n)
  365. }, function (e) {
  366. return n("inputBlur")
  367. }, function (e) {
  368. n("inputFocus"), o(e, n)
  369. }, function (e) {
  370. return o(e, n)
  371. }, function (e) {
  372. return o(e, n)
  373. }, function (e) {
  374. return o(e, n)
  375. }, r) : function () {
  376. var e = a("./on-load/server.js"),
  377. t = a("./yo-yoify/lib/appendChild.js"),
  378. n = document.createElement("div");
  379. n.setAttribute("class", "text-editor");
  380. var r = document.createElement("input"), o = arguments;
  381. return e(r, function () {
  382. o[0](r)
  383. }, function () {
  384. }, "o1"), r.setAttribute("id", "input"), r.setAttribute("type", "text"), r.setAttribute("value", arguments[1]), r.oninput = arguments[2], r.onblur = arguments[3], r.onfocus = arguments[4], r.onselect = arguments[5], r.onkeydown = arguments[6], r.onmousedown = arguments[7], r.setAttribute("class", arguments[8]), t(n, ["\n ", r, "\n "]), n
  385. }(function (e) {
  386. e.value = t.text
  387. }, t.text, function (e) {
  388. n("inputUpdate", e.target.value), u(e, n)
  389. }, function (e) {
  390. return n("inputBlur")
  391. }, function (e) {
  392. n("inputFocus"), o(e, n)
  393. }, function (e) {
  394. return o(e, n)
  395. }, function (e) {
  396. return o(e, n)
  397. }, function (e) {
  398. return o(e, n)
  399. }, r)
  400. }
  401. }, {
  402. "./on-load/server.js": 33,
  403. "./yo-yoify/lib/appendChild.js": 48,
  404. "choo/html": 20,
  405. debounce: 22
  406. }], 8: [function (a, e, t) {
  407. a("choo/html");
  408. e.exports = function (e, t, n) {
  409. return e.schedule.warnings ? (r = a("./yo-yoify/lib/appendChild.js"), (o = document.createElement("div")).setAttribute("class", "warning"), r(o, ["Non standard! May not work with every cron."]), o) : function () {
  410. a("./yo-yoify/lib/appendChild.js");
  411. var e = document.createElement("div");
  412. return e.setAttribute("class", "warning"), e
  413. }();
  414. var r, o
  415. }
  416. }, {
  417. "./yo-yoify/lib/appendChild.js": 48,
  418. "choo/html": 20
  419. }], 9: [function (e, t, n) {
  420. function r(e) {
  421. return ("0" + e).slice(-2)
  422. }
  423. t.exports = function (e) {
  424. var t = e.toTimeString().split(/[()]/)[1];
  425. return t && 3 < t.length && (t = t.replace(/[^A-Z]*/g, "")), t && 3 === t.length || (t = "local"), {
  426. utc: {
  427. year: e.getUTCFullYear(),
  428. month: r(e.getUTCMonth() + 1),
  429. date: r(e.getUTCDate()),
  430. hour: r(e.getUTCHours()),
  431. minute: r(e.getUTCMinutes()),
  432. second: r(e.getUTCSeconds()),
  433. zone: "UTC"
  434. },
  435. local: {
  436. year: e.getFullYear(),
  437. month: r(e.getMonth() + 1),
  438. date: r(e.getDate()),
  439. hour: r(e.getHours()),
  440. minute: r(e.getMinutes()),
  441. second: r(e.getSeconds()),
  442. zone: t
  443. }
  444. }
  445. }
  446. }, {}], 10: [function (e, t, n) {
  447. "use strict";
  448. function u(e) {
  449. var t = parseInt(e);
  450. switch (20 < t ? t % 10 : t) {
  451. case 1:
  452. return e + "st";
  453. case 2:
  454. return e + "nd";
  455. case 3:
  456. return e + "rd";
  457. default:
  458. return e + "th"
  459. }
  460. }
  461. function i(e, t, n, r) {
  462. return "*" === e ? "every " + t : function (e, t, n, r) {
  463. var o = e.match(/\d+|./g).map(function (e) {
  464. var t = Number(e);
  465. return isNaN(t) ? e : t
  466. }), a = o[0];
  467. if (Number.isInteger(a)) {
  468. if (1 === o.length) return "" + (n[a] || a);
  469. if (3 === o.length && "/" === o[1] && Number.isInteger(o[2])) return "every " + u(o[2]) + " " + t + " from " + (n[a] || a) + " through " + (n[r] || r);
  470. if (3 === o.length && "-" === o[1] && Number.isInteger(o[2]) && o[2] >= a) return "every " + t + " from " + (n[a] || a) + " through " + (n[o[2]] || o[2]);
  471. if (5 === o.length && "-" === o[1] && Number.isInteger(o[2]) && o[2] >= a && "/" === o[3] && Number.isInteger(o[4]) && 1 <= o[4]) return "every " + u(o[4]) + " " + t + " from " + (n[a] || a) + " through " + (n[o[2]] || o[2])
  472. } else if (3 === o.length && "/" === o[1] && Number.isInteger(o[2]) && "*" === o[0]) return "every " + u(o[2]) + " " + t;
  473. return ""
  474. }(e, t, n, r)
  475. }
  476. function h(e, t, n, r, o) {
  477. var a = e.split(",");
  478. return ((o ? "" : t + " ") + function (e) {
  479. switch (e.length) {
  480. case 0:
  481. return "";
  482. case 1:
  483. return e[0];
  484. case 2:
  485. return e[0] + " and " + e[1];
  486. default:
  487. return e.slice(0, e.length - 1).join(", ") + ", and " + e[e.length - 1]
  488. }
  489. }(a.map(function (e) {
  490. return i(e, t, n, r)
  491. }))).replace("every 1st", "every").replace(t + " every", "every").replace(", " + t, ", ").replace(", and " + t, ", and ")
  492. }
  493. var v = [null, "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
  494. var y = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
  495. var b = /^0*\d\d?$/;
  496. var g = "After rebooting.";
  497. t.exports = function (e) {
  498. if ("@reboot" === e.originalParts[0]) return {full: g, special: g};
  499. var t, n, r, o = e.parts, a = "*" === (r = o[2]) ? "" : "on " + h(r, "day-of-month", {}, 31),
  500. u = "*" === (n = o[3]) ? "" : "in " + h(n, "month", v, 12, !0),
  501. i = "*" === (t = o[4]) ? "" : "on " + h(t, "day-of-week", y, 7, !0), s = "";
  502. a && i && (s = e.daysAnded ? "if it's" : "and");
  503. var c, l,
  504. d = (c = o[0], l = o[1], b.test(c) && b.test(l) ? [("0" + c).slice(-2), ("0" + l).slice(-2)] : null);
  505. if (d) return {
  506. start: "At",
  507. minutes: d[0],
  508. hours: d[1],
  509. isTime: !0,
  510. dates: a || null,
  511. datesWeekdays: s || null,
  512. weekdays: i || null,
  513. months: u || null,
  514. end: ".",
  515. full: ("At " + d[1] + ":" + d[0] + " " + a + " " + s + " " + i + " " + u).replace(/ +/g, " ").trim() + "."
  516. };
  517. var m, f = h(o[0], "minute", {}, 59), p = "*" === (m = o[1]) ? "" : "past " + h(m, "hour", {}, 23);
  518. return {
  519. start: "At",
  520. minutes: f || null,
  521. hours: p || null,
  522. dates: a || null,
  523. datesWeekdays: s || null,
  524. weekdays: i || null,
  525. months: u || null,
  526. end: ".",
  527. full: ("At " + f + " " + p + " " + a + " " + s + " " + i + " " + u).replace(/ +/g, " ").trim() + "."
  528. }
  529. }
  530. }, {}], 11: [function (e, t, n) {
  531. "use strict";
  532. var r = e("./describe"), o = e("./nextDate"), a = e("./normalize"), u = e("./prenormalize");
  533. t.exports = {prenormalize: u, normalize: a, describe: r, nextDate: o}
  534. }, {"./describe": 10, "./nextDate": 12, "./normalize": 13, "./prenormalize": 15}], 12: [function (e, t, n) {
  535. "use strict";
  536. function r(e) {
  537. var t, n, r = 0 !== (n = (t = e).getUTCMilliseconds()) ? new Date(t.getTime() + (1e3 - n)) : t,
  538. o = r.getUTCSeconds();
  539. return 0 !== o ? new Date(r.getTime() + 1e3 * (60 - o)) : r
  540. }
  541. function m(e, t, n, r, o) {
  542. return new Date(Date.UTC(e, t, n, r, o))
  543. }
  544. t.exports = function (e, t) {
  545. return Object.keys(e).length && e.months.length && e.dates.length && e.weekdays.length && e.hours.length && e.minutes.length ? function e(t, n, r) {
  546. if (127 < r) return null;
  547. var o = n.getUTCMonth() + 1, a = n.getUTCFullYear();
  548. if (!t.months.includes(o)) return e(t, m(a, o + 1 - 1, 1, 0, 0), ++r);
  549. var u = n.getUTCDate(), i = n.getUTCDay(), s = t.dates.includes(u), c = t.weekdays.includes(i);
  550. if (t.daysAnded && (!s || !c) || !t.daysAnded && !s && !c) return e(t, m(a, o - 1, u + 1, 0, 0), ++r);
  551. var l = n.getUTCHours();
  552. if (!t.hours.includes(l)) return e(t, m(a, o - 1, u, l + 1, 0), ++r);
  553. var d = n.getUTCMinutes();
  554. return t.minutes.includes(d) ? n : e(t, m(a, o - 1, u, l, d + 1), ++r)
  555. }(e, r(t), 1) : null
  556. }
  557. }, {}], 13: [function (e, t, n) {
  558. "use strict";
  559. function h(e, t) {
  560. return e - t
  561. }
  562. function v(e) {
  563. return e.reduce(function (e, t) {
  564. return e.indexOf(t) < 0 && e.push(t), e
  565. }, [])
  566. }
  567. function r(e) {
  568. return e.reduce(function (e, t) {
  569. return e.concat(Array.isArray(t) ? r(t) : t)
  570. }, [])
  571. }
  572. function o(e, t, n) {
  573. for (var r = [], o = e; o <= t; o += n) r.push(o);
  574. return r
  575. }
  576. var a = /(^|[,-\/])\*($|[,-\/])/g;
  577. function y(e, t) {
  578. var n = "$1" + t + "$2";
  579. return e.replace(a, n).replace(a, n)
  580. }
  581. function b(e, t) {
  582. var n = e.split(",").map(function (e) {
  583. return function (e, t) {
  584. var n = e ? e.match(/\d+|./g).map(function (e) {
  585. var t = Number(e);
  586. return isNaN(t) ? e : t
  587. }) : [], r = n[0];
  588. if (Number.isInteger(r)) {
  589. if (1 === n.length) return {list: [r]};
  590. if (3 === n.length && "/" === n[1] && Number.isInteger(n[2]) && 1 <= n[2]) return {
  591. list: o(r, t, n[2]),
  592. warnings: ["nonstandard"]
  593. };
  594. if (3 === n.length && "-" === n[1] && Number.isInteger(n[2]) && n[2] >= r) return {list: o(r, n[2], 1)};
  595. if (5 === n.length && "-" === n[1] && Number.isInteger(n[2]) && n[2] >= r && "/" === n[3] && Number.isInteger(n[4]) && 1 <= n[4]) return {list: o(r, n[2], n[4])}
  596. }
  597. return {errors: ["invalid part"]}
  598. }(e, t)
  599. });
  600. return {
  601. list: v(r(n.map(function (e) {
  602. return e.list || []
  603. }))).sort(h).filter(function (e) {
  604. return !isNaN(e)
  605. }), errors: v(r(n.map(function (e) {
  606. return e.errors || []
  607. }))), warnings: v(r(n.map(function (e) {
  608. return e.warnings || []
  609. })))
  610. }
  611. }
  612. function g(e, t, n) {
  613. return e.length && (e[0] < t || e[e.length - 1] > n)
  614. }
  615. var w = /[^\d\-\/\,]/i;
  616. t.exports = function (e) {
  617. var t = e.parts.map(function (e) {
  618. return e.slice(0)
  619. }).map(function (e) {
  620. return e.replace(/\*\/1(?!\d)/g, "*")
  621. });
  622. if (0 === t.length && e.originalParts.length) return {};
  623. var n = {errors: [], warnings: []};
  624. if (void 0 !== e.daysAnded && (n.daysAnded = e.daysAnded), 5 !== t.length && n.errors.push("fields"), t[0] && t[0].length) {
  625. var r = y(t[0], "0-59"), o = b(r, 59);
  626. n.minutes = o.list, (o.errors.length || g(n.minutes, 0, 59) || w.test(r)) && (n.minutes = [], n.errors.push("minutes")), o.warnings.length && n.warnings.push("minutes")
  627. } else void 0 === t[0] && n.errors.push("minutes");
  628. if (t[1] && t[1].length) {
  629. var a = y(t[1], "0-23"), u = b(a, 23);
  630. n.hours = u.list, (u.errors.length || g(n.hours, 0, 23) || w.test(a)) && (n.hours = [], n.errors.push("hours")), u.warnings.length && n.warnings.push("hours")
  631. } else void 0 === t[1] && n.errors.push("hours");
  632. if (t[2] && t[2].length) {
  633. var i = y(t[2], "1-31"), s = b(i, 31);
  634. n.dates = s.list, (s.errors.length || g(n.dates, 1, 31) || w.test(i)) && (n.dates = [], n.errors.push("dates")), s.warnings.length && n.warnings.push("dates")
  635. } else void 0 === t[2] && n.errors.push("dates");
  636. if (t[3] && t[3].length) {
  637. var c = y(t[3], "1-12"), l = e.originalParts[3], d = b(c, 12);
  638. n.months = d.list, (d.errors.length || g(n.months, 1, 12) || w.test(c)) && (n.months = [], n.errors.push("months")), (d.warnings.length || l && t[3] !== l && 3 < l.length && /\D/.test(l)) && n.warnings.push("months")
  639. } else void 0 === t[3] && n.errors.push("months");
  640. if (t[4] && t[4].length) {
  641. var m = y(t[4], "0-6"), f = e.originalParts[4], p = b(m, 7);
  642. n.weekdays = v(p.list.map(function (e) {
  643. return 7 === e ? 0 : e
  644. })).sort(h), (p.errors.length || g(n.weekdays, 0, 6) || w.test(m)) && (n.weekdays = [], n.errors.push("weekdays")), (p.warnings.length || p.list.includes(7) || f && t[4] !== f && 3 < f.length && /\D/.test(f)) && n.warnings.push("weekdays")
  645. } else void 0 === t[4] && n.errors.push("weekdays");
  646. return n.errors.length || delete n.errors, n.warnings.length || delete n.warnings, n
  647. }
  648. }, {}], 14: [function (e, t, n) {
  649. var r = "crontab.guru - the cron schedule expression editor", o = {
  650. "/every-minute": "* * * * *",
  651. "/every-1-minute": "* * * * *",
  652. "/every-2-minutes": "*/2 * * * *",
  653. "/every-even-minute": "*/2 * * * *",
  654. "/every-uneven-minute": "1-59/2 * * * *",
  655. "/every-3-minutes": "*/3 * * * *",
  656. "/every-4-minutes": "*/4 * * * *",
  657. "/every-5-minutes": "*/5 * * * *",
  658. "/every-five-minutes": "*/5 * * * *",
  659. "/every-6-minutes": "*/6 * * * *",
  660. "/every-10-minutes": "*/10 * * * *",
  661. "/every-ten-minutes": "*/10 * * * *",
  662. "/every-15-minutes": "*/15 * * * *",
  663. "/every-fifteen-minutes": "*/15 * * * *",
  664. "/every-quarter-hour": "*/15 * * * *",
  665. "/every-20-minutes": "*/20 * * * *",
  666. "/every-30-minutes": "*/30 * * * *",
  667. "/every-hour-at-30-minutes": "30 * * * *",
  668. "/every-half-hour": "*/30 * * * *",
  669. "/every-60-minutes": "0 * * * *",
  670. "/every-hour": "0 * * * *",
  671. "/every-1-hour": "0 * * * *",
  672. "/every-2-hours": "0 */2 * * *",
  673. "/every-two-hours": "0 */2 * * *",
  674. "/every-even-hour": "0 */2 * * *",
  675. "/every-other-hour": "0 */2 * * *",
  676. "/every-3-hours": "0 */3 * * *",
  677. "/every-three-hours": "0 */3 * * *",
  678. "/every-4-hours": "0 */4 * * *",
  679. "/every-6-hours": "0 */6 * * *",
  680. "/every-six-hours": "0 */6 * * *",
  681. "/every-8-hours": "0 */8 * * *",
  682. "/every-12-hours": "0 */12 * * *",
  683. "/hour-range": "0 9-17 * * *",
  684. "/between-certain-hours": "0 9-17 * * *",
  685. "/every-day": "0 0 * * *",
  686. "/daily": "0 0 * * *",
  687. "/once-a-day": "0 0 * * *",
  688. "/every-night": "0 0 * * *",
  689. "/every-day-at-1am": "0 1 * * *",
  690. "/every-day-at-2am": "0 2 * * *",
  691. "/every-day-8am": "0 8 * * *",
  692. "/every-morning": "0 9 * * *",
  693. "/every-midnight": "0 0 * * *",
  694. "/every-day-at-midnight": "0 0 * * *",
  695. "/every-night-at-midnight": "0 0 * * *",
  696. "/every-sunday": "0 0 * * SUN",
  697. "/every-monday": "0 0 * * MON",
  698. "/every-tuesday": "0 0 * * TUE",
  699. "/every-wednesday": "0 0 * * WED",
  700. "/every-thursday": "0 0 * * THU",
  701. "/every-friday": "0 0 * * FRI",
  702. "/every-friday-at-midnight": "0 0 * * FRI",
  703. "/every-saturday": "0 0 * * SAT",
  704. "/every-weekday": "0 0 * * 1-5",
  705. "/weekdays-only": "0 0 * * 1-5",
  706. "/monday-to-friday": "0 0 * * 1-5",
  707. "/every-weekend": "0 0 * * 6,0",
  708. "/weekends-only": "0 0 * * 6,0",
  709. "/every-7-days": "0 0 * * 0",
  710. "/weekly": "0 0 * * 0",
  711. "/once-a-week": "0 0 * * 0",
  712. "/every-week": "0 0 * * 0",
  713. "/every-month": "0 0 1 * *",
  714. "/monthly": "0 0 1 * *",
  715. "/once-a-month": "0 0 1 * *",
  716. "/every-other-month": "0 0 1 */2 *",
  717. "/every-quarter": "0 0 1 */3 *",
  718. "/every-6-months": "0 0 1 */6 *",
  719. "/every-year": "0 0 1 1 *"
  720. };
  721. t.exports = {
  722. textFromLocation: function () {
  723. if (window.location.hash) return decodeURIComponent(window.location.hash).replace("#", "").replace(/_/g, " ");
  724. if (window.location.pathname) {
  725. var e = decodeURIComponent(window.location.pathname);
  726. }
  727. return null
  728. }, updateLocation: function (e) {
  729. }, defaultTitle: r
  730. }
  731. }, {}], 15: [function (e, t, n) {
  732. "use strict";
  733. function a(e, i) {
  734. return Object.keys(i).reduce(function (e, t) {
  735. return n = e, o = i[r = t], a = new RegExp("(^|[ ,-/])" + r + "($|[ ,-/])", "gi"), u = "$1" + o + "$2", n.replace(a, u).replace(a, u);
  736. var n, r, o, a, u
  737. }, e)
  738. }
  739. var u = {sun: "0", mon: "1", tue: "2", wed: "3", thu: "4", fri: "5", sat: "6"};
  740. var i = {
  741. jan: "1",
  742. feb: "2",
  743. mar: "3",
  744. apr: "4",
  745. may: "5",
  746. jun: "6",
  747. jul: "7",
  748. aug: "8",
  749. sep: "9",
  750. oct: "10",
  751. nov: "11",
  752. dec: "12"
  753. };
  754. var s = {
  755. "@yearly": ["0", "0", "1", "1", "*"],
  756. "@annually": ["0", "0", "1", "1", "*"],
  757. "@monthly": ["0", "0", "1", "*", "*"],
  758. "@weekly": ["0", "0", "*", "*", "0"],
  759. "@daily": ["0", "0", "*", "*", "*"],
  760. "@midnight": ["0", "0", "*", "*", "*"],
  761. "@hourly": ["0", "*", "*", "*", "*"]
  762. };
  763. t.exports = function (e) {
  764. var t = e.trim().split(/\s+/).filter(function (e) {
  765. return e
  766. });
  767. if (1 === t.length && "@reboot" === t[0]) return {originalParts: t, parts: []};
  768. var n, r, o = (1 === t.length ? (n = t[0], r = s[n], void 0 !== r ? r : [n]) : t).map(function (e, t) {
  769. switch (t) {
  770. case 3:
  771. return a(e, i);
  772. case 4:
  773. return a(e, u);
  774. default:
  775. return e
  776. }
  777. });
  778. return {originalParts: t, parts: o, daysAnded: !!o[2] && "*" === o[2][0] || !!o[4] && "*" === o[4][0]}
  779. }
  780. }, {}], 16: [function (e, t, n) {
  781. var i = e("../lib/index"), s = e("../lib/path"),
  782. o = ["5 0 * 8 *", "15 14 1 * *", "0 22 * * 1-5", "23 0-20/2 * * *", "5 4 * * sun", "0 0,12 1 */2 *", "0 4 8-14 * *", "0 0 1,15 * 3", "@weekly"],
  783. c = function (e) {
  784. return e.trim().replace(/ +/g, " ")
  785. };
  786. function a(e) {
  787. var t = c(e),
  788. n = null,
  789. r = i.prenormalize(t), o = i.normalize(r), a = o.errors ? null : i.describe(r), u = t.split(" ");
  790. return {
  791. schedule: o,
  792. description: a,
  793. commonBlurb: n,
  794. isSpecialString: 1 <= u.length && u[0].startsWith("@")
  795. }
  796. }
  797. var r = s.textFromLocation() || "5 4 * * *", u = a(r);
  798. t.exports = {
  799. state: {
  800. text: r,
  801. schedule: u.schedule,
  802. description: u.description,
  803. exampleIndex: 0,
  804. selectedPart: null,
  805. selectedDirectly: !1,
  806. moreNextDates: !1,
  807. commonBlurb: u.commonBlurb,
  808. isSpecialString: u.isSpecialString,
  809. date: new Date,
  810. focussed: !1
  811. }, reducers: {
  812. showNextExample: function (e, t) {
  813. var n = o[t.exampleIndex], r = a(n);
  814. return s.updateLocation(n), {
  815. text: n,
  816. schedule: r.schedule,
  817. description: r.description,
  818. exampleIndex: (t.exampleIndex + 1) % o.length,
  819. isSpecialString: r.isSpecialString
  820. }
  821. }, inputFocus: function (e, t) {
  822. return {focussed: !0}
  823. }, inputBlur: function (e, t) {
  824. return {text: c(t.text), selectedPart: null, focussed: !1}
  825. }, selectPart: function (e, t) {
  826. return {selectedPart: t.isSpecialString ? null : e, selectedDirectly: !1}
  827. }, inputUpdate: function (e, t) {
  828. return {text: e}
  829. }, inputEnter: function (e, t) {
  830. return s.updateLocation(e), a(e)
  831. }, inputSelect: function (e, t) {
  832. if (!t.focussed) return {};
  833. if (t.isSpecialString) return {selectedPart: null, selectedDirectly: !0};
  834. var n = e.selectionStart, r = e.selectionEnd,
  835. o = c(t.text.substring(0, n + 1)).split(" ").length;
  836. return {
  837. selectedPart: o === c(t.text.substring(0, r + 1)).split(" ").length ? Math.max(Math.min(o, 5), 1) : null,
  838. selectedDirectly: !0
  839. }
  840. }, toggleMoreNextDates: function (e, t) {
  841. return {moreNextDates: !t.moreNextDates}
  842. }, setNextMinute: function (e, t) {
  843. return {date: e}
  844. }
  845. }, effects: {}, subscriptions: [function (e, t) {
  846. var n = 61 - (new Date).getUTCSeconds();
  847. setTimeout(function () {
  848. e("setNextMinute", new Date, t), setInterval(function () {
  849. e("setNextMinute", new Date, t)
  850. }, 6e4)
  851. }, 1e3 * n)
  852. }]
  853. }
  854. }, {"../lib/index": 11, "../lib/path": 14}], 17: [function (e, t, n) {
  855. t.exports = function (e, t, n, r, o, a) {
  856. e.forEach(function (e) {
  857. e(t, n, r, o, a)
  858. })
  859. }
  860. }, {}], 18: [function (e, t, n) {
  861. var x = e("xtend/mutable"), A = e("xtend"), S = e("./apply-hook");
  862. function N(n, r, o, a) {
  863. n && !o[n] && (o[n] = {}), Object.keys(r).forEach(function (e) {
  864. var t = a ? a(r[e], e) : r[e];
  865. n ? o[n][e] = t : o[e] = t
  866. })
  867. }
  868. function r(e) {
  869. throw e
  870. }
  871. function C(r) {
  872. return function (e, t, n) {
  873. e && r(e, t, n)
  874. }
  875. }
  876. function j(t, e) {
  877. return e.forEach(function (e) {
  878. t = e(t)
  879. }), t
  880. }
  881. t.exports = function (e) {
  882. var h = [], v = [], i = [], o = [], s = [], a = [], c = [];
  883. t(e = e || {});
  884. var l = !1, d = !1, m = !1, f = !1, y = n._subscriptions = {}, b = n._reducers = {},
  885. g = n._effects = {},
  886. w = n._models = [], E = {};
  887. return n.model = function (e) {
  888. w.push(e)
  889. }, n.state = function (e) {
  890. var r = (e = e || {}).state;
  891. if (!e.state && !1 === e.freeze) return A(E);
  892. if (!e.state) return Object.freeze(A(E));
  893. var o = [], a = {};
  894. w.forEach(function (e) {
  895. var t = e.namespace;
  896. o.push(t);
  897. var n = e.state || {};
  898. t ? (a[t] = a[t] || {}, N(t, n, a), a[t] = A(a[t], r[t])) : x(a, n)
  899. }), Object.keys(r).forEach(function (e) {
  900. -1 === o.indexOf(e) && (a[e] = r[e])
  901. });
  902. var t = j(A(E, A(r, a)), s);
  903. return !1 === e.freeze ? t : Object.freeze(t)
  904. }, (n.start = n).use = t, n;
  905. function t(e) {
  906. e.onStateChange && h.push(e.onStateChange), e.onError && i.push(C(e.onError)), e.onAction && v.push(e.onAction), e.wrapSubscriptions && o.push(e.wrapSubscriptions), e.wrapInitialState && s.push(e.wrapInitialState), e.wrapReducers && a.push(e.wrapReducers), e.wrapEffects && c.push(e.wrapEffects)
  907. }
  908. function n(n) {
  909. return n = n || {}, w.forEach(function (e) {
  910. var r = e.namespace;
  911. if (!m && e.state && !1 !== n.state) {
  912. var t = e.state || {};
  913. r ? (E[r] = E[r] || {}, N(r, t, E)) : x(E, t)
  914. }
  915. !l && e.reducers && !1 !== n.reducers && N(r, e.reducers, b, function (e) {
  916. return j(e, a)
  917. }), !d && e.effects && !1 !== n.effects && N(r, e.effects, g, function (e) {
  918. return j(e, c)
  919. }), !f && e.subscriptions && !1 !== n.subscriptions && N(r, e.subscriptions, y, function (e, t) {
  920. var n = p("subscription: " + (r ? r + ":" + t : t));
  921. return (e = j(e, o))(n, function (e) {
  922. S(i, e, E, p)
  923. }), e
  924. })
  925. }), m || !1 === n.state || (E = j(E, s)), n.noSubscriptions || (f = !0), n.noReducers || (l = !0), n.noEffects || (d = !0), n.noState || (m = !0), i.length || i.push(C(r)), p;
  926. function p(o, a) {
  927. return function (e, t, n) {
  928. n || a || (n = t, t = null);
  929. var r = a ? function (e) {
  930. (e = e || null) && S(i, e, E, function (n) {
  931. return function (e, t) {
  932. u(e, t = void 0 === t ? null : t, n, r)
  933. }
  934. })
  935. } : n;
  936. u(e, t = void 0 === t ? null : t, o, r)
  937. }
  938. }
  939. function u(l, d, m, f) {
  940. setTimeout(function () {
  941. var e = !1, t = !1, n = A(E);
  942. v.length && S(v, d, E, l, m, p);
  943. var r = l;
  944. if (/:/.test(l)) {
  945. var o = l.split(":"), a = o.shift();
  946. r = o.join(":")
  947. }
  948. var u = a ? b[a] : b;
  949. if (u && u[r]) {
  950. if (a) {
  951. var i = u[r](d, E[a]);
  952. n[a] = A(E[a], i)
  953. } else x(n, b[r](d, E));
  954. e = !0, h.length && S(h, d, n, E, r, p), f(null, E = n)
  955. }
  956. var s = a ? g[a] : g;
  957. if (!e && s && s[r]) {
  958. var c = p("effect: " + l);
  959. a ? s[r](d, E[a], c, f) : s[r](d, E, c, f), t = !0
  960. }
  961. if (!e && !t) throw new Error("Could not find action " + r)
  962. }, 0)
  963. }
  964. }
  965. }
  966. }, {"./apply-hook": 17, xtend: 44, "xtend/mutable": 45}], 19: [function (e, t, n) {
  967. }, {}], 20: [function (e, t, n) {
  968. t.exports = e("yo-yo")
  969. }, {"yo-yo": 46}], 21: [function (e, t, n) {
  970. var p = e("sheet-router/history"), r = e("sheet-router"), h = e("global/document"), v = e("document-ready"),
  971. y = e("sheet-router/href"), b = e("sheet-router/hash"), g = e("hash-match"), o = e("barracks"),
  972. w = e("nanoraf"), E = e("xtend"), x = e("yo-yo");
  973. t.exports = function (s) {
  974. s = s || {};
  975. var a = m._store = o(), u = m._router = null, i = null, c = null, l = null, d = null;
  976. return a.use({
  977. onStateChange: function (e, t, n, r, o) {
  978. d || (d = w(function (e, t) {
  979. var n = u(e.location.pathname, e, t);
  980. c = x.update(c, n)
  981. })), d(t, n)
  982. }
  983. }), a.use(s), m.toString = function (e, t) {
  984. t = t || {}, a.start({subscriptions: !1, reducers: !1, effects: !1});
  985. var n = a.state({state: t}), r = f(i, l, function () {
  986. return function () {
  987. }
  988. })(e, n);
  989. return r.outerHTML || r.toString()
  990. }, m.router = function (e, t) {
  991. i = e, l = t
  992. }, m.model = function (e) {
  993. a.model(e)
  994. }, (m.start = m).use = function (e) {
  995. a.use(e)
  996. }, m;
  997. function m(n, e) {
  998. e || "string" == typeof n || (e = n, n = null), e = e || {}, a.model(function (e) {
  999. var t = h.location, n = {pathname: e.hash ? g(t.hash) : t.href}, r = {};
  1000. return !0 === e.hash ? o(function (t) {
  1001. b(function (e) {
  1002. t(g(e))
  1003. })
  1004. }, "handleHash", r) : (!1 !== e.history && o(p, "handleHistory", r), !1 !== e.href && o(y, "handleHref", r)), {
  1005. namespace: "location",
  1006. subscriptions: r,
  1007. reducers: {
  1008. setLocation: function (e, t) {
  1009. return {pathname: e.location.replace(/#.*/, "")}
  1010. }
  1011. },
  1012. state: n
  1013. };
  1014. function o(e, t, n) {
  1015. n[t] = function (t, n) {
  1016. e(function (e) {
  1017. t("location:setLocation", {location: e}, n)
  1018. })
  1019. }
  1020. }
  1021. }(e));
  1022. var t = a.start(e);
  1023. u = m._router = f(i, l, t);
  1024. var r = a.state({state: {}});
  1025. if (!n) {
  1026. var o = u(r.location.pathname, r);
  1027. return c = o
  1028. }
  1029. v(function () {
  1030. var e = h.querySelector(n), t = u(r.location.pathname, r);
  1031. c = x.update(e, t)
  1032. })
  1033. }
  1034. function f(e, t, u) {
  1035. var i = {params: {}};
  1036. return r(e, t, function (r) {
  1037. return function (e, t, n) {
  1038. return "function" == typeof t && (o = t, a = u("view: " + e, !0), t = function (e, t) {
  1039. var n = i, r = i = E(t, {params: e});
  1040. return !1 !== s.freeze && Object.freeze(r), o(r, n, a)
  1041. }), r(e, t, n);
  1042. var o, a
  1043. }
  1044. })
  1045. }
  1046. }
  1047. }, {
  1048. barracks: 18,
  1049. "document-ready": 23,
  1050. "global/document": 24,
  1051. "hash-match": 26,
  1052. nanoraf: 30,
  1053. "sheet-router": 38,
  1054. "sheet-router/hash": 35,
  1055. "sheet-router/history": 36,
  1056. "sheet-router/href": 37,
  1057. xtend: 44,
  1058. "yo-yo": 46
  1059. }], 22: [function (e, t, n) {
  1060. t.exports = function (t, n, r) {
  1061. var o, a, u, i, s;
  1062. function c() {
  1063. var e = Date.now() - i;
  1064. e < n && 0 <= e ? o = setTimeout(c, n - e) : (o = null, r || (s = t.apply(u, a), u = a = null))
  1065. }
  1066. null == n && (n = 100);
  1067. var e = function () {
  1068. u = this, a = arguments, i = Date.now();
  1069. var e = r && !o;
  1070. return o || (o = setTimeout(c, n)), e && (s = t.apply(u, a), u = a = null), s
  1071. };
  1072. return e.clear = function () {
  1073. o && (clearTimeout(o), o = null)
  1074. }, e.flush = function () {
  1075. o && (s = t.apply(u, a), u = a = null, clearTimeout(o), o = null)
  1076. }, e
  1077. }
  1078. }, {}], 23: [function (e, t, n) {
  1079. "use strict";
  1080. var r = e("global/document");
  1081. t.exports = r.addEventListener ? function (e) {
  1082. var t = r.readyState;
  1083. if ("complete" === t || "interactive" === t) return setTimeout(e, 0);
  1084. r.addEventListener("DOMContentLoaded", function () {
  1085. e()
  1086. })
  1087. } : function () {
  1088. }
  1089. }, {"global/document": 24}], 24: [function (o, a, e) {
  1090. (function (e) {
  1091. var t, n = void 0 !== e ? e : "undefined" != typeof window ? window : {}, r = o("min-document");
  1092. "undefined" != typeof document ? t = document : (t = n["__GLOBAL_DOCUMENT_CACHE@4"]) || (t = n["__GLOBAL_DOCUMENT_CACHE@4"] = r), a.exports = t
  1093. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  1094. }, {"min-document": 19}], 25: [function (e, n, t) {
  1095. (function (e) {
  1096. var t;
  1097. t = "undefined" != typeof window ? window : void 0 !== e ? e : "undefined" != typeof self ? self : {}, n.exports = t
  1098. }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {})
  1099. }, {}], 26: [function (e, t, n) {
  1100. t.exports = function (e, t) {
  1101. var n = t || "/";
  1102. return 0 === e.length ? n : (0 != (e = (e = e.replace("#", "")).replace(/\/$/, "")).indexOf("/") && (e = "/" + e), "/" == n ? e : e.replace(n, ""))
  1103. }
  1104. }, {}], 27: [function (e, t, n) {
  1105. "use strict";
  1106. var r = e("number-is-nan");
  1107. t.exports = Number.isFinite || function (e) {
  1108. return !("number" != typeof e || r(e) || e === 1 / 0 || e === -1 / 0)
  1109. }
  1110. }, {"number-is-nan": 31}], 28: [function (e, t, n) {
  1111. var r = e("is-finite");
  1112. t.exports = Number.isInteger || function (e) {
  1113. return "number" == typeof e && r(e) && Math.floor(e) === e
  1114. }
  1115. }, {"is-finite": 27}], 29: [function (e, t, n) {
  1116. "use strict";
  1117. var T, U = "http://www.w3.org/1999/xhtml", k = "undefined" == typeof document ? void 0 : document,
  1118. r = k ? k.body || k.createElement("div") : {}, s = r.hasAttributeNS ? function (e, t, n) {
  1119. return e.hasAttributeNS(t, n)
  1120. } : r.hasAttribute ? function (e, t, n) {
  1121. return e.hasAttribute(n)
  1122. } : function (e, t, n) {
  1123. return null != e.getAttributeNode(t, n)
  1124. };
  1125. function _(e, t) {
  1126. var n = e.nodeName, r = t.nodeName;
  1127. return n === r || !!(t.actualize && n.charCodeAt(0) < 91 && 90 < r.charCodeAt(0)) && n === r.toUpperCase()
  1128. }
  1129. function o(e, t, n) {
  1130. e[n] !== t[n] && (e[n] = t[n], e[n] ? e.setAttribute(n, "") : e.removeAttribute(n, ""))
  1131. }
  1132. var O = {
  1133. OPTION: function (e, t) {
  1134. o(e, t, "selected")
  1135. }, INPUT: function (e, t) {
  1136. o(e, t, "checked"), o(e, t, "disabled"), e.value !== t.value && (e.value = t.value), s(t, null, "value") || e.removeAttribute("value")
  1137. }, TEXTAREA: function (e, t) {
  1138. var n = t.value;
  1139. e.value !== n && (e.value = n);
  1140. var r = e.firstChild;
  1141. if (r) {
  1142. var o = r.nodeValue;
  1143. if (o == n || !n && o == e.placeholder) return;
  1144. r.nodeValue = n
  1145. }
  1146. }, SELECT: function (e, t) {
  1147. if (!s(t, null, "multiple")) {
  1148. for (var n = 0, r = t.firstChild; r;) {
  1149. var o = r.nodeName;
  1150. if (o && "OPTION" === o.toUpperCase()) {
  1151. if (s(r, null, "selected")) break;
  1152. n++
  1153. }
  1154. r = r.nextSibling
  1155. }
  1156. e.selectedIndex = n
  1157. }
  1158. }
  1159. };
  1160. function I() {
  1161. }
  1162. function M(e) {
  1163. return e.id
  1164. }
  1165. var P, a = (P = function (e, t) {
  1166. var n, r, o, a, u, i = t.attributes;
  1167. for (n = i.length - 1; 0 <= n; --n) o = (r = i[n]).name, a = r.namespaceURI, u = r.value, a ? (o = r.localName || o, e.getAttributeNS(a, o) !== u && e.setAttributeNS(a, o, u)) : e.getAttribute(o) !== u && e.setAttribute(o, u);
  1168. for (n = (i = e.attributes).length - 1; 0 <= n; --n) !1 !== (r = i[n]).specified && (o = r.name, (a = r.namespaceURI) ? (o = r.localName || o, s(t, a, o) || e.removeAttributeNS(a, o)) : s(t, null, o) || e.removeAttribute(o))
  1169. }, function (h, v, e) {
  1170. if (e || (e = {}), "string" == typeof v) if ("#document" === h.nodeName || "HTML" === h.nodeName) {
  1171. var t = v;
  1172. (v = k.createElement("html")).innerHTML = t
  1173. } else n = v, !T && k.createRange && (T = k.createRange()).selectNode(k.body), T && T.createContextualFragment ? r = T.createContextualFragment(n) : (r = k.createElement("body")).innerHTML = n, v = r.childNodes[0];
  1174. var n, r, o, y = e.getNodeKey || M, b = e.onBeforeNodeAdded || I, a = e.onNodeAdded || I,
  1175. g = e.onBeforeElUpdated || I, w = e.onElUpdated || I, u = e.onBeforeNodeDiscarded || I,
  1176. i = e.onNodeDiscarded || I, E = e.onBeforeElChildrenUpdated || I, s = !0 === e.childrenOnly, x = {};
  1177. function A(e) {
  1178. o ? o.push(e) : o = [e]
  1179. }
  1180. function S(e, t, n) {
  1181. !1 !== u(e) && (t && t.removeChild(e), i(e), function e(t, n) {
  1182. if (1 === t.nodeType) for (var r = t.firstChild; r;) {
  1183. var o = void 0;
  1184. n && (o = y(r)) ? A(o) : (i(r), r.firstChild && e(r, n)), r = r.nextSibling
  1185. }
  1186. }(e, n))
  1187. }
  1188. function N(e) {
  1189. a(e);
  1190. for (var t = e.firstChild; t;) {
  1191. var n = t.nextSibling, r = y(t);
  1192. if (r) {
  1193. var o = x[r];
  1194. o && _(t, o) && (t.parentNode.replaceChild(o, t), C(o, t))
  1195. }
  1196. N(t), t = n
  1197. }
  1198. }
  1199. function C(e, t, n) {
  1200. var r, o = y(t);
  1201. if (o && delete x[o], !v.isSameNode || !v.isSameNode(h)) {
  1202. if (!n) {
  1203. if (!1 === g(e, t)) return;
  1204. if (P(e, t), w(e), !1 === E(e, t)) return
  1205. }
  1206. if ("TEXTAREA" !== e.nodeName) {
  1207. var a, u, i, s, c = t.firstChild, l = e.firstChild;
  1208. e:for (; c;) {
  1209. for (i = c.nextSibling, a = y(c); l;) {
  1210. if (u = l.nextSibling, c.isSameNode && c.isSameNode(l)) {
  1211. c = i, l = u;
  1212. continue e
  1213. }
  1214. r = y(l);
  1215. var d = l.nodeType, m = void 0;
  1216. if (d === c.nodeType && (1 === d ? (a ? a !== r && ((s = x[a]) ? l.nextSibling === s ? m = !1 : (e.insertBefore(s, l), u = l.nextSibling, r ? A(r) : S(l, e, !0), l = s) : m = !1) : r && (m = !1), (m = !1 !== m && _(l, c)) && C(l, c)) : 3 !== d && 8 != d || (m = !0, l.nodeValue !== c.nodeValue && (l.nodeValue = c.nodeValue))), m) {
  1217. c = i, l = u;
  1218. continue e
  1219. }
  1220. r ? A(r) : S(l, e, !0), l = u
  1221. }
  1222. if (a && (s = x[a]) && _(s, c)) e.appendChild(s), C(s, c); else {
  1223. var f = b(c);
  1224. !1 !== f && (f && (c = f), c.actualize && (c = c.actualize(e.ownerDocument || k)), e.appendChild(c), N(c))
  1225. }
  1226. c = i, l = u
  1227. }
  1228. for (; l;) u = l.nextSibling, (r = y(l)) ? A(r) : S(l, e, !0), l = u
  1229. }
  1230. var p = O[e.nodeName];
  1231. p && p(e, t)
  1232. }
  1233. }
  1234. !function e(t) {
  1235. if (1 === t.nodeType) for (var n = t.firstChild; n;) {
  1236. var r = y(n);
  1237. r && (x[r] = n), e(n), n = n.nextSibling
  1238. }
  1239. }(h);
  1240. var c, l, d = h, m = d.nodeType, f = v.nodeType;
  1241. if (!s) if (1 === m) 1 === f ? _(h, v) || (i(h), d = function (e, t) {
  1242. for (var n = e.firstChild; n;) {
  1243. var r = n.nextSibling;
  1244. t.appendChild(n), n = r
  1245. }
  1246. return t
  1247. }(h, (c = v.nodeName, (l = v.namespaceURI) && l !== U ? k.createElementNS(l, c) : k.createElement(c)))) : d = v; else if (3 === m || 8 === m) {
  1248. if (f === m) return d.nodeValue !== v.nodeValue && (d.nodeValue = v.nodeValue), d;
  1249. d = v
  1250. }
  1251. if (d === v) i(h); else if (C(d, v, s), o) for (var p = 0, j = o.length; p < j; p++) {
  1252. var D = x[o[p]];
  1253. D && S(D, D.parentNode, !1)
  1254. }
  1255. return !s && d !== h && h.parentNode && (d.actualize && (d = d.actualize(h.ownerDocument || k)), h.parentNode.replaceChild(d, h)), d
  1256. });
  1257. t.exports = a
  1258. }, {}], 30: [function (e, t, n) {
  1259. var u = e("global/window");
  1260. t.exports = function (n, r) {
  1261. r = r || u.requestAnimationFrame;
  1262. var o = !1, a = null;
  1263. return function (e, t) {
  1264. null !== a || o || (o = !0, r(function () {
  1265. o = !1, a && (n(a, t), a = null)
  1266. })), a = e
  1267. }
  1268. }
  1269. }, {"global/window": 25}], 31: [function (e, t, n) {
  1270. "use strict";
  1271. t.exports = Number.isNaN || function (e) {
  1272. return e != e
  1273. }
  1274. }, {}], 32: [function (e, t, n) {
  1275. var r = e("global/document"), o = e("global/window"), s = Object.create(null),
  1276. a = "onloadid" + (new Date % 9e6).toString(36), c = "data-" + a, u = 0;
  1277. if (o && o.MutationObserver) {
  1278. var i = new MutationObserver(function (e) {
  1279. if (!(Object.keys(s).length < 1)) for (var t = 0; t < e.length; t++) e[t].attributeName !== c ? (f(e[t].removedNodes, m), f(e[t].addedNodes, d)) : (o = e[t], a = d, u = m, void 0, i = o.target.getAttribute(c), n = o.oldValue, r = i, n && r && s[n][3] === s[r][3] ? s[i] = s[o.oldValue] : (s[o.oldValue] && u(o.oldValue, o.target), s[i] && a(i, o.target)));
  1280. var n, r, o, a, u, i
  1281. });
  1282. r.body ? l(i) : r.addEventListener("DOMContentLoaded", function (e) {
  1283. l(i)
  1284. })
  1285. }
  1286. function l(e) {
  1287. e.observe(r.documentElement, {
  1288. childList: !0,
  1289. subtree: !0,
  1290. attributes: !0,
  1291. attributeOldValue: !0,
  1292. attributeFilter: [c]
  1293. })
  1294. }
  1295. function d(e, t) {
  1296. s[e][0] && 0 === s[e][2] && (s[e][0](t), s[e][2] = 1)
  1297. }
  1298. function m(e, t) {
  1299. s[e][1] && 1 === s[e][2] && (s[e][1](t), s[e][2] = 0)
  1300. }
  1301. function f(t, n) {
  1302. for (var e = Object.keys(s), r = 0; r < t.length; r++) {
  1303. if (t[r] && t[r].getAttribute && t[r].getAttribute(c)) {
  1304. var o = t[r].getAttribute(c);
  1305. e.forEach(function (e) {
  1306. o === e && n(e, t[r])
  1307. })
  1308. }
  1309. 0 < t[r].childNodes.length && f(t[r].childNodes, n)
  1310. }
  1311. }
  1312. t.exports = function e(t, n, r, o) {
  1313. return n = n || function () {
  1314. }, r = r || function () {
  1315. }, t.setAttribute(c, "o" + u), s["o" + u] = [n, r, 0, o || e.caller], u += 1, t
  1316. }, t.exports.KEY_ATTR = c, t.exports.KEY_ID = a
  1317. }, {"global/document": 24, "global/window": 25}], 33: [function (e, t, n) {
  1318. var r = e("global/window");
  1319. r && r.process && "renderer" === r.process.type ? t.exports = e("./index.js") : t.exports = function () {
  1320. }
  1321. }, {"./index.js": 32, "global/window": 25}], 34: [function (e, t, n) {
  1322. t.exports = function (e) {
  1323. return e.trim().replace(/[\?|#].*$/, "").replace(/^(?:https?\:)\/\//, "").replace(/^.*?(\/.*)/, "$1").replace(/\/$/, "")
  1324. }
  1325. }, {}], 35: [function (e, t, n) {
  1326. var r = e("global/window");
  1327. t.exports = function (t) {
  1328. r.onhashchange = function (e) {
  1329. t(r.location.hash)
  1330. }
  1331. }
  1332. }, {"global/window": 25}], 36: [function (e, t, n) {
  1333. var r = e("global/document"), o = e("global/window");
  1334. t.exports = function (e) {
  1335. o.onpopstate = function () {
  1336. e(r.location.href)
  1337. }
  1338. }
  1339. }, {"global/document": 24, "global/window": 25}], 37: [function (e, t, n) {
  1340. var o = e("global/window");
  1341. t.exports = function (r) {
  1342. o.onclick = function (e) {
  1343. var t = function e(t) {
  1344. if (t) return "a" !== t.localName ? e(t.parentNode) : void 0 === t.href ? e(t.parentNode) : o.location.host !== t.host ? e(t.parentNode) : t
  1345. }(e.target);
  1346. if (t) {
  1347. e.preventDefault();
  1348. var n = t.href.replace(/#$/, "");
  1349. r(n), o.history.pushState({}, null, n)
  1350. }
  1351. }
  1352. }
  1353. }, {"global/window": 25}], 38: [function (e, t, n) {
  1354. var r = e("pathname-match"), o = e("wayfarer");
  1355. function u(e, t, n) {
  1356. return n || (n = t, t = null), [e = e.replace(/^\//, ""), t, n]
  1357. }
  1358. t.exports = function (e, t, n) {
  1359. n = n ? n(u) : u, t || (t = e, e = "");
  1360. var a = o(e);
  1361. return function t(e, n) {
  1362. if (Array.isArray(e[0])) e.forEach(function (e) {
  1363. t(e, n)
  1364. }); else if (e[1]) {
  1365. var r = e[0] ? n.concat(e[0]).join("/") : n.length ? n.join("/") : e[0];
  1366. a.on(r, e[1]), t(e[2], n.concat(e[0]))
  1367. } else if (Array.isArray(e[2])) t(e[2], n.concat(e[0])); else {
  1368. var o = e[0] ? n.concat(e[0]).join("/") : n.length ? n.join("/") : e[0];
  1369. a.on(o, e[2])
  1370. }
  1371. }(t(n), []), function (e) {
  1372. var t = [].slice.call(arguments);
  1373. return t[0] = r(t[0]), a.apply(null, t)
  1374. }
  1375. }
  1376. }, {"pathname-match": 34, wayfarer: 42}], 39: [function (e, t, n) {
  1377. "use strict";
  1378. t.exports = function (e, t, n) {
  1379. if (n = "number" == typeof n ? n : 0, "string" != typeof e) throw new TypeError("Expected a string");
  1380. return -1 !== e.indexOf(t, n)
  1381. }
  1382. }, {}], 40: [function (e, t, n) {
  1383. String.prototype.endsWith || function () {
  1384. "use strict";
  1385. var e = function () {
  1386. try {
  1387. var e = {}, t = Object.defineProperty, n = t(e, e, e) && t
  1388. } catch (e) {
  1389. }
  1390. return n
  1391. }(), c = {}.toString, t = function (e) {
  1392. if (null == this) throw TypeError();
  1393. var t = String(this);
  1394. if (e && "[object RegExp]" == c.call(e)) throw TypeError();
  1395. var n = t.length, r = String(e), o = r.length, a = n;
  1396. if (1 < arguments.length) {
  1397. var u = arguments[1];
  1398. void 0 !== u && (a = u ? Number(u) : 0) != a && (a = 0)
  1399. }
  1400. var i = Math.min(Math.max(a, 0), n) - o;
  1401. if (i < 0) return !1;
  1402. for (var s = -1; ++s < o;) if (t.charCodeAt(i + s) != r.charCodeAt(s)) return !1;
  1403. return !0
  1404. };
  1405. e ? e(String.prototype, "endsWith", {
  1406. value: t,
  1407. configurable: !0,
  1408. writable: !0
  1409. }) : String.prototype.endsWith = t
  1410. }()
  1411. }, {}], 41: [function (e, t, n) {
  1412. String.prototype.startsWith || function () {
  1413. "use strict";
  1414. var e = function () {
  1415. try {
  1416. var e = {}, t = Object.defineProperty, n = t(e, e, e) && t
  1417. } catch (e) {
  1418. }
  1419. return n
  1420. }(), c = {}.toString, t = function (e) {
  1421. if (null == this) throw TypeError();
  1422. var t = String(this);
  1423. if (e && "[object RegExp]" == c.call(e)) throw TypeError();
  1424. var n = t.length, r = String(e), o = r.length, a = 1 < arguments.length ? arguments[1] : void 0,
  1425. u = a ? Number(a) : 0;
  1426. u != u && (u = 0);
  1427. var i = Math.min(Math.max(u, 0), n);
  1428. if (n < o + i) return !1;
  1429. for (var s = -1; ++s < o;) if (t.charCodeAt(i + s) != r.charCodeAt(s)) return !1;
  1430. return !0
  1431. };
  1432. e ? e(String.prototype, "startsWith", {
  1433. value: t,
  1434. configurable: !0,
  1435. writable: !0
  1436. }) : String.prototype.startsWith = t
  1437. }()
  1438. }, {}], 42: [function (e, t, n) {
  1439. var s = e("./trie");
  1440. t.exports = function e(t) {
  1441. if (!(this instanceof e)) return new e(t);
  1442. var r = (t || "").replace(/^\//, ""), o = s();
  1443. return a._trie = o, a.on = function (e, t) {
  1444. var n = t._wayfarer && t._trie ? t : function () {
  1445. return t.apply(this, Array.prototype.slice.call(arguments))
  1446. };
  1447. return e = e || "/", n.route = e, n._wayfarer && n._trie ? o.mount(e, n._trie.trie) : o.create(e).cb = n, a
  1448. }, (a.emit = a).match = u, a._wayfarer = !0, a;
  1449. function a(e) {
  1450. var t = u(e), n = new Array(arguments.length);
  1451. n[0] = t.params;
  1452. for (var r = 1; r < n.length; r++) n[r] = arguments[r];
  1453. return t.cb.apply(t.cb, n)
  1454. }
  1455. function u(e) {
  1456. var t = o.match(e);
  1457. if (t && t.cb) return new i(t);
  1458. var n = o.match(r);
  1459. if (n && n.cb) return new i(n);
  1460. throw new Error("route '" + e + "' did not match")
  1461. }
  1462. function i(e) {
  1463. this.cb = e.cb, this.route = e.cb.route, this.params = e.params
  1464. }
  1465. }
  1466. }, {"./trie": 43}], 43: [function (e, t, n) {
  1467. var u = e("xtend/mutable"), r = e("xtend");
  1468. function o() {
  1469. if (!(this instanceof o)) return new o;
  1470. this.trie = {nodes: {}}
  1471. }
  1472. (t.exports = o).prototype.create = function (e) {
  1473. var a = e.replace(/^\//, "").split("/");
  1474. return function e(t, n) {
  1475. var r = a.hasOwnProperty(t) && a[t];
  1476. if (!1 === r) return n;
  1477. var o = null;
  1478. return /^:|^\*/.test(r) ? (n.nodes.hasOwnProperty("$$") ? o = n.nodes.$$ : (o = {nodes: {}}, n.nodes.$$ = o), "*" === r[0] && (n.wildcard = !0), n.name = r.replace(/^:|^\*/, "")) : n.nodes.hasOwnProperty(r) ? o = n.nodes[r] : (o = {nodes: {}}, n.nodes[r] = o), e(t + 1, o)
  1479. }(0, this.trie)
  1480. }, o.prototype.match = function (e) {
  1481. var o = e.replace(/^\//, "").split("/"), a = {}, t = function t(n, e) {
  1482. if (void 0 !== e) {
  1483. var r = o[n];
  1484. if (void 0 === r) return e;
  1485. if (e.nodes.hasOwnProperty(r)) return t(n + 1, e.nodes[r]);
  1486. if (e.name) {
  1487. try {
  1488. a[e.name] = decodeURIComponent(r)
  1489. } catch (e) {
  1490. return t(n, void 0)
  1491. }
  1492. return t(n + 1, e.nodes.$$)
  1493. }
  1494. if (e.wildcard) {
  1495. try {
  1496. a.wildcard = decodeURIComponent(o.slice(n).join("/"))
  1497. } catch (e) {
  1498. return t(n, void 0)
  1499. }
  1500. return e.nodes.$$
  1501. }
  1502. return t(n + 1)
  1503. }
  1504. }(0, this.trie);
  1505. if (t) return (t = r(t)).params = a, t
  1506. }, o.prototype.mount = function (e, t) {
  1507. var n = e.replace(/^\//, "").split("/"), r = null, o = null;
  1508. if (1 === n.length) o = n[0], r = this.create(o); else {
  1509. var a = n.join("/");
  1510. o = n[0], r = this.create(a)
  1511. }
  1512. u(r.nodes, t.nodes), t.name && (r.name = t.name), r.nodes[""] && (Object.keys(r.nodes[""]).forEach(function (e) {
  1513. "nodes" !== e && (r[e] = r.nodes[""][e])
  1514. }), u(r.nodes, r.nodes[""].nodes), delete r.nodes[""].nodes)
  1515. }
  1516. }, {xtend: 44, "xtend/mutable": 45}], 44: [function (e, t, n) {
  1517. t.exports = function () {
  1518. for (var e = {}, t = 0; t < arguments.length; t++) {
  1519. var n = arguments[t];
  1520. for (var r in n) o.call(n, r) && (e[r] = n[r])
  1521. }
  1522. return e
  1523. };
  1524. var o = Object.prototype.hasOwnProperty
  1525. }, {}], 45: [function (e, t, n) {
  1526. t.exports = function (e) {
  1527. for (var t = 1; t < arguments.length; t++) {
  1528. var n = arguments[t];
  1529. for (var r in n) o.call(n, r) && (e[r] = n[r])
  1530. }
  1531. return e
  1532. };
  1533. var o = Object.prototype.hasOwnProperty
  1534. }, {}], 46: [function (e, t, n) {
  1535. var r = e("morphdom"), s = e("./update-events.js");
  1536. t.exports = {}, t.exports.update = function (e, t, i) {
  1537. return i || (i = {}), !1 !== i.events && (i.onBeforeElUpdated || (i.onBeforeElUpdated = function (e, t) {
  1538. for (var n = i.events || s, r = 0; r < n.length; r++) {
  1539. var o = n[r];
  1540. t[o] ? e[o] = t[o] : e[o] && (e[o] = void 0)
  1541. }
  1542. var a = e.value, u = t.value;
  1543. "INPUT" === e.nodeName && "file" !== e.type || "SELECT" === e.nodeName ? u || t.hasAttribute("value") ? u !== a && (e.value = u) : t.value = e.value : "TEXTAREA" === e.nodeName && null === t.getAttribute("value") && (e.value = t.value)
  1544. })), r(e, t, i)
  1545. }
  1546. }, {"./update-events.js": 47, morphdom: 29}], 47: [function (e, t, n) {
  1547. t.exports = ["onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover", "onmousemove", "onmouseout", "ondragstart", "ondrag", "ondragenter", "ondragleave", "ondragover", "ondrop", "ondragend", "onkeydown", "onkeypress", "onkeyup", "onunload", "onabort", "onerror", "onresize", "onscroll", "onselect", "onchange", "onsubmit", "onreset", "onfocus", "onblur", "oninput", "oncontextmenu", "onfocusin", "onfocusout"]
  1548. }, {}], 48: [function (e, t, n) {
  1549. t.exports = function e(t, n) {
  1550. for (var r = 0; r < n.length; r++) {
  1551. var o = n[r];
  1552. if (Array.isArray(o)) e(t, o); else {
  1553. if (("number" == typeof o || "boolean" == typeof o || o instanceof Date || o instanceof RegExp) && (o = o.toString()), "string" == typeof o) {
  1554. if (t.lastChild && "#text" === t.lastChild.nodeName) {
  1555. t.lastChild.nodeValue += o;
  1556. continue
  1557. }
  1558. o = document.createTextNode(o)
  1559. }
  1560. o && o.nodeType && t.appendChild(o)
  1561. }
  1562. }
  1563. }
  1564. }, {}], 49: [function (r, e, t) {
  1565. r("choo/html");
  1566. var o = r("../elements/part-explanation"), a = r("../elements/text-editor"), u = r("../elements/warning"),
  1567. i = r("../elements/random-example"), s = r("../elements/next-date"),
  1568. c = r("../elements/human-readable"),
  1569. l = r("../elements/blurb");
  1570. e.exports = function (e, t, n) {
  1571. return function () {
  1572. var e = r("./yo-yoify/lib/appendChild.js"),
  1573. t = document.createElement("div");
  1574. return e(t, ["\n ", arguments[0], "\n ", arguments[1], "\n ", arguments[2], "\n ", arguments[3], "\n ", arguments[4], "\n ", arguments[5], "\n ", arguments[6], "\n "]), t
  1575. }(c(e, t, n), s(e, t, n), i(e, t, n), a(e, t, n), u(e, t, n), o(e, t, n), l(e, t, n))
  1576. }
  1577. }, {
  1578. "../elements/blurb": 2,
  1579. "../elements/human-readable": 3,
  1580. "../elements/next-date": 4,
  1581. "../elements/part-explanation": 5,
  1582. "../elements/random-example": 6,
  1583. "../elements/text-editor": 7,
  1584. "../elements/warning": 8,
  1585. "./yo-yoify/lib/appendChild.js": 48,
  1586. "choo/html": 20
  1587. }]
  1588. }, {}, [1]);
  1589. };
  1590. /**
  1591. * FeHelper 进制转换工具
  1592. */
  1593. new Vue({
  1594. el: '#pageContainer',
  1595. data: {},
  1596. mounted: function () {
  1597. // 初始化
  1598. crontabGuruStarter();
  1599. window.start() ;
  1600. // 触发一次随机
  1601. this.randomCron();
  1602. },
  1603. methods: {
  1604. randomCron: function(){
  1605. document.querySelector('#contabContentBox .example span.clickable').click();
  1606. },
  1607. openDonateModal: function(event) {
  1608. event.preventDefault();
  1609. event.stopPropagation();
  1610. chrome.runtime.sendMessage({
  1611. type: 'fh-dynamic-any-thing',
  1612. thing: 'open-donate-modal',
  1613. params: { toolName: 'crontab' }
  1614. });
  1615. },
  1616. openOptionsPage: function(event) {
  1617. event.preventDefault();
  1618. event.stopPropagation();
  1619. chrome.runtime.openOptionsPage();
  1620. }
  1621. }
  1622. });