var cull=function(){"use strict";function e(e){return!!e&&"object"==typeof e&&"number"==typeof e.length&&!e.tagName}function n(e){return"[object Array]"===P.call(e)?e:"[object Arguments]"===P.call(e)?M.call(e):"undefined"==typeof e||null===e?[]:M.call(arguments)}function t(e,n){var t,r;for(t=0,r=n.length;r>t;++t)e(n[t],t,n);return n}function r(e){return"function"==typeof e}function o(e,n,t){var r,o=0,i=t,a=n;for(2===arguments.length&&(i=n,a=i[0],o=1),"string"==typeof i&&(i=i.split("")),r=i.length;r>o;++o)a=e(a,i[o]);return a}function i(e,n){var t,r;for(t=0,r=n.length;r>t;++t)if(!e(n[t]))return!1;return!0}function a(e,n){var t,r;for(t=0,r=n.length;r>t;++t)if(e(n[t]))return!0;return!1}function u(e,n){var t,r,o,i;for(t=0,r=n.length;r>t;++t)if(e(n[t])?o=!0:i=!0,o&&i)return!0;return!1}function s(e){return e.trim&&e.trim()||e.replace(/^\s+|\s+$/,"")}function c(e){return e}function l(e){return"undefined"!=typeof e&&null!==e}function f(e){return function(n){return e.call(this,n)}}function p(e){return function(n){return n[e]}}function d(e,t){return function(r){return r[e].apply(r,n(t))}}function h(e){return function(n){return e===n}}function m(e,t){var r=n(e);return function(){for(var e=r.length,n=arguments;e--;)n=[r[e].apply(t||this,n)];return n[0]}}function g(){var e=arguments;return function(n){return n.apply(this,e)}}function v(e){var n=M.call(arguments,1);return function(){return e.apply(this,n.concat(M.call(arguments)))}}function y(e,n){var t="string"==typeof n?e[n]:n,r=M.call(arguments,2);return function(){return t.apply(e,r.concat(M.call(arguments)))}}function w(n){var t,r,o=[];for(t=0,r=n.length;r>t;t++)o=o.concat(e(n[t])?w(n[t]):n[t]);return o}function b(e,n){var t,r;for(t=0,r=n.length;r>t;++t)if(e===n[t])return t;return-1}function x(e){var n,t,r=[];for(n=0,t=e.length;t>n;++n)b(e[n],r)<0&&r.push(e[n]);return r}function E(e,n){var t,r;for(t=0,r=n.length;r>t;++t)if(e(n[t]))return n[t]}function _(e,n){var t,r,o=[];for(t=0,r=n.length;r>t;++t)e(n[t])&&o.push(n[t]);return o}function q(e,n){return _(function(e){return b(e,n)<0},e)}function C(e){var n,t=[];for(n in e)e.hasOwnProperty(n)&&t.push(n);return t}function A(e){var n,t=[];for(n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function S(e,n){var t,r,o=[];for(t=0,r=n.length;r>t;t++)o.push(e(n[t]));return o}function j(e){return function(){return!e.apply(this,arguments)}}function k(e,n){return _(j(e),n)}function N(e,t){return n(e).concat(n(t))}function T(e,n){var t,r,o=[];for(t=0,r=n.length;r>t;t+=e)o.push(n.slice(t,t+e));return o}function $(e,n){return I(S(e,I(n)))}function H(e,n){return o(N,S(e,n))}function L(e,n){var t,r,o=[];for(t=0,r=n.length;r>t;t+=1)o.push(n[t]),r-1>t&&o.push(e);return o}function z(e,n,t){var r=e[n];e[n]=function(){var e=r.apply(this,arguments),n=t.apply(this,[e].concat(M.call(arguments)));return"undefined"!=typeof n?n:e}}function O(e,n,t){var r=e[n];e[n]=function(){return t.apply(this,arguments),r.apply(this,arguments)}}function R(e,n,t){var r=v(t,e[n]);e[n]=function(){return r.apply(this,arguments)}}var M=Array.prototype.slice,P=Object.prototype.toString,I=v(_,l);return{trim:s,doall:t,reduce:o,all:i,some:a,onlySome:u,isFunction:r,isList:e,toList:n,identity:c,defined:l,unary:f,prop:p,func:d,eq:h,compose:m,callWith:g,partial:v,bind:y,keys:C,values:A,concat:N,flatten:w,uniq:x,first:E,select:_,negate:j,reject:k,seldef:I,map:S,mapdef:$,mapcat:H,partition:T,difference:q,interpose:L,indexOf:b,after:z,before:O,around:R}}(this);"function"==typeof require&&"undefined"!=typeof module&&(module.exports=cull);var dome=function(e){function n(t){if(e.isList(t))return e.flatten(e.map(n,t));for(var r=[],o=t.firstChild;o;)1===o.nodeType&&r.push(o),o=o.nextSibling;return r}function t(e){return document.getElementById(e)}function r(e,n){var t=n||document;if(t.getElementsByClassName)return t.getElementsByClassName(e);var r,o,i=t.getElementsByTagName("*"),a=[],u=new RegExp("(^|\\s)"+e+"(\\s|$)");for(r=0,o=i.length;o>r;++r)u.test(i[r].className)&&a.push(i[r]);return a}function o(e){e.parentNode.removeChild(e)}function i(e,n){e.parentNode&&(e.parentNode.insertBefore(n,e),e.parentNode.removeChild(e))}function a(e,n){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return t.test(n.className)}function u(n,t){return e.isList(t)?e.doall(e.partial(u,n),t):(a(n,t)||(t.className=e.trim(t.className+" "+n)),void 0)}function s(n,t){if(e.isList(t))return e.doall(e.partial(s,n),t);if(a(n,t)){var r=new RegExp("\\b"+n+"\\b","g");t.className=e.trim(t.className.replace(r,""))}}function c(e){var n=e.nodeType;if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;var t="";for(e=e.firstChild;e;e=e.nextSibling)t+=c(e);return t}return 3===n||4===n?e.nodeValue:""}function l(n){var t=document.createDocumentFragment();return e.doall(e.bind(t,"appendChild"),e.toList(n)),t}function f(e){return e?("number"!=typeof e._dome_uuid&&(e._dome_uuid=w++),e._dome_uuid):null}function p(e,n){if(!n||!e)return!1;var t=f(e);if(b[t]||(b[t]={}),b[t][f(n)])return!0;for(var r=[];n&&n!==e;)r.push(f(n)),n=n.parentNode;for(var o=!!n,i=0,a=r.length;a>i;i++)b[t][r[i]]=o;return o}function d(e,n){var t;e=e||{};for(t in e)e.hasOwnProperty(t)&&(n.setAttribute("data-"+t,e[t]),n["data-"+t]=e[t])}function h(e,n){return n.getAttribute("data-"+e)}function m(e,n){var t,r;e=e||{};for(t in e)e.hasOwnProperty(t)&&(r=E[t],r?r(n,e[t]):n[t]=e[t])}function g(n,t){n=e.toList(n);var r,o;for(r=0,o=n.length;o>r;++r)"string"==typeof n[r]?t.appendChild(document.createTextNode(n[r])):t.appendChild(n[r])}function v(e,n){n.innerHTML="",g(e,n)}var y,w=0,b={},x=function(n){return null!==n&&"undefined"!=typeof n&&("undefined"!=typeof n.nodeType||"string"==typeof n||e.isList(n))},E={style:function(e,n){var t;for(t in n)n.hasOwnProperty(t)&&(e.style[t]=n[t])},data:function(e,n){d(n,e)}};return y=function(e,n,t){if(!t&&x(n))return y(e,{},n);var r=document.createElement(e);return m(n,r),g(t||[],r),r},y.toString=function(){return"dome.el()"},e.doall(function(n){y[n]=e.partial(y,n)},["a","br","div","fieldset","form","h2","h3","h4","h5","img","input","label","li","p","span","strong","textarea","ul","span","select","option","ol","iframe","table","tr","td","pre","button","i"]),{propmap:E,el:y,setProp:m,append:g,setContent:v,children:n,id:t,byClass:r,remove:o,replace:i,frag:l,text:c,data:{get:h,set:d},cn:{has:a,add:u,rm:s},uuid:f,contains:p}}(this.cull);!function(e,n){function t(e,n){return/^(?:function|object|unknown)$/.test(typeof e[n])}function r(e,n){return function(t){n.call(c[e],t||window.event)}}function o(e,n){return{handler:n,wrappedHandler:r(e,n)}}function i(e,n,t,r){a(n,t,function(n){e(n.target,t,n)&&r.call(n.target,n)})}var a,u,s=function(){if("undefined"!=typeof document.documentElement.uniqueID)return function(e){return e.uniqueID};var e=0;return function(n){return n.__uniqueID||(n.__uniqueID="uniqueID__"+e,e+=1),n.__uniqueID}}(),c={},l=document.documentElement;if(t(l,"addEventListener")&&t(l,"removeEventListener")&&t(window,"addEventListener")&&t(window,"removeEventListener"))a=function(e,n,t){return e.addEventListener(n,t,!1),{cancel:function(){u(e,n,t)}}},u=function(e,n,t){e.removeEventListener(n,t,!1)};else if(t(l,"attachEvent")&&t(l,"detachEvent")&&t(window,"attachEvent")&&t("detachEvent")){var f={};a=function(e,n,t){var r=s(e);c[r]=e,f[r]||(f[r]={}),f[r][n]||(f[r][n]=[]);var i=o(r,t);return f[r][n].push(i),e.attachEvent("on"+n,i.wrappedHandler),{cancel:function(){u(e,n,t)}}},u=function(n,t,r){var o=s(n);f[o]&&f[o][t]&&(f[o][t]=e.select(function(e){return e.handler!==r?!0:(n.detachEvent("on"+t,e.wrappedHandler),void 0)},f[o][t]))}}i.bycn=function(t,r,o,a){i(e.partial(n.cn.has,t),r,o,a)},dome.events={mouseenter:function(e,n){var t=null,r=a(e,"mouseover",function(r){t!==e&&(n.call(e,r),t=e)}),o=a(e,"mouseout",function(n){var r=n.relatedTarget||n.toElement;try{r&&!r.nodeName&&(r=r.parentNode)}catch(n){return}e===r||dome.contains(e,r)||(t=null)});return{cancel:function(){r.cancel(),o.cancel()}}},mouseleave:function(e,n){return a(e,"mouseout",function(t){dome.contains(e,t.relatedTarget)||e===t.relatedTarget||n.call(e,t)})}},dome.on=function(e,n,t){return dome.events[n]?dome.events[n](e,t):a(e,n,t)},dome.off=u,dome.delegate=i,dome.propmap.events=function(n,t){e.doall(function(e){a(n,e,t[e])},e.keys(t))}}(cull,dome),!function(e,n,t){function r(e,t){var r,o=n.createElement(e||"div");for(r in t)o[r]=t[r];return o}function o(e){for(var n=1,t=arguments.length;t>n;n++)e.appendChild(arguments[n]);return e}function i(e,n,t,r){var o=["opacity",n,~~(100*e),t,r].join("-"),i=.01+100*(t/r),a=Math.max(1-(1-e)/n*(100-i),e),u=f.substring(0,f.indexOf("Animation")).toLowerCase(),s=u&&"-"+u+"-"||"";return d[o]||(h.insertRule("@"+s+"keyframes "+o+"{"+"0%{opacity:"+a+"}"+i+"%{opacity:"+e+"}"+(i+.01)+"%{opacity:1}"+(i+n)%100+"%{opacity:"+e+"}"+"100%{opacity:"+a+"}"+"}",h.cssRules.length),d[o]=1),o}function a(e,n){var r,o,i=e.style;if(i[n]!==t)return n;for(n=n.charAt(0).toUpperCase()+n.slice(1),o=0;o
"+r+"\n
",A(r)+o}),e=e.replace(/~0/,"")},C=function(e){return e+="~0",e=e.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(e,n,t){var r=n,o=t;return o=j(o),o=M(o),o=o.replace(/^\n+/g,""),o=o.replace(/\n+$/g,""),o=""+o+"\n
",A(o)}),e=e.replace(/~0/,"")},A=function(e){return e=e.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(r.push(e)-1)+"K\n\n"},S=function(e){return e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(e,n,t,r){var o=r;return o=o.replace(/^([ \t]*)/g,""),o=o.replace(/[ \t]*$/g,""),o=j(o),n+""+o+"
"})},j=function(e){return e=e.replace(/&/g,"&"),e=e.replace(//g,">"),e=P(e,"*_{}[]\\",!1)},k=function(e){return e=e.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"$2"),e=e.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"$2")},N=function(e){return e=e.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(e,n){var t=n;return t=t.replace(/^[ \t]*>[ \t]?/gm,"~0"),t=t.replace(/~0/g,""),t=t.replace(/^[ \t]+$/gm,""),t=m(t),t=t.replace(/(^|\n)/g,"$1 "),t=t.replace(/(\s*[^\r]+?<\/pre>)/gm,function(e,n){var t=n;return t=t.replace(/^ /gm,"~0"),t=t.replace(/~0/g,"")}),A("\n"+t+"\n")})},T=function(e){e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,"");for(var n=e.split(/\n{2,}/g),t=[],o=n.length,i=0;o>i;i++){var a=n[i];a.search(/~K(\d+)K/g)>=0?t.push(a):a.search(/\S/)>=0&&(a=g(a),a=a.replace(/^([ \t]*)/g,""),a+="
",t.push(a))}o=t.length;for(var i=0;o>i;i++)for(;t[i].search(/~K(\d+)K/)>=0;){var u=r[RegExp.$1];u=u.replace(/\$/g,"$$$$"),t[i]=t[i].replace(/~K\d+K/,u)}return t.join("\n\n")},$=function(e){return e=e.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),e=e.replace(/<(?![a-z\/?\$!])/gi,"<")},H=function(e){return e=e.replace(/\\(\\)/g,I),e=e.replace(/\\([`*_{}\[\]()>#+-.!])/g,I)},L=function(e){return e=e.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,'$1'),e=e.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(e,n){return z(O(n))})},z=function(e){var n=[function(e){return""+e.charCodeAt(0)+";"},function(e){return""+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e="mailto:"+e,e=e.replace(/./g,function(e){if("@"==e)e=n[Math.floor(2*Math.random())](e);else if(":"!=e){var t=Math.random();e=t>.9?n[2](e):t>.45?n[1](e):n[0](e)}return e}),e=''+e+"",e=e.replace(/">.+:/g,'">')},O=function(e){return e=e.replace(/~E(\d+)E/g,function(e,n){var t=parseInt(n);return String.fromCharCode(t)})},R=function(e){return e=e.replace(/^(\t|[ ]{1,4})/gm,"~0"),e=e.replace(/~0/g,"")},M=function(e){return e=e.replace(/\t(?=\t)/g," "),e=e.replace(/\t/g,"~A~B"),e=e.replace(/~B(.+?)~A/g,function(e,n){for(var t=n,r=4-t.length%4,o=0;r>o;o++)t+=" ";return t}),e=e.replace(/~A/g," "),e=e.replace(/~B/g,"")},P=function(e,n,t){var r="(["+n.replace(/([\[\]\\])/g,"\\$1")+"])";t&&(r="\\\\"+r);var o=new RegExp(r,"g");return e=e.replace(o,I)},I=function(e,n){var t=n.charCodeAt(0);return"~E"+t+"E"}},"undefined"!=typeof module&&(module.exports=Showdown),"function"==typeof define&&define.amd&&define("showdown",function(){return Showdown}),function(e){"function"==typeof define&&define.amd?define([],e):this.timeago=e()}(function(){function e(e,n,t,r){var o="function"==typeof n?n(r,t):n,i=e.numbers&&e.numbers[r]||r;return o.replace(/%d/i,i)}function n(e){return e.replace(/^\s+/,"").replace(/\s+$/,"")}function t(e){this.locale=e;for(var n in o)"undefined"==typeof this.locale[n]&&(this.locale[n]=o[n])}var r,o={prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" ",numbers:[]};return t.prototype=r={locale:o,locales:{en:o},configure:function(e){var n=new t(e||r.locales.en);return n},relative:function(e){return this.inWords((new Date).getTime()-e.getTime())},inWords:function(t){var r=this.locale,o=r.prefixAgo,i=r.suffixAgo;0>t&&(o=r.prefixFromNow,i=r.suffixFromNow);var a=Math.abs(t)/1e3,u=a/60,s=u/60,c=s/24,l=c/365,f=45>a&&e(r,r.seconds,t,Math.round(a))||90>a&&e(r,r.minute,t,1)||45>u&&e(r,r.minutes,t,Math.round(u))||90>u&&e(r,r.hour,t,1)||24>s&&e(r,r.hours,t,Math.round(s))||42>s&&e(r,r.day,t,1)||30>c&&e(r,r.days,t,Math.round(c))||45>c&&e(r,r.month,t,1)||365>c&&e(r,r.months,t,Math.round(c/30))||1.5>l&&e(r,r.year,t,1)||e(r,r.years,t,Math.round(l));return f=[o,f,i].join("string"==typeof r.wordSeparator?r.wordSeparator:""),n(f)},parse:function(e){var t=n(e);return t=t.replace(/\.\d+/,""),t=t.replace(/-/,"/").replace(/-/,"/"),t=t.replace(/T/," ").replace(/Z/," UTC"),t=t.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2"),new Date(t)}},r});// Set up a global, shared app instance this.gts=this.gts||{},this.gts.app=this.uinit(),function(){var e=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};this.uinit.areEqual=function t(n,r){if(n===r)return!0;if(e(n)||!e(r))return n.length!==r.length;var i,s;for(i=0,s=n.length;i'+s+": "+(i&&i[0]||r)})}function i(n){var r=e.input({type:"text",className:"gts-ref-input"}),i=e.form({className:"gts-ref-input",events:{submit:function(e){e.preventDefault(),window.location=t(n,r.value)}}},[r]);return e.li({className:"gts-dropdown-input",events:{click:function(e){e.stopPropagation()}}},[e.strong(["Enter ref: ",i])])}function s(n,r,i){var s=[e.li({className:"dropdown-label"},[e.strong(n)])];return cull.reduce(function(n,r){var s=t(i,r[1]);return n.push(e.li(e.a({href:s},r[0]))),n},s,r.sort())}function o(t,n){return e.ul({className:"dropdown-menu"},[i(n)].concat(s("Branches",t.heads||[],n)).concat(s("Tags",t.tags||[],n)))}function u(t,n,i){return e.div({className:"dropdown gts-branch-selector pull-right"},[r(t,n),o(t,i)])}function a(e,t,n,r){var i=u(t,n,r);e.parentNode.insertBefore(i,e),e.parentNode.removeChild(e),this.gts.dropdown(i)}return a.build=u,a.getCurrentRef=n,a}(dome.el),this.gts=this.gts||{},this.gts.treeHistory=function(e,t){function n(e,t){return e.getElementsByTagName(t)}function s(t,n){return e.select(function(e){return e.name===t},n)[0]}function o(e){if(!Date.parse)return"";var t=new Date(Date.parse(e));return i[t.getMonth()]+" "+t.getDate()+" "+t.getFullYear()}function u(e){var t,n;for(t=0,n=e.length;tUnwatch',e.href=t.unwatchPath):(e.innerHTML=' Watch',e.href=t.watchPath)}function o(e,t){gts.request({url:t.unwatchPath,method:"delete",type:"js",headers:{Accept:"application/javascript, text/javascript"},success:function(n){t.watching=!1,s(e,t)},error:function(){e.innerHTML="Failed, try watching again"}})}function u(e,t){gts.request({url:t.watchPath,method:"post",type:"text",headers:{Accept:"application/javascript, text/javascript"},success:function(n){t.watching=!0,t.unwatchPath=n.getResponseHeader("location"),s(e,t)},error:function(){e.innerHTML="Failed, try unwatching again"}})}function a(e,t){gts.loading(e),t.watching?o(e,t):u(e,t)}function f(e,t){var n=dome.el("a",{className:"btn"});dome.replace(e,n),s(n,t),dome.on(n,"click",function(e){e.preventDefault(),e.stopPropagation(),a(n,t)})}function l(e,t){if(!t.clonePath)return;dome.replace(e,dome.el("a",{href:t.clonePath,className:"btn"},"Clone"))}function c(e,t){if(!t.requestMergePath)return;dome.replace(e,dome.el("li",{className:"pull-right"},[dome.el("a",{href:t.requestMergePath},[dome.el("i",{className:"icon icon-random"})," Request merge"])]))}return i.build=r,f.watch=u,f.unwatch=o,f.toggleState=a,f.render=s,{admin:i,watching:f,cloning:l,mergeRequest:c}}(dome.el),this.gts=this.gts||{},this.gts.railsLinks=function(e,t){dome.on(document.body,"click",function(n){var r=dome.data.get("method",n.target);if(!r||r==="get")return!0;n.preventDefault(),n.stopPropagation();var i=n.target.href,s=dome.el("form",{method:"post",action:i,style:{display:"none"}},[dome.el("input",{name:"_method",value:r,type:"hidden"}),dome.el("input",{name:e,value:t,type:"hidden"})]);document.body.appendChild(s),s.submit()})},this.gts=this.gts||{},this.gts.cloneNameSuggestion=function(){function e(e,t){var n=/s$/.test(e)?e:e+"s";return n+"-"+t}return function(n){function f(){if(u.value&&cull.indexOf(u.value,a)<0)return;if(i.checked){u.value=a[0];return}if(s.checked){var t=o.options[o.selectedIndex];u.value=e(t.innerHTML,r)}}var r=dome.data.get("gts-repository-to-clone",n),i=dome.id("repository_owner_type_user"),s=dome.id("repository_owner_type_group"),o=dome.id("repository_owner_id_group_select"),u=dome.id("repository_name"),a=cull.reduce(function(t,n){return t.concat(e(n.innerHTML,r))},[e(dome.data.get("gts-owner",i),r)],o.options);dome.on(i,"click",f),dome.on(s,"click",f),dome.on(o,"change",f),f()}}(),this.gts=this.gts||{},this.gts.loading=function(e,t){dome.cn.add("loading",e),e.innerHTML="",t=t||{};var n=(new Spinner({lines:t.hasOwnProperty("lines")?t.lines:8,length:t.hasOwnProperty("length")?t.length:2,width:t.hasOwnProperty("width")?t.width:2,radius:t.hasOwnProperty("radius")?t.radius:3,color:t.color||"#000",speed:t.hasOwnProperty("speed")?t.speed:1,trail:t.hasOwnProperty("trail")?t.trail:100,shadow:t.hasOwnProperty("shadow")?t.shadow:!1})).spin();n.el.style.top=t.topPos||"10px",e.appendChild(n.el);var r=t.hasOwnProperty("text")?t.text:"Loading...";if(r){var i=document.createElement("span");i.innerHTML=r,e.appendChild(i)}},this.gts=this.gts||{},this.gts.oidRefInterpolator=function(e,t,n){var r=this.gts.refSelector.getCurrentRef("heads",e.innerHTML,t);r&&(e.title=r[1],e.innerHTML=r[0])},this.gts=this.gts||{},this.gts.comments=function(e){function t(t){var n=this.gts.timeago(e.span({title:t.createdAt}));return t.createdAt===t.updatedAt?n:e.span([n,"(edited ",this.gts.timeago(e.span({title:t.updatedAt})),")"])}function n(e){console.log("Edit")}function r(t){if(!t.editPath)return"";var r=e.a({href:t.editPath,events:{click:function(e){e.preventDefault(),e.stopPropagation(),n(r.parentNode.parentNode)}}},"Edit comment");return r}function i(n){var i=n.author;return e.div({className:"gts-comment"},[e.p({innerHTML:n.body}),e.p([e.img({src:i.avatarPath}),e.a({href:i.profilePath},i.name),t(n),r(n)])])}function s(e,t){if(e.length===0)return;t.style.display="block";var n=document.createElement("div");t.appendChild(n),dome.setContent(cull.map(i,e),n)}function o(e){return e<10?"0"+e:e}function u(t,n){n.style.display="block";var r=dome.byClass("gts-comment-author-ph",n)[0];if(!r)return r;var i=new Date;return dome.replace(r,e.p([e.img({src:t.avatarPath}),e.a({href:t.profilePath},t.name)," "+o(i.getHours())+":"+o(i.getMinutes())]))}return{renderComments:s,renderComment:i,personalizeForm:u}}(dome.el),this.gts=this.gts||{},this.gts.slugify=function(){function e(e){return e.toLowerCase().replace(/[^a-z0-9_\-]+/g,"-").replace(/^\-|\-$/g,"")}function t(t,n){return n===""||e(t)===n}return function(r,i){function o(){t(s,i.value)&&(i.value=e(r.value),s=r.value)}var s=r.value;dome.on(r,"keyup",o),dome.on(r,"focus",o),o()}}(),this.gts=this.gts||{},this.gts.selectDetails=function(e){function n(n){t.innerHTML=dome.data.get("description",e.options[e.selectedIndex])}var t=document.getElementById(dome.data.get("target",e));if(!t)return;dome.on(e,"change",n),n()},gts.app.env("url",window.location.href),gts.app.env("redirect",function(e){window.location=e}),window.hasOwnProperty("onpopstate")&&(window.onpopstate=function(e){gts.app.env("url",window.location.href)}),cull.doall(function(e){e.name==="csrf-param"&>s.app.env("csrf-param",e.content),e.name==="csrf-token"&>s.app.env("csrf-token",e.content)},document.getElementsByTagName("meta")),gts.request=function(e){e.headers=e.headers||{},e.headers["X-CSRF-Token"]=gts.app.env["csrf-token"],reqwest(e)},function(){var e=document.getElementById("project_title");e&>s.app.env("project-title-input",e),e=document.getElementById("project_slug"),e&>s.app.env("project-slug-input",e)}(),gts.app.data("ref-url-template",function(e,t){return gts.url.templatize(e,{ref:t})},{depends:["url","current-ref"],serializeArgs:function(e,t){return[e.split("#")[0],t]}}),gts.app.data("repository-refs",this.gts.jsonRequest,{depends:["repository-refs-url"]}),gts.app.data("current-ref",gts.url.currentRef,{depends:["url"]}),gts.app.data("user-repo-view-state",gts.cache(gts.userRepoViewState),{depends:["user-repository-path"]}),gts.app.data("current-user",cull.prop("user"),{depends:["user-repo-view-state"]}),gts.app.data("current-repository",cull.prop("repository"),{depends:["user-repo-view-state"]}),gts.app.data("repository-watch",cull.prop("watch"),{depends:["current-repository"]}),gts.app.data("repository-admin",cull.prop("admin"),{depends:["current-repository"]}),gts.app.data("blob-region",gts.blob.regionFromUrl,{depends:["url"]}),gts.app.feature("google-analytics",gts.googleAnalytics,{depends:["analytics-account","analytics-domain-name"]}),gts.app.feature("dropdown",gts.dropdown,{elements:["dropdown"]}),gts.app.feature("ref-selector",gts.refSelector,{elements:["gts-ref-selector-ph"],depends:["repository-refs","current-ref","ref-url-template"]}),gts.app.feature("oid-ref-interpolator",gts.oidRefInterpolator,{elements:["gts-oid"],depends:["repository-refs","ref-url-template"]}),gts.app.feature("tree-history",gts.treeHistory,{elements:["gts-tree-explorer"],depends:["tree-history-url"]}),gts.app.feature("commit-linker",gts.commitLinker,{elements:["gts-body"],depends:["commit-url-template","redirect"]}),gts.app.feature("profile-menu",gts.profileMenu,{elements:["login_button"],depends:["current-user"]}),gts.app.feature("clone-url-selection",gts.cloneUrlSelection,{elements:["gts-repo-urls"]}),gts.app.feature("highlight-region",gts.blob.highlightRegion,{elements:["gts-lines"],depends:["blob-region"]}),gts.app.feature("track-blob-focus",gts.blob.trackFocus,{elements:["gts-lines"],depends:["redirect"]}),gts.app.feature("live-markdown-preview",gts.liveMarkdownPreview,{elements:["gts-live-markdown-preview"]}),gts.app.feature("timeago",gts.timeago.periodic(6e4),{elements:["timeago"]}),gts.app.feature("collapse",gts.collapse),gts.app.feature("clone-name-suggestion",gts.cloneNameSuggestion,{elements:["clone-repository-form"]}),gts.app.feature("loading",gts.loading,{elements:["loading"]}),gts.app.feature("rails-links",gts.railsLinks,{depends:["csrf-param","csrf-token"]}),gts.app.feature("repository-admin-menu",gts.repository.admin,{elements:["gts-repository-admin-ph"],depends:["repository-admin"]}),gts.app.feature("repository-watching",gts.repository.watching,{elements:["gts-watch-repository-ph"],depends:["repository-watch"]}),gts.app.feature("repository-cloning",gts.repository.cloning,{elements:["gts-clone-repository-ph"],depends:["current-repository"]}),gts.app.feature("repository-merge-request",gts.repository.mergeRequest,{elements:["gts-request-merge-ph"],depends:["current-repository"]}),gts.app.feature("slugify-project-title",gts.slugify,{depends:["project-title-input","project-slug-input"]}),gts.app.feature("select-details",gts.selectDetails,{elements:["gts-option-details"]}),setTimeout(function(){gts.app.scanEnvAttrs(document.body,"data-gts-env-"),gts.app.load(document.documentElement)},10);