"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([["vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-29dc30"],{59753:(e,t,n)=>{function r(){if(!(this instanceof r))return new r;this.size=0,this.uid=0,this.selectors=[],this.selectorObjects={},this.indexes=Object.create(this.indexes),this.activeIndexes=[]}n.d(t,{f:()=>S,S:()=>x,on:()=>T});var s,i=window.document.documentElement,l=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.oMatchesSelector||i.msMatchesSelector;r.prototype.matchesSelector=function(e,t){return l.call(e,t)},r.prototype.querySelectorAll=function(e,t){return t.querySelectorAll(e)},r.prototype.indexes=[];var a=/^#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;r.prototype.indexes.push({name:"ID",selector:function(e){var t;if(t=e.match(a))return t[0].slice(1)},element:function(e){if(e.id)return[e.id]}});var o=/^\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;r.prototype.indexes.push({name:"CLASS",selector:function(e){var t;if(t=e.match(o))return t[0].slice(1)},element:function(e){var t=e.className;if(t){if("string"==typeof t)return t.split(/\s/);if("object"==typeof t&&"baseVal"in t)return t.baseVal.split(/\s/)}}});var c=/^((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;r.prototype.indexes.push({name:"TAG",selector:function(e){var t;if(t=e.match(c))return t[0].toUpperCase()},element:function(e){return[e.nodeName.toUpperCase()]}}),r.prototype.indexes.default={name:"UNIVERSAL",selector:function(){return!0},element:function(){return[!0]}},s="function"==typeof window.Map?window.Map:function(){function e(){this.map={}}return e.prototype.get=function(e){return this.map[e+" "]},e.prototype.set=function(e,t){this.map[e+" "]=t},e}();var u=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g;function d(e,t){var n,r,s,i,l,a,o=(e=e.slice(0).concat(e.default)).length,c=t,d=[];do if(u.exec(""),(s=u.exec(c))&&(c=s[3],s[2]||!c)){for(n=0;n3&&void 0!==arguments[3]?arguments[3]:{},i=!!s.capture,l=i?h:g,a=l[e];a||(a=new r,l[e]=a,document.addEventListener(e,A,i)),a.add(t,n)}function x(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=!!r.capture,i=s?h:g,l=i[e];l&&(l.remove(t,n),l.size||(delete i[e],document.removeEventListener(e,A,s)))}function S(e,t,n){return e.dispatchEvent(new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n}))}},14840:(e,t,n)=>{n.d(t,{Z:()=>p});let r="data-close-dialog",s=`[${r}]`;function i(e){let t=Array.from(e.querySelectorAll("[autofocus]")).filter(a)[0];t||(t=e,e.setAttribute("tabindex","-1")),t.focus()}function l(e){let t=e.currentTarget;t instanceof Element&&("Escape"===e.key||"Esc"===e.key?(d(t,!1),e.stopPropagation()):"Tab"===e.key&&function(e){if(!(e.currentTarget instanceof Element))return;let t=e.currentTarget.querySelector("details-dialog");if(!t)return;e.preventDefault();let n=Array.from(t.querySelectorAll("*")).filter(a);if(0===n.length)return;let r=e.shiftKey?-1:1,s=t.getRootNode(),i=t.contains(s.activeElement)?s.activeElement:null,l=-1===r?-1:0;if(i instanceof HTMLElement){let e=n.indexOf(i);-1!==e&&(l=e+r)}l<0?l=n.length-1:l%=n.length,n[l].focus()}(e))}function a(e){var t;return e.tabIndex>=0&&!e.disabled&&!(t=e).hidden&&(!t.type||"hidden"!==t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}function o(e){let t=e.querySelector("details-dialog");return!(t instanceof DetailsDialogElement)||t.dispatchEvent(new CustomEvent("details-dialog-close",{bubbles:!0,cancelable:!0}))}function c(e){if(!(e.currentTarget instanceof Element))return;let t=e.currentTarget.closest("details");t&&t.hasAttribute("open")&&!o(t)&&(e.preventDefault(),e.stopPropagation())}function u(e){let t=e.currentTarget;if(!(t instanceof Element))return;let n=t.querySelector("details-dialog");if(n instanceof DetailsDialogElement){if(t.hasAttribute("open")){let e="getRootNode"in n?n.getRootNode():document;e.activeElement instanceof HTMLElement&&m.set(n,{details:t,activeElement:e.activeElement}),i(n),t.addEventListener("keydown",l)}else{for(let e of n.querySelectorAll("form"))e.reset();let e=function(e,t){let n=m.get(t);return n&&n.activeElement instanceof HTMLElement?n.activeElement:e.querySelector("summary")}(t,n);e&&e.focus(),t.removeEventListener("keydown",l)}}}function d(e,t){t!==e.hasAttribute("open")&&(t?e.setAttribute("open",""):o(e)&&e.removeAttribute("open"))}function f(e){let t=e.currentTarget;if(!(t instanceof Element))return;let n=t.querySelector("details-dialog");if(!(n instanceof DetailsDialogElement))return;let r=n.querySelector("include-fragment:not([src])");if(!r)return;let s=n.src;null!==s&&(r.addEventListener("loadend",()=>{t.hasAttribute("open")&&i(n)}),r.setAttribute("src",s),h(t))}function g(e,t,n){h(e),t&&e.addEventListener("toggle",f,{once:!0}),t&&n&&e.addEventListener("mouseover",f,{once:!0})}function h(e){e.removeEventListener("toggle",f),e.removeEventListener("mouseover",f)}let m=new WeakMap;let DetailsDialogElement=class DetailsDialogElement extends HTMLElement{static get CLOSE_ATTR(){return r}static get CLOSE_SELECTOR(){return s}constructor(){super(),m.set(this,{details:null,activeElement:null}),this.addEventListener("click",function({target:e}){if(!(e instanceof Element))return;let t=e.closest("details");t&&e.closest(s)&&d(t,!1)})}get src(){return this.getAttribute("src")}set src(e){this.setAttribute("src",e||"")}get preload(){return this.hasAttribute("preload")}set preload(e){e?this.setAttribute("preload",""):this.removeAttribute("preload")}connectedCallback(){this.setAttribute("role","dialog"),this.setAttribute("aria-modal","true");let e=m.get(this);if(!e)return;let t=this.parentElement;if(!t)return;let n=t.querySelector("summary");n&&(n.hasAttribute("role")||n.setAttribute("role","button"),n.addEventListener("click",c,{capture:!0})),t.addEventListener("toggle",u),e.details=t,g(t,this.src,this.preload)}disconnectedCallback(){let e=m.get(this);if(!e)return;let{details:t}=e;if(!t)return;t.removeEventListener("toggle",u),h(t);let n=t.querySelector("summary");n&&n.removeEventListener("click",c,{capture:!0}),e.details=null}toggle(e){let t=m.get(this);if(!t)return;let{details:n}=t;n&&d(n,e)}static get observedAttributes(){return["src","preload"]}attributeChangedCallback(){let e=m.get(this);if(!e)return;let{details:t}=e;t&&g(t,this.src,this.preload)}};let p=DetailsDialogElement;window.customElements.get("details-dialog")||(window.DetailsDialogElement=DetailsDialogElement,window.customElements.define("details-dialog",DetailsDialogElement))},40987:(e,t,n)=>{n.d(t,{Z:()=>TaskListsElement});let r=new WeakMap,s=null;function i(e,t){return e.closest("task-lists")===t.closest("task-lists")}function l(e){if(e.currentTarget!==e.target)return;let t=e.currentTarget;if(!(t instanceof Element))return;let n=t.closest(".contains-task-list");if(!n||(t.classList.add("is-ghost"),e.dataTransfer&&e.dataTransfer.setData("text/plain",(t.textContent||"").trim()),!t.parentElement))return;let i=Array.from(t.parentElement.children),l=i.indexOf(t),a=r.get(t);a&&a.sortStarted(n),s={didDrop:!1,dragging:t,dropzone:t,sourceList:n,sourceSibling:i[l+1]||null,sourceIndex:l}}function a(e){if(!s)return;let t=e.currentTarget;if(t instanceof Element){if(!i(s.dragging,t)){e.stopPropagation();return}e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect="move"),s.dropzone!==t&&(s.dragging.classList.add("is-dragging"),s.dropzone=t,function(e,t){if(e.parentNode===t.parentNode){let n=e;for(;n;){if(n===t)return!0;n=n.previousElementSibling}}return!1}(s.dragging,t)?t.before(s.dragging):t.after(s.dragging))}}function o(e){if(!s)return;e.preventDefault(),e.stopPropagation();let t=e.currentTarget;if(!(t instanceof Element)||(s.didDrop=!0,!s.dragging.parentElement))return;let n=Array.from(s.dragging.parentElement.children).indexOf(s.dragging),i=t.closest(".contains-task-list");if(!i||s.sourceIndex===n&&s.sourceList===i)return;s.sourceList===i&&s.sourceIndex{let t=e.target;t instanceof HTMLInputElement&&t.classList.contains("task-list-item-checkbox")&&this.dispatchEvent(new CustomEvent("task-lists-check",{bubbles:!0,detail:{position:function(e){let t=E(e);if(!t)throw Error(".contains-task-list not found");let n=e.closest(".task-list-item"),r=Array.from(t.children).filter(e=>"LI"===e.tagName),s=n?r.indexOf(n):-1;return[function(e){let t=e.closest("task-lists");if(!t)throw Error("parent not found");return L(t).indexOf(e)}(t),s]}(t),checked:t.checked}}))});let e=new MutationObserver(k.bind(null,this));d.set(this,e),e.observe(this,{childList:!0,subtree:!0}),k(this)}disconnectedCallback(){let e=d.get(this);e&&e.disconnect()}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get sortable(){return this.hasAttribute("sortable")}set sortable(e){e?this.setAttribute("sortable",""):this.removeAttribute("sortable")}static get observedAttributes(){return["disabled"]}attributeChangedCallback(e,t,n){t!==n&&"disabled"===e&&y(this)}};let f=document.createElement("template"),g=document.createElement("span");g.classList.add("handle");let h=document.createElementNS("http://www.w3.org/2000/svg","svg");h.classList.add("drag-handle"),h.setAttribute("aria-hidden","true"),h.setAttribute("width","16"),h.setAttribute("height","16");let m=document.createElementNS("http://www.w3.org/2000/svg","path");m.setAttribute("d","M10 13a1 1 0 100-2 1 1 0 000 2zm-4 0a1 1 0 100-2 1 1 0 000 2zm1-5a1 1 0 11-2 0 1 1 0 012 0zm3 1a1 1 0 100-2 1 1 0 000 2zm1-5a1 1 0 11-2 0 1 1 0 012 0zM6 5a1 1 0 100-2 1 1 0 000 2z"),f.content.appendChild(g),g.appendChild(h),h.appendChild(m);let p=new WeakMap;function v(e){let t=e.currentTarget;if(!(t instanceof Element))return;let n=t.closest("task-lists");n instanceof TaskListsElement&&n.sortable&&!n.disabled&&t.classList.add("hovered")}function b(e){let t=e.currentTarget;t instanceof Element&&t.classList.remove("hovered")}function E(e){let t=e.parentElement;return t?t.closest(".contains-task-list"):null}function k(e){let t=e.querySelectorAll(".contains-task-list > .task-list-item");for(let e of t)E(e)===function e(t){let n=E(t);return n?e(n)||n:null}(e)&&function(e){if(p.get(e))return;p.set(e,!0);let t=e.closest("task-lists");if(!(t instanceof TaskListsElement)||t.querySelectorAll(".task-list-item").length<=1)return;let n=f.content.cloneNode(!0),s=n.querySelector(".handle");if(e.prepend(n),!s)throw Error("handle not found");s.addEventListener("mouseenter",x),s.addEventListener("mouseleave",S),r.set(e,{sortStarted:A,sortFinished:T}),e.addEventListener("dragstart",l),e.addEventListener("dragenter",a),e.addEventListener("dragend",c),e.addEventListener("drop",o),e.addEventListener("dragover",u),e.addEventListener("mouseenter",v),e.addEventListener("mouseleave",b)}(e);y(e)}function y(e){for(let t of e.querySelectorAll(".task-list-item"))t.classList.toggle("enabled",!e.disabled);for(let t of e.querySelectorAll(".task-list-item-checkbox"))t instanceof HTMLInputElement&&(t.disabled=e.disabled)}function L(e){return Array.from(e.querySelectorAll("ol, ul")).filter(e=>!e.closest("tracking-block"))}let w=new WeakMap;function A(e){let t=e.closest("task-lists");if(!t)throw Error("parent not found");w.set(t,L(t))}function T({src:e,dst:t}){let n=e.list.closest("task-lists");if(!n)return;let r=w.get(n);r&&(w.delete(n),n.dispatchEvent(new CustomEvent("task-lists-move",{bubbles:!0,detail:{src:[r.indexOf(e.list),e.index],dst:[r.indexOf(t.list),t.index]}})))}function x(e){let t=e.currentTarget;if(!(t instanceof Element))return;let n=t.closest(".task-list-item");if(!n)return;let r=n.closest("task-lists");r instanceof TaskListsElement&&r.sortable&&!r.disabled&&n.setAttribute("draggable","true")}function S(e){if(s)return;let t=e.currentTarget;if(!(t instanceof Element))return;let n=t.closest(".task-list-item");n&&n.setAttribute("draggable","false")}window.customElements.get("task-lists")||(window.TaskListsElement=TaskListsElement,window.customElements.define("task-lists",TaskListsElement))}}]); //# sourceMappingURL=vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-29dc30-716926b41185.js.map