diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 758a0f84..c6c24718 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,14 +29,85 @@ Lastly, please **consider helping out** by opening a Pull Request! You can triage issues which may include reproducing bug reports or asking for vital information, such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to gollum on CodeTriage](https://www.codetriage.com/gollum/gollum). +## Set up your development environment + +If you want to hack on Gollum, you'll need to set up a development +environment. + +To get started, you'll need: + + - A recent version of [Git][git] + - A recent version of [Ruby][rubylang]. + - A recent version of [Node JS][nodejs]. + +Refer to their installation instructions. Installation methods differ depending +on your operating system. + +Once you have those: + + - Install Bundler, the Ruby package manager. In a terminal: + ```sh + gem install bundler + ``` + - Install Yarn, a JavaScript package manager. [See Yarn's install + guide][yarn-install]. + +Now, you can start setting up Gollum to run locally: + + 1. Clone the git repository. In a terminal: + + ```sh + git clone https://github.com/gollum/gollum.git + ``` + 2. Change directory into the cloned project: + ```sh + cd gollum + ``` + 3. Bundle the project's Ruby dependencies using Bundler: + ```sh + [sudo] bundle install + ``` + 4. Install the project's JavaScript dependencies using Yarn: + ```sh + yarn install + ``` +If all went well, you should now be able to run the test suite using the +following command: + +```sh +bundle exec rake +``` + +If you already have a Gollum wiki, you can also browse it via your local version +of Gollum: + +```sh +bundle exec gollum +``` + +Or you can clone an example wiki and browse that: + +```sh +git clone test/examples/lotr.git ~/lotr-wiki +bundle exec gollum ~/lotr-wiki +``` + +With this, you're ready to start contributing and open your first [pull +request](#opening-a-pull-request). + +[git]: https://git-scm.com/downloads +[nodejs]: https://nodejs.org +[rubylang]: https://www.ruby-lang.org +[yarn-install]: https://yarnpkg.com/getting-started/install ## Opening a Pull Request Pull Requests fixing bugs, implementing new features, or updating documentation and dependencies are all very welcome! If you would like to help out with the project, you can pick an open issue from the issue tracker. We're more than happy to help you get started! Here's how you can proceed: -1. Fork and clone Gollum. +1. Fork and clone Gollum. See [Set up your development + environment](#set-up-your-development-environment). 2. Create a thoughtfully named topic branch to contain your changes. -3. If you haven't installed dependencies yet, navigate to your clone and execute: +3. If you haven't installed dependencies yet, navigate to your clone and execute: ``` [sudo] bundle install ``` @@ -47,23 +118,32 @@ Pull Requests fixing bugs, implementing new features, or updating documentation 8. Push the branch to your fork on GitHub. 9. Create a pull request for Gollum. -**Notes:** -* Do not change Gollum's version numbers, we will do that on our own. +Do not change Gollum's version number, we will do that on our own. ### Running tests 1. Install [Bundler](http://bundler.io/). 2. Navigate to the cloned source of Gollum. -3. Install dependencies: +3. Install dependencies: ``` [sudo] bundle install ``` -4. Run the tests: +4. Run the tests: ``` bundle exec rake test ``` - -To profile slow tests, you can use `bundle exec rake test TESTOPTS="--verbose"`. + +To profile slow tests, you can use the `--verbose` flag: + +```sh +bundle exec rake test TESTOPTS="--verbose" +``` + +You can also run a single test file with the following command: + +```sh +bundle exec ruby +``` ### Working with test repositories @@ -82,7 +162,12 @@ git push ../lotr.git/ master ## Updating static assets -This is necessary whenever changes have been made to the assets in `lib/gollum/public/gollum/javascript` (mostly SASS, CSS, and JS files), to ensure the changes are also present in the [released](#releasing-the-gem) version of the gem. Steps: +This is necessary whenever changes have been made to the assets in +`lib/gollum/public/gollum/javascript` (mostly SASS, CSS, and JS files), to +ensure the changes are also present in the [released](#releasing-the-gem) +version of the gem. + +Steps: 1. `git rm -r lib/gollum/public/assets` 1. `bundle exec rake precompile` diff --git a/Rakefile b/Rakefile index 1e6f4822..affb4977 100644 --- a/Rakefile +++ b/Rakefile @@ -190,10 +190,10 @@ task :changelog do exit! end end - + latest_changes = File.open(latest_changes_file) version_pattern = "# #{version}" - + if !`grep "#{version_pattern}" #{history_file}`.empty? puts "#{version} is already described in #{history_file}" exit! @@ -208,13 +208,13 @@ task :changelog do puts "#{latest_changes_file} is empty!" exit! end - + body = latest_changes.read body.scan(/\s*#\s+\d\.\d.*/) do |match| puts "#{latest_changes_file} may not contain multiple markdown headers!" exit! end - + temp = Tempfile.new temp.puts("#{version_pattern} / #{date}\n#{body}\n") temp.close @@ -224,11 +224,29 @@ end desc 'Precompile assets' task :precompile do + # Attempt to install JavaScript dependencies managed by Yarn via the + # `package.json` file in Gollum's project root. If it fails, raise an error + # and exit the task early. + puts "\n Installing `yarn`-managed JavaScript dependencies... \n\n" + system "yarn install" + unless $?.success? + raise "This task tried to run `yarn install` to get up-to-date " \ + "JavaScript dependencies before precompilation. But it failed. Please " \ + "run `yarn install` manually from your shell and resolve any issues. " \ + "It's possible that you just need to install `yarn` on your system." + end + require './lib/gollum/app.rb' + + # Next, configure the Sprockets asset pipeline and precompile production- + # ready assets. Precious::App.set(:environment, :production) + env = Precious::Assets.sprockets - path = ENV.fetch('GOLLUM_ASSETS_PATH', ::File.join(File.dirname(__FILE__), 'lib/gollum/public/assets')) + path = ENV.fetch 'GOLLUM_ASSETS_PATH', + File.join(File.dirname(__FILE__), 'lib/gollum/public/assets') manifest = Sprockets::Manifest.new(env, path) + Sprockets::Helpers.configure do |config| config.environment = env config.prefix = Precious::Assets::ASSET_URL @@ -236,6 +254,7 @@ task :precompile do config.public_path = path config.manifest = manifest end - puts "Precompiling assets to #{path}..." + + puts "\n Precompiling assets to #{path}... \n\n" manifest.compile(Precious::Assets::MANIFEST) end diff --git a/lib/gollum/assets.rb b/lib/gollum/assets.rb index c53a2347..f6736b10 100644 --- a/lib/gollum/assets.rb +++ b/lib/gollum/assets.rb @@ -7,8 +7,12 @@ module Precious def self.sprockets(dir = File.dirname(File.expand_path(__FILE__))) env = Sprockets::Environment.new - env.append_path ::File.join(dir, 'public/gollum/stylesheets/') + + env.append_path ::File.join(dir, '../../node_modules') + env.append_path ::File.join(dir, 'public/gollum/javascript') + env.append_path ::File.join(dir, 'public/gollum/stylesheets/') + env.append_path ::File.join(dir, 'public/gollum/images') env.append_path ::File.join(dir, 'public/gollum/fonts') diff --git a/lib/gollum/public/assets/.sprockets-manifest-160337b312f8e438181baac4aaa37319.json b/lib/gollum/public/assets/.sprockets-manifest-160337b312f8e438181baac4aaa37319.json deleted file mode 100644 index 596e2121..00000000 --- a/lib/gollum/public/assets/.sprockets-manifest-160337b312f8e438181baac4aaa37319.json +++ /dev/null @@ -1 +0,0 @@ -{"files":{"app-f05401ee374f0c7f48fc2bc08e30b4f4db705861fd5895ed70998683b383bfb5.js":{"logical_path":"app.js","mtime":"2021-11-15T20:08:30-08:00","size":136040,"digest":"f05401ee374f0c7f48fc2bc08e30b4f4db705861fd5895ed70998683b383bfb5","integrity":"sha256-8FQB7jdPDH9I/CvAjjC09NtwWGH9WJXtcJmGg7ODv7U="},"editor-9881d0c7ae663293f0e3a7e72729eec7e940fa613185c076709b76d292f5703a.js":{"logical_path":"editor.js","mtime":"2021-11-15T20:08:30-08:00","size":744886,"digest":"9881d0c7ae663293f0e3a7e72729eec7e940fa613185c076709b76d292f5703a","integrity":"sha256-mIHQx65mMpPw46fnJynux+lA+mExhcB2cJt20pL1cDo="},"app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css":{"logical_path":"app.css","mtime":"2022-05-26T12:13:37+02:00","size":396731,"digest":"309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5","integrity":"sha256-MJvgMjlueDsTpH31jzibfI4RwrLUJkBWC4dPZ3wl9uU="},"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css":{"logical_path":"criticmarkup.css","mtime":"2020-03-29T22:28:51+02:00","size":646,"digest":"31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4","integrity":"sha256-Ma5dMoK7uOe3w8mRfp+2jjMVprSnXabOxI0huIRpBcQ="},"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css":{"logical_path":"print.css","mtime":"2020-03-30T11:12:22+02:00","size":75,"digest":"512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb","integrity":"sha256-USSYw2i+DT+xuhBd+oQomuSDgOyfy++Ui9TiOwsJW/s="},"app-eb6effc9f708916af14718a5c9d2a5028625664f62c2528e5989538537f3f4a8.js":{"logical_path":"app.js","mtime":"2022-05-26T13:00:46+02:00","size":188288,"digest":"eb6effc9f708916af14718a5c9d2a5028625664f62c2528e5989538537f3f4a8","integrity":"sha256-627/yfcIkWrxRxilydKlAoYlZk9iwlKOWYlThTfz9Kg="},"editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js":{"logical_path":"editor.js","mtime":"2022-05-26T13:00:46+02:00","size":745160,"digest":"ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a","integrity":"sha256-699TSgBj/jsFp+far3qkC3j6uYYxQrFh2I8yo/A1N4o="}},"assets":{"app.js":"app-eb6effc9f708916af14718a5c9d2a5028625664f62c2528e5989538537f3f4a8.js","editor.js":"editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js","app.css":"app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css","criticmarkup.css":"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css","print.css":"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css"}} \ No newline at end of file diff --git a/lib/gollum/public/assets/.sprockets-manifest-9ac24f50c124b745e80f4ecb2d86282b.json b/lib/gollum/public/assets/.sprockets-manifest-9ac24f50c124b745e80f4ecb2d86282b.json new file mode 100644 index 00000000..4599e6f4 --- /dev/null +++ b/lib/gollum/public/assets/.sprockets-manifest-9ac24f50c124b745e80f4ecb2d86282b.json @@ -0,0 +1 @@ +{"files":{"app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js":{"logical_path":"app.js","mtime":"2022-06-03T19:51:43-07:00","size":188397,"digest":"6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc","integrity":"sha256-a+9rGQFMZiDqtNr3vFgfnUP/93i9x4qp/lOqosknyMw="},"editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js":{"logical_path":"editor.js","mtime":"2022-06-03T19:51:43-07:00","size":745160,"digest":"ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a","integrity":"sha256-699TSgBj/jsFp+far3qkC3j6uYYxQrFh2I8yo/A1N4o="},"app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css":{"logical_path":"app.css","mtime":"2022-06-03T19:51:43-07:00","size":396731,"digest":"309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5","integrity":"sha256-MJvgMjlueDsTpH31jzibfI4RwrLUJkBWC4dPZ3wl9uU="},"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css":{"logical_path":"criticmarkup.css","mtime":"2021-02-24T23:16:14-08:00","size":646,"digest":"31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4","integrity":"sha256-Ma5dMoK7uOe3w8mRfp+2jjMVprSnXabOxI0huIRpBcQ="},"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css":{"logical_path":"print.css","mtime":"2021-02-24T23:16:14-08:00","size":75,"digest":"512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb","integrity":"sha256-USSYw2i+DT+xuhBd+oQomuSDgOyfy++Ui9TiOwsJW/s="}},"assets":{"app.js":"app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js","editor.js":"editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js","app.css":"app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css","criticmarkup.css":"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css","print.css":"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css"}} \ No newline at end of file diff --git a/lib/gollum/public/assets/app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css.gz b/lib/gollum/public/assets/app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css.gz index 57256572..a4a34086 100644 Binary files a/lib/gollum/public/assets/app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css.gz and b/lib/gollum/public/assets/app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css.gz differ diff --git a/lib/gollum/public/assets/app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js b/lib/gollum/public/assets/app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js new file mode 100644 index 00000000..d2450fca --- /dev/null +++ b/lib/gollum/public/assets/app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js @@ -0,0 +1,6 @@ +function brokenAvatarImage(e){return e.onerror="",e.src='data:image/svg+xml;utf8,',!0}function routePath(e){return path=gollumRoutes[e],prefixBaseUrl(path)}function prefixBaseUrl(e){if(baseUrl==undefined)console.log("Gollum error: baseUrl undefined");else{if(e!=undefined)return""==baseUrl?e:("/"==baseUrl.charAt(baseUrl.length-1)?result=baseUrl+e:result=baseUrl+"/"+e,result.replace(/\/{2}/g,"/"));console.log("Could not find route with name: "+name)}}function cleanPath(e){return("/"+e.replace(/\/$/,"")).replace(/\/{2}/g,"/")}function pageName(){return"undefined"==typeof pageFullPath?undefined:(name=pageFullPath.split("/").pop(),name.substring(0,name.lastIndexOf(".")))}function pagePath(){return"undefined"==typeof pageFullPath?undefined:pageFullPath.split("/").slice(0,-1).join("/")}function htmlEscape(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function abspath(e,t){"/"!=t[0]&&(t="/"+t,e&&(t="/"+e+t));var n=t.split("/");return[n.slice(0,-1).join("/"),n.pop()]}function setTextDirection(){$(".markdown-body p, .markdown-body span, .markdown-body pre, .markdown-body table").attr("dir","auto")}function preparePage(){setTextDirection(),"true"==criticMarkup&&($("#wiki-content").addClass("criticmarkup"),$("ins.break").unwrap(),$("span.critic.comment").wrap(''),$("span.critic.comment").filter(function(){return""!=$(this).text()}).before("‡"))}function getLocalTime(e,t){return t===undefined&&(t="Y-m-d %H:%M:%S O"),new Date(e).format(t)}function flashNotice(e,t,n,r,i){nested_button_html="",void 0!==n&&void 0!==r&&(i=void 0!==i&&"danger"==i?" btn-danger":"",nested_button_html='"),html='

'+t+nested_button_html+"

",$("#gollum-flash").remove(),$("#wiki-content").before(html),"success"==e&&setTimeout(function(){$("#gollum-flash").fadeOut()},5e3)}!function(e,n,t){function r(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function y(e){if("keypress"!=e.type)return u[e.which]?u[e.which]:a[e.which]?a[e.which]:String.fromCharCode(e.which).toLowerCase();var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}function i(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}function v(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function b(e,t){var n,r=[],i=e;for("+"===i?i=["+"]:i=(i=i.replace(/\+{2}/g,"+plus")).split("+"),n=0;n":".","?":"/","|":"\\"},c={option:"alt",command:"meta","return":"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"};for(t=1;t<20;++t)u[111+t]="f"+t;for(t=0;t<=9;++t)u[t+96]=t.toString();T.prototype.bind=function(e,t,n){return e=e instanceof Array?e:[e],this._bindMultiple.call(this,e,t,n),this},T.prototype.unbind=function(e,t){return this.bind.call(this,e,function(){},t)},T.prototype.trigger=function(e,t){return this._directMap[e+":"+t]&&this._directMap[e+":"+t]({},e),this},T.prototype.reset=function(){return this._callbacks={},this._directMap={},this},T.prototype.stopCallback=function(e,t){if(-1<(" "+t.className+" ").indexOf(" mousetrap ")||o(t,this.target))return!1;if("composedPath"in e&&"function"==typeof e.composedPath){var n=e.composedPath()[0];n!==e.target&&(t=n)}return"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},T.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)},T.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(u[t]=e[t]);s=null},T.init=function(){var e,t=T(n);for(e in t)"_"!==e.charAt(0)&&(T[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},T.init(),e.Mousetrap=T,"undefined"!=typeof module&&module.exports&&(module.exports=T),"function"==typeof define&&define.amd&&define(function(){return T})}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null),function(O,F){function c(e){return A.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}function g(e){if(!vt[e]){var t=L.body,n=A("<"+e+">").appendTo(t),r=n.css("display");n.remove(),"none"!==r&&""!==r||(pt||((pt=L.createElement("iframe")).frameBorder=pt.width=pt.height=0),t.appendChild(pt),mt&&pt.createElement||((mt=(pt.contentWindow||pt.contentDocument).document).write((A.support.boxModel?"":"")+""),mt.close()),n=mt.createElement(e),mt.body.appendChild(n),r=A.css(n,"display"),t.removeChild(pt)),vt[e]=r}return vt[e]}function s(e,t){var n={};return A.each(wt.concat.apply([],wt.slice(0,t)),function(){n[this]=e}),n}function e(){yt=F}function u(){return setTimeout(e,0),yt=A.now()}function t(){try{return new O.ActiveXObject("Microsoft.XMLHTTP")}catch(F){}}function n(){try{return new O.XMLHttpRequest}catch(F){}}function S(e,t){e.dataFilter&&(t=e.dataFilter(t,e.dataType));var n,r,i,o,a,s,u,l,c=e.dataTypes,d={},f=c.length,h=c[0];for(n=1;n)[^>]*$|#([\w\-]*)$)/,u=/\S/,l=/^\s+/,c=/\s+$/,d=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,h=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,m=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,g=/(?:^|:|,)(?:\s*\[)+/g,y=/(webkit)[ \/]([\w.]+)/,v=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,T=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/gi,x=/^-ms-/,D=function(e,t){return(t+"").toUpperCase()},S=H.userAgent,k=Object.prototype.toString,C=Object.prototype.hasOwnProperty,M=Array.prototype.push,_=Array.prototype.slice,N=String.prototype.trim,E=Array.prototype.indexOf,A={};return f.fn=f.prototype={constructor:f,init:function(e,t,n){var r,i,o,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("body"===e&&!t&&L.body)return this.context=L,this[0]=L.body,this.selector=e,this.length=1,this;if("string"!=typeof e)return f.isFunction(e)?n.ready(e):(e.selector!==F&&(this.selector=e.selector,this.context=e.context),f.makeArray(e,this));if(!(r="<"!==e.charAt(0)||">"!==e.charAt(e.length-1)||e.length<3?s.exec(e):[null,e,null])||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1])return a=(t=t instanceof f?t[0]:t)?t.ownerDocument||t:L,(o=d.exec(e))?f.isPlainObject(t)?(e=[L.createElement(o[1])],f.fn.attr.call(e,t,!0)):e=[a.createElement(o[1])]:e=((o=f.buildFragment([r[1]],[a])).cacheable?f.clone(o.fragment):o.fragment).childNodes,f.merge(this,e);if((i=L.getElementById(r[2]))&&i.parentNode){if(i.id!==r[2])return n.find(e);this.length=1,this[0]=i}return this.context=L,this.selector=e,this},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return _.call(this,0)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=this.constructor();return f.isArray(e)?M.apply(r,e):f.merge(r,e),r.prevObject=this,r.context=this.context,"find"===t?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return f.each(this,e,t)},ready:function(e){return f.bindReady(),r.add(e),this},eq:function(e){return-1===(e=+e)?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(_.apply(this,arguments),"slice",_.call(arguments).join(","))},map:function(n){return this.pushStack(f.map(this,function(e,t){return n.call(e,t,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:M,sort:[].sort,splice:[].splice},f.fn.init.prototype=f.fn,f.extend=f.fn.extend=function(e,t){var n,r,i,o,a,s,u=e||{},l=1,c=arguments.length,d=!1;for("boolean"==typeof u&&(d=u,u=t||{},l=2),"object"!=typeof u&&!f.isFunction(u)&&(u={}),c===l&&(u=this,--l);l
a",e=g.getElementsByTagName("*"),t=g.getElementsByTagName("a")[0],!e||!e.length||!t)return{};r=(n=L.createElement("select")).appendChild(L.createElement("option")),i=g.getElementsByTagName("input")[0],h={leadingWhitespace:3===g.firstChild.nodeType,tbody:!g.getElementsByTagName("tbody").length,htmlSerialize:!!g.getElementsByTagName("link").length,style:/top/.test(t.getAttribute("style")),hrefNormalized:"/a"===t.getAttribute("href"),opacity:/^0.55/.test(t.style.opacity),cssFloat:!!t.style.cssFloat,checkOn:"on"===i.value,optSelected:r.selected,getSetAttribute:"t"!==g.className,enctype:!!L.createElement("form").enctype,html5Clone:"<:nav>"!==L.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},A.boxModel=h.boxModel="CSS1Compat"===L.compatMode,i.checked=!0,h.noCloneChecked=i.cloneNode(!0).checked,n.disabled=!0,h.optDisabled=!r.disabled;try{delete g.test}catch(Y){h.deleteExpando=!1}if(!g.addEventListener&&g.attachEvent&&g.fireEvent&&(g.attachEvent("onclick",function(){h.noCloneEvent=!1}),g.cloneNode(!0).fireEvent("onclick")),(i=L.createElement("input")).value="t",i.setAttribute("type","radio"),h.radioValue="t"===i.value,i.setAttribute("checked","checked"),i.setAttribute("name","t"),g.appendChild(i),(o=L.createDocumentFragment()).appendChild(g.lastChild),h.checkClone=o.cloneNode(!0).cloneNode(!0).lastChild.checked,h.appendChecked=i.checked,o.removeChild(i),o.appendChild(g),g.attachEvent)for(s in{submit:1,change:1,focusin:1})(m=(a="on"+s)in g)||(g.setAttribute(a,"return;"),m="function"==typeof g[a]),h[s+"Bubbles"]=m;return o.removeChild(g),o=n=r=g=i=null,A(function(){var e,t,n,r,i,o,a,s,u,l,c,d,f=L.getElementsByTagName("body")[0];!f||(a=1,c=(d="padding:0;margin:0;border:")+"0;visibility:hidden;",u="
",(e=L.createElement("div")).style.cssText=c+"width:0;height:0;position:static;top:0;margin-top:"+a+"px",f.insertBefore(e,f.firstChild),g=L.createElement("div"),e.appendChild(g),g.innerHTML="
t
",p=g.getElementsByTagName("td"),m=0===p[0].offsetHeight,p[0].style.display="",p[1].style.display="none",h.reliableHiddenOffsets=m&&0===p[0].offsetHeight,O.getComputedStyle&&(g.innerHTML="",(o=L.createElement("div")).style.width="0",o.style.marginRight="0",g.style.width="2px",g.appendChild(o),h.reliableMarginRight=0===(parseInt((O.getComputedStyle(o,null)||{marginRight:0}).marginRight,10)||0)),"undefined"!=typeof g.style.zoom&&(g.innerHTML="",g.style.width=g.style.padding="1px",g.style.border=0,g.style.overflow="hidden",g.style.display="inline",g.style.zoom=1,h.inlineBlockNeedsLayout=3===g.offsetWidth,g.style.display="block",g.style.overflow="visible",g.innerHTML="
",h.shrinkWrapBlocks=3!==g.offsetWidth),g.style.cssText=l+c,g.innerHTML=u,n=(t=g.firstChild).firstChild,r=t.nextSibling.firstChild.firstChild,i={doesNotAddBorder:5!==n.offsetTop,doesAddBorderForTableAndCells:5===r.offsetTop},n.style.position="fixed",n.style.top="20px",i.fixedPosition=20===n.offsetTop||15===n.offsetTop,n.style.position=n.style.top="",t.style.overflow="hidden",t.style.position="relative",i.subtractsBorderForOverflowNotVisible=-5===n.offsetTop,i.doesNotIncludeMarginInBodyOffset=f.offsetTop!==a,O.getComputedStyle&&(g.style.marginTop="1%",h.pixelMargin="1%"!==(O.getComputedStyle(g,null)||{marginTop:0}).marginTop),"undefined"!=typeof e.style.zoom&&(e.style.zoom=1),f.removeChild(e),o=g=e=null,A.extend(h,i))}),h}();var P=/^(?:\{.*\}|\[.*\])$/,z=/([A-Z])/g;A.extend({cache:{},uuid:0,expando:"jQuery"+(A.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return!!(e=e.nodeType?A.cache[e[A.expando]]:e[A.expando])&&!M(e)},data:function(e,t,n,r){if(A.acceptData(e)){var i,o,a,s=A.expando,u="string"==typeof t,l=e.nodeType,c=l?A.cache:e,d=l?e[s]:e[s]&&s,f="events"===t;if((!d||!c[d]||!f&&!r&&!c[d].data)&&u&&n===F)return;return d||(l?e[s]=d=++A.uuid:d=s),c[d]||(c[d]={},l||(c[d].toJSON=A.noop)),"object"!=typeof t&&"function"!=typeof t||(r?c[d]=A.extend(c[d],t):c[d].data=A.extend(c[d].data,t)),i=o=c[d],r||(o.data||(o.data={}),o=o.data),n!==F&&(o[A.camelCase(t)]=n),f&&!o[t]?i.events:(u?null==(a=o[t])&&(a=o[A.camelCase(t)]):a=o,a)}},removeData:function(e,t,n){if(A.acceptData(e)){var r,i,o,a=A.expando,s=e.nodeType,u=s?A.cache:e,l=s?e[a]:a;if(!u[l])return;if(t&&(r=n?u[l]:u[l].data)){A.isArray(t)||(t in r?t=[t]:t=(t=A.camelCase(t))in r?[t]:t.split(" "));for(i=0,o=t.length;if&&g.push({elem:this,matches:d.slice(f)}),t=0;t+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,c="sizcache"+(Math.random()+"").replace(".",""),u=0,v=Object.prototype.toString,d=!1,n=!0,h=/\\/g,o=/\r\n/g,l=/\W/;[0,0].sort(function(){return n=!1,0});var b=function(e,t,n,r){n=n||[];var i=t=t||L;if(1!==t.nodeType&&9!==t.nodeType)return[];if(!e||"string"!=typeof e)return n;var o,a,s,u,l,c,d,f,h=!0,p=b.isXML(t),m=[],g=e;do{if(y.exec(""),(o=y.exec(g))&&(g=o[3],m.push(o[1]),o[2])){u=o[3];break}}while(o);if(1":function(e,t){var n,r="string"==typeof t,i=0,o=e.length;if(r&&!l.test(t)){for(t=t.toLowerCase();in[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,n,r){var i=t[1],o=T.filters[i];if(o)return o(e,n,t,r);if("contains"===i)return 0<=(e.textContent||e.innerText||f([e])||"").indexOf(t[3]);if("not"===i){for(var a=t[3],s=0,u=a.length;s",x.insertBefore(i,x.firstChild),L.getElementById(g)&&(T.find.ID=function(e,t,n){if("undefined"!=typeof t.getElementById&&!n){var r=t.getElementById(e[1]);return r?r.id===e[1]||"undefined"!=typeof r.getAttributeNode&&r.getAttributeNode("id").nodeValue===e[1]?[r]:F:[]}},T.filter.ID=function(e,t){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&n&&n.nodeValue===t}),x.removeChild(i),x=i=null,(t=L.createElement("div")).appendChild(L.createComment("")),0

",!e.querySelectorAll||0!==e.querySelectorAll(".TEST").length){for(var t in b=function(e,t,n,r){if(t=t||L,!r&&!b.isXML(t)){var i=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(e);if(i&&(1===t.nodeType||9===t.nodeType)){if(i[1])return D(t.getElementsByTagName(e),n);if(i[2]&&T.find.CLASS&&t.getElementsByClassName)return D(t.getElementsByClassName(i[2]),n)}if(9===t.nodeType){if("body"===e&&t.body)return D([t.body],n);if(i&&i[3]){var o=t.getElementById(i[3]);if(!o||!o.parentNode)return D([],n);if(o.id===i[3])return D([o],n)}try{return D(t.querySelectorAll(e),n)}catch(h){}}else if(1===t.nodeType&&"object"!==t.nodeName.toLowerCase()){var a=t,s=t.getAttribute("id"),u=s||f,l=t.parentNode,c=/^\s*[+~]/.test(e);s?u=u.replace(/'/g,"\\$&"):t.setAttribute("id",u),c&&l&&(t=t.parentNode);try{if(!c||l)return D(t.querySelectorAll("[id='"+u+"'] "+e),n)}catch(p){}finally{s||a.removeAttribute("id")}}}return d(e,t,n,r)},d)b[t]=d[t];e=null}}(),function(){var e=L.documentElement,r=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(r){var i=!r.call(L.createElement("div"),"div"),o=!1;try{r.call(L.documentElement,"[test!='']:sizzle")}catch(A){o=!0}b.matchesSelector=function(e,t){if(t=t.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!b.isXML(e))try{if(o||!T.match.PSEUDO.test(t)&&!/!=/.test(t)){var n=r.call(e,t);if(n||!i||e.document&&11!==e.document.nodeType)return n}}catch(v){}return 0
",e.getElementsByClassName&&0!==e.getElementsByClassName("e").length){if(e.lastChild.className="e",1===e.getElementsByClassName("e").length)return;T.order.splice(1,0,"CLASS"),T.find.CLASS=function(e,t,n){if("undefined"!=typeof t.getElementsByClassName&&!n)return t.getElementsByClassName(e[1])},e=null}}(),L.documentElement.contains?b.contains=function(e,t){return e!==t&&(!e.contains||e.contains(t))}:L.documentElement.compareDocumentPosition?b.contains=function(e,t){return!!(16&e.compareDocumentPosition(t))}:b.contains=function(){return!1},b.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return!!t&&"HTML"!==t.nodeName};var S=function(e,t,n){for(var r,i=[],o="",a=t.nodeType?[t]:t;r=T.match.PSEUDO.exec(e);)o+=r[0],e=e.replace(T.match.PSEUDO,"");e=T.relative[e]?e+"*":e;for(var s=0,u=a.length;s]*)\/>/gi,ve=/<([\w:]+)/,be=/]","i"),Se=/checked\s*(?:[^=]|=\s*.checked.)/i,ke=/\/(java|ecma)script/i,Ce=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},_e=w(L);Me.optgroup=Me.option,Me.tbody=Me.tfoot=Me.colgroup=Me.caption=Me.thead,Me.th=Me.td,A.support.htmlSerialize||(Me._default=[1,"div
","
"]),A.fn.extend({text:function(e){return A.access(this,function(e){return e===F?A.text(this):this.empty().append((this[0]&&this[0].ownerDocument||L).createTextNode(e))},null,e,arguments.length)},wrapAll:function(t){if(A.isFunction(t))return this.each(function(e){A(this).wrapAll(t.call(this,e))});if(this[0]){var e=A(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(n){return A.isFunction(n)?this.each(function(e){A(this).wrapInner(n.call(this,e))}):this.each(function(){var e=A(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=A.isFunction(t);return this.each(function(e){A(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(){return this.parent().each(function(){A.nodeName(this,"body")||A(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){1===this.nodeType&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){1===this.nodeType&&this.insertBefore(e,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=A.clean(arguments);return e.push.apply(e,this.toArray()),this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=this.pushStack(this,"after",arguments);return e.push.apply(e,A.clean(arguments)),e}},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)e&&!A.filter(e,[n]).length||(!t&&1===n.nodeType&&(A.cleanData(n.getElementsByTagName("*")),A.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&A.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return A.clone(this,e,t)})},html:function(e){return A.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===F)return 1===t.nodeType?t.innerHTML.replace(me,""):null;if("string"==typeof e&&!we.test(e)&&(A.support.leadingWhitespace||!ge.test(e))&&!Me[(ve.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(ye,"<$1>");try{for(;n")?e.cloneNode(!0):l(e);if(!(A.support.noCloneEvent&&A.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||A.isXMLDoc(e)))for(h(e,a),r=f(e),i=f(a),o=0;r[o];++o)i[o]&&h(r[o],i[o]);if(t&&(p(e,a),n))for(r=f(e),i=f(a),o=0;r[o];++o)p(r[o],i[o]);return r=i=null,a},clean:function(e,t,n,r){var i,o,a,s=[];"undefined"==typeof(t=t||L).createElement&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||L);for(var u,l=0;null!=(u=e[l]);l++)if("number"==typeof u&&(u+=""),u){if("string"==typeof u)if(Te.test(u)){u=u.replace(ye,"<$1>");var c,d=(ve.exec(u)||["",""])[1].toLowerCase(),f=Me[d]||Me._default,h=f[0],p=t.createElement("div"),m=_e.childNodes;for(t===L?_e.appendChild(p):w(t).appendChild(p),p.innerHTML=f[1]+u+f[2];h--;)p=p.lastChild;if(!A.support.tbody){var g=be.test(u),y="table"!==d||g?""!==f[1]||g?[]:p.childNodes:p.firstChild&&p.firstChild.childNodes;for(a=y.length-1;0<=a;--a)A.nodeName(y[a],"tbody")&&!y[a].childNodes.length&&y[a].parentNode.removeChild(y[a])}!A.support.leadingWhitespace&&ge.test(u)&&p.insertBefore(t.createTextNode(ge.exec(u)[0]),p.firstChild),u=p.childNodes,p&&(p.parentNode.removeChild(p),0)<[^<]*)*<\/script>/gi,et=/^(?:select|textarea)/i,tt=/\s+/,nt=/([?&])_=[^&]*/,rt=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,it=A.fn.load,ot={},at={},st=["*/"]+["*"];try{Re=E.href}catch(kt){(Re=L.createElement("a")).href="",Re=Re.href}We=rt.exec(Re.toLowerCase())||[],A.fn.extend({load:function(e,t,r){if("string"!=typeof e&&it)return it.apply(this,arguments);if(!this.length)return this;var n=e.indexOf(" ");if(0<=n){var i=e.slice(n,e.length);e=e.slice(0,n)}var o="GET";t&&(A.isFunction(t)?(r=t,t=F):"object"==typeof t&&(t=A.param(t,A.ajaxSettings.traditional),o="POST"));var a=this;return A.ajax({url:e,type:o,dataType:"html",data:t,complete:function(e,t,n){n=e.responseText,e.isResolved()&&(e.done(function(e){n=e}),a.html(i?A("
").append(n.replace(Qe,"")).find(i):n)),r&&a.each(r,[n,t,e])}}),this},serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?A.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||et.test(this.nodeName)||Ge.test(this.type))}).map(function(e,t){var n=A(this).val();return null==n?null:A.isArray(n)?A.map(n,function(e){return{name:t.name,value:e.replace(Ue,"\r\n")}}):{name:t.name,value:n.replace(Ue,"\r\n")}}).get()}}),A.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){A.fn[t]=function(e){return this.on(t,e)}}),A.each(["get","post"],function(e,i){A[i]=function(e,t,n,r){return A.isFunction(t)&&(r=r||n,n=t,t=F),A.ajax({type:i,url:e,data:t,success:n,dataType:r})}}),A.extend({getScript:function(e,t){return A.get(e,F,t,"script")},getJSON:function(e,t,n){return A.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?r(e,A.ajaxSettings):(t=e,e=A.ajaxSettings),r(e,t),e},ajaxSettings:{url:Re,isLocal:Ve.test(We[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":st},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":O.String,"text html":!0,"text json":A.parseJSON,"text xml":A.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:i(ot),ajaxTransport:i(at),ajax:function(e,t){function n(e,t,n,r){if(2!==x){x=2,p&&clearTimeout(p),h=F,f=r||"",D.readyState=0=s.duration+this.startTime){for(t in this.now=this.end,this.pos=this.state=1,this.update(),s.animatedProperties[this.prop]=!0,s.animatedProperties)!0!==s.animatedProperties[t]&&(o=!1);if(o){if(null!=s.overflow&&!A.support.shrinkWrapBlocks&&A.each(["","X","Y"],function(e,t){a.style["overflow"+t]=s.overflow[e]}),s.hide&&A(a).hide(),s.hide||s.show)for(t in s.animatedProperties)A.style(a,t,s.orig[t]),A.removeData(a,"fxshow"+t,!0),A.removeData(a,"toggle"+t,!0);(r=s.complete)&&(s.complete=!1,r.call(a))}return!1}return s.duration==Infinity?this.now=i:(n=i-this.startTime,this.state=n/s.duration,this.pos=A.easing[s.animatedProperties[this.prop]](this.state,n,0,1,s.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},A.extend(A.fx,{tick:function(){for(var e,t=A.timers,n=0;n=r[u]?r[s]:Math.max(e.body[u],r[u],e.body[l],r[l]):n===F?(o=A.css(e,t),a=parseFloat(o),A.isNumeric(a)?a:o):void A(e).css(t,n)},n,e,arguments.length,null)}}),O.jQuery=O.$=A,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return A})}(window),function(){var e;e="undefined"!=typeof module&&"undefined"!=typeof module.exports?require("./pnglib"):window.PNGlib;var t=function(e,t,n){if("string"!=typeof e||e.length<15)throw"A hash of at least 15 characters is required.";this.defaults={background:[240,240,240,255],margin:.08,size:64,saturation:.7,brightness:.5,format:"png"},this.options="object"==typeof t?t:this.defaults,"number"==typeof t&&(this.options.size=t),n&&(this.options.margin=n),this.hash=e,this.background=this.options.background||this.defaults.background,this.size=this.options.size||this.defaults.size,this.format=this.options.format||this.defaults.format,this.margin=this.options.margin!==undefined?this.options.margin:this.defaults.margin;var r=parseInt(this.hash.substr(-7),16)/268435455,i=this.options.saturation||this.defaults.saturation,o=this.options.brightness||this.defaults.brightness;this.foreground=this.options.foreground||this.hsl2rgb(r,i,o)};t.prototype={background:null,foreground:null,hash:null,margin:null,size:null,format:null,image:function(){return this.isSvg()?new n(this.size,this.foreground,this.background):new e(this.size,this.size,256)},render:function(){var e,t,n=this.image(),r=this.size,i=Math.floor(r*this.margin),o=Math.floor((r-2*i)/5),a=Math.floor((r-5*o)/2),s=n.color.apply(n,this.background),u=n.color.apply(n,this.foreground);for(e=0;e<15;e++)t=parseInt(this.hash.charAt(e),16)%2?s:u,e<5?this.rectangle(2*o+a,e*o+a,o,o,t,n):e<10?(this.rectangle(1*o+a,(e-5)*o+a,o,o,t,n),this.rectangle(3*o+a,(e-5)*o+a,o,o,t,n)):e<15&&(this.rectangle(0*o+a,(e-10)*o+a,o,o,t,n),this.rectangle(4*o+a,(e-10)*o+a,o,o,t,n));return n},rectangle:function(e,t,n,r,i,o){var a,s;if(this.isSvg())o.rectangles.push({x:e,y:t,w:n,h:r,color:i});else for(a=e;a",e=0;e");return t+=""},getBase64:function(){if("function"==typeof btoa)return btoa(this.getDump());if(Buffer)return new Buffer(this.getDump(),"binary").toString("base64");throw"Cannot generate base64 output"}},"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=t:window.Identicon=t}(),function(){var o=Date,a=Date.CultureStrings?Date.CultureStrings.lang:null,r={},i={getFromKey:function(e,t){var n;return n=Date.CultureStrings&&Date.CultureStrings[t]&&Date.CultureStrings[t][e]?Date.CultureStrings[t][e]:i.buildFromDefault(e),"/"===e.charAt(0)&&(n=i.buildFromRegex(e,t)),n},getFromObjectValues:function(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=i.getFromKey(e[n],t));return r},getFromObjectKeys:function(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[i.getFromKey(n,t)]=e[n]);return r},getFromArray:function(e,t){for(var n=[],r=0;r=e.getTime()&&this.getTime()<=t.getTime()},e.isAfter=function(e){return 1===this.compareTo(e||new Date)},e.isBefore=function(e){return-1===this.compareTo(e||new Date)},e.isToday=e.isSameDay=function(e){return this.clone().clearTime().equals((e||new Date).clone().clearTime())},e.addMilliseconds=function(e){return e&&this.setTime(this.getTime()+1*e),this},e.addSeconds=function(e){return e?this.addMilliseconds(1e3*e):this},e.addMinutes=function(e){return e?this.addMilliseconds(6e4*e):this},e.addHours=function(e){return e?this.addMilliseconds(36e5*e):this},e.addDays=function(e){return e&&this.setDate(this.getDate()+1*e),this},e.addWeekdays=function(e){if(!e)return this;var t=this.getDay(),n=Math.ceil(Math.abs(e)/7);if((0===t||6===t)&&0o.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");return e=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond),this.year<100&&e.setFullYear(this.year),this.timezone?e.set({timezone:this.timezone}):this.timezoneOffset&&e.set({timezoneOffset:this.timezoneOffset}),e},finish:function(e){var t,n,r;if(0===(e=e instanceof Array?a(e):[e]).length)return null;for(t=0;t/"+uploadDest+"/[filename]",action:routePath("upload_file")}],OK:function(){$("#wiki-content").addClass("uploading");var e=new FormData($("#upload").get(0)),t=$("#upload").attr("action");$.ajax({url:t,type:"POST",data:e,processData:!1,contentType:!1,success:function(){$("#wiki-content").removeClass("uploading"),flashNotice("success","Your file was successfully uploaded.")},error:function(e,t,n){$("#wiki-content").removeClass("uploading"),409==e.status?flashNotice("error","The file you tried to upload already exists. Please rename the file and try again."):flashNotice("error","Error uploading file: "+t+" "+n)}})}}),$("#gollum-dialog-action-ok").attr("disabled",!0),$("input:file").on("change",function(){$(this).val()&&(filename=$("input[type=file]").val().split("\\").pop(),upload_path="/"+uploadDest+"/"+filename,clipboard_button='',news="Your uploaded file will be accessible at
"+clipboard_button+" "+upload_path,$(".context").html(news),$("#gollum-dialog-action-ok").attr("disabled",!1))})})),$(".minibutton-rename-page").length&&($(".minibutton-rename-page").parent().removeClass("jaws"),$(".minibutton-rename-page").click(function(e){e.preventDefault();var a=decodeURI(pagePath()),s=decodeURI(pageName()),t="Renamed page will be under "+htmlEscape(cleanPath(a))+" unless an absolute path is given.";$.GollumDialog.init({title:"Rename Page",fields:[{id:"name",name:"Rename to",type:"text",defaultValue:s||"",context:t}],OK:function(e){var t="Rename Page";e.name&&(t=e.name);var n=abspath(a,t),r=n[0],i="/"+a==r?"Renamed "+s+" to "+t:"Renamed "+s+" to "+n.join("/"),o=$("form[name=rename]");o.children("input[name=rename]").val(n.join("/")),o.children("input[name=message]").val(i),o.submit()}})})),$(".minibutton-new-page").length&&($(".minibutton-new-page").parent().removeClass("jaws"),$(".minibutton-new-page").click(function(e){e.preventDefault();var o=pagePath();o===undefined&&0!=$("#file-browser").length&&(o=window.location.pathname.replace(routePath("overview"),""));var t="Page will be created under "+htmlEscape(cleanPath(o))+" unless an absolute path is given.";$.GollumDialog.init({title:"Create New Page",fields:[{id:"name",name:"Page Name",type:"text",defaultValue:"",context:t}],OK:function(e){var t="New Page";e.name&&(t=e.name);for(var n=[],r=abspath(o,t).join("/").split("/"),i=0;i").attr({type:"hidden",id:$(e).val(),name:"versions[]",value:$(e).val()}).appendTo($("#selection-form")),i()},u=function(e){$("#selection-form #"+$(e).val()).remove(),$(e).closest("li").removeClass(a.join(" ")),i()},l=function(){$("#version-form input").on("change",function(){this.checked?s(this):u(this)})};l(),i();var c=function(e){e.preventDefault(),$(this).hasClass("disabled")||$.ajax({url:$(this).attr("href"),type:"GET",success:function(e){var t=$("#page-history-list",e),n=$("#pagination",e);["#next","#prev"].forEach(function(e){old_btn=$("#pagination "+e),new_btn=n.find(e),old_btn.attr("href",new_btn.attr("href")),new_btn.hasClass("disabled")?old_btn.addClass("disabled"):old_btn.removeClass("disabled")}),$("#page-history-list").replaceWith(t),l(),i()},error:function(e,t,n){console.log("something went wrong: "+t+n)}}),this.blur()};$("#pagination #next, #pagination #prev").each(function(e,t){$(t).on("click",c)})}if($("#last-edit").length&&$("#page-info-toggle").click(function(){$.ajax({url:routePath("last_commit_info"),data:{path:$("#page-info-toggle").data("pagepath")},success:function(e){var t=showLocalTime?getLocalTime(e.date):e.date;$("#last-edit").next(".dotted-spinner").toggleClass("hidden"),$("#last-edit-in-progress").html("Last edited by "+e.author+", "+t)}}),$("#last-edit").next(".dotted-spinner").toggleClass("hidden"),$("#page-info-toggle").before(' Getting commit info...').remove()}),$("#wiki-wrapper.create").length&&($("#gollum-editor-submit").click(function(){window.onbeforeunload=null}),$("#gollum-editor-body").one("change",function(){window.onbeforeunload=function(){return"Leaving will not create a new page!"}}),$.GollumEditor({NewFile:!0,MarkupType:default_markup,commands:r})),$("#search-results").length){$(".toggle-context").each(function(){var e=$(this).parent().next("div.search-context").find("li:hidden");e.length?$(this).click(function(){e.toggle(),$(this).toggle()}):$(this).toggle()});var d=new RegExp(searchTerms.join("|"),"gi");$("div.search-context li span").each(function(){var e=$(this).html().replace(/"/g,""").replace(/'/g,"'").replace(d,function(e){return''+e+""});$(this).html(e)})}if($(".markdown-body").length&&(preparePage(),(match=new RegExp(/[?&]redirected\_from=([^?]*)/).exec(window.location.href))&&(notice="The page you requested was renamed or moved. You've been successfully redirected to its new location.",flashNotice("success",notice)),Mousetrap.bind(["e"],function(e){return e.preventDefault(),window.location=routePath("edit")+"/"+pageFullPath,!1}),$.markupSupportsEditableSections(pageFormat)&&$("a.anchor").each(function(e,t){if(header=$(t).closest(":header"),header.hasClass("editable")){var n=routePath("edit")+"/"+pageFullPath+$(t).attr("href");$(t).clone().addClass("edit").attr("href",n).appendTo(header)}})),$("#wiki-history").length||$("#page-history").length){var f={format:"svg",background:[255,255,255,255]};$("img.identicon").each(function(e,t){var n=$(t),r=n.data("identicon"),i=new Identicon(r,f).toString();i="data:image/svg+xml;base64,"+i,n.attr("src",i)})}}),function(r){var i={debugOn:!1,markupCreated:!1,markup:"",currentAspect:function(){return window.innerWidth<480?"small-mobile":"fixed"==r("#gollum-dialog-dialog").css("position")?"large-mobile":"desktop"},attachEvents:function(t){r("#gollum-dialog-action-ok").click(function(e){i.eventOK(e,t)}),r("#gollum-dialog-action-cancel").click(i.eventCancel),r('#gollum-dialog-dialog input[type="text"]').keydown(function(e){13==e.keyCode&&i.eventOK(e,t)})},detachEvents:function(){r("#gollum-dialog-action-ok").unbind("click"),r("#gollum-dialog-action-cancel").unbind("click")},createFieldMarkup:function(e){for(var t="
",n=0;n"}return t+="
"},createFieldText:function(e){var t="";return e.name&&(t+=""),t+=''),e.context&&(t+=''+e.context+""),t},createFieldFile:function(e){var t="",n=e.id||"upload",r=e.name||"file";return t+='
',t+='',t+="",e.context&&(t+=''+e.context+""),t},createMarkup:function(e,t){return i.markupCreated=!0,'

'+e+'

'+t+'
'},eventCancel:function(e){e.preventDefault(),o("Cancelled dialog."),i.hide()},eventOK:function(e,t){e.preventDefault();var n=[];r("#gollum-dialog-dialog-body input").each(function(){n[r(this).attr("name")]=r(this).val()}),t&&"function"==typeof t&&t(n),i.hide()},hide:function(){r.browser.msie?(r("#gollum-dialog-dialog").hide().removeClass("active"),r("select").css("visibility","visible")):(r("#gollum-dialog-dialog").animate({opacity:0},{duration:200,complete:function(){r("#gollum-dialog-dialog").removeClass("active"),r("#gollum-dialog-dialog").css("display","none")}}),r(window).unbind("resize",i.resize))},init:function(e){var t="",n="";e&&"object"==typeof e?(e.body&&"string"==typeof e.body&&(n="

"+e.body+"

"),e.fields&&"object"==typeof e.fields&&(n+=i.createFieldMarkup(e.fields)),e.title&&"string"==typeof e.title&&(t=e.title),i.markupCreated&&r("#gollum-dialog-dialog").remove(),i.markup=i.createMarkup(t,n),r("body").append(i.markup),e.OK&&"function"==typeof e.OK&&i.attachEvents(e.OK),i.show()):o("Editor Dialog: Cannot init; invalid init object")},show:function(){i.markupCreated?(o("Showing dialog"),r.browser.msie?(r("#gollum-dialog.dialog").addClass("active"),i.position(),r("select").css("visibility","hidden")):(r("#gollum-dialog.dialog").css("display","none"),r("#gollum-dialog-dialog").animate({opacity:0},{duration:0,complete:function(){r("#gollum-dialog-dialog").css("display","block"),i.position(),r("#gollum-dialog-dialog").animate({opacity:1},{duration:500}),r(r('#gollum-dialog-dialog input[type="text"]').get(0)).focus()}})),r(window).bind("resize",i.resize)):o("Dialog: No markup to show. Please use init first.")},resize:function(){i.position()},position:function(){if("small-mobile"==i.currentAspect())r("#gollum-dialog-dialog-inner").css("height","100%").css("margin-top","auto");else if("large-mobile"==i.currentAspect())r("#gollum-dialog-dialog-inner").css("height","auto").css("margin-top","auto");else if("desktop"==i.currentAspect()){var e=r("#gollum-dialog-dialog-inner").height();r("#gollum-dialog-dialog-inner").css("height",e+"px").css("margin-top",-1*parseInt(e/2))}}},o=function(e){i.debugOn&&"undefined"!=typeof console&&console.log(e)};r.GollumDialog=i}(jQuery),function(n){var t={_PLACEHOLDERS:[],_p:function(e){this.fieldObject=e,this.placeholderText=e.val();var t=e.val();e.addClass("ph"),e.blur(function(){""==n(this).val()&&(n(this).val(t),n(this).addClass("ph"))}),e.focus(function(){n(this).removeClass("ph"),n(this).val()==t?n(this).val(""):n(this)[0].select()})},add:function(e){t._PLACEHOLDERS.push(new t._p(e))},clearAll:function(){for(var e=0;e div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n),u=!0}}var t,a,s=document.attachEvent,u=!1,l=e.fn.resize;if(e.fn.resize=function(e){return this.each(function(){this==window?l.call(jQuery(this),e):addResizeListener(this,e)})},e.fn.removeResize=function(e){return this.each(function(){removeResizeListener(this,e)})},!s){var c=(a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)},function(e){return a(e)}),d=(t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(e){return t(e)}),f=!1,h="",p="animationstart",m="Webkit Moz O ms".split(" "),g="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),y="",v=document.createElement("fakeelement");if(v.style.animationName!==undefined&&(f=!0),!1===f)for(var b=0;b
',t.appendChild(t.__resizeTriggers__),r(t),t.addEventListener("scroll",n,!0),p&&t.__resizeTriggers__.addEventListener(p,function(e){e.animationName==T&&r(t)})),t.__resizeListeners__.push(e))},window.removeResizeListener=function(e,t){s?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",n),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))}}(jQuery),Array.prototype.includes||(Array.prototype.includes=function(e){return 0<=this.indexOf(e)}); \ No newline at end of file diff --git a/lib/gollum/public/assets/app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js.gz b/lib/gollum/public/assets/app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js.gz new file mode 100644 index 00000000..62d671fb Binary files /dev/null and b/lib/gollum/public/assets/app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js.gz differ diff --git a/lib/gollum/public/assets/app-eb6effc9f708916af14718a5c9d2a5028625664f62c2528e5989538537f3f4a8.js b/lib/gollum/public/assets/app-eb6effc9f708916af14718a5c9d2a5028625664f62c2528e5989538537f3f4a8.js deleted file mode 100644 index e79c5790..00000000 --- a/lib/gollum/public/assets/app-eb6effc9f708916af14718a5c9d2a5028625664f62c2528e5989538537f3f4a8.js +++ /dev/null @@ -1,6 +0,0 @@ -function brokenAvatarImage(e){return e.onerror="",e.src='data:image/svg+xml;utf8,',!0}function routePath(e){return path=gollumRoutes[e],prefixBaseUrl(path)}function prefixBaseUrl(e){if(baseUrl==undefined)console.log("Gollum error: baseUrl undefined");else{if(e!=undefined)return""==baseUrl?e:("/"==baseUrl.charAt(baseUrl.length-1)?result=baseUrl+e:result=baseUrl+"/"+e,result.replace(/\/{2}/g,"/"));console.log("Could not find route with name: "+name)}}function cleanPath(e){return("/"+e.replace(/\/$/,"")).replace(/\/{2}/g,"/")}function pageName(){return"undefined"==typeof pageFullPath?undefined:(name=pageFullPath.split("/").pop(),name.substring(0,name.lastIndexOf(".")))}function pagePath(){return"undefined"==typeof pageFullPath?undefined:pageFullPath.split("/").slice(0,-1).join("/")}function htmlEscape(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function abspath(e,t){"/"!=t[0]&&(t="/"+t,e&&(t="/"+e+t));var n=t.split("/");return[n.slice(0,-1).join("/"),n.pop()]}function setTextDirection(){$(".markdown-body p, .markdown-body span, .markdown-body pre, .markdown-body table").attr("dir","auto")}function preparePage(){setTextDirection(),"true"==criticMarkup&&($("#wiki-content").addClass("criticmarkup"),$("ins.break").unwrap(),$("span.critic.comment").wrap(''),$("span.critic.comment").filter(function(){return""!=$(this).text()}).before("‡"))}function getLocalTime(e,t){return t===undefined&&(t="Y-m-d %H:%M:%S O"),new Date(e).format(t)}function flashNotice(e,t,n,r,i){nested_button_html="",void 0!==n&&void 0!==r&&(i=void 0!==i&&"danger"==i?" btn-danger":"",nested_button_html='"),html='

'+t+nested_button_html+"

",$("#gollum-flash").remove(),$("#wiki-content").before(html),"success"==e&&setTimeout(function(){$("#gollum-flash").fadeOut()},5e3)}!function(O,F){function c(e){return A.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}function g(e){if(!vt[e]){var t=L.body,n=A("<"+e+">").appendTo(t),r=n.css("display");n.remove(),"none"!==r&&""!==r||(pt||((pt=L.createElement("iframe")).frameBorder=pt.width=pt.height=0),t.appendChild(pt),mt&&pt.createElement||((mt=(pt.contentWindow||pt.contentDocument).document).write((A.support.boxModel?"":"")+""),mt.close()),n=mt.createElement(e),mt.body.appendChild(n),r=A.css(n,"display"),t.removeChild(pt)),vt[e]=r}return vt[e]}function s(e,t){var n={};return A.each(wt.concat.apply([],wt.slice(0,t)),function(){n[this]=e}),n}function e(){yt=F}function u(){return setTimeout(e,0),yt=A.now()}function t(){try{return new O.ActiveXObject("Microsoft.XMLHTTP")}catch(F){}}function n(){try{return new O.XMLHttpRequest}catch(F){}}function S(e,t){e.dataFilter&&(t=e.dataFilter(t,e.dataType));var n,r,i,o,a,s,u,l,c=e.dataTypes,d={},f=c.length,h=c[0];for(n=1;n)[^>]*$|#([\w\-]*)$)/,u=/\S/,l=/^\s+/,c=/\s+$/,d=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,h=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,m=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,g=/(?:^|:|,)(?:\s*\[)+/g,y=/(webkit)[ \/]([\w.]+)/,v=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,T=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/gi,x=/^-ms-/,D=function(e,t){return(t+"").toUpperCase()},S=H.userAgent,k=Object.prototype.toString,C=Object.prototype.hasOwnProperty,M=Array.prototype.push,_=Array.prototype.slice,N=String.prototype.trim,E=Array.prototype.indexOf,A={};return f.fn=f.prototype={constructor:f,init:function(e,t,n){var r,i,o,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("body"===e&&!t&&L.body)return this.context=L,this[0]=L.body,this.selector=e,this.length=1,this;if("string"!=typeof e)return f.isFunction(e)?n.ready(e):(e.selector!==F&&(this.selector=e.selector,this.context=e.context),f.makeArray(e,this));if(!(r="<"!==e.charAt(0)||">"!==e.charAt(e.length-1)||e.length<3?s.exec(e):[null,e,null])||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1])return a=(t=t instanceof f?t[0]:t)?t.ownerDocument||t:L,(o=d.exec(e))?f.isPlainObject(t)?(e=[L.createElement(o[1])],f.fn.attr.call(e,t,!0)):e=[a.createElement(o[1])]:e=((o=f.buildFragment([r[1]],[a])).cacheable?f.clone(o.fragment):o.fragment).childNodes,f.merge(this,e);if((i=L.getElementById(r[2]))&&i.parentNode){if(i.id!==r[2])return n.find(e);this.length=1,this[0]=i}return this.context=L,this.selector=e,this},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return _.call(this,0)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=this.constructor();return f.isArray(e)?M.apply(r,e):f.merge(r,e),r.prevObject=this,r.context=this.context,"find"===t?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return f.each(this,e,t)},ready:function(e){return f.bindReady(),r.add(e),this},eq:function(e){return-1===(e=+e)?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(_.apply(this,arguments),"slice",_.call(arguments).join(","))},map:function(n){return this.pushStack(f.map(this,function(e,t){return n.call(e,t,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:M,sort:[].sort,splice:[].splice},f.fn.init.prototype=f.fn,f.extend=f.fn.extend=function(e,t){var n,r,i,o,a,s,u=e||{},l=1,c=arguments.length,d=!1;for("boolean"==typeof u&&(d=u,u=t||{},l=2),"object"!=typeof u&&!f.isFunction(u)&&(u={}),c===l&&(u=this,--l);l
a",e=g.getElementsByTagName("*"),t=g.getElementsByTagName("a")[0],!e||!e.length||!t)return{};r=(n=L.createElement("select")).appendChild(L.createElement("option")),i=g.getElementsByTagName("input")[0],h={leadingWhitespace:3===g.firstChild.nodeType,tbody:!g.getElementsByTagName("tbody").length,htmlSerialize:!!g.getElementsByTagName("link").length,style:/top/.test(t.getAttribute("style")),hrefNormalized:"/a"===t.getAttribute("href"),opacity:/^0.55/.test(t.style.opacity),cssFloat:!!t.style.cssFloat,checkOn:"on"===i.value,optSelected:r.selected,getSetAttribute:"t"!==g.className,enctype:!!L.createElement("form").enctype,html5Clone:"<:nav>"!==L.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},A.boxModel=h.boxModel="CSS1Compat"===L.compatMode,i.checked=!0,h.noCloneChecked=i.cloneNode(!0).checked,n.disabled=!0,h.optDisabled=!r.disabled;try{delete g.test}catch(Y){h.deleteExpando=!1}if(!g.addEventListener&&g.attachEvent&&g.fireEvent&&(g.attachEvent("onclick",function(){h.noCloneEvent=!1}),g.cloneNode(!0).fireEvent("onclick")),(i=L.createElement("input")).value="t",i.setAttribute("type","radio"),h.radioValue="t"===i.value,i.setAttribute("checked","checked"),i.setAttribute("name","t"),g.appendChild(i),(o=L.createDocumentFragment()).appendChild(g.lastChild),h.checkClone=o.cloneNode(!0).cloneNode(!0).lastChild.checked,h.appendChecked=i.checked,o.removeChild(i),o.appendChild(g),g.attachEvent)for(s in{submit:1,change:1,focusin:1})(m=(a="on"+s)in g)||(g.setAttribute(a,"return;"),m="function"==typeof g[a]),h[s+"Bubbles"]=m;return o.removeChild(g),o=n=r=g=i=null,A(function(){var e,t,n,r,i,o,a,s,u,l,c,d,f=L.getElementsByTagName("body")[0];!f||(a=1,c=(d="padding:0;margin:0;border:")+"0;visibility:hidden;",u="
",(e=L.createElement("div")).style.cssText=c+"width:0;height:0;position:static;top:0;margin-top:"+a+"px",f.insertBefore(e,f.firstChild),g=L.createElement("div"),e.appendChild(g),g.innerHTML="
t
",p=g.getElementsByTagName("td"),m=0===p[0].offsetHeight,p[0].style.display="",p[1].style.display="none",h.reliableHiddenOffsets=m&&0===p[0].offsetHeight,O.getComputedStyle&&(g.innerHTML="",(o=L.createElement("div")).style.width="0",o.style.marginRight="0",g.style.width="2px",g.appendChild(o),h.reliableMarginRight=0===(parseInt((O.getComputedStyle(o,null)||{marginRight:0}).marginRight,10)||0)),"undefined"!=typeof g.style.zoom&&(g.innerHTML="",g.style.width=g.style.padding="1px",g.style.border=0,g.style.overflow="hidden",g.style.display="inline",g.style.zoom=1,h.inlineBlockNeedsLayout=3===g.offsetWidth,g.style.display="block",g.style.overflow="visible",g.innerHTML="
",h.shrinkWrapBlocks=3!==g.offsetWidth),g.style.cssText=l+c,g.innerHTML=u,n=(t=g.firstChild).firstChild,r=t.nextSibling.firstChild.firstChild,i={doesNotAddBorder:5!==n.offsetTop,doesAddBorderForTableAndCells:5===r.offsetTop},n.style.position="fixed",n.style.top="20px",i.fixedPosition=20===n.offsetTop||15===n.offsetTop,n.style.position=n.style.top="",t.style.overflow="hidden",t.style.position="relative",i.subtractsBorderForOverflowNotVisible=-5===n.offsetTop,i.doesNotIncludeMarginInBodyOffset=f.offsetTop!==a,O.getComputedStyle&&(g.style.marginTop="1%",h.pixelMargin="1%"!==(O.getComputedStyle(g,null)||{marginTop:0}).marginTop),"undefined"!=typeof e.style.zoom&&(e.style.zoom=1),f.removeChild(e),o=g=e=null,A.extend(h,i))}),h}();var P=/^(?:\{.*\}|\[.*\])$/,z=/([A-Z])/g;A.extend({cache:{},uuid:0,expando:"jQuery"+(A.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return!!(e=e.nodeType?A.cache[e[A.expando]]:e[A.expando])&&!M(e)},data:function(e,t,n,r){if(A.acceptData(e)){var i,o,a,s=A.expando,u="string"==typeof t,l=e.nodeType,c=l?A.cache:e,d=l?e[s]:e[s]&&s,f="events"===t;if((!d||!c[d]||!f&&!r&&!c[d].data)&&u&&n===F)return;return d||(l?e[s]=d=++A.uuid:d=s),c[d]||(c[d]={},l||(c[d].toJSON=A.noop)),"object"!=typeof t&&"function"!=typeof t||(r?c[d]=A.extend(c[d],t):c[d].data=A.extend(c[d].data,t)),i=o=c[d],r||(o.data||(o.data={}),o=o.data),n!==F&&(o[A.camelCase(t)]=n),f&&!o[t]?i.events:(u?null==(a=o[t])&&(a=o[A.camelCase(t)]):a=o,a)}},removeData:function(e,t,n){if(A.acceptData(e)){var r,i,o,a=A.expando,s=e.nodeType,u=s?A.cache:e,l=s?e[a]:a;if(!u[l])return;if(t&&(r=n?u[l]:u[l].data)){A.isArray(t)||(t in r?t=[t]:t=(t=A.camelCase(t))in r?[t]:t.split(" "));for(i=0,o=t.length;if&&g.push({elem:this,matches:d.slice(f)}),t=0;t+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,c="sizcache"+(Math.random()+"").replace(".",""),u=0,v=Object.prototype.toString,d=!1,n=!0,h=/\\/g,o=/\r\n/g,l=/\W/;[0,0].sort(function(){return n=!1,0});var b=function(e,t,n,r){n=n||[];var i=t=t||L;if(1!==t.nodeType&&9!==t.nodeType)return[];if(!e||"string"!=typeof e)return n;var o,a,s,u,l,c,d,f,h=!0,p=b.isXML(t),m=[],g=e;do{if(y.exec(""),(o=y.exec(g))&&(g=o[3],m.push(o[1]),o[2])){u=o[3];break}}while(o);if(1":function(e,t){var n,r="string"==typeof t,i=0,o=e.length;if(r&&!l.test(t)){for(t=t.toLowerCase();in[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,n,r){var i=t[1],o=T.filters[i];if(o)return o(e,n,t,r);if("contains"===i)return 0<=(e.textContent||e.innerText||f([e])||"").indexOf(t[3]);if("not"===i){for(var a=t[3],s=0,u=a.length;s",x.insertBefore(i,x.firstChild),L.getElementById(g)&&(T.find.ID=function(e,t,n){if("undefined"!=typeof t.getElementById&&!n){var r=t.getElementById(e[1]);return r?r.id===e[1]||"undefined"!=typeof r.getAttributeNode&&r.getAttributeNode("id").nodeValue===e[1]?[r]:F:[]}},T.filter.ID=function(e,t){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&n&&n.nodeValue===t}),x.removeChild(i),x=i=null,(t=L.createElement("div")).appendChild(L.createComment("")),0

",!e.querySelectorAll||0!==e.querySelectorAll(".TEST").length){for(var t in b=function(e,t,n,r){if(t=t||L,!r&&!b.isXML(t)){var i=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(e);if(i&&(1===t.nodeType||9===t.nodeType)){if(i[1])return D(t.getElementsByTagName(e),n);if(i[2]&&T.find.CLASS&&t.getElementsByClassName)return D(t.getElementsByClassName(i[2]),n)}if(9===t.nodeType){if("body"===e&&t.body)return D([t.body],n);if(i&&i[3]){var o=t.getElementById(i[3]);if(!o||!o.parentNode)return D([],n);if(o.id===i[3])return D([o],n)}try{return D(t.querySelectorAll(e),n)}catch(h){}}else if(1===t.nodeType&&"object"!==t.nodeName.toLowerCase()){var a=t,s=t.getAttribute("id"),u=s||f,l=t.parentNode,c=/^\s*[+~]/.test(e);s?u=u.replace(/'/g,"\\$&"):t.setAttribute("id",u),c&&l&&(t=t.parentNode);try{if(!c||l)return D(t.querySelectorAll("[id='"+u+"'] "+e),n)}catch(p){}finally{s||a.removeAttribute("id")}}}return d(e,t,n,r)},d)b[t]=d[t];e=null}}(),function(){var e=L.documentElement,r=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(r){var i=!r.call(L.createElement("div"),"div"),o=!1;try{r.call(L.documentElement,"[test!='']:sizzle")}catch(A){o=!0}b.matchesSelector=function(e,t){if(t=t.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!b.isXML(e))try{if(o||!T.match.PSEUDO.test(t)&&!/!=/.test(t)){var n=r.call(e,t);if(n||!i||e.document&&11!==e.document.nodeType)return n}}catch(v){}return 0
",e.getElementsByClassName&&0!==e.getElementsByClassName("e").length){if(e.lastChild.className="e",1===e.getElementsByClassName("e").length)return;T.order.splice(1,0,"CLASS"),T.find.CLASS=function(e,t,n){if("undefined"!=typeof t.getElementsByClassName&&!n)return t.getElementsByClassName(e[1])},e=null}}(),L.documentElement.contains?b.contains=function(e,t){return e!==t&&(!e.contains||e.contains(t))}:L.documentElement.compareDocumentPosition?b.contains=function(e,t){return!!(16&e.compareDocumentPosition(t))}:b.contains=function(){return!1},b.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return!!t&&"HTML"!==t.nodeName};var S=function(e,t,n){for(var r,i=[],o="",a=t.nodeType?[t]:t;r=T.match.PSEUDO.exec(e);)o+=r[0],e=e.replace(T.match.PSEUDO,"");e=T.relative[e]?e+"*":e;for(var s=0,u=a.length;s]*)\/>/gi,ve=/<([\w:]+)/,be=/]","i"),Se=/checked\s*(?:[^=]|=\s*.checked.)/i, -ke=/\/(java|ecma)script/i,Ce=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},_e=w(L);Me.optgroup=Me.option,Me.tbody=Me.tfoot=Me.colgroup=Me.caption=Me.thead,Me.th=Me.td,A.support.htmlSerialize||(Me._default=[1,"div
","
"]),A.fn.extend({text:function(e){return A.access(this,function(e){return e===F?A.text(this):this.empty().append((this[0]&&this[0].ownerDocument||L).createTextNode(e))},null,e,arguments.length)},wrapAll:function(t){if(A.isFunction(t))return this.each(function(e){A(this).wrapAll(t.call(this,e))});if(this[0]){var e=A(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(n){return A.isFunction(n)?this.each(function(e){A(this).wrapInner(n.call(this,e))}):this.each(function(){var e=A(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=A.isFunction(t);return this.each(function(e){A(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(){return this.parent().each(function(){A.nodeName(this,"body")||A(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){1===this.nodeType&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){1===this.nodeType&&this.insertBefore(e,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=A.clean(arguments);return e.push.apply(e,this.toArray()),this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=this.pushStack(this,"after",arguments);return e.push.apply(e,A.clean(arguments)),e}},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)e&&!A.filter(e,[n]).length||(!t&&1===n.nodeType&&(A.cleanData(n.getElementsByTagName("*")),A.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&A.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return A.clone(this,e,t)})},html:function(e){return A.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===F)return 1===t.nodeType?t.innerHTML.replace(me,""):null;if("string"==typeof e&&!we.test(e)&&(A.support.leadingWhitespace||!ge.test(e))&&!Me[(ve.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(ye,"<$1>");try{for(;n")?e.cloneNode(!0):l(e);if(!(A.support.noCloneEvent&&A.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||A.isXMLDoc(e)))for(h(e,a),r=f(e),i=f(a),o=0;r[o];++o)i[o]&&h(r[o],i[o]);if(t&&(p(e,a),n))for(r=f(e),i=f(a),o=0;r[o];++o)p(r[o],i[o]);return r=i=null,a},clean:function(e,t,n,r){var i,o,a,s=[];"undefined"==typeof(t=t||L).createElement&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||L);for(var u,l=0;null!=(u=e[l]);l++)if("number"==typeof u&&(u+=""),u){if("string"==typeof u)if(Te.test(u)){u=u.replace(ye,"<$1>");var c,d=(ve.exec(u)||["",""])[1].toLowerCase(),f=Me[d]||Me._default,h=f[0],p=t.createElement("div"),m=_e.childNodes;for(t===L?_e.appendChild(p):w(t).appendChild(p),p.innerHTML=f[1]+u+f[2];h--;)p=p.lastChild;if(!A.support.tbody){var g=be.test(u),y="table"!==d||g?""!==f[1]||g?[]:p.childNodes:p.firstChild&&p.firstChild.childNodes;for(a=y.length-1;0<=a;--a)A.nodeName(y[a],"tbody")&&!y[a].childNodes.length&&y[a].parentNode.removeChild(y[a])}!A.support.leadingWhitespace&&ge.test(u)&&p.insertBefore(t.createTextNode(ge.exec(u)[0]),p.firstChild),u=p.childNodes,p&&(p.parentNode.removeChild(p),0)<[^<]*)*<\/script>/gi,et=/^(?:select|textarea)/i,tt=/\s+/,nt=/([?&])_=[^&]*/,rt=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,it=A.fn.load,ot={},at={},st=["*/"]+["*"];try{Re=E.href}catch(kt){(Re=L.createElement("a")).href="",Re=Re.href}We=rt.exec(Re.toLowerCase())||[],A.fn.extend({load:function(e,t,r){if("string"!=typeof e&&it)return it.apply(this,arguments);if(!this.length)return this;var n=e.indexOf(" ");if(0<=n){var i=e.slice(n,e.length);e=e.slice(0,n)}var o="GET";t&&(A.isFunction(t)?(r=t,t=F):"object"==typeof t&&(t=A.param(t,A.ajaxSettings.traditional),o="POST"));var a=this;return A.ajax({url:e,type:o,dataType:"html",data:t,complete:function(e,t,n){n=e.responseText,e.isResolved()&&(e.done(function(e){n=e}),a.html(i?A("
").append(n.replace(Qe,"")).find(i):n)),r&&a.each(r,[n,t,e])}}),this},serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?A.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||et.test(this.nodeName)||Ge.test(this.type))}).map(function(e,t){var n=A(this).val();return null==n?null:A.isArray(n)?A.map(n,function(e){return{name:t.name,value:e.replace(Ue,"\r\n")}}):{name:t.name,value:n.replace(Ue,"\r\n")}}).get()}}),A.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){A.fn[t]=function(e){return this.on(t,e)}}),A.each(["get","post"],function(e,i){A[i]=function(e,t,n,r){return A.isFunction(t)&&(r=r||n,n=t,t=F),A.ajax({type:i,url:e,data:t,success:n,dataType:r})}}),A.extend({getScript:function(e,t){return A.get(e,F,t,"script")},getJSON:function(e,t,n){return A.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?r(e,A.ajaxSettings):(t=e,e=A.ajaxSettings),r(e,t),e},ajaxSettings:{url:Re,isLocal:Ve.test(We[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":st},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":O.String,"text html":!0,"text json":A.parseJSON,"text xml":A.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:i(ot),ajaxTransport:i(at),ajax:function(e,t){function n(e,t,n,r){if(2!==x){x=2,p&&clearTimeout(p),h=F,f=r||"",D.readyState=0=s.duration+this.startTime){for(t in this.now=this.end,this.pos=this.state=1,this.update(),s.animatedProperties[this.prop]=!0,s.animatedProperties)!0!==s.animatedProperties[t]&&(o=!1);if(o){if(null!=s.overflow&&!A.support.shrinkWrapBlocks&&A.each(["","X","Y"],function(e,t){a.style["overflow"+t]=s.overflow[e]}),s.hide&&A(a).hide(),s.hide||s.show)for(t in s.animatedProperties)A.style(a,t,s.orig[t]),A.removeData(a,"fxshow"+t,!0),A.removeData(a,"toggle"+t,!0);(r=s.complete)&&(s.complete=!1,r.call(a))}return!1}return s.duration==Infinity?this.now=i:(n=i-this.startTime,this.state=n/s.duration,this.pos=A.easing[s.animatedProperties[this.prop]](this.state,n,0,1,s.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},A.extend(A.fx,{tick:function(){for(var e,t=A.timers,n=0;n=r[u]?r[s]:Math.max(e.body[u],r[u],e.body[l],r[l]):n===F?(o=A.css(e,t),a=parseFloat(o),A.isNumeric(a)?a:o):void A(e).css(t,n)},n,e,arguments.length,null)}}),O.jQuery=O.$=A,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return A})}(window),function(){var e;e="undefined"!=typeof module&&"undefined"!=typeof module.exports?require("./pnglib"):window.PNGlib;var t=function(e,t,n){if("string"!=typeof e||e.length<15)throw"A hash of at least 15 characters is required.";this.defaults={background:[240,240,240,255],margin:.08,size:64,saturation:.7,brightness:.5,format:"png"},this.options="object"==typeof t?t:this.defaults,"number"==typeof t&&(this.options.size=t),n&&(this.options.margin=n),this.hash=e,this.background=this.options.background||this.defaults.background,this.size=this.options.size||this.defaults.size,this.format=this.options.format||this.defaults.format,this.margin=this.options.margin!==undefined?this.options.margin:this.defaults.margin;var r=parseInt(this.hash.substr(-7),16)/268435455,i=this.options.saturation||this.defaults.saturation,o=this.options.brightness||this.defaults.brightness;this.foreground=this.options.foreground||this.hsl2rgb(r,i,o)};t.prototype={background:null,foreground:null,hash:null,margin:null,size:null,format:null,image:function(){return this.isSvg()?new n(this.size,this.foreground,this.background):new e(this.size,this.size,256)},render:function(){var e,t,n=this.image(),r=this.size,i=Math.floor(r*this.margin),o=Math.floor((r-2*i)/5),a=Math.floor((r-5*o)/2),s=n.color.apply(n,this.background),u=n.color.apply(n,this.foreground);for(e=0;e<15;e++)t=parseInt(this.hash.charAt(e),16)%2?s:u,e<5?this.rectangle(2*o+a,e*o+a,o,o,t,n):e<10?(this.rectangle(1*o+a,(e-5)*o+a,o,o,t,n),this.rectangle(3*o+a,(e-5)*o+a,o,o,t,n)):e<15&&( -this.rectangle(0*o+a,(e-10)*o+a,o,o,t,n),this.rectangle(4*o+a,(e-10)*o+a,o,o,t,n));return n},rectangle:function(e,t,n,r,i,o){var a,s;if(this.isSvg())o.rectangles.push({x:e,y:t,w:n,h:r,color:i});else for(a=e;a",e=0;e");return t+=""},getBase64:function(){if("function"==typeof btoa)return btoa(this.getDump());if(Buffer)return new Buffer(this.getDump(),"binary").toString("base64");throw"Cannot generate base64 output"}},"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=t:window.Identicon=t}(),function(){var o=Date,a=Date.CultureStrings?Date.CultureStrings.lang:null,r={},i={getFromKey:function(e,t){var n;return n=Date.CultureStrings&&Date.CultureStrings[t]&&Date.CultureStrings[t][e]?Date.CultureStrings[t][e]:i.buildFromDefault(e),"/"===e.charAt(0)&&(n=i.buildFromRegex(e,t)),n},getFromObjectValues:function(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=i.getFromKey(e[n],t));return r},getFromObjectKeys:function(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[i.getFromKey(n,t)]=e[n]);return r},getFromArray:function(e,t){for(var n=[],r=0;r=e.getTime()&&this.getTime()<=t.getTime()},e.isAfter=function(e){return 1===this.compareTo(e||new Date)},e.isBefore=function(e){return-1===this.compareTo(e||new Date)},e.isToday=e.isSameDay=function(e){return this.clone().clearTime().equals((e||new Date).clone().clearTime())},e.addMilliseconds=function(e){return e&&this.setTime(this.getTime()+1*e),this},e.addSeconds=function(e){return e?this.addMilliseconds(1e3*e):this},e.addMinutes=function(e){return e?this.addMilliseconds(6e4*e):this},e.addHours=function(e){return e?this.addMilliseconds(36e5*e):this},e.addDays=function(e){return e&&this.setDate(this.getDate()+1*e),this},e.addWeekdays=function(e){if(!e)return this;var t=this.getDay(),n=Math.ceil(Math.abs(e)/7);if((0===t||6===t)&&0o.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");return e=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond),this.year<100&&e.setFullYear(this.year),this.timezone?e.set({timezone:this.timezone}):this.timezoneOffset&&e.set({timezoneOffset:this.timezoneOffset}),e},finish:function(e){var t,n,r;if(0===(e=e instanceof Array?a(e):[e]).length)return null;for(t=0;t":".","?":"/","|":"\\"},c={option:"alt",command:"meta","return":"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"};for(t=1;t<20;++t)u[111+t]="f"+t;for(t=0;t<=9;++t)u[t+96]=t.toString();T.prototype.bind=function(e,t,n){return e=e instanceof Array?e:[e],this._bindMultiple.call(this,e,t,n),this},T.prototype.unbind=function(e,t){return this.bind.call(this,e,function(){},t)},T.prototype.trigger=function(e,t){return this._directMap[e+":"+t]&&this._directMap[e+":"+t]({},e),this},T.prototype.reset=function(){return this._callbacks={},this._directMap={},this},T.prototype.stopCallback=function(e,t){return!(-1<(" "+t.className+" ").indexOf(" mousetrap ")||o(t,this.target))&&("INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable)},T.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)},T.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(u[t]=e[t]);s=null},T.init=function(){var e,t=T(n);for(e in t)"_"!==e.charAt(0)&&(T[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},T.init(),e.Mousetrap=T,"undefined"!=typeof module&&module.exports&&(module.exports=T),"function"==typeof define&&define.amd&&define(function(){return T})}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ClipboardJS=t():e.ClipboardJS=t()}(this,function(){return function(n){function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var r={};return i.m=n,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function r(e,t){for(var n=0;n/"+uploadDest+"/[filename]",action:routePath("upload_file")}],OK:function(){$("#wiki-content").addClass("uploading");var e=new FormData($("#upload").get(0)),t=$("#upload").attr("action");$.ajax({url:t,type:"POST",data:e,processData:!1,contentType:!1,success:function(){$("#wiki-content").removeClass("uploading"),flashNotice("success","Your file was successfully uploaded.")},error:function(e,t,n){$("#wiki-content").removeClass("uploading"),409==e.status?flashNotice("error","The file you tried to upload already exists. Please rename the file and try again."):flashNotice("error","Error uploading file: "+t+" "+n)}})}}),$("#gollum-dialog-action-ok").attr("disabled",!0),$("input:file").on("change",function(){$(this).val()&&(filename=$("input[type=file]").val().split("\\").pop(),upload_path="/"+uploadDest+"/"+filename,clipboard_button='',news="Your uploaded file will be accessible at
"+clipboard_button+" "+upload_path,$(".context").html(news),$("#gollum-dialog-action-ok").attr("disabled",!1))})})),$(".minibutton-rename-page").length&&($(".minibutton-rename-page").parent().removeClass("jaws"),$(".minibutton-rename-page").click(function(e){e.preventDefault();var a=decodeURI(pagePath()),s=decodeURI(pageName()),t="Renamed page will be under "+htmlEscape(cleanPath(a))+" unless an absolute path is given.";$.GollumDialog.init({title:"Rename Page",fields:[{id:"name",name:"Rename to",type:"text",defaultValue:s||"",context:t}],OK:function(e){var t="Rename Page";e.name&&(t=e.name);var n=abspath(a,t),r=n[0],i="/"+a==r?"Renamed "+s+" to "+t:"Renamed "+s+" to "+n.join("/"),o=$("form[name=rename]");o.children("input[name=rename]").val(n.join("/")),o.children("input[name=message]").val(i),o.submit()}})})),$(".minibutton-new-page").length&&($(".minibutton-new-page").parent().removeClass("jaws"),$(".minibutton-new-page").click(function(e){e.preventDefault();var o=pagePath();o===undefined&&0!=$("#file-browser").length&&(o=window.location.pathname.replace(routePath("overview"),""));var t="Page will be created under "+htmlEscape(cleanPath(o))+" unless an absolute path is given.";$.GollumDialog.init({title:"Create New Page",fields:[{id:"name",name:"Page Name",type:"text",defaultValue:"",context:t}],OK:function(e){var t="New Page";e.name&&(t=e.name);for(var n=[],r=abspath(o,t).join("/").split("/"),i=0;i").attr({type:"hidden",id:$(e).val(),name:"versions[]",value:$(e).val()}).appendTo($("#selection-form")),i()},u=function(e){$("#selection-form #"+$(e).val()).remove(),$(e).closest("li").removeClass(a.join(" ")),i()},l=function(){$("#version-form input").on("change",function(){this.checked?s(this):u(this)})};l(),i();var c=function(e){e.preventDefault(),$(this).hasClass("disabled")||$.ajax({url:$(this).attr("href"),type:"GET",success:function(e){var t=$("#page-history-list",e),n=$("#pagination",e);["#next","#prev"].forEach(function(e){old_btn=$("#pagination "+e),new_btn=n.find(e),old_btn.attr("href",new_btn.attr("href")),new_btn.hasClass("disabled")?old_btn.addClass("disabled"):old_btn.removeClass("disabled")}),$("#page-history-list").replaceWith(t),l(),i()},error:function(e,t,n){console.log("something went wrong: "+t+n)}}),this.blur()};$("#pagination #next, #pagination #prev").each(function(e,t){$(t).on("click",c)})}if($("#last-edit").length&&$("#page-info-toggle").click(function(){$.ajax({url:routePath("last_commit_info"),data:{path:$("#page-info-toggle").data("pagepath")},success:function(e){var t=showLocalTime?getLocalTime(e.date):e.date;$("#last-edit").next(".dotted-spinner").toggleClass("hidden"),$("#last-edit-in-progress").html("Last edited by "+e.author+", "+t)}}),$("#last-edit").next(".dotted-spinner").toggleClass("hidden"),$("#page-info-toggle").before(' Getting commit info...').remove()}),$("#wiki-wrapper.create").length&&($("#gollum-editor-submit").click(function(){window.onbeforeunload=null}),$("#gollum-editor-body").one("change",function(){window.onbeforeunload=function(){return"Leaving will not create a new page!"}}),$.GollumEditor({NewFile:!0,MarkupType:default_markup,commands:r})),$("#search-results").length){$(".toggle-context").each(function(){var e=$(this).parent().next("div.search-context").find("li:hidden");e.length?$(this).click(function(){e.toggle(),$(this).toggle()}):$(this).toggle()});var d=new RegExp(searchTerms.join("|"),"gi");$("div.search-context li span").each(function(){var e=$(this).html().replace(/"/g,""").replace(/'/g,"'").replace(d,function(e){return''+e+""});$(this).html(e)})}if($(".markdown-body").length&&(preparePage(),(match=new RegExp(/[?&]redirected\_from=([^?]*)/).exec(window.location.href))&&(notice="The page you requested was renamed or moved. You've been successfully redirected to its new location.",flashNotice("success",notice)),Mousetrap.bind(["e"],function(e){return e.preventDefault(),window.location=routePath("edit")+"/"+pageFullPath,!1}),$.markupSupportsEditableSections(pageFormat)&&$("a.anchor").each(function(e,t){if(header=$(t).closest(":header"),header.hasClass("editable")){var n=routePath("edit")+"/"+pageFullPath+$(t).attr("href");$(t).clone().addClass("edit").attr("href",n).appendTo(header)}})),$("#wiki-history").length||$("#page-history").length){var f={format:"svg",background:[255,255,255,255]};$("img.identicon").each(function(e,t){var n=$(t),r=n.data("identicon"),i=new Identicon(r,f).toString();i="data:image/svg+xml;base64,"+i,n.attr("src",i)})}}),function(r){var i={debugOn:!1,markupCreated:!1,markup:"",currentAspect:function(){return window.innerWidth<480?"small-mobile":"fixed"==r("#gollum-dialog-dialog").css("position")?"large-mobile":"desktop"},attachEvents:function(t){r("#gollum-dialog-action-ok").click(function(e){i.eventOK(e,t)}),r("#gollum-dialog-action-cancel").click(i.eventCancel),r('#gollum-dialog-dialog input[type="text"]').keydown(function(e){13==e.keyCode&&i.eventOK(e,t)})},detachEvents:function(){r("#gollum-dialog-action-ok").unbind("click"),r("#gollum-dialog-action-cancel").unbind("click")},createFieldMarkup:function(e){for(var t="
",n=0;n"}return t+="
"},createFieldText:function(e){var t="";return e.name&&(t+=""),t+=''),e.context&&(t+=''+e.context+""),t},createFieldFile:function(e){var t="",n=e.id||"upload",r=e.name||"file";return t+='
',t+='',t+="",e.context&&(t+=''+e.context+""),t},createMarkup:function(e,t){return i.markupCreated=!0,'

'+e+'

'+t+'
'},eventCancel:function(e){e.preventDefault(),o("Cancelled dialog."),i.hide()},eventOK:function(e,t){e.preventDefault();var n=[];r("#gollum-dialog-dialog-body input").each(function(){n[r(this).attr("name")]=r(this).val()}),t&&"function"==typeof t&&t(n),i.hide()},hide:function(){r.browser.msie?(r("#gollum-dialog-dialog").hide().removeClass("active"),r("select").css("visibility","visible")):(r("#gollum-dialog-dialog").animate({opacity:0},{duration:200,complete:function(){r("#gollum-dialog-dialog").removeClass("active"),r("#gollum-dialog-dialog").css("display","none")}}),r(window).unbind("resize",i.resize))},init:function(e){var t="",n="";e&&"object"==typeof e?(e.body&&"string"==typeof e.body&&(n="

"+e.body+"

"),e.fields&&"object"==typeof e.fields&&(n+=i.createFieldMarkup(e.fields)),e.title&&"string"==typeof e.title&&(t=e.title),i.markupCreated&&r("#gollum-dialog-dialog").remove(),i.markup=i.createMarkup(t,n),r("body").append(i.markup),e.OK&&"function"==typeof e.OK&&i.attachEvents(e.OK),i.show()):o("Editor Dialog: Cannot init; invalid init object")},show:function(){i.markupCreated?(o("Showing dialog"),r.browser.msie?(r("#gollum-dialog.dialog").addClass("active"),i.position(),r("select").css("visibility","hidden")):(r("#gollum-dialog.dialog").css("display","none"),r("#gollum-dialog-dialog").animate({opacity:0},{duration:0,complete:function(){r("#gollum-dialog-dialog").css("display","block"),i.position(),r("#gollum-dialog-dialog").animate({opacity:1},{duration:500}),r(r('#gollum-dialog-dialog input[type="text"]').get(0)).focus()}})),r(window).bind("resize",i.resize)):o("Dialog: No markup to show. Please use init first.")},resize:function(){i.position()},position:function(){if("small-mobile"==i.currentAspect())r("#gollum-dialog-dialog-inner").css("height","100%").css("margin-top","auto");else if("large-mobile"==i.currentAspect())r("#gollum-dialog-dialog-inner").css("height","auto").css("margin-top","auto");else if("desktop"==i.currentAspect()){var e=r("#gollum-dialog-dialog-inner").height();r("#gollum-dialog-dialog-inner").css("height",e+"px").css("margin-top",-1*parseInt(e/2))}}},o=function(e){i.debugOn&&"undefined"!=typeof console&&console.log(e)};r.GollumDialog=i}(jQuery),function(n){var t={_PLACEHOLDERS:[],_p:function(e){this.fieldObject=e,this.placeholderText=e.val();var t=e.val();e.addClass("ph"),e.blur(function(){""==n(this).val()&&(n(this).val(t),n(this).addClass("ph"))}),e.focus(function(){n(this).removeClass("ph"),n(this).val()==t?n(this).val(""):n(this)[0].select()})},add:function(e){t._PLACEHOLDERS.push(new t._p(e))},clearAll:function(){for(var e=0;e div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n),u=!0}}var t,a,s=document.attachEvent,u=!1,l=e.fn.resize;if(e.fn.resize=function(e){return this.each(function(){this==window?l.call(jQuery(this),e):addResizeListener(this,e)})},e.fn.removeResize=function(e){return this.each(function(){removeResizeListener(this,e)})},!s){var c=(a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)},function(e){return a(e)}),d=(t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(e){return t(e)}),f=!1,h="",p="animationstart",m="Webkit Moz O ms".split(" "),g="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),y="",v=document.createElement("fakeelement");if(v.style.animationName!==undefined&&(f=!0),!1===f)for(var b=0;b
',t.appendChild(t.__resizeTriggers__),r(t),t.addEventListener("scroll",n,!0),p&&t.__resizeTriggers__.addEventListener(p,function(e){e.animationName==T&&r(t)})),t.__resizeListeners__.push(e))},window.removeResizeListener=function(e,t){s?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",n),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))}}(jQuery),Array.prototype.includes||(Array.prototype.includes=function(e){return 0<=this.indexOf(e)}); \ No newline at end of file diff --git a/lib/gollum/public/assets/app-eb6effc9f708916af14718a5c9d2a5028625664f62c2528e5989538537f3f4a8.js.gz b/lib/gollum/public/assets/app-eb6effc9f708916af14718a5c9d2a5028625664f62c2528e5989538537f3f4a8.js.gz deleted file mode 100644 index bfd02f95..00000000 Binary files a/lib/gollum/public/assets/app-eb6effc9f708916af14718a5c9d2a5028625664f62c2528e5989538537f3f4a8.js.gz and /dev/null differ diff --git a/lib/gollum/public/assets/criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css.gz b/lib/gollum/public/assets/criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css.gz index 343ad328..af69d816 100644 Binary files a/lib/gollum/public/assets/criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css.gz and b/lib/gollum/public/assets/criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css.gz differ diff --git a/lib/gollum/public/assets/editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js.gz b/lib/gollum/public/assets/editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js.gz index 42decdbd..e0ec9c80 100644 Binary files a/lib/gollum/public/assets/editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js.gz and b/lib/gollum/public/assets/editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js.gz differ diff --git a/lib/gollum/public/assets/print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css.gz b/lib/gollum/public/assets/print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css.gz index c4a9abda..eb412f47 100644 Binary files a/lib/gollum/public/assets/print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css.gz and b/lib/gollum/public/assets/print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css.gz differ diff --git a/lib/gollum/public/gollum/javascript/app.js b/lib/gollum/public/gollum/javascript/app.js index 4c03dfc2..f65cb993 100644 --- a/lib/gollum/public/gollum/javascript/app.js +++ b/lib/gollum/public/gollum/javascript/app.js @@ -1,7 +1,10 @@ +// Require vendor assets from installed Node modules. +//= require mousetrap/mousetrap.min + +// Require application assets. //= require jquery-1.7.2.min //= require identicon //= require date.min -//= require mousetrap.min //= require clipboard.min //= require gollum //= require gollum.dialog diff --git a/lib/gollum/public/gollum/javascript/mousetrap.min.js b/lib/gollum/public/gollum/javascript/mousetrap.min.js deleted file mode 100644 index b50e0188..00000000 --- a/lib/gollum/public/gollum/javascript/mousetrap.min.js +++ /dev/null @@ -1,11 +0,0 @@ -/* mousetrap v1.6.1 craig.is/killing/mice */ -(function(r,v,f){function w(a,b,g){a.addEventListener?a.addEventListener(b,g,!1):a.attachEvent("on"+b,g)}function A(a){if("keypress"==a.type){var b=String.fromCharCode(a.which);a.shiftKey||(b=b.toLowerCase());return b}return p[a.which]?p[a.which]:t[a.which]?t[a.which]:String.fromCharCode(a.which).toLowerCase()}function F(a){var b=[];a.shiftKey&&b.push("shift");a.altKey&&b.push("alt");a.ctrlKey&&b.push("ctrl");a.metaKey&&b.push("meta");return b}function x(a){return"shift"==a||"ctrl"==a||"alt"==a|| -"meta"==a}function B(a,b){var g,c,d,f=[];g=a;"+"===g?g=["+"]:(g=g.replace(/\+{2}/g,"+plus"),g=g.split("+"));for(d=0;dq||p.hasOwnProperty(q)&&(n[p[q]]=q)}d=n[g]?"keydown":"keypress"}"keypress"==d&&f.length&&(d="keydown");return{key:c,modifiers:f,action:d}}function E(a,b){return null===a||a===v?!1:a===b?!0:E(a.parentNode,b)}function c(a){function b(a){a= -a||{};var b=!1,l;for(l in n)a[l]?b=!0:n[l]=0;b||(y=!1)}function g(a,b,u,e,c,g){var l,m,k=[],f=u.type;if(!h._callbacks[a])return[];"keyup"==f&&x(a)&&(b=[a]);for(l=0;l":".","?":"/","|":"\\"},C={option:"alt",command:"meta","return":"enter", -escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},n;for(f=1;20>f;++f)p[111+f]="f"+f;for(f=0;9>=f;++f)p[f+96]=f.toString();c.prototype.bind=function(a,b,c){a=a instanceof Array?a:[a];this._bindMultiple.call(this,a,b,c);return this};c.prototype.unbind=function(a,b){return this.bind.call(this,a,function(){},b)};c.prototype.trigger=function(a,b){if(this._directMap[a+":"+b])this._directMap[a+":"+b]({},a);return this};c.prototype.reset=function(){this._callbacks={}; -this._directMap={};return this};c.prototype.stopCallback=function(a,b){return-1<(" "+b.className+" ").indexOf(" mousetrap ")||E(b,this.target)?!1:"INPUT"==b.tagName||"SELECT"==b.tagName||"TEXTAREA"==b.tagName||b.isContentEditable};c.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)};c.addKeycodes=function(a){for(var b in a)a.hasOwnProperty(b)&&(p[b]=a[b]);n=null};c.init=function(){var a=c(v),b;for(b in a)"_"!==b.charAt(0)&&(c[b]=function(b){return function(){return a[b].apply(a, -arguments)}}(b))};c.init();r.Mousetrap=c;"undefined"!==typeof module&&module.exports&&(module.exports=c);"function"===typeof define&&define.amd&&define(function(){return c})}})("undefined"!==typeof window?window:null,"undefined"!==typeof window?document:null); diff --git a/package.json b/package.json new file mode 100644 index 00000000..22ee069e --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "dependencies": { + "mousetrap": "^1.6.5" + }, + "engines": { + "node" : ">=16.15.0" + } +} diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..58fc55dc --- /dev/null +++ b/yarn.lock @@ -0,0 +1,8 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +mousetrap@^1.6.5: + version "1.6.5" + resolved "https://registry.yarnpkg.com/mousetrap/-/mousetrap-1.6.5.tgz#8a766d8c272b08393d5f56074e0b5ec183485bf9" + integrity sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==