You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
395 KiB

(function(){null==window.GitHub&&(window.GitHub={})}).call(this),function(){top!==window&&(alert("For security reasons, framing is not allowed."),top.location.replace(document.location))}.call(this),function(e){e.fn.caret=function(e){return"undefined"==typeof e?this[0].selectionStart:(this[0].focus(),this[0].setSelectionRange(e,e))},e.fn.caretSelection=function(e,t){return"undefined"==typeof e&&"undefined"==typeof t?[this[0].selectionStart,this[0].selectionEnd]:(this[0].focus(),this[0].setSelectionRange(e,t))}}(jQuery),function(){$(document).on("ajaxSuccess",".js-ajax-pagination",function(e,t,n,r){return this.replaceWith.apply(this,$.parseHTML(r))})}.call(this),function(){var e,t,n;t=require("github/failbot").reportError,e=function(e){return Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.name="DataRemoteError",this.message=e},e.prototype=new Error,e.prototype.constructor=e,n=function(){return $("#ajax-error-message").show(function(){return $(this).addClass("visible")})},$(document).on("ajaxError","[data-remote]",function(r,i,s,o){var a,c,u,l,d,h;if(this===r.target&&"abort"!==o&&"canceled"!==o){if(c="."+this.className.split(" ").sort().join("."),a=new e(o+" ("+i.status+") from "+c),t(a,{dataRemote:{target:$(this).inspect(),method:null!=(u=this.getAttribute("method"))?u:"GET",url:null!=(l=null!=(d=this.href)?d:this.action)?l:window.location.href,dataType:null!=(h=this.getAttribute("data-type"))?h:"intelligent guess"}}),/<html/.test(i.responseText))throw n(),r.stopImmediatePropagation(),a;return setTimeout(function(){if(!r.isDefaultPrevented())throw n(),a},0)}}),$(document).on("ajaxSend","[data-remote]",function(){return $("#ajax-error-message").hide().removeClass("visible")}),$(document).on("click",".js-ajax-error-dismiss",function(){return $("#ajax-error-message").hide().removeClass("visible"),!1})}.call(this),function(){$(document).on("ajaxSend","[data-remote]",function(e){return this!==e.target||e.isDefaultPrevented()?void 0:$(this).addClass("loading")}),$(document).on("ajaxComplete","[data-remote]",function(e){return this===e.target?$(this).removeClass("loading"):void 0})}.call(this),function(){var e,t,n,r,i,s={}.hasOwnProperty,o=[].slice;n=function(e){return console&&console.log?console.log(e):void 0},i=function(e){return console&&console.warn?console.warn(e):void 0},t=function(e,t){var n,r,i;if(e.length!==t.length)return!1;for(n=r=0,i=e.length;i>=0?i>r:r>i;n=i>=0?++r:--r)if(e[n]!==t[n])return!1;return!0},e={host:"collector.githubapp.com",type:"page_view",dimensions:{},measures:{},context:{},actor:{},image:new Image,performance:{},expectedPerformanceTimingKeys:["connectEnd","connectStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","domainLookupEnd","domainLookupStart","fetchStart","loadEventEnd","loadEventStart","navigationStart","redirectEnd","redirectStart","requestStart","responseEnd","responseStart","secureConnectionStart","unloadEventEnd","unloadEventStart"],recordPageView:function(){return this.applyMetaTags(),null==this.app?!1:null==this.host?(i("Host not set, you are doing something wrong"),!1):(this.image.src=this._src(),this._clearPerformance(),!0)},setHost:function(e){return this.host=e},setApp:function(e){return this.app=e},setDimensions:function(e){return this.dimensions=e},addDimensions:function(e){var t,n,r;null==this.dimensions&&(this.dimensions={}),n=[];for(t in e)s.call(e,t)&&(r=e[t],n.push(this.dimensions[t]=r));return n},setMeasures:function(e){return this.measures=e},setMeasures:function(e){return this.measures=e},addMeasures:function(e){var t,n,r;null==this.measures&&(this.measures={}),n=[];for(t in e)s.call(e,t)&&(r=e[t],n.push(this.measures[t]=r));return n},setContext:function(e){return this.context=e},addContext:function(e){var t,n,r;null==this.context&&(this.context={}),n=[];for(t in e)s.call(e,t)&&(r=e[t],n.push(this.context[t]=r));return n},setActor:function(e){return this.actor=e},push:function(e){return this.applyCall(e)},enablePerformance:function(){return this.performance=this._performanceTiming()},_recordSrc:function(e,t,n,r){return"//"+this.host+"/"+this.app+"/"+e+"?"+this._queryString(t,n,r)},_src:function(){return"//"+this.host+"/"+this.app+"/"+this.type+"?"+this._queryString()},_queryString:function(e,t,n){var r,i,s;return i=function(){var e,t;e=this._params(),t=[];for(r in e)s=e[r],t.push("dimensions["+r+"]="+s);return t}.call(this),i.push(this._encodeObject("dimensions",this._merge(this.dimensions,e))),i.push(this._encodeObject("measures",this._merge(this.measures,t))),null!=this.performance&&i.push(this._encodeObject("measures",{performance_timing:this.performance})),i.push(this._encodeObject("context",this._merge(this.context,n))),i.push(this._actor()),i.push(this._encodeObject("dimensions",{cid:this._clientId()})),i.join("&")},_clearPerformance:function(){return this.performance=null},_performanceTiming:function(){var e,t,n,r,i,s,o,a,c,u,l,d,h;if(null==(null!=(o=window.performance)&&null!=(a=o.timing)?a.navigationStart:void 0))return null;for(l={},c=this.expectedPerformanceTimingKeys,t=0,r=c.length;r>t;t++)n=c[t],l[n]=null!=(u=window.performance.timing[n])?u:0;h=1,s=[],e=l.navigationStart;for(n in l)d=l[n],i=0===d?null:d-e,s.push(i);return h+"-"+s.join("-")},_params:function(){return{page:this._encode(this._page()),title:this._encode(this._title()),referrer:this._encode(this._referrer()),user_agent:this._encode(this._agent()),screen_resolution:this._encode(this._screenResolution()),pixel_ratio:this._encode(this._pixelRatio()),browser_resolution:this._encode(this._browserResolution()),tz_seconds:this._encode(this._tzSeconds()),timestamp:(new Date).getTime()}},_page:function(){var e,t;try{return document.location.href}catch(t){return e=t,""}},_title:function(){var e,t;try{return document.title}catch(t){return e=t,""}},_referrer:function(){var e,t,n,r;r="";try{r=window.top.document.referrer}catch(t){if(e=t,window.parent)try{r=window.parent.document.referrer}catch(n){e=n}}return""===r&&(r=document.referrer),r},_agent:function(){var e,t;try{return navigator.userAgent}catch(t){return e=t,""}},_screenResolution:function(){var e,t;try{return screen.width+"x"+screen.height}catch(t){return e=t,"unknown"}},_pixelRatio:function(){return window.devicePixelRatio},_browserResolution:function(){var e,t,n,r,i,s;try{return s=0,n=0,"number"==typeof window.innerWidth?(s=window.innerWidth,n=window.innerHeight):null!=(null!=(r=document.documentElement)?r.clientWidth:void 0)?(s=document.documentElement.clientWidth,n=document.documentElement.clientHeight):null!=(null!=(i=document.body)?i.clientWidth:void 0)&&(s=document.body.clientWidth,n=document.body.clientHeight),s+"x"+n}catch(t){return e=t,"unknown"}},_tzSeconds:function(){var e,t;try{return-60*(new Date).getTimezoneOffset()}catch(t){return e=t,""}},_merge:function(){var e,t,n,r,i,s,a;for(s=1<=arguments.length?o.call(arguments,0):[],r={},e=0,n=s.length;n>e;e++){i=s[e];for(t in i)a=i[t],r[t]=a}return r},_encodeObject:function(e,t){var n,r,i,s,o;if(s=[],null!=Array.isArray&&Array.isArray(t)||"[object Array]"===Object.prototype.toString.call(t))for(r=0,i=t.length;i>r;r++)n=t[r],s.push(this._encodeObject(e+"[]",n));else if(t===Object(t))for(o in t)s.push(this._encodeObject(e+"["+o+"]",t[o]));else s.push(e+"="+this._encode(t));return s.join("&")},_actor:function(){var e,t,n,r,i,s,o,a;t=[],o=this.actor;for(i in o)if(a=o[i],e="dimensions[actor_"+i+"]",a.join)for(r=0,s=a.length;s>r;r++)n=a[r],t.push(e+"[]="+this._encode(n));else t.push(e+"="+this._encode(a));return t.join("&")},_getCookie:function(e){var t,n,r,i,s,o,a,c;for(o=[],s=document.cookie.split(";"),n=0,i=s.length;i>n;n++)t=s[n],a=t.trim().split("="),a.length<2||(r=a[0],c=a[1],r===e&&o.push({key:r,value:c}));return o},_clientId:function(){var e;return e=this._getClientId(),""===e&&(e=this._setClientId()),e},_getClientId:function(){var e,t,n,r,i,s,o,a,c;for(r=this._getCookie("_octo"),t=[],s=0,o=r.length;o>s;s++)n=r[s],a=n.value.split("."),i=a.shift(),"GH1"===i&&a.length>1&&(c=a.shift().split("-"),1===c.length&&(c[1]="1"),c[0]*=1,c[1]*=1,e=a.join("."),t.push([c,e]));return e="",t.length>0&&(e=t.sort().reverse()[0][1]),e},_setClientId:function(){var e,t,n,r,i;return i=(new Date).getTime(),e=Math.round(Math.random()*(Math.pow(2,31)-1))+"."+Math.round(i/1e3),t="GH1.1."+e,r=new Date(i+63072e6).toGMTString(),n="."+document.domain.split(".").reverse().slice(0,2).reverse().join("."),document.cookie="_octo="+t+"; expires="+r+"; path=/; domain="+n,e},_encode:function(e){return null!=e?window.encodeURIComponent(e):""},applyQueuedCalls:function(e){var t,n,r,i;for(i=[],n=0,r=e.length;r>n;n++)t=e[n],i.push(this.applyCall(t));return i},applyCall:function(e){var t,n;return n=e[0],t=e.slice(1),this[n]?this[n].apply(this,t):i(n+" is not a valid method")},applyMetaTags:function(){var e;return e=this.loadMetaTags(),e.host&&this.setHost(e.host),e.app&&this.setApp(e.app),this._objectIsEmpty(e.actor)||this.setActor(e.actor),this.addDimensions(e.dimensions),this.addMeasures(e.measures),this.addContext(e.context)},loadMetaTags:function(){var e,t,n,r,i,s;for(s={dimensions:{},measures:{},context:{},actor:{}},i=document.getElementsByTagName("meta"),e=0,t=i.length;t>e;e++)if(n=i[e],n.name&&n.content&&(r=n.name.match(this.octolyticsMetaTagName)))switch(r[1]){case"host":s.host=n.content;break;case"app-id":s.app=n.content;break;case"app":s.app=n.content;break;case"dimension":this._addField(s.dimensions,r[2],n);break;case"measure":this._addField(s.measures,r[2],n);break;case"context":this._addField(s.context,r[2],n);break;case"actor":this._addField(s.actor,r[2],n)}return s},_addField:function(e,t,n){return n.attributes["data-array"]?(null==e[t]&&(e[t]=[]),e[t].push(n.content)):e[t]=n.content},_objectIsEmpty:function(e){var t,n;for(t in e)if(s.call(e,t))return n=e[t],!1;return!0},octolyticsMetaTagName:/^octolytics-(host|app-id|app|dimension|measure|context|actor)-?(.*)/},window._octo?window._octo.slice&&(r=window._octo.slice(0),window._octo=e,window._octo.applyQueuedCalls(r)):window._octo=e}.call(this),function(){$(function(){_octo.push(["enablePerformance"]),_octo.push(["recordPageView"])}),$(document).on("pjax:complete",function(){_octo.push(["recordPageView"])})}.call(this),function(){var e;e=function(){return this.offsetWidth<=0&&this.offsetHeight<=0},$.visible=function(){return!e.call(this)},$.fn.hidden=function(){return this.filter(e)},$.fn.visible=function(){return this.filter($.visible)}}.call(this),define("delegated-events",["exports"],function(e){function t(e,t,n){var r=e[t];return e[t]=function(){return n.apply(e,arguments),r.apply(e,arguments)},e}function n(e,t){var n=[],r=t;do{if(1!==r.nodeType)break;var i=e.matches(r);i.length&&n.push({node:r,observers:i})}while(r=r.parentElement);return n}function r(){h.set(this,!0)}function i(){h.set(this,!0),f.set(this,!0)}function s(){return m.get(this)||null}function o(e){var t=Object.getOwnPropertyDescriptor(Event.prototype,"currentTarget");t&&Object.defineProperty(e,"currentTarget",{get:s})}function a(e){t(e,"stopPropagation",r),t(e,"stopImmediatePropagation",i),o(e);for(var s=d[e.type],a=n(s,e.target),c=0,u=a.length;u>c&&!h.get(e);c++){var l=a[c];m.set(e,l.node);for(var p=0,g=l.observers.length;g>p&&!f.get(e);p++)l.observers[p].data.call(l.node,e)}m["delete"](e)}function c(e,t,n){var r=d[e];r||(r=new SelectorSet,d[e]=r,document.addEventListener(e,a,!1)),r.add(t,n)}function u(e,t,n){var r=d[e];r&&(r.remove(t,n),r.size||(delete d[e],document.removeEventListener(e,a,!1)))}function l(e,t,n){return e.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n}))}Object.defineProperty(e,"__esModule",{value:!0}),e.on=c,e.off=u,e.fire=l;var d={},h=new WeakMap,f=new WeakMap,m=new WeakMap}),function(){var e,t,n,r,i,s,o,a,c;e=require("github/sliding-promise-queue")["default"],i=require("delegated-events").fire,r=require("github/fetch").fetchText,a=new WeakMap,o=new WeakMap,s=function(t,n){var i,s;return(i=a.get(t))||(i=new e,a.set(t,i)),n.value.trim()?(n.authenticity_token=null!=(s=t.form.elements.authenticity_token)?s.value:void 0,i.push(r(t.getAttribute("data-autocheck-url"),{method:"post",body:$.param(n),headers:{"Content-Type":"application/x-www-form-urlencoded"}}))):Promise.reject(new Error("empty"))},n=function(e,t){return c(e),e.classList.add("errored"),$(e).find("p.note").hide()},c=function(e){return e.classList.remove("errored"),e.classList.remove("warn"),$(e).find("p.note").show(),$(e).find("dd.error").remove(),$(e).find("dd.warning").remove()},t=function(e){var t,r,a,u,l,d,h;return t=$(e),a={value:e.value},i(e,"autocheck:send",a),u=$.param(a).split("&").sort().join("&"),u!==o.get(e)?(o.set(e,u),t.closest("dl.form").removeClass("errored successed"),e.classList.remove("is-autocheck-successful","is-autocheck-errored"),h=function(n){return e.classList.toggle("is-autocheck-loading",n),t.closest("dl.form").toggleClass("is-loading",n)},r=function(){return h(!1),i(e,"autocheck:complete")},l=function(t){var n;return e.classList.add("is-autocheck-successful"),n=e.closest("dl.form"),c(n),n.classList.add("successed"),i(e,"autocheck:success",t),r()},d=function(s){var o,a,u;return o=e.closest("dl.form"),"empty"===s.message?c(o):t.is($.visible)&&(e.classList.add("is-autocheck-errored"),a=(null!=(u=s.response)?u.text():void 0)||Promise.resolve("Something went wrong"),a.then(function(t){var r,a;return/<html/.test(t)&&(t="Something went wrong."),n(o),r=document.createElement("dd"),r.classList.add("error"),(null!=(a=s.response)?a.headers.get("Content-Type").match("text/html"):void 0)?r.innerHTML=t:r.textContent=t,o.append(r),i(e,"autocheck:error")})),r()},h(!0),s(e,a).then(l,d)):void 0},$(document).on("change","input[data-autocheck-url]",function(){t(this)}),$(document).onFocusedInput("input[data-autocheck-url]",function(e){return this.getAttribute("data-throttle-wait")||this.setAttribute("data-throttle-wait",300),$(this).on("throttled:input."+e,function(){t(this)}),!1})}.call(this),function(){$.fn.fire=function(e){var t,n,r,i,s;return(t=arguments[1])&&($.isPlainObject(t)?i=t:$.isFunction(t)&&(n=t)),(t=arguments[2])&&$.isFunction(t)&&(n=t),r=this[0],null==i&&(i={}),null==i.cancelable&&(i.cancelable=!!n),null==i.bubbles&&(i.bubbles=!0),s=function(){var t;return t=$.Event(e,i),$.event.trigger(t,[],r,!t.bubbles),n&&!t.isDefaultPrevented()&&n.call(r,t),t},i.async?(delete i.async,void setImmediate(s)):s()}}.call(this),define("github/hotkey",["exports"],function(e){function t(e){var t=n[e.which],i="";if(e.ctrlKey&&"ctrl"!==t&&(i+="ctrl+"),e.altKey&&"alt"!==t&&(i+="alt+"),e.metaKey&&!e.ctrlKey&&"meta"!==t&&(i+="meta+"),e.shiftKey){var s=r[e.which];return s?i+s:"shift"===t?i+"shift":t?i+"shift+"+t:null}return t?i+t:null}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=t;var n={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",91:"meta",93:"meta",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",186:"",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},r={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'}}),function(){var e,t,n;t=require("github/hotkey")["default"],n=function(e){var t,n;return e.nodeType!==Node.ELEMENT_NODE?!1:(t=e.nodeName.toLowerCase(),n=(e.getAttribute("type")||"").toLowerCase(),"select"===t||"textarea"===t||"input"===t&&"submit"!==n&&"reset"!==n)},e=function(e){var r;return null==e.hotkey&&(e.hotkey=t(e)),r=null,null==e.isFormInteraction&&(e.isFormInteraction=function(){return null!=r?r:r=n(this.target)}),e.handleObj.handler.apply(this,arguments)},$.event.special.keydown={handle:e},$.event.special.keyup={handle:e}}.call(this),function(){var e,t,n,r,i,s,o;r=e={},s=null,o=function(){return s=null,e=r},$(document).on("keydown",function(t){var n;if(!t.isFormInteraction())if(s&&clearTimeout(s),n=e[t.hotkey]){if(!("nodeType"in n))return e=n,void(s=setTimeout(o,1500));o(),$(n).fire("hotkey:activate",{originalEvent:t},function(){return $(n).is("input, textarea")?void $(n).focus():void $(n).click()}),t.preventDefault()}else o()}),t=function(e){var t,n,r,i,s;for(i=e.getAttribute("data-hotkey").split(/\s*,\s*/),s=[],n=0,r=i.length;r>n;n++)t=i[n],s.push(t.split(/\s+/));return s},n=function(e){var n,i,s,o,a,c,u,l,d;for(l=t(e),d=[],s=0,c=l.length;c>s;s++)a=l[s],u=r,d.push(function(){var t,r,s;for(s=[],i=t=0,r=a.length;r>t;i=++t)o=a[i],i<a.length-1?(n=u[o],(!n||"nodeType"in n)&&(u[o]={}),s.push(u=u[o])):s.push(u[o]=e);return s}());return d},i=function(t){var i,s,o,a;for(r=e={},o=$("[data-hotkey]"),a=[],i=0,s=o.length;s>i;i++)t=o[i],a.push(n(t));return a},$.observe("[data-hotkey]",{add:n,remove:i})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u,l,d,h,f,m,p,g,v,b,y,j,w,x,k,C,S,L,A;i=navigator.userAgent.match(/Macintosh/),g=navigator.userAgent.match(/Macintosh/)?"meta":"ctrl",c=!1,v={x:0,y:0},t=function(e){e.addEventListener("mousemove",b,!1),e.addEventListener("mouseover",y,!1)},A=function(e){e.removeEventListener("mousemove",b,!1),e.removeEventListener("mouseover",y,!1)},$.observe(".js-navigation-container",{add:t,remove:A}),b=function(e){(v.x!==e.clientX||v.y!==e.clientY)&&(c=!1),v={x:e.clientX,y:e.clientY}},y=function(e){c||$(e.target).trigger("navigation:mouseover")},$(document).on("keydown",function(e){var t,n,r;(e.target===document.body||e.target.classList.contains("js-navigation-enable"))&&(t=h())&&(c=!0,r=$(t).find(".js-navigation-item.navigation-focus")[0]||t,n=$(r).fire("navigation:keydown",{originalEvent:e,hotkey:e.hotkey,relatedTarget:t}),n.isDefaultPrevented()&&e.preventDefault())}),$(document).on("navigation:keydown",".js-active-navigation-container",function(e){var t,n,r;if(t=this,n=$(e.originalEvent.target).is("input, textarea"),$(e.target).is(".js-navigation-item"))if(r=e.target,n){if(i)switch(e.hotkey){case"ctrl+n":s(r,t);break;case"ctrl+p":o(r,t)}switch(e.hotkey){case"up":o(r,t);break;case"down":s(r,t);break;case"enter":p(r);break;case g+"+enter":p(r,!0)}}else{if(i)switch(e.hotkey){case"ctrl+n":s(r,t);break;case"ctrl+p":o(r,t);break;case"alt+v":w(r,t);break;case"ctrl+v":j(r,t)}switch(e.hotkey){case"j":case"J":s(r,t);break;case"k":case"K":o(r,t);break;case"o":case"enter":p(r);break;case g+"+enter":p(r,!0)}}else if(r=f(t)[0])if(n){if(i)switch(e.hotkey){case"ctrl+n":d(r,t)}switch(e.hotkey){case"down":d(r,t)}}else{if(i)switch(e.hotkey){case"ctrl+n":case"ctrl+v":d(r,t)}switch(e.hotkey){case"j":d(r,t)}}if(n){if(i)switch(e.hotkey){case"ctrl+n":case"ctrl+p":e.preventDefault()}switch(e.hotkey){case"up":case"down":e.preventDefault();break;case"enter":case g+"+enter":e.preventDefault()}}else{if(i)switch(e.hotkey){case"ctrl+n":case"ctrl+p":case"alt+v":case"ctrl+v":e.preventDefault()}switch(e.hotkey){case"j":case"k":e.preventDefault();break;case"o":case"enter":case g+"+enter":e.preventDefault()}}}),$(document).on("navigation:mouseover",".js-active-navigation-container .js-navigation-item",function(e){var t;t=$(e.currentTarget).closest(".js-navigation-container")[0],d(e.currentTarget,t)}),u=function(e){var t,n,r;r=e.currentTarget,n=e.modifierKey||e.altKey||e.ctrlKey||e.metaKey,t=$(r).fire("navigation:open",{modifierKey:n}),t.isDefaultPrevented()&&e.preventDefault()},$(document).on("click",".js-active-navigation-container .js-navigation-item",function(e){u(e)}),$(document).on("navigation:keyopen",".js-active-navigation-container .js-navigation-item",function(e){var t;(t=$(this).filter(".js-navigation-open")[0]||$(this).find(".js-navigation-open")[0])?(e.modifierKey?(window.open(t.href,"_blank"),window.focus()):$(t).click(),e.preventDefault()):u(e)}),e=function(e){var t;return t=h(),e!==t?$(e).fire("navigation:activate",function(){return t&&t.classList.remove("js-active-navigation-container"),e.classList.add("js-active-navigation-container"),$(e).fire("navigation:activated",{async:!0})}):void 0},a=function(e){return $(e).fire("navigation:deactivate",function(){return e.classList.remove("js-active-navigation-container"),$(e).fire("navigation:deactivated",{async:!0})})},r=[],k=function(t){var n;(n=h())&&r.push(n),e(t)},x=function(t){var i;a(t),n(t),(i=r.pop())&&e(i)},l=function(t,n,r){var i,s,o;if(null==r&&(r="smooth"),i=f(n)[0],o=$(t).closest(".js-navigation-item")[0]||i,e(n),o){if(s=d(o,n))return;L($(o).overflowParent()[0],o,r)}},n=function(e){$(e).find(".navigation-focus.js-navigation-item").removeClass("navigation-focus")},C=function(e,t,r){null==r&&(r="smooth"),n(t),l(e,t,r)},o=function(e,t){var n,r,i,s,o;if(i=f(t),r=$.inArray(e,i),o=i[r-1]){if(n=d(o,t))return;s=$(o).overflowParent()[0],"page"===m(t)?L(s,o):S(s,o)}},s=function(e,t){var n,r,i,s,o;if(i=f(t),r=$.inArray(e,i),s=i[r+1]){if(n=d(s,t))return;o=$(s).overflowParent()[0],"page"===m(t)?L(o,s):S(o,s)}},w=function(e,t){var n,r,i,s,o;for(i=f(t),r=$.inArray(e,i),s=$(e).overflowParent()[0];(o=i[r-1])&&$(o).overflowOffset(s).top>=0;)r--;if(o){if(n=d(o,t))return;L(s,o)}},j=function(e,t){var n,r,i,s,o;for(i=f(t),r=$.inArray(e,i),o=$(e).overflowParent()[0];(s=i[r+1])&&$(s).overflowOffset(o).bottom>=0;)r++;if(s){if(n=d(s,t))return;L(o,s)}},p=function(e,t){null==t&&(t=!1),$(e).fire("navigation:keyopen",{modifierKey:t})},d=function(e,t){var r;return r=$(e).fire("navigation:focus",function(){return n(t),e.classList.add("navigation-focus"),$(e).fire("navigation:focused",{async:!0})}),r.isDefaultPrevented()},h=function(){return $(".js-active-navigation-container")[0]},f=function(e){return $(e).find(".js-navigation-item").visible()},m=function(e){var t;return null!=(t=$(e).attr("data-navigation-scroll"))?t:"item"},L=function(e,t,n){var r,i,s,o;return null==n&&(n="smooth"),s=$(t).positionedOffset(e),i=$(t).overflowOffset(e),r={},"smooth"===n&&(r.duration=200),i.bottom<=0?r.top=s.top-30:i.top<=0&&(o=null!=e.offsetParent?e.scrollHeight:$(document).height(),r.top=o-(s.bottom+i.height)+30),i.bottom<=0||i.top<=0?$(e).scrollTo(r):void 0},S=function(e,t){var n,r,i,s;return r=$(t).positionedOffset(e),n=$(t).overflowOffset(e),n.bottom<=0?(i=null!=e.offsetParent?e.scrollHeight:$(document).height(),s=i-(r.bottom+n.height),$(e).scrollTo({top:s})):n.top<=0?$(e).scrollTo({top:r.top}):void 0},$.fn.navigation=function(t,r){var i,s;return null==r&&(r={}),"active"===t?h():(i=$(this).closest(".js-navigation-container")[0])?(s={activate:function(){return e(i)},deactivate:function(){return a(i)},push:function(){return k(i)},pop:function(){return x(i)},focus:function(e){return function(){return l(e[0],i,r.behavior)}}(this),clear:function(){return n(i)},refocus:function(e){return function(){return C(e[0],i,r.behavior)}}(this)},"function"==typeof s[t]?s[t]():void 0):void 0}}.call(this),function(){var e,t;e=function(){var e,t,n,r,i;return t=!1,e=!1,r=null,i=parseInt(this.getAttribute("data-throttle-wait"))||100,n=function(t){return function(n){r&&clearTimeout(r),r=setTimeout(function(){var i;r=null,e=!1,i=new $.Event("throttled:input",{target:n}),$.event.trigger(i,null,t,!0)},i)}}(this),$(this).on("keydown.throttledInput",function(){t=!0,r&&clearTimeout(r)}),$(this).on("keyup.throttledInput",function(r){t=!1,e&&n(r.target)}),$(this).on("input.throttledInput",function(r){e=!0,t||n(r.target)})},t=function(){return $(this).off("keydown.throttledInput"),$(this).off("keyup.throttledInput"),$(this).off("input.throttledInput")},$.event.special["throttled:input"]={setup:e,teardown:t}}.call(this),function(){var e,t,n,r,i=function(e,t){return function(){return e.apply(t,arguments)}};t=require("github/sliding-promise-queue")["default"],r=require("github/fetch").fetchText,e=function(){function e(){this.onNavigationOpen=i(this.onNavigationOpen,this),this.onNavigationKeyDown=i(this.onNavigationKeyDown,this),this.onInputChange=i(this.onInputChange,this),this.onResultsMouseDown=i(this.onResultsMouseDown,this),this.onInputBlur=i(this.onInputBlur,this),this.onInputFocus=i(this.onInputFocus,this),this.focusedInput=this.focusedResults=null,this.mouseDown=!1,this.fetchQueue=new t}return e.prototype.bindEvents=function(e,t){return $(e).on("blur",this.onInputBlur),$(e).on("throttled:input",this.onInputChange),$(t).on("mousedown",this.onResultsMouseDown),$(t).on("navigation:open","[data-autocomplete-value]",this.onNavigationOpen),$(t).on("navigation:keydown","[data-autocomplete-value]",this.onNavigationKeyDown)},e.prototype.unbindEvents=function(e,t){return $(e).off("blur",this.onInputBlur),$(e).off("throttled:input",this.onInputChange),$(t).off("mousedown",this.onResultsMouseDown),$(t).off("navigation:open","[data-autocomplete-value]",this.onNavigationOpen),$(t).off("navigation:keydown","[data-autocomplete-value]",this.onNavigationKeyDown)},e.prototype.onInputFocus=function(e){var t,n;t=$(e).closest(".js-autocomplete-container"),n=t.find(".js-autocomplete")[0],this.focusedInput=e,this.focusedResults=n,this.bindEvents(e,n),$(e).attr("autocomplete","off"),$(e).trigger("autocomplete:focus"),this.fetchResults(e.value)},e.prototype.onInputBlur=function(){var e,t;e=this.focusedInput,t=this.focusedResults,this.mouseDown||(this.hideResults(),this.inputValue=null,this.focusedInput=this.focusedResults=null,this.unbindEvents(e,t),$(e).trigger("autocomplete:blur"))},e.prototype.onResultsMouseDown=function(e){var t;this.mouseDown=!0,t=function(e){return function(){return e.mouseDown=!1,$(document).off("mouseup",t)}}(this),$(document).on("mouseup",t)},e.prototype.onInputChange=function(e){var t;t=e.currentTarget,this.inputValue!==t.value&&($(t).removeData("autocompleted"),$(t).trigger("autocomplete:autocompleted:changed")),this.fetchResults(t.value)},e.prototype.fetchResults=function(e){var t,n,i,s;return(s=this.focusedResults.getAttribute("data-search-url"))?(t=$(this.focusedInput).closest(".js-autocomplete-container"),i=e.trim()?(s+=~s.indexOf("?")?"&":"?",s+="q="+encodeURIComponent(e),t.addClass("is-sending"),r(s)):$(this.focusedResults).find("[data-autocomplete-value]").length>0?this.showResults():Promise.resolve(""),n=function(){return t.removeClass("is-sending")},this.fetchQueue.push(i).then(function(t){return function(n){return $(t.focusedResults).find(".js-autocomplete-results").html(n),t.onResultsChange(e)}}(this)).then(n,n)):void 0},e.prototype.onResultsChange=function(e){var t;t=$(this.focusedResults).find("[data-autocomplete-value]"),0===t.length?this.hideResults():this.inputValue!==e&&(this.inputValue=e,this.showResults(),$(this.focusedInput).is("[data-autocomplete-autofocus]")&&$(this.focusedResults).find(".js-navigation-container").navigation("focus"))},e.prototype.onNavigationKeyDown=function(e){switch(e.hotkey){case"tab":return this.onNavigationOpen(e),!1;case"esc":return this.hideResults(),!1}},e.prototype.onNavigationOpen=function(e){var t,n;t=e.currentTarget,t.classList.contains("disabled")||(n=$(t).attr("data-autocomplete-value"),this.inputValue=n,$(this.focusedInput).val(n),$(this.focusedInput).data("autocompleted",n),$(this.focusedInput).trigger("autocomplete:autocompleted:changed",[n]),$(this.focusedInput).trigger("autocomplete:result",[n]),$(t).removeClass("active"),this.focusedInput===document.activeElement?this.hideResults():this.onInputBlur())},e.prototype.showResults=function(e,t){var n,r,i,s,o;return null==e&&(e=this.focusedInput),null==t&&(t=this.focusedResults),$(t).is($.visible)?void 0:(i=$(e).offset(),s=i.top,r=i.left,n=s+$(e).innerHeight(),o=$(e).innerWidth(),$(t).css({display:"block",position:"absolute",width:o+2}),$(t).offset({top:n+5}),$(e).addClass("js-navigation-enable"),$(t).find(".js-navigation-container").navigation("push"),$(t).show())},e.prototype.hideResults=function(e,t){return null==e&&(e=this.focusedInput),null==t&&(t=this.focusedResults),$(t).is($.visible)?($(e).removeClass("js-navigation-enable"),$(t).find(".js-navigation-container").navigation("pop"),$(t).hide()):void 0},e}(),n=new e,$(document.activeElement).is(".js-autocomplete-field")&&n.onInputFocus(document.activeElement),$.observe(".js-autocomplete-field",function(){$(this).on("focus",function(){return n.onInputFocus(this)})})}.call(this),function(){var e,t,n;n=require("github/fetch").fetchText,e=require("github/sliding-promise-queue")["default"],t=new e,$(document).onFocusedInput(".js-autosearch-field",function(e){$(this).on("throttled:input."+e,function(){var e,r,i,s;return r=this.form,r.classList.add("is-sending"),e=function(){return r.classList.remove("is-sending")},i=$(r).serialize(),s=(r.action+"&"+i).replace(/[?&]/,"?"),t.push(n(s)).then(function(e){var t,n;return n=document.getElementById(r.getAttribute("data-results-container")),n.innerHTML=e,"function"==typeof(t=window.history).replaceState?t.replaceState(null,"","?"+i):void 0}).then(e,e)})})}.call(this),function(){$(document).on("change","form[data-autosubmit]",function(){return $(this).submit()})}.call(this),function(){var e,t;t=null,e=function(){var e,n,r,i,s,o,a;return t&&t.abort(),o=$(this).attr("data-item-name")||"items",a=parseInt($(this).attr("data-item-minimum"))||0,i=parseInt($(this).attr("data-item-count"))||0,s=Math.max(a,parseInt(this.value)||0),e=s>300,$(".js-purchase-button").prop("disabled",0===s||e),$(".js-downgrade-button").prop("disabled",s===i),n={},n[o]=s,t=$.ajax({url:$(this).attr("data-url"),data:n}),r=function(t){var n,r,i;$(".js-contact-us").toggleClass("hidden",!e),$(".js-payment-summary").toggleClass("hidden",e),$(".js-billing-section").toggleClass("has-removed-contents",t.free),$(".js-upgrade-info").toggleClass("hidden",0>=s),$(".js-downgrade-info").toggleClass("hidden",s>=0),$(".js-extra-seats-line-item").toggleClass("hidden",t.no_additional_seats),n=t.selectors;for(r in n)i=n[r],$(r).text(i);return window.history.replaceState($.pjax.state,null,t.url)},t.then(r)},$.observe(".js-addon-purchase-field",function(){$(this).on("throttled:input",e),$(this).is($.visible)&&e.call($(".js-addon-purchase-field")[0])}),$.observe(".js-addon-downgrade-field",function(){$(this).on("change",e),$(this).is($.visible)&&e.call($(".js-addon-downgrade-field")[0])})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u,l,d,h,f,m,p,g,v,b,y=[].slice,$=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};e=jQuery,e.payment={},e.payment.fn={},e.fn.payment=function(){var t,n;return n=arguments[0],t=2<=arguments.length?y.call(arguments,1):[],e.payment.fn[n].apply(this,t)},i=/(\d{1,4})/g,r=[{type:"maestro",pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,format:i,length:[12,13,14,15,16,17,18,19],cvcLength:[3],luhn:!0},{type:"dinersclub",pattern:/^(36|38|30[0-5])/,format:i,length:[14],cvcLength:[3],luhn:!0},{type:"laser",pattern:/^(6706|6771|6709)/,format:i,length:[16,17,18,19],cvcLength:[3],luhn:!0},{type:"jcb",pattern:/^35/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:"unionpay",pattern:/^62/,format:i,length:[16,17,18,19],cvcLength:[3],luhn:!1},{type:"discover",pattern:/^(6011|65|64[4-9]|622)/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:"mastercard",pattern:/^5[1-5]/,format:i,length:[16],cvcLength:[3],luhn:!0},{type:"amex",pattern:/^3[47]/,format:/(\d{1,4})(\d{1,6})?(\d{1,5})?/,length:[15],cvcLength:[3,4],luhn:!0},{type:"visa",pattern:/^4/,format:i,length:[13,14,15,16],cvcLength:[3],luhn:!0}],t=function(e){var t,n,i;for(e=(e+"").replace(/\D/g,""),n=0,i=r.length;i>n;n++)if(t=r[n],t.pattern.test(e))return t;
},n=function(e){var t,n,i;for(n=0,i=r.length;i>n;n++)if(t=r[n],t.type===e)return t},h=function(e){var t,n,r,i,s,o;for(r=!0,i=0,n=(e+"").split("").reverse(),s=0,o=n.length;o>s;s++)t=n[s],t=parseInt(t,10),(r=!r)&&(t*=2),t>9&&(t-=9),i+=t;return i%10===0},d=function(e){var t;return null!=e.prop("selectionStart")&&e.prop("selectionStart")!==e.prop("selectionEnd")?!0:("undefined"!=typeof document&&null!==document&&null!=(t=document.selection)&&"function"==typeof t.createRange?t.createRange().text:void 0)?!0:!1},f=function(t){return setTimeout(function(){var n,r;return n=e(t.currentTarget),r=n.val(),r=e.payment.formatCardNumber(r),n.val(r)})},a=function(n){var r,i,s,o,a,c,u;return s=String.fromCharCode(n.which),!/^\d+$/.test(s)||(r=e(n.currentTarget),u=r.val(),i=t(u+s),o=(u.replace(/\D/g,"")+s).length,c=16,i&&(c=i.length[i.length.length-1]),o>=c||null!=r.prop("selectionStart")&&r.prop("selectionStart")!==u.length)?void 0:(a=i&&"amex"===i.type?/^(\d{4}|\d{4}\s\d{6})$/:/(?:^|\s)(\d{4})$/,a.test(u)?(n.preventDefault(),r.val(u+" "+s)):a.test(u+s)?(n.preventDefault(),r.val(u+s+" ")):void 0)},s=function(t){var n,r;return n=e(t.currentTarget),r=n.val(),t.meta||8!==t.which||null!=n.prop("selectionStart")&&n.prop("selectionStart")!==r.length?void 0:/\d\s$/.test(r)?(t.preventDefault(),n.val(r.replace(/\d\s$/,""))):/\s\d?$/.test(r)?(t.preventDefault(),n.val(r.replace(/\s\d?$/,""))):void 0},c=function(t){var n,r,i;return r=String.fromCharCode(t.which),/^\d+$/.test(r)?(n=e(t.currentTarget),i=n.val()+r,/^\d$/.test(i)&&"0"!==i&&"1"!==i?(t.preventDefault(),n.val("0"+i+" / ")):/^\d\d$/.test(i)?(t.preventDefault(),n.val(""+i+" / ")):void 0):void 0},u=function(t){var n,r,i;return r=String.fromCharCode(t.which),/^\d+$/.test(r)?(n=e(t.currentTarget),i=n.val(),/^\d\d$/.test(i)?n.val(""+i+" / "):void 0):void 0},l=function(t){var n,r,i;return r=String.fromCharCode(t.which),"/"===r?(n=e(t.currentTarget),i=n.val(),/^\d$/.test(i)&&"0"!==i?n.val("0"+i+" / "):void 0):void 0},o=function(t){var n,r;if(!t.meta&&(n=e(t.currentTarget),r=n.val(),8===t.which&&(null==n.prop("selectionStart")||n.prop("selectionStart")===r.length)))return/\d(\s|\/)+$/.test(r)?(t.preventDefault(),n.val(r.replace(/\d(\s|\/)*$/,""))):/\s\/\s?\d?$/.test(r)?(t.preventDefault(),n.val(r.replace(/\s\/\s?\d?$/,""))):void 0},v=function(e){var t;return e.metaKey||e.ctrlKey?!0:32===e.which?!1:0===e.which?!0:e.which<33?!0:(t=String.fromCharCode(e.which),!!/[\d\s]/.test(t))},p=function(n){var r,i,s,o;return r=e(n.currentTarget),s=String.fromCharCode(n.which),/^\d+$/.test(s)&&!d(r)?(o=(r.val()+s).replace(/\D/g,""),i=t(o),i?o.length<=i.length[i.length.length-1]:o.length<=16):void 0},g=function(t){var n,r,i;return n=e(t.currentTarget),r=String.fromCharCode(t.which),/^\d+$/.test(r)&&!d(n)?(i=n.val()+r,i=i.replace(/\D/g,""),i.length>6?!1:void 0):void 0},m=function(t){var n,r,i;return n=e(t.currentTarget),r=String.fromCharCode(t.which),/^\d+$/.test(r)?(i=n.val()+r,i.length<=4):void 0},b=function(t){var n,i,s,o,a;return n=e(t.currentTarget),a=n.val(),o=e.payment.cardType(a)||"unknown",n.hasClass(o)?void 0:(i=function(){var e,t,n;for(n=[],e=0,t=r.length;t>e;e++)s=r[e],n.push(s.type);return n}(),n.removeClass("unknown"),n.removeClass(i.join(" ")),n.addClass(o),n.toggleClass("identified","unknown"!==o),n.trigger("payment.cardType",o))},e.payment.fn.formatCardCVC=function(){return this.payment("restrictNumeric"),this.on("keypress",m),this},e.payment.fn.formatCardExpiry=function(){return this.payment("restrictNumeric"),this.on("keypress",g),this.on("keypress",c),this.on("keypress",l),this.on("keypress",u),this.on("keydown",o),this},e.payment.fn.formatCardNumber=function(){return this.payment("restrictNumeric"),this.on("keypress",p),this.on("keypress",a),this.on("keydown",s),this.on("keyup",b),this.on("paste",f),this},e.payment.fn.restrictNumeric=function(){return this.on("keypress",v),this},e.payment.fn.cardExpiryVal=function(){return e.payment.cardExpiryVal(e(this).val())},e.payment.cardExpiryVal=function(e){var t,n,r,i;return e=e.replace(/\s/g,""),i=e.split("/",2),t=i[0],r=i[1],2===(null!=r?r.length:void 0)&&/^\d+$/.test(r)&&(n=(new Date).getFullYear(),n=n.toString().slice(0,2),r=n+r),t=parseInt(t,10),r=parseInt(r,10),{month:t,year:r}},e.payment.validateCardNumber=function(e){var n,r;return e=(e+"").replace(/\s+|-/g,""),/^\d+$/.test(e)?(n=t(e),n?(r=e.length,$.call(n.length,r)>=0&&(n.luhn===!1||h(e))):!1):!1},e.payment.validateCardExpiry=function(t,n){var r,i,s,o;return"object"==typeof t&&"month"in t&&(o=t,t=o.month,n=o.year),t&&n?(t=e.trim(t),n=e.trim(n),/^\d+$/.test(t)&&/^\d+$/.test(n)&&parseInt(t,10)<=12?(2===n.length&&(s=(new Date).getFullYear(),s=s.toString().slice(0,2),n=s+n),i=new Date(n,t),r=new Date,i.setMonth(i.getMonth()-1),i.setMonth(i.getMonth()+1,1),i>r):!1):!1},e.payment.validateCardCVC=function(t,r){var i,s;return t=e.trim(t),/^\d+$/.test(t)?r?(i=t.length,$.call(null!=(s=n(r))?s.cvcLength:void 0,i)>=0):t.length>=3&&t.length<=4:!1},e.payment.cardType=function(e){var n;return e?(null!=(n=t(e))?n.type:void 0)||null:null},e.payment.formatCardNumber=function(e){var n,r,i,s;return(n=t(e))?(i=n.length[n.length.length-1],e=e.replace(/\D/g,""),e=e.slice(0,+i+1||9e9),n.format.global?null!=(s=e.match(n.format))?s.join(" "):void 0:(r=n.format.exec(e),null!=r&&r.shift(),null!=r?r.join(" "):void 0)):e}}.call(this),function(){var e,t=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};$.observe(".js-card-select-number-field",{add:function(){return $(this).payment("formatCardNumber")}}),$.observe(".js-card-cvv",{add:function(){return $(this).payment("formatCardCVC")}}),$.observe(".js-card-select-number-field",function(){var e,t,n;t=$(this).closest("form"),e=t.find(".js-card"),n=t.find(".js-card-select-type-field"),$(this).on("input",function(){var t,r,i,s,o;if(o=$(this).val(),s=$.payment.cardType(o))for(r=0,i=e.length;i>r;r++)t=e[r],$(t).toggleClass("enabled",$(t).attr("data-name")===s),$(t).toggleClass("disabled",$(t).attr("data-name")!==s);else e.removeClass("enabled disabled");n.val(s)})}),$(document).on("blur",".js-card-select-number-field",function(){return $(this).val($.payment.formatCardNumber($(this).val()))}),$(document).on("click",".js-card",function(){var e,t;return e=$(this).closest("form"),t=e.find(".js-card-select-number-field"),t.focus()}),$(document).on("click",".js-enter-new-card",function(e){var t,n;return t=$(this).closest(".js-setup-creditcard"),n=t.find(".js-card-select-number-field"),t.removeClass("has-credit-card"),n.attr("required","required"),n.attr("data-encrypted-name","billing[credit_card][number]"),e.preventDefault()}),$(document).on("click",".js-cancel-enter-new-card",function(e){var t,n;return t=$(this).closest(".js-setup-creditcard"),n=t.find(".js-card-select-number-field"),t.addClass("has-credit-card"),n.removeAttr("required"),n.removeAttr("data-encrypted-name"),e.preventDefault()}),e=function(e){var n,r,i,s,o,a;return r=e.find("option:selected").text(),s={Austria:"ATU000000000",Belgium:"BE0000000000",Bulgaria:"BG000000000...",Croatia:"",Cyprus:"CY000000000X","Czech Republic":"CZ00000000...",Denmark:"DK00 00 00 00",Estonia:"EE000000000",Finland:"FI00000000",France:"FRXX 000000000",Germany:"DE000000000",Greece:"EL000000000",Hungary:"HU00000000",Iceland:"",Ireland:"IE...",Italy:"IT00000000000",Latvia:"LV00000000000",Lithuania:"LT000000000...",Luxembourg:"LU00000000",Malta:"MT00000000",Netherlands:"NL000000000B00",Norway:"",Poland:"PL0000000000",Portugal:"PT000000000",Romania:"RO...",Slovakia:"SK0000000000",Slovenia:"",Spain:"ES...",Sweden:"SE000000000000",Switzerland:"","United Kingdom":"GB..."},i=["Angola","Antigua and Barbuda","Aruba","Bahamas","Belize","Benin","Botswana","Cameroon","Comoros","Congo (Brazzaville)","Congo (Kinshasa)","Cook Islands","C\xf4te d'Ivoire","Djibouti","Dominica","Fiji","French Southern Lands","Ghana","Guyana","Hong Kong","Ireland","Kiribati","Korea, North","Malawi","Maritania","Mauritius","Montserrat","Nauru","Niue","Qatar","Saint Kitts and Nevis","Saint Lucia","Sao Tome and Principe","Seychelles","Sierra Leone","Sint Maarten (Dutch part)","Solomon Islands","Somalia","Suriname","Syria","Togo","Tokelau","Tonga","United Arab Emirates","Vanuatu","Yemen","Zimbabwe"],o=s[r],$(".js-setup-creditcard").toggleClass("is-vat-country",null!=o),a=null!=o?"("+o+")":"",n=e.parents(".js-setup-creditcard").find(".js-vat-help-text"),n.html(a),"United States of America"!==r?($(".js-setup-creditcard").addClass("is-international"),$(".js-select-state").removeAttr("required").val("")):($(".js-setup-creditcard").removeClass("is-international"),$(".js-select-state").attr("required","required")),t.call(i,r)>=0?($(".js-setup-creditcard").addClass("no-postcodes"),$(".js-postal-code-field").removeAttr("required").val("")):($(".js-setup-creditcard").removeClass("no-postcodes"),$(".js-postal-code-field").attr("required","required"))},$(document).on("change",".js-select-country",function(){return e($(this))}),$.observe(".js-select-country",function(){e($(this))})}.call(this),function(){$(document).on("change",".js-payment-methods .js-payment-method",function(){var e,t;return e=$(this).closest(".js-payment-methods"),t=$(this).attr("data-selected-tab"),e.find(".js-selected-payment-method").removeClass("active"),e.find("."+t).addClass("active")}),$.observe(".js-selected-payment-method:not(.active)",{add:function(){return $(this).addClass("has-removed-contents")},remove:function(){return $(this).removeClass("has-removed-contents")}}),$.observe(".js-billing-payment-methods",function(){$(this).removeClass("disabled")}),$(document).on("click",".js-toggle-change-payment-method",function(){var e;return e=this.closest(".js-change-payment-method-container"),e.querySelector(".js-change-payment-method").classList.toggle("has-removed-contents"),e.querySelector(".js-current-payment-method").classList.toggle("hidden")})}.call(this),define("github/document-ready",["exports"],function(e){Object.defineProperty(e,"__esModule",{value:!0});e.ready=function(){return"interactive"===document.readyState||"complete"===document.readyState?Promise.resolve():new Promise(function(e){document.addEventListener("DOMContentLoaded",e)})}(),e.loaded=function(){return"complete"===document.readyState?Promise.resolve():new Promise(function(e){window.addEventListener("load",e)})}()}),define("github/stats",["exports","./proxy-site-detection","./document-ready"],function(e,t,n){function r(e){return e&&e.__esModule?e:{"default":e}}function i(){var e=void 0;null==a&&(a=null!=(e=document.querySelector("meta[name=browser-stats-url]"))?e.getAttribute("content"):void 0),a&&(s["default"]||(c=null,window.fetch(a,{method:"post",body:JSON.stringify(u),headers:{"Content-Type":"application/json"}}),u=[]))}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(e){u.push(e),n.loaded.then(function(){null!=c?c:c=setTimeout(i,o)})};var s=r(t),o=500,a=null,c=null,u=[]}),function(){var e,t;t=require("github/stats")["default"],e=require("github/feature-detection")["default"],t({browserfeatures:{classlist_multi_arg:e.classListMultiArg,classlist:e.classList,closest:e.closest,custom_elements:e.registerElement,custom_event:e.CustomEvent,emoji:e.emoji,fetch:e.fetch,matches:e.matches,performance_getentries:e.performanceGetEntries,performance_mark:e.performanceMark,performance_now:e.performanceNow,promise:e.Promise,setimmediate:e.setImmediate,string_ends_with:e.stringEndsWith,string_starts_with:e.stringStartsWith,url:e.URL,weakmap:e.WeakMap}})}.call(this),function(){var e,t,n;n=require("github/stats")["default"],t=function(){var t,r,i,s,o,a;(i=function(){try{return localStorage.getItem("bundle-urls")}catch(e){}}())&&(s=function(){try{return JSON.parse(i)}catch(e){}}()),null==s&&(s={}),a=e();try{localStorage.setItem("bundle-urls",JSON.stringify(a))}catch(c){}return r=function(){var e;e=[];for(t in a)o=a[t],s[t]!==o&&e.push(t);return e}(),r.length?n({downloadedbundles:r}):void 0},e=function(){var e,t,n,r,i,s,o,a,c,u,l;for(l={},a=$("script"),t=0,r=a.length;r>t;t++)u=a[t],o=u.src.match(/\/([\w-]+)-[0-9a-f]{64}\.js$/),null!=o&&(e=o[1],l[e+".js"]=u.src);for(c=$("link[rel=stylesheet]"),n=0,i=c.length;i>n;n++)s=c[n],o=s.href.match(/\/([\w-]+)-[0-9a-f]{64}\.css$/),null!=o&&(e=o[1],l[e+".css"]=s.href);return l},$(window).on("load",t)}.call(this),function(){function e(e){e.preventDefault(),e.stopPropagation()}$.observe("a.btn.disabled",{add:function(t){t.addEventListener("click",e)},remove:function(t){t.removeEventListener("click",e)}})}(),function(){var e,t,n;e=function(e){return $(e).closest(".js-check-all-container")[0]||document.body},t=function(e,t,n,r){null==r&&(r=!1),t.indeterminate=r,t.checked!==n&&(t.checked=n,$(t).fire("change",{relatedTarget:e,async:!0}))},$(document).on("change","input.js-check-all",function(n){var r,i,s,o,a;if(!$(n.relatedTarget).is("input.js-check-all-item")){for(r=$(e(this)),i=r.find("input.js-check-all-item"),s=0,a=i.length;a>s;s++)o=i[s],t(this,o,this.checked);i.removeClass("is-last-changed")}}),n=null,$(document).on("mousedown","input.js-check-all-item",function(e){n=e.shiftKey}),$(document).on("change","input.js-check-all-item",function(r){var i,s,o,a,c,u,l,d,h,f,m,p,g,v,b,y;if(!$(r.relatedTarget).is("input.js-check-all, input.js-check-all-item")){if(i=$(e(this)),o=i.find("input.js-check-all")[0],s=i.find("input.js-check-all-item"),n&&(m=s.filter(".is-last-changed")[0]))for(a=s.toArray(),g=[a.indexOf(m),a.indexOf(this)].sort(),b=g[0],l=g[1],v=a.slice(b,+l+1||9e9),d=0,p=v.length;p>d;d++)f=v[d],t(this,f,this.checked);n=null,s.removeClass("is-last-changed"),$(this).addClass("is-last-changed"),y=s.length,u=function(){var e,t,n;for(n=[],e=0,t=s.length;t>e;e++)f=s[e],f.checked&&n.push(f);return n}().length,c=u===y,h=y>u&&u>0,t(this,o,c,h)}}),$(document).on("change","input.js-check-all-item",function(t){var n,r,i;n=$(e(this)),r=n.find(".js-check-all-count"),r.length&&(i=n.find("input.js-check-all-item:checked").length,r.text(i))})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u,l;l=require("github/failbot").reportError,i=function(e){var t;return t=document.createElement("pre"),t.style.width="1px",t.style.height="1px",t.style.position="fixed",t.style.top="5px",t.textContent=e,t},n=function(e){var t,n;return n=getSelection(),n.removeAllRanges(),t=document.createRange(),t.selectNodeContents(e),n.addRange(t),document.execCommand("copy"),n.removeAllRanges()},r=function(e){var t;return t=i(e),document.body.appendChild(t),n(t),document.body.removeChild(t)},t=function(e){return e.select(),document.execCommand("copy"),getSelection().removeAllRanges()},s=function(e,t,n){var r;return e.addEventListener(t,r=function(){return e.removeEventListener(t,r),n.apply(this,arguments)})},$(document).on("click",".is-copy-enabled .js-zeroclipboard",function(e){var i,o,c,u,l;(l=this.getAttribute("data-clipboard-text"))?r(l):(i=this.closest(".js-zeroclipboard-container"),o=i.querySelector(".js-zeroclipboard-target"),a(o)?"hidden"===o.type?r(o.value):t(o):n(o)),c=this.getAttribute("data-copied-hint"),u=this.getAttribute("aria-label"),c&&c!==u&&(this.setAttribute("aria-label",c),s(this,"mouseleave",function(){return null!=u?this.setAttribute("aria-label",u):this.removeAttribute("aria-label")})),this.blur()}),a=function(e){return"INPUT"===e.nodeName||"TEXTAREA"===e.nodeName},document.documentElement.classList.contains("is-copy-enabled")||(e=null!=(c=$("link[rel=assets]").prop("href"))?c:"/",ZeroClipboard.config({swfPath:e+"static/flash/ZeroClipboard.v"+ZeroClipboard.version+".swf",trustedOrigins:[location.hostname],flashLoadTimeout:1e4,cacheBust:null!=(u=/MSIE/.test(navigator.userAgent)||/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/.test(navigator.userAgent))?u:{"true":!1}}),$(document).on("click","#global-zeroclipboard-html-bridge",function(e){e.stopImmediatePropagation()}),$.observe("button.js-zeroclipboard",o=function(e){var t,n,r;r=new ZeroClipboard(e),r.on("copy",function(e){var t,n,r,i,s;return t=e.target,null==t.getAttribute("data-clipboard-text")?(i=$(t).closest(".js-zeroclipboard-container").find(".js-zeroclipboard-target")[0],i?(s=a(i)?i.value:i.textContent,n=e.clipboardData,n.setData("text/plain",s.trim())):(r=new Error("source of clipboard text not found"),l(r,{eventType:"copy",eventTarget:$(t).inspect()}))):void 0}),r.on("aftercopy",function(t){var n;return n=$(this).attr("data-copied-hint"),$("#global-zeroclipboard-html-bridge").attr("aria-label",n||"Copied!"),e.blur()}),r.on("error",function(e){return $("#global-zeroclipboard-html-bridge, .js-zeroclipboard").remove(),$(".js-zeroclipboard-container").addClass("has-zeroclipboard-disabled")}),n=function(){var e;return this.classList.remove("tooltipped","tooltipped-s"),e=$(this).attr("aria-label"),$("#global-zeroclipboard-html-bridge").addClass("tooltipped tooltipped-s").attr("aria-label",e||"Copy to clipboard.")},t=function(){return $("#global-zeroclipboard-html-bridge").removeClass("tooltipped tooltipped-s")},$(e).hover(n,t)}))}.call(this),function(){$(document).on("ajaxBeforeSend",".js-new-comment-form",function(e){return this===e.target&&$(this).data("remote-xhr")?(setImmediate(function(){throw new Error("canceled comment form submission")}),!1):void 0}),$(document).on("ajaxSend",".js-new-comment-form",function(e){return this===e.target?$(this).find(".js-comment-form-error").hide():void 0}),$(document).on("ajaxSuccess",".js-new-comment-form",function(e,t,n,r){var i,s,o,a;if(this===e.target){this.reset(),$(this).find(".js-comment-field").trigger("validation:field:change"),$(this).find(".js-write-tab").click(),o=r.updateContent;for(a in o)s=o[a],i=$(a),i[0]||console.warn("couldn't find "+a+" for immediate update"),i.updateContent(s)}}),$(document).on("ajaxError",".js-new-comment-form",function(e,t){var n,r;if(this===e.target)return r="Sorry! We couldn't save your comment",422===t.status&&(n=JSON.parse(t.responseText),n.errors&&(r+=" \u2014 your comment ",r+=" "+n.errors.join(", "))),r+=". ",r+="Please try again.",$(this).find(".js-comment-form-error").show().text(r),!1})}.call(this),function(){$.observe(".js-comment-and-button",function(){var e,t,n,r,i;return e=this,t=e.form.querySelector(".js-comment-field"),n=e.textContent,i=!1,r=function(){var t;return t=this.value.trim(),t!==i?(i=t,e.textContent=t?e.getAttribute("data-comment-text"):n):void 0},{add:function(){return $(t).on("input change",r)},remove:function(){return $(t).off("input change",r)}}})}.call(this),function(){$(document).on("click",".js-comment-edit-button",function(){var e;e=$(this).closest(".js-comment"),e.addClass("is-comment-editing"),e.find(".js-write-tab").click(),e.find(".js-comment-field").focus().trigger("change")}),$(document).on("click",".js-comment-cancel-button",function(){var e;return e=$(this).closest("form"),e.hasDirtyFields()&&!confirm($(this).attr("data-confirm-text"))?!1:(e[0].reset(),$(this).closest(".js-comment").removeClass("is-comment-editing"),!1)}),$(document).on("ajaxSend",".js-comment-delete, .js-comment-update, .js-issue-update",function(e,t){var n,r;if(e.target===e.currentTarget)return n=$(this).closest(".js-comment"),n.addClass("is-comment-loading"),n.find(".btn-sm").addClass("disabled"),(r=n.attr("data-body-version"))?t.setRequestHeader("X-Body-Version",r):void 0}),$(document).on("ajaxError",".js-comment-update",function(e,t,n,r){var i,s,o,a,c;if(e.target===e.currentTarget&&(console.error("ajaxError for js-comment-update",r),422===t.status))try{if(o=JSON.parse(t.responseText),i=$(this).closest(".js-comment"),o.stale)return t.stale=!0,i.addClass("is-comment-stale"),i.find(".btn-sm").addClass("disabled"),e.preventDefault();if(o.errors)return c="There was an error posting your comment: "+o.errors.join(", "),i.find(".js-comment-update-error").text(c).show(),e.preventDefault()}catch(a){return s=a,console.error("Error trying to handle ajaxError for js-comment-update: "+s)}}),$(document).on("ajaxComplete",".js-comment-delete, .js-comment-update",function(e,t,n){var r;if(e.target===e.currentTarget)return r=$(this).closest(".js-comment"),r.removeClass("is-comment-loading"),r.find(".btn-sm").removeClass("disabled"),t.stale?r.find(".form-actions button[type=submit].btn-sm").addClass("disabled"):void 0}),$(document).on("ajaxSuccess",".js-comment-delete",function(){var e,t;return e=$(this).closest(".js-comment"),t=$(this).closest(".js-comment-container"),1!==t.find(".js-comment").length&&(t=e),t.fadeOut(function(){return e.remove()})}),$(document).on("ajaxSuccess",".js-comment-update",function(e,t,n,r){var i,s,o,a,c,u;if(e.target===e.currentTarget){for(i=$(this).closest(".js-comment"),s=$(this).closest(".js-comment-container"),s.length||(s=i),i.find(".js-comment-body").html(r.body),i.find(".js-comment-update-error").hide(),i.attr("data-body-version",r.newBodyVersion),u=i.find("input, textarea"),a=0,c=u.length;c>a;a++)o=u[a],o.defaultValue=o.value;return i.removeClass("is-comment-editing")}}),$(document).on("ajaxSuccess",".js-issue-update",function(e,t,n,r){var i,s,o,a,c,u,l,d;for(o=this,i=o.closest(".js-details-container"),i.classList.remove("open"),null!=r.issue_title&&(i.querySelector(".js-issue-title").textContent=r.issue_title,c=i.closest(".js-issues-results"),l=c.querySelector(".js-merge-pull-request textarea"),l&&l.value===l.defaultValue&&(l.value=l.defaultValue=r.issue_title)),document.title=r.page_title,d=o.elements,a=0,u=d.length;u>a;a++)s=d[a],s.defaultValue=s.value})}.call(this),function(){$(document).on("focusin",".js-write-bucket",function(){return $(this).addClass("focused")}),$(document).on("focusout",".js-write-bucket",function(){return $(this).removeClass("focused")})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u,l,d,h,f,m,p,g,v,b;r=require("delegated-events"),o=require("github/hotkey")["default"],c=function(e){return e.trim().split("\n").length>1},m=function(e,t){return Array(t+1).join(e)},b=function(e,t){for(;e[t]&&null!=e[t-1]&&!e[t-1].match(/\s/);)t--;return t},v=function(e,t){for(;e[t]&&!e[t].match(/\s/);)t++;return t},n=null,a=function(e,t){var i,s,o,a,c,u,l,d;if(d=t.text,l=t.selectionStart,u=t.selectionEnd,c=e.selectionStart,null===n||n){e.contenteditable=!0;try{n=document.execCommand("insertText",!1,d)}catch(a){o=a,n=!1}e.contenteditable=!1}if(!n){s=e.value.slice(0,e.selectionStart),i=e.value.slice(e.selectionEnd,e.value.length-1);try{document.execCommand("ms-beginUndoUnit")}catch(h){}e.value=s+d+i;try{document.execCommand("ms-endUndoUnit")}catch(h){}r.fire(e,"input")}return null!=l&&null!=u?e.setSelectionRange(l,u):e.setSelectionRange(c,e.selectionEnd)},p=function(e,n){var r,i;return i=e.value.slice(e.selectionStart,e.selectionEnd),r=n.orderedList?f(e):n.multiline&&c(i)?l(e,n):t(e,n),a(e,r)},i=function(e,t,n){var r,i,s,o;return e.selectionStart===e.selectionEnd?(e.selectionStart=b(e.value,e.selectionStart),e.selectionEnd=v(e.value,e.selectionEnd)):(o=e.selectionStart-t.length,s=e.selectionEnd+n.length,r=e.value.slice(o,e.selectionStart)===t,i=e.value.slice(e.selectionEnd,s)===n,r&&i&&(e.selectionStart=o,e.selectionEnd=s)),e.value.slice(e.selectionStart,e.selectionEnd)},d=function(e){var t,n,r,i,s,o,a,c;return n=e.value.slice(0,e.selectionStart),t=e.value.slice(e.selectionEnd),i=null!=(a=n.match(/\n*$/))?a[0].length:void 0,r=null!=(c=t.match(/^\n*/))?c[0].length:void 0,n.match(/\S/)&&2>i&&(s=m("\n",2-i)),t.match(/\S/)&&2>r&&(o=m("\n",2-r)),null==s&&(s=""),null==o&&(o=""),{newlinesToAppend:s,newlinesToPrepend:o}},t=function(e,t){var n,r,s,o,a,u,l,h,f,m,p,g,v,b,y,$,j,w,x,k,C,S,L;return p=t.prefix,C=t.suffix,r=t.blockPrefix,s=t.blockSuffix,a=t.multiline,y=t.replaceNext,g=t.prefixSpace,j=t.scanFor,L=t.surroundWithNewlines,f=e.selectionStart,h=e.selectionEnd,w=e.value.slice(e.selectionStart,e.selectionEnd),v=c(w)&&r.length>0?r+"\n":p,S=c(w)&&s.length>0?"\n"+s:C,g&&(n=e.value[e.selectionStart-1],0===e.selectionStart||null==n||n.match(/\s/)||(v=" "+v)),w=i(e,v,S),k=e.selectionStart,x=e.selectionEnd,o=y.length>0&&S.indexOf(y)>-1&&w.length>0,L&&(b=d(e),u=b.newlinesToAppend,l=b.newlinesToPrepend,v=u+p,S+=l),w.startsWith(v)&&w.endsWith(S)?($=w.slice(v.length,w.length-S.length),f===h?(m=f-v.length,m=Math.max(m,k),m=Math.min(m,k+$.length),k=x=m):(k=k,x=k+$.length),{text:$,selectionStart:k,selectionEnd:x}):o?j.length>0&&w.match(j)?(S=S.replace(y,w),$=v+S,k=x=k+v.length,{text:$,selectionStart:k,selectionEnd:x}):($=v+w+S,k=k+v.length+w.length+S.indexOf(y),x=k+y.length,{text:$,selectionStart:k,selectionEnd:x}):($=v+w+S,k=f+v.length,x=h+v.length,{text:$,selectionStart:k,selectionEnd:x})},l=function(e,t){var n,r,i,s,o,a,c,u,l,h,f,m,p,g,v,b,y,$,j;return u=t.prefix,v=t.suffix,n=t.blockPrefix,r=t.blockSuffix,o=t.multiline,f=t.replaceNext,l=t.prefixSpace,m=t.scanFor,b=t.surroundWithNewlines,y=e.value.slice(e.selectionStart,e.selectionEnd),g=e.selectionStart,p=e.selectionEnd,s=y.split("\n"),$=function(){var e,t,n;for(n=[],e=0,t=s.length;t>e;e++)i=s[e],n.push(i.startsWith(u)&&i.endsWith(v));return n}(),j=$.every(function(e){return e}),j?(y=function(){var e,t,n;for(n=[],e=0,t=s.length;t>e;e++)i=s[e],n.push(i.slice(u.length,i.length-v.length));return n}().join("\n"),p=g+y.length):(y=function(){var e,t,n;for(n=[],e=0,t=s.length;t>e;e++)i=s[e],n.push(u+i+v);return n}().join("\n"),b&&(h=d(e),a=h.newlinesToAppend,c=h.newlinesToPrepend,g+=a.length,p=g+y.length,y=a+y+c)),{text:y,selectionStart:g,selectionEnd:p}},f=function(e){var t,n,r,i,s,o,a,c,u,l,h;return o=/^\d+\.\s+/,l=e.value.slice(e.selectionStart,e.selectionEnd),r=l.split("\n"),h=r.every(function(e){return o.test(e)}),h?(r=function(){var e,t,i;for(i=[],e=0,t=r.length;t>e;e++)n=r[e],i.push(n.replace(o,""));return i}(),l=r.join("\n")):(r=function(){var e,i,s;for(s=[],t=e=0,i=r.length;i>e;t=++e)n=r[t],s.push(t+1+". "+n);return s}(),l=r.join("\n"),a=d(e),i=a.newlinesToAppend,s=a.newlinesToPrepend,u=e.selectionStart+i.length,c=u+l.length,l=i+l+s),{text:l,selectionStart:u,selectionEnd:c}},r.on("click",".js-toolbar-item",function(){return $(this).menu("deactivate"),e(this)}),e=function(e){var t,n,r;return t=e.closest(".js-previewable-comment-form"),r=t.querySelector(".js-improved-comment-field"),n={prefix:e.getAttribute("data-prefix")||"",suffix:e.getAttribute("data-suffix")||"",blockPrefix:e.getAttribute("data-block-prefix")||"",blockSuffix:e.getAttribute("data-block-suffix")||"",multiline:e.getAttribute("data-multiline")||!1,replaceNext:e.getAttribute("data-replace-next")||"",prefixSpace:e.getAttribute("data-prefix-space")||!1,scanFor:e.getAttribute("data-scan-for")||"",surroundWithNewlines:e.getAttribute("data-surround-with-newlines")||!1,orderedList:e.getAttribute("data-ordered-list")||!1},r.focus(),p(r,n)},u=navigator.userAgent.match(/Macintosh/)?"meta":"ctrl",g=new WeakMap,s=function(e){var t,n,r,i,s,o;if(i=g.get(e))return i;for(i={},s=e.querySelectorAll(".js-toolbar-item[data-toolbar-hotkey]"),t=0,r=s.length;r>t;t++)o=s[t],n=o.getAttribute("data-toolbar-hotkey"),i[u+"+"+n]=o;return g.set(e,i),i},h=function(){var t,n;if(!g.get(this))return g.set(this,!0),n=this.closest(".js-previewable-comment-form").querySelector(".js-toolbar"),t=s(n),this.addEventListener("keydown",function(n){var r;(r=t[o(n)])&&(e(r),n.preventDefault())})},$.observe(".js-improved-comment-field",function(){this.addEventListener("focus",h)})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u,l;i=require("github/fetch").fetchText,u=require("github/stats")["default"],e=require("github/sliding-promise-queue")["default"],l=function(e){var t;return null!=(t=e.closest("form").elements.authenticity_token)?t.value:void 0},t=function(e){var t,n,r,i,s,o;return t=e.closest(".js-previewable-comment-form"),r=e.classList.contains("js-preview-tab"),r&&(s=t.querySelector(".js-write-bucket"),i=t.querySelector(".js-preview-body"),i.style.minHeight=$(s).height()+"px"),t.classList.toggle("preview-selected",r),t.classList.toggle("write-selected",!r),n=t.querySelector(".tabnav-tab.selected"),n.setAttribute("aria-selected",!1),n.classList.remove("selected"),e.classList.add("selected"),e.setAttribute("aria-selected",!0),o=t.querySelector(".js-write-tab"),r?o.setAttribute("data-hotkey","ctrl+P,meta+P"):o.removeAttribute("data-hotkey"),Promise.resolve(t)},$(document).on("click",".js-write-tab",function(){var e;return t(this).then(function(e){return e.querySelector(".js-comment-field").focus()}),e=this.closest(".js-previewable-comment-form").querySelector(".js-toolbar"),null!=e&&e.classList.remove("hidden"),!1}),$(document).on("click",".js-preview-tab",function(e){var n;return t(this).then(function(t){return c(t,e.timeStamp)}),n=this.closest(".js-previewable-comment-form").querySelector(".js-toolbar"),null!=n&&n.classList.add("hidden"),!1}),$(document).on("preview:render",".js-previewable-comment-form",function(e){var n;return n=this.querySelector(".js-preview-tab"),t(n).then(function(t){var n;return n=e.originalEvent.detail.requestedAt||e.timeStamp,c(t,n)})}),a=new e,o=new WeakMap,s=!1,n=function(e,t){var n,i,c,u,d;return d={url:e.getAttribute("data-preview-url"),data:{text:t,authenticity_token:l(e)},headers:{"content-type":"application/x-www-form-urlencoded; charset=UTF-8"}},(i=!e.dispatchEvent(new CustomEvent("preview:setup",{bubbles:!0,cancelable:!0,detail:d})))?Promise.reject(new Error("preview canceled")):(t=JSON.stringify(d),(n=o.get(e))&&(c=n[0],u=n[1]),c!==t&&(s=!1,u=a.push(r(d)),u.then(function(){return s=!0}),o.set(e,[t,u])),u)},r=function(e){return i(e.url,{method:"post",body:$.param(e.data),headers:e.headers})},c=function(e,t){var r,i;return i=e.querySelector(".js-comment-field"),r=e.querySelector(".comment-body"),n(e,i.value).then(function(e){var n;return r.innerHTML=e||"<p>Nothing to preview</p>",n=new Date-t,u({preview_delay:{ms:n,background:!1}})}),s?void 0:r.innerHTML="<p>Loading preview&hellip;</p>"},$.observe(".js-preview-tab",function(){var e,t;t=this.closest(".js-previewable-comment-form"),e=t.querySelector(".js-comment-field"),$(this).on("mouseenter",function(){return n(t,e.value)})}),$(document).onFocusedKeydown(".js-comment-field",function(e){var t;return t=this.closest(".js-previewable-comment-form"),function(e){return"ctrl+P"!==e.hotkey&&"meta+P"!==e.hotkey||!t.classList.contains("write-selected")?void 0:(this.blur(),t.dispatchEvent(new CustomEvent("preview:render",{bubbles:!0,cancelable:!1,detail:{requestedAt:e.timeStamp}})),e.stopImmediatePropagation(),!1)}})}.call(this),function(){$(document).on("pjax:send",".context-loader-container",function(){var e;return e=$(this).find(".context-loader").first(),$(this).is(".js-repo-nav-next")&&(e=$()),e.length?e.addClass("is-context-loading"):$(".page-context-loader").addClass("is-context-loading")}),$(document).on("pjax:complete",".context-loader-container",function(e){return $(e.target).find(".context-loader").first().removeClass("is-context-loading"),$(".page-context-loader").removeClass("is-context-loading"),$(document.body).removeClass("disables-context-loader")}),$(document).on("pjax:timeout",".context-loader-container",function(){return!1})}.call(this),function(){var e;e=require("github/stats")["default"],$.hashChange(function(t){var n;return n=window.location.hash.slice(1),n&&/\/(issues|pulls?)\/\d+/.test(t.newURL)?e({conversation_anchor:{anchor:n,matches_element:t.target!==window}}):void 0})}.call(this),function(e){e.Jcrop=function(t,n){function r(e){return Math.round(e)+"px"}function i(e){return I.baseClass+"-"+e}function s(){return e.fx.step.hasOwnProperty("backgroundColor")}function o(t){var n=e(t).offset();return[n.left,n.top]}function a(e){return[e.pageX-P[0],e.pageY-P[1]]}function c(t){"object"!=typeof t&&(t={}),I=e.extend(I,t),e.each(["onChange","onSelect","onRelease","onDblClick"],function(e,t){"function"!=typeof I[t]&&(I[t]=function(){})})}function u(e,t,n){if(P=o(B),me.setCursor("move"===e?e:e+"-resize"),"move"===e)return me.activateHandlers(d(t),g,n);var r=de.getFixed(),i=h(e),s=de.getCorner(h(i));de.setPressed(de.getCorner(i)),de.setCurrent(s),me.activateHandlers(l(e,r),g,n)}function l(e,t){return function(n){if(I.aspectRatio)switch(e){case"e":n[1]=t.y+1;break;case"w":n[1]=t.y+1;break;case"n":n[0]=t.x+1;break;case"s":n[0]=t.x+1}else switch(e){
case"e":n[1]=t.y2;break;case"w":n[1]=t.y2;break;case"n":n[0]=t.x2;break;case"s":n[0]=t.x2}de.setCurrent(n),fe.update()}}function d(e){var t=e;return pe.watchKeys(),function(e){de.moveOffset([e[0]-t[0],e[1]-t[1]]),t=e,fe.update()}}function h(e){switch(e){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function f(e){return function(t){return I.disabled?!1:"move"!==e||I.allowMove?(P=o(B),re=!0,u(e,a(t)),t.stopPropagation(),t.preventDefault(),!1):!1}}function m(e,t,n){var r=e.width(),i=e.height();r>t&&t>0&&(r=t,i=t/e.width()*e.height()),i>n&&n>0&&(i=n,r=n/e.height()*e.width()),te=e.width()/r,ne=e.height()/i,e.width(r).height(i)}function p(e){return{x:e.x*te,y:e.y*ne,x2:e.x2*te,y2:e.y2*ne,w:e.w*te,h:e.h*ne}}function g(e){var t=de.getFixed();t.w>I.minSelect[0]&&t.h>I.minSelect[1]?(fe.enableHandles(),fe.done()):fe.release(),me.setCursor(I.allowSelect?"crosshair":"default")}function v(e){if(I.disabled)return!1;if(!I.allowSelect)return!1;re=!0,P=o(B),fe.disableHandles(),me.setCursor("crosshair");var t=a(e);return de.setPressed(t),fe.update(),me.activateHandlers(b,g,"touch"===e.type.substring(0,5)),pe.watchKeys(),e.stopPropagation(),e.preventDefault(),!1}function b(e){de.setCurrent(e),fe.update()}function y(){var t=e("<div></div>").addClass(i("tracker"));return R&&t.css({opacity:0,backgroundColor:"white"}),t}function $(e){Y.removeClass().addClass(i("holder")).addClass(e)}function j(e,t){function n(){window.setTimeout(b,d)}var r=e[0]/te,i=e[1]/ne,s=e[2]/te,o=e[3]/ne;if(!ie){var a=de.flipCoords(r,i,s,o),c=de.getFixed(),u=[c.x,c.y,c.x2,c.y2],l=u,d=I.animationDelay,h=a[0]-u[0],f=a[1]-u[1],m=a[2]-u[2],p=a[3]-u[3],g=0,v=I.swingSpeed;r=l[0],i=l[1],s=l[2],o=l[3],fe.animMode(!0);var b=function(){return function(){g+=(100-g)/v,l[0]=Math.round(r+g/100*h),l[1]=Math.round(i+g/100*f),l[2]=Math.round(s+g/100*m),l[3]=Math.round(o+g/100*p),g>=99.8&&(g=100),100>g?(x(l),n()):(fe.done(),fe.animMode(!1),"function"==typeof t&&t.call(ge))}}();n()}}function w(e){x([e[0]/te,e[1]/ne,e[2]/te,e[3]/ne]),I.onSelect.call(ge,p(de.getFixed())),fe.enableHandles()}function x(e){de.setPressed([e[0],e[1]]),de.setCurrent([e[2],e[3]]),fe.update()}function k(){return p(de.getFixed())}function C(){return de.getFixed()}function S(e){c(e),D()}function L(){I.disabled=!0,fe.disableHandles(),fe.setCursor("default"),me.setCursor("default")}function A(){I.disabled=!1,D()}function T(){fe.done(),me.activateHandlers(null,null)}function q(){Y.remove(),O.show(),O.css("visibility","visible"),e(t).removeData("Jcrop")}function _(e,t){fe.release(),L();var n=new Image;n.onload=function(){var r=n.width,i=n.height,s=I.boxWidth,o=I.boxHeight;B.width(r).height(i),B.attr("src",e),V.attr("src",e),m(B,s,o),U=B.width(),W=B.height(),V.width(U).height(W),ae.width(U+2*oe).height(W+2*oe),Y.width(U).height(W),he.resize(U,W),A(),"function"==typeof t&&t.call(ge)},n.src=e}function E(e,t,n){var r=t||I.bgColor;I.bgFade&&s()&&I.fadeTime&&!n?e.animate({backgroundColor:r},{queue:!1,duration:I.fadeTime}):e.css("backgroundColor",r)}function D(e){I.allowResize?e?fe.enableOnly():fe.enableHandles():fe.disableHandles(),me.setCursor(I.allowSelect?"crosshair":"default"),fe.setCursor(I.allowMove?"move":"default"),I.hasOwnProperty("trueSize")&&(te=I.trueSize[0]/U,ne=I.trueSize[1]/W),I.hasOwnProperty("setSelect")&&(w(I.setSelect),fe.done(),delete I.setSelect),he.refresh(),I.bgColor!=ce&&(E(I.shade?he.getShades():Y,I.shade?I.shadeColor||I.bgColor:I.bgColor),ce=I.bgColor),ue!=I.bgOpacity&&(ue=I.bgOpacity,I.shade?he.refresh():fe.setBgOpacity(ue)),X=I.maxSize[0]||0,Q=I.maxSize[1]||0,Z=I.minSize[0]||0,ee=I.minSize[1]||0,I.hasOwnProperty("outerImage")&&(B.attr("src",I.outerImage),delete I.outerImage),fe.refresh()}var P,I=e.extend({},e.Jcrop.defaults),M=navigator.userAgent.toLowerCase(),R=/msie/.test(M),H=/msie [1-6]\./.test(M);"object"!=typeof t&&(t=e(t)[0]),"object"!=typeof n&&(n={}),c(n);var N={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},O=e(t),F=!0;if("IMG"==t.tagName){if(0!=O[0].width&&0!=O[0].height)O.width(O[0].width),O.height(O[0].height);else{var z=new Image;z.src=O[0].src,O.width(z.width),O.height(z.height)}var B=O.clone().removeAttr("id").css(N).show();B.width(O.width()),B.height(O.height()),O.after(B).hide()}else B=O.css(N).show(),F=!1,null===I.shade&&(I.shade=!0);m(B,I.boxWidth,I.boxHeight);var U=B.width(),W=B.height(),Y=e("<div />").width(U).height(W).addClass(i("holder")).css({position:"relative",backgroundColor:I.bgColor}).insertAfter(O).append(B);I.addClass&&Y.addClass(I.addClass);var V=e("<div />"),G=e("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),K=e("<div />").width("100%").height("100%").css("zIndex",320),J=e("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var e=de.getFixed();I.onDblClick.call(ge,e)}).insertBefore(B).append(G,K);F&&(V=e("<img />").attr("src",B.attr("src")).css(N).width(U).height(W),G.append(V)),H&&J.css({overflowY:"hidden"});var X,Q,Z,ee,te,ne,re,ie,se,oe=I.boundary,ae=y().width(U+2*oe).height(W+2*oe).css({position:"absolute",top:r(-oe),left:r(-oe),zIndex:290}).mousedown(v),ce=I.bgColor,ue=I.bgOpacity;P=o(B);var le=function(){function e(){var e,t={},n=["touchstart","touchmove","touchend"],r=document.createElement("div");try{for(e=0;e<n.length;e++){var i=n[e];i="on"+i;var s=i in r;s||(r.setAttribute(i,"return;"),s="function"==typeof r[i]),t[n[e]]=s}return t.touchstart&&t.touchend&&t.touchmove}catch(o){return!1}}function t(){return I.touchSupport===!0||I.touchSupport===!1?I.touchSupport:e()}return{createDragger:function(e){return function(t){return I.disabled?!1:"move"!==e||I.allowMove?(P=o(B),re=!0,u(e,a(le.cfilter(t)),!0),t.stopPropagation(),t.preventDefault(),!1):!1}},newSelection:function(e){return v(le.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:e,support:t()}}(),de=function(){function e(e){e=o(e),m=h=e[0],p=f=e[1]}function t(e){e=o(e),l=e[0]-m,d=e[1]-p,m=e[0],p=e[1]}function n(){return[l,d]}function r(e){var t=e[0],n=e[1];0>h+t&&(t-=t+h),0>f+n&&(n-=n+f),p+n>W&&(n+=W-(p+n)),m+t>U&&(t+=U-(m+t)),h+=t,m+=t,f+=n,p+=n}function i(e){var t=s();switch(e){case"ne":return[t.x2,t.y];case"nw":return[t.x,t.y];case"se":return[t.x2,t.y2];case"sw":return[t.x,t.y2]}}function s(){if(!I.aspectRatio)return c();var e,t,n,r,i=I.aspectRatio,s=I.minSize[0]/te,o=I.maxSize[0]/te,l=I.maxSize[1]/ne,d=m-h,g=p-f,v=Math.abs(d),b=Math.abs(g),y=v/b;return 0===o&&(o=10*U),0===l&&(l=10*W),i>y?(t=p,n=b*i,e=0>d?h-n:n+h,0>e?(e=0,r=Math.abs((e-h)/i),t=0>g?f-r:r+f):e>U&&(e=U,r=Math.abs((e-h)/i),t=0>g?f-r:r+f)):(e=m,r=v/i,t=0>g?f-r:f+r,0>t?(t=0,n=Math.abs((t-f)*i),e=0>d?h-n:n+h):t>W&&(t=W,n=Math.abs(t-f)*i,e=0>d?h-n:n+h)),e>h?(s>e-h?e=h+s:e-h>o&&(e=h+o),t=t>f?f+(e-h)/i:f-(e-h)/i):h>e&&(s>h-e?e=h-s:h-e>o&&(e=h-o),t=t>f?f+(h-e)/i:f-(h-e)/i),0>e?(h-=e,e=0):e>U&&(h-=e-U,e=U),0>t?(f-=t,t=0):t>W&&(f-=t-W,t=W),u(a(h,f,e,t))}function o(e){return e[0]<0&&(e[0]=0),e[1]<0&&(e[1]=0),e[0]>U&&(e[0]=U),e[1]>W&&(e[1]=W),[Math.round(e[0]),Math.round(e[1])]}function a(e,t,n,r){var i=e,s=n,o=t,a=r;return e>n&&(i=n,s=e),t>r&&(o=r,a=t),[i,o,s,a]}function c(){var e,t=m-h,n=p-f;return X&&Math.abs(t)>X&&(m=t>0?h+X:h-X),Q&&Math.abs(n)>Q&&(p=n>0?f+Q:f-Q),ee/ne&&Math.abs(n)<ee/ne&&(p=n>0?f+ee/ne:f-ee/ne),Z/te&&Math.abs(t)<Z/te&&(m=t>0?h+Z/te:h-Z/te),0>h&&(m-=h,h-=h),0>f&&(p-=f,f-=f),0>m&&(h-=m,m-=m),0>p&&(f-=p,p-=p),m>U&&(e=m-U,h-=e,m-=e),p>W&&(e=p-W,f-=e,p-=e),h>U&&(e=h-W,p-=e,f-=e),f>W&&(e=f-W,p-=e,f-=e),u(a(h,f,m,p))}function u(e){return{x:e[0],y:e[1],x2:e[2],y2:e[3],w:e[2]-e[0],h:e[3]-e[1]}}var l,d,h=0,f=0,m=0,p=0;return{flipCoords:a,setPressed:e,setCurrent:t,getOffset:n,moveOffset:r,getCorner:i,getFixed:s}}(),he=function(){function t(e,t){m.left.css({height:r(t)}),m.right.css({height:r(t)})}function n(){return i(de.getFixed())}function i(e){m.top.css({left:r(e.x),width:r(e.w),height:r(e.y)}),m.bottom.css({top:r(e.y2),left:r(e.x),width:r(e.w),height:r(W-e.y2)}),m.right.css({left:r(e.x2),width:r(U-e.x2)}),m.left.css({width:r(e.x)})}function s(){return e("<div />").css({position:"absolute",backgroundColor:I.shadeColor||I.bgColor}).appendTo(f)}function o(){h||(h=!0,f.insertBefore(B),n(),fe.setBgOpacity(1,0,1),V.hide(),a(I.shadeColor||I.bgColor,1),fe.isAwake()?u(I.bgOpacity,1):u(1,1))}function a(e,t){E(d(),e,t)}function c(){h&&(f.remove(),V.show(),h=!1,fe.isAwake()?fe.setBgOpacity(I.bgOpacity,1,1):(fe.setBgOpacity(1,1,1),fe.disableHandles()),E(Y,0,1))}function u(e,t){h&&(I.bgFade&&!t?f.animate({opacity:1-e},{queue:!1,duration:I.fadeTime}):f.css({opacity:1-e}))}function l(){I.shade?o():c(),fe.isAwake()&&u(I.bgOpacity)}function d(){return f.children()}var h=!1,f=e("<div />").css({position:"absolute",zIndex:240,opacity:0}),m={top:s(),left:s().height(W),right:s().height(W),bottom:s()};return{update:n,updateRaw:i,getShades:d,setBgColor:a,enable:o,disable:c,resize:t,refresh:l,opacity:u}}(),fe=function(){function t(t){var n=e("<div />").css({position:"absolute",opacity:I.borderOpacity}).addClass(i(t));return G.append(n),n}function n(t,n){var r=e("<div />").mousedown(f(t)).css({cursor:t+"-resize",position:"absolute",zIndex:n}).addClass("ord-"+t);return le.support&&r.bind("touchstart.jcrop",le.createDragger(t)),K.append(r),r}function s(e){var t=I.handleSize,r=n(e,L++).css({opacity:I.handleOpacity}).addClass(i("handle"));return t&&r.width(t).height(t),r}function o(e){return n(e,L++).addClass("jcrop-dragbar")}function a(e){var t;for(t=0;t<e.length;t++)q[e[t]]=o(e[t])}function c(e){var n,r;for(r=0;r<e.length;r++){switch(e[r]){case"n":n="hline";break;case"s":n="hline bottom";break;case"e":n="vline right";break;case"w":n="vline"}A[e[r]]=t(n)}}function u(e){var t;for(t=0;t<e.length;t++)T[e[t]]=s(e[t])}function l(e,t){I.shade||V.css({top:r(-t),left:r(-e)}),J.css({top:r(t),left:r(e)})}function d(e,t){J.width(Math.round(e)).height(Math.round(t))}function h(){var e=de.getFixed();de.setPressed([e.x,e.y]),de.setCurrent([e.x2,e.y2]),m()}function m(e){return S?g(e):void 0}function g(e){var t=de.getFixed();d(t.w,t.h),l(t.x,t.y),I.shade&&he.updateRaw(t),S||b(),e?I.onSelect.call(ge,p(t)):I.onChange.call(ge,p(t))}function v(e,t,n){(S||t)&&(I.bgFade&&!n?B.animate({opacity:e},{queue:!1,duration:I.fadeTime}):B.css("opacity",e))}function b(){J.show(),I.shade?he.opacity(ue):v(ue,!0),S=!0}function $(){x(),J.hide(),I.shade?he.opacity(1):v(1),S=!1,I.onRelease.call(ge)}function j(){_&&K.show()}function w(){return _=!0,I.allowResize?(K.show(),!0):void 0}function x(){_=!1,K.hide()}function k(e){e?(ie=!0,x()):(ie=!1,w())}function C(){k(!1),h()}var S,L=370,A={},T={},q={},_=!1;I.dragEdges&&e.isArray(I.createDragbars)&&a(I.createDragbars),e.isArray(I.createHandles)&&u(I.createHandles),I.drawBorders&&e.isArray(I.createBorders)&&c(I.createBorders),e(document).bind("touchstart.jcrop-ios",function(t){e(t.currentTarget).hasClass("jcrop-tracker")&&t.stopPropagation()});var E=y().mousedown(f("move")).css({cursor:"move",position:"absolute",zIndex:360});return le.support&&E.bind("touchstart.jcrop",le.createDragger("move")),G.append(E),x(),{updateVisible:m,update:g,release:$,refresh:h,isAwake:function(){return S},setCursor:function(e){E.css("cursor",e)},enableHandles:w,enableOnly:function(){_=!0},showHandles:j,disableHandles:x,animMode:k,setBgOpacity:v,done:C}}(),me=function(){function t(t){ae.css({zIndex:450}),t?e(document).bind("touchmove.jcrop",o).bind("touchend.jcrop",c):h&&e(document).bind("mousemove.jcrop",r).bind("mouseup.jcrop",i)}function n(){ae.css({zIndex:290}),e(document).unbind(".jcrop")}function r(e){return l(a(e)),!1}function i(e){return e.preventDefault(),e.stopPropagation(),re&&(re=!1,d(a(e)),fe.isAwake()&&I.onSelect.call(ge,p(de.getFixed())),n(),l=function(){},d=function(){}),!1}function s(e,n,r){return re=!0,l=e,d=n,t(r),!1}function o(e){return l(a(le.cfilter(e))),!1}function c(e){return i(le.cfilter(e))}function u(e){ae.css("cursor",e)}var l=function(){},d=function(){},h=I.trackDocument;return h||ae.mousemove(r).mouseup(i).mouseout(i),B.before(ae),{activateHandlers:s,setCursor:u}}(),pe=function(){function t(){I.keySupport&&(s.show(),s.focus())}function n(e){s.hide()}function r(e,t,n){I.allowMove&&(de.moveOffset([t,n]),fe.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}function i(e){if(e.ctrlKey||e.metaKey)return!0;se=e.shiftKey?!0:!1;var t=se?10:1;switch(e.keyCode){case 37:r(e,-t,0);break;case 39:r(e,t,0);break;case 38:r(e,0,-t);break;case 40:r(e,0,t);break;case 27:I.allowSelect&&fe.release();break;case 9:return!0}return!1}var s=e('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),o=e("<div />").css({position:"absolute",overflow:"hidden"}).append(s);return I.keySupport&&(s.keydown(i).blur(n),H||!I.fixedSupport?(s.css({position:"absolute",left:"-20px"}),o.append(s).insertBefore(B)):s.insertBefore(B)),{watchKeys:t}}();le.support&&ae.bind("touchstart.jcrop",le.newSelection),K.hide(),D(!0);var ge={setImage:_,animateTo:j,setSelect:w,setOptions:S,tellSelect:k,tellScaled:C,setClass:$,disable:L,enable:A,cancel:T,release:fe.release,destroy:q,focus:pe.watchKeys,getBounds:function(){return[U*te,W*ne]},getWidgetSize:function(){return[U,W]},getScaleFactor:function(){return[te,ne]},getOptions:function(){return I},ui:{holder:Y,selection:J}};return R&&Y.bind("selectstart",function(){return!1}),O.data("Jcrop",ge),ge},e.fn.Jcrop=function(t,n){var r;return this.each(function(){if(e(this).data("Jcrop")){if("api"===t)return e(this).data("Jcrop");e(this).data("Jcrop").setOptions(t)}else"IMG"==this.tagName?e.Jcrop.Loader(this,function(){e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r)}):(e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r))}),this},e.Jcrop.Loader=function(t,n,r){function i(){o.complete?(s.unbind(".jcloader"),e.isFunction(n)&&n.call(o)):window.setTimeout(i,50)}var s=e(t),o=s[0];s.bind("load.jcloader",i).bind("error.jcloader",function(t){s.unbind(".jcloader"),e.isFunction(r)&&r.call(o)}),o.complete&&e.isFunction(n)&&(s.unbind(".jcloader"),n.call(o))},e.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery),function(){var e,t=function(e,t){return function(){return e.apply(t,arguments)}};e=function(){function e(e){this.clearCropFormValues=t(this.clearCropFormValues,this),this.setCropFormValues=t(this.setCropFormValues,this),this.setCurrentSelection=t(this.setCurrentSelection,this),this.setTrueSize=t(this.setTrueSize,this);var n,r,i;this.container=$(e),this.spinner=this.container.find(".profile-picture-spinner"),this.img=this.container.find(".js-croppable-avatar"),this.croppedX=this.container.find(".js-crop-cropped-x"),this.croppedY=this.container.find(".js-crop-cropped-y"),this.croppedW=this.container.find(".js-crop-cropped-width"),this.croppedH=this.container.find(".js-crop-cropped-height"),n=this.img.parent("div").width(),i={aspectRatio:1,onSelect:this.setCropFormValues,onRelease:this.clearCropFormValues,bgColor:"",maxSize:[3e3,3e3],boxWidth:n,boxHeight:n},this.setTrueSize(i),this.setCurrentSelection(i),r=this,this.img.Jcrop(i,function(){return r.spinner.addClass("hidden"),r.jcrop=this})}return e.prototype.setTrueSize=function(e){var t,n;return n=parseInt(this.img.attr("data-true-width")),t=parseInt(this.img.attr("data-true-height")),0!==n&&0!==t?e.trueSize=[n,t]:void 0},e.prototype.setCurrentSelection=function(e){var t,n,r,i;return n=parseInt(this.croppedW.val()),t=parseInt(this.croppedH.val()),0!==n&&0!==t?(r=parseInt(this.croppedX.val()),i=parseInt(this.croppedY.val()),e.setSelect=[r,i,r+n,i+t]):void 0},e.prototype.setCropFormValues=function(e){return this.croppedX.val(e.x),this.croppedY.val(e.y),this.croppedW.val(e.w),this.croppedH.val(e.h)},e.prototype.clearCropFormValues=function(){return this.croppedX.val("0"),this.croppedY.val("0"),this.croppedW.val("0"),this.croppedH.val("0")},e}(),$.observe(".js-croppable-container",{add:function(t){return new e(t)}}),$(document).on("afterClose.facebox",function(){return $(".js-avatar-field").val("")})}.call(this),function(){var e;$.fn.scrollBy=function(t,n){var r,i;return 0===t&&0===n?[0,0]:(i=e(this[0]),this.scrollTo({top:i.top+n,left:i.left+t}),r=e(this[0]),[r.left-i.left,r.top-i.top])},e=function(e){return e.offsetParent?{top:$(e).scrollTop(),left:$(e).scrollLeft()}:{top:$(document).scrollTop(),left:$(document).scrollLeft()}}}.call(this),function(){$.fn.cumulativeScrollBy=function(e,t){var n,r,i,s,o,a;for(r=i=0,n=this.overflowParent();n[0]&&(s=n.scrollBy(e-r,t-i),o=s[0],a=s[1],r+=o,i+=a,r!==e||i!==t);)n=n.overflowParent()}}.call(this),function(){window.d3Ready=function(){return"undefined"!=typeof d3&&null!==d3?Promise.resolve():new Promise(function(e,t){return document.addEventListener("graph-lib:loaded",function(){return e()})})}}.call(this),function(){var e,t,n;t="ontransitionend"in window,$.fn.performTransition=function(r){var i,s,o,a,c,u,l,d;if(!t)return void r.apply(this);for(o=this.find(".js-transitionable"),o=o.add(this.filter(".js-transitionable")),a=0,u=o.length;u>a;a++)s=o[a],i=$(s),d=e(s),i.one("transitionend",function(){return s.style.display=null,s.style.visibility=null,d?n(s,function(){return s.style.height=null}):void 0}),s.style.display="block",s.style.visibility="visible",d&&n(s,function(){return s.style.height=i.height()+"px"}),s.offsetHeight;for(r.apply(this),c=0,l=o.length;l>c;c++)s=o[c],e(s)&&(0===$(s).height()?s.style.height=s.scrollHeight+"px":s.style.height="0px");return this},e=function(e){return"height"===$(e).css("transitionProperty")},n=function(e,t){e.style.transition="none",t(e),e.offsetHeight,e.style.transition=null}}.call(this),function(){$(document).on("click",".js-details-container .js-details-target",function(e){var t,n;n=$(this),t=n.closest(".js-details-container"),n.fire("details:toggle",{relatedTarget:e.target},function(){t.performTransition(function(){this.toggleClass("open"),this.fire("details:toggled",{relatedTarget:e.target,async:!0})}),e.preventDefault()})}),$(document).on("details:toggled",function(e){var t,n,r;n=e.target,r=e.relatedTarget,t=$(n).find("input[autofocus], textarea[autofocus]").last()[0],t&&document.activeElement!==t&&t.focus(),r.classList.contains("tooltipped")&&(r.classList.remove("tooltipped"),$(r).one("mouseleave",function(){return r.classList.add("tooltipped")})),r.blur()}),$.hashChange(function(e){return $(e.target).parents(".js-details-container").addClass("open")})}.call(this),function(){$(document).on("menu:activate",".js-select-menu",function(){return $(this).addClass("is-dirty")}),$(document).on("menu:deactivate",".js-select-menu",function(){return $(this).removeClass("is-dirty")})}.call(this),function(){var e,t,n,r;t=new WeakMap,n=["input[type=submit][data-disable-with]","button[type=submit][data-disable-with]"].join(", "),e=function(e){return"INPUT"===e.nodeName?e.value||"Submit":e.innerHTML||""},r=function(e,t){return"INPUT"===e.nodeName?e.value=t:e.innerHTML=t},$(document).on("submit:prepare","form",function(){var i,s,o,a,c;for(c=this.querySelectorAll(n),o=0,a=c.length;a>o;o++)i=c[o],t.set(i,e(i)),s=i.getAttribute("data-disable-with"),s&&r(i,s),i.disabled=!0}),$(document).on("ajaxComplete","form",function(e){var i,s,o,a,c;if(this===e.target)for(a=this.querySelectorAll(n),s=0,o=a.length;o>s;s++)i=a[s],c=t.get(i),null!=c&&(r(i,c),i.disabled=!1,t["delete"](i))})}.call(this),function(){$(document).on("click",".js-facebox",function(){return $.facebox({div:this.getAttribute("data-facebox")})})}.call(this),function(){var e,t;$(document).on("reveal.facebox",function(){var e,n;e=$("#facebox"),n=e.find("input[autofocus], textarea[autofocus]").last()[0],n&&document.activeElement!==n&&n.focus(),$(document).on("keydown",t)}),$(document).on("afterClose.facebox",function(){return $(document).off("keydown",t),$("#facebox :focus").blur()}),t=function(e){var t,n,r,i,s,o;("tab"===(s=e.hotkey)||"shift+tab"===s)&&(e.preventDefault(),n=$("#facebox"),t=n.find("input, button, .btn, textarea").visible().filter(function(){return!this.disabled}),i="shift+tab"===e.hotkey?-1:1,r=t.index(t.filter(":focus")),o=r+i,o===t.length||-1===r&&"tab"===e.hotkey?t.first().focus():-1===r?t.last().focus():t.get(o).focus())},$.observe("a[rel*=facebox]",e=function(){$(this).facebox()})}.call(this),define("github/local-storage",["exports"],function(e){function t(e){try{return localStorage.getItem(e)}catch(t){return null}}function n(e,t){try{localStorage.setItem(e,t)}catch(n){}}function r(e){try{localStorage.removeItem(e)}catch(t){}}Object.defineProperty(e,"__esModule",{value:!0}),e.getItem=t,e.setItem=n,e.removeItem=r}),function(){var e=require("github/local-storage"),t=e.getItem,n=e.setItem;$.observe(".js-feature-callout",function(){var e=this.getAttribute("data-feature-name"),n="dismissed"===t(e);this.classList.toggle("hidden",n)}),$(document).on("click",".js-dismiss-feature-callout",function(){var e=this.closest(".js-feature-callout"),t=e.getAttribute("data-feature-name");e.classList.add("hidden"),n(t,"dismissed")})}(),function(){var e,t;$.fuzzyScore=function(e,n){var r,i;return i=t(e,n),i&&-1===n.indexOf("/")&&(r=e.substring(e.lastIndexOf("/")+1),i+=t(r,n)),i},$.fuzzySort=function(t,n){var r,i,s,o,a,c;for(t=function(){var e,r,i;for(i=[],e=0,r=t.length;r>e;e++)c=t[e],(a=$.fuzzyScore(c,n))&&i.push([c,a]);return i}(),t.sort(e),o=[],i=0,s=t.length;s>i;i++)r=t[i],o.push(r[0]);return o},e=function(e,t){var n,r,i,s;return r=e[0],s=t[0],n=e[1],i=t[1],n>i?-1:i>n?1:s>r?-1:r>s?1:0},$.fuzzyRegexp=function(e){var t,n,r;return r=e.toLowerCase(),t="+.*?[]{}()^$|\\".replace(/(.)/g,"\\$1"),n=new RegExp("\\((["+t+"])\\)","g"),e=r.replace(/(.)/g,"($1)(.*?)").replace(n,"(\\$1)"),new RegExp("(.*)"+e+"$","i")},$.fuzzyHighlight=function(e,t,n){var r,i,s,o,a,c,u,l;if(null==n&&(n=null),i=e.innerHTML.trim(),t){if(null==n&&(n=$.fuzzyRegexp(t)),!(c=i.match(n)))return;for(u=!1,i=[],s=o=1,l=c.length;l>=1?l>o:o>l;s=l>=1?++o:--o)a=c[s],a&&(s%2===0?u||(i.push("<mark>"),u=!0):u&&(i.push("</mark>"),u=!1),i.push(a));e.innerHTML=i.join("")}else r=i.replace(/<\/?mark>/g,""),i!==r&&(e.innerHTML=r)},t=function(e,t){var n,r,i,s,o,a,c,u,l,d,h,f,m,p;if(e===t)return 1;for(m=e.length,p=0,f=0,o=l=0,d=t.length;d>l;o=++l){if(i=t[o],a=e.indexOf(i.toLowerCase()),c=e.indexOf(i.toUpperCase()),h=Math.min(a,c),u=h>-1?h:Math.max(a,c),-1===u)return 0;p+=.1,e[u]===i&&(p+=.1),0===u&&(p+=.8,0===o&&(f=1))," "===e.charAt(u-1)&&(p+=.8),e=e.substring(u+1,m)}return n=t.length,r=p/n,s=(r*(n/m)+r)/2,f&&1>s+.1&&(s+=.1),s}}.call(this),function(){var e,t,n,r,i;r=new WeakMap,$.fn.fuzzyFilterSortList=function(s,o){var a,c,u,l,d,h,f,m,p,g,v,b,y,j,w,x,k,C,S,L,A,T,q,_,E,D,P;if(null==o&&(o={}),x=this[0]){for(s=s.toLowerCase(),l=null!=(S=o.content)?S:e,E=null!=(L=o.text)?L:n,_=null!=(A=o.score)?A:$.fuzzyScore,w=o.limit,o.mark===!0?k=t:null!=(null!=(T=o.mark)?T.call:void 0)&&(k=o.mark),(a=r.get(x))?c=$(x).children():(c=a=$(x).children(),x.webkitWeakMapWorkaround=1,r.set(x,a.slice(0))),d=0,v=c.length;v>d;d++)h=c[d],x.removeChild(h),h.style.display="";if(q=document.createDocumentFragment(),D=0,P=0,s){for(f=a.slice(0),p=0,y=f.length;y>p;p++)h=f[p],null==h.fuzzyFilterTextCache&&(h.fuzzyFilterTextCache=E(l(h))),h.fuzzyFilterScoreCache=_(h.fuzzyFilterTextCache,s);for(f.sort(i),C=$.fuzzyRegexp(s),g=0,j=f.length;j>g;g++)h=f[g],(!w||w>D)&&h.fuzzyFilterScoreCache>0&&(P++,k&&(u=l(h),k(u),k(u,s,C)),q.appendChild(h)),D++}else for(m=0,b=a.length;b>m;m++)h=a[m],(!w||w>D)&&(P++,k&&k(l(h)),q.appendChild(h)),D++;return x.appendChild(q),P}},i=function(e,t){var n,r,i,s;return n=e.fuzzyFilterScoreCache,i=t.fuzzyFilterScoreCache,r=e.fuzzyFilterTextCache,s=t.fuzzyFilterTextCache,n>i?-1:i>n?1:s>r?-1:r>s?1:0},e=function(e){return e},n=function(e){return $.trim(e.textContent.toLowerCase())},t=$.fuzzyHighlight}.call(this),function(){var e,t;$.fn.prefixFilterList=function(n,r){var i,s,o,a,c,u,l,d,h,f,m;if(null==r&&(r={}),u=this[0]){for(n=n.toLowerCase(),f=null!=(d=r.text)?d:t,i=$(u).children(),c=r.limit,r.mark===!0?l=e:null!=(null!=(h=r.mark)?h.call:void 0)&&(l=r.mark),m=0,s=0,a=i.length;a>s;s++)o=i[s],0===f(o).indexOf(n)?c&&m>=c?o.style.display="none":(m++,o.style.display="",l&&(l(o),l(o,n))):o.style.display="none";return m}},t=function(e){return $.trim(e.textContent.toLowerCase())},e=function(e,t){var n,r,i;r=e.innerHTML,t?(i=new RegExp(t,"i"),e.innerHTML=r.replace(i,"<mark>$&</mark>")):(n=r.replace(/<\/?mark>/g,""),r!==n&&(e.innerHTML=n))}}.call(this),function(){var e,t;$.fn.substringFilterList=function(n,r){var i,s,o,a,c,u,l,d,h,f,m;if(null==r&&(r={}),u=this[0]){for(n=n.toLowerCase(),f=null!=(d=r.text)?d:t,c=r.limit,i=$(u).children(),r.mark===!0?l=e:null!=(null!=(h=r.mark)?h.call:void 0)&&(l=r.mark),m=0,s=0,a=i.length;a>s;s++)o=i[s],-1!==f(o).indexOf(n)?c&&m>=c?o.style.display="none":(m++,o.style.display="",l&&(l(o),l(o,n))):o.style.display="none";return m}},t=function(e){return $.trim(e.textContent.toLowerCase())},e=function(e,t){var n,r,i;r=e.innerHTML,t?(i=new RegExp(t,"i"),e.innerHTML=r.replace(i,"<mark>$&</mark>")):(n=r.replace(/<\/?mark>/g,""),r!==n&&(e.innerHTML=n))}}.call(this),function(){var e;$.observe(".js-filterable-field",function(){var e;return e=$(this).val(),{add:function(){return $(this).on("throttled:input.filterable",function(){return e!==$(this).val()?(e=$(this).val(),$(this).fire("filterable:change",{async:!0})):void 0}),$(this).on("focus.filterable",function(){return $(this).fire("filterable:change",{async:!0})})},remove:function(){return $(this).off("filterable")}}}),$(document).on("filterable:change",".js-filterable-field",function(){var t,n,r,i,s,o;for(s=$.trim($(this).val().toLowerCase()),o=$("[data-filterable-for="+this.id+"]"),n=0,r=o.length;r>n;n++)i=o[n],t=$(i),e(t,s),t.fire("filterable:change",{relatedTarget:this})}),e=function(e,t){var n,r,i;r=void 0!==e.attr("data-filterable-highlight"),n=e.attr("data-filterable-limit"),i=function(){switch(e.attr("data-filterable-type")){case"fuzzy":return e.fuzzyFilterSortList(t,{mark:r,limit:n});case"substring":return e.substringFilterList(t,{mark:r,limit:n});default:return e.prefixFilterList(t,{mark:r,limit:n})}}(),e.toggleClass("filterable-active",t.length>0),e.toggleClass("filterable-empty",0===i)}}.call(this),function(){$(document).on("click",".js-flash-close",function(e){var t;return t=$(this).closest(".flash-messages"),$(this).closest(".flash").fadeOut(300,function(){return $(this).remove(),0===t.find(".flash").length?t.remove():void 0})})}.call(this),function(){var e;e=new WeakMap,$(document).on("focusin.delay",function(t){var n;n=t.target,e.get(n)||$(n).fire("focusin:delay",function(){e.set(n,!0),$(n).trigger("focusin:delayed")})}),$(document).on("focusout.delay",function(t){return setTimeout(function(){var n;n=t.target,n!==document.activeElement&&$(n).fire("focusout:delay",function(){e["delete"](t.target),$(n).trigger("focusout:delayed")})},200)})}.call(this),function(){$(document).on("click",".js-force-push-default-branch-notice-close",function(){this.closest(".js-force-push-default-branch-notice").classList.add("hidden");try{localStorage.setItem("hide-force-push-default-branch-notice","true")}catch(e){}}),$.observe(".js-force-push-default-branch-notice",function(){var e;e=function(){try{return localStorage.getItem("hide-force-push-default-branch-notice")}catch(e){}}(),this.classList.toggle("hidden","true"===e)})}.call(this),function(){var e,t,n;n=require("github/feature-detection")["default"],n.emoji||(e=Object.create(HTMLElement.prototype),e.createdCallback=function(){return this.textContent="",this.appendChild(t(this))},t=function(e){var t;return t=document.createElement("img"),t.src=e.getAttribute("fallback-src"),t.className="emoji",t.alt=t.title=":"+e.getAttribute("alias")+":",t.height=20,t.width=20,t.align="absmiddle",t},window.GEmojiElement=document.registerElement("g-emoji",{prototype:e}))}.call(this),function(){function e(e,t){return e.href=t}function t(e,t){return e.name=t}function n(e){Ce.set(e)}function r(e){return"function"==typeof e}function i(e){return"[object Array]"==Object[pe].toString[be](Object(e))}function s(e){return void 0!=e&&-1<(e.constructor+"")[de]("String")}function o(e,t){return 0==e[de](t)}function a(e){return e?e[z](/^[\s\xa0]+|[\s\xa0]+$/g,""):""}function c(){return[Ke()^2147483647&Re(),F.round((new Date)[K]()/1e3)][xe](".")}function u(e){var t=qe[V]("img");return t.width=1,t.height=1,t.src=e,t}function l(){}function d(e){return H instanceof Function?H(e):(n(28),e)}function h(e){return d(e)[z](/\(/g,"%28")[z](/\)/g,"%29")}function f(e,t){if(e){var n=qe[V]("script");n.type="text/javascript",n.async=!0,n.src=e,n.id=t;var r=qe.getElementsByTagName("script")[0];r[we].insertBefore(n,r)}}function m(){return lt||"https:"==qe[Q][ne]?"https:":"http:"}function p(){var e=""+qe[Q][ee];return 0==e[de]("www.")?e[$e](4):e}function g(e){var t=qe.referrer;if(/^https?:\/\//i[ce](t)){if(e)return t;e="//"+qe[Q][ee];var n=t[de](e);if((5==n||6==n)&&(e=t.charAt(n+e[me]),"/"==e||"?"==e||""==e||":"==e))return;return t}}function v(e,t){if(1==t[me]&&null!=t[0]&&"object"==typeof t[0])return t[0];for(var n={},r=F.min(e[me]+1,t[me]),i=0;r>i;i++){if("object"==typeof t[i]){for(var s in t[i])t[i][Z](s)&&(n[s]=t[i][s]);break}i<e[me]&&(n[e[i]]=t[i])}return n}function b(e){if(100!=e.get(Dn)&&R(Ze(e,jn))%1e4>=100*et(e,Dn))throw"abort"}function y(e){if(_e(Ze(e,xn)))throw"abort"}function $(){var e=qe[Q][ne];if("http:"!=e&&"https:"!=e)throw"abort"}function j(e){try{Te.XMLHttpRequest&&"withCredentials"in new Te.XMLHttpRequest?n(40):Te.XDomainRequest&&n(41),Te[je].sendBeacon&&n(42)}catch(t){}e.set(bt,et(e,bt)+1);var r=[];if(Xe.map(function(t,n){if(n.p){var i=e.get(t);void 0!=i&&i!=n[he]&&("boolean"==typeof i&&(i*=1),r[oe](n.p+"="+d(""+i)))}}),On(new Nn(1e4))){var i=[];i[oe](Ve()),i[oe][se](i,c()[X](".")),i[oe](Ge());var s;s=Te.crypto?!0:!1,i[oe](s?"c":"b"),r[oe]("z="+i[xe]("."))}else r[oe]("z="+Ge());e.set(gt,r[xe]("&"),!0)}function w(e){var t=Ze(e,Mn)||He()+"/collect";Fe(t,Ze(e,gt),e.get(pt),e.get(vt)),e.set(pt,l,!0)}function x(e){var t=Te.gaData;t&&(t.expId&&e.set(Gt,t.expId),t.expVar&&e.set(Kt,t.expVar))}function k(){if(Te[je]&&"preview"==Te[je].loadPurpose)throw"abort"}function C(e){var t=Te.gaDevIds;i(t)&&0!=t[me]&&e.set("&did",t[xe](","),!0)}function S(e){if(!e.get(xn))throw"abort"}function L(e){var t=et(e,Zt);t>=500&&n(15);var r=Ze(e,mt);if("transaction"!=r&&"item"!=r){var r=et(e,tn),i=(new Date)[K](),s=et(e,en);if(0==s&&e.set(en,i),s=F.round(2*(i-s)/1e3),s>0&&(r=F.min(r+s,20),e.set(en,i)),0>=r)throw"abort";e.set(tn,--r)}e.set(Zt,++t)}function A(e,t,r,i){t[e]=function(){try{return i&&n(i),r[se](this,arguments)}catch(t){var s=t&&t[fe];if(!(1<=100*F.random()||_e("?"))){var o=["t=error","_e=exc","_v=j30","sr=1"];e&&o[oe]("_f="+e),s&&o[oe]("_m="+d(s[$e](0,100))),o[oe]("aip=1"),o[oe]("z="+Ke()),Fe(He()+"/collect",o[xe]("&"))}throw t}}}function T(){var e,t,n;if((n=(n=Te[je])?n.plugins:null)&&n[me])for(var r=0;r<n[me]&&!t;r++){var i=n[r];-1<i[fe][de]("Shockwave Flash")&&(t=i.description)}if(!t)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),t=e.GetVariable("$version")}catch(s){}if(!t)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),t="WIN 6,0,21,0",e.AllowScriptAccess="always",t=e.GetVariable("$version")}catch(o){}if(!t)try{e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),t=e.GetVariable("$version")}catch(a){}return t&&(e=t[U](/[\d]+/g))&&3<=e[me]&&(t=e[0]+"."+e[1]+" r"+e[2]),
t||void 0}function q(e,t,n){"none"==t&&(t="");var r=[],i=De(e);e="__utma"==e?6:2;for(var s=0;s<i[me];s++){var o=(""+i[s])[X](".");o[me]>=e&&r[oe]({hash:o[0],R:i[s],O:o})}return 0==r[me]?void 0:1==r[me]?r[0]:_(t,r)||_(n,r)||_(null,r)||r[0]}function _(e,t){var n,r;null==e?n=r=1:(n=R(e),r=R(o(e,".")?e[$e](1):"."+e));for(var i=0;i<t[me];i++)if(t[i][ae]==n||t[i][ae]==r)return t[i]}function E(e){e=e.get(jn);var t=D(e,0);return"_ga=1."+d(t+"."+e)}function D(e,t){for(var n=new Date,r=Te[je],i=r.plugins||[],n=[e,r.userAgent,n.getTimezoneOffset(),n.getYear(),n.getDate(),n.getHours(),n.getMinutes()+t],r=0;r<i[me];++r)n[oe](i[r].description);return R(n[xe]("."))}function P(e,t){if(t==qe[Q][ee])return!1;for(var n=0;n<e[me];n++)if(e[n]instanceof RegExp){if(e[n][ce](t))return!0}else if(0<=t[de](e[n]))return!0;return!1}function I(){var e=Te.gaGlobal=Te.gaGlobal||{};return e.hid=e.hid||Ke()}function M(e){return 0<=e[de](".")||0<=e[de](":")}function R(e){var t,n=1,r=0;if(e)for(n=0,t=e[me]-1;t>=0;t--)r=e.charCodeAt(t),n=(n<<6&268435455)+r+(r<<14),r=266338304&n,n=0!=r?n^r>>21:n;return n}var H=encodeURIComponent,N=window,O=setTimeout,F=Math,z="replace",B="data",U="match",W="send",Y="port",V="createElement",G="setAttribute",K="getTime",J="host",X="split",Q="location",Z="hasOwnProperty",ee="hostname",te="search",ne="protocol",re="href",ie="action",se="apply",oe="push",ae="hash",ce="test",ue="slice",le="cookie",de="indexOf",he="defaultValue",fe="name",me="length",pe="prototype",ge="clientWidth",ve="target",be="call",ye="clientHeight",$e="substring",je="navigator",we="parentNode",xe="join",ke="toLowerCase",Ce=new function(){var e=[];this.set=function(t){e[t]=!0},this.M=function(){for(var t=[],n=0;n<e[me];n++)e[n]&&(t[F.floor(n/6)]=t[F.floor(n/6)]^1<<n%6);for(n=0;n<t[me];n++)t[n]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(t[n]||0);return t[xe]("")+"~"}},Se=function(e,t,r,i){try{e.addEventListener?e.addEventListener(t,r,!!i):e.attachEvent&&e.attachEvent("on"+t,r)}catch(s){n(27)}},Le=function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)},Ae=function(){this.keys=[],this.w={},this.m={}};Ae[pe].set=function(e,t,n){this.keys[oe](e),n?this.m[":"+e]=t:this.w[":"+e]=t},Ae[pe].get=function(e){return this.m[Z](":"+e)?this.m[":"+e]:this.w[":"+e]},Ae[pe].map=function(e){for(var t=0;t<this.keys[me];t++){var n=this.keys[t],r=this.get(n);r&&e(n,r)}};var Te=N,qe=document,_e=function(e){var t=Te._gaUserPrefs;if(t&&t.ioo&&t.ioo()||e&&!0===Te["ga-disable-"+e])return!0;try{var n=Te.external;if(n&&n._gaUserPrefs&&"oo"==n._gaUserPrefs)return!0}catch(r){}return!1},Ee=function(e){O(e,100)},De=function(e){var t=[],n=qe[le][X](";");e=new RegExp("^\\s*"+e+"=\\s*(.*?)\\s*$");for(var r=0;r<n[me];r++){var i=n[r][U](e);i&&t[oe](i[1])}return t},Pe=function(e,t,r,i,s,o){if(s=_e(s)?!1:Me[ce](qe[Q][ee])||"/"==r&&Ie[ce](i)?!1:!0,!s)return!1;if(t&&1200<t[me]&&(t=t[$e](0,1200),n(24)),r=e+"="+t+"; path="+r+"; ",o&&(r+="expires="+new Date((new Date)[K]()+o).toGMTString()+"; "),i&&"none"!=i&&(r+="domain="+i+";"),i=qe[le],qe.cookie=r,!(i=i!=qe[le]))e:{for(e=De(e),i=0;i<e[me];i++)if(t==e[i]){i=!0;break e}i=!1}return i},Ie=new RegExp(/^(www\.)?google(\.com?)?(\.[a-z]{2})?$/),Me=new RegExp(/(^|\.)doubleclick\.net$/i),Re=function(){for(var e=Te[je].userAgent+(qe[le]?qe[le]:"")+(qe.referrer?qe.referrer:""),t=e[me],n=Te.history[me];n>0;)e+=n--^t++;return R(e)},He=function(){return m()+"//www.google-analytics.com"},Ne=function(e){t(this,"len"),this.message=e+"-8192"},Oe=function(e){t(this,"ff2post"),this.message=e+"-2036"},Fe=function(e,t,n,r){if(n=n||l,r&&(r=n,Te[je].sendBeacon&&Te[je].sendBeacon(e,t)?(r(),r=!0):r=!1),!r)if(2036>=t[me])ze(e,t,n);else{if(!(8192>=t[me]))throw new Ne(t[me]);if(0<=Te[je].userAgent[de]("Firefox")&&![].reduce)throw new Oe(t[me]);Ue(e,t,n)||Be(e,t,n)||We(t,n)||n()}},ze=function(e,t,n){var r=u(e+"?"+t);r.onload=r.onerror=function(){r.onload=null,r.onerror=null,n()}},Be=function(e,t,n){var r;return(r=Te.XDomainRequest)?(r=new r,r.open("POST",e),r.onerror=function(){n()},r.onload=n,r[W](t),!0):!1},Ue=function(e,t,n){var r=Te.XMLHttpRequest;if(!r)return!1;var i=new r;return"withCredentials"in i?(i.open("POST",e,!0),i.withCredentials=!0,i.setRequestHeader("Content-Type","text/plain"),i.onreadystatechange=function(){4==i.readyState&&(n(),i=null)},i[W](t),!0):!1},We=function(e,n){if(!qe.body)return Ee(function(){We(e,n)}),!0;e=H(e);try{var r=qe[V]('<iframe name="'+e+'"></iframe>')}catch(i){r=qe[V]("iframe"),t(r,e)}r.height="0",r.width="0",r.style.display="none",r.style.visibility="hidden";var s=qe[Q],s=He()+"/analytics_iframe.html#"+H(s[ne]+"//"+s[J]+"/favicon.ico"),o=function(){r.src="",r[we]&&r[we].removeChild(r)};Se(Te,"beforeunload",o);var a=!1,c=0,u=function(){if(!a){try{if(c>9||r.contentWindow[Q][J]==qe[Q][J])return a=!0,o(),Le(Te,"beforeunload",o),void n()}catch(e){}c++,O(u,200)}};return Se(r,"load",u),qe.body.appendChild(r),r.src=s,!0},Ye=function(){this.t=[]};Ye[pe].add=function(e){this.t[oe](e)},Ye[pe].D=function(e){try{for(var t=0;t<this.t[me];t++){var n=e.get(this.t[t]);n&&r(n)&&n[be](Te,e)}}catch(i){}t=e.get(pt),t!=l&&r(t)&&(e.set(pt,l,!0),O(t,10))};var Ve=function(){return F.round(2147483647*F.random())},Ge=function(){try{var e=new Uint32Array(1);return Te.crypto.getRandomValues(e),2147483647&e[0]}catch(t){return Ve()}},Ke=Ve,Je=function(){this.data=new Ae},Xe=new Ae,Qe=[];Je[pe].get=function(e){var t=rt(e),n=this[B].get(e);return t&&void 0==n&&(n=r(t[he])?t[he]():t[he]),t&&t.n?t.n(this,e,n):n};var Ze=function(e,t){var n=e.get(t);return void 0==n?"":""+n},et=function(e,t){var n=e.get(t);return void 0==n||""===n?0:1*n};Je[pe].set=function(e,t,n){if(e)if("object"==typeof e)for(var r in e)e[Z](r)&&tt(this,r,e[r],n);else tt(this,e,t,n)};var tt=function(e,t,n,r){if(void 0!=n)switch(t){case xn:br[ce](n)}var i=rt(t);i&&i.o?i.o(e,t,n,r):e[B].set(t,n,r)},nt=function(e,n,r,i,s){t(this,e),this.p=n,this.n=i,this.o=s,this.defaultValue=r},rt=function(e){var t=Xe.get(e);if(!t)for(var n=0;n<Qe[me];n++){var r=Qe[n],i=r[0].exec(e);if(i){t=r[1](i),Xe.set(t[fe],t);break}}return t},it=function(e){var t;return Xe.map(function(n,r){r.p==e&&(t=r)}),t&&t[fe]},st=function(e,t,n,r,i){return e=new nt(e,t,n,r,i),Xe.set(e[fe],e),e[fe]},ot=function(e,t){Qe[oe]([new RegExp("^"+e+"$"),t])},at=function(e,t,n){return st(e,t,n,void 0,ct)},ct=function(){},ut=s(N.GoogleAnalyticsObject)&&a(N.GoogleAnalyticsObject)||"ga",lt=!1,dt=at("apiVersion","v"),ht=at("clientVersion","_v");st("anonymizeIp","aip");var ft=st("adSenseId","a"),mt=st("hitType","t"),pt=st("hitCallback"),gt=st("hitPayload");st("nonInteraction","ni"),st("currencyCode","cu");var vt=st("useBeacon",void 0,!1);st("dataSource","ds"),st("sessionControl","sc",""),st("sessionGroup","sg"),st("queueTime","qt");var bt=st("_s","_s");st("screenName","cd");var yt=st("location","dl",""),$t=st("referrer","dr"),jt=st("page","dp","");st("hostname","dh");var wt=st("language","ul"),xt=st("encoding","de");st("title","dt",function(){return qe.title||void 0}),ot("contentGroup([0-9]+)",function(e){return new nt(e[0],"cg"+e[1])});var kt=st("screenColors","sd"),Ct=st("screenResolution","sr"),St=st("viewportSize","vp"),Lt=st("javaEnabled","je"),At=st("flashVersion","fl");st("campaignId","ci"),st("campaignName","cn"),st("campaignSource","cs"),st("campaignMedium","cm"),st("campaignKeyword","ck"),st("campaignContent","cc");var Tt=st("eventCategory","ec"),qt=st("eventAction","ea"),_t=st("eventLabel","el"),Et=st("eventValue","ev"),Dt=st("socialNetwork","sn"),Pt=st("socialAction","sa"),It=st("socialTarget","st"),Mt=st("l1","plt"),Rt=st("l2","pdt"),Ht=st("l3","dns"),Nt=st("l4","rrt"),Ot=st("l5","srt"),Ft=st("l6","tcp"),zt=st("l7","dit"),Bt=st("l8","clt"),Ut=st("timingCategory","utc"),Wt=st("timingVar","utv"),Yt=st("timingLabel","utl"),Vt=st("timingValue","utt");st("appName","an"),st("appVersion","av",""),st("appId","aid",""),st("appInstallerId","aiid",""),st("exDescription","exd"),st("exFatal","exf");var Gt=st("expId","xid"),Kt=st("expVar","xvar"),Jt=st("_utma","_utma"),Xt=st("_utmz","_utmz"),Qt=st("_utmht","_utmht"),Zt=st("_hc",void 0,0),en=st("_ti",void 0,0),tn=st("_to",void 0,20);ot("dimension([0-9]+)",function(e){return new nt(e[0],"cd"+e[1])}),ot("metric([0-9]+)",function(e){return new nt(e[0],"cm"+e[1])}),st("linkerParam",void 0,void 0,E,ct);var nn=st("usage","_u",void 0,function(){return Ce.M()},ct);st("forceSSL",void 0,void 0,function(){return lt},function(e,t,r){n(34),lt=!!r});var rn=st("_j1","jid"),sn=st("_j2","gjid");ot("\\&(.*)",function(e){var t=new nt(e[0],e[1]),n=it(e[0][$e](1));return n&&(t.n=function(e){return e.get(n)},t.o=function(e,t,r,i){e.set(n,r,i)},t.p=void 0),t});var on=at("_oot"),an=st("previewTask"),cn=st("checkProtocolTask"),un=st("validationTask"),ln=st("checkStorageTask"),dn=st("historyImportTask"),hn=st("samplerTask"),fn=at("_rlt"),mn=st("buildHitTask"),pn=st("sendHitTask"),gn=st("ceTask"),vn=st("devIdTask"),bn=st("timingTask"),yn=st("displayFeaturesTask"),$n=at("name"),jn=at("clientId","cid"),wn=st("userId","uid"),xn=at("trackingId","tid"),kn=at("cookieName",void 0,"_ga"),Cn=at("cookieDomain"),Sn=at("cookiePath",void 0,"/"),Ln=at("cookieExpires",void 0,63072e3),An=at("legacyCookieDomain"),Tn=at("legacyHistoryImport",void 0,!0),qn=at("storage",void 0,"cookie"),_n=at("allowLinker",void 0,!1),En=at("allowAnchor",void 0,!0),Dn=at("sampleRate","sf",100),Pn=at("siteSpeedSampleRate",void 0,1),In=at("alwaysSendReferrer",void 0,!1),Mn=st("transportUrl"),Rn=st("_r","_r"),Hn=st("_dfr",void 0,1),Nn=function(e){this.V=e,this.fa=void 0,this.$=!1,this.ha=void 0,this.ea=1},On=function(e,t,n){if(e.fa&&e.$)return 0;if(e.$=!0,t){if(e.ha&&et(t,e.ha))return et(t,e.ha);if(0==t.get(Pn))return 0}return 0==e.V?0:(void 0===n&&(n=Ge()),0==n%e.V?F.floor(n/e.V)%e.ea+1:0)},Fn=function(e,t){var n=F.min(et(e,Pn),100);if(!(R(Ze(e,jn))%100>=n)&&(n={},zn(n)||Bn(n))){var r=n[Mt];void 0==r||1/0==r||isNaN(r)||(r>0?(Un(n,Ht),Un(n,Ft),Un(n,Ot),Un(n,Rt),Un(n,Nt),Un(n,zt),Un(n,Bt),t(n)):Se(Te,"load",function(){Fn(e,t)},!1))}},zn=function(e){var t=Te.performance||Te.webkitPerformance,t=t&&t.timing;if(!t)return!1;var n=t.navigationStart;return 0==n?!1:(e[Mt]=t.loadEventStart-n,e[Ht]=t.domainLookupEnd-t.domainLookupStart,e[Ft]=t.connectEnd-t.connectStart,e[Ot]=t.responseStart-t.requestStart,e[Rt]=t.responseEnd-t.responseStart,e[Nt]=t.fetchStart-n,e[zt]=t.domInteractive-n,e[Bt]=t.domContentLoadedEventStart-n,!0)},Bn=function(e){if(Te.top!=Te)return!1;var t=Te.external,n=t&&t.onloadT;return t&&!t.isValidLoadTime&&(n=void 0),n>2147483648&&(n=void 0),n>0&&t.setPageReadyTime(),void 0==n?!1:(e[Mt]=n,!0)},Un=function(e,t){var n=e[t];(isNaN(n)||1/0==n||0>n)&&(e[t]=void 0)},Wn=function(e){return function(t){"pageview"!=t.get(mt)||e.I||(e.I=!0,Fn(t,function(t){e[W]("timing",t)}))}},Yn=!1,Vn=function(e){if("cookie"==Ze(e,qn)){var t=Ze(e,kn),r=Jn(e),i=er(Ze(e,Sn)),s=Qn(Ze(e,Cn)),o=1e3*et(e,Ln),a=Ze(e,xn);if("auto"!=s)Pe(t,r,i,s,a,o)&&(Yn=!0);else{n(32);var c;if(r=[],s=p()[X]("."),4!=s[me]||(c=s[s[me]-1],parseInt(c,10)!=c)){for(c=s[me]-2;c>=0;c--)r[oe](s[ue](c)[xe]("."));r[oe]("none"),c=r}else c=["none"];for(var u=0;u<c[me];u++)if(s=c[u],e[B].set(Cn,s),r=Jn(e),Pe(t,r,i,s,a,o))return void(Yn=!0);e[B].set(Cn,"auto")}}},Gn=function(e){if("cookie"==Ze(e,qn)&&!Yn&&(Vn(e),!Yn))throw"abort"},Kn=function(e){if(e.get(Tn)){var t=Ze(e,Cn),r=Ze(e,An)||p(),i=q("__utma",r,t);i&&(n(19),e.set(Qt,(new Date)[K](),!0),e.set(Jt,i.R),(t=q("__utmz",r,t))&&i[ae]==t[ae]&&e.set(Xt,t.R))}},Jn=function(e){var t=h(Ze(e,jn)),n=Zn(Ze(e,Cn));return e=tr(Ze(e,Sn)),e>1&&(n+="-"+e),["GA1",n,t][xe](".")},Xn=function(e,t,n){for(var r,i=[],s=[],o=0;o<e[me];o++){var a=e[o];a.r[n]==t?i[oe](a):void 0==r||a.r[n]<r?(s=[a],r=a.r[n]):a.r[n]==r&&s[oe](a)}return 0<i[me]?i:s},Qn=function(e){return 0==e[de](".")?e.substr(1):e},Zn=function(e){return Qn(e)[X](".")[me]},er=function(e){return e?(1<e[me]&&e.lastIndexOf("/")==e[me]-1&&(e=e.substr(0,e[me]-1)),0!=e[de]("/")&&(e="/"+e),e):"/"},tr=function(e){return e=er(e),"/"==e?1:e[X]("/")[me]},nr=new RegExp(/^https?:\/\/([^\/:]+)/),rr=/(.*)([?&#])(?:_ga=[^&#]*)(?:&?)(.*)/,ir=function(e){n(48),this.target=e,this.T=!1};ir[pe].Q=function(t,n){if(t.tagName){if("a"==t.tagName[ke]())return void(t[re]&&e(t,sr(this,t[re],n)));if("form"==t.tagName[ke]())return or(this,t)}return"string"==typeof t?sr(this,t,n):void 0};var sr=function(e,t,n){var r=rr.exec(t);r&&3<=r[me]&&(t=r[1]+(r[3]?r[2]+r[3]:"")),e=e[ve].get("linkerParam");var i=t[de]("?"),r=t[de]("#");return n?t+=(-1==r?"#":"&")+e:(n=-1==i?"?":"&",t=-1==r?t+(n+e):t[$e](0,r)+n+e+t[$e](r)),t},or=function(e,t){if(t&&t[ie]){var n=e[ve].get("linkerParam")[X]("=")[1];if("get"==t.method[ke]()){for(var r=t.childNodes||[],i=0;i<r[me];i++)if("_ga"==r[i][fe])return void r[i][G]("value",n);r=qe[V]("input"),r[G]("type","hidden"),r[G]("name","_ga"),r[G]("value",n),t.appendChild(r)}else"post"==t.method[ke]()&&(t.action=sr(e,t[ie]))}};ir[pe].S=function(t,r,i){function s(i){try{i=i||Te.event;var s;e:{var a=i[ve]||i.srcElement;for(i=100;a&&i>0;){if(a[re]&&a.nodeName[U](/^a(?:rea)?$/i)){s=a;break e}a=a[we],i--}s={}}("http:"==s[ne]||"https:"==s[ne])&&P(t,s[ee]||"")&&s[re]&&e(s,sr(o,s[re],r))}catch(c){n(26)}}var o=this;if(this.T||(this.T=!0,Se(qe,"mousedown",s,!1),Se(qe,"touchstart",s,!1),Se(qe,"keyup",s,!1)),i){i=function(e){if(e=e||Te.event,(e=e[ve]||e.srcElement)&&e[ie]){var n=e[ie][U](nr);n&&P(t,n[1])&&or(o,e)}};for(var a=0;a<qe.forms[me];a++)Se(qe.forms[a],"submit",i)}};var ar,cr=function(e,t,n,r){this.U=t,this.aa=n,(t=r)||(t=(t=Ze(e,$n))&&"t0"!=t?fr[ce](t)?"_gat_"+h(Ze(e,xn)):"_gat_"+h(t):"_gat"),this.Y=t},ur=function(e,t){var n=t.get(mn);t.set(mn,function(t){lr(e,t);var r=n(t);return dr(e,t),r});var r=t.get(pn);t.set(pn,function(t){var n=r(t);return hr(e,t),n})},lr=function(e,t){t.get(e.U)||("1"==De(e.Y)[0]?t.set(e.U,"",!0):t.set(e.U,""+Ke(),!0))},dr=function(e,t){t.get(e.U)&&Pe(e.Y,"1",t.get(Sn),t.get(Cn),t.get(xn),6e5)},hr=function(e,t){if(t.get(e.U)){var n=new Ae,r=function(e){n.set(rt(e).p,t.get(e))};r(dt),r(ht),r(xn),r(jn),r(e.U),r(nn);var i=e.aa;n.map(function(e,t){i+=d(e)+"="+d(""+t)+"&"}),i+="z="+Ke(),u(i),t.set(e.U,"",!0)}},fr=/^gtm\d+$/,mr=function(e,t){var r=e.b;if(!r.get("dcLoaded")){n(29),Te._gaq&&n(52),t=t||{};var i;t[kn]&&(i=h(t[kn])),i=new cr(r,rn,"https://stats.g.doubleclick.net/collect?t=dc&aip=1&",i),ur(i,r),r.set("dcLoaded",!0)}},pr=function(e){var t;e.get("dcLoaded")||"cookie"!=e.get(qn)?t=!1:(t=new Nn(et(e,Hn)),t=On(t,null,R(e.get(jn)))),t&&(n(51),t=new cr(e,rn),lr(t,e),dr(t,e),e.get(t.U)&&(e.set(Rn,1,!0),e.set(Mn,He()+"/r/collect",!0)))},gr=function(e,t){var r=e.b;if(!r.get("_rlsaLoaded")){if(n(38),t=t||{},t[kn])var i=h(t[kn]);i=new cr(r,sn,"https://www.google.com/ads/ga-audiences?t=sr&aip=1&",i),ur(i,r),r.set("_rlsaLoaded",!0),Tr("displayfeatures",e,t)}},vr=function(e,t,n){if(!ar){var r;r=qe[Q][ae];var i=Te[fe],s=/^#?gaso=([^&]*)/;(i=(r=(r=r&&r[U](s)||i&&i[U](s))?r[1]:De("GASO")[0]||"")&&r[U](/^(?:!([-0-9a-z.]{1,40})!)?([-.\w]{10,1200})$/i))&&(Pe("GASO",""+r,n,t,e,0),N._udo||(N._udo=t),N._utcp||(N._utcp=n),e=i[1],f("https://www.google.com/analytics/web/inpage/pub/inpage.js?"+(e?"prefix="+e+"&":"")+Ke(),"_gasojs")),ar=!0}},br=/^(UA|YT|MO|GP)-(\d+)-(\d+)$/,yr=function(e){function t(e,t){r.b[B].set(e,t)}function n(e,n){t(e,n),r.filters.add(e)}var r=this;this.b=new Je,this.filters=new Ye,t($n,e[$n]),t(xn,a(e[xn])),t(kn,e[kn]),t(Cn,e[Cn]||p()),t(Sn,e[Sn]),t(Ln,e[Ln]),t(An,e[An]),t(Tn,e[Tn]),t(_n,e[_n]),t(En,e[En]),t(Dn,e[Dn]),t(Pn,e[Pn]),t(In,e[In]),t(qn,e[qn]),t(wn,e[wn]),t(dt,1),t(ht,"j30"),n(on,y),n(an,k),n(cn,$),n(un,S),n(ln,Gn),n(dn,Kn),n(hn,b),n(fn,L),n(gn,x),n(vn,C),n(yn,pr),n(mn,j),n(pn,w),n(bn,Wn(this)),$r(this.b,e[jn]),jr(this.b),this.b.set(ft,I()),vr(this.b.get(xn),this.b.get(Cn),this.b.get(Sn))},$r=function(e,t){if("cookie"==Ze(e,qn)){Yn=!1;var r;e:{var i=De(Ze(e,kn));if(i&&!(1>i[me])){r=[];for(var s=0;s<i[me];s++){var o;o=i[s][X](".");var a=o.shift();("GA1"==a||"1"==a)&&1<o[me]?(a=o.shift()[X]("-"),1==a[me]&&(a[1]="1"),a[0]*=1,a[1]*=1,o={r:a,s:o[xe](".")}):o=void 0,o&&r[oe](o)}if(1==r[me]){n(13),r=r[0].s;break e}if(0!=r[me]){if(n(14),i=Zn(Ze(e,Cn)),r=Xn(r,i,0),1==r[me]){r=r[0].s;break e}i=tr(Ze(e,Sn)),r=Xn(r,i,1),r=r[0]&&r[0].s;break e}n(12)}r=void 0}r||(r=Ze(e,Cn),i=Ze(e,An)||p(),r=q("__utma",i,r),(r=void 0==r?void 0:r.O[1]+"."+r.O[2])&&n(10)),r&&(e[B].set(jn,r),Yn=!0)}r=e.get(En),(s=(r=qe[Q][r?"href":"search"][U]("(?:&|#|\\?)"+d("_ga")[z](/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")+"=([^&#]*)"))&&2==r[me]?r[1]:"")&&(e.get(_n)?(r=s[de]("."),-1==r?n(22):(i=s[$e](r+1),"1"!=s[$e](0,r)?n(22):(r=i[de]("."),-1==r?n(22):(s=i[$e](0,r),r=i[$e](r+1),s!=D(r,0)&&s!=D(r,-1)&&s!=D(r,-2)?n(23):(n(11),e[B].set(jn,r)))))):n(21)),t&&(n(9),e[B].set(jn,d(t))),e.get(jn)||((r=(r=Te.gaGlobal&&Te.gaGlobal.vid)&&-1!=r[te](/^(?:utma\.)?\d+\.\d+$/)?r:void 0)?(n(17),e[B].set(jn,r)):(n(8),e[B].set(jn,c()))),Vn(e)},jr=function(e){var t=Te[je],r=Te.screen,i=qe[Q];if(e.set($t,g(e.get(In))),i){var s=i.pathname||"";"/"!=s.charAt(0)&&(n(31),s="/"+s),e.set(yt,i[ne]+"//"+i[ee]+s+i[te])}r&&e.set(Ct,r.width+"x"+r.height),r&&e.set(kt,r.colorDepth+"-bit");var r=qe.documentElement,a=(s=qe.body)&&s[ge]&&s[ye],c=[];if(r&&r[ge]&&r[ye]&&("CSS1Compat"===qe.compatMode||!a)?c=[r[ge],r[ye]]:a&&(c=[s[ge],s[ye]]),r=0>=c[0]||0>=c[1]?"":c[xe]("x"),e.set(St,r),e.set(At,T()),e.set(xt,qe.characterSet||qe.charset),e.set(Lt,t&&"function"==typeof t.javaEnabled&&t.javaEnabled()||!1),e.set(wt,(t&&(t.language||t.browserLanguage)||"")[ke]()),i&&e.get(En)&&(t=qe[Q][ae])){for(t=t[X](/[?&#]+/),i=[],r=0;r<t[me];++r)(o(t[r],"utm_id")||o(t[r],"utm_campaign")||o(t[r],"utm_source")||o(t[r],"utm_medium")||o(t[r],"utm_term")||o(t[r],"utm_content")||o(t[r],"gclid")||o(t[r],"dclid")||o(t[r],"gclsrc"))&&i[oe](t[r]);0<i[me]&&(t="#"+i[xe]("&"),e.set(yt,e.get(yt)+t))}};yr[pe].get=function(e){return this.b.get(e)},yr[pe].set=function(e,t){this.b.set(e,t)};var wr={pageview:[jt],event:[Tt,qt,_t,Et],social:[Dt,Pt,It],timing:[Ut,Wt,Vt,Yt]};yr[pe].send=function(e){if(!(1>arguments[me])){var t,r;"string"==typeof arguments[0]?(t=arguments[0],r=[][ue][be](arguments,1)):(t=arguments[0]&&arguments[0][mt],r=arguments),t&&(r=v(wr[t]||[],r),r[mt]=t,this.b.set(r,void 0,!0),this.filters.D(this.b),this.b[B].m={},n(44))}};var xr,kr,Cr,Sr=function(e){return"prerender"==qe.visibilityState?!1:(e(),!0)},Lr=/^(?:(\w+)\.)?(?:(\w+):)?(\w+)$/,Ar=function(e){if(r(e[0]))this.u=e[0];else{var t=Lr.exec(e[0]);if(null!=t&&4==t[me]&&(this.c=t[1]||"t0",this.e=t[2]||"",this.d=t[3],this.a=[][ue][be](e,1),this.e||(this.A="create"==this.d,this.i="require"==this.d,this.g="provide"==this.d,this.ba="remove"==this.d),this.i&&(3<=this.a[me]?(this.X=this.a[1],this.W=this.a[2]):this.a[1]&&(s(this.a[1])?this.X=this.a[1]:this.W=this.a[1]))),t=e[1],e=e[2],!this.d)throw"abort";if(this.i&&(!s(t)||""==t))throw"abort";if(this.g&&(!s(t)||""==t||!r(e)))throw"abort";if(M(this.c)||M(this.e))throw"abort";if(this.g&&"t0"!=this.c)throw"abort"}};xr=new Ae,Cr=new Ae,kr={ec:45,ecommerce:46,linkid:47};var Tr=function(e,t,i){t==Er?n(35):t.get($n);var s=xr.get(e);return r(s)?(t.plugins_=t.plugins_||new Ae,t.plugins_.get(e)?!0:(t.plugins_.set(e,new s(t,i||{})),!0)):!1},qr=function(t){function n(e){var t=(e[ee]||"")[X](":")[0][ke](),n=(e[ne]||"")[ke](),n=1*e[Y]||("http:"==n?80:"https:"==n?443:"");return e=e.pathname||"",o(e,"/")||(e="/"+e),[t,""+n,e]}var r=qe[V]("a");e(r,qe[Q][re]);var i=(r[ne]||"")[ke](),s=n(r),a=r[te]||"",c=i+"//"+s[0]+(s[1]?":"+s[1]:"");return o(t,"//")?t=i+t:o(t,"/")?t=c+t:!t||o(t,"?")?t=c+s[2]+(t||a):0>t[X]("/")[0][de](":")&&(t=c+s[2][$e](0,s[2].lastIndexOf("/"))+"/"+t),e(r,t),i=n(r),{protocol:(r[ne]||"")[ke](),host:i[0],port:i[1],path:i[2],G:r[te]||"",url:t||""}},_r={ga:function(){_r.f=[]}};_r.ga(),_r.D=function(e){var t=_r.J[se](_r,arguments),t=_r.f.concat(t);for(_r.f=[];0<t[me]&&!_r.v(t[0])&&(t.shift(),!(0<_r.f[me])););_r.f=_r.f.concat(t)},_r.J=function(e){for(var t=[],i=0;i<arguments[me];i++)try{var s=new Ar(arguments[i]);if(s.g)xr.set(s.a[0],s.a[1]);else{if(s.i){var a=s,c=a.a[0];if(!r(xr.get(c))&&!Cr.get(c)){kr[Z](c)&&n(kr[c]);var u=a.X;if(!u&&kr[Z](c)?(n(39),u=c+".js"):n(43),u){u&&0<=u[de]("/")||(u=m()+"//www.google-analytics.com/plugins/ua/"+u);var l,d=qr(u),a=void 0,h=d[ne],p=qe[Q][ne],a="https:"==h||h==p?!0:"http:"!=h?!1:"http:"==p;if(l=a){var a=d,g=qr(qe[Q][re]);if(a.G||0<=a.url[de]("?")||0<=a.path[de]("://"))l=!1;else if(a[J]==g[J]&&a[Y]==g[Y])l=!0;else{var v="http:"==a[ne]?80:443;l="www.google-analytics.com"==a[J]&&(a[Y]||v)==v&&o(a.path,"/plugins/")?!0:!1}}l&&(f(d.url),Cr.set(c,!0))}}}t[oe](s)}}catch(b){}return t},_r.v=function(e){try{if(e.u)e.u[be](Te,Er.j("t0"));else{var t=e.c==ut?Er:Er.j(e.c);if(e.A)"t0"==e.c&&Er.create[se](Er,e.a);else if(e.ba)Er.remove(e.c);else if(t)if(e.i){if(!Tr(e.a[0],t,e.W))return!0}else if(e.e){var n=e.d,r=e.a,i=t.plugins_.get(e.e);i[n][se](i,r)}else t[e.d][se](t,e.a)}}catch(s){}};var Er=function(e){n(1),_r.D[se](_r,[arguments])};Er.h={},Er.P=[],Er.L=0,Er.answer=42;var Dr=[xn,Cn,$n];Er.create=function(e){var t=v(Dr,[][ue][be](arguments));t[$n]||(t[$n]="t0");var n=""+t[$n];return Er.h[n]?Er.h[n]:(t=new yr(t),Er.h[n]=t,Er.P[oe](t),t)},Er.remove=function(e){for(var t=0;t<Er.P[me];t++)if(Er.P[t].get($n)==e){Er.P.splice(t,1),Er.h[e]=null;break}},Er.j=function(e){return Er.h[e]},Er.K=function(){return Er.P[ue](0)},Er.N=function(){"ga"!=ut&&n(49);var e=Te[ut];if(!e||42!=e.answer){Er.L=e&&e.l,Er.loaded=!0;var t=Te[ut]=Er;A("create",t,t.create,3),A("remove",t,t.remove),A("getByName",t,t.j,5),A("getAll",t,t.K,6),t=yr[pe],A("get",t,t.get,7),A("set",t,t.set,4),A("send",t,t[W],2),t=Je[pe],A("get",t,t.get),A("set",t,t.set),(Te.gaplugins=Te.gaplugins||{}).Linker=ir,t=ir[pe],xr.set("linker",ir),A("decorate",t,t.Q,20),A("autoLink",t,t.S,25),xr.set("displayfeatures",mr),xr.set("adfeatures",gr),e=e&&e.q,i(e)?_r.D[se](Er,e):n(50)}},function(){var e=Er.N;if(!Sr(e)){n(16);var t=!1,r=function(){!t&&Sr(e)&&(t=!0,Le(qe,"visibilitychange",r))};Se(qe,"visibilitychange",r)}}()}(window),function(){var e,t,n,r,i;window.GoogleAnalyticsObject="ga",null==window.ga&&(window.ga=function(){var e;return null==(e=window.ga).q&&(e.q=[]),window.ga.q.push(arguments)}),window.ga.l=Date.now(),e=function(){var e,t,n,r;return e=$("meta[name=analytics-location]").last()[0],t=$("meta[name=analytics-location-params]").last()[0],r=(null!=e?e.content:void 0)||window.location.pathname,n=t?(window.location.search?window.location.search+"&":"?")+t.content:window.location.search,r+n},t=function(){return $("meta[name=analytics-location]").length?document.title.replace(/([\w-]+\/)+[\w\.-]+/g,"private/private"):document.title},i=function(){var n,r,i,s,o;for(i=window.location.protocol+"//"+window.location.host+e(),window.ga("set","title",t()),window.ga("set","location",i),o=document.querySelectorAll("meta.js-ga-set"),n=0,r=o.length;r>n;n++)s=o[n],window.ga("set",s.name,s.content)},n=function(){var n;return n={title:t(),path:e()},window.ga("send","pageview",n)},r=function(){return i(),n()},function(){var e;if(e=document.querySelector("meta[name=google-analytics]"))return window.ga("create",e.content,"github.com"),i()}(),$(function(){return n()}),$(document).on("pjax:complete",function(){return setTimeout(r,20)})}.call(this),function(){var e,t,n,r,i=function(e,t){function n(){this.constructor=e}for(var r in t)s.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},s={}.hasOwnProperty;e=function(e){function t(e){this.name="InvalidGAEventValueError",this.message="The event value in '"+JSON.stringify(e)+"' has to be an integer."}return i(t,e),t}(Error),n=function(t,n){var r;if(null==n&&(n=!0),t=t.trim().split(/\s*,\s*/),t[3])if(/^\d+$/.test(t[3]))t[3]=Number(t[3]);else if($(document.documentElement).hasClass("is-preview-features"))return r=new e(t),void setImmediate(function(){throw r});t.unshift("send","event"),t.push({useBeacon:!0,nonInteraction:!n}),window.ga.apply(null,t)},t=function(e){var t;t=$(e.target).closest("[data-ga-click]").attr("data-ga-click"),t&&n(t)},r=function(e){window.ga("send","pageview",e)},$.observe("[data-ga-load]",function(){n(this.getAttribute("data-ga-load"),!1)}),$.observe("meta[name=analytics-event]",function(){n(this.content,!1)}),$.observe("meta[name=analytics-virtual-pageview]",function(){r(this.content)}),window.addEventListener("click",t,!0)}.call(this),function(){$.fn.hasDirtyFields=function(){var e,t,n,r;for(r=this.find("input, textarea"),t=0,n=r.length;n>t;t++)if(e=r[t],e.value!==e.defaultValue)return!0;return!1}}.call(this),function(){var e;e=function(e){var t,n;return e.nodeType!==Node.ELEMENT_NODE?!1:(t=e.nodeName.toLowerCase(),n=(e.getAttribute("type")||"").toLowerCase(),"select"===t||"textarea"===t||"input"===t&&"submit"!==n&&"reset"!==n)},$.fn.hasFocus=function(){var t,n;return(t=this[0])?(n=document.activeElement,e(n)&&t===n||$.contains(t,n)):!1}}.call(this),function(){$.fn.hasMousedown=function(){var e;return(e=this[0])?$(e).is(":active"):!1}}.call(this),function(){$.fn.markedAsDirty=function(){return this.closest(".is-dirty").length>0||this.find(".is-dirty").length>0}}.call(this),function(){$.fn.hasInteractions=function(){return this.hasDirtyFields()||this.hasFocus()||this.hasMousedown()||this.markedAsDirty()}}.call(this),function(){$.observe(".js-in-app-popup",function(e){setTimeout(function(e){return function(){return $(e).submit()}}(this),15e3)})}.call(this),function(){$.pageFocused=function(){return new Promise(function(e){var t;return t=function(){document.hasFocus()&&(e(),document.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t),window.removeEventListener("blur",t))},document.addEventListener("visibilitychange",t),window.addEventListener("focus",t),window.addEventListener("blur",t),t()})}}.call(this),function(){var e,t,n,r,i,s,o;i=0,n=-1,t=function(e){var t,n,r,i;return t=e.getBoundingClientRect(),r=$(window).height(),i=$(window).width(),0===t.height?!1:t.height<r?t.top>=0&&t.left>=0&&t.bottom<=r&&t.right<=i:(n=Math.ceil(r/2),t.top>=0&&t.top+n<r)},e=function(e){var n,r,i,s,o,a,c;for(s=e.elements,c=[],r=0,i=s.length;i>r;r++)n=s[r],t(n)?c.push(null!=(o=e["in"])?o.call(n,n,e):void 0):c.push(null!=(a=e.out)?a.call(n,n,e):void 0);return c},o=function(t){return document.hasFocus()&&window.scrollY!==n&&(n=window.scrollY,!t.checkPending)?(t.checkPending=!0,window.requestAnimationFrame(function(){return t.checkPending=!1,e(t)})):void 0},r=function(t,n){return 0===n.elements.length&&(window.addEventListener("scroll",n.scrollHandler),$.pageFocused().then(function(){return e(n)})),n.elements.push(t)},s=function(e,t){var n;return n=t.elements.indexOf(e),-1!==n&&t.elements.splice(n,1),0===t.elements.length?window.removeEventListener("scroll",t.scrollHandler):void 0},$.inViewport=function(e,t){var n;return null!=t.call&&(t={"in":t}),n={id:i++,selector:e,"in":t["in"],out:t.out,elements:[],checkPending:!1},n.scrollHandler=function(){return o(n)},$.observe(e,{add:function(e){return r(e,n)},remove:function(e){return s(e,n)}}),n}}.call(this),function(){$.interactiveElement=function(){var e,t,n;return document.activeElement!==document.body?e=document.activeElement:(t=document.querySelectorAll(":hover"),(n=t.length)&&(e=t[n-1])),$(e)}}.call(this),function(){var e,t,n;e=require("github/fetch").fetchJSON,t=function(){var t,r,i,s,o,a,c,u,l;if(l=this.getAttribute("data-url")){for(u=e(l),a=this.getAttribute("data-id"),i=document.querySelectorAll(".js-issue-link[data-id='"+a+"']"),o=0,c=i.length;c>o;o++)r=i[o],r.removeAttribute("data-url");return t=function(e){return n(i,e.title)},s=function(e){return function(t){var r,s,o;return o=(null!=(s=t.response)?s.status:void 0)||500,r=function(){switch(o){case 404:return this.getAttribute("data-permission-text");default:return this.getAttribute("data-error-text")}}.call(e),n(i,r)}}(this),u.then(t,s)}},n=function(e,t){var n,r,i,s;for(s=[],r=0,i=e.length;i>r;r++)n=e[r],s.push(n.setAttribute("title",t));return s},$.observe(".js-issue-link",function(){this.addEventListener("mouseenter",t)})}.call(this),function(){$(document).on("ajaxSuccess",".js-immediate-updates",function(e,t,n,r){var i,s,o;if(this===e.target){s=r.updateContent;for(o in s)i=s[o],$(o).updateContent(i)}})}.call(this),function(){$.observe(".labeled-button:checked",{add:function(){return $(this).parent("label").addClass("selected")},remove:function(){return $(this).parent("label").removeClass("selected")}})}.call(this),function(){var e;e="is-last-changed",$(document).on("change","form.js-form-last-changed",function(t){var n,r;n=t.target,null!=(r=this.querySelector("."+e))&&r.classList.remove(e),n.classList.add(e)})}.call(this),function(){var e,t,n,r,i,s=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};t=null,e=function(e){t&&n(t),$(e).fire("menu:activate",function(){return $(document).on("keydown.menu",i),$(document).on("click.menu",r),t=e,$(e).performTransition(function(){return e.classList.add("active"),$(e).find(".js-menu-content[aria-hidden]").attr("aria-hidden","false")}),$(e).fire("menu:activated",{async:!0})})},n=function(e){$(e).fire("menu:deactivate",function(){return $(document).off(".menu"),t=null,$(e).performTransition(function(){return e.classList.remove("active"),$(e).find(".js-menu-content[aria-hidden]").attr("aria-hidden","true")}),$(e).fire("menu:deactivated",{async:!0})})},r=function(e){t&&($(e.target).closest(t)[0]||(e.preventDefault(),n(t)))},i=function(e){t&&"esc"===e.hotkey&&(s.call($(document.activeElement).parents(),t)>=0&&document.activeElement.blur(),e.preventDefault(),n(t))},$(document).on("click",".js-menu-container",function(r){var i,s,o;i=this,(o=$(r.target).closest(".js-menu-target")[0])?(r.preventDefault(),i===t?n(i):e(i)):(s=$(r.target).closest(".js-menu-content")[0])||i===t&&(r.preventDefault(),n(i))}),$(document).on("click",".js-menu-container .js-menu-close",function(e){n($(this).closest(".js-menu-container")[0]),e.preventDefault()}),$.fn.menu=function(t){var r,i;return(r=$(this).closest(".js-menu-container")[0])?(i={activate:function(){return e(r)},deactivate:function(){return n(r)}},"function"==typeof i[t]?i[t]():void 0):void 0},$.observe(".js-menu-container.active",{add:function(){return document.body.classList.add("menu-active")},remove:function(){return document.body.classList.remove("menu-active")}})}.call(this),function(){var e;$(document).on("focus","div.btn-sm, span.btn-sm",function(){$(this).on("keydown",e)}),$(document).on("blur","div.btn-sm, span.btn-sm",function(){$(this).off("keydown",e)}),e=function(e){"enter"===e.hotkey&&($(this).click(),e.preventDefault())}}.call(this),function(){$(document).on("submit",".js-mobile-preference-form",function(e){var t;return t=$(this).find(".js-mobile-preference-anchor-field"),t.val(window.location.hash.substr(1)),!0})}.call(this),define("github/hash-change",["exports"],function(e){function t(e){$.hashChange(e)}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=t}),define("github/sticky-scroll-into-view",["exports"],function(e){function t(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function n(e){e.scrollIntoView(),window.scrollBy(0,-i())}function r(){var e=document.querySelector(":target");e&&n(e)}function i(){var e,n=document.querySelectorAll(".js-fixed");return(e=Math).max.apply(e,t(Array.from(n).map(function(e){var t=e.getBoundingClientRect(),n=t.top,r=t.height;return 0===n?r:0})))}Object.defineProperty(e,"__esModule",{value:!0}),e.scrollIntoView=n,e.scrollToFragmentTarget=r,e.computeFixedYOffset=i}),define("github/fixed-offset-fragment-navigation-observer",["./hash-change","./sticky-scroll-into-view"],function(e,t){function n(e){return e&&e.__esModule?e:{"default":e}}var r=n(e);r["default"](function(){t.computeFixedYOffset()&&t.scrollToFragmentTarget()})}),function(){require("github/fixed-offset-fragment-navigation-observer")}.call(this),function(){var e,t,n;e=require("github/debounce")["default"],$.fn.notScrolling=function(){return new Promise(function(e){
return function(t,r){return 1===e.length?n(e[0],t):t()}}(this))},t=0,window.addEventListener("scroll",function(e){t=e.timeStamp||(new Date).getTime()},!0),n=function(n,r){var i;return n===window&&t<(new Date).getTime()-500?void setImmediate(r):(i=e(function(){return n.removeEventListener("scroll",i,!1),r()},500),n.addEventListener("scroll",i,!1),void i())}}.call(this),function(){$(document).on("ajaxSuccess",".js-notice-dismiss",function(){return $(this).closest(".js-notice").fadeOut()}),$(document).on("click",".js-notice-dismiss-action",function(){return $(this).closest(".js-notice").find(".js-notice-dismiss").submit()})}.call(this),function(){$.observeLast=function(e,t){var n,r;null==t&&(t="last"),n=r=function(){$(e).removeClass(t).last().addClass(t)},$.observe(e,{add:n,remove:r})}}.call(this),function(){$(document).on("click",".js-permalink-shortcut",function(){return window.location=this.href+window.location.hash,!1})}.call(this),function(){$(document).on("pjax:start",function(e){var t;(t=e.relatedTarget)&&($(t).addClass("pjax-active"),$(t).parents(".js-pjax-active").addClass("pjax-active"))}),$(document).on("pjax:end",function(e){$(".pjax-active").removeClass("pjax-active")})}.call(this),function(){var e;e=document.referrer,$(document).on("pjax:start",function(){return e=$.pjax.state.url}),$(document).on("click",".js-pjax-back",function(t){1!==t.which||t.metaKey||t.ctrlKey||history.length>1&&this.href===e&&(history.back(),t.preventDefault())})}.call(this),function(){$(document).on("pjax:click",function(){return window.onbeforeunload?!1:void 0})}.call(this),function(){var e;e=function(){var e,t;return t=function(){var t,n,r;for(r=[],t=0,n=arguments.length;n>t;t++)e=arguments[t],r.push(e.split("/",3).join("/"));return r}.apply(this,arguments),t[0]===t[1]},$(document).on("pjax:click","#js-repo-pjax-container a[href]",function(){var t;return t=$(this).prop("pathname"),e(t,location.pathname)?void 0:!1}),$(document).on("pjax:click",".js-comment-body",function(e){return"files"!==e.target.pathname.split("/")[3]})}.call(this),function(){var e,t;$.support.pjax&&(t={},$(e=function(){return t[document.location.pathname]=$("head [data-pjax-transient]")}),$(document).on("pjax:beforeReplace",function(e,n){var r,i,s,o;for(i=s=0,o=n.length;o>s;i=++s)r=n[i],r&&("pjax-head"===r.id?(t[document.location.pathname]=$(r).children(),n[i]=null):"js-flash-container"===r.id&&($("#js-flash-container").replaceWith(r),n[i]=null))}),$(document).on("pjax:end",function(){var e,n,r;return e=t[document.location.pathname],e?($("head [data-pjax-transient]").remove(),r=$(e).not("title, script, link[rel='stylesheet']"),n=$(e).filter("link[rel='stylesheet']"),$(document.head).append(r.attr("data-pjax-transient",!0)),$(document.head).append(n)):void 0}))}.call(this),function(){var e,t;$.support.pjax&&(t=function(e){return null!=e.getAttribute("data-pjax-preserve-scroll")?!1:0},e=function(e){var t,n,r;return t=$(e),n=t.add(t.parents("[data-pjax]")).map(function(){var e;return e=this.getAttribute("data-pjax"),null!=e&&"true"!==e?e:void 0}),(r=n[0])?document.querySelector(r):$(e).closest("[data-pjax-container]")[0]},$(document).on("click","[data-pjax] a, a[data-pjax]",function(n){var r,i;return i=this,null==i.getAttribute("data-skip-pjax")&&null==i.getAttribute("data-remote")&&(r=e(i))?$.pjax.click(n,{container:r,scrollTo:t(i)}):void 0}),$(document).on("submit","form[data-pjax]",function(n){var r,i;return i=this,(r=e(i))?$.pjax.submit(n,{container:r,scrollTo:t(i)}):void 0}))}.call(this),function(){var e;$.support.pjax&&(e=document.querySelector("meta[name=pjax-timeout]"))&&($.pjax.defaults.timeout=parseInt(e.content))}.call(this),function(){var e,t,n,r,i,s,o,a;o=require("github/stats")["default"],$.support.pjax&&(t=null,i="last_pjax_request",s="pjax_start",r="pjax_end",n=function(e){var n,r;(r=null!=(n=e.relatedTarget)?n.href:void 0)&&(window.performance.mark(s),t=r)},a=function(){setImmediate(function(){var n,a,c;if(window.performance.getEntriesByName(s).length&&(window.performance.mark(r),window.performance.measure(i,s,r),a=window.performance.getEntriesByName(i),n=null!=(c=a.pop())?c.duration:void 0))return o({pjax:{url:t,ms:Math.round(n)}}),e()})},e=function(){window.performance.clearMarks(s),window.performance.clearMarks(r),window.performance.clearMeasures(i)},$(document).on("pjax:start",n),$(document).on("pjax:end",a))}.call(this),function(){var e,t;$.fn.preservingScrollPosition=function(e){return $.preservingScrollPosition(this[0],e),this},$.preservingScrollPosition=function(n,r){var i,s,o,a,c,u,l,d;return n?(o=e(n),l=r.call(n),(s=t(o))?(n=s.element,c=s.top,a=s.left,u=n.getBoundingClientRect(),d=u.top,i=u.left,$(n).cumulativeScrollBy(i-a,d-c),l):void 0):r()},e=function(e){var t,n,r,i;for(n=[];e;)r=e.getBoundingClientRect(),i=r.top,t=r.left,n.push({element:e,top:i,left:t}),e=e.parentElement;return n},t=function(e){var t,n,r;for(t=0,n=e.length;n>t;t++)if(r=e[t],$.contains(document,r.element))return r}}.call(this),function(){$.preserveInteractivePosition=function(e){return $(window).notScrolling().then(function(){var t;return t=$.interactiveElement()[0],$.preservingScrollPosition(t,e)})}}.call(this),function(){$(function(){return document.body.classList.contains("js-print-popup")?(window.print(),setTimeout(window.close,1e3)):void 0})}.call(this),function(){var e;e=require("github/failbot").errorContext,$(function(){var t,n;return document.documentElement.classList.contains("is-employee")?(t=function(){return"qi:"+document.location},n=[],$(document).on("submit",".js-quick-issue-form",function(){var e;$(".facebox-content > *").hide(),$(".facebox-content .js-quick-issue-thanks").show(),e=t();try{localStorage.removeItem(e)}catch(n){}return!0}),$(document).onFocusedInput(".js-quick-issue-body",function(){return function(){var e,n;e=t(),n=$(this).val();try{return localStorage.setItem(e,n)}catch(r){}}}),$(document).on("reveal.facebox",function(){var e,n,r;return $(".facebox-content .quick-issue-link").remove(),r=$(".facebox-content .js-quick-issue-body"),r.length?(n=t(),e=function(){try{return localStorage.getItem(n)}catch(e){}}(),e&&r.val(e),r.focus()):void 0}),$(window).on("error",function(t){return n.push(e(t.originalEvent.error)),$(".js-captured-errors").val(JSON.stringify(n))}),$(document).on("ajaxSuccess",".js-quick-issue-form",function(e,t,n){return $(".js-quick-issue-thanks").append(t.responseText)})):void 0})}.call(this),function(){$(document).onFocusedKeydown(".js-quick-submit",function(){return function(e){var t,n;return"ctrl+enter"===e.hotkey||"meta+enter"===e.hotkey?(n=$(this).closest("form"),t=n.find("input[type=submit], button[type=submit]").first(),t.prop("disabled")||n.submit(),!1):void 0}})}.call(this),function(){var e,t,n,r=function(e,t){return function(){return e.apply(t,arguments)}};t=require("github/sliding-promise-queue")["default"],n=require("github/fetch").fetchText,e=function(){function e(e){this.resultsChanged=r(this.resultsChanged,this),this.fetchResults=r(this.fetchResults,this),this.onFieldInput=r(this.onFieldInput,this),this.onNavigationKeyDown=r(this.onNavigationKeyDown,this),this.teardown=r(this.teardown,this),this.$field=$(e),this.$form=$(e.form),this.fetchQueue=new t,this.$field.on("input.results",this.onFieldInput),this.$field.on("focusout:delayed.results",this.teardown),this.$form.on("submit.results",this.teardown),this.$results=$(".js-quicksearch-results"),this.$results.navigation("push"),this.$results.on("navigation:keydown.results",this.onNavigationKeyDown)}return e.prototype.teardown=function(){return this.$field.off(".results"),this.$form.off(".results"),this.$results.off(".results"),this.$results.removeClass("active"),this.$results.navigation("pop")},e.prototype.onNavigationKeyDown=function(e){return"esc"===e.hotkey?this.$results.removeClass("active").navigation("clear"):"enter"!==e.hotkey||e.target.classList.contains("js-navigation-item")?void 0:(this.$form.submit(),!1)},e.prototype.onFieldInput=function(){return this.fetchResults(this.$field.val())},e.prototype.fetchResults=function(e){var t,r,i;return(i=this.$results.attr("data-quicksearch-url"))?(r=e.trim()?(i+=~i.indexOf("?")?"&":"?",i+=this.$form.serialize(),this.$form.addClass("is-sending"),n(i)):Promise.resolve(""),t=function(e){return function(){return e.$form.removeClass("is-sending")}}(this),this.fetchQueue.push(r).then(function(e){return function(t){return e.$results.html(t),e.resultsChanged()}}(this)).then(t,t)):void 0},e.prototype.resultsChanged=function(){var e;return e=""!==this.$field.val(),this.$results.toggleClass("active",e)},e}(),$(document).on("focusin:delayed",".js-quicksearch-field",function(){new e(this)})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u,l,d=[].slice;for(a=function(){var e,t,n,r,i;for(e=arguments[0],i=2<=arguments.length?d.call(arguments,1):[],t=0,r=i.length;r>t;t++)if(n=i[t],e.classList.contains(n))return!0;return!1},r=function(e){var t,n,r,i,s;for(s=e.parentNode.children,t=r=0,i=s.length;i>r;t=++r)if(n=s[t],n===e)return t},n=function(e){return"IMG"===e.nodeName||null!=e.firstChild},o=0,c=function(e){var t,n;return t=e.childNodes[0],n=e.childNodes[1],t&&e.childNodes.length<3?!("OL"!==t.nodeName&&"UL"!==t.nodeName||n&&(n.nodeType!==Node.TEXT_NODE||n.textContent.trim())):void 0},t={CODE:function(e){var t;return t=e.textContent,"PRE"===e.parentNode.nodeName?e.textContent=t.replace(/^/gm," "):t.indexOf("`")>=0?"`` "+t+" ``":"`"+t+"`"},PRE:function(e){var t;return t=e.parentNode,"DIV"===t.nodeName&&t.classList.contains("highlight")&&(e.textContent=e.textContent.replace(/^/gm," "),e.append("\n\n")),e},STRONG:function(e){return"**"+e.textContent+"**"},EM:function(e){return"_"+e.textContent+"_"},BLOCKQUOTE:function(e){var t,n;return n=e.textContent.trim().replace(/^/gm,"> "),t=document.createElement("pre"),t.textContent=n+"\n\n",t},A:function(e){var t;return t=e.textContent,a(e,"issue-link","user-mention","team-mention")?t:/^https?:/.test(t)&&t===e.getAttribute("href")?t:"["+t+"]("+e.getAttribute("href")+")"},IMG:function(e){var t;return t=e.getAttribute("alt"),a(e,"emoji")?t:"!["+t+"]("+e.getAttribute("src")+")"},LI:function(e){var t,n;if(!c(e))switch(t=e.parentNode,t.nodeName){case"UL":e.prepend("* ");break;case"OL":o>0&&!t.previousSibling?(n=r(e)+o+1,e.prepend(n+"\\. ")):e.prepend(r(e)+1+". ")}return e},OL:function(e){var t;return t=document.createElement("li"),t.append(document.createElement("br")),e.append(t),e},H1:function(e){var t;return t=parseInt(e.nodeName.slice(1)),e.prepend(Array(t+1).join("#")+" "),e}},t.UL=t.OL,s=i=2;6>=i;s=++i)t["H"+s]=t.H1;e=function(e,r){var i,s,o,a,c,u;a=document.createNodeIterator(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){return e.nodeName in t&&n(e)?NodeFilter.FILTER_ACCEPT:void 0}}),c=[];for(;o=a.nextNode();)c.push(o);for(c.reverse(),u=[],i=0,s=c.length;s>i;i++)o=c[i],u.push(r(o));return u},u=function(e,t){var n,r,i;n=document.createElement("div"),n.appendChild(t),n.style.cssText="position:absolute;left:-9999px;",document.body.appendChild(n);try{r=document.createRange(),r.selectNodeContents(n),e.removeAllRanges(),e.addRange(r),i=e.toString(),e.removeAllRanges()}finally{document.body.removeChild(n)}return i},l=function(n){var i,s,a,c;return i=n.getRangeAt(0).cloneContents(),o=0,(a=n.anchorNode.parentNode.closest("li"))&&("OL"===a.parentNode.nodeName&&(o=r(a)),i.querySelector("li")||(c=document.createElement(a.parentNode.nodeName),s=document.createElement("li"),s.append(i),c.append(s),i=document.createDocumentFragment(),i.appendChild(c))),e(i,function(e){var n;return n=t[e.nodeName](e),e.replaceWith(n)}),u(n,i)},$(document).on("quote:selection",".js-quote-markdown",function(e){var t,n,r,i;r=e.detail.selection;try{return i=l(r),e.detail.selectionText=i.replace(/^\n+/,"").replace(/\s+$/,"")}catch(n){return t=n,setImmediate(function(){throw t})}})}.call(this),function(){$(document).on("keydown",function(e){var t,n,r,i,s,o,a,c,u;if("r"===e.hotkey&&!e.isDefaultPrevented()&&!e.isFormInteraction()&&(c=window.getSelection(),r=$(c.focusNode),(u=$.trim(c.toString()))&&(t=r.closest(".js-quote-selection-container"),t.length))){if(s=$.Event("quote:selection",{detail:{selection:c,selectionText:u}}),t.trigger(s),s.isDefaultPrevented())return!1;if(u=s.detail.selectionText,n=t.find(".js-quote-selection-target").visible().first(),o=n[0])return a="> "+u.replace(/\n/g,"\n> ")+"\n\n",(i=o.value)&&(a=i+"\n\n"+a),o.value=a,n.trigger("change"),n.scrollTo({duration:300},function(){return o.focus(),o.selectionStart=o.value.length,n.scrollTop(o.scrollHeight)}),e.preventDefault()}})}.call(this),function(){$.observe(".has-removed-contents",function(){var e,t,n;return e=$(this).contents(),t=function(){return e.detach()},n=function(){return $(this).html(e)},{add:t,remove:n}})}.call(this),function(){var e,t;e=require("github/fetch").fetchText,$(document).on("focusin",".js-repo-filter .js-filterable-field",function(){var e;(e=this.closest(".js-repo-filter").querySelector(".js-more-repos-link"))&&t(e)}),$(document).on("click",".js-repo-filter .js-repo-filter-tab",function(e){var n,r,i,s,o,a;for(n=this.closest(".js-repo-filter"),(o=n.querySelector(".js-more-repos-link"))&&t(o),a=n.querySelectorAll(".js-repo-filter-tab"),i=0,s=a.length;s>i;i++)r=a[i],r.classList.toggle("filter-selected",r===this);$(n.querySelector(".js-filterable-field")).fire("filterable:change"),e.preventDefault()}),$(document).on("filterable:change",".js-repo-filter .js-repo-list",function(){var e,t,n;e=this.closest(".js-repo-filter"),(n=null!=(t=e.querySelector(".js-repo-filter-tab.filter-selected"))?t.getAttribute("data-filter"):void 0)&&$(this).children().not(n).hide()}),t=function(t){var n,r;if(!t.classList.contains("is-loading"))return t.classList.add("is-loading"),r=function(e){var n;return n=t.closest(".js-repo-filter"),n.querySelector(".js-repo-list").innerHTML=e,$(n.querySelector(".js-filterable-field")).fire("filterable:change"),t.remove()},n=function(){return t.classList.remove("is-loading")},e(t.href).then(r).then(n,n)},$(document).on("click",".js-more-repos-link",function(e){e.preventDefault(),t(this)})}.call(this),function(){$(document).on("ajaxSuccess",".js-select-menu:not([data-multiple])",function(){return $(this).menu("deactivate")}),$(document).on("ajaxSend",".js-select-menu:not([data-multiple])",function(){return $(this).addClass("is-loading")}),$(document).on("ajaxComplete",".js-select-menu",function(){return $(this).removeClass("is-loading")}),$(document).on("ajaxError",".js-select-menu",function(){return $(this).addClass("has-error")}),$(document).on("menu:deactivate",".js-select-menu",function(){return $(this).removeClass("is-loading has-error")})}.call(this),function(){var e;e=require("delegated-events").fire,$(document).on("navigation:open",".js-select-menu:not([data-multiple]) .js-navigation-item",function(){var t,n;return n=$(this),t=n.closest(".js-select-menu"),t.find(".js-navigation-item.selected").removeClass("selected"),n.addClass("selected"),n.removeClass("indeterminate"),n.find("input[type=radio], input[type=checkbox]").prop("checked",!0).change(),e(this,"selectmenu:selected"),t.hasClass("is-loading")?void 0:t.menu("deactivate")}),$(document).on("navigation:open",".js-select-menu[data-multiple] .js-navigation-item",function(){var t,n;return t=$(this),n=t.hasClass("selected"),t.toggleClass("selected",!n),t.removeClass("indeterminate"),t.find("input[type=radio], input[type=checkbox]").prop("checked",!n).change(),e(this,"selectmenu:selected")})}.call(this),function(){$(document).on("selectmenu:selected",".js-select-menu .js-navigation-item",function(){var e,t,n;return e=$(this).closest(".js-select-menu"),n=$(this).find(".js-select-button-text"),n[0]&&e.find(".js-select-button").html(n.html()),t=$(this).find(".js-select-menu-item-gravatar"),n[0]?e.find(".js-select-button-gravatar").html(t.html()):void 0})}.call(this),function(){$(document).on("selectmenu:change",".js-select-menu .select-menu-list",function(e){var t,n;t=$(this).find(".js-navigation-item"),t.removeClass("last-visible"),t.visible().last().addClass("last-visible"),$(this).is("[data-filterable-for]")||(n=$(e.target).hasClass("filterable-empty"),$(this).toggleClass("filterable-empty",n))})}.call(this),function(){$(document).on("menu:activated selectmenu:load",".js-select-menu",function(){return $(this).find(".js-filterable-field").focus()}),$(document).on("menu:deactivate",".js-select-menu",function(){var e,t,n,r,i,s;for($(this).find(".js-filterable-field").val("").trigger("filterable:change"),i=this.querySelectorAll(".js-navigation-item.selected"),s=[],e=0,r=i.length;r>e;e++)n=i[e],(t=n.querySelector("input[type=radio], input[type=checkbox]"))?s.push(n.classList.toggle("selected",t.checked)):s.push(void 0);return s})}.call(this),function(){var e,t;e=require("delegated-events").fire,t=function(t){var n,r,i,s,o;return i=t.currentTarget,n=$(i),n.removeClass("js-load-contents"),n.addClass("is-loading"),n.removeClass("has-error"),s=n.attr("data-contents-url"),r=n.data("contents-data"),o=$.ajax({url:s,data:r}),o.then(function(t){n.removeClass("is-loading"),n.find(".js-select-menu-deferred-content").html(t),n.hasClass("active")&&e(i,"selectmenu:load")},function(){n.removeClass("is-loading"),n.addClass("has-error")})},$.observe(".js-select-menu.js-load-contents",{add:function(){$(this).on("mouseenter",t),$(this).on("menu:activate",t)},remove:function(){$(this).off("mouseenter",t),$(this).off("menu:activate",t)}})}.call(this),function(){$(document).on("menu:activate",".js-select-menu",function(){return $(this).find(":focus").blur(),$(this).find(".js-menu-target").addClass("selected"),$(this).find(".js-navigation-container").navigation("push")}),$(document).on("menu:deactivate",".js-select-menu",function(){return $(this).find(".js-menu-target").removeClass("selected"),$(this).find(".js-navigation-container").navigation("pop")}),$(document).on("filterable:change selectmenu:tabchange",".js-select-menu .select-menu-list",function(){return $(this).navigation("refocus")})}.call(this),function(){var e,t;e=require("delegated-events").fire,$(document).on("filterable:change",".js-select-menu .select-menu-list",function(n){var r,i,s,o;(i=this.querySelector(".js-new-item-form"))&&(r=n.relatedTarget.value,""===r||t(this,r)?$(this).removeClass("is-showing-new-item-form"):($(this).addClass("is-showing-new-item-form"),o=i.querySelector(".js-new-item-name"),"innerText"in o?o.innerText=r:o.textContent=r,null!=(s=i.querySelector(".js-new-item-value"))&&(s.value=r))),e(n.target,"selectmenu:change")}),t=function(e,t){var n,r,i,s,o;for(s=e.querySelectorAll(".js-select-button-text"),n=0,i=s.length;i>n;n++)if(r=s[n],o=r.textContent.toLowerCase().trim(),o===t.toLowerCase())return!0;return!1}}.call(this),function(){var e,t;e=require("delegated-events").fire,$(document).on("menu:activate selectmenu:load",".js-select-menu",function(){var e;return e=$(this).find(".js-select-menu-tab"),e.attr("aria-selected","false").removeClass("selected"),e.first().attr("aria-selected","true").addClass("selected")}),$(document).on("click",".js-select-menu .js-select-menu-tab",function(e){var t,n,r,i;return n=this.closest(".js-select-menu"),(i=n.querySelector(".js-select-menu-tab.selected"))&&(i.classList.remove("selected"),i.setAttribute("aria-selected",!1)),this.classList.add("selected"),this.setAttribute("aria-selected",!0),(t=n.querySelector(".js-filterable-field"))&&((r=this.getAttribute("data-filter-placeholder"))&&t.setAttribute("placeholder",r),t.focus()),!1}),t=function(t,n){var r,i,s;s=t.getAttribute("data-tab-filter"),i=$(t).closest(".js-select-menu").find(".js-select-menu-tab-bucket"),r=i.filter(function(){return this.getAttribute("data-tab-filter")===s}),r.toggleClass("selected",n),n&&e(r[0],"selectmenu:tabchange")},$.observe(".js-select-menu .js-select-menu-tab.selected",{add:function(){return t(this,!0)},remove:function(){return t(this,!1)}})}.call(this),function(){}.call(this),function(){var e,t,n,r;e=function(e){var t;return null==e&&(e=window.location),(t=document.querySelector("meta[name=session-resume-id]"))?t.content:e.pathname},r=null,$(window).on("submit:prepare",function(e){r=e.target,setImmediate(function(){return e.isDefaultPrevented()?r=null:void 0})}),t=function(e){var t,n,i,s;if(i="session-resume:"+e,s=function(e){return e.id&&e.value!==e.defaultValue&&e.form!==r},n=function(){var e,n,r,i;for(r=$(".js-session-resumable"),i=[],e=0,n=r.length;n>e;e++)t=r[e],s(t)&&i.push([t.id,t.value]);return i}(),n.length)try{sessionStorage.setItem(i,JSON.stringify(n))}catch(o){}},n=function(e){var t,n,r,i,s,o,a,c;if(i="session-resume:"+e,n=function(){try{return sessionStorage.getItem(i)}catch(e){}}()){try{sessionStorage.removeItem(i)}catch(u){}for(t=[],o=JSON.parse(n),r=0,s=o.length;s>r;r++)a=o[r],e=a[0],c=a[1],$(document).fire("session:resume",{targetId:e,targetValue:c},function(){var n;n=document.getElementById(e),n&&n.value===n.defaultValue&&(n.value=c,t.push(n))});setImmediate(function(){return $(t).trigger("change")})}},$(window).on("pageshow pjax:end",function(){n(e())}),$(window).on("pagehide",function(){t(e())}),$(window).on("pjax:beforeReplace",function(n){var r,i,s,o;(o=null!=(s=n.previousState)?s.url:void 0)?(i=e(new URL(o)),t(i)):(r=new Error("pjax:beforeReplace event.previousState.url is undefined"),setImmediate(function(){throw r}))})}.call(this),function(){var e,t,n;e=require("github/debounce")["default"],t=function(){var t,n,r;t=null,r=e(function(){return t=null},200),n={x:0,y:0},$(this).on("mousemove.userResize",function(e){var i;(n.x!==e.clientX||n.y!==e.clientY)&&(i=this.style.height,t&&t!==i&&$(this).trigger("user:resize"),t=i,r()),n={x:e.clientX,y:e.clientY}})},n=function(){$(this).off("mousemove.userResize")},$.event.special["user:resize"]={setup:t,teardown:n}}.call(this),function(){var e,t,n,r;n=function(e){return $(e).on("user:resize.trackUserResize",function(){return $(e).addClass("is-user-resized"),$(e).css({"max-height":""})})},r=function(e){return $(e).off("user:resize.trackUserResize")},$(document).on("reset","form",function(){var e;e=$(this).find("textarea.js-size-to-fit"),e.removeClass("is-user-resized"),e.css({height:"","max-height":""})}),$.observe("textarea.js-size-to-fit",{add:n,remove:r}),e=function(e){var t,n,r;t=$(e),n=null,r=function(r){var i,s,o,a;e.value!==n&&t.is($.visible)&&(a=t.overflowOffset(),a.top<0||a.bottom<0||(o=t.outerHeight()+a.bottom,e.style.maxHeight=o-100+"px",i=e.parentNode,s=i.style.height,i.style.height=$(i).css("height"),e.style.height="auto",t.innerHeight(e.scrollHeight),i.style.height=s,n=e.value))},t.on("change.sizeToFit",function(){return r()}),t.on("input.sizeToFit",function(){return r()}),e.value&&r()},t=function(e){$(e).off(".sizeToFit")},$.observe("textarea.js-size-to-fit:not(.is-user-resized)",{add:e,remove:t})}.call(this),function(){$(document).on("ajaxSuccess",".js-social-container",function(e,t,n,r){return $(this).find(".js-social-count").text(r.count)})}.call(this),function(e,t){"function"==typeof define&&define.amd?define([],t):"undefined"!=typeof module&&module.exports?module.exports=t():e.ReconnectingWebSocket=t()}(this,function(){function e(t,n,r){function i(e,t){var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,!1,!1,t),n}var s={debug:!1,automaticOpen:!0,reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,timeoutInterval:2e3,maxReconnectAttempts:null};r||(r={});for(var o in s)"undefined"!=typeof r[o]?this[o]=r[o]:this[o]=s[o];this.url=t,this.reconnectAttempts=0,this.readyState=WebSocket.CONNECTING,this.protocol=null;var a,c=this,u=!1,l=!1,d=document.createElement("div");d.addEventListener("open",function(e){c.onopen(e)}),d.addEventListener("close",function(e){c.onclose(e)}),d.addEventListener("connecting",function(e){c.onconnecting(e)}),d.addEventListener("message",function(e){c.onmessage(e)}),d.addEventListener("error",function(e){c.onerror(e)}),this.addEventListener=d.addEventListener.bind(d),this.removeEventListener=d.removeEventListener.bind(d),this.dispatchEvent=d.dispatchEvent.bind(d),this.open=function(t){if(a=new WebSocket(c.url,n||[]),t){if(this.maxReconnectAttempts&&this.reconnectAttempts>this.maxReconnectAttempts)return}else d.dispatchEvent(i("connecting")),this.reconnectAttempts=0;(c.debug||e.debugAll)&&console.debug("ReconnectingWebSocket","attempt-connect",c.url);var r=a,s=setTimeout(function(){(c.debug||e.debugAll)&&console.debug("ReconnectingWebSocket","connection-timeout",c.url),l=!0,r.close(),l=!1},c.timeoutInterval);a.onopen=function(n){clearTimeout(s),(c.debug||e.debugAll)&&console.debug("ReconnectingWebSocket","onopen",c.url),c.protocol=a.protocol,c.readyState=WebSocket.OPEN,c.reconnectAttempts=0;var r=i("open");r.isReconnect=t,t=!1,d.dispatchEvent(r)},a.onclose=function(n){if(clearTimeout(s),a=null,u)c.readyState=WebSocket.CLOSED,d.dispatchEvent(i("close"));else{c.readyState=WebSocket.CONNECTING;var r=i("connecting");r.code=n.code,r.reason=n.reason,r.wasClean=n.wasClean,d.dispatchEvent(r),t||l||((c.debug||e.debugAll)&&console.debug("ReconnectingWebSocket","onclose",c.url),d.dispatchEvent(i("close")));var s=c.reconnectInterval*Math.pow(c.reconnectDecay,c.reconnectAttempts);setTimeout(function(){c.reconnectAttempts++,c.open(!0)},s>c.maxReconnectInterval?c.maxReconnectInterval:s)}},a.onmessage=function(t){(c.debug||e.debugAll)&&console.debug("ReconnectingWebSocket","onmessage",c.url,t.data);var n=i("message");n.data=t.data,d.dispatchEvent(n)},a.onerror=function(t){(c.debug||e.debugAll)&&console.debug("ReconnectingWebSocket","onerror",c.url,t),d.dispatchEvent(i("error"))}},1==this.automaticOpen&&this.open(!1),this.send=function(t){if(a)return(c.debug||e.debugAll)&&console.debug("ReconnectingWebSocket","send",c.url,t),a.send(t);throw"INVALID_STATE_ERR : Pausing to reconnect websocket"},this.close=function(e,t){"undefined"==typeof e&&(e=1e3),u=!0,a&&a.close(e,t)},this.refresh=function(){a&&a.close()}}if("WebSocket"in window)return e.prototype.onopen=function(e){},e.prototype.onclose=function(e){},e.prototype.onconnecting=function(e){},e.prototype.onmessage=function(e){},e.prototype.onerror=function(e){},e.debugAll=!1,e.CONNECTING=WebSocket.CONNECTING,e.OPEN=WebSocket.OPEN,e.CLOSING=WebSocket.CLOSING,e.CLOSED=WebSocket.CLOSED,e}),function(){var e,t,n,r,i,s,o;"undefined"!=typeof WebSocket&&null!==WebSocket&&(s={},t={},e=null,r=function(e){var n,r;if(n=document.head.querySelector("link[rel=web-socket]"))return r=new ReconnectingWebSocket(n.href),r.reconnectInterval=2e3*Math.random()+1e3,r.reconnectDecay=2,r.maxReconnectAttempts=5,r.addEventListener("open",function(){var e,t,n;n=[];for(t in s)e=s[t],n.push(r.send("subscribe:"+t));return n}),r.addEventListener("message",function(e){var n,r,i;i=JSON.parse(e.data),r=i[0],n=i[1],r&&n&&$(t[r]).trigger("socket:message",[n,r])}),r},n=function(e){var t,n;return null!=(t=null!=(n=e.getAttribute("data-channel"))?n.split(/\s+/):void 0)?t:[]},i=function(i){var o,a,c,u,l;if(null!=e?e:e=r())for(l=e,u=n(i),o=0,a=u.length;a>o;o++)c=u[o],l.readyState!==WebSocket.OPEN||s[c]||l.send("subscribe:"+c),s[c]=!0,null==t[c]&&(t[c]=[]),t[c].push(i)},o=function(e){var r,i,s,o;for(o=n(e),r=0,i=o.length;i>r;r++)s=o[r],t[s]=$(t[s]).not(e).slice(0)},$.observe(".js-socket-channel[data-channel]",{add:i,remove:o}))}.call(this),function(){var e,t,n;if(n=null!=(t=document.querySelector("meta[name=user-login]"))?t.content:void 0,null!=n){e=String(!!n.length);try{localStorage.setItem("logged-in",e)}catch(r){return}window.addEventListener("storage",function(t){var n;if(t.storageArea===localStorage&&"logged-in"===t.key&&t.newValue!==e)return e=t.newValue,n=document.querySelector(".js-stale-session-flash"),n.classList.toggle("is-signed-in","true"===e),n.classList.toggle("is-signed-out","false"===e),n.classList.remove("hidden"),$.pjax.disable(),$(window).on("popstate",function(e){return null!=e.state.container?location.reload():void 0}),$(document).on("submit","form",function(e){return e.preventDefault()})})}}.call(this),function(){var e,t,n;t=["position:absolute;","overflow:auto;","word-wrap:break-word;","top:0px;","left:-9999px;"],n=["box-sizing","font-family","font-size","font-style","font-variant","font-weight","height","letter-spacing","line-height","max-height","min-height","padding-bottom","padding-left","padding-right","padding-top","border-bottom","border-left","border-right","border-top","text-decoration","text-indent","text-transform","width","word-spacing"],e=new WeakMap,$.fn.textFieldMirror=function(r){var i,s,o,a,c,u,l,d,h,f,m,p;if((p=this[0])&&(d=p.nodeName.toLowerCase(),"textarea"===d||"input"===d)){if(u=e.get(p),u&&u.parentElement===p.parentElement)u.innerHTML="";else{for(u=document.createElement("div"),e.set(p,u),f=window.getComputedStyle(p),h=t.slice(0),"textarea"===d?h.push("white-space:pre-wrap;"):h.push("white-space:nowrap;"),o=0,a=n.length;a>o;o++)l=n[o],h.push(l+":"+f.getPropertyValue(l)+";");u.style.cssText=h.join(" ")}return r!==!1&&(c=document.createElement("span"),c.style.cssText="position: absolute;",c.className="text-field-mirror-marker",c.innerHTML="&nbsp;"),"number"==typeof r?((m=p.value.substring(0,r))&&(s=document.createTextNode(m)),(m=p.value.substring(r))&&(i=document.createTextNode(m))):(m=p.value)&&(s=document.createTextNode(m)),s&&u.appendChild(s),c&&u.appendChild(c),i&&u.appendChild(i),u.parentElement||p.parentElement.insertBefore(u,p),u.scrollTop=p.scrollTop,u.scrollLeft=p.scrollLeft,u}}}.call(this),function(){$.fn.textFieldSelectionPosition=function(e){var t,n,r;if((r=this[0])&&(null==e&&(e=r.selectionEnd),t=$(r).textFieldMirror(e)))return n=$(t).find(".text-field-mirror-marker").position(),n.top+=parseInt($(t).css("border-top-width"),10),n.left+=parseInt($(t).css("border-left-width"),10),setTimeout(function(){return $(t).remove()},5e3),n}}.call(this),function(){var e,t,n,r,i,s,o,a,c,u,l,d,h,f,m,p=function(e,t){return function(){return e.apply(t,arguments)}};o=require("github/feature-detection")["default"],c=require("github/fetch").fetchText,f=function(e,t,n){var r,i,s,o;return o=n[3],i=n[4],s=t-i.length,r=t,{type:e,text:o,query:i,startIndex:s,endIndex:r}},a={},e=function(){function e(e){this.textarea=e,this.deactivate=p(this.deactivate,this),this.onNavigationOpen=p(this.onNavigationOpen,this),this.onNavigationKeyDown=p(this.onNavigationKeyDown,this),this.onInput=p(this.onInput,this),this.onPaste=p(this.onPaste,this),this.teardown=p(this.teardown,this),$(this.textarea).on("focusout:delayed.suggester",this.teardown),$(this.textarea.form).on("reset.suggester",this.deactivate),$(this.textarea).on("paste.suggester",this.onPaste),$(this.textarea).on("input.suggester",this.onInput),this.suggester=this.textarea.closest(".js-suggester-container").querySelector(".js-suggester"),this.fragment=document.createElement("div"),$(this.suggester).on("navigation:keydown.suggester","[data-value]",this.onNavigationKeyDown),$(this.suggester).on("navigation:open.suggester","[data-value]",this.onNavigationOpen),this.loadSuggestions()}var t,r;return e.prototype.types={mention:{match:/(^|\s)(@([a-z0-9\-_\/]*))$/i,replace:"$1@$value ",search:function(e,t){var r,i,s;return s=l(t),r=$(e).find("ul.mention-suggestions"),i=r.fuzzyFilterSortList(t,{limit:5,text:n,score:s.score}),Promise.resolve([r,i])}},auditLogUser:{match:/(^|\s)((\-?actor:|\-?user:)([a-z0-9\-\+_]*))$/i,replace:"$1$3$value ",search:function(e,t){var n,r;return n=$(e).find("ul.user-suggestions"),r=n.fuzzyFilterSortList(t,{limit:5}),Promise.resolve([n,r])},normalizeMatch:f},auditLogOrg:{match:/(^|\s)((\-?org:)([a-z0-9\-\+_]*))$/i,replace:"$1$3$value ",search:function(e,t){var n,r;return n=$(e).find("ul.org-suggestions"),r=n.fuzzyFilterSortList(t,{limit:5}),Promise.resolve([n,r])},normalizeMatch:f},auditLogAction:{match:/(^|\s)((\-?action:)([a-z0-9\.\-\+_]*))$/i,replace:"$1$3$value ",search:function(e,t){var n,r;return n=$(e).find("ul.action-suggestions"),r=n.fuzzyFilterSortList(t,{limit:5}),Promise.resolve([n,r])},normalizeMatch:f},auditLogRepo:{match:/(^|\s)((\-?repo:)([a-z0-9\/\-\+_]*))$/i,replace:"$1$3$value ",search:function(e,t){var n,r;return n=$(e).find("ul.repo-suggestions"),
r=n.fuzzyFilterSortList(t,{limit:5}),Promise.resolve([n,r])},normalizeMatch:f},auditLogCountry:{match:/(^|\s)((\-?country:)([a-z0-9\-\+_]*))$/i,replace:"$1$3$value ",search:function(e,t){var n,r;return n=$(e).find("ul.country-suggestions"),r=n.fuzzyFilterSortList(t,{limit:5}),Promise.resolve([n,r])},normalizeMatch:f},emoji:{match:/(^|\s)(:([a-z0-9\-\+_]*))$/i,replace:"$1$value ",getValue:function(e){return o.emoji&&e.getAttribute("data-raw-value")||e.getAttribute("data-value")},search:function(e,t){var n,r;return n=$(e).find("ul.emoji-suggestions"),t=" "+t.toLowerCase().replace(/_/g," "),r=n.fuzzyFilterSortList(t,{limit:5,text:s,score:i}),Promise.resolve([n,r])}},hashed:{match:/(^|\s)(\#([a-z0-9\-_\/]*))$/i,replace:"$1#$value ",search:function(e,t){var r,i,s,o;return r=$(e).find("ul.hashed-suggestions"),i=/^\d+$/.test(t)?(s=new RegExp("\\b"+t),function(e){return h(e,s)}):l(t).score,o=r.fuzzyFilterSortList(t,{limit:5,text:n,score:i}),Promise.resolve([r,o])}}},r=function(e){return e.replace(/`{3,}[^`]*\n(.+)?\n`{3,}/g,"")},t=function(e){var t,n;return(null!=(t=e.match(/`{3,}/g))?t.length:void 0)%2?!0:(null!=(n=r(e).match(/`/g))?n.length:void 0)%2?!0:void 0},e.prototype.teardown=function(){this.deactivate(),$(this.textarea).off(".suggester"),$(this.textarea.form).off(".suggester"),$(this.suggester).off(".suggester"),this.onSuggestionsLoaded=function(){return null}},e.prototype.onPaste=function(){this.deactivate(),this.justPasted=!0},e.prototype.onInput=function(){return this.justPasted?void(this.justPasted=!1):this.checkQuery()?!1:void 0},e.prototype.onNavigationKeyDown=function(e){switch(e.hotkey){case"tab":return this.onNavigationOpen(e),!1;case"esc":return this.deactivate(),e.stopImmediatePropagation(),!1}},e.prototype.onNavigationOpen=function(e){var t,n,r;r=null!=this.currentSearch.type.getValue?this.currentSearch.type.getValue(e.target):e.target.getAttribute("data-value"),n=this.textarea.value.substring(0,this.currentSearch.endIndex),t=this.textarea.value.substring(this.currentSearch.endIndex),n=n.replace(this.currentSearch.type.match,this.currentSearch.type.replace.replace("$value",r)),this.textarea.value=n+t,this.deactivate(),this.textarea.focus(),this.textarea.selectionStart=n.length,this.textarea.selectionEnd=n.length},e.prototype.checkQuery=function(){var e,t;if(t=this.searchQuery()){if(t.query===(null!=(e=this.currentSearch)?e.query:void 0))return;return this.currentSearch=t,this.search(t.type,t.query).then(function(e){return function(n){return n?e.activate(t.startIndex):e.deactivate()}}(this)),this.currentSearch.query}this.currentSearch=null,this.deactivate()},e.prototype.activate=function(e){$(this.suggester).css($(this.textarea).textFieldSelectionPosition(e+1)),this.suggester.classList.contains("active")||(this.suggester.classList.add("active"),this.textarea.classList.add("js-navigation-enable"),$(this.suggester).navigation("push"),$(this.suggester).navigation("focus"))},e.prototype.deactivate=function(){this.suggester.classList.contains("active")&&(this.suggester.classList.remove("active"),$(this.suggester).find(".suggestions").hide(),this.textarea.classList.remove("js-navigation-enable"),$(this.suggester).navigation("pop"))},e.prototype.search=function(e,t){return e.search(this.fragment,t).then(function(e){return function(t){var n,r,i;return n=t[0],i=t[1],i>0?(r=n[0].cloneNode(!0),e.suggester.innerHTML="",e.suggester.appendChild(r),$(r).show(),$(e.suggester).navigation("focus"),!0):!1}}(this))},e.prototype.searchQuery=function(){var e,n,r,i,s,o,a;if(i=this.textarea.selectionEnd,o=this.textarea.value.substring(0,i),!t(o)){s=this.types;for(r in s)if(a=s[r],e=o.match(a.match))return n=null!=a.normalizeMatch?a.normalizeMatch(a,i,e):this.normalizeMatch(a,i,e)}},e.prototype.normalizeMatch=function(e,t,n){var r,i,s,o;return o=n[2],i=n[3],s=t-o.length,r=t,{type:e,text:o,query:i,startIndex:s,endIndex:r}},e.prototype.loadSuggestions=function(){var e,t;if(!this.fragment.hasChildNodes()&&(t=this.suggester.getAttribute("data-url"),null!=t))return e=null!=a[t]?a[t]:a[t]=c(t),e.then(function(e){return function(t){return e.onSuggestionsLoaded(t)}}(this))},e.prototype.onSuggestionsLoaded=function(e){var t,n,r,i;for(i=$.parseHTML(e),n=0,r=i.length;r>n;n++)t=i[n],this.fragment.appendChild(t);return document.activeElement===this.textarea?(this.currentSearch=null,this.checkQuery()):void 0},e}(),r={},s=function(e){var t;return t=e.getAttribute("data-emoji-name"),r[t]=" "+n(e).replace(/_/g," "),t},n=function(e){return e.getAttribute("data-text").trim().toLowerCase()},i=function(e,t){var n;return n=r[e].indexOf(t),n>-1?1e3-n:0},h=function(e,t){var n;return n=e.search(t),n>-1?1e3-n:0},m=function(e,n){var r,i,s,o,a,c,u;if(u=t(e,n[0]),0!==u.length){if(1===n.length)return[u[0],1,[]];for(a=null,i=0,s=u.length;s>i;i++)c=u[i],(r=d(e,n,c+1))&&(o=r[r.length-1]-c,(!a||o<a[1])&&(a=[c,o,r]));return a}},t=function(e,t){var n,r;for(n=0,r=[];(n=e.indexOf(t,n))>-1;)r.push(n++);return r},d=function(e,t,n){var r,i,s,o;for(i=[],r=s=1,o=t.length;o>=1?o>s:s>o;r=o>=1?++s:--s){if(n=e.indexOf(t[r],n),-1===n)return;i.push(n++)}return i},u=function(){return 2},l=function(e){var t,n;return e?(t=e.toLowerCase().split(""),n=function(n){var r,i;return n&&(r=m(n,t))?(i=e.length/r[1],i/=r[0]/2+1):0}):n=u,{score:n}},$(document).on("focusin:delayed",".js-suggester-field",function(){new e(this)})}.call(this),function(){$(document).on("tasklist:change",".js-task-list-container",function(){$(this).taskList("disable")}),$(document).on("tasklist:changed",".js-task-list-container",function(e,t,n){var r,i,s,o;return i=$(this).find("form.js-comment-update"),s=i.find("input[name=task_list_key]"),s.length>0||(o=i.find(".js-task-list-field").attr("name").split("[")[0],s=$("<input>",{type:"hidden",name:"task_list_key",value:o}),i.append(s)),n=n?"1":"0",r=$("<input>",{type:"hidden",name:"task_list_checked",value:n}),i.append(r),i.one("ajaxComplete",function(e,t){return r.remove(),200!==t.status||/^\s*</.test(t.responseText)?422===t.status&&t.stale?window.location.reload():void 0:$(this).taskList("enable")}),i.submit()}),$.observe(".task-list",function(){$(this).taskList("enable")})}.call(this),function(){var e,t,n,r;e=require("github/fetch").fetchJSON,t=function(){var t,i,s,o,a,c;if(c=this.getAttribute("data-url"))return a=e(c),s=this.getAttribute("data-id"),o=$(".js-team-mention[data-id='"+s+"']"),o.removeAttr("data-url"),t=function(e){return 0===e.total?e.members.push("This team has no members"):e.total>e.members.length&&e.members.push(e.total-e.members.length+" more"),r(o,n(e.members))},i=function(e){return function(t){var n,i,s;return s=(null!=(i=t.response)?i.status:void 0)||500,n=function(){switch(s){case 404:return this.getAttribute("data-permission-text");default:return this.getAttribute("data-error-text")}}.call(e),r(o,n)}}(this),a.then(t,i)},r=function(e,t){return e.attr("aria-label",t),e.addClass("tooltipped tooltipped-s tooltipped-multiline")},n=function(e){var t;return 0===e.length?"":1===e.length?e[0]:2===e.length?e.join(" and "):([].splice.apply(e,[-1,9e9].concat(t="and "+e.slice(-1))),e.join(", "))},$.observe(".js-team-mention",function(){$(this).on("mouseenter",t)})}.call(this),function(){var e,t;t=function(e,t,n){var r,i;return r=e.value.substring(0,e.selectionEnd),i=e.value.substring(e.selectionEnd),r=r.replace(t,n),i=i.replace(t,n),e.value=r+i,e.selectionStart=r.length,e.selectionEnd=r.length},e=function(e,t){var n,r,i,s;return i=e.selectionEnd,n=e.value.substring(0,i),s=e.value.substring(i),r=""===e.value||n.match(/\n$/)?"":"\n",e.value=n+r+t+s,e.selectionStart=i+t.length,e.selectionEnd=i+t.length},$.fn.replaceText=function(e,n){var r,i,s;for(i=0,s=this.length;s>i;i++)r=this[i],t(r,e,n);return this},$.fn.insertText=function(t){var n,r,i;for(r=0,i=this.length;i>r;r++)n=this[r],e(n,t);return this}}.call(this),function(){$(document).on("ajaxBeforeSend",function(e,t,n){var r;n.crossDomain||(r=$(".js-timeline-marker"),r.length&&t.setRequestHeader("X-Timeline-Last-Modified",r.attr("data-last-modified")))})}.call(this),function(){var e,t,n,r;$(document).on("click",".js-timeline-progressive-disclosure-button",function(){var e;return e=this.closest(".js-timeline-progressive-disclosure-container"),e.src=this.getAttribute("data-url"),!0}),t=null,$.observe(".js-timeline-progressive-disclosure-container",function(){return{add:function(e){return e.addEventListener("loadstart",function(){return this.classList.add("is-loading"),!0}),e.addEventListener("loadend",function(){return this.classList.remove("is-loading"),!0}),e.addEventListener("load",function(){var n,r,i,s,o,a;return e===t&&(t=null,i=window.location.hash.slice(1),(r=document.getElementById(i))&&(null!=(s=r.closest(".js-details-container"))&&s.classList.add("open"),o=$(r).overflowOffset(),a=o.top,n=o.bottom,(0>a||0>n)&&r.scrollIntoView())),!0}),e.addEventListener("error",function(){return this.src="",!0})}}}),e=/^(?:commits-pushed-([0-9a-f]{7})|discussion-diff-(\d+)(?:[LR]-?\d+)?|discussion_r(\d+)|event-(\d+)|issuecomment-(\d+)|ref-issue-(\d+)|ref-pullrequest-(\d+))$/,r=function(t){var n,r,i,s,o,a,c,u,l,d,h,f;return c=e.exec(t),null!=c?(n=c[0],r=c[1],s=c[2],i=c[3],o=c[4],h=c[5],f=c[6],a=null!=(u=null!=(l=null!=(d=null!=s?s:i)?d:o)?l:h)?u:f,null!=a?{timeline_item_id:a}:null!=r?{commit_sha:r}:void 0):void 0},(n=function(){var e,n,i,s,o;return n=window.location.hash.slice(1),!document.getElementById(n)&&(e=document.querySelector(".js-timeline-progressive-disclosure-container"),e&&(i=r(n)))?(o=e.getAttribute("data-fragment-url"),s=o.indexOf("?")?"&":"?",e.src=o+s+$.param(i),t=e):void 0})()}.call(this),function(e){var t=function(){"use strict";var e="s",n=function(e){var t=-e.getTimezoneOffset();return null!==t?t:0},r=function(e,t,n){var r=new Date;return void 0!==e&&r.setFullYear(e),r.setMonth(t),r.setDate(n),r},i=function(e){return n(r(e,0,2))},s=function(e){return n(r(e,5,2))},o=function(e){var t=e.getMonth()>7,r=t?s(e.getFullYear()):i(e.getFullYear()),o=n(e),a=0>r,c=r-o;return a||t?0!==c:0>c},a=function(){var t=i(),n=s(),r=t-n;return 0>r?t+",1":r>0?n+",1,"+e:t+",0"},c=function(){var e=a();return new t.TimeZone(t.olson.timezones[e])},u=function(e){var t=new Date(2010,6,15,1,0,0,0),n={"America/Denver":new Date(2011,2,13,3,0,0,0),"America/Mazatlan":new Date(2011,3,3,3,0,0,0),"America/Chicago":new Date(2011,2,13,3,0,0,0),"America/Mexico_City":new Date(2011,3,3,3,0,0,0),"America/Asuncion":new Date(2012,9,7,3,0,0,0),"America/Santiago":new Date(2012,9,3,3,0,0,0),"America/Campo_Grande":new Date(2012,9,21,5,0,0,0),"America/Montevideo":new Date(2011,9,2,3,0,0,0),"America/Sao_Paulo":new Date(2011,9,16,5,0,0,0),"America/Los_Angeles":new Date(2011,2,13,8,0,0,0),"America/Santa_Isabel":new Date(2011,3,5,8,0,0,0),"America/Havana":new Date(2012,2,10,2,0,0,0),"America/New_York":new Date(2012,2,10,7,0,0,0),"Europe/Helsinki":new Date(2013,2,31,5,0,0,0),"Pacific/Auckland":new Date(2011,8,26,7,0,0,0),"America/Halifax":new Date(2011,2,13,6,0,0,0),"America/Goose_Bay":new Date(2011,2,13,2,1,0,0),"America/Miquelon":new Date(2011,2,13,5,0,0,0),"America/Godthab":new Date(2011,2,27,1,0,0,0),"Europe/Moscow":t,"Asia/Amman":new Date(2013,2,29,1,0,0,0),"Asia/Beirut":new Date(2013,2,31,2,0,0,0),"Asia/Damascus":new Date(2013,3,6,2,0,0,0),"Asia/Jerusalem":new Date(2013,2,29,5,0,0,0),"Asia/Yekaterinburg":t,"Asia/Omsk":t,"Asia/Krasnoyarsk":t,"Asia/Irkutsk":t,"Asia/Yakutsk":t,"Asia/Vladivostok":t,"Asia/Baku":new Date(2013,2,31,4,0,0),"Asia/Yerevan":new Date(2013,2,31,3,0,0),"Asia/Kamchatka":t,"Asia/Gaza":new Date(2010,2,27,4,0,0),"Africa/Cairo":new Date(2010,4,1,3,0,0),"Europe/Minsk":t,"Pacific/Apia":new Date(2010,10,1,1,0,0,0),"Pacific/Fiji":new Date(2010,11,1,0,0,0),"Australia/Perth":new Date(2008,10,1,1,0,0,0)};return n[e]};return{determine:c,date_is_dst:o,dst_start_for:u}}();t.TimeZone=function(e){"use strict";var n={"America/Denver":["America/Denver","America/Mazatlan"],"America/Chicago":["America/Chicago","America/Mexico_City"],"America/Santiago":["America/Santiago","America/Asuncion","America/Campo_Grande"],"America/Montevideo":["America/Montevideo","America/Sao_Paulo"],"Asia/Beirut":["Asia/Amman","Asia/Jerusalem","Asia/Beirut","Europe/Helsinki","Asia/Damascus"],"Pacific/Auckland":["Pacific/Auckland","Pacific/Fiji"],"America/Los_Angeles":["America/Los_Angeles","America/Santa_Isabel"],"America/New_York":["America/Havana","America/New_York"],"America/Halifax":["America/Goose_Bay","America/Halifax"],"America/Godthab":["America/Miquelon","America/Godthab"],"Asia/Dubai":["Europe/Moscow"],"Asia/Dhaka":["Asia/Yekaterinburg"],"Asia/Jakarta":["Asia/Omsk"],"Asia/Shanghai":["Asia/Krasnoyarsk","Australia/Perth"],"Asia/Tokyo":["Asia/Irkutsk"],"Australia/Brisbane":["Asia/Yakutsk"],"Pacific/Noumea":["Asia/Vladivostok"],"Pacific/Tarawa":["Asia/Kamchatka","Pacific/Fiji"],"Pacific/Tongatapu":["Pacific/Apia"],"Asia/Baghdad":["Europe/Minsk"],"Asia/Baku":["Asia/Yerevan","Asia/Baku"],"Africa/Johannesburg":["Asia/Gaza","Africa/Cairo"]},r=e,i=function(){for(var e=n[r],i=e.length,s=0,o=e[0];i>s;s+=1)if(o=e[s],t.date_is_dst(t.dst_start_for(o)))return void(r=o)},s=function(){return"undefined"!=typeof n[r]};return s()&&i(),{name:function(){return r}}},t.olson={},t.olson.timezones={"-720,0":"Pacific/Majuro","-660,0":"Pacific/Pago_Pago","-600,1":"America/Adak","-600,0":"Pacific/Honolulu","-570,0":"Pacific/Marquesas","-540,0":"Pacific/Gambier","-540,1":"America/Anchorage","-480,1":"America/Los_Angeles","-480,0":"Pacific/Pitcairn","-420,0":"America/Phoenix","-420,1":"America/Denver","-360,0":"America/Guatemala","-360,1":"America/Chicago","-360,1,s":"Pacific/Easter","-300,0":"America/Bogota","-300,1":"America/New_York","-270,0":"America/Caracas","-240,1":"America/Halifax","-240,0":"America/Santo_Domingo","-240,1,s":"America/Santiago","-210,1":"America/St_Johns","-180,1":"America/Godthab","-180,0":"America/Argentina/Buenos_Aires","-180,1,s":"America/Montevideo","-120,0":"America/Noronha","-120,1":"America/Noronha","-60,1":"Atlantic/Azores","-60,0":"Atlantic/Cape_Verde","0,0":"UTC","0,1":"Europe/London","60,1":"Europe/Berlin","60,0":"Africa/Lagos","60,1,s":"Africa/Windhoek","120,1":"Asia/Beirut","120,0":"Africa/Johannesburg","180,0":"Asia/Baghdad","180,1":"Europe/Moscow","210,1":"Asia/Tehran","240,0":"Asia/Dubai","240,1":"Asia/Baku","270,0":"Asia/Kabul","300,1":"Asia/Yekaterinburg","300,0":"Asia/Karachi","330,0":"Asia/Kolkata","345,0":"Asia/Kathmandu","360,0":"Asia/Dhaka","360,1":"Asia/Omsk","390,0":"Asia/Rangoon","420,1":"Asia/Krasnoyarsk","420,0":"Asia/Jakarta","480,0":"Asia/Shanghai","480,1":"Asia/Irkutsk","525,0":"Australia/Eucla","525,1,s":"Australia/Eucla","540,1":"Asia/Yakutsk","540,0":"Asia/Tokyo","570,0":"Australia/Darwin","570,1,s":"Australia/Adelaide","600,0":"Australia/Brisbane","600,1":"Asia/Vladivostok","600,1,s":"Australia/Sydney","630,1,s":"Australia/Lord_Howe","660,1":"Asia/Kamchatka","660,0":"Pacific/Noumea","690,0":"Pacific/Norfolk","720,1,s":"Pacific/Auckland","720,0":"Pacific/Tarawa","765,1,s":"Pacific/Chatham","780,0":"Pacific/Tongatapu","780,1,s":"Pacific/Apia","840,0":"Pacific/Kiritimati"},"undefined"!=typeof exports?exports.jstz=t:e.jstz=t}(this),function(){var e,t;t=jstz.determine().name(),"https:"===location.protocol&&(e="secure"),document.cookie="tz="+encodeURIComponent(t)+"; path=/; "+e}.call(this),function(){var e,t,n;n=require("github/stats")["default"],t=function(){if(!window.performance.timing)try{return sessionStorage.setItem("navigationStart",Date.now())}catch(e){}},e=function(){return setTimeout(function(){var e,t,r,i,s,o,a,c,u,l,d,h;if(d={},d.crossBrowserLoadEvent=Date.now(),window.performance.timing){o=window.performance.timing;for(r in o)h=o[r],"number"==typeof h&&(d[r]=h);(e=null!=(a=window.chrome)&&"function"==typeof a.loadTimes&&null!=(c=a.loadTimes())?c.firstPaintTime:void 0)&&(d.chromeFirstPaintTime=Math.round(1e3*e))}else s=function(){try{return sessionStorage.getItem("navigationStart")}catch(e){}}(),s&&(d.simulatedNavigationStart=parseInt(s,10));for(l=function(){var e,t,n,r;for(n=window.performance.getEntriesByType("resource"),r=[],e=0,t=n.length;t>e;e++)u=n[e],r.push($.extend({},u));return r}(),t=0,i=l.length;i>t;t++)u=l[t],delete u.toJSON;return Object.keys(d).length>1||l.length?n({timing:d,resources:l}):void 0},0)},$(window).on("pagehide",t),$(window).on("load",e)}.call(this),function(){$(document).on("click",".js-toggler-container .js-toggler-target",function(e){return 1===e.which?($(e.target).trigger("toggler:toggle"),0===$(this).parent(".js-toggler-form").length?!1:void 0):void 0}),$(document).on("ajaxSend",".js-toggler-container",function(e){return this.classList.remove("success","error"),this.classList.add("loading")}),$(document).on("ajaxComplete",".js-toggler-container",function(e){return this.classList.remove("loading")}),$(document).on("ajaxSuccess",".js-toggler-container",function(e){return this.classList.add("success")}),$(document).on("ajaxError",".js-toggler-container",function(e){return this.classList.add("error")}),$(document).on("toggler:toggle",".js-toggler-container",function(e){return this.classList.toggle("on")})}.call(this),function(){var e,t,n;n=0,t=function(e){var t;if(document.hasFocus()&&(t=document.querySelector(".js-timeline-marker-form")))return $(t).submit()},$.inViewport(".js-unread-item",{"in":function(){e(this)}}),$.observe(".js-unread-item",{add:function(){return n++},remove:function(){return n--,0===n?t(this):void 0}}),e=function(e){return e.classList.remove("js-unread-item","unread-item")},$(document).on("socket:message",".js-discussion",function(t){var n,r,i,s;if(this===t.target)for(s=document.querySelectorAll(".js-unread-item"),r=0,i=s.length;i>r;r++)n=s[r],e(n)})}.call(this),function(){var e,t,n;t=0,e=/^\(\d+\)\s+/,n=function(){var n;return n=t?"("+t+") ":"",document.title.match(e)?document.title=document.title.replace(e,n):document.title=""+n+document.title},$.observe(".js-unread-item",{add:function(){return t++,n()},remove:function(){return t--,n()}})}.call(this),function(){var e,t,n,r;e=new WeakMap,$.fn.updateContent=function(n){var r,i;return r=this[0],null!=(i=e.get(r))&&i.abort(),t(r,n)},$(document).on("socket:message",".js-updatable-content",function(t,i,s){var o;this===t.target&&(e.get(this)||(o=new XMLHttpRequest,o.open("GET",this.getAttribute("data-url")),o.setRequestHeader("Accept","text/html"),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.set(this,o),r(o).then(function(t){return function(r){return e["delete"](t),n(t,r)}}(this))["catch"](function(t){return function(n){return e["delete"](t),"XMLHttpRequest abort"!==n.message?console.warn("Failed to update content",t,n):void 0}}(this))))}),r=function(e){return new Promise(function(t,n){return e.onload=function(){return 200===e.status?t(e.responseText):n(new Error("XMLHttpRequest "+e.statusText))},e.onerror=n,e.send()})},t=function(e,t){return $.preserveInteractivePosition(function(){var n;return n=$($.parseHTML($.trim(t))),$(e).replaceWith(n),n})},n=function(e,n){if($(e).hasInteractions())throw new Error("element had interactions");return t(e,n)}}.call(this),function(){var e,t;e=require("delegated-events"),t=require("github/fetch").fetchText,e.on("upload:setup",".js-upload-avatar-image",function(e){var t,n,r,i;return i=e.detail.policyRequest,t=this.getAttribute("data-alambic-organization"),r=this.getAttribute("data-alambic-owner-type"),n=this.getAttribute("data-alambic-owner-id"),t&&i.body.append("organization_id",t),r&&i.body.append("owner_type",r),n?i.body.append("owner_id",n):void 0}),e.on("upload:complete",".js-upload-avatar-image",function(e){var n,r;return n=e.detail.result,r="/settings/avatars/"+n.id,$.facebox(function(){return t(r).then($.facebox)})})}.call(this),define("github/png-scanner",["exports"],function(e){function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),r=2303741511,i=4,s=function(){function e(n){t(this,e),this.dataview=new DataView(n),this.pos=0}return n(e,null,[{key:"fromFile",value:function(t){return new Promise(function(n,r){var i=new FileReader;i.onload=function(){n(new e(i.result))},i.onerror=function(){r(i.error)},i.readAsArrayBuffer(t)})}}]),n(e,[{key:"advance",value:function(e){return this.pos+=e}},{key:"readInt",value:function(e){var t=this.dataview["getUint"+8*e](this.pos);return this.advance(e),t}},{key:"readChar",value:function(){return this.readInt(1)}},{key:"readShort",value:function(){return this.readInt(2)}},{key:"readLong",value:function(){return this.readInt(4)}},{key:"readString",value:function(e){for(var t=[],n=0;e>n;n++)t.push(String.fromCharCode(this.readChar()));return t.join("")}},{key:"scan",value:function(e){if(this.readLong()!==r)throw new Error("invalid PNG");for(this.advance(4);;){var t=this.readLong(),n=this.readString(4),s=this.pos+t+i;if(e.call(this,n,t)===!1||"IEND"===n)break;this.pos=s}}}]),e}();e["default"]=s}),define("github/image-dimensions",["exports","github/png-scanner"],function(e,t){function n(e){return e&&e.__esModule?e:{"default":e}}function r(e){if("image/png"!==e.type)return Promise.resolve({});var t=e.slice(0,10240,e.type);return i["default"].fromFile(t).then(function(e){var t={};return e.scan(function(e){switch(e){case"IHDR":return t.width=this.readLong(),void(t.height=this.readLong());case"pHYs":var n=this.readLong(),r=this.readLong(),i=this.readChar(),o=void 0;return 1===i&&(o=s),o&&(t.ppi=Math.round((n+r)/2*o)),!1;case"IDAT":return!1}}),t})}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=r;var i=n(t),s=.0254}),function(){var e,t,n,r,i,s,o;r=require("github/image-dimensions")["default"],n=require("delegated-events"),s=function(e){return e.toLowerCase().replace(/[^a-z0-9\-_]+/gi,".").replace(/\.{2,}/g,".").replace(/^\.|\.$/gi,"")},o=function(e){var t;return t=i(e)?"!":"",t+("[Uploading "+e.name+"\u2026]()")},t=function(e){return s(e).replace(/\.[^.]+$/,"").replace(/\./g," ")},i=function(e){var t;return"image/gif"===(t=e.type)||"image/png"===t||"image/jpg"===t||"image/jpeg"===t},e=144,n.on("upload:setup",".js-upload-markdown-image",function(e){var t;return t=this.querySelector(".js-comment-field"),$(t).insertText(o(e.detail.file)+"\n"),$(this).trigger("validation:change",!1)}),n.on("upload:complete",".js-upload-markdown-image",function(n){var s,a,c,u,l;return l=n.detail,s=this,a=s.querySelector(".js-comment-field"),c=o(l.file),u=function(n){var r,o,u,d;return o=i(l.file)?(r=t(l.policy.asset.name),u=l.policy.asset.href,(null!=n?n.ppi:void 0)===e?(d=Math.round(n.width/2),'<img width="'+d+'" alt="'+r+'" src="'+u+'">'):"!["+r+"]("+u+")"):"["+l.file.name+"]("+l.policy.asset.href+")",$(a).replaceText(c,o),$(s).trigger("validation:field:change")},r(l.file).then(u,function(e){return u(),setImmediate(function(){throw e})})}),n.on("upload:error",".js-upload-markdown-image",function(e){var t,n;return t=this.querySelector(".js-comment-field"),n=o(e.detail.file),$(t).replaceText(n,""),$(this).trigger("validation:field:change")}),n.on("upload:invalid",".js-upload-markdown-image",function(e){var t,n;return t=this.querySelector(".js-comment-field"),n=o(e.detail.file),$(t).replaceText(n,""),$(this).trigger("validation:field:change")})}.call(this),function(){var e;e=require("delegated-events"),e.on("upload:complete",".js-upload-oauth-logo",function(e){var t,n;return n=e.detail,this.querySelector(".js-image-field").src=n.policy.asset.href,this.classList.add("has-uploaded-logo"),t=this.querySelector(".js-oauth-application-logo-id"),t.value=n.policy.asset.id||n.result.id})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u,l,d,h,f,m,p,g,v,b,y,j,w,x,k,C,S,L,A,T,q,_,E,D,P,I,M,R,H,N,O,F=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};m=require("delegated-events").fire,h=require("github/fetch").fetchJSON,D=function(e){var t;return(null!=(t=e.closest("form").elements.authenticity_token)?t.value:void 0)||function(){throw new Error($(e).inspect()+" is missing authenticity_token")}()},t=function(){function e(){this.uploads=[],this.busy=!1}return e.prototype.upload=function(e,t){var n;return n=function(){},this.uploads.push({file:e,to:t.to,sameOrigin:t.sameOrigin,csrf:t.csrf,form:t.form||{},header:t.header||{},start:t.start||n,progress:t.progress||n,complete:t.complete||n,error:t.error||n}),this.process()},e.prototype.process=function(){var e,t,n,r,i,s,o;if(!this.busy&&0!==this.uploads.length){i=this.uploads.shift(),this.busy=!0,o=new XMLHttpRequest,o.open("POST",i.to,!0),n=i.header;for(t in n)s=n[t],o.setRequestHeader(t,s);o.onloadstart=function(){return i.start()},o.onload=function(e){return function(){return 204===o.status?i.complete({}):201===o.status?i.complete(JSON.parse(o.responseText)):i.error({status:o.status,body:o.responseText}),e.busy=!1,e.process()}}(this),o.onerror=function(){return i.error({status:0,body:""})},o.upload.onprogress=function(e){var t;return e.lengthComputable?(t=Math.round(e.loaded/e.total*100),i.progress(t)):void 0},e=new FormData,i.sameOrigin&&e.append("authenticity_token",i.csrf),r=i.form;for(t in r)s=r[t],e.append(t,s);return e.append("file",i.file),o.send(e)}},e}(),q=["is-default","is-uploading","is-bad-file","is-duplicate-filename","is-too-big","is-too-many","is-failed","is-bad-dimensions","is-empty","is-bad-permissions","is-repository-required"],E=function(e,t){var n;return(n=e.classList).remove.apply(n,q),e.classList.add(t)},N=new t,e=function(){function e(e){var t;this.files=function(){var n,r,i;for(i=[],n=0,r=e.length;r>n;n++)t=e[n],i.push(t);return i}(),this.percentages=function(){var n,r,i;for(i=[],n=0,r=e.length;r>n;n++)t=e[n],i.push(0);return i}(),this.size=this.files.length,this.total=this.files.reduce(function(e,t){return e+t.size},0),this.uploaded=0}return e.prototype.percent=function(){var e,t,n;return e=function(){var e,r,i,s;for(i=this.files,s=[],n=e=0,r=i.length;r>e;n=++e)t=i[n],s.push(t.size*this.percentages[n]/100);return s}.call(this).reduce(function(e,t){return e+t}),Math.round(e/this.total*100)},e.prototype.progress=function(e,t){var n;return n=this.files.indexOf(e),this.percentages[n]=t},e.prototype.completed=function(e){return this.uploaded+=1},e.prototype.isFinished=function(){return this.uploaded===this.files.length},e}(),_=function(e,t){var n,r,i,s,o;for(s=e.files,o=[],r=0,i=s.length;i>r;r++)n=s[r],o.push(function(n){var r,i;return r=c(n,t),i=[],m(t,"upload:setup",{batch:e,file:n,policyRequest:r,preprocess:i})?Promise.all(i).then(function(){return h(r.url,r)}).then(function(r){var i;return i=u(e,n,r,t),N.upload(n,i)})["catch"](function(r){var i;return m(t,"upload:invalid",{batch:e,file:n,error:r}),null!=r.response?r.response.text().then(function(e){var i,s;return s=r.response.status,i=T({status:s,body:e},n),E(t,i)}):(i=T({status:0}),E(t,i))}):void 0}(n));return o},c=function(e,t){var n,r,i;return i=t.getAttribute("data-upload-policy-url"),r=t.getAttribute("data-upload-repository-id"),n=new FormData,n.append("name",e.name),n.append("size",e.size),n.append("content_type",e.type),n.append("authenticity_token",D(t)),r&&n.append("repository_id",r),e._path&&n.append("directory",e._path),{url:i,method:"post",body:n,headers:{}}},T=function(e,t){var n,r,i,s,o,a;if(400===e.status)return"is-bad-file";if(422!==e.status)return"is-failed";if(r=JSON.parse(e.body),null==(null!=r?r.errors:void 0))return"is-failed";for(o=r.errors,i=0,s=o.length;s>i;i++)switch(n=o[i],n.field){case"size":return a=null!=t?t.size:void 0,null!=a&&0===parseInt(a)?"is-empty":"is-too-big";case"file_count":return"is-too-many";case"width":case"height":return"is-bad-dimensions";case"name":return"already_exists"===n.code?"is-duplicate-filename":"is-bad-file";case"content_type":return"is-bad-file";case"uploader_id":return"is-bad-permissions";case"repository_id":return"is-repository-required"}return"is-failed"},u=function(e,t,n,r){var i;return i={to:n.upload_url,form:n.form,header:n.header,sameOrigin:n.same_origin,csrf:D(r),start:function(){return E(r,"is-uploading"),m(r,"upload:start",{batch:e,file:t,policy:n})},progress:function(n){return e.progress(t,n),m(r,"upload:progress",{batch:e,file:t,percent:n})},complete:function(i){var s,o;return e.completed(t),null!=(null!=i?i.href:void 0)&&(n.asset||(n.asset={}),n.asset.href=i.href),(null!=(o=n.asset_upload_url)?o.length:void 0)>0&&(s=new FormData,s.append("authenticity_token",D(r)),h(n.asset_upload_url,{method:"put",body:s})),m(r,"upload:complete",{batch:e,file:t,policy:n,result:i}),E(r,"is-default")},error:function(i){var s;return m(r,"upload:error",{batch:e,file:t,policy:n}),s=T(i),E(r,s)}}},P=function(e){return e.types?F.call(e.types,"Files")>=0:!1},I=function(e){return e.types?F.call(e.types,"text/uri-list")>=0:!1},M=function(e){return e.types?F.call(e.types,"text/plain")>=0:!1},p=function(e){var t,n,r,i;for(r=[],t=0,n=e.length;n>t;t++)i=e[t],Array.isArray(i)?r=r.concat(p(i)):r.push(i);return r},O=function(e){var t,n,r,i;for(i=[],n=0,r=e.length;r>n;n++)t=e[n],t.name.startsWith(".")||i.push(t);return i},R=function(e,t){return t.getFilesAndDirectories?t.getFilesAndDirectories().then(function(e){var n,r;return r=function(){var r,i,s,o;for(s=O(e),o=[],r=0,i=s.length;i>r;r++)n=s[r],o.push(R(t.path,n));return o}(),Promise.all(r)}):(t._path=e,t)},s=function(e){return R("",e).then(p)},v=function(e){return new Promise(function(t,n){return e.file(t,n)})},g=function(e){return new Promise(function(t,n){return e.createReader().readEntries(t,n)})},H=function(e,t){return t.isDirectory?g(t).then(function(e){var n,r;return r=function(){var r,i,s,o;for(s=O(e),o=[],r=0,i=s.length;i>r;r++)n=s[r],o.push(H(t.fullPath,n));return o}(),Promise.all(r)}):v(t).then(function(t){return t._path=e,t})},y=function(e){var t,n,r,i;if(!e.items)return!1;for(i=e.items,t=0,r=i.length;r>t;t++)if(n=i[t],n.webkitGetAsEntry)return!0;return!1},o=function(e){var t,n;return n=function(){var n,r,i,s;for(i=e.items,s=[],n=0,r=i.length;r>n;n++)t=i[n],s.push(H("",t.webkitGetAsEntry()));return s}(),Promise.all(n).then(p)},n=function(t,n){var r;return r=new e(t),_(r,n)},r=function(e,t){var n,r,i,s,o,a,c;if(e){for(n=t.querySelector(".js-comment-field"),o=e.split("\r\n"),a=[],r=0,i=o.length;i>r;r++)s=o[r],c=b(s)?"\n![]("+s+")\n":s,a.push($(n).insertText(c));return a}},i=function(e,t){var n;return n=t.querySelector(".js-comment-field"),$(n).insertText(e)},b=function(e){var t;return t=e.split(".").pop(),"gif"===t||"png"===t||"jpg"===t||"jpeg"===t},l=function(e){return P(e)?"copy":I(e)?"link":M(e)?"copy":"none"},f=function(e){switch(e){case"image/gif":return"image.gif";case"image/png":return"image.png";case"image/jpeg":return"image.jpg"}},k=function(e){return e.preventDefault()},x=function(e){return e.dataTransfer.dropEffect="none",e.preventDefault()},d=null,C=function(e){var t,n;return clearTimeout(d),t=function(e){return function(){return e.classList.remove("dragover")}}(this),d=setTimeout(t,200),n=l(e.dataTransfer),e.dataTransfer.dropEffect=n,this.classList.add("dragover"),e.stopPropagation(),e.preventDefault()},S=function(e){return e.dataTransfer.dropEffect="none",this.classList.remove("dragover"),e.stopPropagation(),e.preventDefault()},j=function(e){var t;return(null!=(t=e.target.classList)?t.contains("js-document-dropzone"):void 0)?this.classList.remove("dragover"):void 0},L=function(e){var t,a,c;return this.classList.remove("dragover"),document.body.classList.remove("dragover"),c=e.dataTransfer,c.types?P(c)?(a=this.hasAttribute("data-directory-upload")&&c.getFilesAndDirectories?s(c):this.hasAttribute("data-directory-upload")&&y(c)?o(c):Promise.resolve(c.files),t=this,a.then(function(e){var r,i;return i=n.bind(null,e),r=!m(t,"upload:drop:setup",{upload:i}),r?void 0:n(e,t)})):I(c)?r(c.getData("text/uri-list"),this):M(c)&&i(c.getData("text/plain"),this):E(this,"is-bad-browser"),e.stopPropagation(),e.preventDefault()},A=function(e){var t,r,i,s,o,a,c;
if(null!=(null!=(a=e.clipboardData)?a.items:void 0)){for(c=e.clipboardData.items,i=0,o=c.length;o>i&&(s=c[i],!(r=f(s.type)));i++);if(r)return t=s.getAsFile(),t.name=r,n([t],this),e.preventDefault()}},w=function(e){return e.target.classList.contains("js-manual-file-chooser")?(e.target.files?n(e.target.files,this):E(this,"is-bad-browser"),e.target.value=""):void 0},a=0,$.observe(".js-document-dropzone",{add:function(){return document.body.addEventListener("dragenter",C),document.body.addEventListener("dragover",C),document.body.addEventListener("dragleave",j),this.addEventListener("drop",L)},remove:function(){return document.body.removeEventListener("dragenter",C),document.body.removeEventListener("dragover",C),document.body.removeEventListener("dragleave",j),this.removeEventListener("drop",L)}}),$.observe(".js-uploadable-container",{add:function(){return 0===a++&&(document.addEventListener("drop",k),document.addEventListener("dragover",x)),this.addEventListener("dragenter",C),this.addEventListener("dragover",C),this.addEventListener("dragleave",S),this.addEventListener("drop",L),this.addEventListener("paste",A),this.addEventListener("change",w)},remove:function(){return 0===--a&&(document.removeEventListener("drop",k),document.removeEventListener("dragover",x)),this.removeEventListener("dragenter",C),this.removeEventListener("dragover",C),this.removeEventListener("dragleave",S),this.removeEventListener("drop",L),this.removeEventListener("paste",A),this.removeEventListener("change",w)}}),("undefined"==typeof FormData||null===FormData)&&document.documentElement.classList.add("no-dnd-uploads")}.call(this),function(){var e,t,n;t=require("delegated-events"),t.on("click",".js-release-remove-file",function(){var e;return e=this.closest(".js-release-file"),e.classList.add("delete"),e.querySelector("input.destroy").value="true"}),t.on("click",".js-release-undo-remove-file",function(){var e;return e=this.closest(".js-release-file"),e.classList.remove("delete"),e.querySelector("input.destroy").value=""}),n=function(e){return e.closest("form").querySelector("#release_id").value},e=[],t.on("release:saved",".js-release-form",function(){var t,n,r,i,s,o;for(setImmediate(function(){var t,n,r;for(t=0,n=e.length;n>t;t++)(r=e[t])();return e.length=0}),o=0,s=this.querySelectorAll(".js-releases-field .js-release-file"),r=0,i=s.length;i>r;r++)t=s[r],t.classList.contains("delete")?t.remove():t.classList.contains("js-template")||o++;return n=this.querySelector(".js-releases-field"),n.classList.toggle("not-populated",!o),n.classList.toggle("is-populated",o)}),t.on("upload:setup",".js-upload-release-file",function(t){var r,i,s,o,a;return a=t.detail,s=a.policyRequest,o=a.preprocess,i=this,r=function(){var e,t,r;return s.body.append("release_id",n(i)),r=document.querySelectorAll(".js-releases-field .js-release-file.delete .id"),r.length?(t=function(){var t,n,i;for(i=[],t=0,n=r.length;n>t;t++)e=r[t],i.push(e.value);return i}(),s.body.append("deletion_candidates",t.join(","))):void 0},n(i)?r():(o.push(new Promise(function(t){return e.push(t)}).then(r)),1===e.length?$("button.js-save-draft").click():void 0)}),t.on("upload:start",".js-upload-release-file",function(e){var t,n,r,i,s,o,a;if(i=e.detail.policy,this.querySelector(".js-upload-meter").classList.remove("hidden"),o=i.asset.replaced_asset){for(s=document.querySelectorAll(".js-releases-field .js-release-file .id"),a=[],n=0,r=s.length;r>n;n++)t=s[n],Number(t.value)===o?a.push(t.closest(".js-release-file").remove()):a.push(void 0);return a}}),t.on("upload:complete",".js-upload-release-file",function(e){var t,n,r,i,s,o,a,c,u,l;for(l=e.detail,a=l.policy,n=document.querySelector(".js-releases-field"),u=n.querySelector(".js-template").cloneNode(!0),u.classList.remove("template","js-template"),u.querySelector("input.id").value=a.asset.id||l.result.id,o=a.asset.name||a.asset.href.split("/").pop(),c=u.querySelectorAll(".filename"),i=0,s=c.length;s>i;i++)t=c[i],"INPUT"===t.tagName?t.value=o:t.textContent=o;return r="",a.asset.size&&(r="("+(a.asset.size/1048576).toFixed(2)+" MB)"),u.querySelector(".filesize").textContent=r,n.appendChild(u),n.classList.remove("not-populated"),n.classList.add("is-populated"),this.querySelector(".js-upload-meter").classList.add("hidden")}),t.on("upload:progress",".js-upload-release-file",function(e){var t;return t=this.querySelector(".js-upload-meter"),t.style.width=e.detail.percent+"%"})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u;t=require("delegated-events"),c=require("github/fetch"),n=c.fetchJSON,r=c.fetchPoll,e=[],o=new WeakMap,u=function(e,t){var n,r,i;n=e.closest(".js-upload-manifest-file-container"),r=n.querySelector(".js-upload-progress"),r.classList.add("active"),e.classList.add("is-progress-bar"),i=r.querySelector(".js-upload-meter-text"),i.querySelector(".js-upload-meter-range-start").textContent=t.batch.uploaded+1,i.querySelector(".js-upload-meter-range-end").textContent=t.batch.size},s=function(e){var t,n,r;return e.classList.remove("is-progress-bar"),t=e.closest(".js-upload-manifest-file-container"),n=t.querySelector(".js-upload-progress"),n.classList.remove("active"),r=t.querySelector(".js-upload-meter-text"),r.querySelector(".js-upload-meter-filename").textContent=""},t.on("upload:drop:setup",".js-upload-manifest-tree-view",function(e){var t,n;return e.preventDefault(),t=e.detail.upload,$(document).one("pjax:success","#js-repo-pjax-container",function(){return t(this.querySelector(".js-uploadable-container"))}),n=this.getAttribute("data-drop-url"),$.pjax({url:n,container:"#js-repo-pjax-container"})}),t.on("upload:setup",".js-upload-manifest-file",function(t){var r,i,s,a,c,l;return l=t.detail,a=l.policyRequest,c=l.preprocess,u(this,t.detail),i=this,r=function(){return a.body.append("upload_manifest_id",o.get(i))},o.get(i)?r():c.push(new Promise(function(t){return e.push(t)}).then(r)),e.length>1||o.get(i)?void 0:(s=this.closest(".js-upload-manifest-file-container").querySelector(".js-upload-manifest-form"),n(s.action,{method:s.method,body:new FormData(s)}).then(function(t){var n,r,s,a;for(n=document.querySelector(".js-manifest-commit-form"),n.elements.manifest_id.value=t.upload_manifest.id,o.set(i,t.upload_manifest.id),r=0,s=e.length;s>r;r++)(a=e[r])();return e.length=0}))}),i=function(e){return e._path?e._path+"/"+e.name:e.name},t.on("upload:start",".js-upload-manifest-file",function(e){var t,n,r,s;return s=e.detail,t=this.closest(".js-upload-manifest-file-container"),n=t.querySelector(".js-upload-progress"),r=n.querySelector(".js-upload-meter-text"),r.querySelector(".js-upload-meter-range-start").textContent=s.batch.uploaded+1,r.querySelector(".js-upload-meter-filename").textContent=i(s.file)}),t.on("upload:complete",".js-upload-manifest-file",function(e){var t,n,r,o,a,c;return c=e.detail,a=document.querySelector(".js-manifest-commit-file-template"),o=a.rows[0].cloneNode(!0),o.querySelector(".name").textContent=i(c.file),o.querySelector(".js-remove-manifest-file-form").elements.file_id.value=c.policy.asset.id,t=document.querySelector(".js-manifest-file-list"),t.classList.remove("hidden"),this.classList.add("is-file-list"),n=document.querySelector(".js-upload-progress"),n.classList.add("is-file-list"),r=t.querySelector(".js-manifest-file-list-root"),r.appendChild(o),c.batch.isFinished()?s(this):void 0}),t.on("upload:progress",".js-upload-manifest-file",function(e){var t,n,r;return r=e.detail,t=this.closest(".js-upload-manifest-file-container"),n=t.querySelector(".js-upload-meter"),n.style.width=r.batch.percent()+"%"}),a=function(){return s(this)},t.on("upload:error",".js-upload-manifest-file",a),t.on("upload:invalid",".js-upload-manifest-file",a),$(document).on("ajaxSuccess",".js-remove-manifest-file-form",function(){var e,t,n,r;r=this.closest(".js-manifest-file-list-root"),this.closest(".js-manifest-file-entry").remove(),r.hasChildNodes()||(t=r.closest(".js-manifest-file-list"),t.classList.add("hidden"),e=document.querySelector(".js-upload-manifest-file"),e.classList.remove("is-file-list"),n=document.querySelector(".js-upload-progress"),n.classList.remove("is-file-list"))}),$.observe(".js-manifest-ready-check",function(){var e;e=this.getAttribute("data-redirect-url"),r(this.getAttribute("data-poll-url")).then(function(){return window.location=e})["catch"](function(){return document.querySelector(".js-manifest-ready-check").classList.add("hidden"),document.querySelector(".js-manifest-ready-check-failed").classList.remove("hidden")})})}.call(this),function(){var e;e=function(){var e,t,n;if(location.hash&&!document.querySelector(":target")){try{e=decodeURIComponent(location.hash.slice(1))}catch(r){return}t="user-content-"+e,n=document.getElementById(t)||document.getElementsByName(t)[0],null!=n&&n.scrollIntoView()}},window.addEventListener("hashchange",e),$(e),$(document).on("pjax:success",e)}.call(this),function(){var e,t,n,r,i,s,o;o=document.createElement("input"),"checkValidity"in o?(o.required=!0,o.value="hi",s=o.cloneNode().checkValidity()):s=!1,o=null,n=function(r){var i,o,a,c,u;if(s)return r.checkValidity();if(i=$(r),i.is("[required]")&&!t(r))return!1;if(i.is("[pattern]")&&!e(r))return!1;if(i.is("form"))for(u=r.elements,a=0,c=u.length;c>a;a++)if(o=u[a],!n(o))return!1;return!0},t=function(e){return!!e.value.trim()},e=function(e){var t;return t=new RegExp("^(?:"+$(e).attr("pattern")+")$"),0===e.value.search(t)},r=function(){var e;return e=n(this),e&&$(this).trigger("validation:field:change"),function(){var t;t=n(this),t!==e&&$(this).trigger("validation:field:change"),e=t}},i=["input[pattern]","input[required]","textarea[required]","select[required]"].join(","),$(document).onFocusedInput(i,r),$(document).on("change",i,r),$.observe(i,function(){$(this).trigger("validation:field:change")}),$(document).on("validation:field:change","form",function(){var e;return e=n(this),$(this).trigger("validation:change",[e])}),$(document).on("validation:change","form",function(e,t){return $(this).find("button[data-disable-invalid]").prop("disabled",!t)}),$(document).on("submit",".js-normalize-submit",function(e){return n(this)?void 0:e.preventDefault()})}.call(this),function(){var e;$.observe(".will-transition-once",{add:function(){this.addEventListener("transitionend",e)},remove:function(){this.removeEventListener("transitionend",e)}}),e=function(e){return e.target.classList.remove("will-transition-once")}}.call(this),function(){$(document).on("ajaxSuccess",function(e,t){var n;(n=t.getResponseHeader("X-XHR-Location"))&&(document.location.href=n,e.stopImmediatePropagation())})}.call(this),function(){$(document).on("submit",".js-user-recommendations-form",function(e){var t;return t=$(".js-user-interests-input").val(),window.ga("send","event","Recommendations","submit","Interest entered : "+t)}),$(document).on("click",".js-interest-option",function(e){var t;return t=$(this).text(),window.ga("send","event","Recommendations","click","Example Interest clicked : "+t)}),$(document).on("submit",".js-remove-user-interest-form",function(e){var t;return t=this.querySelector('input[name="interest"]').value,window.ga("send","event","Recommendations","click","Interest removed : "+t)}),$(document).on("submit",".recommendations-wrapper .js-unfollow-button",function(e){return window.ga("send","event","Recommendations","submit","Unfollowed a User suggestion")}),$(document).on("submit",".recommendations-wrapper .js-follow-button",function(e){return window.ga("send","event","Recommendations","submit","Followed a User suggestion")}),$(document).on("submit",".recommendations-wrapper .js-unstar-button",function(e){return window.ga("send","event","Recommendations","submit","Unstarred a Repo suggestion")}),$(document).on("submit",".recommendations-wrapper .js-star-button",function(e){return window.ga("send","event","Recommendations","submit","Starred a Repo suggestion")})}.call(this),function(){$(function(){return $(".js-signup-form").one("input","input[type=text]",function(){var e;e=this.form.querySelector(".js-signup-source"),window.ga("send","event","Signup","Attempt",e.value)})})}.call(this),function(){var e;e=require("github/fetch").fetchText,$(document).on("click",".js-new-user-contrib-example",function(t){var n,r,i;return t.preventDefault(),n=document.querySelector(".js-calendar-graph"),n.classList.contains("sample-graph")?void 0:(n.classList.add("sample-graph"),r=function(e){var t;return t=n.querySelector(".js-calendar-graph-svg"),$(t).replaceWith(e)},i=function(){return n.classList.remove("sample-graph")},e(this.getAttribute("href")).then(r,i))})}.call(this),function(){$(document).on("graph:load",".js-graph-code-frequency",function(e,t){var n,r,i,s,o,a,c,u,l,d,h,f,m,p,g,v,b,y,j;return g=$(this).width(),s=500,h=[10,10,20,40],d=h[0],l=h[1],c=h[2],u=h[3],t=t.map(function(e,t){return[new Date(1e3*e[0]),e[1],e[2]]}).sort(function(e,t){return d3.ascending(e[0],t[0])}),n=t.map(function(e){return[e[0],e[1]]}),i=t.map(function(e){return[e[0],e[2]]}),o=d3.max(n,function(e){return e[1]}),a=d3.min(i,function(e){return e[1]}),p=t[0][0],m=t[t.length-1][0],v=d3.time.scale().domain([p,m]).range([0,g-u-l]),y=d3.scale.linear().domain([a,o]).range([s-c-d,0]),b=d3.svg.axis().scale(v).tickFormat(function(e){return p.getFullYear()!==m.getFullYear()?d3.time.format("%m/%y")(e):d3.time.format("%m/%d")(e)}),j=d3.svg.axis().scale(y).orient("left").tickPadding(5).tickSize(g).tickFormat(function(e){return d3.formatSymbol(e,!0)}),r=d3.svg.area().x(function(e){return v(e[0])}).y0(function(e){return y(e[1])}).y1(function(e){return y(0)}),f=d3.select(this).data(t).append("svg").attr("width",g).attr("height",s).attr("class","viz code-frequency").append("g").attr("transform","translate("+u+","+d+")"),f.append("g").attr("class","x axis").attr("transform","translate(0, "+(s-d-c)+")").call(b),f.append("g").attr("class","y axis").attr("transform","translate("+g+", 0)").call(j),f.selectAll("path.area").data([n,i]).enter().append("path").attr("class",function(e,t){return 0===t?"addition":"deletion"}).attr("d",r)})}.call(this),define("github/inflector",["exports"],function(e){function t(e,t){return t+(e>1||0==e?"s":"")}function n(e,t){var n=1==e?"data-singular-string":"data-plural-string",r=t.getAttribute(n);t.textContent=r}Object.defineProperty(e,"__esModule",{value:!0}),e.pluralize=t,e.pluralizeNode=n}),function(){var e;e=require("github/inflector").pluralize,$(document).on("graph:load",".js-commit-activity-graph",function(t,n){var r,i,s,o,a,c,u,l,d,h,f,m,p,g,v,b,y,j,w,x,k,C;return u=$("#commit-activity-master"),i=$("#commit-activity-detail"),a=260,y=i.width(),j=0,v=null,function(){var e,t,r,o,c,u,l,d,h,f,m,p,g,b,w,x,k,C,S,L;for(l=0,c=u=0,d=n.length;d>u;c=++u)e=n[c],0!==e.total&&(l=c);return j=l,w=[20,30,30,40],g=w[0],m=w[1],p=w[2],f=w[3],r=n[j].days,h=d3.max(n,function(e){return d3.max(e.days)}),k=d3.scale.linear().domain([0,r.length-1]).range([0,y-m-p]),S=d3.scale.linear().domain([0,h]).range([a,0]),L=d3.svg.axis().scale(S).orient("left").ticks(5).tickSize(-y+p+m),$(this).on("hotkey:activate",function(e){var t,r;return r=j,t=e.originalEvent.hotkey,"left"===t||"right"===t?(j>0&&"left"===t&&(r-=1),j<n.length&&"right"===t&&(r+=1),v({index:r})):void 0}),x=d3.select(i[0]).data([r]).append("svg").attr("width",y).attr("height",a+g+f).attr("class","viz").append("g").attr("transform","translate("+m+","+g+")"),x.append("g").attr("class","y axis").call(L),C=x.append("g").attr("class","axis"),t=C.selectAll(".day").data(d3.weekdays).enter().append("g").attr("class","day").attr("transform",function(e,t){return"translate("+k(t)+", "+a+")"}),t.append("text").attr("text-anchor","middle").attr("dy","2em").text(function(e,t){return e}),b=d3.svg.line().x(function(e,t){return k(t)}).y(S),x.append("path").attr("class","path").attr("d",b),o=x.selectAll("g.dot").data(r).enter().append("g").attr("class","dot").attr("transform",function(e,t){return"translate("+k(t)+", "+S(e)+")"}),o.append("circle").attr("r",4),o.append("text").attr("text-anchor","middle").attr("class","tip").attr("dy",-10).text(function(e){return e}),v=function(e){var t,i,o;if(!(e.index>=52||e.index<0))return j=e.index,r=n[e.index].days,h=d3.max(r),k.domain([0,r.length-1]),o=d3.selectAll(".bar.mini").attr("class","bar mini"),t=d3.select(o[0][j]).attr("class","bar mini active"),i=d3.transform(t.attr("transform")),s.transition().ease("back-out").duration(300).attr("transform","translate("+(i.translate[0]+8)+", 105)"),x.selectAll(".path").data([r]).transition().duration(500).attr("d",b),x.selectAll("g.dot").data(r).transition().duration(300).attr("transform",function(e,t){return"translate("+k(t)+", "+S(e)+")"}),x.selectAll("text.tip").data(r).text(function(e){return e})}}(),m=[10,30,20,30],f=m[0],d=m[1],h=m[2],l=m[3],a=100,g=n.map(function(e){return e.total}),c=d3.max(g),o=d3.time.format.utc("%m/%d"),w=d3.scale.ordinal().domain(d3.range(g.length)).rangeRoundBands([0,y-d-h],.1),k=d3.scale.linear().domain([0,c]).range([a,0]),C=d3.svg.axis().scale(k).orient("left").ticks(3).tickSize(-y+d+h).tickFormat(d3.formatSymbol),x=d3.svg.axis().scale(w).ticks(d3.time.weeks).tickFormat(function(e,t){var r;return r=new Date(1e3*n[t].week),o(r)}),p=d3.tip().attr("class","svg-tip").offset([-10,0]).html(function(t,r){var i,s;return i=new Date(1e3*n[r].week),s=d3.months[i.getUTCMonth()].slice(0,3)+" "+i.getUTCDate(),"<strong>"+t+"</strong> "+e(t,"commit")+" the week of "+s}),b=d3.select(u[0]).style("width",y+"px").append("svg").attr("width",y+(d+h)).attr("height",a+f+l).attr("class","viz").append("g").attr("transform","translate("+d+","+f+")").call(p),b.append("g").attr("class","y axis").call(C),r=b.selectAll("g.mini").data(g).enter().append("g").attr("class",function(e,t){return t===j?"bar mini active":"bar mini"}).attr("transform",function(e,t){return"translate("+w(t)+", 0)"}).on("click",function(e,t){return v({node:this,index:t,data:e})}),r.append("rect").attr("width",w.rangeBand()).attr("height",function(e){return a-k(e)}).attr("y",function(e){return k(e)}).on("mouseover",p.show).on("mouseout",p.hide),b.append("g").attr("class","x axis").attr("transform","translate(0,"+a+")").call(x).selectAll(".tick").style("display",function(e,t){return t%3!==0?"none":"block"}),s=b.append("circle").attr("class","focus").attr("r",8).attr("transform","translate("+(w(j)+w.rangeBand()/2)+", "+-a+")"),s.transition().ease("elastic-in").duration(1e3).attr("r",2).attr("transform","translate("+(w(j)+w.rangeBand()/2)+", "+(a+5)+")")})}.call(this),define("github/number-helpers",["exports"],function(e){function t(e){return(""+e).replace(/(^|[^\w.])(\d{4,})/g,function(e,t,n){return t+n.replace(/\d(?=(?:\d\d\d)+(?!\d))/g,"$&,")})}function n(e){return"string"==typeof e&&(e=e.replace(/,/g,"")),parseFloat(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.formatNumber=t,e.parseFormattedNumber=n}),function(){var e,t,n,r,i,s;i=require("github/inflector").pluralize,e=require("github/number-helpers").formatNumber,r=function(){var e,t,n,r,i,s,o,a;for(i={},s=document.location.search.substr(1).split("&"),e=0,n=s.length;n>e;e++)r=s[e],o=r.split("="),t=o[0],a=o[1],i[t]=a;return i},t=function(e){return e=new Date(e),d3.months[e.getUTCMonth()].slice(0,3)+" "+e.getUTCDate()+", "+e.getUTCFullYear()},s=function(e,n){var r,i;return i=t(e),r=t(n),$(".js-date-range").html(i+" &ndash; "+r)},n=function(e){var t,n;return t=e[0].weeks[0].date,n=new Date(t.getTime()-6048e5),e.forEach(function(e){return e.weeks.unshift({a:0,c:0,d:0,date:n,w:n/1e3})})},$(document).on("graph:load","#contributors",function(t,o){var a,c,u,l,d,h,f,m,p,g,v,b,y,j,w,x,k,C,S;return a=$(this),u=[],p=r(),S=null,C=null,null!=p.from&&(w=new Date(p.from)),null!=p.to&&(d=new Date(p.to)),l=(null!=p?p.type:void 0)||"c",f=d3.time.format.utc("%Y-%m-%d"),g=function(e){return new Date(1e3*~~e)},a.on("range.selection.end",function(e,t){var n;return n=t.range,w=n[0],d=n[1],f(w)===f(d)&&(w=S,d=C),k(),s(w,d),y()}),b=function(e){var t,r;return 1===e[0].weeks.length&&n(e),r=c(e),S=g(r[0].key),C=g(~~r[r.length-1].key+518400),t=new Date,C>t&&(C=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))),null==w&&(w=S),null==d&&(d=C),s(w,d),j(r,S,C),y(e,S,C),$(".js-contribution-container").on("change","input[type=radio]",m)},v=function(e){var t,n,r,i,s,o,a;for(n=0,i=e.length;i>n;n++)for(t=e[n],o=t.weeks,r=0,s=o.length;s>r;r++)a=o[r],a.date=new Date(1e3*a.w);return e},h=function(e,t){return e.map(function(e){var n;return n=$.extend(!0,{},e),n.weeks=n.weeks.filter(function(e){return e.date>=t[0]&&e.date<=t[1]}),n})},c=function(e){var t,n,r,i,s,o,a,c,u;for(c={},n=0,i=e.length;i>n;n++)for(t=e[n],a=t.weeks,r=0,s=a.length;s>r;r++)u=a[r],null==c[o=u.w]&&(c[o]={c:0,a:0,d:0}),c[u.w].c+=u.c,c[u.w].a+=u.a,c[u.w].d+=u.d;return d3.entries(c)},x=function(e){return e=h(e,[w,d]),e.forEach(function(e){var t,n,r,i,s,o,a;for(n=0,t=0,r=0,o=e.weeks,i=0,s=o.length;s>i;i++)a=o[i],n+=a.c,t+=a.a,r+=a.d;return e.c=n,e.a=t,e.d=r}),e.sort(function(e,t){return d3.descending(e[l],t[l])})},j=function(e,t,n){var r,i,s,o,c,u,h,m,p,v,b,y,$,j,x,k,C,S;return p=[20,50,20,30],m=p[0],u=p[1],h=p[2],c=p[3],j=a.width(),s=125,o=d3.max(e,function(e){return e.value[l]}),x=d3.time.scale().domain([t,n]).range([0,j-u-h]),C=d3.scale.linear().domain([0,o]).range([s,0]),S=d3.svg.axis().scale(C).orient("left").ticks(4).tickSize(-j+u+h).tickPadding(10).tickFormat(d3.formatSymbol),k=d3.svg.axis().scale(x),e.length<5&&k.ticks(e.length),r=d3.svg.area().interpolate("basis").x(function(e){return x(g(e.key))}).y0(function(e){return s}).y1(function(e){return C(e.value[l])}),d3.select("#contributors-master svg").remove(),$=d3.select("#contributors-master").data([e]).append("svg").attr("height",s+m+c).attr("width",j).attr("class","viz").append("g").attr("transform","translate("+u+","+m+")"),$.append("g").attr("class","x axis").attr("transform","translate(0, "+s+")").call(k),$.append("g").attr("class","y axis").call(S),$.append("path").attr("class","area").attr("d",r),y=function(){var e;return $.classed("selecting",!0),e=d3.event.target.extent(),a.trigger("range.selection.start",{data:arguments[0],range:e})},v=function(){var e;return e=d3.event.target.extent(),a.trigger("range.selection.selected",{data:arguments[0],range:e})},b=function(){var e;return $.classed("selecting",!d3.event.target.empty()),e=d3.event.target.extent(),a.trigger("range.selection.end",{data:arguments[0],range:e})},i=d3.svg.brush().x(x).on("brushstart",y).on("brush",v).on("brushend",b),(f(w)!==f(t)||f(d)!==f(n))&&i.extent([w,d]),$.append("g").attr("class","selection").call(i).selectAll("rect").attr("height",s)},y=function(){var t,n,r,s,c,h,f,m,p,g,v,b,y,j,k,C,S,L,A,T,q,_;return b=[10,10,10,20],g=b[0],m=b[1],p=b[2],f=b[3],S=parseInt(a.attr("data-graph-width")),r=100,$("#contributors ol").remove(),o=x(u),j=document.createElement("ol"),C=d3.select(j).attr("class","contrib-data capped-cards clearfix"),c=d3.max(o,function(e){return d3.max(e.weeks,function(e){return e[l]})}),L=d3.time.scale().domain([w,d]).range([0,S]),T=d3.scale.linear().domain([0,c]).range([r-f-g,0]),n=d3.svg.area().interpolate("basis").x(function(e){return L(e.date)}).y0(function(e){return r-f-g}).y1(function(e){return T(e[l])}),q=d3.svg.axis().scale(T).orient("left").ticks(2).tickSize(-S).tickPadding(10).tickFormat(d3.formatSymbol),A=d3.svg.axis().scale(L),o[0].weeks.length<5&&A.ticks(o[0].weeks.length).tickFormat(d3.time.format("%x")),$("li.capped-card").remove(),v=C.selectAll("li.capped-card").data(o).enter().append("li").attr("class","capped-card").style("display",function(e){return e[l]<1?"none":"block"}),s=v.append("h3"),s.append("img").attr("src",function(e){return e.author.avatar}).attr("class","avatar").attr("alt",""),s.append("span").attr("class","rank").text(function(e,t){return"#"+(t+1)}),s.append("a").attr("class","aname").attr("href",function(e){return"/"+e.author.login}).text(function(e){return e.author.login}),t=s.append("span").attr("class","ameta"),y=$(".graphs").attr("data-repo-url"),t.append("span").attr("class","cmeta").html(function(t){var n,r,s,o,a,c;return n=y+"/commits?author="+t.author.login,c=e(t.c)+" "+i(t.c,"commit"),a=$("<a>",{href:n,"class":"cmt",text:c}),s=$("<span>",{"class":"a",text:e(t.a)+" ++"}),o=$("<span>",{"class":"d",text:e(t.d)+" --"}),r=" / ",$("<div>").append([a,r,s,r,o]).html()}),k=v.append("svg").attr("width",S+(m+p)).attr("height",r+g+f).attr("class","capped-card-content").append("g").attr("transform","translate("+m+","+g+")"),h=A.ticks()[0],k.append("g").attr("class","x axis").classed("dense",h>=10).attr("transform","translate(0, "+(r-g-f)+")").call(A).selectAll(".tick text").style("display",function(e,t){return t%2!==0?"none":"block"}),k.select(".x.dense text").attr("dx",7),_=k.append("g").attr("class","y axis").call(q).selectAll(".y.axis g text").attr("dx",S/2).style("display",function(e,t){return 0===t?"none":"block"}).classed("midlabel",!0),k.append("path").attr("d",function(e){return n(e.weeks)}),document.querySelector("#contributors").appendChild(j)},k=function(){var e,t;return $.support.pjax?(e=document.location,l=$("input[name=ctype]:checked").prop("value").toLowerCase(),t=e.pathname+"?from="+f(w)+"&to="+f(d)+"&type="+l,window.history.pushState(null,null,t)):void 0},m=function(e){return l!==$(this).val()?(k(),b(u)):void 0},u=v(o),b(o)})}.call(this),function(){var e,t,n,r,i,s,o;n=function(e){var t;return(t=d3.format(","))(e)},t={top:20,right:40,bottom:30,left:40},o=980-t.left-t.right,e=150-t.top-t.bottom,s=function(e,t){return 0>e?t.classList.add("is-decrease"):e>0&&t.classList.add("is-increase"),t.querySelector(".js-change-num").textContent=n(Math.abs(e))},r=function(e,t){return 0>e?(t.classList.add("is-decrease"),t.querySelector(".js-change-num").textContent=n(Math.abs(e))+"% decrease"):e>0?(t.classList.add("is-increase"),t.querySelector(".js-change-num").textContent=n(Math.abs(e))+"% increase"):0===e?t.querySelector(".js-change-num").textContent=n(Math.abs(e))+"% increase":void 0},i=function(i,a){var c,u,l,d,h,f,m,p,g,v,b,y,$,j,w,x,k,C,S,L,A,T,q,_,E,D,P,I;if(a&&null==a.error){for(h=a.counts,d=a.summary.columns,S=new Date(1e3*a.summary.starting),m=new Date(1e3*a.summary.ending),x=a.summary.model,k=a.summary.period,w=d3.max(d3.merge(d3.values(h)),function(e){return e.count}),j=d3.time.format("%A, %B %-d, %Y"),p=d3.time.format("%-I%p"),u=d3.bisector(function(e){return e.date}).left,g=0,b=d.length;b>g;g++)l=d[g],document.querySelector(".js-"+x+"-"+l+" .js-total").textContent=n(a.summary.totals[l]),s(a.summary.total_changes[l],document.querySelector(".js-"+x+"-"+l+" .js-total-change")),r(a.summary.percent_changes[l],document.querySelector(".js-"+x+"-"+l+" .js-percentage-change"));if(0===d3.values(a.summary.totals).filter(function(e){return 0!==e}).length)return this.closest(".js-dashboards-overview-card").classList.add("is-no-activity");for(T=d3.tip().attr("class","svg-tip total-unique comparison").offset([-10,0]).html(function(e){var t,r,i,s,o,c;for(c="",t=function(){switch(k){case"year":return"Week of "+j(e.date);case"week":return j(e.date)+" starting at "+p(e.date);default:return j(e.date)}}(),o=270/a.summary.columns.length,s=a.summary.columns,r=0,i=s.length;i>r;r++)l=s[r],c+="<li class='totals "+l+"' style='width:"+o+"px'> <strong>"+n(e[l])+"</strong> "+l.split("_at")[0]+" </li>";return"<span class='title'>"+t+"</span> <ul> "+c+" </ul>"}),C=function(){var e,t,n,r,i,s,o,a,c,f;for(c={},f=_.invert(d3.mouse(this)[0]),i=d[0],s=u(h[i],f,1),t=h[i][s-1],n=h[i][s],e=n&&f-t.date>n.date-f?s:s-1,c.date=h[i][e].date,o=0,a=d.length;a>o;o++)l=d[o],c[l]=h[l][e].count;return r=q.selectAll("g.dots circle").filter(function(e){return e.date===c.date}),T.show.call(this,c,r[0][0])},v=0,y=d.length;y>v;v++)l=d[v],h[l].forEach(function(e){return e.date=new Date(1e3*e.bucket)}),h[l]=h[l].filter(function(e){return e.date<new Date});return _=d3.time.scale().range([0,o]),D=d3.scale.linear().range([e,0]),P=d3.scale.linear().range([e,0]),L=1,A=function(){switch(k){case"year":return d3.time.months;case"week":return L=8,d3.time.hours;default:return L=2,d3.time.days}}(),E=d3.svg.axis().scale(_).tickSize(e+5).tickPadding(10).ticks(A,L).orient("bottom"),I=d3.svg.axis().scale(D).ticks(3).tickFormat(d3.formatSymbol).orient("left"),$=d3.svg.line().x(function(e){return _(e.date)}).y(function(e){return D(e.count)}),q=d3.select(this).append("svg").attr("width",o+t.left+t.right).attr("height",e+t.top+t.bottom).attr("class","vis").append("g").attr("transform","translate("+t.left+","+t.top+")").call(T),_.domain([S,m]),D.domain([0,w]),q.append("g").attr("class","x axis").call(E).selectAll("text").attr("text-anchor","middle"),q.append("g").attr("class","y axis").call(I),c=d3.values(h),q.selectAll("path.path").data(c).enter().append("path").attr("class",function(e,t){return"path total "+e[0].column}).attr("d",function(e){return $(e)}),f=q.selectAll("g.dots").data(c).enter().append("g").attr("class",function(e,t){return"dots totals "+e[0].column}),f.each(function(e,t){var n;return n=d3.select(this),n.selectAll("circle").data(function(e){return h[e[0].column]}).enter().append("circle").attr("cx",function(e){return _(e.date)}).attr("cy",function(e){return D(e.count)}).attr("r",4)}),I.orient("right"),q.append("g").attr("class","y axis unique").attr("transform","translate("+o+", 0)").call(I),q.append("rect").attr("class","overlay").attr("width",o).attr("height",e).on("mousemove",C).on("mouseout",function(e){return setTimeout(T.hide,500)})}},$(document).on("graph:load",".js-dashboards-overview-graph",i)}.call(this),function(){var e,t,n,r;t=require("github/fetch").fetchPoll,e={},r=function(e){return e.json()},$.observe(".js-graph",n=function(n){var i,s,o,a;(a=n.getAttribute("data-url"))&&($(n).find("svg").remove(),o=null!=e[a]?e[a]:e[a]=t(a,{headers:{accept:"application/json"}}).then(r),n.classList.add("is-graph-loading"),n.classList.remove("is-graph-load-error","is-graph-empty"),i=function(e){var t,r,i;return n.classList.remove("is-graph-loading"),(null!=e?e.unusable:void 0)?n.classList.add("is-graph-without-usable-data"):0===(null!=e?e.length:void 0)||0===(null!=e&&null!=(t=e.summary)?t.total:void 0)||0===(null!=(r=e[0])&&null!=(i=r.weeks)?i.length:void 0)?n.classList.add("is-graph-empty"):d3Ready().then(function(){return $(n).trigger("graph:load",[e])})},s=function(){return n.classList.remove("is-graph-loading"),n.classList.add("is-graph-load-error")},o.then(i,s))})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u,l=function(e,t){return function(){return e.apply(t,arguments)}};c=require("github/fetch"),o=c.fetchJSON,a=c.fetchPoll,r=function(){function r(e,t,n){this.container=e,this.width=t,this.height=n,this.initError=l(this.initError,this),this.init=l(this.init,this),this.loaderInterval=null,this.loaderOffset=0,this.ctx=this.initCanvas(this.container,this.width,this.height),this.startLoader("Loading graph data"),this.loadMeta()}return r.prototype.initCanvas=function(e,t,n){var r,i,s,o,a,c,u;return o=e.getElementsByTagName("canvas")[0],o.style.zIndex="0",s=o.width,i=o.height,a=o.getContext("2d"),c=window.devicePixelRatio||1,r=a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1,u=c/r,1===u?a:(o.width=s*u,o.height=i*u,o.style.width=s+"px",o.style.height=i+"px",a.scale(u,u),a)},r.prototype.startLoader=function(e){return this.ctx.save(),this.ctx.font="14px 'Helvetica Neue', Arial, sans-serif",this.ctx.fillStyle="#cacaca",this.ctx.textAlign="center",this.ctx.fillText(e,this.width/2,155),this.ctx.restore(),this.displayLoader()},r.prototype.stopLoader=function(){var e;return e=this.container.querySelector(".large-loading-area"),e.classList.add("is-hidden")},r.prototype.displayLoader=function(){var e;return e=this.container.querySelector(".large-loading-area"),e.classList.remove("is-hidden")},r.prototype.loadMeta=function(){var e,t;return e=function(e){return e.json()},t=this.container.getAttribute("data-network-graph-meta-url"),a(t,{headers:{accept:"application/json"}}).then(e,this.initError).then(this.init)},r.prototype.init=function(r){var o,a,c,l,d,h;if(u){for(this.focus=r.focus,this.nethash=r.nethash,
this.spaceMap=r.spacemap,this.userBlocks=r.blocks,this.commits=function(){var t,n,i,s;for(i=r.dates,s=[],c=t=0,n=i.length;n>t;c=++t)o=i[c],s.push(new e(c,o));return s}(),this.users={},d=r.users,a=0,l=d.length;l>a;a++)h=d[a],this.users[h.name]=h;return this.chrome=new i(this,this.ctx,this.width,this.height,this.focus,this.commits,this.userBlocks,this.users),this.graph=new s(this,this.ctx,this.width,this.height,this.focus,this.commits,this.users,this.spaceMap,this.userBlocks,this.nethash),this.mouseDriver=new n(this.container,this.chrome,this.graph),this.keyDriver=new t(this.chrome,this.graph),this.stopLoader(),this.graph.drawBackground(),this.chrome.draw(),this.graph.requestInitialChunk()}},r.prototype.initError=function(){return this.stopLoader(),this.ctx.clearRect(0,0,this.width,this.height),this.startLoader("Graph could not be drawn due to a network problem.")},r}(),e=function(){function e(e,t){this.time=e,this.date=new Date(t),this.requested=null,this.populated=null}return e.prototype.populate=function(e,t,n){return this.user=t,this.author=e.author,this.date=new Date(e.date.replace(" ","T")),this.gravatar=e.gravatar,this.id=e.id,this.login=e.login,this.message=e.message,this.space=e.space,this.time=e.time,this.parents=this.populateParents(e.parents,n),this.requested=!0,this.populated=new Date},e.prototype.populateParents=function(e,t){var n,r,i;return i=function(){var i,s,o;for(o=[],i=0,s=e.length;s>i;i++)n=e[i],r=t[n[1]],r.id=n[0],r.space=n[2],o.push(r);return o}()},e}(),i=function(){function e(e,t,n,r,i,s,o,a){this.network=e,this.ctx=t,this.width=n,this.height=r,this.focus=i,this.commits=s,this.userBlocks=o,this.users=a,this.namesWidth=120,this.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],this.userBgColors=["#fff","#f7f7f7"],this.headerColor="#f7f7f7",this.dividerColor="#ddd",this.headerHeight=40,this.dateRowHeight=30,this.graphTopOffset=10+this.headerHeight+this.dateRowHeight,this.nameLineHeight=24,this.offsetX=this.namesWidth+(this.width-this.namesWidth)/2-this.focus*this.nameLineHeight,this.offsetY=0,this.contentHeight=this.calcContentHeight(),this.graphMidpoint=this.namesWidth+(this.width-this.namesWidth)/2,this.activeUser=null}return e.prototype.moveX=function(e){return this.offsetX+=e,this.offsetX>this.graphMidpoint?this.offsetX=this.graphMidpoint:this.offsetX<this.graphMidpoint-this.commits.length*this.nameLineHeight?this.offsetX=this.graphMidpoint-this.commits.length*this.nameLineHeight:void 0},e.prototype.moveY=function(e){return this.offsetY+=e,this.offsetY>0||this.contentHeight<this.height-this.graphTopOffset?this.offsetY=0:this.offsetY<-this.contentHeight+this.height/2?this.offsetY=-this.contentHeight+this.height/2:void 0},e.prototype.calcContentHeight=function(){var e,t,n,r,i;for(t=0,i=this.userBlocks,n=0,r=i.length;r>n;n++)e=i[n],t+=e.count;return t*this.nameLineHeight},e.prototype.hover=function(e,t){var n,r,i,s;for(s=this.userBlocks,r=0,i=s.length;i>r;r++)if(n=s[r],e>0&&e<this.namesWidth&&t>this.graphTopOffset+this.offsetY+n.start*this.nameLineHeight&&t<this.graphTopOffset+this.offsetY+(n.start+n.count)*this.nameLineHeight)return this.users[n.name];return null},e.prototype.draw=function(){return this.drawTimeline(this.ctx),this.drawUsers(this.ctx)},e.prototype.drawTimeline=function(e){var t,n,r,i,s,o,a,c,u,l,d,h,f;for(e.fillStyle=this.headerColor,e.fillRect(0,0,this.width,this.headerHeight),e.fillStyle=this.dividerColor,e.fillRect(0,this.headerHeight-1,this.width,1),u=parseInt((0-this.offsetX)/this.nameLineHeight),0>u&&(u=0),c=u+parseInt(this.width/(this.nameLineHeight-1)),c>this.commits.length&&(c=this.commits.length),e.save(),e.translate(this.offsetX,0),a=null,o=null,s=i=h=u,f=c;f>=h?f>i:i>f;s=f>=h?++i:--i)t=this.commits[s],l=this.months[t.date.getMonth()],l!==a&&(e.font="bold 12px 'Helvetica Neue', Arial, sans-serif",e.fillStyle="#555",d=this.ctx.measureText(l).width,e.fillText(l,s*this.nameLineHeight-d/2,this.headerHeight/2+4),a=l),r=t.date.getDate(),r!==o&&(e.font="12px 'Helvetica Neue', Arial, sans-serif",e.fillStyle="#555",n=this.ctx.measureText(r).width,e.fillText(r,s*this.nameLineHeight-n/2,this.headerHeight+this.dateRowHeight/2+3),o=r,e.fillStyle="#ddd",e.fillRect(s*this.nameLineHeight,this.headerHeight,1,6));return e.restore()},e.prototype.drawUsers=function(e){var t,n,r,i,s,o,a;for(e.fillStyle="#fff",e.fillRect(0,0,this.namesWidth,this.height),e.save(),e.translate(0,this.headerHeight+this.dateRowHeight+this.offsetY),o=this.userBlocks,r=n=0,i=o.length;i>n;r=++n)t=o[r],e.fillStyle=this.userBgColors[r%2],e.fillRect(0,t.start*this.nameLineHeight,this.namesWidth,t.count*this.nameLineHeight),this.activeUser&&this.activeUser.name===t.name&&(e.fillStyle="rgba(0, 0, 0, 0.05)",e.fillRect(0,t.start*this.nameLineHeight,this.namesWidth,t.count*this.nameLineHeight)),s=(t.start+t.count/2)*this.nameLineHeight+3,e.fillStyle="rgba(0, 0, 0, 0.1)",e.fillRect(0,t.start*this.nameLineHeight+t.count*this.nameLineHeight-1,this.namesWidth,1),e.fillStyle="#333",e.font="13px 'Helvetica Neue', Arial, sans-serif",e.textAlign="center",e.fillText(t.name,this.namesWidth/2,s,96);return e.restore(),e.fillStyle=this.headerColor,e.fillRect(0,0,this.namesWidth,this.headerHeight),e.fillStyle="#777",e.font="12px 'Helvetica Neue', Arial, sans-serif",e.fillText("Owners",40,this.headerHeight/2+3),a=10,e.fillStyle=this.dividerColor,e.fillRect(this.namesWidth-1,a,1,this.headerHeight-2*a),e.fillStyle=this.dividerColor,e.fillRect(0,this.headerHeight-1,this.namesWidth,1),e.fillStyle=this.dividerColor,e.fillRect(this.namesWidth-1,this.headerHeight,1,this.height-this.headerHeight)},e}(),s=function(){function e(e,t,n,r,i,s,o,a,c,u){var l,d,h,f,m,p,g,v,b,y,$,j,w,x,k,C,S;for(this.network=e,this.ctx=t,this.width=n,this.height=r,this.focus=i,this.commits=s,this.users=o,this.spaceMap=a,this.userBlocks=c,this.nethash=u,this.namesWidth=120,this.headerHeight=40,this.dateRowHeight=30,this.graphTopOffset=10+this.headerHeight+this.dateRowHeight,this.bgColors=["#fff","#f9f9f9"],this.nameLineHeight=24,this.spaceColors=["#c0392b","#3498db","#2ecc71","#8e44ad","#f1c40f","#e67e22","#34495e","#e74c3c","#2980b9","#1abc9c","#9b59b6","#f39c12","#7f8c8d","#2c3e50","#d35400","#e74c3c","#95a5a6","#bdc3c7","#16a085","#27ae60"],this.offsetX=this.namesWidth+(this.width-this.namesWidth)/2-this.focus*this.nameLineHeight,this.offsetY=0,this.bgCycle=0,this.marginMap={},this.gravatars={},this.activeCommit=null,this.contentHeight=this.calcContentHeight(),this.graphMidpoint=this.namesWidth+(this.width-this.namesWidth)/2,this.showRefs=!0,this.lastHotLoadCenterIndex=null,this.connectionMap={},this.spaceUserMap={},j=this.userBlocks,f=0,g=j.length;g>f;f++)for(l=j[f],m=p=w=l.start,x=l.start+l.count;x>=w?x>p:p>x;m=x>=w?++p:--p)this.spaceUserMap[m]=this.users[l.name];for(this.headsMap={},k=this.userBlocks,y=0,v=k.length;v>y;y++)for(l=k[y],S=this.users[l.name],C=S.heads,$=0,b=C.length;b>$;$++)d=C[$],this.headsMap[d.id]||(this.headsMap[d.id]=[]),h={name:S.name,head:d},this.headsMap[d.id].push(h)}return e.prototype.moveX=function(e){return this.offsetX+=e,this.offsetX>this.graphMidpoint?this.offsetX=this.graphMidpoint:this.offsetX<this.graphMidpoint-this.commits.length*this.nameLineHeight&&(this.offsetX=this.graphMidpoint-this.commits.length*this.nameLineHeight),this.hotLoadCommits()},e.prototype.moveY=function(e){return this.offsetY+=e,this.offsetY>0||this.contentHeight<this.height-this.graphTopOffset?this.offsetY=0:this.offsetY<-this.contentHeight+this.height/2?this.offsetY=-this.contentHeight+this.height/2:void 0},e.prototype.toggleRefs=function(){return this.showRefs=!this.showRefs},e.prototype.calcContentHeight=function(){var e,t,n,r,i;for(t=0,i=this.userBlocks,n=0,r=i.length;r>n;n++)e=i[n],t+=e.count;return t*this.nameLineHeight},e.prototype.hover=function(e,t){var n,r,i,s,o,a,c,u;for(u=this.timeWindow(),i=r=s=u.min,o=u.max;o>=s?o>=r:r>=o;i=o>=s?++r:--r)if(n=this.commits[i],a=this.offsetX+n.time*this.nameLineHeight,c=this.offsetY+this.graphTopOffset+n.space*this.nameLineHeight,e>a-5&&a+5>e&&t>c-5&&c+5>t)return n;return null},e.prototype.hotLoadCommits=function(){var e,t,n,r,i,s;return i=200,t=parseInt((-this.offsetX+this.graphMidpoint)/this.nameLineHeight),0>t&&(t=0),t>this.commits.length-1&&(t=this.commits.length-1),this.lastHotLoadCenterIndex&&Math.abs(this.lastHotLoadCenterIndex-t)<10?void 0:(this.lastHotLoadCenterIndex=t,e=this.backSpan(t,i),r=this.frontSpan(t,i),e||r?(s=e?e[0]:r[0],n=r?r[1]:e[1],this.requestChunk(s,n)):void 0)},e.prototype.backSpan=function(e,t){var n,r,i,s,o,a,c,u;for(s=null,r=n=c=e;(0>=c?0>=n:n>=0)&&r>e-t;r=0>=c?++n:--n)if(!this.commits[r].requested){s=r;break}if(null!==s){for(o=null,a=null,r=i=u=s;(0>=u?0>=i:i>=0)&&r>s-t;r=0>=u?++i:--i)if(this.commits[r].requested){o=r;break}return o?a=o+1:(a=s-t,0>a&&(a=0)),[a,s]}return null},e.prototype.frontSpan=function(e,t){var n,r,i,s,o,a,c,u,l,d;for(u=null,r=n=s=e,o=this.commits.length;(o>=s?o>n:n>o)&&e+t>r;r=o>=s?++n:--n)if(!this.commits[r].requested){u=r;break}if(null!==u){for(l=null,d=null,r=i=a=u,c=this.commits.length;(c>=a?c>i:i>c)&&u+t>r;r=c>=a?++i:--i)if(this.commits[r].requested){l=r;break}return d=l?l-1:u+t>=this.commits.length?this.commits.length-1:u+t,[u,d]}return null},e.prototype.chunkUrl=function(){return document.querySelector(".js-network-graph-container").getAttribute("data-network-graph-chunk-url")},e.prototype.requestInitialChunk=function(){var e;if(u)return e=this.chunkUrl()+"?"+$.param({nethash:this.nethash}),o(e).then(function(e){return function(t){return e.importChunk(t),e.draw(),e.network.chrome.draw()}}(this))},e.prototype.requestChunk=function(e,t){var n,r,i,s,a;if(u){for(r=n=i=e,s=t;s>=i?s>=n:n>=s;r=s>=i?++n:--n)this.commits[r].requested=new Date;return a=this.chunkUrl()+"?"+$.param({nethash:this.nethash,start:e,end:t}),o(a).then(function(e){return function(t){return e.importChunk(t),e.draw(),e.network.chrome.draw(),e.lastHotLoadCenterIndex=e.focus}}(this))}},e.prototype.importChunk=function(e){var t,n,r,i,s,o,a,c,u;if(e.commits){for(a=e.commits,c=[],r=0,s=a.length;s>r;r++)t=a[r],u=this.spaceUserMap[t.space],n=this.commits[t.time],n.populate(t,u,this.commits),c.push(function(){var e,t,r,s;for(r=n.parents,s=[],e=0,t=r.length;t>e;e++)o=r[e],s.push(function(){var e,t,r,s;for(s=[],i=e=t=o.time+1,r=n.time;r>=t?r>e:e>r;i=r>=t?++e:--e)this.connectionMap[i]=this.connectionMap[i]||[],s.push(this.connectionMap[i].push(n));return s}.call(this));return s}.call(this));return c}},e.prototype.timeWindow=function(){var e,t;return t=parseInt((this.namesWidth-this.offsetX+this.nameLineHeight)/this.nameLineHeight),0>t&&(t=0),e=t+parseInt((this.width-this.namesWidth)/this.nameLineHeight),e>this.commits.length-1&&(e=this.commits.length-1),{min:t,max:e}},e.prototype.draw=function(){var e,t,n,r,i,s,o,a,c,u,l,d,h,f,m,p,g,v,b,y,$,j,w,x,k,C,S,L,A,T,q,_,E,D,P,I;for(this.drawBackground(),I=this.timeWindow(),g=I.min,p=I.max,this.ctx.save(),this.ctx.translate(this.offsetX,this.offsetY+this.graphTopOffset),r={},x=this.spaceMap,a=o=0,l=x.length;l>o;a=++o)for(e=x[a],D=this.spaceMap.length-a-1,c=u=C=g,S=p;S>=C?S>=u:u>=S;c=S>=C?++u:--u)t=this.commits[c],t.populated&&t.space===D&&(this.drawConnection(t),r[t.id]=!0);for(a=m=L=g,A=p;A>=L?A>=m:m>=A;a=A>=L?++m:--m)if(n=this.connectionMap[a])for(v=0,d=n.length;d>v;v++)t=n[v],r[t.id]||(this.drawConnection(t),r[t.id]=!0);for(T=this.spaceMap,a=y=0,h=T.length;h>y;a=++y)for(e=T[a],D=this.spaceMap.length-a-1,c=j=q=g,_=p;_>=q?_>=j:j>=_;c=_>=q?++j:--j)t=this.commits[c],t.populated&&t.space===D&&(t===this.activeCommit?this.drawActiveCommit(t):this.drawCommit(t));if(this.showRefs)for(c=w=E=g,k=p;k>=E?k>=w:w>=k;c=k>=E?++w:--w)if(t=this.commits[c],t.populated&&(s=this.headsMap[t.id]))for($=0,P=0,f=s.length;f>P;P++)i=s[P],this.spaceUserMap[t.space].name===i.name&&(b=this.drawHead(t,i.head,$),$+=b);return this.ctx.restore(),this.activeCommit?this.drawCommitInfo(this.activeCommit):void 0},e.prototype.drawBackground=function(){var e,t,n,r,i;for(this.ctx.clearRect(0,0,this.width,this.height),this.ctx.save(),this.ctx.translate(0,this.offsetY+this.graphTopOffset),this.ctx.clearRect(0,-10,this.width,this.height),i=this.userBlocks,n=t=0,r=i.length;r>t;n=++t)e=i[n],this.ctx.fillStyle=this.bgColors[n%2],this.ctx.fillRect(0,e.start*this.nameLineHeight-10,this.width,e.count*this.nameLineHeight),this.ctx.fillStyle="#DDDDDD",this.ctx.fillRect(0,(e.start+e.count)*this.nameLineHeight-11,this.width,1);return this.ctx.restore()},e.prototype.drawCommit=function(e){var t,n;return t=e.time*this.nameLineHeight,n=e.space*this.nameLineHeight,this.ctx.beginPath(),this.ctx.arc(t,n,3,0,2*Math.PI,!1),this.ctx.fillStyle=this.spaceColor(e.space),this.ctx.fill()},e.prototype.drawActiveCommit=function(e){var t,n;return t=e.time*this.nameLineHeight,n=e.space*this.nameLineHeight,this.ctx.beginPath(),this.ctx.arc(t,n,6,0,2*Math.PI,!1),this.ctx.fillStyle=this.spaceColor(e.space),this.ctx.fill()},e.prototype.drawCommitInfo=function(e){var t,n,r,i,s,o,a,c,u,l;return t=3,n=340,l=56,u=e.message?this.splitLines(e.message,48):[],o=Math.max(l,38+16*u.length),r=this.offsetX+e.time*this.nameLineHeight,i=this.graphTopOffset+this.offsetY+e.space*this.nameLineHeight,a=0,c=0,a=r<this.graphMidpoint?r+10:r-(n+10),c=i<40+(this.height-40)/2?i+10:i-o-10,this.ctx.save(),this.ctx.translate(a,c),this.ctx.fillStyle="#fff",this.ctx.strokeStyle="rgba(0, 0, 0, 0.2)",this.ctx.lineWidth=1,this.roundRect(0,0,n,o,t),s=this.gravatars[e.gravatar],s?this.drawGravatar(s,10,10):(s=new Image,s.src=e.gravatar,s.onload=function(t){return function(){return t.activeCommit===e?(t.drawGravatar(s,a+10,c+10),t.gravatars[e.gravatar]=s):void 0}}(this)),this.ctx.fillStyle="#000",this.ctx.font="bold 12px 'Helvetica Neue', Arial, sans-serif",this.ctx.fillText(e.author,55,24),this.ctx.fillStyle="#bbb",this.ctx.font="11px Consolas, Menlo, Courier, monospace",this.ctx.fillText(e.id.slice(0,7),280,24),this.drawMessage(u,55,41),this.ctx.restore()},e.prototype.drawGravatar=function(e,t,n){var r;return r=32,this.ctx.save(),this.ctx.fillStyle="#fff",this.ctx.strokeStyle="rgba(0, 0, 0, 0.0)",this.ctx.lineWidth=.1,this.roundRect(t+2,n+2,r,r,4),this.ctx.clip(),this.ctx.drawImage(e,t+2,n+2,r,r),this.ctx.restore()},e.prototype.roundRect=function(e,t,n,r,i){return this.ctx.beginPath(),this.ctx.moveTo(e,t+i),this.ctx.lineTo(e,t+r-i),this.ctx.quadraticCurveTo(e,t+r,e+i,t+r),this.ctx.lineTo(e+n-i,t+r),this.ctx.quadraticCurveTo(e+n,t+r,e+n,t+r-i),this.ctx.lineTo(e+n,t+i),this.ctx.quadraticCurveTo(e+n,t,e+n-i,t),this.ctx.lineTo(e+i,t),this.ctx.quadraticCurveTo(e,t,e,t+i),this.ctx.fill(),this.ctx.stroke()},e.prototype.drawMessage=function(e,t,n){var r,i,s,o,a;for(this.ctx.font="12px 'Helvetica Neue', Arial, sans-serif",this.ctx.fillStyle="#000000",a=[],i=r=0,s=e.length;s>r;i=++r)o=e[i],a.push(this.ctx.fillText(o,t,n+16*i));return a},e.prototype.splitLines=function(e,t){var n,r,i,s,o,a;for(a=e.split(" "),s=[],i="",n=0,r=a.length;r>n;n++)o=a[n],i.length+1+o.length<t?i=""===i?o:i+" "+o:(s.push(i),i=o);return s.push(i),s},e.prototype.drawHead=function(e,t,n){var r,i,s,o;return this.ctx.font="11px 'Helvetica Neue', Arial, sans-serif",this.ctx.save(),r=this.ctx.measureText(t.name).width,this.ctx.restore(),s=e.time*this.nameLineHeight,o=e.space*this.nameLineHeight+5+n,i=2.5,this.ctx.save(),this.ctx.translate(s,o-i),this.ctx.fillStyle="rgba(0, 0, 0, 0.8)",this.ctx.beginPath(),this.ctx.moveTo(0,i),this.ctx.lineTo(-4,10),this.ctx.quadraticCurveTo(-9,10,-9,15),this.ctx.lineTo(-9,15+r),this.ctx.quadraticCurveTo(-9,15+r+5,-4,15+r+5),this.ctx.lineTo(4,15+r+5),this.ctx.quadraticCurveTo(9,15+r+5,9,15+r),this.ctx.lineTo(9,15),this.ctx.quadraticCurveTo(9,10,4,10),this.ctx.lineTo(0,i),this.ctx.fill(),this.ctx.fillStyle="#fff",this.ctx.font="12px 'Helvetica Neue', Arial, sans-serif",this.ctx.textBaseline="middle",this.ctx.scale(.85,.85),this.ctx.rotate(Math.PI/2),this.ctx.fillText(t.name,19,-.5),this.ctx.restore(),r+this.nameLineHeight},e.prototype.drawConnection=function(e){var t,n,r,i,s,o;for(s=e.parents,o=[],n=t=0,r=s.length;r>t;n=++t)i=s[n],0===n?i.space===e.space?o.push(this.drawBasicConnection(i,e)):o.push(this.drawBranchConnection(i,e)):o.push(this.drawMergeConnection(i,e));return o},e.prototype.drawBasicConnection=function(e,t){var n;return n=this.spaceColor(t.space),this.ctx.strokeStyle=n,this.ctx.lineWidth=2,this.ctx.beginPath(),this.ctx.moveTo(e.time*this.nameLineHeight,t.space*this.nameLineHeight),this.ctx.lineTo(t.time*this.nameLineHeight,t.space*this.nameLineHeight),this.ctx.stroke()},e.prototype.drawBranchConnection=function(e,t){var n;return n=this.spaceColor(t.space),this.ctx.strokeStyle=n,this.ctx.lineWidth=2,this.ctx.beginPath(),this.ctx.moveTo(e.time*this.nameLineHeight,e.space*this.nameLineHeight),this.ctx.lineTo(e.time*this.nameLineHeight,t.space*this.nameLineHeight),this.ctx.lineTo(t.time*this.nameLineHeight-10,t.space*this.nameLineHeight),this.ctx.stroke(),this.threeClockArrow(n,t.time*this.nameLineHeight,t.space*this.nameLineHeight)},e.prototype.drawMergeConnection=function(e,t){var n,r,i;return n=this.spaceColor(e.space),this.ctx.strokeStyle=n,this.ctx.lineWidth=2,this.ctx.beginPath(),e.space>t.space?(this.ctx.moveTo(e.time*this.nameLineHeight,e.space*this.nameLineHeight),i=this.safePath(e.time,t.time,e.space),i?(this.ctx.lineTo(t.time*this.nameLineHeight-10,e.space*this.nameLineHeight),this.ctx.lineTo(t.time*this.nameLineHeight-10,t.space*this.nameLineHeight+15),this.ctx.lineTo(t.time*this.nameLineHeight-5.7,t.space*this.nameLineHeight+7.5),this.ctx.stroke(),this.oneClockArrow(n,t.time*this.nameLineHeight,t.space*this.nameLineHeight)):(r=this.closestMargin(e.time,t.time,e.space,-1),e.space===t.space+1&&e.space===r+1?(this.ctx.lineTo(e.time*this.nameLineHeight,r*this.nameLineHeight+10),this.ctx.lineTo(t.time*this.nameLineHeight-15,r*this.nameLineHeight+10),this.ctx.lineTo(t.time*this.nameLineHeight-9.5,r*this.nameLineHeight+7.7),this.ctx.stroke(),this.twoClockArrow(n,t.time*this.nameLineHeight,r*this.nameLineHeight),this.addMargin(e.time,t.time,r)):e.time+1===t.time?(r=this.closestMargin(e.time,t.time,t.space,0),this.ctx.lineTo(e.time*this.nameLineHeight,r*this.nameLineHeight+10),this.ctx.lineTo(t.time*this.nameLineHeight-15,r*this.nameLineHeight+10),this.ctx.lineTo(t.time*this.nameLineHeight-15,t.space*this.nameLineHeight+10),this.ctx.lineTo(t.time*this.nameLineHeight-9.5,t.space*this.nameLineHeight+7.7),this.ctx.stroke(),this.twoClockArrow(n,t.time*this.nameLineHeight,t.space*this.nameLineHeight),this.addMargin(e.time,t.time,r)):(this.ctx.lineTo(e.time*this.nameLineHeight+10,e.space*this.nameLineHeight-10),this.ctx.lineTo(e.time*this.nameLineHeight+10,r*this.nameLineHeight+10),this.ctx.lineTo(t.time*this.nameLineHeight-10,r*this.nameLineHeight+10),this.ctx.lineTo(t.time*this.nameLineHeight-10,t.space*this.nameLineHeight+15),this.ctx.lineTo(t.time*this.nameLineHeight-5.7,t.space*this.nameLineHeight+7.5),this.ctx.stroke(),this.oneClockArrow(n,t.time*this.nameLineHeight,t.space*this.nameLineHeight),this.addMargin(e.time,t.time,r)))):(r=this.closestMargin(e.time,t.time,t.space,-1),r<t.space?(this.ctx.moveTo(e.time*this.nameLineHeight,e.space*this.nameLineHeight),this.ctx.lineTo(e.time*this.nameLineHeight,r*this.nameLineHeight+10),this.ctx.lineTo(t.time*this.nameLineHeight-12.7,r*this.nameLineHeight+10),this.ctx.lineTo(t.time*this.nameLineHeight-12.7,t.space*this.nameLineHeight-10),this.ctx.lineTo(t.time*this.nameLineHeight-9.4,t.space*this.nameLineHeight-7.7),this.ctx.stroke(),this.fourClockArrow(n,t.time*this.nameLineHeight,t.space*this.nameLineHeight),this.addMargin(e.time,t.time,r)):(this.ctx.moveTo(e.time*this.nameLineHeight,e.space*this.nameLineHeight),this.ctx.lineTo(e.time*this.nameLineHeight,r*this.nameLineHeight+10),this.ctx.lineTo(t.time*this.nameLineHeight-12.7,r*this.nameLineHeight+10),this.ctx.lineTo(t.time*this.nameLineHeight-12.7,t.space*this.nameLineHeight+10),this.ctx.lineTo(t.time*this.nameLineHeight-9.4,t.space*this.nameLineHeight+7.7),this.ctx.stroke(),this.twoClockArrow(n,t.time*this.nameLineHeight,t.space*this.nameLineHeight),this.addMargin(e.time,t.time,r)))},e.prototype.addMargin=function(e,t,n){return this.marginMap[n]||(this.marginMap[n]=[]),this.marginMap[n].push([e,t])},e.prototype.oneClockArrow=function(e,t,n){return this.ctx.fillStyle=e,this.ctx.beginPath(),this.ctx.moveTo(t-3,n+10.5),this.ctx.lineTo(t-9,n+5.5),this.ctx.lineTo(t-2.6,n+3.5),this.ctx.fill()},e.prototype.twoClockArrow=function(e,t,n){return this.ctx.fillStyle=e,this.ctx.beginPath(),this.ctx.moveTo(t-12.4,n+6.6),this.ctx.lineTo(t-9.3,n+10.6),this.ctx.lineTo(t-3.2,n+2.4),this.ctx.fill()},e.prototype.threeClockArrow=function(e,t,n){return this.ctx.fillStyle=e,this.ctx.beginPath(),this.ctx.moveTo(t-10,n-3.5),this.ctx.lineTo(t-10,n+3.5),this.ctx.lineTo(t-4,n),this.ctx.fill()},e.prototype.fourClockArrow=function(e,t,n){return this.ctx.fillStyle=e,this.ctx.beginPath(),this.ctx.moveTo(t-12.4,n-6.6),this.ctx.lineTo(t-9.3,n-10.6),this.ctx.lineTo(t-3.2,n-2.4),this.ctx.fill()},e.prototype.safePath=function(e,t,n){var r,i,s,o;for(o=this.spaceMap[n],r=0,i=o.length;i>r;r++)if(s=o[r],this.timeInPath(e,s))return s[1]===t;return!1},e.prototype.closestMargin=function(e,t,n,r){var i,s,o,a,c;for(a=this.spaceMap.length,o=r,s=!1,i=!1,c=!1;!i||!s;){if(n+o>=0&&this.safeMargin(e,t,n+o))return n+o;0>n+o&&(s=!0),n+o>a&&(i=!0),c===!1&&0===o?(o=-1,c=!0):o=0>o?-o-1:-o-2}return n>0?n-1:0},e.prototype.safeMargin=function(e,t,n){var r,i,s,o;if(!this.marginMap[n])return!0;for(o=this.marginMap[n],r=0,i=o.length;i>r;r++)if(s=o[r],this.pathsCollide([e,t],s))return!1;return!0},e.prototype.pathsCollide=function(e,t){return this.timeWithinPath(e[0],t)||this.timeWithinPath(e[1],t)||this.timeWithinPath(t[0],e)||this.timeWithinPath(t[1],e)},e.prototype.timeInPath=function(e,t){return e>=t[0]&&e<=t[1]},e.prototype.timeWithinPath=function(e,t){return e>t[0]&&e<t[1]},e.prototype.spaceColor=function(e){return 0===e?"#000000":this.spaceColors[e%this.spaceColors.length]},e}(),n=function(){function e(e,t,n){this.chrome=t,this.graph=n,this.out=l(this.out,this),this.move=l(this.move,this),this.docmove=l(this.docmove,this),this.down=l(this.down,this),this.up=l(this.up,this),this.dragging=!1,this.lastPoint={x:0,y:0},this.lastHoverCommit=null,this.lastHoverUser=null,this.pressedCommit=null,this.pressedUser=null,this.canvas=e.getElementsByTagName("canvas")[0],this.canvasOffset=$(this.canvas).offset(),this.canvas.style.cursor="move",document.body.addEventListener("mouseup",this.up),document.body.addEventListener("mousemove",this.docmove),this.canvas.addEventListener("mousedown",this.down),this.canvas.addEventListener("mousemove",this.move),this.canvas.addEventListener("mouseout",this.out)}return e.prototype.up=function(e){return this.dragging=!1,this.pressedCommit&&this.graph.activeCommit===this.pressedCommit?window.open("/"+this.graph.activeCommit.user.name+"/"+this.graph.activeCommit.user.repo+"/commit/"+this.graph.activeCommit.id):this.pressedUser&&this.chrome.activeUser===this.pressedUser&&(window.location="/"+this.chrome.activeUser.name+"/"+this.chrome.activeUser.repo+"/network"),this.pressedCommit=null,this.pressedUser=null},e.prototype.down=function(e){return this.graph.activeCommit?this.pressedCommit=this.graph.activeCommit:this.chrome.activeUser?this.pressedUser=this.chrome.activeUser:this.dragging=!0},e.prototype.docmove=function(e){var t,n;return t=e.pageX,n=e.pageY,this.dragging&&(this.graph.moveX(t-this.lastPoint.x),this.graph.moveY(n-this.lastPoint.y),this.graph.draw(),this.chrome.moveX(t-this.lastPoint.x),this.chrome.moveY(n-this.lastPoint.y),this.chrome.draw()),this.lastPoint.x=t,this.lastPoint.y=n},e.prototype.move=function(e){var t,n,r,i;return r=e.pageX,i=e.pageY,this.dragging?(this.graph.moveX(r-this.lastPoint.x),this.graph.moveY(i-this.lastPoint.y),this.graph.draw(),this.chrome.moveX(r-this.lastPoint.x),this.chrome.moveY(i-this.lastPoint.y),this.chrome.draw()):(n=this.chrome.hover(r-this.canvasOffset.left,i-this.canvasOffset.top),n!==this.lastHoverUser?(this.canvas.style.cursor=n?"pointer":"move",this.chrome.activeUser=n,this.chrome.draw(),this.lastHoverUser=n):(t=this.graph.hover(r-this.canvasOffset.left,i-this.canvasOffset.top),t!==this.lastHoverCommit&&(this.canvas.style.cursor=t?"pointer":"move",this.graph.activeCommit=t,this.graph.draw(),this.chrome.draw(),this.lastHoverCommit=t))),this.lastPoint.x=r,this.lastPoint.y=i},e.prototype.out=function(e){return this.graph.activeCommit=null,this.chrome.activeUser=null,this.graph.draw(),this.chrome.draw(),this.lastHoverCommit=null,this.lastHoverUser=null},e}(),t=function(){function e(e,t){this.chrome=e,this.graph=t,this.down=l(this.down,this),this.dirty=!1,document.addEventListener("keydown",this.down)}return e.prototype.moveBothX=function(e){return this.graph.moveX(e),this.chrome.moveX(e),this.graph.activeCommit=null,this.dirty=!0},e.prototype.moveBothY=function(e){return this.graph.moveY(e),this.chrome.moveY(e),this.graph.activeCommit=null,this.dirty=!0},e.prototype.toggleRefs=function(){return this.graph.toggleRefs(),this.dirty=!0},e.prototype.redraw=function(){return this.dirty&&(this.graph.draw(),this.chrome.draw()),this.dirty=!1},e.prototype.down=function(e){if($(e.target).is("input"))return!0;if(e.shiftKey)switch(e.which){case 37:case 72:return this.moveBothX(999999),this.redraw();case 38:case 75:return this.moveBothY(999999),this.redraw();case 39:case 76:return this.moveBothX(-999999),this.redraw();case 40:case 74:return this.moveBothY(-999999),this.redraw()}else switch(e.which){case 37:case 72:return this.moveBothX(100),this.redraw();case 38:case 75:return this.moveBothY(30),this.redraw();case 39:case 76:return this.moveBothX(-100),this.redraw();case 40:case 74:return this.moveBothY(-30),this.redraw();case 84:return this.toggleRefs(),this.redraw()}},e}(),u=!1,$.observe(".js-network-graph-container",{add:function(){return u=!0,new r(this,980,600)},remove:function(){return u=!1}})}.call(this),function(){var e;e=require("github/inflector").pluralize,$(document).on("graph:load",".js-pulse-authors-graph",function(t,n){var r,i,s,o,a,c,u,l,d,h;return r=15,n=n.slice(0,+(r-1)+1||9e9),o={top:20,right:0,bottom:30,left:20},u=$(this).width()-o.left-o.right,s=$(this).height()-o.top-o.bottom,l=d3.scale.ordinal().domain(d3.range(r)).rangeRoundBands([0,u],.2),d=d3.scale.linear().domain([0,d3.max(n,function(e){return e.commits})]).range([s,0]),h=d3.svg.axis().scale(d).orient("left").ticks(3).tickSize(-u).tickFormat(function(e){return 1e3>e?e:d3.format(",s")(e)}),a=d3.tip().attr("class","svg-tip").offset([-10,0]).html(function(t){var n;return"<strong>"+t.commits+"</strong> "+e(t.commits,"commit")+" by <strong>"+(null!=(n=t.login)?n:t.name)+"</strong>"}),c=d3.select(this).append("svg").attr("width",u+o.left+o.right).attr("height",s+o.top+o.bottom).append("g").attr("transform","translate("+o.left+", "+o.top+")").call(a),c.append("g").attr("class","y axis").call(h),i=c.selectAll(".bar").data(n).enter().append("g").attr("class","bar").attr("transform",function(e,t){return"translate("+l(t)+", 0)"}),i.append("rect").attr("width",l.rangeBand()).attr("height",function(e,t){return s-d(e.commits)}).attr("y",function(e){return d(e.commits)}).on("mouseover",a.show).on("mouseout",a.hide),i.append("a").attr("xlink:href",function(e){return null!=e.login?"/"+e.login:void 0}).append("image").attr("y",s+5).attr("xlink:href",function(e){return e.gravatar}).attr("width",l.rangeBand()).attr("height",l.rangeBand())})}.call(this),function(){var e;e=require("github/inflector").pluralize,$(document).on("graph:load",".js-graph-punchcard",function(t,n){var r,i,s,o,a,c,u,l,d,h,f,m,p,g,v,b,y,j,w,x,k;return a=500,w=$(this).width(),h={},n.forEach(function(e){var t,n,r;return r=d3.weekdays[e[0]],t=null!=h[r]?h[r]:h[r]=[],n=e[1],null==t[n]&&(t[n]=0),t[n]+=e[2]}),n=d3.entries(h).reverse(),b=[0,0,0,20],g=b[0],m=b[1],p=b[2],f=b[3],u=100,i=d3.range(7),c=d3.range(24),d=d3.min(n,function(e){return d3.min(e.value)}),l=d3.max(n,function(e){return d3.max(e.value)}),x=d3.scale.ordinal().domain(c).rangeRoundBands([0,w-u-m-p],.1),k=d3.scale.ordinal().domain(i).rangeRoundBands([a-g-f,0],.1),v=d3.scale.sqrt().domain([0,l]).range([0,x.rangeBand()/2]),y=d3.tip().attr("class","svg-tip").offset([-10,0]).html(function(t){return"<strong>"+t+"</strong> "+e(t,"commit")}),j=d3.select(this).data(n).attr("width",w+"px").append("svg").attr("width",w+(m+p)).attr("height",a+g+f).attr("class","viz").append("g").attr("transform","translate("+m+","+g+")").call(y),s=j.selectAll("g.day").data(n).enter().append("g").attr("class","day").attr("transform",function(e,t){return"translate(0, "+k(t)+")"}),s.append("line").attr("x1",0).attr("y1",k.rangeBand()).attr("x2",w-m-p).attr("y2",k.rangeBand()).attr("class","axis"),s.append("text").attr("class","day-name").text(function(e,t){return e.key}).attr("dy",k.rangeBand()/2),j.append("g").selectAll("text.hour").data(c).enter().append("text").attr("text-anchor","middle").attr("transform",function(e,t){return"translate("+(x(t)+u)+", "+a+")"}).attr("class","label").text(function(e){var t;return t=e%12||12,0===e||12>e?t+"a":t+"p"}),o=s.selectAll(".hour").data(function(e){return e.value}).enter().append("g").attr("class","hour").attr("transform",function(e,t){return"translate("+(x(t)+u)+", 0)"}).attr("width",x.rangeBand()),o.append("line").attr("x1",0).attr("y1",function(e,t){return k.rangeBand()-(t%2===0?15:10)}).attr("x2",0).attr("y2",k.rangeBand()).attr("class",function(e,t){return t%2===0?"axis even":"axis odd"}),r=o.append("circle").attr("r",0).attr("cy",k.rangeBand()/2-5).attr("class",function(e){return"day"}).on("mouseover",y.show).on("mouseout",y.hide),r.transition().attr("r",v)})}.call(this),function(){var e,t,n,r,i,s;r=function(e){var t;return(t=d3.format(","))(e)},n={top:20,right:40,bottom:30,left:40},s=980-n.left-n.right,t=170-n.top-n.bottom,e=function(e,t){var n;return n=d3.time.format.utc("%A, %B %-d, %Y"),d3.tip().attr("class","svg-tip web-views comparison").offset([-10,0]).html(function(i){return"<span class='title'>"+n(i.date)+"</span> <ul class='web-views'> <li class='totals'><strong>"+r(i.total)+"</strong> "+e+"</li> <li class='uniques'><strong>"+r(i.unique)+"</strong> "+t+"</li> </ul>"})},i=function(e,i,o){var a,c,u,l,d,h,f,m,p,g,v,b,y,j,w,x,k,C,S,L,A,T,q,_,E,D;if(i&&null==i.error){for(T=d3.time.scale.utc().range([0,s]),_=d3.scale.linear().range([t,0]),E=d3.scale.linear().range([t,0]),b=d3.time.format.utc("%m/%d"),q=d3.svg.axis().scale(T).ticks(i.counts.length).tickSize(t+5).tickPadding(10).tickFormat(b).orient("bottom"),D=d3.svg.axis().scale(_).ticks(3).tickFormat(d3.formatSymbol).orient("left"),m=d3.svg.line().x(function(e){return T(e.key)}).y(function(e){return _(e.value)}),S=d3.select(this).select(".js-graph").append("svg").attr("width",s+n.left+n.right).attr("height",t+n.top+n.bottom).attr("class","vis").append("g").attr("transform","translate("+n.left+","+n.top+")").call(o),c=i.counts,c.forEach(function(e){return e.date=new Date(1e3*e.bucket)}),c.sort(function(e,t){return d3.ascending(e.date,t.date)}),a=d3.bisector(function(e){return e.date}).left,y=function(){var e,t,n,r,i,s;return s=T.invert(d3.mouse(this)[0]),i=a(c,s,1),t=c[i-1],n=c[i],t&&n?(e=s-t.date>n.date-s?n:t,r=S.selectAll("g.dots circle").filter(function(t){return t.key===e.date}),r=r[0],r.sort(function(e,t){return $(e).attr("cy")-$(t).attr("cy")}),o.show.call(this,e,r[0])):void 0},w=[],C=[],h=0,f=c.length;f>h;h++)d=c[h],w.push({key:d.date,value:d.total}),C.push({key:d.date,value:d.unique});return v=[w,C],p=d3.extent(c,function(e){return e.date}),j=p[0],l=p[1],g=d3.extent(w,function(e){return e.value}),A=g[0],L=g[1],x=d3.max(C,function(e){return e.value}),k=x+d3.median(C,function(e){return e.value}),T.domain([j,l]),_.domain([0,L]),E.domain([0,k]),$(this).find(".js-traffic-total").text(r(i.summary.total)),$(this).find(".js-traffic-uniques").text(r(i.summary.unique)),S.append("g").attr("class","x axis").call(q),S.append("g").attr("class","y axis views").call(D),S.selectAll("path.path").data(v).enter().append("path").attr("class",function(e,t){return"path "+(0===t?"total":"unique");
}).attr("d",function(e,t){return 0===t?m(e):m.y(function(e){return E(e.value)})(e)}),u=S.selectAll("g.dots").data(v).enter().append("g").attr("class",function(e,t){return 0===t?"dots totals":"dots uniques"}),u.each(function(e,t){var n;return n=d3.select(this),1===t&&(_=E),n.selectAll("circle").data(function(e,t){return e}).enter().append("circle").attr("cx",function(e){return T(e.key)}).attr("cy",function(e){return _(e.value)}).attr("r",4)}),D.scale(E).orient("right"),S.append("g").attr("class","y axis unique").attr("transform","translate("+s+", 0)").call(D),S.append("rect").attr("class","overlay").attr("width",s).attr("height",t).on("mousemove",y).on("mouseout",function(e){return setTimeout(o.hide,500)})}},$(document).on("graph:load","#js-visitors-graph",function(t,n){var r;return r=e("views","unique visitors"),$.observe("#js-visitors-graph .js-graph",{remove:r.hide}),i.apply(this,[t,n,r])}),$(document).on("graph:load","#js-clones-graph",function(t,n){var r;return r=e("clones","unique cloners"),$.observe("#js-clones-graph .js-graph",{remove:r.hide}),i.apply(this,[t,n,r])})}.call(this),function(){var e;e=function(){var e,t;t=$(this),e=t.find(":selected"),e.attr("data-already-member")?($(".js-account-membership-form").addClass("is-member"),$(".js-account-membership-form").removeClass("is-not-member")):($(".js-account-membership-form").removeClass("is-member"),$(".js-account-membership-form").addClass("is-not-member"))},$.observe(".js-account-membership",e),$(document).on("change",".js-account-membership",e)}.call(this),function(){var e,t,n,r,i,s,o,a,c,u;n=require("github/fetch").fetchPoll,c=null,o=300,a=[".",".","."],s=0,t=function(){return $(".js-audit-log-export-button").removeClass("disabled")},e=function(){return $(".js-audit-log-export-button").addClass("disabled")},i=function(){var t,n;return t=$(".js-audit-log-export-status"),t.data("oldText",t.text()),n=function(){var e;return e=a.slice(0,s).join(""),t.text("Exporting"+e),s>=3?s=0:s+=1},c=setInterval(n,o),e()},u=function(){var e;return t(),e=$(".js-audit-log-export-status"),e.text(e.data("oldText")),clearInterval(c),s=0},r=function(){return u(),$("#ajax-error-message").show(function(){return this.classList.add("visible")})},$(document).on("ajaxSend",".js-audit-log-export",i),$(document).on("ajaxError",".js-audit-log-export",r),$(document).on("ajaxSuccess",".js-audit-log-export",function(e,t,i,s){var o,a;return a=this,o=function(){return u(),window.location=s.export_url},n(s.job_url).then(o,r)}),$(document).on("navigation:open",".audit-search-form .js-suggester",function(e){return $(this).closest("form").submit()})}.call(this),function(){var e,t;$(document).on("submit",".js-find-coupon-form",function(e){var t,n;return t=e.target.action,n=$("#code").val(),window.location=t+"/"+encodeURIComponent(n),e.stopPropagation(),e.preventDefault()}),$(document).on("click",".js-choose-account",function(t){return $(".js-plan-row, .js-choose-plan").removeClass("selected"),$(".js-plan").val(""),$(".js-billing-section").addClass("has-removed-contents"),e($(this).closest(".js-account-row")),t.stopPropagation(),t.preventDefault()}),$(document).on("click",".js-choose-plan",function(e){return t($(this).closest(".js-plan-row")),e.stopPropagation(),e.preventDefault()}),$.observe(".js-plan-row.selected",{add:function(){return $(this).closest("form").find(".js-redeem-button").prop("disabled",$(this).hasClass("free-plan"))}}),e=function(e){var n,r,i,s;if(e.length)return i=e.attr("data-login"),s=e.attr("data-plan"),$(".js-account-row, .js-choose-account").removeClass("selected"),e.addClass("selected"),e.find(".js-choose-account").addClass("selected"),$(".js-account").val(i),$(".js-plan-section").removeClass("is-hidden"),$(".js-billing-plans").addClass("is-hidden"),r=$(".js-plans-for-"+i),r.removeClass("is-hidden"),n=$(".js-plan-row",r),t(1===n.length?n:$("[data-name='"+s+"']",r))},t=function(e){var t,n,r,i,s;if(e.length)return i=e.attr("data-name"),n=parseInt(e.attr("data-cost"),10),s=e.closest(".js-billing-plans"),r="true"===s.attr("data-has-billing"),t=s.attr("data-login"),$(".js-plan-row, .js-choose-plan").removeClass("selected"),e.addClass("selected"),e.find(".js-choose-plan").addClass("selected"),$(".js-plan").val(i),0===n||r?$(".js-billing-section").addClass("has-removed-contents"):$(".js-billing-section[data-login='"+t+"']").removeClass("has-removed-contents")},$(function(){return e($(".js-account-row.selected")),t($(".js-plan-row.selected"))})}.call(this),function(){$(document).on("change",".js-survey-select",function(){var e,t,n,r;return n=$(this)[0],t=$(this).closest(".js-survey-question-form"),e=t.find(".js-survey-other-text"),r=n.options[n.selectedIndex],r.classList.contains("js-survey-option-other")?(t.addClass("is-other-selected"),e.attr("required","required"),e.focus()):(e.removeAttr("required"),t.removeClass("is-other-selected"))}),$(document).on("change",".js-survey-radio",function(){var e,t,n;return e=$(this)[0],n=$(this).closest(".js-survey-question-form"),t=n.find(".js-survey-other-text"),e.classList.contains("js-survey-radio-other")?(n.addClass("is-other-selected"),t.attr("required","required"),t.focus()):(t.removeAttr("required"),n.removeClass("is-other-selected")),$(this).trigger("validation:field:change")})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u;i=function(e){var t,n,r,i,s;if(i=e.match(/\#?(?:L)(\d+)/gi)){for(s=[],t=0,n=i.length;n>t;t++)r=i[t],s.push(parseInt(r.replace(/\D/g,"")));return s}return[]},n=function(e){var t;return(t=e.match(/(file-.+?-)L\d+?/i))?t[1]:""},r=function(e){return{lineRange:i(e),anchorPrefix:n(e)}},e=function(e){var t,n;switch(n=e.lineRange,t=e.anchorPrefix,n.sort(c),n.length){case 1:return"#"+t+"L"+n[0];case 2:return"#"+t+"L"+n[0]+"-L"+n[1];default:return"#"}},c=function(e,t){return e-t},a=!1,t=function(e){var t,n,r,i,s;if(i=e.lineRange,t=e.anchorPrefix,r=$(".js-file-line"),r.length){if(r.css("background-color",""),1===i.length)return $("#"+t+"LC"+i[0]).css("background-color","#f8eec7");if(i.length>1){for(n=i[0],s=[];n<=i[1];)$("#"+t+"LC"+n).css("background-color","#f8eec7"),s.push(n++);return s}}},o=function(e){var n,i,s;return null==e&&(e=r(window.location.hash)),s=e.lineRange,n=e.anchorPrefix,t(e),!a&&(i=$("#"+n+"LC"+s[0])).length&&$(window).scrollTop(i.offset().top-.33*$(window).height()),a=!1},u=function(e,t){var n,r,i;return i="FORM"===e.nodeName?"action":"href",n=e.getAttribute(i),(r=n.indexOf("#"))>=0&&(n=n.substr(0,r)),n+=t,e.setAttribute(i,n)},$.hashChange(function(){var e,t,n,r,i,s;if(document.querySelector(".js-file-line-container")){for(setTimeout(o,0),t=window.location.hash,i=document.querySelectorAll(".js-update-url-with-hash"),s=[],n=0,r=i.length;r>n;n++)e=i[n],s.push(u(e,t));return s}}),s=function(e){var t,n;return a=!0,n=null!=(t=$(window).scrollTop())?t:0,e(),$(window).scrollTop(n)},$(document).on("mousedown",".js-line-number",function(t){var n,o;return n=r(this.id),t.shiftKey&&(o=i(window.location.hash),n.lineRange.unshift(o[0])),s(function(){return window.location.hash=e(n)}),!1}),$(document).on("submit",".js-jump-to-line-form",function(){var e,t;return e=this.querySelector(".js-jump-to-line-field"),(t=e.value.replace(/[^\d\-]/g,""))&&(window.location.hash="L"+t),$(document).trigger("close.facebox"),!1})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u,l,d,h,f,m,p,g,v,b,y;i=require("github/fetch").fetchText,c=function(e){var t,n,r;return n=e[0],t=n.querySelector(".js-blob-filename"),t?"."===(r=t.value)||".."===r||".git"===r?!1:/\S/.test(t.value):!0},e=function(e){var t;return t=e.querySelector(".js-blob-contents"),t?"true"===t.getAttribute("data-allow-unchanged")?!0:s(t):!0},d=function(e){var t;return t=e.querySelector(".js-new-filename-field"),s(t)},t=function(t){var n;return t=$(".js-blob-form"),n=t[0],t.find(".js-check-for-fork").is($.visible)?!1:c(t)?e(n)||d(n):!1},g=function(e){var t;return t=e.find(".js-blob-contents")[0],t?$(t).attr("data-allow-unchanged")?!0:s(t):!1},u=function(e){var t,n;return n=e[0],t=n.querySelector(".js-blob-contents"),s(t)||d(n)},n=null,r=function(e){var t;return t=$(e).attr("data-github-confirm-unload"),("yes"===t||"true"===t)&&(t=""),null==t&&(t="false"),"no"===t||"false"===t?null:function(){return t}},h=function(){var e;return e=$(".js-blob-form"),e[0]?(e.find(".js-blob-submit").prop("disabled",!t(e)),e.find(".js-blob-contents-changed").val(g(e)),n?u(e)?window.onbeforeunload=n:window.onbeforeunload=null:void 0):void 0},f=function(e){var t,n,r,i,s;for(i=e.querySelectorAll("input"),s=[],n=0,r=i.length;r>n;n++)t=i[n],"hidden"===t.getAttribute("type")&&t.getAttribute("class")&&(null==t.getAttribute("data-default-value")?s.push(t.setAttribute("data-default-value",t.value)):s.push(void 0));return s},s=function(e){return null==e?!0:"hidden"===e.type?e.value!==e.getAttribute("data-default-value"):e.value!==e.defaultValue},m=function(e){var t,n,r,i;return t=e.querySelector(".js-blob-contents"),r=e.querySelector(".js-new-filename-field"),n=e.querySelector(".js-blob-filename"),t&&r&&n&&(null!=(i=n.defaultValue)?i.length:void 0)?$(t).data("old-filename",r.value):void 0},$.observe(".js-blob-form",function(){f(this),m(this),h(),n=r(this),$(this).on("submit",function(){return window.onbeforeunload=null})}),$(document).on("change",".js-blob-contents",function(){return p($(".js-blob-filename")),h()}),$(document).on("click",".js-new-blob-submit",function(){return $(this).closest("form.js-new-blob-form").submit()}),$(document).onFocusedInput(".js-blob-filename",function(){return function(){return $(".js-blob-contents").attr("data-filename",$(this).val()),l($(this).val()),p($(this))}}),$(document).onFocusedInput(".js-breadcrumb-nav",function(){return function(){return y($(this)),p($(this))}}),$(document).onFocusedKeydown(".js-breadcrumb-nav",function(){return function(e){var t,n,r;return n=$(this).caretSelection(),r=[0,0],t=0===$(n).not(r).length&&0===$(r).not(n).length,t&&8===e.keyCode&&1!==$(this).parent().children(".separator").length&&(a($(this),!0),e.preventDefault()),p($(this))}}),p=function(e){return null!=e[0]&&(b(e),v(e)),h()},y=function(e){var t,n,r,i,s,c;for(r=[];e.val().split("/").length>1;)t=e.val(),i=t.split("/"),n=i[0],c=i.slice(1).join("/"),""===n||"."===n||".git"===n?(e.val(c),s=function(){return e.caret(0)},r.push(window.setTimeout(s,1))):".."===n?r.push(a(e)):r.push(o(e,n,c));return r},l=function(e){var t,n;return t=$(".js-gitignore-template"),n=$(".js-license-template"),/^(.+\/)?\.gitignore$/.test(e)?t.addClass("is-visible"):/^(.+\/)?(licen[sc]e|copying)($|\.)/i.test(e)?n.addClass("is-visible"):(t.removeClass("is-visible"),n.removeClass("is-visible"))},v=function(e){var t,n,r,i,o,a,c,u,l,d,h,f;return r=e.closest("form"),n=$(".js-blob-contents"),t=r.find(".js-new-blob-commit-summary"),c=e.val()?"Create "+e.val():"Create new file",h=n.data("old-filename"),u=$(".js-new-filename-field").val(),n.removeData("new-filename"),c=(null!=h?h.length:void 0)&&u!==h&&null!=e[0]?(n.data("new-filename",!0),o=s(n[0]),i=o?"Update and rename":"Rename",e.val().length&&u.length?(f=h.split("/"),l=u.split("/"),d=!0,a=f.length-1,f.forEach(function(e,t){return t!==a&&e!==l[t]?d=!1:void 0}),f.length===l.length&&d?i+" "+f[a]+" to "+l[a]:i+" "+h+" to "+u):i+" "+h):(null!=h?h.length:void 0)&&u===h?"Update "+e.val():c,t.attr("placeholder",c),$(".js-commit-message-fallback").val(c)},b=function(e){var t,n;return t=$(".breadcrumb").children("[itemscope]"),n="",t.each(function(){var e;return e=$(this),n=n+e.text()+"/"}),n+=e.val(),$(".js-new-filename-field").val(n)},a=function(e,t){var n,r;return null==t&&(t=!1),t||e.val(e.val().replace("../","")),r=function(){return e.caret(0)},1!==e.parent().children(".separator").length&&(e.prev().remove(),n=e.prev().children().children().html(),e.prev().remove(),t&&(e.val(""+n+e.val()),r=function(){return t?e.caret(n.length):void 0})),l(e.val()),window.setTimeout(r,1)},o=function(e,t,n){var r,i,s,o,a,c,u;return null==n&&(n=""),t=t.replace(/[^-.a-z_0-9]+/gi,"-"),t=t.replace(/^-+|-+$/g,""),t.length>0&&(u=e.parent().children(".js-repo-root, [itemtype]").children("a").last().attr("href"),u||(r=e.parent().children(".js-repo-root, [itemtype]").children("span").children("a").last(),i=r.attr("data-branch"),a=r.attr("href"),u=a+"/tree/"+i),s=$(".js-crumb-template").clone().removeClass("js-crumb-template"),s.find("a[itemscope]").attr("href",u+"/"+t),s.find("span").text(t),o=$(".js-crumb-separator").clone().removeClass("js-crumb-separator"),e.before(s,o)),e.val(n),l(e.val()),c=function(){return e.caret(0)},window.setTimeout(c,1)},$(document).onFocusedInput(".js-new-blob-commit-summary",function(){var e;return e=$(this).closest(".js-file-commit-form"),function(){return e.toggleClass("is-too-long-error",$(this).val().length>50)}}),$.observe(".js-check-for-fork",function(){this.addEventListener("load",function(){return h()})}),$(document).on("change",".js-gitignore-template input[type=radio]",function(){var e;return e=$(this).closest(".js-blob-form").find(".js-code-editor").data("code-editor"),i(this.getAttribute("data-template-url")).then(function(t){return e.setCode(t)})}),$(document).on("change",".js-license-template input[type=radio]",function(){var e,t;return e=$(this).closest(".js-blob-form").find(".js-code-editor").data("code-editor"),t=$(this).attr("data-template-contents"),e.setCode(t)}),$(document).onFocusedKeydown(".js-new-blob-commit-description",function(){return function(e){return"ctrl+enter"===e.hotkey||"meta+enter"===e.hotkey?($(this).closest("form").submit(),!1):void 0}})}.call(this),function(){var e,t;e=function(e){var t,n,r,i,s,o;for(e=e.toLowerCase(),t=$(".js-csv-data tbody tr"),i=[],n=0,r=t.length;r>n;n++)s=t[n],o=$(s).text().toLowerCase(),-1===o.indexOf(e)?i.push($(s).hide()):i.push($(s).show());return i},t=function(t){var n;n=t.target.value,null!=n&&e(n),t.preventDefault()},$(document).on("focus",".js-csv-filter-field",function(){return $(this).on("keyup",t)}),$(document).on("blur",".js-csv-filter-field",function(){return $(this).off("keyup",t)})}.call(this),function(){var e;e=null,$.observe(".js-branch-search-field",function(){var t,n,r,i,s,o,a,c,u,l,d,h,f,m;n=$(this),r=n.closest(".js-branch-search"),t=r.closest(".js-branches"),i=t.find(".js-branches-subnav .js-subnav-item"),f=r.prop("action"),h=r.attr("data-reset-url"),m=r.attr("data-results-container"),u=/\S/,a=function(){return u.test(n.val())},l=function(e,t){var n;return $.support.pjax&&window.history.replaceState(null,"",t),n=document.getElementById(m),$(n).html(e)},o=null,s=function(e){return o&&o.readyState<4&&o.abort(),o=$.ajax(e)},c=function(){var n,o;return null===e&&(e=i.filter(".selected")),n=a(),o=n?f+"?"+r.serialize():h,s({url:o,context:r}).always(function(){return t.removeClass("is-loading")}).done(function(e){return l(e,o)}),t.toggleClass("is-search-mode",n),t.addClass("is-loading"),i.removeClass("selected"),n?i.filter(".js-branches-all").addClass("selected"):(e.addClass("selected"),e=null)},d=function(){var e;return e=a(),n.val(""),e?c():void 0},n.on("throttled:input",c),n.on("keyup",function(e){return"esc"===e.hotkey?(d(),this.blur()):void 0})}),$(document).on("submit",".js-branch-search",!1),$(document).on("click",".js-clear-branch-search",function(e){var t;if(1===e.which)return t=$(this).closest(".js-branch-search").find(".js-branch-search-field"),t.focus().val("").trigger("input"),e.preventDefault()}),$(document).on("ajaxSend",".js-branch-destroy, .js-branch-restore",function(e,t){var n,r,i,s,o;return r=$(this),o=r.is(".js-branch-destroy"),s=r.closest(".js-branch-row").attr("data-branch-name"),n=r.closest(".js-branches").find(".js-branch-row").filter(function(){return this.getAttribute("data-branch-name")===s}),i=r.find("button[type=submit]"),i.blur().removeClass("tooltipped"),n.addClass("loading"),t.done(function(){return n.toggleClass("is-deleted",o)}).always(function(){return n.removeClass("loading"),i.addClass("tooltipped")})})}.call(this),function(){var e,t;e=function(){var e,n,r,i,s,o;return s=[],n=$(".js-advanced-search-input").val(),o={Repositories:0,Users:0,Code:0},e=$("input[type=text].js-advanced-search-prefix, select.js-advanced-search-prefix"),s=t(e,function(e,t,n){return""===e?"":(""!==t&&o[n]++,""!==t?""+e+t:void 0)}),$.merge(s,t($("input[type=checkbox].js-advanced-search-prefix"),function(e,t,n){var r;return r=$(this).prop("checked"),r!==!1&&o[n]++,r!==!1?""+e+r:void 0})),r=function(e){return e.Users>e.Code&&e.Users>e.Repositories?"Users":e.Code>e.Users&&e.Code>e.Repositories?"Code":"Repositories"},i=$.trim(s.join(" ")),$(".js-type-value").val(r(o)),$(".js-search-query").val($.trim(n+" "+i)),$(".js-advanced-query").empty(),$(".js-advanced-query").text(""+i),$(".js-advanced-query").prepend($("<span>").text($.trim(n))," ")},t=function(e,t){return $.map(e,function(e,n){var r,i,s,o;return s=$.trim($(e).val()),r=$(e).attr("data-search-prefix"),i=$(e).attr("data-search-type"),o=function(e){return-1!==e.search(/\s/g)?'"'+e+'"':e},""===r?t.call(e,r,s,i):-1!==s.search(/\,/g)&&"location"!==r?s.split(/\,/).map(function(n,s){return t.call(e,r,o($.trim(n)),i)}):t.call(e,r,o(s),i)})},$(document).onFocusedInput(".js-advanced-search-prefix",function(){return function(){return e()}}),$(document).on("change",".js-advanced-search-prefix",e),$(document).on("focusin",".js-advanced-search-input",function(){return $(this).closest(".js-advanced-search-label").addClass("focus")}),$(document).on("focusout",".js-advanced-search-input",function(){return $(this).closest(".js-advanced-search-label").removeClass("focus")}),$(document).on("click",".js-see-all-search-cheatsheet",function(){return $(".js-more-cheatsheet-info").removeClass("hidden"),!1}),$(function(){return $(".js-advanced-search-input").length?e():void 0})}.call(this),function(){$(document).on("navigation:keyopen",".commits-list-item",function(){return $(this).find(".commit-title > a").first().click(),!1}),$(document).on("navigation:keydown",".commits-list-item",function(e){return"c"===e.hotkey?($(this).find(".commit-title > a").first().click(),!1):void 0}),$(document).on("menu:activated",".js-diffbar-commits-menu",function(e){var t;t=e.target.querySelector(".in-range"),$(t).navigation("focus",{behavior:"instant"})})}.call(this),function(){$(document).on("click",".js-compare-tabs a",function(){return $(this).closest(".js-compare-tabs").find("a").removeClass("selected"),$(this).addClass("selected"),$("#commits_bucket, #files_bucket, #commit_comments_bucket").hide(),$(this.hash).show(),!1}),$.hashChange(function(){return $(this).closest("#files_bucket")[0]&&!$(this).is($.visible)?$('a.tabnav-tab[href="#files_bucket"]').click():void 0}),$(document).on("click",".js-toggle-range-editor-cross-repo",function(){return $(".js-range-editor").toggleClass("is-cross-repo"),!1}),$(document).on("pjax:click",".js-range-editor",function(e,t){$(".js-compare-pr").hasClass("open")&&!t.url.match(/expand=1/)&&(null==t.data&&(t.data={}),t.data.expand="1")}),$(document).on("navigation:open","form.js-commitish-form",function(){var e,t,n;return t=$(this),n=t.find(".js-new-item-name").text(),e=$("<input>",{type:"hidden",name:"new_compare_ref",value:n}),t.append(e),t.submit()}),$.observe(".js-compare-pr.open",{add:function(){return document.body.classList.add("is-pr-composer-expanded")},remove:function(){return document.body.classList.remove("is-pr-composer-expanded")}})}.call(this),define("github/event-once",["exports"],function(e){function t(){return!0}Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(e,n){var r=arguments.length<=2||void 0===arguments[2]?t:arguments[2];return new Promise(function(t){$(e).on(n,function i(s){r(s)&&(t(s),$(e).off(n,i))})})}}),function(){function e(e,t,n){var r=Array.from(e.querySelectorAll(".js-navigation-item")),i=r.indexOf(t),s=r.indexOf(n);if(-1==i)throw new Error("Couldn't find startIndex in container");if(-1==s)throw new Error("Couldn't find endItem in container");if(i>s){var o=[s,i];i=o[0],s=o[1]}$(r).removeClass("is-range-selected").addClass("js-navigation-open"),$(r.slice(i,s+1)).addClass("is-range-selected").removeClass("js-navigation-open")}function t(t){var r,i,s,o;return regeneratorRuntime.async(function(a){for(;;)switch(a.prev=a.next){case 0:s=function(n){e(t,i,n.target)},r=n(t,"menu:deactivate"),i=null;case 3:return a.next=5,regeneratorRuntime.awrap(Promise.race([n(window,"keydown",function(e){return e.shiftKey===!0}),r]));case 5:if(o=a.sent,"menu:deactivate"!==o.type){a.next=8;break}return a.abrupt("break",15);case 8:return i=t.querySelector(".navigation-focus"),i&&(e(t,i,i),$(t).on("navigation:focus",s)),a.next=12,regeneratorRuntime.awrap(n(window,"keyup",function(e){return e.shiftKey===!1}));case 12:$(t).off("navigation:focus",s);case 13:a.next=3;break;case 15:$(t).find(".js-navigation-item").removeClass("is-range-selected");case 16:case"end":return a.stop()}},null,this)}var n=require("github/event-once")["default"];$(document).on("menu:activate",".js-diffbar-commits-menu",function(){t(this)}),$(document).on("navigation:open",".js-diffbar-commits-menu .js-navigation-item.is-range-selected",function(e){e.preventDefault(),e.stopPropagation();var t=e.target.closest(".js-diffbar-commits-menu"),n=t.querySelectorAll(".js-navigation-item.is-range-selected"),r=n[0],i=n[n.length-1],s=t.getAttribute("data-range-url"),o=r.getAttribute("data-parent-commit"),a=i.getAttribute("data-commit"),c=void 0;o&&a?c=s.replace("$range",o+".."+a):a&&(c=s.replace("$range",""+a)),window.location.href=c})}(),function(){var e,t,n,r,i,s;t=require("github/fetch").fetchText,$.hashChange(i=function(){var t,i,o,a,c,u,l,d,h;return a=window.location.hash,a&&(u=s(a))&&(t=u[0],i=u[1],h=u[2],c=u[3],!r(a.slice(1)))?(d=0,l=1,(o=function(){var t,s;if((s=$(r(i)).next()[0])&&(t=n(s,h,c)))return $(t).parents(".js-details-container").addClass("open"),e(t).then(function(){var e,t,n,i;if(t=r(a.slice(1))){if(n=$(t).overflowOffset(),i=n.top,e=n.bottom,0>i||0>e)return t.scrollIntoView()}else if(l>d)return d++,o()})})()):void 0}),$(document).on("click",".js-expand",function(){return e(this),!1}),e=function(e){var n;return n=e.getAttribute("data-url"),n+="&anchor="+encodeURIComponent(e.hash.slice(1)),n=n.replace(/[?&]/,"?"),new Promise(function(r,i){return t(n).then(function(t){var n,i;return n=$(e).closest(".js-expandable-line"),i=n.next(".file-diff-line"),i.preservingScrollPosition(function(){return n.replaceWith(t)}),r()},i)})},r=function(e){return document.getElementById(e)||document.getElementsByName(e)[0]},s=function(e){var t,n;return t=e.match(/\#(diff\-[a-f0-9]+)([L|R])(\d+)$/i),null!=t&&4===t.length?t:(n=e.match(/\#(discussion\-diff\-[0-9]+)([L|R])(\d+)$/i),null!=n&&4===n.length?n:null)},n=function(e,t,n){var r,i,s,o,a,c,u,l;for(n=parseInt(n,10),c=$(e).find(".js-expand"),o=0,a=c.length;a>o;o++)if(i=c[o],r="R"===t?"data-right-range":"data-left-range",u=i.getAttribute(r).split("-"),l=u[0],s=u[1],parseInt(l,10)<=n&&n<=parseInt(s,10))return i;return null}}.call(this),function(){var e,t,n,r,i,s,o,a,c;$(document).on("click",".js-add-single-line-comment",function(){var e,t,n,i,s,c;r($(this).closest(".file")[0]),s=this.getAttribute("data-path"),e=this.getAttribute("data-anchor"),c=this.getAttribute("data-position"),t=this.getAttribute("data-line"),i=a($(this).closest("tr")[0],{path:s,anchor:e,position:c,line:t}),n=$(i).find(".js-line-comments")[0],n.classList.contains("is-resolved")?n.classList.toggle("is-collapsed"):o(n)}),$(document).on("click",".js-add-split-line-comment",function(){var e,t,n,s,a,u,l,d;r($(this).closest(".file")[0]),d=this.getAttribute("data-type"),u=this.getAttribute("data-path"),e=this.getAttribute("data-anchor"),l=this.getAttribute("data-position"),n=this.getAttribute("data-line"),t=function(){switch(d){case"addition":return"js-addition";case"deletion":return"js-deletion"}}(),a=c($(this).closest("tr")[0]),s=i(a,t,{type:d,anchor:e,path:u,position:l,line:n}),s.classList.contains("is-resolved")?s.classList.toggle("is-collapsed"):o(s)}),$(document).on("click",".js-toggle-inline-comment-form",function(){return o($(this).closest(".js-line-comments")[0]),!1}),$(document).on("quote:selection",".js-line-comments",function(){o(this)}),$(document).onFocusedKeydown(".js-inline-comment-form .js-comment-field",function(){return function(t){return $(this).hasClass("js-navigation-enable")?void 0:"esc"===t.hotkey&&0===this.value.length?(e($(this).closest(".js-inline-comment-form")[0]),!1):void 0}}),$(document).on("click",".js-hide-inline-comment-form",function(){return e($(this).closest(".js-inline-comment-form")[0]),!1}),$(document).on("ajaxSuccess",".js-inline-comment-form",function(t,n,r,i){var s;this===t.target&&(s=$(this).closest(".js-line-comments"),s.find(".js-comments-holder").append(i.inline_comment),e(this))}),$(document).on("session:resume",function(e){var t;(t=e.targetId.match(/^new_inline_comment_diff_([\w-]+)_(\d+)$/))&&$(".js-add-line-comment[data-anchor="+t[1]+"][data-position="+t[2]+"]").click()}),o=function(e){return $(e).find(".js-inline-comment-form-container").addClass("open"),$(e).find(".js-write-tab").click(),$(e).find(".js-comment-field").focus()},e=function(e){return e.reset(),$(e).closest(".js-inline-comment-form-container").removeClass("open"),t()},r=function(e){return $(e).find(".js-toggle-file-notes").prop("checked",!0).trigger("change")},t=function(){var e,t,n,r,i,s,o;for(o=$(".file .js-inline-comments-container"),i=0,s=o.length;s>i;i++)t=o[i],e=$(t).find(".js-comments-holder > *"),r=e.length>0,n=$(t).find(".js-inline-comment-form-container").hasClass("open"),r||n||$(t).remove()},n=function(e){var t,n;return n=document.querySelector(e),t=n.firstElementChild.cloneNode(!0),t.querySelector("textarea").value="",t},$.observe(".js-comment",{remove:t}),a=function(e,t){var r,i;return null==t&&(t={}),(i=$(e).next(".js-inline-comments-container")[0])?i:(i=n("#js-inline-comments-single-container-template"),(r=i.querySelector(".js-inline-comment-form"))&&s(r,t),e.after(i),i)},i=function(e,t,r){var i,o,a;return null==r&&(r={}),(a=$(e).find(".js-line-comments."+t)[0])?a:(a=n("#js-inline-comments-split-form-container-template"),a.classList.add(t),(o=a.querySelector(".js-inline-comment-form"))&&s(o,r),i=$(e).find("."+t),i.last().after(a),i.remove(),a)},c=function(e){var t;return(t=$(e).next(".js-inline-comments-container")[0])?t:(t=$("#js-inline-comments-split-container-template").clone().children()[0],$(e).after(t),t)},s=function(e,t){var n,r,i,s,o;for(s=e.elements,r=0,i=s.length;i>r;r++)n=s[r],n.name in t&&(n.value=t[n.name]);o=e.querySelector(".js-comment-field"),o.id=o.id.replace(/^r\d+ /,"").replace("${anchor}",t.anchor).replace("${position}",t.position)}}.call(this),function(){var e,t;e=function(e,t,n){return $.observe(e,function(e){var r,i,s,o,a,c;return c=null,i=s=function(){c&&n(c,!1),c=null},o=function(e){c&&n(c,!1),c=$(e.target).closest(t)[0],c&&n(c,!0)},r=function(){return e.addEventListener("mouseenter",i),e.addEventListener("mouseleave",s),e.addEventListener("mouseover",o)},a=function(){return e.removeEventListener("mouseenter",i),e.removeEventListener("mouseleave",s),e.removeEventListener("mouseover",o)},{add:r,remove:a}})},t=function(e){return Math.floor(e/2)},e(".diff-table","td.blob-code, td.blob-num",function(e,n){var r,i,s,o,a,c,u,l,d,h;if(h=e.parentNode,r=h.children,4===r.length)for(o=a=0,u=r.length;u>a;o=++a)s=r[o],s===e&&(i=t(o));for(d=[],o=c=0,l=r.length;l>c;o=++c)s=r[o],(null==i||t(o)===i)&&d.push(s.classList.toggle("is-hovered",n));return d})}.call(this),function(){var e,t,n;$(document).on("click",".js-linkable-line-number",function(){return window.location.hash=this.id,!1}),e=null,n=function(e){return Math.floor(e/2)},t=function(){var t,r,i,s,o,a,c,u,l,d,h;if(e){for(a=0,u=e.length;u>a;a++)i=e[a],i.classList.remove("selected-line");e=null}if(o=window.location.hash.substring(1),o&&(h=document.getElementById(o)),h&&h.classList.contains("js-linkable-line-number")){if(d=h.parentNode,t=d.children,4===t.length)for(s=c=0,l=t.length;l>c;s=++c)i=t[s],i===h&&(r=n(s));e=function(){var e,o,a;for(a=[],s=e=0,o=t.length;o>e;s=++e)i=t[s],(null==r||n(s)===r)&&(i.classList.toggle("selected-line"),a.push(i));return a}()}},$.hashChange(t),$.observe(".blob-expanded",t)}.call(this),function(){$(document).on("click",".js-rich-diff.collapsed .js-expandable",function(e){return e.preventDefault(),$(e.target).closest(".js-rich-diff").removeClass("collapsed")}),$(document).on("click",".js-show-rich-diff",function(e){return e.preventDefault(),$(this).closest(".js-warn-no-visible-changes").addClass("hidden").hide().siblings(".js-no-rich-changes").removeClass("hidden").show()})}.call(this),function(){var e;e=function(){var e;return e="split"===$("meta[name=diff-view]").prop("content")&&$(".file-diff-split").is(":visible"),document.body.classList.toggle("split-diff",e)},$.observe("meta[name=diff-view]",{add:e,remove:e}),$.observe(".file-diff-split",{add:e,remove:e}),$.observe(".js-pull-request-tab.selected",{add:e,remove:e}),$.observe(".js-compare-tabs .tabnav-tab.selected",{add:e,remove:e})}.call(this),function(){$(document).on("change",".js-toggle-file-notes",function(){return $(this).closest(".file").toggleClass("show-inline-notes",this.checked)}),$(document).on("click",".js-toggle-all-file-notes",function(){var e,t;return e=$(".js-toggle-file-notes"),t=0===e.filter(":checked").length,e.prop("checked",t).trigger("change"),!1}),$.observe(".js-inline-comments-container",function(){var e,t,n;return(t=$(this).closest(".file")[0])?(e=n=function(){var e;e=null!=t.querySelector(".js-inline-comments-container"),t.classList.toggle("has-inline-notes",e)},{add:e,remove:n}):void 0})}.call(this),function(){var e;e=function(e){var t,n,r;return r=e.parentElement,n=r.querySelectorAll("td.js-line-comments").length,t=r.querySelectorAll("td.js-line-comments.is-collapsed").length,r.classList.toggle("is-collapsed",t>0&&n===t)},$.observe("td.js-line-comments.is-collapsed",{add:function(t){return e(t)},remove:function(t){return e(t)}})}.call(this),function(){$(document).on("focusin",".js-url-field",function(){var e;return e=this,setTimeout(function(){return $(e).select()},0)})}.call(this),function(){document.querySelector(".js-account-membership-form")&&($(document).one("change.early-access-tracking",".js-account-membership-form",function(){return window.ga("send","event","Large File Storage","attempt","location: early access form")}),$(document).on("submit.early-access-tracking",".js-account-membership-form",function(e){return window.ga("send","event","Large File Storage","submit","location: early access form")}))}.call(this),function(){var e,t;t=require("github/fetch").fetchText,e=function(){return $(".js-repo-toggle-team:checked").visible()},$(document).onFocusedInput(".js-repository-name",function(){var e,t,n;return n=/[^0-9A-Za-z_\-.]/g,t=$(".js-form-note"),e=$(".js-rename-repository-button"),function(){t.html("Will be renamed as <strong>"+this.value.replace(n,"-")+"</strong>"),n.test(this.value)?t.show():t.hide(),this.value&&this.value!==$(this).attr("data-original-name")?e.prop("disabled",!1):e.prop("disabled",!0)}}),$(document).on("click",".js-repo-team-suggestions-view-all",function(){return t(this.href).then(function(t){return function(n){var r,i;return i=e().map(function(){return this.value}),r=$(t).closest("ul"),r.html(n),i.each(function(){return r.find(".js-repo-toggle-team[value="+this+"]").prop("checked",!0)})}}(this)),!1})}.call(this),function(){var e,t,n,r,i,s;s=function(e,t){var n;return n=t.querySelector(".js-repo-access-error"),n.textContent=e,n.classList.remove("hidden")},r=function(){var e,t,n,r,i;for(r=document.querySelectorAll(".js-repo-access-error"),i=[],t=0,n=r.length;n>t;t++)e=r[t],e.textContent="",i.push(e.classList.add("hidden"));return i},e=function(e){return e.classList.toggle("is-empty",!e.querySelector(".js-repo-access-entry"))},i=function(){var e;(e=document.getElementById("collaborators"))&&(e.querySelector(".js-add-new-collab").disabled=!0,$(e.querySelector(".js-add-repo-access-field")).data("autocompleted"))},$.observe(".js-add-new-collab",i),t=function(e){var t,n,r,i,s,o,a;if(o=document.querySelector(".js-repo-access-team-select")){
for(a=0,s=o.querySelectorAll(".js-repo-access-team-select-option"),t=0,i=s.length;i>t;t++)n=s[t],r=n.classList,e===n.getAttribute("data-team-id")&&(r.add("has-access"),r.remove("selected")),r.contains("has-access")||a++;if(0===a)return o.closest(".js-repo-access-group").classList.add("no-form")}},n=function(e){var t,n;return(n=document.querySelector(".js-repo-access-team-select"))?(null!=(t=n.querySelector("[data-team-id='"+e+"']"))&&t.classList.remove("has-access"),n.closest(".js-repo-access-group").classList.remove("no-form")):void 0},$(document).on("autocomplete:autocompleted:changed",".js-add-repo-access-field",function(){return $(this).data("autocompleted")?this.form.querySelector(".js-add-new-collab").disabled=!1:i()}),$(document).on("selectmenu:selected",".js-repo-access-team-select",function(){var e,t;return e=this.querySelector(".js-repo-access-team-select-option.selected").getAttribute("data-team-id"),t=this.closest(".js-repo-access-group").querySelector(".js-add-repo-access-field"),t.value=e,$(t.form).submit()}),$(document).on("ajaxSend",".js-add-repo-access-form",function(){r()}),$(document).on("ajaxSuccess",".js-add-repo-access-form",function(n,r,o,a){var c,u,l,d;return u=this.closest(".js-repo-access-group"),c=this.querySelector(".js-add-repo-access-field"),l=u.querySelector(".js-repo-access-list"),d=c.value,c.value="",a.error?s(a.error,u):(i(),l.insertAdjacentHTML("beforeend",a.html),e(u),"teams"===u.id?t(d):void 0)}),$(document).on("ajaxSuccess",".js-remove-repo-access-form",function(){var t,i;return r(),t=this.closest(".js-repo-access-entry"),i=this.closest(".js-repo-access-group"),"teams"===i.id&&n(t.getAttribute("data-team-id")),t.remove(),e(i)}),$(document).on("ajaxError",".js-remove-repo-access-form",function(){return s(this.getAttribute("data-error-message"),this.closest(".js-repo-access-group")),!1})}.call(this),function(){var e,t;e=require("github/fetch").fetchText,$(document).on("change",".js-default-branch",function(){var e,t;return t=document.querySelector(".js-default-branch-confirmation"),e=document.querySelector(".js-change-default-branch-button"),e.disabled=this.value===t.getAttribute("data-original-value"),t.value=this.value}),$(document).on("change",".js-repo-features-form input[type=checkbox]",function(){var e;return e=this.closest(".js-repo-option").querySelector(".js-status-indicator"),e.classList.remove("status-indicator-success","status-indicator-failed"),e.classList.add("status-indicator-loading")}),$(document).on("ajaxSuccess",".js-repo-features-form",function(e,t,n,r){var i,s,o,a;for(a=this.querySelectorAll(".status-indicator-loading"),s=0,o=a.length;o>s;s++)i=a[s],i.classList.remove("status-indicator-loading"),i.classList.add("status-indicator-success");return/^\s*</.test(r)?$(document.querySelector(".js-repo-nav")).replaceWith(r):void 0}),$(document).on("ajaxError",".js-repo-features-form",function(){var e,t,n,r,i,s;for(i=this.querySelectorAll(".status-indicator-loading"),s=[],n=0,r=i.length;r>n;n++)t=i[n],t.classList.remove("status-indicator-loading"),t.classList.add("status-indicator-failed"),e=t.closest(".js-repo-option").querySelector("input[type=checkbox]"),s.push(e.checked=!e.checked);return s}),$(document).on("change",".js-protect-branch",function(){var e,t,n,r,i,s,o,a,c,u;for(a=this.closest(".js-protected-branch-settings"),e=this.checked,c=a.querySelectorAll(".js-protected-branch-options"),n=0,s=c.length;s>n;n++)t=c[n],t.classList.toggle("active",e);for(u=a.querySelectorAll(".js-protected-branch-option"),i=0,o=u.length;o>i;i++)r=u[i],e?r.removeAttribute("disabled"):r.setAttribute("disabled","disabled")}),$(document).on("change",".js-required-status-toggle",function(){var e;e=this.closest(".js-protected-branch-settings").querySelector(".js-required-statuses"),e.classList.toggle("hidden",!this.checked)}),$(document).on("change",".js-required-status-checkbox",function(){var e;e=this.closest(".js-protected-branches-item"),e.querySelector(".js-required-status-badge").classList.toggle("hidden",!this.checked)}),$(document).on("change",".js-allowed-branch-pushers-toggle",function(){var e;e=this.closest(".js-protected-branch-settings").querySelector(".js-allowed-pushers"),e.classList.toggle("hidden",!this.checked),e.querySelector(".js-autocomplete-field").focus()}),$(document).on("change",".js-protected-branch-include-admin-toggle",function(){var e,t,n,r;for(r=this.closest(".js-protected-branch-settings").querySelectorAll(".js-protected-branch-admin-permission"),t=0,n=r.length;n>t;t++)e=r[t],e.classList.toggle("hidden"),e.classList.toggle("active",!e.classList.contains("hidden"))}),t=function(e){var t,n,r;return t=e.querySelector(".js-allowed-pushers"),r=parseInt(t.getAttribute("data-limit")),n=t.querySelectorAll(".js-allowed-user-or-team").length,t.classList.toggle("at-limit",n>=r)},$(document).on("autocomplete:result",".js-add-protected-branch-user-or-team",function(n,r){var i,s,o;s=this.closest(".js-protected-branch-options"),i=this.closest(".js-autocomplete-container"),o=i.getAttribute("data-url")+"&"+$.param({item:r}),e(o,{method:"GET",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(function(e){return i.querySelector(".js-autocomplete-field").value="",s.querySelector(".js-allowed-users-and-teams").insertAdjacentHTML("beforeend",e),t(s)})}),$(document).on("click",".js-remove-allowed-user-or-team",function(){var e;return e=this.closest(".js-protected-branch-options"),this.closest(".js-allowed-user-or-team").remove(),t(e)})}.call(this),function(){var e,t,n,r,i,s,o,a,c;a=["is-render-pending","is-render-ready","is-render-loading","is-render-loaded"].reduce(function(e,t){return e+" "+t}),o=function(e){var t;return t=e.data("timing"),null!=t?(t.load=t.hello=null,t.helloTimer&&(clearTimeout(t.helloTimer),t.helloTimer=null),t.loadTimer?(clearTimeout(t.loadTimer),t.loadTimer=null):void 0):void 0},r=function(e){var t,n,r;if(!e.data("timing"))return t=10,n=45,r={load:null,hello:null,helloTimer:null,loadTimer:null},r.load=Date.now(),r.helloTimer=setTimeout(c(e,function(){return!r.hello}),1e3*t),r.loadTimer=setTimeout(c(e),1e3*n),e.data("timing",r)},s=function(e){return e.addClass("is-render-requested")},i=function(e){return e.removeClass(a),e.addClass("is-render-failed"),o(e)},c=function(e,t){return null==t&&(t=function(){return!0}),function(){var n,r;return n=function(){try{return e.is($.visible)}catch(t){return e.visible().length>0}}(),!n||e.hasClass("is-render-ready")||e.hasClass("is-render-failed")||e.hasClass("is-render-failed-fatally")||!t()?void 0:(r=e.data("timing"))?(console.error("Render timeout: "+JSON.stringify(r)+" Now: "+Date.now()),i(e)):console.error("No timing data on $:",e)}},e=function(e){var t,n;t=$(e||this),(null!=(n=t.data("timing"))?n.load:0)||(o(t),r(t),t.addClass("is-render-automatic"),s(t))},null!=$.observe?$.observe(".js-render-target",e):$(function(){return $.each($(".js-render-target"),function(t,n){return e(n)})}),t=function(e){var t;return t=".js-render-target",e?$(t+"[data-identity='"+e+"']"):$(t)},$(window).on("message",function(e){var r,i,s,o,a,c,u,l,d,h;return l=null!=(u=e.originalEvent)?u:e,s=l.data,a=l.origin,s&&a&&(d=function(){var t;try{return JSON.parse(s)}catch(t){return e=t,s}}(),h=d.type,o=d.identity,i=d.body,c=d.payload,h&&i&&1===(r=t(o)).length&&a===r.attr("data-host")&&"render"===h)?n(r,h,o,i,c):void 0}),n=function(e,t,n,r,s){var o,c,u,l,d,h;switch(r){case"hello":if(d=e.data("timing")||{untimed:!0},d.hello=Date.now(),o={type:"render:cmd",body:{cmd:"ack",ack:!0}},u={type:"render:cmd",body:{cmd:"branding",branding:!1}},h=null!=(l=e.find("iframe").get(0))?l.contentWindow:void 0,"function"==typeof h.postMessage&&h.postMessage(JSON.stringify(o),"*"),"function"==typeof h.postMessage&&h.postMessage(JSON.stringify(u),"*"),e.hasClass("is-local"))return c=e.parents(".js-code-editor").data("code-editor"),u={type:"render:data",body:c.code()},"function"==typeof h.postMessage?h.postMessage(JSON.stringify(u),"*"):void 0;break;case"error":return i(e);case"error:fatal":return i(e),e.addClass("is-render-failed-fatal");case"error:invalid":return i(e,"invalid"),e.addClass("is-render-failed-invalid");case"loading":return e.removeClass(a),e.addClass("is-render-loading");case"loaded":return e.removeClass(a),e.addClass("is-render-loaded");case"ready":if(e.removeClass(a),e.addClass("is-render-ready"),null!=(null!=s?s.height:void 0))return e.height(s.height);break;case"resize":return null!=(null!=s?s.height:void 0)&&e.hasClass("is-render-ready")?e.height(s.height):console.error("Resize event sent without height or before ready");default:return console.error("Unknown message ["+t+"]=>'"+r+"'")}}}.call(this),function(){$(function(){var e,t;return e=$(".js-newsletter-frequency-choice"),e.length?(t=function(){var t;return e.find(".selected").removeClass("selected"),t=e.find("input[type=radio]:enabled:checked"),t.closest(".choice").addClass("selected")},e.on("change","input[type=radio]",function(){return t()}),t()):void 0}),$(document).on("ajaxSuccess",".js-subscription-toggle",function(e,t,n){var r;return r=$(this).find(".selected .notice"),r.addClass("visible"),setTimeout(function(){return r.removeClass("visible")},2e3)}),$(document).on("ajaxSuccess",".js-explore-newsletter-subscription-container",function(e,t,n){return $(this).replaceWith(t.responseText)})}.call(this),function(){$(document).on("selectmenu:selected",".js-set-user-protocol-preference",function(){return $(this).submit()})}.call(this),function(){$(document).on("click",".js-git-protocol-selector",function(){var e,t,n,r,i,s,o;if(e=this.closest(".url-box"),o=this.getAttribute("data-url"),e.querySelector(".js-url-field").value=o,!/\.patch$/.test(o))for(i=document.querySelectorAll(".js-live-clone-url"),n=0,r=i.length;r>n;n++)t=i[n],t.textContent=o;null!=(s=e.querySelector(".js-clone-url-button.selected"))&&s.classList.remove("selected"),this.closest(".js-clone-url-button").classList.add("selected")})}.call(this),function(){$(document).on("navigation:open",".js-create-branch",function(){return $(this).submit(),!1})}.call(this),function(){$(document).on("click",".js-toggle-lang-stats",function(e){var t,n;return n=document.querySelector(".js-stats-switcher-viewport"),t=0!==n.scrollTop?"is-revealing-overview":"is-revealing-lang-stats",n.classList.toggle(t),e.preventDefault()}),$(document).on("click",".js-toggle-lang-stats-new",function(e){var t;return t=document.querySelector(".js-file-navigation-new"),t.classList.toggle("is-revealing-stats"),e.preventDefault()})}.call(this),function(){var e,t,n=function(e,t){return function(){return e.apply(t,arguments)}};e=function(){function e(e){var t;t=$(e),this.name=t.attr("data-theme-name"),this.slug=t.attr("data-theme-slug"),this.baseHref=t.attr("href")}return e.prototype.wrappedKey=function(e,t){return null==t&&(t=null),t?t+"["+e+"]":e},e.prototype.params=function(e){var t;return null==e&&(e=null),t={},t[this.wrappedKey("theme_slug",e)]=this.slug,t},e.prototype.previewSrc=function(){return[this.baseHref,$.param(this.params())].join("&")},e}(),t=function(){function t(){this.updateScrollLinks=n(this.updateScrollLinks,this),this.scrollThemeLinksContainer=n(this.scrollThemeLinksContainer,this),this.onPublishClick=n(this.onPublishClick,this),this.onHideClick=n(this.onHideClick,this),this.onThemeLinkClick=n(this.onThemeLinkClick,this),this.onThemeNavNextClick=n(this.onThemeNavNextClick,this),this.onThemeNavPrevClick=n(this.onThemeNavPrevClick,this),this.onScrollForwardsClick=n(this.onScrollForwardsClick,this),this.onScrollBackwardsClick=n(this.onScrollBackwardsClick,this),this.onPagePreviewLoad=n(this.onPagePreviewLoad,this),this.pagePreview=$("#page-preview"),this.contextLoader=$(".theme-picker-spinner"),this.fullPicker=$(".theme-picker-thumbs"),this.miniPicker=$(".theme-picker-controls"),this.scrollBackwardsLinks=$(".theme-toggle-full-left"),this.scrollForwardsLinks=$(".theme-toggle-full-right"),this.prevLinks=$(".theme-picker-prev"),this.nextLinks=$(".theme-picker-next"),this.themeLinksContainer=this.fullPicker.find(".js-theme-selector"),this.themeLinks=this.themeLinksContainer.find(".theme-selector-thumbnail"),this.themes=[],this.themeLinks.each(function(t){return function(n,r){return t.themes.push(new e(r))}}(this)),this.selectedTheme=this.themes[0],this.pagePreview.load(this.onPagePreviewLoad),this.scrollBackwardsLinks.click(this.onScrollBackwardsClick),this.scrollForwardsLinks.click(this.onScrollForwardsClick),this.prevLinks.click(this.onThemeNavPrevClick),this.nextLinks.click(this.onThemeNavNextClick),this.themeLinks.click(this.onThemeLinkClick),$(".theme-picker-view-toggle").click(this.onHideClick),$("#page-edit").click(this.onEditClick),$("#page-publish").click(this.onPublishClick),this.theme(this.selectedTheme),this.updateScrollLinks()}return t.prototype.onPagePreviewLoad=function(e){var t,n;return this.contextLoader.removeClass("visible"),t=this.pagePreview[0].contentDocument?this.pagePreview[0].contentDocument:this.pagePreview[0].contentWindow.document,n=this.getDocHeight(t)+"px",this.pagePreview.css("visibility","hidden"),this.pagePreview.height("10px"),this.pagePreview.height(n),this.pagePreview.css("visibility","visible")},t.prototype.onScrollBackwardsClick=function(e){return this.scrollThemeLinksContainer(-1)},t.prototype.onScrollForwardsClick=function(e){return this.scrollThemeLinksContainer(1)},t.prototype.onThemeNavPrevClick=function(e){return this.theme(this.prevTheme())},t.prototype.onThemeNavNextClick=function(e){return this.theme(this.nextTheme())},t.prototype.onThemeLinkClick=function(e){return this.theme(this.themeForLink(e.currentTarget)),!1},t.prototype.onHideClick=function(e){var t;return this.fullPicker.toggle(),this.miniPicker.toggle(),this.scrollToTheme(this.theme(),!1),t=$(e.currentTarget),t.toggleClass("open")},t.prototype.onEditClick=function(e){return $("#page-edit-form").submit(),!1},t.prototype.onPublishClick=function(e){var t;return t=$("#page-publish-form"),t.find('input[name="page[theme_slug]"]').val(this.theme().slug),$("#page-publish-form").submit(),!1},t.prototype.scrollThemeLinksContainer=function(e){var t,n,r;return n=this.themeLinksContainer.scrollLeft(),r=this.themeLinksContainer.outerWidth(!0),t=n+r*e,this.themeLinksContainer.animate({scrollLeft:t},400,function(e){return function(){return e.updateScrollLinks()}}(this)),!1},t.prototype.updateScrollLinks=function(){var e,t,n;return e=this.themeLinksContainer.scrollLeft(),0>=e?(this.scrollBackwardsLinks.addClass("disabled"),this.scrollForwardsLinks.removeClass("disabled")):(this.scrollBackwardsLinks.removeClass("disabled"),n=this.themeLinksContainer[0].scrollWidth,t=n-this.themeLinksContainer.outerWidth(!0),e>=t?this.scrollForwardsLinks.addClass("disabled"):this.scrollForwardsLinks.removeClass("disabled"))},t.prototype.selectedThemeIndex=function(){return this.themes.indexOf(this.selectedTheme)},t.prototype.prevTheme=function(){var e;return e=(this.selectedThemeIndex()-1)%this.themes.length,0>e&&(e+=this.themes.length),this.themes[e]},t.prototype.nextTheme=function(){return this.themes[(this.selectedThemeIndex()+1)%this.themes.length]},t.prototype.themeForLink=function(e){return this.themes[this.themeLinks.index($(e))]},t.prototype.linkForTheme=function(e){return $(this.themeLinks[this.themes.indexOf(e)])},t.prototype.scrollToTheme=function(e,t){var n,r,i,s,o,a;return null==t&&(t=!0),n=this.linkForTheme(e),a=this.themes.indexOf(e),s=n.outerWidth(!0),i=a*s,r=this.themeLinksContainer.scrollLeft(),o=r+this.themeLinksContainer.outerWidth(!0),r>i||i+s>o?t?this.themeLinksContainer.animate({scrollLeft:i},500):this.themeLinksContainer.scrollLeft(i):void 0},t.prototype.theme=function(e){return null==e&&(e=null),e?(this.selectedTheme=e,this.showPreviewFor(e),this.themeLinks.removeClass("selected"),this.linkForTheme(e).addClass("selected"),this.scrollToTheme(e),this.miniPicker.find(".js-theme-name").text(e.name),!1):this.selectedTheme},t.prototype.showPreviewFor=function(e){var t;return this.contextLoader.addClass("visible"),t=this.fullPicker.find("form"),t.find('input[name="theme_slug"]').val(e.slug),t.submit()},t.prototype.getDocHeight=function(e){var t,n;return this.pagePreview.height("auto"),t=e.body,n=e.documentElement,Math.max(t.scrollHeight,t.offsetHeight,n.clientHeight,n.scrollHeight,n.offsetHeight)},t}(),$(function(){return document.getElementById("theme-picker-wrap")?new t:void 0})}.call(this),function(){$(document).on("click",".email-hidden-toggle > a",function(){return $(this).parent().siblings(".email-hidden-reply").toggle(),!1})}.call(this),function(){var e,t,n,r;e=function(e){return document.querySelector(".js-gist-dropzone").classList.remove("hidden"),e.stopPropagation(),e.preventDefault()},t=function(e){var t;return(null!=(t=e.target.classList)?t.contains("js-gist-dropzone"):void 0)?e.target.classList.add("hidden"):void 0},n=function(e){var t,n,i,s,o,a;for(a=e.dataTransfer.files,s=0,o=a.length;o>s;s++)i=a[s],window.ga("send","event","Interaction","File Drop",i.type,{useBeacon:!0}),t=function(t){var n;return i=t.file,n=t.data,e.target.dispatchEvent(new CustomEvent("gist:filedrop",{bubbles:!0,cancelable:!0,detail:{file:i,text:n}}))},n=function(){},r(i).then(t,n);return document.querySelector(".js-gist-dropzone").classList.add("hidden"),e.stopPropagation(),e.preventDefault()},$.observe(".js-gist-dropzone",{add:function(){return document.body.addEventListener("dragenter",e),document.body.addEventListener("dragleave",t),document.body.addEventListener("dragover",e),document.body.addEventListener("drop",n)},remove:function(){return document.body.removeEventListener("dragenter",e),document.body.removeEventListener("dragleave",t),document.body.removeEventListener("dragover",e),document.body.removeEventListener("drop",n)}}),r=function(e){return new Promise(function(t,n){var r;return r=new FileReader,r.onload=function(){var i;return i=r.result,i&&!/\0/.test(i)?t({file:e,data:i}):n(new Error("invalid file"))},r.readAsText(e)})}}.call(this),function(){var e,t,n,r,i,s,o,a;n=require("github/fetch").fetchJSON,t=function(e){var t,n,r,i,s,o,a,c,u,l,d;for(r=e.querySelector(".js-gist-files"),d=document.getElementById("js-gist-file-template"),t=document.createElement("div"),t.innerHTML=d.textContent,u=t.querySelectorAll("[id]"),i=0,o=u.length;o>i;i++)n=u[i],n.removeAttribute("id");for(c=t.querySelector(".js-code-textarea"),null!=c&&c.setAttribute("id","blob_contents_"+Date.now()),l=t.children,s=0,a=l.length;a>s;s++)n=l[s],r.append(n);return r.lastElementChild},a=function(e){var n,r,i,s,o,a;for(o=e.querySelectorAll(".js-gist-file"),i=0,s=o.length;s>i;i++)if(n=o[i],r=n.querySelector(".js-gist-filename"),a=n.querySelector(".js-blob-contents"),!r.value&&!a.value)return n;return t(e)},o=function(e){var t;return t=e.closest(".js-code-editor"),new Promise(function(e){var n;return(n=$(t).data("code-editor"))?e(n):$(t).one("codeEditor:ready",function(){return e($(this).data("code-editor"))})})},e=function(e){var t,n,r,i;for(r=e.querySelectorAll(".js-code-textarea"),t=0,n=r.length;n>t;t++)if(i=r[t],i.value.trim().length>0)return!0;return!1},i=function(){var t,n,r,i,s;for(i=document.querySelectorAll(".js-gist-create"),s=[],n=0,r=i.length;r>n;n++)t=i[n],s.push(t.disabled=!e(t.form));return s},$(document).on("change",".js-code-textarea",function(){return i()}),r=function(){var e,t;return t=this,(e=t.getAttribute("data-language-detection-url"))?n(e+"?filename="+encodeURIComponent(t.value)).then(function(e){return o(t).then(function(t){return t.setMode(e.language)})}):void 0},$(document).onFocusedInput(".js-gist-filename",function(e){var t,n;return n=this,t=n.closest(".js-code-editor"),o(t).then(function(t){return null==t.ace?!1:$(n).on("throttled:input."+e,r)}),!1}),$(document).on("click",".js-add-gist-file",function(){var e;return e=this.closest(".js-blob-form"),t(e).scrollIntoView(),!1}),$(document).on("gist:filedrop",".js-blob-form",function(e){var t,n,i,s,c;return s=e.originalEvent.detail,t=s.file,c=s.text,n=a(this),i=n.querySelector(".js-gist-filename"),i.value=t.name,r.call(i),o(i).then(function(e){return e.setCode(c)}),n.scrollIntoView()}),$(document).on("click",".js-remove-gist-file",function(){var e,t,n,r,i;for(e=this.closest(".js-gist-file"),i=e.querySelectorAll(".js-gist-deleted input"),t=0,r=i.length;r>t;t++)n=i[t],n.disabled=!1;return e.querySelector(".js-code-editor").remove(),!1}),$(function(){return i()}),s=function(e){var t,n,r,i,s;for(n=e.querySelectorAll(".js-remove-gist-file"),s=[],r=0,i=n.length;i>r;r++)t=n[r],s.push(t.classList.toggle("hidden",n.length<2));return s},$.observe(".js-remove-gist-file",function(){var e;return e=this.closest(".js-gist-files"),{add:function(){return s(e)},remove:function(){return s(e)}}})}.call(this),function(){$(document).on("ajaxComplete",".js-gist-file-update-container .js-comment-update",function(e,t){var n;return 200===t.status?(n=JSON.parse(t.responseText),this.action=n.url):void 0})}.call(this),function(){$(document).on("click",".js-skip-to-content",function(){return $("#start-of-content").next().attr("tabindex","-1").focus(),!1})}.call(this),function(){var e,t,n,r,i;i=require("github/fetch"),n=i.fetch,r=i.fetchText,e={isHttpFragment:function(e){return 0==="http://".indexOf(e)||0==="https://".indexOf(e)},isValidHttpUrl:function(e){var t,n,r;return e=e.trim(),r=function(){try{return new URL(e)}catch(t){}}(),null==r?!1:(t=/^https?/.test(r.protocol),n=r.href===e||r.href===e+"/",t&&n)}},$.observe(".js-hook-url-field",function(t){var n,r,i;n=$(t),r=function(e){var t,n;return t=$(e).closest("form"),n=/^https:\/\/.+/.test(e.val()),t.toggleClass("is-ssl",n)},i=function(t){var n,r;return n=t.val(),r=e.isHttpFragment(n)||e.isValidHttpUrl(n),t.closest("form").toggleClass("is-invalid-url",!r)},n.on("keyup",function(){return r(n)}),n.on("throttled:input",function(){return i(n)}),r(n),i(n)}),$(document).on("click",".js-hook-toggle-ssl-verification",function(e){return e.preventDefault(),$(".js-ssl-hook-fields").toggleClass("is-not-verifying-ssl"),$(".js-ssl-hook-fields").hasClass("is-not-verifying-ssl")?($(".js-hook-ssl-verification-field").val("1"),$(document).trigger("close.facebox")):$(".js-hook-ssl-verification-field").val("0")}),t=function(e){var t;return t=$(".js-hook-event-checkbox"),t.prop("checked",!1),null!=e?t.filter(e).prop("checked",!0):void 0},$(document).on("change",".js-hook-event-choice",function(){var e;return e="custom"===$(this).val(),$(".js-hook-events-field").toggleClass("is-custom",e),!0}),$(document).on("submit",".js-hook-form",function(){var e,n;return e=$(this),n=e.find(".js-hook-event-choice:checked").val(),"custom"===n&&$(".js-hook-wildcard-event").prop("checked",!1),"push"===n&&t('[value="push"]'),"all"===n&&t(".js-hook-wildcard-event"),!0}),$(document).on("details:toggled",".js-hook-secret",function(){var e,t;return e=$(this),t=e.find("input[type=password]"),e.hasClass("open")?t.removeAttr("disabled").focus():t.attr("disabled","disabled")}),$(document).on("details:toggle",".js-hook-delivery-item",function(){var e,t;return e=$(this),t=this.querySelector(".js-hook-delivery-details"),e.data("details-load-initiated")?void 0:$.sudo().then(function(){var n,i;return e.data("details-load-initiated",!0),t.classList.add("is-loading"),n=function(e){return $(t).replaceWith(e),t.classList.remove("is-loading")},i=function(){return t.classList.add("has-error"),t.classList.remove("is-loading")},r(t.getAttribute("data-url")).then(n,i)})}),$(document).on("click",".js-hook-delivery-details .js-tabnav-tab",function(){var e,t,n;return t=$(this),e=t.closest(".js-hook-delivery-details"),e.find(".js-tabnav-tab").removeClass("selected"),n=e.find(".js-tabnav-tabcontent").removeClass("selected"),t.addClass("selected"),n.filter(function(){return this.getAttribute("data-tab-name")===t.attr("data-tab-target")}).addClass("selected")}),$(document).on("click",".js-hook-deliveries-pagination-button",function(e){var t,n;return e.preventDefault(),n=this,t=$(this).parent(),$.sudo().then(function(){return t.addClass("loading"),r(n.getAttribute("href")).then(function(e){return t.replaceWith(e)})})}),$(document).on("click",".js-redeliver-hook-delivery-init-button",function(e){var t;return e.preventDefault(),t=this.getAttribute("href"),$.sudo().then(function(){return $.facebox({div:t})})}),$(document).on("ajaxSuccess",".js-redeliver-hook-form",function(e,t){var n,r,i,s;return s=this.getAttribute("data-delivery-guid"),n=$(".js-hook-delivery-details").filter(function(){return this.getAttribute("data-delivery-guid")===s}),i=n.closest(".js-hook-delivery-item"),$(document).trigger("close.facebox"),r=$(t.responseText),n.replaceWith(r),r.on("load",function(){return n=i.find(".js-hook-delivery-details"),i.find(".js-item-status").removeClass("success pending failure").addClass(n.attr("data-status-class")),i.find(".js-item-status-tooltip").attr("aria-label",n.attr("data-status-message"))})}),$(document).on("ajaxError",".js-redeliver-hook-form",function(){return $(this).siblings(".js-redelivery-dialog").addClass("failed")}),$(document).on("submit",".js-test-hook-form",function(e){var t;return e.preventDefault(),t=this,$.sudo().then(function(){var e,r,i,s;return s=document.querySelector(".js-test-hook-message"),s.classList.remove("error","success"),e=function(){return t.dispatchEvent(new CustomEvent("ajaxComplete",{bubbles:!0}))},r=function(){return s.classList.add("success")},i=function(e){var t;return s.classList.add("error"),t=s.querySelector(".js-test-hook-message-errors"),null!=e.response?e.response.json().then(function(e){return t.textContent=e.errors}):t.textContent="Network request failed"},n(t.action,{method:t.method,body:$(t).serialize(),headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(r,i).then(e,e)})})}.call(this),function(){var e,t,n;n=require("github/fetch"),e=n.fetchJSON,t=n.fetchPoll,$(document).on("change",".js-triage-list-check",function(e){return $(".js-triage-toolbar").toggleClass("triage-mode",$(".js-triage-list-check:checked").length>0)}),$(document).on("change",".js-triage-list-check",function(){var e;e=$(".js-triage-list-check:checked"),$(".js-triage-item").data("contents-data",e).addClass("js-load-contents")}),$(document).on("selectmenu:selected",".js-triage-toolbar .js-navigation-item",function(){var e,t,n,r,i,s;n=$(this).closest(".js-menu-container").hasClass("js-select-menu-multiple"),e=$(this).closest("form"),i=$(this).hasClass("selected"),r=$(this).attr("data-name"),s=$(this).attr("data-value"),t=n?$("<input>",{type:"hidden",name:r+"["+s+"]",value:i?"1":"0"}):$("<input>",{type:"hidden",name:r,value:i?s:""}),setImmediate(function(e){return function(){return $(e).menu("deactivate")}}(this)),e.find(".js-bulk-triage-fields").append(t),e.addClass("will-submit")}),$(document).on("menu:deactivate",".js-triage-toolbar .js-menu-container",function(n){var r,i;(r=this.querySelector("form.will-submit"))&&(this.classList.add("is-loading"),i=e(r.getAttribute("action"),{method:"put",body:$.param($(r).serializeArray()),headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}),i.then(function(e){return function(n){var r,i,s;return s=t(n.job.url,{headers:{accept:"application/json"}}),r=function(){return $(e).menu("deactivate"),location.reload()},i=function(){return e.classList.add("has-error")},s.then(r,i)}}(this)),r.classList.remove("will-submit"),n.preventDefault())}),$(document).on("submit",".js-delete-orgs-form",function(n){var r,i,s,o;n.preventDefault(),s=this,s.classList.add("is-loading"),r=$(".js-triage-list-check:checked"),i=r.length?"&"+$.param(r):"",o=e(s.getAttribute("action"),{method:"put",body:$.param($(s).serializeArray())+i,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}),o.then(function(e){var n,r,i;return i=t(e.job.url,{headers:{accept:"application/json"}}),n=function(){return location.reload()},r=function(){return s.classList.add("has-error")},i.then(n,r)})}),$(document).on("change",".js-hosted-admin-auth-switcher",function(e){var t;return t=$(".js-hosted-admin-saml-settings"),t.toggleClass("hidden")})}.call(this),function(){$(document).on("navigation:open",".js-issues-custom-filter",function(){var e,t,n,r;return t=$(this),r=t.find(".js-new-item-name").text(),n=t.attr("data-name"),e=$("<input>",{type:"hidden",name:n,value:r}),t.append(e),t.submit()})}.call(this),function(){var e,t,n;t=function(t,n){return t.closest(".js-label-editor").find(".js-color-editor-bg").css("background-color",n),t.css("color",e(n,-.5)),t.css("border-color",n)},n=function(e){var t,n;return n="#c00",t=$(e).closest(".js-color-editor"),t.find(".js-color-editor-bg").css("background-color",n),e.css("color","#c00"),e.css("border-color",n)},e=function(e,t){var n,r,i;for(e=String(e).toLowerCase().replace(/[^0-9a-f]/g,""),e.length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0,i="#",n=void 0,r=0;3>r;)n=parseInt(e.substr(2*r,2),16),n=Math.round(Math.min(Math.max(0,n+n*t),255)).toString(16),i+=("00"+n).substr(n.length),r++;return i},$(document).on("focusin",".js-color-editor-input",function(){var e,r;return r=$(this),e=$(this).closest(".js-label-editor"),r.on("throttled:input.colorEditor",function(i){var s;return"#"!==r.val().charAt(0)&&r.val("#"+r.val()),e.removeClass("is-valid is-not-valid"),s=/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r.val()),s?(e.addClass("is-valid"),t(r,r.val())):(e.addClass("is-not-valid"),n(r))}),r.on("blur.colorEditor",function(){return r.off(".colorEditor")})}),$(document).on("mousedown",".js-color-chooser-color",function(e){var n,r,i;return $(this).closest(".js-color-editor").removeClass("open"),n=$(this).closest(".js-label-editor"),r="#"+$(this).attr("data-hex-color"),i=n.find(".js-color-editor-input"),n.removeClass("is-valid is-not-valid"),i.val(r),t(i,r)}),$(document).on("submit",".js-label-editor form",function(){var e,t;return e=$(this).find(".js-color-editor-input"),t=e.val(),t.length<6&&(t=t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),e.val(t.replace("#",""))}),$(document).on("focusin",".js-label-editor",function(){return $(this).closest(".js-label-editor").addClass("open")}),$(document).on("reset",".js-create-label",function(){var e,n,r;return e=$(this).find(".color-chooser span").removeAttr("data-selected"),r=e.eq(Math.floor(Math.random()*e.length)),n="#"+r.attr("data-selected","").attr("data-hex-color"),setImmediate(function(e){return function(){var r;return r=$(e).find(".js-color-editor-input"),r.attr("data-original-color",n).attr("value",n),t(r,r.val())}}(this))})}.call(this),function(){var e,t,n,r,i,s;n=require("github/inflector").pluralizeNode,r=require("github/number-helpers"),e=r.formatNumber,t=r.parseFormattedNumber,i=function(e,t){return e.closest("div.js-details-container").classList.toggle("is-empty",t)},s=function(r){var i,s,o;return i=document.querySelector(".js-labels-count"),o=t(i.textContent),s=o+r,i.textContent=e(s),n(s,document.querySelector(".js-labels-label")),s},$(document).on("click",".js-edit-label",function(){return $(this).closest(".labels-list-item").addClass("edit")}),$(document).on("click",".js-edit-label-cancel",function(){return this.form.reset(),$(this).closest(".labels-list-item").removeClass("edit")}),$(document).on("ajaxSuccess",".js-create-label",function(e,t,n,r){return this.reset(),$(this).nextAll(".table-list").prepend(r),s(1),i(this,!1)}),$(document).on("ajaxSuccess",".js-update-label",function(e,t,n,r){return $(this).closest(".labels-list-item").replaceWith(r)}),$(document).on("ajaxSend",".js-update-label, .js-create-label",function(){return $(this).find(".error").text("")}),$(document).on("ajaxError",".js-update-label, .js-create-label",function(e,t){return $(this).find(".error").text(t.responseText),!1}),$(document).on("ajaxSuccess",".js-delete-label",function(){var e;return e=s(-1),i(this,0===e),$(this).closest(".labels-list-item").fadeOut()})}.call(this),function(){$.hashChange(function(e){var t,n,r,i;return i=e.newURL,(r=i.match(/\/issues#issue\/(\d+)$/))?(t=r[0],n=r[1],window.location=i.replace(/\/?#issue\/.+/,"/"+n)):void 0}),$.hashChange(function(e){var t,n,r,i,s;return s=e.newURL,
(i=s.match(/\/issues#issue\/(\d+)\/comment\/(\d+)$/))?(t=i[0],r=i[1],n=i[2],window.location=s.replace(/\/?#issue\/.+/,"/"+r+"#issuecomment-"+n)):void 0})}.call(this),function(){var e;$.observe(".js-issues-list-check:checked",{add:function(){return $(this).closest(".js-issue-row").addClass("selected")},remove:function(){return $(this).closest(".js-issue-row").removeClass("selected")}}),$(document).on("navigation:keydown",".js-issue-row",function(t){return"x"===t.hotkey?(e(this),!1):void 0}),$("#js-issues-search").focus(function(e){return this.value=this.value}),e=function(e){var t;(t=$(e).find(".js-issues-list-check")[0])&&(t.checked=!t.checked,$(t).trigger("change"))}}.call(this),function(){var e,t,n,r,i;e=require("github/fetch").fetchText,$(document).on("selectmenu:selected",".js-issue-sidebar-form",function(e){var t,r,i,s,o;return r=e.target,r.hasAttribute("data-assignee-value")&&(i=r.closest(".js-menu-content"),t=i.querySelector(".js-assignee-field"),t.value=r.getAttribute("data-assignee-value"),t.disabled=!1),o=function(e){return function(){return e.matches("form")?$(e).submit():n(e)}}(this),s=r.closest(".js-select-menu").hasAttribute("data-multiple"),s?($(this).off(".deferredSubmit"),$(this).one("menu:deactivate.deferredSubmit",o)):o()}),i=function(e,t){var n;e.replaceWith.apply(e,$.parseHTML(t)),n=document.querySelector(".js-discussion-sidebar-item .js-assignee-field"),n&&n.value&&(n.disabled=!1)},$(document).on("ajaxSuccess",".js-discussion-sidebar-item",function(e,t,n,r){var s;s=e.target.classList,s.contains("js-issue-sidebar-form")&&i(this,r)}),$(document).on("click","div.js-issue-sidebar-form .js-issue-assign-self",function(e){var t;t=this.closest(".js-issue-sidebar-form"),n(t,{name:this.name,value:this.value}),e.preventDefault()}),n=function(t,n){var s;s=r(t),n&&s.push(n),s.push({name:"authenticity_token",value:t.closest("form").elements.authenticity_token.value}),e(t.getAttribute("data-url"),{method:"post",body:$.param(s),headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(function(e){return i(t.closest(".js-discussion-sidebar-item"),e)})},r=function(e){var n,r,i,s,o,a;for(n=e.closest("form"),o=$(n).serializeArray(),a=[],r=0,i=o.length;i>r;r++)s=o[r],$.contains(e,t(n,s))&&a.push(s);return a},t=function(e,t){var n,r,i,s;for(s=e.elements,r=0,i=s.length;i>r;r++)if(n=s[r],n.name===t.name&&n.value===t.value)return n}}.call(this),function(){var e,t,n;n=require("github/fetch"),e=n.fetchJSON,t=n.fetchPoll,$(document).on("change",".js-issues-list-check",function(){$("#js-issues-toolbar").toggleClass("triage-mode",$(".js-issues-list-check:checked").length>0)}),$(document).on("change",".js-issues-list-check",function(){var e;e=$(".js-issues-list-check:checked"),$("#js-issues-toolbar .js-issues-toolbar-triage .js-select-menu").data("contents-data",e).addClass("js-load-contents")}),$(document).on("selectmenu:selected",".js-issues-toolbar-triage .js-navigation-item",function(){var e,t,n,r,i,s;n=$(this).closest(".js-menu-container").hasClass("js-label-select-menu"),e=$(this).closest("form"),i=$(this).hasClass("selected"),r=$(this).attr("data-name"),s=$(this).attr("data-value"),t=n?$("<input>",{type:"hidden",name:r+"["+s+"]",value:i?"1":"0"}):$("<input>",{type:"hidden",name:r,value:i?s:""}),setImmediate(function(e){return function(){return $(e).menu("deactivate")}}(this)),e.find(".js-issues-triage-fields").append(t),e.addClass("will-submit")}),$(document).on("menu:deactivate",".js-issues-toolbar-triage .js-menu-container",function(n){var r,i;(r=this.querySelector("form.will-submit"))&&(this.classList.add("is-loading"),i=e(r.getAttribute("action"),{method:r.getAttribute("method"),body:$.param($(r).serializeArray()),headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}),i.then(function(e){return function(n){var r,i,s;return s=t(n.job.url,{headers:{accept:"application/json"}}),r=function(){return $(e).menu("deactivate"),location.reload()},i=function(){return e.classList.add("has-error")},s.then(r,i)}}(this)),r.classList.remove("will-submit"),n.preventDefault())})}.call(this),DateInput=function(e){function t(n,r){"object"!=typeof r&&(r={}),e.extend(this,t.DEFAULT_OPTS,r),this.input=e(n),this.bindMethodsToObj("show","hide","hideIfClickOutside","keydownHandler","selectDate"),this.build(),this.selectDate(),this.show(),this.input.hide(),this.input.data("datePicker",this)}return t.DEFAULT_OPTS={month_names:["January","February","March","April","May","June","July","August","September","October","November","December"],short_month_names:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],short_day_names:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],start_of_week:1},t.prototype={build:function(){var t=e('<p class="month_nav"><span class="date-button prev" title="[Page-Up]">\u25c0</span> <span class="month-name"></span> <span class="date-button next" title="[Page-Down]">\u25b6</span></p>');this.monthNameSpan=e(".month-name",t),e(".prev",t).click(this.bindToObj(function(){this.moveMonthBy(-1)})),e(".next",t).click(this.bindToObj(function(){this.moveMonthBy(1)}));var n=e('<p class="year_nav"><span class="date-button prev" title="[Ctrl+Page-Up]">\u25c0</span> <span class="year-name"></span> <span class="date-button next" title="[Ctrl+Page-Down]">\u25b6</span></p>');this.yearNameSpan=e(".year-name",n),e(".prev",n).click(this.bindToObj(function(){this.moveMonthBy(-12)})),e(".next",n).click(this.bindToObj(function(){this.moveMonthBy(12)}));var r=e("<div></div>").append(t,n),i="<table><thead><tr>";e(this.adjustDays(this.short_day_names)).each(function(){i+="<th>"+this+"</th>"}),i+="</tr></thead><tbody></tbody></table>",this.dateSelector=this.rootLayers=e('<div class="date_selector"></div>').append(r,i).insertAfter(this.input),this.tbody=e("tbody",this.dateSelector),this.input.change(this.bindToObj(function(){this.selectDate()})),this.selectDate()},selectMonth:function(t){var n=new Date(t.getFullYear(),t.getMonth(),1);if(!this.currentMonth||this.currentMonth.getFullYear()!=n.getFullYear()||this.currentMonth.getMonth()!=n.getMonth()){this.currentMonth=n;for(var r=this.rangeStart(t),i=this.rangeEnd(t),s=this.daysBetween(r,i),o="",a=0;s>=a;a++){var c=new Date(r.getFullYear(),r.getMonth(),r.getDate()+a,12,0);this.isFirstDayOfWeek(c)&&(o+="<tr>"),o+=c.getMonth()==t.getMonth()?'<td class="selectable_day" date="'+this.dateToString(c)+'">'+c.getDate()+"</td>":'<td class="unselected_month" date="'+this.dateToString(c)+'">'+c.getDate()+"</td>",this.isLastDayOfWeek(c)&&(o+="</tr>")}this.tbody.empty().append(o),this.monthNameSpan.empty().append(this.monthName(t)),this.yearNameSpan.empty().append(this.currentMonth.getFullYear()),e(".selectable_day",this.tbody).mousedown(this.bindToObj(function(t){this.changeInput(e(t.target).attr("date"))})),e("td[date='"+this.dateToString(new Date)+"']",this.tbody).addClass("today"),e("td.selectable_day",this.tbody).mouseover(function(){e(this).addClass("hover")}),e("td.selectable_day",this.tbody).mouseout(function(){e(this).removeClass("hover")})}e(".selected",this.tbody).removeClass("selected"),e('td[date="'+this.selectedDateString+'"]',this.tbody).addClass("selected")},selectDate:function(e){"undefined"==typeof e&&(e=this.stringToDate(this.input.val())),e||(e=new Date),this.selectedDate=e,this.selectedDateString=this.dateToString(this.selectedDate),this.selectMonth(this.selectedDate)},resetDate:function(){e(".selected",this.tbody).removeClass("selected"),this.changeInput("")},changeInput:function(e){this.input.val(e).change(),this.hide()},show:function(){this.rootLayers.css("display","block"),e([window,document.body]).click(this.hideIfClickOutside),this.input.unbind("focus",this.show),this.rootLayers.keydown(this.keydownHandler),this.setPosition()},hide:function(){},hideIfClickOutside:function(e){e.target==this.input[0]||this.insideSelector(e)||this.hide()},insideSelector:function(t){return $target=e(t.target),$target.parents(".date_selector").length||$target.is(".date_selector")},keydownHandler:function(e){switch(e.keyCode){case 9:case 27:return void this.hide();case 13:this.changeInput(this.selectedDateString);break;case 33:this.moveDateMonthBy(e.ctrlKey?-12:-1);break;case 34:this.moveDateMonthBy(e.ctrlKey?12:1);break;case 38:this.moveDateBy(-7);break;case 40:this.moveDateBy(7);break;case 37:this.moveDateBy(-1);break;case 39:this.moveDateBy(1);break;default:return}e.preventDefault()},stringToDate:function(e){var t;return(t=e.match(/^(\d{1,2}) ([^\s]+) (\d{4,4})$/))?new Date(t[3],this.shortMonthNum(t[2]),t[1],12,0):null},dateToString:function(e){return e.getDate()+" "+this.short_month_names[e.getMonth()]+" "+e.getFullYear()},setPosition:function(){var e=this.input.offset();this.rootLayers.css({top:e.top+this.input.outerHeight(),left:e.left}),this.ieframe&&this.ieframe.css({width:this.dateSelector.outerWidth(),height:this.dateSelector.outerHeight()})},moveDateBy:function(e){var t=new Date(this.selectedDate.getFullYear(),this.selectedDate.getMonth(),this.selectedDate.getDate()+e);this.selectDate(t)},moveDateMonthBy:function(e){var t=new Date(this.selectedDate.getFullYear(),this.selectedDate.getMonth()+e,this.selectedDate.getDate());t.getMonth()==this.selectedDate.getMonth()+e+1&&t.setDate(0),this.selectDate(t)},moveMonthBy:function(e){var t=new Date(this.currentMonth.getFullYear(),this.currentMonth.getMonth()+e,this.currentMonth.getDate());this.selectMonth(t)},monthName:function(e){return this.month_names[e.getMonth()]},bindToObj:function(e){var t=this;return function(){return e.apply(t,arguments)}},bindMethodsToObj:function(){for(var e=0;e<arguments.length;e++)this[arguments[e]]=this.bindToObj(this[arguments[e]])},indexFor:function(e,t){for(var n=0;n<e.length;n++)if(t==e[n])return n},monthNum:function(e){return this.indexFor(this.month_names,e)},shortMonthNum:function(e){return this.indexFor(this.short_month_names,e)},shortDayNum:function(e){return this.indexFor(this.short_day_names,e)},daysBetween:function(e,t){return e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),t=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),(t-e)/864e5},changeDayTo:function(e,t,n){var r=n*(Math.abs(t.getDay()-e-7*n)%7);return new Date(t.getFullYear(),t.getMonth(),t.getDate()+r)},rangeStart:function(e){return this.changeDayTo(this.start_of_week,new Date(e.getFullYear(),e.getMonth()),-1)},rangeEnd:function(e){return this.changeDayTo((this.start_of_week-1)%7,new Date(e.getFullYear(),e.getMonth()+1,0),1)},isFirstDayOfWeek:function(e){return e.getDay()==this.start_of_week},isLastDayOfWeek:function(e){return e.getDay()==(this.start_of_week-1)%7},adjustDays:function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[(n+this.start_of_week)%7];return t}},t}(jQuery),function(){$.observe("input.js-date-input",function(){$(this).next(".date_selector").remove(),new DateInput(this)}),$(document).on("click",".js-date-input-clear",function(){return $("input.js-date-input").data("datePicker").resetDate(),!1}),$(document).on("change click",".js-milestone-edit-form",function(){var e;e=this.querySelector(".js-milestone-edit-cancel"),$(this).hasDirtyFields()?e.setAttribute("data-confirm",e.getAttribute("data-confirm-changes")):e.removeAttribute("data-confirm")})}.call(this),function(){$(document).on("pjax:clicked",".js-directory-link",function(){return $(this).closest("tr").addClass("is-loading"),$(document.body).addClass("disables-context-loader")}),$(document).on("pjax:click",".js-octicon-loaders a",function(){return $(this).addClass("is-loading"),$(document).one("pjax:end",function(e){return function(){return $(e).removeClass("is-loading")}}(this))})}.call(this),function(){var e,t;e=function(e){return e.classList.contains("read")?void 0:(e.classList.toggle("unread"),e.classList.toggle("read"))},t=function(e){return e.classList.contains("unread")?void 0:(e.classList.toggle("unread"),e.classList.toggle("read"))},$(document).on("click",".js-notification-target",function(t){return t.which>1?void 0:e(this.closest(".js-notification"))}),$(document).on("ajaxSuccess",".js-delete-notification",function(){return e(this.closest(".js-notification"))}),$(document).on("ajaxSuccess",".js-mute-notification",function(){var t;return e(this.closest(".js-notification")),t=this.closest(".js-notification"),t.classList.contains("muted")?this.action=this.action.replace("unmute","mute"):this.action=this.action.replace("mute","unmute"),t.classList.toggle("muted")}),$(document).on("ajaxSuccess",".js-unmute-notification",function(){var e;return e=this.closest(".js-notification"),e.classList.contains("muted")?this.action=this.action.replace("unmute","mute"):this.action=this.action.replace("mute","unmute"),e.classList.toggle("muted")}),$(document).on("ajaxSuccess",".js-mark-visible-as-read",function(){var e,t,n,r,i,s,o;for(e=this.closest(".js-notifications-browser"),i=e.querySelectorAll(".unread"),n=0,r=i.length;r>n;n++)t=i[n],t.classList.remove("unread"),t.classList.add("read");return null!=(s=e.querySelector(".js-mark-visible-as-read"))&&s.classList.add("mark-all-as-read-confirmed"),null!=(o=e.querySelector(".js-mark-as-read-confirmation"))?o.classList.add("mark-all-as-read-confirmed"):void 0}),$(document).on("ajaxSuccess",".js-mark-remaining-as-read",function(){var e,t,n;return e=this.closest(".js-notifications-browser"),null!=(t=e.querySelector(".js-mark-remaining-as-read"))&&t.classList.add("hidden"),null!=(n=e.querySelector(".js-mark-remaining-as-read-confirmation"))?n.classList.remove("hidden"):void 0}),$(document).on("navigation:keydown",".js-notification",function(e){switch(e.hotkey){case"I":case"e":case"y":return $(this).find(".js-delete-notification").submit(),!1;case"M":case"m":return $(this).find(".js-mute-notification").submit(),!1}}),$(document).on("navigation:keyopen",".js-notification",function(t){return e(this)}),$(document).on("ajaxSend",".js-notifications-subscription",function(){return this.querySelector(".js-spinner").classList.remove("hidden")}),$(document).on("ajaxComplete",".js-notifications-subscription",function(){return this.querySelector(".js-spinner").classList.add("hidden")})}.call(this),function(){$(document).on("ajaxSend",".js-auto-subscribe-toggle",function(){return $(this).find(".js-status-indicator").removeClass("status-indicator-success").removeClass("status-indicator-loading").addClass("status-indicator-loading")}),$(document).on("ajaxError",".js-auto-subscribe-toggle",function(){return $(this).find(".js-status-indicator").removeClass("status-indicator-loading").addClass("status-indicator-failed")}),$(document).on("ajaxSuccess",".js-auto-subscribe-toggle",function(){return $(this).find(".js-status-indicator").removeClass("status-indicator-loading").addClass("status-indicator-success")}),$(document).on("ajaxSend",".js-unignore-form, .js-ignore-form",function(){return $(this).closest(".js-subscription-row").addClass("loading")}),$(document).on("ajaxError",".js-unignore-form, .js-ignore-form",function(){return $(this).closest(".js-subscription-row").removeClass("loading"),$(this).find(".btn-sm").addClass("btn-danger").attr("title","There was a problem unignoring this repo.")}),$(document).on("ajaxSuccess",".js-unignore-form",function(){return $(this).closest(".js-subscription-row").removeClass("loading").addClass("unsubscribed")}),$(document).on("ajaxSuccess",".js-ignore-form",function(){return $(this).closest(".js-subscription-row").removeClass("loading unsubscribed")}),$(document).on("ajaxSend",".js-unsubscribe-form, .js-subscribe-form",function(){return $(this).closest(".js-subscription-row").addClass("loading")}),$(document).on("ajaxError",".js-unsubscribe-form, .js-subscribe-form",function(){return $(this).closest(".js-subscription-row").removeClass("loading"),$(this).find(".btn-sm").addClass("btn-danger").attr("title","There was a problem with unsubscribing :(")}),$(document).on("ajaxSuccess",".js-unsubscribe-form",function(){return $(this).closest(".js-subscription-row").removeClass("loading").addClass("unsubscribed")}),$(document).on("ajaxSuccess",".js-subscribe-form",function(){return $(this).closest(".js-subscription-row").removeClass("loading unsubscribed")}),$(document).on("ajaxSuccess",".js-thread-subscription-status",function(e,t,n,r){return $(".js-thread-subscription-status").updateContent(r)})}.call(this),function(){var e,t,n,r;$(document).on("ajaxSend",".js-toggler-container .js-set-approval-state",function(){return this.closest(".js-toggler-container").classList.add("loading")}),$(document).on("ajaxComplete",".js-toggler-container .js-set-approval-state",function(){return this.closest(".js-toggler-container").classList.remove("loading")}),$(document).on("ajaxSuccess",".js-toggler-container .js-set-approval-state",function(){return this.closest(".js-toggler-container").classList.add("on")}),$(document).on("ajaxSuccess",".js-request-approval-facebox-form",function(){var e;return e=this.getAttribute("data-container-id"),document.getElementById(e).classList.add("on"),$(document).trigger("close.facebox")}),r=function(e){return e.querySelectorAll(".js-integrations-install-repo-picked .js-repository-picker-result").length},e=function(e){return r(e)>0},n=function(e){var t;return(t=+e.getAttribute("data-max-repos"))?r(e)>=t:void 0},t=function(t){var n;return n=t.querySelector(".js-all-repositories-radio"),n.checked||e(t)},$.observe(".js-integrations-install-form",function(){var e,r,i,s,o,a;o=this,s=o.querySelector(".js-integrations-install-form-submit"),e=o.querySelector(".js-autocomplete"),i=e.getAttribute("data-search-url"),r=o.querySelector(".js-autocomplete-field"),a=function(){return s.disabled=!t(this),r.disabled=n(this),o.querySelector(".flash").classList.toggle("hidden",!n(this))},this.addEventListener("change",a),a.call(this),$(document).on("click",".js-repository-picker-remove",function(){var e;return e=this.closest(".js-repository-picker-result"),e.remove(),a.call(o)}),$(document).on("focus",".js-integrations-install-repo-picker .js-autocomplete-field",function(){return document.querySelector(".js-select-repositories-radio").checked=!0,a.call(o)}),$(document).on("autocomplete:autocompleted:changed",".js-integrations-install-repo-picker",function(){var t,n,r,s,o;for(o=i,s=document.querySelectorAll(".js-integrations-install-repo-picked .js-selected-repository-field"),n=0,r=s.length;r>n;n++)t=s[n],o+=~o.indexOf("?")?"&":"?",o+=t.name+"="+encodeURIComponent(t.value);return e.setAttribute("data-search-url",o)}),$(document).on("autocomplete:result",".js-integrations-install-repo-picker",function(e,t){var n,i;return i=this.querySelector("#repo-result-"+t),n=o.querySelector(".js-integrations-install-repo-picked"),i.classList.remove("hidden"),n.insertBefore(i,n.firstChild),r.value="",o.querySelector(".js-autocomplete-results").innerHTML="",a.call(o)})})}.call(this),function(){$(document).on("submit",".org form[data-results-container]",function(){return!1})}.call(this),function(){var e,t;t=require("github/fetch").fetchText,e=function(){return $(".js-invitation-toggle-team:checked").visible()},$(document).on("click",".js-invitations-team-suggestions-view-all",function(){return t(this.href).then(function(t){return function(n){var r,i;return i=e().map(function(){return this.value}),r=$(t).closest("ul"),r.html(n),i.each(function(){return r.find(".js-invitation-toggle-team[value="+this+"]").prop("checked",!0)})}}(this)),!1})}.call(this),function(){var e,t,n,r,i,s,o;s=require("github/inflector").pluralizeNode,i=require("github/number-helpers").parseFormattedNumber,e=[],t=function(){var e,t,n;return e=$(".js-person-grid"),t=e.find(".js-org-person").has(".js-org-person-toggle:checked"),function(){var e,r,i;for(i=[],e=0,r=t.length;r>e;e++)n=t[e],i.push($(n).attr("data-id"));return i}().sort()},o=function(e,t){var n,r,o,a;return null==t&&(t="+"),n=$("."+e),r=n.siblings(".js-stat-label"),a=i(n.text()),o=function(){switch(t){case"+":return a+1;case"-":return a-1;default:return a}}(),n.text(o),s(o,r[0])},r=null,$(document).on("change",".js-org-person-toggle",function(n){var i,s,o,a;return i=$(".js-org-toolbar"),s=i.find(".js-member-selected-actions"),o=t(),a=o.length>0,JSON.stringify(o)!==JSON.stringify(e)?(e=o,i.find(".js-org-toolbar-select-all-label").toggleClass("has-selected-members",a),$(".js-member-not-selected-actions").toggleClass("hidden",a),s.toggleClass("hidden",!a),i.addClass("disabled"),null!=r&&r.abort(),r=$.ajax({url:s.attr("data-toolbar-actions-url"),data:{member_ids:o}}),r.done(function(e,t,n){return s.html(e)}),r.always(function(){return i.removeClass("disabled")})):void 0}),$(document).on("click",".js-member-remove-confirm-button",function(e){return e.preventDefault(),$.facebox(function(){var n;return n=$.ajax({url:$(e.target).attr("data-url"),data:{member_ids:t()}}),n.done(function(e){return $.facebox(e)})})}),$(document).on("click",".js-member-search-filter",function(){var e,t;return t=$(this).attr("data-filter"),e=$(".js-member-filter-field"),e.val(t+" "),e.focus(),e.trigger("throttled:input"),!1}),$(document).on("ajaxSend ajaxComplete",".js-add-team-member-or-repo-form",function(e){return this===e.target?this.classList.toggle("is-sending","ajaxSend"===e.type):void 0}),n=navigator.userAgent.match(/Macintosh/)?"meta":"ctrl",$(document).onFocusedKeydown(".js-add-team-member-or-repo-form .js-autocomplete-field",function(){return function(e){return"enter"===e.hotkey||e.hotkey===n+"+enter"?e.preventDefault():void 0}}),$(document).on("autocomplete:result",".js-bulk-add-team-form .js-autocomplete-field",function(e){var t,n;return n=$(this).data("autocompleted"),n.indexOf("/")>0?(t=this.form.action,$.sudo().then(function(){return $.facebox(function(){var e;return e=$.ajax({url:t,method:"post",data:{member:n}}),e.done(function(e){return $.facebox(e)})})}),e.stopPropagation()):void 0}),$(document).on("autocomplete:result",".js-add-team-member-or-repo-form",function(){return setImmediate(function(e){return function(){return $(e).submit()}}(this))}),$(document).on("ajaxSuccess",".js-add-team-member-or-repo-form",function(e,t){var n,r,i,s,a,c,u,l,d;try{l=JSON.parse(t.responseText)}catch(h){}if(l?(n=$(l.list_item_html),l.stat_count_class&&o(l.stat_count_class,"+")):n=$(t.responseText),r=$(".js-member-list"),this.querySelector(".js-autocomplete-field").value="",d=n.attr("data-login"))for(u=r.children(),i=0,a=u.length;a>i;i++)if(s=u[i],s.getAttribute("data-login")===d)return;return r.prepend(n),c=!r.children().length,r.closest(".js-org-section").toggleClass("is-empty",c),r.siblings(".js-subnav").addClass("subnav-bordered")}),$(document).on("ajaxSuccess",".js-remove-team-repository",function(e,t,n,r){var i,s,a,c;return s=$(this),i=s.closest(".js-org-section"),a=i.find(".js-org-list"),s.closest(".js-org-repo").remove(),c=!a.children().length,i.toggleClass("is-empty",c),c&&(a.removeClass("table-list-bordered"),a.siblings(".js-subnav").removeClass("subnav-bordered")),o("js-repositories-count","-")}),$(document).on("ajaxError",".js-add-team-member-or-repo-form, .js-remove-team-repository",function(e,t){var n,r,i;if(!/<html/.test(t.responseText)){r=$(".js-member-list").siblings(".js-blankslate");try{i=JSON.parse(t.responseText),n=i.message_html}catch(s){n=$(t.responseText)}return $(".flash-messages").remove(),r.before(n),!1}})}.call(this),function(){$(document).on("click",".js-remove-person-from-org-button",function(e){var t;return e.preventDefault(),t=$(e.target),$.facebox(function(){var e;return e=$.ajax({url:t.attr("data-url"),data:{member_ids:[t.attr("data-user-id")],redirect_to_path:t.attr("data-redirect-to-path")}}),e.done(function(e){return $.facebox(e)})})})}.call(this),function(){var e,t,n,r,i,s;t=require("github/debounce")["default"],$(document).on("change",".js-customize-member-privileges-default-repository-permission-radio",function(){var e;return e=document.querySelector(".js-migrate-ability-list-item-default-repository-permission"),e.classList.toggle("migrate-ability-not-possible",n()),s()}),$(document).on("change",".js-customize-member-privileges-repository-creation-radio",function(){var e;return e=document.querySelector(".js-migrate-ability-list-item-members-can-create-repositories"),e.classList.toggle("migrate-ability-not-possible",r()),s()}),$(document).on("change",".js-customize-member-privileges-team-privacy-radio",function(){var e;return e=document.querySelector(".js-migrate-ability-list-item-team-privacy"),e.classList.toggle("migrate-ability-not-possible",i()),s()}),s=function(){var t;return t=document.querySelector(".js-save-member-privileges-button-container"),t.classList.toggle("member-privilege-radios-preserved",e())},n=function(){return""===document.querySelector(".js-customize-member-privileges-default-repository-permission-radio:checked").value},r=function(){return"0"===document.querySelector(".js-customize-member-privileges-repository-creation-radio:checked").value},i=function(){return"secret"===document.querySelector(".js-customize-member-privileges-team-privacy-radio:checked").value},e=function(){return n()&&r()&&i()},$(function(){var e,n,r,i,o,a,c,u,l;return a=document.querySelector(".js-org-migration-settings-sidebar"),null!=a?(c=a.getBoundingClientRect(),u=16,l=c.top+window.pageYOffset-u,n=a.style.position,r=a.style.top,e=a.style.left,i=a.style.width,o=t(function(){var t,s;return t=a.parentNode.getBoundingClientRect(),s=t.right-c.width,window.pageYOffset>=l?(a.style.position="fixed",a.style.top=u+"px",a.style.left=s+"px",a.style.width="250px"):(a.style.position=n,a.style.top=r,a.style.left=e,a.style.width=i)},5),window.addEventListener("scroll",o),window.addEventListener("resize",o),s()):void 0})}.call(this),function(){var e;$.observe(".js-rename-owners-team-input",function(){$(this).on("throttled:input",function(){var t,n,r;return t=this.closest("form"),n=this.value.trim().toLowerCase(),"owners"===n||""===n?e(!1,""):(t.classList.add("is-sending"),r=$.get(this.getAttribute("data-check-url"),{name:n}),r.done(function(n,r){var i;return n=n.trim(),i=""===n,t.classList.remove("is-sending"),e(i,n)}))})}),e=function(e,t){return document.querySelector(".js-rename-owners-team-button").classList.toggle("disabled",!e),document.querySelector(".js-rename-owners-team-errors").innerHTML=t,document.querySelector(".js-rename-owners-team-note").classList.toggle("hidden",""!==t)}}.call(this),function(){$(document).onFocusedInput(".js-new-organization-name",function(){var e;return(e=this.closest("dd").querySelector(".js-field-hint-name"))?function(){return"innerText"in e?e.innerText=this.value:e.textContent=this.value}:void 0}),$(document).on("ajaxSend",".js-org-list-item .js-org-remove-item",function(){return this.closest(".js-org-list-item").classList.add("hidden")}),$(document).on("ajaxSuccess",".js-org-list-item .js-org-remove-item",function(){return this.closest(".js-org-list-item").remove()}),$(document).on("ajaxError",".js-org-list-item .js-org-remove-item",function(){var e;return this.closest(".js-org-list-item").classList.remove("hidden"),(e=this.getAttribute("data-error-message"))?alert(e):void 0})}.call(this),function(){var e,t;$(document).on("click",".js-org-billing-plans .js-choose-plan",function(t){return e($(this).closest(".js-plan-row")),!1}),e=function(e){var n,r,i,s;return i=e.attr("data-name"),r=parseInt(e.attr("data-cost"),10),n=parseInt(null!=(s=e.attr("data-balance"))?s:"0",10),$(".js-org-billing-plans").find(".js-plan-row, .js-choose-plan").removeClass("selected"),e.find(".js-choose-plan").addClass("selected"),e.addClass("selected"),$(".js-plan").val(i),0===r&&0===n?$(".js-billing-section").addClass("has-removed-contents"):($(".js-billing-section").removeClass("has-removed-contents"),null!=e.attr("data-balance")?t(i):void 0)},t=function(e){return $(".js-plan-change-message").addClass("is-hidden"),$('.js-plan-change-message[data-name="'+e+'"]').removeClass("is-hidden")},$(function(){return $(".selected .js-choose-plan").click()})}.call(this),function(){var e;e=function(e){var t,n,r,i;n=e.selectors;for(r in n)i=n[r],$(r).text(i);return t=100===e.filled_seats_percent,$(".js-live-update-seats-percent").css("width",e.filled_seats_percent+"%"),$(".js-need-more-seats").toggleClass("hidden",!t),$(".js-add-team-member-or-repo-form").toggleClass("hidden",t)},$(document).on("ajaxSuccess",".js-per-seat-invite-field, .js-per-seat-invite .js-org-remove-item",function(t,n){return e(JSON.parse(n.responseText))})}.call(this),function(){$(document).on("click",".js-repo-search-filter",function(){var e,t,n,r,i;return t=$(this).attr("data-filter"),n=$(this).attr("data-negate"),e=$(".js-repo-filter-field"),r=e.val(),r.indexOf(n)>-1&&(r=r.replace(n,""),r=r.replace(/^\s*/,"")),-1===r.indexOf(t)&&(i=r&&r.match(/\s$/)?"":" ",e.val(r+(""+i+t+" ")),e.focus(),e.trigger("throttled:input")),$("body").removeClass("menu-active"),!1}),$.observe(".js-repository-fallback-search",function(){$(this).on("keypress",function(e){var t,n,r,i;if(13===e.which)return t=$(this),n=t.attr("data-host"),r=t.attr("data-org"),i=t.val(),document.location="http://"+n+"/search?q=user%3A"+r+"+"+i+"&type=Repositories"})}),$(document).on("click",".js-team-repo-higher-access",function(e){return e.preventDefault(),$.facebox(function(){var t;return t=$.ajax({url:$(e.target).attr("data-url")}),t.done(function(e){return $.facebox(e)})})})}.call(this),function(){$(document).on("selectmenu:selected",".js-select-repo-permission",function(){return $(this).submit()}),$(document).on("ajaxSend",".js-select-repo-permission",function(){return this.classList.remove("was-successful")}),$(document).on("ajaxSuccess",".js-select-repo-permission",function(e,t,n,r){var i;return this.classList.add("was-successful"),null!=(i=this.closest(".js-org-repo"))?i.classList.toggle("with-higher-access",r.members_with_higher_access):void 0})}.call(this),function(){$(document).on("click",".js-change-default-repository-permission-confirm",function(e){e.preventDefault(),$(document).find(".js-change-default-repository-permission-form").submit()})}.call(this),function(){$(document).on("autocomplete:autocompleted:changed",".js-team-add-user-name",function(e){var t;return t=$(".js-team-add-user-button")[0],t.disabled=!$(this).data("autocompleted")}),$(document).on("click",".js-team-remove-user",function(e){var t,n;return e.preventDefault(),$(".js-team-add-user-form").removeClass("hidden"),$(".js-team-add-user-name").focus(),t=$(this).closest("li").remove(),n=t.attr("data-login")}),$(document).on("click",".js-team-add-user-button",function(e){var t,n,r,i,s,o;if(e.preventDefault(),n=$(".js-team-add-user-name"),o=n.val(),o&&n.data("autocompleted")){for(n.val(""),s=$(".js-team-user-logins li"),t=0,r=s.length;r>t;t++)if(i=s[t],$(i).attr("data-login")===o)return;return $.sudo().then(function(){return $.ajax({url:$(".js-team-add-user-form").attr("data-template-url"),data:{member:o},success:function(e){return $(".js-team-user-logins").append(e),$(".js-login-field").prop("disabled",!1),$(".js-team-add-user-form").addClass("hidden")}}),$(".js-team-add-user-name").focus()})}})}.call(this),function(){$(document).on("ajaxSend",".js-ldap-import-groups-container",function(e,t,n){return t.setRequestHeader("X-Context","import")}),$(document).on("autocomplete:autocompleted:changed",".js-team-ldap-group-field",function(e){var t;(t=this.closest(".js-ldap-group-adder"))&&(t.classList.remove("is-exists"),t.querySelector(".js-ldap-group-adder-button").disabled=!$(this).data("autocompleted"))}),$(document).on("navigation:open",".js-team-ldap-group-autocomplete-results .js-navigation-item",function(){var e,t;return e=$(this).closest(".js-ldap-group-adder"),t=$(this).attr("data-dn"),e.find(".js-team-ldap-dn-field").val(t),$(this).closest(".js-ldap-import-groups-container").find(".js-ldap-group-dn").map(function(n,r){$(r).text()===t&&(e.addClass("is-exists"),e[0].querySelector(".js-ldap-group-adder-button").disabled=!0)})}),$(document).on("ajaxSend",".js-import-container",function(e,t,n){this.classList.add("is-importing"),this.querySelector(".js-ldap-group-adder-button").disabled=!0}),$(document).on("ajaxComplete",".js-import-container",function(e,t,n){
return $(this).removeClass("is-importing")}),$(document).on("ajaxSuccess",".js-ldap-group-adder",function(e,t,n,r){return $(this).closest(".js-ldap-import-groups-container").removeClass("is-empty").find(".js-ldap-imported-groups").prepend($(r)),this.reset(),$(this).find(".js-team-ldap-group-field").focus(),this.querySelector(".js-ldap-group-adder-button").disabled=!0,$(".js-import-form-actions").removeClass("hidden")}),$(document).on("submit",".js-team-remove-group",function(e){this.closest(".js-team").classList.add("is-removing"),document.querySelector(".js-team-ldap-group-field").focus()}),$(document).on("ajaxSuccess",".js-team-remove-group",function(){this.closest(".js-team").remove(),document.querySelector(".js-team:not(.is-removing)")||(document.querySelector(".js-ldap-import-groups-container").classList.add("is-empty"),document.querySelector(".js-import-form-actions").classList.add("hidden"))}),$(document).on("ajaxError",".js-team-remove-group",function(){this.closest(".js-team").classList.remove("is-removing")}),$(document).on("click",".js-edit-team",function(e){return $(this).closest(".js-team").hasClass("is-removing")?!1:(e.preventDefault(),$(this).closest(".js-team").addClass("is-editing"),$(this).closest(".js-team").find(".js-team-name-field").focus())}),$(document).on("click",".js-save-button",function(){return $(this).hasClass("disabled")?!1:$(this).closest(".js-team").addClass("is-sending")}),$(document).on("click",".js-cancel-team-edit",function(e){var t,n;return e.preventDefault(),n=$(this).closest(".js-team").removeClass("is-editing"),t=n.find(".js-team-form").removeClass("is-exists"),t.find(".js-slug").text(t.find(".js-slug").attr("data-original-slug")),t[0].reset()}),$(document).on("ajaxSuccess",".js-team-form:not(.is-checking)",function(e,t,n,r){return t.nameCheck?void 0:$(this).closest(".js-team").removeClass("is-editing").replaceWith($(r))}),$(document).on("ajaxSuccess",".js-team-form.is-checking",function(e,t,n,r){var i,s;return i=$(this).removeClass("is-checking"),"function"==typeof(s=i.find(".js-team-name-field")).removeData&&s.removeData("autocheck-xhr"),r.error?(i.find(".js-save-button").addClass("disabled"),"exists"===r.error?(i.addClass("is-exists"),i.find(".js-slug").html(r.slug)):void 0):(i.find(".js-slug").html(r.slug),i.find(".js-save-button").removeClass("disabled"))}),$(document).on("ajaxError",".js-team-form",function(e,t,n,r){return t.nameCheck&&"abort"===t.statusText?!1:void 0}),$.observe(".js-team-name-field",function(){$(this).on("throttled:input",function(){var e,t,n,r;return t=$(this),e=t.closest(".js-team-form"),null!=(n=t.data("autocheck-xhr"))&&n.abort(),e.removeClass("is-exists").addClass("is-checking"),e.find(".js-save-button").addClass("disabled"),r=$.ajax({url:t.attr("data-check-url"),type:"GET",context:this,data:{name:this.value}}),r.nameCheck=!0,t.data("autocheck-xhr",r)})})}.call(this),function(){$(document).on("click",".js-show-own-teams",function(){var e,t,n,r;return e=$(".js-team-search-field"),r=e.val(),n=$(this).attr("data-me"),-1===r.indexOf("@"+n)&&(t=r?" ":"",e.val(""+r+t+"@"+n),e.focus(),e.trigger("throttled:input")),!1})}.call(this),function(){var e,t;t=require("github/fetch").fetchText,e=function(e){var n,r,i;r=e.value.trim(),n=e.form,n.classList.add("is-sending"),n.classList.remove("is-name-check-fail"),n.classList.remove("is-name-check-success"),i=new URL(e.getAttribute("data-check-url"),window.location.origin).toString(),i+=-1===i.indexOf("?")?"?":"&",i+="name="+encodeURIComponent(r),t(i).then(function(t){var i,s,o,a,c;return n.classList.remove("is-sending"),n.querySelector(".js-team-name-errors").innerHTML=t||"",o=null!=(a=e.getAttribute("data-original"))?a.trim():void 0,s=o&&r===o,i=!!n.querySelector(".js-error"),c=(i||!r)&&!s,n.querySelector(".js-create-team-button").disabled=c,n.classList.toggle("is-name-check-fail",i),n.classList.toggle("is-name-check-success",!i&&r)})},$.observe(".js-new-team",function(){$(this).on("throttled:input",function(){return e(this)})}),$.observe(".js-new-org-team",function(){var t;t=this.querySelector(".js-new-team"),t.value&&e(t)})}.call(this),function(){var e;e=require("github/fetch").fetch,$(document).on("submit",".js-remove-team-members-form",function(){return $.sudo().then(function(t){return function(){var n;return n=$(t),e(n.attr("action"),{method:"post",body:n.serialize(),headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(function(){var e;return e=n.closest(".js-org-section"),n.closest(".js-edit-team-member").remove(),e.toggleClass("is-empty",!e.find(".js-org-list").children().length)})}}(this)),!1}),$(document).on("click",".js-team-description-toggle",function(){return $(".js-description-toggler").toggleClass("on")}),$(document).on("ajaxComplete",".js-team-description-form",function(){var e;return e=$(".js-team-description-field").val(),$(".js-description-toggler").toggleClass("on"),e.trim()?$(".js-team-description .description").text(e):$(".js-team-description .description").html("<span class='link'>This team has no description</span>")}),$(document).on("ajaxSuccess",".js-add-team-members-form",function(e,t,n,r){var i;return i=$(document).find(".js-member-listings-container"),$(document).trigger("close.facebox"),i.html(t.responseText)}),$(document).on("click",".js-rename-owners-team-next-btn",function(){return document.querySelector(".js-rename-owners-team-about-content").classList.toggle("migrate-owners-content-hidden"),document.querySelector(".js-rename-owners-team-rename-form").classList.toggle("migrate-owners-content-hidden")})}.call(this),function(){$.observe(".js-org-transform-poller",function(){var e;e=this.getAttribute("data-redirect-url"),this.addEventListener("load",function(){return window.location.href=e})})}.call(this),function(){$(function(){var e;return $("#load-readme").click(function(){var t,n,r,i,s,o;return n=$("#gollum-editor-body"),t=$("#editor-body-buffer"),i=$("#undo-load-readme"),o=t.text(),e(n,t),r=$(this),r.prop("disabled",!0),r.text(r.attr("data-readme-name")+" loaded"),i.show(),s=function(){return $(this).val()!==o&&i.hide(),n.off("change keyup",s)},n.on("change keyup",s),!1}),$("#undo-load-readme").click(function(){var t;return e($("#gollum-editor-body"),$("#editor-body-buffer")),t=$("#load-readme"),t.prop("disabled",!1),t.text("Load "+t.attr("data-readme-name")),$(this).hide(),!1}),e=function(e,t){var n,r,i;return n=$(e),r=$(t),i=n.val(),n.val(r.text()),r.text(i)}})}.call(this),function(){function e(e,t){var n=e.querySelector("table.timeline-commits > tbody"),r=t.querySelectorAll("table.timeline-commits > tbody > tr.commit");Array.from(r).forEach(function(e){n.appendChild(e)}),t.remove()}var t=".discussion-item.discussion-commits + .discussion-item.discussion-commits";$.observe(".discussion-item.discussion-commits",{add:function(){var n=document.querySelectorAll(t);Array.from(n).forEach(function(t){t.querySelector(".discussion-item-header")||e(t.previousElementSibling,t)})}})}(),function(){$(document).on("click",".js-merge-branch-action",function(e){var t,n;n=$(this),t=n.closest(".js-merge-pr"),n.fire("details:toggle",{relatedTarget:e.target},function(){}),t.performTransition(function(){this.toggleClass("open"),this.fire("details:toggled",{relatedTarget:e.target,async:!0})}),e.preventDefault()})}.call(this),function(){$(document).on("details:toggled",".js-pull-merging",function(){var e;return e=$(this).find(".js-merge-pull-request"),e.toggleClass("is-dirty",e.is($.visible))}),$(document).on("ajaxSuccess",".js-merge-pull-request",function(e,t,n,r){var i,s,o;this.reset(),$(this).removeClass("is-dirty"),s=r.updateContent;for(o in s)i=s[o],$(o).updateContent(i)}),$(document).on("session:resume",function(e){var t,n;return(n=document.getElementById(e.targetId))?(t=$(n).closest(".js-merge-pull-request"),t.closest(".js-details-container").addClass("open")):void 0})}.call(this),function(){var e;e=require("github/fetch").fetchText,$(document).on("ajaxError",".js-handle-pull-merging-errors",function(e,t){var n,r,i;return n=this.closest(".js-pull-merging"),n.classList.add("is-error"),422===t.status&&(i=t.responseText)&&(r=n.querySelector(".js-pull-merging-error"),$(r).replaceWith(i)),!1}),$(document).on("click",".js-pull-merging-refresh",function(){var t,n;return t=this.closest(".js-pull-merging"),n=t.getAttribute("data-url"),e(n).then(function(e){return $(t).replaceWith(e)}),!1})}.call(this),function(){var e;$.observeLast(".pull-request-ref-restore","last"),e=function(){var e;return e=$("#js-pull-restorable").length,$(".js-pull-discussion-timeline").toggleClass("is-pull-restorable",e)},$.observe("#js-pull-restorable",{add:e,remove:e})}.call(this),function(){var e,t;t=require("github/fetch").fetchText,e=function(e){var t;return t=e.getAttribute("data-container-id"),document.getElementById(t)},$(document).on("pjax:click",".js-pull-request-tab",function(t,n){return e(this)?!1:(n.push=!1,n.replace=!0)}),$(document).on("click",".js-pull-request-tab",function(t){var n,r,i,s,o,a;if(1===t.which&&!t.metaKey&&!t.ctrlKey&&(n=e(this))){for(o=$(".js-pull-request-tab.selected"),i=0,s=o.length;s>i;i++)a=o[i],$(a).removeClass("selected"),$(e(a)).removeClass("is-visible");return $(n).addClass("is-visible"),$(this).addClass("selected").blur(),r=$(this).attr("data-tab"),$(".js-pull-request-tab-container").attr("data-tab",r),$.support.pjax&&window.history.replaceState($.pjax.state,"",this.href),!1}}),$(document).on("ajaxSuccess","#discussion_bucket .js-inline-comment-form, #discussion_bucket .js-pull-request-review-comment-form",function(){return $("#files_bucket").remove()}),$(document).on("ajaxSuccess","#files_bucket .js-inline-comment-form, #files_bucket .js-pull-request-review-comment-form",function(){return $("#discussion_bucket").remove()}),$(document).on("socket:message",".js-pull-request-tabs",function(){t(this.getAttribute("data-url")).then(function(e){return function(t){var n,r,i,s,o,a,c,u,l,d,h;for(c=document.createDocumentFragment(),u=$.parseHTML(t),r=0,o=u.length;o>r;r++)n=u[r],c.appendChild(n);for(l=["#commits_tab_counter","#files_tab_counter","#diffstat"],h=[],s=0,a=l.length;a>s;s++)i=l[s],h.push(null!=(d=e.querySelector(i))?d.replaceWith(c.querySelector(i)):void 0);return h}}(this))}),$(document).on("socket:message",".js-pull-request-stale-files",function(){return $("#files_bucket").addClass("is-stale")})}.call(this),function(){var e,t,n,r,i,s,o,a;t=require("github/fetch").fetch,n=function(){return $(".user-interests-item").not(".hidden").length},o=function(){return 0===n()?($(".recommendations-outro").fadeOut(100),$(".recommendations-intro").fadeIn(100)):($(".recommendations-intro").fadeOut(100),$(".recommendations-outro").fadeIn(100))},a=function(){var e,t;return e=n(),t=function(){switch(!1){case 0!==e:return"Which programming languages, frameworks, topics, etc.?";case 1!==e:return"Awesome! What else?";case 2!==e:return"Excellent \u2013 let's keep going!";case 3!==e:return"These are great. Anything else?";case 4!==e:return"Great! Maybe one more?"}}(),5===e?($(".js-user-recommendations-form").delay(500).hide(),$(".js-recommendations-complete").delay(500).show()):$(".js-recommendations-complete").visible()&&($(".js-user-recommendations-form").show(),$(".js-recommendations-complete").hide()),$(".js-user-interests-input").attr("placeholder",t),o()},s=null,e=function(e,t,n){var o,c,u,l,d;return c=document.querySelector(".js-user-recommendations-form"),u=c.querySelector(".js-user-interests-input"),e=e.trim(),$(".js-button-skip").hide(),u.value="",null==s&&(s=$(".js-user-interests-item.hidden").remove().removeClass("hidden")[0]),l=s.cloneNode(!0),l.title=e,l.insertBefore(document.createTextNode(e),l.firstChild),$(".js-user-interests-list").append(l),l=$(l),d=l.offset(),o=Math.abs(n-d.left),l.css("position","absolute").css("top",t).css("left",n).fadeIn(100).animate({top:d.top,left:d.left-8},{duration:300+.2*o,specialEasing:{top:"easeInBack"},complete:function(){return $(this).css("position","relative"),$(this).css("top",0),$(this).css("left",0),u.value=e,i(c).then(function(){return r()}),u.value=""}}),a()},$.easing.easeInBack=function(e,t,n,r,i,s){return void 0===s&&(s=3.70158),r*(t/=i)*t*((s+1)*t-s)+n},r=function(){return $.pjax({url:"/recommendations",container:"#js-pjax-container"})},$(document).on("pjax:complete",function(){return a()}),$(function(){return $(".user-interests-item").length?a():void 0}),$(document).on("submit",".js-user-recommendations-form",function(t){var n,r,i,s,o;return t.preventDefault(),n=this.querySelector(".js-user-interests-input"),r=n.value,s=$(n).offset(),o=s.top,i=s.left,e(r,o,i)}),$(document).on("click",".js-interest-option",function(t){var n,r,i,s,o;return t.preventDefault(),s=this,n=s.getAttribute("data-name"),i=$(s).offset(),o=i.top-$(s).height()/2,r=i.left-$(s).width()/2,e(n,o,r)}),$(document).on("submit",".js-remove-user-interest-form",function(e){return e.preventDefault(),i(this).then(function(){return r()})}),$(document).onFocusedKeydown(".js-user-interests-input",function(){return function(e){return","===e.hotkey&&($(".js-user-recommendations-form").trigger("submit"),e.preventDefault()),""===$(this).val()&&"space"===e.hotkey?e.preventDefault():void 0}}),i=function(e){return t(e.getAttribute("action"),{method:e.getAttribute("method"),body:$.param($(e).serializeArray()),headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}})}}.call(this),function(){var e,t,n,r,i,s,o;t=require("github/fetch").fetchJSON,$(document).on("click",".js-timeline-tags-expander",function(){return $(this).closest(".js-timeline-tags").removeClass("is-collapsed")}),r=["is-default","is-saving","is-saved","is-failed"],i=function(e,t){var n;return(n=e.classList).remove.apply(n,r),e.classList.add(t),e.disabled="is-saving"===t},$(document).on("click",".js-save-draft",function(){var e,n,r,s;return e=this,s=e.closest("form"),s.querySelector("#release_draft").value="1",n=function(t){return i(e,"is-saved"),setTimeout(function(){return i(e,"is-default")},5e3),s.dispatchEvent(new CustomEvent("release:saved",{bubbles:!0,cancelable:!1,detail:{release:t}}))},r=function(){return i(e,"is-failed")},t(s.action,{method:s.method,body:$(s).serialize(),headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).then(n,r),i(e,"is-saving"),!1}),$(document).on("release:saved",".js-release-form",function(e){var t,r,i,s,o,a,c,u;return o=e.originalEvent.detail.release,s=this,c=s.getAttribute("data-repo-url"),u=n("tag",c,o.tag_name),i=n("edit",c,o.tag_name),s.setAttribute("action",u),"function"==typeof(t=window.history).replaceState&&t.replaceState($.pjax.state,document.title,i),(r=document.querySelector("#delete_release_confirm form"))&&r.setAttribute("action",u),a=s.querySelector("#release_id"),a.value?void 0:(a.value=o.id,$(s).append('<input type="hidden" name="_method" value="put">'))}),$(document).on("click",".js-publish-release",function(e){return $("#release_draft").val("0")}),o=["is-loading","is-empty","is-valid","is-invalid","is-duplicate","is-pending"],s=function(e){var t;switch(e){case"is-valid":$(".release-target-wrapper").addClass("hidden");break;case"is-loading":break;default:$(".release-target-wrapper").removeClass("hidden")}return t=$(".js-release-tag"),t.removeClass(o.join(" ")),t.addClass(e)},e=function(e){return e.val()&&e.val()!==e.data("last-checked")?(s("is-loading"),$.ajax({url:e.attr("data-url"),type:"GET",data:{tag_name:e.val()},dataType:"json",success:function(t){return"duplicate"===t.status&&parseInt(e.attr("data-existing-id"))===parseInt(t.release_id)?void s("is-valid"):($(".js-release-tag .js-edit-release-link").attr("href",t.url),s("is-"+t.status))},error:function(e){return s("is-invalid")},complete:function(){return e.data("last-checked",e.val())}})):void 0},n=function(e,t,n){return t+"/releases/"+e+"/"+n},$(document).on("blur",".js-release-tag-field",function(t){return e($(this))}),$.observe(".js-release-tag-field",function(){e($(this))}),$(document).on("change",".js-release-tag",function(){var e,t,n,r,i,s,o,a,c;if(n=$(this),e=n.closest("form"),t=e.find(".js-previewable-comment-form"),t.length){for(r=t.data("base-preview-url"),r||(r=t.attr("data-preview-url"),r+=r.indexOf("?")>=0?"&":"?",t.data("base-preview-url",r)),i=[],c=n.find('input[name="release[tag_name]"], input[name="release[target_commitish]"]:checked'),s=0,a=c.length;a>s;s++)o=c[s],o.value&&i.push({name:o.name,value:o.value});return t.attr("data-preview-url",r+$.param(i))}}),$.observe(".js-release-form .js-previewable-comment-form",function(){$(this).closest("form").find(".js-release-tag").trigger("change")})}.call(this),function(){$(document).on("reveal.facebox",function(e){var t;return(t=document.querySelector("#facebox .js-fork-select-fragment"))?t.setAttribute("src",t.getAttribute("data-url")):void 0})}.call(this),function(){$(document).on("change",".js-pulse-period",function(e){var t;return t=$(e.target).attr("data-url"),$.pjax({url:t,container:"#js-repo-pjax-container"})})}.call(this),function(){var e,t,n=function(e,t){return function(){return e.apply(t,arguments)}};t=require("delegated-events"),e=function(){function e(){this.validate=n(this.validate,this),this.updateUpsell=n(this.updateUpsell,this),this.selectedPrivacyToggleElement=n(this.selectedPrivacyToggleElement,this),this.handlePrivacyChange=n(this.handlePrivacyChange,this),this.handleOwnerChange=n(this.handleOwnerChange,this),this.elements={ownerContainer:$(".js-owner-container"),iconPreviewPublic:$(".js-icon-preview-public"),iconPreviewPrivate:$(".js-icon-preview-private"),upgradeUpsell:$("#js-upgrade-container").hide(),upgradeConfirmationCheckbox:$(".js-confirm-upgrade"),upsells:$(".js-upgrade"),privacyToggles:$(".js-privacy-toggle"),privateRadio:$(".js-privacy-toggle[value=false]"),publicRadio:$(".js-privacy-toggle[value=true]"),repoNameField:$("input[type=text].js-repo-name"),form:$("#new_repository"),licenseContainer:$(".js-license-container"),suggestion:$(".js-reponame-suggestion")},this.current_login=$("input[name=owner]:checked").prop("value"),this.privateRepo=!1,this.changedPrivacyManually=!1,this.elements.ownerContainer.on("change","input[type=radio]",this.handleOwnerChange),this.elements.privacyToggles.on("change",function(e){return function(t){return e.handlePrivacyChange(t.targetElement,t)}}(this)),this.elements.upgradeUpsell.on("change input","input",this.validate),this.elements.form.on("repoform:validate",this.validate),this.elements.suggestion.on("click",function(e){return function(t){var n;return n=e.elements.repoNameField,n.val($(t.target).text()),n.trigger("change")}}(this)),this.handleOwnerChange(),this.validate()}return e.prototype.handleOwnerChange=function(){var e;return this.current_login=$("input[name=owner]:checked").prop("value"),this.elements.repoNameField.trigger("change"),e=this.elements.ownerContainer.find(".select-menu-item.selected"),this.changedPrivacyManually||("private"===e.attr("data-default")?this.elements.privateRadio.prop("checked","checked").change():this.elements.publicRadio.prop("checked","checked").change()),"yes"===e.attr("data-permission")?($(".with-permission-fields").show(),$(".without-permission-fields").hide(),$(".errored").show(),$("dl.warn").show()):($(".with-permission-fields").hide(),$(".without-permission-fields").show(),$(".errored").hide(),$("dl.warn").hide()),this.updateUpsell(),this.handlePrivacyChange()},e.prototype.handlePrivacyChange=function(e,t){var n;return null==e&&(e=this.selectedPrivacyToggleElement()),null==t&&(t=null),t&&!t.isTrigger&&(this.changedPrivacyManually=!0),n=this.elements.upgradeUpsell.find(".js-billing-section"),"false"===e.val()?(this.privateRepo=!0,this.elements.upgradeUpsell.show(),n.removeClass("has-removed-contents"),this.elements.upgradeUpsell.find("input[type=checkbox]").prop("checked","checked"),this.elements.iconPreviewPublic.hide(),this.elements.iconPreviewPrivate.show()):(this.privateRepo=!1,this.elements.upgradeUpsell.hide(),n.addClass("has-removed-contents"),this.elements.upgradeUpsell.find("input[type=checkbox]").prop("checked",null),this.elements.form.attr("action",this.elements.form.attr("data-url")),this.elements.iconPreviewPrivate.hide(),this.elements.iconPreviewPublic.show()),this.validate()},e.prototype.selectedPrivacyToggleElement=function(){return this.elements.privateRadio.is(":checked")?this.elements.privateRadio:this.elements.publicRadio},e.prototype.updateUpsell=function(){var e;return e=this.elements.upsells.filter("[data-login="+this.current_login+"]"),this.elements.upgradeUpsell.html(e)},e.prototype.validate=function(){var e,t;return t=!0,this.elements.repoNameField.is(".is-autocheck-successful")||(t=!1),e=this.elements.upgradeUpsell.find("input[type=checkbox]"),this.privateRepo&&e.length&&!e.is(":checked")&&(t=!1),this.elements.form.find("button.primary").prop("disabled",!t)},e}(),$(function(){return $(".page-new-repo").length?new e:void 0}),t.on("autocheck:send","#repository_name",function(e){var t,n,r;n=e.detail,t=$(this),r=t.closest("form").find("input[name=owner]:checked").val(),n.owner=r,t.trigger("repoform:validate")}),t.on("autocheck:complete","#repository_name",function(){return $(this).trigger("repoform:validate")}),t.on("autocheck:success","#repository_name",function(e){var t,n,r,i;(i=null!=(n=e.detail)?n.trim():void 0)&&(t=this.closest("dl.form"),t.classList.add("warn"),r=document.createElement("dd"),r.classList.add("warning"),r.innerHTML=i,t.append(r))})}.call(this),function(){$(document).on("pjax:end",function(){var e,t,n,r,i,s,o,a,c,u,l;if(l=$(document.head).find("meta[name='selected-link']").attr("value"),null!=l)for(n=$(".js-sidenav-container-pjax .js-selected-navigation-item").removeClass("selected"),e=0,i=n.length;i>e;e++)for(t=n[e],a=null!=(c=$(t).attr("data-selected-links"))?c:"",u=a.split(" "),r=0,s=u.length;s>r;r++)o=u[r],o===l&&$(t).addClass("selected")})}.call(this),function(){var e,t,n,r;e=require("github/fetch").fetch,n=function(){return document.body.classList.add("is-sending"),document.body.classList.remove("is-sent","is-not-sent")},r=function(){return document.body.classList.add("is-sent"),document.body.classList.remove("is-sending")},t=function(e){return e&&(document.querySelector(".js-sms-error").textContent=e),document.body.classList.add("is-not-sent"),document.body.classList.remove("is-sending")},$(document).on("ajaxSend",".js-send-auth-code",function(){n()}),$(document).on("ajaxSuccess",".js-send-auth-code",function(){r()}),$(document).on("ajaxError",".js-send-auth-code",function(e,n){t(n.responseText)}),$(document).on("click",".js-send-two-factor-code",function(){var i,s,o,a,c,u;o=this.form,i=o.querySelector(".js-country-code-select").value,c=o.querySelector(".js-sms-number").value,a=i+" "+c,u=o.querySelector(".js-two-factor-secret").value,n(),s=new FormData,s.append("number",a),s.append("two_factor_secret",u),s.append("authenticity_token",o.elements.authenticity_token.value),e(this.getAttribute("data-url"),{method:"post",body:s}).then(function(){var e,t,n,i;for(r(),i=o.querySelectorAll(".js-2fa-enable"),t=0,n=i.length;n>t;t++)e=i[t],e.disabled=!1;return o.querySelector(".js-2fa-otp").focus()})["catch"](function(e){var n,r,i,s,a,c;for(null!=(s=e.response)&&s.text().then(t),a=o.querySelectorAll(".js-2fa-enable"),c=[],r=0,i=a.length;i>r;r++)n=a[r],c.push(n.disabled=!0);return c})}),$(document).on("loading.facebox",function(){return"/settings/two_factor_authentication/configure"===window.location.pathname?($(".js-configure-sms-fallback .facebox-alert").text("").hide(),$(".js-configure-sms-fallback").show(),$(".js-verify-sms-fallback").hide()):void 0}),$(document).on("ajaxSuccess",".js-two-factor-set-sms-fallback",function(e,t){switch(t.status){case 200:case 201:return window.location.reload();case 202:return $(".js-configure-sms-fallback").hide(),$(".js-verify-sms-fallback").show(),$(".js-fallback-otp").focus()}}),$(document).on("ajaxError",".js-two-factor-set-sms-fallback",function(e,t){switch(t.status){case 422:return window.location.reload();case 429:return $(".js-configure-sms-fallback .facebox-alert").text(t.responseText).show(),!1}})}.call(this),function(){if(!("u2f"in window)&&"chrome"in window){var e=window.u2f={};e.EXTENSION_ID="kmendfapggjehodndflmmgagdbamhnfd",e.MessageTypes={U2F_REGISTER_REQUEST:"u2f_register_request",U2F_SIGN_REQUEST:"u2f_sign_request",U2F_REGISTER_RESPONSE:"u2f_register_response",U2F_SIGN_RESPONSE:"u2f_sign_response"},e.ErrorCodes={OK:0,OTHER_ERROR:1,BAD_REQUEST:2,CONFIGURATION_UNSUPPORTED:3,DEVICE_INELIGIBLE:4,TIMEOUT:5},e.Request,e.Response,e.Error,e.SignRequest,e.SignResponse,e.RegisterRequest,e.RegisterResponse,e.getMessagePort=function(t){if("undefined"!=typeof chrome&&chrome.runtime){var n={type:e.MessageTypes.U2F_SIGN_REQUEST,signRequests:[]};chrome.runtime.sendMessage(e.EXTENSION_ID,n,function(){chrome.runtime.lastError?e.getIframePort_(t):e.getChromeRuntimePort_(t)})}else e.isAndroidChrome_()?e.getAuthenticatorPort_(t):e.getIframePort_(t)},e.isAndroidChrome_=function(){var e=navigator.userAgent;return-1!=e.indexOf("Chrome")&&-1!=e.indexOf("Android")},e.getChromeRuntimePort_=function(t){var n=chrome.runtime.connect(e.EXTENSION_ID,{includeTlsChannelId:!0});setTimeout(function(){t(new e.WrappedChromeRuntimePort_(n))},0)},e.getAuthenticatorPort_=function(t){setTimeout(function(){t(new e.WrappedAuthenticatorPort_)},0)},e.WrappedChromeRuntimePort_=function(e){this.port_=e},e.WrappedChromeRuntimePort_.prototype.formatSignRequest_=function(t,n,r){return{type:e.MessageTypes.U2F_SIGN_REQUEST,signRequests:t,timeoutSeconds:n,requestId:r}},e.WrappedChromeRuntimePort_.prototype.formatRegisterRequest_=function(t,n,r,i){return{type:e.MessageTypes.U2F_REGISTER_REQUEST,signRequests:t,registerRequests:n,timeoutSeconds:r,requestId:i}},e.WrappedChromeRuntimePort_.prototype.postMessage=function(e){this.port_.postMessage(e)},e.WrappedChromeRuntimePort_.prototype.addEventListener=function(e,t){var n=e.toLowerCase();"message"==n||"onmessage"==n?this.port_.onMessage.addListener(function(e){t({data:e})}):console.error("WrappedChromeRuntimePort only supports onMessage")},e.WrappedAuthenticatorPort_=function(){this.requestId_=-1,this.requestObject_=null},e.WrappedAuthenticatorPort_.prototype.postMessage=function(e){var t=e;document.location=t},e.WrappedAuthenticatorPort_.prototype.addEventListener=function(e,t){var n=e.toLowerCase();if("message"==n){var r=this;window.addEventListener("message",r.onRequestUpdate_.bind(r,t),!1)}else console.error("WrappedAuthenticatorPort only supports message")},e.WrappedAuthenticatorPort_.prototype.onRequestUpdate_=function(e,t){var n=JSON.parse(t.data),r=(n.intentURL,n.errorCode,null);n.hasOwnProperty("data")&&(r=JSON.parse(n.data),r.requestId=this.requestId_),r=this.doResponseFixups_(r),e({data:r})},e.WrappedAuthenticatorPort_.prototype.doResponseFixups_=function(t){if(t.hasOwnProperty("responseData"))return t;if(this.requestObject_.type!=e.MessageTypes.U2F_SIGN_REQUEST)return{type:e.MessageTypes.U2F_REGISTER_RESPONSE,responseData:{errorCode:e.ErrorCodes.OTHER_ERROR,errorMessage:"Internal error: invalid response from Authenticator"}};var n=t.challenge;if("undefined"!=typeof n)for(var r=JSON.parse(atob(n)),i=(r.challenge,this.requestObject_.signData),s=null,o=0;o<i.length;o++){var r=i[o];if(r.keyHandle==t.keyHandle){s=r;break}}var a={errorCode:t.resultCode,keyHandle:t.keyHandle,signatureData:t.signature,clientData:n};return{type:e.MessageTypes.U2F_SIGN_RESPONSE,responseData:a,requestId:t.requestId}},e.WrappedAuthenticatorPort_.INTENT_URL_BASE_="intent:#Intent;action=com.google.android.apps.authenticator.AUTHENTICATE",e.WrappedAuthenticatorPort_.prototype.formatSignRequest_=function(t,n,r){if(!t||0==t.length)return null;this.requestId_=r,this.requestObject_={type:e.MessageTypes.U2F_SIGN_REQUEST,signData:t,requestId:r,timeout:n};var i=t[0].appId,s=e.WrappedAuthenticatorPort_.INTENT_URL_BASE_+";S.appId="+encodeURIComponent(i)+";S.eventId="+r+";S.challenges="+encodeURIComponent(JSON.stringify(this.getBrowserDataList_(t)))+";end";return s},e.WrappedAuthenticatorPort_.prototype.getBrowserDataList_=function(e){return e.map(function(e){var t={typ:"navigator.id.getAssertion",challenge:e.challenge},n={challenge:t,keyHandle:e.keyHandle};return n})},e.WrappedAuthenticatorPort_.prototype.formatRegisterRequest_=function(t,n,r,i){if(!n||0==n.length)return null;for(var s=n[0].appId,o=[],a=0;a<n.length;a++){var c={challenge:n[a].challenge,version:n[a].version};n[a].appId!=s&&(c.appId=n[a].appId),o.push(c)}var u=[];if(t)for(a=0;a<t.length;a++){var l={keyHandle:t[a].keyHandle,version:t[a].version};t[a].appId!=s&&(l.appId=t[a].appId),u.push(l)}var d={type:e.MessageTypes.U2F_REGISTER_REQUEST,appId:s,registerRequests:o,registeredKeys:u,requestId:i,timeoutSeconds:r},h=e.WrappedAuthenticatorPort_.INTENT_URL_BASE_+";S.request="+encodeURIComponent(JSON.stringify(d))+";end";return this.requestId_=i,h},e.getIframePort_=function(t){var n="chrome-extension://"+e.EXTENSION_ID,r=document.createElement("iframe");r.src=n+"/u2f-comms.html",r.setAttribute("style","display:none"),document.body.appendChild(r);var i=new MessageChannel,s=function(e){"ready"==e.data?(i.port1.removeEventListener("message",s),t(i.port1)):console.error('First event on iframe port was not "ready"')};i.port1.addEventListener("message",s),i.port1.start(),r.addEventListener("load",function(){r.contentWindow.postMessage("init",n,[i.port2])})},e.EXTENSION_TIMEOUT_SEC=30,e.port_=null,e.waitingForPort_=[],e.reqCounter_=0,e.callbackMap_={},e.getPortSingleton_=function(t){e.port_?t(e.port_):(0==e.waitingForPort_.length&&e.getMessagePort(function(t){for(e.port_=t,e.port_.addEventListener("message",e.responseHandler_);e.waitingForPort_.length;)e.waitingForPort_.shift()(e.port_)}),e.waitingForPort_.push(t))},e.responseHandler_=function(t){var n=t.data,r=n.requestId;if(!r||!e.callbackMap_[r])return void console.error("Unknown or missing requestId in response.");var i=e.callbackMap_[r];delete e.callbackMap_[r],i(n.responseData)},e.sign=function(t,n,r){e.getPortSingleton_(function(i){var s=++e.reqCounter_;e.callbackMap_[s]=n;var o="undefined"!=typeof r?r:e.EXTENSION_TIMEOUT_SEC,a=i.formatSignRequest_(t,o,s);i.postMessage(a)})},e.register=function(t,n,r,i){e.getPortSingleton_(function(s){var o=++e.reqCounter_;e.callbackMap_[o]=r;var a="undefined"!=typeof i?i:e.EXTENSION_TIMEOUT_SEC,c=s.formatRegisterRequest_(n,t,a,o);s.postMessage(c)})}}}(),function(){var e,t,n,r,i=[].slice;t=require("github/feature-detection")["default"],(e=document.querySelector(".js-u2f-auth-form-body"))&&(e.classList.toggle("unavailable",!t.u2f),t.u2f&&(n=function(){var e;return e=1<=arguments.length?i.call(arguments,0):[],new Promise(function(t,n){return u2f.sign.apply(u2f,i.call(e).concat([function(e){var r;return null!=e.errorCode&&0!==e.errorCode?(r=new Error("Signing request failed"),r.code=e.errorCode,n(r)):t(e)}]))})},r=function(){var e,t,r,i,s,o,a;for(s=document.querySelectorAll(".js-u2f-error"),r=0,i=s.length;i>r;r++)e=s[r],e.classList.add("hidden");return document.querySelector(".js-u2f-login-waiting").classList.remove("hidden"),t=document.querySelector(".js-u2f-auth-form"),o=t.querySelector(".js-u2f-auth-response"),a=JSON.parse(t.getAttribute("data-sign-requests")),n(a).then(function(e){return o.value=JSON.stringify(e),t.submit()})["catch"](function(e){var t;return t=function(){switch(e.code){case 4:return".js-u2f-auth-not-registered-error";case 5:return".js-u2f-auth-timeout";default:return".js-u2f-auth-error"}}(),document.querySelector(t).classList.remove("hidden"),document.querySelector(".js-u2f-login-waiting").classList.add("hidden")})},$(document).on("click",".js-u2f-auth-retry",function(){r()}),$.observe(".js-u2f-auth-form",function(){r()})))}.call(this),function(){var e;e=function(e){var t;return t=$(".js-hosted-account-linker-hosted"),t.toggleClass("hidden","tenant"!==e.value)},$(document).on("change",".js-hosted-account-linker",function(){return e(this)}),$(function(){var t;return(t=$(".js-hosted-account-linker:checked")[0])?e(t):void 0})}.call(this),function(){
$.observe(".js-email-global-unsubscribe-form",function(){this.querySelector(".js-email-global-unsubscribe-submit").disabled=!0}),$(document).on("change",".js-email-global-unsubscribe-form",function(){var e,t;return e=function(){var e,n,r,i;for(r=this.querySelectorAll(".js-email-global-unsubscribe"),i=[],e=0,n=r.length;n>e;e++)t=r[e],t.checked&&i.push(t);return i}.call(this),this.querySelector(".js-email-global-unsubscribe-submit").disabled=e[0].defaultChecked}),$(document).on("ajaxSend",".js-remove-key",function(e){return $(this).addClass("disabled").find("span").text("Deleting\u2026")}),$(document).on("ajaxError",".js-remove-key",function(e){return $(this).removeClass("disabled").find("span").text("Error. Try again.")}),$(document).on("ajaxSuccess",".js-remove-key",function(e){return $(this).parents("li").remove(),0===$(".js-ssh-keys-box li").length?$(".js-no-ssh-keys").show():void 0}),$(document).on("ajaxSuccess",".js-leave-collaborated-repo",function(e){var t,n;t=e.target.getAttribute("data-repo-id"),n=document.querySelector(".js-collab-repo[data-repo-id='"+t+"']"),n.remove(),$.facebox.close()}),$(document).on("ajaxSuccess",".js-newsletter-unsubscribe-form",function(){var e,t,n,r,i;for(r=document.querySelectorAll(".js-newsletter-unsubscribe-message"),i=[],t=0,n=r.length;n>t;t++)e=r[t],i.push(e.classList.toggle("hidden"));return i}),$(document).on("click",".js-show-new-ssh-key-form",function(){return $(".js-new-ssh-key-box").toggle().find(".js-ssh-key-title").focus(),!1}),$(document).on("ajaxSuccess",".js-revoke-access-form",function(){var e,t,n;e=this.getAttribute("data-id"),n=this.getAttribute("data-type-name"),t=document.querySelector(".js-revoke-item[data-type='"+n+"'][data-id='"+e+"']"),$.facebox.close(),t.remove(),t.classList.contains("new-token")&&document.querySelector(".js-flash-new-token").remove()}),$(document).on("click",".js-delete-oauth-application-image",function(){var e,t,n;return e=$(this).closest(".js-uploadable-container"),e.removeClass("has-uploaded-logo"),t=e.find("img.js-image-field"),n=e.find("input.js-oauth-application-logo-id"),t.attr("src",""),n.val(""),!1}),$(document).on("click",".js-new-callback",function(e){var t,n;return e.preventDefault(),t=$(e.currentTarget).closest(".js-callback-urls"),n=t.find(".js-callback-url").first().clone(),n.removeClass("is-default-callback"),n.find("input").val(""),t.addClass("has-many"),$(e.currentTarget).before(n)}),$(document).on("click",".js-delete-callback",function(e){var t,n;return e.preventDefault(),t=$(e.currentTarget).closest(".js-callback-urls"),$(e.currentTarget).closest(".js-callback-url").remove(),n=t.find(".js-callback-url"),n.length<=1?t.removeClass("has-many"):void 0}),$(document).on("click",".js-oauth-application-whitelist .js-deny-this-request",function(e){return $(e.currentTarget).siblings("#state").val("denied"),$(e.currentTarget).closest(".js-org-application-access-form").submit()}),$(document).on("ajaxSuccess",".js-org-application-access-form",function(e,t,n,r){return window.location.reload()}),$(document).on("click",".js-user-rename-warning-continue",function(){var e,t,n,r,i;for(r=document.querySelectorAll(".js-user-rename-warning, .js-user-rename-form"),i=[],t=0,n=r.length;n>t;t++)e=r[t],i.push(e.classList.toggle("hidden"));return i}),$(document).on("change",".js-checkbox-scope",function(){var e,t,n,r,i,s;for(r=this.closest(".js-check-scope-container"),i=r.querySelectorAll(".js-checkbox-scope"),s=[],t=0,n=i.length;n>t;t++)e=i[t],e!==this?(e.checked=this.checked,s.push(e.disabled=this.checked)):s.push(void 0);return s})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u,l,d,h,f=[].slice;r=require("github/feature-detection")["default"],i=require("github/fetch").fetchJSON,l=function(){var e;return e=1<=arguments.length?f.call(arguments,0):[],new Promise(function(t,n){return u2f.register.apply(u2f,f.call(e).concat([function(e){var r;return null!=e.errorCode&&0!==e.errorCode?(r=new Error("Device registration failed"),r.code=e.errorCode,n(r)):t(e)}]))})},(t=document.querySelector(".js-u2f-box"))&&(t.classList.toggle("available",r.u2f),s=function(e,t,n){return null!=n?e.setAttribute(t,JSON.stringify(n)):JSON.parse(e.getAttribute(t))},u=function(e){var t;return t=document.querySelector(".js-add-u2f-registration-form"),s(t,"data-sign-requests",e)},o=function(e){var t;return t=document.querySelector(".js-add-u2f-registration-form"),s(t,"data-register-requests",e)},d=function(e){return e.register_requests&&o(e.register_requests),e.sign_requests?u(e.sign_requests):void 0},$(document).on("ajaxSend",".js-u2f-registration-delete",function(){return this.closest(".js-u2f-registration").classList.add("is-sending")}),$(document).on("ajaxSuccess",".js-u2f-registration-delete",function(e,t){return d(t.responseJSON),this.closest(".js-u2f-registration").remove()}),$(document).on("click",".js-add-u2f-registration-link",function(e){var t,n;return t=document.querySelector(".js-new-u2f-registration"),t.classList.add("is-active"),t.classList.remove("is-showing-error"),n=document.querySelector(".js-u2f-registration-nickname-field"),n.focus()}),e=function(e){var n;return t=document.createElement("div"),t.innerHTML=e,n=t.firstChild,document.querySelector(".js-u2f-registrations").appendChild(n)},n=function(e,t){var n,r,i,s,o;for(s=document.querySelector(".js-new-u2f-registration"),s.classList.add("is-showing-error"),s.classList.remove("is-sending"),o=s.querySelectorAll(".js-u2f-error"),r=0,i=o.length;i>r;r++)n=o[r],n.classList.add("hidden");return n=s.querySelector(e),null!=t&&(n.textContent=t),n.classList.remove("hidden")},a=function(){var e;return e=document.querySelector(".js-new-u2f-registration"),e.classList.remove("is-sending","is-active"),document.querySelector(".js-u2f-registration-nickname-field").value=""},c=function(t){var r;return r=document.querySelector(".js-add-u2f-registration-form"),r.elements.response.value=JSON.stringify(t),i(r.action,{method:r.method,body:new FormData(r)}).then(function(t){return d(t),a(),e(t.registration)})["catch"](function(e){return null!=e.response?e.response.json().then(function(e){return d(e),n(".js-u2f-server-error",e.error)}):n(".js-u2f-network-error")})},h=function(){var e;return e=document.querySelector(".js-new-u2f-registration"),e.classList.add("is-sending"),e.classList.remove("is-showing-error"),l(o(),u()).then(c)["catch"](function(e){var t;return t=function(){switch(e.code){case 4:return".js-u2f-registered-error";case 5:return".js-u2f-timeout-error";default:return".js-u2f-other-error"}}(),n(t)})},$(document).on("click",".js-u2f-register-retry",function(){h()}),$(document).on("submit",".js-add-u2f-registration-form",function(e){return e.preventDefault(),h()}))}.call(this),function(){$(document).on("ajaxSuccess",".js-user-sessions-revoke",function(){return this.closest("li").remove()})}.call(this),function(){$(function(){return $(".js-email-notice-trigger").focus(function(){return $(".js-email-notice").addClass("notice-highlight")}),$(".js-email-notice-trigger").blur(function(){return $(".js-email-notice").removeClass("notice-highlight")})}),$.observe(".js-plan-choice:checked",{add:function(){return $(this).closest(".plan-row").addClass("selected")},remove:function(){return $(this).closest(".plan-row").removeClass("selected")}}),$.observe(".js-plan-row.selected",{add:function(){var e;return e=$(this).find(".js-choose-button"),e.text(e.attr("data-selected-text"))},remove:function(){var e;return e=$(this).find(".js-choose-button"),e.text(e.attr("data-default-text"))}}),$.observe(".js-plan-row.free-plan.selected, .js-plan-choice-label.plan-choice-free.open",{add:function(){return $("#js-signup-billing-fields").addClass("has-removed-contents")},remove:function(){return $("#js-signup-billing-fields").removeClass("has-removed-contents")}}),$.observe(".js-setup-organization:checked",{add:function(){var e;return e=$(".js-choose-plan-submit"),e.attr("data-default-text")||e.attr("data-default-text",e.text()),e.text(e.attr("data-org-text"))},remove:function(){var e;return e=$(".js-choose-plan-submit"),e.text(e.attr("data-default-text"))}})}.call(this),function(){var e,t,n;e=function(e){var t;return t=$(".js-site-search-form")[0],t.setAttribute("action",t.getAttribute("data-global-search-url")),$(".js-site-search").removeClass("repo-scope"),e.setAttribute("placeholder",e.getAttribute("data-global-scope-placeholder"))},n=function(e){var t;return t=$(".js-site-search-form")[0],t.setAttribute("action",t.getAttribute("data-repo-search-url")),$(".js-site-search").addClass("repo-scope"),e.setAttribute("placeholder",e.getAttribute("data-repo-scope-placeholder"))},t=function(t){var r,i;r=t.target,i=r.value,""===i&&"backspace"===t.hotkey&&r.classList.contains("is-clearable")&&e(r),""===i&&"esc"===t.hotkey&&n(r),r.classList.toggle("is-clearable",""===i)},$(document).on("focus",".js-site-search-field",function(){return $(this).on("keyup",t)}),$(document).on("blur",".js-site-search-field",function(){return $(this).off("keyup",t)}),$(document).on("focusout",".js-site-search-focus",function(){this.closest(".js-chromeless-input-container").classList.remove("focus"),""===this.value&&this.classList.contains("js-site-search-field")&&n(this)}),$(document).on("focusin",".js-site-search-focus",function(){this.closest(".js-chromeless-input-container").classList.add("focus")})}.call(this),function(){$.observe(".js-contact-javascript-flag",function(e){e.value="true"})}.call(this),function(){var e,t;e=function(){var e;return e=$("#js-features-branch-diagram"),e.removeClass("preload"),e.find("path").each(function(e){var t,n,r;return $(this).is("#js-branch-diagram-branch")?r="stroke-dashoffset 3.5s linear 0.25s":$(this).is("#js-branch-diagram-master")?r="stroke-dashoffset 4.1s linear 0s":$(this).is("#js-branch-diagram-arrow")&&(r="stroke-dashoffset 0.2s linear 4.3s"),n=$(this).get(0),t=n.getTotalLength(),n.style.transition=n.style.WebkitTransition="none",n.style.strokeDasharray=t+" "+t,n.style.strokeDashoffset=t,n.getBoundingClientRect(),n.style.transition=n.style.WebkitTransition=r,n.style.strokeDashoffset="0"})},$(document).on("click",".js-segmented-nav-button",function(e){var t,n;return n=$(this).attr("data-selected-tab"),t=$(this).closest(".js-segmented-nav"),t.find(".js-segmented-nav-button").removeClass("selected"),t.siblings(".js-selected-nav-tab").removeClass("active"),$(this).addClass("selected"),$("."+n).addClass("active"),e.preventDefault()}),t=function(){return $(document).scrollTop()>=$("#js-features-branch-diagram").offset().top-700?e():void 0},$.observe("#js-features-branch-diagram.preload",{add:function(){return $(window).on("scroll",t)},remove:function(){return $(window).off("scroll",t)}})}.call(this),function(){var e,t;e=require("github/fetch").fetchText,t=function(){var t;return t="/site/keyboard_shortcuts?url="+window.location.pathname,$.facebox(function(){return e(t).then(function(e){return $.facebox(e,"shortcuts")})})},$(document).on("click",".js-keyboard-shortcuts",function(){return t(),!1}),$(document).on("click",".js-see-all-keyboard-shortcuts",function(){return this.remove(),$(".facebox .js-hidden-pane").css("display","table-row-group"),!1}),$(document).on("keypress",function(e){return e.target===document.body&&63===e.which?($(".facebox").is($.visible)?$.facebox.close():t(),!1):void 0})}.call(this),function(){$.observe(".js-site-status-container",function(){var e,t,n,r,i;i=this,t=i.querySelector(".js-site-status-message"),n=i.querySelector(".js-site-status-time"),e=i.querySelector(".flash"),r=document.querySelector("meta[name=site-status-api-url]").content,window.fetch(r).then(function(e){return e.json()}).then(function(r){var s;return null!=r.status&&"good"!==r.status?(t.textContent=r.body,n.setAttribute("datetime",r.created_on),s="major"===r.status?"error":"warn",e.classList.add("flash-"+s),i.classList.remove("hidden")):void 0})})}.call(this),function(){$(document).on("ajaxSend",".js-action-ldap-create",function(){return $(this).find(".btn-sm").addClass("disabled")}),$(document).on("ajaxError",".js-action-ldap-create",function(e,t,n,r){return!1}),$(document).on("ajaxComplete",".js-action-ldap-create",function(e,t){var n,r;return n=$(this),r=500===t.status?"Oops, something went wrong.":t.responseText,n.find(".js-message").show().html(" &ndash; "+r),200===t.status&&n.find(".btn").hide(),!1})}.call(this),function(){!$.support.pjax||location.search||location.hash||$(function(){var e,t,n;return e=null!=(t=document.getElementById("issues-dashboard"))?t:document.getElementById("issues_list"),(n=$(e).attr("data-url"))?window.history.replaceState(null,document.title,n):void 0})}.call(this),function(){var e,t,n,r,i,s,o;r=require("github/fetch").fetchJSON,s=function(e){return setTimeout(function(){var t,n,r,i,s;for(i=document.querySelectorAll(".js-tree-finder-field"),s=[],n=0,r=i.length;r>n;n++)t=i[n],t.value=e,s.push(o(t));return s},0)},i=null,e=new WeakMap,o=function(t,n){var s,a,c,u,l,d,h,f,m,p,g,v,b,y;if(b=document.getElementById(t.getAttribute("data-results"))){if(!(d=e.get(b)))return void(null==i&&(i=r(b.getAttribute("data-url")).then(function(n){return e.set(b,n.paths),o(t),i=null})["catch"](function(){return i=null})));for(y=b.querySelector(".js-tree-browser-result-template").firstElementChild,p=b.querySelector(".js-tree-finder-results"),null==n&&(n=t.value),n?(h=$.fuzzyRegexp(n),v=$.fuzzySort(d,n)):v=d,b.classList.toggle("filterable-empty",!v.length),c=document.createDocumentFragment(),f=v.slice(0,50),s=0,a=f.length;a>s;s++)g=f[s],m=y.cloneNode(!0),u=m.getElementsByClassName("js-tree-finder-path")[0],l=new URL(u.href),l.pathname=l.pathname+"/"+g,u.href=l.href,u.textContent=g,$.fuzzyHighlight(u,n,h),c.appendChild(m);p.innerHTML="",p.appendChild(c),$(p).navigation("focus")}},$(document).onFocusedKeydown(".js-tree-finder-field",function(e){return o(this),$(this).on("throttled:input."+e,function(){return o(this)}),function(e){return"esc"===e.hotkey?(history.back(),e.preventDefault()):void 0}}),t=function(){var e;return e=$("<textarea>").css({position:"fixed",top:0,left:0,opacity:0}),$(document.body).append(e),e.focus(),function(){return e.blur().remove().val()}},n=null,$(document).on("pjax:click",".js-show-file-finder",function(e){return n=t()}),$(document).on("pjax:end","#js-repo-pjax-container",function(e){var t;return n?((t=n())&&s(t),n=null):void 0}),$.observe(".js-tree-finder-field",function(){o(this)})}.call(this),function(){var e,t,n,r,i,s,o,a,c,u,l,d,h,f,m,p,g,v,b,y;l=require("github/inflector").pluralize,s=require("github/number-helpers").formatNumber,u=null,d=null,g=null,v=null,r=function(){return document.querySelector(".js-calendar-graph").getAttribute("data-url")},$(document).on("pjax:send pjax:complete",".js-contribution-activity",function(e){var t;t="pjax:send"===e.type,this.classList.toggle("loading",t)}),$.observe(".js-calendar-graph-svg",function(){var e,t,r;e=this.closest(".js-calendar-graph"),e.addEventListener("mouseover",n),e.addEventListener("mouseout",i),t=e.getAttribute("data-from"),t&&(t=d=y(t)),r=e.getAttribute("data-to"),r&&(r=y(r)),(t||r)&&h(t,r,!0)}),$(document).on("click",".js-calendar-graph rect.day",function(e){var t;t=y(this.getAttribute("data-date")),h(t,e.shiftKey,!1)}),n=function(e){return e.target.matches("rect.day")?b(e.target):void 0},i=function(e){var t;return null!=(t=document.querySelector(".svg-tip"))?t.remove():void 0},e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],b=function(t){var n,r,i,o,a,c,u,d;return i=y(t.getAttribute("data-date")),r=parseInt(t.getAttribute("data-count")),c=0===r?"No":s(r),a=e[i.getUTCMonth()].slice(0,3)+" "+i.getUTCDate()+", "+i.getUTCFullYear(),o=$('<div class="svg-tip svg-tip-one-line">\n <strong>'+c+" "+l(r,"contribution")+"</strong> on "+a+"\n</div>").get(0),$(".svg-tip").remove(),document.body.appendChild(o),n=t.getBoundingClientRect(),u=n.left+window.pageXOffset-o.offsetWidth/2+n.width/2,d=n.bottom+window.pageYOffset-o.offsetHeight-2*n.height,o.style.top=d+"px",o.style.left=u+"px"},a=function(e){return $.pjax({url:e,container:".js-contribution-activity",scrollTo:!1,replace:!0})},m=function(e){var t,n;return u=e,t=null,g=null,v=null,n=r()+"?tab=contributions&period="+u,p(),a(n)},f=function(e,t){var n,r;return r=e.getAttribute("class").trim().split(" "),r=function(){var e,i,s;for(s=[],e=0,i=r.length;i>e;e++)n=r[e],n!==t&&s.push(n);return s}(),e.setAttribute("class",r.join(" "))},t=function(e,t){var n;return n=e.getAttribute("class")+" "+t,e.setAttribute("class",n.trim())},p=function(e,n){var r,i,s,o,a,c,u,l,d;for(r=document.querySelector(".js-calendar-graph"),d=r.querySelectorAll("rect.day"),o=0,c=d.length;c>o;o++)i=d[o],f(i,"active");if(r.classList.remove("days-selected"),e||n){for(r.classList.add("days-selected"),s=function(t){var r;return r=y(t.getAttribute("data-date")).getTime(),e&&n?e.getTime()<=r&&r<=n.getTime():r===e.getTime()},l=[],a=0,u=d.length;u>a;a++)i=d[a],s(i)&&l.push(t(i,"active"));return l}},c=function(e){return("0"+e).slice(-2)},o=function(e){return e.getUTCFullYear()+"-"+c(e.getUTCMonth()+1)+"-"+c(e.getUTCDate())},y=function(e){var t,n,r,i,s;return r=function(){var t,n,r,s;for(r=e.split("-"),s=[],t=0,n=r.length;n>t;t++)i=r[t],s.push(parseInt(i));return s}(),s=r[0],n=r[1],t=r[2],new Date(Date.UTC(s,n-1,t))},h=function(e,t,n){var i,s,c,l,h,f,b,y;return y=r()+"?tab=contributions",e>=g&&v>=e?void m("weekly"):("object"==typeof t&&(d=t,t=!0),d&&t?(c=new Date(d.getTime()-26784e5),s=new Date(d.getTime()+26784e5),l=e>d?[d,e]:[e,d],i=l[0],b=l[1],c>i&&(i=c),b>s&&(b=s),h=[i,b],g=h[0],v=h[1],y+="&from="+o(i)+"&to="+o(b)):(i=e,f=[i,null],g=f[0],v=f[1],y+="&from="+o(i)),d=e,u="custom",p(i,b),n?void 0:a(y))},$(document).on("change",".js-period-container",function(e){var t;return e.preventDefault(),e.stopPropagation(),t=$(e.target).val().toLowerCase(),u!==t?m(t):void 0})}.call(this),$(function(){function e(){var t=$("#current-version").val();t&&n("_current").then(function(n){t==n?setTimeout(e,5e3):r||($("#gollum-error-message").text("Someone has edited the wiki since you started. Please reload this page and re-apply your changes."),$("#gollum-error-message").show(),$("#gollum-editor-submit").attr("disabled","disabled"),$("#gollum-editor-submit").attr("value","Cannot Save, Someone Else Has Edited"))})}var t=require("github/fetch"),n=t.fetchText,r=!1;$("#gollum-editor-body").each(e),$("#gollum-editor-submit").click(function(){r=!0})}),function(){var e,t,n;e=null!=(t=document.querySelector("meta[name=form-nonce]"))?t.content:void 0,null!=e&&(n=require("github/failbot").reportError,$.observe("form",function(t){var r,i;"get"!==t.method.toLowerCase()&&(i=t.getAttribute("data-form-nonce"),null!=i&&i!==e&&(r=new Error("Incorrect form-nonce"),n(r,{form:$(t).inspect(),method:t.method,action:t.action})),(null==i||i!==e)&&t.remove())}))}.call(this),function(){var e,t,n;n=require("github/failbot").reportError,t=require("github/proxy-site-detection")["default"],t&&(e=new Error("Potential Proxy site detected"),n(e,{url:window.location.href,proxySite:!0}))}.call(this),function(){var e,t,n,r,i,s;e=require("github/fetch").fetch,n=function(){var t;return document.getElementById("js-sudo-prompt")?Promise.resolve():(t=document.querySelector("link[rel=sudo-modal]"))?e(t.href).then(function(e){return e.text()}).then(function(e){return document.body.insertAdjacentHTML("beforeend",e)}):Promise.reject()},t=function(){return e("/sessions/in_sudo.json").then(function(e){return e.json()})},s=function(){return n().then(function(){return $.facebox({div:"#js-sudo-prompt"},"sudo")}).then(function(e){return new Promise(function(t,n){var r,i;return i=null,r=$(e).find(".js-sudo-form"),r.find(".js-sudo-login, .js-sudo-password").first().focus(),r.on("ajaxSuccess",function(){return i=!0,$(document).trigger("close.facebox")}),r.on("ajaxError",function(){return i=!1,$(this).find(".js-sudo-error").text("Incorrect Password.").show(),$(this).find(".js-sudo-password").val(""),!1}),$(document).one("afterClose.facebox",function(){return i?t(!0):n(new Error("sudo prompt canceled"))})})})},$.sudo=function(){return t().then(function(e){return e||s()})},i=!1,r=function(e){i||(e.preventDefault(),e.stopImmediatePropagation(),$.sudo().then(function(){i=!0,$(e.target)[e.type](),i=!1}))},$.observe("a.js-sudo-required",{add:function(){return $(this).on("click",r)},remove:function(){return $(this).off("click",r)}}),$.observe("form.js-sudo-required",{add:function(){return $(this).on("submit",r)},remove:function(){return $(this).off("submit",r)}})}.call(this),function(){}.call(this);