var Ft=(pt,rt,z)=>new Promise((_t,N)=>{var k=x=>{try{S(z.next(x))}catch(G){N(G)}},R=x=>{try{S(z.throw(x))}catch(G){N(G)}},S=x=>x.done?_t(x.value):Promise.resolve(x.value).then(k,R);S((z=z.apply(pt,rt)).next())});(function(){var pt={"./node_modules/@webcomponents/custom-elements/custom-elements.min.js":function(){(function(){"use strict";var N=window.Document.prototype.createElement,k=window.Document.prototype.createElementNS,R=window.Document.prototype.importNode,S=window.Document.prototype.prepend,x=window.Document.prototype.append,G=window.DocumentFragment.prototype.prepend,yt=window.DocumentFragment.prototype.append,st=window.Node.prototype.cloneNode,B=window.Node.prototype.appendChild,X=window.Node.prototype.insertBefore,j=window.Node.prototype.removeChild,at=window.Node.prototype.replaceChild,T=Object.getOwnPropertyDescriptor(window.Node.prototype,"textContent"),K=window.Element.prototype.attachShadow,Q=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),Y=window.Element.prototype.getAttribute,lt=window.Element.prototype.setAttribute,v=window.Element.prototype.removeAttribute,H=window.Element.prototype.toggleAttribute,M=window.Element.prototype.getAttributeNS,I=window.Element.prototype.setAttributeNS,W=window.Element.prototype.removeAttributeNS,U=window.Element.prototype.insertAdjacentElement,L=window.Element.prototype.insertAdjacentHTML,V=window.Element.prototype.prepend,ut=window.Element.prototype.append,tt=window.Element.prototype.before,et=window.Element.prototype.after,nt=window.Element.prototype.replaceWith,P=window.Element.prototype.remove,wt=window.HTMLElement,$=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),it=window.HTMLElement.prototype.insertAdjacentElement,ct=window.HTMLElement.prototype.insertAdjacentHTML,ot=new Set;"annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ").forEach(function(t){return ot.add(t)});function Z(t){var n=ot.has(t);return t=/^[a-z][.0-9_a-z]*-[-.0-9_a-z]*$/.test(t),!n&&t}var gt=document.contains?document.contains.bind(document):document.documentElement.contains.bind(document.documentElement);function E(t){var n=t.isConnected;if(n!==void 0)return n;if(gt(t))return!0;for(;t&&!(t.__CE_isImportDocument||t instanceof Document);)t=t.parentNode||(window.ShadowRoot&&t instanceof ShadowRoot?t.host:void 0);return!(!t||!(t.__CE_isImportDocument||t instanceof Document))}function q(t){var n=t.children;if(n)return Array.prototype.slice.call(n);for(n=[],t=t.firstChild;t;t=t.nextSibling)t.nodeType===Node.ELEMENT_NODE&&n.push(t);return n}function ht(t,n){for(;n&&n!==t&&!n.nextSibling;)n=n.parentNode;return n&&n!==t?n.nextSibling:null}function mt(t,n,o){for(var a=t;a;){if(a.nodeType===Node.ELEMENT_NODE){var i=a;n(i);var s=i.localName;if(s==="link"&&i.getAttribute("rel")==="import"){if(a=i.import,o===void 0&&(o=new Set),a instanceof Node&&!o.has(a))for(o.add(a),a=a.firstChild;a;a=a.nextSibling)mt(a,n,o);a=ht(t,i);continue}else if(s==="template"){a=ht(t,i);continue}if(i=i.__CE_shadowRoot)for(i=i.firstChild;i;i=i.nextSibling)mt(i,n,o)}a=a.firstChild?a.firstChild:ht(t,a)}}function c(){var t=!(O==null||!O.noDocumentConstructionObserver),n=!(O==null||!O.shadyDomFastWalk);this.m=[],this.g=[],this.j=!1,this.shadyDomFastWalk=n,this.I=!t}function e(t,n,o,a){var i=window.ShadyDOM;if(t.shadyDomFastWalk&&i&&i.inUse){if(n.nodeType===Node.ELEMENT_NODE&&o(n),n.querySelectorAll)for(t=i.nativeMethods.querySelectorAll.call(n,"*"),n=0;nr.value).join("")}}S=new WeakMap;const X=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,j=["year","month","week","day","hour","minute","second","millisecond"],at=c=>X.test(c);class T{constructor(e=0,r=0,l=0,m=0,p=0,f=0,y=0,g=0){this.years=e,this.months=r,this.weeks=l,this.days=m,this.hours=p,this.minutes=f,this.seconds=y,this.milliseconds=g,this.years||(this.years=0),this.sign||(this.sign=Math.sign(this.years)),this.months||(this.months=0),this.sign||(this.sign=Math.sign(this.months)),this.weeks||(this.weeks=0),this.sign||(this.sign=Math.sign(this.weeks)),this.days||(this.days=0),this.sign||(this.sign=Math.sign(this.days)),this.hours||(this.hours=0),this.sign||(this.sign=Math.sign(this.hours)),this.minutes||(this.minutes=0),this.sign||(this.sign=Math.sign(this.minutes)),this.seconds||(this.seconds=0),this.sign||(this.sign=Math.sign(this.seconds)),this.milliseconds||(this.milliseconds=0),this.sign||(this.sign=Math.sign(this.milliseconds)),this.blank=this.sign===0}abs(){return new T(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds),Math.abs(this.milliseconds))}static from(e){var r;if(typeof e=="string"){const l=String(e).trim(),m=l.startsWith("-")?-1:1,p=(r=l.match(X))===null||r===void 0?void 0:r.slice(1).map(f=>(Number(f)||0)*m);return p?new T(...p):new T}else if(typeof e=="object"){const{years:l,months:m,weeks:p,days:f,hours:y,minutes:g,seconds:b,milliseconds:D}=e;return new T(l,m,p,f,y,g,b,D)}throw new RangeError("invalid duration")}static compare(e,r){const l=Date.now(),m=Math.abs(K(l,T.from(e)).getTime()-l),p=Math.abs(K(l,T.from(r)).getTime()-l);return m>p?-1:m=0?A*m:0,F>=1?(D-A*12)*m:0,0,F>=3?(b-D*30)*m:0,F>=4?(g-b*24)*m:0,F>=5?(y-g*60)*m:0,F>=6?(f-y*60)*m:0,F>=7?(p-f*1e3)*m:0)}function Y(c,{relativeTo:e=Date.now()}={}){if(e=new Date(e),c.blank)return c;const r=c.sign;let l=Math.abs(c.years),m=Math.abs(c.months),p=Math.abs(c.weeks),f=Math.abs(c.days),y=Math.abs(c.hours),g=Math.abs(c.minutes),b=Math.abs(c.seconds),D=Math.abs(c.milliseconds);D>=900&&(b+=Math.round(D/1e3)),(b||g||y||f||p||m||l)&&(D=0),b>=55&&(g+=Math.round(b/60)),(g||y||f||p||m||l)&&(b=0),g>=55&&(y+=Math.round(g/60)),(y||f||p||m||l)&&(g=0),f&&y>=12&&(f+=Math.round(y/24)),!f&&y>=21&&(f+=Math.round(y/24)),(f||p||m||l)&&(y=0);const A=e.getFullYear();let F=e.getMonth();const dt=e.getDate();return(f>=27||l+m&&f)&&(e.setDate(dt+f*r),m+=Math.abs(e.getFullYear()>=A?e.getMonth()-F:e.getMonth()-F-12),m&&(f=0),F=e.getMonth()),f>=6&&(p+=Math.round(f/7)),(p||m||l)&&(f=0),p>=4&&(m+=Math.round(p/4)),(m||l)&&(p=0),(m>=11||l&&m)&&(e.setMonth(e.getMonth()+m*r),l+=Math.abs(A-e.getFullYear())),l&&(m=0),new T(l*r,m*r,p*r,f*r,y*r,g*r,b*r,D*r)}function lt(c,e){const r=Y(c,e);if(r.blank)return[0,"second"];for(const l of j){if(l==="millisecond")continue;const m=r[`${l}s`];if(m)return[m,l]}return[0,"second"]}var v=function(c,e,r,l){if(r==="a"&&!l)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?c!==e||!l:!e.has(c))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?l:r==="a"?l.call(c):l?l.value:e.get(c)},H=function(c,e,r,l,m){if(l==="m")throw new TypeError("Private method is not writable");if(l==="a"&&!m)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?c!==e||!m:!e.has(c))throw new TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?m.call(c,r):m?m.value=r:e.set(c,r),r},M,I,W,U,L,V,ut,tt,et,nt,P;const wt=globalThis.HTMLElement||null,$=new T,it=new T(0,0,0,0,0,1);class ct extends Event{constructor(e,r,l,m){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=e,this.newText=r,this.oldTitle=l,this.newTitle=m}}function ot(c){if(!c.date)return 1/0;if(c.format==="duration"||c.format==="elapsed"){const r=c.precision;if(r==="second")return 1e3;if(r==="minute")return 60*1e3}const e=Math.abs(Date.now()-c.date.getTime());return e<60*1e3?1e3:e<60*60*1e3?60*1e3:60*60*1e3}const Z=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(c){if(this.elements.has(c))return;this.elements.add(c);const e=c.date;if(e&&e.getTime()){const r=ot(c),l=Date.now()+r;lthis.update(),r),this.time=l)}}unobserve(c){this.elements.has(c)&&this.elements.delete(c)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let c=1/0;for(const e of this.elements)c=Math.min(c,ot(e)),e.update();this.time=Math.min(60*60*1e3,c),this.timer=setTimeout(()=>this.update(),this.time),this.time+=Date.now()}};class gt extends wt{constructor(){super(...arguments),M.add(this),I.set(this,!1),W.set(this,!1),L.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),P.set(this,null)}static define(e="relative-time",r=customElements){return r.define(e,this),this}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","datetime","lang","title"]}get onRelativeTimeUpdated(){return v(this,P,"f")}set onRelativeTimeUpdated(e){v(this,P,"f")&&this.removeEventListener("relative-time-updated",v(this,P,"f")),H(this,P,typeof e=="object"||typeof e=="function"?e:null,"f"),typeof e=="function"&&this.addEventListener("relative-time-updated",e)}get second(){const e=this.getAttribute("second");if(e==="numeric"||e==="2-digit")return e}set second(e){this.setAttribute("second",e||"")}get minute(){const e=this.getAttribute("minute");if(e==="numeric"||e==="2-digit")return e}set minute(e){this.setAttribute("minute",e||"")}get hour(){const e=this.getAttribute("hour");if(e==="numeric"||e==="2-digit")return e}set hour(e){this.setAttribute("hour",e||"")}get weekday(){const e=this.getAttribute("weekday");if(e==="long"||e==="short"||e==="narrow")return e;if(this.format==="datetime"&&e!=="")return this.formatStyle}set weekday(e){this.setAttribute("weekday",e||"")}get day(){var e;const r=(e=this.getAttribute("day"))!==null&&e!==void 0?e:"numeric";if(r==="numeric"||r==="2-digit")return r}set day(e){this.setAttribute("day",e||"")}get month(){const e=this.format;let r=this.getAttribute("month");if(r!==""&&(r!=null||(r=e==="datetime"?this.formatStyle:"short"),r==="numeric"||r==="2-digit"||r==="short"||r==="long"||r==="narrow"))return r}set month(e){this.setAttribute("month",e||"")}get year(){var e;const r=this.getAttribute("year");if(r==="numeric"||r==="2-digit")return r;if(!this.hasAttribute("year")&&new Date().getUTCFullYear()!==((e=this.date)===null||e===void 0?void 0:e.getUTCFullYear()))return"numeric"}set year(e){this.setAttribute("year",e||"")}get timeZoneName(){const e=this.getAttribute("time-zone-name");if(e==="long"||e==="short"||e==="shortOffset"||e==="longOffset"||e==="shortGeneric"||e==="longGeneric")return e}set timeZoneName(e){this.setAttribute("time-zone-name",e||"")}get prefix(){var e;return(e=this.getAttribute("prefix"))!==null&&e!==void 0?e:this.format==="datetime"?"":"on"}set prefix(e){this.setAttribute("prefix",e)}get threshold(){const e=this.getAttribute("threshold");return e&&at(e)?e:"P30D"}set threshold(e){this.setAttribute("threshold",e)}get tense(){const e=this.getAttribute("tense");return e==="past"?"past":e==="future"?"future":"auto"}set tense(e){this.setAttribute("tense",e)}get precision(){const e=this.getAttribute("precision");return j.includes(e)?e:this.format==="micro"?"minute":"second"}set precision(e){this.setAttribute("precision",e)}get format(){const e=this.getAttribute("format");return e==="datetime"?"datetime":e==="relative"?"relative":e==="duration"?"duration":e==="micro"?"micro":e==="elapsed"?"elapsed":"auto"}set format(e){this.setAttribute("format",e)}get formatStyle(){const e=this.getAttribute("format-style");if(e==="long")return"long";if(e==="short")return"short";if(e==="narrow")return"narrow";const r=this.format;return r==="elapsed"||r==="micro"?"narrow":r==="datetime"?"short":"long"}set formatStyle(e){this.setAttribute("format-style",e)}get datetime(){return this.getAttribute("datetime")||""}set datetime(e){this.setAttribute("datetime",e)}get date(){const e=Date.parse(this.datetime);return Number.isNaN(e)?null:new Date(e)}set date(e){this.datetime=(e==null?void 0:e.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){Z.unobserve(this)}attributeChangedCallback(e,r,l){r!==l&&(e==="title"&&H(this,I,l!==null&&(this.date&&v(this,M,"m",V).call(this,this.date))!==l,"f"),!v(this,W,"f")&&!(e==="title"&&v(this,I,"f"))&&H(this,W,(()=>Ft(this,null,function*(){yield Promise.resolve(),this.update()}))(),"f"))}update(){const e=v(this,L,"f").textContent||this.textContent||"",r=this.getAttribute("title")||"";let l=r;const m=this.date;if(typeof Intl=="undefined"||!Intl.DateTimeFormat||!m){v(this,L,"f").textContent=e;return}const p=Date.now();v(this,I,"f")||(l=v(this,M,"m",V).call(this,m)||"",l&&this.setAttribute("title",l));const f=Q(m,this.precision,p),y=v(this,M,"m",ut).call(this,f);let g=e;y==="duration"?g=v(this,M,"m",tt).call(this,f):y==="relative"?g=v(this,M,"m",et).call(this,f):g=v(this,M,"m",nt).call(this,m),g?v(this,L,"f").textContent=g:this.shadowRoot===v(this,L,"f")&&this.textContent&&(v(this,L,"f").textContent=this.textContent),(g!==e||l!==r)&&this.dispatchEvent(new ct(e,g,r,l)),y==="relative"||y==="duration"?Z.observe(this):Z.unobserve(this),H(this,W,!1,"f")}}I=new WeakMap,W=new WeakMap,L=new WeakMap,P=new WeakMap,M=new WeakSet,U=function(){var e;return((e=this.closest("[lang]"))===null||e===void 0?void 0:e.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang")||"default"},V=function(e){return new Intl.DateTimeFormat(v(this,M,"a",U),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(e)},ut=function(e){const r=this.format;if(r==="datetime")return"datetime";if(r==="duration"||r==="elapsed"||r==="micro")return"duration";if((r==="auto"||r==="relative")&&typeof Intl!="undefined"&&Intl.RelativeTimeFormat){const l=this.tense;if(l==="past"||l==="future"||T.compare(e,this.threshold)===1)return"relative"}return"datetime"},tt=function(e){const r=v(this,M,"a",U),l=this.format,m=this.formatStyle,p=this.tense;let f=$;l==="micro"?(e=Y(e),f=it,(this.tense==="past"&&e.sign!==-1||this.tense==="future"&&e.sign!==1)&&(e=it)):(p==="past"&&e.sign!==-1||p==="future"&&e.sign!==1)&&(e=f);const y=`${this.precision}sDisplay`;return e.blank?f.toLocaleString(r,{style:m,[y]:"always"}):e.abs().toLocaleString(r,{style:m})},et=function(e){const r=new Intl.RelativeTimeFormat(v(this,M,"a",U),{numeric:"auto",style:this.formatStyle}),l=this.tense;l==="future"&&e.sign!==1&&(e=$),l==="past"&&e.sign!==-1&&(e=$);const[m,p]=lt(e);return p==="second"&&m<10?r.format(0,"second"):r.format(m,p)},nt=function(e){const r=new Intl.DateTimeFormat(v(this,M,"a",U),{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName});return`${this.prefix} ${r.format(e)}`.trim()};var E=null;const q=typeof globalThis!="undefined"?globalThis:window;try{q.RelativeTimeElement=gt.define()}catch(c){if(!(q.DOMException&&c instanceof DOMException&&c.name==="NotSupportedError")&&!(c instanceof ReferenceError))throw c}var ht=null,mt=null;window.customElements.define("gitea-origin-url",class extends HTMLElement{connectedCallback(){const c=this.getAttribute("data-url");try{if(c.startsWith("http://")||c.startsWith("https://")||c.startsWith("/")){const e=new URL(c,window.origin);e.protocol=window.location.protocol,e.host=window.location.host,this.textContent=e.toString();return}}catch(e){}this.textContent=c}})})()})();