@mixtint/primer-view-components 0.75.1 → 0.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !function(){"use strict";var t,e,n,i,s,o,r,a,l=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},c=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};const d=new WeakMap;let h=null;class IncludeFragmentElement extends HTMLElement{constructor(){super(...arguments),t.add(this),e.set(this,!1),n.set(this,new IntersectionObserver(e=>{for(const s of e)if(s.isIntersecting){const{target:e}=s;if(l(this,n,"f").unobserve(e),!(e instanceof IncludeFragmentElement))return;"lazy"===e.loading&&l(this,t,"m",i).call(this)}},{rootMargin:"0px 0px 256px 0px",threshold:.01}))}static define(t="include-fragment",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){h=null===t?t:Promise.resolve(t)}static get observedAttributes(){return["src","loading"]}get src(){const t=this.getAttribute("src");if(t){const e=this.ownerDocument.createElement("a");return e.href=t,e.href}return""}set src(t){this.setAttribute("src",t)}get loading(){return"lazy"===this.getAttribute("loading")?"lazy":"eager"}set loading(t){this.setAttribute("loading",t)}get accept(){return this.getAttribute("accept")||""}set accept(t){this.setAttribute("accept",t)}get data(){return l(this,t,"m",o).call(this)}attributeChangedCallback(e,n){"src"===e?this.isConnected&&"eager"===this.loading&&l(this,t,"m",i).call(this):"loading"===e&&this.isConnected&&"eager"!==n&&"eager"===this.loading&&l(this,t,"m",i).call(this)}connectedCallback(){if(!this.shadowRoot){this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=":host {display: block;}",this.shadowRoot.append(t,document.createElement("slot"))}this.src&&"eager"===this.loading&&l(this,t,"m",i).call(this),"lazy"===this.loading&&l(this,n,"f").observe(this)}request(){const t=this.src;if(!t)throw new Error("missing src");return new Request(t,{method:"GET",credentials:"same-origin",headers:{Accept:this.accept||"text/html"}})}load(){return l(this,t,"m",o).call(this)}fetch(t){return fetch(t)}refetch(){d.delete(this),l(this,t,"m",i).call(this)}}e=new WeakMap,n=new WeakMap,t=new WeakSet,i=async function(){if(!l(this,e,"f")){c(this,e,!0,"f"),l(this,n,"f").unobserve(this);try{const n=await l(this,t,"m",s).call(this);if(n instanceof Error)throw n;const i=n,o=document.createElement("template");o.innerHTML=i;const r=document.importNode(o.content,!0);if(!this.dispatchEvent(new CustomEvent("include-fragment-replace",{cancelable:!0,detail:{fragment:r}})))return void c(this,e,!1,"f");this.replaceWith(r),this.dispatchEvent(new CustomEvent("include-fragment-replaced"))}catch(t){this.classList.add("is-error")}finally{c(this,e,!1,"f")}}},s=async function(){const e=this.src,n=d.get(this);if(n&&n.src===e)return n.data;{let n;return n=e?l(this,t,"m",a).call(this):Promise.reject(new Error("missing src")),d.set(this,{src:e,data:n}),n}},o=async function(){const e=await l(this,t,"m",s).call(this);if(e instanceof Error)throw e;return e.toString()},r=async function(t,e){await new Promise(t=>setTimeout(t,0));for(const n of t)this.dispatchEvent(e?new CustomEvent(n,{detail:{error:e}}):new Event(n))},a=async function(){try{await l(this,t,"m",r).call(this,["loadstart"]);const n=await this.fetch(this.request()),i=n.headers.get("Content-Type");if(!(e=this.accept,e&&e.split(",").find(t=>t.match(/^\s*\*\/\*/))||i&&i.includes(this.accept?this.accept:"text/html")))throw new Error(`Failed to load resource: expected ${this.accept||"text/html"} but was ${i}`);if(200!==n.status)throw new Error(`Failed to load resource: the server responded with a status of ${n.status}`);const s=await n.text();let o=s;if(h){o=(await h).createHTML(s,n)}return l(this,t,"m",r).call(this,["load","loadend"]),o}catch(e){throw l(this,t,"m",r).call(this,["error","loadend"],e),e}var e};const u="undefined"!=typeof globalThis?globalThis:window;try{u.IncludeFragmentElement=IncludeFragmentElement.define()}catch(t){if(!(u.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}const f=new WeakMap;class RemoteInputElement extends HTMLElement{constructor(){super();const t=m.bind(null,this,!0),e={currentQuery:null,oninput:p(e=>t(e)),fetch:t,controller:null};f.set(this,e)}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e){e&&"src"===t&&m(this,!1)}connectedCallback(){const t=this.input;if(!t)return;t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false");const e=f.get(this);e&&(t.addEventListener("focus",e.fetch),t.addEventListener("change",e.fetch),t.addEventListener("input",e.oninput))}disconnectedCallback(){const t=this.input;if(!t)return;const e=f.get(this);e&&(t.removeEventListener("focus",e.fetch),t.removeEventListener("change",e.fetch),t.removeEventListener("input",e.oninput))}get input(){const t=this.querySelector("input, textarea");return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}}async function m(t,e,n){const i=t.input;if(!i)return;const s=f.get(t);if(!s)return;const o=i.value;if(e&&s.currentQuery===o)return;s.currentQuery=o;const r=t.src;if(!r)return;const a=document.getElementById(t.getAttribute("aria-owns")||"");if(!a)return;const l=new URL(r,window.location.href),c=new URLSearchParams(l.search);let d;c.append(t.getAttribute("param")||"q",o),l.search=c.toString(),s.controller?s.controller.abort():(t.dispatchEvent(new CustomEvent("loadstart")),t.setAttribute("loading","")),s.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};let h="";try{d=await async function(t,e,n){try{const i=await fetch(e,n);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),i}catch(e){throw e instanceof Error&&"AbortError"!==(null==e?void 0:e.name)&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),e}}(t,l.toString(),{signal:s.controller.signal,credentials:"same-origin",headers:{accept:"text/fragment+html"}}),h=await d.text(),t.removeAttribute("loading"),s.controller=null}catch(e){return void(e instanceof Error&&"AbortError"!==e.name&&(t.removeAttribute("loading"),s.controller=null))}d&&d.ok?(a.innerHTML=h,t.dispatchEvent(new CustomEvent("remote-input-success",{bubbles:!0,detail:{eventType:n?n.type:void 0}}))):t.dispatchEvent(new CustomEvent("remote-input-error",{bubbles:!0}))}function p(t){let e;return function(n){clearTimeout(e),e=setTimeout(()=>{clearTimeout(e),t(n)},300)}}function g(t,e,n,i){var s,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,n,r):s(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r}function b(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function v(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n}window.customElements.get("remote-input")||(window.RemoteInputElement=RemoteInputElement,window.customElements.define("remote-input",RemoteInputElement)),"function"==typeof SuppressedError&&SuppressedError;const w=new WeakSet;function y(t){k(t),A(t)}const E=new WeakMap;function A(t=document){if(E.has(t))return E.get(t);let e=!1;const n=new MutationObserver(t=>{for(const e of t)if("attributes"===e.type&&e.target instanceof Element)C(e.target);else if("childList"===e.type&&e.addedNodes.length)for(const t of e.addedNodes)t instanceof Element&&k(t)});n.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const i={get closed(){return e},unsubscribe(){e=!0,E.delete(t),n.disconnect()}};return E.set(t,i),i}function k(t){for(const e of t.querySelectorAll("[data-action]"))C(e);t instanceof Element&&t.hasAttribute("data-action")&&C(t)}function L(t){const e=t.currentTarget;for(const n of T(e))if(t.type===n.type){const i=e.closest(n.tag);w.has(i)&&"function"==typeof i[n.method]&&i[n.method](t);const s=e.getRootNode();if(s instanceof ShadowRoot&&w.has(s.host)&&s.host.matches(n.tag)){const e=s.host;"function"==typeof e[n.method]&&e[n.method](t)}}}function*T(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const t=e.lastIndexOf(":"),n=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,n),method:e.slice(n+1)||"handleEvent"}||"handleEvent"}}function C(t){for(const e of T(t))t.addEventListener(e.type,L)}const S=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),x=(t,e="property")=>{const n=S(t);if(!n.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return n};const M="attr";function I(t,e){$(t,M).add(e)}const D=new WeakSet;function P(t,e){if(D.has(t))return;D.add(t);const n=Object.getPrototypeOf(t),i=n?.constructor?.attrPrefix??"data-";e||(e=$(n,M));for(const n of e){const e=t[n],s=x(`${i}${n}`);let o={configurable:!0,get(){return this.getAttribute(s)||""},set(t){this.setAttribute(s,t||"")}};"number"==typeof e?o={configurable:!0,get(){return Number(this.getAttribute(s)||0)},set(t){this.setAttribute(s,t)}}:"boolean"==typeof e&&(o={configurable:!0,get(){return this.hasAttribute(s)},set(t){this.toggleAttribute(s,t)}}),Object.defineProperty(t,n,o),n in t&&!t.hasAttribute(s)&&o.set.call(t,e)}}const O=new Map,N=new Promise(t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",()=>t(),{once:!0})}),H=new Promise(t=>{const e=new AbortController;e.signal.addEventListener("abort",()=>t());const n={once:!0,passive:!0,signal:e.signal},i=()=>e.abort();document.addEventListener("mousedown",i,n),document.addEventListener("touchstart",i,n),document.addEventListener("keydown",i,n),document.addEventListener("pointerdown",i,n)}),F={ready:()=>N,firstInteraction:()=>H,visible:t=>new Promise(e=>{const n=new IntersectionObserver(t=>{for(const i of t)if(i.isIntersecting)return e(),void n.disconnect()},{rootMargin:"0px 0px 256px 0px",threshold:.01});for(const e of document.querySelectorAll(t))n.observe(e)})},V=new WeakMap;function q(t){cancelAnimationFrame(V.get(t)||0),V.set(t,requestAnimationFrame(()=>{for(const e of O.keys()){const n=t instanceof Element&&t.matches(e)?t:t.querySelector(e);if(customElements.get(e)||n){const i=n?.getAttribute("data-load-on")||"ready",s=i in F?F[i]:F.ready;for(const t of O.get(e)||[])s(e).then(t);O.delete(e),V.delete(t)}}}))}let R;const W=Symbol.for("catalyst");class B{constructor(t){const e=this,n=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){e.connectedCallback(this,n)};const i=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){e.disconnectedCallback(this,i)};const s=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,n,i){e.attributeChangedCallback(this,t,n,i,s)};let o=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return e.observedAttributes(this,o)},set(t){o=t}}),function(t){let e=t.observedAttributes||[];const n=t.attrPrefix??"data-",i=t=>x(`${n}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[...$(t.prototype,M)].map(i).concat(e),set(t){e=t}})}(t),function(t){const e=S(t.name).replace(/-element$/,"");try{window.customElements.define(e,t),window[t.name]=customElements.get(e)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t)}observedAttributes(t,e){return e}connectedCallback(t,e){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),function(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0))}(t),P(t),function(t){w.add(t),t.shadowRoot&&y(t.shadowRoot),k(t),A(t.ownerDocument)}(t),e?.call(t),t.shadowRoot&&(y(t.shadowRoot),function(t){R||(R=new MutationObserver(t=>{if(O.size)for(const e of t)for(const t of e.addedNodes)t instanceof Element&&q(t)})),q(t),R.observe(t,{subtree:!0,childList:!0})}(t.shadowRoot))}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,n,i,s){P(t),"data-catalyst"!==e&&s&&s.call(t,e,n,i)}}function $(t,e){if(!Object.prototype.hasOwnProperty.call(t,W)){const e=t[W],n=t[W]=new Map;if(e)for(const[t,i]of e)n.set(t,new Set(i))}const n=t[W];return n.has(e)||n.set(e,new Set),n.get(e)}function U(t,e){$(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase();if(t.shadowRoot)for(const i of t.shadowRoot.querySelectorAll(`[data-target~="${n}.${e}"]`))if(!i.closest(n))return i;for(const i of t.querySelectorAll(`[data-target~="${n}.${e}"]`))if(i.closest(n)===t)return i}(this,e)}})}function K(t,e){$(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase(),i=[];if(t.shadowRoot)for(const s of t.shadowRoot.querySelectorAll(`[data-targets~="${n}.${e}"]`))s.closest(n)||i.push(s);for(const s of t.querySelectorAll(`[data-targets~="${n}.${e}"]`))s.closest(n)===t&&i.push(s);return i}(this,e)}})}function j(t){new B(t)}var z;class _{constructor(t){this.resizeObserver=new ResizeObserver(t=>{for(const e of t){const t=e.target;t instanceof HTMLElement&&this.update(t)}}),this.resizeObserver.observe(t)}unobserve(t){this.resizeObserver.unobserve(t)}update(t){const e=t.querySelectorAll("li");for(const t of e){const e=t.querySelector(".ActionListItem-label");if(!e)continue;const n=t.querySelector(".ActionListItem-truncationTooltip");if(!n)continue;const i=e.scrollWidth>e.clientWidth;n.style.display=i?"":"none"}}}let Y=class ActionListElement extends HTMLElement{constructor(){super(...arguments),z.set(this,void 0)}connectedCallback(){v(this,z,new _(this),"f")}disconnectedCallback(){b(this,z,"f").unobserve(this)}};z=new WeakMap,Y=g([j],Y);const Z={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},G={start:["end","center"],end:["start","center"],center:["end","start"]};function X(t,e,n={}){const i=function(t){if(function(t){var e;if("DIALOG"===t.tagName)return!0;try{if(t.matches(":popover-open")&&/native code/.test(null===(e=document.body.showPopover)||void 0===e?void 0:e.toString()))return!0}catch(t){return!1}return!1}(t))return document.body;let e=t.parentNode;for(;null!==e;){if(e instanceof HTMLElement&&"static"!==getComputedStyle(e).position)return e;e=e.parentNode}return document.body}(t),s=function(t){let e=t;for(;null!==e&&e instanceof Element;){if("visible"!==getComputedStyle(e).overflow)break;e=e.parentNode}const n=e!==document.body&&e instanceof HTMLElement?e:document.body,i=n.getBoundingClientRect(),s=getComputedStyle(n),[o,r,a,l]=[s.borderTopWidth,s.borderLeftWidth,s.borderRightWidth,s.borderBottomWidth].map(t=>parseInt(t,10)||0);return{top:i.top+o,left:i.left+r,width:i.width-a-r,height:Math.max(i.height-o-l,n===document.body?window.innerHeight:-1/0)}}(i),o=getComputedStyle(i),r=i.getBoundingClientRect(),[a,l]=[o.borderTopWidth,o.borderLeftWidth].map(t=>parseInt(t,10)||0);return function(t,e,n,i,{side:s,align:o,allowOutOfBounds:r,anchorOffset:a,alignmentOffset:l}){const c={top:t.top-e.top,left:t.left-e.left,width:t.width,height:t.height};let d=Q(n,i,s,o,a,l),h=s,u=o;if(d.top-=e.top,d.left-=e.left,!r){const r=Z[s];let f=0;if(r){let t=s;for(;f<r.length&&tt(t,d,c,n);){const s=r[f++];t=s,d=Q(n,i,s,o,a,l),d.top-=e.top,d.left-=e.left,h=s}}const m=G[o];let p=0;if(m){let t=o;for(;p<m.length&&et(t,d,c,n);){const s=m[p++];t=s,d=Q(n,i,h,s,a,l),d.top-=e.top,d.left-=e.left,u=s}}d.top<c.top&&(d.top=c.top),d.left<c.left&&(d.left=c.left),d.left+n.width>t.width+c.left&&(d.left=t.width+c.left-n.width),r&&f<r.length&&d.top+n.height>t.height+c.top&&(d.top=Math.max(t.height+c.top-n.height,0))}return Object.assign(Object.assign({},d),{anchorSide:h,anchorAlign:u})}(s,{top:r.top+a,left:r.left+l},t.getBoundingClientRect(),e instanceof Element?e.getBoundingClientRect():e,function(t={}){var e,n,i,s,o;const r=null!==(e=t.side)&&void 0!==e?e:J.side,a=null!==(n=t.align)&&void 0!==n?n:J.align;return{side:r,align:a,anchorOffset:null!==(i=t.anchorOffset)&&void 0!==i?i:"inside-center"===r?0:J.anchorOffset,alignmentOffset:null!==(s=t.alignmentOffset)&&void 0!==s?s:"center"!==a&&r.startsWith("inside")?J.alignmentOffset:0,allowOutOfBounds:null!==(o=t.allowOutOfBounds)&&void 0!==o?o:J.allowOutOfBounds}}(n))}const J={side:"outside-bottom",align:"start",anchorOffset:4,alignmentOffset:4,allowOutOfBounds:!1};function Q(t,e,n,i,s,o){const r=e.left+e.width,a=e.top+e.height;let l=-1,c=-1;return"outside-top"===n?l=e.top-s-t.height:"outside-bottom"===n?l=a+s:"outside-left"===n?c=e.left-s-t.width:"outside-right"===n&&(c=r+s),"outside-top"!==n&&"outside-bottom"!==n||(c="start"===i?e.left+o:"center"===i?e.left-(t.width-e.width)/2+o:r-t.width-o),"outside-left"!==n&&"outside-right"!==n||(l="start"===i?e.top+o:"center"===i?e.top-(t.height-e.height)/2+o:a-t.height-o),"inside-top"===n?l=e.top+s:"inside-bottom"===n?l=a-s-t.height:"inside-left"===n?c=e.left+s:"inside-right"===n?c=r-s-t.width:"inside-center"===n&&(c=(r+e.left)/2-t.width/2+s),"inside-top"===n||"inside-bottom"===n?c="start"===i?e.left+o:"center"===i?e.left-(t.width-e.width)/2+o:r-t.width-o:"inside-left"!==n&&"inside-right"!==n&&"inside-center"!==n||(l="start"===i?e.top+o:"center"===i?e.top-(t.height-e.height)/2+o:a-t.height-o),{top:l,left:c}}function tt(t,e,n,i){return"outside-top"===t||"outside-bottom"===t?e.top<n.top||e.top+i.height>n.height+n.top:e.left<n.left||e.left+i.width>n.width+n.left}function et(t,e,n,i){return"end"===t?e.left<n.left:"start"===t||"center"===t?e.left+i.width>n.left+n.width||e.left<n.left:void 0}function*nt(t,e={}){var n,i;const s=null!==(n=e.strict)&&void 0!==n&&n,o=null!==(i=e.onlyTabbable)&&void 0!==i&&i?ot:st,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>t instanceof HTMLElement&&o(t,s)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=null;if(!e.reverse&&o(t,s)&&(yield t),e.reverse){let t=r.lastChild();for(;t;)a=t,t=r.lastChild()}else a=r.firstChild();for(;a instanceof HTMLElement;)yield a,a=e.reverse?r.previousNode():r.nextNode();e.reverse&&o(t,s)&&(yield t)}function it(t,e=!1){return nt(t,{reverse:e,strict:!0,onlyTabbable:!0}).next().value}function st(t,e=!1){const n=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(t.tagName)&&t.disabled,i=t.hidden,s=t instanceof HTMLInputElement&&"hidden"===t.type,o=t.classList.contains("sentinel");if(n||i||s||o)return!1;if(e){const e=getComputedStyle(t),n=0===t.offsetWidth||0===t.offsetHeight,i=["hidden","collapse"].includes(e.visibility),s="none"===e.display||!t.offsetParent,o=0===t.getClientRects().length;if(n||i||o||s)return!1}return null!=t.getAttribute("tabindex")||("true"===t.getAttribute("contenteditable")||"plaintext-only"===t.getAttribute("contenteditable")||!(t instanceof HTMLAnchorElement&&null==t.getAttribute("href"))&&-1!==t.tabIndex)}function ot(t,e=!1){return st(t,e)&&"-1"!==t.getAttribute("tabindex")}let rt=!1;function at(){}try{const t=Object.create({},{signal:{get(){rt=!0}}});window.addEventListener("test",at,t),window.removeEventListener("test",at,t)}catch(t){}function lt(){rt||(!function(){if("undefined"==typeof window)return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,n,i){return"object"==typeof i&&"signal"in i&&i.signal instanceof AbortSignal&&t.call(i.signal,"abort",()=>{this.removeEventListener(e,n,i)}),t.call(this,e,n,i)}}(),rt=!0)}lt();const ct=[];let dt,ht;function ut(t,e,n){const i=new AbortController,s=null!=n?n:i.signal;t.setAttribute("data-focus-trap","active");const o=document.createElement("span");o.setAttribute("class","sentinel"),o.setAttribute("tabindex","0"),o.setAttribute("aria-hidden","true"),o.onfocus=()=>{const e=it(t,!0);null==e||e.focus()};const r=document.createElement("span");r.setAttribute("class","sentinel"),r.setAttribute("tabindex","0"),r.setAttribute("aria-hidden","true"),r.onfocus=()=>{const e=it(t);null==e||e.focus()};Array.from(t.children).filter(t=>t.classList.contains("sentinel")&&"SPAN"===t.tagName).length||(t.prepend(o),t.append(r));const a=function(t,e){const n=new MutationObserver(n=>{for(const i of n)if("childList"===i.type&&i.addedNodes.length){if(Array.from(i.addedNodes).filter(t=>t instanceof HTMLElement&&t.classList.contains("sentinel")&&"SPAN"===t.tagName).length)return;const n=t.firstElementChild,s=t.lastElementChild,[o,r]=e;(null==n?void 0:n.classList.contains("sentinel"))||t.insertAdjacentElement("afterbegin",o),(null==s?void 0:s.classList.contains("sentinel"))||t.insertAdjacentElement("beforeend",r)}});return n.observe(t,{childList:!0}),n}(t,[o,r]);let l;function c(n){if(n instanceof HTMLElement&&document.contains(t)){if(t.contains(n))return void(l=n);if(l&&ot(l)&&t.contains(l))return void l.focus();if(e&&t.contains(e))return void e.focus();{const e=it(t);return void(null==e||e.focus())}}}const d=function(t){const e=new AbortController;return t.addEventListener("abort",()=>{e.abort()}),e}(s);if(dt){const t=dt;dt.container.setAttribute("data-focus-trap","suspended"),dt.controller.abort(),ct.push(t)}d.signal.addEventListener("abort",()=>{dt=void 0}),s.addEventListener("abort",()=>{t.removeAttribute("data-focus-trap");const e=t.getElementsByClassName("sentinel");for(;e.length>0;)e[0].remove();const n=ct.findIndex(e=>e.container===t);n>=0&&ct.splice(n,1),a.disconnect(),function(){const t=ct.pop();t&&ut(t.container,t.initialFocus,t.originalSignal)}()}),document.addEventListener("focus",t=>{c(t.target)},{signal:d.signal,capture:!0}),c(document.activeElement),dt={container:t,controller:d,initialFocus:e,originalSignal:s};const h=ct.findIndex(e=>e.container===t);if(h>=0&&ct.splice(h,1),!n)return i}function ft(){return void 0===ht&&(ht=/^mac/i.test(window.navigator.platform)),ht}let mt=1e4;const pt=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);var gt;lt(),function(t){t[t.ArrowHorizontal=1]="ArrowHorizontal",t[t.ArrowVertical=2]="ArrowVertical",t[t.JK=4]="JK",t[t.HL=8]="HL",t[t.HomeAndEnd=16]="HomeAndEnd",t[t.PageUpDown=256]="PageUpDown",t[t.WS=32]="WS",t[t.AD=64]="AD",t[t.Tab=128]="Tab",t[t.Backspace=512]="Backspace",t[t.ArrowAll=3]="ArrowAll",t[t.HJKL=12]="HJKL",t[t.WASD=96]="WASD",t[t.All=511]="All"}(gt||(gt={}));const bt={ArrowLeft:gt.ArrowHorizontal,ArrowDown:gt.ArrowVertical,ArrowUp:gt.ArrowVertical,ArrowRight:gt.ArrowHorizontal,h:gt.HL,j:gt.JK,k:gt.JK,l:gt.HL,a:gt.AD,s:gt.WS,w:gt.WS,d:gt.AD,Tab:gt.Tab,Home:gt.HomeAndEnd,End:gt.HomeAndEnd,PageUp:gt.PageUpDown,PageDown:gt.PageUpDown,Backspace:gt.Backspace},vt={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end",Backspace:"previous"};function wt(t){const e=vt[t.key];if("Tab"===t.key&&t.shiftKey)return"previous";const n=ft();if(n&&t.metaKey||!n&&t.ctrlKey){if("ArrowLeft"===t.key||"ArrowUp"===t.key)return"start";if("ArrowRight"===t.key||"ArrowDown"===t.key)return"end"}return e}function yt(t,e){const n=t.key,i=[...n].length,s=function(t){var e,n;if(!(t instanceof HTMLElement))return!1;const i=t.nodeName.toLowerCase(),s=null!==(n=null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())&&void 0!==n?n:"text",o="true"===t.ariaReadOnly||"true"===t.getAttribute("aria-readonly")||null!==t.getAttribute("readonly");return("select"===i||"textarea"===i||"input"===i&&!pt.has(s)||t.isContentEditable)&&!o}(e);if(s&&(1===i||"Home"===n||"End"===n))return!0;if(e instanceof HTMLSelectElement){if("ArrowDown"===n&&ft()&&!t.metaKey)return!0;if("ArrowDown"===n&&!ft()&&t.altKey)return!0}if(s){const t=e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement,i=t&&0===e.selectionStart&&0===e.selectionEnd,s=t&&e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===n&&!i)return!0;if("ArrowRight"===n&&!s)return!0;const o=e instanceof HTMLElement&&e.isContentEditable;if(e instanceof HTMLTextAreaElement||o){if("PageUp"===n||"PageDown"===n)return!0;if("ArrowUp"===n&&!i)return!0;if("ArrowDown"===n&&!s)return!0}}return!1}const Et="data-is-active-descendant",At="data-has-active-descendant";function kt(t,e){var n,i,s,o,r;const a=[],l=new WeakMap,c=null!==(n=null==e?void 0:e.bindKeys)&&void 0!==n?n:((null==e?void 0:e.getNextFocusable)?gt.ArrowAll:gt.ArrowVertical)|gt.HomeAndEnd,d=null!==(i=null==e?void 0:e.focusOutBehavior)&&void 0!==i?i:"stop",h=null!==(s=null==e?void 0:e.focusInStrategy)&&void 0!==s?s:"previous",u=null==e?void 0:e.activeDescendantControl,f=null==e?void 0:e.onActiveDescendantChanged;let m;const p=null!==(o=null==e?void 0:e.preventScroll)&&void 0!==o&&o;function g(){return a[0]}function b(t,e=!1){const n=m;m=t,u?t&&document.activeElement===u?v(n,t,e):w():(n&&n!==t&&l.has(n)&&n.setAttribute("tabindex","-1"),null==t||t.setAttribute("tabindex","0"))}function v(e,n,i=!1){n.id||n.setAttribute("id","__primer_id_"+mt++),e&&e!==n&&e.removeAttribute(Et),u&&(i||u.getAttribute("aria-activedescendant")!==n.id)&&(u.setAttribute("aria-activedescendant",n.id),t.setAttribute(At,n.id),n.setAttribute(Et,i?"activated-directly":"activated-indirectly"),null==f||f(n,e,i))}function w(e=m){"first"===h&&(m=void 0),null==u||u.removeAttribute("aria-activedescendant"),t.removeAttribute(At),null==e||e.removeAttribute(Et);for(const e of t.querySelectorAll(`[${Et}]`))null==e||e.removeAttribute(Et);null==f||f(void 0,e,!1)}function y(...t){const n=t.filter(t=>{var n,i;return null===(i=null===(n=null==e?void 0:e.focusableElementFilter)||void 0===n?void 0:n.call(e,t))||void 0===i||i});if(0!==n.length){a.splice(function(t){const e=t[0];if(0===a.length)return 0;let n=0,i=a.length-1;for(;n<=i;){const t=Math.floor((n+i)/2);E(e,a[t])?i=t-1:n=t+1}return n}(n),0,...n);for(const t of n)l.has(t)||l.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");m||b(g())}}function E(t,e){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)>0}function A(...t){for(const e of t){const t=a.indexOf(e);t>=0&&a.splice(t,1);const n=l.get(e);if(void 0!==n&&(null===n?e.removeAttribute("tabindex"):e.setAttribute("tabindex",n),l.delete(e)),e===m){b(g())}}}const k={reverse:null==e?void 0:e.reverse,strict:null==e?void 0:e.strict,onlyTabbable:null==e?void 0:e.onlyTabbable};y(...nt(t,k));b("function"==typeof h?h(document.body):g());new MutationObserver(t=>{for(const e of t){for(const t of e.removedNodes)t instanceof HTMLElement&&A(...nt(t));"attributes"===e.type&&null===e.oldValue&&e.target instanceof HTMLElement&&A(e.target)}for(const e of t){for(const t of e.addedNodes)t instanceof HTMLElement&&y(...nt(t,k));"attributes"===e.type&&null!==e.oldValue&&e.target instanceof HTMLElement&&y(e.target)}}).observe(t,{subtree:!0,childList:!0,attributeFilter:["hidden","disabled"],attributeOldValue:!0});const L=new AbortController,T=null!==(r=null==e?void 0:e.abortSignal)&&void 0!==r?r:L.signal;let C;T.addEventListener("abort",()=>{A(...a)}),t.addEventListener("mousedown",t=>{t.target instanceof HTMLElement&&t.target!==document.activeElement&&(C=a.indexOf(t.target))},{signal:T}),u?(t.addEventListener("focusin",t=>{t.target instanceof HTMLElement&&a.includes(t.target)&&(u.focus({preventScroll:p}),b(t.target))},{signal:T}),t.addEventListener("mousemove",({target:t})=>{if(!(t instanceof Node))return;const e=a.find(e=>e.contains(t));e&&b(e)},{signal:T,capture:!0}),u.addEventListener("focusin",()=>{m?v(void 0,m):b(g())},{signal:T}),u.addEventListener("focusout",()=>{w()},{signal:T})):t.addEventListener("focusin",e=>{if(e.target instanceof HTMLElement)if(void 0!==C)C>=0&&a[C]!==m&&b(a[C]),C=void 0;else if("previous"===h)b(e.target);else if("closest"===h||"first"===h){if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t="previous"===x?a.length-1:0,e=a[t];return void(null==e||e.focus({preventScroll:p}))}b(e.target)}else if("function"==typeof h)if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t=h(e.relatedTarget);if((t?a.indexOf(t):-1)>=0&&t instanceof HTMLElement)return void t.focus({preventScroll:p});console.warn("Element requested is not a known focusable element.")}else b(e.target);x=void 0},{signal:T});const S=null!=u?u:t;let x;return"closest"===h&&document.addEventListener("keydown",t=>{"Tab"===t.key&&(x=wt(t))},{signal:T,capture:!0}),S.addEventListener("keydown",n=>{var i;if(n.key in vt){const s=bt[n.key];if(!n.defaultPrevented&&(s&c)>0&&!yt(n,document.activeElement)){const s=wt(n);let o;if((null==e?void 0:e.getNextFocusable)&&(o=e.getNextFocusable(s,null!==(i=document.activeElement)&&void 0!==i?i:void 0,n)),!o){const e=function(){if(!m)return 0;const e=a.indexOf(m);return-1!==e?e:m===t?-1:0}();let i=e;"previous"===s?i-=1:"start"===s?i=0:"next"===s?i+=1:i=a.length-1,i<0&&(i="wrap"===d&&"Tab"!==n.key?a.length-1:0),i>=a.length&&(i="wrap"===d&&"Tab"!==n.key?0:a.length-1),e!==i&&(o=a[i])}u?b(o||m,!0):o&&(x=s,o.focus({preventScroll:p})),("Tab"!==n.key||o)&&n.preventDefault()}}},{signal:T}),L}var Lt,Tt,Ct,St,xt,Mt,It;const Dt=new IntersectionObserver(t=>{for(const e of t){const t=e.target;e.isIntersecting&&t instanceof Nt&&t.update()}}),Pt=new ResizeObserver(t=>{for(const e of t){const t=e.target;t instanceof Nt&&t.update()}});var Ot;!function(t){t[t.Item=0]="Item",t[t.Divider=1]="Divider"}(Ot||(Ot={}));let Nt=class ActionBarElement extends HTMLElement{constructor(){super(...arguments),Lt.add(this),Tt.set(this,null)}connectedCallback(){Pt.observe(this),Dt.observe(this),requestAnimationFrame(()=>{this.style.overflow="visible",this.update()})}disconnectedCallback(){Pt.unobserve(this),Dt.unobserve(this)}menuItemClick(t){const e=t.currentTarget,n=e?.getAttribute("data-for");n&&document.getElementById(n)?.click()}update(){const t=b(this,Lt,"a",Ct);if(!t)return;const e=t.getBoundingClientRect().top;let n=null;b(this,Lt,"m",It).call(this,(t,i,s)=>{const o=t.getBoundingClientRect().top;return s===Ot.Item&&(o>e?(b(this,Lt,"m",xt).call(this,i),this.moreMenu.hidden&&(this.moreMenu.hidden=!1),n===Ot.Divider&&b(this,Lt,"m",xt).call(this,i-1)):(b(this,Lt,"m",St).call(this,i),i===this.items.length-1&&(this.moreMenu.hidden=!0),n===Ot.Divider&&b(this,Lt,"m",St).call(this,i-1))),n=s,!0}),b(this,Tt,"f")&&b(this,Tt,"f").abort(),v(this,Tt,kt(this,{bindKeys:gt.ArrowHorizontal|gt.HomeAndEnd,focusOutBehavior:"wrap",focusableElementFilter:t=>{const e=this.items.indexOf(t.parentElement),n=e>-1&&"visible"===this.items[e].style.visibility,i=t===this.moreMenu.invokerElement&&!this.moreMenu.hidden;return n||i}}),"f")}};Tt=new WeakMap,Lt=new WeakSet,Ct=function(){let t=null;return b(this,Lt,"m",It).call(this,(e,n,i)=>i!==Ot.Item||(t=e,!1)),t},St=function(t){const e=this.items[t],n=b(this,Lt,"a",Mt)[t];e&&n&&(e.style.setProperty("visibility","visible"),n.hidden=!0)},xt=function(t){const e=this.items[t],n=b(this,Lt,"a",Mt)[t];e&&n&&(e.style.setProperty("visibility","hidden"),n.hidden=!1)},Mt=function(){return this.moreMenu.querySelectorAll('[role="menu"] > li')},It=function(t){for(let e=0;e<this.items.length;e++){const n=this.items[e],i=n.classList.contains("ActionBar-divider")?Ot.Divider:Ot.Item;if(!t(n,e,i))break}},g([K],Nt.prototype,"items",void 0),g([U],Nt.prototype,"itemContainer",void 0),g([U],Nt.prototype,"moreMenu",void 0),Nt=g([j],Nt),window.ActionBarElement=Nt;class DetailsMenuElement extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const t=this.parentElement;if(!t)return;const e=t.querySelector("summary");e&&(e.setAttribute("aria-haspopup","menu"),e.hasAttribute("role")||e.setAttribute("role","button"));const n=[Vt(t,"compositionstart",t=>_t(this,t)),Vt(t,"compositionend",t=>_t(this,t)),Vt(t,"click",e=>Ut(t,e)),Vt(t,"change",e=>Ut(t,e)),Vt(t,"keydown",e=>function(t,e,n){if(!(n instanceof KeyboardEvent))return;if(t.querySelector("details[open]"))return;const i=Ht.get(e);if(!i||i.isComposing)return;const s=n.target instanceof Element&&"SUMMARY"===n.target.tagName;switch(n.key){case"Escape":t.hasAttribute("open")&&(zt(t),n.preventDefault(),n.stopPropagation());break;case"ArrowDown":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Bt(t,!0);e&&e.focus(),n.preventDefault()}break;case"ArrowUp":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Bt(t,!1);e&&e.focus(),n.preventDefault()}break;case"n":if($t&&n.ctrlKey){const e=Bt(t,!0);e&&e.focus(),n.preventDefault()}break;case"p":if($t&&n.ctrlKey){const e=Bt(t,!1);e&&e.focus(),n.preventDefault()}break;case" ":case"Enter":{const e=document.activeElement;e instanceof HTMLElement&&jt(e)&&e.closest("details")===t&&(n.preventDefault(),n.stopPropagation(),e.click())}}}(t,this,e)),Vt(t,"toggle",()=>qt(t,this),{once:!0}),Vt(t,"toggle",()=>function(t){if(!t.hasAttribute("open"))return;for(const e of document.querySelectorAll("details[open] > details-menu")){const n=e.closest("details");n&&n!==t&&!n.contains(t)&&n.removeAttribute("open")}}(t)),this.preload?Vt(t,"mouseover",()=>qt(t,this),{once:!0}):Ft,...Rt(t)];Ht.set(this,{subscriptions:n,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=Ht.get(this);if(t){Ht.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const Ht=new WeakMap,Ft={unsubscribe(){}};function Vt(t,e,n,i=!1){return t.addEventListener(e,n,i),{unsubscribe:()=>{t.removeEventListener(e,n,i)}}}function qt(t,e){const n=e.getAttribute("src");if(!n)return;const i=Ht.get(e);if(!i)return;if(i.loaded)return;i.loaded=!0;const s=e.querySelector("include-fragment");s&&!s.hasAttribute("src")&&(s.addEventListener("loadend",()=>Wt(t)),s.setAttribute("src",n))}function Rt(t){let e=!1;return[Vt(t,"mousedown",()=>e=!0),Vt(t,"keydown",()=>e=!1),Vt(t,"toggle",()=>{t.hasAttribute("open")&&(Wt(t)||e||function(t){const e=document.activeElement;if(e&&jt(e)&&t.contains(e))return;const n=Bt(t,!0);n&&n.focus()}(t))})]}function Wt(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function Bt(t,e){const n=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),i=document.activeElement,s=i instanceof HTMLElement?n.indexOf(i):-1,o=e?n[s+1]:n[s-1],r=e?n[0]:n[n.length-1];return o||r}const $t=navigator.userAgent.match(/Macintosh/);function Ut(t,e){const n=e.target;if(n instanceof Element&&n.closest("details")===t)if("click"===e.type){const e=n.closest('[role="menuitem"], [role="menuitemradio"]');if(!e)return;const i=e.querySelector("input");if("LABEL"===e.tagName&&n===i)return;"LABEL"===e.tagName&&i&&!i.checked||Kt(e,t)}else if("change"===e.type){const e=n.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&Kt(e,t)}}function Kt(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;const n=t.closest("details-menu");if(!n)return;n.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))&&(!function(t,e){const n=e.querySelector("[data-menu-button]");if(!n)return;const i=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-text")?t:t.querySelector("[data-menu-button-text]");return e?e.getAttribute("data-menu-button-text")||e.textContent:null}(t);if(i)n.textContent=i;else{const e=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);e&&(n.innerHTML=e)}}(t,e),function(t,e){for(const n of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const e=n.querySelector('input[type="radio"], input[type="checkbox"]');let i=(n===t).toString();e instanceof HTMLInputElement&&(i=e.indeterminate?"mixed":e.checked.toString()),n.setAttribute("aria-checked",i)}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&zt(e),n.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function jt(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function zt(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function _t(t,e){const n=Ht.get(t);n&&(n.isComposing="compositionstart"===e.type)}var Yt,Zt;window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const Gt=(()=>{const t=new Set;let e=null,n=null;function i(){for(const e of t)e.update()}return s=>{window.addEventListener("resize",i),window.addEventListener("scroll",i),e||(e=new IntersectionObserver(e=>{for(const n of e){const e=n.target;n.isIntersecting?(e.update(),t.add(e)):t.delete(e)}})),n||(n=new ResizeObserver(()=>{for(const e of t)e.update()})),n.observe(s.ownerDocument.documentElement),e.observe(s)}})();class AnchoredPositionElement extends HTMLElement{constructor(){super(...arguments),Yt.set(this,null),Zt.set(this,void 0)}get align(){const t=this.getAttribute("align");return"center"===t||"end"===t?t:"start"}set align(t){this.setAttribute("align",`${t}`)}get side(){const t=this.getAttribute("side");return"inside-top"===t||"inside-bottom"===t||"inside-left"===t||"inside-right"===t||"inside-center"===t||"outside-top"===t||"outside-left"===t||"outside-right"===t?t:"outside-bottom"}set side(t){this.setAttribute("side",`${t}`)}get anchorOffset(){const t=this.getAttribute("anchor-offset");return"spacious"===t||"8"===t?8:4}set anchorOffset(t){this.setAttribute("anchor-offset",`${t}`)}get anchor(){return this.getAttribute("anchor")||""}set anchor(t){this.setAttribute("anchor",`${t}`)}get anchorElement(){if(b(this,Yt,"f"))return b(this,Yt,"f");const t=this.anchor;return t?this.ownerDocument.getElementById(t):null}set anchorElement(t){v(this,Yt,t,"f"),b(this,Yt,"f")||this.removeAttribute("anchor")}get alignmentOffset(){return Number(this.getAttribute("alignment-offset"))}set alignmentOffset(t){this.setAttribute("alignment-offset",`${t}`)}get allowOutOfBounds(){return this.hasAttribute("allow-out-of-bounds")}set allowOutOfBounds(t){this.toggleAttribute("allow-out-of-bounds",t)}connectedCallback(){this.update(),this.addEventListener("beforetoggle",()=>this.update()),Gt(this)}attributeChangedCallback(){this.update()}update(){this.isConnected&&(cancelAnimationFrame(b(this,Zt,"f")),v(this,Zt,requestAnimationFrame(()=>{const t=this.anchorElement;if(this.classList.toggle("not-anchored",!t),t){const{left:e,top:n}=X(this,t,this);this.style.top=`${n}px`,this.style.left=`${e}px`,this.style.bottom="auto",this.style.right="auto"}else this.style.top="0",this.style.left="0",this.style.bottom="0",this.style.right="0"}),"f"))}}var Xt,Jt,Qt;function te(t){const e=t.target,n=e?.closest("button");if(!n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled"))return;let i=n?.getAttribute("data-show-dialog-id");if(i){const e=document.getElementById(i);if(e instanceof HTMLDialogElement){e.showModal(),t.preventDefault();let i=n,s=!1;for(;i;)i=i.parentElement?.closest("[popover]:not(:popover-open)"),i&&"auto"===i.popover&&(i.classList.add("dialog-inside-popover-fix"),i.popover="manual",i.showPopover(),s=!0);s&&(e.addEventListener("close",t=>t.stopImmediatePropagation(),{once:!0}),e.close(),e.showModal(),e.addEventListener("close",()=>{for(const t of e.ownerDocument.querySelectorAll(".dialog-inside-popover-fix"))t.contains(e)&&(t.classList.remove("dialog-inside-popover-fix"),t.popover="auto",t.showPopover())},{once:!0}))}}if(i=n.getAttribute("data-close-dialog-id")||n.getAttribute("data-submit-dialog-id"),i){const t=document.getElementById(i);t instanceof HTMLDialogElement&&t.open&&t.close()}}Yt=new WeakMap,Zt=new WeakMap,AnchoredPositionElement.observedAttributes=["align","side","anchor","alignment-offset","allow-out-of-bounds"],customElements.get("anchored-position")||(window.AnchoredPositionElement=AnchoredPositionElement,customElements.define("anchored-position",AnchoredPositionElement));class DialogHelperElement extends HTMLElement{constructor(){super(...arguments),Xt.add(this),Jt.set(this,null)}get dialog(){return this.querySelector("dialog")}connectedCallback(){const{signal:t}=v(this,Jt,new AbortController,"f");document.addEventListener("click",te,!0),document.addEventListener("click",this,{signal:t}),this.ownerDocument.body.style.setProperty("--dialog-scrollgutter",window.innerWidth-this.ownerDocument.body.clientWidth+"px"),new MutationObserver(t=>{for(const e of t)e.target===this.dialog&&b(this,Xt,"m",Qt).call(this)}).observe(this,{subtree:!0,attributeFilter:["open"]}),b(this,Xt,"m",Qt).call(this)}disconnectedCallback(){b(this,Jt,"f")?.abort()}handleEvent(t){const e=t.target,n=this.dialog;if(e!==n||!n?.open)return;if(n.querySelector("form"))return;const i=n.getBoundingClientRect();i.top<=t.clientY&&t.clientY<=i.top+i.height&&i.left<=t.clientX&&t.clientX<=i.left+i.width||n.close()}}Jt=new WeakMap,Xt=new WeakSet,Qt=function(){this.dialog&&this.dialog.matches("[open]:not(:modal)")&&(this.dialog.addEventListener("close",t=>t.stopImmediatePropagation(),{once:!0}),this.dialog.close(),this.dialog.showModal())},window.customElements.get("dialog-helper")||(window.DialogHelperElement=DialogHelperElement,window.customElements.define("dialog-helper",DialogHelperElement));var ee=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...i}={}){super(t,i),this.oldState=String(e||""),this.newState=String(n||"")}},ne=new WeakMap;function ie(t,e,n){ne.set(t,setTimeout(()=>{ne.has(t)&&t.dispatchEvent(new ee("toggle",{cancelable:!1,oldState:e,newState:n}))},0))}var se=globalThis.ShadowRoot||function(){},oe=globalThis.HTMLDialogElement||function(){},re=new WeakMap,ae=new WeakMap,le=new WeakMap;function ce(t){return le.get(t)||"hidden"}var de=new WeakMap;function he(t,e){return("auto"===t.popover||"manual"===t.popover)&&(!!t.isConnected&&((!e||"showing"===ce(t))&&(!(!e&&"hidden"!==ce(t))&&(!(t instanceof oe&&t.hasAttribute("open"))&&document.fullscreenElement!==t))))}function ue(t){return t?Array.from(ae.get(t.ownerDocument)||[]).indexOf(t)+1:0}function fe(t){const e=ge(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||pe(t))instanceof se&&(t=t.host),t instanceof Document)return}}(t);return ue(e)>ue(n)?e:n}function me(t){const e=ae.get(t);for(const t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function pe(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?pe(t.parentNode):t}function ge(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===le.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||pe(t))instanceof se&&(t=t.host),t instanceof Document)return}}function be(t){return!(t.hidden||t instanceof se)&&((!(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)||!t.disabled)&&(!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(!(t instanceof HTMLAnchorElement&&""===t.href)&&("number"==typeof t.tabIndex&&-1!==t.tabIndex))))}function ve(t){(function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let n=e.querySelector("[autofocus]");if(n)return n;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(n=e.querySelector("[autofocus]"),n)return n}}}const i=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let s=i.currentNode;for(;s;){if(be(s))return s;s=i.nextNode()}})(t)?.focus()}var we=new WeakMap;function ye(t){if(!he(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new ee("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!he(t,!1))return;let n=!1;if("auto"===t.popover){const n=t.getAttribute("popover");if(ke(function(t){const e=new Map;let n=0;for(const i of ae.get(t.ownerDocument)||[])e.set(i,n),n+=1;e.set(t,n),n+=1;let i=null;return function(t){const n=ge(t);if(null===n)return null;const s=e.get(n);(null===i||e.get(i)<s)&&(i=n)}(t.parentElement||pe(t)),i}(t)||e,!1,!0),n!==t.getAttribute("popover")||!he(t,!1))return}me(e)||(n=!0),we.delete(t);const i=e.activeElement;t.classList.add(":popover-open"),le.set(t,"showing"),re.has(e)||re.set(e,new Set),re.get(e).add(t),ve(t),"auto"===t.popover&&(ae.has(e)||ae.set(e,new Set),ae.get(e).add(t),Se(de.get(t),!0)),n&&i&&"auto"===t.popover&&we.set(t,i),ie(t,"closed","open")}function Ee(t,e=!1,n=!1){if(!he(t,!0))return;const i=t.ownerDocument;if("auto"===t.popover&&(ke(t,e,n),!he(t,!0)))return;if(Se(de.get(t),!1),de.delete(t),n&&(t.dispatchEvent(new ee("beforetoggle",{oldState:"open",newState:"closed"})),!he(t,!0)))return;re.get(i)?.delete(t),ae.get(i)?.delete(t),t.classList.remove(":popover-open"),le.set(t,"hidden"),n&&ie(t,"open","closed");const s=we.get(t);s&&(we.delete(t),e&&s.focus())}function Ae(t,e=!1,n=!1){let i=me(t);for(;i;)Ee(i,e,n),i=me(t)}function ke(t,e,n){const i=t.ownerDocument||t;if(t instanceof Document)return Ae(i,e,n);let s=null,o=!1;for(const e of ae.get(i)||[])if(e===t)o=!0;else if(o){s=e;break}if(!o)return Ae(i,e,n);for(;s&&"showing"===ce(s)&&ae.get(i)?.size;)Ee(s,e,n)}var Le=new WeakMap;function Te(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!me(n))return;const i=fe(e);if(i&&"pointerdown"===t.type)Le.set(n,i);else if("pointerup"===t.type){const t=Le.get(n)===i;Le.delete(n),t&&ke(i||n,!1,!0)}}var Ce=new WeakMap;function Se(t,e=!1){if(!t)return;Ce.has(t)||Ce.set(t,t.getAttribute("aria-expanded"));const n=t.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)t.setAttribute("aria-expanded",String(e));else{const e=Ce.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var xe=globalThis.ShadowRoot||function(){};function Me(t,e,n){const i=t[e];Object.defineProperty(t,e,{value(t){return i.call(this,n(t))}})}var Ie=/(^|[^\\]):popover-open\b/g;function De(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}var Pe,Oe,Ne,He,Fe=null;function Ve(t){const e=De();if(null===Fe)try{(Fe=new CSSStyleSheet).replaceSync(e)}catch{Fe=!1}if(!1===Fe){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[Fe,...t.adoptedStyleSheets]}"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(Ie,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||ee,Me(Document.prototype,"querySelector",t),Me(Document.prototype,"querySelectorAll",t),Me(Element.prototype,"querySelector",t),Me(Element.prototype,"querySelectorAll",t),Me(Element.prototype,"matches",t),Me(Element.prototype,"closest",t),Me(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){ye(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Ee(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){"showing"===le.get(this)&&void 0===t||!1===t?Ee(this,!0,!0):void 0!==t&&!0!==t||ye(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const n=e.call(this,t);return Ve(n),n}}});const n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=n.call(this);return t.shadowRoot&&Ve(t.shadowRoot),t}}});const i=new WeakMap;function s(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),i.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),i.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=i.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return i.delete(this),null;const e=pe(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof xe)&&n&&e.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}s(HTMLButtonElement),s(HTMLInputElement);const o=t=>{const e=t.composedPath(),n=e[0];if(!(n instanceof Element)||n?.shadowRoot)return;const i=pe(n);if(!(i instanceof xe||i instanceof Document))return;const s=e.find(t=>t.matches?.("[popovertargetaction],[popovertarget]"));return s?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const n=ce(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?Ee(e,!0,!0):he(e,!1)&&(de.set(e,t),ye(e)))}(s),void t.preventDefault()):void 0},r=t=>{const e=t.key,n=t.target;t.defaultPrevented||!n||"Escape"!==e&&"Esc"!==e||ke(n.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",o),t.addEventListener("keydown",r),t.addEventListener("pointerdown",Te),t.addEventListener("pointerup",Te)})(document),Ve(document)}();const qe=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]'].map(t=>`:not([hidden]) > ${t}`).join(", "),Re=t=>t.textContent?.trim()[0].toLowerCase(),We=/^\S$/;class FocusGroupElement extends HTMLElement{constructor(){super(...arguments),Pe.add(this),Oe.set(this,null),Ne.set(this,null)}get nowrap(){return this.hasAttribute("nowrap")}set nowrap(t){this.toggleAttribute("nowrap",t)}get direction(){return"horizontal"===this.getAttribute("direction")?"horizontal":"vertical"}set direction(t){this.setAttribute("direction",`${t}`)}get retain(){return this.hasAttribute("retain")}set retain(t){this.toggleAttribute("retain",t)}get mnemonics(){return this.hasAttribute("mnemonics")}connectedCallback(){v(this,Ne,new AbortController,"f");const{signal:t}=b(this,Ne,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusin",this,{signal:t})}disconnectedCallback(){b(this,Ne,"f")?.abort()}handleEvent(t){const{direction:e,nowrap:n}=this;if("focusin"===t.type){if(this.retain&&t.target instanceof Element&&t.target.matches(qe)){b(this,Oe,"f")?.abort();const{signal:e}=v(this,Oe,new AbortController,"f");for(const n of b(this,Pe,"a",He)){n.setAttribute("tabindex",n===t.target?"0":"-1");const i=t.target.closest("[popover]");n===t.target&&"auto"===i?.popover&&i.closest("focus-group")===this&&i.addEventListener("toggle",t=>{if(t.target instanceof Element&&"closed"===t.newState&&(b(this,Oe,"f")?.abort(),n.setAttribute("tabindex","-1"),i.id)){const t=this.querySelector(`[popovertarget="${i.id}"]`);t?t.setAttribute("tabindex","0"):b(this,Pe,"a",He)[0]?.setAttribute("tabindex","0")}},{signal:e})}}}else if(t instanceof KeyboardEvent){const i=Array.from(b(this,Pe,"a",He));let s=i.indexOf(t.target);const o=t.key;if("Up"===o||"ArrowUp"===o)"vertical"!==e&&"both"!==e||(s-=s<0?0:1,t.preventDefault());else if("Down"===o||"ArrowDown"===o)"vertical"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Left"===t.key||"ArrowLeft"===t.key)"horizontal"!==e&&"both"!==e||(s-=1,t.preventDefault());else if("Right"===t.key||"ArrowRight"===t.key)"horizontal"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Home"===t.key||"PageUp"===t.key)s=0,t.preventDefault();else if("End"===t.key||"PageDown"===t.key)s=i.length-1,t.preventDefault();else{if(!this.mnemonics||!We.test(o))return;{const e=o.toLowerCase(),r=s>0&&Re(t.target)===e?s:0;s=i.findIndex((t,n)=>n>r&&Re(t)===e),s<0&&!n&&(s=i.findIndex(t=>Re(t)===e))}}n&&s<0&&(s=0),!n&&s>=i.length&&(s=0);const r=i.at(Math.min(s,i.length-1));{let e=r;do{e=e.closest("[popover]:not(:popover-open)"),"auto"!==e?.popover||["ArrowRight","ArrowLeft"].includes(t.key)||e.showPopover(),e=e?.parentElement||null}while(e)}r?.focus()}}}Oe=new WeakMap,Ne=new WeakMap,Pe=new WeakSet,He=function(){return this.querySelectorAll(qe)},customElements.get("focus-group")||(window.FocusGroupElement=FocusGroupElement,customElements.define("focus-group",FocusGroupElement));let Be=class ScrollableRegionElement extends HTMLElement{constructor(){super(...arguments),this.hasOverflow=!1,this.labelledBy=""}connectedCallback(){this.style.overflow="auto",this.observer=new ResizeObserver(t=>{for(const e of t)this.hasOverflow=e.target.scrollHeight>e.target.clientHeight||e.target.scrollWidth>e.target.clientWidth}),this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}attributeChangedCallback(t){"data-has-overflow"===t&&(this.hasOverflow?(this.setAttribute("aria-labelledby",this.labelledBy),this.setAttribute("role","region"),this.setAttribute("tabindex","0")):(this.removeAttribute("aria-labelledby"),this.removeAttribute("role"),this.removeAttribute("tabindex")))}};g([I],Be.prototype,"hasOverflow",void 0),g([I],Be.prototype,"labelledBy",void 0),Be=g([j],Be),window.ScrollableRegionElement=Be;const $e=(t,e,n)=>{if(e())n();else{const i=new MutationObserver(()=>{e()&&(n(),i.disconnect())});i.observe(t,{childList:!0,subtree:!0})}};var Ue,Ke,je,ze;function _e(t){document.activeElement!==t&&t?.focus()}const Ye=[];function Ze(t){const e=t.target,n=e?.closest("button");if(!n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled"))return;let i=n?.getAttribute("data-show-dialog-id");if(i){t.stopPropagation();const e=document.getElementById(i);if(e instanceof ModalDialogElement)return e.openButton=n,e.show(),void t.preventDefault()}if(Ye.length&&(i=n.getAttribute("data-close-dialog-id")||n.getAttribute("data-submit-dialog-id"),i)){const t=document.getElementById(i);if(t instanceof ModalDialogElement){const e=Ye.findIndex(t=>t.id===i);Ye.splice(e,1),t.close(n.hasAttribute("data-submit-dialog-id"))}}}function Ge(t){!(t instanceof KeyboardEvent&&"keydown"===t.type&&"Enter"===t.key)||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey||Ze(t)}function Xe(t){const e=t.target;if(e?.closest("button"))return;const n=Ye[Ye.length-1];if(!n)return;!e.closest(`#${n.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",t=>{t.target===e&&(Ye.pop(),n.close())},{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),Ue.add(this),Ke.set(this,new AbortController)}get open(){return this.hasAttribute("open")}set open(t){if(t){if(this.open)return;this.setAttribute("open",""),this.setAttribute("aria-disabled","false"),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden",b(this,Ue,"a",je)?.classList.remove("Overlay--hidden"),b(this,Ke,"f").signal.aborted&&v(this,Ke,new AbortController,"f"),ut(this,this.querySelector("[autofocus]"),b(this,Ke,"f").signal),Ye.push(this)}else{if(!this.open)return;this.removeAttribute("open"),this.setAttribute("aria-disabled","true"),b(this,Ue,"a",je)?.classList.add("Overlay--hidden"),document.body.style.paddingRight="0",document.body.style.overflow="initial",b(this,Ke,"f").abort();const t=this.openButton?.closest("details")||this.openButton?.closest("action-menu");_e(t?it(t):this.openButton),this.openButton=null}}get showButtons(){return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("click",Ze),document.addEventListener("keydown",Ge),document.addEventListener("mousedown",Xe),this.addEventListener("keydown",t=>b(this,Ue,"m",ze).call(this,t))}show(){this.open=!0}close(t=!1){if(!1===this.open)return;const e=new Event(t?"close":"cancel");this.dispatchEvent(e),this.open=!1}}var Je,Qe,tn,en,nn,sn,on,rn;Ke=new WeakMap,Ue=new WeakSet,je=function(){return this.parentElement?.hasAttribute("data-modal-dialog-overlay")?this.parentElement:null},ze=function(t){if(t instanceof KeyboardEvent&&!t.isComposing&&this.open)switch(t.key){case"Escape":this.close(),t.preventDefault(),t.stopPropagation();break;case"Enter":t.target.getAttribute("data-close-dialog-id")===this.id&&t.stopPropagation();break}},window.customElements.get("modal-dialog")||(window.ModalDialogElement=ModalDialogElement,window.customElements.define("modal-dialog",ModalDialogElement));let an=class NavListElement extends HTMLElement{constructor(){super(...arguments),Je.add(this),Qe.set(this,void 0)}connectedCallback(){this.topLevelList&&v(this,Qe,new _(this.topLevelList),"f")}disconnectedCallback(){this.topLevelList&&b(this,Qe,"f").unobserve(this.topLevelList)}selectItemById(t){if(!t)return!1;const e=b(this,Je,"m",tn).call(this,t);return!!e&&(b(this,Je,"m",sn).call(this,e),!0)}selectItemByHref(t){if(!t)return!1;const e=b(this,Je,"m",en).call(this,t);return!!e&&(b(this,Je,"m",sn).call(this,e),!0)}selectItemByCurrentLocation(){const t=b(this,Je,"m",nn).call(this);return!!t&&(b(this,Je,"m",sn).call(this,t),!0)}expandItem(t){t.nextElementSibling?.removeAttribute("data-hidden"),t.setAttribute("aria-expanded","true")}collapseItem(t){t.nextElementSibling?.setAttribute("data-hidden",""),t.setAttribute("aria-expanded","false"),t.focus()}itemIsExpanded(t){return"A"===t?.tagName||"true"===t?.getAttribute("aria-expanded")}handleItemWithSubItemClick(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=e.closest("button");n&&(this.itemIsExpanded(n)?this.collapseItem(n):this.expandItem(n),t.stopPropagation())}handleItemWithSubItemKeydown(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;let n=e.closest("button");if(!n){const t=e.getAttribute("aria-labelledby");if(!t)return;n=document.getElementById(t)}this.itemIsExpanded(n)&&"Escape"===t.key&&this.collapseItem(n),t.stopPropagation()}};var ln,cn,dn;Qe=new WeakMap,Je=new WeakSet,tn=function(t){for(const e of this.items){if(e.classList.contains("ActionListItem--hasSubItem"))continue;if((e.getAttribute("data-item-id")?.split(" ")||[]).includes(t))return e}return null},en=function(t){const e=this.querySelector(`.ActionListContent[href="${t}"]`);return e?e.closest(".ActionListItem"):null},nn=function(){return b(this,Je,"m",en).call(this,window.location.pathname)},sn=function(t){const e=this.querySelector(".ActionListItem--navActive");e&&b(this,Je,"m",on).call(this,e),t.classList.add("ActionListItem--navActive"),t.children.length>0&&t.children[0].setAttribute("aria-current","page");const n=b(this,Je,"m",rn).call(this,t);n&&(this.expandItem(n),n.classList.add("ActionListContent--hasActiveSubItem"))},on=function(t){t.classList.remove("ActionListItem--navActive"),t.children.length>0&&t.children[0].removeAttribute("aria-current");const e=b(this,Je,"m",rn).call(this,t);e&&(this.collapseItem(e),e.classList.remove("ActionListContent--hasActiveSubItem"))},rn=function(t){if(!t.classList.contains("ActionListItem--subItem"))return null;const e=t.closest("li.ActionListItem--hasSubItem")?.querySelector("button.ActionListContent");return e||null},g([K],an.prototype,"items",void 0),g([U],an.prototype,"topLevelList",void 0),an=g([j],an);let hn=class NavListGroupElement extends HTMLElement{constructor(){super(...arguments),ln.add(this),dn.set(this,new _(this))}connectedCallback(){this.setShowMoreItemState()}get showMoreDisabled(){return this.showMoreItem.hasAttribute("aria-disabled")}set showMoreDisabled(t){t?this.showMoreItem.setAttribute("aria-disabled","true"):this.showMoreItem.removeAttribute("aria-disabled"),this.showMoreItem.classList.toggle("disabled",t)}set currentPage(t){this.showMoreItem.setAttribute("data-current-page",t.toString())}get currentPage(){return parseInt(this.showMoreItem.getAttribute("data-current-page"))||1}get totalPages(){return parseInt(this.showMoreItem.getAttribute("data-total-pages"))||1}get paginationSrc(){return this.showMoreItem.getAttribute("src")||""}async showMore(t){if(t.preventDefault(),this.showMoreDisabled)return;let e;this.showMoreDisabled=!0;try{const t=new URL(this.paginationSrc,window.location.origin);this.currentPage++,t.searchParams.append("page",this.currentPage.toString());const n=await fetch(t);if(!n.ok)return;e=await n.text(),this.currentPage===this.totalPages&&(this.showMoreItem.hidden=!0)}catch(t){return this.showMoreDisabled=!1,void this.currentPage--}const n=b(this,ln,"m",cn).call(this,document,e);n?.querySelector("li > a")?.setAttribute("data-targets","nav-list-group.focusMarkers");const i=t.target.closest("button").getAttribute("data-list-id");document.getElementById(i).append(n),this.focusMarkers.pop()?.focus(),this.showMoreDisabled=!1}setShowMoreItemState(){this.showMoreItem&&(this.currentPage<this.totalPages?this.showMoreItem.hidden=!1:this.showMoreItem.hidden=!0)}};var un,fn;dn=new WeakMap,ln=new WeakSet,cn=function(t,e){const n=t.createElement("template");return n.innerHTML=e,t.importNode(n.content,!0)},g([U],hn.prototype,"showMoreItem",void 0),g([K],hn.prototype,"focusMarkers",void 0),hn=g([j],hn),window.NavListGroupElement=hn;let mn=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),un.add(this)}connectedCallback(){b(this,un,"m",fn).call(this)}select(t){const e=t.currentTarget;for(const t of this.items)t.classList.remove("SegmentedControl-item--selected"),t.querySelector("[aria-current]")?.setAttribute("aria-current","false");e.closest("li.SegmentedControl-item")?.classList.add("SegmentedControl-item--selected"),e.setAttribute("aria-current","true"),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:e,checked:!1,value:e.querySelector(".Button-label")?.textContent}}))}get current(){return this.querySelector("[aria-current=true]")}};un=new WeakSet,fn=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},g([K],mn.prototype,"items",void 0),mn=g([j],mn),window.customElements.get("segmented-control")||(window.SegmentedControlElement=mn,window.customElements.define("segmented-control",mn));let pn=class ToggleSwitchElement extends HTMLElement{constructor(){super(...arguments),this.turbo=!1,this.toggling=!1}get src(){const t=this.getAttribute("src");if(!t)return null;const e=this.ownerDocument.createElement("a");return e.href=t,e.href}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("data-csrf")||t instanceof HTMLInputElement&&t.value||null}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}isRemote(){return null!=this.src}async toggle(){if(!this.toggling&&(this.toggling=!0,!this.isDisabled())){if(!this.isRemote())return this.performToggle(),void(this.toggling=!1);this.performToggle(),this.setLoadingState();try{await this.submitForm()}catch(t){return void(t instanceof Error&&(this.setErrorState(t.message||"An error occurred, please try again."),this.performToggle()))}finally{this.toggling=!1}this.setSuccessState()}}turnOn(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","true"),this.classList.add("ToggleSwitch--checked"))}turnOff(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","false"),this.classList.remove("ToggleSwitch--checked"))}isOn(){return"true"===this.switch.getAttribute("aria-pressed")}isOff(){return!this.isOn()}isDisabled(){return null!=this.switch.getAttribute("disabled")}disable(){this.switch.setAttribute("disabled","disabled")}enable(){this.switch.removeAttribute("disabled")}performToggle(){this.isOn()?this.turnOff():this.turnOn()}setLoadingState(){this.errorIcon.setAttribute("hidden","hidden"),this.loadingSpinner.removeAttribute("hidden");const t=new CustomEvent("toggleSwitchLoading",{bubbles:!0});this.dispatchEvent(t)}setSuccessState(){const t=new CustomEvent("toggleSwitchSuccess",{bubbles:!0});this.dispatchEvent(t),this.setFinishedState(!1)}setErrorState(t){const e=new CustomEvent("toggleSwitchError",{bubbles:!0,detail:t});this.dispatchEvent(e),this.setFinishedState(!0)}setFinishedState(t){t&&this.errorIcon.removeAttribute("hidden"),this.loadingSpinner.setAttribute("hidden","hidden")}async submitForm(){const t=new FormData;if(this.csrf&&t.append(this.csrfField,this.csrf),t.append("value",this.isOn()?"1":"0"),!this.src)throw new Error("invalid src");let e;const n={"Requested-With":"XMLHttpRequest","X-Requested-With":"XMLHttpRequest"};this.turbo&&(n.Accept="text/vnd.turbo-stream.html");try{e=await fetch(this.src,{credentials:"same-origin",method:"POST",headers:n,body:t})}catch(t){throw new Error("A network error occurred, please try again.")}if(!e.ok)throw new Error(await e.text());const i=e.headers.get("Content-Type");window.Turbo&&this.turbo&&i?.startsWith("text/vnd.turbo-stream.html")&&window.Turbo.renderStreamMessage(await e.text())}};var gn,bn,vn,wn,yn,En,An,kn,Ln,Tn,Cn;g([U],pn.prototype,"switch",void 0),g([U],pn.prototype,"loadingSpinner",void 0),g([U],pn.prototype,"errorIcon",void 0),g([I],pn.prototype,"turbo",void 0),pn=g([j],pn),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=pn,window.customElements.define("toggle-switch",pn));const Sn=(()=>{let t;return e=>t?e.matches(t):function(e){try{return t=":popover-open",e.matches(t)}catch{try{return t=":open",e.matches(":open")}catch{return t=".\\:popover-open",e.matches(".\\:popover-open")}}}(e)})(),xn="sr-only",Mn=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];function In(t){for(const e of Nn)e!==t&&(Sn(e)?e.hidePopover():Nn.delete(e))}function Dn(){In()}function Pn(t){setTimeout(()=>{for(const e of Nn)Sn(e)&&"focus"===e.showReason&&e.control!==t.target&&e.hidePopover()},0)}const On=new Set,Nn=new Set;class ToolTipElement extends HTMLElement{constructor(){super(...arguments),gn.add(this),bn.set(this,void 0),vn.set(this,"center"),wn.set(this,"outside-bottom"),yn.set(this,!1),En.set(this,"mouse")}styles(){return'\n :host {\n --tooltip-top: var(--tool-tip-position-top, 0);\n --tooltip-left: var(--tool-tip-position-left, 0);\n padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed) !important;\n font: var(--text-body-shorthand-small);\n color: var(--tooltip-fgColor, var(--fgColor-onEmphasis)) !important;\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--tooltip-bgColor, var(--bgColor-emphasis)) !important;\n border-radius: var(--borderRadius-medium);\n border: 0 !important;\n opacity: 0;\n max-width: var(--overlay-width-small);\n word-wrap: break-word;\n white-space: normal;\n width: max-content !important;\n inset: var(--tooltip-top) auto auto var(--tooltip-left) !important;\n overflow: visible !important;\n text-wrap: balance;\n }\n\n :host(:is(.tooltip-n, .tooltip-nw, .tooltip-ne)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) - var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(:is(.tooltip-s, .tooltip-sw, .tooltip-se)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) + var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(.tooltip-w) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) - var(--overlay-offset, 0.25rem));\n }\n\n :host(.tooltip-e) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) + var(--overlay-offset, 0.25rem));\n }\n\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: var(--overlay-offset, 0.25rem);\n content: "";\n }\n\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%;\n }\n\n @keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n :host(:popover-open),\n :host(:popover-open):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n :host(.\\:popover-open) {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: solid 1px transparent;\n }\n\n :host:before {\n display: none;\n }\n }\n '}get showReason(){return b(this,En,"f")}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return"label"===this.getAttribute("data-type")?"label":"description"}set type(t){this.setAttribute("data-type",t)}get direction(){return this.getAttribute("data-direction")||"s"}set direction(t){this.setAttribute("data-direction",t)}get control(){return this.ownerDocument.getElementById(this.htmlFor)}set hiddenFromView(t){t&&Sn(this)?this.hidePopover():t||Sn(this)||this.showPopover()}get hiddenFromView(){return!Sn(this)}connectedCallback(){if(On.add(this),b(this,gn,"m",Ln).call(this),b(this,gn,"m",Tn).call(this),!this.shadowRoot){const t=this.attachShadow({mode:"open"});t.appendChild(document.createElement("style")).textContent=this.styles(),t.appendChild(document.createElement("slot"))}b(this,gn,"m",An).call(this,!1),v(this,yn,!0,"f"),b(this,gn,"m",kn).call(this)}disconnectedCallback(){On.delete(this),Nn.delete(this),b(this,bn,"f")?.abort()}async handleEvent(t){if(!this.control)return;const e=Sn(this),n="mouseenter"===t.type||"focus"===t.type&&(navigator.webdriver||this.control.matches(":focus-visible")),i="mouseleave"===t.type&&t.relatedTarget!==this.control&&t.relatedTarget!==this,s="keydown"===t.type&&"Escape"===t.key,o="mousedown"===t.type&&t.currentTarget===this.control,r="beforetoggle"===t.type&&t.currentTarget!==this,a=i||s||o||r;e&&s&&(t.stopImmediatePropagation(),t.preventDefault()),await Promise.resolve(),e||!n||Sn(this)?e&&a&&Sn(this)&&this.hidePopover():(v(this,En,"mouseenter"===t.type?"mouse":"focus","f"),this.showPopover()),"toggle"===t.type&&b(this,gn,"m",An).call(this,"open"===t.newState)}attributeChangedCallback(t){this.isConnected&&("for"===t?b(this,gn,"m",kn).call(this):"id"===t||"data-type"===t?b(this,gn,"m",Ln).call(this):"data-direction"===t&&b(this,gn,"m",Tn).call(this))}}var Hn,Fn;bn=new WeakMap,vn=new WeakMap,wn=new WeakMap,yn=new WeakMap,En=new WeakMap,gn=new WeakSet,An=function(t){t?(Nn.add(this),this.classList.remove(xn),In(this),b(this,gn,"m",Cn).call(this)):(Nn.delete(this),this.classList.remove(...Mn),this.classList.add(xn))},kn=function(){if(!this.control)return;this.setAttribute("role","tooltip"),b(this,bn,"f")?.abort(),v(this,bn,new AbortController,"f");const{signal:t}=b(this,bn,"f");this.addEventListener("mouseleave",this,{signal:t}),this.addEventListener("toggle",this,{signal:t}),this.control.addEventListener("mouseenter",this,{signal:t}),this.control.addEventListener("mouseleave",this,{signal:t}),this.control.addEventListener("focus",this,{signal:t}),this.control.addEventListener("mousedown",this,{signal:t}),this.control.popoverTargetElement?.addEventListener("beforetoggle",this,{signal:t}),this.ownerDocument.addEventListener("focusout",Dn),this.ownerDocument.addEventListener("focusin",Pn),this.ownerDocument.addEventListener("keydown",this,{signal:t,capture:!0})},Ln=function(){if(this.id&&this.control)if("label"===this.type){let t=this.control.getAttribute("aria-labelledby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-labelledby",t),this.setAttribute("aria-hidden","true")}else{let t=this.control.getAttribute("aria-describedby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-describedby",t)}},Tn=function(){this.classList.remove(...Mn);const t=this.direction;"n"===t?(v(this,vn,"center","f"),v(this,wn,"outside-top","f")):"ne"===t?(v(this,vn,"end","f"),v(this,wn,"outside-top","f")):"e"===t?(v(this,vn,"center","f"),v(this,wn,"outside-right","f")):"se"===t?(v(this,vn,"end","f"),v(this,wn,"outside-bottom","f")):"s"===t?(v(this,vn,"center","f"),v(this,wn,"outside-bottom","f")):"sw"===t?(v(this,vn,"start","f"),v(this,wn,"outside-bottom","f")):"w"===t?(v(this,vn,"center","f"),v(this,wn,"outside-left","f")):"nw"===t&&(v(this,vn,"start","f"),v(this,wn,"outside-top","f"))},Cn=function(){if(!this.control)return;if(!b(this,yn,"f")||!Sn(this))return;const t=X(this,this.control,{side:b(this,wn,"f"),align:b(this,vn,"f"),anchorOffset:0}),e=t.anchorSide,n=t.anchorAlign;this.style.setProperty("--tool-tip-position-top",`${t.top}px`),this.style.setProperty("--tool-tip-position-left",`${t.left}px`);let i="s";i="outside-left"===e?"w":"outside-right"===e?"e":"outside-top"===e?"center"===n?"n":"start"===n?"ne":"nw":"center"===n?"s":"start"===n?"se":"sw",this.classList.add(`tooltip-${i}`)},ToolTipElement.observedAttributes=["data-type","data-direction","id","for"],window.customElements.get("tool-tip")||(window.ToolTipElement=ToolTipElement,window.customElements.define("tool-tip",ToolTipElement));let Vn=class XBannerElement extends HTMLElement{constructor(){super(...arguments),Hn.add(this)}dismiss(){if("remove"===b(this,Hn,"a",Fn)){const t=this.parentElement;if(!t)return;t.removeChild(this)}else this.hide();this.dispatchEvent(new CustomEvent("banner:dismiss"))}show(){this.style.setProperty("display","initial")}hide(){this.style.setProperty("display","none")}};Hn=new WeakSet,Fn=function(){return this.getAttribute("data-dismiss-scheme")},g([U],Vn.prototype,"titleText",void 0),Vn=g([j],Vn),window.customElements.get("x-banner")||(window.XBannerElement=Vn,window.customElements.define("x-banner",Vn));class qn{constructor(t,e,{tabInsertsSuggestions:n,defaultFirstOption:i,scrollIntoViewOptions:s}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==n||n,this.defaultFirstOption=null!=i&&i,this.scrollIntoViewOptions=null!=s?s:{block:"nearest",inline:"nearest"},this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=t=>function(t,e){if(t.shiftKey||t.metaKey||t.altKey)return;if(!e.ctrlBindings&&t.ctrlKey)return;if(e.isComposing)return;switch(t.key){case"Enter":Wn(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&Wn(e.input,e.list)&&t.preventDefault();break;case"Escape":e.clearSelection();break;case"ArrowDown":e.navigate(1),t.preventDefault();break;case"ArrowUp":e.navigate(-1),t.preventDefault();break;case"n":e.ctrlBindings&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case"p":e.ctrlBindings&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.clearSelection()}}(t,this),this.compositionEventHandler=t=>function(t,e){e.isComposing="compositionstart"===t.type;const n=document.getElementById(e.input.getAttribute("aria-controls")||"");if(!n)return;e.clearSelection()}(t,this),this.inputHandler=this.clearSelection.bind(this),t.setAttribute("role","combobox"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",Rn),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",Rn)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter($n)[0])||void 0===t||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter($n)[0],n=Array.from(this.list.querySelectorAll('[role="option"]')).filter($n),i=n.indexOf(e);if(i===n.length-1&&1===t||0===i&&-1===t)return this.clearSelection(),void this.input.focus();let s=1===t?0:n.length-1;if(e&&i>=0){const e=i+t;e>=0&&e<n.length&&(s=e)}const o=n[s];if(o)for(const t of n)t.removeAttribute("data-combobox-option-default"),o===t?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),Bn(o),o.scrollIntoView(this.scrollIntoViewOptions)):t.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function Rn(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');e&&"true"!==e.getAttribute("aria-disabled")&&function(t,e){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0,detail:e}))}(e,{event:t})}function Wn(t,e){const n=e.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return!!n&&("true"===n.getAttribute("aria-disabled")||n.click(),!0)}function Bn(t){t.dispatchEvent(new Event("combobox-select",{bubbles:!0}))}function $n(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}const Un=window.testScreenReaderDelay||100;class Kn{constructor(t,e,n,i=!1){var s;if(this.container=t,this.input=e,this.results=n,this.combobox=new qn(e,n,{defaultFirstOption:i}),this.feedback=t.getRootNode().getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=i,this.clearButton=t.getRootNode().getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=n.querySelectorAll("[role=option]"),this.feedback&&(this.feedback.setAttribute("aria-live","polite"),this.feedback.setAttribute("aria-atomic","true")),this.clearButton&&!this.clearButton.getAttribute("aria-label")){const t=document.querySelector(`label[for="${this.input.name}"]`);this.clearButton.setAttribute("aria-label","clear:"),this.clearButton.setAttribute("aria-labelledby",`${this.clearButton.id} ${(null==t?void 0:t.id)||""}`)}this.input.getAttribute("aria-expanded")||this.input.setAttribute("aria-expanded","false"),this.results.popover?this.results.matches(":popover-open")&&this.results.hidePopover():this.results.hidden=!0,this.results.getAttribute("aria-label")||this.results.setAttribute("aria-label","results"),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("spellcheck","false"),this.interactingWithList=!1,this.onInputChange=function(t,e=0){let n;return function(...i){clearTimeout(n),n=window.setTimeout(()=>{clearTimeout(n),t(...i)},e)}}(this.onInputChange.bind(this),300),this.onResultsMouseDown=this.onResultsMouseDown.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.onInputFocus=this.onInputFocus.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onCommit=this.onCommit.bind(this),this.handleClear=this.handleClear.bind(this),this.input.addEventListener("keydown",this.onKeydown),this.input.addEventListener("focus",this.onInputFocus),this.input.addEventListener("blur",this.onInputBlur),this.input.addEventListener("input",this.onInputChange),this.results.addEventListener("mousedown",this.onResultsMouseDown),this.results.addEventListener("combobox-commit",this.onCommit),null===(s=this.clearButton)||void 0===s||s.addEventListener("click",this.handleClear)}destroy(){this.input.removeEventListener("keydown",this.onKeydown),this.input.removeEventListener("focus",this.onInputFocus),this.input.removeEventListener("blur",this.onInputBlur),this.input.removeEventListener("input",this.onInputChange),this.results.removeEventListener("mousedown",this.onResultsMouseDown),this.results.removeEventListener("combobox-commit",this.onCommit)}handleClear(t){t.preventDefault(),"true"===this.input.getAttribute("aria-expanded")&&(this.input.setAttribute("aria-expanded","false"),this.updateFeedbackForScreenReaders("Results hidden.")),this.input.value="",this.container.value="",this.input.focus(),this.input.dispatchEvent(new Event("change")),this.close()}onKeydown(t){if("Escape"===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowUp"===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowDown"===t.key&&!this.container.open){if(!this.input.value.trim())return;this.open(),t.stopPropagation(),t.preventDefault()}}onInputFocus(){this.interactingWithList||this.fetchResults()}onInputBlur(){this.interactingWithList||this.close()}onCommit({target:t}){const e=t;if(!(e instanceof HTMLElement))return;if(this.close(),e instanceof HTMLAnchorElement)return;const n=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=n,n||this.updateFeedbackForScreenReaders("Results hidden.")}onResultsMouseDown(){this.interactingWithList=!0}onInputChange(){this.feedback&&this.feedback.textContent&&(this.feedback.textContent=""),this.container.removeAttribute("value"),this.fetchResults()}identifyOptions(){let t=0;for(const e of this.results.querySelectorAll('[role="option"]:not([id])'))e.id=`${this.results.id}-option-${t++}`}updateFeedbackForScreenReaders(t){setTimeout(()=>{this.feedback&&(this.feedback.textContent=t)},Un)}fetchResults(){const t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty)return void this.close();const e=this.container.src;if(!e)return;const n=new URL(e,window.location.href),i=new URLSearchParams(n.search.slice(1));i.append("q",t),n.search=i.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(n).then(t=>{this.results.innerHTML=t,this.identifyOptions(),this.combobox.indicateDefaultOption();const e=this.results.querySelectorAll('[role="option"]'),n=!!e.length||!!this.results.querySelectorAll('[data-no-result-found="true"]').length,i=e.length,[s]=e,o=null==s?void 0:s.textContent;this.autoselectEnabled&&o?this.updateFeedbackForScreenReaders(`${i} results. ${o} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${i||"No"} results.`),n?this.open():this.close(),this.container.dispatchEvent(new CustomEvent("load")),this.container.dispatchEvent(new CustomEvent("loadend"))}).catch(()=>{this.container.dispatchEvent(new CustomEvent("error")),this.container.dispatchEvent(new CustomEvent("loadend"))})}open(){(this.results.popover?!this.results.matches(":popover-open"):this.results.hidden)&&(this.combobox.start(),this.results.popover?this.results.showPopover():this.results.hidden=!1),this.container.open=!0,this.interactingWithList=!0}close(){(this.results.popover?this.results.matches(":popover-open"):!this.results.hidden)&&(this.combobox.stop(),this.results.popover?this.results.hidePopover():this.results.hidden=!0),this.container.open=!1,this.interactingWithList=!1}}var jn,zn,_n,Yn,Zn,Gn=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Xn=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n},Jn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};const Qn=globalThis.HTMLElement||null;class ti extends Event{constructor(t,e){var{relatedTarget:n}=e;super(t,Jn(e,["relatedTarget"])),this.relatedTarget=n}}const ei=new WeakMap;let ni=null;class AutoCompleteElement extends Qn{constructor(){super(...arguments),jn.add(this),zn.set(this,null),_n.set(this,null),Zn.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){ni=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null===(t=Gn(this,zn,"f"))||void 0===t?void 0:t.isConnected)return Gn(this,zn,"f");const e=this.getAttribute("for"),n=this.getRootNode();return e&&(n instanceof Document||n instanceof ShadowRoot)?n.getElementById(e):null}set forElement(t){Xn(this,zn,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return(null===(t=Gn(this,_n,"f"))||void 0===t?void 0:t.isConnected)?Gn(this,_n,"f"):this.querySelector("input")}set inputElement(t){Xn(this,_n,t,"f"),Gn(this,jn,"m",Yn).call(this)}connectedCallback(){this.isConnected&&(Gn(this,jn,"m",Yn).call(this),new MutationObserver(()=>{ei.get(this)||Gn(this,jn,"m",Yn).call(this)}).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){const t=ei.get(this);t&&(t.destroy(),ei.delete(this))}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.removeAttribute("open")}get fetchOnEmpty(){return this.hasAttribute("fetch-on-empty")}set fetchOnEmpty(t){this.toggleAttribute("fetch-on-empty",t)}async fetchResult(t){var e;null===(e=Gn(this,Zn,"f"))||void 0===e||e.abort();const{signal:n}=Xn(this,Zn,new AbortController,"f"),i=await fetch(t.toString(),{signal:n,headers:{Accept:"text/fragment+html"}});if(!i.ok)throw new Error(await i.text());if(ni){return(await ni).createHTML(await i.text(),i)}return await i.text()}static get observedAttributes(){return["open","value","for"]}attributeChangedCallback(t,e,n){var i,s;if(e===n)return;const o=ei.get(this);if(o)switch(this.forElement===(null===(i=ei.get(this))||void 0===i?void 0:i.results)&&this.inputElement===(null===(s=ei.get(this))||void 0===s?void 0:s.input)||Gn(this,jn,"m",Yn).call(this),t){case"open":null===n?o.close():o.open();break;case"value":null!==n&&(o.input.value=n),this.dispatchEvent(new ti("auto-complete-change",{bubbles:!0,relatedTarget:o.input}))}}}zn=new WeakMap,_n=new WeakMap,Zn=new WeakMap,jn=new WeakSet,Yn=function(){var t;null===(t=ei.get(this))||void 0===t||t.destroy();const{forElement:e,inputElement:n}=this;if(!e||!n)return;const i="true"===this.getAttribute("data-autoselect");ei.set(this,new Kn(this,n,e,i)),e.setAttribute("role","listbox")};const ii="undefined"!=typeof globalThis?globalThis:window;try{ii.AutocompleteElement=ii.AutoCompleteElement=AutoCompleteElement.define()}catch(t){if(!(ii.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function si(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t.textContent||"");const e=getSelection();if(null==e)return Promise.reject(new Error);e.removeAllRanges();const n=document.createRange();return n.selectNodeContents(t),e.addRange(n),document.execCommand("copy"),e.removeAllRanges(),Promise.resolve()}function oi(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t);const e=document.body;if(!e)return Promise.reject(new Error);const n=function(t){const e=document.createElement("pre");return e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="5px",e.textContent=t,e}(t);return e.appendChild(n),si(n),e.removeChild(n),Promise.resolve()}async function ri(t){const e=t.getAttribute("for"),n=t.getAttribute("value");function i(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}var s;if("true"!==t.getAttribute("aria-disabled"))if(n)await oi(n),i();else if(e){const n="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(n instanceof Document||"ShadowRoot"in window&&n instanceof ShadowRoot))return;const o=n.getElementById(e);o&&(await(s=o,s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement?oi(s.value):s instanceof HTMLAnchorElement&&s.hasAttribute("href")?oi(s.href):si(s)),i())}}function ai(t){const e=t.currentTarget;e instanceof HTMLElement&&ri(e)}function li(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),ri(e))}}function ci(t){t.currentTarget.addEventListener("keydown",li)}function di(t){t.currentTarget.removeEventListener("keydown",li)}class ClipboardCopyElement extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",ai),this.addEventListener("focus",ci),this.addEventListener("blur",di)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}}const hi="undefined"!=typeof globalThis?globalThis:window;try{hi.ClipboardCopyElement=ClipboardCopyElement.define()}catch(t){if(!(hi.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function ui(t){t.style.display="inline-block"}function fi(t){t.style.display="none"}const mi=new WeakMap;document.addEventListener("clipboard-copy",({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=mi.get(t),n=t.parentNode?.querySelector("[data-clipboard-copy-feedback]"),i="Copied!";e?(clearTimeout(e),mi.delete(t)):(!function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(fi(e),ui(n))}(t),n&&(n.textContent===i?n.textContent=`${i} `:n.textContent=i)),mi.set(t,setTimeout(()=>{!function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(ui(e),fi(n))}(t),mi.delete(t)},2e3))});var pi,gi=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n},bi=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};const vi="undefined"!=typeof Intl&&Intl.ListFormat||class{formatToParts(t){const e=[];for(const n of t)e.push({type:"element",value:n}),e.push({type:"literal",value:", "});return e.slice(0,-1)}},wi=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],yi={minimumIntegerDigits:2};class Ei{constructor(t,e={}){pi.set(this,void 0);let n=String(e.style||"short");"long"!==n&&"short"!==n&&"narrow"!==n&&"digital"!==n&&(n="short");let i="digital"===n?"numeric":n;const s=e.hours||i;i="2-digit"===s?"numeric":s;const o=e.minutes||i;i="2-digit"===o?"numeric":o;const r=e.seconds||i;i="2-digit"===r?"numeric":r;const a=e.milliseconds||i;gi(this,pi,{locale:t,style:n,years:e.years||"digital"===n?"short":n,yearsDisplay:"always"===e.yearsDisplay?"always":"auto",months:e.months||"digital"===n?"short":n,monthsDisplay:"always"===e.monthsDisplay?"always":"auto",weeks:e.weeks||"digital"===n?"short":n,weeksDisplay:"always"===e.weeksDisplay?"always":"auto",days:e.days||"digital"===n?"short":n,daysDisplay:"always"===e.daysDisplay?"always":"auto",hours:s,hoursDisplay:"always"===e.hoursDisplay||"digital"===n?"always":"auto",minutes:o,minutesDisplay:"always"===e.minutesDisplay||"digital"===n?"always":"auto",seconds:r,secondsDisplay:"always"===e.secondsDisplay||"digital"===n?"always":"auto",milliseconds:a,millisecondsDisplay:"always"===e.millisecondsDisplay?"always":"auto"},"f")}resolvedOptions(){return bi(this,pi,"f")}formatToParts(t){const e=[],n=bi(this,pi,"f"),i=n.style,s=n.locale;for(const[i,o]of wi){const r=t[i];if("auto"===n[`${i}Display`]&&!r)continue;const a=n[i],l="2-digit"===a?yi:"numeric"===a?{}:{style:"unit",unit:o,unitDisplay:a};e.push(new Intl.NumberFormat(s,l).format(r))}return new vi(s,{type:"unit",style:"digital"===i?"short":i}).formatToParts(e)}format(t){return this.formatToParts(t).map(t=>t.value).join("")}}pi=new WeakMap;const Ai=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,ki=["year","month","week","day","hour","minute","second","millisecond"];class Li{constructor(t=0,e=0,n=0,i=0,s=0,o=0,r=0,a=0){this.years=t,this.months=e,this.weeks=n,this.days=i,this.hours=s,this.minutes=o,this.seconds=r,this.milliseconds=a,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=0===this.sign}abs(){return new Li(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(t){var e;if("string"==typeof t){const n=String(t).trim(),i=n.startsWith("-")?-1:1,s=null===(e=n.match(Ai))||void 0===e?void 0:e.slice(1).map(t=>(Number(t)||0)*i);return s?new Li(...s):new Li}if("object"==typeof t){const{years:e,months:n,weeks:i,days:s,hours:o,minutes:r,seconds:a,milliseconds:l}=t;return new Li(e,n,i,s,o,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const n=Date.now(),i=Math.abs(Ti(n,Li.from(t)).getTime()-n),s=Math.abs(Ti(n,Li.from(e)).getTime()-n);return i>s?-1:i<s?1:0}toLocaleString(t,e){return new Ei(t,e).format(this)}}function Ti(t,e){const n=new Date(t);return e.sign<0?(n.setUTCSeconds(n.getUTCSeconds()+e.seconds),n.setUTCMinutes(n.getUTCMinutes()+e.minutes),n.setUTCHours(n.getUTCHours()+e.hours),n.setUTCDate(n.getUTCDate()+7*e.weeks+e.days),n.setUTCMonth(n.getUTCMonth()+e.months),n.setUTCFullYear(n.getUTCFullYear()+e.years)):(n.setUTCFullYear(n.getUTCFullYear()+e.years),n.setUTCMonth(n.getUTCMonth()+e.months),n.setUTCDate(n.getUTCDate()+7*e.weeks+e.days),n.setUTCHours(n.getUTCHours()+e.hours),n.setUTCMinutes(n.getUTCMinutes()+e.minutes),n.setUTCSeconds(n.getUTCSeconds()+e.seconds)),n}function Ci(t,{relativeTo:e=Date.now()}={}){if(e=new Date(e),t.blank)return t;const n=t.sign;let i=Math.abs(t.years),s=Math.abs(t.months),o=Math.abs(t.weeks),r=Math.abs(t.days),a=Math.abs(t.hours),l=Math.abs(t.minutes),c=Math.abs(t.seconds),d=Math.abs(t.milliseconds);d>=900&&(c+=Math.round(d/1e3)),(c||l||a||r||o||s||i)&&(d=0),c>=55&&(l+=Math.round(c/60)),(l||a||r||o||s||i)&&(c=0),l>=55&&(a+=Math.round(l/60)),(a||r||o||s||i)&&(l=0),r&&a>=12&&(r+=Math.round(a/24)),!r&&a>=21&&(r+=Math.round(a/24)),(r||o||s||i)&&(a=0);const h=e.getFullYear(),u=e.getMonth(),f=e.getDate();if(r>=27||i+s+r){const t=new Date(e);t.setDate(1),t.setMonth(u+s*n+1),t.setDate(0);const a=Math.max(0,f-t.getDate()),l=new Date(e);l.setFullYear(h+i*n),l.setDate(f-a),l.setMonth(u+s*n),l.setDate(f-a+r*n);const c=l.getFullYear()-e.getFullYear(),d=l.getMonth()-e.getMonth(),m=Math.abs(Math.round((Number(l)-Number(e))/864e5))+a,p=Math.abs(12*c+d);m<27?(r>=6?(o+=Math.round(r/7),r=0):r=m,s=i=0):p<=11?(s=p,i=0):(s=0,i=c*n),(s||i)&&(r=0)}return i&&(s=0),o>=4&&(s+=Math.round(o/4)),(s||i)&&(o=0),r&&o&&!s&&!i&&(o+=Math.round(r/7),r=0),new Li(i*n,s*n,o*n,r*n,a*n,l*n,c*n,d*n)}var Si,xi,Mi,Ii,Di,Pi,Oi,Ni,Hi,Fi,Vi,qi,Ri=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Wi=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};const Bi=globalThis.HTMLElement||null,$i=new Li,Ui=new Li(0,0,0,0,0,1);class Ki extends Event{constructor(t,e,n,i){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=n,this.newTitle=i}}function ji(t){if(!t.date)return 1/0;if("duration"===t.format||"elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const e=Math.abs(Date.now()-t.date.getTime());return e<6e4?1e3:e<36e5?6e4:36e5}const zi=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(t){if(this.elements.has(t))return;this.elements.add(t);const e=t.date;if(e&&e.getTime()){const e=ji(t),n=Date.now()+e;n<this.time&&(clearTimeout(this.timer),this.timer=setTimeout(()=>this.update(),e),this.time=n)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;for(const e of this.elements)t=Math.min(t,ji(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout(()=>this.update(),this.time),this.time+=Date.now()}};class RelativeTimeElement extends Bi{constructor(){super(...arguments),Si.add(this),xi.set(this,!1),Mi.set(this,!1),Di.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),qi.set(this,null)}static define(t="relative-time",e=customElements){return e.define(t,this),this}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","no-title","datetime","lang","title","aria-hidden"]}get onRelativeTimeUpdated(){return Ri(this,qi,"f")}set onRelativeTimeUpdated(t){Ri(this,qi,"f")&&this.removeEventListener("relative-time-updated",Ri(this,qi,"f")),Wi(this,qi,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("relative-time-updated",t)}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");return"long"===t||"short"===t||"narrow"===t?t:"datetime"===this.format&&""!==t?this.formatStyle:void 0}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(""!==e)return null!=e||(e="datetime"===t?this.formatStyle:"short"),"numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e?e:void 0}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("year",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"datetime"===this.format?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&(e=t,Ai.test(e))?t:"P30D";var e}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return ki.includes(t)?t:"micro"===this.format?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"datetime"===t?"datetime":"relative"===t?"relative":"duration"===t?"duration":"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if("long"===t)return"long";if("short"===t)return"short";if("narrow"===t)return"narrow";const e=this.format;return"elapsed"===e||"micro"===e?"narrow":"datetime"===e?"short":"long"}set formatStyle(t){this.setAttribute("format-style",t)}get noTitle(){return this.hasAttribute("no-title")}set noTitle(t){this.toggleAttribute("no-title",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){zi.unobserve(this)}attributeChangedCallback(t,e,n){e!==n&&("title"===t&&Wi(this,xi,null!==n&&(this.date&&Ri(this,Si,"m",Pi).call(this,this.date))!==n,"f"),Ri(this,Mi,"f")||"title"===t&&Ri(this,xi,"f")||Wi(this,Mi,(async()=>{await Promise.resolve(),this.update(),Wi(this,Mi,!1,"f")})(),"f"))}update(){const t=Ri(this,Di,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let n=e;const i=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!i)return void(Ri(this,Di,"f").textContent=t);const s=Date.now();Ri(this,xi,"f")||(n=Ri(this,Si,"m",Pi).call(this,i)||"",n&&!this.noTitle&&this.setAttribute("title",n));const o=function(t,e="second",n=Date.now()){const i=t.getTime()-n;if(0===i)return new Li;const s=Math.sign(i),o=Math.abs(i),r=Math.floor(o/1e3),a=Math.floor(r/60),l=Math.floor(a/60),c=Math.floor(l/24),d=Math.floor(c/30),h=Math.floor(d/12),u=ki.indexOf(e)||ki.length;return new Li(u>=0?h*s:0,u>=1?(d-12*h)*s:0,0,u>=3?(c-30*d)*s:0,u>=4?(l-24*c)*s:0,u>=5?(a-60*l)*s:0,u>=6?(r-60*a)*s:0,u>=7?(o-1e3*r)*s:0)}(i,this.precision,s),r=Ri(this,Si,"m",Oi).call(this,o);let a=t;a="duration"===r?Ri(this,Si,"m",Ni).call(this,o):"relative"===r?Ri(this,Si,"m",Hi).call(this,o):Ri(this,Si,"m",Fi).call(this,i),a?Ri(this,Si,"m",Vi).call(this,a):this.shadowRoot===Ri(this,Di,"f")&&this.textContent&&Ri(this,Si,"m",Vi).call(this,this.textContent),a===t&&n===e||this.dispatchEvent(new Ki(t,a,e,n)),"relative"===r||"duration"===r?zi.observe(this):zi.unobserve(this)}}xi=new WeakMap,Mi=new WeakMap,Di=new WeakMap,qi=new WeakMap,Si=new WeakSet,Ii=function(){var t;const e=(null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang");try{return new Intl.Locale(null!=e?e:"").toString()}catch(t){return"default"}},Pi=function(t){return new Intl.DateTimeFormat(Ri(this,Si,"a",Ii),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},Oi=function(t){const e=this.format;if("datetime"===e)return"datetime";if("duration"===e)return"duration";if("elapsed"===e)return"duration";if("micro"===e)return"duration";if(("auto"===e||"relative"===e)&&"undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const e=this.tense;if("past"===e||"future"===e)return"relative";if(1===Li.compare(t,this.threshold))return"relative"}return"datetime"},Ni=function(t){const e=Ri(this,Si,"a",Ii),n=this.format,i=this.formatStyle,s=this.tense;let o=$i;"micro"===n?(t=Ci(t),o=Ui,("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)&&(t=Ui)):("past"===s&&-1!==t.sign||"future"===s&&1!==t.sign)&&(t=o);const r=`${this.precision}sDisplay`;return t.blank?o.toLocaleString(e,{style:i,[r]:"always"}):t.abs().toLocaleString(e,{style:i})},Hi=function(t){const e=new Intl.RelativeTimeFormat(Ri(this,Si,"a",Ii),{numeric:"auto",style:this.formatStyle}),n=this.tense;"future"===n&&1!==t.sign&&(t=$i),"past"===n&&-1!==t.sign&&(t=$i);const[i,s]=function(t,e){const n=Ci(t,e);if(n.blank)return[0,"second"];for(const t of ki){if("millisecond"===t)continue;const e=n[`${t}s`];if(e)return[e,t]}return[0,"second"]}(t);return"second"===s&&i<10?e.format(0,"millisecond"===this.precision?"second":this.precision):e.format(i,s)},Fi=function(t){const e=new Intl.DateTimeFormat(Ri(this,Si,"a",Ii),{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} ${e.format(t)}`.trim()},Vi=function(t){if(this.hasAttribute("aria-hidden")&&"true"===this.getAttribute("aria-hidden")){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.textContent=t,Ri(this,Di,"f").replaceChildren(e)}else Ri(this,Di,"f").textContent=t};const _i="undefined"!=typeof globalThis?globalThis:window;try{_i.RelativeTimeElement=RelativeTimeElement.define()}catch(t){if(!(_i.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}var Yi,Zi,Gi,Xi,Ji=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n},Qi=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},ts=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};const es=globalThis.HTMLElement||null;function ns(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter(e=>e instanceof es&&e.closest(t.tagName)===t)}class is extends Event{constructor(t,e){var{tab:n,panel:i}=e;super(t,ts(e,["tab","panel"])),Yi.set(this,null),Zi.set(this,null),Ji(this,Zi,n||null,"f"),Ji(this,Yi,i||null,"f")}get detail(){return console.warn("TabContainerElement.detail is deprecated, please use .panel instead"),{relatedTarget:Qi(this,Yi,"f")}}get panel(){return Qi(this,Yi,"f")}get tab(){return Qi(this,Zi,"f")}}Yi=new WeakMap,Zi=new WeakMap;class TabContainerElement extends es{constructor(){super(...arguments),Gi.set(this,null),Xi.set(this,null)}static define(t="tab-container",e=customElements){return e.define(t,this),this}get onTabContainerChange(){return Qi(this,Gi,"f")}set onTabContainerChange(t){Qi(this,Gi,"f")&&this.removeEventListener("tab-container-change",Qi(this,Gi,"f")),Ji(this,Gi,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("tab-container-change",t)}get onTabContainerChanged(){return Qi(this,Xi,"f")}set onTabContainerChanged(t){Qi(this,Xi,"f")&&this.removeEventListener("tab-container-changed",Qi(this,Xi,"f")),Ji(this,Xi,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("tab-container-changed",t)}connectedCallback(){this.addEventListener("keydown",t=>{var e;const n=t.target;if(!(n instanceof es))return;if(n.closest(this.tagName)!==this)return;if("tab"!==n.getAttribute("role")&&!n.closest('[role="tablist"]'))return;const i=ns(this),s=i.indexOf(i.find(t=>t.matches('[aria-selected="true"]'))),[o,r]="vertical"===(null===(e=n.closest('[role="tablist"]'))||void 0===e?void 0:e.getAttribute("aria-orientation"))?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(o.some(e=>t.code===e)){let t=s+1;t>=i.length&&(t=0),this.selectTab(t)}else if(r.some(e=>t.code===e)){let t=s-1;t<0&&(t=i.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(i.length-1),t.preventDefault())}),this.addEventListener("click",t=>{const e=ns(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const n=t.target.closest('[role="tab"]');if(!(n instanceof es&&n.closest('[role="tablist"]')))return;const i=e.indexOf(n);this.selectTab(i)});for(const t of ns(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=ns(this),n=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter(t=>t.closest(this.tagName)===this);if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const i=e[t],s=n[t];if(!!this.dispatchEvent(new is("tab-container-change",{bubbles:!0,cancelable:!0,tab:i,panel:s}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of n)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");i.setAttribute("aria-selected","true"),i.setAttribute("tabindex","0"),i.focus(),s.hidden=!1,this.dispatchEvent(new is("tab-container-changed",{bubbles:!0,tab:i,panel:s}))}}}Gi=new WeakMap,Xi=new WeakMap;const ss="undefined"!=typeof globalThis?globalThis:window;try{ss.TabContainerElement=TabContainerElement.define()}catch(t){if(!(ss.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}let os=class PrimerMultiInputElement extends HTMLElement{activateField(t){const e=this.findField(t);if(e){for(const t of this.fields)t!==e&&(t.setAttribute("disabled","disabled"),t.setAttribute("hidden","hidden"),t.parentElement?.setAttribute("hidden","hidden"));e.removeAttribute("disabled"),e.removeAttribute("hidden"),e.parentElement?.removeAttribute("hidden")}}findField(t){for(const e of this.fields)if(e.getAttribute("data-name")===t)return e;return null}};function rs(t,e=0,{start:n=!1,middle:i=!1,once:s=!1}={}){return function(t,e=0,{start:n=!0,middle:i=!0,once:s=!1}={}){let o,r=n,a=0,l=!1;function c(...d){if(l)return;const h=Date.now()-a;a=Date.now(),n&&i&&h>=e&&(r=!0),r?(r=!1,t.apply(this,d),s&&c.cancel()):(i&&h<e||!i)&&(clearTimeout(o),o=setTimeout(()=>{a=Date.now(),t.apply(this,d),s&&c.cancel()},i?e-h:e))}return c.cancel=()=>{clearTimeout(o),l=!0},c}(t,e,{start:n,middle:i,once:s})}g([K],os.prototype,"fields",void 0),os=g([j],os),window.customElements.get("primer-multi-input")||(Object.assign(window,{PrimerMultiInputElement:os}),window.customElements.define("primer-multi-input",os));var as,ls,cs=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},ds=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};!function(t){t.GET="GET",t.POST="POST"}(ls||(ls={}));const hs=new WeakMap;class us extends Event{constructor(t){super(`auto-check-${t}`,{bubbles:!0}),this.phase=t}get detail(){return this}}class fs extends us{constructor(t,e=""){super(t),this.phase=t,this.message=e,this.setValidity=t=>{this.message=t}}}class ms extends us{constructor(){super("complete")}}class ps extends us{constructor(t){super("success"),this.response=t}}class gs extends fs{constructor(){super("start","Verifying…")}}class bs extends fs{constructor(t){super("error","Validation failed"),this.response=t}}class vs extends us{constructor(t){super("send"),this.body=t}}class AutoCheckElement extends HTMLElement{constructor(){super(...arguments),as.set(this,null)}static define(t="auto-check",e=customElements){return e.define(t,this),this}get onloadend(){return cs(this,as,"f")}set onloadend(t){cs(this,as,"f")&&this.removeEventListener("loadend",cs(this,as,"f")),ds(this,as,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("loadend",t)}connectedCallback(){const t=this.input;if(!t)return;const e=rs(Es.bind(null,this),300),n={check:e,controller:null};hs.set(this,n);const i=ws.bind(null,e);t.addEventListener("blur",i),t.addEventListener("input",i),t.addEventListener("triggervalidation",i),t.autocomplete="off",t.spellcheck=!1}disconnectedCallback(){const t=this.input;if(!t)return;const e=hs.get(this);e&&(hs.delete(this),t.removeEventListener("input",ys),t.removeEventListener("input",e.check),t.setCustomValidity(""))}attributeChangedCallback(t){if("required"===t){const t=this.input;if(!t)return;t.required=this.required}}triggerValidation(){const t=this.input;t&&t.dispatchEvent(new CustomEvent("triggervalidation"))}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const t=this.getAttribute("src");if(!t)return"";const e=this.ownerDocument.createElement("a");return e.href=t,e.href}set src(t){this.setAttribute("src",t)}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||""}set csrf(t){this.setAttribute("csrf",t)}get required(){return this.hasAttribute("required")}set required(t){t?this.setAttribute("required",""):this.removeAttribute("required")}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}set csrfField(t){this.setAttribute("csrf-field",t)}get httpMethod(){return ls[this.getAttribute("http-method")]||"POST"}set validateOnKeystroke(t){t?this.setAttribute("validate-on-keystroke",""):this.removeAttribute("validate-on-keystroke")}get validateOnKeystroke(){const t=this.getAttribute("validate-on-keystroke");return"true"===t||""===t}}function ws(t,e){const n=e.currentTarget;if(!(n instanceof HTMLInputElement))return;const i=n.closest("auto-check");i instanceof AutoCheckElement&&("input"===e.type&&i.setAttribute("dirty",""),0!==n.value.length&&("blur"===e.type&&!i.validateOnKeystroke&&i.hasAttribute("dirty")||"input"===e.type&&i.validateOnKeystroke||"triggervalidation"===e.type)&&(ys(e),t()))}function ys(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const n=e.closest("auto-check");if(!(n instanceof AutoCheckElement))return;const i=n.src,s=n.csrf,o=n.httpMethod,r=hs.get(n);if(!i||"POST"===o&&!s||!r)return;const a=new gs;e.dispatchEvent(a),n.required&&e.setCustomValidity(a.message)}async function Es(t){const e=t.input;if(!e)return;const n=t.csrfField,i=t.src,s=t.csrf,o=hs.get(t),r=t.httpMethod;if(!i||"POST"===r&&!s||!o)return void(t.required&&e.setCustomValidity(""));if(!e.value.trim())return void(t.required&&e.setCustomValidity(""));const a=new FormData,l=new URL(i,window.location.origin);"POST"===r?(a.append(n,s),a.append("value",e.value)):l.search=new URLSearchParams({value:e.value}).toString(),e.dispatchEvent(new vs(a)),o.controller?o.controller.abort():t.dispatchEvent(new Event("loadstart")),o.controller="AbortController"in window?new AbortController:{signal:null,abort(){}},t.removeAttribute("dirty");try{const n=await async function(t,e,n){"GET"===n.method&&delete n.body;try{const i=await fetch(e,n);return t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend")),i}catch(e){throw"AbortError"!==e.name&&(t.dispatchEvent(new Event("error")),t.dispatchEvent(new Event("loadend"))),e}}(t,l.toString(),{credentials:"same-origin",signal:o.controller.signal,method:r,body:a});if(n.ok)t.required&&e.setCustomValidity(""),t.validateOnKeystroke=!1,e.dispatchEvent(new ps(n.clone()));else{t.validateOnKeystroke=!0;const i=new bs(n.clone());e.dispatchEvent(i),t.required&&e.setCustomValidity(i.message)}o.controller=null,e.dispatchEvent(new ms)}catch(t){"AbortError"!==t.name&&(o.controller=null,e.dispatchEvent(new ms))}}as=new WeakMap;const As="undefined"!=typeof globalThis?globalThis:window;try{As.AutoCheckElement=AutoCheckElement.define()}catch(t){if(!(As.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}var ks;let Ls=class PrimerTextFieldElement extends HTMLElement{constructor(){super(...arguments),ks.set(this,void 0)}connectedCallback(){b(this,ks,"f")?.abort();const{signal:t}=v(this,ks,new AbortController,"f");this.addEventListener("auto-check-success",async t=>{const e=await t.detail.response.text();e&&e.length>0?this.setSuccess(e):this.clearError()},{signal:t}),this.addEventListener("auto-check-error",async t=>{const e=await t.detail.response.text();this.setError(e)},{signal:t})}disconnectedCallback(){b(this,ks,"f")?.abort()}clearContents(){this.inputElement.value="",this.inputElement.focus(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))}clearError(){this.inputElement.removeAttribute("invalid"),this.validationElement.hidden=!0,this.validationMessageElement.replaceChildren()}setValidationMessage(t){const e=document.createElement("template");e.innerHTML=t;const n=document.importNode(e.content,!0);this.validationMessageElement.replaceChildren(n)}toggleValidationStyling(t){t?this.validationElement.classList.remove("FormControl-inlineValidation--success"):this.validationElement.classList.add("FormControl-inlineValidation--success"),this.validationSuccessIcon.hidden=t,this.validationErrorIcon.hidden=!t,this.inputElement.setAttribute("invalid",t?"true":"false")}setSuccess(t){this.toggleValidationStyling(!1),this.setValidationMessage(t),this.validationElement.hidden=!1}setError(t){this.toggleValidationStyling(!0),this.setValidationMessage(t),this.validationElement.hidden=!1}showLeadingSpinner(){this.leadingSpinner?.removeAttribute("hidden"),this.leadingVisual?.setAttribute("hidden","")}hideLeadingSpinner(){this.leadingSpinner?.setAttribute("hidden",""),this.leadingVisual?.removeAttribute("hidden")}};ks=new WeakMap,g([U],Ls.prototype,"inputElement",void 0),g([U],Ls.prototype,"validationElement",void 0),g([U],Ls.prototype,"validationMessageElement",void 0),g([U],Ls.prototype,"validationSuccessIcon",void 0),g([U],Ls.prototype,"validationErrorIcon",void 0),g([U],Ls.prototype,"leadingVisual",void 0),g([U],Ls.prototype,"leadingSpinner",void 0),Ls=g([j],Ls);let Ts=class ToggleSwitchInputElement extends HTMLElement{connectedCallback(){this.addEventListener("toggleSwitchError",t=>{this.validationMessageElement.textContent=t.detail,this.validationElement.removeAttribute("hidden")}),this.addEventListener("toggleSwitchSuccess",()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")}),this.addEventListener("toggleSwitchLoading",()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")})}};var Cs,Ss,xs,Ms,Is,Ds,Ps,Os,Ns,Hs,Fs,Vs,qs,Rs,Ws,Bs,$s,Us,Ks,js,zs,_s,Ys,Zs,Gs,Xs,Js,Qs,to,eo,no,io,so;g([U],Ts.prototype,"validationElement",void 0),g([U],Ts.prototype,"validationMessageElement",void 0),Ts=g([j],Ts);class oo{constructor(){Cs.add(this),Ss.set(this,void 0),v(this,Ss,[],"f")}get current(){return b(this,Ss,"f")[b(this,Ss,"f").length-1]}push(t,e={trapFocus:!0}){const{trapFocus:n}=e;b(this,Ss,"f").push({element:t,abortController:b(this,Cs,"m",xs).call(this,t,n)})}pop(t){if(t)for(;b(this,Ss,"f").length>0&&this.current?.element!==t;){const t=b(this,Ss,"f").pop();t?.abortController?.abort()}const e=b(this,Ss,"f").pop();e?.abortController?.abort()}elementIsMenuItem(t){return b(this,Cs,"a",Ms).includes(t.getAttribute("role")||"")}get isEmpty(){return 0===b(this,Ss,"f").length}}Ss=new WeakMap,Cs=new WeakSet,xs=function(t,e){const n=kt(t,{bindKeys:gt.ArrowVertical|gt.ArrowHorizontal|gt.HomeAndEnd|gt.Backspace,focusOutBehavior:"wrap",focusableElementFilter:e=>this.elementIsMenuItem(e)&&e.closest("anchored-position")===t});if(e){const{signal:e}=n;return ut(t,void 0,e)}return n},Ms=function(){return ro.validItemRoles};let ro=so=class ActionMenuElement extends HTMLElement{constructor(){super(...arguments),Is.add(this),Ds.set(this,void 0),Ps.set(this,""),Os.set(this,""),Ns.set(this,!1),Hs.set(this,void 0),Fs.set(this,void 0)}get selectVariant(){return this.getAttribute("data-select-variant")}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get popoverElement(){return this.invokerElement?.popoverTargetElement||null}get childPopoverElements(){return Array.from(this.overlay.querySelectorAll("anchored-position"))}get invokerElement(){const t=this.querySelector("[role=menu]")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){const t=this.querySelectorAll("[aria-checked=true]"),e=[];for(const n of t){const t=n.querySelector(".ActionListItem-label");e.push({label:t?.textContent,value:n?.getAttribute("data-value"),element:n})}return e}connectedCallback(){const{signal:t}=v(this,Ds,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusout",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.addEventListener("toggle",this,{signal:t,capture:!0}),b(this,Is,"m",Qs).call(this),b(this,Is,"m",to).call(this),b(this,Is,"m",qs).call(this),this.includeFragment&&this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t});const e=()=>{b(this,Is,"m",Js).call(this)&&this.overlay?.update()};v(this,Hs,new IntersectionObserver(t=>{for(const n of t){n.target===this.invokerElement&&(n.isIntersecting?window.addEventListener("scroll",e,{capture:!0}):window.removeEventListener("scroll",e,{capture:!0}))}}),"f"),$e(this,()=>Boolean(this.invokerElement),()=>b(this,Hs,"f").observe(this.invokerElement)),this.includeFragment||this.setAttribute("data-ready","true");new MutationObserver(()=>b(this,Is,"m",Vs).call(this)).observe(this,{childList:!0,subtree:!0}),b(this,Is,"m",Vs).call(this),v(this,Fs,new oo,"f")}disconnectedCallback(){b(this,Ds,"f").abort()}handleEvent(t){const e=this.invokerElement?.contains(t.target),n=b(this,Is,"m",$s).call(this,t);if("toggle"===t.type&&t instanceof ToggleEvent)return void b(this,Is,"m",Ks).call(this,t);if(e&&"mousedown"===t.type)return void v(this,Ns,!0,"f");if("mousedown"===t.type)return void t.preventDefault();if(e&&n)return b(this,Is,"m",js).call(this,t),void v(this,Ns,!1,"f");if("focusout"===t.type){if(b(this,Ns,"f"))return;return void requestAnimationFrame(()=>{this.contains(document.activeElement)&&document.activeElement!==this.invokerElement||b(this,Is,"m",Zs).call(this)})}const i=t.target.closest(so.menuItemSelectors.join(",")),s=null!==i;if(s&&n){if(b(this,Is,"m",Rs).call(this,t))return;const e=i.closest("[data-show-dialog-id]");if(e){const n=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(n&&this.contains(e))return void b(this,Is,"m",zs).call(this,t,n)}b(this,Is,"m",Ws).call(this,t)&&(t.preventDefault(),i.click());const n=b(this,Is,"m",no).call(this,i);return n?(t.preventDefault(),void n.showPopover()):void b(this,Is,"m",_s).call(this,i)}"include-fragment-replaced"!==t.type?s&&t instanceof KeyboardEvent&&b(this,Is,"m",Us).call(this,t,i):b(this,Is,"m",Ys).call(this)}get items(){return Array.from(this.querySelectorAll(so.menuItemSelectors.join(",")))}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),t.querySelector(".ActionListContent").setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),t.querySelector(".ActionListContent").removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}hideItem(t){t&&t.setAttribute("hidden","hidden")}showItem(t){t&&t.removeAttribute("hidden")}isItemChecked(t){return!!t&&"true"===t.querySelector(".ActionListContent").getAttribute("aria-checked")}checkItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")||b(this,Is,"m",_s).call(this,e)}}uncheckItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")&&b(this,Is,"m",_s).call(this,e)}}};Ds=new WeakMap,Ps=new WeakMap,Os=new WeakMap,Ns=new WeakMap,Hs=new WeakMap,Fs=new WeakMap,Is=new WeakSet,Vs=function(){let t=1;for(const e of this.querySelectorAll("[role=menu]"))e.setAttribute("data-level",t.toString()),t++},qs=function(){const{signal:t}=b(this,Ds,"f");for(const e of this.querySelectorAll(so.validSelectors.join(",")))e.addEventListener("click",b(this,Is,"m",Rs).bind(this),{signal:t}),e.addEventListener("keydown",b(this,Is,"m",Rs).bind(this),{signal:t})},Rs=function(t){if(!b(this,Is,"m",$s).call(this,t))return!1;const e=t.target.closest(so.menuItemSelectors.join(","));return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},Ws=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},Bs=function(t){return t.target instanceof ClipboardCopyElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&(" "===t.key||"Enter"===t.key)},$s=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,Is,"m",Ws).call(this,t)||b(this,Is,"m",Bs).call(this,t)},Us=function(t,e){switch(t.key){case"ArrowRight":{const t=b(this,Is,"m",no).call(this,e);t?.showPopover();break}case"ArrowLeft":if(e.closest("role[menu]")!==this.list){const t=e.closest("anchored-position");t?.hidePopover()}}},Ks=function(t){const e=t.target;if("open"===t.newState){const t=e===this.overlay;b(this,Fs,"f").push(e,{trapFocus:!t}),window.requestAnimationFrame(()=>{const t=e.querySelector(so.menuItemSelectors.join(","));t?.focus()})}else{b(this,Fs,"f").pop(e);const t=b(this,Is,"m",io).call(this,e),n=document.querySelector(":popover-open");t&&!n&&t.focus()}},js=function(t){t.preventDefault(),t.stopPropagation(),b(this,Is,"m",Js).call(this)?b(this,Is,"m",Xs).call(this):b(this,Is,"m",Gs).call(this)},zs=function(t,e){this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="none");const n=new AbortController,{signal:i}=n,s=()=>{n.abort(),this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="",b(this,Is,"m",Js).call(this)&&b(this,Is,"m",Xs).call(this));const t=this.ownerDocument.activeElement,i=this.ownerDocument.activeElement===this.ownerDocument.body,s=this.contains(t),o=e.contains(t);(i||s||o)&&setTimeout(()=>{const e=this.ownerDocument.activeElement;e!==t&&e!==this.ownerDocument.body||this.invokerElement?.focus()},0)};e.addEventListener("close",s,{signal:i}),e.addEventListener("cancel",s,{signal:i})},_s=function(t){if("multiple"!==this.selectVariant&&setTimeout(()=>{b(this,Is,"m",Js).call(this)&&b(this,Is,"m",Xs).call(this)}),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e="true"!==t.getAttribute("aria-checked");if("single"===this.selectVariant){e&&t.setAttribute("aria-checked","true");for(const e of this.querySelectorAll("[aria-checked]"))e!==t&&e.setAttribute("aria-checked","false");b(this,Is,"m",Qs).call(this)}else t.setAttribute("aria-checked",`${e}`);b(this,Is,"m",to).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t.parentElement,checked:this.isItemChecked(t.parentElement)}}))},Ys=function(){b(this,Is,"a",eo)?.focus(),b(this,Is,"m",qs).call(this),this.setAttribute("data-ready","true")},Zs=function(){b(this,Is,"m",Xs).call(this)},Gs=function(){this.popoverElement?.showPopover()},Xs=function(){this.popoverElement?.hidePopover();for(const t of this.childPopoverElements)t.hidePopover()},Js=function(){return this.popoverElement?.matches(":popover-open")},Qs=function(){if("single"!==this.selectVariant)return;if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,Ps,b(this,Ps,"f")||t.textContent||"","f");const e=this.querySelector("[aria-checked=true] .ActionListItem-label");if(e&&this.dynamicLabel){const n=document.createElement("span");n.classList.add("color-fg-muted");const i=document.createElement("span");n.textContent=this.dynamicLabelPrefix,i.textContent=e.textContent||"",t.replaceChildren(n,i)}else t.textContent=b(this,Ps,"f")},to=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),t.removeAttribute("disabled")):t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=this.querySelector("[data-list-inputs=true]");if(!t)return;const e=t.querySelectorAll("input");e.length>0&&v(this,Os,b(this,Os,"f")||e[0].name,"f");for(const e of this.selectedItems){const n=document.createElement("input");n.setAttribute("data-list-input","true"),n.type="hidden",n.autocomplete="off",n.name=b(this,Os,"f"),n.value=(e.value||e.label||"").trim(),t.append(n)}for(const t of e)t.remove()}},eo=function(){return this.querySelector(so.menuItemSelectors.join(","))},no=function(t){const e=t.getAttribute("popovertarget");return e?this.querySelector(`[id="${e}"]`):null},io=function(t){const e=t.getAttribute("anchor");return e?this.querySelector(`[id="${e}"]`):null},ro.validItemRoles=["menuitem","menuitemcheckbox","menuitemradio"],ro.validSelectors=so.validItemRoles.map(t=>`[role="${t}"]`),ro.menuItemSelectors=so.validSelectors.map(t=>`:not([hidden]) > ${t}`),g([U],ro.prototype,"includeFragment",void 0),g([U],ro.prototype,"overlay",void 0),g([U],ro.prototype,"list",void 0),ro=so=g([j],ro),window.customElements.get("action-menu")||(window.ActionMenuElement=ro,window.customElements.define("action-menu",ro));const ao="less",lo="equal",co="greater";var ho,uo,fo,mo,po,go=t=>{throw TypeError(t)},bo=(t,e,n)=>e.has(t)||go("Cannot "+n),vo=(t,e,n)=>(bo(t,e,"read from private field"),n?n.call(t):e.get(t)),wo=(t,e,n)=>e.has(t)?go("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),yo=(t,e,n,i)=>(bo(t,e,"write to private field"),e.set(t,n),n),Eo=(t,e,n)=>(bo(t,e,"access private method"),n);class Ao{constructor({compareFn:t}){wo(this,fo),wo(this,ho),wo(this,uo),yo(this,ho,t),yo(this,uo,[])}insert(t){vo(this,uo).push(t),Eo(this,fo,po).call(this)}pop(){const t=vo(this,uo)[0];return vo(this,uo)[vo(this,uo).length-1]&&(vo(this,uo)[0]=vo(this,uo)[vo(this,uo).length-1],vo(this,uo).pop()),Eo(this,fo,mo).call(this),t}peek(){return vo(this,uo)[0]}delete(t){const e=vo(this,uo).indexOf(t);-1!==e&&(Po(vo(this,uo),e,vo(this,uo).length-1),vo(this,uo).pop(),Eo(this,fo,mo).call(this))}clear(){yo(this,uo,[])}get size(){return vo(this,uo).length}}function ko(t){return 2*t+1}function Lo(t){return 2*t+2}function To(t){return Math.floor((t-1)/2)}function Co(t,e){return ko(t)<e}function So(t,e){return Lo(t)<e}function xo(t){return t>0}function Mo(t,e){return t[ko(e)]}function Io(t,e){return t[Lo(e)]}function Do(t,e){return t[To(e)]}function Po(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}ho=new WeakMap,uo=new WeakMap,fo=new WeakSet,mo=function(){let t=0;for(;Co(t,vo(this,uo).length);){let e=ko(t);if(So(t,vo(this,uo).length)&&vo(this,ho).call(this,Io(vo(this,uo),t),Mo(vo(this,uo),t))===ao&&(e=Lo(t)),vo(this,ho).call(this,vo(this,uo)[t],vo(this,uo)[e])===ao)break;Po(vo(this,uo),t,e),t=e}},po=function(){let t=vo(this,uo).length-1;for(;xo(t)&&vo(this,ho).call(this,vo(this,uo)[t],Do(vo(this,uo),t))===ao;)Po(vo(this,uo),t,To(t)),t=To(t)};var Oo,No,Ho,Fo,Vo=Object.defineProperty,qo=t=>{throw TypeError(t)},Ro=(t,e,n)=>((t,e,n)=>e in t?Vo(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),Wo=(t,e,n)=>e.has(t)||qo("Cannot "+n),Bo=(t,e,n)=>(Wo(t,e,"read from private field"),n?n.call(t):e.get(t)),$o=(t,e,n)=>e.has(t)?qo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Uo=(t,e,n,i)=>(Wo(t,e,"write to private field"),e.set(t,n),n);Oo=Symbol.toStringTag;class Ko{constructor(){Ro(this,Oo,"Deferred"),$o(this,No),$o(this,Ho),$o(this,Fo),Uo(this,No,new Promise((t,e)=>{Uo(this,Ho,t),Uo(this,Fo,e)}))}then(t,e){return Promise.prototype.then.apply(Bo(this,No),[t,e])}catch(t){return Promise.prototype.catch.apply(Bo(this,No),[t])}finally(t){return Promise.prototype.finally.apply(Bo(this,No),[t])}resolve(t){Bo(this,Ho).call(this,t)}reject(t){Bo(this,Fo).call(this,t)}getPromise(){return Bo(this,No)}}No=new WeakMap,Ho=new WeakMap,Fo=new WeakMap;var jo,zo,_o,Yo,Zo,Go,Xo=t=>{throw TypeError(t)},Jo=(t,e,n)=>e.has(t)||Xo("Cannot "+n),Qo=(t,e,n)=>(Jo(t,e,"read from private field"),n?n.call(t):e.get(t)),tr=(t,e,n)=>e.has(t)?Xo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),er=(t,e,n,i)=>(Jo(t,e,"write to private field"),e.set(t,n),n),nr=(t,e,n)=>(Jo(t,e,"access private method"),n);class LiveRegionElement extends HTMLElement{constructor(){if(super(),tr(this,Yo),tr(this,jo),tr(this,zo),tr(this,_o),!this.shadowRoot){const t=function(){if(ir)return ir;return ir=document.createElement("template"),ir.innerHTML=sr,ir}();this.attachShadow({mode:"open"}).appendChild(t.content.cloneNode(!0))}er(this,jo,!1),er(this,_o,null),er(this,zo,new Ao({compareFn:or}))}get delay(){const t=this.getAttribute("delay");return t?parseInt(t,10):150}set delay(t){this.setAttribute("delay",`${t}`)}announce(t,e={}){const{delayMs:n,politeness:i="polite"}=e,s=Date.now(),o=new Ko,r={deferred:o,politeness:i,contents:t,scheduled:void 0!==n?s+n:s};return Qo(this,zo).insert(r),nr(this,Yo,Zo).call(this),{...o.getPromise(),cancel:()=>{Qo(this,zo).delete(r),o.resolve()}}}announceFromElement(t,e){const n=function(t){let e="";t.hasAttribute("aria-label")?e=t.getAttribute("aria-label"):t.innerText?e=t.innerText:t.textContent&&(e=t.textContent);return e?e.trim():""}(t);if(""!==n)return this.announce(n,e);return{...Promise.resolve(),cancel:rr}}getMessage(t="polite"){const e=this.shadowRoot?.getElementById(t);if(!e)throw new Error("Unable to find container for message");return e.textContent}clear(){null!==Qo(this,_o)&&(clearTimeout(Qo(this,_o)),er(this,_o,null)),er(this,jo,!1),Qo(this,zo).clear()}}jo=new WeakMap,zo=new WeakMap,_o=new WeakMap,Yo=new WeakSet,Zo=function(){if(Qo(this,jo))return;let t=Qo(this,zo).peek();if(!t)return;null!==Qo(this,_o)&&(clearTimeout(Qo(this,_o)),er(this,_o,null));const e=Date.now();if(t.scheduled<=e)return t=Qo(this,zo).pop(),t&&nr(this,Yo,Go).call(this,t),void nr(this,Yo,Zo).call(this);const n=t.scheduled-e;er(this,_o,window.setTimeout(()=>{er(this,_o,null),nr(this,Yo,Zo).call(this)},n))},Go=function(t){er(this,jo,!0);const{contents:e,deferred:n,politeness:i}=t,s=this.shadowRoot?.getElementById(i);if(!s)throw er(this,jo,!1),new Error(`Unable to find container for message. Expected a container with id="${i}"`);s.textContent===e?s.textContent=`${e} `:s.textContent=e,null!==Qo(this,_o)&&clearTimeout(Qo(this,_o)),n.resolve(),this.delay>0?er(this,_o,window.setTimeout(()=>{er(this,_o,null),er(this,jo,!1),nr(this,Yo,Zo).call(this)},this.delay)):(er(this,_o,null),er(this,jo,!1),nr(this,Yo,Zo).call(this))};let ir=null;const sr='\n<style>\n:host {\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n</style>\n<div id="polite" aria-live="polite" aria-atomic="true"></div>\n<div id="assertive" aria-live="assertive" aria-atomic="true"></div>\n';function or(t,e){return t.politeness===e.politeness?t.scheduled===e.scheduled?lo:t.scheduled<e.scheduled?ao:co:"assertive"===t.politeness&&"assertive"!==e.politeness?ao:"assertive"!==t.politeness&&"assertive"===e.politeness?co:lo}function rr(){}var ar,lr,cr,dr,hr,ur,fr,mr,pr,gr,br,vr,wr,yr,Er,Ar,kr,Lr,Tr,Cr,Sr,xr,Mr,Ir,Dr,Pr,Or,Nr,Hr,Fr,Vr,qr,Rr,Wr,Br,$r,Ur,Kr,jr,zr;customElements.get("live-region")||customElements.define("live-region",LiveRegionElement);const _r=['[role="option"]'],Yr=_r.join(","),Zr=_r.map(t=>`:not([hidden]) > ${t}`).join(",");var Gr,Xr;!function(t){t[t.REMOTE=0]="REMOTE",t[t.EVENTUALLY_LOCAL=1]="EVENTUALLY_LOCAL",t[t.LOCAL=2]="LOCAL"}(Gr||(Gr={})),function(t){t[t.BODY=0]="BODY",t[t.BANNER=1]="BANNER"}(Xr||(Xr={}));const Jr=(()=>{const t=new Set;let e=null;function n(){for(const e of t)e.updateAnchorPosition()}return i=>{window.addEventListener("resize",n),window.addEventListener("scroll",n),e||(e=new ResizeObserver(()=>{for(const e of t)e.updateAnchorPosition()})),e.observe(i.ownerDocument.documentElement),i.addEventListener("dialog:close",()=>{i.invokerElement?.setAttribute("aria-expanded","false"),t.delete(i)}),i.addEventListener("dialog:open",()=>{t.add(i)})}})();let Qr=class SelectPanelElement extends HTMLElement{constructor(){super(...arguments),ar.add(this),lr.set(this,void 0),cr.set(this,void 0),dr.set(this,""),hr.set(this,""),ur.set(this,new Map),fr.set(this,null),mr.set(this,null),pr.set(this,!1)}get open(){return this.dialog.open}get selectVariant(){return this.getAttribute("data-select-variant")}get ariaSelectionType(){return"multiple"===this.selectVariant?"aria-checked":"aria-selected"}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}get dynamicAriaLabelPrefix(){const t=this.getAttribute("data-dynamic-aria-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get invokerElement(){const t=this.querySelector("dialog")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get closeButton(){return this.querySelector("button[data-close-dialog-id]")}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){return Array.from(b(this,ur,"f").values())}get align(){return this.getAttribute("anchor-align")||"start"}get side(){return this.getAttribute("anchor-side")||"outside-bottom"}updateAnchorPosition(){if(this&&null===this.offsetParent&&this.hide(),this.invokerElement){const{top:t,left:e}=X(this.dialog,this.invokerElement,{align:this.align,side:this.side,anchorOffset:4});this.dialog.style.top=`${t}px`,this.dialog.style.left=`${e}px`,this.dialog.style.bottom="auto",this.dialog.style.right="auto"}}connectedCallback(){const{signal:t}=v(this,cr,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.addEventListener("input",this,{signal:t}),this.addEventListener("remote-input-success",this,{signal:t}),this.addEventListener("remote-input-error",this,{signal:t}),this.addEventListener("loadstart",this,{signal:t}),b(this,ar,"m",Br).call(this),b(this,ar,"m",$r).call(this),b(this,ar,"m",gr).call(this),Jr(this),$e(this,()=>Boolean(this.remoteInput),()=>{this.remoteInput.addEventListener("loadstart",this,{signal:t}),this.remoteInput.addEventListener("loadend",this,{signal:t})}),$e(this,()=>Boolean(this.includeFragment),()=>{this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("loadend",this,{signal:t})}),v(this,lr,new IntersectionObserver(t=>{for(const e of t){const t=e.target;e.isIntersecting&&t===this.dialog&&(this.filterInputTextField&&document.activeElement!==this.filterInputTextField&&this.filterInputTextField.focus(),this.dialog.setAttribute("data-ready","true"),this.updateAnchorPosition(),b(this,ar,"a",Hr)===Gr.LOCAL&&b(this,ar,"m",Ir).call(this))}}),"f"),$e(this,()=>Boolean(this.dialog),()=>{b(this,lr,"f").observe(this.dialog),this.dialog.addEventListener("close",this,{signal:t}),"true"===this.getAttribute("data-open-on-load")&&this.show()}),b(this,ar,"a",Hr)===Gr.LOCAL&&$e(this,()=>this.items.length>0,()=>{b(this,ar,"m",Ir).call(this),b(this,ar,"m",$r).call(this)})}disconnectedCallback(){b(this,cr,"f").abort()}handleEvent(t){if(t.target===this.filterInputTextField)return void b(this,ar,"m",Mr).call(this,t);if(t.target===this.remoteInput)return void b(this,ar,"m",Sr).call(this,t);const e=this.invokerElement?.contains(t.target),n=this.closeButton?.contains(t.target),i=b(this,ar,"m",yr).call(this,t);if(e&&"mousedown"===t.type)return;if("mousedown"===t.type&&t.target instanceof HTMLInputElement)return;if("mousedown"===t.type)return void t.preventDefault();if(e&&i)return void b(this,ar,"m",qr).call(this,t);if(n&&i)return;if("keydown"===t.type&&t instanceof KeyboardEvent&&t.target.closest(Zr)){const e=t.ctrlKey||t.altKey||t.metaKey,n=1===t.key.length&&/[a-z\d]/i.test(t.key);!e&&n&&t.stopPropagation()}if(t.target===this.dialog&&"close"===t.type){if(this.dialog.removeAttribute("data-ready"),this.invokerElement?.setAttribute("aria-expanded","false"),this.filterInputTextField){const t=this.filterInputTextField.value.length>0;this.filterInputTextField.value="",t&&this.filterInputTextField.dispatchEvent(new Event("input"))}return void this.dispatchEvent(new CustomEvent("panelClosed",{detail:{panel:this},bubbles:!0}))}const s=t.target.closest(Zr)?.parentElement;if(null!=s&&i){if(b(this,ar,"m",vr).call(this,t))return;const e=s.closest("[data-show-dialog-id]");if(e){const n=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(n&&this.contains(e)&&this.contains(n))return void b(this,ar,"m",Rr).call(this,t,n)}return b(this,ar,"m",wr).call(this,t)&&(t.preventDefault(),b(this,ar,"m",zr).call(this,s)?.click()),void b(this,ar,"m",Wr).call(this,s)}if("click"===t.type){const e=this.dialog.getBoundingClientRect();e.top<=t.clientY&&t.clientY<=e.top+e.height&&e.left<=t.clientX&&t.clientX<=e.left+e.width||this.hide()}t.target instanceof IncludeFragmentElement&&b(this,ar,"m",Tr).call(this,t)}show(){this.updateAnchorPosition(),this.dialog.showModal(),this.invokerElement?.setAttribute("aria-expanded","true");const t=new CustomEvent("dialog:open",{detail:{dialog:this.dialog}});this.dispatchEvent(t)}hide(){this.dialog.close()}get visibleItems(){return Array.from(this.querySelectorAll(Zr)).map(t=>t.parentElement)}get items(){return Array.from(this.querySelectorAll(Yr)).map(t=>t.parentElement)}get focusableItem(){for(const t of this.items){const e=b(this,ar,"m",zr).call(this,t);if(e&&"0"===e.getAttribute("tabindex"))return e}}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),b(this,ar,"m",zr).call(this,t).setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),b(this,ar,"m",zr).call(this,t).removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}isItemChecked(t){return!!t&&"true"===b(this,ar,"m",zr).call(this,t).getAttribute(this.ariaSelectionType)}checkItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)||b(this,ar,"m",Wr).call(this,t)}uncheckItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)&&b(this,ar,"m",Wr).call(this,t)}};lr=new WeakMap,cr=new WeakMap,dr=new WeakMap,hr=new WeakMap,ur=new WeakMap,fr=new WeakMap,mr=new WeakMap,pr=new WeakMap,ar=new WeakSet,gr=function(){const{signal:t}=b(this,cr,"f");for(const e of this.querySelectorAll(_r.join(",")))e.addEventListener("click",b(this,ar,"m",vr).bind(this),{signal:t}),e.addEventListener("keydown",b(this,ar,"m",vr).bind(this),{signal:t})},br=function(){let t=!1;if("single"===this.selectVariant)for(const e of this.items){const n=b(this,ar,"m",zr).call(this,e);n&&(this.isItemHidden(e)||!this.isItemChecked(e)||t?n.setAttribute("tabindex","-1"):(n.setAttribute("tabindex","0"),t=!0),e.removeAttribute("tabindex"))}else for(const t of this.items){const e=b(this,ar,"m",zr).call(this,t);e&&(e.setAttribute("tabindex","-1"),t.removeAttribute("tabindex"))}!t&&b(this,ar,"a",Ur)&&b(this,ar,"m",zr).call(this,b(this,ar,"a",Ur))?.setAttribute("tabindex","0")},vr=function(t){if(!b(this,ar,"m",yr).call(this,t))return!1;const e=t.target.closest(Zr);return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},wr=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},yr=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,ar,"m",wr).call(this,t)},Er=function(){for(const t of this.items){const e=b(this,ar,"m",zr).call(this,t);if(!e)continue;const n=e.getAttribute("data-value");n&&b(this,ur,"f").has(n)&&e.setAttribute(this.ariaSelectionType,"true")}b(this,ar,"m",$r).call(this)},Ar=function(t){const e=b(this,ar,"m",zr).call(this,t);if(!e)return;const n=e.getAttribute("data-value");n&&b(this,ur,"f").set(n,{value:n,label:e.querySelector(".ActionListItem-label")?.textContent?.trim(),inputName:e.getAttribute("data-input-name")})},kr=function(t){const e=b(this,ar,"m",zr).call(this,t);if(!e)return;const n=e.getAttribute("data-value");n&&b(this,ur,"f").delete(n)},Lr=function(){b(this,ar,"a",Fr)&&(b(this,fr,"f")&&clearTimeout(b(this,fr,"f")),b(this,mr,"f")&&clearTimeout(b(this,mr,"f")),v(this,mr,setTimeout(()=>{this.liveRegion.announce("Loading")},2e3),"f"),v(this,fr,setTimeout(()=>{b(this,ar,"a",Fr)?.showLeadingSpinner()},1e3),"f"))},Tr=function(t){switch(t.type){case"include-fragment-replaced":b(this,ar,"m",Ir).call(this);break;case"loadstart":b(this,ar,"m",Cr).call(this,!1);break;case"loadend":b(this,ar,"a",Fr)?.hideLeadingSpinner(),this.dispatchEvent(new CustomEvent("loadend"));break;case"error":{b(this,ar,"m",Cr).call(this,!0);const e=this.fragmentErrorElement;throw e&&!e.hasAttribute("hidden")&&this.liveRegion.announceFromElement(e,{politeness:"assertive"}),new Error(t.detail.error)}}},Cr=function(t){for(const e of this.includeFragment.querySelectorAll("[data-show-on-error]"))e instanceof HTMLElement&&(e.hidden=!t);for(const e of this.includeFragment.querySelectorAll("[data-hide-on-error]"))e instanceof HTMLElement&&(e.hidden=t)},Sr=function(t){switch(t.type){case"remote-input-success":b(this,ar,"m",Or).call(this),b(this,ar,"m",Ir).call(this),b(this,ar,"m",Er).call(this);break;case"remote-input-error":this.bodySpinner?.setAttribute("hidden",""),this.includeFragment||0===this.visibleItems.length?b(this,ar,"m",Pr).call(this,Xr.BODY):b(this,ar,"m",Pr).call(this,Xr.BANNER);break;case"loadstart":if(!b(this,ar,"m",Vr).call(this)){if(b(this,ar,"m",Or).call(this),this.bodySpinner?.removeAttribute("hidden"),this.bodySpinner)break;b(this,ar,"m",Lr).call(this)}break;case"loadend":b(this,ar,"a",Fr)?.hideLeadingSpinner(),b(this,mr,"f")&&clearTimeout(b(this,mr,"f")),b(this,fr,"f")&&clearTimeout(b(this,fr,"f")),this.dispatchEvent(new CustomEvent("loadend"))}},xr=function(t,e){return(t.getAttribute("data-filter-string")||t.textContent||"").toLowerCase().indexOf(e.toLowerCase())>-1},Mr=function(t){if("keydown"===t.type){const e=t.key;if("Enter"===e){const t=this.visibleItems[0];if(t){const e=b(this,ar,"m",zr).call(this,t);e&&e.click()}}else if("ArrowDown"===e){const e=this.focusableItem||b(this,ar,"m",zr).call(this,this.visibleItems[0]);e&&(e.focus(),t.preventDefault())}else if("Home"===e){const e=this.visibleItems[0];if(e){const n=b(this,ar,"m",zr).call(this,e);n&&n.focus(),t.preventDefault()}}else if("End"===e&&this.visibleItems.length>0){const e=this.visibleItems[this.visibleItems.length-1],n=b(this,ar,"m",zr).call(this,e);n&&n.focus(),t.preventDefault()}}if("input"===t.type&&(this.bodySpinner||b(this,ar,"m",Vr).call(this)||b(this,ar,"m",Lr).call(this),b(this,ar,"a",Hr)===Gr.LOCAL||b(this,ar,"a",Hr)===Gr.EVENTUALLY_LOCAL)){if(this.includeFragment)return void this.includeFragment.refetch();b(this,ar,"m",Ir).call(this)}},Ir=function(){if(!this.list)return;let t=!1;if(b(this,ar,"m",Vr).call(this)){const e=this.filterInputTextField?.value??"",n=this.filterFn||b(this,ar,"m",xr);for(const i of this.items)n(i,e)?(b(this,ar,"m",jr).call(this,i),t=!0):b(this,ar,"m",Kr).call(this,i)}else t=this.items.length>0;b(this,ar,"m",br).call(this),b(this,ar,"m",Nr).call(this);for(const t of this.items){const e=b(this,ar,"m",zr).call(this,t);if(!e)continue;const n=e.getAttribute("data-value");b(this,pr,"f")?n&&!b(this,ur,"f").has(n)&&e.setAttribute(this.ariaSelectionType,"false"):n&&!b(this,ur,"f").has(n)&&this.isItemChecked(t)&&b(this,ar,"m",Ar).call(this,t)}v(this,pr,!0,"f"),this.noResults&&(b(this,ar,"m",Dr).call(this)?this.noResults.setAttribute("hidden",""):t?(this.noResults.setAttribute("hidden",""),this.list?.querySelector(".ActionListWrap")?.removeAttribute("hidden")):(this.list?.querySelector(".ActionListWrap")?.setAttribute("hidden",""),this.noResults.removeAttribute("hidden")))},Dr=function(){return!(!this.fragmentErrorElement||this.fragmentErrorElement.hasAttribute("hidden"))||!!this.bannerErrorElement&&!this.bannerErrorElement.hasAttribute("hidden")},Pr=function(t){let e=this.fragmentErrorElement;t===Xr.BODY&&this.fragmentErrorElement?(this.fragmentErrorElement.removeAttribute("hidden"),this.bannerErrorElement.setAttribute("hidden","")):(e=this.bannerErrorElement,this.bannerErrorElement?.removeAttribute("hidden"),this.fragmentErrorElement?.setAttribute("hidden","")),!e||e.hasAttribute("hidden")||this.liveRegion.announceFromElement(e,{politeness:"assertive"})},Or=function(){this.fragmentErrorElement?.setAttribute("hidden",""),this.bannerErrorElement.setAttribute("hidden","")},Nr=function(){if(this.open&&this.list){const t=this.visibleItems;if(t.length>0){const e="tab for results";this.liveRegion.announce(`${t.length} result${1===t.length?"":"s"} ${e}`)}else{const t=this.noResults;t&&this.liveRegion.announceFromElement(t)}}},Hr=function(){if(!this.list)return Gr.REMOTE;switch(this.list.getAttribute("data-fetch-strategy")){case"local":return Gr.LOCAL;case"eventually_local":return Gr.EVENTUALLY_LOCAL;default:return Gr.REMOTE}},Fr=function(){return this.filterInputTextField?.closest("primer-text-field")},Vr=function(){return b(this,ar,"a",Hr)===Gr.LOCAL||b(this,ar,"a",Hr)===Gr.EVENTUALLY_LOCAL},qr=function(t){t.preventDefault(),t.stopPropagation(),this.open?this.hide():this.show()},Rr=function(t,e){this.querySelector(".ActionListWrap").style.display="none";const n=new AbortController,{signal:i}=n,s=()=>{n.abort(),this.querySelector(".ActionListWrap").style.display="",this.open&&this.hide();const t=this.ownerDocument.activeElement,e=this.ownerDocument.activeElement===this.ownerDocument.body,i=this.contains(t);(e||i)&&setTimeout(()=>this.invokerElement?.focus(),0)};e.addEventListener("close",s,{signal:i}),e.addEventListener("cancel",s,{signal:i})},Wr=function(t){if("multiple"!==this.selectVariant&&setTimeout(()=>{this.open&&this.hide()}),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e=this.isItemChecked(t),n=!e;if(!this.dispatchEvent(new CustomEvent("beforeItemActivated",{bubbles:!0,cancelable:!0,detail:{item:t,checked:n,value:b(this,ar,"m",zr).call(this,t)?.getAttribute("data-value")}})))return;const i=b(this,ar,"m",zr).call(this,t);if("single"===this.selectVariant){if(i?.getAttribute("href"))return;if(!e){for(const t of this.items)b(this,ar,"m",zr).call(this,t)?.setAttribute(this.ariaSelectionType,"false");b(this,ur,"f").clear(),n&&(b(this,ar,"m",Ar).call(this,t),i?.setAttribute(this.ariaSelectionType,"true")),b(this,ar,"m",Br).call(this)}}else i?.setAttribute(this.ariaSelectionType,`${n}`),n?b(this,ar,"m",Ar).call(this,t):b(this,ar,"m",kr).call(this,t);b(this,ar,"m",$r).call(this),b(this,ar,"m",br).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t,checked:n,value:b(this,ar,"m",zr).call(this,t)?.getAttribute("data-value")}}))},Br=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,dr,b(this,dr,"f")||t.textContent||"","f");const e=this.querySelector(`[${this.ariaSelectionType}=true] .ActionListItem-label`)?.textContent||b(this,dr,"f");if(e){const n=document.createElement("span");n.classList.add("color-fg-muted");const i=document.createElement("span");n.textContent=`${this.dynamicLabelPrefix} `,i.textContent=e,t.replaceChildren(n,i),this.dynamicAriaLabelPrefix&&this.invokerElement?.setAttribute("aria-label",`${this.dynamicAriaLabelPrefix} ${e.trim()}`)}else t.textContent=b(this,dr,"f")},$r=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-select-panel-inputs=true] input")??this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),e.inputName&&(t.name=e.inputName),t.removeAttribute("disabled")):b(this,pr,"f")&&t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=!!this.querySelector("[data-select-panel-inputs=true]"),e=this.querySelector("[data-select-panel-inputs=true]")??this.querySelector("[data-list-inputs=true]");if(!e)return;const n=e.querySelectorAll("input");n.length>0&&v(this,hr,b(this,hr,"f")||n[0].name,"f");for(const n of this.selectedItems){const i=document.createElement("input");i.setAttribute(""+(t?"data-select-panel-input":"data-list-input"),"true"),i.type="hidden",i.autocomplete="off",i.name=n.inputName||b(this,hr,"f"),i.value=(n.value||n.label||"").trim(),e.append(i)}for(const t of n)t.remove()}},Ur=function(){return this.querySelector(Zr)?.parentElement||null},Kr=function(t){t&&t.setAttribute("hidden","hidden")},jr=function(t){t&&t.removeAttribute("hidden")},zr=function(t){return t.querySelector(".ActionListContent")},g([U],Qr.prototype,"includeFragment",void 0),g([U],Qr.prototype,"dialog",void 0),g([U],Qr.prototype,"filterInputTextField",void 0),g([U],Qr.prototype,"remoteInput",void 0),g([U],Qr.prototype,"list",void 0),g([U],Qr.prototype,"noResults",void 0),g([U],Qr.prototype,"fragmentErrorElement",void 0),g([U],Qr.prototype,"bannerErrorElement",void 0),g([U],Qr.prototype,"bodySpinner",void 0),g([U],Qr.prototype,"liveRegion",void 0),Qr=g([j],Qr),window.customElements.get("select-panel")||(window.SelectPanelElement=Qr,window.customElements.define("select-panel",Qr));let ta=class DetailsToggleElement extends HTMLElement{toggle(){if(this.detailsTarget.hasAttribute("open")){const t=this.summaryTarget.getAttribute("data-aria-label-closed");t&&this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","false")}else{const t=this.summaryTarget.getAttribute("data-aria-label-open");t&&this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","true")}}};function ea(t){kt(t,{bindKeys:gt.ArrowVertical|gt.ArrowHorizontal|gt.HomeAndEnd|gt.Backspace,getNextFocusable:(t,e,n)=>{if(e instanceof HTMLElement){try{if(e.closest("dialog:modal"))return}catch{}return function(t,e){switch(`${function(t){if("treeitem"!==t.getAttribute("role"))throw new Error("Element is not a treeitem");switch(t.getAttribute("aria-expanded")){case"true":return"open";case"false":return"closed";default:return"end"}}(t)} ${e.key}`){case"open ArrowRight":return function(t){const e=t.querySelector("[role=treeitem]");return e instanceof HTMLElement?e:void 0}(t);case"open ArrowLeft":case"closed ArrowRight":case"end ArrowRight":return;case"closed ArrowLeft":case"end ArrowLeft":return sa(t)}switch(e.key){case"ArrowUp":return na(t,"previous");case"ArrowDown":return na(t,"next");case"Backspace":return sa(t)}}(e,n)??e}},focusInStrategy:()=>{let e=t.querySelector("[aria-current]");e=e?.checkVisibility()?e:null;const n=t.querySelector('[role="treeitem"]');return e instanceof HTMLElement?e:document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&"treeitem"===document.activeElement.getAttribute("role")?document.activeElement:n instanceof HTMLElement?n:void 0}})}function na(t,e){const n=t.closest("[role=tree]");if(!n)return;const i=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,t=>t instanceof HTMLElement&&"treeitem"===t.getAttribute("role")?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP);let s=i.firstChild();for(;s!==t;)s=i.nextNode();let o="next"===e?i.nextNode():i.previousNode();for(;o instanceof HTMLElement&&ia(o,n);)o="next"===e?i.nextNode():i.previousNode();return o instanceof HTMLElement?o:void 0}function ia(t,e){for(const n of e.querySelectorAll("[role=treeitem][aria-expanded=false]"))if(t!==n&&n.closest("li")?.contains(t))return n;return null}function sa(t){const e=t.closest("[role=group]"),n=e?.closest("[role=treeitem]");return n instanceof HTMLElement?n:void 0}var oa,ra,aa,la,ca,da,ha,ua,fa,ma,pa,ga;g([U],ta.prototype,"detailsTarget",void 0),g([U],ta.prototype,"summaryTarget",void 0),ta=g([j],ta),window.DetailsToggleElement=ta;let ba=class TreeViewElement extends HTMLElement{constructor(){super(...arguments),oa.add(this),ra.set(this,void 0)}connectedCallback(){const{signal:t}=v(this,ra,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("focusin",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),ea(this),new MutationObserver(t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.querySelector("[aria-expanded=true]")&&b(this,oa,"m",aa).call(this,t)}).observe(this,{childList:!0,subtree:!0});new MutationObserver(t=>{if(!this.formInputContainer)return;if(!t.some(t=>t.target instanceof HTMLElement&&t.target.getAttribute("aria-checked")!==t.oldValue))return;const e=[];for(const t of this.querySelectorAll("[role=treeitem][aria-checked=true]")){const n=this.formInputPrototype.cloneNode();n.removeAttribute("data-target"),n.removeAttribute("form");const i={path:this.getNodePath(t)},s=this.getFormInputValueForNode(t);s&&(i.value=s),n.value=JSON.stringify(i),e.push(n)}this.formInputContainer.replaceChildren(...e)}).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]}),customElements.whenDefined("tree-view-sub-tree-node").then(()=>{b(this,oa,"m",aa).call(this,this)})}rootLeafNodes(){return this.querySelectorAll(":scope > ul > li > .TreeViewItemContainer [role=treeitem]")}rootSubTreeNodes(){return this.querySelectorAll(":scope > ul > tree-view-sub-tree-node")}disconnectedCallback(){b(this,ra,"f").abort()}handleEvent(t){const e=b(this,oa,"m",ca).call(this,t);e&&b(this,oa,"m",da).call(this,e,t)}handleSingleSelection(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if(!(e instanceof HTMLDivElement))return;const n=this.getNodePath(e),i=this.infoFromNode(e,"true");if(!this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:[i]})))return;!this.getNodeCheckedValue(e)||this.checkOnlyAtPath(n),this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,detail:[i]}))}getFormInputValueForNode(t){return t.getAttribute("data-value")}getNodePath(t){const e=t.getAttribute("data-path");return e?JSON.parse(e):[]}getNodeType(t){return t.getAttribute("data-node-type")}markCurrentAtPath(t){const e=JSON.stringify(t),n=this.querySelector(`[data-path="${CSS.escape(e)}"`);n&&(this.currentNode?.setAttribute("aria-current","false"),n.setAttribute("aria-current","true"))}get currentNode(){return this.querySelector("[aria-current=true]")}get activeNodes(){return document.querySelectorAll('[aria-checked="true"]')}expandAtPath(t){const e=this.subTreeAtPath(t);e&&e.expand()}collapseAtPath(t){const e=this.subTreeAtPath(t);e&&e.collapse()}toggleAtPath(t){const e=this.subTreeAtPath(t);e&&e.toggle()}checkAtPath(t){const e=this.nodeAtPath(t);e&&this.setNodeCheckedValue(e,"true")}uncheckAtPath(t){const e=this.nodeAtPath(t);e&&this.setNodeCheckedValue(e,"false")}checkOnlyAtPath(t){for(const t of this.activeNodes)this.uncheckAtPath(this.getNodePath(t));this.checkAtPath(t)}toggleCheckedAtPath(t){const e=this.nodeAtPath(t);e&&"leaf"===this.getNodeType(e)&&("true"===this.getNodeCheckedValue(e)?this.uncheckAtPath(t):this.checkAtPath(t))}checkedValueAtPath(t){const e=this.nodeAtPath(t);return e?this.getNodeCheckedValue(e):"false"}disabledValueAtPath(t){const e=this.nodeAtPath(t);return!!e&&this.getNodeDisabledValue(e)}nodeAtPath(t,e){const n=JSON.stringify(t);return this.querySelector(`${e||""}[data-path="${CSS.escape(n)}"]`)}subTreeAtPath(t){const e=this.nodeAtPath(t,"[data-node-type=sub-tree]");return e?e.closest("tree-view-sub-tree-node"):null}leafAtPath(t){return this.nodeAtPath(t,"[data-node-type=leaf]")}setNodeCheckedValue(t,e){t.setAttribute("aria-checked",e.toString())}getNodeCheckedValue(t){return t.getAttribute("aria-checked")||"false"}getNodeDisabledValue(t){return"true"===t.getAttribute("aria-disabled")}setNodeDisabledValue(t,e){e?t.setAttribute("aria-disabled","true"):t.removeAttribute("aria-disabled")}nodeHasCheckBox(t){return null!==t.querySelector(".TreeViewItemCheckbox")}nodeHasNativeAction(t){return t instanceof HTMLAnchorElement||t instanceof HTMLButtonElement}expandAncestorsForNode(t){const e=t.closest("tree-view-sub-tree-node");if(e)for(const t of e.eachAncestorSubTreeNode())t.expanded||t.expand()}changeSelectStrategy(t){for(const e of this.querySelectorAll("tree-view-sub-tree-node"))e.changeSelectStrategy(t)}infoFromNode(t,e){const n=this.getNodeType(t);if(!n)return null;const i=this.getNodeCheckedValue(t);return{node:t,type:n,path:this.getNodePath(t),checkedValue:e||i,previousCheckedValue:i}}selectVariant(t){return t.getAttribute("data-select-variant")||"none"}};var va,wa;ra=new WeakMap,oa=new WeakSet,aa=function(t){for(const e of t.querySelectorAll("[aria-expanded=true]"))this.expandAncestorsForNode(e)},la=function(t){return"click"===t.type},ca=function(t){const e=t.target,n=e.closest("[role=treeitem]");return n?e.closest(".TreeViewItemToggle")||e.closest(".TreeViewItemLeadingAction")?null:n:null},da=function(t,e){b(this,oa,"m",ha).call(this,e,t)?b(this,oa,"m",ua).call(this,e,t):b(this,oa,"m",fa).call(this,e,t)?this.handleSingleSelection(e,t):b(this,oa,"m",la).call(this,e)?b(this,oa,"m",ma).call(this,e,t):"focusin"===e.type?b(this,oa,"m",pa).call(this,t):e instanceof KeyboardEvent&&b(this,oa,"m",ga).call(this,e,t)},ha=function(t,e){return"click"===t.type&&this.nodeHasCheckBox(e)},ua=function(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if("leaf"!==this.getNodeType(e))return;const n="false"===this.getNodeCheckedValue(e)?"true":"false",i=this.infoFromNode(e,n);this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:[i]}))&&("true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.setNodeCheckedValue(e,"true"),this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,cancelable:!0,detail:[i]})))},fa=function(t,e){return"click"===t.type&&"single"===this.selectVariant(e)},ma=function(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if(!(e instanceof HTMLDivElement))return;const n=this.getNodePath(e);this.dispatchEvent(new CustomEvent("treeViewBeforeNodeActivated",{bubbles:!0,cancelable:!0,detail:this.infoFromNode(e)}))&&(this.nodeHasNativeAction(e)||this.toggleAtPath(n),this.dispatchEvent(new CustomEvent("treeViewNodeActivated",{bubbles:!0,detail:this.infoFromNode(e)})))},pa=function(t){const e=this.querySelector("[aria-selected=true]");e?.setAttribute("aria-selected","false"),t.setAttribute("aria-selected","true")},ga=function(t,e){if(e&&"leaf"===this.getNodeType(e))switch(t.key){case" ":case"Enter":if(this.getNodeDisabledValue(e)){t.preventDefault();break}"multiple"===this.selectVariant(e)?(t.preventDefault(),"true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.setNodeCheckedValue(e,"true")):"single"===this.selectVariant(e)?(t.preventDefault(),this.checkOnlyAtPath(this.getNodePath(e))):e instanceof HTMLAnchorElement&&e.click()}},g([U],ba.prototype,"formInputContainer",void 0),g([U],ba.prototype,"formInputPrototype",void 0),ba=g([j],ba),window.customElements.get("tree-view")||(window.TreeViewElement=ba,window.customElements.define("tree-view",ba));let ya=class TreeViewIconPairElement extends HTMLElement{constructor(){super(...arguments),va.add(this)}connectedCallback(){$e(this,()=>Boolean(this.collapsedIcon)&&Boolean(this.expandedIcon),()=>{this.expanded=this.collapsedIcon.hidden})}showExpanded(){this.expanded=!0,b(this,va,"m",wa).call(this)}showCollapsed(){this.expanded=!1,b(this,va,"m",wa).call(this)}toggle(){this.expanded=!this.expanded,b(this,va,"m",wa).call(this)}};var Ea,Aa,ka,La,Ta,Ca,Sa,xa,Ma,Ia,Da,Pa;va=new WeakSet,wa=function(){this.expanded?(this.expandedIcon.hidden=!1,this.collapsedIcon.hidden=!0):(this.expandedIcon.hidden=!0,this.collapsedIcon.hidden=!1)},g([U],ya.prototype,"expandedIcon",void 0),g([U],ya.prototype,"collapsedIcon",void 0),ya=g([j],ya),window.customElements.get("tree-view-icon-pair")||(window.TreeViewIconPairElement=ya,window.customElements.define("tree-view-icon-pair",ya));let Oa=class TreeViewSubTreeNodeElement extends HTMLElement{constructor(){super(...arguments),Ea.add(this),Aa.set(this,null),ka.set(this,"success"),La.set(this,void 0),Ta.set(this,!1)}connectedCallback(){$e(this,()=>Boolean(this.node)&&Boolean(this.subTree),()=>{b(this,Ea,"m",Da).call(this)});const{signal:t}=v(this,La,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),$e(this,()=>Boolean(this.includeFragment),()=>{this.includeFragment.addEventListener("loadstart",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("include-fragment-replace",this,{signal:t}),this.includeFragment.addEventListener("include-fragment-replaced",t=>{b(this,Ea,"m",Sa).call(this,t)},{signal:t})}),$e(this,()=>Boolean(this.retryButton),()=>{this.retryButton.addEventListener("click",t=>{b(this,Ea,"m",xa).call(this,t)},{signal:t})});new MutationObserver(()=>{if("mixed_descendants"!==this.selectStrategy)return;let t="unknown";for(const e of this.eachDirectDescendantNode())switch(`${t} ${e.getAttribute("aria-checked")||"false"}`){case"unknown mixed":case"false mixed":case"true mixed":case"false true":case"true false":t="mixed";break;case"unknown false":t="false";break;case"unknown true":t="true"}"unknown"!==t&&this.node?.getAttribute("aria-checked")!==t&&this.node?.setAttribute("aria-checked",t)}).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]})}get expanded(){return null===b(this,Aa,"f")&&v(this,Aa,"true"===this.node.getAttribute("aria-expanded"),"f"),b(this,Aa,"f")}set expanded(t){v(this,Aa,t,"f"),b(this,Ea,"m",Da).call(this)}get loadingState(){return b(this,ka,"f")}set loadingState(t){v(this,ka,t,"f"),b(this,Ea,"m",Da).call(this)}get selectStrategy(){return this.node.getAttribute("data-select-strategy")||"descendants"}get selectVariant(){return this.node.getAttribute("data-select-variant")||"none"}get level(){return parseInt(this.node.getAttribute("aria-level")||"0")}disconnectedCallback(){b(this,La,"f").abort()}handleEvent(t){t.target===this.toggleButton?b(this,Ea,"m",Ca).call(this,t):t.target===this.includeFragment?b(this,Ea,"m",Sa).call(this,t):t instanceof KeyboardEvent?b(this,Ea,"m",Ma).call(this,t):t.target.closest("[role=treeitem]")===this.node&&"click"===t.type&&b(this,Ea,"a",Pa)&&b(this,Ea,"m",Ia).call(this,t)}expand(){const t=this.expanded;this.expanded=!0,!t&&this.treeView&&this.treeView.dispatchEvent(new CustomEvent("treeViewNodeExpanded",{bubbles:!0,detail:this.treeView?.infoFromNode(this.node)}))}collapse(){const t=!this.expanded;if(this.expanded=!1,!t&&this.treeView){const t=this.subTree.querySelector("[tabindex='0']");t?.setAttribute("tabindex","-1"),this.node.setAttribute("tabindex","0"),this.treeView.dispatchEvent(new CustomEvent("treeViewNodeCollapsed",{bubbles:!0,detail:this.treeView?.infoFromNode(this.node)}))}}toggle(){this.expanded?this.collapse():this.expand()}get nodes(){return this.querySelectorAll(":scope > [role=treeitem]")}*eachDirectDescendantNode(){for(const t of this.subTree.querySelectorAll(":scope > li > .TreeViewItemContainer > [role=treeitem]"))yield t;for(const t of this.subTree.querySelectorAll(":scope > tree-view-sub-tree-node > li > .TreeViewItemContainer > [role=treeitem]"))yield t}*eachDirectDescendantSubTreeNode(){for(const t of this.subTree.querySelectorAll(":scope > tree-view-sub-tree-node"))yield t}*eachDescendantNode(){for(const t of this.subTree.querySelectorAll("[role=treeitem]"))yield t}*eachAncestorSubTreeNode(){if(!this.treeView)return;let t=this;for(;t&&this.treeView.contains(t);)yield t,t=t.parentElement?.closest("tree-view-sub-tree-node")}get isEmpty(){return 0===this.nodes.length}get treeView(){return this.closest("tree-view")}toggleChecked(){const t="false"===(this.treeView?.getNodeCheckedValue(this.node)||"false")?"true":"false",e=[],n=this.treeView?.infoFromNode(this.node,t);if(n&&e.push(n),"descendants"===this.selectStrategy||"mixed_descendants"===this.selectStrategy)for(const n of this.eachDescendantNode()){const i=this.treeView?.infoFromNode(n,t);i&&e.push(i)}if(this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:e}))){for(const n of e)n.node.setAttribute("aria-checked",t);this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,cancelable:!0,detail:e}))}}changeSelectStrategy(t){this.node.setAttribute("data-select-strategy",t)}};Aa=new WeakMap,ka=new WeakMap,La=new WeakMap,Ta=new WeakMap,Ea=new WeakSet,Ca=function(t){"click"===t.type&&(this.toggle(),t.stopPropagation())},Sa=function(t){switch(t.type){case"loadstart":this.loadingState="loading";break;case"error":this.loadingState="error";break;case"include-fragment-replace":v(this,Ta,document.activeElement===this.loadingIndicator.closest("[role=treeitem]"),"f"),this.loadingState="success";break;case"include-fragment-replaced":if(this.expanded=!0,b(this,Ta,"f")){const t=this.querySelector("[role=group] > :first-child");if(!t)return;const e=t.querySelector("[role=treeitem]");if(!e)return;e.focus()}v(this,Ta,!1,"f")}},xa=function(t){"click"===t.type&&(this.loadingState="loading",this.includeFragment.refetch())},Ma=function(t){const e=t.target.closest("[role=treeitem]");if(e&&"sub-tree"===this.treeView?.getNodeType(e))switch(t.key){case"Enter":if(this.treeView?.getNodeDisabledValue(e)){t.preventDefault();break}t.stopPropagation(),b(this,Ea,"a",Pa)?this.toggleChecked():"single"===this.selectVariant?this.treeView.handleSingleSelection(t,e):this.treeView?.nodeHasNativeAction(e)||this.toggle();break;case"ArrowRight":t.stopPropagation(),this.expand();break;case"ArrowLeft":t.stopPropagation(),this.collapse();break;case" ":if(this.treeView?.getNodeDisabledValue(e)){t.preventDefault();break}b(this,Ea,"a",Pa)?(t.stopPropagation(),t.preventDefault(),this.toggleChecked()):"single"===this.selectVariant?this.treeView.handleSingleSelection(t,e):e instanceof HTMLAnchorElement?e.click():this.treeView?.nodeHasNativeAction(e)||this.toggle()}},Ia=function(t){this.treeView?.getNodeDisabledValue(this.node)?t.preventDefault():"click"===t.type&&(this.toggleChecked(),t.stopPropagation())},Da=function(){switch(this.expanded?(this.subTree&&(this.subTree.hidden=!1),this.node.setAttribute("aria-expanded","true"),this.treeView?.expandAncestorsForNode(this),this.iconPair&&this.iconPair.showExpanded(),this.expandedToggleIcon&&this.collapsedToggleIcon&&(this.expandedToggleIcon.removeAttribute("hidden"),this.collapsedToggleIcon.setAttribute("hidden","hidden"))):(this.subTree&&(this.subTree.hidden=!0),this.node.setAttribute("aria-expanded","false"),this.iconPair&&this.iconPair.showCollapsed(),this.expandedToggleIcon&&this.collapsedToggleIcon&&(this.expandedToggleIcon.setAttribute("hidden","hidden"),this.collapsedToggleIcon.removeAttribute("hidden"))),this.loadingState){case"loading":this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!0),this.loadingIndicator&&(this.loadingIndicator.hidden=!1);break;case"error":this.loadingIndicator&&(this.loadingIndicator.hidden=!0),this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!1);break;default:this.loadingIndicator&&(this.loadingIndicator.hidden=!0),this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!0)}},Pa=function(){return this.querySelector(".TreeViewItemCheckbox")},g([U],Oa.prototype,"node",void 0),g([U],Oa.prototype,"subTree",void 0),g([U],Oa.prototype,"iconPair",void 0),g([U],Oa.prototype,"toggleButton",void 0),g([U],Oa.prototype,"expandedToggleIcon",void 0),g([U],Oa.prototype,"collapsedToggleIcon",void 0),g([U],Oa.prototype,"includeFragment",void 0),g([U],Oa.prototype,"loadingIndicator",void 0),g([U],Oa.prototype,"loadingFailureMessage",void 0),g([U],Oa.prototype,"retryButton",void 0),Oa=g([j],Oa),window.customElements.get("tree-view-sub-tree-node")||(window.TreeViewSubTreeNodeElement=Oa,window.customElements.define("tree-view-sub-tree-node",Oa));let Na=class TreeViewIncludeFragmentElement extends IncludeFragmentElement{request(){const t=super.request(),e=new URL(t.url);return e.searchParams.set("path",this.getAttribute("data-path")||""),new Request(e,{method:t.method,headers:t.headers,credentials:t.credentials})}};Na=g([j],Na),window.customElements.get("tree-view-include-fragment")||(window.TreeViewIncludeFragmentElement=Na,window.customElements.define("tree-view-include-fragment",Na));let Ha=class PageHeaderElement extends HTMLElement{menuItemClick(t){const e=t.currentTarget,n=e?.getAttribute("data-for");n&&document.getElementById(n)?.click()}};Ha=g([j],Ha),window.customElements.get("page-header")||(window.PageHeaderElement=Ha,window.customElements.define("page-header",Ha));let Fa=class ZenModeButtonElement extends HTMLElement{constructor(){super(),this.inZenMode=!1,document.addEventListener("fullscreenchange",this.fullscreenChangeEventHandler.bind(this))}disconnectedCallback(){document.removeEventListener("fullscreenchange",this.fullscreenChangeEventHandler.bind(this))}fullscreenChangeEventHandler(){this.changeButtonState(!this.inZenMode),this.dispatchZenModeStatus()}dispatchZenModeStatus(){const t=new CustomEvent("zenModeToggled",{detail:{active:this.inZenMode}});window.dispatchEvent(t)}deactivateZenMode(){document.exitFullscreen&&document.exitFullscreen()}activateZenMode(){document.documentElement.requestFullscreen&&document.documentElement.requestFullscreen()}changeButtonState(t){this.inZenMode=t,this.button.setAttribute("aria-pressed",t.toString())}performAction(){this.inZenMode?this.deactivateZenMode():this.activateZenMode()}};g([U],Fa.prototype,"button",void 0),Fa=g([j],Fa),window.customElements.get("zen-mode-button")||(window.ZenModeButtonElement=Fa,window.customElements.define("zen-mode-button",Fa));let Va=class SubHeaderElement extends HTMLElement{connectedCallback(){this.setupFilterInputClearButton()}setupFilterInputClearButton(){this.waitForCondition(()=>Boolean(this.filterInput),()=>{this.toggleFilterInputClearButton()})}toggleFilterInputClearButton(){this.filterInput.value.length>0?this.filterInput.classList.remove("SubHeader-filterInput_hiddenClearButton"):this.filterInput.classList.add("SubHeader-filterInput_hiddenClearButton")}expandFilterInput(){for(const t of this.hiddenItemsOnExpandedFilter)t.classList.add("d-none");for(const t of this.shownItemsOnExpandedFilter)t.classList.remove("d-none");this.classList.add("SubHeader--expandedSearch"),this.filterInput.focus()}collapseFilterInput(){for(const t of this.hiddenItemsOnExpandedFilter)t.classList.remove("d-none");for(const t of this.shownItemsOnExpandedFilter)t.classList.add("d-none");this.classList.remove("SubHeader--expandedSearch")}waitForCondition(t,e){if(t())e();else{const n=new MutationObserver(()=>{t()&&(e(),n.disconnect())});n.observe(this,{childList:!0,subtree:!0})}}};var qa,Ra;g([U],Va.prototype,"filterInput",void 0),g([K],Va.prototype,"hiddenItemsOnExpandedFilter",void 0),g([K],Va.prototype,"shownItemsOnExpandedFilter",void 0),Va=g([j],Va),window.customElements.get("sub-header")||(window.SubHeaderElement=Va,window.customElements.define("sub-header",Va));let Wa=class DangerDialogFormHelperElement extends HTMLElement{constructor(){super(...arguments),qa.add(this),this.confirmationLiveMessageChecked="",this.confirmationLiveMessageUnchecked=""}get form(){return this.querySelector("form")}get submitButton(){return this.querySelector("input[type=submit],button[type=submit],button[data-submit-dialog-id]")}connectedCallback(){this.style.display="contents",this.form&&(this.form.style.display="contents"),b(this,qa,"m",Ra).call(this)}toggle(){if(!this.checkbox||!this.submitButton)return;const t=this.checkbox.checked;if(this.submitButton.disabled=!t,this.liveRegion){const e=t?this.confirmationLiveMessageChecked:this.confirmationLiveMessageUnchecked;this.liveRegion.announce(e,{politeness:"assertive"})}}};qa=new WeakSet,Ra=function(){this.toggle()},g([U],Wa.prototype,"checkbox",void 0),g([U],Wa.prototype,"liveRegion",void 0),g([I],Wa.prototype,"confirmationLiveMessageChecked",void 0),g([I],Wa.prototype,"confirmationLiveMessageUnchecked",void 0),Wa=g([j],Wa),window.customElements.get("danger-dialog-form-helper")||(window.DangerDialogFormHelperElement=Wa,window.customElements.define("danger-dialog-form-helper",Wa));class CollapsibleElement extends HTMLElement{constructor(){super(...arguments),this.collapsed=!1}toggleViaKeyboard(t){"Enter"!==t.code&&"Space"!==t.code||(t.preventDefault(),this.toggle())}toggle(){this.collapsed=!this.collapsed}attributeChangedCallback(t){"data-collapsed"===t&&(this.collapsed?this.hideAll():this.expandAll())}hideAll(){this.arrowDown?.removeAttribute("hidden"),this.arrowUp?.setAttribute("hidden",""),this.triggerElement.setAttribute("aria-expanded","false");for(const t of this.collapsibleElements)t.hidden=!0;this.classList.add(`${this.baseClass}--collapsed`)}expandAll(){this.arrowUp?.removeAttribute("hidden"),this.arrowDown?.setAttribute("hidden",""),this.triggerElement.setAttribute("aria-expanded","true");for(const t of this.collapsibleElements)t.hidden=!1;this.classList.remove(`${this.baseClass}--collapsed`)}}g([U],CollapsibleElement.prototype,"arrowDown",void 0),g([U],CollapsibleElement.prototype,"arrowUp",void 0),g([U],CollapsibleElement.prototype,"triggerElement",void 0),g([K],CollapsibleElement.prototype,"collapsibleElements",void 0),g([I],CollapsibleElement.prototype,"collapsed",void 0);let Ba=class CollapsibleHeaderElement extends CollapsibleElement{connectedCallback(){if(!this.closest(".Box"))throw new Error("No surrounding BorderBox found")}get baseClass(){return"CollapsibleHeader"}};Ba=g([j],Ba);let $a=class CollapsibleSectionElement extends CollapsibleElement{get baseClass(){return"CollapsibleSection"}};var Ua,Ka,ja,za,_a,Ya,Za,Ga,Xa,Ja,Qa,tl,el,nl,il,sl,ol;$a=g([j],$a);let rl=class FilterableTreeViewElement extends HTMLElement{constructor(){super(...arguments),Ua.add(this),Ka.set(this,void 0),ja.set(this,void 0),za.set(this,new Map)}connectedCallback(){const{signal:t}=v(this,ja,new AbortController,"f");this.addEventListener("treeViewNodeChecked",this,{signal:t}),this.addEventListener("itemActivated",this,{signal:t}),this.addEventListener("input",this,{signal:t})}disconnectedCallback(){b(this,ja,"f").abort()}handleEvent(t){t.target===this.filterModeControl?b(this,Ua,"m",Ga).call(this,t):t.target===this.filterInput?b(this,Ua,"m",Xa).call(this,t):t.target===this.includeSubItemsCheckBox?b(this,Ua,"m",Ja).call(this,t):(t.target instanceof ba||t.target instanceof Oa)&&b(this,Ua,"m",_a).call(this,t)}get filterModeControl(){return this.filterModeControlList.closest("segmented-control")}get treeView(){return this.treeViewList.closest("tree-view")}set filterFn(t){v(this,Ka,t,"f")}get filterFn(){return b(this,Ka,"f")?b(this,Ka,"f"):this.defaultFilterFn}defaultFilterFn(t,e,n){const i=[];if(e.length>0){const n=e.toLowerCase(),s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let o=s.nextNode();for(;o;){const t=o.textContent?.toLocaleLowerCase()||"";let e=0;for(;e<t.length;){const s=t.indexOf(n,e);if(-1===s)break;const r=new Range;r.setStart(o,s),r.setEnd(o,s+n.length),i.push(r),e=s+n.length}o=s.nextNode()}}if(0===i.length&&e.length>0)return null;switch(n){case"selected":if("false"!==this.treeView?.getNodeCheckedValue(t))return i;break;case"all":return i}return null}get filterMode(){const t=this.filterModeControl?.current;return t?t.getAttribute("data-name"):null}get queryString(){return this.filterInput.value}*eachDescendantDepthFirst(t,e,n){for(const i of t.querySelectorAll(`[role=treeitem][data-node-type='sub-tree'][aria-level='${e}']`)){const t=i.closest("tree-view-sub-tree-node");yield*this.eachDescendantDepthFirst(t,e+1,[...n,t])}const i=t.querySelectorAll(`[role=treeitem][data-node-type='leaf'][aria-level='${e}']`);yield[i,n]}*eachShallowestCheckedSubTree(t){if("true"!==this.treeView?.getNodeCheckedValue(t.node))for(const e of t.eachDirectDescendantSubTreeNode())yield*this.eachShallowestCheckedSubTree(e);else yield t}};Ka=new WeakMap,ja=new WeakMap,za=new WeakMap,Ua=new WeakSet,_a=function(t){const e=t;if("treeViewNodeChecked"===t.type)b(this,Ua,"m",Ya).call(this,e)},Ya=function(t){if(!this.treeView)return;if(!this.includeSubItemsCheckBox.checked)return;const e=t.detail[0];if("sub-tree"!==this.treeView.getNodeType(e.node))return;const n=e.node.closest("tree-view-sub-tree-node");"false"===e.checkedValue?b(this,Ua,"m",Za).call(this,n):b(this,Ua,"m",tl).call(this,n)},Za=function(t){if(!this.treeView)return;if(!b(this,za,"f").has(t))return;const e=b(this,za,"f").get(t);for(const[t,n]of e.entries()){let e=t;t instanceof Oa&&(e=t.node),this.treeView.setNodeCheckedValue(e,n.checked?"true":"false"),this.treeView.setNodeDisabledValue(e,n.disabled)}b(this,za,"f").delete(t)},Ga=function(t){"itemActivated"===t.type&&b(this,Ua,"m",nl).call(this)},Xa=function(t){"input"===t.type&&b(this,Ua,"m",nl).call(this)},Ja=function(t){this.treeView&&"input"===t.type&&(b(this,Ua,"m",nl).call(this),this.includeSubItemsCheckBox.checked?b(this,Ua,"m",Qa).call(this):b(this,Ua,"m",el).call(this))},Qa=function(){if(this.treeView)for(const t of this.treeView.rootSubTreeNodes())for(const e of this.eachShallowestCheckedSubTree(t))b(this,Ua,"m",tl).call(this,e)},tl=function(t){if(!this.treeView)return;const e=new Map;for(const n of t.eachDescendantNode())e.set(n,{checked:"true"===this.treeView.getNodeCheckedValue(n),disabled:this.treeView.getNodeDisabledValue(n)}),this.treeView.setNodeCheckedValue(n,"true"),this.treeView.setNodeDisabledValue(n,!0);b(this,za,"f").set(t,e)},el=function(){for(const t of b(this,za,"f").keys())b(this,Ua,"m",Za).call(this,t)},nl=function(){if(!this.treeView)return;b(this,Ua,"m",ol).call(this);const t=this.queryString,e=this.filterMode||void 0,n=window.crypto.randomUUID(),i=new Map,s=(...i)=>{for(const s of i)s.expand(),s.removeAttribute("hidden"),s.setAttribute("data-generation",n),o(s.node,t,e)?s.node.removeAttribute("aria-disabled"):s.node.setAttribute("aria-disabled","true")},o=(t,e,n)=>(i.has(t)||i.set(t,this.filterFn(t,e,n)),null!==i.get(t));for(const[i,r]of this.eachDescendantDepthFirst(this.treeViewList,1,[])){const a=r[r.length-1];let l=!1;for(const n of i)o(n,t,e)?(n.closest("li")?.removeAttribute("hidden"),l=!0):n.closest("li")?.setAttribute("hidden","hidden");l?s(...r):a&&(o(a.node,t,e)?s(...r):a.getAttribute("data-generation")!==n&&(a.collapse(),a.setAttribute("hidden","hidden")))}const r=Array.from(i.values()).flat().filter(t=>null!==t);0===r.length&&t.length>0?(this.treeViewList.setAttribute("hidden","hidden"),this.noResultsMessage.removeAttribute("hidden")):(this.treeViewList.removeAttribute("hidden"),this.noResultsMessage.setAttribute("hidden","hidden"),b(this,Ua,"m",il).call(this,r))},il=function(t){CSS.highlights?CSS.highlights.set("primer-filterable-tree-view-search-results",new Highlight(...t)):b(this,Ua,"m",sl).call(this,t)},sl=function(t){const e=t[0].startContainer,n=e.parentNode,i=e.textContent,s=[];let o=0;for(const{startOffset:e,endOffset:n}of t){e>o&&s.push(document.createTextNode(i.slice(o,e)));const t=document.createElement("mark");t.textContent=i.slice(e,n),s.push(t),o=n}o<i.length&&s.push(document.createTextNode(i.slice(o)));for(const t of s.reverse())n.insertBefore(t,e.nextSibling);n.removeChild(e)},ol=function(){for(const t of this.querySelectorAll("mark"))t.parentElement&&t.parentElement.replaceChildren(t.parentElement.textContent)},g([U],rl.prototype,"filterInput",void 0),g([U],rl.prototype,"filterModeControlList",void 0),g([U],rl.prototype,"treeViewList",void 0),g([U],rl.prototype,"noResultsMessage",void 0),g([U],rl.prototype,"includeSubItemsCheckBox",void 0),rl=g([j],rl),window.customElements.get("filterable-tree-view")||(window.FilterableTreeViewElement=rl,window.customElements.define("filterable-tree-view",rl))}();
1
+ !function(){"use strict";var t,e,n,i,s,o,r,a,l=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},c=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};const d=new WeakMap;let h=null;class IncludeFragmentElement extends HTMLElement{constructor(){super(...arguments),t.add(this),e.set(this,!1),n.set(this,new IntersectionObserver(e=>{for(const s of e)if(s.isIntersecting){const{target:e}=s;if(l(this,n,"f").unobserve(e),!(e instanceof IncludeFragmentElement))return;"lazy"===e.loading&&l(this,t,"m",i).call(this)}},{rootMargin:"0px 0px 256px 0px",threshold:.01}))}static define(t="include-fragment",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){h=null===t?t:Promise.resolve(t)}static get observedAttributes(){return["src","loading"]}get src(){const t=this.getAttribute("src");if(t){const e=this.ownerDocument.createElement("a");return e.href=t,e.href}return""}set src(t){this.setAttribute("src",t)}get loading(){return"lazy"===this.getAttribute("loading")?"lazy":"eager"}set loading(t){this.setAttribute("loading",t)}get accept(){return this.getAttribute("accept")||""}set accept(t){this.setAttribute("accept",t)}get data(){return l(this,t,"m",o).call(this)}attributeChangedCallback(e,n){"src"===e?this.isConnected&&"eager"===this.loading&&l(this,t,"m",i).call(this):"loading"===e&&this.isConnected&&"eager"!==n&&"eager"===this.loading&&l(this,t,"m",i).call(this)}connectedCallback(){if(!this.shadowRoot){this.attachShadow({mode:"open"});const t=document.createElement("style");t.textContent=":host {display: block;}",this.shadowRoot.append(t,document.createElement("slot"))}this.src&&"eager"===this.loading&&l(this,t,"m",i).call(this),"lazy"===this.loading&&l(this,n,"f").observe(this)}request(){const t=this.src;if(!t)throw new Error("missing src");return new Request(t,{method:"GET",credentials:"same-origin",headers:{Accept:this.accept||"text/html"}})}load(){return l(this,t,"m",o).call(this)}fetch(t){return fetch(t)}refetch(){d.delete(this),l(this,t,"m",i).call(this)}}e=new WeakMap,n=new WeakMap,t=new WeakSet,i=async function(){if(!l(this,e,"f")){c(this,e,!0,"f"),l(this,n,"f").unobserve(this);try{const n=await l(this,t,"m",s).call(this);if(n instanceof Error)throw n;const i=n,o=document.createElement("template");o.innerHTML=i;const r=document.importNode(o.content,!0);if(!this.dispatchEvent(new CustomEvent("include-fragment-replace",{cancelable:!0,detail:{fragment:r}})))return void c(this,e,!1,"f");this.replaceWith(r),this.dispatchEvent(new CustomEvent("include-fragment-replaced"))}catch(t){this.classList.add("is-error")}finally{c(this,e,!1,"f")}}},s=async function(){const e=this.src,n=d.get(this);if(n&&n.src===e)return n.data;{let n;return n=e?l(this,t,"m",a).call(this):Promise.reject(new Error("missing src")),d.set(this,{src:e,data:n}),n}},o=async function(){const e=await l(this,t,"m",s).call(this);if(e instanceof Error)throw e;return e.toString()},r=async function(t,e){await new Promise(t=>setTimeout(t,0));for(const n of t)this.dispatchEvent(e?new CustomEvent(n,{detail:{error:e}}):new Event(n))},a=async function(){try{await l(this,t,"m",r).call(this,["loadstart"]);const n=await this.fetch(this.request()),i=n.headers.get("Content-Type");if(!(e=this.accept,e&&e.split(",").find(t=>t.match(/^\s*\*\/\*/))||i&&i.includes(this.accept?this.accept:"text/html")))throw new Error(`Failed to load resource: expected ${this.accept||"text/html"} but was ${i}`);if(200!==n.status)throw new Error(`Failed to load resource: the server responded with a status of ${n.status}`);const s=await n.text();let o=s;if(h){o=(await h).createHTML(s,n)}return l(this,t,"m",r).call(this,["load","loadend"]),o}catch(e){throw l(this,t,"m",r).call(this,["error","loadend"],e),e}var e};const u="undefined"!=typeof globalThis?globalThis:window;try{u.IncludeFragmentElement=IncludeFragmentElement.define()}catch(t){if(!(u.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}const f=new WeakMap;class RemoteInputElement extends HTMLElement{constructor(){super();const t=m.bind(null,this,!0),e={currentQuery:null,oninput:p(e=>t(e)),fetch:t,controller:null};f.set(this,e)}static get observedAttributes(){return["src"]}attributeChangedCallback(t,e){e&&"src"===t&&m(this,!1)}connectedCallback(){const t=this.input;if(!t)return;t.setAttribute("autocomplete","off"),t.setAttribute("spellcheck","false");const e=f.get(this);e&&(t.addEventListener("focus",e.fetch),t.addEventListener("change",e.fetch),t.addEventListener("input",e.oninput))}disconnectedCallback(){const t=this.input;if(!t)return;const e=f.get(this);e&&(t.removeEventListener("focus",e.fetch),t.removeEventListener("change",e.fetch),t.removeEventListener("input",e.oninput))}get input(){const t=this.querySelector("input, textarea");return t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement?t:null}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}}async function m(t,e,n){const i=t.input;if(!i)return;const s=f.get(t);if(!s)return;const o=i.value;if(e&&s.currentQuery===o)return;s.currentQuery=o;const r=t.src;if(!r)return;const a=document.getElementById(t.getAttribute("aria-owns")||"");if(!a)return;const l=new URL(r,window.location.href),c=new URLSearchParams(l.search);let d;c.append(t.getAttribute("param")||"q",o),l.search=c.toString(),s.controller?s.controller.abort():(t.dispatchEvent(new CustomEvent("loadstart")),t.setAttribute("loading","")),s.controller="AbortController"in window?new AbortController:{signal:null,abort(){}};let h="";try{d=await async function(t,e,n){try{const i=await fetch(e,n);return t.dispatchEvent(new CustomEvent("load")),t.dispatchEvent(new CustomEvent("loadend")),i}catch(e){throw e instanceof Error&&"AbortError"!==(null==e?void 0:e.name)&&(t.dispatchEvent(new CustomEvent("error")),t.dispatchEvent(new CustomEvent("loadend"))),e}}(t,l.toString(),{signal:s.controller.signal,credentials:"same-origin",headers:{accept:"text/fragment+html"}}),h=await d.text(),t.removeAttribute("loading"),s.controller=null}catch(e){return void(e instanceof Error&&"AbortError"!==e.name&&(t.removeAttribute("loading"),s.controller=null))}d&&d.ok?(a.innerHTML=h,t.dispatchEvent(new CustomEvent("remote-input-success",{bubbles:!0,detail:{eventType:n?n.type:void 0}}))):t.dispatchEvent(new CustomEvent("remote-input-error",{bubbles:!0}))}function p(t){let e;return function(n){clearTimeout(e),e=setTimeout(()=>{clearTimeout(e),t(n)},300)}}function g(t,e,n,i){var s,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,n,r):s(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r}function b(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)}function v(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n}window.customElements.get("remote-input")||(window.RemoteInputElement=RemoteInputElement,window.customElements.define("remote-input",RemoteInputElement)),"function"==typeof SuppressedError&&SuppressedError;const w=new WeakSet;function y(t){k(t),A(t)}const E=new WeakMap;function A(t=document){if(E.has(t))return E.get(t);let e=!1;const n=new MutationObserver(t=>{for(const e of t)if("attributes"===e.type&&e.target instanceof Element)C(e.target);else if("childList"===e.type&&e.addedNodes.length)for(const t of e.addedNodes)t instanceof Element&&k(t)});n.observe(t,{childList:!0,subtree:!0,attributeFilter:["data-action"]});const i={get closed(){return e},unsubscribe(){e=!0,E.delete(t),n.disconnect()}};return E.set(t,i),i}function k(t){for(const e of t.querySelectorAll("[data-action]"))C(e);t instanceof Element&&t.hasAttribute("data-action")&&C(t)}function L(t){const e=t.currentTarget;for(const n of T(e))if(t.type===n.type){const i=e.closest(n.tag);w.has(i)&&"function"==typeof i[n.method]&&i[n.method](t);const s=e.getRootNode();if(s instanceof ShadowRoot&&w.has(s.host)&&s.host.matches(n.tag)){const e=s.host;"function"==typeof e[n.method]&&e[n.method](t)}}}function*T(t){for(const e of(t.getAttribute("data-action")||"").trim().split(/\s+/)){const t=e.lastIndexOf(":"),n=Math.max(0,e.lastIndexOf("#"))||e.length;yield{type:e.slice(0,t),tag:e.slice(t+1,n),method:e.slice(n+1)||"handleEvent"}||"handleEvent"}}function C(t){for(const e of T(t))t.addEventListener(e.type,L)}const S=t=>String("symbol"==typeof t?t.description:t).replace(/([A-Z]($|[a-z]))/g,"-$1").replace(/--/g,"-").replace(/^-|-$/,"").toLowerCase(),x=(t,e="property")=>{const n=S(t);if(!n.includes("-"))throw new DOMException(`${e}: ${String(t)} is not a valid ${e} name`,"SyntaxError");return n};const M="attr";function I(t,e){$(t,M).add(e)}const D=new WeakSet;function P(t,e){if(D.has(t))return;D.add(t);const n=Object.getPrototypeOf(t),i=n?.constructor?.attrPrefix??"data-";e||(e=$(n,M));for(const n of e){const e=t[n],s=x(`${i}${n}`);let o={configurable:!0,get(){return this.getAttribute(s)||""},set(t){this.setAttribute(s,t||"")}};"number"==typeof e?o={configurable:!0,get(){return Number(this.getAttribute(s)||0)},set(t){this.setAttribute(s,t)}}:"boolean"==typeof e&&(o={configurable:!0,get(){return this.hasAttribute(s)},set(t){this.toggleAttribute(s,t)}}),Object.defineProperty(t,n,o),n in t&&!t.hasAttribute(s)&&o.set.call(t,e)}}const N=new Map,O=new Promise(t=>{"loading"!==document.readyState?t():document.addEventListener("readystatechange",()=>t(),{once:!0})}),H=new Promise(t=>{const e=new AbortController;e.signal.addEventListener("abort",()=>t());const n={once:!0,passive:!0,signal:e.signal},i=()=>e.abort();document.addEventListener("mousedown",i,n),document.addEventListener("touchstart",i,n),document.addEventListener("keydown",i,n),document.addEventListener("pointerdown",i,n)}),F={ready:()=>O,firstInteraction:()=>H,visible:t=>new Promise(e=>{const n=new IntersectionObserver(t=>{for(const i of t)if(i.isIntersecting)return e(),void n.disconnect()},{rootMargin:"0px 0px 256px 0px",threshold:.01});for(const e of document.querySelectorAll(t))n.observe(e)})},V=new WeakMap;function q(t){cancelAnimationFrame(V.get(t)||0),V.set(t,requestAnimationFrame(()=>{for(const e of N.keys()){const n=t instanceof Element&&t.matches(e)?t:t.querySelector(e);if(customElements.get(e)||n){const i=n?.getAttribute("data-load-on")||"ready",s=i in F?F[i]:F.ready;for(const t of N.get(e)||[])s(e).then(t);N.delete(e),V.delete(t)}}}))}let R;const W=Symbol.for("catalyst");class B{constructor(t){const e=this,n=t.prototype.connectedCallback;t.prototype.connectedCallback=function(){e.connectedCallback(this,n)};const i=t.prototype.disconnectedCallback;t.prototype.disconnectedCallback=function(){e.disconnectedCallback(this,i)};const s=t.prototype.attributeChangedCallback;t.prototype.attributeChangedCallback=function(t,n,i){e.attributeChangedCallback(this,t,n,i,s)};let o=t.observedAttributes||[];Object.defineProperty(t,"observedAttributes",{configurable:!0,get(){return e.observedAttributes(this,o)},set(t){o=t}}),function(t){let e=t.observedAttributes||[];const n=t.attrPrefix??"data-",i=t=>x(`${n}${t}`);Object.defineProperty(t,"observedAttributes",{configurable:!0,get:()=>[...$(t.prototype,M)].map(i).concat(e),set(t){e=t}})}(t),function(t){const e=S(t.name).replace(/-element$/,"");try{window.customElements.define(e,t),window[t.name]=customElements.get(e)}catch(t){if(!(t instanceof DOMException&&"NotSupportedError"===t.name))throw t}}(t)}observedAttributes(t,e){return e}connectedCallback(t,e){t.toggleAttribute("data-catalyst",!0),customElements.upgrade(t),function(t){for(const e of t.querySelectorAll("template[data-shadowroot]"))e.parentElement===t&&t.attachShadow({mode:"closed"===e.getAttribute("data-shadowroot")?"closed":"open"}).append(e.content.cloneNode(!0))}(t),P(t),function(t){w.add(t),t.shadowRoot&&y(t.shadowRoot),k(t),A(t.ownerDocument)}(t),e?.call(t),t.shadowRoot&&(y(t.shadowRoot),function(t){R||(R=new MutationObserver(t=>{if(N.size)for(const e of t)for(const t of e.addedNodes)t instanceof Element&&q(t)})),q(t),R.observe(t,{subtree:!0,childList:!0})}(t.shadowRoot))}disconnectedCallback(t,e){e?.call(t)}attributeChangedCallback(t,e,n,i,s){P(t),"data-catalyst"!==e&&s&&s.call(t,e,n,i)}}function $(t,e){if(!Object.prototype.hasOwnProperty.call(t,W)){const e=t[W],n=t[W]=new Map;if(e)for(const[t,i]of e)n.set(t,new Set(i))}const n=t[W];return n.has(e)||n.set(e,new Set),n.get(e)}function U(t,e){$(t,"target").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase();if(t.shadowRoot)for(const i of t.shadowRoot.querySelectorAll(`[data-target~="${n}.${e}"]`))if(!i.closest(n))return i;for(const i of t.querySelectorAll(`[data-target~="${n}.${e}"]`))if(i.closest(n)===t)return i}(this,e)}})}function K(t,e){$(t,"targets").add(e),Object.defineProperty(t,e,{configurable:!0,get(){return function(t,e){const n=t.tagName.toLowerCase(),i=[];if(t.shadowRoot)for(const s of t.shadowRoot.querySelectorAll(`[data-targets~="${n}.${e}"]`))s.closest(n)||i.push(s);for(const s of t.querySelectorAll(`[data-targets~="${n}.${e}"]`))s.closest(n)===t&&i.push(s);return i}(this,e)}})}function j(t){new B(t)}var z;class Z{constructor(t){this.resizeObserver=new ResizeObserver(t=>{for(const e of t){const t=e.target;t instanceof HTMLElement&&this.update(t)}}),this.resizeObserver.observe(t)}unobserve(t){this.resizeObserver.unobserve(t)}update(t){const e=t.querySelectorAll("li");for(const t of e){const e=t.querySelector(".ActionListItem-label");if(!e)continue;const n=t.querySelector(".ActionListItem-truncationTooltip");if(!n)continue;const i=e.scrollWidth>e.clientWidth;n.style.display=i?"":"none"}}}let _=class ActionListElement extends HTMLElement{constructor(){super(...arguments),z.set(this,void 0)}connectedCallback(){v(this,z,new Z(this),"f")}disconnectedCallback(){b(this,z,"f").unobserve(this)}};z=new WeakMap,_=g([j],_);const Y={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]},G={start:["end","center"],end:["start","center"],center:["end","start"]};function X(t,e,n={}){const i=function(t){if(function(t){var e;if("DIALOG"===t.tagName)return!0;try{if(t.matches(":popover-open")&&/native code/.test(null===(e=document.body.showPopover)||void 0===e?void 0:e.toString()))return!0}catch(t){return!1}return!1}(t))return document.body;let e=t.parentNode;for(;null!==e;){if(e instanceof HTMLElement&&"static"!==getComputedStyle(e).position)return e;e=e.parentNode}return document.body}(t),s=function(t){let e=t;for(;null!==e&&e instanceof Element;){if("visible"!==getComputedStyle(e).overflow)break;e=e.parentNode}const n=e!==document.body&&e instanceof HTMLElement?e:document.body,i=n.getBoundingClientRect(),s=getComputedStyle(n),[o,r,a,l]=[s.borderTopWidth,s.borderLeftWidth,s.borderRightWidth,s.borderBottomWidth].map(t=>parseInt(t,10)||0);return{top:i.top+o,left:i.left+r,width:i.width-a-r,height:Math.max(i.height-o-l,n===document.body?window.innerHeight:-1/0)}}(i),o=getComputedStyle(i),r=i.getBoundingClientRect(),[a,l]=[o.borderTopWidth,o.borderLeftWidth].map(t=>parseInt(t,10)||0);return function(t,e,n,i,{side:s,align:o,allowOutOfBounds:r,anchorOffset:a,alignmentOffset:l}){const c={top:t.top-e.top,left:t.left-e.left,width:t.width,height:t.height};let d=Q(n,i,s,o,a,l),h=s,u=o;if(d.top-=e.top,d.left-=e.left,!r){const r=Y[s];let f=0;if(r){let t=s;for(;f<r.length&&tt(t,d,c,n);){const s=r[f++];t=s,d=Q(n,i,s,o,a,l),d.top-=e.top,d.left-=e.left,h=s}}const m=G[o];let p=0;if(m){let t=o;for(;p<m.length&&et(t,d,c,n);){const s=m[p++];t=s,d=Q(n,i,h,s,a,l),d.top-=e.top,d.left-=e.left,u=s}}d.top<c.top&&(d.top=c.top),d.left<c.left&&(d.left=c.left),d.left+n.width>t.width+c.left&&(d.left=t.width+c.left-n.width),r&&f<r.length&&d.top+n.height>t.height+c.top&&(d.top=Math.max(t.height+c.top-n.height,0))}return Object.assign(Object.assign({},d),{anchorSide:h,anchorAlign:u})}(s,{top:r.top+a,left:r.left+l},t.getBoundingClientRect(),e instanceof Element?e.getBoundingClientRect():e,function(t={}){var e,n,i,s,o;const r=null!==(e=t.side)&&void 0!==e?e:J.side,a=null!==(n=t.align)&&void 0!==n?n:J.align;return{side:r,align:a,anchorOffset:null!==(i=t.anchorOffset)&&void 0!==i?i:"inside-center"===r?0:J.anchorOffset,alignmentOffset:null!==(s=t.alignmentOffset)&&void 0!==s?s:"center"!==a&&r.startsWith("inside")?J.alignmentOffset:0,allowOutOfBounds:null!==(o=t.allowOutOfBounds)&&void 0!==o?o:J.allowOutOfBounds}}(n))}const J={side:"outside-bottom",align:"start",anchorOffset:4,alignmentOffset:4,allowOutOfBounds:!1};function Q(t,e,n,i,s,o){const r=e.left+e.width,a=e.top+e.height;let l=-1,c=-1;return"outside-top"===n?l=e.top-s-t.height:"outside-bottom"===n?l=a+s:"outside-left"===n?c=e.left-s-t.width:"outside-right"===n&&(c=r+s),"outside-top"!==n&&"outside-bottom"!==n||(c="start"===i?e.left+o:"center"===i?e.left-(t.width-e.width)/2+o:r-t.width-o),"outside-left"!==n&&"outside-right"!==n||(l="start"===i?e.top+o:"center"===i?e.top-(t.height-e.height)/2+o:a-t.height-o),"inside-top"===n?l=e.top+s:"inside-bottom"===n?l=a-s-t.height:"inside-left"===n?c=e.left+s:"inside-right"===n?c=r-s-t.width:"inside-center"===n&&(c=(r+e.left)/2-t.width/2+s),"inside-top"===n||"inside-bottom"===n?c="start"===i?e.left+o:"center"===i?e.left-(t.width-e.width)/2+o:r-t.width-o:"inside-left"!==n&&"inside-right"!==n&&"inside-center"!==n||(l="start"===i?e.top+o:"center"===i?e.top-(t.height-e.height)/2+o:a-t.height-o),{top:l,left:c}}function tt(t,e,n,i){return"outside-top"===t||"outside-bottom"===t?e.top<n.top||e.top+i.height>n.height+n.top:e.left<n.left||e.left+i.width>n.width+n.left}function et(t,e,n,i){return"end"===t?e.left<n.left:"start"===t||"center"===t?e.left+i.width>n.left+n.width||e.left<n.left:void 0}function*nt(t,e={}){var n,i;const s=null!==(n=e.strict)&&void 0!==n&&n,o=null!==(i=e.onlyTabbable)&&void 0!==i&&i?ot:st,r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:t=>t instanceof HTMLElement&&o(t,s)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let a=null;if(!e.reverse&&o(t,s)&&(yield t),e.reverse){let t=r.lastChild();for(;t;)a=t,t=r.lastChild()}else a=r.firstChild();for(;a instanceof HTMLElement;)yield a,a=e.reverse?r.previousNode():r.nextNode();e.reverse&&o(t,s)&&(yield t)}function it(t,e=!1){return nt(t,{reverse:e,strict:!0,onlyTabbable:!0}).next().value}function st(t,e=!1){const n=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(t.tagName)&&t.disabled,i=t.hidden,s=t instanceof HTMLInputElement&&"hidden"===t.type,o=t.classList.contains("sentinel");if(n||i||s||o)return!1;if(e){const e=getComputedStyle(t),n=0===t.offsetWidth||0===t.offsetHeight,i=["hidden","collapse"].includes(e.visibility),s="none"===e.display||!t.offsetParent,o=0===t.getClientRects().length;if(n||i||o||s)return!1}return null!=t.getAttribute("tabindex")||("true"===t.getAttribute("contenteditable")||"plaintext-only"===t.getAttribute("contenteditable")||!(t instanceof HTMLAnchorElement&&null==t.getAttribute("href"))&&-1!==t.tabIndex)}function ot(t,e=!1){return st(t,e)&&"-1"!==t.getAttribute("tabindex")}let rt=!1;function at(){}try{const t=Object.create({},{signal:{get(){rt=!0}}});window.addEventListener("test",at,t),window.removeEventListener("test",at,t)}catch(t){}function lt(){rt||(!function(){if("undefined"==typeof window)return;const t=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(e,n,i){return"object"==typeof i&&"signal"in i&&i.signal instanceof AbortSignal&&t.call(i.signal,"abort",()=>{this.removeEventListener(e,n,i)}),t.call(this,e,n,i)}}(),rt=!0)}lt();const ct=[];let dt,ht;function ut(t,e,n){const i=new AbortController,s=null!=n?n:i.signal;t.setAttribute("data-focus-trap","active");const o=document.createElement("span");o.setAttribute("class","sentinel"),o.setAttribute("tabindex","0"),o.setAttribute("aria-hidden","true"),o.onfocus=()=>{const e=it(t,!0);null==e||e.focus()};const r=document.createElement("span");r.setAttribute("class","sentinel"),r.setAttribute("tabindex","0"),r.setAttribute("aria-hidden","true"),r.onfocus=()=>{const e=it(t);null==e||e.focus()};Array.from(t.children).filter(t=>t.classList.contains("sentinel")&&"SPAN"===t.tagName).length||(t.prepend(o),t.append(r));const a=function(t,e){const n=new MutationObserver(n=>{for(const i of n)if("childList"===i.type&&i.addedNodes.length){if(Array.from(i.addedNodes).filter(t=>t instanceof HTMLElement&&t.classList.contains("sentinel")&&"SPAN"===t.tagName).length)return;const n=t.firstElementChild,s=t.lastElementChild,[o,r]=e;(null==n?void 0:n.classList.contains("sentinel"))||t.insertAdjacentElement("afterbegin",o),(null==s?void 0:s.classList.contains("sentinel"))||t.insertAdjacentElement("beforeend",r)}});return n.observe(t,{childList:!0}),n}(t,[o,r]);let l;function c(n){if(n instanceof HTMLElement&&document.contains(t)){if(t.contains(n))return void(l=n);if(l&&ot(l)&&t.contains(l))return void l.focus();if(e&&t.contains(e))return void e.focus();{const e=it(t);return void(null==e||e.focus())}}}const d=function(t){const e=new AbortController;return t.addEventListener("abort",()=>{e.abort()}),e}(s);if(dt){const t=dt;dt.container.setAttribute("data-focus-trap","suspended"),dt.controller.abort(),ct.push(t)}d.signal.addEventListener("abort",()=>{dt=void 0}),s.addEventListener("abort",()=>{t.removeAttribute("data-focus-trap");const e=t.getElementsByClassName("sentinel");for(;e.length>0;)e[0].remove();const n=ct.findIndex(e=>e.container===t);n>=0&&ct.splice(n,1),a.disconnect(),function(){const t=ct.pop();t&&ut(t.container,t.initialFocus,t.originalSignal)}()}),document.addEventListener("focus",t=>{c(t.target)},{signal:d.signal,capture:!0}),c(document.activeElement),dt={container:t,controller:d,initialFocus:e,originalSignal:s};const h=ct.findIndex(e=>e.container===t);if(h>=0&&ct.splice(h,1),!n)return i}function ft(){return void 0===ht&&(ht=/^mac/i.test(window.navigator.platform)),ht}let mt=1e4;const pt=new Set(["button","checkbox","color","file","hidden","image","radio","range","reset","submit"]);var gt;lt(),function(t){t[t.ArrowHorizontal=1]="ArrowHorizontal",t[t.ArrowVertical=2]="ArrowVertical",t[t.JK=4]="JK",t[t.HL=8]="HL",t[t.HomeAndEnd=16]="HomeAndEnd",t[t.PageUpDown=256]="PageUpDown",t[t.WS=32]="WS",t[t.AD=64]="AD",t[t.Tab=128]="Tab",t[t.Backspace=512]="Backspace",t[t.ArrowAll=3]="ArrowAll",t[t.HJKL=12]="HJKL",t[t.WASD=96]="WASD",t[t.All=511]="All"}(gt||(gt={}));const bt={ArrowLeft:gt.ArrowHorizontal,ArrowDown:gt.ArrowVertical,ArrowUp:gt.ArrowVertical,ArrowRight:gt.ArrowHorizontal,h:gt.HL,j:gt.JK,k:gt.JK,l:gt.HL,a:gt.AD,s:gt.WS,w:gt.WS,d:gt.AD,Tab:gt.Tab,Home:gt.HomeAndEnd,End:gt.HomeAndEnd,PageUp:gt.PageUpDown,PageDown:gt.PageUpDown,Backspace:gt.Backspace},vt={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end",Backspace:"previous"};function wt(t){const e=vt[t.key];if("Tab"===t.key&&t.shiftKey)return"previous";const n=ft();if(n&&t.metaKey||!n&&t.ctrlKey){if("ArrowLeft"===t.key||"ArrowUp"===t.key)return"start";if("ArrowRight"===t.key||"ArrowDown"===t.key)return"end"}return e}function yt(t,e){const n=t.key,i=[...n].length,s=function(t){var e,n;if(!(t instanceof HTMLElement))return!1;const i=t.nodeName.toLowerCase(),s=null!==(n=null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())&&void 0!==n?n:"text",o="true"===t.ariaReadOnly||"true"===t.getAttribute("aria-readonly")||null!==t.getAttribute("readonly");return("select"===i||"textarea"===i||"input"===i&&!pt.has(s)||t.isContentEditable)&&!o}(e),o=e instanceof HTMLSelectElement;if(s&&(1===i||"Home"===n||"End"===n))return!0;if(o)return!("ArrowDown"!==n||!ft()||t.metaKey)||!("ArrowDown"!==n||ft()||!t.altKey);if(s&&!o){const t=e instanceof HTMLTextAreaElement||e instanceof HTMLInputElement,i=t&&0===e.selectionStart&&0===e.selectionEnd,s=t&&e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===n&&!i)return!0;if("ArrowRight"===n&&!s)return!0;const o=e instanceof HTMLElement&&e.isContentEditable;if(e instanceof HTMLTextAreaElement||o){if("PageUp"===n||"PageDown"===n)return!0;if("ArrowUp"===n&&!i)return!0;if("ArrowDown"===n&&!s)return!0}}return!1}const Et="data-is-active-descendant",At="data-has-active-descendant";function kt(t,e){var n,i,s,o,r;const a=[],l=new WeakMap,c=null!==(n=null==e?void 0:e.bindKeys)&&void 0!==n?n:((null==e?void 0:e.getNextFocusable)?gt.ArrowAll:gt.ArrowVertical)|gt.HomeAndEnd,d=null!==(i=null==e?void 0:e.focusOutBehavior)&&void 0!==i?i:"stop",h=null!==(s=null==e?void 0:e.focusInStrategy)&&void 0!==s?s:"previous",u=null==e?void 0:e.activeDescendantControl,f=null==e?void 0:e.onActiveDescendantChanged;let m;const p=null!==(o=null==e?void 0:e.preventScroll)&&void 0!==o&&o;function g(){return a[0]}function b(t,e=!1){const n=m;m=t,u?t&&document.activeElement===u?v(n,t,e):w():(n&&n!==t&&l.has(n)&&n.setAttribute("tabindex","-1"),null==t||t.setAttribute("tabindex","0"))}function v(e,n,i=!1){n.id||n.setAttribute("id","__primer_id_"+mt++),e&&e!==n&&e.removeAttribute(Et),u&&(i||u.getAttribute("aria-activedescendant")!==n.id)&&(u.setAttribute("aria-activedescendant",n.id),t.setAttribute(At,n.id),n.setAttribute(Et,i?"activated-directly":"activated-indirectly"),null==f||f(n,e,i))}function w(e=m){"first"===h&&(m=void 0),null==u||u.removeAttribute("aria-activedescendant"),t.removeAttribute(At),null==e||e.removeAttribute(Et);for(const e of t.querySelectorAll(`[${Et}]`))null==e||e.removeAttribute(Et);null==f||f(void 0,e,!1)}function y(...t){const n=t.filter(t=>{var n,i;return null===(i=null===(n=null==e?void 0:e.focusableElementFilter)||void 0===n?void 0:n.call(e,t))||void 0===i||i});if(0!==n.length){a.splice(function(t){const e=t[0];if(0===a.length)return 0;let n=0,i=a.length-1;for(;n<=i;){const t=Math.floor((n+i)/2);E(e,a[t])?i=t-1:n=t+1}return n}(n),0,...n);for(const t of n)l.has(t)||l.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1");m||b(g())}}function E(t,e){return(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)>0}function A(...t){for(const e of t){const t=a.indexOf(e);t>=0&&a.splice(t,1);const n=l.get(e);if(void 0!==n&&(null===n?e.removeAttribute("tabindex"):e.setAttribute("tabindex",n),l.delete(e)),e===m){b(g())}}}const k={reverse:null==e?void 0:e.reverse,strict:null==e?void 0:e.strict,onlyTabbable:null==e?void 0:e.onlyTabbable};y(...nt(t,k));b("function"==typeof h?h(document.body):g());new MutationObserver(t=>{for(const e of t){for(const t of e.removedNodes)t instanceof HTMLElement&&A(...nt(t));"attributes"===e.type&&null===e.oldValue&&e.target instanceof HTMLElement&&A(e.target)}for(const e of t){for(const t of e.addedNodes)t instanceof HTMLElement&&y(...nt(t,k));"attributes"===e.type&&null!==e.oldValue&&e.target instanceof HTMLElement&&y(e.target)}}).observe(t,{subtree:!0,childList:!0,attributeFilter:["hidden","disabled"],attributeOldValue:!0});const L=new AbortController,T=null!==(r=null==e?void 0:e.abortSignal)&&void 0!==r?r:L.signal;let C;T.addEventListener("abort",()=>{A(...a)}),t.addEventListener("mousedown",t=>{t.target instanceof HTMLElement&&t.target!==document.activeElement&&(C=a.indexOf(t.target))},{signal:T}),u?(t.addEventListener("focusin",t=>{t.target instanceof HTMLElement&&a.includes(t.target)&&(u.focus({preventScroll:p}),b(t.target))},{signal:T}),t.addEventListener("mousemove",({target:t})=>{if(!(t instanceof Node))return;const e=a.find(e=>e.contains(t));e&&b(e)},{signal:T,capture:!0}),u.addEventListener("focusin",()=>{m?v(void 0,m):b(g())},{signal:T}),u.addEventListener("focusout",()=>{w()},{signal:T})):t.addEventListener("focusin",e=>{if(e.target instanceof HTMLElement)if(void 0!==C)C>=0&&a[C]!==m&&b(a[C]),C=void 0;else if("previous"===h)b(e.target);else if("closest"===h||"first"===h){if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t="previous"===x?a.length-1:0,e=a[t];return void(null==e||e.focus({preventScroll:p}))}b(e.target)}else if("function"==typeof h)if(e.relatedTarget instanceof Element&&!t.contains(e.relatedTarget)){const t=h(e.relatedTarget);if((t?a.indexOf(t):-1)>=0&&t instanceof HTMLElement)return void t.focus({preventScroll:p});console.warn("Element requested is not a known focusable element.")}else b(e.target);x=void 0},{signal:T});const S=null!=u?u:t;let x;return"closest"===h&&document.addEventListener("keydown",t=>{"Tab"===t.key&&(x=wt(t))},{signal:T,capture:!0}),S.addEventListener("keydown",n=>{var i;if(n.key in vt){const s=bt[n.key];if(!n.defaultPrevented&&(s&c)>0&&!yt(n,document.activeElement)){const s=wt(n);let o;if((null==e?void 0:e.getNextFocusable)&&(o=e.getNextFocusable(s,null!==(i=document.activeElement)&&void 0!==i?i:void 0,n)),!o){const e=function(){if(!m)return 0;const e=a.indexOf(m);return-1!==e?e:m===t?-1:0}();let i=e;"previous"===s?i-=1:"start"===s?i=0:"next"===s?i+=1:i=a.length-1,i<0&&(i="wrap"===d&&"Tab"!==n.key?a.length-1:0),i>=a.length&&(i="wrap"===d&&"Tab"!==n.key?0:a.length-1),e!==i&&(o=a[i])}u?b(o||m,!0):o&&(x=s,o.focus({preventScroll:p})),("Tab"!==n.key||o)&&n.preventDefault()}}},{signal:T}),L}var Lt,Tt,Ct,St,xt,Mt,It;const Dt=new IntersectionObserver(t=>{for(const e of t){const t=e.target;e.isIntersecting&&t instanceof Ot&&t.update()}}),Pt=new ResizeObserver(t=>{for(const e of t){const t=e.target;t instanceof Ot&&t.update()}});var Nt;!function(t){t[t.Item=0]="Item",t[t.Divider=1]="Divider"}(Nt||(Nt={}));let Ot=class ActionBarElement extends HTMLElement{constructor(){super(...arguments),Lt.add(this),Tt.set(this,null)}connectedCallback(){Pt.observe(this),Dt.observe(this),requestAnimationFrame(()=>{this.style.overflow="visible",this.update()})}disconnectedCallback(){Pt.unobserve(this),Dt.unobserve(this)}menuItemClick(t){const e=t.currentTarget,n=e?.getAttribute("data-for");n&&document.getElementById(n)?.click()}update(){const t=b(this,Lt,"a",Ct);if(!t)return;const e=t.getBoundingClientRect().top;let n=null;b(this,Lt,"m",It).call(this,(t,i,s)=>{const o=t.getBoundingClientRect().top;return s===Nt.Item&&(o>e?(b(this,Lt,"m",xt).call(this,i),this.moreMenu.hidden&&(this.moreMenu.hidden=!1),n===Nt.Divider&&b(this,Lt,"m",xt).call(this,i-1)):(b(this,Lt,"m",St).call(this,i),i===this.items.length-1&&(this.moreMenu.hidden=!0),n===Nt.Divider&&b(this,Lt,"m",St).call(this,i-1))),n=s,!0}),b(this,Tt,"f")&&b(this,Tt,"f").abort(),v(this,Tt,kt(this,{bindKeys:gt.ArrowHorizontal|gt.HomeAndEnd,focusOutBehavior:"wrap",focusableElementFilter:t=>{const e=this.items.indexOf(t.parentElement),n=e>-1&&"visible"===this.items[e].style.visibility,i=t===this.moreMenu.invokerElement&&!this.moreMenu.hidden;return n||i}}),"f")}};Tt=new WeakMap,Lt=new WeakSet,Ct=function(){let t=null;return b(this,Lt,"m",It).call(this,(e,n,i)=>i!==Nt.Item||(t=e,!1)),t},St=function(t){const e=this.items[t],n=b(this,Lt,"a",Mt)[t];e&&n&&(e.style.setProperty("visibility","visible"),n.hidden=!0)},xt=function(t){const e=this.items[t],n=b(this,Lt,"a",Mt)[t];e&&n&&(e.style.setProperty("visibility","hidden"),n.hidden=!1)},Mt=function(){return this.moreMenu.querySelectorAll('[role="menu"] > li')},It=function(t){for(let e=0;e<this.items.length;e++){const n=this.items[e],i=n.classList.contains("ActionBar-divider")?Nt.Divider:Nt.Item;if(!t(n,e,i))break}},g([K],Ot.prototype,"items",void 0),g([U],Ot.prototype,"itemContainer",void 0),g([U],Ot.prototype,"moreMenu",void 0),Ot=g([j],Ot),window.ActionBarElement=Ot;class DetailsMenuElement extends HTMLElement{get preload(){return this.hasAttribute("preload")}set preload(t){t?this.setAttribute("preload",""):this.removeAttribute("preload")}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","menu");const t=this.parentElement;if(!t)return;const e=t.querySelector("summary");e&&(e.setAttribute("aria-haspopup","menu"),e.hasAttribute("role")||e.setAttribute("role","button"));const n=[Vt(t,"compositionstart",t=>Zt(this,t)),Vt(t,"compositionend",t=>Zt(this,t)),Vt(t,"click",e=>Ut(t,e)),Vt(t,"change",e=>Ut(t,e)),Vt(t,"keydown",e=>function(t,e,n){if(!(n instanceof KeyboardEvent))return;if(t.querySelector("details[open]"))return;const i=Ht.get(e);if(!i||i.isComposing)return;const s=n.target instanceof Element&&"SUMMARY"===n.target.tagName;switch(n.key){case"Escape":t.hasAttribute("open")&&(zt(t),n.preventDefault(),n.stopPropagation());break;case"ArrowDown":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Bt(t,!0);e&&e.focus(),n.preventDefault()}break;case"ArrowUp":{s&&!t.hasAttribute("open")&&t.setAttribute("open","");const e=Bt(t,!1);e&&e.focus(),n.preventDefault()}break;case"n":if($t&&n.ctrlKey){const e=Bt(t,!0);e&&e.focus(),n.preventDefault()}break;case"p":if($t&&n.ctrlKey){const e=Bt(t,!1);e&&e.focus(),n.preventDefault()}break;case" ":case"Enter":{const e=document.activeElement;e instanceof HTMLElement&&jt(e)&&e.closest("details")===t&&(n.preventDefault(),n.stopPropagation(),e.click())}}}(t,this,e)),Vt(t,"toggle",()=>qt(t,this),{once:!0}),Vt(t,"toggle",()=>function(t){if(!t.hasAttribute("open"))return;for(const e of document.querySelectorAll("details[open] > details-menu")){const n=e.closest("details");n&&n!==t&&!n.contains(t)&&n.removeAttribute("open")}}(t)),this.preload?Vt(t,"mouseover",()=>qt(t,this),{once:!0}):Ft,...Rt(t)];Ht.set(this,{subscriptions:n,loaded:!1,isComposing:!1})}disconnectedCallback(){const t=Ht.get(this);if(t){Ht.delete(this);for(const e of t.subscriptions)e.unsubscribe()}}}const Ht=new WeakMap,Ft={unsubscribe(){}};function Vt(t,e,n,i=!1){return t.addEventListener(e,n,i),{unsubscribe:()=>{t.removeEventListener(e,n,i)}}}function qt(t,e){const n=e.getAttribute("src");if(!n)return;const i=Ht.get(e);if(!i)return;if(i.loaded)return;i.loaded=!0;const s=e.querySelector("include-fragment");s&&!s.hasAttribute("src")&&(s.addEventListener("loadend",()=>Wt(t)),s.setAttribute("src",n))}function Rt(t){let e=!1;return[Vt(t,"mousedown",()=>e=!0),Vt(t,"keydown",()=>e=!1),Vt(t,"toggle",()=>{t.hasAttribute("open")&&(Wt(t)||e||function(t){const e=document.activeElement;if(e&&jt(e)&&t.contains(e))return;const n=Bt(t,!0);n&&n.focus()}(t))})]}function Wt(t){if(!t.hasAttribute("open"))return!1;const e=t.querySelector("details-menu [autofocus]");return!!e&&(e.focus(),!0)}function Bt(t,e){const n=Array.from(t.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled])')),i=document.activeElement,s=i instanceof HTMLElement?n.indexOf(i):-1,o=e?n[s+1]:n[s-1],r=e?n[0]:n[n.length-1];return o||r}const $t=navigator.userAgent.match(/Macintosh/);function Ut(t,e){const n=e.target;if(n instanceof Element&&n.closest("details")===t)if("click"===e.type){const e=n.closest('[role="menuitem"], [role="menuitemradio"]');if(!e)return;const i=e.querySelector("input");if("LABEL"===e.tagName&&n===i)return;"LABEL"===e.tagName&&i&&!i.checked||Kt(e,t)}else if("change"===e.type){const e=n.closest('[role="menuitemradio"], [role="menuitemcheckbox"]');e&&Kt(e,t)}}function Kt(t,e){if(t.hasAttribute("disabled")||"true"===t.getAttribute("aria-disabled"))return;const n=t.closest("details-menu");if(!n)return;n.dispatchEvent(new CustomEvent("details-menu-select",{cancelable:!0,detail:{relatedTarget:t}}))&&(!function(t,e){const n=e.querySelector("[data-menu-button]");if(!n)return;const i=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-text")?t:t.querySelector("[data-menu-button-text]");return e?e.getAttribute("data-menu-button-text")||e.textContent:null}(t);if(i)n.textContent=i;else{const e=function(t){if(!t)return null;const e=t.hasAttribute("data-menu-button-contents")?t:t.querySelector("[data-menu-button-contents]");return e?e.innerHTML:null}(t);e&&(n.innerHTML=e)}}(t,e),function(t,e){for(const n of e.querySelectorAll('[role="menuitemradio"], [role="menuitemcheckbox"]')){const e=n.querySelector('input[type="radio"], input[type="checkbox"]');let i=(n===t).toString();e instanceof HTMLInputElement&&(i=e.indeterminate?"mixed":e.checked.toString()),n.setAttribute("aria-checked",i)}}(t,e),"menuitemcheckbox"!==t.getAttribute("role")&&zt(e),n.dispatchEvent(new CustomEvent("details-menu-selected",{detail:{relatedTarget:t}})))}function jt(t){const e=t.getAttribute("role");return"menuitem"===e||"menuitemcheckbox"===e||"menuitemradio"===e}function zt(t){if(!t.hasAttribute("open"))return;t.removeAttribute("open");const e=t.querySelector("summary");e&&e.focus()}function Zt(t,e){const n=Ht.get(t);n&&(n.isComposing="compositionstart"===e.type)}var _t,Yt;window.customElements.get("details-menu")||(window.DetailsMenuElement=DetailsMenuElement,window.customElements.define("details-menu",DetailsMenuElement));const Gt=(()=>{const t=new Set;let e=null,n=null;function i(){for(const e of t)e.update()}return s=>{window.addEventListener("resize",i),window.addEventListener("scroll",i),e||(e=new IntersectionObserver(e=>{for(const n of e){const e=n.target;n.isIntersecting?(e.update(),t.add(e)):t.delete(e)}})),n||(n=new ResizeObserver(()=>{for(const e of t)e.update()})),n.observe(s.ownerDocument.documentElement),e.observe(s)}})();class AnchoredPositionElement extends HTMLElement{constructor(){super(...arguments),_t.set(this,null),Yt.set(this,void 0)}get align(){const t=this.getAttribute("align");return"center"===t||"end"===t?t:"start"}set align(t){this.setAttribute("align",`${t}`)}get side(){const t=this.getAttribute("side");return"inside-top"===t||"inside-bottom"===t||"inside-left"===t||"inside-right"===t||"inside-center"===t||"outside-top"===t||"outside-left"===t||"outside-right"===t?t:"outside-bottom"}set side(t){this.setAttribute("side",`${t}`)}get anchorOffset(){const t=this.getAttribute("anchor-offset");return"spacious"===t||"8"===t?8:4}set anchorOffset(t){this.setAttribute("anchor-offset",`${t}`)}get anchor(){return this.getAttribute("anchor")||""}set anchor(t){this.setAttribute("anchor",`${t}`)}get anchorElement(){if(b(this,_t,"f"))return b(this,_t,"f");const t=this.anchor;return t?this.ownerDocument.getElementById(t):null}set anchorElement(t){v(this,_t,t,"f"),b(this,_t,"f")||this.removeAttribute("anchor")}get alignmentOffset(){return Number(this.getAttribute("alignment-offset"))}set alignmentOffset(t){this.setAttribute("alignment-offset",`${t}`)}get allowOutOfBounds(){return this.hasAttribute("allow-out-of-bounds")}set allowOutOfBounds(t){this.toggleAttribute("allow-out-of-bounds",t)}connectedCallback(){this.update(),this.addEventListener("beforetoggle",()=>this.update()),Gt(this)}attributeChangedCallback(){this.update()}update(){this.isConnected&&(cancelAnimationFrame(b(this,Yt,"f")),v(this,Yt,requestAnimationFrame(()=>{const t=this.anchorElement;if(this.classList.toggle("not-anchored",!t),t){const{left:e,top:n}=X(this,t,this);this.style.top=`${n}px`,this.style.left=`${e}px`,this.style.bottom="auto",this.style.right="auto"}else this.style.top="0",this.style.left="0",this.style.bottom="0",this.style.right="0"}),"f"))}}var Xt,Jt,Qt;function te(t){const e=t.target,n=e?.closest("button");if(!n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled"))return;let i=n?.getAttribute("data-show-dialog-id");if(i){const e=document.getElementById(i);if(e instanceof HTMLDialogElement){e.showModal(),t.preventDefault();let i=n,s=!1;for(;i;)i=i.parentElement?.closest("[popover]:not(:popover-open)"),i&&"auto"===i.popover&&(i.classList.add("dialog-inside-popover-fix"),i.popover="manual",i.showPopover(),s=!0);s&&(e.addEventListener("close",t=>t.stopImmediatePropagation(),{once:!0}),e.close(),e.showModal(),e.addEventListener("close",()=>{for(const t of e.ownerDocument.querySelectorAll(".dialog-inside-popover-fix"))t.contains(e)&&(t.classList.remove("dialog-inside-popover-fix"),t.popover="auto",t.showPopover())},{once:!0}))}}if(i=n.getAttribute("data-close-dialog-id")||n.getAttribute("data-submit-dialog-id"),i){const t=document.getElementById(i);t instanceof HTMLDialogElement&&t.open&&t.close()}}_t=new WeakMap,Yt=new WeakMap,AnchoredPositionElement.observedAttributes=["align","side","anchor","alignment-offset","allow-out-of-bounds"],customElements.get("anchored-position")||(window.AnchoredPositionElement=AnchoredPositionElement,customElements.define("anchored-position",AnchoredPositionElement));class DialogHelperElement extends HTMLElement{constructor(){super(...arguments),Xt.add(this),Jt.set(this,null)}get dialog(){return this.querySelector("dialog")}connectedCallback(){const{signal:t}=v(this,Jt,new AbortController,"f");document.addEventListener("click",te,!0),document.addEventListener("click",this,{signal:t}),this.ownerDocument.body.style.setProperty("--dialog-scrollgutter",window.innerWidth-this.ownerDocument.body.clientWidth+"px"),new MutationObserver(t=>{for(const e of t)e.target===this.dialog&&b(this,Xt,"m",Qt).call(this)}).observe(this,{subtree:!0,attributeFilter:["open"]}),b(this,Xt,"m",Qt).call(this)}disconnectedCallback(){b(this,Jt,"f")?.abort()}handleEvent(t){const e=t.target,n=this.dialog;if(e!==n||!n?.open)return;if(n.querySelector("form"))return;const i=n.getBoundingClientRect();i.top<=t.clientY&&t.clientY<=i.top+i.height&&i.left<=t.clientX&&t.clientX<=i.left+i.width||n.close()}}Jt=new WeakMap,Xt=new WeakSet,Qt=function(){this.dialog&&this.dialog.matches("[open]:not(:modal)")&&(this.dialog.addEventListener("close",t=>t.stopImmediatePropagation(),{once:!0}),this.dialog.close(),this.dialog.showModal())},window.customElements.get("dialog-helper")||(window.DialogHelperElement=DialogHelperElement,window.customElements.define("dialog-helper",DialogHelperElement));var ee=class extends Event{oldState;newState;constructor(t,{oldState:e="",newState:n="",...i}={}){super(t,i),this.oldState=String(e||""),this.newState=String(n||"")}},ne=new WeakMap;function ie(t,e,n){ne.set(t,setTimeout(()=>{ne.has(t)&&t.dispatchEvent(new ee("toggle",{cancelable:!1,oldState:e,newState:n}))},0))}var se=globalThis.ShadowRoot||function(){},oe=globalThis.HTMLDialogElement||function(){},re=new WeakMap,ae=new WeakMap,le=new WeakMap;function ce(t){return le.get(t)||"hidden"}var de=new WeakMap;function he(t,e){return("auto"===t.popover||"manual"===t.popover)&&(!!t.isConnected&&((!e||"showing"===ce(t))&&(!(!e&&"hidden"!==ce(t))&&(!(t instanceof oe&&t.hasAttribute("open"))&&document.fullscreenElement!==t))))}function ue(t){return t?Array.from(ae.get(t.ownerDocument)||[]).indexOf(t)+1:0}function fe(t){const e=ge(t),n=function(t){for(;t;){const e=t.popoverTargetElement;if(e instanceof HTMLElement)return e;if((t=t.parentElement||pe(t))instanceof se&&(t=t.host),t instanceof Document)return}}(t);return ue(e)>ue(n)?e:n}function me(t){const e=ae.get(t);for(const t of e||[]){if(t.isConnected)return t;e.delete(t)}return null}function pe(t){return"function"==typeof t.getRootNode?t.getRootNode():t.parentNode?pe(t.parentNode):t}function ge(t){for(;t;){if(t instanceof HTMLElement&&"auto"===t.popover&&"showing"===le.get(t))return t;if((t=t instanceof Element&&t.assignedSlot||t.parentElement||pe(t))instanceof se&&(t=t.host),t instanceof Document)return}}function be(t){return!(t.hidden||t instanceof se)&&((!(t instanceof HTMLButtonElement||t instanceof HTMLInputElement||t instanceof HTMLSelectElement||t instanceof HTMLTextAreaElement||t instanceof HTMLOptGroupElement||t instanceof HTMLOptionElement||t instanceof HTMLFieldSetElement)||!t.disabled)&&(!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(!(t instanceof HTMLAnchorElement&&""===t.href)&&("number"==typeof t.tabIndex&&-1!==t.tabIndex))))}function ve(t){(function(t){if(t.shadowRoot&&!0!==t.shadowRoot.delegatesFocus)return null;let e=t;e.shadowRoot&&(e=e.shadowRoot);let n=e.querySelector("[autofocus]");if(n)return n;{const t=e.querySelectorAll("slot");for(const e of t){const t=e.assignedElements({flatten:!0});for(const e of t){if(e.hasAttribute("autofocus"))return e;if(n=e.querySelector("[autofocus]"),n)return n}}}const i=t.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);let s=i.currentNode;for(;s;){if(be(s))return s;s=i.nextNode()}})(t)?.focus()}var we=new WeakMap;function ye(t){if(!he(t,!1))return;const e=t.ownerDocument;if(!t.dispatchEvent(new ee("beforetoggle",{cancelable:!0,oldState:"closed",newState:"open"})))return;if(!he(t,!1))return;let n=!1;if("auto"===t.popover){const n=t.getAttribute("popover");if(ke(function(t){const e=new Map;let n=0;for(const i of ae.get(t.ownerDocument)||[])e.set(i,n),n+=1;e.set(t,n),n+=1;let i=null;return function(t){const n=ge(t);if(null===n)return null;const s=e.get(n);(null===i||e.get(i)<s)&&(i=n)}(t.parentElement||pe(t)),i}(t)||e,!1,!0),n!==t.getAttribute("popover")||!he(t,!1))return}me(e)||(n=!0),we.delete(t);const i=e.activeElement;t.classList.add(":popover-open"),le.set(t,"showing"),re.has(e)||re.set(e,new Set),re.get(e).add(t),ve(t),"auto"===t.popover&&(ae.has(e)||ae.set(e,new Set),ae.get(e).add(t),Se(de.get(t),!0)),n&&i&&"auto"===t.popover&&we.set(t,i),ie(t,"closed","open")}function Ee(t,e=!1,n=!1){if(!he(t,!0))return;const i=t.ownerDocument;if("auto"===t.popover&&(ke(t,e,n),!he(t,!0)))return;if(Se(de.get(t),!1),de.delete(t),n&&(t.dispatchEvent(new ee("beforetoggle",{oldState:"open",newState:"closed"})),!he(t,!0)))return;re.get(i)?.delete(t),ae.get(i)?.delete(t),t.classList.remove(":popover-open"),le.set(t,"hidden"),n&&ie(t,"open","closed");const s=we.get(t);s&&(we.delete(t),e&&s.focus())}function Ae(t,e=!1,n=!1){let i=me(t);for(;i;)Ee(i,e,n),i=me(t)}function ke(t,e,n){const i=t.ownerDocument||t;if(t instanceof Document)return Ae(i,e,n);let s=null,o=!1;for(const e of ae.get(i)||[])if(e===t)o=!0;else if(o){s=e;break}if(!o)return Ae(i,e,n);for(;s&&"showing"===ce(s)&&ae.get(i)?.size;)Ee(s,e,n)}var Le=new WeakMap;function Te(t){if(!t.isTrusted)return;const e=t.composedPath()[0];if(!e)return;const n=e.ownerDocument;if(!me(n))return;const i=fe(e);if(i&&"pointerdown"===t.type)Le.set(n,i);else if("pointerup"===t.type){const t=Le.get(n)===i;Le.delete(n),t&&ke(i||n,!1,!0)}}var Ce=new WeakMap;function Se(t,e=!1){if(!t)return;Ce.has(t)||Ce.set(t,t.getAttribute("aria-expanded"));const n=t.popoverTargetElement;if(n instanceof HTMLElement&&"auto"===n.popover)t.setAttribute("aria-expanded",String(e));else{const e=Ce.get(t);e?t.setAttribute("aria-expanded",e):t.removeAttribute("aria-expanded")}}var xe=globalThis.ShadowRoot||function(){};function Me(t,e,n){const i=t[e];Object.defineProperty(t,e,{value(t){return i.call(this,n(t))}})}var Ie=/(^|[^\\]):popover-open\b/g;function De(){const t="function"==typeof globalThis.CSSLayerBlockRule;return`\n${t?"@layer popover-polyfill {":""}\n :where([popover]) {\n position: fixed;\n z-index: 2147483647;\n inset: 0;\n padding: 0.25em;\n width: fit-content;\n height: fit-content;\n border-width: initial;\n border-color: initial;\n border-image: initial;\n border-style: solid;\n background-color: canvas;\n color: canvastext;\n overflow: auto;\n margin: auto;\n }\n\n :where([popover]:not(.\\:popover-open)) {\n display: none;\n }\n\n :where(dialog[popover].\\:popover-open) {\n display: block;\n }\n\n :where(dialog[popover][open]) {\n display: revert;\n }\n\n :where([anchor].\\:popover-open) {\n inset: auto;\n }\n\n :where([anchor]:popover-open) {\n inset: auto;\n }\n\n @supports not (background-color: canvas) {\n :where([popover]) {\n background-color: white;\n color: black;\n }\n }\n\n @supports (width: -moz-fit-content) {\n :where([popover]) {\n width: -moz-fit-content;\n height: -moz-fit-content;\n }\n }\n\n @supports not (inset: 0) {\n :where([popover]) {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n }\n }\n${t?"}":""}\n`}var Pe,Ne,Oe,He,Fe=null;function Ve(t){const e=De();if(null===Fe)try{(Fe=new CSSStyleSheet).replaceSync(e)}catch{Fe=!1}if(!1===Fe){const n=document.createElement("style");n.textContent=e,t instanceof Document?t.head.prepend(n):t.prepend(n)}else t.adoptedStyleSheets=[Fe,...t.adoptedStyleSheets]}"undefined"!=typeof HTMLElement&&"object"==typeof HTMLElement.prototype&&"popover"in HTMLElement.prototype||function(){if("undefined"==typeof window)return;function t(t){return t?.includes(":popover-open")&&(t=t.replace(Ie,"$1.\\:popover-open")),t}window.ToggleEvent=window.ToggleEvent||ee,Me(Document.prototype,"querySelector",t),Me(Document.prototype,"querySelectorAll",t),Me(Element.prototype,"querySelector",t),Me(Element.prototype,"querySelectorAll",t),Me(Element.prototype,"matches",t),Me(Element.prototype,"closest",t),Me(DocumentFragment.prototype,"querySelectorAll",t),Object.defineProperties(HTMLElement.prototype,{popover:{enumerable:!0,configurable:!0,get(){if(!this.hasAttribute("popover"))return null;const t=(this.getAttribute("popover")||"").toLowerCase();return""===t||"auto"==t?"auto":"manual"},set(t){null===t?this.removeAttribute("popover"):this.setAttribute("popover",t)}},showPopover:{enumerable:!0,configurable:!0,value(){ye(this)}},hidePopover:{enumerable:!0,configurable:!0,value(){Ee(this,!0,!0)}},togglePopover:{enumerable:!0,configurable:!0,value(t){"showing"===le.get(this)&&void 0===t||!1===t?Ee(this,!0,!0):void 0!==t&&!0!==t||ye(this)}}});const e=Element.prototype.attachShadow;e&&Object.defineProperties(Element.prototype,{attachShadow:{enumerable:!0,configurable:!0,writable:!0,value(t){const n=e.call(this,t);return Ve(n),n}}});const n=HTMLElement.prototype.attachInternals;n&&Object.defineProperties(HTMLElement.prototype,{attachInternals:{enumerable:!0,configurable:!0,writable:!0,value(){const t=n.call(this);return t.shadowRoot&&Ve(t.shadowRoot),t}}});const i=new WeakMap;function s(t){Object.defineProperties(t.prototype,{popoverTargetElement:{enumerable:!0,configurable:!0,set(t){if(null===t)this.removeAttribute("popovertarget"),i.delete(this);else{if(!(t instanceof Element))throw new TypeError("popoverTargetElement must be an element or null");this.setAttribute("popovertarget",""),i.set(this,t)}},get(){if("button"!==this.localName&&"input"!==this.localName)return null;if("input"===this.localName&&"reset"!==this.type&&"image"!==this.type&&"button"!==this.type)return null;if(this.disabled)return null;if(this.form&&"submit"===this.type)return null;const t=i.get(this);if(t&&t.isConnected)return t;if(t&&!t.isConnected)return i.delete(this),null;const e=pe(this),n=this.getAttribute("popovertarget");return(e instanceof Document||e instanceof xe)&&n&&e.getElementById(n)||null}},popoverTargetAction:{enumerable:!0,configurable:!0,get(){const t=(this.getAttribute("popovertargetaction")||"").toLowerCase();return"show"===t||"hide"===t?t:"toggle"},set(t){this.setAttribute("popovertargetaction",t)}}})}s(HTMLButtonElement),s(HTMLInputElement);const o=t=>{const e=t.composedPath(),n=e[0];if(!(n instanceof Element)||n?.shadowRoot)return;const i=pe(n);if(!(i instanceof xe||i instanceof Document))return;const s=e.find(t=>t.matches?.("[popovertargetaction],[popovertarget]"));return s?(function(t){const e=t.popoverTargetElement;if(!(e instanceof HTMLElement))return;const n=ce(e);"show"===t.popoverTargetAction&&"showing"===n||"hide"===t.popoverTargetAction&&"hidden"===n||("showing"===n?Ee(e,!0,!0):he(e,!1)&&(de.set(e,t),ye(e)))}(s),void t.preventDefault()):void 0},r=t=>{const e=t.key,n=t.target;t.defaultPrevented||!n||"Escape"!==e&&"Esc"!==e||ke(n.ownerDocument,!0,!0)};(t=>{t.addEventListener("click",o),t.addEventListener("keydown",r),t.addEventListener("pointerdown",Te),t.addEventListener("pointerup",Te)})(document),Ve(document)}();const qe=['[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]'].map(t=>`:not([hidden]) > ${t}`).join(", "),Re=t=>t.textContent?.trim()[0].toLowerCase(),We=/^\S$/;class FocusGroupElement extends HTMLElement{constructor(){super(...arguments),Pe.add(this),Ne.set(this,null),Oe.set(this,null)}get nowrap(){return this.hasAttribute("nowrap")}set nowrap(t){this.toggleAttribute("nowrap",t)}get direction(){return"horizontal"===this.getAttribute("direction")?"horizontal":"vertical"}set direction(t){this.setAttribute("direction",`${t}`)}get retain(){return this.hasAttribute("retain")}set retain(t){this.toggleAttribute("retain",t)}get mnemonics(){return this.hasAttribute("mnemonics")}connectedCallback(){v(this,Oe,new AbortController,"f");const{signal:t}=b(this,Oe,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusin",this,{signal:t})}disconnectedCallback(){b(this,Oe,"f")?.abort()}handleEvent(t){const{direction:e,nowrap:n}=this;if("focusin"===t.type){if(this.retain&&t.target instanceof Element&&t.target.matches(qe)){b(this,Ne,"f")?.abort();const{signal:e}=v(this,Ne,new AbortController,"f");for(const n of b(this,Pe,"a",He)){n.setAttribute("tabindex",n===t.target?"0":"-1");const i=t.target.closest("[popover]");n===t.target&&"auto"===i?.popover&&i.closest("focus-group")===this&&i.addEventListener("toggle",t=>{if(t.target instanceof Element&&"closed"===t.newState&&(b(this,Ne,"f")?.abort(),n.setAttribute("tabindex","-1"),i.id)){const t=this.querySelector(`[popovertarget="${i.id}"]`);t?t.setAttribute("tabindex","0"):b(this,Pe,"a",He)[0]?.setAttribute("tabindex","0")}},{signal:e})}}}else if(t instanceof KeyboardEvent){const i=Array.from(b(this,Pe,"a",He));let s=i.indexOf(t.target);const o=t.key;if("Up"===o||"ArrowUp"===o)"vertical"!==e&&"both"!==e||(s-=s<0?0:1,t.preventDefault());else if("Down"===o||"ArrowDown"===o)"vertical"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Left"===t.key||"ArrowLeft"===t.key)"horizontal"!==e&&"both"!==e||(s-=1,t.preventDefault());else if("Right"===t.key||"ArrowRight"===t.key)"horizontal"!==e&&"both"!==e||(s+=1,t.preventDefault());else if("Home"===t.key||"PageUp"===t.key)s=0,t.preventDefault();else if("End"===t.key||"PageDown"===t.key)s=i.length-1,t.preventDefault();else{if(!this.mnemonics||!We.test(o))return;{const e=o.toLowerCase(),r=s>0&&Re(t.target)===e?s:0;s=i.findIndex((t,n)=>n>r&&Re(t)===e),s<0&&!n&&(s=i.findIndex(t=>Re(t)===e))}}n&&s<0&&(s=0),!n&&s>=i.length&&(s=0);const r=i.at(Math.min(s,i.length-1));{let e=r;do{e=e.closest("[popover]:not(:popover-open)"),"auto"!==e?.popover||["ArrowRight","ArrowLeft"].includes(t.key)||e.showPopover(),e=e?.parentElement||null}while(e)}r?.focus()}}}Ne=new WeakMap,Oe=new WeakMap,Pe=new WeakSet,He=function(){return this.querySelectorAll(qe)},customElements.get("focus-group")||(window.FocusGroupElement=FocusGroupElement,customElements.define("focus-group",FocusGroupElement));let Be=class ScrollableRegionElement extends HTMLElement{constructor(){super(...arguments),this.hasOverflow=!1,this.labelledBy=""}connectedCallback(){this.style.overflow="auto",this.observer=new ResizeObserver(t=>{for(const e of t)this.hasOverflow=e.target.scrollHeight>e.target.clientHeight||e.target.scrollWidth>e.target.clientWidth}),this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}attributeChangedCallback(t){"data-has-overflow"===t&&(this.hasOverflow?(this.setAttribute("aria-labelledby",this.labelledBy),this.setAttribute("role","region"),this.setAttribute("tabindex","0")):(this.removeAttribute("aria-labelledby"),this.removeAttribute("role"),this.removeAttribute("tabindex")))}};g([I],Be.prototype,"hasOverflow",void 0),g([I],Be.prototype,"labelledBy",void 0),Be=g([j],Be),window.ScrollableRegionElement=Be;const $e=(t,e,n)=>{if(e())n();else{const i=new MutationObserver(()=>{e()&&(n(),i.disconnect())});i.observe(t,{childList:!0,subtree:!0})}};var Ue,Ke,je,ze;function Ze(t){document.activeElement!==t&&t?.focus()}const _e=[];function Ye(t){const e=t.target,n=e?.closest("button");if(!n||n.hasAttribute("disabled")||"true"===n.getAttribute("aria-disabled"))return;let i=n?.getAttribute("data-show-dialog-id");if(i){t.stopPropagation();const e=document.getElementById(i);if(e instanceof ModalDialogElement)return e.openButton=n,e.show(),void t.preventDefault()}if(_e.length&&(i=n.getAttribute("data-close-dialog-id")||n.getAttribute("data-submit-dialog-id"),i)){const t=document.getElementById(i);if(t instanceof ModalDialogElement){const e=_e.findIndex(t=>t.id===i);_e.splice(e,1),t.close(n.hasAttribute("data-submit-dialog-id"))}}}function Ge(t){!(t instanceof KeyboardEvent&&"keydown"===t.type&&"Enter"===t.key)||t.ctrlKey||t.altKey||t.metaKey||t.shiftKey||Ye(t)}function Xe(t){const e=t.target;if(e?.closest("button"))return;const n=_e[_e.length-1];if(!n)return;!e.closest(`#${n.getAttribute("id")}`)&&e.ownerDocument.addEventListener("mouseup",t=>{t.target===e&&(_e.pop(),n.close())},{once:!0})}class ModalDialogElement extends HTMLElement{constructor(){super(...arguments),Ue.add(this),Ke.set(this,new AbortController)}get open(){return this.hasAttribute("open")}set open(t){if(t){if(this.open)return;this.setAttribute("open",""),this.setAttribute("aria-disabled","false"),document.body.style.paddingRight=window.innerWidth-document.body.clientWidth+"px",document.body.style.overflow="hidden",b(this,Ue,"a",je)?.classList.remove("Overlay--hidden"),b(this,Ke,"f").signal.aborted&&v(this,Ke,new AbortController,"f"),ut(this,this.querySelector("[autofocus]"),b(this,Ke,"f").signal),_e.push(this)}else{if(!this.open)return;this.removeAttribute("open"),this.setAttribute("aria-disabled","true"),b(this,Ue,"a",je)?.classList.add("Overlay--hidden"),document.body.style.paddingRight="0",document.body.style.overflow="initial",b(this,Ke,"f").abort();const t=this.openButton?.closest("details")||this.openButton?.closest("action-menu");Ze(t?it(t):this.openButton),this.openButton=null}}get showButtons(){return document.querySelectorAll(`button[data-show-dialog-id='${this.id}']`)}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","dialog"),document.addEventListener("click",Ye),document.addEventListener("keydown",Ge),document.addEventListener("mousedown",Xe),this.addEventListener("keydown",t=>b(this,Ue,"m",ze).call(this,t))}show(){this.open=!0}close(t=!1){if(!1===this.open)return;const e=new Event(t?"close":"cancel");this.dispatchEvent(e),this.open=!1}}var Je,Qe,tn,en,nn,sn,on,rn;Ke=new WeakMap,Ue=new WeakSet,je=function(){return this.parentElement?.hasAttribute("data-modal-dialog-overlay")?this.parentElement:null},ze=function(t){if(t instanceof KeyboardEvent&&!t.isComposing&&this.open)switch(t.key){case"Escape":this.close(),t.preventDefault(),t.stopPropagation();break;case"Enter":t.target.getAttribute("data-close-dialog-id")===this.id&&t.stopPropagation();break}},window.customElements.get("modal-dialog")||(window.ModalDialogElement=ModalDialogElement,window.customElements.define("modal-dialog",ModalDialogElement));let an=class NavListElement extends HTMLElement{constructor(){super(...arguments),Je.add(this),Qe.set(this,void 0)}connectedCallback(){this.topLevelList&&v(this,Qe,new Z(this.topLevelList),"f")}disconnectedCallback(){this.topLevelList&&b(this,Qe,"f").unobserve(this.topLevelList)}selectItemById(t){if(!t)return!1;const e=b(this,Je,"m",tn).call(this,t);return!!e&&(b(this,Je,"m",sn).call(this,e),!0)}selectItemByHref(t){if(!t)return!1;const e=b(this,Je,"m",en).call(this,t);return!!e&&(b(this,Je,"m",sn).call(this,e),!0)}selectItemByCurrentLocation(){const t=b(this,Je,"m",nn).call(this);return!!t&&(b(this,Je,"m",sn).call(this,t),!0)}expandItem(t){t.nextElementSibling?.removeAttribute("data-hidden"),t.setAttribute("aria-expanded","true")}collapseItem(t){t.nextElementSibling?.setAttribute("data-hidden",""),t.setAttribute("aria-expanded","false"),t.focus()}itemIsExpanded(t){return"A"===t?.tagName||"true"===t?.getAttribute("aria-expanded")}handleItemWithSubItemClick(t){const e=t.target;if(!(e instanceof HTMLElement))return;const n=e.closest("button");n&&(this.itemIsExpanded(n)?this.collapseItem(n):this.expandItem(n),t.stopPropagation())}handleItemWithSubItemKeydown(t){const e=t.currentTarget;if(!(e instanceof HTMLElement))return;let n=e.closest("button");if(!n){const t=e.getAttribute("aria-labelledby");if(!t)return;n=document.getElementById(t)}this.itemIsExpanded(n)&&"Escape"===t.key&&this.collapseItem(n),t.stopPropagation()}};var ln,cn,dn;Qe=new WeakMap,Je=new WeakSet,tn=function(t){for(const e of this.items){if(e.classList.contains("ActionListItem--hasSubItem"))continue;if((e.getAttribute("data-item-id")?.split(" ")||[]).includes(t))return e}return null},en=function(t){const e=this.querySelector(`.ActionListContent[href="${t}"]`);return e?e.closest(".ActionListItem"):null},nn=function(){return b(this,Je,"m",en).call(this,window.location.pathname)},sn=function(t){const e=this.querySelector(".ActionListItem--navActive");e&&b(this,Je,"m",on).call(this,e),t.classList.add("ActionListItem--navActive"),t.children.length>0&&t.children[0].setAttribute("aria-current","page");const n=b(this,Je,"m",rn).call(this,t);n&&(this.expandItem(n),n.classList.add("ActionListContent--hasActiveSubItem"))},on=function(t){t.classList.remove("ActionListItem--navActive"),t.children.length>0&&t.children[0].removeAttribute("aria-current");const e=b(this,Je,"m",rn).call(this,t);e&&(this.collapseItem(e),e.classList.remove("ActionListContent--hasActiveSubItem"))},rn=function(t){if(!t.classList.contains("ActionListItem--subItem"))return null;const e=t.closest("li.ActionListItem--hasSubItem")?.querySelector("button.ActionListContent");return e||null},g([K],an.prototype,"items",void 0),g([U],an.prototype,"topLevelList",void 0),an=g([j],an);let hn=class NavListGroupElement extends HTMLElement{constructor(){super(...arguments),ln.add(this),dn.set(this,new Z(this))}connectedCallback(){this.setShowMoreItemState()}get showMoreDisabled(){return this.showMoreItem.hasAttribute("aria-disabled")}set showMoreDisabled(t){t?this.showMoreItem.setAttribute("aria-disabled","true"):this.showMoreItem.removeAttribute("aria-disabled"),this.showMoreItem.classList.toggle("disabled",t)}set currentPage(t){this.showMoreItem.setAttribute("data-current-page",t.toString())}get currentPage(){return parseInt(this.showMoreItem.getAttribute("data-current-page"))||1}get totalPages(){return parseInt(this.showMoreItem.getAttribute("data-total-pages"))||1}get paginationSrc(){return this.showMoreItem.getAttribute("src")||""}async showMore(t){if(t.preventDefault(),this.showMoreDisabled)return;let e;this.showMoreDisabled=!0;try{const t=new URL(this.paginationSrc,window.location.origin);this.currentPage++,t.searchParams.append("page",this.currentPage.toString());const n=await fetch(t);if(!n.ok)return;e=await n.text(),this.currentPage===this.totalPages&&(this.showMoreItem.hidden=!0)}catch(t){return this.showMoreDisabled=!1,void this.currentPage--}const n=b(this,ln,"m",cn).call(this,document,e);n?.querySelector("li > a")?.setAttribute("data-targets","nav-list-group.focusMarkers");const i=t.target.closest("button").getAttribute("data-list-id");document.getElementById(i).append(n),this.focusMarkers.pop()?.focus(),this.showMoreDisabled=!1}setShowMoreItemState(){this.showMoreItem&&(this.currentPage<this.totalPages?this.showMoreItem.hidden=!1:this.showMoreItem.hidden=!0)}};var un,fn;dn=new WeakMap,ln=new WeakSet,cn=function(t,e){const n=t.createElement("template");return n.innerHTML=e,t.importNode(n.content,!0)},g([U],hn.prototype,"showMoreItem",void 0),g([K],hn.prototype,"focusMarkers",void 0),hn=g([j],hn),window.NavListGroupElement=hn;let mn=class SegmentedControlElement extends HTMLElement{constructor(){super(...arguments),un.add(this)}connectedCallback(){b(this,un,"m",fn).call(this)}select(t){const e=t.currentTarget;for(const t of this.items)t.classList.remove("SegmentedControl-item--selected"),t.querySelector("[aria-current]")?.setAttribute("aria-current","false");e.closest("li.SegmentedControl-item")?.classList.add("SegmentedControl-item--selected"),e.setAttribute("aria-current","true"),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:e,checked:!1,value:e.querySelector(".Button-label")?.textContent}}))}get current(){return this.querySelector("[aria-current=true]")}};un=new WeakSet,fn=function(){for(const t of this.querySelectorAll(".Button-label"))t.setAttribute("data-content",t.textContent||"")},g([K],mn.prototype,"items",void 0),mn=g([j],mn),window.customElements.get("segmented-control")||(window.SegmentedControlElement=mn,window.customElements.define("segmented-control",mn));let pn=class ToggleSwitchElement extends HTMLElement{constructor(){super(...arguments),this.turbo=!1,this.toggling=!1}get src(){const t=this.getAttribute("src");if(!t)return null;const e=this.ownerDocument.createElement("a");return e.href=t,e.href}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("data-csrf")||t instanceof HTMLInputElement&&t.value||null}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}isRemote(){return null!=this.src}async toggle(){if(!this.toggling&&(this.toggling=!0,!this.isDisabled())){if(!this.isRemote())return this.performToggle(),void(this.toggling=!1);this.performToggle(),this.setLoadingState();try{await this.submitForm()}catch(t){return void(t instanceof Error&&(this.setErrorState(t.message||"An error occurred, please try again."),this.performToggle()))}finally{this.toggling=!1}this.setSuccessState()}}turnOn(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","true"),this.classList.add("ToggleSwitch--checked"))}turnOff(){this.isDisabled()||(this.switch.setAttribute("aria-pressed","false"),this.classList.remove("ToggleSwitch--checked"))}isOn(){return"true"===this.switch.getAttribute("aria-pressed")}isOff(){return!this.isOn()}isDisabled(){return null!=this.switch.getAttribute("disabled")}disable(){this.switch.setAttribute("disabled","disabled")}enable(){this.switch.removeAttribute("disabled")}performToggle(){this.isOn()?this.turnOff():this.turnOn()}setLoadingState(){this.errorIcon.setAttribute("hidden","hidden"),this.loadingSpinner.removeAttribute("hidden");const t=new CustomEvent("toggleSwitchLoading",{bubbles:!0});this.dispatchEvent(t)}setSuccessState(){const t=new CustomEvent("toggleSwitchSuccess",{bubbles:!0});this.dispatchEvent(t),this.setFinishedState(!1)}setErrorState(t){const e=new CustomEvent("toggleSwitchError",{bubbles:!0,detail:t});this.dispatchEvent(e),this.setFinishedState(!0)}setFinishedState(t){t&&this.errorIcon.removeAttribute("hidden"),this.loadingSpinner.setAttribute("hidden","hidden")}async submitForm(){const t=new FormData;if(this.csrf&&t.append(this.csrfField,this.csrf),t.append("value",this.isOn()?"1":"0"),!this.src)throw new Error("invalid src");let e;const n={"Requested-With":"XMLHttpRequest","X-Requested-With":"XMLHttpRequest"};this.turbo&&(n.Accept="text/vnd.turbo-stream.html");try{e=await fetch(this.src,{credentials:"same-origin",method:"POST",headers:n,body:t})}catch(t){throw new Error("A network error occurred, please try again.")}if(!e.ok)throw new Error(await e.text());const i=e.headers.get("Content-Type");window.Turbo&&this.turbo&&i?.startsWith("text/vnd.turbo-stream.html")&&window.Turbo.renderStreamMessage(await e.text())}};var gn,bn,vn,wn,yn,En,An,kn,Ln,Tn,Cn;g([U],pn.prototype,"switch",void 0),g([U],pn.prototype,"loadingSpinner",void 0),g([U],pn.prototype,"errorIcon",void 0),g([I],pn.prototype,"turbo",void 0),pn=g([j],pn),window.customElements.get("toggle-switch")||(window.ToggleSwitchElement=pn,window.customElements.define("toggle-switch",pn));const Sn=(()=>{let t;return e=>t?e.matches(t):function(e){try{return t=":popover-open",e.matches(t)}catch{try{return t=":open",e.matches(":open")}catch{return t=".\\:popover-open",e.matches(".\\:popover-open")}}}(e)})(),xn="sr-only",Mn=["tooltip-n","tooltip-s","tooltip-e","tooltip-w","tooltip-ne","tooltip-se","tooltip-nw","tooltip-sw"];function In(t){for(const e of On)e!==t&&(Sn(e)?e.hidePopover():On.delete(e))}function Dn(){In()}function Pn(t){setTimeout(()=>{for(const e of On)Sn(e)&&"focus"===e.showReason&&e.control!==t.target&&e.hidePopover()},0)}const Nn=new Set,On=new Set;class ToolTipElement extends HTMLElement{constructor(){super(...arguments),gn.add(this),bn.set(this,void 0),vn.set(this,"center"),wn.set(this,"outside-bottom"),yn.set(this,!1),En.set(this,"mouse")}styles(){return'\n :host {\n --tooltip-top: var(--tool-tip-position-top, 0);\n --tooltip-left: var(--tool-tip-position-left, 0);\n padding: var(--overlay-paddingBlock-condensed) var(--overlay-padding-condensed) !important;\n font: var(--text-body-shorthand-small);\n color: var(--tooltip-fgColor, var(--fgColor-onEmphasis)) !important;\n text-align: center;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-wrap: break-word;\n white-space: pre;\n background: var(--tooltip-bgColor, var(--bgColor-emphasis)) !important;\n border-radius: var(--borderRadius-medium);\n border: 0 !important;\n opacity: 0;\n max-width: var(--overlay-width-small);\n word-wrap: break-word;\n white-space: normal;\n width: max-content !important;\n inset: var(--tooltip-top) auto auto var(--tooltip-left) !important;\n overflow: visible !important;\n text-wrap: balance;\n }\n\n :host(:is(.tooltip-n, .tooltip-nw, .tooltip-ne)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) - var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(:is(.tooltip-s, .tooltip-sw, .tooltip-se)) {\n --tooltip-top: calc(var(--tool-tip-position-top, 0) + var(--overlay-offset, 0.25rem));\n --tooltip-left: var(--tool-tip-position-left);\n }\n\n :host(.tooltip-w) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) - var(--overlay-offset, 0.25rem));\n }\n\n :host(.tooltip-e) {\n --tooltip-top: var(--tool-tip-position-top);\n --tooltip-left: calc(var(--tool-tip-position-left, 0) + var(--overlay-offset, 0.25rem));\n }\n\n :host:after{\n position: absolute;\n display: block;\n right: 0;\n left: 0;\n height: var(--overlay-offset, 0.25rem);\n content: "";\n }\n\n :host(.tooltip-s):after,\n :host(.tooltip-se):after,\n :host(.tooltip-sw):after {\n bottom: 100%\n }\n\n :host(.tooltip-n):after,\n :host(.tooltip-ne):after,\n :host(.tooltip-nw):after {\n top: 100%;\n }\n\n @keyframes tooltip-appear {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n :host(:popover-open),\n :host(:popover-open):before {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n :host(.\\:popover-open) {\n animation-name: tooltip-appear;\n animation-duration: .1s;\n animation-fill-mode: forwards;\n animation-timing-function: ease-in;\n }\n\n @media (forced-colors: active) {\n :host {\n outline: solid 1px transparent;\n }\n\n :host:before {\n display: none;\n }\n }\n '}get showReason(){return b(this,En,"f")}get htmlFor(){return this.getAttribute("for")||""}set htmlFor(t){this.setAttribute("for",t)}get type(){return"label"===this.getAttribute("data-type")?"label":"description"}set type(t){this.setAttribute("data-type",t)}get direction(){return this.getAttribute("data-direction")||"s"}set direction(t){this.setAttribute("data-direction",t)}get control(){return this.ownerDocument.getElementById(this.htmlFor)}set hiddenFromView(t){t&&Sn(this)?this.hidePopover():t||Sn(this)||this.showPopover()}get hiddenFromView(){return!Sn(this)}connectedCallback(){if(Nn.add(this),b(this,gn,"m",Ln).call(this),b(this,gn,"m",Tn).call(this),!this.shadowRoot){const t=this.attachShadow({mode:"open"});t.appendChild(document.createElement("style")).textContent=this.styles(),t.appendChild(document.createElement("slot"))}b(this,gn,"m",An).call(this,!1),v(this,yn,!0,"f"),b(this,gn,"m",kn).call(this)}disconnectedCallback(){Nn.delete(this),On.delete(this),b(this,bn,"f")?.abort()}async handleEvent(t){if(!this.control)return;const e=Sn(this),n="mouseenter"===t.type||"focus"===t.type&&(navigator.webdriver||this.control.matches(":focus-visible")),i="mouseleave"===t.type&&t.relatedTarget!==this.control&&t.relatedTarget!==this,s="keydown"===t.type&&"Escape"===t.key,o="mousedown"===t.type&&t.currentTarget===this.control,r="beforetoggle"===t.type&&t.currentTarget!==this,a=i||s||o||r;e&&s&&(t.stopImmediatePropagation(),t.preventDefault()),await Promise.resolve(),e||!n||Sn(this)?e&&a&&Sn(this)&&this.hidePopover():(v(this,En,"mouseenter"===t.type?"mouse":"focus","f"),this.showPopover()),"toggle"===t.type&&b(this,gn,"m",An).call(this,"open"===t.newState)}attributeChangedCallback(t){this.isConnected&&("for"===t?b(this,gn,"m",kn).call(this):"id"===t||"data-type"===t?b(this,gn,"m",Ln).call(this):"data-direction"===t&&b(this,gn,"m",Tn).call(this))}}var Hn,Fn;bn=new WeakMap,vn=new WeakMap,wn=new WeakMap,yn=new WeakMap,En=new WeakMap,gn=new WeakSet,An=function(t){t?(On.add(this),this.classList.remove(xn),In(this),b(this,gn,"m",Cn).call(this)):(On.delete(this),this.classList.remove(...Mn),this.classList.add(xn))},kn=function(){if(!this.control)return;this.setAttribute("role","tooltip"),b(this,bn,"f")?.abort(),v(this,bn,new AbortController,"f");const{signal:t}=b(this,bn,"f");this.addEventListener("mouseleave",this,{signal:t}),this.addEventListener("toggle",this,{signal:t}),this.control.addEventListener("mouseenter",this,{signal:t}),this.control.addEventListener("mouseleave",this,{signal:t}),this.control.addEventListener("focus",this,{signal:t}),this.control.addEventListener("mousedown",this,{signal:t}),this.control.popoverTargetElement?.addEventListener("beforetoggle",this,{signal:t}),this.ownerDocument.addEventListener("focusout",Dn),this.ownerDocument.addEventListener("focusin",Pn),this.ownerDocument.addEventListener("keydown",this,{signal:t,capture:!0})},Ln=function(){if(this.id&&this.control)if("label"===this.type){let t=this.control.getAttribute("aria-labelledby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-labelledby",t),this.setAttribute("aria-hidden","true")}else{let t=this.control.getAttribute("aria-describedby");t=t?t.split(" ").includes(this.id)?`${t}`:`${t} ${this.id}`:this.id,this.control.setAttribute("aria-describedby",t)}},Tn=function(){this.classList.remove(...Mn);const t=this.direction;"n"===t?(v(this,vn,"center","f"),v(this,wn,"outside-top","f")):"ne"===t?(v(this,vn,"end","f"),v(this,wn,"outside-top","f")):"e"===t?(v(this,vn,"center","f"),v(this,wn,"outside-right","f")):"se"===t?(v(this,vn,"end","f"),v(this,wn,"outside-bottom","f")):"s"===t?(v(this,vn,"center","f"),v(this,wn,"outside-bottom","f")):"sw"===t?(v(this,vn,"start","f"),v(this,wn,"outside-bottom","f")):"w"===t?(v(this,vn,"center","f"),v(this,wn,"outside-left","f")):"nw"===t&&(v(this,vn,"start","f"),v(this,wn,"outside-top","f"))},Cn=function(){if(!this.control)return;if(!b(this,yn,"f")||!Sn(this))return;const t=X(this,this.control,{side:b(this,wn,"f"),align:b(this,vn,"f"),anchorOffset:0}),e=t.anchorSide,n=t.anchorAlign;this.style.setProperty("--tool-tip-position-top",`${t.top}px`),this.style.setProperty("--tool-tip-position-left",`${t.left}px`);let i="s";i="outside-left"===e?"w":"outside-right"===e?"e":"outside-top"===e?"center"===n?"n":"start"===n?"ne":"nw":"center"===n?"s":"start"===n?"se":"sw",this.classList.add(`tooltip-${i}`)},ToolTipElement.observedAttributes=["data-type","data-direction","id","for"],window.customElements.get("tool-tip")||(window.ToolTipElement=ToolTipElement,window.customElements.define("tool-tip",ToolTipElement));let Vn=class XBannerElement extends HTMLElement{constructor(){super(...arguments),Hn.add(this)}dismiss(){if("remove"===b(this,Hn,"a",Fn)){const t=this.parentElement;if(!t)return;t.removeChild(this)}else this.hide();this.dispatchEvent(new CustomEvent("banner:dismiss"))}show(){this.style.setProperty("display","initial")}hide(){this.style.setProperty("display","none")}};Hn=new WeakSet,Fn=function(){return this.getAttribute("data-dismiss-scheme")},g([U],Vn.prototype,"titleText",void 0),Vn=g([j],Vn),window.customElements.get("x-banner")||(window.XBannerElement=Vn,window.customElements.define("x-banner",Vn));class qn{constructor(t,e,{tabInsertsSuggestions:n,defaultFirstOption:i,scrollIntoViewOptions:s}={}){this.input=t,this.list=e,this.tabInsertsSuggestions=null==n||n,this.defaultFirstOption=null!=i&&i,this.scrollIntoViewOptions=null!=s?s:{block:"nearest",inline:"nearest"},this.isComposing=!1,e.id||(e.id=`combobox-${Math.random().toString().slice(2,6)}`),this.ctrlBindings=!!navigator.userAgent.match(/Macintosh/),this.keyboardEventHandler=t=>function(t,e){if(t.shiftKey||t.metaKey||t.altKey)return;if(!e.ctrlBindings&&t.ctrlKey)return;if(e.isComposing)return;switch(t.key){case"Enter":Wn(e.input,e.list)&&t.preventDefault();break;case"Tab":e.tabInsertsSuggestions&&Wn(e.input,e.list)&&t.preventDefault();break;case"Escape":e.clearSelection();break;case"ArrowDown":e.navigate(1),t.preventDefault();break;case"ArrowUp":e.navigate(-1),t.preventDefault();break;case"n":e.ctrlBindings&&t.ctrlKey&&(e.navigate(1),t.preventDefault());break;case"p":e.ctrlBindings&&t.ctrlKey&&(e.navigate(-1),t.preventDefault());break;default:if(t.ctrlKey)break;e.clearSelection()}}(t,this),this.compositionEventHandler=t=>function(t,e){e.isComposing="compositionstart"===t.type;const n=document.getElementById(e.input.getAttribute("aria-controls")||"");if(!n)return;e.clearSelection()}(t,this),this.inputHandler=this.clearSelection.bind(this),t.setAttribute("role","combobox"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox")}destroy(){this.clearSelection(),this.stop(),this.input.removeAttribute("role"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-haspopup")}start(){this.input.setAttribute("aria-expanded","true"),this.input.addEventListener("compositionstart",this.compositionEventHandler),this.input.addEventListener("compositionend",this.compositionEventHandler),this.input.addEventListener("input",this.inputHandler),this.input.addEventListener("keydown",this.keyboardEventHandler),this.list.addEventListener("click",Rn),this.indicateDefaultOption()}stop(){this.clearSelection(),this.input.setAttribute("aria-expanded","false"),this.input.removeEventListener("compositionstart",this.compositionEventHandler),this.input.removeEventListener("compositionend",this.compositionEventHandler),this.input.removeEventListener("input",this.inputHandler),this.input.removeEventListener("keydown",this.keyboardEventHandler),this.list.removeEventListener("click",Rn)}indicateDefaultOption(){var t;this.defaultFirstOption&&(null===(t=Array.from(this.list.querySelectorAll('[role="option"]:not([aria-disabled="true"])')).filter($n)[0])||void 0===t||t.setAttribute("data-combobox-option-default","true"))}navigate(t=1){const e=Array.from(this.list.querySelectorAll('[aria-selected="true"]')).filter($n)[0],n=Array.from(this.list.querySelectorAll('[role="option"]')).filter($n),i=n.indexOf(e);if(i===n.length-1&&1===t||0===i&&-1===t)return this.clearSelection(),void this.input.focus();let s=1===t?0:n.length-1;if(e&&i>=0){const e=i+t;e>=0&&e<n.length&&(s=e)}const o=n[s];if(o)for(const t of n)t.removeAttribute("data-combobox-option-default"),o===t?(this.input.setAttribute("aria-activedescendant",o.id),o.setAttribute("aria-selected","true"),Bn(o),o.scrollIntoView(this.scrollIntoViewOptions)):t.removeAttribute("aria-selected")}clearSelection(){this.input.removeAttribute("aria-activedescendant");for(const t of this.list.querySelectorAll('[aria-selected="true"]'))t.removeAttribute("aria-selected");this.indicateDefaultOption()}}function Rn(t){if(!(t.target instanceof Element))return;const e=t.target.closest('[role="option"]');e&&"true"!==e.getAttribute("aria-disabled")&&function(t,e){t.dispatchEvent(new CustomEvent("combobox-commit",{bubbles:!0,detail:e}))}(e,{event:t})}function Wn(t,e){const n=e.querySelector('[aria-selected="true"], [data-combobox-option-default="true"]');return!!n&&("true"===n.getAttribute("aria-disabled")||n.click(),!0)}function Bn(t){t.dispatchEvent(new Event("combobox-select",{bubbles:!0}))}function $n(t){return!t.hidden&&!(t instanceof HTMLInputElement&&"hidden"===t.type)&&(t.offsetWidth>0||t.offsetHeight>0)}const Un=window.testScreenReaderDelay||100;class Kn{constructor(t,e,n,i=!1){var s;if(this.container=t,this.input=e,this.results=n,this.combobox=new qn(e,n,{defaultFirstOption:i}),this.feedback=t.getRootNode().getElementById(`${this.results.id}-feedback`),this.autoselectEnabled=i,this.clearButton=t.getRootNode().getElementById(`${this.input.id||this.input.name}-clear`),this.clientOptions=n.querySelectorAll("[role=option]"),this.feedback&&(this.feedback.setAttribute("aria-live","polite"),this.feedback.setAttribute("aria-atomic","true")),this.clearButton&&!this.clearButton.getAttribute("aria-label")){const t=document.querySelector(`label[for="${this.input.name}"]`);this.clearButton.setAttribute("aria-label","clear:"),this.clearButton.setAttribute("aria-labelledby",`${this.clearButton.id} ${(null==t?void 0:t.id)||""}`)}this.input.getAttribute("aria-expanded")||this.input.setAttribute("aria-expanded","false"),this.results.popover?this.results.matches(":popover-open")&&this.results.hidePopover():this.results.hidden=!0,this.results.getAttribute("aria-label")||this.results.setAttribute("aria-label","results"),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("spellcheck","false"),this.interactingWithList=!1,this.onInputChange=function(t,e=0){let n;return function(...i){clearTimeout(n),n=window.setTimeout(()=>{clearTimeout(n),t(...i)},e)}}(this.onInputChange.bind(this),300),this.onResultsMouseDown=this.onResultsMouseDown.bind(this),this.onInputBlur=this.onInputBlur.bind(this),this.onInputFocus=this.onInputFocus.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onCommit=this.onCommit.bind(this),this.handleClear=this.handleClear.bind(this),this.input.addEventListener("keydown",this.onKeydown),this.input.addEventListener("focus",this.onInputFocus),this.input.addEventListener("blur",this.onInputBlur),this.input.addEventListener("input",this.onInputChange),this.results.addEventListener("mousedown",this.onResultsMouseDown),this.results.addEventListener("combobox-commit",this.onCommit),null===(s=this.clearButton)||void 0===s||s.addEventListener("click",this.handleClear)}destroy(){this.input.removeEventListener("keydown",this.onKeydown),this.input.removeEventListener("focus",this.onInputFocus),this.input.removeEventListener("blur",this.onInputBlur),this.input.removeEventListener("input",this.onInputChange),this.results.removeEventListener("mousedown",this.onResultsMouseDown),this.results.removeEventListener("combobox-commit",this.onCommit)}handleClear(t){t.preventDefault(),"true"===this.input.getAttribute("aria-expanded")&&(this.input.setAttribute("aria-expanded","false"),this.updateFeedbackForScreenReaders("Results hidden.")),this.input.value="",this.container.value="",this.input.focus(),this.input.dispatchEvent(new Event("change")),this.close()}onKeydown(t){if("Escape"===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowUp"===t.key&&this.container.open)this.close(),t.stopPropagation(),t.preventDefault();else if(t.altKey&&"ArrowDown"===t.key&&!this.container.open){if(!this.input.value.trim())return;this.open(),t.stopPropagation(),t.preventDefault()}}onInputFocus(){this.interactingWithList||this.fetchResults()}onInputBlur(){this.interactingWithList||this.close()}onCommit({target:t}){const e=t;if(!(e instanceof HTMLElement))return;if(this.close(),e instanceof HTMLAnchorElement)return;const n=e.getAttribute("data-autocomplete-value")||e.textContent;this.updateFeedbackForScreenReaders(`${e.textContent||""} selected.`),this.container.value=n,n||this.updateFeedbackForScreenReaders("Results hidden.")}onResultsMouseDown(){this.interactingWithList=!0}onInputChange(){this.feedback&&this.feedback.textContent&&(this.feedback.textContent=""),this.container.removeAttribute("value"),this.fetchResults()}identifyOptions(){let t=0;for(const e of this.results.querySelectorAll('[role="option"]:not([id])'))e.id=`${this.results.id}-option-${t++}`}updateFeedbackForScreenReaders(t){setTimeout(()=>{this.feedback&&(this.feedback.textContent=t)},Un)}fetchResults(){const t=this.input.value.trim();if(!t&&!this.container.fetchOnEmpty)return void this.close();const e=this.container.src;if(!e)return;const n=new URL(e,window.location.href),i=new URLSearchParams(n.search.slice(1));i.append("q",t),n.search=i.toString(),this.container.dispatchEvent(new CustomEvent("loadstart")),this.container.fetchResult(n).then(t=>{this.results.innerHTML=t,this.identifyOptions(),this.combobox.indicateDefaultOption();const e=this.results.querySelectorAll('[role="option"]'),n=!!e.length||!!this.results.querySelectorAll('[data-no-result-found="true"]').length,i=e.length,[s]=e,o=null==s?void 0:s.textContent;this.autoselectEnabled&&o?this.updateFeedbackForScreenReaders(`${i} results. ${o} is the top result: Press Enter to activate.`):this.updateFeedbackForScreenReaders(`${i||"No"} results.`),n?this.open():this.close(),this.container.dispatchEvent(new CustomEvent("load")),this.container.dispatchEvent(new CustomEvent("loadend"))}).catch(()=>{this.container.dispatchEvent(new CustomEvent("error")),this.container.dispatchEvent(new CustomEvent("loadend"))})}open(){(this.results.popover?!this.results.matches(":popover-open"):this.results.hidden)&&(this.combobox.start(),this.results.popover?this.results.showPopover():this.results.hidden=!1),this.container.open=!0,this.interactingWithList=!0}close(){(this.results.popover?this.results.matches(":popover-open"):!this.results.hidden)&&(this.combobox.stop(),this.results.popover?this.results.hidePopover():this.results.hidden=!0),this.container.open=!1,this.interactingWithList=!1}}var jn,zn,Zn,_n,Yn,Gn=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},Xn=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n},Jn=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};const Qn=globalThis.HTMLElement||null;class ti extends Event{constructor(t,e){var{relatedTarget:n}=e;super(t,Jn(e,["relatedTarget"])),this.relatedTarget=n}}const ei=new WeakMap;let ni=null;class AutoCompleteElement extends Qn{constructor(){super(...arguments),jn.add(this),zn.set(this,null),Zn.set(this,null),Yn.set(this,void 0)}static define(t="auto-complete",e=customElements){return e.define(t,this),this}static setCSPTrustedTypesPolicy(t){ni=null===t?t:Promise.resolve(t)}get forElement(){var t;if(null===(t=Gn(this,zn,"f"))||void 0===t?void 0:t.isConnected)return Gn(this,zn,"f");const e=this.getAttribute("for"),n=this.getRootNode();return e&&(n instanceof Document||n instanceof ShadowRoot)?n.getElementById(e):null}set forElement(t){Xn(this,zn,t,"f"),this.setAttribute("for","")}get inputElement(){var t;return(null===(t=Gn(this,Zn,"f"))||void 0===t?void 0:t.isConnected)?Gn(this,Zn,"f"):this.querySelector("input")}set inputElement(t){Xn(this,Zn,t,"f"),Gn(this,jn,"m",_n).call(this)}connectedCallback(){this.isConnected&&(Gn(this,jn,"m",_n).call(this),new MutationObserver(()=>{ei.get(this)||Gn(this,jn,"m",_n).call(this)}).observe(this,{subtree:!0,childList:!0}))}disconnectedCallback(){const t=ei.get(this);t&&(t.destroy(),ei.delete(this))}get src(){return this.getAttribute("src")||""}set src(t){this.setAttribute("src",t)}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}get open(){return this.hasAttribute("open")}set open(t){t?this.setAttribute("open",""):this.removeAttribute("open")}get fetchOnEmpty(){return this.hasAttribute("fetch-on-empty")}set fetchOnEmpty(t){this.toggleAttribute("fetch-on-empty",t)}async fetchResult(t){var e;null===(e=Gn(this,Yn,"f"))||void 0===e||e.abort();const{signal:n}=Xn(this,Yn,new AbortController,"f"),i=await fetch(t.toString(),{signal:n,headers:{Accept:"text/fragment+html"}});if(!i.ok)throw new Error(await i.text());if(ni){return(await ni).createHTML(await i.text(),i)}return await i.text()}static get observedAttributes(){return["open","value","for"]}attributeChangedCallback(t,e,n){var i,s;if(e===n)return;const o=ei.get(this);if(o)switch(this.forElement===(null===(i=ei.get(this))||void 0===i?void 0:i.results)&&this.inputElement===(null===(s=ei.get(this))||void 0===s?void 0:s.input)||Gn(this,jn,"m",_n).call(this),t){case"open":null===n?o.close():o.open();break;case"value":null!==n&&(o.input.value=n),this.dispatchEvent(new ti("auto-complete-change",{bubbles:!0,relatedTarget:o.input}))}}}zn=new WeakMap,Zn=new WeakMap,Yn=new WeakMap,jn=new WeakSet,_n=function(){var t;null===(t=ei.get(this))||void 0===t||t.destroy();const{forElement:e,inputElement:n}=this;if(!e||!n)return;const i="true"===this.getAttribute("data-autoselect");ei.set(this,new Kn(this,n,e,i)),e.setAttribute("role","listbox")};const ii="undefined"!=typeof globalThis?globalThis:window;try{ii.AutocompleteElement=ii.AutoCompleteElement=AutoCompleteElement.define()}catch(t){if(!(ii.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function si(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t.textContent||"");const e=getSelection();if(null==e)return Promise.reject(new Error);e.removeAllRanges();const n=document.createRange();return n.selectNodeContents(t),e.addRange(n),document.execCommand("copy"),e.removeAllRanges(),Promise.resolve()}function oi(t){if("clipboard"in navigator)return navigator.clipboard.writeText(t);const e=document.body;if(!e)return Promise.reject(new Error);const n=function(t){const e=document.createElement("pre");return e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="5px",e.textContent=t,e}(t);return e.appendChild(n),si(n),e.removeChild(n),Promise.resolve()}async function ri(t){const e=t.getAttribute("for"),n=t.getAttribute("value");function i(){t.dispatchEvent(new CustomEvent("clipboard-copy",{bubbles:!0}))}var s;if("true"!==t.getAttribute("aria-disabled"))if(n)await oi(n),i();else if(e){const n="getRootNode"in Element.prototype?t.getRootNode():t.ownerDocument;if(!(n instanceof Document||"ShadowRoot"in window&&n instanceof ShadowRoot))return;const o=n.getElementById(e);o&&(await(s=o,s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement?oi(s.value):s instanceof HTMLAnchorElement&&s.hasAttribute("href")?oi(s.href):si(s)),i())}}function ai(t){const e=t.currentTarget;e instanceof HTMLElement&&ri(e)}function li(t){if(" "===t.key||"Enter"===t.key){const e=t.currentTarget;e instanceof HTMLElement&&(t.preventDefault(),ri(e))}}function ci(t){t.currentTarget.addEventListener("keydown",li)}function di(t){t.currentTarget.removeEventListener("keydown",li)}class ClipboardCopyElement extends HTMLElement{static define(t="clipboard-copy",e=customElements){return e.define(t,this),this}constructor(){super(),this.addEventListener("click",ai),this.addEventListener("focus",ci),this.addEventListener("blur",di)}connectedCallback(){this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.hasAttribute("role")||this.setAttribute("role","button")}get value(){return this.getAttribute("value")||""}set value(t){this.setAttribute("value",t)}}const hi="undefined"!=typeof globalThis?globalThis:window;try{hi.ClipboardCopyElement=ClipboardCopyElement.define()}catch(t){if(!(hi.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}function ui(t){t.style.display="inline-block"}function fi(t){t.style.display="none"}const mi=new WeakMap;document.addEventListener("clipboard-copy",({target:t})=>{if(!(t instanceof HTMLElement))return;if(!t.hasAttribute("data-view-component"))return;const e=mi.get(t),n=t.parentNode?.querySelector("[data-clipboard-copy-feedback]"),i="Copied!";e?(clearTimeout(e),mi.delete(t)):(!function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(fi(e),ui(n))}(t),n&&(n.textContent===i?n.textContent=`${i} `:n.textContent=i)),mi.set(t,setTimeout(()=>{!function(t){const[e,n]=t.querySelectorAll(".octicon");e&&n&&(ui(e),fi(n))}(t),mi.delete(t)},2e3))});var pi,gi=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n},bi=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)};const vi="undefined"!=typeof Intl&&Intl.ListFormat||class{formatToParts(t){const e=[];for(const n of t)e.push({type:"element",value:n}),e.push({type:"literal",value:", "});return e.slice(0,-1)}},wi=[["years","year"],["months","month"],["weeks","week"],["days","day"],["hours","hour"],["minutes","minute"],["seconds","second"],["milliseconds","millisecond"]],yi={minimumIntegerDigits:2};class Ei{constructor(t,e={}){pi.set(this,void 0);let n=String(e.style||"short");"long"!==n&&"short"!==n&&"narrow"!==n&&"digital"!==n&&(n="short");let i="digital"===n?"numeric":n;const s=e.hours||i;i="2-digit"===s?"numeric":s;const o=e.minutes||i;i="2-digit"===o?"numeric":o;const r=e.seconds||i;i="2-digit"===r?"numeric":r;const a=e.milliseconds||i;gi(this,pi,{locale:t,style:n,years:e.years||"digital"===n?"short":n,yearsDisplay:"always"===e.yearsDisplay?"always":"auto",months:e.months||"digital"===n?"short":n,monthsDisplay:"always"===e.monthsDisplay?"always":"auto",weeks:e.weeks||"digital"===n?"short":n,weeksDisplay:"always"===e.weeksDisplay?"always":"auto",days:e.days||"digital"===n?"short":n,daysDisplay:"always"===e.daysDisplay?"always":"auto",hours:s,hoursDisplay:"always"===e.hoursDisplay||"digital"===n?"always":"auto",minutes:o,minutesDisplay:"always"===e.minutesDisplay||"digital"===n?"always":"auto",seconds:r,secondsDisplay:"always"===e.secondsDisplay||"digital"===n?"always":"auto",milliseconds:a,millisecondsDisplay:"always"===e.millisecondsDisplay?"always":"auto"},"f")}resolvedOptions(){return bi(this,pi,"f")}formatToParts(t){const e=[],n=bi(this,pi,"f"),i=n.style,s=n.locale;for(const[o,r]of wi){const a=t[o];if("auto"===n[`${o}Display`]&&!a)continue;const l=n[o],c="2-digit"===l?yi:"numeric"===l?{}:{style:"unit",unit:r,unitDisplay:l};let d=new Intl.NumberFormat(s,c).format(a);"months"===o&&("narrow"===l||"narrow"===i&&d.endsWith("m"))&&(d=d.replace(/(\d+)m$/,"$1mo")),e.push(d)}return new vi(s,{type:"unit",style:"digital"===i?"short":i}).formatToParts(e)}format(t){return this.formatToParts(t).map(t=>t.value).join("")}}pi=new WeakMap;const Ai=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/,ki=["year","month","week","day","hour","minute","second","millisecond"];class Li{constructor(t=0,e=0,n=0,i=0,s=0,o=0,r=0,a=0){this.years=t,this.months=e,this.weeks=n,this.days=i,this.hours=s,this.minutes=o,this.seconds=r,this.milliseconds=a,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=0===this.sign}abs(){return new Li(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(t){var e;if("string"==typeof t){const n=String(t).trim(),i=n.startsWith("-")?-1:1,s=null===(e=n.match(Ai))||void 0===e?void 0:e.slice(1).map(t=>(Number(t)||0)*i);return s?new Li(...s):new Li}if("object"==typeof t){const{years:e,months:n,weeks:i,days:s,hours:o,minutes:r,seconds:a,milliseconds:l}=t;return new Li(e,n,i,s,o,r,a,l)}throw new RangeError("invalid duration")}static compare(t,e){const n=Date.now(),i=Math.abs(Ti(n,Li.from(t)).getTime()-n),s=Math.abs(Ti(n,Li.from(e)).getTime()-n);return i>s?-1:i<s?1:0}toLocaleString(t,e){return new Ei(t,e).format(this)}}function Ti(t,e){const n=new Date(t);return e.sign<0?(n.setUTCSeconds(n.getUTCSeconds()+e.seconds),n.setUTCMinutes(n.getUTCMinutes()+e.minutes),n.setUTCHours(n.getUTCHours()+e.hours),n.setUTCDate(n.getUTCDate()+7*e.weeks+e.days),n.setUTCMonth(n.getUTCMonth()+e.months),n.setUTCFullYear(n.getUTCFullYear()+e.years)):(n.setUTCFullYear(n.getUTCFullYear()+e.years),n.setUTCMonth(n.getUTCMonth()+e.months),n.setUTCDate(n.getUTCDate()+7*e.weeks+e.days),n.setUTCHours(n.getUTCHours()+e.hours),n.setUTCMinutes(n.getUTCMinutes()+e.minutes),n.setUTCSeconds(n.getUTCSeconds()+e.seconds)),n}function Ci(t,{relativeTo:e=Date.now()}={}){if(e=new Date(e),t.blank)return t;const n=t.sign;let i=Math.abs(t.years),s=Math.abs(t.months),o=Math.abs(t.weeks),r=Math.abs(t.days),a=Math.abs(t.hours),l=Math.abs(t.minutes),c=Math.abs(t.seconds),d=Math.abs(t.milliseconds);d>=900&&(c+=Math.round(d/1e3)),(c||l||a||r||o||s||i)&&(d=0),c>=55&&(l+=Math.round(c/60)),(l||a||r||o||s||i)&&(c=0),l>=55&&(a+=Math.round(l/60)),(a||r||o||s||i)&&(l=0),r&&a>=12&&(r+=Math.round(a/24)),!r&&a>=21&&(r+=Math.round(a/24)),(r||o||s||i)&&(a=0);const h=e.getFullYear(),u=e.getMonth(),f=e.getDate();if(r>=27||i+s+r){const t=new Date(e);t.setDate(1),t.setMonth(u+s*n+1),t.setDate(0);const a=Math.max(0,f-t.getDate()),l=new Date(e);l.setFullYear(h+i*n),l.setDate(f-a),l.setMonth(u+s*n),l.setDate(f-a+r*n);const c=l.getFullYear()-e.getFullYear(),d=l.getMonth()-e.getMonth(),m=Math.abs(Math.round((Number(l)-Number(e))/864e5))+a,p=Math.abs(12*c+d);m<27?(r>=6?(o+=Math.round(r/7),r=0):r=m,s=i=0):p<=11?(s=p,i=0):(s=0,i=c*n),(s||i)&&(r=0)}return i&&(s=0),o>=4&&(s+=Math.round(o/4)),(s||i)&&(o=0),r&&o&&!s&&!i&&(o+=Math.round(r/7),r=0),new Li(i*n,s*n,o*n,r*n,a*n,l*n,c*n,d*n)}var Si,xi,Mi,Ii,Di,Pi,Ni,Oi,Hi,Fi,Vi,qi,Ri,Wi,Bi=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},$i=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};const Ui=globalThis.HTMLElement||null,Ki=new Li,ji=new Li(0,0,0,0,0,1);class zi extends Event{constructor(t,e,n,i){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=n,this.newTitle=i}}function Zi(t){if(!t.date)return 1/0;if("duration"===t.format||"elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const e=Math.abs(Date.now()-t.date.getTime());return e<6e4?1e3:e<36e5?6e4:36e5}const _i=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(t){if(this.elements.has(t))return;this.elements.add(t);const e=t.date;if(e&&e.getTime()){const e=Zi(t),n=Date.now()+e;n<this.time&&(clearTimeout(this.timer),this.timer=setTimeout(()=>this.update(),e),this.time=n)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;for(const e of this.elements)t=Math.min(t,Zi(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout(()=>this.update(),this.time),this.time+=Date.now()}};class RelativeTimeElement extends Ui{constructor(){super(...arguments),Si.add(this),xi.set(this,!1),Mi.set(this,!1),Di.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this),Wi.set(this,null)}static define(t="relative-time",e=customElements){return e.define(t,this),this}get timeZone(){var t;return(null===(t=this.closest("[time-zone]"))||void 0===t?void 0:t.getAttribute("time-zone"))||this.ownerDocument.documentElement.getAttribute("time-zone")||void 0}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","format-style","no-title","datetime","lang","title","aria-hidden","time-zone"]}get onRelativeTimeUpdated(){return Bi(this,Wi,"f")}set onRelativeTimeUpdated(t){Bi(this,Wi,"f")&&this.removeEventListener("relative-time-updated",Bi(this,Wi,"f")),$i(this,Wi,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("relative-time-updated",t)}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");return"long"===t||"short"===t||"narrow"===t?t:"datetime"===this.format&&""!==t?this.formatStyle:void 0}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){const t=this.format;let e=this.getAttribute("month");if(""!==e)return null!=e||(e="datetime"===t?this.formatStyle:"short"),"numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e?e:void 0}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("year",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"datetime"===this.format?"":"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&(e=t,Ai.test(e))?t:"P30D";var e}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return ki.includes(t)?t:"micro"===this.format?"minute":"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"datetime"===t?"datetime":"relative"===t?"relative":"duration"===t?"duration":"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get formatStyle(){const t=this.getAttribute("format-style");if("long"===t)return"long";if("short"===t)return"short";if("narrow"===t)return"narrow";const e=this.format;return"elapsed"===e||"micro"===e?"narrow":"datetime"===e?"short":"long"}set formatStyle(t){this.setAttribute("format-style",t)}get noTitle(){return this.hasAttribute("no-title")}set noTitle(t){this.toggleAttribute("no-title",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){_i.unobserve(this)}attributeChangedCallback(t,e,n){e!==n&&("title"===t&&$i(this,xi,null!==n&&(this.date&&Bi(this,Si,"m",Pi).call(this,this.date))!==n,"f"),Bi(this,Mi,"f")||"title"===t&&Bi(this,xi,"f")||$i(this,Mi,(async()=>{await Promise.resolve(),this.update(),$i(this,Mi,!1,"f")})(),"f"))}update(){const t=Bi(this,Di,"f").textContent||this.textContent||"",e=this.getAttribute("title")||"";let n=e;const i=this.date;if("undefined"==typeof Intl||!Intl.DateTimeFormat||!i)return void(Bi(this,Di,"f").textContent=t);const s=Date.now();Bi(this,xi,"f")||(n=Bi(this,Si,"m",Pi).call(this,i)||"",n&&!this.noTitle&&this.setAttribute("title",n));const o=function(t,e="second",n=Date.now()){const i=t.getTime()-n;if(0===i)return new Li;const s=Math.sign(i),o=Math.abs(i),r=Math.floor(o/1e3),a=Math.floor(r/60),l=Math.floor(a/60),c=Math.floor(l/24),d=Math.floor(c/30),h=Math.floor(d/12),u=ki.indexOf(e)||ki.length;return new Li(u>=0?h*s:0,u>=1?(d-12*h)*s:0,0,u>=3?(c-30*d)*s:0,u>=4?(l-24*c)*s:0,u>=5?(a-60*l)*s:0,u>=6?(r-60*a)*s:0,u>=7?(o-1e3*r)*s:0)}(i,this.precision,s),r=Bi(this,Si,"m",Ni).call(this,o);let a=t;const l=Bi(this,Si,"m",Ri).call(this,r);a=l?Bi(this,Si,"m",Vi).call(this,i):"duration"===r?Bi(this,Si,"m",Oi).call(this,o):"relative"===r?Bi(this,Si,"m",Hi).call(this,o):Bi(this,Si,"m",Fi).call(this,i),a?Bi(this,Si,"m",qi).call(this,a):this.shadowRoot===Bi(this,Di,"f")&&this.textContent&&Bi(this,Si,"m",qi).call(this,this.textContent),a===t&&n===e||this.dispatchEvent(new zi(t,a,e,n)),"relative"!==r&&"duration"!==r||l?_i.unobserve(this):_i.observe(this)}}xi=new WeakMap,Mi=new WeakMap,Di=new WeakMap,Wi=new WeakMap,Si=new WeakSet,Ii=function(){var t;const e=(null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))||this.ownerDocument.documentElement.getAttribute("lang");try{return new Intl.Locale(null!=e?e:"").toString()}catch(t){return"default"}},Pi=function(t){return new Intl.DateTimeFormat(Bi(this,Si,"a",Ii),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short",timeZone:this.timeZone}).format(t)},Ni=function(t){const e=this.format;if("datetime"===e)return"datetime";if("duration"===e)return"duration";if("elapsed"===e)return"duration";if("micro"===e)return"duration";if(("auto"===e||"relative"===e)&&"undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const e=this.tense;if("past"===e||"future"===e)return"relative";if(1===Li.compare(t,this.threshold))return"relative"}return"datetime"},Oi=function(t){const e=Bi(this,Si,"a",Ii),n=this.format,i=this.formatStyle,s=this.tense;let o=Ki;"micro"===n?(t=Ci(t),o=ji,0===t.months&&("past"===this.tense&&-1!==t.sign||"future"===this.tense&&1!==t.sign)&&(t=ji)):("past"===s&&-1!==t.sign||"future"===s&&1!==t.sign)&&(t=o);const r=`${this.precision}sDisplay`;return t.blank?o.toLocaleString(e,{style:i,[r]:"always"}):t.abs().toLocaleString(e,{style:i})},Hi=function(t){const e=new Intl.RelativeTimeFormat(Bi(this,Si,"a",Ii),{numeric:"auto",style:this.formatStyle}),n=this.tense;"future"===n&&1!==t.sign&&(t=Ki),"past"===n&&-1!==t.sign&&(t=Ki);const[i,s]=function(t,e){const n=Ci(t,e);if(n.blank)return[0,"second"];for(const t of ki){if("millisecond"===t)continue;const e=n[`${t}s`];if(e)return[e,t]}return[0,"second"]}(t);return"second"===s&&i<10?e.format(0,"millisecond"===this.precision?"second":this.precision):e.format(i,s)},Fi=function(t){const e=new Intl.DateTimeFormat(Bi(this,Si,"a",Ii),{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName,timeZone:this.timeZone});return`${this.prefix} ${e.format(t)}`.trim()},Vi=function(t){return new Intl.DateTimeFormat(Bi(this,Si,"a",Ii),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short",timeZone:this.timeZone}).format(t)},qi=function(t){if(this.hasAttribute("aria-hidden")&&"true"===this.getAttribute("aria-hidden")){const e=document.createElement("span");e.setAttribute("aria-hidden","true"),e.textContent=t,Bi(this,Di,"f").replaceChildren(e)}else Bi(this,Di,"f").textContent=t},Ri=function(t){var e;return"duration"!==t&&("true"===this.ownerDocument.documentElement.getAttribute("data-prefers-absolute-time")||"true"===(null===(e=this.ownerDocument.body)||void 0===e?void 0:e.getAttribute("data-prefers-absolute-time")))};const Yi="undefined"!=typeof globalThis?globalThis:window;try{Yi.RelativeTimeElement=RelativeTimeElement.define()}catch(t){if(!(Yi.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}var Gi,Xi,Ji,Qi,ts=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n},es=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},ns=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(i=Object.getOwnPropertySymbols(t);s<i.length;s++)e.indexOf(i[s])<0&&Object.prototype.propertyIsEnumerable.call(t,i[s])&&(n[i[s]]=t[i[s]])}return n};const is=globalThis.HTMLElement||null;function ss(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter(e=>e instanceof is&&e.closest(t.tagName)===t)}class os extends Event{constructor(t,e){var{tab:n,panel:i}=e;super(t,ns(e,["tab","panel"])),Gi.set(this,null),Xi.set(this,null),ts(this,Xi,n||null,"f"),ts(this,Gi,i||null,"f")}get detail(){return console.warn("TabContainerElement.detail is deprecated, please use .panel instead"),{relatedTarget:es(this,Gi,"f")}}get panel(){return es(this,Gi,"f")}get tab(){return es(this,Xi,"f")}}Gi=new WeakMap,Xi=new WeakMap;class TabContainerElement extends is{constructor(){super(...arguments),Ji.set(this,null),Qi.set(this,null)}static define(t="tab-container",e=customElements){return e.define(t,this),this}get onTabContainerChange(){return es(this,Ji,"f")}set onTabContainerChange(t){es(this,Ji,"f")&&this.removeEventListener("tab-container-change",es(this,Ji,"f")),ts(this,Ji,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("tab-container-change",t)}get onTabContainerChanged(){return es(this,Qi,"f")}set onTabContainerChanged(t){es(this,Qi,"f")&&this.removeEventListener("tab-container-changed",es(this,Qi,"f")),ts(this,Qi,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("tab-container-changed",t)}connectedCallback(){this.addEventListener("keydown",t=>{var e;const n=t.target;if(!(n instanceof is))return;if(n.closest(this.tagName)!==this)return;if("tab"!==n.getAttribute("role")&&!n.closest('[role="tablist"]'))return;const i=ss(this),s=i.indexOf(i.find(t=>t.matches('[aria-selected="true"]'))),[o,r]="vertical"===(null===(e=n.closest('[role="tablist"]'))||void 0===e?void 0:e.getAttribute("aria-orientation"))?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(o.some(e=>t.code===e)){let t=s+1;t>=i.length&&(t=0),this.selectTab(t)}else if(r.some(e=>t.code===e)){let t=s-1;t<0&&(t=i.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(i.length-1),t.preventDefault())}),this.addEventListener("click",t=>{const e=ss(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const n=t.target.closest('[role="tab"]');if(!(n instanceof is&&n.closest('[role="tablist"]')))return;const i=e.indexOf(n);this.selectTab(i)});for(const t of ss(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=ss(this),n=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter(t=>t.closest(this.tagName)===this);if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const i=e[t],s=n[t];if(!!this.dispatchEvent(new os("tab-container-change",{bubbles:!0,cancelable:!0,tab:i,panel:s}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of n)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");i.setAttribute("aria-selected","true"),i.setAttribute("tabindex","0"),i.focus(),s.hidden=!1,this.dispatchEvent(new os("tab-container-changed",{bubbles:!0,tab:i,panel:s}))}}}Ji=new WeakMap,Qi=new WeakMap;const rs="undefined"!=typeof globalThis?globalThis:window;try{rs.TabContainerElement=TabContainerElement.define()}catch(t){if(!(rs.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}let as=class PrimerMultiInputElement extends HTMLElement{activateField(t){const e=this.findField(t);if(e){for(const t of this.fields)t!==e&&(t.setAttribute("disabled","disabled"),t.setAttribute("hidden","hidden"),t.parentElement?.setAttribute("hidden","hidden"));e.removeAttribute("disabled"),e.removeAttribute("hidden"),e.parentElement?.removeAttribute("hidden")}}findField(t){for(const e of this.fields)if(e.getAttribute("data-name")===t)return e;return null}};function ls(t,e=0,{start:n=!1,middle:i=!1,once:s=!1}={}){return function(t,e=0,{start:n=!0,middle:i=!0,once:s=!1}={}){let o,r=n,a=0,l=!1;function c(...d){if(l)return;const h=Date.now()-a;a=Date.now(),n&&i&&h>=e&&(r=!0),r?(r=!1,t.apply(this,d),s&&c.cancel()):(i&&h<e||!i)&&(clearTimeout(o),o=setTimeout(()=>{a=Date.now(),t.apply(this,d),s&&c.cancel()},i?e-h:e))}return c.cancel=()=>{clearTimeout(o),l=!0},c}(t,e,{start:n,middle:i,once:s})}g([K],as.prototype,"fields",void 0),as=g([j],as),window.customElements.get("primer-multi-input")||(Object.assign(window,{PrimerMultiInputElement:as}),window.customElements.define("primer-multi-input",as));var cs,ds,hs=function(t,e,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(t):i?i.value:e.get(t)},us=function(t,e,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(t,n):s?s.value=n:e.set(t,n),n};!function(t){t.GET="GET",t.POST="POST"}(ds||(ds={}));const fs=new WeakMap;class ms extends Event{constructor(t){super(`auto-check-${t}`,{bubbles:!0}),this.phase=t}get detail(){return this}}class ps extends ms{constructor(t,e=""){super(t),this.phase=t,this.message=e,this.setValidity=t=>{this.message=t}}}class gs extends ms{constructor(){super("complete")}}class bs extends ms{constructor(t){super("success"),this.response=t}}class vs extends ps{constructor(){super("start","Verifying…")}}class ws extends ps{constructor(t){super("error","Validation failed"),this.response=t}}class ys extends ms{constructor(t){super("send"),this.body=t}}class AutoCheckElement extends HTMLElement{constructor(){super(...arguments),cs.set(this,null)}static define(t="auto-check",e=customElements){return e.define(t,this),this}get onloadend(){return hs(this,cs,"f")}set onloadend(t){hs(this,cs,"f")&&this.removeEventListener("loadend",hs(this,cs,"f")),us(this,cs,"object"==typeof t||"function"==typeof t?t:null,"f"),"function"==typeof t&&this.addEventListener("loadend",t)}connectedCallback(){const t=this.input;if(!t)return;const e=ls(ks.bind(null,this),300),n={check:e,controller:null};fs.set(this,n);const i=Es.bind(null,e);t.addEventListener("blur",i),t.addEventListener("input",i),t.addEventListener("triggervalidation",i),t.autocomplete="off",t.spellcheck=!1}disconnectedCallback(){const t=this.input;if(!t)return;const e=fs.get(this);e&&(fs.delete(this),t.removeEventListener("input",As),t.removeEventListener("input",e.check),t.setCustomValidity(""))}attributeChangedCallback(t){if("required"===t){const t=this.input;if(!t)return;t.required=this.required}}triggerValidation(){const t=this.input;t&&t.dispatchEvent(new CustomEvent("triggervalidation"))}static get observedAttributes(){return["required"]}get input(){return this.querySelector("input")}get src(){const t=this.getAttribute("src");if(!t)return"";const e=this.ownerDocument.createElement("a");return e.href=t,e.href}set src(t){this.setAttribute("src",t)}get csrf(){const t=this.querySelector("[data-csrf]");return this.getAttribute("csrf")||t instanceof HTMLInputElement&&t.value||""}set csrf(t){this.setAttribute("csrf",t)}get required(){return this.hasAttribute("required")}set required(t){t?this.setAttribute("required",""):this.removeAttribute("required")}get csrfField(){return this.getAttribute("csrf-field")||"authenticity_token"}set csrfField(t){this.setAttribute("csrf-field",t)}get httpMethod(){return ds[this.getAttribute("http-method")]||"POST"}set validateOnKeystroke(t){t?this.setAttribute("validate-on-keystroke",""):this.removeAttribute("validate-on-keystroke")}get validateOnKeystroke(){const t=this.getAttribute("validate-on-keystroke");return"true"===t||""===t}}function Es(t,e){const n=e.currentTarget;if(!(n instanceof HTMLInputElement))return;const i=n.closest("auto-check");i instanceof AutoCheckElement&&("input"===e.type&&i.setAttribute("dirty",""),0!==n.value.length&&("blur"===e.type&&!i.validateOnKeystroke&&i.hasAttribute("dirty")||"input"===e.type&&i.validateOnKeystroke||"triggervalidation"===e.type)&&(As(e),t()))}function As(t){const e=t.currentTarget;if(!(e instanceof HTMLInputElement))return;const n=e.closest("auto-check");if(!(n instanceof AutoCheckElement))return;const i=n.src,s=n.csrf,o=n.httpMethod,r=fs.get(n);if(!i||"POST"===o&&!s||!r)return;const a=new vs;e.dispatchEvent(a),n.required&&e.setCustomValidity(a.message)}async function ks(t){const e=t.input;if(!e)return;const n=t.csrfField,i=t.src,s=t.csrf,o=fs.get(t),r=t.httpMethod;if(!i||"POST"===r&&!s||!o)return void(t.required&&e.setCustomValidity(""));if(!e.value.trim())return void(t.required&&e.setCustomValidity(""));const a=new FormData,l=new URL(i,window.location.origin);"POST"===r?(a.append(n,s),a.append("value",e.value)):l.search=new URLSearchParams({value:e.value}).toString(),e.dispatchEvent(new ys(a)),o.controller?o.controller.abort():t.dispatchEvent(new Event("loadstart")),o.controller="AbortController"in window?new AbortController:{signal:null,abort(){}},t.removeAttribute("dirty");try{const n=await async function(t,e,n){"GET"===n.method&&delete n.body;try{const i=await fetch(e,n);return t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend")),i}catch(e){throw"AbortError"!==e.name&&(t.dispatchEvent(new Event("error")),t.dispatchEvent(new Event("loadend"))),e}}(t,l.toString(),{credentials:"same-origin",signal:o.controller.signal,method:r,body:a});if(n.ok)t.required&&e.setCustomValidity(""),t.validateOnKeystroke=!1,e.dispatchEvent(new bs(n.clone()));else{t.validateOnKeystroke=!0;const i=new ws(n.clone());e.dispatchEvent(i),t.required&&e.setCustomValidity(i.message)}o.controller=null,e.dispatchEvent(new gs)}catch(t){"AbortError"!==t.name&&(o.controller=null,e.dispatchEvent(new gs))}}cs=new WeakMap;const Ls="undefined"!=typeof globalThis?globalThis:window;try{Ls.AutoCheckElement=AutoCheckElement.define()}catch(t){if(!(Ls.DOMException&&t instanceof DOMException&&"NotSupportedError"===t.name||t instanceof ReferenceError))throw t}var Ts;let Cs=class PrimerTextFieldElement extends HTMLElement{constructor(){super(...arguments),Ts.set(this,void 0)}connectedCallback(){b(this,Ts,"f")?.abort();const{signal:t}=v(this,Ts,new AbortController,"f");this.addEventListener("auto-check-success",async t=>{const e=await t.detail.response.text();e&&e.length>0?this.setSuccess(e):this.clearError()},{signal:t}),this.addEventListener("auto-check-error",async t=>{const e=await t.detail.response.text();this.setError(e)},{signal:t})}disconnectedCallback(){b(this,Ts,"f")?.abort()}clearContents(){this.inputElement.value="",this.inputElement.focus(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,cancelable:!1}))}clearError(){this.inputElement.removeAttribute("invalid"),this.validationElement.hidden=!0,this.validationMessageElement.replaceChildren()}setValidationMessage(t){const e=document.createElement("template");e.innerHTML=t;const n=document.importNode(e.content,!0);this.validationMessageElement.replaceChildren(n)}toggleValidationStyling(t){t?this.validationElement.classList.remove("FormControl-inlineValidation--success"):this.validationElement.classList.add("FormControl-inlineValidation--success"),this.validationSuccessIcon.hidden=t,this.validationErrorIcon.hidden=!t,this.inputElement.setAttribute("invalid",t?"true":"false")}setSuccess(t){this.toggleValidationStyling(!1),this.setValidationMessage(t),this.validationElement.hidden=!1}setError(t){this.toggleValidationStyling(!0),this.setValidationMessage(t),this.validationElement.hidden=!1}showLeadingSpinner(){this.leadingSpinner?.removeAttribute("hidden"),this.leadingVisual?.setAttribute("hidden","")}hideLeadingSpinner(){this.leadingSpinner?.setAttribute("hidden",""),this.leadingVisual?.removeAttribute("hidden")}};Ts=new WeakMap,g([U],Cs.prototype,"inputElement",void 0),g([U],Cs.prototype,"validationElement",void 0),g([U],Cs.prototype,"validationMessageElement",void 0),g([U],Cs.prototype,"validationSuccessIcon",void 0),g([U],Cs.prototype,"validationErrorIcon",void 0),g([U],Cs.prototype,"leadingVisual",void 0),g([U],Cs.prototype,"leadingSpinner",void 0),Cs=g([j],Cs);let Ss=class ToggleSwitchInputElement extends HTMLElement{connectedCallback(){this.addEventListener("toggleSwitchError",t=>{this.validationMessageElement.textContent=t.detail,this.validationElement.removeAttribute("hidden")}),this.addEventListener("toggleSwitchSuccess",()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")}),this.addEventListener("toggleSwitchLoading",()=>{this.validationMessageElement.textContent="",this.validationElement.setAttribute("hidden","hidden")})}};var xs,Ms,Is,Ds,Ps,Ns,Os,Hs,Fs,Vs,qs,Rs,Ws,Bs,$s,Us,Ks,js,zs,Zs,_s,Ys,Gs,Xs,Js,Qs,to,eo,no,io,so,oo,ro;g([U],Ss.prototype,"validationElement",void 0),g([U],Ss.prototype,"validationMessageElement",void 0),Ss=g([j],Ss);class ao{constructor(){xs.add(this),Ms.set(this,void 0),v(this,Ms,[],"f")}get current(){return b(this,Ms,"f")[b(this,Ms,"f").length-1]}push(t,e={trapFocus:!0}){const{trapFocus:n}=e;b(this,Ms,"f").push({element:t,abortController:b(this,xs,"m",Is).call(this,t,n)})}pop(t){if(t)for(;b(this,Ms,"f").length>0&&this.current?.element!==t;){const t=b(this,Ms,"f").pop();t?.abortController?.abort()}const e=b(this,Ms,"f").pop();e?.abortController?.abort()}elementIsMenuItem(t){return b(this,xs,"a",Ds).includes(t.getAttribute("role")||"")}get isEmpty(){return 0===b(this,Ms,"f").length}}Ms=new WeakMap,xs=new WeakSet,Is=function(t,e){const n=kt(t,{bindKeys:gt.ArrowVertical|gt.ArrowHorizontal|gt.HomeAndEnd|gt.Backspace,focusOutBehavior:"wrap",focusableElementFilter:e=>this.elementIsMenuItem(e)&&e.closest("anchored-position")===t});if(e){const{signal:e}=n;return ut(t,void 0,e)}return n},Ds=function(){return lo.validItemRoles};let lo=ro=class ActionMenuElement extends HTMLElement{constructor(){super(...arguments),Ps.add(this),Ns.set(this,void 0),Os.set(this,""),Hs.set(this,""),Fs.set(this,!1),Vs.set(this,void 0),qs.set(this,void 0)}get selectVariant(){return this.getAttribute("data-select-variant")}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get popoverElement(){return this.invokerElement?.popoverTargetElement||null}get childPopoverElements(){return Array.from(this.overlay.querySelectorAll("anchored-position"))}get invokerElement(){const t=this.querySelector("[role=menu]")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){const t=this.querySelectorAll("[aria-checked=true]"),e=[];for(const n of t){const t=n.querySelector(".ActionListItem-label");e.push({label:t?.textContent,value:n?.getAttribute("data-value"),element:n})}return e}connectedCallback(){const{signal:t}=v(this,Ns,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mouseover",this,{signal:t}),this.addEventListener("focusout",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.addEventListener("toggle",this,{signal:t,capture:!0}),b(this,Ps,"m",eo).call(this),b(this,Ps,"m",no).call(this),b(this,Ps,"m",Ws).call(this),this.includeFragment&&this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t});const e=()=>{b(this,Ps,"m",to).call(this)&&this.overlay?.update()};v(this,Vs,new IntersectionObserver(t=>{for(const n of t){n.target===this.invokerElement&&(n.isIntersecting?window.addEventListener("scroll",e,{capture:!0}):window.removeEventListener("scroll",e,{capture:!0}))}}),"f"),$e(this,()=>Boolean(this.invokerElement),()=>b(this,Vs,"f").observe(this.invokerElement)),this.includeFragment||this.setAttribute("data-ready","true");new MutationObserver(()=>b(this,Ps,"m",Rs).call(this)).observe(this,{childList:!0,subtree:!0}),b(this,Ps,"m",Rs).call(this),v(this,qs,new ao,"f")}disconnectedCallback(){b(this,Ns,"f").abort()}handleEvent(t){const e=this.invokerElement?.contains(t.target),n=b(this,Ps,"m",Ks).call(this,t);if("toggle"===t.type&&t instanceof ToggleEvent)return void b(this,Ps,"m",zs).call(this,t);if(e&&"mousedown"===t.type)return void v(this,Fs,!0,"f");if("mousedown"===t.type)return void t.preventDefault();if(e&&n)return b(this,Ps,"m",Zs).call(this,t),void v(this,Fs,!1,"f");if("focusout"===t.type){if(b(this,Fs,"f"))return;return void requestAnimationFrame(()=>{this.contains(document.activeElement)&&document.activeElement!==this.invokerElement||b(this,Ps,"m",Xs).call(this)})}const i=t.target.closest(ro.menuItemSelectors.join(",")),s=null!==i;if(s&&n){if(b(this,Ps,"m",Bs).call(this,t))return;const e=i.closest("[data-show-dialog-id]");if(e){const n=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(n&&this.contains(e))return void b(this,Ps,"m",_s).call(this,t,n)}b(this,Ps,"m",$s).call(this,t)&&(t.preventDefault(),i.click());const n=b(this,Ps,"m",so).call(this,i);return n?(t.preventDefault(),void n.showPopover()):void b(this,Ps,"m",Ys).call(this,i)}"include-fragment-replaced"!==t.type?s&&t instanceof KeyboardEvent&&b(this,Ps,"m",js).call(this,t,i):b(this,Ps,"m",Gs).call(this)}get items(){return Array.from(this.querySelectorAll(ro.menuItemSelectors.join(",")))}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),t.querySelector(".ActionListContent").setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),t.querySelector(".ActionListContent").removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}hideItem(t){t&&t.setAttribute("hidden","hidden")}showItem(t){t&&t.removeAttribute("hidden")}isItemChecked(t){return!!t&&"true"===t.querySelector(".ActionListContent").getAttribute("aria-checked")}checkItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")||b(this,Ps,"m",Ys).call(this,e)}}uncheckItem(t){if(t&&("single"===this.selectVariant||"multiple"===this.selectVariant)){const e=t.querySelector(".ActionListContent");"true"===e.getAttribute("aria-checked")&&b(this,Ps,"m",Ys).call(this,e)}}};Ns=new WeakMap,Os=new WeakMap,Hs=new WeakMap,Fs=new WeakMap,Vs=new WeakMap,qs=new WeakMap,Ps=new WeakSet,Rs=function(){let t=1;for(const e of this.querySelectorAll("[role=menu]"))e.setAttribute("data-level",t.toString()),t++},Ws=function(){const{signal:t}=b(this,Ns,"f");for(const e of this.querySelectorAll(ro.validSelectors.join(",")))e.addEventListener("click",b(this,Ps,"m",Bs).bind(this),{signal:t}),e.addEventListener("keydown",b(this,Ps,"m",Bs).bind(this),{signal:t})},Bs=function(t){if(!b(this,Ps,"m",Ks).call(this,t))return!1;const e=t.target.closest(ro.menuItemSelectors.join(","));return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},$s=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},Us=function(t){return t.target instanceof ClipboardCopyElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&(" "===t.key||"Enter"===t.key)},Ks=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,Ps,"m",$s).call(this,t)||b(this,Ps,"m",Us).call(this,t)},js=function(t,e){switch(t.key){case"ArrowRight":{const t=b(this,Ps,"m",so).call(this,e);t?.showPopover();break}case"ArrowLeft":if(e.closest("role[menu]")!==this.list){const t=e.closest("anchored-position");t?.hidePopover()}}},zs=function(t){const e=t.target;if("open"===t.newState){const t=e===this.overlay;b(this,qs,"f").push(e,{trapFocus:!t}),window.requestAnimationFrame(()=>{const t=e.querySelector(ro.menuItemSelectors.join(","));t?.focus()})}else{b(this,qs,"f").pop(e);const t=b(this,Ps,"m",oo).call(this,e),n=document.querySelector(":popover-open");t&&!n&&t.focus()}},Zs=function(t){t.preventDefault(),t.stopPropagation(),b(this,Ps,"m",to).call(this)?b(this,Ps,"m",Qs).call(this):b(this,Ps,"m",Js).call(this)},_s=function(t,e){this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="none");const n=new AbortController,{signal:i}=n,s=()=>{n.abort(),this.contains(e)&&(this.querySelector(".ActionListWrap").style.display="",b(this,Ps,"m",to).call(this)&&b(this,Ps,"m",Qs).call(this));const t=this.ownerDocument.activeElement,i=this.ownerDocument.activeElement===this.ownerDocument.body,s=this.contains(t),o=e.contains(t);(i||s||o)&&setTimeout(()=>{const e=this.ownerDocument.activeElement;e!==t&&e!==this.ownerDocument.body||this.invokerElement?.focus()},0)};e.addEventListener("close",s,{signal:i}),e.addEventListener("cancel",s,{signal:i})},Ys=function(t){if("multiple"!==this.selectVariant&&setTimeout(()=>{b(this,Ps,"m",to).call(this)&&b(this,Ps,"m",Qs).call(this)}),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e="true"!==t.getAttribute("aria-checked");if("single"===this.selectVariant){e&&t.setAttribute("aria-checked","true");for(const e of this.querySelectorAll("[aria-checked]"))e!==t&&e.setAttribute("aria-checked","false");b(this,Ps,"m",eo).call(this)}else t.setAttribute("aria-checked",`${e}`);b(this,Ps,"m",no).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t.parentElement,checked:this.isItemChecked(t.parentElement)}}))},Gs=function(){b(this,Ps,"a",io)?.focus(),b(this,Ps,"m",Ws).call(this),this.setAttribute("data-ready","true")},Xs=function(){b(this,Ps,"m",Qs).call(this)},Js=function(){this.popoverElement?.showPopover()},Qs=function(){this.popoverElement?.hidePopover();for(const t of this.childPopoverElements)t.hidePopover()},to=function(){return this.popoverElement?.matches(":popover-open")},eo=function(){if("single"!==this.selectVariant)return;if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,Os,b(this,Os,"f")||t.textContent||"","f");const e=this.querySelector("[aria-checked=true] .ActionListItem-label");if(e&&this.dynamicLabel){const n=document.createElement("span");n.classList.add("color-fg-muted");const i=document.createElement("span");n.textContent=this.dynamicLabelPrefix,i.textContent=e.textContent||"",t.replaceChildren(n,i)}else t.textContent=b(this,Os,"f")},no=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),t.removeAttribute("disabled")):t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=this.querySelector("[data-list-inputs=true]");if(!t)return;const e=t.querySelectorAll("input");e.length>0&&v(this,Hs,b(this,Hs,"f")||e[0].name,"f");for(const e of this.selectedItems){const n=document.createElement("input");n.setAttribute("data-list-input","true"),n.type="hidden",n.autocomplete="off",n.name=b(this,Hs,"f"),n.value=(e.value||e.label||"").trim(),t.append(n)}for(const t of e)t.remove()}},io=function(){return this.querySelector(ro.menuItemSelectors.join(","))},so=function(t){const e=t.getAttribute("popovertarget");return e?this.querySelector(`[id="${e}"]`):null},oo=function(t){const e=t.getAttribute("anchor");return e?this.querySelector(`[id="${e}"]`):null},lo.validItemRoles=["menuitem","menuitemcheckbox","menuitemradio"],lo.validSelectors=ro.validItemRoles.map(t=>`[role="${t}"]`),lo.menuItemSelectors=ro.validSelectors.map(t=>`:not([hidden]) > ${t}`),g([U],lo.prototype,"includeFragment",void 0),g([U],lo.prototype,"overlay",void 0),g([U],lo.prototype,"list",void 0),lo=ro=g([j],lo),window.customElements.get("action-menu")||(window.ActionMenuElement=lo,window.customElements.define("action-menu",lo));const co="less",ho="equal",uo="greater";var fo,mo,po,go,bo,vo=t=>{throw TypeError(t)},wo=(t,e,n)=>e.has(t)||vo("Cannot "+n),yo=(t,e,n)=>(wo(t,e,"read from private field"),n?n.call(t):e.get(t)),Eo=(t,e,n)=>e.has(t)?vo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ao=(t,e,n,i)=>(wo(t,e,"write to private field"),e.set(t,n),n),ko=(t,e,n)=>(wo(t,e,"access private method"),n);class Lo{constructor({compareFn:t}){Eo(this,po),Eo(this,fo),Eo(this,mo),Ao(this,fo,t),Ao(this,mo,[])}insert(t){yo(this,mo).push(t),ko(this,po,bo).call(this)}pop(){const t=yo(this,mo)[0];return yo(this,mo)[yo(this,mo).length-1]&&(yo(this,mo)[0]=yo(this,mo)[yo(this,mo).length-1],yo(this,mo).pop()),ko(this,po,go).call(this),t}peek(){return yo(this,mo)[0]}delete(t){const e=yo(this,mo).indexOf(t);-1!==e&&(Oo(yo(this,mo),e,yo(this,mo).length-1),yo(this,mo).pop(),ko(this,po,go).call(this))}clear(){Ao(this,mo,[])}get size(){return yo(this,mo).length}}function To(t){return 2*t+1}function Co(t){return 2*t+2}function So(t){return Math.floor((t-1)/2)}function xo(t,e){return To(t)<e}function Mo(t,e){return Co(t)<e}function Io(t){return t>0}function Do(t,e){return t[To(e)]}function Po(t,e){return t[Co(e)]}function No(t,e){return t[So(e)]}function Oo(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}fo=new WeakMap,mo=new WeakMap,po=new WeakSet,go=function(){let t=0;for(;xo(t,yo(this,mo).length);){let e=To(t);if(Mo(t,yo(this,mo).length)&&yo(this,fo).call(this,Po(yo(this,mo),t),Do(yo(this,mo),t))===co&&(e=Co(t)),yo(this,fo).call(this,yo(this,mo)[t],yo(this,mo)[e])===co)break;Oo(yo(this,mo),t,e),t=e}},bo=function(){let t=yo(this,mo).length-1;for(;Io(t)&&yo(this,fo).call(this,yo(this,mo)[t],No(yo(this,mo),t))===co;)Oo(yo(this,mo),t,So(t)),t=So(t)};var Ho,Fo,Vo,qo,Ro=Object.defineProperty,Wo=t=>{throw TypeError(t)},Bo=(t,e,n)=>((t,e,n)=>e in t?Ro(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),$o=(t,e,n)=>e.has(t)||Wo("Cannot "+n),Uo=(t,e,n)=>($o(t,e,"read from private field"),n?n.call(t):e.get(t)),Ko=(t,e,n)=>e.has(t)?Wo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),jo=(t,e,n,i)=>($o(t,e,"write to private field"),e.set(t,n),n);Ho=Symbol.toStringTag;class zo{constructor(){Bo(this,Ho,"Deferred"),Ko(this,Fo),Ko(this,Vo),Ko(this,qo),jo(this,Fo,new Promise((t,e)=>{jo(this,Vo,t),jo(this,qo,e)}))}then(t,e){return Promise.prototype.then.apply(Uo(this,Fo),[t,e])}catch(t){return Promise.prototype.catch.apply(Uo(this,Fo),[t])}finally(t){return Promise.prototype.finally.apply(Uo(this,Fo),[t])}resolve(t){Uo(this,Vo).call(this,t)}reject(t){Uo(this,qo).call(this,t)}getPromise(){return Uo(this,Fo)}}Fo=new WeakMap,Vo=new WeakMap,qo=new WeakMap;var Zo,_o,Yo,Go,Xo,Jo,Qo=t=>{throw TypeError(t)},tr=(t,e,n)=>e.has(t)||Qo("Cannot "+n),er=(t,e,n)=>(tr(t,e,"read from private field"),n?n.call(t):e.get(t)),nr=(t,e,n)=>e.has(t)?Qo("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ir=(t,e,n,i)=>(tr(t,e,"write to private field"),e.set(t,n),n),sr=(t,e,n)=>(tr(t,e,"access private method"),n);class LiveRegionElement extends HTMLElement{constructor(){if(super(),nr(this,Go),nr(this,Zo),nr(this,_o),nr(this,Yo),!this.shadowRoot){const t=function(){if(or)return or;return or=document.createElement("template"),or.innerHTML=rr,or}();this.attachShadow({mode:"open"}).appendChild(t.content.cloneNode(!0))}ir(this,Zo,!1),ir(this,Yo,null),ir(this,_o,new Lo({compareFn:ar}))}get delay(){const t=this.getAttribute("delay");return t?parseInt(t,10):150}set delay(t){this.setAttribute("delay",`${t}`)}announce(t,e={}){const{delayMs:n,politeness:i="polite"}=e,s=Date.now(),o=new zo,r={deferred:o,politeness:i,contents:t,scheduled:void 0!==n?s+n:s};return er(this,_o).insert(r),sr(this,Go,Xo).call(this),{...o.getPromise(),cancel:()=>{er(this,_o).delete(r),o.resolve()}}}announceFromElement(t,e){const n=function(t){let e="";t.hasAttribute("aria-label")?e=t.getAttribute("aria-label"):t.innerText?e=t.innerText:t.textContent&&(e=t.textContent);return e?e.trim():""}(t);if(""!==n)return this.announce(n,e);return{...Promise.resolve(),cancel:lr}}getMessage(t="polite"){const e=this.shadowRoot?.getElementById(t);if(!e)throw new Error("Unable to find container for message");return e.textContent}clear(){null!==er(this,Yo)&&(clearTimeout(er(this,Yo)),ir(this,Yo,null)),ir(this,Zo,!1),er(this,_o).clear()}}Zo=new WeakMap,_o=new WeakMap,Yo=new WeakMap,Go=new WeakSet,Xo=function(){if(er(this,Zo))return;let t=er(this,_o).peek();if(!t)return;null!==er(this,Yo)&&(clearTimeout(er(this,Yo)),ir(this,Yo,null));const e=Date.now();if(t.scheduled<=e)return t=er(this,_o).pop(),t&&sr(this,Go,Jo).call(this,t),void sr(this,Go,Xo).call(this);const n=t.scheduled-e;ir(this,Yo,window.setTimeout(()=>{ir(this,Yo,null),sr(this,Go,Xo).call(this)},n))},Jo=function(t){ir(this,Zo,!0);const{contents:e,deferred:n,politeness:i}=t,s=this.shadowRoot?.getElementById(i);if(!s)throw ir(this,Zo,!1),new Error(`Unable to find container for message. Expected a container with id="${i}"`);s.textContent===e?s.textContent=`${e} `:s.textContent=e,null!==er(this,Yo)&&clearTimeout(er(this,Yo)),n.resolve(),this.delay>0?ir(this,Yo,window.setTimeout(()=>{ir(this,Yo,null),ir(this,Zo,!1),sr(this,Go,Xo).call(this)},this.delay)):(ir(this,Yo,null),ir(this,Zo,!1),sr(this,Go,Xo).call(this))};let or=null;const rr='\n<style>\n:host {\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: inset(50%);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n</style>\n<div id="polite" aria-live="polite" aria-atomic="true"></div>\n<div id="assertive" aria-live="assertive" aria-atomic="true"></div>\n';function ar(t,e){return t.politeness===e.politeness?t.scheduled===e.scheduled?ho:t.scheduled<e.scheduled?co:uo:"assertive"===t.politeness&&"assertive"!==e.politeness?co:"assertive"!==t.politeness&&"assertive"===e.politeness?uo:ho}function lr(){}var cr,dr,hr,ur,fr,mr,pr,gr,br,vr,wr,yr,Er,Ar,kr,Lr,Tr,Cr,Sr,xr,Mr,Ir,Dr,Pr,Nr,Or,Hr,Fr,Vr,qr,Rr,Wr,Br,$r,Ur,Kr,jr,zr,Zr,_r;customElements.get("live-region")||customElements.define("live-region",LiveRegionElement);const Yr=['[role="option"]'],Gr=Yr.join(","),Xr=Yr.map(t=>`:not([hidden]) > ${t}`).join(",");var Jr,Qr;!function(t){t[t.REMOTE=0]="REMOTE",t[t.EVENTUALLY_LOCAL=1]="EVENTUALLY_LOCAL",t[t.LOCAL=2]="LOCAL"}(Jr||(Jr={})),function(t){t[t.BODY=0]="BODY",t[t.BANNER=1]="BANNER"}(Qr||(Qr={}));const ta=(()=>{const t=new Set;let e=null;function n(){for(const e of t)e.updateAnchorPosition()}return i=>{window.addEventListener("resize",n),window.addEventListener("scroll",n),e||(e=new ResizeObserver(()=>{for(const e of t)e.updateAnchorPosition()})),e.observe(i.ownerDocument.documentElement),i.addEventListener("dialog:close",()=>{i.invokerElement?.setAttribute("aria-expanded","false"),t.delete(i)}),i.addEventListener("dialog:open",()=>{t.add(i)})}})();let ea=class SelectPanelElement extends HTMLElement{constructor(){super(...arguments),cr.add(this),dr.set(this,void 0),hr.set(this,void 0),ur.set(this,""),fr.set(this,""),mr.set(this,new Map),pr.set(this,null),gr.set(this,null),br.set(this,!1)}get open(){return this.dialog.open}get selectVariant(){return this.getAttribute("data-select-variant")}get ariaSelectionType(){return"multiple"===this.selectVariant?"aria-checked":"aria-selected"}set selectVariant(t){t?this.setAttribute("data-select-variant",t):this.removeAttribute("variant")}get dynamicLabelPrefix(){const t=this.getAttribute("data-dynamic-label-prefix");return t?`${t}:`:""}get dynamicAriaLabelPrefix(){const t=this.getAttribute("data-dynamic-aria-label-prefix");return t?`${t}:`:""}set dynamicLabelPrefix(t){this.setAttribute("data-dynamic-label",t)}get dynamicLabel(){return this.hasAttribute("data-dynamic-label")}set dynamicLabel(t){this.toggleAttribute("data-dynamic-label",t)}get invokerElement(){const t=this.querySelector("dialog")?.id;if(!t)return null;for(const e of this.querySelectorAll("[aria-controls]"))if(e.getAttribute("aria-controls")===t)return e;return null}get closeButton(){return this.querySelector("button[data-close-dialog-id]")}get invokerLabel(){return this.invokerElement?this.invokerElement.querySelector(".Button-label"):null}get selectedItems(){return Array.from(b(this,mr,"f").values())}get align(){return this.getAttribute("anchor-align")||"start"}get side(){return this.getAttribute("anchor-side")||"outside-bottom"}updateAnchorPosition(){if(this&&null===this.offsetParent&&this.hide(),this.invokerElement){const{top:t,left:e}=X(this.dialog,this.invokerElement,{align:this.align,side:this.side,anchorOffset:4});this.dialog.style.top=`${t}px`,this.dialog.style.left=`${e}px`,this.dialog.style.bottom="auto",this.dialog.style.right="auto"}}connectedCallback(){const{signal:t}=v(this,hr,new AbortController,"f");this.addEventListener("keydown",this,{signal:t}),this.addEventListener("click",this,{signal:t}),this.addEventListener("mousedown",this,{signal:t}),this.addEventListener("input",this,{signal:t}),this.addEventListener("remote-input-success",this,{signal:t}),this.addEventListener("remote-input-error",this,{signal:t}),this.addEventListener("loadstart",this,{signal:t}),b(this,cr,"m",Ur).call(this),b(this,cr,"m",Kr).call(this),b(this,cr,"m",vr).call(this),ta(this),$e(this,()=>Boolean(this.remoteInput),()=>{this.remoteInput.addEventListener("loadstart",this,{signal:t}),this.remoteInput.addEventListener("loadend",this,{signal:t})}),$e(this,()=>Boolean(this.includeFragment),()=>{this.includeFragment.addEventListener("include-fragment-replaced",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("loadend",this,{signal:t})}),v(this,dr,new IntersectionObserver(t=>{for(const e of t){const t=e.target;e.isIntersecting&&t===this.dialog&&(this.filterInputTextField&&document.activeElement!==this.filterInputTextField&&this.filterInputTextField.focus(),this.dialog.setAttribute("data-ready","true"),this.updateAnchorPosition(),b(this,cr,"a",Vr)===Jr.LOCAL&&b(this,cr,"m",Pr).call(this))}}),"f"),$e(this,()=>Boolean(this.dialog),()=>{b(this,dr,"f").observe(this.dialog),this.dialog.addEventListener("close",this,{signal:t}),"true"===this.getAttribute("data-open-on-load")&&this.show()}),b(this,cr,"a",Vr)===Jr.LOCAL&&$e(this,()=>this.items.length>0,()=>{b(this,cr,"m",Pr).call(this),b(this,cr,"m",Kr).call(this)})}disconnectedCallback(){b(this,hr,"f").abort()}handleEvent(t){if(t.target===this.filterInputTextField)return void b(this,cr,"m",Dr).call(this,t);if(t.target===this.remoteInput)return void b(this,cr,"m",Mr).call(this,t);const e=this.invokerElement?.contains(t.target),n=this.closeButton?.contains(t.target),i=b(this,cr,"m",Ar).call(this,t);if(e&&"mousedown"===t.type)return;if("mousedown"===t.type&&t.target instanceof HTMLInputElement)return;if("mousedown"===t.type)return void t.preventDefault();if(e&&i)return void b(this,cr,"m",Wr).call(this,t);if(n&&i)return;if("keydown"===t.type&&t instanceof KeyboardEvent&&t.target.closest(Xr)){const e=t.ctrlKey||t.altKey||t.metaKey,n=1===t.key.length&&/[a-z\d]/i.test(t.key);!e&&n&&t.stopPropagation()}if(t.target===this.dialog&&"close"===t.type){if(this.dialog.removeAttribute("data-ready"),this.invokerElement?.setAttribute("aria-expanded","false"),this.filterInputTextField){const t=this.filterInputTextField.value.length>0;this.filterInputTextField.value="",t&&this.filterInputTextField.dispatchEvent(new Event("input"))}return void this.dispatchEvent(new CustomEvent("panelClosed",{detail:{panel:this},bubbles:!0}))}const s=t.target.closest(Xr)?.parentElement;if(null!=s&&i){if(b(this,cr,"m",yr).call(this,t))return;const e=s.closest("[data-show-dialog-id]");if(e){const n=this.ownerDocument.getElementById(e.getAttribute("data-show-dialog-id")||"");if(n&&this.contains(e)&&this.contains(n))return void b(this,cr,"m",Br).call(this,t,n)}return b(this,cr,"m",Er).call(this,t)&&(t.preventDefault(),b(this,cr,"m",_r).call(this,s)?.click()),void b(this,cr,"m",$r).call(this,s)}if("click"===t.type){const e=this.dialog.getBoundingClientRect();e.top<=t.clientY&&t.clientY<=e.top+e.height&&e.left<=t.clientX&&t.clientX<=e.left+e.width||this.hide()}t.target instanceof IncludeFragmentElement&&b(this,cr,"m",Sr).call(this,t)}show(){this.updateAnchorPosition(),this.dialog.showModal(),this.invokerElement?.setAttribute("aria-expanded","true");const t=new CustomEvent("dialog:open",{detail:{dialog:this.dialog}});this.dispatchEvent(t)}hide(){this.dialog.close()}get visibleItems(){return Array.from(this.querySelectorAll(Xr)).map(t=>t.parentElement)}get items(){return Array.from(this.querySelectorAll(Gr)).map(t=>t.parentElement)}get focusableItem(){for(const t of this.items){const e=b(this,cr,"m",_r).call(this,t);if(e&&"0"===e.getAttribute("tabindex"))return e}}getItemById(t){return this.querySelector(`li[data-item-id="${t}"`)}isItemDisabled(t){return!!t&&t.classList.contains("ActionListItem--disabled")}disableItem(t){t&&(t.classList.add("ActionListItem--disabled"),b(this,cr,"m",_r).call(this,t).setAttribute("aria-disabled","true"))}enableItem(t){t&&(t.classList.remove("ActionListItem--disabled"),b(this,cr,"m",_r).call(this,t).removeAttribute("aria-disabled"))}isItemHidden(t){return!!t&&t.hasAttribute("hidden")}isItemChecked(t){return!!t&&"true"===b(this,cr,"m",_r).call(this,t).getAttribute(this.ariaSelectionType)}checkItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)||b(this,cr,"m",$r).call(this,t)}uncheckItem(t){!t||"single"!==this.selectVariant&&"multiple"!==this.selectVariant||this.isItemChecked(t)&&b(this,cr,"m",$r).call(this,t)}};dr=new WeakMap,hr=new WeakMap,ur=new WeakMap,fr=new WeakMap,mr=new WeakMap,pr=new WeakMap,gr=new WeakMap,br=new WeakMap,cr=new WeakSet,vr=function(){const{signal:t}=b(this,hr,"f");for(const e of this.querySelectorAll(Yr.join(",")))e.addEventListener("click",b(this,cr,"m",yr).bind(this),{signal:t}),e.addEventListener("keydown",b(this,cr,"m",yr).bind(this),{signal:t})},wr=function(){let t=!1;if("single"===this.selectVariant)for(const e of this.items){const n=b(this,cr,"m",_r).call(this,e);n&&(this.isItemHidden(e)||!this.isItemChecked(e)||t?n.setAttribute("tabindex","-1"):(n.setAttribute("tabindex","0"),t=!0),e.removeAttribute("tabindex"))}else for(const t of this.items){const e=b(this,cr,"m",_r).call(this,t);e&&(e.setAttribute("tabindex","-1"),t.removeAttribute("tabindex"))}!t&&b(this,cr,"a",jr)&&b(this,cr,"m",_r).call(this,b(this,cr,"a",jr))?.setAttribute("tabindex","0")},yr=function(t){if(!b(this,cr,"m",Ar).call(this,t))return!1;const e=t.target.closest(Xr);return!!e&&(!!e.getAttribute("aria-disabled")&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!0))},Er=function(t){return t.target instanceof HTMLAnchorElement&&t instanceof KeyboardEvent&&"keydown"===t.type&&!(t.ctrlKey||t.altKey||t.metaKey||t.shiftKey)&&" "===t.key},Ar=function(t){return t instanceof MouseEvent&&"click"===t.type||b(this,cr,"m",Er).call(this,t)},kr=function(){for(const t of this.items){const e=b(this,cr,"m",_r).call(this,t);if(!e)continue;const n=e.getAttribute("data-value");n&&b(this,mr,"f").has(n)&&e.setAttribute(this.ariaSelectionType,"true")}b(this,cr,"m",Kr).call(this)},Lr=function(t){const e=b(this,cr,"m",_r).call(this,t);if(!e)return;const n=e.getAttribute("data-value");n&&b(this,mr,"f").set(n,{value:n,label:e.querySelector(".ActionListItem-label")?.textContent?.trim(),inputName:e.getAttribute("data-input-name")})},Tr=function(t){const e=b(this,cr,"m",_r).call(this,t);if(!e)return;const n=e.getAttribute("data-value");n&&b(this,mr,"f").delete(n)},Cr=function(){b(this,cr,"a",qr)&&(b(this,pr,"f")&&clearTimeout(b(this,pr,"f")),b(this,gr,"f")&&clearTimeout(b(this,gr,"f")),v(this,gr,setTimeout(()=>{this.liveRegion.announce("Loading")},2e3),"f"),v(this,pr,setTimeout(()=>{b(this,cr,"a",qr)?.showLeadingSpinner()},1e3),"f"))},Sr=function(t){switch(t.type){case"include-fragment-replaced":b(this,cr,"m",Pr).call(this);break;case"loadstart":b(this,cr,"m",xr).call(this,!1);break;case"loadend":b(this,cr,"a",qr)?.hideLeadingSpinner(),this.dispatchEvent(new CustomEvent("loadend"));break;case"error":{b(this,cr,"m",xr).call(this,!0);const e=this.fragmentErrorElement;throw e&&!e.hasAttribute("hidden")&&this.liveRegion.announceFromElement(e,{politeness:"assertive"}),new Error(t.detail.error)}}},xr=function(t){for(const e of this.includeFragment.querySelectorAll("[data-show-on-error]"))e instanceof HTMLElement&&(e.hidden=!t);for(const e of this.includeFragment.querySelectorAll("[data-hide-on-error]"))e instanceof HTMLElement&&(e.hidden=t)},Mr=function(t){switch(t.type){case"remote-input-success":b(this,cr,"m",Hr).call(this),b(this,cr,"m",Pr).call(this),b(this,cr,"m",kr).call(this);break;case"remote-input-error":this.bodySpinner?.setAttribute("hidden",""),this.includeFragment||0===this.visibleItems.length?b(this,cr,"m",Or).call(this,Qr.BODY):b(this,cr,"m",Or).call(this,Qr.BANNER);break;case"loadstart":if(!b(this,cr,"m",Rr).call(this)){if(b(this,cr,"m",Hr).call(this),this.bodySpinner?.removeAttribute("hidden"),this.bodySpinner)break;b(this,cr,"m",Cr).call(this)}break;case"loadend":b(this,cr,"a",qr)?.hideLeadingSpinner(),b(this,gr,"f")&&clearTimeout(b(this,gr,"f")),b(this,pr,"f")&&clearTimeout(b(this,pr,"f")),this.dispatchEvent(new CustomEvent("loadend"))}},Ir=function(t,e){return(t.getAttribute("data-filter-string")||t.textContent||"").toLowerCase().indexOf(e.toLowerCase())>-1},Dr=function(t){if("keydown"===t.type){const e=t.key;if("Enter"===e){const t=this.visibleItems[0];if(t){const e=b(this,cr,"m",_r).call(this,t);e&&e.click()}}else if("ArrowDown"===e){const e=this.focusableItem||b(this,cr,"m",_r).call(this,this.visibleItems[0]);e&&(e.focus(),t.preventDefault())}else if("Home"===e){const e=this.visibleItems[0];if(e){const n=b(this,cr,"m",_r).call(this,e);n&&n.focus(),t.preventDefault()}}else if("End"===e&&this.visibleItems.length>0){const e=this.visibleItems[this.visibleItems.length-1],n=b(this,cr,"m",_r).call(this,e);n&&n.focus(),t.preventDefault()}}if("input"===t.type&&(this.bodySpinner||b(this,cr,"m",Rr).call(this)||b(this,cr,"m",Cr).call(this),b(this,cr,"a",Vr)===Jr.LOCAL||b(this,cr,"a",Vr)===Jr.EVENTUALLY_LOCAL)){if(this.includeFragment)return void this.includeFragment.refetch();b(this,cr,"m",Pr).call(this)}},Pr=function(){if(!this.list)return;let t=!1;if(b(this,cr,"m",Rr).call(this)){const e=this.filterInputTextField?.value??"",n=this.filterFn||b(this,cr,"m",Ir);for(const i of this.items)n(i,e)?(b(this,cr,"m",Zr).call(this,i),t=!0):b(this,cr,"m",zr).call(this,i)}else t=this.items.length>0;b(this,cr,"m",wr).call(this),b(this,cr,"m",Fr).call(this);for(const t of this.items){const e=b(this,cr,"m",_r).call(this,t);if(!e)continue;const n=e.getAttribute("data-value");b(this,br,"f")?n&&!b(this,mr,"f").has(n)&&e.setAttribute(this.ariaSelectionType,"false"):n&&!b(this,mr,"f").has(n)&&this.isItemChecked(t)&&b(this,cr,"m",Lr).call(this,t)}v(this,br,!0,"f"),this.noResults&&(b(this,cr,"m",Nr).call(this)?this.noResults.setAttribute("hidden",""):t?(this.noResults.setAttribute("hidden",""),this.list?.querySelector(".ActionListWrap")?.removeAttribute("hidden")):(this.list?.querySelector(".ActionListWrap")?.setAttribute("hidden",""),this.noResults.removeAttribute("hidden")))},Nr=function(){return!(!this.fragmentErrorElement||this.fragmentErrorElement.hasAttribute("hidden"))||!!this.bannerErrorElement&&!this.bannerErrorElement.hasAttribute("hidden")},Or=function(t){let e=this.fragmentErrorElement;t===Qr.BODY&&this.fragmentErrorElement?(this.fragmentErrorElement.removeAttribute("hidden"),this.bannerErrorElement.setAttribute("hidden","")):(e=this.bannerErrorElement,this.bannerErrorElement?.removeAttribute("hidden"),this.fragmentErrorElement?.setAttribute("hidden","")),!e||e.hasAttribute("hidden")||this.liveRegion.announceFromElement(e,{politeness:"assertive"})},Hr=function(){this.fragmentErrorElement?.setAttribute("hidden",""),this.bannerErrorElement.setAttribute("hidden","")},Fr=function(){if(this.open&&this.list){const t=this.visibleItems;if(t.length>0){const e="tab for results";this.liveRegion.announce(`${t.length} result${1===t.length?"":"s"} ${e}`)}else{const t=this.noResults;t&&this.liveRegion.announceFromElement(t)}}},Vr=function(){if(!this.list)return Jr.REMOTE;switch(this.list.getAttribute("data-fetch-strategy")){case"local":return Jr.LOCAL;case"eventually_local":return Jr.EVENTUALLY_LOCAL;default:return Jr.REMOTE}},qr=function(){return this.filterInputTextField?.closest("primer-text-field")},Rr=function(){return b(this,cr,"a",Vr)===Jr.LOCAL||b(this,cr,"a",Vr)===Jr.EVENTUALLY_LOCAL},Wr=function(t){t.preventDefault(),t.stopPropagation(),this.open?this.hide():this.show()},Br=function(t,e){this.querySelector(".ActionListWrap").style.display="none";const n=new AbortController,{signal:i}=n,s=()=>{n.abort(),this.querySelector(".ActionListWrap").style.display="",this.open&&this.hide();const t=this.ownerDocument.activeElement,e=this.ownerDocument.activeElement===this.ownerDocument.body,i=this.contains(t);(e||i)&&setTimeout(()=>this.invokerElement?.focus(),0)};e.addEventListener("close",s,{signal:i}),e.addEventListener("cancel",s,{signal:i})},$r=function(t){if("multiple"!==this.selectVariant&&setTimeout(()=>{this.open&&this.hide()}),"multiple"!==this.selectVariant&&"single"!==this.selectVariant)return;const e=this.isItemChecked(t),n=!e;if(!this.dispatchEvent(new CustomEvent("beforeItemActivated",{bubbles:!0,cancelable:!0,detail:{item:t,checked:n,value:b(this,cr,"m",_r).call(this,t)?.getAttribute("data-value")}})))return;const i=b(this,cr,"m",_r).call(this,t);if("single"===this.selectVariant){if(i?.getAttribute("href"))return;if(!e){for(const t of this.items)b(this,cr,"m",_r).call(this,t)?.setAttribute(this.ariaSelectionType,"false");b(this,mr,"f").clear(),n&&(b(this,cr,"m",Lr).call(this,t),i?.setAttribute(this.ariaSelectionType,"true")),b(this,cr,"m",Ur).call(this)}}else i?.setAttribute(this.ariaSelectionType,`${n}`),n?b(this,cr,"m",Lr).call(this,t):b(this,cr,"m",Tr).call(this,t);b(this,cr,"m",Kr).call(this),b(this,cr,"m",wr).call(this),this.dispatchEvent(new CustomEvent("itemActivated",{bubbles:!0,detail:{item:t,checked:n,value:b(this,cr,"m",_r).call(this,t)?.getAttribute("data-value")}}))},Ur=function(){if(!this.dynamicLabel)return;const t=this.invokerLabel;if(!t)return;v(this,ur,b(this,ur,"f")||t.textContent||"","f");const e=this.querySelector(`[${this.ariaSelectionType}=true] .ActionListItem-label`)?.textContent||b(this,ur,"f");if(e){const n=document.createElement("span");n.classList.add("color-fg-muted");const i=document.createElement("span");n.textContent=`${this.dynamicLabelPrefix} `,i.textContent=e,t.replaceChildren(n,i),this.dynamicAriaLabelPrefix&&this.invokerElement?.setAttribute("aria-label",`${this.dynamicAriaLabelPrefix} ${e.trim()}`)}else t.textContent=b(this,ur,"f")},Kr=function(){if("single"===this.selectVariant){const t=this.querySelector("[data-select-panel-inputs=true] input")??this.querySelector("[data-list-inputs=true] input");if(!t)return;const e=this.selectedItems[0];e?(t.value=(e.value||e.label||"").trim(),e.inputName&&(t.name=e.inputName),t.removeAttribute("disabled")):b(this,br,"f")&&t.setAttribute("disabled","disabled")}else if("none"!==this.selectVariant){const t=!!this.querySelector("[data-select-panel-inputs=true]"),e=this.querySelector("[data-select-panel-inputs=true]")??this.querySelector("[data-list-inputs=true]");if(!e)return;const n=e.querySelectorAll("input");n.length>0&&v(this,fr,b(this,fr,"f")||n[0].name,"f");for(const n of this.selectedItems){const i=document.createElement("input");i.setAttribute(""+(t?"data-select-panel-input":"data-list-input"),"true"),i.type="hidden",i.autocomplete="off",i.name=n.inputName||b(this,fr,"f"),i.value=(n.value||n.label||"").trim(),e.append(i)}for(const t of n)t.remove()}},jr=function(){return this.querySelector(Xr)?.parentElement||null},zr=function(t){t&&t.setAttribute("hidden","hidden")},Zr=function(t){t&&t.removeAttribute("hidden")},_r=function(t){return t.querySelector(".ActionListContent")},g([U],ea.prototype,"includeFragment",void 0),g([U],ea.prototype,"dialog",void 0),g([U],ea.prototype,"filterInputTextField",void 0),g([U],ea.prototype,"remoteInput",void 0),g([U],ea.prototype,"list",void 0),g([U],ea.prototype,"noResults",void 0),g([U],ea.prototype,"fragmentErrorElement",void 0),g([U],ea.prototype,"bannerErrorElement",void 0),g([U],ea.prototype,"bodySpinner",void 0),g([U],ea.prototype,"liveRegion",void 0),ea=g([j],ea),window.customElements.get("select-panel")||(window.SelectPanelElement=ea,window.customElements.define("select-panel",ea));let na=class DetailsToggleElement extends HTMLElement{toggle(){if(this.detailsTarget.hasAttribute("open")){const t=this.summaryTarget.getAttribute("data-aria-label-closed");t&&this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","false")}else{const t=this.summaryTarget.getAttribute("data-aria-label-open");t&&this.summaryTarget.setAttribute("aria-label",t),this.summaryTarget.setAttribute("aria-expanded","true")}}};function ia(t){kt(t,{bindKeys:gt.ArrowVertical|gt.ArrowHorizontal|gt.HomeAndEnd|gt.Backspace,getNextFocusable:(t,e,n)=>{if(e instanceof HTMLElement){try{if(e.closest("dialog:modal"))return}catch{}return function(t,e){switch(`${function(t){if("treeitem"!==t.getAttribute("role"))throw new Error("Element is not a treeitem");switch(t.getAttribute("aria-expanded")){case"true":return"open";case"false":return"closed";default:return"end"}}(t)} ${e.key}`){case"open ArrowRight":return function(t){const e=t.querySelector("[role=treeitem]");return e instanceof HTMLElement?e:void 0}(t);case"open ArrowLeft":case"closed ArrowRight":case"end ArrowRight":return;case"closed ArrowLeft":case"end ArrowLeft":return ra(t)}switch(e.key){case"ArrowUp":return sa(t,"previous");case"ArrowDown":return sa(t,"next");case"Backspace":return ra(t)}}(e,n)??e}},focusInStrategy:()=>{let e=t.querySelector("[aria-current]");e=e?.checkVisibility()?e:null;const n=t.querySelector('[role="treeitem"]');return e instanceof HTMLElement?e:document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&"treeitem"===document.activeElement.getAttribute("role")?document.activeElement:n instanceof HTMLElement?n:void 0}})}function sa(t,e){const n=t.closest("[role=tree]");if(!n)return;const i=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,t=>t instanceof HTMLElement&&"treeitem"===t.getAttribute("role")?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP);let s=i.firstChild();for(;s!==t;)s=i.nextNode();let o="next"===e?i.nextNode():i.previousNode();for(;o instanceof HTMLElement&&oa(o,n);)o="next"===e?i.nextNode():i.previousNode();return o instanceof HTMLElement?o:void 0}function oa(t,e){for(const n of e.querySelectorAll("[role=treeitem][aria-expanded=false]"))if(t!==n&&n.closest("li")?.contains(t))return n;return null}function ra(t){const e=t.closest("[role=group]"),n=e?.closest("[role=treeitem]");return n instanceof HTMLElement?n:void 0}var aa,la,ca,da,ha,ua,fa,ma,pa,ga,ba,va;g([U],na.prototype,"detailsTarget",void 0),g([U],na.prototype,"summaryTarget",void 0),na=g([j],na),window.DetailsToggleElement=na;let wa=class TreeViewElement extends HTMLElement{constructor(){super(...arguments),aa.add(this),la.set(this,void 0)}connectedCallback(){const{signal:t}=v(this,la,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("focusin",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),ia(this),new MutationObserver(t=>{for(const e of t)for(const t of e.addedNodes)t instanceof HTMLElement&&t.querySelector("[aria-expanded=true]")&&b(this,aa,"m",ca).call(this,t)}).observe(this,{childList:!0,subtree:!0});new MutationObserver(t=>{if(!this.formInputContainer)return;if(!t.some(t=>t.target instanceof HTMLElement&&t.target.getAttribute("aria-checked")!==t.oldValue))return;const e=[];for(const t of this.querySelectorAll("[role=treeitem][aria-checked=true]")){const n=this.formInputPrototype.cloneNode();n.removeAttribute("data-target"),n.removeAttribute("form");const i={path:this.getNodePath(t)},s=this.getFormInputValueForNode(t);s&&(i.value=s),n.value=JSON.stringify(i),e.push(n)}this.formInputContainer.replaceChildren(...e)}).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]}),customElements.whenDefined("tree-view-sub-tree-node").then(()=>{b(this,aa,"m",ca).call(this,this)})}rootLeafNodes(){return this.querySelectorAll(":scope > ul > li > .TreeViewItemContainer [role=treeitem]")}rootSubTreeNodes(){return this.querySelectorAll(":scope > ul > tree-view-sub-tree-node")}disconnectedCallback(){b(this,la,"f").abort()}handleEvent(t){const e=b(this,aa,"m",ha).call(this,t);e&&b(this,aa,"m",ua).call(this,e,t)}handleSingleSelection(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if(!(e instanceof HTMLDivElement))return;const n=this.getNodePath(e),i=this.infoFromNode(e,"true");this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:[i]}))&&("true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.checkOnlyAtPath(n),this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,detail:[i]})))}getFormInputValueForNode(t){return t.getAttribute("data-value")}getNodePath(t){const e=t.getAttribute("data-path");return e?JSON.parse(e):[]}getNodeType(t){return t.getAttribute("data-node-type")}markCurrentAtPath(t){const e=JSON.stringify(t),n=this.querySelector(`[data-path="${CSS.escape(e)}"`);n&&(this.currentNode?.setAttribute("aria-current","false"),n.setAttribute("aria-current","true"))}get currentNode(){return this.querySelector("[aria-current=true]")}get activeNodes(){return document.querySelectorAll('[aria-checked="true"]')}expandAtPath(t){const e=this.subTreeAtPath(t);e&&e.expand()}collapseAtPath(t){const e=this.subTreeAtPath(t);e&&e.collapse()}toggleAtPath(t){const e=this.subTreeAtPath(t);e&&e.toggle()}checkAtPath(t){const e=this.nodeAtPath(t);e&&this.setNodeCheckedValue(e,"true")}uncheckAtPath(t){const e=this.nodeAtPath(t);e&&this.setNodeCheckedValue(e,"false")}checkOnlyAtPath(t){for(const t of this.activeNodes)this.uncheckAtPath(this.getNodePath(t));this.checkAtPath(t)}toggleCheckedAtPath(t){const e=this.nodeAtPath(t);e&&"leaf"===this.getNodeType(e)&&("true"===this.getNodeCheckedValue(e)?this.uncheckAtPath(t):this.checkAtPath(t))}checkedValueAtPath(t){const e=this.nodeAtPath(t);return e?this.getNodeCheckedValue(e):"false"}disabledValueAtPath(t){const e=this.nodeAtPath(t);return!!e&&this.getNodeDisabledValue(e)}nodeAtPath(t,e){const n=JSON.stringify(t);return this.querySelector(`${e||""}[data-path="${CSS.escape(n)}"]`)}subTreeAtPath(t){const e=this.nodeAtPath(t,"[data-node-type=sub-tree]");return e?e.closest("tree-view-sub-tree-node"):null}leafAtPath(t){return this.nodeAtPath(t,"[data-node-type=leaf]")}setNodeCheckedValue(t,e){t.setAttribute("aria-checked",e.toString())}getNodeCheckedValue(t){return t.getAttribute("aria-checked")||"false"}getNodeDisabledValue(t){return"true"===t.getAttribute("aria-disabled")}setNodeDisabledValue(t,e){e?t.setAttribute("aria-disabled","true"):t.removeAttribute("aria-disabled")}nodeHasCheckBox(t){return null!==t.querySelector(".TreeViewItemCheckbox")}nodeHasNativeAction(t){return t instanceof HTMLAnchorElement||t instanceof HTMLButtonElement}expandAncestorsForNode(t){const e=t.closest("tree-view-sub-tree-node");if(e)for(const t of e.eachAncestorSubTreeNode())t.expanded||t.expand()}changeSelectStrategy(t){for(const e of this.querySelectorAll("tree-view-sub-tree-node"))e.changeSelectStrategy(t)}infoFromNode(t,e){const n=this.getNodeType(t);if(!n)return null;const i=this.getNodeCheckedValue(t);return{node:t,type:n,path:this.getNodePath(t),checkedValue:e||i,previousCheckedValue:i}}selectVariant(t){return t.getAttribute("data-select-variant")||"none"}};var ya,Ea;la=new WeakMap,aa=new WeakSet,ca=function(t){for(const e of t.querySelectorAll("[aria-expanded=true]"))this.expandAncestorsForNode(e)},da=function(t){return"click"===t.type},ha=function(t){const e=t.target,n=e.closest("[role=treeitem]");return n?e.closest(".TreeViewItemToggle")||e.closest(".TreeViewItemLeadingAction")?null:n:null},ua=function(t,e){b(this,aa,"m",fa).call(this,e,t)?b(this,aa,"m",ma).call(this,e,t):b(this,aa,"m",pa).call(this,e,t)?this.handleSingleSelection(e,t):b(this,aa,"m",da).call(this,e)?b(this,aa,"m",ga).call(this,e,t):"focusin"===e.type?b(this,aa,"m",ba).call(this,t):e instanceof KeyboardEvent&&b(this,aa,"m",va).call(this,e,t)},fa=function(t,e){return"click"===t.type&&this.nodeHasCheckBox(e)},ma=function(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if("leaf"!==this.getNodeType(e))return;const n="false"===this.getNodeCheckedValue(e)?"true":"false",i=this.infoFromNode(e,n);this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:[i]}))&&("true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.setNodeCheckedValue(e,"true"),this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,cancelable:!0,detail:[i]})))},pa=function(t,e){return"click"===t.type&&"single"===this.selectVariant(e)},ga=function(t,e){if(this.getNodeDisabledValue(e))return void t.preventDefault();if(!(e instanceof HTMLDivElement))return;const n=this.getNodePath(e);this.dispatchEvent(new CustomEvent("treeViewBeforeNodeActivated",{bubbles:!0,cancelable:!0,detail:this.infoFromNode(e)}))&&(this.nodeHasNativeAction(e)||this.toggleAtPath(n),this.dispatchEvent(new CustomEvent("treeViewNodeActivated",{bubbles:!0,detail:this.infoFromNode(e)})))},ba=function(t){const e=this.querySelector("[aria-selected=true]");e?.setAttribute("aria-selected","false"),t.setAttribute("aria-selected","true")},va=function(t,e){if(e&&"leaf"===this.getNodeType(e))switch(t.key){case" ":case"Enter":if(this.getNodeDisabledValue(e)){t.preventDefault();break}"multiple"===this.selectVariant(e)?(t.preventDefault(),"true"===this.getNodeCheckedValue(e)?this.setNodeCheckedValue(e,"false"):this.setNodeCheckedValue(e,"true")):"single"===this.selectVariant(e)?(t.preventDefault(),this.checkOnlyAtPath(this.getNodePath(e))):e instanceof HTMLAnchorElement&&e.click()}},g([U],wa.prototype,"formInputContainer",void 0),g([U],wa.prototype,"formInputPrototype",void 0),wa=g([j],wa),window.customElements.get("tree-view")||(window.TreeViewElement=wa,window.customElements.define("tree-view",wa));let Aa=class TreeViewIconPairElement extends HTMLElement{constructor(){super(...arguments),ya.add(this)}connectedCallback(){$e(this,()=>Boolean(this.collapsedIcon)&&Boolean(this.expandedIcon),()=>{this.expanded=this.collapsedIcon.hidden})}showExpanded(){this.expanded=!0,b(this,ya,"m",Ea).call(this)}showCollapsed(){this.expanded=!1,b(this,ya,"m",Ea).call(this)}toggle(){this.expanded=!this.expanded,b(this,ya,"m",Ea).call(this)}};var ka,La,Ta,Ca,Sa,xa,Ma,Ia,Da,Pa,Na,Oa;ya=new WeakSet,Ea=function(){this.expanded?(this.expandedIcon.hidden=!1,this.collapsedIcon.hidden=!0):(this.expandedIcon.hidden=!0,this.collapsedIcon.hidden=!1)},g([U],Aa.prototype,"expandedIcon",void 0),g([U],Aa.prototype,"collapsedIcon",void 0),Aa=g([j],Aa),window.customElements.get("tree-view-icon-pair")||(window.TreeViewIconPairElement=Aa,window.customElements.define("tree-view-icon-pair",Aa));let Ha=class TreeViewSubTreeNodeElement extends HTMLElement{constructor(){super(...arguments),ka.add(this),La.set(this,null),Ta.set(this,"success"),Ca.set(this,void 0),Sa.set(this,!1)}connectedCallback(){$e(this,()=>Boolean(this.node)&&Boolean(this.subTree),()=>{b(this,ka,"m",Na).call(this)});const{signal:t}=v(this,Ca,new AbortController,"f");this.addEventListener("click",this,{signal:t}),this.addEventListener("keydown",this,{signal:t}),$e(this,()=>Boolean(this.includeFragment),()=>{this.includeFragment.addEventListener("loadstart",this,{signal:t}),this.includeFragment.addEventListener("error",this,{signal:t}),this.includeFragment.addEventListener("include-fragment-replace",this,{signal:t}),this.includeFragment.addEventListener("include-fragment-replaced",t=>{b(this,ka,"m",Ma).call(this,t)},{signal:t})}),$e(this,()=>Boolean(this.retryButton),()=>{this.retryButton.addEventListener("click",t=>{b(this,ka,"m",Ia).call(this,t)},{signal:t})});new MutationObserver(()=>{if("mixed_descendants"!==this.selectStrategy)return;let t="unknown";for(const e of this.eachDirectDescendantNode())switch(`${t} ${e.getAttribute("aria-checked")||"false"}`){case"unknown mixed":case"false mixed":case"true mixed":case"false true":case"true false":t="mixed";break;case"unknown false":t="false";break;case"unknown true":t="true"}"unknown"!==t&&this.node?.getAttribute("aria-checked")!==t&&this.node?.setAttribute("aria-checked",t)}).observe(this,{childList:!0,subtree:!0,attributeFilter:["aria-checked"]})}get expanded(){return null===b(this,La,"f")&&v(this,La,"true"===this.node.getAttribute("aria-expanded"),"f"),b(this,La,"f")}set expanded(t){v(this,La,t,"f"),b(this,ka,"m",Na).call(this)}get loadingState(){return b(this,Ta,"f")}set loadingState(t){v(this,Ta,t,"f"),b(this,ka,"m",Na).call(this)}get selectStrategy(){return this.node.getAttribute("data-select-strategy")||"descendants"}get selectVariant(){return this.node.getAttribute("data-select-variant")||"none"}get level(){return parseInt(this.node.getAttribute("aria-level")||"0")}disconnectedCallback(){b(this,Ca,"f").abort()}handleEvent(t){t.target===this.toggleButton?b(this,ka,"m",xa).call(this,t):t.target===this.includeFragment?b(this,ka,"m",Ma).call(this,t):t instanceof KeyboardEvent?b(this,ka,"m",Da).call(this,t):t.target.closest("[role=treeitem]")===this.node&&"click"===t.type&&b(this,ka,"a",Oa)&&b(this,ka,"m",Pa).call(this,t)}expand(){const t=this.expanded;this.expanded=!0,!t&&this.treeView&&this.treeView.dispatchEvent(new CustomEvent("treeViewNodeExpanded",{bubbles:!0,detail:this.treeView?.infoFromNode(this.node)}))}collapse(){const t=!this.expanded;if(this.expanded=!1,!t&&this.treeView){const t=this.subTree.querySelector("[tabindex='0']");t?.setAttribute("tabindex","-1"),this.node.setAttribute("tabindex","0"),this.treeView.dispatchEvent(new CustomEvent("treeViewNodeCollapsed",{bubbles:!0,detail:this.treeView?.infoFromNode(this.node)}))}}toggle(){this.expanded?this.collapse():this.expand()}get nodes(){return this.querySelectorAll(":scope > [role=treeitem]")}*eachDirectDescendantNode(){for(const t of this.subTree.querySelectorAll(":scope > li > .TreeViewItemContainer > [role=treeitem]"))yield t;for(const t of this.subTree.querySelectorAll(":scope > tree-view-sub-tree-node > li > .TreeViewItemContainer > [role=treeitem]"))yield t}*eachDirectDescendantSubTreeNode(){for(const t of this.subTree.querySelectorAll(":scope > tree-view-sub-tree-node"))yield t}*eachDescendantNode(){for(const t of this.subTree.querySelectorAll("[role=treeitem]"))yield t}*eachAncestorSubTreeNode(){if(!this.treeView)return;let t=this;for(;t&&this.treeView.contains(t);)yield t,t=t.parentElement?.closest("tree-view-sub-tree-node")}get isEmpty(){return 0===this.nodes.length}get treeView(){return this.closest("tree-view")}toggleChecked(){const t="false"===(this.treeView?.getNodeCheckedValue(this.node)||"false")?"true":"false",e=[],n=this.treeView?.infoFromNode(this.node,t);if(n&&e.push(n),"descendants"===this.selectStrategy||"mixed_descendants"===this.selectStrategy)for(const n of this.eachDescendantNode()){const i=this.treeView?.infoFromNode(n,t);i&&e.push(i)}if(this.dispatchEvent(new CustomEvent("treeViewBeforeNodeChecked",{bubbles:!0,cancelable:!0,detail:e}))){for(const n of e)n.node.setAttribute("aria-checked",t);this.dispatchEvent(new CustomEvent("treeViewNodeChecked",{bubbles:!0,cancelable:!0,detail:e}))}}changeSelectStrategy(t){this.node.setAttribute("data-select-strategy",t)}};La=new WeakMap,Ta=new WeakMap,Ca=new WeakMap,Sa=new WeakMap,ka=new WeakSet,xa=function(t){"click"===t.type&&(this.toggle(),t.stopPropagation())},Ma=function(t){switch(t.type){case"loadstart":this.loadingState="loading";break;case"error":this.loadingState="error";break;case"include-fragment-replace":v(this,Sa,document.activeElement===this.loadingIndicator.closest("[role=treeitem]"),"f"),this.loadingState="success";break;case"include-fragment-replaced":if(this.expanded=!0,b(this,Sa,"f")){const t=this.querySelector("[role=group] > :first-child");if(!t)return;const e=t.querySelector("[role=treeitem]");if(!e)return;e.focus()}v(this,Sa,!1,"f")}},Ia=function(t){"click"===t.type&&(this.loadingState="loading",this.includeFragment.refetch())},Da=function(t){const e=t.target.closest("[role=treeitem]");if(e&&"sub-tree"===this.treeView?.getNodeType(e))switch(t.key){case"Enter":if(this.treeView?.getNodeDisabledValue(e)){t.preventDefault();break}t.stopPropagation(),b(this,ka,"a",Oa)?this.toggleChecked():"single"===this.selectVariant?this.treeView.handleSingleSelection(t,e):this.treeView?.nodeHasNativeAction(e)||this.toggle();break;case"ArrowRight":t.stopPropagation(),this.expand();break;case"ArrowLeft":t.stopPropagation(),this.collapse();break;case" ":if(this.treeView?.getNodeDisabledValue(e)){t.preventDefault();break}b(this,ka,"a",Oa)?(t.stopPropagation(),t.preventDefault(),this.toggleChecked()):"single"===this.selectVariant?this.treeView.handleSingleSelection(t,e):e instanceof HTMLAnchorElement?e.click():this.treeView?.nodeHasNativeAction(e)||this.toggle()}},Pa=function(t){this.treeView?.getNodeDisabledValue(this.node)?t.preventDefault():"click"===t.type&&(this.toggleChecked(),t.stopPropagation())},Na=function(){switch(this.expanded?(this.subTree&&(this.subTree.hidden=!1),this.node.setAttribute("aria-expanded","true"),this.treeView?.expandAncestorsForNode(this),this.iconPair&&this.iconPair.showExpanded(),this.expandedToggleIcon&&this.collapsedToggleIcon&&(this.expandedToggleIcon.removeAttribute("hidden"),this.collapsedToggleIcon.setAttribute("hidden","hidden"))):(this.subTree&&(this.subTree.hidden=!0),this.node.setAttribute("aria-expanded","false"),this.iconPair&&this.iconPair.showCollapsed(),this.expandedToggleIcon&&this.collapsedToggleIcon&&(this.expandedToggleIcon.setAttribute("hidden","hidden"),this.collapsedToggleIcon.removeAttribute("hidden"))),this.loadingState){case"loading":this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!0),this.loadingIndicator&&(this.loadingIndicator.hidden=!1);break;case"error":this.loadingIndicator&&(this.loadingIndicator.hidden=!0),this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!1);break;default:this.loadingIndicator&&(this.loadingIndicator.hidden=!0),this.loadingFailureMessage&&(this.loadingFailureMessage.hidden=!0)}},Oa=function(){return this.querySelector(".TreeViewItemCheckbox")},g([U],Ha.prototype,"node",void 0),g([U],Ha.prototype,"subTree",void 0),g([U],Ha.prototype,"iconPair",void 0),g([U],Ha.prototype,"toggleButton",void 0),g([U],Ha.prototype,"expandedToggleIcon",void 0),g([U],Ha.prototype,"collapsedToggleIcon",void 0),g([U],Ha.prototype,"includeFragment",void 0),g([U],Ha.prototype,"loadingIndicator",void 0),g([U],Ha.prototype,"loadingFailureMessage",void 0),g([U],Ha.prototype,"retryButton",void 0),Ha=g([j],Ha),window.customElements.get("tree-view-sub-tree-node")||(window.TreeViewSubTreeNodeElement=Ha,window.customElements.define("tree-view-sub-tree-node",Ha));let Fa=class TreeViewIncludeFragmentElement extends IncludeFragmentElement{request(){const t=super.request(),e=new URL(t.url);return e.searchParams.set("path",this.getAttribute("data-path")||""),new Request(e,{method:t.method,headers:t.headers,credentials:t.credentials})}};Fa=g([j],Fa),window.customElements.get("tree-view-include-fragment")||(window.TreeViewIncludeFragmentElement=Fa,window.customElements.define("tree-view-include-fragment",Fa));let Va=class PageHeaderElement extends HTMLElement{menuItemClick(t){const e=t.currentTarget,n=e?.getAttribute("data-for");n&&document.getElementById(n)?.click()}};Va=g([j],Va),window.customElements.get("page-header")||(window.PageHeaderElement=Va,window.customElements.define("page-header",Va));let qa=class ZenModeButtonElement extends HTMLElement{constructor(){super(),this.inZenMode=!1,document.addEventListener("fullscreenchange",this.fullscreenChangeEventHandler.bind(this))}disconnectedCallback(){document.removeEventListener("fullscreenchange",this.fullscreenChangeEventHandler.bind(this))}fullscreenChangeEventHandler(){this.changeButtonState(!this.inZenMode),this.dispatchZenModeStatus()}dispatchZenModeStatus(){const t=new CustomEvent("zenModeToggled",{detail:{active:this.inZenMode}});window.dispatchEvent(t)}deactivateZenMode(){document.exitFullscreen&&document.exitFullscreen()}activateZenMode(){document.documentElement.requestFullscreen&&document.documentElement.requestFullscreen()}changeButtonState(t){this.inZenMode=t,this.button.setAttribute("aria-pressed",t.toString())}performAction(){this.inZenMode?this.deactivateZenMode():this.activateZenMode()}};g([U],qa.prototype,"button",void 0),qa=g([j],qa),window.customElements.get("zen-mode-button")||(window.ZenModeButtonElement=qa,window.customElements.define("zen-mode-button",qa));let Ra=class SubHeaderElement extends HTMLElement{connectedCallback(){this.setupFilterInputClearButton()}setupFilterInputClearButton(){this.waitForCondition(()=>Boolean(this.filterInput),()=>{this.toggleFilterInputClearButton()})}toggleFilterInputClearButton(){this.filterInput.value.length>0?this.filterInput.classList.remove("SubHeader-filterInput_hiddenClearButton"):this.filterInput.classList.add("SubHeader-filterInput_hiddenClearButton")}expandFilterInput(){for(const t of this.hiddenItemsOnExpandedFilter)t.classList.add("d-none");for(const t of this.shownItemsOnExpandedFilter)t.classList.remove("d-none");this.classList.add("SubHeader--expandedSearch"),this.filterInput.focus()}collapseFilterInput(){for(const t of this.hiddenItemsOnExpandedFilter)t.classList.remove("d-none");for(const t of this.shownItemsOnExpandedFilter)t.classList.add("d-none");this.classList.remove("SubHeader--expandedSearch")}waitForCondition(t,e){if(t())e();else{const n=new MutationObserver(()=>{t()&&(e(),n.disconnect())});n.observe(this,{childList:!0,subtree:!0})}}};var Wa,Ba;g([U],Ra.prototype,"filterInput",void 0),g([K],Ra.prototype,"hiddenItemsOnExpandedFilter",void 0),g([K],Ra.prototype,"shownItemsOnExpandedFilter",void 0),Ra=g([j],Ra),window.customElements.get("sub-header")||(window.SubHeaderElement=Ra,window.customElements.define("sub-header",Ra));let $a=class DangerDialogFormHelperElement extends HTMLElement{constructor(){super(...arguments),Wa.add(this),this.confirmationLiveMessageChecked="",this.confirmationLiveMessageUnchecked=""}get form(){return this.querySelector("form")}get submitButton(){return this.querySelector("input[type=submit],button[type=submit],button[data-submit-dialog-id]")}connectedCallback(){this.style.display="contents",this.form&&(this.form.style.display="contents"),b(this,Wa,"m",Ba).call(this)}toggle(){if(!this.checkbox||!this.submitButton)return;const t=this.checkbox.checked;if(this.submitButton.disabled=!t,this.liveRegion){const e=t?this.confirmationLiveMessageChecked:this.confirmationLiveMessageUnchecked;this.liveRegion.announce(e,{politeness:"assertive"})}}};Wa=new WeakSet,Ba=function(){this.toggle()},g([U],$a.prototype,"checkbox",void 0),g([U],$a.prototype,"liveRegion",void 0),g([I],$a.prototype,"confirmationLiveMessageChecked",void 0),g([I],$a.prototype,"confirmationLiveMessageUnchecked",void 0),$a=g([j],$a),window.customElements.get("danger-dialog-form-helper")||(window.DangerDialogFormHelperElement=$a,window.customElements.define("danger-dialog-form-helper",$a));class CollapsibleElement extends HTMLElement{constructor(){super(...arguments),this.collapsed=!1}toggleViaKeyboard(t){"Enter"!==t.code&&"Space"!==t.code||(t.preventDefault(),this.toggle())}toggle(){this.collapsed=!this.collapsed}attributeChangedCallback(t){"data-collapsed"===t&&(this.collapsed?this.hideAll():this.expandAll())}hideAll(){this.arrowDown?.removeAttribute("hidden"),this.arrowUp?.setAttribute("hidden",""),this.triggerElement.setAttribute("aria-expanded","false");for(const t of this.collapsibleElements)t.hidden=!0;this.classList.add(`${this.baseClass}--collapsed`)}expandAll(){this.arrowUp?.removeAttribute("hidden"),this.arrowDown?.setAttribute("hidden",""),this.triggerElement.setAttribute("aria-expanded","true");for(const t of this.collapsibleElements)t.hidden=!1;this.classList.remove(`${this.baseClass}--collapsed`)}}g([U],CollapsibleElement.prototype,"arrowDown",void 0),g([U],CollapsibleElement.prototype,"arrowUp",void 0),g([U],CollapsibleElement.prototype,"triggerElement",void 0),g([K],CollapsibleElement.prototype,"collapsibleElements",void 0),g([I],CollapsibleElement.prototype,"collapsed",void 0);let Ua=class CollapsibleHeaderElement extends CollapsibleElement{connectedCallback(){if(!this.closest(".Box"))throw new Error("No surrounding BorderBox found")}get baseClass(){return"CollapsibleHeader"}};Ua=g([j],Ua);let Ka=class CollapsibleSectionElement extends CollapsibleElement{get baseClass(){return"CollapsibleSection"}};var ja,za,Za,_a,Ya,Ga,Xa,Ja,Qa,tl,el,nl,il,sl,ol,rl,al;Ka=g([j],Ka);let ll=class FilterableTreeViewElement extends HTMLElement{constructor(){super(...arguments),ja.add(this),za.set(this,void 0),Za.set(this,void 0),_a.set(this,new Map)}connectedCallback(){const{signal:t}=v(this,Za,new AbortController,"f");this.addEventListener("treeViewNodeChecked",this,{signal:t}),this.addEventListener("itemActivated",this,{signal:t}),this.addEventListener("input",this,{signal:t})}disconnectedCallback(){b(this,Za,"f").abort()}handleEvent(t){t.target===this.filterModeControl?b(this,ja,"m",Ja).call(this,t):t.target===this.filterInput?b(this,ja,"m",Qa).call(this,t):t.target===this.includeSubItemsCheckBox?b(this,ja,"m",tl).call(this,t):(t.target instanceof wa||t.target instanceof Ha)&&b(this,ja,"m",Ya).call(this,t)}get filterModeControl(){return this.filterModeControlList.closest("segmented-control")}get treeView(){return this.treeViewList.closest("tree-view")}set filterFn(t){v(this,za,t,"f")}get filterFn(){return b(this,za,"f")?b(this,za,"f"):this.defaultFilterFn}defaultFilterFn(t,e,n){const i=[];if(e.length>0){const n=e.toLowerCase(),s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let o=s.nextNode();for(;o;){const t=o.textContent?.toLocaleLowerCase()||"";let e=0;for(;e<t.length;){const s=t.indexOf(n,e);if(-1===s)break;const r=new Range;r.setStart(o,s),r.setEnd(o,s+n.length),i.push(r),e=s+n.length}o=s.nextNode()}}if(0===i.length&&e.length>0)return null;switch(n){case"selected":if("false"!==this.treeView?.getNodeCheckedValue(t))return i;break;case"all":return i}return null}get filterMode(){const t=this.filterModeControl?.current;return t?t.getAttribute("data-name"):null}get queryString(){return this.filterInput.value}*eachDescendantDepthFirst(t,e,n){for(const i of t.querySelectorAll(`[role=treeitem][data-node-type='sub-tree'][aria-level='${e}']`)){const t=i.closest("tree-view-sub-tree-node");yield*this.eachDescendantDepthFirst(t,e+1,[...n,t])}const i=t.querySelectorAll(`[role=treeitem][data-node-type='leaf'][aria-level='${e}']`);yield[i,n]}*eachShallowestCheckedSubTree(t){if("true"!==this.treeView?.getNodeCheckedValue(t.node))for(const e of t.eachDirectDescendantSubTreeNode())yield*this.eachShallowestCheckedSubTree(e);else yield t}};za=new WeakMap,Za=new WeakMap,_a=new WeakMap,ja=new WeakSet,Ya=function(t){const e=t;if("treeViewNodeChecked"===t.type)b(this,ja,"m",Ga).call(this,e)},Ga=function(t){if(!this.treeView)return;if(!this.includeSubItemsCheckBox.checked)return;const e=t.detail[0];if("sub-tree"!==this.treeView.getNodeType(e.node))return;const n=e.node.closest("tree-view-sub-tree-node");"false"===e.checkedValue?b(this,ja,"m",Xa).call(this,n):b(this,ja,"m",nl).call(this,n)},Xa=function(t){if(!this.treeView)return;if(!b(this,_a,"f").has(t))return;const e=b(this,_a,"f").get(t);for(const[t,n]of e.entries()){let e=t;t instanceof Ha&&(e=t.node),this.treeView.setNodeCheckedValue(e,n.checked?"true":"false"),this.treeView.setNodeDisabledValue(e,n.disabled)}b(this,_a,"f").delete(t)},Ja=function(t){"itemActivated"===t.type&&b(this,ja,"m",sl).call(this)},Qa=function(t){"input"===t.type&&b(this,ja,"m",sl).call(this)},tl=function(t){this.treeView&&"input"===t.type&&(b(this,ja,"m",sl).call(this),this.includeSubItemsCheckBox.checked?b(this,ja,"m",el).call(this):b(this,ja,"m",il).call(this))},el=function(){if(this.treeView)for(const t of this.treeView.rootSubTreeNodes())for(const e of this.eachShallowestCheckedSubTree(t))b(this,ja,"m",nl).call(this,e)},nl=function(t){if(!this.treeView)return;const e=new Map;for(const n of t.eachDescendantNode())e.set(n,{checked:"true"===this.treeView.getNodeCheckedValue(n),disabled:this.treeView.getNodeDisabledValue(n)}),this.treeView.setNodeCheckedValue(n,"true"),this.treeView.setNodeDisabledValue(n,!0);b(this,_a,"f").set(t,e)},il=function(){for(const t of b(this,_a,"f").keys())b(this,ja,"m",Xa).call(this,t)},sl=function(){if(!this.treeView)return;b(this,ja,"m",al).call(this);const t=this.queryString,e=this.filterMode||void 0,n=window.crypto.randomUUID(),i=new Map,s=(...i)=>{for(const s of i)s.expand(),s.removeAttribute("hidden"),s.setAttribute("data-generation",n),o(s.node,t,e)?s.node.removeAttribute("aria-disabled"):s.node.setAttribute("aria-disabled","true")},o=(t,e,n)=>(i.has(t)||i.set(t,this.filterFn(t,e,n)),null!==i.get(t));for(const[i,r]of this.eachDescendantDepthFirst(this.treeViewList,1,[])){const a=r[r.length-1];let l=!1;for(const n of i)o(n,t,e)?(n.closest("li")?.removeAttribute("hidden"),l=!0):n.closest("li")?.setAttribute("hidden","hidden");l?s(...r):a&&(o(a.node,t,e)?s(...r):a.getAttribute("data-generation")!==n&&(a.collapse(),a.setAttribute("hidden","hidden")))}const r=Array.from(i.values()).flat().filter(t=>null!==t);0===r.length&&t.length>0?(this.treeViewList.setAttribute("hidden","hidden"),this.noResultsMessage.removeAttribute("hidden")):(this.treeViewList.removeAttribute("hidden"),this.noResultsMessage.setAttribute("hidden","hidden"),b(this,ja,"m",ol).call(this,r))},ol=function(t){CSS.highlights?CSS.highlights.set("primer-filterable-tree-view-search-results",new Highlight(...t)):b(this,ja,"m",rl).call(this,t)},rl=function(t){const e=t[0].startContainer,n=e.parentNode,i=e.textContent,s=[];let o=0;for(const{startOffset:e,endOffset:n}of t){e>o&&s.push(document.createTextNode(i.slice(o,e)));const t=document.createElement("mark");t.textContent=i.slice(e,n),s.push(t),o=n}o<i.length&&s.push(document.createTextNode(i.slice(o)));for(const t of s.reverse())n.insertBefore(t,e.nextSibling);n.removeChild(e)},al=function(){for(const t of this.querySelectorAll("mark"))t.parentElement&&t.parentElement.replaceChildren(t.parentElement.textContent)},g([U],ll.prototype,"filterInput",void 0),g([U],ll.prototype,"filterModeControlList",void 0),g([U],ll.prototype,"treeViewList",void 0),g([U],ll.prototype,"noResultsMessage",void 0),g([U],ll.prototype,"includeSubItemsCheckBox",void 0),ll=g([j],ll),window.customElements.get("filterable-tree-view")||(window.FilterableTreeViewElement=ll,window.customElements.define("filterable-tree-view",ll))}();
2
2
  //# sourceMappingURL=primer_view_components.js.map