From 2d70df274f48787c30bf575635f89838d94f65fd Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Tue, 28 Sep 2021 22:09:05 -0700 Subject: update dependencies --- web/rice-box.go | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'web') diff --git a/web/rice-box.go b/web/rice-box.go index 49857d6..4133694 100644 --- a/web/rice-box.go +++ b/web/rice-box.go @@ -60,8 +60,8 @@ func init() { } filec := &embedded.EmbeddedFile{ Filename: "ui.html", - FileModTime: time.Unix(1538242901, 0), - Content: string("\n\n \n neko rss mode\n \n \n \n \n \n \n \n \n \n \n \n

🐱

\n\n
\n\n
\n

Tags

\n \n \n

Feeds

\n \n\n

Export

\n \n
\n \n \n\n
\n
\n
\n
\n \n \n\n \n\n \n\n \n \n\n \n"), + FileModTime: time.Unix(1632891519, 0), + Content: string("\n\n \n neko rss mode\n \n \n \n \n \n \n \n \n \n \n \n

🐱

\n\n
\n\n
\n

Tags

\n \n \n

Feeds

\n \n\n

Export

\n \n
\n \n \n\n
\n
\n
\n
\n \n \n\n \n\n \n\n \n \n\n \n"), } filed := &embedded.EmbeddedFile{ Filename: "ui.js", @@ -69,9 +69,9 @@ func init() { Content: string("var templates = {};\n\n$(document).ready(function() {\n if ( $(window).width() < 1024 ) {\n $('#filters').addClass('hidden');\n }\n document.body.className = localStorage.getItem('theme');\n boot();\n});\n\nvar AppModel = Backbone.Model.extend({\n defaults: {\n 'selectedIndex': 0,\n 'starredFilter': false,\n 'allFilter': false,\n 'unreadFilter': true,\n 'feedFilter': undefined,\n 'searchFilter': undefined\n },\n\n initialize: function() {\n this.bind('change:selectedIndex', this.scroll_to_selected);\n// this.bind('change:selectedIndex', this.scroll_to_selected)\n },\n\n boot: function() {\n this.items.boot();\n this.tags.boot();\n this.feeds.fetch({set: true, remove: false})\n window.setInterval(function() { App.update_read_status() }, 5000);\n },\n\n filterToFeed: function(feed) {\n if (feed.get('selected')) {\n feed.set('selected', false);\n this.set('feedFilter', undefined);\n }\n else {\n App.tags.models.forEach ( function (t) {\n t.set('selected', false);\n });\n App.tag = null;\n App.feeds.models.forEach ( function (f) {\n f.set('selected', false);\n });\n\n this.set('feedFilter', feed);\n feed.set('selected', true);\n }\n this.items.reboot();\n },\n\n filterToTag: function(tag) {\n App.tag = null;\n if (tag.get('selected')) {\n tag.set('selected', false);\n }\n else {\n App.tags.models.forEach ( function (t) {\n t.set('selected', false);\n });\n App.feeds.models.forEach ( function (f) {\n f.set('selected', false);\n });\n this.set('feedFilter', undefined);\n tag.set('selected', true);\n App.tag = tag.get('title');\n }\n App.items.reboot();\n },\n\n filterToStarred: function() {\n this.set('starredFilter', true);\n this.set('allFilter', false);\n this.set('unreadFilter', false);\n this.items.reboot();\n },\n\n filterToAll: function() {\n this.set('searchFilter', undefined);\n this.set('starredFilter', false);\n this.set('allFilter', true);\n this.set('unreadFilter', false);\n this.items.reboot();\n },\n\n filterToUnread: function() {\n this.set('starredFilter', false);\n this.set('allFilter', false);\n this.set('unreadFilter', true);\n this.items.reboot();\n },\n\n filterToSearch: function() {\n this.set('searchFilter', $('#search').val());\n this.set('starredFilter', false);\n this.set('allFilter', true);\n this.set('unreadFilter', false);\n this.items.reboot();\n },\n\n update_read_status: function() {\n var screen_top = $(window).scrollTop();\n var screen_bottom = $(window).scrollTop() + $(window).height();\n\n // // mark all visible items as read\n $.each($('.item'), function(i,v) {\n var item_top = $(v).offset().top;\n // console.log(\"i \", i, \"item_top \", item_top, \"screen_top \", screen_top, \"screen_bottom \", screen_bottom);\n\n if( (item_top < screen_top)) {\n App.items.at(i).markRead();\n // console.log('marking as read: ', i);\n }\n });\n// window.setTimeout(App.update_read_status, 5000);\n },\n\n scroll_to_selected: function() {\n var item = $('.item').eq(this.get('selectedIndex'));\n if(item.offset()) {\n var item_top = item.offset().top;\n $('.item').removeClass('selected');\n item.addClass('selected');\n $(window).scrollTop(item_top);\n }\n App.items.at(this.get('selectedIndex')).markRead();\n if(App.items.models.length>1) {\n if(this.get('selected')>=App.items.models.length-1) {\n App.items.boot();\n }\n }\n },\n\n next: function() {\n if(this.get('selectedIndex') < this.items.models.length-1) {\n this.set('selectedIndex', this.get('selectedIndex')+1);\n }\n if(this.get('selectedIndex') == this.items.models.length-1) {\n App.items.boot();\n }\n },\n\n previous: function() {\n if(this.get('selectedIndex') > 0) {\n this.set('selectedIndex', this.get('selectedIndex')-1);\n }\n },\n\n star: function() {\n if(this.get('selectedIndex') >= 0) {\n App.items.at(this.get('selectedIndex')).toggleStar();\n }\n },\n\n full: function() {\n if(this.get('selectedIndex') >= 0) {\n App.items.at(this.get('selectedIndex')).full();\n }\n }\n\n});\nvar App = new AppModel();\n\nvar ControlsView = Backbone.View.extend({\n className: 'controls',\n\n events: {\n 'click .starred_filter': 'filterToStarred',\n 'click .all_filter': 'filterToAll',\n 'click .unread_filter': 'filterToUnread',\n 'click .new_feed': 'newFeed',\n 'click .search_go': 'filterToSearch',\n 'click .light_theme': 'lightTheme',\n 'click .dark_theme': 'darkTheme',\n 'click .black_theme': 'blackTheme',\n },\n\n initialize: function() {\n _.bindAll(this, 'render');\n this.model.bind('change', this.render);\n },\n\n filterToStarred: function() {\n App.filterToStarred();\n },\n\n filterToAll: function() {\n App.filterToAll();\n },\n\n filterToUnread: function() {\n App.filterToUnread();\n },\n\n filterToSearch: function() {\n App.filterToSearch();\n },\n\n newFeed: function() {\n var feed_url = prompt('New url to subscribe to');\n var feed = new Feed({'url': feed_url});\n App.feeds.add(feed);\n feed.save();\n },\n\n render: function() {\n var h = $.tmpl(templates.controls_template, { 'app': this.model.toJSON() });\n $(this.el).html(h);\n return this;\n },\n\n lightTheme: function() {\n document.body.className = \"light\";\n localStorage.setItem(\"theme\", \"light\");\n },\n\n darkTheme: function() {\n document.body.className = \"dark\";\n localStorage.setItem(\"theme\", \"dark\");\n },\n\n blackTheme: function() {\n document.body.className = \"black\";\n localStorage.setItem(\"theme\", \"black\");\n },\n \n});\n\n\n\nvar Item = Backbone.Model.extend({\n idAttribute: \"_id\",\n url: '/item/',\n\n initialize: function() {\n var p_url = this.get('url');\n p_url = p_url.replace('https://', '');\n p_url = p_url.replace('http://', '');\n this.set('p_url', p_url);\n this.bind('change', this.maybeSave);\n },\n\n maybeSave: function() {\n if(this.hasChanged()) {\n this.save();\n }\n },\n\n markRead: function() {\n // recover if not tag\n if(this.get('read')) {\n return;\n }\n\n // var t = this.get('feed').tag;\n // var tag = App.tags.find(function(x){ return x.get('name') == t });\n this.set('read', true);\n // if(tag) {\n // tag.set('unread', tag.get('unread')-1);\n // }\n },\n\n toggleStar: function() {\n this.set({'starred': !(this.get('starred'))} );\n },\n\n star: function() {\n this.set({'starred': true});\n },\n\n unstar: function() {\n this.set({'starred': false});\n },\n\n full: function() {\n this.set({'full': !(this.get('full'))} );\n // this should just use this.fetch() but\n // it kept GETing from /item instead of /item/id\n // so just hacking this in for now\n\n if(this.get('full_content') == \"\") {\n $.getJSON('/item/' + this.get('_id'), function(data) {\n var i = App.items.get(data['_id'])\n i.set('full_content', data['full_content']);\n });\n }\n }\n\n});\n\n\nvar ItemCollection = Backbone.Collection.extend({\n model: Item,\n\n initialize: function() {\n _.bindAll(this, 'boot', 'reboot');\n },\n\n boot: function() {\n if(App.loading) {\n return;\n }\n if(App.noMore) {\n return;\n }\n\n App.loading = true;\n url = '/stream/';\n url=url+'?foo=bar'\n if(App.get('searchFilter')) {\n url = url + '&q=' + App.get('searchFilter');\n }\n if(App.get('feedFilter')) {\n url = url + '&feed_url=' + App.get('feedFilter').get('url');\n }\n if(App.get('starredFilter')) {\n url = url + '&starred=1';\n }\n if(App.tag != undefined) {\n url = url + '&tag=' + App.tag;\n }\n if(App.items.last()) {\n url = url + '&max_id=' + App.items.last().get('_id');\n }\n\n if(App.get('allFilter') || App.get('starredFilter')) {\n url = url + '&read_filter=all';\n }\n\n console.log('fetching from ', url);\n var t = this;\n $.getJSON(url, function(data) {\n var items = [];\n $.each(data, function(i,v) {\n var item = new Item(v);\n t.add(item);\n items.push(item);\n if(t.models.length==1){\n App.set('selectedIndex', 0);\n }\n });\n // console.log(\"items \", items)\n if(items.length == 0) {\n // console.log(\"no more items\");\n App.noMore = true;\n // App.loading = true;\n }\n else {\n App.loading = false;\n }\n // we wait and add them all at once for performance on mobile\n App.itemListView.addAll(items);\n\n });\n },\n\n reboot: function() {\n App.noMore = false;\n App.loading = false;\n this.reset();\n this.boot();\n },\n\n\n});\nApp.items = new ItemCollection();\n\n\nvar ItemView = Backbone.View.extend({\n tagName: \"div\",\n className: \"item\",\n template: templates.item_template,\n events: {\n \"click .star\": \"star\",\n \"click .unstar\": \"unstar\",\n \"click .full\": \"full\",\n },\n\n initialize: function() {\n _.bindAll(this, 'render', 'star');\n this.model.bind('change', this.render);\n },\n\n star: function() {\n this.model.star();\n this.render();\n },\n\n unstar: function() {\n this.model.unstar();\n this.render();\n },\n\n full: function() {\n this.model.full();\n this.render();\n },\n\n render: function() {\n var h = $.tmpl(templates.item_template, { 'item': this.model.toJSON() });\n $(this.el).html(h);\n return this;\n },\n});\n\nvar ItemListView = Backbone.View.extend( {\n initialize: function() {\n _.bindAll(this, 'addOne', 'addAll', 'change', 'render', 'reset');\n // App.items.bind('add', this.addOne);\n App.items.bind('reset', this.reset);\n },\n addOne: function(item) {\n var view = new ItemView({'model': item});\n this.$el.append(view.render().el);\n },\n addAll: function(items) {\n // Posts.each(this.addOne);\n for(i in items) {\n item = items[i];\n var view = new ItemView({'model': item});\n this.$el.append(view.render().el);\n };\n },\n change: function() {\n },\n render: function() {\n },\n reset: function() {\n this.$el.children().remove();\n }\n});\n\nvar Tag = Backbone.Model.extend({\n});\n\nvar TagCollection = Backbone.Collection.extend({\n model: Tag,\n initialize: function() {\n _.bindAll(this, 'boot');\n },\n\n boot: function() {\n var t = this;\n $.getJSON('/tag/', function(data) {\n $.each(data, function(i,v) {\n var tag = new Tag(v);\n t.add(tag);\n });\n });\n }\n});\nApp.tags = new TagCollection();\n\n\nvar TagView = Backbone.View.extend({\n tagName: \"li\",\t\n className: \"tag\",\n events: {\n \"click\": \"filterTo\",\n },\n initialize: function() {\n _.bindAll(this, 'render', 'filterTo');\n this.model.bind('change', this.render);\n },\n render: function() {\n var h = $.tmpl(templates.tag_template, { 'tag': this.model.toJSON() });\n $(this.el).html(h);\n return this;\n },\n filterTo: function() {\n App.filterToTag(this.model);\n }\n});\n\n\nvar TagListView = Backbone.View.extend( {\n\n initialize: function() {\n _.bindAll(this, 'addOne', 'addAll', 'change', 'render');\n App.tags.bind('add', this.addOne);\n App.tags.bind('refresh', this.addAll);\n App.tags.bind('change', this.render);\n },\n addOne: function(tag) {\n var view = new TagView({'model': tag});\n this.$el.append(view.render().el);\n },\n addAll: function() {\n App.tags.each(this.addOne);\n },\n change: function() {\n },\n render: function() {\n },\n});\n\nApp.tag = undefined;\nApp.page = 0;\nApp.read_filter = 'unread';\n\n\nvar Feed = Backbone.Model.extend({\n idAttribute: \"_id\",\n});\n\nvar FeedCollection = Backbone.Collection.extend({\n model: Feed,\n url: '/feed/',\n\n initialize: function() {\n /// _.bindAll(this, 'boot');\n //console.log('initialized');\n },\n});\nApp.feeds = new FeedCollection();\n\nvar FeedView = Backbone.View.extend({\n tagName: \"li\",\n className: \"feed\",\n events: {\n \"click .txt\": \"filterTo\",\n \"click .delete\": \"del\",\n \"click .edit\": \"edit\",\n },\n initialize: function() {\n _.bindAll(this, 'render', 'filterTo', \"del\");\n this.model.bind('change', this.render);\n },\n render: function() {\n var h = $.tmpl(templates.feed_template, { 'feed': this.model.toJSON() });\n $(this.el).html(h);\n return this;\n },\n filterTo: function() {\n // console.log('filtering to feed ', this.model);\n App.filterToFeed(this.model);\n },\n del: function() {\n if( window.confirm(\"Unsubscribe from \" + this.model.get(\"url\") + \"?\" ) ) {\n this.model.destroy();\n this.$el.remove();\n }\n },\n edit: function() {\n var cat = window.prompt(\"Category for this feed?\", this.model.get(\"category\"));\n if (cat != null) {\n this.model.set(\"category\", cat);\n this.model.save();\n }\n },\n});\n\n\nvar FeedListView = Backbone.View.extend( {\n initialize: function() {\n _.bindAll(this, 'addOne', 'addAll', 'change', 'render');\n App.feeds.bind('add', this.addOne);\n App.feeds.bind('refresh', this.addAll);\n App.feeds.bind('change', this.render);\n },\n addOne: function(feed) {\n // console.log('adding a feed...', feed);\n var view = new FeedView({'model': feed});\n this.$el.append(view.render().el);\n },\n addAll: function() {\n // console.log('feed add all...');\n App.feeds.each(this.addOne);\n },\n change: function() {\n // console.log('feeds changed add all...');\n },\n render: function() {\n },\n});\n\n\n// var page = 0;\n// var read_filter = 'unread';\n\nvar selected_item = 0;\n\nfunction boot() {\n templates['item_template'] = $('#item_template').html();\n templates['tag_template'] = $('#tag_template').html();\n templates['feed_template'] = $('#feed_template').html();\n templates['controls_template'] = $('#controls_template').html();\n\n App.itemListView = new ItemListView();\n App.itemListView.setElement($('#items'));\n App.tagListView = new TagListView();\n App.tagListView.setElement($('#tags'));\n App.feedListView = new FeedListView();\n App.feedListView.setElement($('#feeds'));\n App.controlsView = new ControlsView({model: App});\n App.controlsView.setElement($('#controls'));\n App.controlsView.render();\n\n infini_scroll();\n\n $('#unread_filter').on('click', function() {\n App.read_filter = 'unread';\n App.items.reboot();\n });\n\n $('#all_filter').on('click', function() {\n App.read_filter = 'all';\n App.items.reboot();\n });\n\n// $('.logo').on('click', function() {\n // App.set('feedFilter', undefined);\n // App.items.reboot();\n\n// });\n\n // keyboard shortcuts\n $('body').keydown(function(event) {\n if(document.activeElement.id == \"search\") {\n return;\n }\n if (event.which == 74) {\n event.preventDefault();\n App.next();\n }\n if (event.which == 75) {\n event.preventDefault();\n App.previous();\n }\n if (event.which == 83) {\n event.preventDefault();\n App.star();\n }\n });\n\n App.boot();\n}\n\n\n// // this is legacy code\n\nfunction infini_scroll() {\n if(App.loading) {\n }\n else {\n var dh = $('#items').height() - $(window).height();\n var st = $(window).scrollTop();\n if ( (dh-st) < 100 ){\n App.items.boot();\n }\n }\n window.setTimeout(infini_scroll, 1000);\n}\n\nvar ItemSelector = {\n selected_index: 0,\n}\n"), } filee := &embedded.EmbeddedFile{ - Filename: "underscore-1.8.3.min.js", - FileModTime: time.Unix(1528678750, 0), - Content: string("// Underscore.js 1.8.3\n// http://underscorejs.org\n// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\n(function(){function n(n){function t(t,r,e,u,i,o){for(;i>=0&&o>i;i+=n){var a=u?u[i]:i;e=r(e,t[a],a,t)}return e}return function(r,e,u,i){e=b(e,i,4);var o=!k(r)&&m.keys(r),a=(o||r).length,c=n>0?0:a-1;return arguments.length<3&&(u=r[o?o[c]:c],c+=n),t(r,e,u,o,c,a)}}function t(n){return function(t,r,e){r=x(r,e);for(var u=O(t),i=n>0?0:u-1;i>=0&&u>i;i+=n)if(r(t[i],i,t))return i;return-1}}function r(n,t,r){return function(e,u,i){var o=0,a=O(e);if(\"number\"==typeof i)n>0?o=i>=0?i:Math.max(i+a,o):a=i>=0?Math.min(i+1,a):i+a+1;else if(r&&i&&a)return i=r(e,u),e[i]===u?i:-1;if(u!==u)return i=t(l.call(e,o,a),m.isNaN),i>=0?i+o:-1;for(i=n>0?o:a-1;i>=0&&a>i;i+=n)if(e[i]===u)return i;return-1}}function e(n,t){var r=I.length,e=n.constructor,u=m.isFunction(e)&&e.prototype||a,i=\"constructor\";for(m.has(n,i)&&!m.contains(t,i)&&t.push(i);r--;)i=I[r],i in n&&n[i]!==u[i]&&!m.contains(t,i)&&t.push(i)}var u=this,i=u._,o=Array.prototype,a=Object.prototype,c=Function.prototype,f=o.push,l=o.slice,s=a.toString,p=a.hasOwnProperty,h=Array.isArray,v=Object.keys,g=c.bind,y=Object.create,d=function(){},m=function(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)};\"undefined\"!=typeof exports?(\"undefined\"!=typeof module&&module.exports&&(exports=module.exports=m),exports._=m):u._=m,m.VERSION=\"1.8.3\";var b=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}},x=function(n,t,r){return null==n?m.identity:m.isFunction(n)?b(n,t,r):m.isObject(n)?m.matcher(n):m.property(n)};m.iteratee=function(n,t){return x(n,t,1/0)};var _=function(n,t){return function(r){var e=arguments.length;if(2>e||null==r)return r;for(var u=1;e>u;u++)for(var i=arguments[u],o=n(i),a=o.length,c=0;a>c;c++){var f=o[c];t&&r[f]!==void 0||(r[f]=i[f])}return r}},j=function(n){if(!m.isObject(n))return{};if(y)return y(n);d.prototype=n;var t=new d;return d.prototype=null,t},w=function(n){return function(t){return null==t?void 0:t[n]}},A=Math.pow(2,53)-1,O=w(\"length\"),k=function(n){var t=O(n);return\"number\"==typeof t&&t>=0&&A>=t};m.each=m.forEach=function(n,t,r){t=b(t,r);var e,u;if(k(n))for(e=0,u=n.length;u>e;e++)t(n[e],e,n);else{var i=m.keys(n);for(e=0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},m.map=m.collect=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=Array(u),o=0;u>o;o++){var a=e?e[o]:o;i[o]=t(n[a],a,n)}return i},m.reduce=m.foldl=m.inject=n(1),m.reduceRight=m.foldr=n(-1),m.find=m.detect=function(n,t,r){var e;return e=k(n)?m.findIndex(n,t,r):m.findKey(n,t,r),e!==void 0&&e!==-1?n[e]:void 0},m.filter=m.select=function(n,t,r){var e=[];return t=x(t,r),m.each(n,function(n,r,u){t(n,r,u)&&e.push(n)}),e},m.reject=function(n,t,r){return m.filter(n,m.negate(x(t)),r)},m.every=m.all=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(!t(n[o],o,n))return!1}return!0},m.some=m.any=function(n,t,r){t=x(t,r);for(var e=!k(n)&&m.keys(n),u=(e||n).length,i=0;u>i;i++){var o=e?e[i]:i;if(t(n[o],o,n))return!0}return!1},m.contains=m.includes=m.include=function(n,t,r,e){return k(n)||(n=m.values(n)),(\"number\"!=typeof r||e)&&(r=0),m.indexOf(n,t,r)>=0},m.invoke=function(n,t){var r=l.call(arguments,2),e=m.isFunction(t);return m.map(n,function(n){var u=e?t:n[t];return null==u?u:u.apply(n,r)})},m.pluck=function(n,t){return m.map(n,m.property(t))},m.where=function(n,t){return m.filter(n,m.matcher(t))},m.findWhere=function(n,t){return m.find(n,m.matcher(t))},m.max=function(n,t,r){var e,u,i=-1/0,o=-1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],e>i&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(u>o||u===-1/0&&i===-1/0)&&(i=n,o=u)});return i},m.min=function(n,t,r){var e,u,i=1/0,o=1/0;if(null==t&&null!=n){n=k(n)?n:m.values(n);for(var a=0,c=n.length;c>a;a++)e=n[a],i>e&&(i=e)}else t=x(t,r),m.each(n,function(n,r,e){u=t(n,r,e),(o>u||1/0===u&&1/0===i)&&(i=n,o=u)});return i},m.shuffle=function(n){for(var t,r=k(n)?n:m.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=m.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},m.sample=function(n,t,r){return null==t||r?(k(n)||(n=m.values(n)),n[m.random(n.length-1)]):m.shuffle(n).slice(0,Math.max(0,t))},m.sortBy=function(n,t,r){return t=x(t,r),m.pluck(m.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),\"value\")};var F=function(n){return function(t,r,e){var u={};return r=x(r,e),m.each(t,function(e,i){var o=r(e,i,t);n(u,e,o)}),u}};m.groupBy=F(function(n,t,r){m.has(n,r)?n[r].push(t):n[r]=[t]}),m.indexBy=F(function(n,t,r){n[r]=t}),m.countBy=F(function(n,t,r){m.has(n,r)?n[r]++:n[r]=1}),m.toArray=function(n){return n?m.isArray(n)?l.call(n):k(n)?m.map(n,m.identity):m.values(n):[]},m.size=function(n){return null==n?0:k(n)?n.length:m.keys(n).length},m.partition=function(n,t,r){t=x(t,r);var e=[],u=[];return m.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},m.first=m.head=m.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:m.initial(n,n.length-t)},m.initial=function(n,t,r){return l.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},m.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:m.rest(n,Math.max(0,n.length-t))},m.rest=m.tail=m.drop=function(n,t,r){return l.call(n,null==t||r?1:t)},m.compact=function(n){return m.filter(n,m.identity)};var S=function(n,t,r,e){for(var u=[],i=0,o=e||0,a=O(n);a>o;o++){var c=n[o];if(k(c)&&(m.isArray(c)||m.isArguments(c))){t||(c=S(c,t,r));var f=0,l=c.length;for(u.length+=l;l>f;)u[i++]=c[f++]}else r||(u[i++]=c)}return u};m.flatten=function(n,t){return S(n,t,!1)},m.without=function(n){return m.difference(n,l.call(arguments,1))},m.uniq=m.unique=function(n,t,r,e){m.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=x(r,e));for(var u=[],i=[],o=0,a=O(n);a>o;o++){var c=n[o],f=r?r(c,o,n):c;t?(o&&i===f||u.push(c),i=f):r?m.contains(i,f)||(i.push(f),u.push(c)):m.contains(u,c)||u.push(c)}return u},m.union=function(){return m.uniq(S(arguments,!0,!0))},m.intersection=function(n){for(var t=[],r=arguments.length,e=0,u=O(n);u>e;e++){var i=n[e];if(!m.contains(t,i)){for(var o=1;r>o&&m.contains(arguments[o],i);o++);o===r&&t.push(i)}}return t},m.difference=function(n){var t=S(arguments,!0,!0,1);return m.filter(n,function(n){return!m.contains(t,n)})},m.zip=function(){return m.unzip(arguments)},m.unzip=function(n){for(var t=n&&m.max(n,O).length||0,r=Array(t),e=0;t>e;e++)r[e]=m.pluck(n,e);return r},m.object=function(n,t){for(var r={},e=0,u=O(n);u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},m.findIndex=t(1),m.findLastIndex=t(-1),m.sortedIndex=function(n,t,r,e){r=x(r,e,1);for(var u=r(t),i=0,o=O(n);o>i;){var a=Math.floor((i+o)/2);r(n[a])i;i++,n+=r)u[i]=n;return u};var E=function(n,t,r,e,u){if(!(e instanceof t))return n.apply(r,u);var i=j(n.prototype),o=n.apply(i,u);return m.isObject(o)?o:i};m.bind=function(n,t){if(g&&n.bind===g)return g.apply(n,l.call(arguments,1));if(!m.isFunction(n))throw new TypeError(\"Bind must be called on a function\");var r=l.call(arguments,2),e=function(){return E(n,e,t,this,r.concat(l.call(arguments)))};return e},m.partial=function(n){var t=l.call(arguments,1),r=function(){for(var e=0,u=t.length,i=Array(u),o=0;u>o;o++)i[o]=t[o]===m?arguments[e++]:t[o];for(;e=e)throw new Error(\"bindAll must be passed function names\");for(t=1;e>t;t++)r=arguments[t],n[r]=m.bind(n[r],n);return n},m.memoize=function(n,t){var r=function(e){var u=r.cache,i=\"\"+(t?t.apply(this,arguments):e);return m.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},m.delay=function(n,t){var r=l.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},m.defer=m.partial(m.delay,m,1),m.throttle=function(n,t,r){var e,u,i,o=null,a=0;r||(r={});var c=function(){a=r.leading===!1?0:m.now(),o=null,i=n.apply(e,u),o||(e=u=null)};return function(){var f=m.now();a||r.leading!==!1||(a=f);var l=t-(f-a);return e=this,u=arguments,0>=l||l>t?(o&&(clearTimeout(o),o=null),a=f,i=n.apply(e,u),o||(e=u=null)):o||r.trailing===!1||(o=setTimeout(c,l)),i}},m.debounce=function(n,t,r){var e,u,i,o,a,c=function(){var f=m.now()-o;t>f&&f>=0?e=setTimeout(c,t-f):(e=null,r||(a=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,o=m.now();var f=r&&!e;return e||(e=setTimeout(c,t)),f&&(a=n.apply(i,u),i=u=null),a}},m.wrap=function(n,t){return m.partial(t,n)},m.negate=function(n){return function(){return!n.apply(this,arguments)}},m.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},m.after=function(n,t){return function(){return--n<1?t.apply(this,arguments):void 0}},m.before=function(n,t){var r;return function(){return--n>0&&(r=t.apply(this,arguments)),1>=n&&(t=null),r}},m.once=m.partial(m.before,2);var M=!{toString:null}.propertyIsEnumerable(\"toString\"),I=[\"valueOf\",\"isPrototypeOf\",\"toString\",\"propertyIsEnumerable\",\"hasOwnProperty\",\"toLocaleString\"];m.keys=function(n){if(!m.isObject(n))return[];if(v)return v(n);var t=[];for(var r in n)m.has(n,r)&&t.push(r);return M&&e(n,t),t},m.allKeys=function(n){if(!m.isObject(n))return[];var t=[];for(var r in n)t.push(r);return M&&e(n,t),t},m.values=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},m.mapObject=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=u.length,o={},a=0;i>a;a++)e=u[a],o[e]=t(n[e],e,n);return o},m.pairs=function(n){for(var t=m.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},m.invert=function(n){for(var t={},r=m.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},m.functions=m.methods=function(n){var t=[];for(var r in n)m.isFunction(n[r])&&t.push(r);return t.sort()},m.extend=_(m.allKeys),m.extendOwn=m.assign=_(m.keys),m.findKey=function(n,t,r){t=x(t,r);for(var e,u=m.keys(n),i=0,o=u.length;o>i;i++)if(e=u[i],t(n[e],e,n))return e},m.pick=function(n,t,r){var e,u,i={},o=n;if(null==o)return i;m.isFunction(t)?(u=m.allKeys(o),e=b(t,r)):(u=S(arguments,!1,!1,1),e=function(n,t,r){return t in r},o=Object(o));for(var a=0,c=u.length;c>a;a++){var f=u[a],l=o[f];e(l,f,o)&&(i[f]=l)}return i},m.omit=function(n,t,r){if(m.isFunction(t))t=m.negate(t);else{var e=m.map(S(arguments,!1,!1,1),String);t=function(n,t){return!m.contains(e,t)}}return m.pick(n,t,r)},m.defaults=_(m.allKeys,!0),m.create=function(n,t){var r=j(n);return t&&m.extendOwn(r,t),r},m.clone=function(n){return m.isObject(n)?m.isArray(n)?n.slice():m.extend({},n):n},m.tap=function(n,t){return t(n),n},m.isMatch=function(n,t){var r=m.keys(t),e=r.length;if(null==n)return!e;for(var u=Object(n),i=0;e>i;i++){var o=r[i];if(t[o]!==u[o]||!(o in u))return!1}return!0};var N=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof m&&(n=n._wrapped),t instanceof m&&(t=t._wrapped);var u=s.call(n);if(u!==s.call(t))return!1;switch(u){case\"[object RegExp]\":case\"[object String]\":return\"\"+n==\"\"+t;case\"[object Number]\":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case\"[object Date]\":case\"[object Boolean]\":return+n===+t}var i=\"[object Array]\"===u;if(!i){if(\"object\"!=typeof n||\"object\"!=typeof t)return!1;var o=n.constructor,a=t.constructor;if(o!==a&&!(m.isFunction(o)&&o instanceof o&&m.isFunction(a)&&a instanceof a)&&\"constructor\"in n&&\"constructor\"in t)return!1}r=r||[],e=e||[];for(var c=r.length;c--;)if(r[c]===n)return e[c]===t;if(r.push(n),e.push(t),i){if(c=n.length,c!==t.length)return!1;for(;c--;)if(!N(n[c],t[c],r,e))return!1}else{var f,l=m.keys(n);if(c=l.length,m.keys(t).length!==c)return!1;for(;c--;)if(f=l[c],!m.has(t,f)||!N(n[f],t[f],r,e))return!1}return r.pop(),e.pop(),!0};m.isEqual=function(n,t){return N(n,t)},m.isEmpty=function(n){return null==n?!0:k(n)&&(m.isArray(n)||m.isString(n)||m.isArguments(n))?0===n.length:0===m.keys(n).length},m.isElement=function(n){return!(!n||1!==n.nodeType)},m.isArray=h||function(n){return\"[object Array]\"===s.call(n)},m.isObject=function(n){var t=typeof n;return\"function\"===t||\"object\"===t&&!!n},m.each([\"Arguments\",\"Function\",\"String\",\"Number\",\"Date\",\"RegExp\",\"Error\"],function(n){m[\"is\"+n]=function(t){return s.call(t)===\"[object \"+n+\"]\"}}),m.isArguments(arguments)||(m.isArguments=function(n){return m.has(n,\"callee\")}),\"function\"!=typeof/./&&\"object\"!=typeof Int8Array&&(m.isFunction=function(n){return\"function\"==typeof n||!1}),m.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},m.isNaN=function(n){return m.isNumber(n)&&n!==+n},m.isBoolean=function(n){return n===!0||n===!1||\"[object Boolean]\"===s.call(n)},m.isNull=function(n){return null===n},m.isUndefined=function(n){return n===void 0},m.has=function(n,t){return null!=n&&p.call(n,t)},m.noConflict=function(){return u._=i,this},m.identity=function(n){return n},m.constant=function(n){return function(){return n}},m.noop=function(){},m.property=w,m.propertyOf=function(n){return null==n?function(){}:function(t){return n[t]}},m.matcher=m.matches=function(n){return n=m.extendOwn({},n),function(t){return m.isMatch(t,n)}},m.times=function(n,t,r){var e=Array(Math.max(0,n));t=b(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},m.random=function(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},m.now=Date.now||function(){return(new Date).getTime()};var B={\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\",\"`\":\"`\"},T=m.invert(B),R=function(n){var t=function(t){return n[t]},r=\"(?:\"+m.keys(n).join(\"|\")+\")\",e=RegExp(r),u=RegExp(r,\"g\");return function(n){return n=null==n?\"\":\"\"+n,e.test(n)?n.replace(u,t):n}};m.escape=R(B),m.unescape=R(T),m.result=function(n,t,r){var e=null==n?void 0:n[t];return e===void 0&&(e=r),m.isFunction(e)?e.call(n):e};var q=0;m.uniqueId=function(n){var t=++q+\"\";return n?n+t:t},m.templateSettings={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g};var K=/(.)^/,z={\"'\":\"'\",\"\\\\\":\"\\\\\",\"\\r\":\"r\",\"\\n\":\"n\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},D=/\\\\|'|\\r|\\n|\\u2028|\\u2029/g,L=function(n){return\"\\\\\"+z[n]};m.template=function(n,t,r){!t&&r&&(t=r),t=m.defaults({},t,m.templateSettings);var e=RegExp([(t.escape||K).source,(t.interpolate||K).source,(t.evaluate||K).source].join(\"|\")+\"|$\",\"g\"),u=0,i=\"__p+='\";n.replace(e,function(t,r,e,o,a){return i+=n.slice(u,a).replace(D,L),u=a+t.length,r?i+=\"'+\\n((__t=(\"+r+\"))==null?'':_.escape(__t))+\\n'\":e?i+=\"'+\\n((__t=(\"+e+\"))==null?'':__t)+\\n'\":o&&(i+=\"';\\n\"+o+\"\\n__p+='\"),t}),i+=\"';\\n\",t.variable||(i=\"with(obj||{}){\\n\"+i+\"}\\n\"),i=\"var __t,__p='',__j=Array.prototype.join,\"+\"print=function(){__p+=__j.call(arguments,'');};\\n\"+i+\"return __p;\\n\";try{var o=new Function(t.variable||\"obj\",\"_\",i)}catch(a){throw a.source=i,a}var c=function(n){return o.call(this,n,m)},f=t.variable||\"obj\";return c.source=\"function(\"+f+\"){\\n\"+i+\"}\",c},m.chain=function(n){var t=m(n);return t._chain=!0,t};var P=function(n,t){return n._chain?m(t).chain():t};m.mixin=function(n){m.each(m.functions(n),function(t){var r=m[t]=n[t];m.prototype[t]=function(){var n=[this._wrapped];return f.apply(n,arguments),P(this,r.apply(m,n))}})},m.mixin(m),m.each([\"pop\",\"push\",\"reverse\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(n){var t=o[n];m.prototype[n]=function(){var r=this._wrapped;return t.apply(r,arguments),\"shift\"!==n&&\"splice\"!==n||0!==r.length||delete r[0],P(this,r)}}),m.each([\"concat\",\"join\",\"slice\"],function(n){var t=o[n];m.prototype[n]=function(){return P(this,t.apply(this._wrapped,arguments))}}),m.prototype.value=function(){return this._wrapped},m.prototype.valueOf=m.prototype.toJSON=m.prototype.value,m.prototype.toString=function(){return\"\"+this._wrapped},\"function\"==typeof define&&define.amd&&define(\"underscore\",[],function(){return m})}).call(this);\n//# sourceMappingURL=underscore-min.map"), + Filename: "underscore-1.13.1.min.js", + FileModTime: time.Unix(1632891424, 0), + Content: string("!function(n,r){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=r():\"function\"==typeof define&&define.amd?define(\"underscore\",r):(n=\"undefined\"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){\n// Underscore.js 1.13.1\n// https://underscorejs.org\n// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors\n// Underscore may be freely distributed under the MIT license.\nvar n=\"1.13.1\",r=\"object\"==typeof self&&self.self===self&&self||\"object\"==typeof global&&global.global===global&&global||Function(\"return this\")()||{},t=Array.prototype,e=Object.prototype,u=\"undefined\"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c=\"undefined\"!=typeof ArrayBuffer,l=\"undefined\"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable(\"toString\"),b=[\"valueOf\",\"isPrototypeOf\",\"toString\",\"propertyIsEnumerable\",\"hasOwnProperty\",\"toLocaleString\"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J(\"byteLength\"),H=K(G),Q=/\\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J(\"length\");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e\":\">\",'\"':\""\",\"'\":\"'\",\"`\":\"`\"},Cn=Ln($n),Kn=Ln(_n($n)),Jn=tn.templateSettings={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g},Gn=/(.)^/,Hn={\"'\":\"'\",\"\\\\\":\"\\\\\",\"\\r\":\"r\",\"\\n\":\"n\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},Qn=/\\\\|'|\\r|\\n|\\u2028|\\u2029/g;function Xn(n){return\"\\\\\"+Hn[n]}var Yn=/^\\s*(\\w|\\$)+\\s*$/;var Zn=0;function nr(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var rr=j((function(n,r){var t=rr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a1)ur(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var lr=rr(cr,2);function sr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o0?0:u-1;o>=0&&o0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),$))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a=3;return r(n,Fn(t,u,4),e,o)}}var Ar=wr(1),xr=wr(-1);function Sr(n,r,t){var e=[];return r=qn(r,t),jr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Or(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o=0}var Br=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),_r(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Nr(n,r){return _r(n,Rn(r))}function Ir(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||\"number\"==typeof r&&\"object\"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;ao&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Tr(n,r,t){if(null==r||t)return er(n)||(n=jn(n)),n[Wn(n.length-1)];var e=er(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i1&&(e=Fn(e,r[1])),r=an(n)):(e=qr,r=ur(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u1&&(t=r[1])):(r=_r(ur(r,!1,!1),String),e=function(n,t){return!Er(r,t)}),Ur(n,e,t)}));function zr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Lr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:zr(n,n.length-r)}function $r(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=ur(r,!0,!0),Sr(n,(function(n){return!Er(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);ir?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o,i,a,f=function(){var c=zn()-u;r>c?e=setTimeout(f,r-c):(e=null,t||(i=n.apply(a,o)),e||(o=a=null))},c=j((function(c){return a=this,o=c,u=zn(),e||(e=setTimeout(f,r),t&&(i=n.apply(a,o))),i}));return c.cancel=function(){clearTimeout(e),e=o=a=null},c},wrap:function(n,r){return rr(r,n)},negate:fr,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:cr,once:lr,findKey:sr,findIndex:vr,findLastIndex:hr,sortedIndex:yr,indexOf:gr,lastIndexOf:br,find:mr,detect:mr,findWhere:function(n,r){return mr(n,Dn(r))},each:jr,forEach:jr,map:_r,collect:_r,reduce:Ar,foldl:Ar,inject:Ar,reduceRight:xr,foldr:xr,filter:Sr,select:Sr,reject:function(n,r,t){return Sr(n,fr(qn(r)),t)},every:Or,all:Or,some:Mr,any:Mr,contains:Er,includes:Er,include:Er,invoke:Br,pluck:Nr,where:function(n,r){return Sr(n,Dn(r))},max:Ir,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||\"number\"==typeof r&&\"object\"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;ae||void 0===t)return 1;if(t