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.

2 lines
52 KiB

  1. System.register(["./chunk-vendor.js","./chunk-frameworks.js"],(function(){"use strict";var e,t,n,s,o,r,c,i,l,a,u,d,m,g,f,h,b,p,j,y,S,v,q,A,L,w,E,T,x,k,_;return{setters:[function(r){e=r.o,t=r.a,n=r.r,s=r.I,o=r.f},function(e){r=e.e,c=e.aD,i=e.n,l=e.f,a=e.aE,u=e.c,d=e.C,m=e.a,g=e.aF,f=e.p,h=e.aG,b=e.aH,p=e.aI,j=e.aJ,y=e.as,S=e.aK,v=e.H,q=e.a3,A=e.i,L=e.al,w=e.aj,E=e.s,T=e.G,x=e.B,k=e.X,_=e.aL}],execute:function(){const C=()=>{const e=document.querySelector(".js-branches-list"),t=document.querySelector("#spoof-warning"),n=document.querySelector(".commit-title");e&&(e.parentElement.hidden=!0,t.hidden=!1,t.removeAttribute("aria-hidden"),n.classList.add("pb-1"))},I=document.querySelector("#async-branches-list");function H(e,t){return Array.from(document.querySelectorAll(".js-details-container.open.Details--on")).filter((n=>n.getAttribute(e)===t))}function M(e,t,n,s,o){const i=document.querySelector(".js-file-filter"),l=new URL(window.location.href,window.location.origin);if(!e&&!s){if(t)return;return l.search="",r(c(),"",l.toString())}const a=i.querySelector(".js-file-filter-form"),u=new FormData(a),d=n.filter((e=>!u.getAll("file-filters[]").includes(e))),m=o.filter((e=>!u.getAll("owned-by[]").includes(e)));for(const r of d)u.append("file-filters[]",r);for(const r of m)u.append("owned-by[]",r);const g=new URLSearchParams(u);g.has("file-filters[]")&&""!==g.toString()||g.set("file-filters[]",""),t&&g.set("w","1"),l.search=g.toString(),r(c(),"",l.toString())}function R(e){var t;t=e,document.querySelector(".js-file-filter-text").classList.toggle("text-blue",t),function(e){const t=document.querySelector(".js-reset-filters"),n=document.querySelector(".js-commits-filtered");null==t||n||(t.hidden=!e)}(e),function(){const e=P(),t=V();for(const o of e)if(t){const e="0"===o.getAttribute("data-non-deleted-files-count");o.disabled=e}else o.disabled=!1;const n=document.querySelector(".js-deleted-files-container"),s=F();if(s&&n){const t=function(e){const t=e.find((e=>e.checked&&"0"!==e.getAttribute("data-deleted-files-count")));return Boolean(t)}(Array.from(e));n.classList.toggle("text-gray",!t),s.disabled=!t}}(),function(){const e=O(),t=document.querySelector(".js-file-filter-select-all-container"),n=e?"data-select-all-markup":"data-all-selected-markup",s=t.getAttribute(n);t.textContent=s,t.classList.toggle("text-gray",!e),t.classList.toggle("text-blue",e)}(),function(){const e=document.querySelector(".js-deleted-files-container");if(e){const t=V()?"data-show-deleted-markup":"data-hide-deleted-markup",n=e.getAttribute(t);e.textContent=n}}(),function(){const e=document.querySelectorAll(".js-file-type-count");for(const t of e){const e=V()?"data-non-deleted-file-count-markup":"data-all-file-count-markup",n=t.getAttribute(e);n&&(t.textContent=n)}}(),M(e,X(),D(),U(),N())}function $(e){!function(){const e=F(),t=D(),n=document.querySelectorAll(".js-file"),s=N(),o=B();for(const r of n){let n=!0;const c=r.getAttribute("data-file-type");if(c&&(n=t.includes(c)),o&&n){r.hasAttribute("data-file-user-viewed")&&(n=!o.checked)}if(s.length>0&&n){n=(r.getAttribute("data-codeowners")||"").split(",").filter((e=>s.includes(e))).length>0}if(e&&e.checked&&n){"true"===r.getAttribute("data-file-deleted")&&(n=!1)}K(r,n)}}(),R(e)}function D(){return Array.from(P()).filter((e=>e.checked)).map((e=>e.value))}function P(){return document.querySelectorAll(".js-diff-file-type-option")}function F(){const e=document.querySelector(".js-deleted-files-toggle");if(e instanceof HTMLInputElement)return e}function B(){const e=document.querySelector(".js-viewed-files-toggle");if(e instanceof HTMLInputElement)return e}function W(){return O()||V()||U()}function U(){return N().length>0}function N(){return Array.from(document.querySelectorAll(".js-diff-owner-option")).filter((e=>e.checked)).map((e=>e.value))}function O(){return D().length!==P().length}function X(){return new URLSearchParams(window.location.search).has("w")}function V(){const e=F();return!!e&&e.checked}function K(e,t){const n=e.closest(".js-file.js-details-container");n.classList.toggle("open",t),n.classList.toggle("Deta
  2. //# sourceMappingURL=diffs-f9cf7c8d.js.map