"use strict";(()=>{var K=Object.defineProperty;var u=(W,L)=>K(W,"name",{value:L,configurable:!0});(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe","node_modules_delegated-events_dist_index_js"],{59753:(W,L,H)=>{H.d(L,{f:()=>V,on:()=>z});function g(){if(!(this instanceof g))return new g;this.size=0,this.uid=0,this.selectors=[],this.selectorObjects={},this.indexes=Object.create(this.indexes),this.activeIndexes=[]}u(g,"SelectorSet");var x=window.document.documentElement,F=x.matches||x.webkitMatchesSelector||x.mozMatchesSelector||x.oMatchesSelector||x.msMatchesSelector;g.prototype.matchesSelector=function(e,r){return F.call(e,r)},g.prototype.querySelectorAll=function(e,r){return r.querySelectorAll(e)},g.prototype.indexes=[];var q=/^#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;g.prototype.indexes.push({name:"ID",selector:u(function(r){var n;if(n=r.match(q))return n[0].slice(1)},"matchIdSelector"),element:u(function(r){if(r.id)return[r.id]},"getElementId")});var P=/^\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;g.prototype.indexes.push({name:"CLASS",selector:u(function(r){var n;if(n=r.match(P))return n[0].slice(1)},"matchClassSelector"),element:u(function(r){var n=r.className;if(n){if(typeof n=="string")return n.split(/\s/);if(typeof n=="object"&&"baseVal"in n)return n.baseVal.split(/\s/)}},"getElementClassNames")});var B=/^((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;g.prototype.indexes.push({name:"TAG",selector:u(function(r){var n;if(n=r.match(B))return n[0].toUpperCase()},"matchTagSelector"),element:u(function(r){return[r.nodeName.toUpperCase()]},"getElementTagName")}),g.prototype.indexes.default={name:"UNIVERSAL",selector:function(){return!0},element:function(){return[!0]}};var C;typeof window.Map=="function"?C=window.Map:C=function(){function e(){this.map={}}return u(e,"Map"),e.prototype.get=function(r){return this.map[r+" "]},e.prototype.set=function(r,n){this.map[r+" "]=n},e}();var I=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g;function O(e,r){e=e.slice(0).concat(e.default);var n=e.length,c,o,l,a,f=r,m,h,p=[];do if(I.exec(""),(l=I.exec(f))&&(f=l[3],l[2]||!f)){for(c=0;c3&&arguments[3]!==void 0?arguments[3]:{},o=!!c.capture,l=o?w:_,a=l[e];a||(a=new g,l[e]=a,document.addEventListener(e,k,o)),a.add(r,n)}u(z,"on");function G(e,r,n){var c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=!!c.capture,l=o?w:_,a=l[e];!a||(a.remove(r,n),!a.size&&(delete l[e],document.removeEventListener(e,k,o)))}u(G,"off");function V(e,r,n){return e.dispatchEvent(new CustomEvent(r,{bubbles:!0,cancelable:!0,detail:n}))}u(V,"fire")},14840:(W,L,H)=>{H.d(L,{Z:()=>R});const g="data-close-dialog",x=`[${g}]`;function F(s){let t=Array.from(s.querySelectorAll("[autofocus]")).filter(P)[0];t||(t=s,s.setAttribute("tabindex","-1")),t.focus()}u(F,"autofocus");function q(s){const t=s.currentTarget;t instanceof Element&&(s.key==="Escape"||s.key==="Esc"?(_(t,!1),s.stopPropagation()):s.key==="Tab"&&C(s))}u(q,"keydown");function P(s){return s.tabIndex>=0&&!s.disabled&&B(s)}u(P,"focusable");function B(s){return!s.hidden&&(!s.type||s.type!=="hidden")&&(s.offsetWidth>0||s.offsetHeight>0)}u(B,"visible");function C(s){if(!(s.currentTarget instanceof Element))return;const t=s.currentTarget.querySelector("details-dialog");if(!t)return;s.preventDefault();const i=Array.from(t.querySelectorAll("*")).filter(P);if(i.length===0)return;const d=s.shiftKey?-1:1,E=t.getRootNode(),N=t.contains(E.activeElement)?E.activeElement:null;let k=d===-1?-1:0;if(N instanceof HTMLElement){const z=i.indexOf(N);z!==-1&&(k=z+d)}k<0?k=i.length-1:k=k%i.length,i[k].focus()}u(C,"restrictTabBehavior");function I(s){const t=s.querySelector("details-dialog");return t instanceof y?t.dispatchEvent(new CustomEvent("details-dialog-close",{bubbles:!0,cancelable:!0})):!0}u(I,"allowClosingDialog");function O(s){if(!(s.currentTarget instanceof Element))return;const t=s.currentTarget.closest("details");!t||!t.hasAttribute("open")||I(t)||(s.preventDefault(),s.stopPropagation())}u(O,"onSummaryClick");function M(s){const t=s.currentTarget;if(!(t instanceof Element))return;const i=t.querySelector("details-dialog");if(i instanceof y)if(t.hasAttribute("open")){const d="getRootNode"in i?i.getRootNode():document;d.activeElement instanceof HTMLElement&&b.set(i,{details:t,activeElement:d.activeElement}),F(i),t.addEventListener("keydown",q)}else{for(const E of i.querySelectorAll("form"))E.reset();const d=D(t,i);d&&d.focus(),t.removeEventListener("keydown",q)}}u(M,"toggle");function D(s,t){const i=b.get(t);return i&&i.activeElement instanceof HTMLElement?i.activeElement:s.querySelector("summary")}u(D,"findFocusElement");function _(s,t){t!==s.hasAttribute("open")&&(t?s.setAttribute("open",""):I(s)&&s.removeAttribute("open"))}u(_,"toggleDetails");function w(s){const t=s.currentTarget;if(!(t instanceof Element))return;const i=t.querySelector("details-dialog");if(!(i instanceof y))return;const d=i.querySelector("include-fragment:not([src])");if(!d)return;const E=i.src;E!==null&&(d.addEventListener("loadend",()=>{t.hasAttribute("open")&&F(i)}),d.setAttribute("src",E),T(t))}u(w,"loadIncludeFragment");function A(s,t,i){T(s),t&&s.addEventListener("toggle",w,{once:!0}),t&&i&&s.addEventListener("mouseover",w,{once:!0})}u(A,"updateIncludeFragmentEventListeners");function T(s){s.removeEventListener("toggle",w),s.removeEventListener("mouseover",w)}u(T,"removeIncludeFragmentEventListeners");const b=new WeakMap;class y extends HTMLElement{static get CLOSE_ATTR(){return g}static get CLOSE_SELECTOR(){return x}constructor(){super();b.set(this,{details:null,activeElement:null}),this.addEventListener("click",function({target:t}){if(!(t instanceof Element))return;const i=t.closest("details");i&&t.closest(x)&&_(i,!1)})}get src(){return this.getAttribute("src")}set src(t){this.setAttribute("src",t||"")}get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}connectedCallback(){this.setAttribute("role","dialog"),this.setAttribute("aria-modal","true");const t=b.get(this);if(!t)return;const i=this.parentElement;if(!i)return;const d=i.querySelector("summary");d&&(d.hasAttribute("role")||d.setAttribute("role","button"),d.addEventListener("click",O,{capture:!0})),i.addEventListener("toggle",M),t.details=i,A(i,this.src,this.preload)}disconnectedCallback(){const t=b.get(this);if(!t)return;const{details:i}=t;if(!i)return;i.removeEventListener("toggle",M),T(i);const d=i.querySelector("summary");d&&d.removeEventListener("click",O,{capture:!0}),t.details=null}toggle(t){const i=b.get(this);if(!i)return;const{details:d}=i;!d||_(d,t)}static get observedAttributes(){return["src","preload"]}attributeChangedCallback(){const t=b.get(this);if(!t)return;const{details:i}=t;!i||A(i,this.src,this.preload)}}u(y,"DetailsDialogElement");const R=y;window.customElements.get("details-dialog")||(window.DetailsDialogElement=y,window.customElements.define("details-dialog",y))}}]);})(); //# sourceMappingURL=vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe-2fddb5aecbef.js.map